monorise 0.0.2-dev.3 → 0.0.2-dev.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/core/index.d.ts +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 +1 -1
- package/dist/react/index.d.ts +91 -91
- 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 +1 -1
- package/dist/react/services/core.service.d.ts +1 -1
- package/dist/react/store/monorise.store.d.ts +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/core/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig } from '
|
|
1
|
+
import { Entity as Entity$2, EntitySchemaMap, createEntityConfig } from '../base/index';
|
|
2
2
|
import * as hono from 'hono';
|
|
3
3
|
import { Hono } from 'hono';
|
|
4
4
|
import { DynamoDB, TransactWriteItemsInput, AttributeValue, TransactWriteItem, UpdateItemCommandInput } from '@aws-sdk/client-dynamodb';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entity } from '
|
|
1
|
+
import type { Entity } from '../../base/index';
|
|
2
2
|
import type { AuthService } from '../services/auth.service';
|
|
3
3
|
import type { MonoriseStore } from '../store/monorise.store';
|
|
4
4
|
declare const initAuthActions: (store: MonoriseStore, authService: AuthService) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entity, MonoriseEntityConfig } from '
|
|
1
|
+
import type { Entity, MonoriseEntityConfig } from '../../base/index';
|
|
2
2
|
import type { MonoriseStore } from '../store/monorise.store';
|
|
3
3
|
declare const initConfigActions: (store: MonoriseStore) => {
|
|
4
4
|
setConfig: (config: Record<Entity, MonoriseEntityConfig>) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap } from '
|
|
1
|
+
import type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap } from '../../base/index';
|
|
2
2
|
import type { CommonOptions, CoreService, ListEntitiesByTagParams } from '../services/core.service';
|
|
3
3
|
import type { MonoriseStore } from '../store/monorise.store';
|
|
4
4
|
import type { ApplicationRequestError } from '../types/api.type';
|
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?: {
|
|
@@ -133,8 +133,8 @@ declare const Monorise: {
|
|
|
133
133
|
searchInterval?: number;
|
|
134
134
|
}) => {
|
|
135
135
|
isLoading: boolean;
|
|
136
|
-
entities?: import("
|
|
137
|
-
entitiesMap: Map<string, import("
|
|
136
|
+
entities?: import("../base/index").CreatedEntity<T>[];
|
|
137
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
138
138
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
139
139
|
requestKey: string;
|
|
140
140
|
searchField: {
|
|
@@ -167,8 +167,8 @@ declare const Monorise: {
|
|
|
167
167
|
useTaggedEntities: <T extends Entity>(entityType: T, tagName: string, opts?: import("./services/core.service").CommonOptions & {
|
|
168
168
|
params?: import("./services/core.service").ListEntitiesByTagParams;
|
|
169
169
|
}) => {
|
|
170
|
-
entities: import("
|
|
171
|
-
entitiesMap: Map<string, import("
|
|
170
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
171
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
172
172
|
isLoading: boolean;
|
|
173
173
|
requestKey: string;
|
|
174
174
|
error: import("./types/api.type").ApplicationRequestError | undefined;
|
|
@@ -179,13 +179,13 @@ declare const Monorise: {
|
|
|
179
179
|
data?: undefined;
|
|
180
180
|
} | {
|
|
181
181
|
data: {
|
|
182
|
-
entities: import("
|
|
182
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
183
183
|
lastKey: null;
|
|
184
184
|
};
|
|
185
185
|
error?: undefined;
|
|
186
186
|
} | {
|
|
187
187
|
data: {
|
|
188
|
-
entities: import("
|
|
188
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
189
189
|
lastKey: string;
|
|
190
190
|
};
|
|
191
191
|
error?: undefined;
|
|
@@ -200,13 +200,13 @@ declare const Monorise: {
|
|
|
200
200
|
data?: undefined;
|
|
201
201
|
} | {
|
|
202
202
|
data: {
|
|
203
|
-
entities: import("
|
|
203
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
204
204
|
lastKey: null;
|
|
205
205
|
};
|
|
206
206
|
error?: undefined;
|
|
207
207
|
} | {
|
|
208
208
|
data: {
|
|
209
|
-
entities: import("
|
|
209
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
210
210
|
lastKey: string;
|
|
211
211
|
};
|
|
212
212
|
error?: undefined;
|
|
@@ -217,8 +217,8 @@ declare const Monorise: {
|
|
|
217
217
|
data?: undefined;
|
|
218
218
|
} | undefined>;
|
|
219
219
|
};
|
|
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("
|
|
220
|
+
useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>[T];
|
|
221
|
+
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
222
|
deleteLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, params?: import("./services/core.service").ListEntitiesByTagParams) => void;
|
|
223
223
|
requestLogin: (entityType: Entity, payload: {
|
|
224
224
|
email: string;
|
|
@@ -288,9 +288,9 @@ declare const Monorise: {
|
|
|
288
288
|
};
|
|
289
289
|
};
|
|
290
290
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
291
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
291
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
292
292
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
293
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
293
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
294
294
|
auth: {
|
|
295
295
|
isUnauthorized: boolean;
|
|
296
296
|
profile: {
|
|
@@ -316,9 +316,9 @@ declare const Monorise: {
|
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
318
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
319
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
319
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
320
320
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
321
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
321
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
322
322
|
auth: {
|
|
323
323
|
isUnauthorized: boolean;
|
|
324
324
|
profile: {
|
|
@@ -341,9 +341,9 @@ declare const Monorise: {
|
|
|
341
341
|
};
|
|
342
342
|
};
|
|
343
343
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
344
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
344
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
345
345
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
346
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
346
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
347
347
|
auth: {
|
|
348
348
|
isUnauthorized: boolean;
|
|
349
349
|
profile: {
|
|
@@ -366,9 +366,9 @@ declare const Monorise: {
|
|
|
366
366
|
};
|
|
367
367
|
};
|
|
368
368
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
369
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
369
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
370
370
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
371
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
371
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
372
372
|
auth: {
|
|
373
373
|
isUnauthorized: boolean;
|
|
374
374
|
profile: {
|
|
@@ -391,9 +391,9 @@ declare const Monorise: {
|
|
|
391
391
|
};
|
|
392
392
|
};
|
|
393
393
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
394
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
394
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
395
395
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
396
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
396
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
397
397
|
auth: {
|
|
398
398
|
isUnauthorized: boolean;
|
|
399
399
|
profile: {
|
|
@@ -416,9 +416,9 @@ declare const Monorise: {
|
|
|
416
416
|
};
|
|
417
417
|
};
|
|
418
418
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
419
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
419
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
420
420
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
421
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
421
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
422
422
|
auth: {
|
|
423
423
|
isUnauthorized: boolean;
|
|
424
424
|
profile: {
|
|
@@ -540,23 +540,23 @@ declare const Monorise: {
|
|
|
540
540
|
start?: string;
|
|
541
541
|
end?: string;
|
|
542
542
|
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
543
|
-
data: import("
|
|
543
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
544
544
|
lastKey?: string;
|
|
545
545
|
totalCount: number;
|
|
546
546
|
}, any>>;
|
|
547
547
|
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
548
|
-
data: import("
|
|
548
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
549
549
|
}, any>>;
|
|
550
550
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
551
|
-
entities: import("
|
|
551
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
552
552
|
lastKey: string;
|
|
553
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("
|
|
554
|
+
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
555
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
556
|
+
createEntity: (values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
557
|
+
upsertEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
558
|
+
editEntity: (id: string, values: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
559
|
+
updateEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
560
560
|
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
561
561
|
};
|
|
562
562
|
makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
|
|
@@ -589,9 +589,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
589
589
|
};
|
|
590
590
|
};
|
|
591
591
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
592
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
592
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
593
593
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
594
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
594
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
595
595
|
auth: {
|
|
596
596
|
isUnauthorized: boolean;
|
|
597
597
|
profile: {
|
|
@@ -617,9 +617,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
617
617
|
};
|
|
618
618
|
};
|
|
619
619
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
620
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
620
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
621
621
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
622
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
622
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
623
623
|
auth: {
|
|
624
624
|
isUnauthorized: boolean;
|
|
625
625
|
profile: {
|
|
@@ -642,9 +642,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
642
642
|
};
|
|
643
643
|
};
|
|
644
644
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
645
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
645
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
646
646
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
647
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
647
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
648
648
|
auth: {
|
|
649
649
|
isUnauthorized: boolean;
|
|
650
650
|
profile: {
|
|
@@ -667,9 +667,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
667
667
|
};
|
|
668
668
|
};
|
|
669
669
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
670
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
670
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
671
671
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
672
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
672
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
673
673
|
auth: {
|
|
674
674
|
isUnauthorized: boolean;
|
|
675
675
|
profile: {
|
|
@@ -692,9 +692,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
692
692
|
};
|
|
693
693
|
};
|
|
694
694
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
695
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
695
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
696
696
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
697
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
697
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
698
698
|
auth: {
|
|
699
699
|
isUnauthorized: boolean;
|
|
700
700
|
profile: {
|
|
@@ -717,9 +717,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
717
717
|
};
|
|
718
718
|
};
|
|
719
719
|
config: Record<Entity, MonoriseEntityConfig>;
|
|
720
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
720
|
+
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
721
721
|
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
722
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("
|
|
722
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("../base/index").CreatedEntity<Entity>>>;
|
|
723
723
|
auth: {
|
|
724
724
|
isUnauthorized: boolean;
|
|
725
725
|
profile: {
|
|
@@ -837,23 +837,23 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
837
837
|
start?: string;
|
|
838
838
|
end?: string;
|
|
839
839
|
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
840
|
-
data: import("
|
|
840
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
841
841
|
lastKey?: string;
|
|
842
842
|
totalCount: number;
|
|
843
843
|
}, any>>;
|
|
844
844
|
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
845
|
-
data: import("
|
|
845
|
+
data: import("../base/index").CreatedEntity<T>[];
|
|
846
846
|
}, any>>;
|
|
847
847
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
848
|
-
entities: import("
|
|
848
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
849
849
|
lastKey: string;
|
|
850
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("
|
|
851
|
+
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
852
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
853
|
+
createEntity: (values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
854
|
+
upsertEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
855
|
+
editEntity: (id: string, values: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
856
|
+
updateEntity: (id: string, values: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("../base/index").CreatedEntity<T>, any>>;
|
|
857
857
|
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<any, any>>;
|
|
858
858
|
};
|
|
859
859
|
makeMutualService: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T) => {
|
|
@@ -905,31 +905,31 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
905
905
|
error: Error & {
|
|
906
906
|
originalError?: unknown;
|
|
907
907
|
};
|
|
908
|
-
} | undefined>, createEntity: <T extends Entity>(entityType: T, entity: import("
|
|
909
|
-
data: import("
|
|
908
|
+
} | undefined>, createEntity: <T extends Entity>(entityType: T, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
909
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
910
910
|
error?: undefined;
|
|
911
911
|
} | {
|
|
912
912
|
error: Error & {
|
|
913
913
|
originalError?: unknown;
|
|
914
914
|
};
|
|
915
915
|
data?: undefined;
|
|
916
|
-
}>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("
|
|
917
|
-
data: import("
|
|
916
|
+
}>, upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("../base/index").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
917
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
918
918
|
error?: undefined;
|
|
919
919
|
} | {
|
|
920
920
|
error: Error & {
|
|
921
921
|
originalError?: unknown;
|
|
922
922
|
};
|
|
923
923
|
data?: undefined;
|
|
924
|
-
}>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("
|
|
925
|
-
data: import("
|
|
924
|
+
}>, editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("../base/index").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<{
|
|
925
|
+
data: import("../base/index").CreatedEntity<T>;
|
|
926
926
|
error?: undefined;
|
|
927
927
|
} | {
|
|
928
928
|
error: Error & {
|
|
929
929
|
originalError?: unknown;
|
|
930
930
|
};
|
|
931
931
|
data?: undefined;
|
|
932
|
-
}>, updateLocalEntity: <T extends Entity>(entityType: Entity, entityId: string, data?: Partial<import("
|
|
932
|
+
}>, 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
933
|
data: {
|
|
934
934
|
entityId: string;
|
|
935
935
|
};
|
|
@@ -960,7 +960,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
960
960
|
originalError?: unknown;
|
|
961
961
|
};
|
|
962
962
|
data?: undefined;
|
|
963
|
-
}>, createLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string, mutualData: MutualData<B, T>, data: import("
|
|
963
|
+
}>, 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
964
|
data: Mutual<B, T>;
|
|
965
965
|
error?: undefined;
|
|
966
966
|
} | {
|
|
@@ -977,19 +977,19 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
977
977
|
};
|
|
978
978
|
data?: undefined;
|
|
979
979
|
}>, 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("
|
|
980
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
981
981
|
isLoading: boolean;
|
|
982
982
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
983
983
|
requestKey: string;
|
|
984
984
|
isFirstFetched?: boolean;
|
|
985
|
-
refetch: () => Promise<import("
|
|
985
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
986
986
|
}, useEntityByUniqueField: <T extends Entity>(entityType: T, fieldName: string, value?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
987
|
-
entity: import("
|
|
987
|
+
entity: import("../base/index").CreatedEntity<T> | undefined;
|
|
988
988
|
isLoading: boolean;
|
|
989
989
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
990
990
|
requestKey: string;
|
|
991
991
|
isFirstFetched?: boolean;
|
|
992
|
-
refetch: () => Promise<import("
|
|
992
|
+
refetch: () => Promise<import("../base/index").CreatedEntity<T> | undefined>;
|
|
993
993
|
}, useEntities: <T extends Entity>(entityType: T, params?: {
|
|
994
994
|
skRange?: {
|
|
995
995
|
start: string;
|
|
@@ -1000,8 +1000,8 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1000
1000
|
searchInterval?: number;
|
|
1001
1001
|
}) => {
|
|
1002
1002
|
isLoading: boolean;
|
|
1003
|
-
entities?: import("
|
|
1004
|
-
entitiesMap: Map<string, import("
|
|
1003
|
+
entities?: import("../base/index").CreatedEntity<T>[];
|
|
1004
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
1005
1005
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
1006
1006
|
requestKey: string;
|
|
1007
1007
|
searchField: {
|
|
@@ -1031,8 +1031,8 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1031
1031
|
}, useTaggedEntities: <T extends Entity>(entityType: T, tagName: string, opts?: import("./services/core.service").CommonOptions & {
|
|
1032
1032
|
params?: import("./services/core.service").ListEntitiesByTagParams;
|
|
1033
1033
|
}) => {
|
|
1034
|
-
entities: import("
|
|
1035
|
-
entitiesMap: Map<string, import("
|
|
1034
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1035
|
+
entitiesMap: Map<string, import("../base/index").CreatedEntity<T>>;
|
|
1036
1036
|
isLoading: boolean;
|
|
1037
1037
|
requestKey: string;
|
|
1038
1038
|
error: import("./types/api.type").ApplicationRequestError | undefined;
|
|
@@ -1043,13 +1043,13 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1043
1043
|
data?: undefined;
|
|
1044
1044
|
} | {
|
|
1045
1045
|
data: {
|
|
1046
|
-
entities: import("
|
|
1046
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
1047
1047
|
lastKey: null;
|
|
1048
1048
|
};
|
|
1049
1049
|
error?: undefined;
|
|
1050
1050
|
} | {
|
|
1051
1051
|
data: {
|
|
1052
|
-
entities: import("
|
|
1052
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1053
1053
|
lastKey: string;
|
|
1054
1054
|
};
|
|
1055
1055
|
error?: undefined;
|
|
@@ -1064,13 +1064,13 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1064
1064
|
data?: undefined;
|
|
1065
1065
|
} | {
|
|
1066
1066
|
data: {
|
|
1067
|
-
entities: import("
|
|
1067
|
+
entities: import("../base/index").CreatedEntity<Entity>[];
|
|
1068
1068
|
lastKey: null;
|
|
1069
1069
|
};
|
|
1070
1070
|
error?: undefined;
|
|
1071
1071
|
} | {
|
|
1072
1072
|
data: {
|
|
1073
|
-
entities: import("
|
|
1073
|
+
entities: import("../base/index").CreatedEntity<T>[];
|
|
1074
1074
|
lastKey: string;
|
|
1075
1075
|
};
|
|
1076
1076
|
error?: undefined;
|
|
@@ -1080,14 +1080,14 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
1080
1080
|
};
|
|
1081
1081
|
data?: undefined;
|
|
1082
1082
|
} | undefined>;
|
|
1083
|
-
}, useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("
|
|
1084
|
-
data?: import("
|
|
1083
|
+
}, 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<{
|
|
1084
|
+
data?: import("../base/index").CreatedEntity<T>;
|
|
1085
1085
|
error?: import("./types/api.type").ApplicationRequestError | (Error & {
|
|
1086
1086
|
originalError?: unknown;
|
|
1087
1087
|
});
|
|
1088
|
-
}>, updateLocalTaggedEntity: <T extends Entity>(entityType: T, entityId: string, tagName: string, data?: Partial<import("
|
|
1088
|
+
}>, 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
1089
|
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
1090
|
export default Monorise;
|
|
1091
1091
|
export { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|
|
1092
|
-
export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '
|
|
1092
|
+
export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '../base/index';
|
|
1093
1093
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatedEntity, Entity, EntitySchemaMap } from '
|
|
1
|
+
import type { CreatedEntity, Entity, EntitySchemaMap } from '../../base/index';
|
|
2
2
|
import type { Mutual, MutualData } from '../types/mutual.type';
|
|
3
3
|
export declare const constructLocal: (entityType: Entity, entityId: string, data: any) => CreatedEntity<Entity>;
|
|
4
4
|
export declare const constructMutual: <B extends Entity, T extends Entity>(byEntityType: B, byEntityId: string, entityType: T, entityId: string, mutualData: Partial<MutualData<B, T>>, data: EntitySchemaMap[T]) => Mutual;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entity } from '
|
|
1
|
+
import type { Entity } from '../../base/index';
|
|
2
2
|
export declare const convertToMap: <T extends Record<string, any>>(data: T[], mapKey: string) => Map<any, any>;
|
|
3
3
|
export declare const getMutualStateKey: (byEntity: Entity, byEntityId: string | null, entity: Entity, entityId?: string, chainEntityQuery?: string) => string;
|
|
4
4
|
export declare const getTagStateKey: (entityType: Entity, tagName: string, params?: Record<string, string>) => string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatedEntity, DraftEntity, Entity } from '
|
|
1
|
+
import type { CreatedEntity, DraftEntity, Entity } from '../../base/index';
|
|
2
2
|
import type { AxiosRequestConfig } from 'axios';
|
|
3
3
|
import type { MonoriseStore } from '../store/monorise.store';
|
|
4
4
|
import type { ApplicationRequestError, AxiosInterceptor } from '../types/api.type';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreatedEntity, Entity, MonoriseEntityConfig } from '
|
|
1
|
+
import type { CreatedEntity, Entity, MonoriseEntityConfig } from '../../base/index';
|
|
2
2
|
import type React from 'react';
|
|
3
3
|
import type { ApplicationRequestError } from '../types/api.type';
|
|
4
4
|
import type { CommonStore } from '../types/monorise.type';
|