Updates
This commit is contained in:
parent
acccc26c38
commit
cda056311b
2
dist/package-shared/types/index.d.ts
vendored
2
dist/package-shared/types/index.d.ts
vendored
@ -2313,7 +2313,7 @@ export type APIPathsPostResulstsFn<T extends {
|
||||
[k: string]: any;
|
||||
}> = (params: APIPathsCrudParams<T> & {
|
||||
res?: APIResponseObject;
|
||||
}) => Promise<APIPathsBody<T> | undefined>;
|
||||
}) => Promise<void>;
|
||||
export type APIPathsParamsAllowedTable = {
|
||||
table: string;
|
||||
allowedFields?: (string | RegExp)[];
|
||||
|
||||
@ -962,7 +962,7 @@ export type AddApiKeyRequestBody = {
|
||||
};
|
||||
|
||||
export type CheckApiCredentialsFn = (
|
||||
param: CheckApiCredentialsFnParam
|
||||
param: CheckApiCredentialsFnParam,
|
||||
) => ApiKeyObject | null | undefined;
|
||||
export type CheckApiCredentialsFnParam = {
|
||||
key?: string;
|
||||
@ -975,7 +975,7 @@ export type CheckApiCredentialsFnParam = {
|
||||
export type FetchApiFn = (
|
||||
url: string,
|
||||
options?: FetchApiOptions,
|
||||
csrf?: boolean
|
||||
csrf?: boolean,
|
||||
) => Promise<any>;
|
||||
|
||||
export type FetchApiOptions = RequestInit & {
|
||||
@ -1030,7 +1030,7 @@ export const ServerQueryEqualities = [
|
||||
|
||||
export type ServerQueryParam<
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = {
|
||||
selectFields?: (keyof T | TableSelectFieldsObject<T>)[];
|
||||
omitFields?: (keyof T)[];
|
||||
@ -1056,14 +1056,14 @@ export type ServerQueryParam<
|
||||
};
|
||||
|
||||
export type ServerQueryParamOrder<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
field: keyof T;
|
||||
strategy: "ASC" | "DESC";
|
||||
};
|
||||
|
||||
export type ServerQueryParamFullTextSearch<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
fields: (keyof T)[];
|
||||
searchTerm: string;
|
||||
@ -1088,7 +1088,7 @@ export type ServerQueryParamsCountSrcTrgMap = {
|
||||
};
|
||||
|
||||
export type TableSelectFieldsObject<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
fieldName: keyof T;
|
||||
alias?: string;
|
||||
@ -1108,7 +1108,7 @@ export type ServerQueryObjectValue =
|
||||
|
||||
export type ServerQueryObject<
|
||||
T extends object = { [key: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = {
|
||||
value?: ServerQueryObjectValue;
|
||||
nullValue?: boolean;
|
||||
@ -1128,7 +1128,7 @@ export type ServerQueryObject<
|
||||
|
||||
export type ServerQueryQueryObject<
|
||||
T extends object = { [key: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = {
|
||||
[key in keyof T]: ServerQueryObject<T, K>;
|
||||
};
|
||||
@ -1147,7 +1147,7 @@ export type AuthFetchQuery = ServerQueryParam & {
|
||||
|
||||
export type ServerQueryParamsJoin<
|
||||
Table extends string = string,
|
||||
Field extends object = { [key: string]: any }
|
||||
Field extends object = { [key: string]: any },
|
||||
> = {
|
||||
joinType: "INNER JOIN" | "JOIN" | "LEFT JOIN" | "RIGHT JOIN";
|
||||
alias?: string;
|
||||
@ -1175,7 +1175,7 @@ export type ServerQueryParamsJoin<
|
||||
};
|
||||
|
||||
export type ServerQueryParamsJoinMatchObject<
|
||||
Field extends object = { [key: string]: any }
|
||||
Field extends object = { [key: string]: any },
|
||||
> = {
|
||||
/** Field name from the **Root Table** */
|
||||
source: string | ServerQueryParamsJoinMatchSourceTargetObject;
|
||||
@ -1257,7 +1257,7 @@ export type APICreateUserFunctionParams = {
|
||||
};
|
||||
|
||||
export type APICreateUserFunction = (
|
||||
params: APICreateUserFunctionParams
|
||||
params: APICreateUserFunctionParams,
|
||||
) => Promise<AddUserFunctionReturn>;
|
||||
|
||||
/**
|
||||
@ -1284,7 +1284,7 @@ export type APIGoogleLoginFunctionParams = {
|
||||
};
|
||||
|
||||
export type APIGoogleLoginFunction = (
|
||||
params: APIGoogleLoginFunctionParams
|
||||
params: APIGoogleLoginFunctionParams,
|
||||
) => Promise<APILoginFunctionReturn>;
|
||||
|
||||
/**
|
||||
@ -1329,7 +1329,7 @@ export type HandleSocialDbFunctionReturn = {
|
||||
* @returns {Promise<HandleSocialDbFunctionReturn>} - Response object
|
||||
*/
|
||||
export type HandleSocialDbFunction = (
|
||||
params: HandleSocialDbFunctionParams
|
||||
params: HandleSocialDbFunctionParams,
|
||||
) => Promise<APILoginFunctionReturn>;
|
||||
|
||||
export type ApiReauthUserReturn = {
|
||||
@ -1451,7 +1451,7 @@ export type CookieObject = {
|
||||
};
|
||||
|
||||
export type HttpRequestParams<
|
||||
ReqObj extends { [k: string]: any } = { [k: string]: any }
|
||||
ReqObj extends { [k: string]: any } = { [k: string]: any },
|
||||
> = RequestOptions & {
|
||||
scheme?: "http" | "https";
|
||||
body?: ReqObj;
|
||||
@ -1461,11 +1461,11 @@ export type HttpRequestParams<
|
||||
|
||||
export type HttpRequestFunction<
|
||||
ReqObj extends { [k: string]: any } = { [k: string]: any },
|
||||
ResObj extends { [k: string]: any } = { [k: string]: any }
|
||||
ResObj extends { [k: string]: any } = { [k: string]: any },
|
||||
> = (param: HttpRequestParams<ReqObj>) => Promise<HttpFunctionResponse<ResObj>>;
|
||||
|
||||
export type HttpFunctionResponse<
|
||||
ResObj extends { [k: string]: any } = { [k: string]: any }
|
||||
ResObj extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
status: number;
|
||||
data?: ResObj;
|
||||
@ -1475,7 +1475,7 @@ export type HttpFunctionResponse<
|
||||
};
|
||||
|
||||
export type ApiGetQueryObject<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
query: ServerQueryParam<T>;
|
||||
table: string;
|
||||
@ -1501,7 +1501,7 @@ export const DataCrudRequestMethodsLowerCase = [
|
||||
] as const;
|
||||
|
||||
export type DsqlMethodCrudParam<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
> = {
|
||||
method: (typeof DataCrudRequestMethods)[number];
|
||||
body?: T;
|
||||
@ -1521,7 +1521,7 @@ export type DsqlMethodCrudParam<
|
||||
};
|
||||
|
||||
export type DsqlCrudTransformDataFunction<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
> = (params: {
|
||||
data: T;
|
||||
user?: DATASQUIREL_LoggedInUser;
|
||||
@ -1530,7 +1530,7 @@ export type DsqlCrudTransformDataFunction<
|
||||
}) => Promise<T>;
|
||||
|
||||
export type DsqlCrudTransformQueryFunction<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
> = (params: {
|
||||
query: DsqlCrudQueryObject<T>;
|
||||
user?: DATASQUIREL_LoggedInUser;
|
||||
@ -1541,13 +1541,13 @@ export const DsqlCrudActions = ["insert", "update", "delete", "get"] as const;
|
||||
|
||||
export type DsqlCrudQueryObject<
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = ServerQueryParam<T, K> & {
|
||||
query?: ServerQueryQueryObject<T, K>;
|
||||
};
|
||||
|
||||
export type SQLDeleteGeneratorParams<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
> = {
|
||||
tableName: string;
|
||||
deleteKeyValues?: SQLDeleteData<T>[];
|
||||
@ -1557,7 +1557,7 @@ export type SQLDeleteGeneratorParams<
|
||||
};
|
||||
|
||||
export type SQLDeleteData<
|
||||
T extends { [key: string]: any } = { [key: string]: any }
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
> = {
|
||||
key: keyof T;
|
||||
value: string | number | null | undefined;
|
||||
@ -1566,7 +1566,7 @@ export type SQLDeleteData<
|
||||
|
||||
export type DsqlCrudParam<
|
||||
T extends { [key: string]: any } = { [key: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = {
|
||||
action: (typeof DsqlCrudActions)[number];
|
||||
table: K;
|
||||
@ -1730,7 +1730,7 @@ export type ResponseQueryObject = {
|
||||
};
|
||||
|
||||
export type APIResponseObject<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
success: boolean;
|
||||
payload?: T[] | null;
|
||||
@ -2152,7 +2152,7 @@ export const InvitedUserSelectFields = [
|
||||
] as const;
|
||||
|
||||
export type DefaultLocalResourcesHookParams<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
refresh?: number;
|
||||
setLoading?: React.Dispatch<React.SetStateAction<boolean>>;
|
||||
@ -2597,7 +2597,7 @@ export type SendEmailCodeParams = {
|
||||
export type UpdateUserParams<
|
||||
T extends DSQL_DATASQUIREL_USERS = DSQL_DATASQUIREL_USERS & {
|
||||
[k: string]: any;
|
||||
}
|
||||
},
|
||||
> = {
|
||||
apiKey?: string;
|
||||
database: string;
|
||||
@ -2622,7 +2622,7 @@ export type ResetPasswordParams = {
|
||||
export type ApiUpdateUserParams<
|
||||
T extends DSQL_DATASQUIREL_USERS = DSQL_DATASQUIREL_USERS & {
|
||||
[k: string]: any;
|
||||
}
|
||||
},
|
||||
> = {
|
||||
payload: T;
|
||||
database: string;
|
||||
@ -2904,7 +2904,7 @@ export type CRUDAPIHandlerParams = {
|
||||
};
|
||||
|
||||
export type CrudQueryObject<
|
||||
P extends { [k: string]: any } = { [k: string]: any }
|
||||
P extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
paths?: string[];
|
||||
query?: DsqlCrudQueryObject<P>;
|
||||
@ -2913,7 +2913,7 @@ export type CrudQueryObject<
|
||||
};
|
||||
|
||||
export type APIPathsParams<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
/**
|
||||
* Full URL with http and query
|
||||
@ -2948,14 +2948,14 @@ export type APIPathsParams<
|
||||
};
|
||||
|
||||
export type APIPathsBody<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = APIPathsQuery<T> & {
|
||||
data?: T;
|
||||
batchData?: T[];
|
||||
};
|
||||
|
||||
export type APIPathsQuery<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
searchQuery?: DsqlCrudQueryObject<T>;
|
||||
crudParams?: Pick<
|
||||
@ -2972,7 +2972,7 @@ export type APIPathsQuery<
|
||||
};
|
||||
|
||||
export type APIPathsParamsGetMiddleware<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = (params: {
|
||||
query: APIPathsQuery<T>;
|
||||
table: string;
|
||||
@ -2981,7 +2981,7 @@ export type APIPathsParamsGetMiddleware<
|
||||
|
||||
export type APIPathsParamsCrudMiddleware<
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = (params: {
|
||||
body: APIPathsBody<T>;
|
||||
query: DsqlCrudQueryObject<T>;
|
||||
@ -2990,12 +2990,12 @@ export type APIPathsParamsCrudMiddleware<
|
||||
}) => Promise<APIPathsBody<T> | undefined>;
|
||||
|
||||
export type APIPathsPostResulstsFn<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = (
|
||||
params: APIPathsCrudParams<T> & {
|
||||
res?: APIResponseObject;
|
||||
}
|
||||
) => Promise<APIPathsBody<T> | undefined>;
|
||||
},
|
||||
) => Promise<void>;
|
||||
|
||||
export type APIPathsParamsAllowedTable = {
|
||||
table: string;
|
||||
@ -3004,7 +3004,7 @@ export type APIPathsParamsAllowedTable = {
|
||||
};
|
||||
|
||||
export type APIPathsCrudParams<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = APIPathsParams<T> & {
|
||||
isAuthorized?: boolean;
|
||||
table: string;
|
||||
@ -3014,7 +3014,7 @@ export type APIPathsCrudParams<
|
||||
};
|
||||
|
||||
export type APIPathsData<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
table: string;
|
||||
targetId?: string;
|
||||
@ -3024,7 +3024,7 @@ export type APIPathsData<
|
||||
|
||||
export type ClientCrudFetchParams<
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
P = string
|
||||
P = string,
|
||||
> = Omit<DSQLFetchApiOptions<T>, "method"> & {
|
||||
table: P;
|
||||
method?: DSQLFetchApiOptions<T>["method"];
|
||||
@ -3037,7 +3037,7 @@ export type ClientCrudFetchParams<
|
||||
};
|
||||
|
||||
export type DSQLFetchApiOptions<
|
||||
T extends { [k: string]: any } = { [k: string]: any }
|
||||
T extends { [k: string]: any } = { [k: string]: any },
|
||||
> = {
|
||||
method:
|
||||
| "POST"
|
||||
@ -3059,7 +3059,7 @@ export type DSQLFetchApiOptions<
|
||||
|
||||
export type AddDbEntryParam<
|
||||
T extends { [k: string]: any } = any,
|
||||
K extends string = string
|
||||
K extends string = string,
|
||||
> = {
|
||||
dbContext?: (typeof DbContextsArray)[number];
|
||||
paradigm?: "Read Only" | "Full Access";
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@moduletrace/datasquirel",
|
||||
"version": "5.7.30",
|
||||
"version": "5.7.31",
|
||||
"description": "Cloud-based SQL data management tool",
|
||||
"main": "dist/index.js",
|
||||
"bin": {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user