@monorise/react 0.0.2-dev.0 → 1.0.1
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/actions/app.action.ts +218 -0
- package/actions/auth.action.ts +71 -0
- package/actions/core.action.ts +878 -0
- package/dist/actions/auth.action.d.ts +0 -1
- package/dist/actions/auth.action.d.ts.map +1 -1
- package/dist/actions/auth.action.js +6 -23
- package/dist/actions/auth.action.js.map +1 -1
- package/dist/actions/core.action.d.ts +1 -3
- package/dist/actions/core.action.d.ts.map +1 -1
- package/dist/actions/core.action.js +5 -38
- package/dist/actions/core.action.js.map +1 -1
- package/dist/index.d.ts +57 -430
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +1 -6
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/{api.js → api.jsx} +20 -26
- package/dist/lib/api.jsx.map +1 -0
- package/dist/lib/config.d.ts +5 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +24 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/entity.d.ts +1 -2
- package/dist/lib/entity.d.ts.map +1 -1
- package/dist/lib/entity.js.map +1 -1
- package/dist/services/auth.service.d.ts +0 -1
- package/dist/services/auth.service.d.ts.map +1 -1
- package/dist/services/auth.service.js +0 -4
- package/dist/services/auth.service.js.map +1 -1
- package/dist/services/core.service.d.ts +2 -4
- package/dist/services/core.service.d.ts.map +1 -1
- package/dist/services/core.service.js +10 -9
- package/dist/services/core.service.js.map +1 -1
- package/dist/store/monorise.store.d.ts +3 -10
- package/dist/store/monorise.store.d.ts.map +1 -1
- package/dist/store/monorise.store.js +11 -3
- package/dist/store/monorise.store.js.map +1 -1
- package/index.ts +146 -0
- package/lib/api.tsx +132 -0
- package/lib/config.ts +36 -0
- package/lib/constant.ts +1 -0
- package/lib/entity.ts +81 -0
- package/lib/utils.ts +12 -0
- package/package.json +7 -11
- package/services/auth.service.ts +59 -0
- package/services/core.service.ts +416 -0
- package/services/filestore.service.ts +136 -0
- package/store/monorise.store.ts +111 -0
- package/tsconfig.json +114 -0
- package/types/api.type.ts +57 -0
- package/types/axios.type.ts +14 -0
- package/types/monorise.type.ts +8 -0
- package/dist/actions/config.action.d.ts +0 -10
- package/dist/actions/config.action.d.ts.map +0 -1
- package/dist/actions/config.action.js +0 -31
- package/dist/actions/config.action.js.map +0 -1
- package/dist/lib/api.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/dist/types/mutual.type.d.ts +0 -21
- package/dist/types/mutual.type.d.ts.map +0 -1
- package/dist/types/mutual.type.js +0 -2
- package/dist/types/mutual.type.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,366 +1,3 @@
|
|
|
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
|
-
type Options<T extends Record<string, React.ComponentType<any>>> = {
|
|
5
|
-
authBaseUrl?: string;
|
|
6
|
-
filestoreBaseUrl?: string;
|
|
7
|
-
entityBaseUrl?: string;
|
|
8
|
-
mutualBaseUrl?: string;
|
|
9
|
-
tagBaseUrl?: string;
|
|
10
|
-
modals?: T;
|
|
11
|
-
entityConfig: Record<Entity, MonoriseEntityConfig>;
|
|
12
|
-
onApiSuccess?: <T>(response: AxiosResponse<T>, feedbackSuccess: ((data: AxiosResponse<T>['data']) => React.ReactNode) | string | boolean) => void;
|
|
13
|
-
};
|
|
14
|
-
declare const Monorise: {
|
|
15
|
-
listMoreEntities: <T extends Entity>(entityType: T, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
|
|
16
|
-
createEntity: <T extends Entity>(entityType: T, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("@monorise/base").CreatedEntity<T>>;
|
|
17
|
-
upsertEntity: <T extends Entity>(entityType: T, id: string, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
|
|
18
|
-
editEntity: <T extends Entity>(entityType: T, id: string, entity: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
|
|
19
|
-
deleteEntity: <T extends Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
|
|
20
|
-
getMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string | null, entityId: string, opts?: import("./services/core.service").CommonOptions & {
|
|
21
|
-
defaultMutualData?: Record<string, any>;
|
|
22
|
-
}) => Promise<Mutual<B, T> | undefined>;
|
|
23
|
-
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>;
|
|
27
|
-
deleteMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId?: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>;
|
|
28
|
-
deleteLocalMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void;
|
|
29
|
-
useEntity: <T extends Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
30
|
-
entity: import("@monorise/base").CreatedEntity<T> | undefined;
|
|
31
|
-
isLoading: boolean;
|
|
32
|
-
error?: import("./types/api.type").ApplicationRequestError;
|
|
33
|
-
requestKey: string;
|
|
34
|
-
};
|
|
35
|
-
useEntities: <T extends Entity>(entityType: T, params?: {
|
|
36
|
-
skRange?: {
|
|
37
|
-
start: string;
|
|
38
|
-
end: string;
|
|
39
|
-
};
|
|
40
|
-
all?: boolean;
|
|
41
|
-
}, opts?: import("./services/core.service").CommonOptions) => {
|
|
42
|
-
isLoading: boolean;
|
|
43
|
-
entities?: import("@monorise/base").CreatedEntity<T>[];
|
|
44
|
-
entitiesMap: Map<string, import("@monorise/base").CreatedEntity<T>>;
|
|
45
|
-
error?: import("./types/api.type").ApplicationRequestError;
|
|
46
|
-
requestKey: string;
|
|
47
|
-
searchField: {
|
|
48
|
-
value: string;
|
|
49
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
useMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId: string | null, id: string, opts?: import("./services/core.service").CommonOptions & {
|
|
53
|
-
defaultMutualData?: Record<string, any>;
|
|
54
|
-
}) => {
|
|
55
|
-
mutual?: Mutual<B, T>;
|
|
56
|
-
isLoading: boolean;
|
|
57
|
-
error?: import("./types/api.type").ApplicationRequestError;
|
|
58
|
-
requestKey: string;
|
|
59
|
-
};
|
|
60
|
-
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>>;
|
|
63
|
-
isLoading: boolean;
|
|
64
|
-
requestKey: string;
|
|
65
|
-
error?: import("./types/api.type").ApplicationRequestError;
|
|
66
|
-
};
|
|
67
|
-
listEntitiesByTag: <T extends Entity>(entityType: T, tagName: string, opts?: import("./services/core.service").CommonOptions & {
|
|
68
|
-
params?: import("./services/core.service").ListEntitiesByTagParams;
|
|
69
|
-
}) => Promise<void>;
|
|
70
|
-
useEntityState: <T extends Entity>(entityType: T) => Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>[T];
|
|
71
|
-
requestLogin: (entityType: Entity, payload: {
|
|
72
|
-
email: string;
|
|
73
|
-
}) => Promise<any>;
|
|
74
|
-
useProfile: <T extends Record<string, unknown>>() => T & {
|
|
75
|
-
displayName: string;
|
|
76
|
-
email: string;
|
|
77
|
-
accountId: string;
|
|
78
|
-
impersonatorId?: string;
|
|
79
|
-
};
|
|
80
|
-
getProfile: () => Promise<void>;
|
|
81
|
-
useIsUnauthorized: () => boolean;
|
|
82
|
-
setIsUnauthorized: (isUnauthorized: boolean) => void;
|
|
83
|
-
logout: () => void;
|
|
84
|
-
startLoading: <T>({ requestKey, isInterruptive, message, request, }: {
|
|
85
|
-
requestKey: string;
|
|
86
|
-
isInterruptive?: boolean;
|
|
87
|
-
message?: string | boolean;
|
|
88
|
-
request: Promise<T>;
|
|
89
|
-
}) => void;
|
|
90
|
-
endLoading: ({ requestKey, isInterruptive }: {
|
|
91
|
-
requestKey: string;
|
|
92
|
-
isInterruptive?: boolean;
|
|
93
|
-
}) => void;
|
|
94
|
-
setError: ({ requestKey, error }: {
|
|
95
|
-
requestKey: string;
|
|
96
|
-
error: import("./types/api.type").ApplicationRequestError;
|
|
97
|
-
}) => void;
|
|
98
|
-
getError: (requestKey: string) => import("./types/api.type").ApplicationRequestError | undefined;
|
|
99
|
-
clearError: (requestKey: string) => void;
|
|
100
|
-
openModal: (modal: {
|
|
101
|
-
name: string;
|
|
102
|
-
context?: unknown;
|
|
103
|
-
}) => void;
|
|
104
|
-
closeModal: () => void;
|
|
105
|
-
checkIsLoading: (requestKey?: string) => boolean;
|
|
106
|
-
useLoadStore: (requestKey?: string) => boolean;
|
|
107
|
-
useInterruptiveLoadStore: () => {
|
|
108
|
-
isLoading: boolean;
|
|
109
|
-
message: string;
|
|
110
|
-
};
|
|
111
|
-
useErrorStore: (requestKey: string) => import("./types/api.type").ApplicationRequestError | undefined;
|
|
112
|
-
useModalStore: () => {
|
|
113
|
-
name: string | null;
|
|
114
|
-
context?: unknown;
|
|
115
|
-
};
|
|
116
|
-
setOptions: (opts: {
|
|
117
|
-
modals?: Record<string, React.ComponentType<unknown>>;
|
|
118
|
-
}) => void;
|
|
119
|
-
setConfig: (config: Record<Entity, MonoriseEntityConfig>) => void;
|
|
120
|
-
getConfig: () => Record<Entity, MonoriseEntityConfig<Entity, import("zod").ZodRawShape, import("zod").ZodRawShape, import("zod").ZodRawShape, undefined, undefined>>;
|
|
121
|
-
useConfig: () => Record<Entity, MonoriseEntityConfig<Entity, import("zod").ZodRawShape, import("zod").ZodRawShape, import("zod").ZodRawShape, undefined, undefined>>;
|
|
122
|
-
config: <T extends Record<string, React.ComponentType<any>>>(opts: Options<T>) => void;
|
|
123
|
-
store: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<{
|
|
124
|
-
app: {
|
|
125
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
126
|
-
loadStack: Map<string, number>;
|
|
127
|
-
intLoadStack: Map<string, number>;
|
|
128
|
-
loadingMessage: string;
|
|
129
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
130
|
-
modal: {
|
|
131
|
-
name: string | null;
|
|
132
|
-
context?: unknown;
|
|
133
|
-
};
|
|
134
|
-
};
|
|
135
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
136
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
137
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
138
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
139
|
-
auth: {
|
|
140
|
-
isUnauthorized: boolean;
|
|
141
|
-
profile: {
|
|
142
|
-
displayName: string;
|
|
143
|
-
email: string;
|
|
144
|
-
accountId: string;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
}>, "setState"> & {
|
|
148
|
-
setState<A extends string | {
|
|
149
|
-
type: string;
|
|
150
|
-
}>(partial: {
|
|
151
|
-
app: {
|
|
152
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
153
|
-
loadStack: Map<string, number>;
|
|
154
|
-
intLoadStack: Map<string, number>;
|
|
155
|
-
loadingMessage: string;
|
|
156
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
157
|
-
modal: {
|
|
158
|
-
name: string | null;
|
|
159
|
-
context?: unknown;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
163
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
164
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
165
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
166
|
-
auth: {
|
|
167
|
-
isUnauthorized: boolean;
|
|
168
|
-
profile: {
|
|
169
|
-
displayName: string;
|
|
170
|
-
email: string;
|
|
171
|
-
accountId: string;
|
|
172
|
-
};
|
|
173
|
-
};
|
|
174
|
-
} | Partial<{
|
|
175
|
-
app: {
|
|
176
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
177
|
-
loadStack: Map<string, number>;
|
|
178
|
-
intLoadStack: Map<string, number>;
|
|
179
|
-
loadingMessage: string;
|
|
180
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
181
|
-
modal: {
|
|
182
|
-
name: string | null;
|
|
183
|
-
context?: unknown;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
187
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
188
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
189
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
190
|
-
auth: {
|
|
191
|
-
isUnauthorized: boolean;
|
|
192
|
-
profile: {
|
|
193
|
-
displayName: string;
|
|
194
|
-
email: string;
|
|
195
|
-
accountId: string;
|
|
196
|
-
};
|
|
197
|
-
};
|
|
198
|
-
}> | ((state: {
|
|
199
|
-
app: {
|
|
200
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
201
|
-
loadStack: Map<string, number>;
|
|
202
|
-
intLoadStack: Map<string, number>;
|
|
203
|
-
loadingMessage: string;
|
|
204
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
205
|
-
modal: {
|
|
206
|
-
name: string | null;
|
|
207
|
-
context?: unknown;
|
|
208
|
-
};
|
|
209
|
-
};
|
|
210
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
211
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
212
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
213
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
214
|
-
auth: {
|
|
215
|
-
isUnauthorized: boolean;
|
|
216
|
-
profile: {
|
|
217
|
-
displayName: string;
|
|
218
|
-
email: string;
|
|
219
|
-
accountId: string;
|
|
220
|
-
};
|
|
221
|
-
};
|
|
222
|
-
}) => {
|
|
223
|
-
app: {
|
|
224
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
225
|
-
loadStack: Map<string, number>;
|
|
226
|
-
intLoadStack: Map<string, number>;
|
|
227
|
-
loadingMessage: string;
|
|
228
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
229
|
-
modal: {
|
|
230
|
-
name: string | null;
|
|
231
|
-
context?: unknown;
|
|
232
|
-
};
|
|
233
|
-
};
|
|
234
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
235
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
236
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
237
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
238
|
-
auth: {
|
|
239
|
-
isUnauthorized: boolean;
|
|
240
|
-
profile: {
|
|
241
|
-
displayName: string;
|
|
242
|
-
email: string;
|
|
243
|
-
accountId: string;
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
} | Partial<{
|
|
247
|
-
app: {
|
|
248
|
-
ongoingRequests: Map<string, Promise<unknown>>;
|
|
249
|
-
loadStack: Map<string, number>;
|
|
250
|
-
intLoadStack: Map<string, number>;
|
|
251
|
-
loadingMessage: string;
|
|
252
|
-
errorStack: Map<string, import("./types/api.type").ApplicationRequestError>;
|
|
253
|
-
modal: {
|
|
254
|
-
name: string | null;
|
|
255
|
-
context?: unknown;
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
config: Record<Entity, MonoriseEntityConfig>;
|
|
259
|
-
entity: Record<Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
260
|
-
mutual: Record<string, import("./types/monorise.type").CommonStore<Mutual>>;
|
|
261
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
262
|
-
auth: {
|
|
263
|
-
isUnauthorized: boolean;
|
|
264
|
-
profile: {
|
|
265
|
-
displayName: string;
|
|
266
|
-
email: string;
|
|
267
|
-
accountId: string;
|
|
268
|
-
};
|
|
269
|
-
};
|
|
270
|
-
}>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
271
|
-
}>;
|
|
272
|
-
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>;
|
|
278
|
-
defaults: Omit<import("axios").AxiosDefaults, "headers"> & {
|
|
279
|
-
headers: import("axios").HeadersDefaults & {
|
|
280
|
-
[key: string]: import("axios").AxiosHeaderValue;
|
|
281
|
-
};
|
|
282
|
-
};
|
|
283
|
-
interceptors: {
|
|
284
|
-
request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig>;
|
|
285
|
-
response: import("axios").AxiosInterceptorManager<AxiosResponse>;
|
|
286
|
-
};
|
|
287
|
-
};
|
|
288
|
-
authService: {
|
|
289
|
-
requestLoginMagicLink: (entityType: Entity, payload: {
|
|
290
|
-
email: string;
|
|
291
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
292
|
-
getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
|
|
293
|
-
displayName: string;
|
|
294
|
-
email: string;
|
|
295
|
-
accountId: string;
|
|
296
|
-
}, any>>;
|
|
297
|
-
logout: () => Promise<AxiosResponse<any, any>>;
|
|
298
|
-
setOptions: (opts: {
|
|
299
|
-
apiBaseUrl?: string;
|
|
300
|
-
}) => void;
|
|
301
|
-
};
|
|
302
|
-
filestoreService: {
|
|
303
|
-
uploadFile: ({ file, scope, directory, name, }: {
|
|
304
|
-
file: File;
|
|
305
|
-
scope: string;
|
|
306
|
-
directory: string;
|
|
307
|
-
name: string;
|
|
308
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
309
|
-
deleteFiles: (keys: string[]) => Promise<any>;
|
|
310
|
-
uploadVideo: ({ file, scope, directory, name, }: {
|
|
311
|
-
file: File;
|
|
312
|
-
scope: string;
|
|
313
|
-
directory: string;
|
|
314
|
-
name: string;
|
|
315
|
-
}) => Promise<any>;
|
|
316
|
-
getJobStatus: (id: string) => Promise<any>;
|
|
317
|
-
setOptions: (opts: {
|
|
318
|
-
apiBaseUrl?: string;
|
|
319
|
-
}) => void;
|
|
320
|
-
};
|
|
321
|
-
coreService: {
|
|
322
|
-
makeEntityService: <T extends Entity>(entityType: T) => {
|
|
323
|
-
listEntities: (payload: {
|
|
324
|
-
limit?: number;
|
|
325
|
-
lastKey?: string;
|
|
326
|
-
start?: string;
|
|
327
|
-
end?: string;
|
|
328
|
-
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
329
|
-
data: import("@monorise/base").CreatedEntity<T>[];
|
|
330
|
-
lastKey?: string;
|
|
331
|
-
totalCount: number;
|
|
332
|
-
}, any>>;
|
|
333
|
-
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
334
|
-
data: import("@monorise/base").CreatedEntity<T>[];
|
|
335
|
-
}, any>>;
|
|
336
|
-
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
337
|
-
entities: import("@monorise/base").CreatedEntity<T>[];
|
|
338
|
-
lastKey: string;
|
|
339
|
-
}, 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>>;
|
|
346
|
-
};
|
|
347
|
-
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>[];
|
|
350
|
-
lastKey: string;
|
|
351
|
-
}, 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>>;
|
|
356
|
-
};
|
|
357
|
-
setOptions: (opts: {
|
|
358
|
-
entityApiBaseUrl?: string;
|
|
359
|
-
mutualApiBaseUrl?: string;
|
|
360
|
-
tagApiBaseUrl?: string;
|
|
361
|
-
}) => void;
|
|
362
|
-
};
|
|
363
|
-
};
|
|
364
1
|
declare const store: import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<{
|
|
365
2
|
app: {
|
|
366
3
|
ongoingRequests: Map<string, Promise<unknown>>;
|
|
@@ -373,10 +10,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
373
10
|
context?: unknown;
|
|
374
11
|
};
|
|
375
12
|
};
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
13
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
14
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
15
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
380
16
|
auth: {
|
|
381
17
|
isUnauthorized: boolean;
|
|
382
18
|
profile: {
|
|
@@ -400,10 +36,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
400
36
|
context?: unknown;
|
|
401
37
|
};
|
|
402
38
|
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
39
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
40
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
41
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
407
42
|
auth: {
|
|
408
43
|
isUnauthorized: boolean;
|
|
409
44
|
profile: {
|
|
@@ -424,10 +59,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
424
59
|
context?: unknown;
|
|
425
60
|
};
|
|
426
61
|
};
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
62
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
63
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
64
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
431
65
|
auth: {
|
|
432
66
|
isUnauthorized: boolean;
|
|
433
67
|
profile: {
|
|
@@ -448,10 +82,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
448
82
|
context?: unknown;
|
|
449
83
|
};
|
|
450
84
|
};
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
85
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
86
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
87
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
455
88
|
auth: {
|
|
456
89
|
isUnauthorized: boolean;
|
|
457
90
|
profile: {
|
|
@@ -472,10 +105,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
472
105
|
context?: unknown;
|
|
473
106
|
};
|
|
474
107
|
};
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
108
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
109
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
110
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
479
111
|
auth: {
|
|
480
112
|
isUnauthorized: boolean;
|
|
481
113
|
profile: {
|
|
@@ -496,10 +128,9 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
496
128
|
context?: unknown;
|
|
497
129
|
};
|
|
498
130
|
};
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<Entity>>>;
|
|
131
|
+
entity: Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
132
|
+
mutual: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").Mutual>>;
|
|
133
|
+
tag: Record<string, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>;
|
|
503
134
|
auth: {
|
|
504
135
|
isUnauthorized: boolean;
|
|
505
136
|
profile: {
|
|
@@ -510,11 +141,11 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
510
141
|
};
|
|
511
142
|
}>), replace?: boolean | undefined, action?: A | undefined): void;
|
|
512
143
|
}>, 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>;
|
|
144
|
+
post: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
|
|
145
|
+
put: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
|
|
146
|
+
patch: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, data: D, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
|
|
147
|
+
delete: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
|
|
148
|
+
get: <T = any, R = import("axios").AxiosResponse<T, any>, D = any>(url: string, config: import("axios").AxiosRequestConfig<D>) => Promise<R>;
|
|
518
149
|
defaults: Omit<import("axios").AxiosDefaults, "headers"> & {
|
|
519
150
|
headers: import("axios").HeadersDefaults & {
|
|
520
151
|
[key: string]: import("axios").AxiosHeaderValue;
|
|
@@ -522,18 +153,17 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
522
153
|
};
|
|
523
154
|
interceptors: {
|
|
524
155
|
request: import("axios").AxiosInterceptorManager<import("axios").InternalAxiosRequestConfig>;
|
|
525
|
-
response: import("axios").AxiosInterceptorManager<AxiosResponse>;
|
|
156
|
+
response: import("axios").AxiosInterceptorManager<import("axios").AxiosResponse>;
|
|
526
157
|
};
|
|
527
158
|
}, authService: {
|
|
528
|
-
requestLoginMagicLink: (entityType: Entity, payload: {
|
|
159
|
+
requestLoginMagicLink: (entityType: import("@monorise/base").Entity, payload: {
|
|
529
160
|
email: string;
|
|
530
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
531
|
-
getSessionProfile: <T extends Record<string, unknown>>() => Promise<AxiosResponse<T & {
|
|
161
|
+
}) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
162
|
+
getSessionProfile: <T extends Record<string, unknown>>() => Promise<import("axios").AxiosResponse<T & {
|
|
532
163
|
displayName: string;
|
|
533
164
|
email: string;
|
|
534
165
|
accountId: string;
|
|
535
166
|
}, any>>;
|
|
536
|
-
logout: () => Promise<AxiosResponse<any, any>>;
|
|
537
167
|
setOptions: (opts: {
|
|
538
168
|
apiBaseUrl?: string;
|
|
539
169
|
}) => void;
|
|
@@ -543,7 +173,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
543
173
|
scope: string;
|
|
544
174
|
directory: string;
|
|
545
175
|
name: string;
|
|
546
|
-
}) => Promise<AxiosResponse<any, any>>;
|
|
176
|
+
}) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
547
177
|
deleteFiles: (keys: string[]) => Promise<any>;
|
|
548
178
|
uploadVideo: ({ file, scope, directory, name, }: {
|
|
549
179
|
file: File;
|
|
@@ -556,47 +186,47 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
556
186
|
apiBaseUrl?: string;
|
|
557
187
|
}) => void;
|
|
558
188
|
}, coreService: {
|
|
559
|
-
makeEntityService: <T extends Entity>(entityType: T) => {
|
|
189
|
+
makeEntityService: <T extends import("@monorise/base").Entity>(entityType: T) => {
|
|
560
190
|
listEntities: (payload: {
|
|
561
191
|
limit?: number;
|
|
562
192
|
lastKey?: string;
|
|
563
193
|
start?: string;
|
|
564
194
|
end?: string;
|
|
565
|
-
}, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
195
|
+
}, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
|
|
566
196
|
data: import("@monorise/base").CreatedEntity<T>[];
|
|
567
197
|
lastKey?: string;
|
|
568
198
|
totalCount: number;
|
|
569
199
|
}, any>>;
|
|
570
|
-
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
200
|
+
searchEntities: (query: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
|
|
571
201
|
data: import("@monorise/base").CreatedEntity<T>[];
|
|
572
202
|
}, any>>;
|
|
573
|
-
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
203
|
+
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<{
|
|
574
204
|
entities: import("@monorise/base").CreatedEntity<T>[];
|
|
575
205
|
lastKey: string;
|
|
576
206
|
}, 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>>;
|
|
207
|
+
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
208
|
+
createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
209
|
+
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>>;
|
|
210
|
+
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>>;
|
|
211
|
+
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>>;
|
|
212
|
+
deleteEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
583
213
|
};
|
|
584
|
-
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>[];
|
|
214
|
+
makeMutualService: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T) => {
|
|
215
|
+
listEntitiesByEntity: (byEntityId: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => Promise<import("axios").AxiosResponse<{
|
|
216
|
+
entities: import("@monorise/base").Mutual<B, T>[];
|
|
587
217
|
lastKey: string;
|
|
588
218
|
}, 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>>;
|
|
219
|
+
getMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<import("@monorise/base").Mutual<B, T>, any>>;
|
|
220
|
+
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>>;
|
|
221
|
+
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>>;
|
|
222
|
+
deleteMutual: (byEntityId: string, entityId: string, opts?: import("./services/core.service").CommonOptions) => Promise<import("axios").AxiosResponse<any, any>>;
|
|
593
223
|
};
|
|
594
224
|
setOptions: (opts: {
|
|
595
225
|
entityApiBaseUrl?: string;
|
|
596
226
|
mutualApiBaseUrl?: string;
|
|
597
227
|
tagApiBaseUrl?: string;
|
|
598
228
|
}) => void;
|
|
599
|
-
},
|
|
229
|
+
}, startLoading: <T>({ requestKey, isInterruptive, message, request, }: {
|
|
600
230
|
requestKey: string;
|
|
601
231
|
isInterruptive?: boolean;
|
|
602
232
|
message?: string | boolean;
|
|
@@ -616,21 +246,21 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
616
246
|
}, useErrorStore: (requestKey: string) => import("./types/api.type").ApplicationRequestError | undefined, useModalStore: () => {
|
|
617
247
|
name: string | null;
|
|
618
248
|
context?: unknown;
|
|
619
|
-
}, requestLogin: (entityType: Entity, payload: {
|
|
249
|
+
}, requestLogin: (entityType: import("@monorise/base").Entity, payload: {
|
|
620
250
|
email: string;
|
|
621
251
|
}) => Promise<any>, useProfile: <T extends Record<string, unknown>>() => T & {
|
|
622
252
|
displayName: string;
|
|
623
253
|
email: string;
|
|
624
254
|
accountId: string;
|
|
625
255
|
impersonatorId?: string;
|
|
626
|
-
}, getProfile: () => Promise<void>, useIsUnauthorized: () => boolean, setIsUnauthorized: (isUnauthorized: boolean) => void,
|
|
256
|
+
}, getProfile: () => Promise<void>, useIsUnauthorized: () => boolean, setIsUnauthorized: (isUnauthorized: boolean) => void, listMoreEntities: <T extends import("@monorise/base").Entity>(entityType: T, opts?: import("./services/core.service").CommonOptions) => Promise<void>, createEntity: <T extends import("@monorise/base").Entity>(entityType: T, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<import("@monorise/base").CreatedEntity<T>>, upsertEntity: <T extends import("@monorise/base").Entity>(entityType: T, id: string, entity: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, editEntity: <T extends import("@monorise/base").Entity>(entityType: T, id: string, entity: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<void>, updateLocalEntity: <T extends import("@monorise/base").Entity>(entityType: import("@monorise/base").Entity, entityId: string, data?: Partial<import("@monorise/base").DraftEntity<T>>) => Promise<void>, deleteEntity: <T extends import("@monorise/base").Entity>(entityType: T, id: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, getMutual: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T, byEntityId: string | null, entityId: string, opts?: import("./services/core.service").CommonOptions & {
|
|
627
257
|
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>,
|
|
258
|
+
}) => Promise<import("@monorise/base").Mutual<B, T> | undefined>, createMutual: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").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 import("@monorise/base").Entity, T extends import("@monorise/base").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 import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId?: string, opts?: import("./services/core.service").CommonOptions) => Promise<void>, deleteLocalMutual: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T, byEntityId: string, entityId: string) => void, useEntity: <T extends import("@monorise/base").Entity>(entityType: T, id?: string, opts?: import("./services/core.service").CommonOptions) => {
|
|
629
259
|
entity: import("@monorise/base").CreatedEntity<T> | undefined;
|
|
630
260
|
isLoading: boolean;
|
|
631
261
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
632
262
|
requestKey: string;
|
|
633
|
-
}, useEntities: <T extends Entity>(entityType: T, params?: {
|
|
263
|
+
}, useEntities: <T extends import("@monorise/base").Entity>(entityType: T, params?: {
|
|
634
264
|
skRange?: {
|
|
635
265
|
start: string;
|
|
636
266
|
end: string;
|
|
@@ -646,22 +276,19 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
646
276
|
value: string;
|
|
647
277
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
648
278
|
};
|
|
649
|
-
}, useMutual: <B extends Entity, T extends Entity>(byEntityType: B, entityType: T, byId: string | null, id: string, opts?: import("./services/core.service").CommonOptions & {
|
|
279
|
+
}, useMutual: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T, byId: string | null, id: string, opts?: import("./services/core.service").CommonOptions & {
|
|
650
280
|
defaultMutualData?: Record<string, any>;
|
|
651
281
|
}) => {
|
|
652
|
-
mutual?: Mutual<B, T>;
|
|
282
|
+
mutual?: import("@monorise/base").Mutual<B, T>;
|
|
653
283
|
isLoading: boolean;
|
|
654
284
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
655
285
|
requestKey: string;
|
|
656
|
-
}, 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>>;
|
|
286
|
+
}, useMutuals: <B extends import("@monorise/base").Entity, T extends import("@monorise/base").Entity>(byEntityType: B, entityType: T, byId?: string, opts?: import("./services/core.service").CommonOptions, chainEntityQuery?: string) => {
|
|
287
|
+
mutuals: import("@monorise/base").Mutual<B, T>[];
|
|
288
|
+
mutualsMap: Map<string, import("@monorise/base").Mutual<B, T>>;
|
|
659
289
|
isLoading: boolean;
|
|
660
290
|
requestKey: string;
|
|
661
291
|
error?: import("./types/api.type").ApplicationRequestError;
|
|
662
|
-
}, 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,
|
|
664
|
-
export default Monorise;
|
|
665
|
-
export { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|
|
666
|
-
export type { CreatedEntity, DraftEntity, Entity, EntitySchemaMap, } from '@monorise/base';
|
|
292
|
+
}, useEntityState: <T extends import("@monorise/base").Entity>(entityType: T) => Record<import("@monorise/base").Entity, import("./types/monorise.type").CommonStore<import("@monorise/base").CreatedEntity<import("@monorise/base").Entity>>>[T];
|
|
293
|
+
export { store, axios, authService, filestoreService, coreService, 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, };
|
|
667
294
|
//# sourceMappingURL=index.d.ts.map
|