@nizza/core 0.6.0-beta.5 → 0.6.0-beta.7

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 (93) hide show
  1. package/dist/index.cjs +69 -21
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +6125 -2688
  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/nizza-store/NizzaStore.d.ts +9 -3
  66. package/dist/lib/nizza-store/NizzaStore.d.ts.map +1 -1
  67. package/dist/lib/runtime/implementations/external-runtime.d.ts +6 -5
  68. package/dist/lib/runtime/implementations/external-runtime.d.ts.map +1 -1
  69. package/dist/lib/runtime/implementations/local-runtime.d.ts +6 -5
  70. package/dist/lib/runtime/implementations/local-runtime.d.ts.map +1 -1
  71. package/dist/lib/runtime/implementations/vtex-io-runtime.d.ts +4 -4
  72. package/dist/lib/runtime/implementations/vtex-io-runtime.d.ts.map +1 -1
  73. package/dist/lib/runtime/implementations/vtex-legacy-runtime.d.ts +4 -4
  74. package/dist/lib/runtime/implementations/vtex-legacy-runtime.d.ts.map +1 -1
  75. package/dist/lib/runtime/runtime.d.ts +5 -6
  76. package/dist/lib/runtime/runtime.d.ts.map +1 -1
  77. package/dist/lib/runtime/types.d.ts +18 -14
  78. package/dist/lib/runtime/types.d.ts.map +1 -1
  79. package/dist/lib/runtime/utils.d.ts +1 -1
  80. package/dist/lib/runtime/utils.d.ts.map +1 -1
  81. package/dist/lib/types/api-graphql-types.d.ts +32 -0
  82. package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
  83. package/dist/lib/types/nizza/globalStore.d.ts +9 -0
  84. package/dist/lib/types/nizza/globalStore.d.ts.map +1 -1
  85. package/dist/lib/types/nizza/highlight-product.entity.d.ts +7 -0
  86. package/dist/lib/types/nizza/highlight-product.entity.d.ts.map +1 -0
  87. package/dist/lib/types/nizza/index.d.ts +1 -0
  88. package/dist/lib/types/nizza/index.d.ts.map +1 -1
  89. package/dist/lib/types/nizza/product.d.ts +1 -0
  90. package/dist/lib/types/nizza/product.d.ts.map +1 -1
  91. package/dist/lib/types/runtime/base.d.ts +12 -11
  92. package/dist/lib/types/runtime/base.d.ts.map +1 -1
  93. 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"}
@@ -1,29 +1,35 @@
1
1
  import { Logger } from '../utils/logger';
2
- import { INizzaStore, NizzaConfig, NizzaProductDataSource } from '../types';
2
+ import { AccountStatus, AddToCartConfig, INizzaStore, NizzaConfig, NizzaProductDataSource } from '../types';
3
3
  import { BroadcastChannelEventBus } from '../event-buses';
4
4
  import { NizzaAccount } from '../accounts';
5
5
 
6
6
  export declare class NizzaStore implements INizzaStore {
7
- static readonly version = "4";
7
+ static readonly version = "5";
8
8
  private static _instance;
9
9
  readonly instanceId: string;
10
10
  readonly log: Logger;
11
11
  readonly coreLogger: import('loglevel').Logger;
12
12
  private _config;
13
13
  private _account?;
14
+ private _accountStatus;
14
15
  private _productDataSource;
15
16
  private _eventBus;
16
17
  private constructor();
17
18
  static instance(): NizzaStore;
18
19
  configure(config: NizzaConfig): Promise<void>;
19
20
  private setAccount;
21
+ private setAccountStatus;
20
22
  setProductDataSource(dataSource: NizzaProductDataSource): void;
23
+ setProductId(id: string): void;
24
+ setOrderFormId(id: string): void;
25
+ setAddToCartConfig(config: AddToCartConfig): void;
21
26
  get version(): string;
22
27
  get config(): NizzaConfig | null;
23
28
  get account(): NizzaAccount | undefined;
29
+ get accountStatus(): AccountStatus;
24
30
  get accountName(): string | undefined;
25
31
  get productDataSource(): NizzaProductDataSource | undefined;
26
32
  get eventBus(): BroadcastChannelEventBus;
27
33
  }
