@nizza/core 0.6.0-beta.6 → 0.6.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/index.cjs +69 -21
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +6104 -2748
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/lib/index.d.ts +1 -0
  6. package/dist/lib/index.d.ts.map +1 -1
  7. package/dist/lib/ivs-socket/core/domain/entities/event-chat-room.entity.d.ts +11 -0
  8. package/dist/lib/ivs-socket/core/domain/entities/event-chat-room.entity.d.ts.map +1 -0
  9. package/dist/lib/ivs-socket/core/domain/entities/index.d.ts +3 -0
  10. package/dist/lib/ivs-socket/core/domain/entities/index.d.ts.map +1 -0
  11. package/dist/lib/ivs-socket/core/domain/entities/ivs-chat-client-socket.entity.d.ts +14 -0
  12. package/dist/lib/ivs-socket/core/domain/entities/ivs-chat-client-socket.entity.d.ts.map +1 -0
  13. package/dist/lib/ivs-socket/core/domain/index.d.ts +4 -0
  14. package/dist/lib/ivs-socket/core/domain/index.d.ts.map +1 -0
  15. package/dist/lib/ivs-socket/core/domain/repositories/event-chat-room.repository.d.ts +7 -0
  16. package/dist/lib/ivs-socket/core/domain/repositories/event-chat-room.repository.d.ts.map +1 -0
  17. package/dist/lib/ivs-socket/core/domain/repositories/index.d.ts +2 -0
  18. package/dist/lib/ivs-socket/core/domain/repositories/index.d.ts.map +1 -0
  19. package/dist/lib/ivs-socket/core/domain/shared/constants.d.ts +2 -0
  20. package/dist/lib/ivs-socket/core/domain/shared/constants.d.ts.map +1 -0
  21. package/dist/lib/ivs-socket/core/domain/shared/errors.d.ts +6 -0
  22. package/dist/lib/ivs-socket/core/domain/shared/errors.d.ts.map +1 -0
  23. package/dist/lib/ivs-socket/core/domain/shared/index.d.ts +4 -0
  24. package/dist/lib/ivs-socket/core/domain/shared/index.d.ts.map +1 -0
  25. package/dist/lib/ivs-socket/core/domain/shared/types.d.ts +12 -0
  26. package/dist/lib/ivs-socket/core/domain/shared/types.d.ts.map +1 -0
  27. package/dist/lib/ivs-socket/core/index.d.ts +8 -0
  28. package/dist/lib/ivs-socket/core/index.d.ts.map +1 -0
  29. package/dist/lib/ivs-socket/core/infrastructure/graphql-event-chat-room.repository.d.ts +10 -0
  30. package/dist/lib/ivs-socket/core/infrastructure/graphql-event-chat-room.repository.d.ts.map +1 -0
  31. package/dist/lib/ivs-socket/core/infrastructure/index.d.ts +2 -0
  32. package/dist/lib/ivs-socket/core/infrastructure/index.d.ts.map +1 -0
  33. package/dist/lib/ivs-socket/core/services/event-chat-room.service.d.ts +11 -0
  34. package/dist/lib/ivs-socket/core/services/event-chat-room.service.d.ts.map +1 -0
  35. package/dist/lib/ivs-socket/core/services/index.d.ts +2 -0
  36. package/dist/lib/ivs-socket/core/services/index.d.ts.map +1 -0
  37. package/dist/lib/ivs-socket/hooks/index.d.ts +6 -0
  38. package/dist/lib/ivs-socket/hooks/index.d.ts.map +1 -0
  39. package/dist/lib/ivs-socket/hooks/use-connect-ivs-chat.hook.d.ts +29 -0
  40. package/dist/lib/ivs-socket/hooks/use-connect-ivs-chat.hook.d.ts.map +1 -0
  41. package/dist/lib/ivs-socket/hooks/use-event-chat-room.hook.d.ts +11 -0
  42. package/dist/lib/ivs-socket/hooks/use-event-chat-room.hook.d.ts.map +1 -0
  43. package/dist/lib/ivs-socket/hooks/use-ivs-chat-actions.hook.d.ts +10 -0
  44. package/dist/lib/ivs-socket/hooks/use-ivs-chat-actions.hook.d.ts.map +1 -0
  45. package/dist/lib/ivs-socket/hooks/use-ivs-chat-client.hook.d.ts +9 -0
  46. package/dist/lib/ivs-socket/hooks/use-ivs-chat-client.hook.d.ts.map +1 -0
  47. package/dist/lib/ivs-socket/hooks/use-ivs-chat-handlers.hook.d.ts +9 -0
  48. package/dist/lib/ivs-socket/hooks/use-ivs-chat-handlers.hook.d.ts.map +1 -0
  49. package/dist/lib/ivs-socket/index.d.ts +5 -0
  50. package/dist/lib/ivs-socket/index.d.ts.map +1 -0
  51. package/dist/lib/ivs-socket/logger.d.ts +3 -0
  52. package/dist/lib/ivs-socket/logger.d.ts.map +1 -0
  53. package/dist/lib/ivs-socket/state.d.ts +12 -0
  54. package/dist/lib/ivs-socket/state.d.ts.map +1 -0
  55. package/dist/lib/ivs-socket/utils/add-question-data.util.d.ts +4 -0
  56. package/dist/lib/ivs-socket/utils/add-question-data.util.d.ts.map +1 -0
  57. package/dist/lib/ivs-socket/utils/connect-to-socket.util.d.ts +11 -0
  58. package/dist/lib/ivs-socket/utils/connect-to-socket.util.d.ts.map +1 -0
  59. package/dist/lib/ivs-socket/utils/get-random-color.util.d.ts +2 -0
  60. package/dist/lib/ivs-socket/utils/get-random-color.util.d.ts.map +1 -0
  61. package/dist/lib/ivs-socket/utils/index.d.ts +5 -0
  62. package/dist/lib/ivs-socket/utils/index.d.ts.map +1 -0
  63. package/dist/lib/ivs-socket/utils/normalize-chat-message.util.d.ts +4 -0
  64. package/dist/lib/ivs-socket/utils/normalize-chat-message.util.d.ts.map +1 -0
  65. package/dist/lib/types/api-graphql-types.d.ts +32 -0
  66. package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
  67. package/dist/lib/types/nizza/highlight-product.entity.d.ts +7 -0
  68. package/dist/lib/types/nizza/highlight-product.entity.d.ts.map +1 -0
  69. package/dist/lib/types/nizza/index.d.ts +1 -0
  70. package/dist/lib/types/nizza/index.d.ts.map +1 -1
  71. package/dist/lib/types/nizza/product.d.ts +1 -0
  72. package/dist/lib/types/nizza/product.d.ts.map +1 -1
  73. package/dist/lib/types/runtime/base.d.ts +1 -1
  74. package/dist/lib/types/runtime/base.d.ts.map +1 -1
  75. package/package.json +1 -1
