@monorise/react 0.0.2-dev.1 → 1.0.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.
Files changed (44) hide show
  1. package/dist/actions/auth.action.d.ts +0 -1
  2. package/dist/actions/auth.action.d.ts.map +1 -1
  3. package/dist/actions/auth.action.js +6 -23
  4. package/dist/actions/auth.action.js.map +1 -1
  5. package/dist/actions/core.action.d.ts +1 -3
  6. package/dist/actions/core.action.d.ts.map +1 -1
  7. package/dist/actions/core.action.js +2 -36
  8. package/dist/actions/core.action.js.map +1 -1
  9. package/dist/index.d.ts +72 -81
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +3 -6
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.jsx +48 -0
  14. package/dist/index.jsx.map +1 -0
  15. package/dist/lib/api.d.ts +1 -6
  16. package/dist/lib/api.d.ts.map +1 -1
  17. package/dist/lib/{api.js → api.jsx} +20 -26
  18. package/dist/lib/api.jsx.map +1 -0
  19. package/dist/lib/config.d.ts +5 -0
  20. package/dist/lib/config.d.ts.map +1 -0
  21. package/dist/lib/config.js +24 -0
  22. package/dist/lib/config.js.map +1 -0
  23. package/dist/lib/entity.d.ts +1 -2
  24. package/dist/lib/entity.d.ts.map +1 -1
  25. package/dist/lib/entity.js.map +1 -1
  26. package/dist/services/auth.service.d.ts +0 -1
  27. package/dist/services/auth.service.d.ts.map +1 -1
  28. package/dist/services/auth.service.js +0 -4
  29. package/dist/services/auth.service.js.map +1 -1
  30. package/dist/services/core.service.d.ts +1 -2
  31. package/dist/services/core.service.d.ts.map +1 -1
  32. package/dist/services/core.service.js.map +1 -1
  33. package/dist/store/monorise.store.d.ts +1 -2
  34. package/dist/store/monorise.store.d.ts.map +1 -1
  35. package/dist/store/monorise.store.js.map +1 -1
  36. package/index.ts +160 -0
  37. package/package.json +5 -7
  38. package/tsconfig.json +114 -0
  39. package/dist/lib/api.js.map +0 -1
  40. package/dist/tsconfig.tsbuildinfo +0 -1
  41. package/dist/types/mutual.type.d.ts +0 -21
  42. package/dist/types/mutual.type.d.ts.map +0 -1
  43. package/dist/types/mutual.type.js +0 -2
  44. package/dist/types/mutual.type.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
  import type { Entity, MonoriseEntityConfig } from '@monorise/base';
2
- import type { AxiosResponse } from 'axios';
3
- import { Mutual, MutualData, MutualDataMapping, MutualDataWithIndex } from './types/mutual.type';
4
2
  type Options<T extends Record<string, React.ComponentType<any>>> = {
5
3
  authBaseUrl?: string;
6
4
  filestoreBaseUrl?: string;
@@ -9,7 +7,6 @@ type Options<T extends Record<string, React.ComponentType<any>>> = {
9
7
  tagBaseUrl?: string;
10
8
  modals?: T;
11
9
  entityConfig: Record<Entity, MonoriseEntityConfig>;
12
- onApiSuccess?: <T>(response: AxiosResponse<T>, feedbackSuccess: ((data: AxiosResponse<T>['data']) => React.ReactNode) | string | boolean) => void;
13
10
  };
14
11
  declare const Monorise: {
15
12
  listMoreEntities: <T extends Entity>(entityType: T, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
@@ -19,11 +16,10 @@ declare const Monorise: {
19
16
  deleteEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
20
17
  getMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string | null, entityId: string, opts?: import("./services/core.service").CommonOptions & {
21
18
  defaultMutualData?: Record<string, any>;
22
- }) => Promise<Mutual<B, T> | undefined>;
19
+ }) => Promise<import("@monorise/base").Mutual<B, T> | undefined>;
23
20
  updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("@monorise/base").DraftEntity<T>>) => Promise<void>;
