@web-ts-toolkit/access-router 0.4.0 → 0.5.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.ts CHANGED
@@ -1,4 +1,4 @@
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';
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 RequestSchemaOptions, aW as RequestSchemaResult, aX as RequestSchemaSuccess, aY as RequestSchemaValidator, aZ as RequestSchemas, a_ as RootDataListQueryEntry, a$ as RootDataOperation, b0 as RootDataReadByFilterQueryEntry, b1 as RootDataReadByIdQueryEntry, b2 as RootModelCountQueryEntry, b3 as RootModelCreateQueryEntry, b4 as RootModelDeleteQueryEntry, b5 as RootModelDistinctQueryEntry, b6 as RootModelListQueryEntry, b7 as RootModelNewQueryEntry, b8 as RootModelOperation, b9 as RootModelReadByFilterQueryEntry, ba as RootModelReadByIdQueryEntry, bb as RootModelSubBulkUpdateQueryEntry, bc as RootModelSubCreateQueryEntry, bd as RootModelSubDeleteQueryEntry, be as RootModelSubListQueryEntry, bf as RootModelSubReadQueryEntry, bg as RootModelSubUpdateQueryEntry, bh as RootModelUpdateQueryEntry, bi as RootModelUpsertQueryEntry, bj as RootOperationResult, bk as RootQueryEntry, bl as RootRouterOptions, bm as RootSubOperation, bn as RootTarget, bo as RouteGuardAccess, bp as SelectAccess, bq as SelectedPopulatedPublicOutput, br as SelectedPublicOutput, bs as ServiceResult, bt as SingleResult, bu as Sort, bv as SortOrder, bw as StandardSchemaFailure, bx as StandardSchemaInferOutput, by as StandardSchemaIssue, bz as StandardSchemaPathSegment, bA as StandardSchemaResult, bB as StandardSchemaSuccess, bC as StandardSchemaV1, bD as StatusCodes, bE as SubListBody, bF as SubPopulate, bG as SubQueryEntry, bH as SubReadBody, bI as SuperstructFailureLike, bJ as SuperstructValidateLike, bK as Task, bL as TransformAccess, bM as TypedFilter, bN as UpdateByIdArgs, bO as UpdateByIdOptions, bP as UpdateOneArgs, bQ as UpdateOneOptions, bR as UpdateQueryInput, bS as UpsertArgs, bT as UpsertOptions, bU as UpsertQueryInput, bV as ValibotIssueLike, bW as ValibotPathItemLike, bX as ValibotSafeParseLike, bY as ValibotSafeParseResult, bZ as ValidateAccess, b_ as ValidateRule, b$ as Validation, c0 as ValidationError, c1 as VineValidationErrorLike, c2 as VineValidationMessageLike, c3 as VineValidatorLike, c4 as YupSchemaLike, c5 as YupValidationErrorLike, c6 as defineRequestSchema, c7 as fromAjv, c8 as fromArkType, c9 as fromIoTs, ca as fromJoi, cb as fromStandardSchema, cc as fromSuperstruct, cd as fromValibot, ce as fromVine, cf as fromYup, cg as fromZod, ch as parseBody, ci as parseBodyWithSchema, cj as parseNestedBodyWithSchema, ck as parsePathParam, cl as parseQuery } from './parsers-Ce1grlLx.js';
2
2
  import { z } from 'zod';
3
3
  import 'mongoose';
4
4
  import 'deep-diff';
@@ -6,7 +6,6 @@ import 'express';
6
6
 
7
7
  declare const MIDDLEWARE: unique symbol;
8
8
  declare const DATA_MIDDLEWARE: unique symbol;
9
- declare const CORE: unique symbol;
10
9
  declare const PERMISSIONS: unique symbol;
11
10
  declare const PERMISSION_KEYS: unique symbol;
12
11
 
