@nizza/core 0.3.2-beta.0 → 0.4.0-alpha.1

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 (33) hide show
  1. package/dist/environments/environment.d.ts +1 -0
  2. package/dist/index.cjs +18 -11
  3. package/dist/index.mjs +5213 -2273
  4. package/dist/lib/accounts/core/services/AccountService.d.ts +1 -1
  5. package/dist/lib/accounts/hooks/useAccount.d.ts +2 -2
  6. package/dist/lib/constants/eventBusWildcards.d.ts +16 -0
  7. package/dist/lib/constants/i18n.d.ts +5 -0
  8. package/dist/lib/constants/index.d.ts +2 -0
  9. package/dist/lib/i18n/buildTranslations.d.ts +2 -0
  10. package/dist/lib/i18n/index.d.ts +2 -0
  11. package/dist/lib/i18n/init.d.ts +1 -0
  12. package/dist/lib/index.d.ts +2 -0
  13. package/dist/lib/mobx/index.d.ts +0 -1
  14. package/dist/lib/nizza-store/ConfigManager.d.ts +13 -0
  15. package/dist/lib/nizza-store/DefaultEventBus.d.ts +7 -0
  16. package/dist/lib/{mobx → nizza-store}/NizzaStore.d.ts +6 -6
  17. package/dist/lib/nizza-store/helpers.d.ts +1 -0
  18. package/dist/lib/nizza-store/index.d.ts +1 -0
  19. package/dist/lib/types/api-graphql-types.d.ts +265 -0
  20. package/dist/lib/types/api.d.ts +1 -0
  21. package/dist/lib/types/i18n.d.ts +3 -0
  22. package/dist/lib/types/index.d.ts +1 -0
  23. package/dist/lib/types/nizza/chat.d.ts +28 -0
  24. package/dist/lib/types/nizza/eventBus.d.ts +15 -0
  25. package/dist/lib/types/nizza/index.d.ts +2 -0
  26. package/dist/lib/types/utils.d.ts +1 -1
  27. package/dist/lib/utils/customFetch.d.ts +6 -1
  28. package/dist/lib/utils/downloadFile.d.ts +6 -0
  29. package/dist/lib/utils/helpers.d.ts +19 -2
  30. package/dist/lib/utils/index.d.ts +2 -0
  31. package/dist/lib/utils/logger.d.ts +28 -0
  32. package/dist/package.json +1 -1
  33. package/package.json +1 -1
@@ -2,5 +2,5 @@ import { AccountRepository } from '../domain';
2
2
  export declare class AccountService {
3
3
  private accountRepository;
4
4
  constructor(accountRepository: AccountRepository);
5
- get(name: string): Promise<import("@nizza/core").NizzaAccount>;
5
+ get(name: string): Promise<import("../domain").NizzaAccount>;
6
6
  }
@@ -1,4 +1,4 @@
1
1
  export declare const useAccount: () => {
2
- findQuery: import("@tanstack/react-query").UseQueryResult<import("@nizza/core").NizzaAccount, unknown>;
3
- account: import("@nizza/core").NizzaAccount | null;
2
+ findQuery: import("@tanstack/react-query").UseQueryResult<import("../core").NizzaAccount, unknown>;
3
+ account: import("../core").NizzaAccount | null;
4
4
  };
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Enumeration of common shortcuts for event wildcards.
3
+ */
4
+ export declare const EventBusWildcards: {
5
+ ALL: string;
6
+ CORE: string;
7
+ CUSTOMIZE_LIVE: string;
8
+ EVENT_CHAT: string;
9
+ EVENT_PRODUCTS: string;
10
+ LIVE_STREAMING_EVENT: string;
11
+ PLAYER: string;
12
+ SNACK_SIZE_VIDEO: string;
13
+ SNACK_SIZE_VIDEO_ADMIN: string;
14
+ UI: string;
15
+ UTILS: string;
16
+ };
@@ -0,0 +1,5 @@
1
+ export declare enum LanguageTypes {
2
+ English = "en",
3
+ Spanish = "es",
4
+ Portuguese = "pt"
5
+ }
@@ -1 +1,3 @@
1
+ export * from './eventBusWildcards';
2
+ export * from './i18n';
1
3
  export * from './products';