24
- createMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
25
- upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data?: import("@monorise/base").EntitySchemaMap[T] | Record<string, any>) => Promise<void>;
26
- editMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
21
+ createMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: import("@monorise/base").MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
22
+ upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: import("@monorise/base").MutualData<B, T>, data?: import("@monorise/base").EntitySchemaMap[T] | Record<string, any>) => Promise<void>;
27
23
  deleteMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId?: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
28
24
  deleteLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void;
29
25
  useEntity: <T extends Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
@@ -52,14 +48,14 @@ declare const Monorise: {
52
48
  useMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId: string | null, id: string, opts?: import("./services/core.service").CommonOptions & {
53
49
  defaultMutualData?: Record<string, any>;
54
50
  }) => {
55
- mutual?: Mutual<B, T>;
51
+ mutual?: import("@monorise/base").Mutual<B, T>;
56
52
  isLoading: boolean;
57
53
  error?: import("./types/api.type").ApplicationRequestError;
58
54
  requestKey: string;
59
55
  };
60
56
  useMutuals: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId?: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => {
61
- mutuals: Mutual<B, T>[];
62
- mutualsMap: Map<string, Mutual<B, T>>;
57
+ mutuals: import("@monorise/base").Mutual<B, T>[];
58
+ mutualsMap: Map<string, import("@monorise/base").Mutual<B, T>>;
63
59
  isLoading: boolean;
64
60
  requestKey: string;
65
61
  error?: import("./types/api.type").ApplicationRequestError;
@@ -80,7 +76,6 @@ declare const Monorise: {
80
76
  getProfile: () => Promise<void>;
81
77
  useIsUnauthorized: () => boolean;
82
78
  setIsUnauthorized: (isUnauthorized: boolean) => void;
83
- logout: () => void;
84
79
  startLoading: <T>({ requestKey, isInterruptive, message, request, }: {
85
80
  requestKey: string;
86
81
  isInterruptive?: boolean;
@@ -134,7 +129,7 @@ declare const Monorise: {
134
129
  };
135
130
  config: Record<Entity, MonoriseEntityConfig>;
136
131
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
137
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
132
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
138
133
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
139
134
  auth: {
140
135
  isUnauthorized: boolean;
@@ -161,7 +156,7 @@ declare const Monorise: {
161
156
  };
162
157
  config: Record<Entity, MonoriseEntityConfig>;
163
158
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
164
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
159
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
165
160
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
166
161
  auth: {
167
162
  isUnauthorized: boolean;
@@ -185,7 +180,7 @@ declare const Monorise: {
185
180
  };
186
181
  config: Record<Entity, MonoriseEntityConfig>;
187
182
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
188
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
183
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
189
184
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
190
185
  auth: {
191
186
  isUnauthorized: boolean;
@@ -209,7 +204,7 @@ declare const Monorise: {
209
204
  };
210
205
  config: Record<Entity, MonoriseEntityConfig>;
211
206
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
212
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
207
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
213
208
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
214
209
  auth: {
215
210
  isUnauthorized: boolean;
@@ -233,7 +228,7 @@ declare const Monorise: {
233
228
  };
234
229
  config: Record<Entity, MonoriseEntityConfig>;
235
230
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
236
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
231
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
237
232
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
238
233
  auth: {
239
234
  isUnauthorized: boolean;
@@ -257,7 +252,7 @@ declare const Monorise: {
257
252
  };
258
253
  config: Record<Entity, MonoriseEntityConfig>;
259
254
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
260
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
255
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
261
256
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
262
257
  auth: {
263
258
  isUnauthorized: boolean;
@@ -270,11 +265,11 @@ declare const Monorise: {
270
265
  }>), replace?: boolean | undefined, action?: A | undefined): void;
271
266
  }>;
272
267
  axios: {
273
- post: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
274
- put: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
275
- patch: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
276
- delete: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
277
- get: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
268
+ post: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
269
+ put: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
270
+ patch: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
271
+ delete: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
272
+ get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
278
273
  defaults: Omit<import("axios").AxiosDefaults, "headers"> & {
279
274
  headers: import("axios").HeadersDefaults & {
280
275
  [key: string]: import("axios").AxiosHeaderValue;
@@ -282,19 +277,18 @@ declare const Monorise: {
282
277
  };
283
278
  interceptors: {
284
279
  request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig>;
285
- response: import("axios").AxiosInterceptorManager<AxiosResponse>;
280
+ response: import("axios").AxiosInterceptorManager<import("axios").AxiosResponse>;
286
281
  };
287
282
  };
288
283
  authService: {
289
284
  requestLoginMagicLink: (entityType: Entity, payload: {
290
285
  email: string;
291
- }) => Promise<AxiosResponse<any, any>>;
292
- getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
286
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
287
+ getSessionProfile: <T extends Record<string, unknown>>() => Promise<import("axios").AxiosResponse<T & {
293
288
  displayName: string;
294
289
  email: string;
295
290
  accountId: string;
296
291
  }, any>>;
297
- logout: () => Promise<AxiosResponse<any, any>>;
298
292
  setOptions: (opts: {
299
293
  apiBaseUrl?: string;
300
294
  }) => void;
@@ -305,7 +299,7 @@ declare const Monorise: {
305
299
  scope: string;
306
300
  directory: string;
307
301
  name: string;
308
- }) => Promise<AxiosResponse<any, any>>;
302
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
309
303
  deleteFiles: (keys: string[]) => Promise<any>;
310
304
  uploadVideo: ({ file, scope, directory, name, }: {
311
305
  file: File;
@@ -325,34 +319,34 @@ declare const Monorise: {
325
319
  lastKey?: string;
326
320
  start?: string;
327
321
  end?: string;
328
- }, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
322
+ }, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
329
323
  data: import("@monorise/base").CreatedEntity<T>[];
330
324
  lastKey?: string;
331
325
  totalCount: number;
332
326
  }, any>>;
333
- searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
327
+ searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
334
328
  data: import("@monorise/base").CreatedEntity<T>[];
335
329
  }, any>>;
336
- listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
330
+ listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
337
331
  entities: import("@monorise/base").CreatedEntity<T>[];
338
332
  lastKey: string;
339
333
  }, any>>;
340
- getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
341
- createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
342
- upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
343
- editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
344
- updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
345
- deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
334
+ getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
335
+ createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
336
+ upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
337
+ editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
338
+ updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
339
+ deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
346
340
  };
347
341
  makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
348
- listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<AxiosResponse<{
349
- entities: Mutual<B, T>[];
342
+ listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<import("axios").AxiosResponse<{
343
+ entities: import("@monorise/base").Mutual<B, T>[];
350
344
  lastKey: string;
351
345
  }, any>>;
352
- getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any>>;
353
- createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
354
- editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
355
- deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
346
+ getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
347
+ createMutual: (byEntityId: string, entityId: string, payload: import("@monorise/base").MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
348
+ editMutual: (byEntityId: string, entityId: string, payload: import("@monorise/base").MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
349
+ deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
356
350
  };
357
351
  setOptions: (opts: {
358
352
  entityApiBaseUrl?: string;
@@ -375,7 +369,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
375
369
  };
376
370
  config: Record<Entity, MonoriseEntityConfig>;
377
371
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
378
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
372
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
379
373
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
380
374
  auth: {
381
375
  isUnauthorized: boolean;
@@ -402,7 +396,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
402
396
  };
403
397
  config: Record<Entity, MonoriseEntityConfig>;
404
398
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
405
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
399
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
406
400
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
407
401
  auth: {
408
402
  isUnauthorized: boolean;
@@ -426,7 +420,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
426
420
  };
427
421
  config: Record<Entity, MonoriseEntityConfig>;
428
422
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
429
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
423
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
430
424
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
431
425
  auth: {
432
426
  isUnauthorized: boolean;
@@ -450,7 +444,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
450
444
  };
451
445
  config: Record<Entity, MonoriseEntityConfig>;
452
446
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
453
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
447
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
454
448
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
455
449
  auth: {
456
450
  isUnauthorized: boolean;
@@ -474,7 +468,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
474
468
  };
475
469
  config: Record<Entity, MonoriseEntityConfig>;
476
470
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
477
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
471
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
478
472
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
479
473
  auth: {
480
474
  isUnauthorized: boolean;
@@ -498,7 +492,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
498
492
  };
499
493
  config: Record<Entity, MonoriseEntityConfig>;
500
494
  entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
501
- mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
495
+ mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
502
496
  tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
503
497
  auth: {
504
498
  isUnauthorized: boolean;
@@ -510,11 +504,11 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
510
504
  };
511
505
  }>), replace?: boolean | undefined, action?: A | undefined): void;
512
506
  }>, axios: {
513
- post: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
514
- put: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
515
- patch: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
516
- delete: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
517
- get: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
507
+ post: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
508
+ put: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
509
+ patch: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
510
+ delete: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
511
+ get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
518
512
  defaults: Omit<import("axios").AxiosDefaults, "headers"> & {
519
513
  headers: import("axios").HeadersDefaults & {
520
514
  [key: string]: import("axios").AxiosHeaderValue;
@@ -522,18 +516,17 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
522
516
  };
523
517
  interceptors: {
524
518
  request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig>;
525
- response: import("axios").AxiosInterceptorManager<AxiosResponse>;
519
+ response: import("axios").AxiosInterceptorManager<import("axios").AxiosResponse>;
526
520
  };
527
521
  }, authService: {
528
522
  requestLoginMagicLink: (entityType: Entity, payload: {
529
523
  email: string;
530
- }) => Promise<AxiosResponse<any, any>>;
531
- getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
524
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
525
+ getSessionProfile: <T extends Record<string, unknown>>() => Promise<import("axios").AxiosResponse<T & {
532
526
  displayName: string;
533
527
  email: string;
534
528
  accountId: string;
535
529
  }, any>>;
536
- logout: () => Promise<AxiosResponse<any, any>>;
537
530
  setOptions: (opts: {
538
531
  apiBaseUrl?: string;
539
532
  }) => void;
@@ -543,7 +536,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
543
536
  scope: string;
544
537
  directory: string;
545
538
  name: string;
546
- }) => Promise<AxiosResponse<any, any>>;
539
+ }) => Promise<import("axios").AxiosResponse<any, any>>;
547
540
  deleteFiles: (keys: string[]) => Promise<any>;
548
541
  uploadVideo: ({ file, scope, directory, name, }: {
549
542
  file: File;
@@ -562,34 +555,34 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
562
555
  lastKey?: string;
563
556
  start?: string;
564
557
  end?: string;
565
- }, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
558
+ }, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
566
559
  data: import("@monorise/base").CreatedEntity<T>[];
567
560
  lastKey?: string;
568
561
  totalCount: number;
569
562
  }, any>>;
570
- searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
563
+ searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
571
564
  data: import("@monorise/base").CreatedEntity<T>[];
572
565
  }, any>>;
573
- listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
566
+ listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
574
567
  entities: import("@monorise/base").CreatedEntity<T>[];
575
568
  lastKey: string;
576
569
  }, any>>;
