@wenex/sdk 1.2.6 → 1.2.7
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.
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from 'axios';
|
|
2
2
|
import { Filter, Pagination } from '../interfaces/mongo';
|
|
3
3
|
import { Core, Metadata, Optional } from '../interfaces';
|
|
4
|
+
type Zone = 'client' | 'share' | 'own' | 'group';
|
|
5
|
+
type Permute<T extends string, U extends string = T> = T extends any ? T | `${T},${Permute<Exclude<U, T>>}` : never;
|
|
6
|
+
type ZoneList = Permute<Zone>;
|
|
4
7
|
export type RequestConfig<T extends object = Core> = Omit<AxiosRequestConfig, 'params' | 'headers'> & {
|
|
5
8
|
params?: Optional<Filter<T>> & {
|
|
6
|
-
zone?:
|
|
9
|
+
zone?: ZoneList;
|
|
7
10
|
skip?: number;
|
|
8
11
|
limit?: number;
|
|
9
12
|
sort?: Pagination<T>['sort'];
|
|
@@ -24,3 +27,4 @@ export type RequestConfig<T extends object = Core> = Omit<AxiosRequestConfig, 'p
|
|
|
24
27
|
export type ResponseType<T extends object = Core, D = any, C extends RequestConfig<T> | undefined = RequestConfig<T>> = C extends {
|
|
25
28
|
fullResponse: true;
|
|
26
29
|
} ? T : D;
|
|
30
|
+
export {};
|
|
@@ -27,7 +27,7 @@ export declare function getParams(config?: RequestConfig<any>, queryOrFilter?: Q
|
|
|
27
27
|
projection?: import("../interfaces/mongo").Projection<any> | undefined;
|
|
28
28
|
pagination?: import("../interfaces/mongo").Pagination<any> | undefined;
|
|
29
29
|
query?: Query<any> | undefined;
|
|
30
|
-
zone?:
|
|
30
|
+
zone?: "share" | "client" | "own" | "group" | "own,group" | "group,own" | "client,own" | "client,group" | "client,own,group" | "client,group,own" | "group,client" | "own,client" | "own,client,group" | "own,group,client" | "group,client,own" | "group,own,client" | "share,client" | "share,own" | "share,group" | "share,own,group" | "share,group,own" | "share,client,own" | "share,client,group" | "share,client,own,group" | "share,client,group,own" | "share,group,client" | "share,own,client" | "share,own,client,group" | "share,own,group,client" | "share,group,client,own" | "share,group,own,client" | "group,share" | "own,share" | "own,share,group" | "own,group,share" | "group,share,own" | "group,own,share" | "client,share" | "client,share,own" | "client,share,group" | "client,share,own,group" | "client,share,group,own" | "client,group,share" | "client,own,share" | "client,own,share,group" | "client,own,group,share" | "client,group,share,own" | "client,group,own,share" | "group,share,client" | "group,client,share" | "own,share,client" | "own,share,client,group" | "own,share,group,client" | "own,client,share" | "own,client,share,group" | "own,client,group,share" | "own,group,share,client" | "own,group,client,share" | "group,share,client,own" | "group,share,own,client" | "group,client,share,own" | "group,client,own,share" | "group,own,share,client" | "group,own,client,share";
|
|
31
31
|
skip?: number;
|
|
32
32
|
limit?: number;
|
|
33
33
|
sort?: {
|