@nizza/core 0.3.0-alpha.1 → 0.3.0-alpha.10

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 (196) hide show
  1. package/README.md +3 -0
  2. package/dist/index.cjs +22 -0
  3. package/{src → dist}/index.d.ts +1 -0
  4. package/dist/index.mjs +2791 -0
  5. package/{src → dist}/lib/domain/index.d.ts +0 -1
  6. package/{src/lib/domain → dist/lib}/errors/app.d.ts +3 -0
  7. package/{src → dist}/lib/providers/StoreProvider.d.ts +2 -3
  8. package/{src → dist}/lib/stores/NizzaStore.d.ts +3 -0
  9. package/{src → dist}/lib/types/api-graphql-types.d.ts +257 -57
  10. package/dist/lib/types/app-module.d.ts +17 -0
  11. package/dist/lib/types/mobx-store.d.ts +3 -0
  12. package/dist/lib/types/products/product.d.ts +16 -0
  13. package/{src → dist}/lib/types/utils.d.ts +6 -5
  14. package/{src → dist}/lib/utils/Result.d.ts +1 -1
  15. package/{src → dist}/lib/utils/customStorage/utils.d.ts +1 -1
  16. package/dist/lib/utils/fingerprint.d.ts +1 -0
  17. package/{src → dist}/lib/utils/helpers.d.ts +1 -1
  18. package/{src → dist}/lib/utils/lazyLoad.d.ts +3 -3
  19. package/dist/package.json +21 -0
  20. package/dist/typings/libs.d.ts +0 -0
  21. package/package.json +10 -13
  22. package/src/environments/environment.d.js +0 -3
  23. package/src/environments/environment.d.js.map +0 -1
  24. package/src/environments/environment.js +0 -28
  25. package/src/environments/environment.js.map +0 -1
  26. package/src/environments/environment.prod.d.js +0 -3
  27. package/src/environments/environment.prod.d.js.map +0 -1
  28. package/src/environments/environment.prod.d.ts +0 -20
  29. package/src/environments/environment.prod.js +0 -27
  30. package/src/environments/environment.prod.js.map +0 -1
  31. package/src/environments/environment.staging.d.js +0 -3
  32. package/src/environments/environment.staging.d.js.map +0 -1
  33. package/src/environments/environment.staging.d.ts +0 -20
  34. package/src/environments/environment.staging.js +0 -27
  35. package/src/environments/environment.staging.js.map +0 -1
  36. package/src/index.d.js +0 -8
  37. package/src/index.d.js.map +0 -1
  38. package/src/index.js +0 -8
  39. package/src/index.js.map +0 -1
  40. package/src/lib/constants/index.d.js +0 -3
  41. package/src/lib/constants/index.d.js.map +0 -1
  42. package/src/lib/constants/index.js +0 -3
  43. package/src/lib/constants/index.js.map +0 -1
  44. package/src/lib/constants/products.d.js +0 -3
  45. package/src/lib/constants/products.d.js.map +0 -1
  46. package/src/lib/constants/products.js +0 -6
  47. package/src/lib/constants/products.js.map +0 -1
  48. package/src/lib/domain/AggregateRoot.d.js +0 -3
  49. package/src/lib/domain/AggregateRoot.d.js.map +0 -1
  50. package/src/lib/domain/AggregateRoot.js +0 -22
  51. package/src/lib/domain/AggregateRoot.js.map +0 -1
  52. package/src/lib/domain/BaseMobxStore.d.js +0 -3
  53. package/src/lib/domain/BaseMobxStore.d.js.map +0 -1
  54. package/src/lib/domain/BaseMobxStore.js +0 -4
  55. package/src/lib/domain/BaseMobxStore.js.map +0 -1
  56. package/src/lib/domain/ValueObject.d.js +0 -3
  57. package/src/lib/domain/ValueObject.d.js.map +0 -1
  58. package/src/lib/domain/ValueObject.js +0 -12
  59. package/src/lib/domain/ValueObject.js.map +0 -1
  60. package/src/lib/domain/errors/DomainError.d.js +0 -3
  61. package/src/lib/domain/errors/DomainError.d.js.map +0 -1
  62. package/src/lib/domain/errors/DomainError.js +0 -18
  63. package/src/lib/domain/errors/DomainError.js.map +0 -1
  64. package/src/lib/domain/errors/api.d.js +0 -3
  65. package/src/lib/domain/errors/api.d.js.map +0 -1
  66. package/src/lib/domain/errors/api.js +0 -8
  67. package/src/lib/domain/errors/api.js.map +0 -1
  68. package/src/lib/domain/errors/app.d.js +0 -3
  69. package/src/lib/domain/errors/app.d.js.map +0 -1
  70. package/src/lib/domain/errors/app.js +0 -14
  71. package/src/lib/domain/errors/app.js.map +0 -1
  72. package/src/lib/domain/errors/index.d.js +0 -5
  73. package/src/lib/domain/errors/index.d.js.map +0 -1
  74. package/src/lib/domain/errors/index.js +0 -5
  75. package/src/lib/domain/errors/index.js.map +0 -1
  76. package/src/lib/domain/index.d.js +0 -6
  77. package/src/lib/domain/index.d.js.map +0 -1
  78. package/src/lib/domain/index.js +0 -6
  79. package/src/lib/domain/index.js.map +0 -1
  80. package/src/lib/providers/StoreProvider.d.js +0 -3
  81. package/src/lib/providers/StoreProvider.d.js.map +0 -1
  82. package/src/lib/providers/StoreProvider.js +0 -36
  83. package/src/lib/providers/StoreProvider.js.map +0 -1
  84. package/src/lib/providers/index.d.js +0 -3
  85. package/src/lib/providers/index.d.js.map +0 -1
  86. package/src/lib/providers/index.js +0 -3
  87. package/src/lib/providers/index.js.map +0 -1
  88. package/src/lib/stores/NizzaStore.d.js +0 -3
  89. package/src/lib/stores/NizzaStore.d.js.map +0 -1
  90. package/src/lib/stores/NizzaStore.js +0 -18
  91. package/src/lib/stores/NizzaStore.js.map +0 -1
  92. package/src/lib/stores/index.d.js +0 -3
  93. package/src/lib/stores/index.d.js.map +0 -1
  94. package/src/lib/stores/index.js +0 -3
  95. package/src/lib/stores/index.js.map +0 -1
  96. package/src/lib/types/api-graphql-types.d.js +0 -3
  97. package/src/lib/types/api-graphql-types.d.js.map +0 -1
  98. package/src/lib/types/api-graphql-types.js +0 -2003
  99. package/src/lib/types/api-graphql-types.js.map +0 -1
  100. package/src/lib/types/app-module.d.js +0 -3
  101. package/src/lib/types/app-module.d.js.map +0 -1
  102. package/src/lib/types/app-module.d.ts +0 -10
  103. package/src/lib/types/app-module.js +0 -3
  104. package/src/lib/types/app-module.js.map +0 -1
  105. package/src/lib/types/index.d.js +0 -9
  106. package/src/lib/types/index.d.js.map +0 -1
  107. package/src/lib/types/index.js +0 -9
  108. package/src/lib/types/index.js.map +0 -1
  109. package/src/lib/types/mobx-store.d.js +0 -3
  110. package/src/lib/types/mobx-store.d.js.map +0 -1
  111. package/src/lib/types/mobx-store.d.ts +0 -3
  112. package/src/lib/types/mobx-store.js +0 -3
  113. package/src/lib/types/mobx-store.js.map +0 -1
  114. package/src/lib/types/nizzaGlobalObject.d.js +0 -3
  115. package/src/lib/types/nizzaGlobalObject.d.js.map +0 -1
  116. package/src/lib/types/nizzaGlobalObject.js +0 -3
  117. package/src/lib/types/nizzaGlobalObject.js.map +0 -1
  118. package/src/lib/types/products/base.d.js +0 -8
  119. package/src/lib/types/products/base.d.js.map +0 -1
  120. package/src/lib/types/products/base.js +0 -8
  121. package/src/lib/types/products/base.js.map +0 -1
  122. package/src/lib/types/products/index.d.js +0 -4
  123. package/src/lib/types/products/index.d.js.map +0 -1
  124. package/src/lib/types/products/index.js +0 -4
  125. package/src/lib/types/products/index.js.map +0 -1
  126. package/src/lib/types/products/product.d.js +0 -3
  127. package/src/lib/types/products/product.d.js.map +0 -1
  128. package/src/lib/types/products/product.d.ts +0 -16
  129. package/src/lib/types/products/product.js +0 -3
  130. package/src/lib/types/products/product.js.map +0 -1
  131. package/src/lib/types/utils.d.js +0 -3
  132. package/src/lib/types/utils.d.js.map +0 -1
  133. package/src/lib/types/utils.js +0 -4
  134. package/src/lib/types/utils.js.map +0 -1
  135. package/src/lib/utils/Result.d.js +0 -3
  136. package/src/lib/utils/Result.d.js.map +0 -1
  137. package/src/lib/utils/Result.js +0 -63
  138. package/src/lib/utils/Result.js.map +0 -1
  139. package/src/lib/utils/apiCall.d.js +0 -3
  140. package/src/lib/utils/apiCall.d.js.map +0 -1
  141. package/src/lib/utils/apiCall.js +0 -28
  142. package/src/lib/utils/apiCall.js.map +0 -1
  143. package/src/lib/utils/customStorage/MemoryStorage.d.js +0 -3
  144. package/src/lib/utils/customStorage/MemoryStorage.d.js.map +0 -1
  145. package/src/lib/utils/customStorage/MemoryStorage.js +0 -44
  146. package/src/lib/utils/customStorage/MemoryStorage.js.map +0 -1
  147. package/src/lib/utils/customStorage/index.d.js +0 -3
  148. package/src/lib/utils/customStorage/index.d.js.map +0 -1
  149. package/src/lib/utils/customStorage/index.js +0 -36
  150. package/src/lib/utils/customStorage/index.js.map +0 -1
  151. package/src/lib/utils/customStorage/utils.d.js +0 -3
  152. package/src/lib/utils/customStorage/utils.d.js.map +0 -1
  153. package/src/lib/utils/customStorage/utils.js +0 -24
  154. package/src/lib/utils/customStorage/utils.js.map +0 -1
  155. package/src/lib/utils/fingerprint.d.js +0 -3
  156. package/src/lib/utils/fingerprint.d.js.map +0 -1
  157. package/src/lib/utils/fingerprint.d.ts +0 -1
  158. package/src/lib/utils/fingerprint.js +0 -14
  159. package/src/lib/utils/fingerprint.js.map +0 -1
  160. package/src/lib/utils/helpers.d.js +0 -3
  161. package/src/lib/utils/helpers.d.js.map +0 -1
  162. package/src/lib/utils/helpers.js +0 -15
  163. package/src/lib/utils/helpers.js.map +0 -1
  164. package/src/lib/utils/index.d.js +0 -8
  165. package/src/lib/utils/index.d.js.map +0 -1
  166. package/src/lib/utils/index.js +0 -8
  167. package/src/lib/utils/index.js.map +0 -1
  168. package/src/lib/utils/lazyLoad.d.js +0 -3
  169. package/src/lib/utils/lazyLoad.d.js.map +0 -1
  170. package/src/lib/utils/lazyLoad.js +0 -17
  171. package/src/lib/utils/lazyLoad.js.map +0 -1
  172. package/src/typings/libs.d.js +0 -2
  173. package/src/typings/libs.d.js.map +0 -1
  174. package/vite-env.d.js +0 -3
  175. package/vite-env.d.js.map +0 -1
  176. package/vite.config.js +0 -10
  177. package/vite.config.js.map +0 -1
  178. /package/{src → dist}/environments/environment.d.ts +0 -0
  179. /package/{src → dist}/lib/constants/index.d.ts +0 -0
  180. /package/{src → dist}/lib/constants/products.d.ts +0 -0
  181. /package/{src → dist}/lib/domain/AggregateRoot.d.ts +0 -0
  182. /package/{src → dist}/lib/domain/BaseMobxStore.d.ts +0 -0
  183. /package/{src → dist}/lib/domain/ValueObject.d.ts +0 -0
  184. /package/{src/lib/domain → dist/lib}/errors/DomainError.d.ts +0 -0
  185. /package/{src/lib/domain → dist/lib}/errors/api.d.ts +0 -0
  186. /package/{src/lib/domain → dist/lib}/errors/index.d.ts +0 -0
  187. /package/{src → dist}/lib/providers/index.d.ts +0 -0
  188. /package/{src → dist}/lib/stores/index.d.ts +0 -0
  189. /package/{src → dist}/lib/types/index.d.ts +0 -0
  190. /package/{src → dist}/lib/types/nizzaGlobalObject.d.ts +0 -0
  191. /package/{src → dist}/lib/types/products/base.d.ts +0 -0
  192. /package/{src → dist}/lib/types/products/index.d.ts +0 -0
  193. /package/{src → dist}/lib/utils/apiCall.d.ts +0 -0
  194. /package/{src → dist}/lib/utils/customStorage/MemoryStorage.d.ts +0 -0
  195. /package/{src → dist}/lib/utils/customStorage/index.d.ts +0 -0
  196. /package/{src → dist}/lib/utils/index.d.ts +0 -0