28
- export declare const getNizza: () => NizzaStore;
34
+ export declare const getNizza: (onInit?: (nizza: NizzaStore) => void) => NizzaStore;
29
35
  //# sourceMappingURL=NizzaStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NizzaStore.d.ts","sourceRoot":"","sources":["../../../src/lib/nizza-store/NizzaStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,qBAAa,UAAW,YAAW,WAAW;IAC5C,MAAM,CAAC,QAAQ,CAAC,OAAO,OAAO;IAC9B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IAErC,QAAQ,CAAC,UAAU,SAAa;IAChC,QAAQ,CAAC,GAAG,SAAoB;IAChC,QAAQ,CAAC,UAAU,4BAAiC;IAEpD,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,QAAQ,CAAC,CAAe;IAChC,OAAO,CAAC,kBAAkB,CAAqC;IAC/D,OAAO,CAAC,SAAS,CAA0D;IAE3E,OAAO;IAmB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AE,sBAAsB;IAIvD,YAAY,CAAC,EAAE,EAAE,MAAM;IAKvB,cAAc,CAAC,EAAE,EAAE,MAAM;IAKzB,kBAAkB,CAAC,MAAM,EAAE,eAAe;IAS1C,IAAI,OAAO,WAEV;IAED,IAAI,MAAM,uBAET;IAED,IAAI,OAAO,6BAEV;IAED,IAAI,aAAa,kBAEhB;IAED,IAAI,WAAW,uBAEd;IAED,IAAI,iBAAiB,uCAEpB;IAED,IAAI,QAAQ,6BAEX;CACF;AAED,eAAO,MAAM,QAAQ,YAAa,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,eAS5D,CAAC"}
@@ -1,11 +1,12 @@
1
- import { RuntimeStrategyConfig } from '../types';
2
- import { GlobalStore, RuntimeStrategy, RuntimeType } from '../../types';
1
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
+ import { Runtime } from '../runtime';
3
+ import { GlobalStore, RuntimeType } from '../../types';
3
4
 
