@nizza/core 0.4.3 → 0.4.5-alpha.0

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,6 @@ export interface BaseProps {
3
3
  id: string;
4
4
  account: string;
5
5
  accountType: AccountTypes;
6
- username: string;
7
6
  currencyConfig: AccountCurrencyConfig;
8
7
  contractType: AccountContractTypes;
9
8
  nextDateMetricRecord: string;
@@ -26,9 +25,11 @@ export interface BaseProps {
26
25
  }
27
26
  export type AccountProps = BaseProps & {
28
27
  createdAt: Date;
28
+ username: string;
29
29
  };
30
30
  export type RawAccount = BaseProps & {
31
31
  createdAt: string;
32
+ username?: string;
32
33
  };
33
34
  type StripeSubscriptionStatus = 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid';
34
35
  export interface AccountStripe {
@@ -1 +1 @@
1
- export declare const i18n: Promise<import("i18next").TFunction>;
1
+ export declare const i18n: Promise<import("i18next").TFunction<"translation", undefined>>;
@@ -2,7 +2,21 @@ export declare const globalAtomStore: {
2
2
  get: <Value>(atom: import("jotai").Atom<Value>) => Value;
3
3
  set: <Value_1, Args extends unknown[], Result>(atom: import("jotai").WritableAtom<Value_1, Args, Result>, ...args: Args) => Result;
4
4
  sub: (atom: import("jotai").Atom<unknown>, listener: () => void) => () => void;
5
- dev_subscribe_store: (l: (type: "state" | "sub" | "unsub") => void) => () => void;
5
+ dev_subscribe_store: (l: (action: {
6
+ type: "write";
7
+ flushed: Set<import("jotai").Atom<unknown>>;
8
+ } | {
9
+ type: "async-write";
10
+ flushed: Set<import("jotai").Atom<unknown>>;
11
+ } | {
12
+ type: "sub";
13
+ flushed: Set<import("jotai").Atom<unknown>>;
14
+ } | {
15
+ type: "unsub";
16
+ } | {
17
+ type: "restore";
18
+ flushed: Set<import("jotai").Atom<unknown>>;
19
+ }) => void, rev: 2) => () => void;
6
20
  dev_get_mounted_atoms: () => IterableIterator<import("jotai").Atom<unknown>>;
7
21
  dev_get_atom_state: (a: import("jotai").Atom<unknown>) => ({
8
22
  d: Map<import("jotai").Atom<unknown>, any & ({
@@ -0,0 +1,7 @@
1
+ import { EventBus, EventBusListener, EventBusSubscription } from '../../types';
2
+ export declare class EventEmitter2EventBus implements EventBus {
3
+ private emitter;
4
+ constructor();
5
+ on(event: string, listener: EventBusListener): EventBusSubscription;
6
+ emit(event: string, data: any): void;
7
+ }
@@ -1 +1,4 @@
1
+ export * from './ConfigManager';
1
2
  export * from './NizzaStore';
3
+ export * from './event-buses';
4
+ export * from './helpers';
@@ -29,6 +29,7 @@ export type ActionSnackVideoSuccess = {
29
29
  export type BlockUserInput = {
30
30
  account: Scalars['String'];
31
31
  idEvent: Scalars['String'];
32
+ ip?: InputMaybe<Scalars['String']>;
32
33
  username: Scalars['String'];
33
34
  };
34
35
  export type BlockUserResult = BlockUserSuccess | ErrorGeneral;
@@ -53,7 +54,9 @@ export type ChatMessage = {
53
54
  email?: Maybe<Scalars['String']>;
54
55
  id: Scalars['String'];
55
56
  idEvent: Scalars['String'];
57
+ ip?: Maybe<Scalars['String']>;
56
58
  isAdmin?: Maybe<Scalars['Boolean']>;
59
+ second?: Maybe<Scalars['Float']>;
57
60
  sendDate?: Maybe<Scalars['String']>;
58
61
  sessionId?: Maybe<Scalars['String']>;
59
62
  type?: Maybe<Scalars['String']>;
@@ -262,6 +265,11 @@ export type GetChatRoomInput = {
262
265
  userName: Scalars['String'];
263
266
  };
264
267
  export type GetChatRoomTokenResult = ChatRoomTokenData | ErrorGeneral;
268
+ export type GetTimeLineInput = {
269
+ account: Scalars['String'];
270
+ idEvent: Scalars['String'];
271
+ };
272
+ export type GetTimeLineResult = ErrorGeneral | TimeLineArray;
265
273
  export type LiveStreamingEvent = {
266
274
  __typename?: 'LiveStreamingEvent';
267
275
  account: Scalars['String'];
@@ -400,6 +408,7 @@ export type Query = {
400
408
  getAllSnackVideos: SnackVideoGetAll;
401
409
  getChatRoomToken: GetChatRoomTokenResult;
402
410
  getRelationshipSnackVideos: RelationshipSnackVideoArrayResponse;
411
+ getTimeLine: GetTimeLineResult;
403
412
  searchCollection: CollectionResultArray;
404
413
  searchEvent: SearchEventResult;
405
414
  searchSnackVideos: SnackVideoGetAll;
@@ -434,6 +443,9 @@ export type QueryGetChatRoomTokenArgs = {
434
443
  export type QueryGetRelationshipSnackVideosArgs = {
435
444
  data: SnackVideoRelationshipInput;
436
445
  };
446
+ export type QueryGetTimeLineArgs = {
447
+ data: GetTimeLineInput;
448
+ };
437
449
  export type QuerySearchCollectionArgs = {
438
450
  data: QueryInput;
439
451
  };
@@ -496,6 +508,7 @@ export type SaveChatInput = {
496
508
  email: Scalars['String'];
497
509
  id: Scalars['String'];
498
510
  idEvent: Scalars['String'];
511
+ ip: Scalars['String'];
499
512
  isAdmin?: InputMaybe<Scalars['Boolean']>;
500
513
  sendDate: Scalars['String'];
501
514
  sessionId: Scalars['String'];
@@ -595,6 +608,24 @@ export declare enum Status {
595
608
  Active = "active",
596
609
  Inactive = "inactive"
597
610
  }
611
+ export type TimeLine = {
612
+ __typename?: 'TimeLine';
613
+ comments: Scalars['Float'];
614
+ hour: Scalars['Float'];
615
+ likes: Scalars['Float'];
616
+ minute: Scalars['Float'];
617
+ orders: Scalars['Float'];
618
+ time: Scalars['String'];
619
+ viewers: Scalars['Float'];
620
+ };
621
+ export type TimeLineArray = {
622
+ __typename?: 'TimeLineArray';
623
+ data?: Maybe<Array<TimeLine>>;
624
+ duration?: Maybe<Scalars['String']>;
625
+ isArray?: Maybe<Scalars['Boolean']>;
626
+ method?: Maybe<Scalars['String']>;
627
+ path?: Maybe<Scalars['String']>;
628
+ };
598
629
  export type UpdateCollectionInput = {
599
630
  account: Scalars['String'];
600
631
  description?: InputMaybe<Scalars['String']>;
@@ -622,154 +653,6 @@ export type UpdateProgressSnackVideosInput = {
622
653
  progress: Scalars['Float'];
623
654
  };
624
655
  export type UpdateProgressSnackVideosResult = ErrorGeneral | UpdateProgressSnackVideosData;
625
- export type DeleteAllCustomizationMutationVariables = Exact<{
626
- data: CustomPlayerInputAccount;
627
- }>;
628
- export type DeleteAllCustomizationMutation = {
629
- __typename?: 'Mutation';
630
- deleteAllCustomPlayer: {
631
- __typename: 'CustomPlayerSuccess';
632
- } | {
633
- __typename: 'ErrorGeneral';
634
- message: string;
635
- statusCode: string;
636
- timestamp: string;
637
- };
638
- };
639
- export type GetAllCustomizationQueryVariables = Exact<{
640
- data: QueryInput;
641
- }>;
642
- export type GetAllCustomizationQuery = {
643
- __typename?: 'Query';
644
- getAllCustomPlayer: {
645
- __typename: 'CustomPlayerSuccessArray';
646
- data?: Array<{
647
- __typename?: 'CustomPlayer';
648
- account: string;
649
- data: any;
650
- section: string;
651
- id: string;
652
- }> | null;
653
- } | {
654
- __typename: 'ErrorGeneral';
655
- message: string;
656
- statusCode: string;
657
- timestamp: string;
658
- };
659
- };
660
- export type UpdateCustomizationMutationVariables = Exact<{
661
- data: CustomPlayerInput;
662
- }>;
663
- export type UpdateCustomizationMutation = {
664
- __typename?: 'Mutation';
665
- updateCustomPlayer: {
666
- __typename: 'CustomPlayerSuccess';
667
- } | {
668
- __typename: 'ErrorGeneral';
669
- message: string;
670
- statusCode: string;
671
- timestamp: string;
672
- };
673
- };
674
- export type BlockUserMutationVariables = Exact<{
675
- data: BlockUserInput;
676
- }>;
677
- export type BlockUserMutation = {
678
- __typename?: 'Mutation';
679
- blockUser: {
680
- __typename: 'BlockUserSuccess';
681
- message: string;
682
- } | {
683
- __typename: 'ErrorGeneral';
684
- message: string;
685
- };
686
- };
687
- export type ChangeAccountUsernameMutationVariables = Exact<{
688
- data: ChangeUsernameInput;
689
- }>;
690
- export type ChangeAccountUsernameMutation = {
691
- __typename?: 'Mutation';
692
- changeAccountUsername: {
693
- __typename: 'ChangeUsernameSuccess';
694
- message: string;
695
- } | {
696
- __typename: 'ErrorGeneral';
697
- message: string;
698
- };
699
- };
700
- export type DeleteChatMessageMutationVariables = Exact<{
701
- data: DeleteChatInput;
702
- }>;
703
- export type DeleteChatMessageMutation = {
704
- __typename?: 'Mutation';
705
- deleteChatMessage: {
706
- __typename: 'DeleteChatMessageSuccess';
707
- message: string;
708
- } | {
709
- __typename: 'ErrorGeneral';
710
- message: string;
711
- };
712
- };
713
- export type GetAllChatMessageQueryVariables = Exact<{
714
- data: GetAllChatMessageInput;
715
- }>;
716
- export type GetAllChatMessageQuery = {
717
- __typename?: 'Query';
718
- getAllChatMessage: {
719
- __typename: 'ChatMessageArray';
720
- data?: Array<{
721
- __typename?: 'ChatMessage';
722
- account: string;
723
- connectionId?: string | null;
724
- data: string;
725
- email?: string | null;
726
- id: string;
727
- idEvent: string;
728
- sendDate?: string | null;
729
- sessionId?: string | null;
730
- type?: string | null;
731
- username?: string | null;
732
- isAdmin?: boolean | null;
733
- urlGif?: string | null;
734
- }> | null;
735
- } | {
736
- __typename: 'ErrorGeneral';
737
- message: string;
738
- statusCode: string;
739
- timestamp: string;
740
- };
741
- };
742
- export type GetChatRoomTokenQueryVariables = Exact<{
743
- data: GetChatRoomInput;
744
- }>;
745
- export type GetChatRoomTokenQuery = {
746
- __typename?: 'Query';
747
- getChatRoomToken: {
748
- __typename: 'ChatRoomTokenData';
749
- data?: {
750
- __typename?: 'ChatRoomToken';
751
- token: string;
752
- } | null;
753
- } | {
754
- __typename: 'ErrorGeneral';
755
- message: string;
756
- statusCode: string;
757
- timestamp: string;
758
- };
759
- };
760
- export type PinChatMessageMutationVariables = Exact<{
761
- data: PinChatInput;
762
- }>;
763
- export type PinChatMessageMutation = {
764
- __typename?: 'Mutation';
765
- pinChatMessage: {
766
- __typename: 'ErrorGeneral';
767
- message: string;
768
- } | {
769
- __typename: 'PinChatMessageSuccess';
770
- message: string;
771
- };
772
- };
773
656
  export type AddCollectionMutationVariables = Exact<{
774
657
  data: CreateCollectionInput;
775
658
  }>;
@@ -984,6 +867,155 @@ export type SearchMinimalEventsQuery = {
984
867
  }> | null;
985
868
  };
986
869
  };
870
+ export type BlockUserMutationVariables = Exact<{
871
+ data: BlockUserInput;
872
+ }>;
873
+ export type BlockUserMutation = {
874
+ __typename?: 'Mutation';
875
+ blockUser: {
876
+ __typename: 'BlockUserSuccess';
877
+ message: string;
878
+ } | {
879
+ __typename: 'ErrorGeneral';
880
+ message: string;
881
+ };
882
+ };
883
+ export type ChangeAccountUsernameMutationVariables = Exact<{
884
+ data: ChangeUsernameInput;
885
+ }>;
886
+ export type ChangeAccountUsernameMutation = {
887
+ __typename?: 'Mutation';
888
+ changeAccountUsername: {
889
+ __typename: 'ChangeUsernameSuccess';
890
+ message: string;
891
+ } | {
892
+ __typename: 'ErrorGeneral';
893
+ message: string;
894
+ };
895
+ };
896
+ export type DeleteChatMessageMutationVariables = Exact<{
897
+ data: DeleteChatInput;
898
+ }>;
899
+ export type DeleteChatMessageMutation = {
900
+ __typename?: 'Mutation';
901
+ deleteChatMessage: {
902
+ __typename: 'DeleteChatMessageSuccess';
903
+ message: string;
904
+ } | {
905
+ __typename: 'ErrorGeneral';
906
+ message: string;
907
+ };
908
+ };
909
+ export type GetAllChatMessageQueryVariables = Exact<{
910
+ data: GetAllChatMessageInput;
911
+ }>;
912
+ export type GetAllChatMessageQuery = {
913
+ __typename?: 'Query';
914
+ getAllChatMessage: {
915
+ __typename: 'ChatMessageArray';
916
+ data?: Array<{
917
+ __typename?: 'ChatMessage';
918
+ account: string;
919
+ connectionId?: string | null;
920
+ data: string;
921
+ email?: string | null;
922
+ id: string;
923
+ idEvent: string;
924
+ sendDate?: string | null;
925
+ sessionId?: string | null;
926
+ type?: string | null;
927
+ username?: string | null;
928
+ isAdmin?: boolean | null;
929
+ urlGif?: string | null;
930
+ second?: number | null;
931
+ }> | null;
932
+ } | {
933
+ __typename: 'ErrorGeneral';
934
+ message: string;
935
+ statusCode: string;
936
+ timestamp: string;
937
+ };
938
+ };
939
+ export type GetChatRoomTokenQueryVariables = Exact<{
940
+ data: GetChatRoomInput;
941
+ }>;
942
+ export type GetChatRoomTokenQuery = {
943
+ __typename?: 'Query';
944
+ getChatRoomToken: {
945
+ __typename: 'ChatRoomTokenData';
946
+ data?: {
947
+ __typename?: 'ChatRoomToken';
948
+ token: string;
949
+ } | null;
950
+ } | {
951
+ __typename: 'ErrorGeneral';
952
+ message: string;
953
+ statusCode: string;
954
+ timestamp: string;
955
+ };
956
+ };
957
+ export type PinChatMessageMutationVariables = Exact<{
958
+ data: PinChatInput;
959
+ }>;
960
+ export type PinChatMessageMutation = {
961
+ __typename?: 'Mutation';
962
+ pinChatMessage: {
963
+ __typename: 'ErrorGeneral';
964
+ message: string;
965
+ } | {
966
+ __typename: 'PinChatMessageSuccess';
967
+ message: string;
968
+ };
969
+ };
970
+ export type DeleteAllCustomizationMutationVariables = Exact<{
971
+ data: CustomPlayerInputAccount;
972
+ }>;
973
+ export type DeleteAllCustomizationMutation = {
974
+ __typename?: 'Mutation';
975
+ deleteAllCustomPlayer: {
976
+ __typename: 'CustomPlayerSuccess';
977
+ } | {
978
+ __typename: 'ErrorGeneral';
979
+ message: string;
980
+ statusCode: string;
981
+ timestamp: string;
982
+ };
983
+ };
984
+ export type GetAllCustomizationQueryVariables = Exact<{
985
+ data: QueryInput;
986
+ }>;
987
+ export type GetAllCustomizationQuery = {
988
+ __typename?: 'Query';
989
+ getAllCustomPlayer: {
990
+ __typename: 'CustomPlayerSuccessArray';
991
+ data?: Array<{
992
+ __typename?: 'CustomPlayer';
993
+ account: string;
994
+ data: any;
995
+ section: string;
996
+ id: string;
997
+ }> | null;
998
+ } | {
999
+ __typename: 'ErrorGeneral';
1000
+ message: string;
1001
+ statusCode: string;
1002
+ timestamp: string;
1003
+ };
1004
+ };
1005
+ export type UpdateCustomizationMutationVariables = Exact<{
1006
+ data: CustomPlayerInput;
1007
+ }>;
1008
+ export type UpdateCustomizationMutation = {
1009
+ __typename?: 'Mutation';
1010
+ updateCustomPlayer: {
1011
+ __typename: 'CustomPlayerSuccess';
1012
+ } | {
1013
+ __typename: 'ErrorGeneral';
1014
+ message: string;
1015
+ statusCode: string;
1016
+ timestamp: string;
1017
+ };
1018
+ };
987
1019
  export type AppendProductsToSnackVideoMutationVariables = Exact<{
988
1020
  data: RelateToProductsSnackVideoInput;
989
1021
  }>;
@@ -1172,33 +1204,6 @@ export type FindByProductSnackVideoQuery = {
1172
1204
  }> | null;
1173
1205
  };
1174
1206
  };
1175
- export declare const DeleteAllCustomizationDocument: DocumentNode<DeleteAllCustomizationMutation, Exact<{
1176
- data: CustomPlayerInputAccount;
1177
- }>>;
1178
- export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizationQuery, Exact<{
1179
- data: QueryInput;
1180
- }>>;
1181
- export declare const UpdateCustomizationDocument: DocumentNode<UpdateCustomizationMutation, Exact<{
1182
- data: CustomPlayerInput;
1183
- }>>;
1184
- export declare const BlockUserDocument: DocumentNode<BlockUserMutation, Exact<{
1185
- data: BlockUserInput;
1186
- }>>;
1187
- export declare const ChangeAccountUsernameDocument: DocumentNode<ChangeAccountUsernameMutation, Exact<{
1188
- data: ChangeUsernameInput;
1189
- }>>;
1190
- export declare const DeleteChatMessageDocument: DocumentNode<DeleteChatMessageMutation, Exact<{
1191
- data: DeleteChatInput;
1192
- }>>;
1193
- export declare const GetAllChatMessageDocument: DocumentNode<GetAllChatMessageQuery, Exact<{
1194
- data: GetAllChatMessageInput;
1195
- }>>;
1196
- export declare const GetChatRoomTokenDocument: DocumentNode<GetChatRoomTokenQuery, Exact<{
1197
- data: GetChatRoomInput;
1198
- }>>;
1199
- export declare const PinChatMessageDocument: DocumentNode<PinChatMessageMutation, Exact<{
1200
- data: PinChatInput;
1201
- }>>;
1202
1207
  export declare const AddCollectionDocument: DocumentNode<AddCollectionMutation, Exact<{
1203
1208
  data: CreateCollectionInput;
1204
1209
  }>>;
@@ -1226,6 +1231,33 @@ export declare const FindMinimalEventDocument: DocumentNode<FindMinimalEventQuer
1226
1231
  export declare const SearchMinimalEventsDocument: DocumentNode<SearchMinimalEventsQuery, Exact<{
1227
1232
  data: SearchEventInput;
1228
1233
  }>>;
1234
+ export declare const BlockUserDocument: DocumentNode<BlockUserMutation, Exact<{
1235
+ data: BlockUserInput;
1236
+ }>>;
1237
+ export declare const ChangeAccountUsernameDocument: DocumentNode<ChangeAccountUsernameMutation, Exact<{
1238
+ data: ChangeUsernameInput;
1239
+ }>>;
1240
+ export declare const DeleteChatMessageDocument: DocumentNode<DeleteChatMessageMutation, Exact<{
1241
+ data: DeleteChatInput;
1242
+ }>>;
1243
+ export declare const GetAllChatMessageDocument: DocumentNode<GetAllChatMessageQuery, Exact<{
1244
+ data: GetAllChatMessageInput;
1245
+ }>>;
1246
+ export declare const GetChatRoomTokenDocument: DocumentNode<GetChatRoomTokenQuery, Exact<{
1247
+ data: GetChatRoomInput;
1248
+ }>>;
1249
+ export declare const PinChatMessageDocument: DocumentNode<PinChatMessageMutation, Exact<{
1250
+ data: PinChatInput;
1251
+ }>>;
1252
+ export declare const DeleteAllCustomizationDocument: DocumentNode<DeleteAllCustomizationMutation, Exact<{
1253
+ data: CustomPlayerInputAccount;
1254
+ }>>;
1255
+ export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizationQuery, Exact<{
1256
+ data: QueryInput;
1257
+ }>>;
1258
+ export declare const UpdateCustomizationDocument: DocumentNode<UpdateCustomizationMutation, Exact<{
1259
+ data: CustomPlayerInput;
1260
+ }>>;
1229
1261
  export declare const AppendProductsToSnackVideoDocument: DocumentNode<AppendProductsToSnackVideoMutation, Exact<{
1230
1262
  data: RelateToProductsSnackVideoInput;
1231
1263
  }>>;
@@ -1,6 +1,2 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /// <reference types="node" />
4
- /// <reference types="node" />
5
1
  export declare function downloadFile(filename: string, url: string, ext: string): void;
6
2
  export declare const jsDownload: (data: Blob, filename: string, mime?: string) => boolean | NodeJS.Timeout;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.4.3",
3
+ "version": "0.4.5-alpha.0",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
@@ -9,7 +9,5 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
- "scripts": {
13
- "clean": "rimraf dist/*"
14
- }
12
+ "scripts": {}
15
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.4.3",
3
+ "version": "0.4.5-alpha.0",
4
4
  "type": "module",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.cjs",
@@ -9,7 +9,5 @@
9
9
  "files": [
10
10
  "dist"
11
11
  ],
12
- "scripts": {
13
- "clean": "rimraf dist/*"
14
- }
12
+ "scripts": {}
15
13
  }