@@ -1,4 +1,3 @@
1
1
  export * from './AggregateRoot';
2
2
  export * from './BaseMobxStore';
3
- export * from './errors';
4
3
  export * from './ValueObject';
@@ -5,3 +5,6 @@ export declare class UnexpectedError extends DomainError {
5
5
  export declare class AccountInvalidError extends DomainError {
6
6
  constructor();
7
7
  }
8
+ export declare class InvalidNizzaGlobalObjectError extends DomainError {
9
+ constructor(prop: string);
10
+ }
@@ -1,8 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { BaseStore, StoreClass, StoreFactory } from '../types';
2
+ import { AppModuleStoreList, StoreClass } from '../types';
3
3
  interface Props {
4
- instances?: BaseStore[];
5
- stores: (StoreClass | StoreFactory)[];
4
+ stores: AppModuleStoreList;
6
5
  children?: React.ReactNode;
7
6
  }
8
7
  export declare const StoreProvider: FC<Props>;
@@ -1,8 +1,11 @@
1
1
  import { NizzaConfiguration, NizzaGlobalObjet } from '../types';
2
2
  export declare class NizzaStore implements NizzaGlobalObjet {
3
+ private _id;
3
4
  private _config;
4
5
  constructor();
5
6
  configure(config: NizzaConfiguration): void;
7
+ createGlobalObject(): void;
6
8
  get config(): NizzaConfiguration;
9
+ private validateRequiredProps;
7
10
  }
8
11
  export declare const nizza: NizzaStore;
@@ -1,19 +1,19 @@
1
1
  import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
2
- export type Maybe<T> = T | null;
3
- export type InputMaybe<T> = Maybe<T>;
4
- export type Exact<T extends {
2
+ export declare type Maybe<T> = T | null;
3
+ export declare type InputMaybe<T> = Maybe<T>;
4
+ export declare type Exact<T extends {
5
5
  [key: string]: unknown;
6
6
  }> = {
7
7
  [K in keyof T]: T[K];
8
8
  };
9
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
10
  [SubKey in K]?: Maybe<T[SubKey]>;
11
11
  };
12
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ export declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
13
13
  [SubKey in K]: Maybe<T[SubKey]>;
14
14
  };
