@nizza/core 0.5.0 → 0.5.2

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.
@@ -3,8 +3,8 @@ import { BroadcastChannelEventBus } from '../event-buses';
3
3
  import { NizzaStore as INizzaStore, NizzaConfig, NizzaProductDataSource } from '../types';
4
4
  import { Logger } from '../utils/logger';
5
5
  export declare class NizzaStore implements INizzaStore {
6
+ static readonly version = "2";
6
7
  private static _instance;
7
- readonly version = "1.0.5";
8
8
  readonly instanceId: string;
9
9
  private _config;
10
10
  private _account?;
@@ -13,15 +13,17 @@ export declare class NizzaStore implements INizzaStore {
13
13
  readonly log: Logger;
14
14
  private constructor();
15
15
  static instance(): NizzaStore;
16
+ private migrateFrom;
16
17
  configure(config: NizzaConfig): Promise<void>;
17
18
  private setAccount;
18
19
  setProductDataSource(dataSource: NizzaProductDataSource): void;
20
+ get version(): string;
19
21
  get config(): NizzaConfig | null;
20
22
  get account(): NizzaAccount | undefined;
21
23
  get accountName(): string | undefined;
22
24
  get productDataSource(): NizzaProductDataSource | undefined;
23
25
  get eventBus(): BroadcastChannelEventBus;
24
26
  }
25
- export declare const nizza: NizzaStore;
27
+ export declare const getNizza: () => NizzaStore;
26
28
  export declare const logger: import("loglevel").Logger;
27
29
  export declare const coreLogger: import("loglevel").Logger;
@@ -1,4 +1,4 @@
1
1
  import { NizzaStore } from '../types';
2
2
  export declare const nizza: import("./NizzaStore").NizzaStore | NizzaStore;
3
- export declare const logger: import("loglevel").Logger;
4
- export declare const coreLogger: import("loglevel").Logger;
3
+ export declare const logger: any;
4
+ export declare const coreLogger: any;
@@ -3,5 +3,5 @@ export declare const configure: (config: NizzaConfig) => Promise<void>;
3
3
  export declare const setProductDataSource: (dataSource: NizzaProductDataSource) => void;
4
4
  export declare const nizza: import("./NizzaStore").NizzaStore | NizzaStore;
5
5
  export declare const useNizza: any;
6
- export declare const logger: import("loglevel").Logger;
7
- export declare const coreLogger: import("loglevel").Logger;
6
+ export declare const logger: any;
7
+ export declare const coreLogger: any;
@@ -145,6 +145,21 @@ export type CreateCollectionInput = {
145
145
  name: Scalars['String'];
146
146
  status?: InputMaybe<Status>;
147
147
  };
148
+ export type CreatePlayListInput = {
149
+ account: Scalars['String'];
150
+ description: Scalars['String'];
151
+ name: Scalars['String'];
152
+ videos: Array<CreatePlayListVideoInput>;
153
+ };
154
+ export type CreatePlayListResult = CreatePlayListSuccess | ErrorGeneral;
155
+ export type CreatePlayListSuccess = {
156
+ __typename?: 'CreatePlayListSuccess';
157
+ message: Scalars['String'];
158
+ };
159
+ export type CreatePlayListVideoInput = {
160
+ order: Scalars['Float'];
161
+ snackVideoId: Scalars['String'];
162
+ };
148
163
  export type CreateSnackVideoInput = {
149
164
  account: Scalars['String'];
150
165
  clips: Array<Clip>;
@@ -265,6 +280,12 @@ export type GetChatRoomInput = {
265
280
  userName: Scalars['String'];
266
281
  };
267
282
  export type GetChatRoomTokenResult = ChatRoomTokenData | ErrorGeneral;
283
+ export type GetPlayListData = ErrorGeneral | PlayListData;
284
+ export type GetPlayListQueryInput = {
285
+ account: Scalars['String'];
286
+ id: Scalars['String'];
287
+ };
288
+ export type GetPlayListResult = ErrorGeneral | PlayListArray;
268
289
  export type GetTimeLineInput = {
269
290
  account: Scalars['String'];
270
291
  idEvent: Scalars['String'];
@@ -299,6 +320,7 @@ export type Mutation = {
299
320
  changeAccountUsername: ChangeUsernameResult;
300
321
  createChatRoom: CreateChatRoomResult;
301
322
  createCollection: CollectionResult;
323
+ createPlayList: CreatePlayListResult;
302
324
  createSnackVideos: CreateSnackVideoResult;
303
325
  deleteAllCustomPlayer: CustomPlayerResult;
304
326
  deleteChatMessage: DeleteChatMessageResult;
@@ -308,10 +330,12 @@ export type Mutation = {
308
330
  deleteSnackVideo: RelateEntitySnackVideo;
309
331
  manageCollectionProduct: CollectionResult;
310
332
  pinChatMessage: PinChatMessageResult;
333
+ runQuestionProcessor: RunQuestionProcessorResult;
311
334
  runVideoAnalyzer: RunVideoAnalyzerResult;
312
335
  saveChatMessage: SaveChatMessageResult;
313
336
  updateCollection: CollectionResult;
314
337
  updateCustomPlayer: CustomPlayerResult;
338
+ updatePlayList: UpdatePlayListResult;
315
339
  updateProgressSnackVideo: UpdateProgressSnackVideosResult;
316
340
  };
317
341
  export type MutationAppendProductsSnackVideoArgs = {
@@ -329,6 +353,9 @@ export type MutationCreateChatRoomArgs = {
329
353
  export type MutationCreateCollectionArgs = {
330
354
  data: CreateCollectionInput;
331
355
  };
356
+ export type MutationCreatePlayListArgs = {
357
+ data: CreatePlayListInput;
358
+ };
332
359
  export type MutationCreateSnackVideosArgs = {
333
360
  data: CreateSnackVideoInput;
334
361
  };
@@ -356,6 +383,9 @@ export type MutationManageCollectionProductArgs = {
356
383
  export type MutationPinChatMessageArgs = {
357
384
  data: PinChatInput;
358
385
  };
386
+ export type MutationRunQuestionProcessorArgs = {
387
+ data: RunQuestionProcessorInput;
388
+ };
359
389
  export type MutationRunVideoAnalyzerArgs = {
360
390
  data: RunVideoAnalyzerInput;
361
391
  };
@@ -368,6 +398,9 @@ export type MutationUpdateCollectionArgs = {
368
398
  export type MutationUpdateCustomPlayerArgs = {
369
399
  data: CustomPlayerInput;
370
400
  };
401
+ export type MutationUpdatePlayListArgs = {
402
+ data: UpdatePlayListInput;
403
+ };
371
404
  export type MutationUpdateProgressSnackVideoArgs = {
372
405
  data: UpdateProgressSnackVideosInput;
373
406
  };
@@ -384,6 +417,48 @@ export type PinChatMessageSuccess = {
384
417
  __typename?: 'PinChatMessageSuccess';
385
418
  message: Scalars['String'];
386
419
  };
420
+ export type PlayList = {
421
+ __typename?: 'PlayList';
422
+ account: Scalars['String'];
423
+ created: Scalars['String'];
424
+ description: Scalars['String'];
425
+ id: Scalars['String'];
426
+ name: Scalars['String'];
427
+ productAmount: Scalars['Float'];
428
+ updated: Scalars['String'];
429
+ videoAmount: Scalars['Float'];
430
+ videos: Array<PlayListVideo>;
431
+ };
432
+ export type PlayListArray = {
433
+ __typename?: 'PlayListArray';
434
+ data?: Maybe<Array<PlayList>>;
435
+ duration?: Maybe<Scalars['String']>;
436
+ isArray?: Maybe<Scalars['Boolean']>;
437
+ method?: Maybe<Scalars['String']>;
438
+ path?: Maybe<Scalars['String']>;
439
+ };
440
+ export type PlayListData = {
441
+ __typename?: 'PlayListData';
442
+ data?: Maybe<PlayList>;
443
+ duration?: Maybe<Scalars['String']>;
444
+ isArray?: Maybe<Scalars['Boolean']>;
445
+ method?: Maybe<Scalars['String']>;
446
+ path?: Maybe<Scalars['String']>;
447
+ };
448
+ export type PlayListVideo = {
449
+ __typename?: 'PlayListVideo';
450
+ account: Scalars['String'];
451
+ duration?: Maybe<Scalars['Float']>;
452
+ eventId?: Maybe<Scalars['String']>;
453
+ eventName?: Maybe<Scalars['String']>;
454
+ id: Scalars['String'];
455
+ idPlayList: Scalars['String'];
456
+ name?: Maybe<Scalars['String']>;
457
+ order: Scalars['Float'];
458
+ thumbnailUrl?: Maybe<Scalars['String']>;
459
+ transmitionType?: Maybe<Scalars['String']>;
460
+ url?: Maybe<Scalars['String']>;
461
+ };
387
462
  export type Product = {
388
463
  __typename?: 'Product';
389
464
  account: Scalars['String'];
@@ -407,6 +482,8 @@ export type Query = {
407
482
  getAllCustomPlayer: CustomPlayerResultArray;
408
483
  getAllSnackVideos: SnackVideoGetAll;
409
484
  getChatRoomToken: GetChatRoomTokenResult;
485
+ getPlayList: GetPlayListData;
486
+ getPlayLists: GetPlayListResult;
410
487
  getRelationshipSnackVideos: RelationshipSnackVideoArrayResponse;
411
488
  getTimeLine: GetTimeLineResult;
412
489
  searchCollection: CollectionResultArray;
@@ -440,6 +517,12 @@ export type QueryGetAllSnackVideosArgs = {
440
517
  export type QueryGetChatRoomTokenArgs = {
441
518
  data: GetChatRoomInput;
442
519
  };
520
+ export type QueryGetPlayListArgs = {
521
+ data: GetPlayListQueryInput;
522
+ };
523
+ export type QueryGetPlayListsArgs = {
524
+ data: QueryInput;
525
+ };
443
526
  export type QueryGetRelationshipSnackVideosArgs = {
444
527
  data: SnackVideoRelationshipInput;
445
528
  };
@@ -492,6 +575,15 @@ export type RelationshipSnackVideoArray = {
492
575
  path?: Maybe<Scalars['String']>;
493
576
  };
494
577
  export type RelationshipSnackVideoArrayResponse = ErrorGeneral | RelationshipSnackVideoArray;
578
+ export type RunQuestionProcessorInput = {
579
+ account: Scalars['String'];
580
+ idEvent: Scalars['String'];
581
+ };
582
+ export type RunQuestionProcessorMessageSuccess = {
583
+ __typename?: 'RunQuestionProcessorMessageSuccess';
584
+ message: Scalars['String'];
585
+ };
586
+ export type RunQuestionProcessorResult = ErrorGeneral | RunQuestionProcessorMessageSuccess;
495
587
  export type RunVideoAnalyzerInput = {
496
588
  account: Scalars['String'];
497
589
  idEvent: Scalars['String'];
@@ -545,15 +637,15 @@ export type SnackVideo = {
545
637
  __typename?: 'SnackVideo';
546
638
  account: Scalars['String'];
547
639
  created?: Maybe<Scalars['String']>;
548
- duration: Scalars['Float'];
549
- eventId: Scalars['String'];
550
- eventName: Scalars['String'];
640
+ duration?: Maybe<Scalars['Float']>;
641
+ eventId?: Maybe<Scalars['String']>;
642
+ eventName?: Maybe<Scalars['String']>;
551
643
  id: Scalars['String'];
552
- name: Scalars['String'];
553
- thumbnailUrl: Scalars['String'];
644
+ name?: Maybe<Scalars['String']>;
645
+ thumbnailUrl?: Maybe<Scalars['String']>;
554
646
  transmitionType?: Maybe<Scalars['String']>;
555
647
  uploadProgress: Scalars['Float'];
556
- url: Scalars['String'];
648
+ url?: Maybe<Scalars['String']>;
557
649
  };
558
650
  export type SnackVideoArray = {
559
651
  __typename?: 'SnackVideoArray';
@@ -592,17 +684,17 @@ export type SnackVideosCreated = {
592
684
  __typename?: 'SnackVideosCreated';
593
685
  account: Scalars['String'];
594
686
  created: Scalars['String'];
595
- duration: Scalars['Float'];
687
+ duration?: Maybe<Scalars['Float']>;
596
688
  entity: Scalars['String'];
597
- eventId: Scalars['String'];
598
- eventName: Scalars['String'];
689
+ eventId?: Maybe<Scalars['String']>;
690
+ eventName?: Maybe<Scalars['String']>;
599
691
  id: Scalars['String'];
600
692
  modified: Scalars['String'];
601
- name: Scalars['String'];
602
- thumbnailUrl: Scalars['String'];
693
+ name?: Maybe<Scalars['String']>;
694
+ thumbnailUrl?: Maybe<Scalars['String']>;
603
695
  transmitionType?: Maybe<Scalars['String']>;
604
696
  uploadProgress: Scalars['Float'];
605
- url: Scalars['String'];
697
+ url?: Maybe<Scalars['String']>;
606
698
  };
607
699
  export declare enum Status {
608
700
  Active = "active",
@@ -633,6 +725,18 @@ export type UpdateCollectionInput = {
633
725
  name?: InputMaybe<Scalars['String']>;
634
726
  status?: InputMaybe<Status>;
635
727
  };
728
+ export type UpdatePlayListInput = {
729
+ account: Scalars['String'];
730
+ description?: InputMaybe<Scalars['String']>;
731
+ id: Scalars['String'];
732
+ name?: InputMaybe<Scalars['String']>;
733
+ videos?: InputMaybe<Array<CreatePlayListVideoInput>>;
734
+ };
735
+ export type UpdatePlayListResult = ErrorGeneral | UpdatePlayListSuccess;
736
+ export type UpdatePlayListSuccess = {
737
+ __typename?: 'UpdatePlayListSuccess';
738
+ message: Scalars['String'];
739
+ };
636
740
  export type UpdateProgressSnackVideos = {
637
741
  __typename?: 'UpdateProgressSnackVideos';
638
742
  account: Scalars['String'];
@@ -1116,13 +1220,13 @@ export type FindManySnackVideosQuery = {
1116
1220
  data?: Array<{
1117
1221
  __typename?: 'SnackVideo';
1118
1222
  id: string;
1119
- name: string;
1120
- url: string;
1121
- thumbnailUrl: string;
1223
+ name?: string | null;
1224
+ url?: string | null;
1225
+ thumbnailUrl?: string | null;
1122
1226
  uploadProgress: number;
1123
- duration: number;
1124
- eventId: string;
1125
- eventName: string;
1227
+ duration?: number | null;
1228
+ eventId?: string | null;
1229
+ eventName?: string | null;
1126
1230
  transmitionType?: string | null;
1127
1231
  }> | null;
1128
1232
  };
@@ -1146,19 +1250,46 @@ export type GetAllSnackVideosQuery = {
1146
1250
  snackVideos?: Array<{
1147
1251
  __typename?: 'SnackVideosCreated';
1148
1252
  id: string;
1149
- name: string;
1150
- url: string;
1151
- thumbnailUrl: string;
1253
+ name?: string | null;
1254
+ url?: string | null;
1255
+ thumbnailUrl?: string | null;
1152
1256
  uploadProgress: number;
1153
- duration: number;
1154
- eventId: string;
1155
- eventName: string;
1257
+ duration?: number | null;
1258
+ eventId?: string | null;
1259
+ eventName?: string | null;
1156
1260
  created: string;
1157
1261
  transmitionType?: string | null;
1158
1262
  }> | null;
1159
1263
  } | null;
1160
1264
  };
1161
1265
  };
1266
+ export type GetPlayListsQueryVariables = Exact<{
1267
+ data: QueryInput;
1268
+ }>;
1269
+ export type GetPlayListsQuery = {
1270
+ __typename?: 'Query';
1271
+ getPlayLists: {
1272
+ __typename: 'ErrorGeneral';
1273
+ message: string;
1274
+ statusCode: string;
1275
+ timestamp: string;
1276
+ } | {
1277
+ __typename: 'PlayListArray';
1278
+ data?: Array<{
1279
+ __typename?: 'PlayList';
1280
+ id: string;
1281
+ description: string;
1282
+ created: string;
1283
+ updated: string;
1284
+ videos: Array<{
1285
+ __typename?: 'PlayListVideo';
1286
+ id: string;
1287
+ thumbnailUrl?: string | null;
1288
+ order: number;
1289
+ }>;
1290
+ }> | null;
1291
+ };
1292
+ };
1162
1293
  export type GetSnackVideoRelationshipsQueryVariables = Exact<{
1163
1294
  data: SnackVideoRelationshipInput;
1164
1295
  }>;
@@ -1194,13 +1325,13 @@ export type SearchSnackVideosQuery = {
1194
1325
  snackVideos?: Array<{
1195
1326
  __typename?: 'SnackVideosCreated';
1196
1327
  id: string;
1197
- name: string;
1198
- url: string;
1199
- thumbnailUrl: string;
1328
+ name?: string | null;
1329
+ url?: string | null;
1330
+ thumbnailUrl?: string | null;
1200
1331
  uploadProgress: number;
1201
- duration: number;
1202
- eventId: string;
1203
- eventName: string;
1332
+ duration?: number | null;
1333
+ eventId?: string | null;
1334
+ eventName?: string | null;
1204
1335
  created: string;
1205
1336
  }> | null;
1206
1337
  } | null;
@@ -1221,10 +1352,10 @@ export type FindByProductSnackVideoQuery = {
1221
1352
  data?: Array<{
1222
1353
  __typename?: 'SnackVideo';
1223
1354
  id: string;
1224
- name: string;
1225
- url: string;
1226
- thumbnailUrl: string;
1227
- duration: number;
1355
+ name?: string | null;
1356
+ url?: string | null;
1357
+ thumbnailUrl?: string | null;
1358
+ duration?: number | null;
1228
1359
  transmitionType?: string | null;
1229
1360
  }> | null;
1230
1361
  };
@@ -1304,6 +1435,9 @@ export declare const FindManySnackVideosDocument: DocumentNode<FindManySnackVide
1304
1435
  export declare const GetAllSnackVideosDocument: DocumentNode<GetAllSnackVideosQuery, Exact<{
1305
1436
  data: QueryInput;
1306
1437
  }>>;
1438
+ export declare const GetPlayListsDocument: DocumentNode<GetPlayListsQuery, Exact<{
1439
+ data: QueryInput;
1440
+ }>>;
1307
1441
  export declare const GetSnackVideoRelationshipsDocument: DocumentNode<GetSnackVideoRelationshipsQuery, Exact<{
1308
1442
  data: SnackVideoRelationshipInput;
1309
1443
  }>>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",