@web-ts-toolkit/access-router 0.3.0 → 0.4.0
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/advanced.d.mts +3 -134
- package/advanced.d.ts +3 -134
- package/advanced.js +323 -17
- package/advanced.mjs +312 -17
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.js +358 -40
- package/index.mjs +347 -40
- package/package.json +3 -3
- package/{service-DLKAswCS.d.mts → parsers-CsyGHYQR.d.mts} +349 -48
- package/{service-DLKAswCS.d.ts → parsers-CsyGHYQR.d.ts} +349 -48
package/advanced.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export { A as AccessRouterBaseRequest, c as AccessRouterFieldKey, d as AccessRouterLogger, e as AccessRouterRequest, f as AccessRouterRequestExtensions, g as AfterPersistAccess, B as BaseFilterAccess, C as Codes, h as CreateArgs, i as CreateOptions, j as CustomHeaders, D as DataBaseFilterHook, k as DataFilter, l as DataFindArgs, m as DataFindOneArgs, n as DataFindOneOptions, o as DataFindOptions, p as DataHook, q as DataHookContext, r as DataIdentifierHook, s as DataListHook, t as DataOverrideFilterHook, u as DataRequest, v as DataRequestSchemas, w as DataRouterOptions, x as DecorateAccess, y as DecorateAllAccess, z as DeepFieldPath, E as DefaultModelRouterOptions, G as Defaults, H as DistinctArgs, J as DocPermissionsAccess, K as ErrorResult, L as ExistsOptions, M as ExtendedDataRouterOptions, N as ExtendedDefaultModelRouterOptions, O as ExtendedModelRouterOptions, Q as FilterOperator, R as FindAccess, U as FindArgs, V as FindByIdArgs, W as FindByIdOptions, X as FindOneArgs, Y as FindOneOptions, Z as FindOptions, _ as GlobalOptions, $ as GlobalPermissionValue, a0 as GuardHook, a1 as IdentifierHook, a2 as KeyValueProjection, a3 as ListResult, a4 as MaybePromise, a5 as ModelBaseFilterHook, a6 as ModelChangeHook, a7 as ModelDeleteHook, a8 as ModelDocPermissionsHook, a9 as ModelDocument, aa as ModelDocumentHook, ab as ModelHook, ac as ModelHookContext, ad as ModelIdentifierHook, ae as ModelListHook, af as ModelOverrideFilterHook, ag as ModelRequest, ah as ModelRouterOptions, ai as ModelValidateHook, aj as PathValue, ak as PermissionSchema, al as PopulateAccess, am as PrepareAccess, an as PublicCreateArgs, ao as PublicCreateOptions, ap as PublicListArgs, aq as PublicListOptions, ar as PublicOutput, as as PublicReadArgs, at as PublicReadOptions, au as PublicUpdateArgs, av as PublicUpdateOptions, aw as PublicUpsertArgs, ax as PublicUpsertOptions, ay as Request, az as RequestSchemas, aA as RootDataListQueryEntry, aB as RootDataOperation, aC as RootDataReadByFilterQueryEntry, aD as RootDataReadByIdQueryEntry, aE as RootModelCountQueryEntry, aF as RootModelCreateQueryEntry, aG as RootModelDeleteQueryEntry, aH as RootModelDistinctQueryEntry, aI as RootModelListQueryEntry, aJ as RootModelNewQueryEntry, aK as RootModelOperation, aL as RootModelReadByFilterQueryEntry, aM as RootModelReadByIdQueryEntry, aN as RootModelSubBulkUpdateQueryEntry, aO as RootModelSubCreateQueryEntry, aP as RootModelSubDeleteQueryEntry, aQ as RootModelSubListQueryEntry, aR as RootModelSubReadQueryEntry, aS as RootModelSubUpdateQueryEntry, aT as RootModelUpdateQueryEntry, aU as RootModelUpsertQueryEntry, aV as RootOperationResult, aW as RootQueryEntry, aX as RootRouterOptions, aY as RootSubOperation, aZ as RootTarget, a_ as RouteGuardAccess, a$ as SelectAccess, b0 as SelectedPopulatedPublicOutput, b1 as SelectedPublicOutput, b2 as ServiceResult, b3 as SingleResult, b4 as SortOrder, b5 as StatusCodes, b6 as SubQueryEntry, b7 as TransformAccess, b8 as TypedFilter, b9 as UpdateByIdArgs, ba as UpdateByIdOptions, bb as UpdateOneArgs, bc as UpdateOneOptions, bd as UpsertArgs, be as UpsertOptions, bf as ValidateAccess, bg as ValidateRule, bh as Validation } from './service-DLKAswCS.mjs';
|
|
1
|
+
export { A as AccessRouterBaseRequest, a as AccessRouterFieldKey, b as AccessRouterLogger, c as AccessRouterRequest, d as AccessRouterRequestExtensions, e as AdvancedCreateBody, f as AdvancedListBody, g as AdvancedReadBody, h as AdvancedReadFilterBody, i as AdvancedUpdateBody, j as AdvancedUpsertBody, k as AfterPersistAccess, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, p as ArkTypeProblemLike, B as BaseFilterAccess, C as Codes, q as CountBody, r as CreateArgs, s as CreateOptions, t as CreateQueryInput, u as CustomHeaders, D as DataBaseFilterHook, v as DataFilter, w as DataFindArgs, x as DataFindOneArgs, y as DataFindOneOptions, z as DataFindOptions, E as DataHook, F as DataHookContext, G as DataIdentifierHook, H as DataListHook, I as DataOverrideFilterHook, J as DataRequest, K as DataRequestSchemas, L as DataRouterOptions, M as DecorateAccess, N as DecorateAllAccess, O as DeepFieldPath, P as DefaultModelRouterOptions, Q as Defaults, R as DistinctArgs, S as DistinctBody, T as DocPermissionsAccess, U as ErrorResult, V as ExistsOptions, W as ExtendedDataRouterOptions, X as ExtendedDefaultModelRouterOptions, Y as ExtendedModelRouterOptions, Z as Filter, _ as FilterOperator, $ as FindAccess, a0 as FindArgs, a1 as FindByIdArgs, a2 as FindByIdOptions, a3 as FindOneArgs, a4 as FindOneOptions, a5 as FindOptions, a6 as GlobalOptions, a7 as GlobalPermissionValue, a8 as GuardHook, a9 as IdentifierHook, aa as Include, ab as IoTsContextEntryLike, ac as IoTsDecodeErrorLike, ad as IoTsDecoderLike, ae as JoiSchemaLike, af as JoiValidationErrorDetailLike, ag as KeyValueProjection, ah as ListQueryInput, ai as ListResult, aj as MaybePromise, ak as ModelBaseFilterHook, al as ModelChangeHook, am as ModelDeleteHook, an as ModelDocPermissionsHook, ao as ModelDocument, ap as ModelDocumentHook, aq as ModelHook, ar as ModelHookContext, as as ModelIdentifierHook, at as ModelListHook, au as ModelOverrideFilterHook, av as ModelRequest, aw as ModelRouterOptions, ax as ModelValidateHook, ay as PathValue, az as PermissionSchema, aA as Populate, aB as PopulateAccess, aC as PrepareAccess, aD as Projection, aE as PublicCreateArgs, aF as PublicCreateOptions, aG as PublicListArgs, aH as PublicListOptions, aI as PublicOutput, aJ as PublicReadArgs, aK as PublicReadOptions, aL as PublicUpdateArgs, aM as PublicUpdateOptions, aN as PublicUpsertArgs, aO as PublicUpsertOptions, aP as ReadQueryInput, aQ as Request, aR as RequestSchemaAdapter, aS as RequestSchemaFailure, aT as RequestSchemaIssue, aU as RequestSchemaLike, aV as RequestSchemaResult, aW as RequestSchemaSuccess, aX as RequestSchemaValidator, aY as RequestSchemas, aZ as RootDataListQueryEntry, a_ as RootDataOperation, a$ as RootDataReadByFilterQueryEntry, b0 as RootDataReadByIdQueryEntry, b1 as RootModelCountQueryEntry, b2 as RootModelCreateQueryEntry, b3 as RootModelDeleteQueryEntry, b4 as RootModelDistinctQueryEntry, b5 as RootModelListQueryEntry, b6 as RootModelNewQueryEntry, b7 as RootModelOperation, b8 as RootModelReadByFilterQueryEntry, b9 as RootModelReadByIdQueryEntry, ba as RootModelSubBulkUpdateQueryEntry, bb as RootModelSubCreateQueryEntry, bc as RootModelSubDeleteQueryEntry, bd as RootModelSubListQueryEntry, be as RootModelSubReadQueryEntry, bf as RootModelSubUpdateQueryEntry, bg as RootModelUpdateQueryEntry, bh as RootModelUpsertQueryEntry, bi as RootOperationResult, bj as RootQueryEntry, bk as RootRouterOptions, bl as RootSubOperation, bm as RootTarget, bn as RouteGuardAccess, bo as SelectAccess, bp as SelectedPopulatedPublicOutput, bq as SelectedPublicOutput, br as ServiceResult, bs as SingleResult, bt as Sort, bu as SortOrder, bv as StandardSchemaFailure, bw as StandardSchemaInferOutput, bx as StandardSchemaIssue, by as StandardSchemaPathSegment, bz as StandardSchemaResult, bA as StandardSchemaSuccess, bB as StandardSchemaV1, bC as StatusCodes, bD as SubListBody, bE as SubPopulate, bF as SubQueryEntry, bG as SubReadBody, bH as SuperstructFailureLike, bI as SuperstructValidateLike, bJ as Task, bK as TransformAccess, bL as TypedFilter, bM as UpdateByIdArgs, bN as UpdateByIdOptions, bO as UpdateOneArgs, bP as UpdateOneOptions, bQ as UpdateQueryInput, bR as UpsertArgs, bS as UpsertOptions, bT as UpsertQueryInput, bU as ValibotIssueLike, bV as ValibotPathItemLike, bW as ValibotSafeParseLike, bX as ValibotSafeParseResult, bY as ValidateAccess, bZ as ValidateRule, b_ as Validation, b$ as ValidationError, c0 as VineValidationErrorLike, c1 as VineValidationMessageLike, c2 as VineValidatorLike, c3 as YupSchemaLike, c4 as YupValidationErrorLike, c5 as defineRequestSchema, c6 as fromAjv, c7 as fromArkType, c8 as fromIoTs, c9 as fromJoi, ca as fromStandardSchema, cb as fromSuperstruct, cc as fromValibot, cd as fromVine, ce as fromYup, cf as fromZod, cg as parseBody, ch as parseBodyWithSchema, ci as parseNestedBodyWithSchema, cj as parsePathParam, ck as parseQuery } from './parsers-CsyGHYQR.mjs';
|
|
3
2
|
import { z } from 'zod';
|
|
4
|
-
import 'express';
|
|
5
3
|
import 'mongoose';
|
|
6
4
|
import 'deep-diff';
|
|
5
|
+
import 'express';
|
|
7
6
|
|
|
8
7
|
declare const MIDDLEWARE: unique symbol;
|
|
9
8
|
declare const DATA_MIDDLEWARE: unique symbol;
|
|
@@ -11,136 +10,6 @@ declare const CORE: unique symbol;
|
|
|
11
10
|
declare const PERMISSIONS: unique symbol;
|
|
12
11
|
declare const PERMISSION_KEYS: unique symbol;
|
|
13
12
|
|
|
14
|
-
type ValidationError = {
|
|
15
|
-
detail: string;
|
|
16
|
-
pointer?: string;
|
|
17
|
-
parameter?: string;
|
|
18
|
-
};
|
|
19
|
-
type ListQueryInput = {
|
|
20
|
-
skip?: string;
|
|
21
|
-
limit?: string;
|
|
22
|
-
page?: string;
|
|
23
|
-
page_size?: string;
|
|
24
|
-
skim?: 'true' | 'false';
|
|
25
|
-
include_permissions?: 'true' | 'false';
|
|
26
|
-
include_count?: 'true' | 'false';
|
|
27
|
-
include_extra_headers?: 'true' | 'false';
|
|
28
|
-
};
|
|
29
|
-
type CreateQueryInput = {
|
|
30
|
-
include_permissions?: 'true' | 'false';
|
|
31
|
-
};
|
|
32
|
-
type ReadQueryInput = {
|
|
33
|
-
include_permissions?: 'true' | 'false';
|
|
34
|
-
try_list?: 'true' | 'false';
|
|
35
|
-
};
|
|
36
|
-
type UpdateQueryInput = {
|
|
37
|
-
returning_all?: 'true' | 'false';
|
|
38
|
-
};
|
|
39
|
-
type UpsertQueryInput = {
|
|
40
|
-
returning_all?: 'true' | 'false';
|
|
41
|
-
include_permissions?: 'true' | 'false';
|
|
42
|
-
};
|
|
43
|
-
type AdvancedListBody = {
|
|
44
|
-
filter?: Filter | unknown[];
|
|
45
|
-
select?: Projection;
|
|
46
|
-
sort?: Sort;
|
|
47
|
-
populate?: Populate[] | string;
|
|
48
|
-
include?: Include | Include[];
|
|
49
|
-
tasks?: Task | Task[];
|
|
50
|
-
skip?: string | number;
|
|
51
|
-
limit?: string | number;
|
|
52
|
-
page?: string | number;
|
|
53
|
-
pageSize?: string | number;
|
|
54
|
-
options?: {
|
|
55
|
-
skim?: boolean;
|
|
56
|
-
includePermissions?: boolean;
|
|
57
|
-
includeCount?: boolean;
|
|
58
|
-
includeExtraHeaders?: boolean;
|
|
59
|
-
populateAccess?: unknown;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
type CountBody = {
|
|
63
|
-
filter?: Filter | unknown[];
|
|
64
|
-
options?: {
|
|
65
|
-
access?: unknown;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
type AdvancedReadFilterBody = {
|
|
69
|
-
filter?: Filter | unknown[];
|
|
70
|
-
select?: Projection;
|
|
71
|
-
sort?: Sort;
|
|
72
|
-
populate?: Populate[] | string;
|
|
73
|
-
include?: Include | Include[];
|
|
74
|
-
tasks?: Task | Task[];
|
|
75
|
-
options?: {
|
|
76
|
-
skim?: boolean;
|
|
77
|
-
includePermissions?: boolean;
|
|
78
|
-
tryList?: boolean;
|
|
79
|
-
populateAccess?: unknown;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
type AdvancedReadBody = {
|
|
83
|
-
select?: Projection;
|
|
84
|
-
populate?: Populate[] | string;
|
|
85
|
-
include?: Include | Include[];
|
|
86
|
-
tasks?: Task | Task[];
|
|
87
|
-
options?: {
|
|
88
|
-
skim?: boolean;
|
|
89
|
-
includePermissions?: boolean;
|
|
90
|
-
tryList?: boolean;
|
|
91
|
-
populateAccess?: unknown;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
type AdvancedCreateBody = {
|
|
95
|
-
data: unknown;
|
|
96
|
-
select?: Projection;
|
|
97
|
-
populate?: Populate[] | string;
|
|
98
|
-
tasks?: Task | Task[];
|
|
99
|
-
options?: {
|
|
100
|
-
includePermissions?: boolean;
|
|
101
|
-
populateAccess?: unknown;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
type AdvancedUpdateBody = {
|
|
105
|
-
data: unknown;
|
|
106
|
-
select?: Projection;
|
|
107
|
-
populate?: Populate[] | string;
|
|
108
|
-
tasks?: Task | Task[];
|
|
109
|
-
options?: {
|
|
110
|
-
returningAll?: boolean;
|
|
111
|
-
includePermissions?: boolean;
|
|
112
|
-
populateAccess?: unknown;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
type AdvancedUpsertBody = {
|
|
116
|
-
data: Record<string, unknown>;
|
|
117
|
-
select?: Projection;
|
|
118
|
-
populate?: Populate[] | string;
|
|
119
|
-
tasks?: Task | Task[];
|
|
120
|
-
options?: {
|
|
121
|
-
returningAll?: boolean;
|
|
122
|
-
includePermissions?: boolean;
|
|
123
|
-
populateAccess?: unknown;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
type DistinctBody = {
|
|
127
|
-
filter?: Filter | unknown[];
|
|
128
|
-
};
|
|
129
|
-
type SubListBody = {
|
|
130
|
-
filter?: Filter;
|
|
131
|
-
select?: string[];
|
|
132
|
-
};
|
|
133
|
-
type SubReadBody = {
|
|
134
|
-
select?: string[];
|
|
135
|
-
populate?: SubPopulate | SubPopulate[] | string | string[];
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
declare function parsePathParam(value: string | string[] | undefined, parameter: string): string;
|
|
139
|
-
declare function parseQuery<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown): z.output<TSchema>;
|
|
140
|
-
declare function parseBody<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown): z.output<TSchema>;
|
|
141
|
-
declare function parseBodyWithSchema<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown, userSchema?: z.ZodTypeAny): z.output<TSchema>;
|
|
142
|
-
declare function parseNestedBodyWithSchema(schema: z.ZodTypeAny, value: unknown, nestedKey: string, userSchema?: z.ZodTypeAny): Record<string, unknown>;
|
|
143
|
-
|
|
144
13
|
declare const listQuerySchema: z.ZodObject<{
|
|
145
14
|
skip: z.ZodOptional<z.ZodString>;
|
|
146
15
|
limit: z.ZodOptional<z.ZodString>;
|
|
@@ -1069,4 +938,4 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
1069
938
|
order: z.ZodOptional<z.ZodNumber>;
|
|
1070
939
|
}, z.core.$loose>]>]>>;
|
|
1071
940
|
|
|
1072
|
-
export {
|
|
941
|
+
export { CORE, DATA_MIDDLEWARE, MIDDLEWARE, PERMISSIONS, PERMISSION_KEYS, advancedCreateBodySchema, advancedUpdateBodySchema, advancedUpsertBodySchema, countBodySchema, createBodySchema, createQuerySchema, dataListBodySchema, dataReadByIdBodySchema, dataReadFilterBodySchema, distinctBodySchema, listBodySchema, listQuerySchema, readByIdBodySchema, readFilterBodySchema, readQuerySchema, requestSchemas, rootQuerySchema, subListBodySchema, subMutationBodySchema, subReadBodySchema, updateBodySchema, updateQuerySchema, upsertBodySchema, upsertQuerySchema };
|
package/advanced.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export { A as AccessRouterBaseRequest, c as AccessRouterFieldKey, d as AccessRouterLogger, e as AccessRouterRequest, f as AccessRouterRequestExtensions, g as AfterPersistAccess, B as BaseFilterAccess, C as Codes, h as CreateArgs, i as CreateOptions, j as CustomHeaders, D as DataBaseFilterHook, k as DataFilter, l as DataFindArgs, m as DataFindOneArgs, n as DataFindOneOptions, o as DataFindOptions, p as DataHook, q as DataHookContext, r as DataIdentifierHook, s as DataListHook, t as DataOverrideFilterHook, u as DataRequest, v as DataRequestSchemas, w as DataRouterOptions, x as DecorateAccess, y as DecorateAllAccess, z as DeepFieldPath, E as DefaultModelRouterOptions, G as Defaults, H as DistinctArgs, J as DocPermissionsAccess, K as ErrorResult, L as ExistsOptions, M as ExtendedDataRouterOptions, N as ExtendedDefaultModelRouterOptions, O as ExtendedModelRouterOptions, Q as FilterOperator, R as FindAccess, U as FindArgs, V as FindByIdArgs, W as FindByIdOptions, X as FindOneArgs, Y as FindOneOptions, Z as FindOptions, _ as GlobalOptions, $ as GlobalPermissionValue, a0 as GuardHook, a1 as IdentifierHook, a2 as KeyValueProjection, a3 as ListResult, a4 as MaybePromise, a5 as ModelBaseFilterHook, a6 as ModelChangeHook, a7 as ModelDeleteHook, a8 as ModelDocPermissionsHook, a9 as ModelDocument, aa as ModelDocumentHook, ab as ModelHook, ac as ModelHookContext, ad as ModelIdentifierHook, ae as ModelListHook, af as ModelOverrideFilterHook, ag as ModelRequest, ah as ModelRouterOptions, ai as ModelValidateHook, aj as PathValue, ak as PermissionSchema, al as PopulateAccess, am as PrepareAccess, an as PublicCreateArgs, ao as PublicCreateOptions, ap as PublicListArgs, aq as PublicListOptions, ar as PublicOutput, as as PublicReadArgs, at as PublicReadOptions, au as PublicUpdateArgs, av as PublicUpdateOptions, aw as PublicUpsertArgs, ax as PublicUpsertOptions, ay as Request, az as RequestSchemas, aA as RootDataListQueryEntry, aB as RootDataOperation, aC as RootDataReadByFilterQueryEntry, aD as RootDataReadByIdQueryEntry, aE as RootModelCountQueryEntry, aF as RootModelCreateQueryEntry, aG as RootModelDeleteQueryEntry, aH as RootModelDistinctQueryEntry, aI as RootModelListQueryEntry, aJ as RootModelNewQueryEntry, aK as RootModelOperation, aL as RootModelReadByFilterQueryEntry, aM as RootModelReadByIdQueryEntry, aN as RootModelSubBulkUpdateQueryEntry, aO as RootModelSubCreateQueryEntry, aP as RootModelSubDeleteQueryEntry, aQ as RootModelSubListQueryEntry, aR as RootModelSubReadQueryEntry, aS as RootModelSubUpdateQueryEntry, aT as RootModelUpdateQueryEntry, aU as RootModelUpsertQueryEntry, aV as RootOperationResult, aW as RootQueryEntry, aX as RootRouterOptions, aY as RootSubOperation, aZ as RootTarget, a_ as RouteGuardAccess, a$ as SelectAccess, b0 as SelectedPopulatedPublicOutput, b1 as SelectedPublicOutput, b2 as ServiceResult, b3 as SingleResult, b4 as SortOrder, b5 as StatusCodes, b6 as SubQueryEntry, b7 as TransformAccess, b8 as TypedFilter, b9 as UpdateByIdArgs, ba as UpdateByIdOptions, bb as UpdateOneArgs, bc as UpdateOneOptions, bd as UpsertArgs, be as UpsertOptions, bf as ValidateAccess, bg as ValidateRule, bh as Validation } from './service-DLKAswCS.js';
|
|
1
|
+
export { A as AccessRouterBaseRequest, a as AccessRouterFieldKey, b as AccessRouterLogger, c as AccessRouterRequest, d as AccessRouterRequestExtensions, e as AdvancedCreateBody, f as AdvancedListBody, g as AdvancedReadBody, h as AdvancedReadFilterBody, i as AdvancedUpdateBody, j as AdvancedUpsertBody, k as AfterPersistAccess, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, p as ArkTypeProblemLike, B as BaseFilterAccess, C as Codes, q as CountBody, r as CreateArgs, s as CreateOptions, t as CreateQueryInput, u as CustomHeaders, D as DataBaseFilterHook, v as DataFilter, w as DataFindArgs, x as DataFindOneArgs, y as DataFindOneOptions, z as DataFindOptions, E as DataHook, F as DataHookContext, G as DataIdentifierHook, H as DataListHook, I as DataOverrideFilterHook, J as DataRequest, K as DataRequestSchemas, L as DataRouterOptions, M as DecorateAccess, N as DecorateAllAccess, O as DeepFieldPath, P as DefaultModelRouterOptions, Q as Defaults, R as DistinctArgs, S as DistinctBody, T as DocPermissionsAccess, U as ErrorResult, V as ExistsOptions, W as ExtendedDataRouterOptions, X as ExtendedDefaultModelRouterOptions, Y as ExtendedModelRouterOptions, Z as Filter, _ as FilterOperator, $ as FindAccess, a0 as FindArgs, a1 as FindByIdArgs, a2 as FindByIdOptions, a3 as FindOneArgs, a4 as FindOneOptions, a5 as FindOptions, a6 as GlobalOptions, a7 as GlobalPermissionValue, a8 as GuardHook, a9 as IdentifierHook, aa as Include, ab as IoTsContextEntryLike, ac as IoTsDecodeErrorLike, ad as IoTsDecoderLike, ae as JoiSchemaLike, af as JoiValidationErrorDetailLike, ag as KeyValueProjection, ah as ListQueryInput, ai as ListResult, aj as MaybePromise, ak as ModelBaseFilterHook, al as ModelChangeHook, am as ModelDeleteHook, an as ModelDocPermissionsHook, ao as ModelDocument, ap as ModelDocumentHook, aq as ModelHook, ar as ModelHookContext, as as ModelIdentifierHook, at as ModelListHook, au as ModelOverrideFilterHook, av as ModelRequest, aw as ModelRouterOptions, ax as ModelValidateHook, ay as PathValue, az as PermissionSchema, aA as Populate, aB as PopulateAccess, aC as PrepareAccess, aD as Projection, aE as PublicCreateArgs, aF as PublicCreateOptions, aG as PublicListArgs, aH as PublicListOptions, aI as PublicOutput, aJ as PublicReadArgs, aK as PublicReadOptions, aL as PublicUpdateArgs, aM as PublicUpdateOptions, aN as PublicUpsertArgs, aO as PublicUpsertOptions, aP as ReadQueryInput, aQ as Request, aR as RequestSchemaAdapter, aS as RequestSchemaFailure, aT as RequestSchemaIssue, aU as RequestSchemaLike, aV as RequestSchemaResult, aW as RequestSchemaSuccess, aX as RequestSchemaValidator, aY as RequestSchemas, aZ as RootDataListQueryEntry, a_ as RootDataOperation, a$ as RootDataReadByFilterQueryEntry, b0 as RootDataReadByIdQueryEntry, b1 as RootModelCountQueryEntry, b2 as RootModelCreateQueryEntry, b3 as RootModelDeleteQueryEntry, b4 as RootModelDistinctQueryEntry, b5 as RootModelListQueryEntry, b6 as RootModelNewQueryEntry, b7 as RootModelOperation, b8 as RootModelReadByFilterQueryEntry, b9 as RootModelReadByIdQueryEntry, ba as RootModelSubBulkUpdateQueryEntry, bb as RootModelSubCreateQueryEntry, bc as RootModelSubDeleteQueryEntry, bd as RootModelSubListQueryEntry, be as RootModelSubReadQueryEntry, bf as RootModelSubUpdateQueryEntry, bg as RootModelUpdateQueryEntry, bh as RootModelUpsertQueryEntry, bi as RootOperationResult, bj as RootQueryEntry, bk as RootRouterOptions, bl as RootSubOperation, bm as RootTarget, bn as RouteGuardAccess, bo as SelectAccess, bp as SelectedPopulatedPublicOutput, bq as SelectedPublicOutput, br as ServiceResult, bs as SingleResult, bt as Sort, bu as SortOrder, bv as StandardSchemaFailure, bw as StandardSchemaInferOutput, bx as StandardSchemaIssue, by as StandardSchemaPathSegment, bz as StandardSchemaResult, bA as StandardSchemaSuccess, bB as StandardSchemaV1, bC as StatusCodes, bD as SubListBody, bE as SubPopulate, bF as SubQueryEntry, bG as SubReadBody, bH as SuperstructFailureLike, bI as SuperstructValidateLike, bJ as Task, bK as TransformAccess, bL as TypedFilter, bM as UpdateByIdArgs, bN as UpdateByIdOptions, bO as UpdateOneArgs, bP as UpdateOneOptions, bQ as UpdateQueryInput, bR as UpsertArgs, bS as UpsertOptions, bT as UpsertQueryInput, bU as ValibotIssueLike, bV as ValibotPathItemLike, bW as ValibotSafeParseLike, bX as ValibotSafeParseResult, bY as ValidateAccess, bZ as ValidateRule, b_ as Validation, b$ as ValidationError, c0 as VineValidationErrorLike, c1 as VineValidationMessageLike, c2 as VineValidatorLike, c3 as YupSchemaLike, c4 as YupValidationErrorLike, c5 as defineRequestSchema, c6 as fromAjv, c7 as fromArkType, c8 as fromIoTs, c9 as fromJoi, ca as fromStandardSchema, cb as fromSuperstruct, cc as fromValibot, cd as fromVine, ce as fromYup, cf as fromZod, cg as parseBody, ch as parseBodyWithSchema, ci as parseNestedBodyWithSchema, cj as parsePathParam, ck as parseQuery } from './parsers-CsyGHYQR.js';
|
|
3
2
|
import { z } from 'zod';
|
|
4
|
-
import 'express';
|
|
5
3
|
import 'mongoose';
|
|
6
4
|
import 'deep-diff';
|
|
5
|
+
import 'express';
|
|
7
6
|
|
|
8
7
|
declare const MIDDLEWARE: unique symbol;
|
|
9
8
|
declare const DATA_MIDDLEWARE: unique symbol;
|
|
@@ -11,136 +10,6 @@ declare const CORE: unique symbol;
|
|
|
11
10
|
declare const PERMISSIONS: unique symbol;
|
|
12
11
|
declare const PERMISSION_KEYS: unique symbol;
|
|
13
12
|
|
|
14
|
-
type ValidationError = {
|
|
15
|
-
detail: string;
|
|
16
|
-
pointer?: string;
|
|
17
|
-
parameter?: string;
|
|
18
|
-
};
|
|
19
|
-
type ListQueryInput = {
|
|
20
|
-
skip?: string;
|
|
21
|
-
limit?: string;
|
|
22
|
-
page?: string;
|
|
23
|
-
page_size?: string;
|
|
24
|
-
skim?: 'true' | 'false';
|
|
25
|
-
include_permissions?: 'true' | 'false';
|
|
26
|
-
include_count?: 'true' | 'false';
|
|
27
|
-
include_extra_headers?: 'true' | 'false';
|
|
28
|
-
};
|
|
29
|
-
type CreateQueryInput = {
|
|
30
|
-
include_permissions?: 'true' | 'false';
|
|
31
|
-
};
|
|
32
|
-
type ReadQueryInput = {
|
|
33
|
-
include_permissions?: 'true' | 'false';
|
|
34
|
-
try_list?: 'true' | 'false';
|
|
35
|
-
};
|
|
36
|
-
type UpdateQueryInput = {
|
|
37
|
-
returning_all?: 'true' | 'false';
|
|
38
|
-
};
|
|
39
|
-
type UpsertQueryInput = {
|
|
40
|
-
returning_all?: 'true' | 'false';
|
|
41
|
-
include_permissions?: 'true' | 'false';
|
|
42
|
-
};
|
|
43
|
-
type AdvancedListBody = {
|
|
44
|
-
filter?: Filter | unknown[];
|
|
45
|
-
select?: Projection;
|
|
46
|
-
sort?: Sort;
|
|
47
|
-
populate?: Populate[] | string;
|
|
48
|
-
include?: Include | Include[];
|
|
49
|
-
tasks?: Task | Task[];
|
|
50
|
-
skip?: string | number;
|
|
51
|
-
limit?: string | number;
|
|
52
|
-
page?: string | number;
|
|
53
|
-
pageSize?: string | number;
|
|
54
|
-
options?: {
|
|
55
|
-
skim?: boolean;
|
|
56
|
-
includePermissions?: boolean;
|
|
57
|
-
includeCount?: boolean;
|
|
58
|
-
includeExtraHeaders?: boolean;
|
|
59
|
-
populateAccess?: unknown;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
type CountBody = {
|
|
63
|
-
filter?: Filter | unknown[];
|
|
64
|
-
options?: {
|
|
65
|
-
access?: unknown;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
type AdvancedReadFilterBody = {
|
|
69
|
-
filter?: Filter | unknown[];
|
|
70
|
-
select?: Projection;
|
|
71
|
-
sort?: Sort;
|
|
72
|
-
populate?: Populate[] | string;
|
|
73
|
-
include?: Include | Include[];
|
|
74
|
-
tasks?: Task | Task[];
|
|
75
|
-
options?: {
|
|
76
|
-
skim?: boolean;
|
|
77
|
-
includePermissions?: boolean;
|
|
78
|
-
tryList?: boolean;
|
|
79
|
-
populateAccess?: unknown;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
type AdvancedReadBody = {
|
|
83
|
-
select?: Projection;
|
|
84
|
-
populate?: Populate[] | string;
|
|
85
|
-
include?: Include | Include[];
|
|
86
|
-
tasks?: Task | Task[];
|
|
87
|
-
options?: {
|
|
88
|
-
skim?: boolean;
|
|
89
|
-
includePermissions?: boolean;
|
|
90
|
-
tryList?: boolean;
|
|
91
|
-
populateAccess?: unknown;
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
type AdvancedCreateBody = {
|
|
95
|
-
data: unknown;
|
|
96
|
-
select?: Projection;
|
|
97
|
-
populate?: Populate[] | string;
|
|
98
|
-
tasks?: Task | Task[];
|
|
99
|
-
options?: {
|
|
100
|
-
includePermissions?: boolean;
|
|
101
|
-
populateAccess?: unknown;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
type AdvancedUpdateBody = {
|
|
105
|
-
data: unknown;
|
|
106
|
-
select?: Projection;
|
|
107
|
-
populate?: Populate[] | string;
|
|
108
|
-
tasks?: Task | Task[];
|
|
109
|
-
options?: {
|
|
110
|
-
returningAll?: boolean;
|
|
111
|
-
includePermissions?: boolean;
|
|
112
|
-
populateAccess?: unknown;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
type AdvancedUpsertBody = {
|
|
116
|
-
data: Record<string, unknown>;
|
|
117
|
-
select?: Projection;
|
|
118
|
-
populate?: Populate[] | string;
|
|
119
|
-
tasks?: Task | Task[];
|
|
120
|
-
options?: {
|
|
121
|
-
returningAll?: boolean;
|
|
122
|
-
includePermissions?: boolean;
|
|
123
|
-
populateAccess?: unknown;
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
type DistinctBody = {
|
|
127
|
-
filter?: Filter | unknown[];
|
|
128
|
-
};
|
|
129
|
-
type SubListBody = {
|
|
130
|
-
filter?: Filter;
|
|
131
|
-
select?: string[];
|
|
132
|
-
};
|
|
133
|
-
type SubReadBody = {
|
|
134
|
-
select?: string[];
|
|
135
|
-
populate?: SubPopulate | SubPopulate[] | string | string[];
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
declare function parsePathParam(value: string | string[] | undefined, parameter: string): string;
|
|
139
|
-
declare function parseQuery<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown): z.output<TSchema>;
|
|
140
|
-
declare function parseBody<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown): z.output<TSchema>;
|
|
141
|
-
declare function parseBodyWithSchema<TSchema extends z.ZodTypeAny>(schema: TSchema, value: unknown, userSchema?: z.ZodTypeAny): z.output<TSchema>;
|
|
142
|
-
declare function parseNestedBodyWithSchema(schema: z.ZodTypeAny, value: unknown, nestedKey: string, userSchema?: z.ZodTypeAny): Record<string, unknown>;
|
|
143
|
-
|
|
144
13
|
declare const listQuerySchema: z.ZodObject<{
|
|
145
14
|
skip: z.ZodOptional<z.ZodString>;
|
|
146
15
|
limit: z.ZodOptional<z.ZodString>;
|
|
@@ -1069,4 +938,4 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
|
|
|
1069
938
|
order: z.ZodOptional<z.ZodNumber>;
|
|
1070
939
|
}, z.core.$loose>]>]>>;
|
|
1071
940
|
|
|
1072
|
-
export {
|
|
941
|
+
export { CORE, DATA_MIDDLEWARE, MIDDLEWARE, PERMISSIONS, PERMISSION_KEYS, advancedCreateBodySchema, advancedUpdateBodySchema, advancedUpsertBodySchema, countBodySchema, createBodySchema, createQuerySchema, dataListBodySchema, dataReadByIdBodySchema, dataReadFilterBodySchema, distinctBodySchema, listBodySchema, listQuerySchema, readByIdBodySchema, readFilterBodySchema, readQuerySchema, requestSchemas, rootQuerySchema, subListBodySchema, subMutationBodySchema, subReadBodySchema, updateBodySchema, updateQuerySchema, upsertBodySchema, upsertQuerySchema };
|