15
15
  /** All built-in and custom scalars, mapped to their actual values */
16
- export type Scalars = {
16
+ export declare type Scalars = {
17
17
  ID: string;
18
18
  String: string;
19
19
  Boolean: boolean;
@@ -22,7 +22,16 @@ export type Scalars = {
22
22
  DateTime: any;
23
23
  JSON: any;
24
24
  };
25
- export type Collection = {
25
+ export declare type ActionSnackVideoSuccess = {
26
+ __typename?: 'ActionSnackVideoSuccess';
27
+ message: Scalars['String'];
28
+ };
29
+ export declare type Clip = {
30
+ endTime: Scalars['String'];
31
+ name: Scalars['String'];
32
+ startTime: Scalars['String'];
33
+ };
34
+ export declare type Collection = {
26
35
  __typename?: 'Collection';
27
36
  account?: Maybe<Scalars['String']>;
28
37
  createdat?: Maybe<Scalars['DateTime']>;
@@ -36,9 +45,9 @@ export type Collection = {
36
45
  products?: Maybe<Array<Product>>;
37
46
  status?: Maybe<Scalars['String']>;
38
47
  };
39
- export type CollectionResult = CollectionSuccess | ErrorGeneral;
40
- export type CollectionResultArray = CollectionSuccessArray | ErrorGeneral;
41
- export type CollectionSuccess = {
48
+ export declare type CollectionResult = CollectionSuccess | ErrorGeneral;
49
+ export declare type CollectionResultArray = CollectionSuccessArray | ErrorGeneral;
50
+ export declare type CollectionSuccess = {
42
51
  __typename?: 'CollectionSuccess';
43
52
  data?: Maybe<Collection>;
44
53
  duration?: Maybe<Scalars['String']>;
@@ -46,7 +55,7 @@ export type CollectionSuccess = {
46
55
  method?: Maybe<Scalars['String']>;
47
56
  path?: Maybe<Scalars['String']>;
48
57
  };
49
- export type CollectionSuccessArray = {
58
+ export declare type CollectionSuccessArray = {
50
59
  __typename?: 'CollectionSuccessArray';
51
60
  data?: Maybe<Array<Collection>>;
52
61
  duration?: Maybe<Scalars['String']>;
@@ -54,13 +63,19 @@ export type CollectionSuccessArray = {
54
63
  method?: Maybe<Scalars['String']>;
55
64
  path?: Maybe<Scalars['String']>;
56
65
  };
57
- export type CreateCollectionInput = {
66
+ export declare type CreateCollectionInput = {
58
67
  account: Scalars['String'];
59
68
  description?: InputMaybe<Scalars['String']>;
60
69
  name: Scalars['String'];
61
70
  status?: InputMaybe<Status>;
62
71
  };
63
- export type CustomPlayer = {
72
+ export declare type CreateSnackVideoInput = {
73
+ account: Scalars['String'];
74
+ clips: Array<Clip>;
75
+ idEvent: Scalars['String'];
76
+ };
77
+ export declare type CreateSnackVideoResult = ErrorGeneral | SnackVideoArray;
78
+ export declare type CustomPlayer = {
64
79
  __typename?: 'CustomPlayer';
65
80
  account: Scalars['String'];
66
81
  component: Scalars['String'];
@@ -72,18 +87,18 @@ export type CustomPlayer = {
72
87
  path?: Maybe<Scalars['String']>;
73
88
  section: Scalars['String'];
74
89
  };
75
- export type CustomPlayerInput = {
90
+ export declare type CustomPlayerInput = {
76
91
  account: Scalars['String'];
77
92
  data: Scalars['JSON'];
78
93
  id: Scalars['String'];
79
94
  section: Scalars['String'];
80
95
  };
81
- export type CustomPlayerInputAccount = {
96
+ export declare type CustomPlayerInputAccount = {
82
97
  account: Scalars['String'];
83
98
  };
84
- export type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
85
- export type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
86
- export type CustomPlayerSuccess = {
99
+ export declare type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
100
+ export declare type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
101
+ export declare type CustomPlayerSuccess = {
87
102
  __typename?: 'CustomPlayerSuccess';
88
103
  data?: Maybe<CustomPlayer>;
89
104
  duration?: Maybe<Scalars['String']>;
@@ -91,7 +106,7 @@ export type CustomPlayerSuccess = {
91
106
  method?: Maybe<Scalars['String']>;
92
107
  path?: Maybe<Scalars['String']>;
93
108
  };
94
- export type CustomPlayerSuccessArray = {
109
+ export declare type CustomPlayerSuccessArray = {
95
110
  __typename?: 'CustomPlayerSuccessArray';
96
111
  data?: Maybe<Array<CustomPlayer>>;
97
112
  duration?: Maybe<Scalars['String']>;
@@ -99,18 +114,23 @@ export type CustomPlayerSuccessArray = {
99
114
  method?: Maybe<Scalars['String']>;
100
115
  path?: Maybe<Scalars['String']>;
101
116
  };
102
- export type Error = {
117
+ export declare type Error = {
103
118
  message: Scalars['String'];
104
119
  statusCode: Scalars['String'];
105
120
  timestamp: Scalars['String'];
106
121
  };
107
- export type ErrorGeneral = Error & {
122
+ export declare type ErrorGeneral = Error & {
108
123
  __typename?: 'ErrorGeneral';
109
124
  message: Scalars['String'];
110
125
  statusCode: Scalars['String'];
111
126
  timestamp: Scalars['String'];
112
127
  };
113
- export type ManageCollectionProductInInput = {
128
+ export declare type FindManySnackVideoInput = {
129
+ account: Scalars['String'];
130
+ ids: Array<Scalars['String']>;
131
+ };
132
+ export declare type FindManySnackVideoResult = ErrorGeneral | SnackVideoArray;
133
+ export declare type ManageCollectionProductInInput = {
114
134
  account: Scalars['String'];
115
135
  id: Scalars['String'];
116
136
  method: Methods;
@@ -120,34 +140,50 @@ export declare enum Methods {
120
140
  Add = "add",
121
141
  Remove = "remove"
122
142
  }
123
- export type Mutation = {
143
+ export declare type Mutation = {
124
144
  __typename?: 'Mutation';
145
+ appendProductsSnackVideo: RelateEntitySnackVideo;
125
146
  createCollection: CollectionResult;
147
+ createSnackVideos: CreateSnackVideoResult;
126
148
  deleteAllCustomPlayer: CustomPlayerResult;
127
149
  deleteCollection: CollectionResult;
150
+ deleteRelationshipSnackVideo: RelateEntitySnackVideo;
128
151
  manageCollectionProduct: CollectionResult;
129
152
  updateCollection: CollectionResult;
130
153
  updateCustomPlayer: CustomPlayerResult;
154
+ updateProgressSnackVideo: UpdateProgressSnackVideosResult;
131
155
  };
132
- export type MutationCreateCollectionArgs = {
156
+ export declare type MutationAppendProductsSnackVideoArgs = {
157
+ data: RelateToProductsSnackVideoInput;
158
+ };
159
+ export declare type MutationCreateCollectionArgs = {
133
160
  data: CreateCollectionInput;
134
161
  };
135
- export type MutationDeleteAllCustomPlayerArgs = {
162
+ export declare type MutationCreateSnackVideosArgs = {
163
+ data: CreateSnackVideoInput;
164
+ };
165
+ export declare type MutationDeleteAllCustomPlayerArgs = {
136
166
  data: CustomPlayerInputAccount;
137
167
  };
138
- export type MutationDeleteCollectionArgs = {
168
+ export declare type MutationDeleteCollectionArgs = {
139
169
  data: QueryInput;
140
170
  };
141
- export type MutationManageCollectionProductArgs = {
171
+ export declare type MutationDeleteRelationshipSnackVideoArgs = {
172
+ data: SnackVideoRelationshipKeys;
173
+ };
174
+ export declare type MutationManageCollectionProductArgs = {
142
175
  data: ManageCollectionProductInInput;
143
176
  };
144
- export type MutationUpdateCollectionArgs = {
177
+ export declare type MutationUpdateCollectionArgs = {
145
178
  data: UpdateCollectionInput;
146
179
  };
147
- export type MutationUpdateCustomPlayerArgs = {
180
+ export declare type MutationUpdateCustomPlayerArgs = {
148
181
  data: CustomPlayerInput;
149
182
  };
150
- export type Product = {
183
+ export declare type MutationUpdateProgressSnackVideoArgs = {
184
+ data: UpdateProgressSnackVideosInput;
185
+ };
186
+ export declare type Product = {
151
187
  __typename?: 'Product';
152
188
  account: Scalars['String'];
153
189
  createdat?: Maybe<Scalars['String']>;
@@ -159,47 +195,177 @@ export type Product = {
159
195
  status?: Maybe<Status>;
160
196
  title: Scalars['String'];
161
197
  };
162
- export type Query = {
198
+ export declare type Query = {
163
199
  __typename?: 'Query';
164
200
  findCollection: CollectionResult;
201
+ findManySnackVideos: FindManySnackVideoResult;
165
202
  getAllCollection: CollectionResultArray;
166
203
  getAllCustomPlayer: CustomPlayerResultArray;
204
+ getAllSnackVideos: SnackVideoGetAll;
205
+ getRelationshipSnackVideos: RelationshipSnackVideoArrayResponse;
167
206
  searchCollection: CollectionResultArray;
207
+ searchSnackVideos: SnackVideoGetAll;
208
+ };
209
+ export declare type QueryFindCollectionArgs = {
210
+ data: QueryInput;
211
+ };
212
+ export declare type QueryFindManySnackVideosArgs = {
213
+ data: FindManySnackVideoInput;
168
214
  };
169
- export type QueryFindCollectionArgs = {
215
+ export declare type QueryGetAllCollectionArgs = {
170
216
  data: QueryInput;
171
217
  };
172
- export type QueryGetAllCollectionArgs = {
218
+ export declare type QueryGetAllCustomPlayerArgs = {
173
219
  data: QueryInput;
174
220
  };
175
- export type QueryGetAllCustomPlayerArgs = {
221
+ export declare type QueryGetAllSnackVideosArgs = {
176
222
  data: QueryInput;
177
223
  };
178
- export type QuerySearchCollectionArgs = {
224
+ export declare type QueryGetRelationshipSnackVideosArgs = {
225
+ data: SnackVideoRelationshipInput;
226
+ };
227
+ export declare type QuerySearchCollectionArgs = {
179
228
  data: QueryInput;
180
229
  };
181
- export type QueryInput = {
230
+ export declare type QuerySearchSnackVideosArgs = {
231
+ data: SearchInput;
232
+ };
233
+ export declare type QueryInput = {
182
234
  account: Scalars['String'];
235
+ cursor?: InputMaybe<Scalars['JSON']>;
183
236
  id?: InputMaybe<Scalars['String']>;
184
237
  limit?: InputMaybe<Scalars['Float']>;
185
238
  page?: InputMaybe<Scalars['Float']>;
186
239
  search?: InputMaybe<Scalars['String']>;
187
240
  };
241
+ export declare type RelateEntitySnackVideo = ActionSnackVideoSuccess | ErrorGeneral;
242
+ export declare type RelateToProductsSnackVideoInput = {
243
+ account: Scalars['String'];
244
+ name: Scalars['String'];
245
+ productsId: Array<Scalars['String']>;
246
+ shortId: Scalars['String'];
247
+ url: Scalars['String'];
248
+ };
249
+ export declare type RelationshipSnackVideo = {
250
+ __typename?: 'RelationshipSnackVideo';
251
+ attributeId: Scalars['String'];
252
+ created: Scalars['String'];
253
+ entity: Scalars['String'];
254
+ modified: Scalars['String'];
255
+ name: Scalars['String'];
256
+ shortId: Scalars['String'];
257
+ sourceEntity: Scalars['String'];
258
+ url: Scalars['String'];
259
+ };
260
+ export declare type RelationshipSnackVideoArray = {
261
+ __typename?: 'RelationshipSnackVideoArray';
262
+ data?: Maybe<Array<RelationshipSnackVideo>>;
263
+ duration?: Maybe<Scalars['String']>;
264
+ isArray?: Maybe<Scalars['Boolean']>;
265
+ method?: Maybe<Scalars['String']>;
266
+ path?: Maybe<Scalars['String']>;
267
+ };
268
+ export declare type RelationshipSnackVideoArrayResponse = ErrorGeneral | RelationshipSnackVideoArray;
269
+ export declare type SearchInput = {
270
+ account: Scalars['String'];
271
+ cursor?: InputMaybe<Scalars['JSON']>;
272
+ id?: InputMaybe<Scalars['String']>;
273
+ limit?: InputMaybe<Scalars['Float']>;
274
+ page?: InputMaybe<Scalars['Float']>;
275
+ search: Scalars['String'];
276
+ };
277
+ export declare type SnackVideo = {
278
+ __typename?: 'SnackVideo';
279
+ duration: Scalars['Float'];
280
+ eventId: Scalars['String'];
281
+ eventName: Scalars['String'];
282
+ id: Scalars['String'];
283
+ name: Scalars['String'];
284
+ thumbnailUrl: Scalars['String'];
285
+ uploadProgress: Scalars['Float'];
286
+ url: Scalars['String'];
287
+ };
288
+ export declare type SnackVideoArray = {
289
+ __typename?: 'SnackVideoArray';
290
+ data?: Maybe<Array<SnackVideo>>;
291
+ duration?: Maybe<Scalars['String']>;
292
+ isArray?: Maybe<Scalars['Boolean']>;
293
+ method?: Maybe<Scalars['String']>;
294
+ path?: Maybe<Scalars['String']>;
295
+ };
296
+ export declare type SnackVideoCreatedArray = {
297
+ __typename?: 'SnackVideoCreatedArray';
298
+ data?: Maybe<SnackVideoCreatedWithCursor>;
299
+ duration?: Maybe<Scalars['String']>;
300
+ isArray?: Maybe<Scalars['Boolean']>;
301
+ method?: Maybe<Scalars['String']>;
302
+ path?: Maybe<Scalars['String']>;
303
+ };
304
+ export declare type SnackVideoCreatedWithCursor = {
305
+ __typename?: 'SnackVideoCreatedWithCursor';
306
+ cursor?: Maybe<Scalars['JSON']>;
307
+ snackVideos?: Maybe<Array<SnackVideosCreated>>;
308
+ };
309
+ export declare type SnackVideoGetAll = ErrorGeneral | SnackVideoCreatedArray;
310
+ export declare type SnackVideoRelationshipInput = {
311
+ account: Scalars['String'];
312
+ shortId: Scalars['String'];
313
+ };
314
+ export declare type SnackVideoRelationshipKeys = {
315
+ account: Scalars['String'];
316
+ attributeId: Scalars['String'];
317
+ shortId: Scalars['String'];
318
+ sourceEntity: Scalars['String'];
319
+ };
320
+ export declare type SnackVideosCreated = {
321
+ __typename?: 'SnackVideosCreated';
322
+ created: Scalars['String'];
323
+ duration: Scalars['Float'];
324
+ entity: Scalars['String'];
325
+ eventId: Scalars['String'];
326
+ eventName: Scalars['String'];
327
+ id: Scalars['String'];
328
+ modified: Scalars['String'];
329
+ name: Scalars['String'];
330
+ thumbnailUrl: Scalars['String'];
331
+ uploadProgress: Scalars['Float'];
332
+ url: Scalars['String'];
333
+ };
188
334
  export declare enum Status {
189
335
  Active = "active",
190
336
  Inactive = "inactive"
191
337
  }
192
- export type UpdateCollectionInput = {
338
+ export declare type UpdateCollectionInput = {
193
339
  account: Scalars['String'];
194
340
  description?: InputMaybe<Scalars['String']>;
195
341
  id: Scalars['String'];
196
342
  name?: InputMaybe<Scalars['String']>;
197
343
  status?: InputMaybe<Status>;
198
344
  };
199
- export type DeleteAllCustomizationMutationVariables = Exact<{
345
+ export declare type UpdateProgressSnackVideos = {
346
+ __typename?: 'UpdateProgressSnackVideos';
347
+ account: Scalars['String'];
348
+ id: Scalars['String'];
349
+ progress: Scalars['Float'];
350
+ };
351
+ export declare type UpdateProgressSnackVideosData = {
352
+ __typename?: 'UpdateProgressSnackVideosData';
353
+ data?: Maybe<UpdateProgressSnackVideos>;
354
+ duration?: Maybe<Scalars['String']>;
355
+ isArray?: Maybe<Scalars['Boolean']>;
356
+ method?: Maybe<Scalars['String']>;
357
+ path?: Maybe<Scalars['String']>;
358
+ };
359
+ export declare type UpdateProgressSnackVideosInput = {
360
+ account: Scalars['String'];
361
+ id: Scalars['String'];
362
+ progress: Scalars['Float'];
363
+ };
364
+ export declare type UpdateProgressSnackVideosResult = ErrorGeneral | UpdateProgressSnackVideosData;
365
+ export declare type DeleteAllCustomizationMutationVariables = Exact<{
200
366
  data: CustomPlayerInputAccount;
201
367
  }>;
202
- export type DeleteAllCustomizationMutation = {
368
+ export declare type DeleteAllCustomizationMutation = {
203
369
  __typename?: 'Mutation';
204
370
  deleteAllCustomPlayer: {
205
371
  __typename: 'CustomPlayerSuccess';
@@ -210,10 +376,10 @@ export type DeleteAllCustomizationMutation = {
210
376
  timestamp: string;
211
377
  };
212
378
  };
213
- export type GetAllCustomizationQueryVariables = Exact<{
379
+ export declare type GetAllCustomizationQueryVariables = Exact<{
214
380
  data: QueryInput;
215
381
  }>;
216
- export type GetAllCustomizationQuery = {
382
+ export declare type GetAllCustomizationQuery = {
217
383
  __typename?: 'Query';
218
384
  getAllCustomPlayer: {
219
385
  __typename: 'CustomPlayerSuccessArray';
@@ -231,10 +397,10 @@ export type GetAllCustomizationQuery = {
231
397
  timestamp: string;
232
398
  };
233
399
  };
234
- export type UpdateCustomizationMutationVariables = Exact<{
400
+ export declare type UpdateCustomizationMutationVariables = Exact<{
235
401
  data: CustomPlayerInput;
236
402
  }>;
237
- export type UpdateCustomizationMutation = {
403
+ export declare type UpdateCustomizationMutation = {
238
404
  __typename?: 'Mutation';
239
405
  updateCustomPlayer: {
240
406
  __typename: 'CustomPlayerSuccess';
@@ -245,10 +411,10 @@ export type UpdateCustomizationMutation = {
245
411
  timestamp: string;
246
412
  };
247
413
  };
248
- export type AddCollectionMutationVariables = Exact<{
414
+ export declare type AddCollectionMutationVariables = Exact<{
249
415
  data: CreateCollectionInput;
250
416
  }>;
251
- export type AddCollectionMutation = {
417
+ export declare type AddCollectionMutation = {
252
418
  __typename?: 'Mutation';
253
419
  createCollection: {
254
420
  __typename: 'CollectionSuccess';
@@ -263,10 +429,10 @@ export type AddCollectionMutation = {
263
429
  timestamp: string;
264
430
  };
265
431
  };
266
- export type DeleteCollectionMutationVariables = Exact<{
432
+ export declare type DeleteCollectionMutationVariables = Exact<{
267
433
  data: QueryInput;
268
434
  }>;
269
- export type DeleteCollectionMutation = {
435
+ export declare type DeleteCollectionMutation = {
270
436
  __typename?: 'Mutation';
271
437
  deleteCollection: {
272
438
  __typename: 'CollectionSuccess';
@@ -277,10 +443,10 @@ export type DeleteCollectionMutation = {
277
443
  timestamp: string;
278
444
  };
279
445
  };
280
- export type FindCollectionQueryVariables = Exact<{
446
+ export declare type FindCollectionQueryVariables = Exact<{
281
447
  data: QueryInput;
282
448
  }>;
283
- export type FindCollectionQuery = {
449
+ export declare type FindCollectionQuery = {
284
450
  __typename?: 'Query';
285
451
  findCollection: {
286
452
  __typename: 'CollectionSuccess';
@@ -312,10 +478,10 @@ export type FindCollectionQuery = {
312
478
  timestamp: string;
313
479
  };
314
480
  };
315
- export type GetAllCollectionsQueryVariables = Exact<{
481
+ export declare type GetAllCollectionsQueryVariables = Exact<{
316
482
  data: QueryInput;
317
483
  }>;
318
- export type GetAllCollectionsQuery = {
484
+ export declare type GetAllCollectionsQuery = {
319
485
  __typename?: 'Query';
320
486
  getAllCollection: {
321
487
  __typename: 'CollectionSuccessArray';
@@ -347,10 +513,10 @@ export type GetAllCollectionsQuery = {
347
513
  timestamp: string;
348
514
  };
349
515
  };
350
- export type ManageCollectionProductMutationVariables = Exact<{
516
+ export declare type ManageCollectionProductMutationVariables = Exact<{
351
517
  data: ManageCollectionProductInInput;
352
518
  }>;
353
- export type ManageCollectionProductMutation = {
519
+ export declare type ManageCollectionProductMutation = {
354
520
  __typename?: 'Mutation';
355
521
  manageCollectionProduct: {
356
522
  __typename: 'CollectionSuccess';
@@ -361,10 +527,10 @@ export type ManageCollectionProductMutation = {
361
527
  timestamp: string;
362
528
  };
363
529
  };
364
- export type SearchCollectionsQueryVariables = Exact<{
530
+ export declare type SearchCollectionsQueryVariables = Exact<{
365
531
  data: QueryInput;
366
532
  }>;
367
- export type SearchCollectionsQuery = {
533
+ export declare type SearchCollectionsQuery = {
368
534
  __typename?: 'Query';
369
535
  searchCollection: {
370
536
  __typename: 'CollectionSuccessArray';
@@ -396,10 +562,10 @@ export type SearchCollectionsQuery = {
396
562
  timestamp: string;
397
563
  };
398
564
  };
399
- export type UpdateCollectionMutationVariables = Exact<{
565
+ export declare type UpdateCollectionMutationVariables = Exact<{
400
566
  data: UpdateCollectionInput;
401
567
  }>;
402
- export type UpdateCollectionMutation = {
568
+ export declare type UpdateCollectionMutation = {
403
569
  __typename?: 'Mutation';
404
570
  updateCollection: {
405
571
  __typename: 'CollectionSuccess';
@@ -410,6 +576,37 @@ export type UpdateCollectionMutation = {
410
576
  timestamp: string;
411
577
  };
412
578
  };
579
+ export declare type GetAllSnackVideosQueryVariables = Exact<{
580
+ data: QueryInput;
581
+ }>;
582
+ export declare type GetAllSnackVideosQuery = {
583
+ __typename?: 'Query';
584
+ getAllSnackVideos: {
585
+ __typename: 'ErrorGeneral';
586
+ message: string;
587
+ statusCode: string;
588
+ timestamp: string;
589
+ } | {
590
+ __typename: 'SnackVideoCreatedArray';
591
+ data?: {
592
+ __typename?: 'SnackVideoCreatedWithCursor';
593
+ cursor?: any | null;
594
+ snackVideos?: Array<{
595
+ __typename?: 'SnackVideosCreated';
596
+ id: string;
597
+ name: string;
598
+ url: string;
599
+ thumbnailUrl: string;
600
+ uploadProgress: number;
601
+ duration: number;
602
+ eventId: string;
603
+ eventName: string;
604
+ created: string;
605
+ modified: string;
606
+ }> | null;
607
+ } | null;
608
+ };
609
+ };
413
610
  export declare const DeleteAllCustomizationDocument: DocumentNode<DeleteAllCustomizationMutation, Exact<{
414
611
  data: CustomPlayerInputAccount;
415
612
  }>>;
@@ -440,3 +637,6 @@ export declare const SearchCollectionsDocument: DocumentNode<SearchCollectionsQu
440
637
  export declare const UpdateCollectionDocument: DocumentNode<UpdateCollectionMutation, Exact<{
441
638
  data: UpdateCollectionInput;
442
639
  }>>;
640
+ export declare const GetAllSnackVideosDocument: DocumentNode<GetAllSnackVideosQuery, Exact<{
641
+ data: QueryInput;
642
+ }>>;
@@ -0,0 +1,17 @@
1
+ import { RouteProps } from 'react-router-dom';
2
+ import { StoreClass } from './mobx-store';
3
+ declare type Store<T extends {
4
+ new (): InstanceType<T>;
5
+ }> = Readonly<{
6
+ readonly class: T;
7
+ readonly value: InstanceType<T>;
8
+ }>;
9
+ export declare type AppModuleStoreList = Store<any>[];
10
+ export interface AppModule {
11
+ key: string;
12
+ label: string;
13
+ route?: RouteProps;
14
+ stores?: AppModuleStoreList;
15
+ }
16
+ export declare function createStore<T extends StoreClass>(store: T): Store<T>;
17
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Constructor } from './utils';
2
+ export declare type StoreClass<T = any> = Constructor<T>;
3
+ export declare type StoreFactory<T = any> = (...args: any[]) => T;
@@ -0,0 +1,16 @@
1
+ import { NizzaProduct } from './base';
2
+ export declare type NizzaGetProductHandler = (input: NizzaGetProductHandlerInput) => Promise<NizzaProduct>;
3
+ export declare type NizzaGetProductListHandler = (input: NizzaGetProductListHandlerInput) => Promise<NizzaProduct[]>;
4
+ declare type NizzaGetProductHandlerInput = {
5
+ productId: string;
6
+ };
7
+ declare type NizzaGetProductListHandlerInput = {
8
+ search?: string;
9
+ page?: number;
10
+ limit?: number;
11
+ };
12
+ export interface NizzaProductRepository {
13
+ getProduct: NizzaGetProductHandler;
14
+ getProductList: NizzaGetProductListHandler;
15
+ }
16
+ export {};
@@ -1,7 +1,5 @@
1
1
  import environment from '../../environments/environment';
2
- export type Constructor<T = any> = new (...args: any[]) => T;
3
- export declare abstract class BaseStore {
4
- }
2
+ export declare type Constructor<T = any> = new (...args: any[]) => T;
5
3
  export interface ApiV1Response<T = any> {
6
4
  success: boolean;
7
5
  message: string;
@@ -14,9 +12,12 @@ export interface ApiV2Response<T = any> {
14
12
  duration: string;
15
13
  method: 'GET' | 'POST' | 'PUT' | 'DELETE';
16
14
  }
17
- export type Primitive = string | boolean | number;
15
+ export declare type Primitive = string | boolean | number;
18
16
  export interface ApiCall extends RequestInit {
19
17
  url: RequestInfo;
20
18
  raw?: boolean;
21
19
  }
22
- export type Environment<T> = typeof environment & T;
20
+ export declare type Environment<T> = typeof environment & T;
21
+ export declare type RequiredKeys<T> = {
22
+ [K in keyof T]-?: {} extends Pick<T, K> ? never : K;
23
+ }[keyof T];
@@ -9,7 +9,7 @@ export declare class Result<V, E = string> {
9
9
  static fail<F = string>(error: F): Result<never, F>;
10
10
  static combine(results: Result<any, any>[]): Result<any, any>;
11
11
  }
12
- export type Either<L, A> = Err<L, A> | Ok<L, A>;
12
+ export declare type Either<L, A> = Err<L, A> | Ok<L, A>;
13
13
  export declare class Err<L, A> {
14
14
  readonly value: L;
15
15
  constructor(value: L);
@@ -1,4 +1,4 @@
1
- type StorageType = 'localStorage' | 'sessionStorage';
1
+ declare type StorageType = 'localStorage' | 'sessionStorage';
2
2
  export declare function isStorageAvailable(type: StorageType): boolean;
3
3
  export declare function setProperty(obj: unknown, name: string, value: unknown): void;
4
4
  export {};
@@ -0,0 +1 @@
1
+ export declare const getFingerprint: () => string;
@@ -1,3 +1,3 @@
1
1
  import { Primitive } from '../types';
2
- export declare function shortId(length?: number): string;
2
+ export declare const shortId: (length?: number) => string;
3
3
  export declare const searchParams: (params: Record<string, Primitive>) => string;