@@ -77,23 +76,23 @@ declare const listBodySchema: z.ZodObject<{
77
76
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
78
77
  match: z.ZodOptional<z.ZodUnknown>;
79
78
  access: z.ZodOptional<z.ZodEnum<{
80
- read: "read";
81
79
  list: "list";
80
+ read: "read";
82
81
  }>>;
83
82
  }, z.core.$loose>]>>, z.ZodObject<{
84
83
  path: z.ZodString;
85
84
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
86
85
  match: z.ZodOptional<z.ZodUnknown>;
87
86
  access: z.ZodOptional<z.ZodEnum<{
88
- read: "read";
89
87
  list: "list";
88
+ read: "read";
90
89
  }>>;
91
90
  }, z.core.$loose>]>>;
92
91
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
93
92
  model: z.ZodString;
94
93
  op: z.ZodEnum<{
95
- read: "read";
96
94
  list: "list";
95
+ read: "read";
97
96
  count: "count";
98
97
  }>;
99
98
  path: z.ZodString;
@@ -105,8 +104,8 @@ declare const listBodySchema: z.ZodObject<{
105
104
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
106
105
  model: z.ZodString;
107
106
  op: z.ZodEnum<{
108
- read: "read";
109
107
  list: "list";
108
+ read: "read";
110
109
  count: "count";
111
110
  }>;
112
111
  path: z.ZodString;
@@ -152,23 +151,23 @@ declare const readFilterBodySchema: z.ZodObject<{
152
151
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
153
152
  match: z.ZodOptional<z.ZodUnknown>;
154
153
  access: z.ZodOptional<z.ZodEnum<{
155
- read: "read";
156
154
  list: "list";
155
+ read: "read";
157
156
  }>>;
158
157
  }, z.core.$loose>]>>, z.ZodObject<{
159
158
  path: z.ZodString;
160
159
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
161
160
  match: z.ZodOptional<z.ZodUnknown>;
162
161
  access: z.ZodOptional<z.ZodEnum<{
163
- read: "read";
164
162
  list: "list";
163
+ read: "read";
165
164
  }>>;
166
165
  }, z.core.$loose>]>>;
167
166
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
168
167
  model: z.ZodString;
169
168
  op: z.ZodEnum<{
170
- read: "read";
171
169
  list: "list";
170
+ read: "read";
172
171
  count: "count";
173
172
  }>;
174
173
  path: z.ZodString;
@@ -180,8 +179,8 @@ declare const readFilterBodySchema: z.ZodObject<{
180
179
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
181
180
  model: z.ZodString;
182
181
  op: z.ZodEnum<{
183
- read: "read";
184
182
  list: "list";
183
+ read: "read";
185
184
  count: "count";
186
185
  }>;
187
186
  path: z.ZodString;
@@ -214,23 +213,23 @@ declare const readByIdBodySchema: z.ZodObject<{
214
213
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
215
214
  match: z.ZodOptional<z.ZodUnknown>;
216
215
  access: z.ZodOptional<z.ZodEnum<{
217
- read: "read";
218
216
  list: "list";
217
+ read: "read";
219
218
  }>>;
220
219
  }, z.core.$loose>]>>, z.ZodObject<{
221
220
  path: z.ZodString;
222
221
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
223
222
  match: z.ZodOptional<z.ZodUnknown>;
224
223
  access: z.ZodOptional<z.ZodEnum<{
225
- read: "read";
226
224
  list: "list";
225
+ read: "read";
227
226
  }>>;
228
227
  }, z.core.$loose>]>>;
229
228
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
230
229
  model: z.ZodString;
231
230
  op: z.ZodEnum<{
232
- read: "read";
233
231
  list: "list";
232
+ read: "read";
234
233
  count: "count";
235
234
  }>;
236
235
  path: z.ZodString;