577
- getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
578
- createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
579
- upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
580
- editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
581
- updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
582
- deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
570
+ getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
571
+ createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
572
+ upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
573
+ editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
574
+ updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
575
+ deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
583
576
  };
584
577
  makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
585
- listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<AxiosResponse<{
586
- entities: Mutual<B, T>[];
578
+ listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<import("axios").AxiosResponse<{
579
+ entities: import("@monorise/base").Mutual<B, T>[];
587
580
  lastKey: string;
588
581
  }, any>>;
589
- getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any>>;
590
- createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
591
- editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
592
- deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
582
+ getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
583
+ createMutual: (byEntityId: string, entityId: string, payload: import("@monorise/base").MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
584
+ editMutual: (byEntityId: string, entityId: string, payload: import("@monorise/base").MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
585
+ deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
593
586
  };
594
587
  setOptions: (opts: {
595
588
  entityApiBaseUrl?: string;
@@ -623,9 +616,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
623
616
  email: string;
624
617
  accountId: string;
625
618
  impersonatorId?: string;
626
- }, getProfile: () => Promise<void>, useIsUnauthorized: () => boolean, setIsUnauthorized: (isUnauthorized: boolean) => void, logout: () => void, listMoreEntities: <T extends Entity>(entityType: T, opts?: import("./services/core.service").CommonOptions) => Promise<void>, createEntity: <T extends Entity>(entityType: T, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("@monorise/base").CreatedEntity<T>>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("@monorise/base").DraftEntity<T>>) => Promise<void>, deleteEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, getMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string | null, entityId: string, opts?: import("./services/core.service").CommonOptions & {
619
+ }, getProfile: () => Promise<void>, useIsUnauthorized: () => boolean, setIsUnauthorized: (isUnauthorized: boolean) => void, listMoreEntities: <T extends Entity>(entityType: T, opts?: import("./services/core.service").CommonOptions) => Promise<void>, createEntity: <T extends Entity>(entityType: T, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("@monorise/base").CreatedEntity<T>>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("@monorise/base").DraftEntity<T>>) => Promise<void>, deleteEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, getMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string | null, entityId: string, opts?: import("./services/core.service").CommonOptions & {
627
620
  defaultMutualData?: Record<string, any>;
628
- }) => Promise<Mutual<B, T> | undefined>, createMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data?: import("@monorise/base").EntitySchemaMap[T] | Record<string, any>) => Promise<void>, editMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, deleteMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId?: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, deleteLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void, useEntity: <T extends Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
621
+ }) => Promise<import("@monorise/base").Mutual<B, T> | undefined>, createMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, payload?: import("@monorise/base").MutualData<B, T> | Record<string, any>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: import("@monorise/base").MutualData<B, T>, data?: import("@monorise/base").EntitySchemaMap[T] | Record<string, any>) => Promise<void>, deleteMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId?: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, deleteLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void, useEntity: <T extends Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
629
622
  entity: import("@monorise/base").CreatedEntity<T> | undefined;
