urembo-hub-api
Preparing search index...
live-shopping/live-shopping.controller
LiveShoppingController
Class LiveShoppingController
Index
Constructors
constructor
Methods
add
Message
add
Product
To
Session
create
Session
delete
Session
feature
Product
get
All
Sessions
get
Live
Shopping
Stats
get
Session
By
Id
get
Session
Messages
get
Session
Participants
get
User
Sessions
join
Session
leave
Session
remove
Product
From
Session
search
Sessions
update
Session
Constructors
constructor
new
LiveShoppingController
(
liveShoppingService
:
LiveShoppingService
,
)
:
LiveShoppingController
Parameters
liveShoppingService
:
LiveShoppingService
Returns
LiveShoppingController
Methods
add
Message
addMessage
(
sessionId
:
string
,
createMessageDto
:
Omit
<
CreateLiveMessageDto
,
"sessionId"
>
,
req
:
any
,
)
:
Promise
<
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
,
>
Parameters
sessionId
:
string
createMessageDto
:
Omit
<
CreateLiveMessageDto
,
"sessionId"
>
req
:
any
Returns
Promise
<
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
,
>
add
Product
To
Session
addProductToSession
(
sessionId
:
string
,
productId
:
string
,
req
:
any
,
)
:
Promise
<
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
,
>
Parameters
sessionId
:
string
productId
:
string
req
:
any
Returns
Promise
<
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
,
>
create
Session
createSession
(
createSessionDto
:
CreateLiveSessionDto
,
req
:
any
,
)
:
Promise
<
{
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
Parameters
createSessionDto
:
CreateLiveSessionDto
req
:
any
Returns
Promise
<
{
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
delete
Session
deleteSession
(
id
:
string
,
req
:
any
)
:
Promise
<
{
message
:
string
}
>
Parameters
id
:
string
req
:
any
Returns
Promise
<
{
message
:
string
}
>
feature
Product
featureProduct
(
sessionId
:
string
,
productId
:
string
,
req
:
any
,
)
:
Promise
<
{
message
:
string
}
>
Parameters
sessionId
:
string
productId
:
string
req
:
any
Returns
Promise
<
{
message
:
string
}
>
get
All
Sessions
getAllSessions
(
page
?:
string
,
limit
?:
string
,
status
?:
string
,
retailerId
?:
string
,
category
?:
string
,
)
:
Promise
<
{
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
;
}
;
sessions
:
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
;
}
,
>
Parameters
Optional
page
:
string
Optional
limit
:
string
Optional
status
:
string
Optional
retailerId
:
string
Optional
category
:
string
Returns
Promise
<
{
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
;
}
;
sessions
:
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
;
}
,
>
get
Live
Shopping
Stats
getLiveShoppingStats
(
req
:
any
,
)
:
Promise
<
{
endedSessions
:
number
;
liveSessions
:
number
;
scheduledSessions
:
number
;
totalMessages
:
number
;
totalParticipants
:
number
;
totalSessions
:
number
;
}
,
>
Parameters
req
:
any
Returns
Promise
<
{
endedSessions
:
number
;
liveSessions
:
number
;
scheduledSessions
:
number
;
totalMessages
:
number
;
totalParticipants
:
number
;
totalSessions
:
number
;
}
,
>
get
Session
By
Id
getSessionById
(
id
:
string
,
)
:
Promise
<
{
messages
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
participants
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
Parameters
id
:
string
Returns
Promise
<
{
messages
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
participants
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
get
Session
Messages
getSessionMessages
(
sessionId
:
string
,
page
?:
string
,
limit
?:
string
,
)
:
Promise
<
{
messages
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
}
;
}
,
>
Parameters
sessionId
:
string
Optional
page
:
string
Optional
limit
:
string
Returns
Promise
<
{
messages
:
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
;
}
;
}
&
{
createdAt
:
Date
;
id
:
string
;
isModerator
:
boolean
;
message
:
string
;
messageType
:
string
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
;
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
}
;
}
,
>
get
Session
Participants
getSessionParticipants
(
sessionId
:
string
,
)
:
Promise
<
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
,
>
Parameters
sessionId
:
string
Returns
Promise
<
(
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
)
[]
,
>
get
User
Sessions
getUserSessions
(
req
:
any
,
page
?:
string
,
limit
?:
string
,
)
:
Promise
<
{
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
;
}
;
sessions
:
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
;
}
,
>
Parameters
req
:
any
Optional
page
:
string
Optional
limit
:
string
Returns
Promise
<
{
pagination
:
{
limit
:
number
;
page
:
number
;
pages
:
number
;
total
:
number
;
}
;
sessions
:
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
;
}
,
>
join
Session
joinSession
(
sessionId
:
string
,
req
:
any
,
)
:
Promise
<
|
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
|
{
message
:
string
}
,
>
Parameters
sessionId
:
string
req
:
any
Returns
Promise
<
|
{
user
:
{
email
:
string
;
fullName
:
string
;
id
:
string
;
role
:
user_role
}
;
}
&
{
id
:
string
;
isActive
:
boolean
;
joinedAt
:
Date
;
lastSeenAt
:
Date
;
leftAt
:
Date
;
sessionId
:
string
;
userId
:
string
;
}
|
{
message
:
string
}
,
>
leave
Session
leaveSession
(
sessionId
:
string
,
req
:
any
)
:
Promise
<
{
message
:
string
}
>
Parameters
sessionId
:
string
req
:
any
Returns
Promise
<
{
message
:
string
}
>
remove
Product
From
Session
removeProductFromSession
(
sessionId
:
string
,
productId
:
string
,
req
:
any
,
)
:
Promise
<
{
message
:
string
}
>
Parameters
sessionId
:
string
productId
:
string
req
:
any
Returns
Promise
<
{
message
:
string
}
>
search
Sessions
searchSessions
(
req
:
any
,
query
:
string
,
)
:
Promise
<
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
,
>
Parameters
req
:
any
query
:
string
Returns
Promise
<
(
{
_count
:
{
messages
:
number
;
participants
:
number
}
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
)
[]
,
>
update
Session
updateSession
(
id
:
string
,
updateSessionDto
:
UpdateLiveSessionDto
,
req
:
any
,
)
:
Promise
<
{
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
Parameters
id
:
string
updateSessionDto
:
UpdateLiveSessionDto
req
:
any
Returns
Promise
<
{
products
:
(
{
product
:
{
currency
:
string
;
id
:
string
;
imageUrl
:
string
;
name
:
string
;
price
:
Decimal
;
stockQuantity
:
number
;
}
;
}
&
{
createdAt
:
Date
;
featuredAt
:
Date
;
id
:
string
;
isCurrentlyFeatured
:
boolean
;
isFeatured
:
boolean
;
position
:
number
;
productId
:
string
;
sessionId
:
string
;
}
)
[]
;
retailer
:
{
businessName
:
string
;
email
:
string
;
fullName
:
string
;
id
:
string
;
}
;
}
&
{
actualEnd
:
Date
;
actualStart
:
Date
;
createdAt
:
Date
;
description
:
string
;
endedAt
:
Date
;
id
:
string
;
isActive
:
boolean
;
retailerId
:
string
;
scheduledAt
:
Date
;
startedAt
:
Date
;
status
:
string
;
streamUrl
:
string
;
thumbnailUrl
:
string
;
title
:
string
;
updatedAt
:
Date
;
vendorId
:
string
;
viewerCount
:
number
;
}
,
>
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
On This Page
Constructors
constructor
Methods
add
Message
add
Product
To
Session
create
Session
delete
Session
feature
Product
get
All
Sessions
get
Live
Shopping
Stats
get
Session
By
Id
get
Session
Messages
get
Session
Participants
get
User
Sessions
join
Session
leave
Session
remove
Product
From
Session
search
Sessions
update
Session
urembo-hub-api
Loading...