@@ -242,8 +241,8 @@ declare const readByIdBodySchema: z.ZodObject<{
242
241
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
243
242
  model: z.ZodString;
244
243
  op: z.ZodEnum<{
245
- read: "read";
246
244
  list: "list";
245
+ read: "read";
247
246
  count: "count";
248
247
  }>;
249
248
  path: z.ZodString;
@@ -277,16 +276,16 @@ declare const advancedCreateBodySchema: z.ZodObject<{
277
276
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
278
277
  match: z.ZodOptional<z.ZodUnknown>;
279
278
  access: z.ZodOptional<z.ZodEnum<{
280
- read: "read";
281
279
  list: "list";
280
+ read: "read";
282
281
  }>>;
283
282
  }, z.core.$loose>]>>, z.ZodObject<{
284
283
  path: z.ZodString;
285
284
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
286
285
  match: z.ZodOptional<z.ZodUnknown>;
287
286
  access: z.ZodOptional<z.ZodEnum<{
288
- read: "read";
289
287
  list: "list";
288
+ read: "read";
290
289
  }>>;
291
290
  }, z.core.$loose>]>>;
292
291
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -313,16 +312,16 @@ declare const advancedUpdateBodySchema: z.ZodObject<{
313
312
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
314
313
  match: z.ZodOptional<z.ZodUnknown>;
315
314
  access: z.ZodOptional<z.ZodEnum<{
316
- read: "read";
317
315
  list: "list";
316
+ read: "read";
318
317
  }>>;
319
318
  }, z.core.$loose>]>>, z.ZodObject<{
320
319
  path: z.ZodString;
321
320
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
322
321
  match: z.ZodOptional<z.ZodUnknown>;
323
322
  access: z.ZodOptional<z.ZodEnum<{
324
- read: "read";
325
323
  list: "list";
324
+ read: "read";
326
325
  }>>;
327
326
  }, z.core.$loose>]>>;
328
327
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -349,16 +348,16 @@ declare const advancedUpsertBodySchema: z.ZodObject<{
349
348
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
350
349
  match: z.ZodOptional<z.ZodUnknown>;
351
350
  access: z.ZodOptional<z.ZodEnum<{
352
- read: "read";
353
351
  list: "list";
352
+ read: "read";
354
353
  }>>;
355
354
  }, z.core.$loose>]>>, z.ZodObject<{
356
355
  path: z.ZodString;
357
356
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
358
357
  match: z.ZodOptional<z.ZodUnknown>;
359
358
  access: z.ZodOptional<z.ZodEnum<{
360
- read: "read";
361
359
  list: "list";
360
+ read: "read";
362
361
  }>>;
363
362
  }, z.core.$loose>]>>;
364
363
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -492,23 +491,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
492
491
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
493
492
  match: z.ZodOptional<z.ZodUnknown>;
494
493
  access: z.ZodOptional<z.ZodEnum<{
495
- read: "read";
496
494
  list: "list";
495
+ read: "read";
497
496
  }>>;
498
497
  }, z.core.$loose>]>>, z.ZodObject<{
499
498
  path: z.ZodString;
500
499
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
501
500
  match: z.ZodOptional<z.ZodUnknown>;
502
501
  access: z.ZodOptional<z.ZodEnum<{
503
- read: "read";
504
502
  list: "list";
503
+ read: "read";
505
504
  }>>;
506
505
  }, z.core.$loose>]>>;
507
506
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
508
507
  model: z.ZodString;
509
508
  op: z.ZodEnum<{
510
- read: "read";
511
509
  list: "list";
510
+ read: "read";
512
511
  count: "count";
513
512
  }>;
514
513
  path: z.ZodString;
@@ -520,8 +519,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
520
519
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
521
520
  model: z.ZodString;
522
521
  op: z.ZodEnum<{
523
- read: "read";
524
522
  list: "list";
523
+ read: "read";
525
524
  count: "count";
526
525
  }>;
527
526
  path: z.ZodString;
@@ -566,23 +565,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
566
565
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
567
566
  match: z.ZodOptional<z.ZodUnknown>;
568
567
  access: z.ZodOptional<z.ZodEnum<{
569
- read: "read";
570
568
  list: "list";
569
+ read: "read";
571
570
  }>>;
