@nizza/core 0.1.2-beta.1 → 0.2.0-beta.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.
@@ -1,19 +1,19 @@
1
1
  import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';
2
- export declare type Maybe<T> = T | null;
3
- export declare type InputMaybe<T> = Maybe<T>;
4
- export declare type Exact<T extends {
2
+ export type Maybe<T> = T | null;
3
+ export type InputMaybe<T> = Maybe<T>;
4
+ export type Exact<T extends {
5
5
  [key: string]: unknown;
6
6
  }> = {
7
7
  [K in keyof T]: T[K];
8
8
  };
9
- export declare type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
+ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
10
10
  [SubKey in K]?: Maybe<T[SubKey]>;
11
11
  };
12
- export declare type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
+ export 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 declare type Scalars = {
16
+ export type Scalars = {
17
17
  ID: string;
18
18
  String: string;
19
19
  Boolean: boolean;
@@ -22,7 +22,7 @@ export declare type Scalars = {
22
22
  DateTime: any;
23
23
  JSON: any;
24
24
  };
25
- export declare type Collection = {
25
+ export type Collection = {
26
26
  __typename?: 'Collection';
27
27
  account?: Maybe<Scalars['String']>;
28
28
  createdat?: Maybe<Scalars['DateTime']>;
@@ -36,9 +36,9 @@ export declare type Collection = {
36
36
  products?: Maybe<Array<Product>>;
37
37
  status?: Maybe<Scalars['String']>;
38
38
  };
39
- export declare type CollectionResult = CollectionSuccess | ErrorGeneral;
40
- export declare type CollectionResultArray = CollectionSuccessArray | ErrorGeneral;
41
- export declare type CollectionSuccess = {
39
+ export type CollectionResult = CollectionSuccess | ErrorGeneral;
40
+ export type CollectionResultArray = CollectionSuccessArray | ErrorGeneral;
41
+ export type CollectionSuccess = {
42
42
  __typename?: 'CollectionSuccess';
43
43
  data?: Maybe<Collection>;
44
44
  duration?: Maybe<Scalars['String']>;
@@ -46,7 +46,7 @@ export declare type CollectionSuccess = {
46
46
  method?: Maybe<Scalars['String']>;
47
47
  path?: Maybe<Scalars['String']>;
48
48
  };
49
- export declare type CollectionSuccessArray = {
49
+ export type CollectionSuccessArray = {
50
50
  __typename?: 'CollectionSuccessArray';
51
51
  data?: Maybe<Array<Collection>>;
52
52
  duration?: Maybe<Scalars['String']>;
@@ -54,13 +54,13 @@ export declare type CollectionSuccessArray = {
54
54
  method?: Maybe<Scalars['String']>;
55
55
  path?: Maybe<Scalars['String']>;
56
56
  };
57
- export declare type CreateCollectionInput = {
57
+ export type CreateCollectionInput = {
58
58
  account: Scalars['String'];
59
59
  description?: InputMaybe<Scalars['String']>;
60
60
  name: Scalars['String'];
61
61
  status?: InputMaybe<Status>;
62
62
  };
63
- export declare type CustomPlayer = {
63
+ export type CustomPlayer = {
64
64
  __typename?: 'CustomPlayer';
65
65
  account: Scalars['String'];
66
66
  component: Scalars['String'];
@@ -72,15 +72,18 @@ export declare type CustomPlayer = {
72
72
  path?: Maybe<Scalars['String']>;
73
73
  section: Scalars['String'];
74
74
  };
75
- export declare type CustomPlayerInput = {
75
+ export type CustomPlayerInput = {
76
76
  account: Scalars['String'];
77
77
  data: Scalars['JSON'];
78
78
  id: Scalars['String'];
79
79
  section: Scalars['String'];
80
80
  };
81
- export declare type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
82
- export declare type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
83
- export declare type CustomPlayerSuccess = {
81
+ export type CustomPlayerInputAccount = {
82
+ account: Scalars['String'];
83
+ };
84
+ export type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
85
+ export type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
86
+ export type CustomPlayerSuccess = {
84
87
  __typename?: 'CustomPlayerSuccess';
85
88
  data?: Maybe<CustomPlayer>;
86
89
  duration?: Maybe<Scalars['String']>;
@@ -88,7 +91,7 @@ export declare type CustomPlayerSuccess = {
88
91
  method?: Maybe<Scalars['String']>;
89
92
  path?: Maybe<Scalars['String']>;
90
93
  };
91
- export declare type CustomPlayerSuccessArray = {
94
+ export type CustomPlayerSuccessArray = {
92
95
  __typename?: 'CustomPlayerSuccessArray';
93
96
  data?: Maybe<Array<CustomPlayer>>;
94
97
  duration?: Maybe<Scalars['String']>;
@@ -96,18 +99,18 @@ export declare type CustomPlayerSuccessArray = {
96
99
  method?: Maybe<Scalars['String']>;
97
100
  path?: Maybe<Scalars['String']>;
98
101
  };
99
- export declare type Error = {
102
+ export type Error = {
100
103
  message: Scalars['String'];
101
104
  statusCode: Scalars['String'];
102
105
  timestamp: Scalars['String'];
103
106
  };
104
- export declare type ErrorGeneral = Error & {
107
+ export type ErrorGeneral = Error & {
105
108
  __typename?: 'ErrorGeneral';
106
109
  message: Scalars['String'];
107
110
  statusCode: Scalars['String'];
108
111
  timestamp: Scalars['String'];
109
112
  };
110
- export declare type ManageCollectionProductInInput = {
113
+ export type ManageCollectionProductInInput = {
111
114
  account: Scalars['String'];
112
115
  id: Scalars['String'];
113
116
  method: Methods;
@@ -117,30 +120,34 @@ export declare enum Methods {
117
120
  Add = "add",
118
121
  Remove = "remove"
119
122
  }
120
- export declare type Mutation = {
123
+ export type Mutation = {
121
124
  __typename?: 'Mutation';
122
125
  createCollection: CollectionResult;
126
+ deleteAllCustomPlayer: CustomPlayerResult;
123
127
  deleteCollection: CollectionResult;
124
128
  manageCollectionProduct: CollectionResult;
125
129
  updateCollection: CollectionResult;
126
130
  updateCustomPlayer: CustomPlayerResult;
127
131
  };
128
- export declare type MutationCreateCollectionArgs = {
132
+ export type MutationCreateCollectionArgs = {
129
133
  data: CreateCollectionInput;
130
134
  };
131
- export declare type MutationDeleteCollectionArgs = {
135
+ export type MutationDeleteAllCustomPlayerArgs = {
136
+ data: CustomPlayerInputAccount;
137
+ };
138
+ export type MutationDeleteCollectionArgs = {
132
139
  data: QueryInput;
133
140
  };
134
- export declare type MutationManageCollectionProductArgs = {
141
+ export type MutationManageCollectionProductArgs = {
135
142
  data: ManageCollectionProductInInput;
136
143
  };
137
- export declare type MutationUpdateCollectionArgs = {
144
+ export type MutationUpdateCollectionArgs = {
138
145
  data: UpdateCollectionInput;
139
146
  };
140
- export declare type MutationUpdateCustomPlayerArgs = {
147
+ export type MutationUpdateCustomPlayerArgs = {
141
148
  data: CustomPlayerInput;
142
149
  };
143
- export declare type Product = {
150
+ export type Product = {
144
151
  __typename?: 'Product';
145
152
  account: Scalars['String'];
146
153
  createdat?: Maybe<Scalars['String']>;
@@ -152,26 +159,26 @@ export declare type Product = {
152
159
  status?: Maybe<Status>;
153
160
  title: Scalars['String'];
154
161
  };
155
- export declare type Query = {
162
+ export type Query = {
156
163
  __typename?: 'Query';
157
164
  findCollection: CollectionResult;
158
165
  getAllCollection: CollectionResultArray;
159
166
  getAllCustomPlayer: CustomPlayerResultArray;
160
167
  searchCollection: CollectionResultArray;
161
168
  };
162
- export declare type QueryFindCollectionArgs = {
169
+ export type QueryFindCollectionArgs = {
163
170
  data: QueryInput;
164
171
  };
165
- export declare type QueryGetAllCollectionArgs = {
172
+ export type QueryGetAllCollectionArgs = {
166
173
  data: QueryInput;
167
174
  };
168
- export declare type QueryGetAllCustomPlayerArgs = {
175
+ export type QueryGetAllCustomPlayerArgs = {
169
176
  data: QueryInput;
170
177
  };
171
- export declare type QuerySearchCollectionArgs = {
178
+ export type QuerySearchCollectionArgs = {
172
179
  data: QueryInput;
173
180
  };
174
- export declare type QueryInput = {
181
+ export type QueryInput = {
175
182
  account: Scalars['String'];
176
183
  id?: InputMaybe<Scalars['String']>;
177
184
  limit?: InputMaybe<Scalars['Float']>;
@@ -182,17 +189,31 @@ export declare enum Status {
182
189
  Active = "active",
183
190
  Inactive = "inactive"
184
191
  }
185
- export declare type UpdateCollectionInput = {
192
+ export type UpdateCollectionInput = {
186
193
  account: Scalars['String'];
187
194
  description?: InputMaybe<Scalars['String']>;
188
195
  id: Scalars['String'];
189
196
  name?: InputMaybe<Scalars['String']>;
190
197
  status?: InputMaybe<Status>;
191
198
  };
192
- export declare type GetAllCustomizationQueryVariables = Exact<{
199
+ export type DeleteAllCustomizationMutationVariables = Exact<{
200
+ data: CustomPlayerInputAccount;
201
+ }>;
202
+ export type DeleteAllCustomizationMutation = {
203
+ __typename?: 'Mutation';
204
+ deleteAllCustomPlayer: {
205
+ __typename: 'CustomPlayerSuccess';
206
+ } | {
207
+ __typename: 'ErrorGeneral';
208
+ message: string;
209
+ statusCode: string;
210
+ timestamp: string;
211
+ };
212
+ };
213
+ export type GetAllCustomizationQueryVariables = Exact<{
193
214
  data: QueryInput;
194
215
  }>;
195
- export declare type GetAllCustomizationQuery = {
216
+ export type GetAllCustomizationQuery = {
196
217
  __typename?: 'Query';
197
218
  getAllCustomPlayer: {
198
219
  __typename: 'CustomPlayerSuccessArray';
@@ -210,10 +231,10 @@ export declare type GetAllCustomizationQuery = {
210
231
  timestamp: string;
211
232
  };
212
233
  };
213
- export declare type UpdateCustomizationMutationVariables = Exact<{
234
+ export type UpdateCustomizationMutationVariables = Exact<{
214
235
  data: CustomPlayerInput;
215
236
  }>;
216
- export declare type UpdateCustomizationMutation = {
237
+ export type UpdateCustomizationMutation = {
217
238
  __typename?: 'Mutation';
218
239
  updateCustomPlayer: {
219
240
  __typename: 'CustomPlayerSuccess';
@@ -224,10 +245,10 @@ export declare type UpdateCustomizationMutation = {
224
245
  timestamp: string;
225
246
  };
226
247
  };
227
- export declare type AddCollectionMutationVariables = Exact<{
248
+ export type AddCollectionMutationVariables = Exact<{
228
249
  data: CreateCollectionInput;
229
250
  }>;
230
- export declare type AddCollectionMutation = {
251
+ export type AddCollectionMutation = {
231
252
  __typename?: 'Mutation';
232
253
  createCollection: {
233
254
  __typename: 'CollectionSuccess';
@@ -242,10 +263,10 @@ export declare type AddCollectionMutation = {
242
263
  timestamp: string;
243
264
  };
244
265
  };
245
- export declare type DeleteCollectionMutationVariables = Exact<{
266
+ export type DeleteCollectionMutationVariables = Exact<{
246
267
  data: QueryInput;
247
268
  }>;
248
- export declare type DeleteCollectionMutation = {
269
+ export type DeleteCollectionMutation = {
249
270
  __typename?: 'Mutation';
250
271
  deleteCollection: {
251
272
  __typename: 'CollectionSuccess';
@@ -256,10 +277,10 @@ export declare type DeleteCollectionMutation = {
256
277
  timestamp: string;
257
278
  };
258
279
  };
259
- export declare type FindCollectionQueryVariables = Exact<{
280
+ export type FindCollectionQueryVariables = Exact<{
260
281
  data: QueryInput;
261
282
  }>;
262
- export declare type FindCollectionQuery = {
283
+ export type FindCollectionQuery = {
263
284
  __typename?: 'Query';
264
285
  findCollection: {
265
286
  __typename: 'CollectionSuccess';
@@ -291,10 +312,10 @@ export declare type FindCollectionQuery = {
291
312
  timestamp: string;
292
313
  };
293
314
  };
294
- export declare type GetAllCollectionsQueryVariables = Exact<{
315
+ export type GetAllCollectionsQueryVariables = Exact<{
295
316
  data: QueryInput;
296
317
  }>;
297
- export declare type GetAllCollectionsQuery = {
318
+ export type GetAllCollectionsQuery = {
298
319
  __typename?: 'Query';
299
320
  getAllCollection: {
300
321
  __typename: 'CollectionSuccessArray';
@@ -326,10 +347,10 @@ export declare type GetAllCollectionsQuery = {
326
347
  timestamp: string;
327
348
  };
328
349
  };
329
- export declare type ManageCollectionProductMutationVariables = Exact<{
350
+ export type ManageCollectionProductMutationVariables = Exact<{
330
351
  data: ManageCollectionProductInInput;
331
352
  }>;
332
- export declare type ManageCollectionProductMutation = {
353
+ export type ManageCollectionProductMutation = {
333
354
  __typename?: 'Mutation';
334
355
  manageCollectionProduct: {
335
356
  __typename: 'CollectionSuccess';
@@ -340,10 +361,10 @@ export declare type ManageCollectionProductMutation = {
340
361
  timestamp: string;
341
362
  };
342
363
  };
343
- export declare type SearchCollectionsQueryVariables = Exact<{
364
+ export type SearchCollectionsQueryVariables = Exact<{
344
365
  data: QueryInput;
345
366
  }>;
346
- export declare type SearchCollectionsQuery = {
367
+ export type SearchCollectionsQuery = {
347
368
  __typename?: 'Query';
348
369
  searchCollection: {
349
370
  __typename: 'CollectionSuccessArray';
@@ -375,10 +396,10 @@ export declare type SearchCollectionsQuery = {
375
396
  timestamp: string;
376
397
  };
377
398
  };
378
- export declare type UpdateCollectionMutationVariables = Exact<{
399
+ export type UpdateCollectionMutationVariables = Exact<{
379
400
  data: UpdateCollectionInput;
380
401
  }>;
381
- export declare type UpdateCollectionMutation = {
402
+ export type UpdateCollectionMutation = {
382
403
  __typename?: 'Mutation';
383
404
  updateCollection: {
384
405
  __typename: 'CollectionSuccess';
@@ -389,6 +410,9 @@ export declare type UpdateCollectionMutation = {
389
410
  timestamp: string;
390
411
  };
391
412
  };
413
+ export declare const DeleteAllCustomizationDocument: DocumentNode<DeleteAllCustomizationMutation, Exact<{
414
+ data: CustomPlayerInputAccount;
415
+ }>>;
392
416
  export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizationQuery, Exact<{
393
417
  data: QueryInput;
394
418
  }>>;
@@ -1,3 +1,3 @@
1
1
  import { Constructor } from './utils';
2
- export declare type StoreClass<T = any> = Constructor<T>;
3
- export declare type StoreFactory<T = any> = (...args: any[]) => T;
2
+ export type StoreClass<T = any> = Constructor<T>;
3
+ export type StoreFactory<T = any> = (...args: any[]) => T;
@@ -1,5 +1,5 @@
1
1
  import environment from '../../environments/environment';
2
- export declare type Constructor<T = any> = new (...args: any[]) => T;
2
+ export type Constructor<T = any> = new (...args: any[]) => T;
3
3
  export declare abstract class BaseStore {
4
4
  }
5
5
  export interface ApiV1Response<T = any> {
@@ -14,9 +14,9 @@ export interface ApiV2Response<T = any> {
14
14
  duration: string;
15
15
  method: 'GET' | 'POST' | 'PUT' | 'DELETE';
16
16
  }
17
- export declare type Primitive = string | boolean | number;
17
+ export type Primitive = string | boolean | number;
18
18
  export interface ApiCall extends RequestInit {
19
19
  url: RequestInfo;
20
20
  raw?: boolean;
21
21
  }
22
- export declare type Environment<T> = typeof environment & T;
22
+ export type Environment<T> = typeof environment & 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 declare type Either<L, A> = Err<L, A> | Ok<L, A>;
12
+ export 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
- declare type StorageType = 'localStorage' | 'sessionStorage';
1
+ 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 {};
@@ -2,6 +2,6 @@ import React from 'react';
2
2
  interface Opts {
3
3
  fallback: React.ReactNode;
4
4
  }
5
- declare type Unpromisify<T> = T extends Promise<infer P> ? P : never;
5
+ type Unpromisify<T> = T extends Promise<infer P> ? P : never;
6
6
  export declare const lazyLoad: <T extends Promise<any>, U extends React.ComponentType<any>>(importFunc: () => T, selectorFunc?: ((s: Unpromisify<T>) => U) | undefined, opts?: Opts) => (props: React.ComponentProps<U>) => JSX.Element;
7
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.1.2-beta.1",
3
+ "version": "0.2.0-beta.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",