@@ -12,4 +12,5 @@ export * from './nizza-store';
12
12
  export * from './runtime';
13
13
  export * from './types';
14
14
  export * from './utils';
15
+ export * from './ivs-socket';
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAA"}
@@ -0,0 +1,11 @@
1
+ import { EventChatRoomProps, RawEventChatRoom } from '../shared';
2
+ import { IAggregateRoot } from '../../../../clean-architecture';
3
+
4
+ export declare class EventChatRoom implements IAggregateRoot, EventChatRoomProps {
5
+ readonly root: import('../../../../clean-architecture').AggregateRoot<EventChatRoom, EventChatRoomProps>;
6
+ token: string;
7
+ private constructor();
8
+ static toDomain(raw: RawEventChatRoom): EventChatRoom;
9
+ toPrimitives(): Omit<this, "root" | "toPrimitives">;
10
+ }
11
+ //# sourceMappingURL=event-chat-room.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-chat-room.entity.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/entities/event-chat-room.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACf,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEjE,qBAAa,aAAc,YAAW,cAAc,EAAE,kBAAkB;IACtE,QAAQ,CAAC,IAAI,4FAAgE;IAE7E,KAAK,EAAG,MAAM,CAAC;IAEf,OAAO;IAIP,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,gBAAgB,GAAG,aAAa;IAQrD,YAAY;CAOb"}
@@ -0,0 +1,3 @@
1
+ export * from './event-chat-room.entity';
2
+ export * from './ivs-chat-client-socket.entity';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,14 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { ChatMessage, HighlightProduct } from '../../../../types';
3
+
4
+ export interface IvsChatClientSocket {
5
+ socket: WebSocket | undefined;
6
+ chat: ChatMessage[];
7
+ showLoader: boolean | undefined;
8
+ pinnedMessage: ChatMessage | undefined;
9
+ highlightProduct: HighlightProduct | undefined;
10
+ setChat: Dispatch<SetStateAction<ChatMessage[]>>;
11
+ setShowLoader: Dispatch<SetStateAction<boolean>>;
12
+ setPinnedMessage: Dispatch<SetStateAction<ChatMessage | undefined>>;
13
+ }
14
+ //# sourceMappingURL=ivs-chat-client-socket.entity.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ivs-chat-client-socket.entity.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/entities/ivs-chat-client-socket.entity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,SAAS,GAAG,SAAS,CAAC;IAC9B,IAAI,EAAE,WAAW,EAAE,CAAC;IACpB,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,aAAa,EAAE,WAAW,GAAG,SAAS,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC/C,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IACjD,aAAa,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACjD,gBAAgB,EAAE,QAAQ,CAAC,cAAc,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC;CACrE"}
@@ -0,0 +1,4 @@
1
+ export * from './repositories';
2
+ export * from './shared';
3
+ export * from './entities';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ivs-socket/core/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { GetChatRoomInput } from '../shared';
2
+ import { EventChatRoom } from '../entities';
3
+
4
+ export interface EventChatRoomRepository {
5
+ getChatRoom(input: GetChatRoomInput): Promise<EventChatRoom>;
6
+ }
7
+ //# sourceMappingURL=event-chat-room.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-chat-room.repository.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/repositories/event-chat-room.repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CAC9D"}
@@ -0,0 +1,2 @@
1
+ export * from './event-chat-room.repository';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/repositories/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/shared/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { DomainError } from '../../../../errors';
2
+
3
+ export declare class EventChatRoomTokenError extends DomainError {
4
+ constructor();
5
+ }
6
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/shared/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD,qBAAa,uBAAwB,SAAQ,WAAW;;CAOvD"}
@@ -0,0 +1,4 @@
1
+ export * from './constants';
2
+ export * from './errors';
3
+ export * from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface EventChatRoomProps {
2
+ token: string;
3
+ }
4
+ export type RawEventChatRoom = {
5
+ token: string;
6
+ };
7
+ export type GetChatRoomInput = {
8
+ account: string;
9
+ eventId: string;
10
+ userName: string;
11
+ };
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/ivs-socket/core/domain/shared/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { EventChatRoomService } from './services';
2
+
3
+ export * from './domain';
4
+ export * from './infrastructure';
5
+ export * from './services';
6
+ declare const eventChatRoomService: EventChatRoomService;
7
+ export { eventChatRoomService };
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAG3B,QAAA,MAAM,oBAAoB,sBAEzB,CAAC;AAEF,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { EventChatRoom } from '../domain/entities';
2
+ import { EventChatRoomRepository, GetChatRoomInput } from '../domain';
3
+
4
+ export declare class GraphqlEventChatRoomRepository implements EventChatRoomRepository {
5
+ private client;
6
+ constructor();
7
+ getChatRoom(input: GetChatRoomInput): Promise<EventChatRoom>;
8
+ private propagateGraphqlErrorIfExists;
9
+ }
10
+ //# sourceMappingURL=graphql-event-chat-room.repository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-event-chat-room.repository.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ivs-socket/core/infrastructure/graphql-event-chat-room.repository.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,uBAAuB,EAEvB,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,qBAAa,8BAA+B,YAAW,uBAAuB;IAC5E,OAAO,CAAC,MAAM,CAAgB;;IAMxB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC;IAwBlE,OAAO,CAAC,6BAA6B;CAGtC"}
@@ -0,0 +1,2 @@
1
+ export * from './graphql-event-chat-room.repository';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ivs-socket/core/infrastructure/index.ts"],"names":[],"mappings":"AAAA,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { EventChatRoomRepository, GetChatRoomInput } from '../domain';
2
+
3
+ export declare class EventChatRoomService {
4
+ private eventChatRoomRepository;
5
+ private account;
6
+ constructor(eventChatRoomRepository: EventChatRoomRepository);
7
+ get(input: Omit<GetChatRoomInput, 'account'>): Promise<import('../domain').EventChatRoom>;
8
+ setAccount(value: string): void;
9
+ private validateAccount;
10
+ }
11
+ //# sourceMappingURL=event-chat-room.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-chat-room.service.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ivs-socket/core/services/event-chat-room.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAEtE,qBAAa,oBAAoB;IAGnB,OAAO,CAAC,uBAAuB;IAF3C,OAAO,CAAC,OAAO,CAAU;gBAEL,uBAAuB,EAAE,uBAAuB;IAE9D,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC;IAalD,UAAU,CAAC,KAAK,EAAE,MAAM;IAIxB,OAAO,CAAC,eAAe;CAGxB"}
@@ -0,0 +1,2 @@
1
+ export * from './event-chat-room.service';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/ivs-socket/core/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './use-connect-ivs-chat.hook';
2
+ export * from './use-event-chat-room.hook';
3
+ export * from './use-ivs-chat-actions.hook';
4
+ export * from './use-ivs-chat-handlers.hook';
5
+ export * from './use-ivs-chat-client.hook';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAA"}
@@ -0,0 +1,29 @@
1
+ import { ChatMessage } from '../../types';
2
+
3
+ interface Props {
4
+ eventId: string;
5
+ userName: string;
6
+ enabled?: boolean;
7
+ onMessage?: (message: ChatMessage) => void;
8
+ onEvent?: (event: any) => void;
9
+ }
10
+ /**
11
+ * Create a connection to the IVS chat room of the event.
12
+ *
13
+ * This hook is only intended for read operations, it receives
14
+ * messages and events from the room and exposes them in Jotai atoms.
15
+ *
16
+ * For best performance it should be started once in a parent component.
17
+ * To obtain the list of messages and the list of events use the Jotai atoms.
18
+ *
19
+ * NOTE: There is another hook called useIVSChatActions that contains reusable
20
+ * write operations to avoid polluting the current *READ ONLY* hook!
21
+ */
22
+ export declare const useConnectIVSChat: (props: Props) => {
23
+ ivsChatSocket: WebSocket | undefined;
24
+ ivsChatIsConnected: boolean;
25
+ ivsChatMessageList: ChatMessage[];
26
+ setIvsChatMessageList: (args_0: ChatMessage[] | ((prev: ChatMessage[]) => ChatMessage[])) => void;
27
+ };
28
+ export default useConnectIVSChat;
29
+ //# sourceMappingURL=use-connect-ivs-chat.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-connect-ivs-chat.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/use-connect-ivs-chat.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAe1C,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,UAAW,KAAK;;;;;CAoG7C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ type Props = {
2
+ eventId: string;
3
+ userName: string;
4
+ enabled?: boolean;
5
+ };
6
+ export declare const useEventChatRoom: (props: Props) => {
7
+ getQuery: import('@tanstack/react-query').UseQueryResult<import('../core').EventChatRoom, unknown>;
8
+ token: string;
9
+ };
10
+ export default useEventChatRoom;
11
+ //# sourceMappingURL=use-event-chat-room.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-event-chat-room.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/use-event-chat-room.hook.ts"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAIF,eAAO,MAAM,gBAAgB,UAAW,KAAK;;;CA4B5C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { ChatMessageBase } from '../../types';
2
+
3
+ /**
4
+ * Write operations that can be performed with the event IVS chat room.
5
+ */
6
+ export declare const useIVSChatActions: () => {
7
+ sendIvsMessage: (message: string, attributes: ChatMessageBase) => void;
8
+ };
9
+ export default useIVSChatActions;
10
+ //# sourceMappingURL=use-ivs-chat-actions.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-ivs-chat-actions.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/use-ivs-chat-actions.hook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAK9C;;GAEG;AACH,eAAO,MAAM,iBAAiB;8BAKhB,MAAM,cAAc,eAAe;CAkBhD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { IvsChatClientSocket } from '../core';
2
+
3
+ declare interface Props {
4
+ eventId: string;
5
+ userName: string;
6
+ }
7
+ export declare const useIVSChatClient: (props: Props) => IvsChatClientSocket;
8
+ export default useIVSChatClient;
9
+ //# sourceMappingURL=use-ivs-chat-client.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-ivs-chat-client.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/use-ivs-chat-client.hook.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAK9C,OAAO,WAAW,KAAK;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,gBAAgB,UAAW,KAAK,KAAG,mBA+D/C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Handle event that can be performed with the event IVS chat room.
3
+ */
4
+ export declare const useIVSChatHandlers: () => {
5
+ handleEvent: (event: any) => void;
6
+ handleMessage: (data: any) => void;
7
+ };
8
+ export default useIVSChatHandlers;
9
+ //# sourceMappingURL=use-ivs-chat-handlers.hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-ivs-chat-handlers.hook.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/hooks/use-ivs-chat-handlers.hook.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,kBAAkB;yBAGD,GAAG;0BASF,GAAG;CAQjC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './core';
2
+ export * from './hooks';
3
+ export * from './state';
4
+ export * from './utils';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/ivs-socket/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const logger: import('loglevel').Logger;
2
+ export default logger;
3
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/lib/ivs-socket/logger.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,MAAM,2BAA2C,CAAC;AAExD,eAAe,MAAM,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ChatMessage } from '../types/nizza/chat';
2
+
3
+ export declare const ivsChatSocketAtom: import('jotai').PrimitiveAtom<WebSocket | undefined> & {
4
+ init: WebSocket | undefined;
5
+ };
6
+ export declare const ivsChatIsConnectedAtom: import('jotai').PrimitiveAtom<boolean> & {
7
+ init: boolean;
8
+ };
9
+ export declare const ivsChatMessageListAtom: import('jotai').PrimitiveAtom<ChatMessage[]> & {
10
+ init: ChatMessage[];
11
+ };
12
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/lib/ivs-socket/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIlD,eAAO,MAAM,iBAAiB;;CAAyC,CAAC;AAIxE,eAAO,MAAM,sBAAsB;;CAAc,CAAC;AAIlD,eAAO,MAAM,sBAAsB;;CAA0B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ChatMessage } from 'lib/types';
2
+
3
+ export declare const addQuestionData: (msg: ChatMessage) => ChatMessage;
4
+ //# sourceMappingURL=add-question-data.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-question-data.util.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/utils/add-question-data.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,eAAO,MAAM,eAAe,QAAS,WAAW,KAAG,WAsBlD,CAAC"}
@@ -0,0 +1,11 @@
1
+ type Config = {
2
+ url: string;
3
+ token: string;
4
+ onOpen: (event: Event) => void;
5
+ onClose: (event: CloseEvent) => void;
6
+ onMessage: (event: MessageEvent<any>) => void;
7
+ onError: (event: Event) => void;
8
+ };
9
+ export declare const connectToSocket: (config: Config) => WebSocket;
10
+ export {};
11
+ //# sourceMappingURL=connect-to-socket.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect-to-socket.util.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/utils/connect-to-socket.util.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC/B,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACrC,SAAS,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IAC9C,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,eAAe,WAAY,MAAM,cAW7C,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const getRandomColor: () => string;
2
+ //# sourceMappingURL=get-random-color.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-random-color.util.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/utils/get-random-color.util.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,cAS1B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './connect-to-socket.util';
2
+ export * from './get-random-color.util';
3
+ export * from './normalize-chat-message.util';
4
+ export * from './add-question-data.util';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { ChatMessage } from '../../types';
2
+
3
+ export declare const normalizeChatMessage: (chat: ChatMessage[], data: any) => ChatMessage;
4
+ //# sourceMappingURL=normalize-chat-message.util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize-chat-message.util.d.ts","sourceRoot":"","sources":["../../../../src/lib/ivs-socket/utils/normalize-chat-message.util.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAK/C,eAAO,MAAM,oBAAoB,SACzB,WAAW,EAAE,QACb,GAAG,KACR,WA8BF,CAAC"}
@@ -292,6 +292,18 @@ export type GetTimeLineInput = {
292
292
  idEvent: Scalars['String'];
293
293
  };
