@nizza/core 0.1.1-beta.1 → 0.1.1-beta.3

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,2 @@
1
+ export declare abstract class BaseMobxStore {
2
+ }
@@ -1,2 +1,3 @@
1
1
  export * from './AggregateRoot';
2
+ export * from './BaseMobxStore';
2
3
  export * from './errors';
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
- import { StoreClass, StoreFactory } from '../types';
2
+ import { BaseStore, StoreClass, StoreFactory } from '../types';
3
3
  interface Props {
4
+ instances?: BaseStore[];
4
5
  stores: (StoreClass | StoreFactory)[];
5
6
  children?: React.ReactNode;
6
7
  }
@@ -20,6 +20,7 @@ export declare type Scalars = {
20
20
  Int: number;
21
21
  Float: number;
22
22
  DateTime: any;
23
+ JSON: any;
23
24
  };
24
25
  export declare type Collection = {
25
26
  __typename?: 'Collection';
@@ -59,6 +60,42 @@ export declare type CreateCollectionInput = {
59
60
  name: Scalars['String'];
60
61
  status?: InputMaybe<Status>;
61
62
  };
63
+ export declare type CustomPlayer = {
64
+ __typename?: 'CustomPlayer';
65
+ account: Scalars['String'];
66
+ component: Scalars['String'];
67
+ data: Scalars['JSON'];
68
+ duration?: Maybe<Scalars['String']>;
69
+ id: Scalars['String'];
70
+ isArray?: Maybe<Scalars['Boolean']>;
71
+ method?: Maybe<Scalars['String']>;
72
+ path?: Maybe<Scalars['String']>;
73
+ section: Scalars['String'];
74
+ };
75
+ export declare type CustomPlayerInput = {
76
+ account: Scalars['String'];
77
+ data: Scalars['JSON'];
78
+ id: Scalars['String'];
79
+ section: Scalars['String'];
80
+ };
81
+ export declare type CustomPlayerResult = CustomPlayerSuccess | ErrorGeneral;
82
+ export declare type CustomPlayerResultArray = CustomPlayerSuccessArray | ErrorGeneral;
83
+ export declare type CustomPlayerSuccess = {
84
+ __typename?: 'CustomPlayerSuccess';
85
+ data?: Maybe<CustomPlayer>;
86
+ duration?: Maybe<Scalars['String']>;
87
+ isArray?: Maybe<Scalars['Boolean']>;
88
+ method?: Maybe<Scalars['String']>;
89
+ path?: Maybe<Scalars['String']>;
90
+ };
91
+ export declare type CustomPlayerSuccessArray = {
92
+ __typename?: 'CustomPlayerSuccessArray';
93
+ data?: Maybe<Array<CustomPlayer>>;
94
+ duration?: Maybe<Scalars['String']>;
95
+ isArray?: Maybe<Scalars['Boolean']>;
96
+ method?: Maybe<Scalars['String']>;
97
+ path?: Maybe<Scalars['String']>;
98
+ };
62
99
  export declare type Error = {
63
100
  message: Scalars['String'];
64
101
  statusCode: Scalars['String'];
@@ -86,6 +123,7 @@ export declare type Mutation = {
86
123
  deleteCollection: CollectionResult;
87
124
  manageCollectionProduct: CollectionResult;
88
125
  updateCollection: CollectionResult;
126
+ updateCustomPlayer: CustomPlayerResult;
89
127
  };
90
128
  export declare type MutationCreateCollectionArgs = {
91
129
  data: CreateCollectionInput;
@@ -99,6 +137,9 @@ export declare type MutationManageCollectionProductArgs = {
99
137
  export declare type MutationUpdateCollectionArgs = {
100
138
  data: UpdateCollectionInput;
101
139
  };
140
+ export declare type MutationUpdateCustomPlayerArgs = {
141
+ data: CustomPlayerInput;
142
+ };
102
143
  export declare type Product = {
103
144
  __typename?: 'Product';
104
145
  account: Scalars['String'];
@@ -115,6 +156,7 @@ export declare type Query = {
115
156
  __typename?: 'Query';
116
157
  findCollection: CollectionResult;
117
158
  getAllCollection: CollectionResultArray;
159
+ getAllCustomPlayer: CustomPlayerResultArray;
118
160
  searchCollection: CollectionResultArray;
119
161
  };
120
162
  export declare type QueryFindCollectionArgs = {
@@ -123,6 +165,9 @@ export declare type QueryFindCollectionArgs = {
123
165
  export declare type QueryGetAllCollectionArgs = {
124
166
  data: QueryInput;
125
167
  };
168
+ export declare type QueryGetAllCustomPlayerArgs = {
169
+ data: QueryInput;
170
+ };
126
171
  export declare type QuerySearchCollectionArgs = {
127
172
  data: QueryInput;
128
173
  };
@@ -144,6 +189,41 @@ export declare type UpdateCollectionInput = {
144
189
  name?: InputMaybe<Scalars['String']>;
145
190
  status?: InputMaybe<Status>;
146
191
  };
192
+ export declare type GetAllCustomizationQueryVariables = Exact<{
193
+ data: QueryInput;
194
+ }>;
195
+ export declare type GetAllCustomizationQuery = {
196
+ __typename?: 'Query';
197
+ getAllCustomPlayer: {
198
+ __typename: 'CustomPlayerSuccessArray';
199
+ data?: Array<{
200
+ __typename?: 'CustomPlayer';
201
+ account: string;
202
+ data: any;
203
+ section: string;
204
+ id: string;
205
+ }> | null;
206
+ } | {
207
+ __typename: 'ErrorGeneral';
208
+ message: string;
209
+ statusCode: string;
210
+ timestamp: string;
211
+ };
212
+ };
213
+ export declare type UpdateCustomizationMutationVariables = Exact<{
214
+ data: CustomPlayerInput;
215
+ }>;
216
+ export declare type UpdateCustomizationMutation = {
217
+ __typename?: 'Mutation';
218
+ updateCustomPlayer: {
219
+ __typename: 'CustomPlayerSuccess';
220
+ } | {
221
+ __typename: 'ErrorGeneral';
222
+ message: string;
223
+ statusCode: string;
224
+ timestamp: string;
225
+ };
226
+ };
147
227
  export declare type AddCollectionMutationVariables = Exact<{
148
228
  data: CreateCollectionInput;
149
229
  }>;
@@ -309,6 +389,12 @@ export declare type UpdateCollectionMutation = {
309
389
  timestamp: string;
310
390
  };
311
391
  };
392
+ export declare const GetAllCustomizationDocument: DocumentNode<GetAllCustomizationQuery, Exact<{
393
+ data: QueryInput;
394
+ }>>;
395
+ export declare const UpdateCustomizationDocument: DocumentNode<UpdateCustomizationMutation, Exact<{
396
+ data: CustomPlayerInput;
397
+ }>>;
312
398
  export declare const AddCollectionDocument: DocumentNode<AddCollectionMutation, Exact<{
313
399
  data: CreateCollectionInput;
314
400
  }>>;
@@ -1,8 +1,10 @@
1
1
  import { RouteProps } from 'react-router-dom';
2
2
  import { StoreClass, StoreFactory } from './mobx-store';
3
- export interface AppModule {
3
+ import { BaseStore } from './utils';
4
+ export interface AppModule<T extends BaseStore> {
4
5
  key: string;
5
6
  label: string;
6
7
  routeProps: RouteProps;
8
+ instance: T;
7
9
  stores?: (StoreClass | StoreFactory)[];
8
10
  }
@@ -1,5 +1,7 @@
1
1
  import environment from '../../environments/environment';
2
2
  export declare type Constructor<T = any> = new (...args: any[]) => T;
3
+ export declare abstract class BaseStore {
4
+ }
3
5
  export interface ApiV1Response<T = any> {
4
6
  success: boolean;
5
7
  message: string;
@@ -0,0 +1,12 @@
1
+ export declare class MemoryStorage implements Storage {
2
+ private store;
3
+ constructor();
4
+ private getStoreFromWindow;
5
+ private setStoreToWindow;
6
+ setItem(key: string, value: string): void;
7
+ getItem(key: string): string | null;
8
+ removeItem(key: string): void;
9
+ clear(): void;
10
+ key(index: number): string | null;
11
+ get length(): number;
12
+ }
@@ -0,0 +1,9 @@
1
+ export declare class CustomStorage {
2
+ static init(): CustomStorage;
3
+ constructor();
4
+ private replaceStorages;
5
+ get isAvailable(): {
6
+ localStorage: boolean;
7
+ sessionStorage: boolean;
8
+ };
9
+ }
@@ -0,0 +1,4 @@
1
+ declare type StorageType = 'localStorage' | 'sessionStorage';
2
+ export declare function isStorageAvailable(type: StorageType): boolean;
3
+ export declare function setProperty(obj: unknown, name: string, value: unknown): void;
4
+ export {};
@@ -1,5 +1,6 @@
1
1
  export * from './apiCall';
2
+ export * from './customStorage';
3
+ export * from './fingerprint';
2
4
  export * from './helpers';
3
5
  export * from './lazyLoad';
4
6
  export * from './Result';
5
- export * from './fingerprint';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nizza/core",
3
- "version": "0.1.1-beta.1",
3
+ "version": "0.1.1-beta.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
@@ -16,6 +16,6 @@
16
16
  "@types/js-cookie": "^3.0.2"
17
17
  },
18
18
  "scripts": {
19
- "clean": "rimraf dist"
19
+ "clean": "rimraf dist/*"
20
20
  }
21
21
  }