@monorise/react 1.0.10 → 1.0.12
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 +94 -0
- package/actions/config.action.ts +51 -0
- package/actions/core.action.ts +940 -0
- package/dist/actions/core.action.d.ts.map +1 -1
- package/dist/actions/core.action.js +15 -0
- package/dist/actions/core.action.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/lib/api.ts +150 -0
- package/lib/constant.ts +1 -0
- package/lib/entity.ts +76 -0
- package/lib/utils.ts +12 -0
- package/package.json +1 -1
- package/services/auth.service.ts +65 -0
- package/services/core.service.ts +415 -0
- package/services/filestore.service.ts +136 -0
- package/store/monorise.store.ts +105 -0
- package/types/api.type.ts +57 -0
- package/types/axios.type.ts +14 -0
- package/types/monorise.type.ts +8 -0
- package/types/mutual.type.ts +32 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// types/axios.d.ts
|
|
2
|
+
import 'axios';
|
|
3
|
+
|
|
4
|
+
declare module 'axios' {
|
|
5
|
+
export interface AxiosRequestConfig {
|
|
6
|
+
requestKey: string;
|
|
7
|
+
isInterruptive?: boolean;
|
|
8
|
+
feedback?: {
|
|
9
|
+
loading?: string | boolean;
|
|
10
|
+
success?: ((data: any) => string) | string | boolean;
|
|
11
|
+
failure?: string | boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Entity, EntitySchemaMap } from '@monorise/base';
|
|
2
|
+
|
|
3
|
+
type MutualDataWithIndex = {
|
|
4
|
+
index: number;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// biome-ignore lint/suspicious/noEmptyInterface: To be extended via declare module
|
|
8
|
+
interface MutualDataMapping {}
|
|
9
|
+
|
|
10
|
+
type MutualData<
|
|
11
|
+
B extends Entity,
|
|
12
|
+
T extends Entity,
|
|
13
|
+
> = B extends keyof MutualDataMapping
|
|
14
|
+
? T extends keyof MutualDataMapping[B]
|
|
15
|
+
? MutualDataMapping[B][T]
|
|
16
|
+
: Record<string, any> // Fallback for unmatched T
|
|
17
|
+
: Record<string, any>;
|
|
18
|
+
|
|
19
|
+
type Mutual<B extends Entity = Entity, T extends Entity = Entity> = {
|
|
20
|
+
entityId: string;
|
|
21
|
+
entityType: T;
|
|
22
|
+
byEntityId: string;
|
|
23
|
+
byEntityType: B;
|
|
24
|
+
mutualId: string;
|
|
25
|
+
data: T extends keyof EntitySchemaMap ? EntitySchemaMap[T] : never;
|
|
26
|
+
mutualData: MutualData<B, T> | Record<string, any>;
|
|
27
|
+
createdAt: string;
|
|
28
|
+
updatedAt: string;
|
|
29
|
+
mutualUpdatedAt: string;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type { MutualDataWithIndex, MutualDataMapping, MutualData, Mutual };
|