294
294
  export type GetTimeLineResult = ErrorGeneral | TimeLineArray;
295
+ export type HighlightProductInput = {
296
+ account: Scalars['String'];
297
+ collection: Scalars['String'];
298
+ idEvent: Scalars['String'];
299
+ productIds?: Array<Scalars['String']>;
300
+ showProduct: Scalars['Boolean'];
301
+ };
302
+ export type HighlightProductResult = ErrorGeneral | HighlightProductSuccess;
303
+ export type HighlightProductSuccess = {
304
+ __typename?: 'HighlightProductSuccess';
305
+ message: Scalars['String'];
306
+ };
295
307
  export type LiveStreamingEvent = {
296
308
  __typename?: 'LiveStreamingEvent';
297
309
  account: Scalars['String'];
@@ -329,6 +341,7 @@ export type Mutation = {
329
341
  deleteCollection: CollectionResult;
330
342
  deleteRelationshipSnackVideo: RelateEntitySnackVideo;
331
343
  deleteSnackVideo: RelateEntitySnackVideo;
344
+ highlightProduct: HighlightProductResult;
332
345
  manageCollectionProduct: CollectionResult;
333
346
  pinChatMessage: PinChatMessageResult;
334
347
  runQuestionProcessor: RunQuestionProcessorResult;
@@ -379,6 +392,9 @@ export type MutationDeleteRelationshipSnackVideoArgs = {
379
392
  export type MutationDeleteSnackVideoArgs = {
380
393
  data: DeleteSnackVideoInput;
381
394
  };
395
+ export type MutationHighlightProductArgs = {
396
+ data: HighlightProductInput;
397
+ };
382
398
  export type MutationManageCollectionProductArgs = {
383
399
  data: ManageCollectionProductInInput;
384
400
  };
@@ -1078,6 +1094,19 @@ export type PinChatMessageMutation = {
1078
1094
  message: string;
1079
1095
  };
1080
1096
  };
1097
+ export type HighlightProductMutationVariables = Exact<{
1098
+ data: HighlightProductInput;
1099
+ }>;
1100
+ export type HighlightProductMutation = {
1101
+ __typename?: 'Mutation';
1102
+ highlightProduct: {
1103
+ __typename: 'ErrorGeneral';
1104
+ message: string;
1105
+ } | {
1106
+ __typename: 'HighlightProductSuccess';
1107
+ message: string;
1108
+ };
1109
+ };
1081
1110
  export type DeleteAllCustomizationMutationVariables = Exact<{
1082
1111
  data: CustomPlayerInputAccount;
1083
1112
  }>;
@@ -1473,6 +1502,9 @@ export declare const GetChatRoomTokenDocument: DocumentNode<GetChatRoomTokenQuer
1473
1502
  export declare const PinChatMessageDocument: DocumentNode<PinChatMessageMutation, Exact<{
1474
1503
  data: PinChatInput;
1475
1504
  }>>;
1505
+ export declare const HighlightProductDocument: DocumentNode<HighlightProductMutation, Exact<{
1506
+ data: HighlightProductInput;
1507
+ }>>;
1476
1508
  export declare const DeleteAllCustomizationDocument: DocumentNode<DeleteAllCustomizationMutation, Exact<{
1477
1509
  data: CustomPlayerInputAccount;
1478
1510
  }>>;