vovk 3.0.0-draft.33 → 3.0.0-draft.331

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.
Files changed (196) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +8 -96
  3. package/bin/index.mjs +8 -0
  4. package/{HttpException.d.ts → cjs/HttpException.d.ts} +2 -2
  5. package/{HttpException.js → cjs/HttpException.js} +3 -3
  6. package/cjs/JSONLinesResponse.d.ts +19 -0
  7. package/cjs/JSONLinesResponse.js +93 -0
  8. package/{VovkApp.d.ts → cjs/VovkApp.d.ts} +10 -9
  9. package/cjs/VovkApp.js +202 -0
  10. package/cjs/client/createRPC.d.ts +3 -0
  11. package/cjs/client/createRPC.js +90 -0
  12. package/cjs/client/defaultHandler.d.ts +6 -0
  13. package/cjs/client/defaultHandler.js +29 -0
  14. package/cjs/client/defaultStreamHandler.d.ts +9 -0
  15. package/{client → cjs/client}/defaultStreamHandler.js +25 -13
  16. package/cjs/client/fetcher.d.ts +14 -0
  17. package/cjs/client/fetcher.js +93 -0
  18. package/cjs/client/index.d.ts +4 -0
  19. package/cjs/client/index.js +10 -0
  20. package/cjs/client/progressive.d.ts +9 -0
  21. package/cjs/client/progressive.js +45 -0
  22. package/cjs/client/types.d.ts +123 -0
  23. package/{createVovkApp.d.ts → cjs/createVovkApp.d.ts} +12 -11
  24. package/cjs/createVovkApp.js +133 -0
  25. package/cjs/index.d.ts +65 -0
  26. package/cjs/index.js +38 -0
  27. package/cjs/openapi/error.d.ts +2 -0
  28. package/cjs/openapi/error.js +100 -0
  29. package/cjs/openapi/generateFnName.d.ts +23 -0
  30. package/cjs/openapi/generateFnName.js +81 -0
  31. package/cjs/openapi/index.d.ts +12 -0
  32. package/cjs/openapi/index.js +21 -0
  33. package/cjs/openapi/openAPIToVovkSchema/applyComponentsSchemas.d.ts +3 -0
  34. package/cjs/openapi/openAPIToVovkSchema/applyComponentsSchemas.js +67 -0
  35. package/cjs/openapi/openAPIToVovkSchema/index.d.ts +4 -0
  36. package/cjs/openapi/openAPIToVovkSchema/index.js +192 -0
  37. package/cjs/openapi/openAPIToVovkSchema/inlineRefs.d.ts +10 -0
  38. package/cjs/openapi/openAPIToVovkSchema/inlineRefs.js +102 -0
  39. package/cjs/openapi/vovkSchemaToOpenAPI.d.ts +9 -0
  40. package/cjs/openapi/vovkSchemaToOpenAPI.js +233 -0
  41. package/cjs/types.d.ts +400 -0
  42. package/cjs/types.js +74 -0
  43. package/cjs/utils/camelCase.d.ts +6 -0
  44. package/cjs/utils/camelCase.js +37 -0
  45. package/cjs/utils/createCodeExamples.d.ts +19 -0
  46. package/cjs/utils/createCodeExamples.js +110 -0
  47. package/cjs/utils/createDecorator.d.ts +6 -0
  48. package/{createDecorator.js → cjs/utils/createDecorator.js} +26 -16
  49. package/cjs/utils/createLLMTools.d.ts +44 -0
  50. package/cjs/utils/createLLMTools.js +118 -0
  51. package/cjs/utils/createStandardValidation.d.ts +81 -0
  52. package/cjs/utils/createStandardValidation.js +33 -0
  53. package/cjs/utils/generateStaticAPI.d.ts +4 -0
  54. package/cjs/utils/generateStaticAPI.js +30 -0
  55. package/cjs/utils/getJSONSchemaExample.d.ts +8 -0
  56. package/cjs/utils/getJSONSchemaExample.js +234 -0
  57. package/cjs/utils/getJSONSchemaSample.d.ts +2 -0
  58. package/cjs/utils/getJSONSchemaSample.js +167 -0
  59. package/cjs/utils/getSchema.d.ts +21 -0
  60. package/cjs/utils/getSchema.js +38 -0
  61. package/cjs/utils/multitenant.d.ts +24 -0
  62. package/cjs/utils/multitenant.js +170 -0
  63. package/cjs/utils/parseQuery.d.ts +25 -0
  64. package/cjs/utils/parseQuery.js +156 -0
  65. package/{utils → cjs/utils}/reqForm.d.ts +1 -2
  66. package/cjs/utils/reqForm.js +33 -0
  67. package/{utils → cjs/utils}/reqMeta.d.ts +1 -2
  68. package/cjs/utils/reqQuery.d.ts +2 -0
  69. package/cjs/utils/reqQuery.js +10 -0
  70. package/cjs/utils/serializeQuery.d.ts +13 -0
  71. package/cjs/utils/serializeQuery.js +65 -0
  72. package/cjs/utils/setHandlerSchema.d.ts +4 -0
  73. package/cjs/utils/setHandlerSchema.js +15 -0
  74. package/cjs/utils/upperFirst.d.ts +1 -0
  75. package/cjs/utils/upperFirst.js +6 -0
  76. package/cjs/utils/withValidationLibrary.d.ts +76 -0
  77. package/cjs/utils/withValidationLibrary.js +123 -0
  78. package/mjs/HttpException.d.ts +7 -0
  79. package/mjs/HttpException.js +15 -0
  80. package/mjs/JSONLinesResponse.d.ts +19 -0
  81. package/mjs/JSONLinesResponse.js +93 -0
  82. package/mjs/VovkApp.d.ts +29 -0
  83. package/mjs/VovkApp.js +202 -0
  84. package/mjs/client/createRPC.d.ts +3 -0
  85. package/mjs/client/createRPC.js +90 -0
  86. package/mjs/client/defaultHandler.d.ts +6 -0
  87. package/mjs/client/defaultHandler.js +29 -0
  88. package/mjs/client/defaultStreamHandler.d.ts +9 -0
  89. package/mjs/client/defaultStreamHandler.js +94 -0
  90. package/mjs/client/fetcher.d.ts +14 -0
  91. package/mjs/client/fetcher.js +93 -0
  92. package/mjs/client/index.d.ts +4 -0
  93. package/mjs/client/index.js +10 -0
  94. package/mjs/client/progressive.d.ts +9 -0
  95. package/mjs/client/progressive.js +45 -0
  96. package/mjs/client/types.d.ts +123 -0
  97. package/mjs/createVovkApp.d.ts +63 -0
  98. package/mjs/createVovkApp.js +133 -0
  99. package/mjs/index.d.ts +65 -0
  100. package/mjs/index.js +38 -0
  101. package/mjs/openapi/error.d.ts +2 -0
  102. package/mjs/openapi/error.js +100 -0
  103. package/mjs/openapi/generateFnName.d.ts +23 -0
  104. package/mjs/openapi/generateFnName.js +81 -0
  105. package/mjs/openapi/index.d.ts +12 -0
  106. package/mjs/openapi/index.js +21 -0
  107. package/mjs/openapi/openAPIToVovkSchema/applyComponentsSchemas.d.ts +3 -0
  108. package/mjs/openapi/openAPIToVovkSchema/applyComponentsSchemas.js +67 -0
  109. package/mjs/openapi/openAPIToVovkSchema/index.d.ts +4 -0
  110. package/mjs/openapi/openAPIToVovkSchema/index.js +192 -0
  111. package/mjs/openapi/openAPIToVovkSchema/inlineRefs.d.ts +10 -0
  112. package/mjs/openapi/openAPIToVovkSchema/inlineRefs.js +102 -0
  113. package/mjs/openapi/vovkSchemaToOpenAPI.d.ts +9 -0
  114. package/mjs/openapi/vovkSchemaToOpenAPI.js +233 -0
  115. package/mjs/types.d.ts +400 -0
  116. package/mjs/types.js +74 -0
  117. package/mjs/utils/camelCase.d.ts +6 -0
  118. package/mjs/utils/camelCase.js +37 -0
  119. package/mjs/utils/createCodeExamples.d.ts +19 -0
  120. package/mjs/utils/createCodeExamples.js +110 -0
  121. package/mjs/utils/createDecorator.d.ts +6 -0
  122. package/mjs/utils/createDecorator.js +48 -0
  123. package/mjs/utils/createLLMTools.d.ts +44 -0
  124. package/mjs/utils/createLLMTools.js +118 -0
  125. package/mjs/utils/createStandardValidation.d.ts +81 -0
  126. package/mjs/utils/createStandardValidation.js +33 -0
  127. package/mjs/utils/generateStaticAPI.d.ts +4 -0
  128. package/mjs/utils/generateStaticAPI.js +30 -0
  129. package/mjs/utils/getJSONSchemaExample.d.ts +8 -0
  130. package/mjs/utils/getJSONSchemaExample.js +234 -0
  131. package/mjs/utils/getJSONSchemaSample.d.ts +2 -0
  132. package/mjs/utils/getJSONSchemaSample.js +167 -0
  133. package/mjs/utils/getSchema.d.ts +21 -0
  134. package/mjs/utils/getSchema.js +38 -0
  135. package/mjs/utils/multitenant.d.ts +24 -0
  136. package/mjs/utils/multitenant.js +170 -0
  137. package/mjs/utils/parseQuery.d.ts +25 -0
  138. package/mjs/utils/parseQuery.js +156 -0
  139. package/mjs/utils/reqForm.d.ts +2 -0
  140. package/mjs/utils/reqForm.js +33 -0
  141. package/mjs/utils/reqMeta.d.ts +2 -0
  142. package/mjs/utils/reqMeta.js +13 -0
  143. package/mjs/utils/reqQuery.d.ts +2 -0
  144. package/mjs/utils/reqQuery.js +10 -0
  145. package/mjs/utils/serializeQuery.d.ts +13 -0
  146. package/mjs/utils/serializeQuery.js +65 -0
  147. package/mjs/utils/setHandlerSchema.d.ts +4 -0
  148. package/mjs/utils/setHandlerSchema.js +15 -0
  149. package/mjs/utils/shim.d.ts +1 -0
  150. package/mjs/utils/shim.js +18 -0
  151. package/mjs/utils/upperFirst.d.ts +1 -0
  152. package/mjs/utils/upperFirst.js +6 -0
  153. package/mjs/utils/withValidationLibrary.d.ts +76 -0
  154. package/mjs/utils/withValidationLibrary.js +123 -0
  155. package/package.json +29 -6
  156. package/.npmignore +0 -2
  157. package/StreamJSONResponse.d.ts +0 -17
  158. package/StreamJSONResponse.js +0 -54
  159. package/VovkApp.js +0 -185
  160. package/client/clientizeController.d.ts +0 -4
  161. package/client/clientizeController.js +0 -92
  162. package/client/defaultFetcher.d.ts +0 -4
  163. package/client/defaultFetcher.js +0 -49
  164. package/client/defaultHandler.d.ts +0 -2
  165. package/client/defaultHandler.js +0 -22
  166. package/client/defaultStreamHandler.d.ts +0 -4
  167. package/client/index.d.ts +0 -4
  168. package/client/index.js +0 -5
  169. package/client/types.d.ts +0 -100
  170. package/createDecorator.d.ts +0 -4
  171. package/createVovkApp.js +0 -118
  172. package/index.d.ts +0 -60
  173. package/index.js +0 -20
  174. package/types.d.ts +0 -157
  175. package/types.js +0 -65
  176. package/utils/generateStaticAPI.d.ts +0 -4
  177. package/utils/generateStaticAPI.js +0 -18
  178. package/utils/getSchema.d.ts +0 -8
  179. package/utils/getSchema.js +0 -38
  180. package/utils/reqForm.js +0 -13
  181. package/utils/reqQuery.d.ts +0 -3
  182. package/utils/reqQuery.js +0 -25
  183. package/utils/setClientValidatorsForHandler.d.ts +0 -5
  184. package/utils/setClientValidatorsForHandler.js +0 -25
  185. package/worker/index.d.ts +0 -3
  186. package/worker/index.js +0 -7
  187. package/worker/promisifyWorker.d.ts +0 -2
  188. package/worker/promisifyWorker.js +0 -141
  189. package/worker/types.d.ts +0 -31
  190. package/worker/worker.d.ts +0 -1
  191. package/worker/worker.js +0 -43
  192. /package/{client → cjs/client}/types.js +0 -0
  193. /package/{utils → cjs/utils}/reqMeta.js +0 -0
  194. /package/{utils → cjs/utils}/shim.d.ts +0 -0
  195. /package/{utils → cjs/utils}/shim.js +0 -0
  196. /package/{worker → mjs/client}/types.js +0 -0