572
571
  }, z.core.$loose>]>>, z.ZodObject<{
573
572
  path: z.ZodString;
574
573
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
575
574
  match: z.ZodOptional<z.ZodUnknown>;
576
575
  access: z.ZodOptional<z.ZodEnum<{
577
- read: "read";
578
576
  list: "list";
577
+ read: "read";
579
578
  }>>;
580
579
  }, z.core.$loose>]>>;
581
580
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
582
581
  model: z.ZodString;
583
582
  op: z.ZodEnum<{
584
- read: "read";
585
583
  list: "list";
584
+ read: "read";
586
585
  count: "count";
587
586
  }>;
588
587
  path: z.ZodString;
@@ -594,8 +593,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
594
593
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
595
594
  model: z.ZodString;
596
595
  op: z.ZodEnum<{
597
- read: "read";
598
596
  list: "list";
597
+ read: "read";
599
598
  count: "count";
600
599
  }>;
601
600
  path: z.ZodString;
@@ -635,23 +634,23 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
635
634
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
636
635
  match: z.ZodOptional<z.ZodUnknown>;
637
636
  access: z.ZodOptional<z.ZodEnum<{
638
- read: "read";
639
637
  list: "list";
638
+ read: "read";
640
639
  }>>;
641
640
  }, z.core.$loose>]>>, z.ZodObject<{
642
641
  path: z.ZodString;
643
642
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
644
643
  match: z.ZodOptional<z.ZodUnknown>;
645
644
  access: z.ZodOptional<z.ZodEnum<{
646
- read: "read";
647
645
  list: "list";
646
+ read: "read";
648
647
  }>>;
649
648
  }, z.core.$loose>]>>;
650
649
  include: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
651
650
  model: z.ZodString;
652
651
  op: z.ZodEnum<{
653
- read: "read";
654
652
  list: "list";
653
+ read: "read";
655
654
  count: "count";
656
655
  }>;
657
656
  path: z.ZodString;
@@ -663,8 +662,8 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
663
662
  }, z.core.$loose>, z.ZodArray<z.ZodObject<{
664
663
  model: z.ZodString;
665
664
  op: z.ZodEnum<{
666
- read: "read";
667
665
  list: "list";
666
+ read: "read";
668
667
  count: "count";
669
668
  }>;
670
669
  path: z.ZodString;
@@ -705,16 +704,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
705
704
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
706
705
  match: z.ZodOptional<z.ZodUnknown>;
707
706
  access: z.ZodOptional<z.ZodEnum<{
708
- read: "read";
709
707
  list: "list";
708
+ read: "read";
710
709
  }>>;
711
710
  }, z.core.$loose>]>>, z.ZodObject<{
712
711
  path: z.ZodString;
713
712
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
714
713
  match: z.ZodOptional<z.ZodUnknown>;
715
714
  access: z.ZodOptional<z.ZodEnum<{
716
- read: "read";
717
715
  list: "list";
716
+ read: "read";
718
717
  }>>;
719
718
  }, z.core.$loose>]>>;
720
719
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -746,16 +745,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
746
745
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
747
746
  match: z.ZodOptional<z.ZodUnknown>;
748
747
  access: z.ZodOptional<z.ZodEnum<{
749
- read: "read";
750
748
  list: "list";
749
+ read: "read";
751
750
  }>>;
752
751
  }, z.core.$loose>]>>, z.ZodObject<{
753
752
  path: z.ZodString;
754
753
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
755
754
  match: z.ZodOptional<z.ZodUnknown>;
756
755
  access: z.ZodOptional<z.ZodEnum<{
757
- read: "read";
758
756
  list: "list";
757
+ read: "read";
759
758
  }>>;
760
759
  }, z.core.$loose>]>>;
761
760
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -787,16 +786,16 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
787
786
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
788
787
  match: z.ZodOptional<z.ZodUnknown>;
789
788
  access: z.ZodOptional<z.ZodEnum<{
790
- read: "read";
791
789
  list: "list";
790
+ read: "read";
792
791
  }>>;