@@ -0,0 +1,2 @@
1
+ import { TranslationFiles } from '../types';
2
+ export declare function registerTranslations(translationFiles: TranslationFiles): void;
@@ -0,0 +1,2 @@
1
+ export * from './buildTranslations';
2
+ export * from './init';
@@ -0,0 +1 @@
1
+ export declare const i18n: Promise<import("i18next").TFunction>;
@@ -2,7 +2,9 @@ export * from './accounts';
2
2
  export * from './constants';
3
3
  export * from './domain';
4
4
  export * from './errors';
5
+ export * from './i18n';
5
6
  export * from './jotai';
6
7
  export * from './mobx';
8
+ export * from './nizza-store';
7
9
  export * from './types';
8
10
  export * from './utils';
@@ -1,3 +1,2 @@
1
- export * from './NizzaStore';
2
1
  export * from './StoreProvider';
3
2
  export * from './hooks';
@@ -0,0 +1,13 @@
1
+ import { NizzaAccount } from '../accounts';
2
+ import { NizzaConfiguration } from '../types';
3
+ export declare class ConfigManager {
4
+ private _config;
5
+ private _account;
6
+ constructor();
7
+ configure(config: NizzaConfiguration): Promise<void>;
8
+ get config(): NizzaConfiguration | null;
9
+ get account(): NizzaAccount;
10
+ get ok(): boolean;
11
+ get accountName(): string;
12
+ setAccount(account: NizzaAccount): void;
13
+ }
@@ -0,0 +1,7 @@
1
+ import { EventBus, EBListener, EBSubscription } from '../types';
2
+ export declare class DefaultEventBus implements EventBus {
3
+ private emitter;
4
+ constructor();
5
+ on(event: string, listener: EBListener): EBSubscription;
6
+ emit(event: string, data: any): void;
7
+ }
@@ -1,20 +1,20 @@
1
- import { NizzaAccount } from '../accounts';
2
1
  import { NizzaConfiguration, NizzaProductDataSource } from '../types';
2
+ import { DefaultEventBus } from './DefaultEventBus';
3
3
  export declare class NizzaStore {
4
4
  private static _instance;
5
- private _config;
6
- private _account;
7
5
  private _productDataSource;
6
+ private _configManager;
7
+ private _eventBus;
8
8
  readonly instanceId: string;
9
9
  private constructor();
10
10
  static instance(): NizzaStore;
11
11
  configure(config: NizzaConfiguration): Promise<this>;
12
- get account(): NizzaAccount;
12
+ get config(): NizzaConfiguration | null;
13
+ get account(): import("..").NizzaAccount;
13
14
  get ok(): boolean;
14
15
  get accountName(): string;
15
16
  get productDataSource(): NizzaProductDataSource | null;
16
- get config(): NizzaConfiguration | null;
17
+ get eventBus(): DefaultEventBus;
17
18
  setProductDataSource(dataSource: NizzaProductDataSource): void;
18
- private validateRequiredProps;
19
19
  }
20
20
  export declare const nizza: NizzaStore;
@@ -0,0 +1 @@
1
+ export declare function validateRequiredProps(): void;
@@ -0,0 +1 @@
1
+ export * from './NizzaStore';
@@ -26,6 +26,54 @@ export type ActionSnackVideoSuccess = {
26
26
  __typename?: 'ActionSnackVideoSuccess';
27
27
  message: Scalars['String'];
28
28
  };