package/mjs/types.d.ts ADDED
@@ -0,0 +1,400 @@
1
+ import type { NextRequest } from 'next/server';
2
+ import type { OpenAPIObject, OperationObject } from 'openapi3-ts/oas31';
3
+ import type { JSONLinesResponse } from './JSONLinesResponse';
4
+ import { VovkStreamAsyncIterable } from './client/types';
5
+ import type { PackageJson } from 'type-fest';
6
+ export type KnownAny = any;
7
+ export type StaticClass = Function;
8
+ export type VovkHandlerSchema<T = KnownAny> = {
9
+ path: string;
10
+ httpMethod: string;
11
+ validation?: {
12
+ query?: T;
13
+ body?: T;
14
+ params?: T;
15
+ output?: T;
16
+ iteration?: T;
17
+ };
18
+ openapi?: OperationObject;
19
+ misc?: Record<string, KnownAny>;
20
+ };
21
+ export type VovkControllerSchema<T = KnownAny> = {
22
+ rpcModuleName: string;
23
+ originalControllerName?: string;
24
+ prefix?: string;
25
+ forceApiRoot?: string;
26
+ handlers: Record<string, VovkHandlerSchema<T>>;
27
+ };
28
+ export type VovkSegmentSchema<T = KnownAny> = {
29
+ $schema: typeof VovkSchemaIdEnum.SEGMENT | (string & {});
30
+ emitSchema: boolean;
31
+ segmentName: string;
32
+ segmentType: 'segment' | 'mixin' | (string & {});
33
+ forceApiRoot?: string;
34
+ controllers: Record<string, VovkControllerSchema<T>>;
35
+ meta?: {
36
+ components?: OpenAPIObject['components'];
37
+ package?: PackageJson;
38
+ [key: string]: KnownAny;
39
+ };
40
+ };
41
+ export type VovkMetaSchema = {
42
+ $schema: typeof VovkSchemaIdEnum.META | (string & {});
43
+ config: RequireFields<Partial<VovkStrictConfig>, '$schema'>;
44
+ package?: PackageJson;
45
+ apiRoot?: string;
46
+ openapi?: OpenAPIObject;
47
+ [key: string]: KnownAny;
48
+ };
49
+ export type VovkSchema<T = KnownAny> = {
50
+ $schema: typeof VovkSchemaIdEnum.SCHEMA | (string & {});
51
+ segments: Record<string, VovkSegmentSchema<T>>;
52
+ meta?: VovkMetaSchema;
53
+ };
54
+ export type VovkErrorResponse = {
55
+ cause?: unknown;
56
+ statusCode: HttpStatus;
57
+ message: string;
58
+ isError: true;
59
+ };
60
+ export type VovkControllerInternal = {
61
+ _rpcModuleName?: VovkControllerSchema['rpcModuleName'];
62
+ _prefix?: VovkControllerSchema['prefix'];
63
+ _handlers: VovkControllerSchema['handlers'];
64
+ _handlersMetadata?: Record<string, {
65
+ staticParams?: Record<string, string>[];
66
+ }>;
67
+ _onError?: (err: Error, req: VovkRequest) => void | Promise<void>;
68
+ };
69
+ export type VovkController = StaticClass & VovkControllerInternal & {
70
+ [key: string]: unknown;
71
+ };
72
+ export type DecoratorOptions = {
73
+ cors?: boolean;
74
+ headers?: Record<string, string>;
75
+ staticParams?: Record<string, string>[];
76
+ before?: (this: VovkController, req: VovkRequest) => unknown;
77
+ };
78
+ export type RouteHandler = ((req: VovkRequest, params: Record<string, string>) => Response | Promise<Response> | Iterable<unknown> | AsyncIterable<unknown>) & {
79
+ _options?: DecoratorOptions;
80
+ };
81
+ export interface VovkRequest<BODY extends KnownAny = undefined, QUERY extends KnownAny = undefined, PARAMS extends KnownAny = undefined> extends Omit<NextRequest, 'json' | 'nextUrl'> {
82
+ json: () => Promise<BODY>;
83
+ nextUrl: Omit<NextRequest['nextUrl'], 'searchParams'> & {
84
+ searchParams: Omit<NextRequest['nextUrl']['searchParams'], 'get' | 'getAll' | 'entries' | 'forEach' | 'keys' | 'values'> & {
85
+ get: <KEY extends keyof QUERY>(key: KEY) => QUERY[KEY] extends readonly (infer ITEM)[] ? ITEM : QUERY[KEY];
86
+ getAll: <KEY extends keyof QUERY>(key: KEY) => QUERY[KEY] extends KnownAny[] ? QUERY[KEY] : QUERY[KEY][];
87
+ entries: () => IterableIterator<[keyof QUERY, QUERY[keyof QUERY]]>;
88
+ forEach: (callbackfn: (value: QUERY[keyof QUERY], key: keyof QUERY, searchParams: NextRequest['nextUrl']['searchParams']) => void) => void;
89
+ keys: () => IterableIterator<keyof QUERY>;
90
+ values: () => IterableIterator<QUERY[keyof QUERY]>;
91
+ };
92
+ };
93
+ vovk: {
94
+ body: () => Promise<BODY>;
95
+ query: () => QUERY;
96
+ meta: <T = Record<KnownAny, KnownAny>>(meta?: T | null) => T;
97
+ form: <T = BODY>() => Promise<T>;
98
+ params: () => PARAMS;
99
+ };
100
+ }
101
+ export type ControllerStaticMethod<REQ extends VovkRequest<KnownAny, KnownAny, KnownAny> = VovkRequest<unknown, unknown, unknown>, PARAMS extends {
102
+ [key: string]: string;
103
+ } = KnownAny> = ((req: REQ, params: PARAMS) => unknown) & {
104
+ _controller?: VovkController;
105
+ };
106
+ export type VovkTypedMethod<T extends (...args: KnownAny[]) => KnownAny, B = KnownAny, Q = KnownAny, P = KnownAny, O = KnownAny, I = KnownAny, IS_FORM extends boolean = false> = T & {
107
+ __types: {
108
+ body: B;
109
+ query: Q;
110
+ params: P;
111
+ output: O;
112
+ iteration: I;
113
+ isForm: IS_FORM;
114
+ };
115
+ isRPC?: boolean;
116
+ };
117
+ export type VovkControllerBody<T extends (...args: KnownAny) => KnownAny> = Awaited<ReturnType<Parameters<T>[0]['vovk']['body']>>;
118
+ export type VovkControllerQuery<T extends (...args: KnownAny) => KnownAny> = ReturnType<Parameters<T>[0]['vovk']['query']>;
119
+ export type VovkControllerParams<T extends (...args: KnownAny) => KnownAny> = Parameters<T>[1] extends object ? Parameters<T>[1] : ReturnType<Parameters<T>[0]['vovk']['params']>;
120
+ export type VovkControllerYieldType<T extends (req: VovkRequest<KnownAny, KnownAny>) => KnownAny> = T extends (...args: KnownAny[]) => AsyncGenerator<infer Y, KnownAny, KnownAny> ? Y : T extends (...args: KnownAny[]) => Generator<infer Y, KnownAny, KnownAny> ? Y : T extends (...args: KnownAny[]) => Promise<JSONLinesResponse<infer Y>> | JSONLinesResponse<infer Y> ? Y : never;
121
+ export type VovkOutput<T> = T extends {
122
+ __types?: {
123
+ output?: infer O;
124
+ };
125
+ } ? O : KnownAny;
126
+ export type VovkIteration<T> = T extends {
127
+ __types?: {
128
+ iteration?: infer I;
129
+ };
130
+ } ? I : KnownAny;
131
+ export type VovkClientBody<T extends (opts: KnownAny) => KnownAny> = Parameters<T>[0] extends {
132
+ body: infer B;
133
+ } ? B : undefined;
134
+ export type VovkClientQuery<T extends (opts: KnownAny) => KnownAny> = Parameters<T>[0] extends {
135
+ query: infer Q;
136
+ } ? Q : undefined;
137
+ export type VovkClientParams<T extends (opts: KnownAny) => KnownAny> = Parameters<T>[0] extends {
138
+ params: infer P;
139
+ } ? P : undefined;
140
+ export type VovkClientYieldType<T extends (...args: KnownAny[]) => unknown> = T extends (...args: KnownAny[]) => Promise<VovkStreamAsyncIterable<infer Y>> ? Y : never;
141
+ export type VovkBody<T extends (...args: KnownAny[]) => unknown> = T extends {
142
+ isRPC: true;
143
+ } ? VovkClientBody<T> : VovkControllerBody<T>;
144
+ export type VovkQuery<T extends (...args: KnownAny[]) => unknown> = T extends {
145
+ isRPC: true;
146
+ } ? VovkClientQuery<T> : VovkControllerQuery<T>;
147
+ export type VovkParams<T extends (...args: KnownAny[]) => unknown> = T extends {
148
+ isRPC: true;
149
+ } ? VovkClientParams<T> : VovkControllerParams<T>;
150
+ export type VovkYieldType<T extends (...args: KnownAny[]) => unknown> = T extends {
151
+ isRPC: true;
152
+ } ? VovkClientYieldType<T> : VovkControllerYieldType<T>;
153
+ export type VovkReturnType<T extends (...args: KnownAny) => unknown> = Awaited<ReturnType<T>>;
154
+ export type StreamAbortMessage = {
155
+ isError: true;
156
+ reason: KnownAny;
157
+ };
158
+ export type VovkValidationType = 'body' | 'query' | 'params' | 'output' | 'iteration';
159
+ export declare enum HttpMethod {
160
+ GET = "GET",
161
+ POST = "POST",
162
+ PUT = "PUT",
163
+ PATCH = "PATCH",
164
+ DELETE = "DELETE",
165
+ HEAD = "HEAD",
166
+ OPTIONS = "OPTIONS"
167
+ }
168
+ export declare enum HttpStatus {
169
+ NULL = 0,
170
+ CONTINUE = 100,
171
+ SWITCHING_PROTOCOLS = 101,
172
+ PROCESSING = 102,
173
+ EARLYHINTS = 103,
174
+ OK = 200,
175
+ CREATED = 201,
176
+ ACCEPTED = 202,
177
+ NON_AUTHORITATIVE_INFORMATION = 203,
178
+ NO_CONTENT = 204,
179
+ RESET_CONTENT = 205,
180
+ PARTIAL_CONTENT = 206,
181
+ AMBIGUOUS = 300,
182
+ MOVED_PERMANENTLY = 301,
183
+ FOUND = 302,
184
+ SEE_OTHER = 303,
185
+ NOT_MODIFIED = 304,
186
+ TEMPORARY_REDIRECT = 307,
187
+ PERMANENT_REDIRECT = 308,
188
+ BAD_REQUEST = 400,
189
+ UNAUTHORIZED = 401,
190
+ PAYMENT_REQUIRED = 402,
191
+ FORBIDDEN = 403,
192
+ NOT_FOUND = 404,
193
+ METHOD_NOT_ALLOWED = 405,
194
+ NOT_ACCEPTABLE = 406,
195
+ PROXY_AUTHENTICATION_REQUIRED = 407,
196
+ REQUEST_TIMEOUT = 408,
197
+ CONFLICT = 409,
198
+ GONE = 410,
199
+ LENGTH_REQUIRED = 411,
200
+ PRECONDITION_FAILED = 412,
201
+ PAYLOAD_TOO_LARGE = 413,
202
+ URI_TOO_LONG = 414,
203
+ UNSUPPORTED_MEDIA_TYPE = 415,
204
+ REQUESTED_RANGE_NOT_SATISFIABLE = 416,
205
+ EXPECTATION_FAILED = 417,
206
+ I_AM_A_TEAPOT = 418,
207
+ MISDIRECTED = 421,
208
+ UNPROCESSABLE_ENTITY = 422,
209
+ FAILED_DEPENDENCY = 424,
210
+ PRECONDITION_REQUIRED = 428,
211
+ TOO_MANY_REQUESTS = 429,
212
+ INTERNAL_SERVER_ERROR = 500,
213
+ NOT_IMPLEMENTED = 501,
214
+ BAD_GATEWAY = 502,
215
+ SERVICE_UNAVAILABLE = 503,
216
+ GATEWAY_TIMEOUT = 504,
217
+ HTTP_VERSION_NOT_SUPPORTED = 505
218
+ }
219
+ export interface VovkLLMTool {
220
+ execute: (input: {
221
+ body?: KnownAny;
222
+ query?: KnownAny;
223
+ params?: KnownAny;
224
+ }, options: KnownAny) => Promise<KnownAny>;
225
+ name: string;
226
+ description: string;
227
+ parameters?: {
228
+ type: 'object';
229
+ properties?: Record<string, KnownAny>;
230
+ required?: string[];
231
+ additionalProperties?: boolean;
232
+ };
233
+ models: {
234
+ body?: KnownAny;
235
+ query?: KnownAny;
236
+ params?: KnownAny;
237
+ output?: KnownAny;
238
+ iteration?: KnownAny;
239
+ } | undefined;
240
+ type: 'function';
241
+ }
242
+ export type SimpleJSONSchema = {
243
+ type: 'object';
244
+ $ref?: string;
245
+ items?: SimpleJSONSchema;
246
+ description?: string;
247
+ properties: Record<string, SimpleJSONSchema>;
248
+ required?: string[];
249
+ examples?: KnownAny[];
250
+ $defs?: Record<string, SimpleJSONSchema>;
251
+ definitions?: Record<string, SimpleJSONSchema>;
252
+ additionalProperties?: boolean;
253
+ anyOf?: SimpleJSONSchema[];
254
+ oneOf?: SimpleJSONSchema[];
255
+ allOf?: SimpleJSONSchema[];
256
+ [key: `x-${string}`]: KnownAny;
257
+ };
258
+ export declare enum VovkSchemaIdEnum {
259
+ META = "https://vovk.dev/api/spec/v3/meta.json",
260
+ CONFIG = "https://vovk.dev/api/spec/v3/config.json",
261
+ SEGMENT = "https://vovk.dev/api/spec/v3/segment.json",
262
+ SCHEMA = "https://vovk.dev/api/spec/v3/schema.json"
263
+ }
264
+ type ReadmeConfig = {
265
+ banner?: string;
266
+ };
267
+ type ClientConfigCommon = {
268
+ enabled?: boolean;
269
+ outDir?: string;
270
+ fromTemplates?: string[];
271
+ } & ({
272
+ excludeSegments?: never;
273
+ includeSegments?: string[];
274
+ } | {
275
+ excludeSegments?: string[];
276
+ includeSegments?: never;
277
+ });
278
+ type ClientConfigComposed = ClientConfigCommon & {
279
+ package?: PackageJson;
280
+ readme?: ReadmeConfig;
281
+ };
282
+ type ClientConfigSegmented = ClientConfigCommon & {
283
+ packages?: Record<string, PackageJson>;
284
+ readmes?: Record<string, ReadmeConfig>;
285
+ };
286
+ type BundleConfig = {
287
+ outDir?: string;
288
+ requires?: Record<string, string>;
289
+ tsClientOutDir?: string;
290
+ dontDeleteTsClientOutDirAfter?: boolean;
291
+ sourcemap?: boolean;
292
+ package?: PackageJson;
293
+ readme?: ReadmeConfig;
294
+ } & ({
295
+ excludeSegments?: never;
296
+ includeSegments?: string[];
297
+ } | {
298
+ excludeSegments?: string[];
299
+ includeSegments?: never;
300
+ });
301
+ type SegmentConfigItem = {
302
+ origin?: string;
303
+ rootEntry?: string;
304
+ segmentNameOverride?: string;
305
+ reExports?: Record<string, string>;
306
+ };
307
+ type SegmentConfig = Record<string, SegmentConfigItem>;
308
+ export type ClientTemplateDef = {
309
+ extends?: string;
310
+ templatePath?: string | null;
311
+ origin?: string | null;
312
+ composedClient?: Omit<ClientConfigComposed, 'fromTemplates' | 'enabled'>;
313
+ segmentedClient?: Omit<ClientConfigSegmented, 'fromTemplates' | 'enabled'>;
314
+ segmentConfig?: false | SegmentConfig;
315
+ requires?: Record<string, string>;
316
+ isTsClient?: boolean;
317
+ };
318
+ export type GetOpenAPINameFn = (config: {
319
+ operationObject: OperationObject;
320
+ method: HttpMethod;
321
+ path: string;
322
+ openAPIObject: OpenAPIObject;
323
+ }) => string;
324
+ type VovkUserConfig = {
325
+ $schema?: typeof VovkSchemaIdEnum.CONFIG | string;
326
+ emitConfig?: boolean | (keyof VovkStrictConfig | string)[];
327
+ schemaOutDir?: string;
328
+ composedClient?: ClientConfigComposed;
329
+ segmentedClient?: ClientConfigSegmented;
330
+ bundle?: BundleConfig;
331
+ imports?: {
332
+ fetcher?: string | [string, string] | [string];
333
+ validateOnClient?: string | [string, string] | [string];
334
+ createRPC?: string | [string, string] | [string];
335
+ };
336
+ modulesDir?: string;
337
+ rootEntry?: string;
338
+ origin?: string;
339
+ rootSegmentModulesDirName?: string;
340
+ logLevel?: 'error' | 'trace' | 'debug' | 'info' | 'warn';
341
+ prettifyClient?: boolean;
342
+ devHttps?: boolean;
343
+ clientTemplateDefs?: Record<string, ClientTemplateDef>;
344
+ moduleTemplates?: {
345
+ service?: string;
346
+ controller?: string;
347
+ [key: string]: string | undefined;
348
+ };
349
+ libs?: {
350
+ ajv: KnownAny;
351
+ [key: string]: KnownAny;
352
+ };
353
+ segmentConfig?: false | SegmentConfig;
354
+ openApiMixins?: {
355
+ [mixinName: string]: {
356
+ source: {
357
+ file: string;
358
+ } | {
359
+ url: string;
360
+ fallback?: string;
361
+ } | {
362
+ object: OpenAPIObject;
363
+ };
364
+ package?: PackageJson;
365
+ readme?: ReadmeConfig;
366
+ apiRoot?: string;
367
+ getModuleName?: 'nestjs-operation-id' | (string & {}) | 'api' | GetOpenAPINameFn;
368
+ getMethodName?: 'nestjs-operation-id' | 'camel-case-operation-id' | 'auto' | GetOpenAPINameFn;
369
+ errorMessageKey?: string;
370
+ };
371
+ };
372
+ };
373
+ export type VovkConfig = VovkUserConfig;
374
+ export type VovkStrictConfig = Required<Omit<VovkUserConfig, 'emitConfig' | 'libs' | 'imports' | 'composedClient' | 'segmentedClient' | 'bundle' | 'extendClientWithOpenAPI'>> & {
375
+ emitConfig: (keyof VovkStrictConfig | string)[];
376
+ bundle: RequireAllExcept<NonNullable<VovkUserConfig['bundle']>, 'includeSegments' | 'excludeSegments'>;
377
+ imports: {
378
+ fetcher: [string, string] | [string];
379
+ validateOnClient: [string, string] | [string] | null;
380
+ createRPC: [string, string] | [string];
381
+ };
382
+ libs: Record<string, KnownAny>;
383
+ composedClient: RequireFields<ClientConfigComposed, 'enabled' | 'fromTemplates' | 'outDir'>;
384
+ segmentedClient: RequireFields<ClientConfigSegmented, 'enabled' | 'fromTemplates' | 'outDir'>;
385
+ openApiMixins: {
386
+ [mixinName: string]: {
387
+ source: Exclude<NonNullable<VovkConfig['openApiMixins']>[string]['source'], {
388
+ file: string;
389
+ } | {
390
+ url: string;
391
+ }>;
392
+ apiRoot?: string;
393
+ getModuleName: NonNullable<VovkConfig['openApiMixins']>[string]['getModuleName'];
394
+ getMethodName: NonNullable<VovkConfig['openApiMixins']>[string]['getMethodName'];
395
+ };
396
+ };
397
+ };
398
+ export type RequireFields<T, K extends keyof T> = T & Required<Pick<T, K>>;
399
+ export type RequireAllExcept<T, K extends keyof T> = Required<Omit<T, K>> & Pick<T, K>;
400
+ export {};
package/mjs/types.js ADDED
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VovkSchemaIdEnum = exports.HttpStatus = exports.HttpMethod = void 0;
4
+ // Enums
5
+ var HttpMethod;
6
+ (function (HttpMethod) {
7
+ HttpMethod["GET"] = "GET";
8
+ HttpMethod["POST"] = "POST";
9
+ HttpMethod["PUT"] = "PUT";
10
+ HttpMethod["PATCH"] = "PATCH";
11
+ HttpMethod["DELETE"] = "DELETE";
12
+ HttpMethod["HEAD"] = "HEAD";
13
+ HttpMethod["OPTIONS"] = "OPTIONS";
14
+ })(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
15
+ var HttpStatus;
16
+ (function (HttpStatus) {
17
+ HttpStatus[HttpStatus["NULL"] = 0] = "NULL";
18
+ HttpStatus[HttpStatus["CONTINUE"] = 100] = "CONTINUE";
19
+ HttpStatus[HttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
20
+ HttpStatus[HttpStatus["PROCESSING"] = 102] = "PROCESSING";
21
+ HttpStatus[HttpStatus["EARLYHINTS"] = 103] = "EARLYHINTS";
22
+ HttpStatus[HttpStatus["OK"] = 200] = "OK";
23
+ HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED";
24
+ HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
25
+ HttpStatus[HttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
26
+ HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
27
+ HttpStatus[HttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT";
28
+ HttpStatus[HttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
29
+ HttpStatus[HttpStatus["AMBIGUOUS"] = 300] = "AMBIGUOUS";
30
+ HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
31
+ HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND";
32
+ HttpStatus[HttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER";
33
+ HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
34
+ HttpStatus[HttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
35
+ HttpStatus[HttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
36
+ HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
37
+ HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
38
+ HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
39
+ HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
40
+ HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
41
+ HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
42
+ HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
43
+ HttpStatus[HttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
44
+ HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
45
+ HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT";
46
+ HttpStatus[HttpStatus["GONE"] = 410] = "GONE";
47
+ HttpStatus[HttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
48
+ HttpStatus[HttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
49
+ HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
50
+ HttpStatus[HttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
51
+ HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
52
+ HttpStatus[HttpStatus["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
53
+ HttpStatus[HttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
54
+ HttpStatus[HttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
55
+ HttpStatus[HttpStatus["MISDIRECTED"] = 421] = "MISDIRECTED";
56
+ HttpStatus[HttpStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
57
+ HttpStatus[HttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
58
+ HttpStatus[HttpStatus["PRECONDITION_REQUIRED"] = 428] = "PRECONDITION_REQUIRED";
59
+ HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
60
+ HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
61
+ HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
62
+ HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
63
+ HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
64
+ HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
65
+ HttpStatus[HttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
66
+ })(HttpStatus || (exports.HttpStatus = HttpStatus = {}));
67
+ // -----
68
+ var VovkSchemaIdEnum;
69
+ (function (VovkSchemaIdEnum) {
70
+ VovkSchemaIdEnum["META"] = "https://vovk.dev/api/spec/v3/meta.json";
71
+ VovkSchemaIdEnum["CONFIG"] = "https://vovk.dev/api/spec/v3/config.json";
72
+ VovkSchemaIdEnum["SEGMENT"] = "https://vovk.dev/api/spec/v3/segment.json";
73
+ VovkSchemaIdEnum["SCHEMA"] = "https://vovk.dev/api/spec/v3/schema.json";
74
+ })(VovkSchemaIdEnum || (exports.VovkSchemaIdEnum = VovkSchemaIdEnum = {}));
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Converts string to camel case.
3
+ * @param {*} input - The value to convert to camel case.
4
+ * @returns {string}
5
+ */
6
+ export declare function camelCase(input: string): string;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.camelCase = camelCase;
4
+ // Convert any value to string
5
+ function toString(value) {
6
+ return value == null ? '' : String(value);
7
+ }
8
+ // Regex to match words (including Unicode letters & digits)
9
+ const reUnicodeWord = /[\p{Lu}]{2,}(?=[\p{Lu}][\p{Ll}]+[0-9]*|\b)|[\p{Lu}]?[\p{Ll}]+[0-9]*|[\p{Lu}]|[0-9]+/gu;
10
+ /**
11
+ * Splits string into an array of words based on Unicode word boundaries
12
+ * @param {string} str
13
+ * @returns {string[]}
14
+ */
15
+ function unicodeWords(str) {
16
+ return str.match(reUnicodeWord) || [];
17
+ }
18
+ /**
19
+ * Converts string to camel case.
20
+ * @param {*} input - The value to convert to camel case.
21
+ * @returns {string}
22
+ */
23
+ function camelCase(input) {
24
+ const str = toString(input);
25
+ // replace separators with space
26
+ const sanitized = str.replace(/[\s_-]+/g, ' ').trim();
27
+ const words = unicodeWords(sanitized);
28
+ return words
29
+ .map((word, index) => {
30
+ const lower = word.toLowerCase();
31
+ if (index === 0) {
32
+ return lower;
33
+ }
34
+ return lower.charAt(0).toUpperCase() + lower.slice(1);
35
+ })
36
+ .join('');
37
+ }
@@ -0,0 +1,19 @@
1
+ import type { KnownAny, VovkControllerSchema, VovkHandlerSchema } from '../types';
2
+ export type CodeSamplePackageJson = {
3
+ name?: string;
4
+ version?: string;
5
+ description?: string;
6
+ rs_name?: string;
7
+ py_name?: string;
8
+ [key: string]: KnownAny;
9
+ };
10
+ export declare function createCodeExamples({ handlerName, handlerSchema, controllerSchema, package: packageJson, }: {
11
+ handlerName: string;
12
+ handlerSchema: VovkHandlerSchema;
13
+ controllerSchema: VovkControllerSchema;
14
+ package?: CodeSamplePackageJson;
15
+ }): {
16
+ ts: string;
17
+ py: string;
18
+ rs: string;
19
+ };
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createCodeExamples = createCodeExamples;
4
+ const getJSONSchemaExample_1 = require("./getJSONSchemaExample");
5
+ const toSnakeCase = (str) => str
6
+ .replace(/-/g, '_') // Replace hyphens with underscores
7
+ .replace(/([a-z0-9])([A-Z])/g, '$1_$2') // Add underscore between lowercase/digit and uppercase
8
+ .replace(/([A-Z])([A-Z])(?=[a-z])/g, '$1_$2') // Add underscore between uppercase letters if the second one is followed by a lowercase
9
+ .toLowerCase()
10
+ .replace(/^_/, ''); // Remove leading underscore
11
+ function createCodeExamples({ handlerName, handlerSchema, controllerSchema, package: packageJson, }) {
12
+ const queryValidation = handlerSchema?.validation?.query;
13
+ const bodyValidation = handlerSchema?.validation?.body;
14
+ const paramsValidation = handlerSchema?.validation?.params;
15
+ const outputValidation = handlerSchema?.validation?.output;
16
+ const iterationValidation = handlerSchema?.validation?.iteration;
17
+ const getTsSample = (schema, indent) => (0, getJSONSchemaExample_1.getJSONSchemaExample)(schema, { stripQuotes: true, indent: indent ?? 4 });
18
+ const getPySample = (schema, indent) => (0, getJSONSchemaExample_1.getJSONSchemaExample)(schema, { stripQuotes: false, indent: indent ?? 4, comment: '#' });
19
+ const getRsSample = (schema, indent) => (0, getJSONSchemaExample_1.getJSONSchemaExample)(schema, { stripQuotes: false, indent: indent ?? 4 });
20
+ const hasArg = !!queryValidation || !!bodyValidation || !!paramsValidation;
21
+ const rpcName = controllerSchema.rpcModuleName;
22
+ const handlerNameSnake = toSnakeCase(handlerName);
23
+ const rpcNameSnake = toSnakeCase(rpcName);
24
+ const packageName = packageJson?.name || 'vovk-client';
25
+ const packageNameSnake = toSnakeCase(packageName);
26
+ const tsArgs = hasArg
27
+ ? `{
28
+ ${[
29
+ bodyValidation ? ` body: ${getTsSample(bodyValidation)},` : null,
30
+ queryValidation ? ` query: ${getTsSample(queryValidation)},` : null,
31
+ paramsValidation ? ` params: ${getTsSample(paramsValidation)},` : null,
32
+ ]
33
+ .filter(Boolean)
34
+ .join('\n')}
35
+ }`
36
+ : '';
37
+ const TS_CODE = `import { ${rpcName} } from '${packageName}';
38
+
39
+ ${iterationValidation ? 'using' : 'const'} response = await ${rpcName}.${handlerName}(${tsArgs});
40
+ ${outputValidation
41
+ ? `
42
+ console.log(response);
43
+ /*
44
+ ${getTsSample(outputValidation, 0)}
45
+ */`
46
+ : ''}${iterationValidation
47
+ ? `
48
+ for await (const item of response) {
49
+ console.log(item);
50
+ /*
51
+ ${getTsSample(iterationValidation)}
52
+ */
53
+ }`
54
+ : ''}`;
55
+ const PY_CODE = `from ${packageJson?.py_name ?? packageNameSnake} import ${rpcName}
56
+
57
+ response = ${rpcName}.${handlerNameSnake}(${hasArg
58
+ ? '\n' +
59
+ [
60
+ bodyValidation ? ` body=${getPySample(bodyValidation)},` : null,
61
+ queryValidation ? ` query=${getPySample(queryValidation)},` : null,
62
+ paramsValidation ? ` params=${getPySample(paramsValidation)},` : null,
63
+ ]
64
+ .filter(Boolean)
65
+ .join('\n') +
66
+ '\n'
67
+ : ''})
68
+
69
+ ${outputValidation ? `print(response)\n${getPySample(outputValidation, 0)}` : ''}${iterationValidation
70
+ ? `for i, item in enumerate(response):
71
+ print(f"iteration #{i}:\\n {item}")
72
+ # iteration #0:
73
+ ${getPySample(iterationValidation)}`
74
+ : ''}`;
75
+ const serdeUnwrap = (fake) => `from_value(json!(${fake})).unwrap()`;
76
+ const RS_CODE = `use ${packageJson?.rs_name ?? packageNameSnake}::${rpcNameSnake};
77
+ use serde_json::{ from_value, json };
78
+
79
+ pub fn main() {
80
+ let response = ${rpcNameSnake}::${handlerNameSnake}(
81
+ ${bodyValidation ? serdeUnwrap(getRsSample(bodyValidation)) : '()'}, /* body */
82
+ ${queryValidation ? serdeUnwrap(getRsSample(queryValidation)) : '()'}, /* query */
83
+ ${paramsValidation ? serdeUnwrap(getRsSample(paramsValidation)) : '()'}, /* params */
84
+ None, /* headers (HashMap) */
85
+ None, /* api_root */
86
+ false, /* disable_client_validation */
87
+ );${outputValidation
88
+ ? `\n\nmatch response {
89
+ Ok(output) => println!("{:?}", output),
90
+ /*
91
+ output ${getTsSample(outputValidation)}
92
+ */
93
+ Err(e) => println!("error: {:?}", e),
94
+ }`
95
+ : ''}${iterationValidation
96
+ ? `match response {
97
+ Ok(stream) => {
98
+ for (i, item) in stream.enumerate() {
99
+ println!("#{}: {:?}", i, item);
100
+ /*
101
+ #0: iteration ${getTsSample(iterationValidation, 8)}
102
+ */
103
+ }
104
+ },
105
+ Err(e) => println!("Error initiating stream: {:?}", e),
106
+ }`
107
+ : ''}
108
+ }`;
109
+ return { ts: TS_CODE.trim(), py: PY_CODE.trim(), rs: RS_CODE.trim() };
110
+ }
@@ -0,0 +1,6 @@
1
+ import type { VovkHandlerSchema, KnownAny, VovkController, VovkRequest } from '../types';
2
+ type Next = () => Promise<unknown>;
3
+ export declare function createDecorator<ARGS extends unknown[], REQUEST = VovkRequest>(handler: null | ((this: VovkController, req: REQUEST, next: Next, ...args: ARGS) => unknown), initHandler?: (this: VovkController, ...args: ARGS) => Omit<VovkHandlerSchema, 'path' | 'httpMethod'> | ((handlerSchema: VovkHandlerSchema | null, options: {
4
+ handlerName: string;
5
+ }) => Omit<Partial<VovkHandlerSchema>, 'path' | 'httpMethod'>) | null | undefined): (...args: ARGS) => (target: KnownAny, propertyKey: string) => void;
6
+ export {};