630
623
  isLoading: boolean;
631
624
  error?: import("./types/api.type").ApplicationRequestError;
@@ -649,19 +642,17 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
649
642
  }, useMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId: string | null, id: string, opts?: import("./services/core.service").CommonOptions & {
650
643
  defaultMutualData?: Record<string, any>;
651
644
  }) => {
652
- mutual?: Mutual<B, T>;
645
+ mutual?: import("@monorise/base").Mutual<B, T>;
653
646
  isLoading: boolean;
654
647
  error?: import("./types/api.type").ApplicationRequestError;
655
648
  requestKey: string;
656
649
  }, useMutuals: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId?: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => {
657
- mutuals: Mutual<B, T>[];
658
- mutualsMap: Map<string, Mutual<B, T>>;
650
+ mutuals: import("@monorise/base").Mutual<B, T>[];
651
+ mutualsMap: Map<string, import("@monorise/base").Mutual<B, T>>;
659
652
  isLoading: boolean;
660
653
  requestKey: string;
661
654
  error?: import("./types/api.type").ApplicationRequestError;
662
655
  }, useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>[T];
663
- export { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, logout, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, editMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, };
656
+ export { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, };
664
657
  export default Monorise;
665
- export { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
666
- export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '@monorise/base';
667
658
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAU3C,OAAO,EACL,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;IACnD,YAAY,CAAC,EAAE,CAAC,CAAC,EACf,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,eAAe,EACX,CAAC,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC,GACrD,MAAM,GACN,OAAO,KACR,IAAI,CAAC;CACX,CAAC;AA2DF,QAAA,MAAM,QAAQ;;;;;;;yBAsGq6K,CAAC;;;;;;;;;;;aAA4jS,CAAC;;;;eAAwoB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iB,sHACjB,SAAS;;;SAmDslb,CAAC;;GAlDhmb,WAAW;WAkDksc,CAAC;;;;OAAkE,CAAC;;;YAAgG,CAAC;;SAA+E,CAAC;;;;0BAAkH,MAAO,WAAW;;GAjDtkd,SAAS;qBAiD4piB,CAAC;;UAAoD,CAAC;;SAAiD,CAAC;;GAhD7wiB,UAAU;;;;;SAgDo1kB,CAAC;GA/C/1kB,cAAc,qJACJ,CAAC;AAEb,OAAO,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ const initMonorise = () => {
17
17
  const coreService = initCoreService(store, axios);
18
18
  const authActions = initAuthActions(store, authService);
19
19
  const coreActions = initCoreActions(store, appActions, coreService);
20
- const axiosInterceptor = injectAxiosInterceptor(appActions, authActions, axios);
20
+ injectAxiosInterceptor(appActions, authActions, axios);
21
21
  const config = (opts) => {
22
22
  setMonoriseOptions({
23
23
  modals: opts.modals,
@@ -34,9 +34,6 @@ const initMonorise = () => {
34
34
  mutualApiBaseUrl: opts.mutualBaseUrl,
35
35
  tagApiBaseUrl: opts.tagBaseUrl,
36
36
  });
37
- axiosInterceptor.setOptions({
38
- onApiSuccess: opts.onApiSuccess,
39
- });
40
37
  };
41
38
  return Object.assign(Object.assign(Object.assign(Object.assign({ config,
42
39
  store,
@@ -46,7 +43,7 @@ const initMonorise = () => {
46
43
  coreService }, configActions), appActions), authActions), coreActions);
47
44
  };
48
45
  const Monorise = initMonorise();
49
- const { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, logout, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, editMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, } = Monorise;
50
- export { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, logout, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, editMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, };
46
+ const { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, } = Monorise;
47
+ export { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, };
51
48
  export default Monorise;
52
49
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAyB3D,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAC5D,iBAAiB,EAAE,CAAC;IACtB,MAAM,UAAU,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACzC,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC/C,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEtD,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IAElD,MAAM,WAAW,GAAG,eAAe,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a,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,GAAG,QAAQ,CAAC;AAEb,OAAO,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,eA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,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/dist/index.jsx ADDED
@@ -0,0 +1,48 @@
1
+ import { initAppActions } from './actions/app.action';
2
+ import { initAuthActions } from './actions/auth.action';
3
+ import { initConfigActions } from './actions/config.action';
4
+ import { initCoreActions } from './actions/core.action';
5
+ import { initAxiosInterceptor, injectAxiosInterceptor } from './lib/api';
6
+ import initAuthService from './services/auth.service';
7
+ import initCoreService from './services/core.service';
8
+ import initFilestoreService from './services/filestore.service';
9
+ import { initMonoriseStore } from './store/monorise.store';
10
+ const initMonorise = () => {
11
+ const { monoriseStore: store, setOptions: setMonoriseOptions } = initMonoriseStore();
12
+ const appActions = initAppActions(store);
13
+ const configActions = initConfigActions(store);
14
+ const axios = initAxiosInterceptor(store, appActions);
15
+ const authService = initAuthService(axios);
16
+ const filestoreService = initFilestoreService(axios);
17
+ const coreService = initCoreService(store, axios);
18
+ const authActions = initAuthActions(store, authService);
19
+ const coreActions = initCoreActions(store, appActions, coreService);
20
+ injectAxiosInterceptor(appActions, authActions, axios);
21
+ const config = (opts) => {
22
+ setMonoriseOptions({
23
+ modals: opts.modals,
24
+ });
25
+ authService.setOptions({
26
+ apiBaseUrl: opts.authBaseUrl,
27
+ });
28
+ filestoreService.setOptions({
29
+ apiBaseUrl: opts.filestoreBaseUrl,
30
+ });
31
+ coreService.setOptions({
32
+ entityApiBaseUrl: opts.entityBaseUrl,
33
+ mutualApiBaseUrl: opts.mutualBaseUrl,
34
+ tagApiBaseUrl: opts.tagBaseUrl,
35
+ });
36
+ };
37
+ return Object.assign(Object.assign(Object.assign(Object.assign({ config,
38
+ store,
39
+ axios,
40
+ authService,
41
+ filestoreService,
42
+ coreService }, configActions), appActions), authActions), coreActions);
43
+ };
44
+ const Monorise = initMonorise();
45
+ const { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, } = Monorise;
46
+ export { store, axios, authService, filestoreService, coreService, setConfig, getConfig, useConfig, startLoading, endLoading, setError, getError, clearError, openModal, closeModal, useLoadStore, useInterruptiveLoadStore, useErrorStore, useModalStore, requestLogin, useProfile, getProfile, useIsUnauthorized, setIsUnauthorized, listMoreEntities, createEntity, upsertEntity, editEntity, updateLocalEntity, deleteEntity, getMutual, createMutual, upsertLocalMutual, deleteMutual, deleteLocalMutual, useEntity, useEntities, useMutual, useMutuals, useEntityState, };
47
+ export default Monorise;
48
+ //# sourceMappingURL=index.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.jsx","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAW3D,MAAM,YAAY,GAAG,GAAG,EAAE;IACxB,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,GAC5D,iBAAiB,EAAE,CAAC;I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hC,MAAM,EACJ,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,GAAG,QAAQ,CAAC;AAEb,OAAO,EACL,KAAK,EACL,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,WAAW,EACX,SAAS,EACT,UAAU,EACV,cAAc,GACf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/dist/lib/api.d.ts CHANGED
@@ -18,11 +18,6 @@ declare const initAxiosInterceptor: (store: MonoriseStore, appActions: AppAction
18
18
  response: import("axios").AxiosInterceptorManager<AxiosResponse>;
19
19
  };
20
20
  };
21
- type ConfigOptions = {
22
- onApiSuccess?: <T>(response: AxiosResponse<T>, feedbackSuccess: ((data: AxiosResponse<T>['data']) => React.ReactNode) | string | boolean) => void;
23
- };
24
- declare const injectAxiosInterceptor: (appActions: AppActions, authActions: AuthActions, axios: ReturnType<typeof initAxiosInterceptor>, opts?: ConfigOptions) => {
25
- setOptions: (opts: ConfigOptions) => void;
26
- };
21
+ declare const injectAxiosInterceptor: (appActions: AppActions, authActions: AuthActions, axios: ReturnType<typeof initAxiosInterceptor>) => void;
27
22
  export { initAxiosInterceptor, injectAxiosInterceptor };
28
23
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../lib/api.ts"],"names":[],"mappings":"AAAA,OAAgB,EAEd,KAAK,kBAAkB,EACvB,KAAK,aAAa,EACnB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,QAAA,MAAM,oBAAoB,GAAI,OAAO,aAAa,EAAE,YAAY,UAAU;WAqC/D,CAAC,QAAQ,CAAC,0BAA0B,CAAC,aACrC,MAAM,QACL,CAAC,UACC,kBAAkB,CAAC,CAAC,CAAC,KAC5B,OAAO,CAAC,CAAC,CAAC;UACP,CAAC,QAAQ,CAAC,0BAA0B,CAAC,aACpC,MAAM,QACL,CAAC,UACC,kBAAkB,CAAC,CAAC,CAAC,KAC5B,OAAO,CAAC,CAAC,CAAC;YACL,CAAC,QAAQ,CAAC,0BAA0B,CAAC,aACtC,MAAM,QACL,CAAC,UACC,kBAAkB,CAAC,CAAC,CAAC,KAC5B,OAAO,CAAC,CAAC,CAAC;aACJ,CAAC,QAAQ,CAAC,0BAA0B,CAAC,aACvC,MAAM,UACH,kBAAkB,CAAC,CAAC,CAAC,KAC5B,OAAO,CAAC,CAAC,CAAC;UACP,CAAC,QAAQ,C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