monorise 0.0.2 → 0.0.4
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.
- package/dist/base/index.d.ts +18 -6
- package/dist/base/index.js.map +1 -1
- package/dist/cli/cli.js +8 -4
- package/dist/cli/cli.js.map +1 -1
- package/dist/core/index.d.ts +16 -11
- package/dist/core/index.js +16 -11
- package/dist/core/index.js.map +1 -1
- package/dist/react/actions/auth.action.d.ts +1 -1
- package/dist/react/actions/config.action.d.ts +1 -1
- package/dist/react/actions/core.action.d.ts +3 -1
- package/dist/react/actions/core.action.d.ts.map +1 -1
- package/dist/react/index.d.ts +131 -127
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +130 -10
- package/dist/react/index.js.map +1 -1
- package/dist/react/lib/api.d.ts +5 -5
- package/dist/react/lib/api.d.ts.map +1 -1
- package/dist/react/lib/entity.d.ts +1 -1
- package/dist/react/lib/utils.d.ts +1 -1
- package/dist/react/services/auth.service.d.ts +4 -4
- package/dist/react/services/core.service.d.ts +17 -16
- package/dist/react/services/core.service.d.ts.map +1 -1
- package/dist/react/services/filestore.service.d.ts +1 -1
- package/dist/react/store/monorise.store.d.ts +1 -1
- package/dist/react/types/api.type.d.ts +5 -5
- package/dist/react/types/api.type.d.ts.map +1 -1
- package/dist/react/types/monorise.type.d.ts +1 -1
- package/dist/react/types/mutual.type.d.ts +1 -1
- package/dist/sst/constants/event.d.ts +1 -1
- package/package.json +1 -1
package/dist/react/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entity, MonoriseEntityConfig } from '
|
|
1
|
+
import type { Entity, MonoriseEntityConfig } from '../base/index';
|
|
2
2
|
import type { AxiosResponse } from 'axios';
|
|
3
3
|
import { getEntityRequestKey, getMutualRequestKey, getTagRequestKey, getUniqueFieldRequestKey } from './lib/utils';
|
|
4
4
|
import { Mutual, MutualData, MutualDataMapping, MutualDataWithIndex } from './types/mutual.type';
|
|
@@ -18,8 +18,8 @@ declare const Monorise: {
|
|
|
18
18
|
originalError?: unknown;
|
|
19
19
|
};
|
|
20
20
|
} | undefined>;
|
|
21
|
-
createEntity: <T extends Entity>(entityType: T, entity: import("
|
|
22
|
-
data: import("
|
|
21
|
+
createEntity: <T extends Entity>(entityType: T, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
22
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
23
23
|
error?: undefined;
|
|
24
24
|
} | {
|
|
25
25
|
error: Error & {
|
|
@@ -27,8 +27,8 @@ declare const Monorise: {
|
|
|
27
27
|
};
|
|
28
28
|
data?: undefined;
|
|
29
29
|
}>;
|
|
30
|
-
upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("
|
|
31
|
-
data: import("
|
|
30
|
+
upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
31
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
32
32
|
error?: undefined;
|
|
33
33
|
} | {
|
|
34
34
|
error: Error & {
|
|
@@ -37,13 +37,13 @@ declare const Monorise: {
|
|
|
37
37
|
data?: undefined;
|
|
38
38
|
}>;
|
|
39
39
|
getEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
40
|
-
data?: import("
|
|
40
|
+
data?: import("../base/index").CreatedEntity<T>;
|
|
41
41
|
error?: import("./types/api.type").ApplicationRequestError | (Error & {
|
|
42
42
|
originalError?: unknown;
|
|
43
43
|
});
|
|
44
44
|
}>;
|
|
45
|
-
editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("
|
|
46
|
-
data: import("
|
|
45
|
+
editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
46
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
47
47
|
error?: undefined;
|
|
48
48
|
} | {
|
|
49
49
|
error: Error & {
|
|
@@ -76,7 +76,7 @@ declare const Monorise: {
|
|
|
76
76
|
};
|
|
77
77
|
data?: undefined;
|
|
78
78
|
}>;
|
|
79
|
-
updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("
|
|
79
|
+
updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("../base/index").DraftEntity<T>>) => Promise<void>;
|
|
80
80
|
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<{
|
|
81
81
|
data: Mutual<B, T>;
|
|
82
82
|
error?: undefined;
|
|
@@ -86,8 +86,8 @@ declare const Monorise: {
|
|
|
86
86
|
};
|
|
87
87
|
data?: undefined;
|
|
88
88
|
}>;
|
|
89
|
-
createLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data: import("
|
|
90
|
-
upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data?: import("
|
|
89
|
+
createLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data: import("../base/index").EntitySchemaMap[T] | Record<string, any>) => Promise<void>;
|
|
90
|
+
upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data?: import("../base/index").EntitySchemaMap[T] | Record<string, any>) => Promise<void>;
|
|
91
91
|
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<{
|
|
92
92
|
data: Mutual<B, T>;
|
|
93
93
|
error?: undefined;
|
|
@@ -108,20 +108,20 @@ declare const Monorise: {
|
|
|
108
108
|
}>;
|
|
109
109
|
deleteLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void;
|
|
110
110
|
useEntity: <T extends Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
111
|
-
entity: import("
|
|
111
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
112
112
|
isLoading: boolean;
|
|
113
113
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
114
114
|
requestKey: string;
|
|
115
115
|
isFirstFetched?: boolean;
|
|
116
|
-
refetch: () => Promise<import("
|
|
116
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
117
117
|
};
|
|
118
118
|
useEntityByUniqueField: <T extends Entity>(entityType: T, fieldName: string, value?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
119
|
-
entity: import("
|
|
119
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
120
120
|
isLoading: boolean;
|
|
121
121
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
122
122
|
requestKey: string;
|
|
123
123
|
isFirstFetched?: boolean;
|
|
124
|
-
refetch: () => Promise<import("
|
|
124
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
125
125
|
};
|
|
126
126
|
useEntities: <T extends Entity>(entityType: T, params?: {
|
|
127
127
|
skRange?: {
|
|
@@ -129,12 +129,13 @@ declare const Monorise: {
|
|
|
129
129
|
end: string;
|
|
130
130
|
};
|
|
131
131
|
all?: boolean;
|
|
132
|
+
limit?: number;
|
|
132
133
|
}, opts?: import("./services/core.service").CommonOptions & {
|
|
133
134
|
searchInterval?: number;
|
|
134
135
|
}) => {
|
|
135
136
|
isLoading: boolean;
|
|
136
|
-
entities?: import("
|
|
137
|
-
entitiesMap: Map<string, import("
|
|
137
|
+
entities?: import("../base/index").CreatedEntity<T>[];
|
|
138
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
138
139
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
139
140
|
requestKey: string;
|
|
140
141
|
searchField: {
|
|
@@ -163,12 +164,13 @@ declare const Monorise: {
|
|
|
163
164
|
isFirstFetched?: boolean;
|
|
164
165
|
lastKey?: string;
|
|
165
166
|
listMore?: () => void;
|
|
167
|
+
refetch?: () => Promise<any>;
|
|
166
168
|
};
|
|
167
169
|
useTaggedEntities: <T extends Entity>(entityType: T, tagName: string, opts?: import("./services/core.service").CommonOptions & {
|
|
168
170
|
params?: import("./services/core.service").ListEntitiesByTagParams;
|
|
169
171
|
}) => {
|
|
170
|
-
entities: import("
|
|
171
|
-
entitiesMap: Map<string, import("
|
|
172
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
173
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
172
174
|
isLoading: boolean;
|
|
173
175
|
requestKey: string;
|
|
174
176
|
error: import("./types/api.type").ApplicationRequestError | undefined;
|
|
@@ -179,13 +181,13 @@ declare const Monorise: {
|
|
|
179
181
|
data?: undefined;
|
|
180
182
|
} | {
|
|
181
183
|
data: {
|
|
182
|
-
entities: import("
|
|
184
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
183
185
|
lastKey: null;
|
|
184
186
|
};
|
|
185
187
|
error?: undefined;
|
|
186
188
|
} | {
|
|
187
189
|
data: {
|
|
188
|
-
entities: import("
|
|
190
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
189
191
|
lastKey: string;
|
|
190
192
|
};
|
|
191
193
|
error?: undefined;
|
|
@@ -200,13 +202,13 @@ declare const Monorise: {
|
|
|
200
202
|
data?: undefined;
|
|
201
203
|
} | {
|
|
202
204
|
data: {
|
|
203
|
-
entities: import("
|
|
205
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
204
206
|
lastKey: null;
|
|
205
207
|
};
|
|
206
208
|
error?: undefined;
|
|
207
209
|
} | {
|
|
208
210
|
data: {
|
|
209
|
-
entities: import("
|
|
211
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
210
212
|
lastKey: string;
|
|
211
213
|
};
|
|
212
214
|
error?: undefined;
|
|
@@ -217,8 +219,8 @@ declare const Monorise: {
|
|
|
217
219
|
data?: undefined;
|
|
218
220
|
} | undefined>;
|
|
219
221
|
};
|
|
220
|
-
useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
221
|
-
updateLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, data?: Partial<import("
|
|
222
|
+
useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>[T];
|
|
223
|
+
updateLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, data?: Partial<import("../base/index").DraftEntity<T>>, params?: import("./services/core.service").ListEntitiesByTagParams) => void;
|
|
222
224
|
deleteLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, params?: import("./services/core.service").ListEntitiesByTagParams) => void;
|
|
223
225
|
requestLogin: (entityType: Entity, payload: {
|
|
224
226
|
email: string;
|
|
@@ -288,9 +290,9 @@ declare const Monorise: {
|
|
|
288
290
|
};
|
|
289
291
|
};
|
|
290
292
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
291
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
293
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
292
294
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
293
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
295
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
294
296
|
auth: {
|
|
295
297
|
isUnauthorized: boolean;
|
|
296
298
|
profile: {
|
|
@@ -316,9 +318,9 @@ declare const Monorise: {
|
|
|
316
318
|
};
|
|
317
319
|
};
|
|
318
320
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
319
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
321
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
320
322
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
321
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
323
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
322
324
|
auth: {
|
|
323
325
|
isUnauthorized: boolean;
|
|
324
326
|
profile: {
|
|
@@ -341,9 +343,9 @@ declare const Monorise: {
|
|
|
341
343
|
};
|
|
342
344
|
};
|
|
343
345
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
344
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
346
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
345
347
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
346
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
348
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
347
349
|
auth: {
|
|
348
350
|
isUnauthorized: boolean;
|
|
349
351
|
profile: {
|
|
@@ -366,9 +368,9 @@ declare const Monorise: {
|
|
|
366
368
|
};
|
|
367
369
|
};
|
|
368
370
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
369
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
371
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
370
372
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
371
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
373
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
372
374
|
auth: {
|
|
373
375
|
isUnauthorized: boolean;
|
|
374
376
|
profile: {
|
|
@@ -391,9 +393,9 @@ declare const Monorise: {
|
|
|
391
393
|
};
|
|
392
394
|
};
|
|
393
395
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
394
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
396
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
395
397
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
396
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
398
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
397
399
|
auth: {
|
|
398
400
|
isUnauthorized: boolean;
|
|
399
401
|
profile: {
|
|
@@ -416,9 +418,9 @@ declare const Monorise: {
|
|
|
416
418
|
};
|
|
417
419
|
};
|
|
418
420
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
419
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
421
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
420
422
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
421
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
423
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
422
424
|
auth: {
|
|
423
425
|
isUnauthorized: boolean;
|
|
424
426
|
profile: {
|
|
@@ -431,7 +433,7 @@ declare const Monorise: {
|
|
|
431
433
|
}>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
432
434
|
}>;
|
|
433
435
|
axios: {
|
|
434
|
-
post: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
436
|
+
post: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
435
437
|
requestKey: string;
|
|
436
438
|
isInterruptive?: boolean;
|
|
437
439
|
feedback?: {
|
|
@@ -440,7 +442,7 @@ declare const Monorise: {
|
|
|
440
442
|
failure?: string | boolean;
|
|
441
443
|
};
|
|
442
444
|
}) => Promise<R>;
|
|
443
|
-
put: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
445
|
+
put: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
444
446
|
requestKey: string;
|
|
445
447
|
isInterruptive?: boolean;
|
|
446
448
|
feedback?: {
|
|
@@ -449,7 +451,7 @@ declare const Monorise: {
|
|
|
449
451
|
failure?: string | boolean;
|
|
450
452
|
};
|
|
451
453
|
}) => Promise<R>;
|
|
452
|
-
patch: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
454
|
+
patch: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
453
455
|
requestKey: string;
|
|
454
456
|
isInterruptive?: boolean;
|
|
455
457
|
feedback?: {
|
|
@@ -458,7 +460,7 @@ declare const Monorise: {
|
|
|
458
460
|
failure?: string | boolean;
|
|
459
461
|
};
|
|
460
462
|
}) => Promise<R>;
|
|
461
|
-
delete: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
463
|
+
delete: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
462
464
|
requestKey: string;
|
|
463
465
|
isInterruptive?: boolean;
|
|
464
466
|
feedback?: {
|
|
@@ -467,7 +469,7 @@ declare const Monorise: {
|
|
|
467
469
|
failure?: string | boolean;
|
|
468
470
|
};
|
|
469
471
|
}) => Promise<R>;
|
|
470
|
-
get: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
472
|
+
get: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
471
473
|
requestKey: string;
|
|
472
474
|
isInterruptive?: boolean;
|
|
473
475
|
feedback?: {
|
|
@@ -490,13 +492,13 @@ declare const Monorise: {
|
|
|
490
492
|
authService: {
|
|
491
493
|
requestLoginMagicLink: (entityType: Entity, payload: {
|
|
492
494
|
email: string;
|
|
493
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
495
|
+
}) => Promise<AxiosResponse<any, any, {}>>;
|
|
494
496
|
getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
|
|
495
497
|
displayName: string;
|
|
496
498
|
email: string;
|
|
497
499
|
accountId: string;
|
|
498
|
-
}, any>>;
|
|
499
|
-
logout: () => Promise<AxiosResponse<any, any>>;
|
|
500
|
+
}, any, {}>>;
|
|
501
|
+
logout: () => Promise<AxiosResponse<any, any, {}>>;
|
|
500
502
|
setOptions: (opts: {
|
|
501
503
|
apiBaseUrl?: string;
|
|
502
504
|
}) => void;
|
|
@@ -509,7 +511,7 @@ declare const Monorise: {
|
|
|
509
511
|
name: string;
|
|
510
512
|
disableLoading?: boolean;
|
|
511
513
|
onProgress?: (progress: number) => void;
|
|
512
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
514
|
+
}) => Promise<AxiosResponse<any, any, {}>>;
|
|
513
515
|
deleteFiles: (keys: string[]) => Promise<any>;
|
|
514
516
|
uploadVideo: ({ file, scope, directory, name, }: {
|
|
515
517
|
file: File;
|
|
@@ -540,34 +542,34 @@ declare const Monorise: {
|
|
|
540
542
|
start?: string;
|
|
541
543
|
end?: string;
|
|
542
544
|
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
543
|
-
data: import("
|
|
545
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
544
546
|
lastKey?: string;
|
|
545
547
|
totalCount: number;
|
|
546
|
-
}, any>>;
|
|
548
|
+
}, any, {}>>;
|
|
547
549
|
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
548
|
-
data: import("
|
|
549
|
-
}, any>>;
|
|
550
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
551
|
+
}, any, {}>>;
|
|
550
552
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
551
|
-
entities: import("
|
|
553
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
552
554
|
lastKey: string;
|
|
553
|
-
}, any>>;
|
|
554
|
-
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("
|
|
555
|
-
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("
|
|
556
|
-
createEntity: (values: import("
|
|
557
|
-
upsertEntity: (id: string, values: import("
|
|
558
|
-
editEntity: (id: string, values: Partial<import("
|
|
559
|
-
updateEntity: (id: string, values: import("
|
|
560
|
-
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
555
|
+
}, any, {}>>;
|
|
556
|
+
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
557
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
558
|
+
createEntity: (values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
559
|
+
upsertEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
560
|
+
editEntity: (id: string, values: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
561
|
+
updateEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
562
|
+
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any, {}>>;
|
|
561
563
|
};
|
|
562
564
|
makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
|
|
563
565
|
listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<AxiosResponse<{
|
|
564
566
|
entities: Mutual<B, T>[];
|
|
565
567
|
lastKey: string;
|
|
566
|
-
}, any>>;
|
|
567
|
-
getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
568
|
-
createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
569
|
-
editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
570
|
-
deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
568
|
+
}, any, {}>>;
|
|
569
|
+
getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
570
|
+
createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
571
|
+
editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
572
|
+
deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any, {}>>;
|
|
571
573
|
};
|
|
572
574
|
setOptions: (opts: {
|
|
573
575
|
entityApiBaseUrl?: string;
|
|
@@ -589,9 +591,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
589
591
|
};
|
|
590
592
|
};
|
|
591
593
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
592
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
594
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
593
595
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
594
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
596
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
595
597
|
auth: {
|
|
596
598
|
isUnauthorized: boolean;
|
|
597
599
|
profile: {
|
|
@@ -617,9 +619,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
617
619
|
};
|
|
618
620
|
};
|
|
619
621
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
620
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
622
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
621
623
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
622
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
624
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
623
625
|
auth: {
|
|
624
626
|
isUnauthorized: boolean;
|
|
625
627
|
profile: {
|
|
@@ -642,9 +644,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
642
644
|
};
|
|
643
645
|
};
|
|
644
646
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
645
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
647
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
646
648
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
647
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
649
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
648
650
|
auth: {
|
|
649
651
|
isUnauthorized: boolean;
|
|
650
652
|
profile: {
|
|
@@ -667,9 +669,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
667
669
|
};
|
|
668
670
|
};
|
|
669
671
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
670
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
672
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
671
673
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
672
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
674
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
673
675
|
auth: {
|
|
674
676
|
isUnauthorized: boolean;
|
|
675
677
|
profile: {
|
|
@@ -692,9 +694,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
692
694
|
};
|
|
693
695
|
};
|
|
694
696
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
695
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
697
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
696
698
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
697
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
699
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
698
700
|
auth: {
|
|
699
701
|
isUnauthorized: boolean;
|
|
700
702
|
profile: {
|
|
@@ -717,9 +719,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
717
719
|
};
|
|
718
720
|
};
|
|
719
721
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
720
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
722
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
721
723
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
722
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
724
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
723
725
|
auth: {
|
|
724
726
|
isUnauthorized: boolean;
|
|
725
727
|
profile: {
|
|
@@ -731,7 +733,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
731
733
|
};
|
|
732
734
|
}>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
733
735
|
}>, axios: {
|
|
734
|
-
post: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
736
|
+
post: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
735
737
|
requestKey: string;
|
|
736
738
|
isInterruptive?: boolean;
|
|
737
739
|
feedback?: {
|
|
@@ -740,7 +742,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
740
742
|
failure?: string | boolean;
|
|
741
743
|
};
|
|
742
744
|
}) => Promise<R>;
|
|
743
|
-
put: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
745
|
+
put: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
744
746
|
requestKey: string;
|
|
745
747
|
isInterruptive?: boolean;
|
|
746
748
|
feedback?: {
|
|
@@ -749,7 +751,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
749
751
|
failure?: string | boolean;
|
|
750
752
|
};
|
|
751
753
|
}) => Promise<R>;
|
|
752
|
-
patch: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
754
|
+
patch: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D> & {
|
|
753
755
|
requestKey: string;
|
|
754
756
|
isInterruptive?: boolean;
|
|
755
757
|
feedback?: {
|
|
@@ -758,7 +760,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
758
760
|
failure?: string | boolean;
|
|
759
761
|
};
|
|
760
762
|
}) => Promise<R>;
|
|
761
|
-
delete: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
763
|
+
delete: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
762
764
|
requestKey: string;
|
|
763
765
|
isInterruptive?: boolean;
|
|
764
766
|
feedback?: {
|
|
@@ -767,7 +769,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
767
769
|
failure?: string | boolean;
|
|
768
770
|
};
|
|
769
771
|
}) => Promise<R>;
|
|
770
|
-
get: <T = any, R = AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
772
|
+
get: <T = any, R = AxiosResponse<T, any, {}>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D> & {
|
|
771
773
|
requestKey: string;
|
|
772
774
|
isInterruptive?: boolean;
|
|
773
775
|
feedback?: {
|
|
@@ -789,13 +791,13 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
789
791
|
}, authService: {
|
|
790
792
|
requestLoginMagicLink: (entityType: Entity, payload: {
|
|
791
793
|
email: string;
|
|
792
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
794
|
+
}) => Promise<AxiosResponse<any, any, {}>>;
|
|
793
795
|
getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
|
|
794
796
|
displayName: string;
|
|
795
797
|
email: string;
|
|
796
798
|
accountId: string;
|
|
797
|
-
}, any>>;
|
|
798
|
-
logout: () => Promise<AxiosResponse<any, any>>;
|
|
799
|
+
}, any, {}>>;
|
|
800
|
+
logout: () => Promise<AxiosResponse<any, any, {}>>;
|
|
799
801
|
setOptions: (opts: {
|
|
800
802
|
apiBaseUrl?: string;
|
|
801
803
|
}) => void;
|
|
@@ -807,7 +809,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
807
809
|
name: string;
|
|
808
810
|
disableLoading?: boolean;
|
|
809
811
|
onProgress?: (progress: number) => void;
|
|
810
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
812
|
+
}) => Promise<AxiosResponse<any, any, {}>>;
|
|
811
813
|
deleteFiles: (keys: string[]) => Promise<any>;
|
|
812
814
|
uploadVideo: ({ file, scope, directory, name, }: {
|
|
813
815
|
file: File;
|
|
@@ -837,34 +839,34 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
837
839
|
start?: string;
|
|
838
840
|
end?: string;
|
|
839
841
|
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
840
|
-
data: import("
|
|
842
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
841
843
|
lastKey?: string;
|
|
842
844
|
totalCount: number;
|
|
843
|
-
}, any>>;
|
|
845
|
+
}, any, {}>>;
|
|
844
846
|
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
845
|
-
data: import("
|
|
846
|
-
}, any>>;
|
|
847
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
848
|
+
}, any, {}>>;
|
|
847
849
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
848
|
-
entities: import("
|
|
850
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
849
851
|
lastKey: string;
|
|
850
|
-
}, any>>;
|
|
851
|
-
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("
|
|
852
|
-
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("
|
|
853
|
-
createEntity: (values: import("
|
|
854
|
-
upsertEntity: (id: string, values: import("
|
|
855
|
-
editEntity: (id: string, values: Partial<import("
|
|
856
|
-
updateEntity: (id: string, values: import("
|
|
857
|
-
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
852
|
+
}, any, {}>>;
|
|
853
|
+
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
854
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
855
|
+
createEntity: (values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
856
|
+
upsertEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
857
|
+
editEntity: (id: string, values: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
858
|
+
updateEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any, {}>>;
|
|
859
|
+
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any, {}>>;
|
|
858
860
|
};
|
|
859
861
|
makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
|
|
860
862
|
listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<AxiosResponse<{
|
|
861
863
|
entities: Mutual<B, T>[];
|
|
862
864
|
lastKey: string;
|
|
863
|
-
}, any>>;
|
|
864
|
-
getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
865
|
-
createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
866
|
-
editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any>>;
|
|
867
|
-
deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
865
|
+
}, any, {}>>;
|
|
866
|
+
getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
867
|
+
createMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
868
|
+
editMutual: (byEntityId: string, entityId: string, payload: MutualData<B, T> | Record<string, unknown>, opts?: {}) => Promise<AxiosResponse<Mutual<B, T>, any, {}>>;
|
|
869
|
+
deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any, {}>>;
|
|
868
870
|
};
|
|
869
871
|
setOptions: (opts: {
|
|
870
872
|
entityApiBaseUrl?: string;
|
|
@@ -905,31 +907,31 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
905
907
|
error: Error & {
|
|
906
908
|
originalError?: unknown;
|
|
907
909
|
};
|
|
908
|
-
} | undefined>, createEntity: <T extends Entity>(entityType: T, entity: import("
|
|
909
|
-
data: import("
|
|
910
|
+
} | undefined>, createEntity: <T extends Entity>(entityType: T, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
911
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
910
912
|
error?: undefined;
|
|
911
913
|
} | {
|
|
912
914
|
error: Error & {
|
|
913
915
|
originalError?: unknown;
|
|
914
916
|
};
|
|
915
917
|
data?: undefined;
|
|
916
|
-
}>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("
|
|
917
|
-
data: import("
|
|
918
|
+
}>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
919
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
918
920
|
error?: undefined;
|
|
919
921
|
} | {
|
|
920
922
|
error: Error & {
|
|
921
923
|
originalError?: unknown;
|
|
922
924
|
};
|
|
923
925
|
data?: undefined;
|
|
924
|
-
}>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("
|
|
925
|
-
data: import("
|
|
926
|
+
}>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
927
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
926
928
|
error?: undefined;
|
|
927
929
|
} | {
|
|
928
930
|
error: Error & {
|
|
929
931
|
originalError?: unknown;
|
|
930
932
|
};
|
|
931
933
|
data?: undefined;
|
|
932
|
-
}>, updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("
|
|
934
|
+
}>, updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("../base/index").DraftEntity<T>>) => Promise<void>, deleteEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
933
935
|
data: {
|
|
934
936
|
entityId: string;
|
|
935
937
|
};
|
|
@@ -960,7 +962,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
960
962
|
originalError?: unknown;
|
|
961
963
|
};
|
|
962
964
|
data?: undefined;
|
|
963
|
-
}>, createLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data: import("
|
|
965
|
+
}>, createLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data: import("../base/index").EntitySchemaMap[T] | Record<string, any>) => Promise<void>, upsertLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data?: import("../base/index").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<{
|
|
964
966
|
data: Mutual<B, T>;
|
|
965
967
|
error?: undefined;
|
|
966
968
|
} | {
|
|
@@ -977,31 +979,32 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
977
979
|
};
|
|
978
980
|
data?: undefined;
|
|
979
981
|
}>, 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) => {
|
|
980
|
-
entity: import("
|
|
982
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
981
983
|
isLoading: boolean;
|
|
982
984
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
983
985
|
requestKey: string;
|
|
984
986
|
isFirstFetched?: boolean;
|
|
985
|
-
refetch: () => Promise<import("
|
|
987
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
986
988
|
}, useEntityByUniqueField: <T extends Entity>(entityType: T, fieldName: string, value?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
987
|
-
entity: import("
|
|
989
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
988
990
|
isLoading: boolean;
|
|
989
991
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
990
992
|
requestKey: string;
|
|
991
993
|
isFirstFetched?: boolean;
|
|
992
|
-
refetch: () => Promise<import("
|
|
994
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
993
995
|
}, useEntities: <T extends Entity>(entityType: T, params?: {
|
|
994
996
|
skRange?: {
|
|
995
997
|
start: string;
|
|
996
998
|
end: string;
|
|
997
999
|
};
|
|
998
1000
|
all?: boolean;
|
|
1001
|
+
limit?: number;
|
|
999
1002
|
}, opts?: import("./services/core.service").CommonOptions & {
|
|
1000
1003
|
searchInterval?: number;
|
|
1001
1004
|
}) => {
|
|
1002
1005
|
isLoading: boolean;
|
|
1003
|
-
entities?: import("
|
|
1004
|
-
entitiesMap: Map<string, import("
|
|
1006
|
+
entities?: import("../base/index").CreatedEntity<T>[];
|
|
1007
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
1005
1008
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
1006
1009
|
requestKey: string;
|
|
1007
1010
|
searchField: {
|
|
@@ -1028,11 +1031,12 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1028
1031
|
isFirstFetched?: boolean;
|
|
1029
1032
|
lastKey?: string;
|
|
1030
1033
|
listMore?: () => void;
|
|
1034
|
+
refetch?: () => Promise<any>;
|
|
1031
1035
|
}, useTaggedEntities: <T extends Entity>(entityType: T, tagName: string, opts?: import("./services/core.service").CommonOptions & {
|
|
1032
1036
|
params?: import("./services/core.service").ListEntitiesByTagParams;
|
|
1033
1037
|
}) => {
|
|
1034
|
-
entities: import("
|
|
1035
|
-
entitiesMap: Map<string, import("
|
|
1038
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1039
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
1036
1040
|
isLoading: boolean;
|
|
1037
1041
|
requestKey: string;
|
|
1038
1042
|
error: import("./types/api.type").ApplicationRequestError | undefined;
|
|
@@ -1043,13 +1047,13 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1043
1047
|
data?: undefined;
|
|
1044
1048
|
} | {
|
|
1045
1049
|
data: {
|
|
1046
|
-
entities: import("
|
|
1050
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
1047
1051
|
lastKey: null;
|
|
1048
1052
|
};
|
|
1049
1053
|
error?: undefined;
|
|
1050
1054
|
} | {
|
|
1051
1055
|
data: {
|
|
1052
|
-
entities: import("
|
|
1056
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1053
1057
|
lastKey: string;
|
|
1054
1058
|
};
|
|
1055
1059
|
error?: undefined;
|
|
@@ -1064,13 +1068,13 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1064
1068
|
data?: undefined;
|
|
1065
1069
|
} | {
|
|
1066
1070
|
data: {
|
|
1067
|
-
entities: import("
|
|
1071
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
1068
1072
|
lastKey: null;
|
|
1069
1073
|
};
|
|
1070
1074
|
error?: undefined;
|
|
1071
1075
|
} | {
|
|
1072
1076
|
data: {
|
|
1073
|
-
entities: import("
|
|
1077
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1074
1078
|
lastKey: string;
|
|
1075
1079
|
};
|
|
1076
1080
|
error?: undefined;
|
|
@@ -1080,14 +1084,14 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1080
1084
|
};
|
|
1081
1085
|
data?: undefined;
|
|
1082
1086
|
} | undefined>;
|
|
1083
|
-
}, useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
1084
|
-
data?: import("
|
|
1087
|
+
}, useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>[T], getEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
1088
|
+
data?: import("../base/index").CreatedEntity<T>;
|
|
1085
1089
|
error?: import("./types/api.type").ApplicationRequestError | (Error & {
|
|
1086
1090
|
originalError?: unknown;
|
|
1087
1091
|
});
|
|
1088
|
-
}>, updateLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, data?: Partial<import("
|
|
1092
|
+
}>, updateLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, data?: Partial<import("../base/index").DraftEntity<T>>, params?: import("./services/core.service").ListEntitiesByTagParams) => void, deleteLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, params?: import("./services/core.service").ListEntitiesByTagParams) => void;
|
|
1089
1093
|
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, createLocalMutual, upsertLocalMutual, editMutual, deleteMutual, deleteLocalMutual, useEntity, useEntityByUniqueField, useEntities, useMutual, useMutuals, useTaggedEntities, useEntityState, getEntityRequestKey, getMutualRequestKey, getTagRequestKey, getUniqueFieldRequestKey, getEntity, updateLocalTaggedEntity, deleteLocalTaggedEntity, };
|
|
1090
1094
|
export default Monorise;
|
|
1091
1095
|
export { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|
|
1092
|
-
export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '
|
|
1096
|
+
export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '../base/index';
|
|
1093
1097
|
//# sourceMappingURL=index.d.ts.map
|