@monorise/react 3.0.4-dev.3 → 3.0.6
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/actions/core.action.d.ts +2 -0
- package/dist/actions/core.action.d.ts.map +1 -1
- package/dist/index.d.ts +52 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/lib/api.d.ts +5 -5
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/services/auth.service.d.ts +3 -3
- package/dist/services/core.service.d.ts +16 -15
- package/dist/services/core.service.d.ts.map +1 -1
- package/dist/services/filestore.service.d.ts +1 -1
- package/dist/types/api.type.d.ts +5 -5
- package/dist/types/api.type.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -122,6 +122,7 @@ declare const initCoreActions: (monoriseStore: MonoriseStore, appActions: AppAct
|
|
|
122
122
|
end: string;
|
|
123
123
|
};
|
|
124
124
|
all?: boolean;
|
|
125
|
+
limit?: number;
|
|
125
126
|
}, opts?: CommonOptions & {
|
|
126
127
|
searchInterval?: number;
|
|
127
128
|
}) => {
|
|
@@ -156,6 +157,7 @@ declare const initCoreActions: (monoriseStore: MonoriseStore, appActions: AppAct
|
|
|
156
157
|
isFirstFetched?: boolean;
|
|
157
158
|
lastKey?: string;
|
|
158
159
|
listMore?: () => void;
|
|
160
|
+
refetch?: () => Promise<any>;
|
|
159
161
|
};
|
|
160
162
|
useTaggedEntities: <T extends Entity>(entityType: T, tagName: string, opts?: CommonOptions & {
|
|
161
163
|
params?: ListEntitiesByTagParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.action.d.ts","sourceRoot":"","sources":["../../actions/core.action.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,EAChB,MAAM,gBAAgB,CAAC;AAmBxB,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,uBAAuB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S,MAAM,cACnC,CAAC,YACH,MAAM,WACP,MAAM,WACN,uBAAuB;CA4CnC,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ 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
|
}) => {
|
|
@@ -163,6 +164,7 @@ 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;
|
|
@@ -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;
|
|
@@ -543,31 +545,31 @@ declare const Monorise: {
|
|
|
543
545
|
data: import("@monorise/base").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
550
|
data: import("@monorise/base").CreatedEntity<T>[];
|
|
549
|
-
}, any>>;
|
|
551
|
+
}, any, {}>>;
|
|
550
552
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
551
553
|
entities: import("@monorise/base").CreatedEntity<T>[];
|
|
552
554
|
lastKey: string;
|
|
553
|
-
}, any>>;
|
|
554
|
-
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
555
|
-
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
556
|
-
createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
557
|
-
upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
558
|
-
editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
559
|
-
updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
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("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
557
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
558
|
+
createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
559
|
+
upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
560
|
+
editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
561
|
+
updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").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;
|
|
@@ -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;
|
|
@@ -840,31 +842,31 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
840
842
|
data: import("@monorise/base").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
847
|
data: import("@monorise/base").CreatedEntity<T>[];
|
|
846
|
-
}, any>>;
|
|
848
|
+
}, any, {}>>;
|
|
847
849
|
listEntitiesByTag: (tagName: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<{
|
|
848
850
|
entities: import("@monorise/base").CreatedEntity<T>[];
|
|
849
851
|
lastKey: string;
|
|
850
|
-
}, any>>;
|
|
851
|
-
getEntity: (id: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
852
|
-
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
853
|
-
createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
854
|
-
upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
855
|
-
editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
856
|
-
updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any>>;
|
|
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("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
854
|
+
getEntityByUniqueField: (fieldName: string, value: string, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
855
|
+
createEntity: (values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
856
|
+
upsertEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
857
|
+
editEntity: (id: string, values: Partial<import("@monorise/base").DraftEntity<T>>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").CreatedEntity<T>, any, {}>>;
|
|
858
|
+
updateEntity: (id: string, values: import("@monorise/base").DraftEntity<T>, opts?: import("./services/core.service").CommonOptions) => Promise<AxiosResponse<import("@monorise/base").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;
|
|
@@ -996,6 +998,7 @@ declare const store: import("zustand").UseBoundStore<Omit<import("zustand").Stor
|
|
|
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
|
}) => {
|
|
@@ -1028,6 +1031,7 @@ 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
|
}) => {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,MAAM,EACN,UAAU,EACV,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,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ACT,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,aAAa,EACb,YAAY,EACZ,UAAU,EACV,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,MAAM,EACN,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,sBAAsB,EACtB,WAAW,EACX,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,SAAS,EACT,uBAAuB,EACvB,uBAAuB,GACxB,CAAC;AAEF,eAAe,QAAQ,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;AAEtE,YAAY,EACV,aAAa,EACb,WAAW,EACX,MAAM,EACN,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -368,7 +368,7 @@ var defaultOnError = (error) => {
|
|
|
368
368
|
var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
369
369
|
const { makeEntityService, makeMutualService } = coreService2;
|
|
370
370
|
const { checkIsLoading, getError: getError2, useLoadStore: useLoadStore2, useErrorStore: useErrorStore2 } = appActions;
|
|
371
|
-
const listEntities = async (entityType, params = {}, opts = {}) => {
|
|
371
|
+
const listEntities = async (entityType, params = { limit: 20 }, opts = {}) => {
|
|
372
372
|
var _a, _b;
|
|
373
373
|
const store2 = monoriseStore.getState();
|
|
374
374
|
const entityState = (_a = store2.entity[entityType]) != null ? _a : {};
|
|
@@ -388,7 +388,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
388
388
|
}
|
|
389
389
|
try {
|
|
390
390
|
const { data: result } = await entityService.listEntities(
|
|
391
|
-
__spreadProps(__spreadValues({}, (params == null ? void 0 : params.all) ? {} : { limit:
|
|
391
|
+
__spreadProps(__spreadValues({}, (params == null ? void 0 : params.all) ? {} : { limit: params == null ? void 0 : params.limit }), {
|
|
392
392
|
start: skRange == null ? void 0 : skRange.start,
|
|
393
393
|
end: skRange == null ? void 0 : skRange.end
|
|
394
394
|
}),
|
|
@@ -419,7 +419,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
419
419
|
}
|
|
420
420
|
};
|
|
421
421
|
const listMoreEntities2 = async (entityType, opts = {}) => {
|
|
422
|
-
var _a;
|
|
422
|
+
var _a, _b;
|
|
423
423
|
const requestKey = getEntityRequestKey("list", entityType);
|
|
424
424
|
const store2 = monoriseStore.getState();
|
|
425
425
|
const entityState = store2.entity[entityType];
|
|
@@ -437,7 +437,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
437
437
|
try {
|
|
438
438
|
const { data: result } = await entityService.listEntities(
|
|
439
439
|
{
|
|
440
|
-
limit: 20,
|
|
440
|
+
limit: (_b = opts.limit) != null ? _b : 20,
|
|
441
441
|
lastKey
|
|
442
442
|
},
|
|
443
443
|
opts
|
|
@@ -1354,7 +1354,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1354
1354
|
}
|
|
1355
1355
|
};
|
|
1356
1356
|
};
|
|
1357
|
-
const useEntities2 = (entityType, params = {}, opts = {}) => {
|
|
1357
|
+
const useEntities2 = (entityType, params = { limit: 20 }, opts = {}) => {
|
|
1358
1358
|
const requestKey = getEntityRequestKey("list", entityType);
|
|
1359
1359
|
const isListing = useLoadStore2(requestKey);
|
|
1360
1360
|
const error = useErrorStore2(requestKey);
|
|
@@ -1366,6 +1366,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1366
1366
|
const [query, setQuery] = useState2("");
|
|
1367
1367
|
const [skRange, setBetween] = useState2(params.skRange);
|
|
1368
1368
|
const [all, setAll] = useState2(params.all);
|
|
1369
|
+
const [limit, setLimit] = useState2(params.limit);
|
|
1369
1370
|
const [isSearching, setIsSearching] = useState2(false);
|
|
1370
1371
|
const isLoading = isListing || isSearching;
|
|
1371
1372
|
useEffect2(() => {
|
|
@@ -1378,11 +1379,16 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1378
1379
|
setAll(params.all);
|
|
1379
1380
|
}
|
|
1380
1381
|
}, [all, params.all]);
|
|
1382
|
+
useEffect2(() => {
|
|
1383
|
+
if ((params == null ? void 0 : params.limit) !== limit) {
|
|
1384
|
+
setLimit(params.limit);
|
|
1385
|
+
}
|
|
1386
|
+
}, [limit, params.limit]);
|
|
1381
1387
|
useEffect2(() => {
|
|
1382
1388
|
if (!isFirstFetched || (opts == null ? void 0 : opts.forceFetch)) {
|
|
1383
|
-
listEntities(entityType, { skRange, all }, opts);
|
|
1389
|
+
listEntities(entityType, { skRange, all, limit }, opts);
|
|
1384
1390
|
}
|
|
1385
|
-
}, [all, entityType, skRange, opts, isFirstFetched, opts == null ? void 0 : opts.forceFetch]);
|
|
1391
|
+
}, [all, entityType, skRange, opts, isFirstFetched, opts == null ? void 0 : opts.forceFetch, limit]);
|
|
1386
1392
|
useEffect2(() => {
|
|
1387
1393
|
var _a;
|
|
1388
1394
|
let queryTimeout;
|
|
@@ -1445,6 +1451,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
|
|
|
1445
1451
|
listMore: async () => {
|
|
1446
1452
|
if (!lastKey) return;
|
|
1447
1453
|
await listMoreEntities2(entityType, __spreadProps(__spreadValues({}, opts), {
|
|
1454
|
+
limit,
|
|
1448
1455
|
forceFetch: true
|
|
1449
1456
|
}));
|
|
1450
1457
|
}
|