4
- export declare class ExternalRuntime<T extends GlobalStore> implements RuntimeStrategy {
5
+ export declare class ExternalRuntime implements RuntimeStrategy {
5
6
  private config;
6
7
  static type: RuntimeType;
7
- constructor(config: RuntimeStrategyConfig<T>);
8
- static isApplicable(): boolean;
8
+ constructor(config: RuntimeStrategyConfig);
9
+ static isApplicable(runtime: Runtime<GlobalStore>): boolean;
9
10
  execute(): Promise<void>;
10
11
  }
11
12
  //# sourceMappingURL=external-runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"external-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/external-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKjD,qBAAa,eAAe,CAAC,CAAC,SAAS,WAAW,CAAE,YAAW,eAAe;IAGhE,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAwB;gBAEf,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEpD,MAAM,CAAC,YAAY,IAAI,OAAO;IAQxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
1
+ {"version":3,"file":"external-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/external-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAKlE,qBAAa,eAAgB,YAAW,eAAe;IAGzC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAwB;gBAEf,MAAM,EAAE,qBAAqB;IAEjD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO;IAQrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}
@@ -1,11 +1,12 @@
1
- import { RuntimeStrategyConfig } from '../types';
2
- import { GlobalStore, RuntimeStrategy, RuntimeType } from '../../types';
1
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
+ import { Runtime } from '../runtime';
3
+ import { GlobalStore, RuntimeType } from '../../types';
3
4
 
4
- export declare class LocalRuntime<T extends GlobalStore> implements RuntimeStrategy {
5
+ export declare class LocalRuntime implements RuntimeStrategy {
5
6
  private config;
6
7
  static type: RuntimeType;
7
- constructor(config: RuntimeStrategyConfig<T>);
8
- static isApplicable(): boolean;
8
+ constructor(config: RuntimeStrategyConfig);
9
+ static isApplicable(runtime: Runtime<GlobalStore>): boolean;
9
10
  execute(): Promise<void>;
10
11
  }
11
12
  //# sourceMappingURL=local-runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"local-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/local-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGX,eAAe,EACf,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEjD,qBAAa,YAAY,CAAC,CAAC,SAAS,WAAW,CAAE,YAAW,eAAe;IAG7D,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAqB;gBAEZ,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAEpD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAS/B"}
1
+ {"version":3,"file":"local-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/local-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGX,WAAW,EACZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAElE,qBAAa,YAAa,YAAW,eAAe;IAGtC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAqB;gBAEZ,MAAM,EAAE,qBAAqB;IAEjD,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO;IAIrD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAS/B"}
@@ -1,10 +1,10 @@
1
- import { RuntimeStrategyConfig } from '../types';
2
- import { GlobalStore, RuntimeStrategy, RuntimeType } from '../../types';
1
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
+ import { RuntimeType } from '../../types';
3
3
 
4
- export declare class VtexIORuntime<T extends GlobalStore> implements RuntimeStrategy {
4
+ export declare class VtexIORuntime implements RuntimeStrategy {
5
5
  private config;
6
6
  static type: RuntimeType;
7
- constructor(config: RuntimeStrategyConfig<T>);
7
+ constructor(config: RuntimeStrategyConfig);
8
8
  static isApplicable(): boolean;
9
9
  execute(): Promise<void>;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vtex-io-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/vtex-io-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,WAAW,EAEZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIjD,qBAAa,aAAa,CAAC,CAAC,SAAS,WAAW,CAAE,YAAW,eAAe;IAG9D,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAsB;gBAEb,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAOpD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAU/B"}
1
+ {"version":3,"file":"vtex-io-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/vtex-io-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIlE,qBAAa,aAAc,YAAW,eAAe;IAGvC,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAAsB;gBAEb,MAAM,EAAE,qBAAqB;IAOjD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAU/B"}
@@ -1,10 +1,10 @@
1
- import { RuntimeStrategyConfig } from '../types';
2
- import { GlobalStore, RuntimeStrategy, RuntimeType } from '../../types';
1
+ import { RuntimeStrategy, RuntimeStrategyConfig } from '../types';
2
+ import { RuntimeType } from '../../types';
3
3
 
4
- export declare class VtexLegacyRuntime<T extends GlobalStore> implements RuntimeStrategy {
4
+ export declare class VtexLegacyRuntime implements RuntimeStrategy {
5
5
  private config;
6
6
  static type: RuntimeType;
7
- constructor(config: RuntimeStrategyConfig<T>);
7
+ constructor(config: RuntimeStrategyConfig);
8
8
  static isApplicable(): boolean;
9
9
  execute(): Promise<void>;
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vtex-legacy-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/vtex-legacy-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,eAAe,EACf,WAAW,EAEZ,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIjD,qBAAa,iBAAiB,CAAC,CAAC,SAAS,WAAW,CAClD,YAAW,eAAe;IAId,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAA0B;gBAEjB,MAAM,EAAE,qBAAqB,CAAC,CAAC,CAAC;IAOpD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB/B"}
1
+ {"version":3,"file":"vtex-legacy-runtime.d.ts","sourceRoot":"","sources":["../../../../src/lib/runtime/implementations/vtex-legacy-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,WAAW,EAAsB,MAAM,aAAa,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAIlE,qBAAa,iBAAkB,YAAW,eAAe;IAG3C,OAAO,CAAC,MAAM;IAF1B,MAAM,CAAC,IAAI,cAA0B;gBAEjB,MAAM,EAAE,qBAAqB;IAOjD,MAAM,CAAC,YAAY,IAAI,OAAO;IAIxB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB/B"}
@@ -1,5 +1,5 @@
1
1
  import { RuntimeConfigCallback, RuntimeConfigOptions } from './types';
2
- import { GlobalStore, GlobalStoreConfig, ModuleId, RenderHandler, RuntimeManagerConfig, RuntimeMetadata, RuntimeType } from '../types';
2
+ import { GlobalStore, GlobalStoreConfig, ModuleId, RenderHandler, RuntimeBundler, RuntimeManagerConfig, RuntimeMetadata, RuntimeType } from '../types';
3
3
  import { Logger as LogLevelLogger } from 'loglevel';
4
4
 
5
5
  export declare class Runtime<T extends GlobalStore> {
@@ -7,18 +7,17 @@ export declare class Runtime<T extends GlobalStore> {
7
7
  private metadata;
8
8
  private customConfigList;
9
9
  env: Record<string, any>;
10
+ bundler: RuntimeBundler;
10
11
  logger: LogLevelLogger;
11
- isProd: boolean;
12
- isLocal: boolean;
13
12
  componentId: ModuleId;
14
13
  renderHandler: RenderHandler;
15
14
  store: T;
16
15
  constructor(config: RuntimeManagerConfig<T>);
17
- config<K extends RuntimeType>(runtimeType: K, options: RuntimeConfigOptions<T>, callback: RuntimeConfigCallback<T>): this;
18
- config<K extends RuntimeType>(runtimeType: K, callback: RuntimeConfigCallback<T>): this;
16
+ config<K extends RuntimeType>(runtimeType: K, options: RuntimeConfigOptions, callback: RuntimeConfigCallback): this;
17
+ config<K extends RuntimeType>(runtimeType: K, callback: RuntimeConfigCallback): this;
19
18
  registerComponent(componentId: string, render: RenderHandler): this;
20
19
  execute(callback?: () => Promise<void> | void): Promise<void>;
21
- updateMetadata(data: Partial<RuntimeMetadata>): void;
20
+ updateMeta(data: Partial<RuntimeMetadata>): void;
22
21
  configureStore(config: GlobalStoreConfig): Promise<void>;
23
22
  get meta(): RuntimeMetadata;
24
23
  private initializeGlobals;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../src/lib/runtime/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,eAAe,EAEf,WAAW,EACZ,MAAM,UAAU,CAAC;AAIlB,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EAErB,MAAM,SAAS,CAAC;AAEjB,qBAAa,OAAO,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