kapix-graphql-prisma-client
Advanced tools
Comparing version 1.0.37 to 1.0.38
@@ -1,7 +0,8 @@ | ||
import { G as r, z as s, A as t } from "./index-fae31a26.js"; | ||
import { G as i, z as o, A as s, B as t } from "./index-eb1b41a0.js"; | ||
import "lodash-es"; | ||
export { | ||
r as GraphqlRequestQueryMode, | ||
s as defineModel, | ||
t as formatValue | ||
i as GraphqlRequestQueryMode, | ||
o as defineModel, | ||
s as formatValue, | ||
t as primitiveService | ||
}; |
@@ -29,5 +29,3 @@ | ||
interface IRandNumberOptions { | ||
/** @default 0 */ | ||
min?: number | ||
/** @default 9999 */ | ||
max?: number | ||
@@ -310,3 +308,3 @@ } | ||
export function createManyGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: ICreateManyGraphqlRequest<T> | ||
@@ -320,3 +318,3 @@ ): Promise<IManyMutationSelect> | ||
export function createOneGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: ICreateOneGraphqlRequest<T> | ||
@@ -332,3 +330,3 @@ ): Promise<T['$prototype']['entityType']> | ||
export function updateManyGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IUpdateManyGraphqlRequest<T> | ||
@@ -344,3 +342,3 @@ ): Promise<IManyMutationSelect> | ||
export function updateOneGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IUpdateOneGraphqlRequest<T> | ||
@@ -355,3 +353,3 @@ ): Promise<T['$prototype']['entityType']> | ||
export function deleteManyGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IDeleteManyGraphqlRequest<T> | ||
@@ -365,3 +363,3 @@ ): Promise<IManyMutationSelect> | ||
export function deleteOneGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IDeleteOneGraphqlRequest<T> | ||
@@ -388,3 +386,3 @@ ): Promise<T['$prototype']['entityType']> | ||
export function getListEndpointGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IGetListGraphqlRequestQueryOptions<T> | ||
@@ -400,3 +398,3 @@ ): Promise<ListResult<PartialWithUniqueKey<T['$prototype']['fullEntityType']>>> | ||
export function getOneEndpointGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: IGetOneGraphqlRequestQueryOptions<T> | ||
@@ -414,3 +412,3 @@ ): Promise<Nullable<PartialWithUniqueKey<T['$prototype']['fullEntityType']>>> | ||
export function getCountEndpointGraphqlRequest<T extends IEntityModel> ( | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
request?: ICountGraphqlRequestQueryOptions<T> | ||
@@ -507,15 +505,5 @@ ): Promise<number> | ||
export interface IMockConfig { | ||
/** | ||
* @default 200 | ||
*/ | ||
maxItems: number | ||
/** | ||
* @default { min: 10, max: 50 } | ||
*/ | ||
randNumberOfItemsOptions: IRandNumberOptions | ||
/** | ||
* @default 15% | ||
*/ | ||
percentageOfNullWhenFieldNotRequired: number | ||
values?: (field: IFieldConfig, fieldName: string) => Array<any> | ||
@@ -786,3 +774,3 @@ } | ||
declare module 'kapix-graphql-prisma-client' { | ||
import { defineEntityName, defineEntityModel, IGraphqlClientServiceOptions, IGraphqlClientService, GraphqlRequestQueryMode } from 'kapix-graphql-prisma-client-type' | ||
import { defineEntityName, defineEntityModel, IGraphqlClientServiceOptions } from 'kapix-graphql-prisma-client-type' | ||
export { GraphqlRequestQueryMode } from 'kapix-graphql-prisma-client-type' | ||
@@ -796,2 +784,21 @@ | ||
) => T): T | ||
export const primitiveService = defineModel({} as IGraphqlClientServiceOptions, (defineEntityModelFunc, defineEntityNameFunc) => ({ | ||
number: defineEntityModelFunc(defineEntityNameFunc<{ value: number }>('number'), { | ||
fields: { | ||
value: { | ||
type: 'number' | ||
} | ||
}, | ||
endpoints: {} | ||
}), | ||
string: defineEntityModelFunc(defineEntityNameFunc<{ value: string }>('string'), { | ||
fields: { | ||
value: { | ||
type: 'string' | ||
} | ||
}, | ||
endpoints: {} | ||
}) | ||
})) | ||
} |
@@ -7,3 +7,3 @@ { | ||
"type": "module", | ||
"version": "1.0.37", | ||
"version": "1.0.38", | ||
"author": "Sparda", | ||
@@ -10,0 +10,0 @@ "license": "LicenseRef-LICENSE", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3326216
17319