29
+ export type ChatMessage = {
30
+ __typename?: 'ChatMessage';
31
+ account: Scalars['String'];
32
+ connectionId?: Maybe<Scalars['String']>;
33
+ data: Scalars['String'];
34
+ email?: Maybe<Scalars['String']>;
35
+ id: Scalars['String'];
36
+ idEvent: Scalars['String'];
37
+ isAdmin?: Maybe<Scalars['Boolean']>;
38
+ sendDate?: Maybe<Scalars['String']>;
39
+ sessionId?: Maybe<Scalars['String']>;
40
+ type?: Maybe<Scalars['String']>;
41
+ username?: Maybe<Scalars['String']>;
42
+ };
43
+ export type ChatMessageArray = {
44
+ __typename?: 'ChatMessageArray';
45
+ data?: Maybe<Array<ChatMessage>>;
46
+ duration?: Maybe<Scalars['String']>;
47
+ isArray?: Maybe<Scalars['Boolean']>;
48
+ method?: Maybe<Scalars['String']>;
49
+ path?: Maybe<Scalars['String']>;
50
+ };
51
+ export type ChatRoom = {
52
+ __typename?: 'ChatRoom';
53
+ id: Scalars['String'];
54
+ };
55
+ export type ChatRoomData = {
56
+ __typename?: 'ChatRoomData';
57
+ data?: Maybe<ChatRoom>;
58
+ duration?: Maybe<Scalars['String']>;
59
+ isArray?: Maybe<Scalars['Boolean']>;
60
+ method?: Maybe<Scalars['String']>;
61
+ path?: Maybe<Scalars['String']>;
62
+ };
63
+ export type ChatRoomToken = {
64
+ __typename?: 'ChatRoomToken';
65
+ sessionExpirationTime: Scalars['String'];
66
+ token: Scalars['String'];
67
+ tokenExpirationTime: Scalars['String'];
68
+ };
69
+ export type ChatRoomTokenData = {
70
+ __typename?: 'ChatRoomTokenData';
71
+ data?: Maybe<ChatRoomToken>;
72
+ duration?: Maybe<Scalars['String']>;
73
+ isArray?: Maybe<Scalars['Boolean']>;
74
+ method?: Maybe<Scalars['String']>;
75
+ path?: Maybe<Scalars['String']>;
76
+ };
29
77
  export type Clip = {
30
78
  endTime: Scalars['String'];
31
79
  name: Scalars['String'];
@@ -63,6 +111,11 @@ export type CollectionSuccessArray = {
63
111
  method?: Maybe<Scalars['String']>;
64
112
  path?: Maybe<Scalars['String']>;
65
113
  };
114
+ export type CreateChatRoomInput = {
115
+ account: Scalars['String'];
116
+ idEvent: Scalars['String'];
117
+ };
118
+ export type CreateChatRoomResult = ChatRoomData | ErrorGeneral;
66
119
  export type CreateCollectionInput = {
67
120
  account: Scalars['String'];
68
121
  description?: InputMaybe<Scalars['String']>;
@@ -114,6 +167,22 @@ export type CustomPlayerSuccessArray = {
114
167
  method?: Maybe<Scalars['String']>;
115
168
  path?: Maybe<Scalars['String']>;
116
169
  };
170
+ export type DeleteChatInput = {
171
+ account: Scalars['String'];
172
+ id: Scalars['String'];
173
+ idEvent: Scalars['String'];
174
+ sendDate: Scalars['String'];
175
+ username: Scalars['String'];
176
+ };
177
+ export type DeleteChatMessageResult = DeleteChatMessageSuccess | ErrorGeneral;
178
+ export type DeleteChatMessageSuccess = {
179
+ __typename?: 'DeleteChatMessageSuccess';
180
+ message: Scalars['String'];
181
+ };
182
+ export type DeleteSnackVideoInput = {
183
+ account: Scalars['String'];
184
+ id: Scalars['String'];
185
+ };
117
186
  export type Error = {
118
187
  message: Scalars['String'];
119
188
  statusCode: Scalars['String'];
@@ -162,6 +231,17 @@ export type FindManySnackVideoInput = {
162
231
  ids: Array<Scalars['String']>;
163
232
  };
164
233
  export type FindManySnackVideoResult = ErrorGeneral | SnackVideoArray;
234
+ export type GetAllChatMessageInput = {
235
+ account: Scalars['String'];
236
+ idEvent: Scalars['String'];
237
+ };
238
+ export type GetAllChatMessageResult = ChatMessageArray | ErrorGeneral;
239
+ export type GetChatRoomInput = {
240
+ account: Scalars['String'];
241
+ idEvent: Scalars['String'];
242
+ userName: Scalars['String'];
243
+ };
244
+ export type GetChatRoomTokenResult = ChatRoomTokenData | ErrorGeneral;
165
245
  export type LiveStreamingEvent = {
166
246
  __typename?: 'LiveStreamingEvent';
167
247
  account: Scalars['String'];
@@ -169,7 +249,9 @@ export type LiveStreamingEvent = {
169
249
  eventName: Scalars['String'];
170
250
  id: Scalars['String'];
171
251
  recordVideoPath?: Maybe<Scalars['String']>;
252
+ recordVideoPathMp4?: Maybe<Scalars['String']>;
172
253
  status: EventStatus;
254
+ thumbnails?: Maybe<Array<Scalars['String']>>;
173
255
  thumbnailsPath?: Maybe<Scalars['String']>;
174
256
  };
175
257
  export type ManageCollectionProductInInput = {
@@ -185,12 +267,19 @@ export declare enum Methods {
185
267
  export type Mutation = {
186
268
  __typename?: 'Mutation';
187
269
  appendProductsSnackVideo: RelateEntitySnackVideo;
270
+ createChatRoom: CreateChatRoomResult;
188
271
  createCollection: CollectionResult;
189
272
  createSnackVideos: CreateSnackVideoResult;
190
273
  deleteAllCustomPlayer: CustomPlayerResult;
274
+ deleteChatMessage: DeleteChatMessageResult;
275
+ deleteChatRoom: CreateChatRoomResult;
191
276
  deleteCollection: CollectionResult;
192
277
  deleteRelationshipSnackVideo: RelateEntitySnackVideo;
278
+ deleteSnackVideo: RelateEntitySnackVideo;
193
279
  manageCollectionProduct: CollectionResult;
280
+ pinChatMessage: PinChatMessageResult;
281
+ runVideoAnalyzer: RunVideoAnalyzerResult;
282
+ saveChatMessage: SaveChatMessageResult;
194
283
  updateCollection: CollectionResult;
195
284
  updateCustomPlayer: CustomPlayerResult;
196
285
  updateProgressSnackVideo: UpdateProgressSnackVideosResult;
@@ -198,6 +287,9 @@ export type Mutation = {
198
287
  export type MutationAppendProductsSnackVideoArgs = {
199
288
  data: RelateToProductsSnackVideoInput;
200
289
  };
290
+ export type MutationCreateChatRoomArgs = {
291
+ data: CreateChatRoomInput;
292
+ };
201
293
  export type MutationCreateCollectionArgs = {
202
294
  data: CreateCollectionInput;
203
295
  };
@@ -207,15 +299,33 @@ export type MutationCreateSnackVideosArgs = {
207
299
  export type MutationDeleteAllCustomPlayerArgs = {
208
300
  data: CustomPlayerInputAccount;
209
301
  };
302
+ export type MutationDeleteChatMessageArgs = {
303
+ data: DeleteChatInput;
304
+ };
305
+ export type MutationDeleteChatRoomArgs = {
306
+ data: CreateChatRoomInput;
307
+ };
210
308
  export type MutationDeleteCollectionArgs = {
211
309
  data: QueryInput;
212
310
  };
213
311
  export type MutationDeleteRelationshipSnackVideoArgs = {
214
312
  data: SnackVideoRelationshipKeys;
215
313
  };
314
+ export type MutationDeleteSnackVideoArgs = {
315
+ data: DeleteSnackVideoInput;
316
+ };
216
317
  export type MutationManageCollectionProductArgs = {
217
318
  data: ManageCollectionProductInInput;
218
319
  };
320
+ export type MutationPinChatMessageArgs = {
321
+ data: PinChatInput;
322
+ };
323
+ export type MutationRunVideoAnalyzerArgs = {
324
+ data: RunVideoAnalyzerInput;
325
+ };
326
+ export type MutationSaveChatMessageArgs = {
327
+ data: SaveChatInput;
328
+ };
219
329
  export type MutationUpdateCollectionArgs = {
220
330
  data: UpdateCollectionInput;
221
331
  };
@@ -225,6 +335,19 @@ export type MutationUpdateCustomPlayerArgs = {
225
335
  export type MutationUpdateProgressSnackVideoArgs = {
226
336
  data: UpdateProgressSnackVideosInput;
227
337
  };
338
+ export type PinChatInput = {
339
+ account: Scalars['String'];
340
+ data: Scalars['String'];
341
+ idEvent: Scalars['String'];
342
+ pin: Scalars['Boolean'];
343
+ sessionId: Scalars['String'];
344
+ username: Scalars['String'];
345
+ };
346
+ export type PinChatMessageResult = ErrorGeneral | PinChatMessageSuccess;
347
+ export type PinChatMessageSuccess = {
348
+ __typename?: 'PinChatMessageSuccess';
349
+ message: Scalars['String'];
350
+ };
228
351
  export type Product = {
229
352
  __typename?: 'Product';
230
353
  account: Scalars['String'];
@@ -243,9 +366,11 @@ export type Query = {
243
366
  findCollection: CollectionResult;
244
367
  findEvent: FindEventResult;
245
368
  findManySnackVideos: FindManySnackVideoResult;
369
+ getAllChatMessage: GetAllChatMessageResult;
246
370
  getAllCollection: CollectionResultArray;
247
371
  getAllCustomPlayer: CustomPlayerResultArray;
248
372
  getAllSnackVideos: SnackVideoGetAll;
373
+ getChatRoomToken: GetChatRoomTokenResult;
249
374
  getRelationshipSnackVideos: RelationshipSnackVideoArrayResponse;
250
375
  searchCollection: CollectionResultArray;
251
376
  searchEvent: SearchEventResult;
@@ -263,6 +388,9 @@ export type QueryFindEventArgs = {
263
388
  export type QueryFindManySnackVideosArgs = {
264
389
  data: FindManySnackVideoInput;
265
390
  };
391
+ export type QueryGetAllChatMessageArgs = {
392
+ data: GetAllChatMessageInput;
393
+ };
266
394
  export type QueryGetAllCollectionArgs = {
267
395
  data: QueryInput;
268
396
  };
@@ -272,6 +400,9 @@ export type QueryGetAllCustomPlayerArgs = {
272
400
  export type QueryGetAllSnackVideosArgs = {
273
401
  data: QueryInput;
274
402
  };
403
+ export type QueryGetChatRoomTokenArgs = {
404
+ data: GetChatRoomInput;
405
+ };
275
406
  export type QueryGetRelationshipSnackVideosArgs = {
276
407
  data: SnackVideoRelationshipInput;
277
408
  };
@@ -288,6 +419,7 @@ export type QueryInput = {
288
419
  account: Scalars['String'];
289
420
  cursor?: InputMaybe<Scalars['JSON']>;
290
421
  id?: InputMaybe<Scalars['String']>;
422
+ includeTotal?: InputMaybe<Scalars['Boolean']>;
291
423
  limit?: InputMaybe<Scalars['Float']>;
292
424
  page?: InputMaybe<Scalars['Float']>;
293
425
  search?: InputMaybe<Scalars['String']>;
@@ -320,10 +452,38 @@ export type RelationshipSnackVideoArray = {
320
452
  path?: Maybe<Scalars['String']>;
321
453
  };
322
454
  export type RelationshipSnackVideoArrayResponse = ErrorGeneral | RelationshipSnackVideoArray;
455
+ export type RunVideoAnalyzerInput = {
456
+ account: Scalars['String'];
457
+ idEvent: Scalars['String'];
458
+ };
459
+ export type RunVideoAnalyzerMessageSuccess = {
460
+ __typename?: 'RunVideoAnalyzerMessageSuccess';
461
+ message: Scalars['String'];
462
+ };
463
+ export type RunVideoAnalyzerResult = ErrorGeneral | RunVideoAnalyzerMessageSuccess;
464
+ export type SaveChatInput = {
465
+ account: Scalars['String'];
466
+ connectionId: Scalars['String'];
467
+ data: Scalars['String'];
468
+ email: Scalars['String'];
469
+ id: Scalars['String'];
470
+ idEvent: Scalars['String'];
471
+ isAdmin?: InputMaybe<Scalars['Boolean']>;
472
+ sendDate: Scalars['String'];
473
+ sessionId: Scalars['String'];
474
+ type: Scalars['String'];
475
+ username: Scalars['String'];
476
+ };
477
+ export type SaveChatMessageResult = ErrorGeneral | SaveChatMessageSuccess;
478
+ export type SaveChatMessageSuccess = {
479
+ __typename?: 'SaveChatMessageSuccess';
480
+ message: Scalars['String'];
481
+ };
323
482
  export type SearchEventInput = {
324
483
  account: Scalars['String'];
325
484
  cursor?: InputMaybe<Scalars['JSON']>;
326
485
  id?: InputMaybe<Scalars['String']>;
486
+ includeTotal?: InputMaybe<Scalars['Boolean']>;
327
487
  limit?: InputMaybe<Scalars['Float']>;
328
488
  page?: InputMaybe<Scalars['Float']>;
329
489
  search: Scalars['String'];
@@ -334,6 +494,7 @@ export type SearchInput = {
334
494
  account: Scalars['String'];
335
495
  cursor?: InputMaybe<Scalars['JSON']>;
336
496
  id?: InputMaybe<Scalars['String']>;
497
+ includeTotal?: InputMaybe<Scalars['Boolean']>;
337
498
  limit?: InputMaybe<Scalars['Float']>;
338
499
  page?: InputMaybe<Scalars['Float']>;
339
500
  search: Scalars['String'];
@@ -372,6 +533,7 @@ export type SnackVideoCreatedWithCursor = {
372
533
  __typename?: 'SnackVideoCreatedWithCursor';
373
534
  cursor?: Maybe<Scalars['JSON']>;
374
535
  snackVideos?: Maybe<Array<SnackVideosCreated>>;
536
+ totalItems?: Maybe<Scalars['Float']>;
375
537
  };
376
538
  export type SnackVideoGetAll = ErrorGeneral | SnackVideoCreatedArray;
377
539
  export type SnackVideoRelationshipInput = {
@@ -480,6 +642,78 @@ export type UpdateCustomizationMutation = {
480
642
  timestamp: string;
481
643
  };
482
644
  };
645
+ export type DeleteChatMessageMutationVariables = Exact<{
646
+ data: DeleteChatInput;
647
+ }>;
648
+ export type DeleteChatMessageMutation = {
649
+ __typename?: 'Mutation';
650
+ deleteChatMessage: {
651
+ __typename: 'DeleteChatMessageSuccess';
652
+ message: string;
653
+ } | {
654
+ __typename: 'ErrorGeneral';
655
+ message: string;
656
+ };
657
+ };
658
+ export type GetAllChatMessageQueryVariables = Exact<{
659
+ data: GetAllChatMessageInput;
660
+ }>;
661
+ export type GetAllChatMessageQuery = {
662
+ __typename?: 'Query';
663
+ getAllChatMessage: {
664
+ __typename: 'ChatMessageArray';
665
+ data?: Array<{
666
+ __typename?: 'ChatMessage';
667
+ account: string;
668
+ connectionId?: string | null;
669
+ data: string;
670
+ email?: string | null;
671
+ id: string;
672
+ idEvent: string;
673
+ sendDate?: string | null;
674
+ sessionId?: string | null;
675
+ type?: string | null;
676
+ username?: string | null;
677
+ isAdmin?: boolean | null;
678
+ }> | null;
679
+ } | {
680
+ __typename: 'ErrorGeneral';
681
+ message: string;
682
+ statusCode: string;
683
+ timestamp: string;
684
+ };
685
+ };
686
+ export type GetChatRoomTokenQueryVariables = Exact<{
687
+ data: GetChatRoomInput;
688
+ }>;
689
+ export type GetChatRoomTokenQuery = {
690
+ __typename?: 'Query';
691
+ getChatRoomToken: {
692
+ __typename: 'ChatRoomTokenData';
693
+ data?: {
694
+ __typename?: 'ChatRoomToken';
695
+ token: string;
696
+ } | null;
697
+ } | {
698
+ __typename: 'ErrorGeneral';
699
+ message: string;
700
+ statusCode: string;
701
+ timestamp: string;
702
+ };
703
+ };
704
+ export type PinChatMessageMutationVariables = Exact<{
705
+ data: PinChatInput;
706
+ }>;
707
+ export type PinChatMessageMutation = {
708
+ __typename?: 'Mutation';
709
+ pinChatMessage: {
710
+ __typename: 'ErrorGeneral';
711
+ message: string;
712
+ } | {
713
+ __typename: 'PinChatMessageSuccess';
714
+ message: string;
715
+ };
716
+ };
483
717
  export type AddCollectionMutationVariables = Exact<{
484
718
  data: CreateCollectionInput;
485
719
  }>;
@@ -666,6 +900,7 @@ export type FindMinimalEventQuery = {
666
900
  recordVideoPath?: string | null;
667
901
  createdAt: string;
668
902
  status: EventStatus;
903
+ thumbnails?: Array<string> | null;
669
904
  } | null;
670
905
  };
671
906
  };
@@ -740,6 +975,19 @@ export type DeleteRelationshipWithSnackVideoMutation = {
740
975
  statusCode: string;
741
976
  };
742
977
  };
978
+ export type DeleteSnackVideoMutationVariables = Exact<{
979
+ data: DeleteSnackVideoInput;
980
+ }>;
981
+ export type DeleteSnackVideoMutation = {
982
+ __typename?: 'Mutation';
983
+ deleteSnackVideo: {
984
+ __typename: 'ActionSnackVideoSuccess';
985
+ message: string;
986
+ } | {
987
+ __typename: 'ErrorGeneral';
988
+ message: string;
989
+ };
990
+ };
743
991
  export type FindManySnackVideosQueryVariables = Exact<{
744
992
  data: FindManySnackVideoInput;
745
993
  }>;
@@ -781,6 +1029,7 @@ export type GetAllSnackVideosQuery = {
781
1029
  data?: {
782
1030
  __typename?: 'SnackVideoCreatedWithCursor';
783
1031
  cursor?: any | null;
1032
+ totalItems?: number | null;
784
1033
  snackVideos?: Array<{
785
1034
  __typename?: 'SnackVideosCreated';
786
1035
  id: string;
@@ -828,6 +1077,7 @@ export type SearchSnackVideosQuery = {
828
1077
  data?: {
829
1078
  __typename?: 'SnackVideoCreatedWithCursor';
830
1079
  cursor?: any | null;
1080
+ totalItems?: number | null;
831
1081
  snackVideos?: Array<{
832
1082
  __typename?: 'SnackVideosCreated';
833
1083
  id: string;
@@ -875,6 +1125,18 @@ export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizati
875
1125
  export declare const UpdateCustomizationDocument: DocumentNode<UpdateCustomizationMutation, Exact<{
876
1126
  data: CustomPlayerInput;
877
1127
  }>>;
1128
+ export declare const DeleteChatMessageDocument: DocumentNode<DeleteChatMessageMutation, Exact<{
1129
+ data: DeleteChatInput;
1130
+ }>>;
1131
+ export declare const GetAllChatMessageDocument: DocumentNode<GetAllChatMessageQuery, Exact<{
1132
+ data: GetAllChatMessageInput;
1133
+ }>>;
1134
+ export declare const GetChatRoomTokenDocument: DocumentNode<GetChatRoomTokenQuery, Exact<{
1135
+ data: GetChatRoomInput;
1136
+ }>>;
1137
+ export declare const PinChatMessageDocument: DocumentNode<PinChatMessageMutation, Exact<{
1138
+ data: PinChatInput;
1139
+ }>>;
878
1140
  export declare const AddCollectionDocument: DocumentNode<AddCollectionMutation, Exact<{
879
1141
  data: CreateCollectionInput;
880
1142
  }>>;
@@ -911,6 +1173,9 @@ export declare const CreateSnackVideoBatchDocument: DocumentNode<CreateSnackVide
911
1173
  export declare const DeleteRelationshipWithSnackVideoDocument: DocumentNode<DeleteRelationshipWithSnackVideoMutation, Exact<{
912
1174
  data: SnackVideoRelationshipKeys;
913
1175
  }>>;
1176
+ export declare const DeleteSnackVideoDocument: DocumentNode<DeleteSnackVideoMutation, Exact<{
1177
+ data: DeleteSnackVideoInput;
1178
+ }>>;
914
1179
  export declare const FindManySnackVideosDocument: DocumentNode<FindManySnackVideosQuery, Exact<{
915
1180
  data: FindManySnackVideoInput;
916
1181
  }>>;
@@ -9,5 +9,6 @@ export interface ApiCursor {
9
9
  }
10
10
  export interface ApiListResult<T> {
11
11
  cursor: ApiCursor | null;
12
+ totalItems: number;
12
13
  items: T[];
13
14
  }
@@ -0,0 +1,3 @@
1
+ import { LanguageTypes } from '../constants';
2
+ export type Translations = Record<LanguageTypes, Record<string, string>>;
3
+ export type TranslationFiles = Record<LanguageTypes, Record<string, Record<string, string>>>;
@@ -1,6 +1,7 @@
1
1
  import * as ApiGraphqlTypes from './api-graphql-types';
2
2
  export * from './api';
3
3
  export * from './appModule';
4
+ export * from './i18n';
4
5
  export * from './mobx';
5
6
  export * from './nizza';
6
7
  export * from './utils';
@@ -0,0 +1,28 @@
1
+ export interface ChatMessageBase {
2
+ id: string;
3
+ account: string;
4
+ idEvent: string;
5
+ sessionId?: string;
6
+ username: string;
7
+ fingerprint: string;
8
+ type?: string;
9
+ color?: string;
10
+ second?: number;
11
+ email?: string;
12
+ all?: boolean;
13
+ }
14
+ export interface ChatQuestion {
15
+ data: string;
16
+ username: string;
17
+ type?: string;
18
+ }
19
+ export interface ChatMessage extends ChatMessageBase {
20
+ id: string;
21
+ sendDate: string;
22
+ data: string;
23
+ action: string;
24
+ isAdmin?: boolean;
25
+ isResponse?: boolean;
26
+ responseData?: string;
27
+ question?: ChatQuestion;
28
+ }
@@ -0,0 +1,15 @@
1
+ export interface EBPayload {
2
+ name: string;
3
+ wildcard: string;
4
+ data: any;
5
+ attrs: Record<string, any>;
6
+ }
7
+ export interface EBSubscription {
8
+ off: () => void;
9
+ event: string;
10
+ }
11
+ export type EBListener = (event: EBPayload) => void;
12
+ export interface EventBus {
13
+ on(event: string, listener: EBListener): EBSubscription;
14
+ emit(event: string, data: any): void;
15
+ }
@@ -1,3 +1,5 @@
1
+ export * from './chat';
2
+ export * from './eventBus';
1
3
  export * from './main';
2
4
  export * from './nizzaGlobalObject';
3
5
  export * from './product';
@@ -12,11 +12,11 @@ export interface ApiV2Response<T = any> {
12
12
  duration: string;
13
13
  method: 'GET' | 'POST' | 'PUT' | 'DELETE';
14
14
  }
15
- export type Primitive = string | boolean | number;
16
15
  export interface CustomFetchConfig extends RequestInit {
17
16
  url: RequestInfo;
18
17
  raw?: boolean;
19
18
  contentTypeJson?: boolean;
19
+ timeout?: number;
20
20
  }
21
21
  export type Environment<T> = typeof environment & T;
22
22
  export type RequiredKeys<T> = {
@@ -1,5 +1,10 @@
1
1
  import { CustomFetchConfig } from '../types';
2
- export declare function customFetch<T = any>(config: CustomFetchConfig): Promise<T>;
2
+ export declare function customFetch<T = any>(config: CustomFetchConfig & {
3
+ raw?: false;
4
+ }): Promise<T>;
5
+ export declare function customFetch(config: CustomFetchConfig & {
6
+ raw: true;
7
+ }): Promise<Response>;
3
8
  declare interface ApiCall {
4
9
  url: string;
5
10
  method?: string;
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node" />
4
+ /// <reference types="node" />
5
+ export declare function downloadFile(filename: string, url: string, ext: string): void;
6
+ export declare const jsDownload: (data: Blob, filename: string, mime?: string) => boolean | NodeJS.Timeout;