Module utils/composable/usePubnubHook
Functions
triggerAddChattingMessage
- triggerAddChattingMessage(fn: any): void
triggerAddFakeChattingMessage
- triggerAddFakeChattingMessage(fn: any): void
triggerChattingMessagesHaveBeenAnalyzedSuccessfully
- triggerChattingMessagesHaveBeenAnalyzedSuccessfully(fn: any): void
triggerCouponDistributed
- triggerCouponDistributed(fn: any): void
triggerCouponStatusChanged
- triggerCouponStatusChanged(fn: any): void
triggerHideChattingMessage
- triggerHideChattingMessage(fn: any): void
triggerLiveStopped
- triggerLiveStopped(fn: any): void
triggerLuckyDrawDrawing
- triggerLuckyDrawDrawing(fn: any): void
triggerLuckyDrawEnded
- triggerLuckyDrawEnded(fn: any): void
triggerPinMessageChanged
- triggerPinMessageChanged(fn: any): void
triggerProductsChanged
- triggerProductsChanged(fn: any): void
triggerPromotingProducts
- triggerPromotingProducts(fn: any): void
triggerShowChattingMessage
- triggerShowChattingMessage(fn: any): void
usePubnubHook
- usePubnubHook(): { onAddChattingMessage: ((cb: ((msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }) => void)) => void); onAddFakeChattingMessage: ((cb: ((msg: { message: string; userName: string }) => void)) => void); onChattingMessagesHaveBeenAnalyzedSuccessfully: ((cb: ((msg: { message: unknown }) => void)) => void); onCouponDistributed: ((cb: ((data: CouponDistributedPayload) => void)) => void); onCouponStatusChanged: ((cb: ((couponActivity: DurationActivity) => void)) => void); onHideChattingMessage: ((cb: ((id: string) => void)) => void); onLiveStopped: ((cb: (() => void)) => void); onLuckyDrawDrawing: ((cb: (() => void)) => void); onLuckyDrawEnded: ((cb: ((drawId: number) => void)) => void); onPinMessageChanged: ((cb: ((msg: { comment_id: string; message: string }) => void)) => void); onProductsChanged: ((cb: ((productLikes: productLike[]) => void)) => void); onPromotingProducts: ((cb: ((productIds: number[]) => void)) => void); onShowChattingMessage: ((cb: ((id: string) => void)) => void) }
Returns { onAddChattingMessage: ((cb: ((msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }) => void)) => void); onAddFakeChattingMessage: ((cb: ((msg: { message: string; userName: string }) => void)) => void); onChattingMessagesHaveBeenAnalyzedSuccessfully: ((cb: ((msg: { message: unknown }) => void)) => void); onCouponDistributed: ((cb: ((data: CouponDistributedPayload) => void)) => void); onCouponStatusChanged: ((cb: ((couponActivity: DurationActivity) => void)) => void); onHideChattingMessage: ((cb: ((id: string) => void)) => void); onLiveStopped: ((cb: (() => void)) => void); onLuckyDrawDrawing: ((cb: (() => void)) => void); onLuckyDrawEnded: ((cb: ((drawId: number) => void)) => void); onPinMessageChanged: ((cb: ((msg: { comment_id: string; message: string }) => void)) => void); onProductsChanged: ((cb: ((productLikes: productLike[]) => void)) => void); onPromotingProducts: ((cb: ((productIds: number[]) => void)) => void); onShowChattingMessage: ((cb: ((id: string) => void)) => void) }
onAddChattingMessage: ((cb: ((msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }) => void)) => void)
- (cb: ((msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }) => void)): void
Parameters
cb: ((msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }) => void)
- (msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }): void
Parameters
msg: { customAdminCommentStyle: unknown; message: unknown; timeToken: number }
customAdminCommentStyle: unknown
message: unknown
timeToken: number
Returns void
Returns void
onAddFakeChattingMessage: ((cb: ((msg: { message: string; userName: string }) => void)) => void)
- (cb: ((msg: { message: string; userName: string }) => void)): void
Parameters
cb: ((msg: { message: string; userName: string }) => void)
- (msg: { message: string; userName: string }): void
Parameters
msg: { message: string; userName: string }
message: string
userName: string
Returns void
Returns void
onChattingMessagesHaveBeenAnalyzedSuccessfully: ((cb: ((msg: { message: unknown }) => void)) => void)
- (cb: ((msg: { message: unknown }) => void)): void
Parameters
cb: ((msg: { message: unknown }) => void)
- (msg: { message: unknown }): void
Parameters
msg: { message: unknown }
Returns void
Returns void
onCouponDistributed: ((cb: ((data: CouponDistributedPayload) => void)) => void)
onCouponStatusChanged: ((cb: ((couponActivity: DurationActivity) => void)) => void)
onHideChattingMessage: ((cb: ((id: string) => void)) => void)
- (cb: ((id: string) => void)): void
Parameters
cb: ((id: string) => void)
Returns void
onLiveStopped: ((cb: (() => void)) => void)
onLuckyDrawDrawing: ((cb: (() => void)) => void)
onLuckyDrawEnded: ((cb: ((drawId: number) => void)) => void)
- (cb: ((drawId: number) => void)): void
Parameters
cb: ((drawId: number) => void)
Returns void
onPinMessageChanged: ((cb: ((msg: { comment_id: string; message: string }) => void)) => void)
- (cb: ((msg: { comment_id: string; message: string }) => void)): void
Parameters
cb: ((msg: { comment_id: string; message: string }) => void)
- (msg: { comment_id: string; message: string }): void
Parameters
msg: { comment_id: string; message: string }
comment_id: string
message: string
Returns void
Returns void
onProductsChanged: ((cb: ((productLikes: productLike[]) => void)) => void)
onPromotingProducts: ((cb: ((productIds: number[]) => void)) => void)
- (cb: ((productIds: number[]) => void)): void
Parameters
cb: ((productIds: number[]) => void)
- (productIds: number[]): void
Returns void
onShowChattingMessage: ((cb: ((id: string) => void)) => void)
- (cb: ((id: string) => void)): void
Parameters
cb: ((id: string) => void)
Returns void
只能放在 setup() 裡面用