793
792
  }, z.core.$loose>]>>, z.ZodObject<{
794
793
  path: z.ZodString;
795
794
  select: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<-1>]>>]>>;
796
795
  match: z.ZodOptional<z.ZodUnknown>;
797
796
  access: z.ZodOptional<z.ZodEnum<{
798
- read: "read";
799
797
  list: "list";
798
+ read: "read";
800
799
  }>>;
801
800
  }, z.core.$loose>]>>;
802
801
  tasks: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
@@ -938,4 +937,4 @@ declare const rootQuerySchema: z.ZodArray<z.ZodUnion<readonly [z.ZodUnion<readon
938
937
  order: z.ZodOptional<z.ZodNumber>;
939
938
  }, z.core.$loose>]>]>>;
940
939
 
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 };
940
+ export { 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.js CHANGED
@@ -29,7 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/advanced.ts
30
30
  var advanced_exports = {};
31
31
  __export(advanced_exports, {
32
- CORE: () => CORE,
33
32
  Codes: () => Codes,
34
33
  CustomHeaders: () => CustomHeaders,
35
34
  DATA_MIDDLEWARE: () => DATA_MIDDLEWARE,
@@ -84,7 +83,6 @@ module.exports = __toCommonJS(advanced_exports);
84
83
  // src/symbols.ts
85
84
  var MIDDLEWARE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/middleware");
86
85
  var DATA_MIDDLEWARE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/data-middleware");
87
- var CORE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/core");
88
86
  var PERMISSIONS = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/permissions");
89
87
  var PERMISSION_KEYS = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/permission-keys");
90
88
 
@@ -298,8 +296,11 @@ function toRequestSchemaValidator(schema) {
298
296
  if (isRequestSchemaValidator(schema)) return schema;
299
297
  return schema.validate;
300
298
  }
301
- function defineRequestSchema(validator) {
302
- return validator;
299
+ function defineRequestSchema(validator, options = {}) {
300
+ return {
301
+ validate: validator,
302
+ openapi: options.openapi
303
+ };
303
304
  }
304
305
  function fromZod(schema) {
305
306
  return (value) => {
@@ -973,7 +974,6 @@ var rootDataQueryEntrySchema = import_zod4.z.union([
973
974
  var rootQuerySchema = import_zod4.z.array(import_zod4.z.union([rootModelQueryEntrySchema, rootDataQueryEntrySchema]));
974
975
  // Annotate the CommonJS export names for ESM import in node:
975
976
  0 && (module.exports = {
976
- CORE,
977
977
  Codes,
978
978
  CustomHeaders,
979
979
  DATA_MIDDLEWARE,
package/advanced.mjs CHANGED
@@ -1,7 +1,6 @@
1
1
  // src/symbols.ts
2
2
  var MIDDLEWARE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/middleware");
3
3
  var DATA_MIDDLEWARE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/data-middleware");
4
- var CORE = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/core");
5
4
  var PERMISSIONS = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/permissions");
6
5
  var PERMISSION_KEYS = /* @__PURE__ */ Symbol.for("@web-ts-toolkit/access-router/permission-keys");
7
6
 
@@ -215,8 +214,11 @@ function toRequestSchemaValidator(schema) {
215
214
  if (isRequestSchemaValidator(schema)) return schema;
216
215
  return schema.validate;
217
216
  }
218
- function defineRequestSchema(validator) {
219
- return validator;
217
+ function defineRequestSchema(validator, options = {}) {
218
+ return {
219
+ validate: validator,
220
+ openapi: options.openapi
221
+ };
220
222
  }
221
223
  function fromZod(schema) {
222
224
  return (value) => {
@@ -889,7 +891,6 @@ var rootDataQueryEntrySchema = z4.union([
889
891
  ]);
890
892
  var rootQuerySchema = z4.array(z4.union([rootModelQueryEntrySchema, rootDataQueryEntrySchema]));
891
893
  export {
892
- CORE,
893
894
  Codes,
894
895
  CustomHeaders,
895
896
  DATA_MIDDLEWARE,
package/index.d.mts CHANGED
@@ -1,11 +1,58 @@
1
1
  import mongoose from 'mongoose';
2
2
  import { Response, NextFunction, Router } from 'express';
3
- import { a6 as GlobalOptions, P as DefaultModelRouterOptions, X as ExtendedDefaultModelRouterOptions, aw as ModelRouterOptions, Y as ExtendedModelRouterOptions, L as DataRouterOptions, W as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, a8 as GuardHook, av as ModelRequest, J as DataRequest, cl as DataService, cm as Model, cn as Service, co as PublicService, b_ as Validation, bk as RootRouterOptions } from './parsers-CsyGHYQR.mjs';
4
- export { cp as AccessRouterPermissionMap, cq as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, ab as IoTsContextEntryLike, ac as IoTsDecodeErrorLike, ad as IoTsDecoderLike, ae as JoiSchemaLike, af as JoiValidationErrorDetailLike, cr as Permissions, aR as RequestSchemaAdapter, aS as RequestSchemaFailure, aT as RequestSchemaIssue, aU as RequestSchemaLike, aV as RequestSchemaResult, aW as RequestSchemaSuccess, aX as RequestSchemaValidator, bv as StandardSchemaFailure, bw as StandardSchemaInferOutput, bx as StandardSchemaIssue, by as StandardSchemaPathSegment, bz as StandardSchemaResult, bA as StandardSchemaSuccess, bB as StandardSchemaV1, bH as SuperstructFailureLike, bI as SuperstructValidateLike, bU as ValibotIssueLike, bV as ValibotPathItemLike, bW as ValibotSafeParseLike, bX as ValibotSafeParseResult, 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 } from './parsers-CsyGHYQR.mjs';
3
+ import { a6 as GlobalOptions, P as DefaultModelRouterOptions, X as ExtendedDefaultModelRouterOptions, aw as ModelRouterOptions, Y as ExtendedModelRouterOptions, L as DataRouterOptions, W as ExtendedDataRouterOptions, A as AccessRouterBaseRequest, a8 as GuardHook, av as ModelRequest, J as DataRequest, cm as DataService, cn as Model, co as Service, cp as PublicService, b$ as Validation, bl as RootRouterOptions } from './parsers-Ce1grlLx.mjs';
4
+ export { cq as AccessRouterPermissionMap, cr as AccessRouterPermissions, c as AccessRouterRequest, d as AccessRouterRequestExtensions, l as AjvErrorObjectLike, m as AjvValidatorLike, n as ArkTypeErrorsLike, o as ArkTypeLike, ab as IoTsContextEntryLike, ac as IoTsDecodeErrorLike, ad as IoTsDecoderLike, ae as JoiSchemaLike, af as JoiValidationErrorDetailLike, cs as Permissions, aR as RequestSchemaAdapter, aS as RequestSchemaFailure, aT as RequestSchemaIssue, aU as RequestSchemaLike, aV as RequestSchemaOptions, aW as RequestSchemaResult, aX as RequestSchemaSuccess, aY as RequestSchemaValidator, bw as StandardSchemaFailure, bx as StandardSchemaInferOutput, by as StandardSchemaIssue, bz as StandardSchemaPathSegment, bA as StandardSchemaResult, bB as StandardSchemaSuccess, bC as StandardSchemaV1, bI as SuperstructFailureLike, bJ as SuperstructValidateLike, bV as ValibotIssueLike, bW as ValibotPathItemLike, bX as ValibotSafeParseLike, bY as ValibotSafeParseResult, c1 as VineValidationErrorLike, c2 as VineValidationMessageLike, c3 as VineValidatorLike, c4 as YupSchemaLike, c5 as YupValidationErrorLike, c6 as defineRequestSchema, c7 as fromAjv, c8 as fromArkType, c9 as fromIoTs, ca as fromJoi, cb as fromStandardSchema, cc as fromSuperstruct, cd as fromValibot, ce as fromVine, cf as fromYup, cg as fromZod } from './parsers-Ce1grlLx.mjs';
5
5
  import JsonRouter from '@web-ts-toolkit/express-json-router';
6
6
  import 'zod';
7
7
  import 'deep-diff';
8
8
 
9
+ type OpenApiMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
10
+ type OpenApiSchema = Record<string, unknown>;
11
+ type OpenApiSchemaSource = unknown;
12
+ type OpenApiParameter = {
13
+ name: string;
14
+ in: 'path' | 'query';
15
+ required?: boolean;
16
+ description?: string;
17
+ schema?: OpenApiSchema;
18
+ };
19
+ type OpenApiResponse = {
20
+ description: string;
21
+ content?: Record<string, {
22
+ schema: OpenApiSchema;
23
+ }>;
24
+ };
25
+ type OpenApiResponses = Record<string, OpenApiResponse>;
26
+ type OpenApiRouteDescriptor = {
27
+ method: OpenApiMethod;
28
+ path: string;
29
+ operationId?: string;
30
+ summary?: string;
31
+ description?: string;
32
+ tags?: string[];
33
+ acl?: string;
34
+ deprecated?: boolean;
35
+ query?: OpenApiSchemaSource;
36
+ body?: OpenApiSchemaSource;
37
+ pathParams?: Record<string, OpenApiSchemaSource>;
38
+ responses?: OpenApiResponses;
39
+ };
40
+ type OpenApiDocumentOptions = {
41
+ title: string;
42
+ version: string;
43
+ description?: string;
44
+ servers?: Array<{
45
+ url: string;
46
+ description?: string;
47
+ }>;
48
+ };
49
+ type OpenApiRouterOptions = Partial<OpenApiDocumentOptions> & {
50
+ jsonPath?: string;
51
+ docsPath?: string | false;
52
+ swaggerUiCssUrl?: string;
53
+ swaggerUiBundleUrl?: string;
54
+ };
55
+
9
56
  declare class AccessRuntime {
10
57
  private readonly globalOptions;
11
58
  private readonly defaultModelOptions;
@@ -15,6 +62,30 @@ declare class AccessRuntime {
15
62
  private readonly modelRefs;
16
63
  private readonly modelSubs;
17
64
  private readonly modelAtts;
65
+ private readonly openApiRegistry;
66
+ registerOpenApiRoute(route: OpenApiRouteDescriptor): void;
67
+ getOpenApiRoutes(): OpenApiRouteDescriptor[];
68
+ getOpenApiSpec(info: OpenApiDocumentOptions): {
69
+ openapi: string;
70
+ info: Omit<OpenApiDocumentOptions, "servers">;
71
+ servers?: OpenApiDocumentOptions["servers"];
72
+ paths: Record<string, Record<string, {
73
+ [key: `x-${string}`]: unknown;
74
+ operationId?: string;
75
+ summary?: string;
76
+ description?: string;
77
+ tags?: string[];
78
+ deprecated?: boolean;
79
+ parameters?: OpenApiParameter[];
80
+ requestBody?: {
81
+ required?: boolean;
82
+ content: Record<string, {
83
+ schema: OpenApiSchema;
84
+ }>;
85
+ };
86
+ responses: OpenApiResponses;
87
+ }>>;
88
+ };
18
89
  setGlobalOptions(options: GlobalOptions): void;
19
90
  setGlobalOption<K extends keyof GlobalOptions>(key: K, value: GlobalOptions[K]): void;
20
91
  getGlobalOptions(): GlobalOptions;
@@ -76,6 +147,7 @@ declare class DataRouter<TData = unknown> {
76
147
  private getRequestSchema;
77
148
  getService(req: DataRequest): DataService<TData>;
78
149
  private assertAllowed;
150
+ private registerOpenApiRoute;
79
151
  private setCollectionRoutes;
80
152
  private setDocumentRoutes;
81
153
  set<K extends keyof DataRouterOptions<TData>>(key: K, value: DataRouterOptions<TData>[K]): this;
@@ -112,6 +184,7 @@ declare class ModelRouter<TModel = unknown> {
112
184
  getService(req: ModelRequest): Service<TModel>;
113
185
  getPublicService(req: ModelRequest): PublicService<TModel>;
114
186
  private assertAllowed;
187
+ private registerOpenApiRoute;
115
188
  private setCollectionRoutes;
116
189
  private setDocumentRoutes;
117
190
  private setSubDocumentRoutes;
@@ -251,6 +324,7 @@ declare class RootRouter {
251
324
  private readonly modelOperations;
252
325
  private readonly dataOperations;
253
326
  constructor(options?: RootRouterOptions, runtime?: AccessRuntime);
327
+ private registerOpenApiRoute;
254
328
  private wrapResult;
255
329
  private hasTarget;
256
330
  private isAllowed;
@@ -261,6 +335,8 @@ declare class RootRouter {
261
335
  get routes(): Router;
262
336
  }
263
337
 
338
+ declare function createOpenApiRouter(runtime: AccessRuntime, options?: OpenApiRouterOptions): Router;
339
+
264
340
  type AccessRouterInstance = ModelRouter<any> | DataRouter<any> | RootRouter;
265
341
  type CombinedRouteInput = Router | AccessRouterInstance;
266
342
  declare function combineRoutes(...inputs: CombinedRouteInput[]): Router;
@@ -296,6 +372,7 @@ type CreateRouter = {
296
372
  type CreateDataRouter = {
297
373
  <TData>(dataName: string, options: DataRouterOptions<TData>): DataRouter<TData>;
298
374
  };
375
+ type CreateRuntimeOpenApiRouter = (options?: OpenApiRouterOptions) => Router;
299
376
  type WttSet = {
300
377
  <K extends keyof GlobalOptions>(key: K, value: GlobalOptions[K]): void;
301
378
  (options: {
@@ -306,6 +383,7 @@ interface Wtt {
306
383
  runtime: AccessRuntime;
307
384
  createRouter: CreateRouter;
308
385
  createDataRouter: CreateDataRouter;
386
+ createOpenApiRouter: CreateRuntimeOpenApiRouter;
309
387
  combineRoutes: typeof combineRoutes;
310
388
  set: WttSet;
311
389
  setGlobalOptions: typeof setGlobalOptions;
@@ -330,4 +408,4 @@ type AccessRuntimeApi = typeof macl & Wtt;
330
408
  declare function createAccessRuntime(): AccessRuntimeApi;
331
409
  declare const acl: AccessRuntimeApi;
332
410
 
333
- export { AccessRuntime, type AccessRuntimeApi, type CombinedRouteInput, DataRouter, DataRouterOptions, GlobalOptions, ModelRouter, ModelRouterOptions, RootRouter, RootRouterOptions, acl, combineRoutes, createAccessRuntime, acl as default, getDefaultModelOption, getDefaultModelOptions, getGlobalOption, getGlobalOptions, getModelJsonSchema, getModelNames, getModelOption, getModelOptions, guard, permissionsPlugin, setDefaultModelOption, setDefaultModelOptions, setGlobalOption, setGlobalOptions, setModelOption, setModelOptions };
411
+ export { AccessRuntime, type AccessRuntimeApi, type CombinedRouteInput, DataRouter, DataRouterOptions, GlobalOptions, ModelRouter, ModelRouterOptions, type OpenApiDocumentOptions, type OpenApiMethod, type OpenApiRouteDescriptor, type OpenApiRouterOptions, RootRouter, RootRouterOptions, acl, combineRoutes, createAccessRuntime, createOpenApiRouter, acl as default, getDefaultModelOption, getDefaultModelOptions, getGlobalOption, getGlobalOptions, getModelJsonSchema, getModelNames, getModelOption, getModelOptions, guard, permissionsPlugin, setDefaultModelOption, setDefaultModelOptions, setGlobalOption, setGlobalOptions, setModelOption, setModelOptions };