vovk-hello-world 0.0.28 → 0.0.33
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/README.md +2 -2
- package/index.cjs +5 -6
- package/index.d.cts +165 -149
- package/index.d.mts +165 -149
- package/index.mjs +3 -4
- package/package.json +1 -1
- package/schema.cjs +1 -1
- package/schema.d.cts +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
<!-- auto-generated by vovk-cli v0.0.1-draft.
|
|
1
|
+
<!-- auto-generated by vovk-cli v0.0.1-draft.304 at 2025-08-01T13:24:26.032Z -->
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
# vovk-hello-world v0.0.
|
|
4
|
+
# vovk-hello-world v0.0.33 [](https://www.typescriptlang.org/) [](https://vovk.dev)
|
|
5
5
|
|
|
6
6
|
> A showcase for Next.js + Vovk.ts + Zod, demonstrating its capabilities with TypeScript, Rust, and Python RPC.
|
|
7
7
|
|
package/index.cjs
CHANGED
|
@@ -22,7 +22,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
|
|
23
23
|
//#endregion
|
|
24
24
|
const vovk = __toESM(require("vovk"));
|
|
25
|
-
const vovk_react_query = __toESM(require("vovk-react-query"));
|
|
26
25
|
const vovk_ajv = __toESM(require("vovk-ajv"));
|
|
27
26
|
|
|
28
27
|
//#region .vovk-schema/_meta.json
|
|
@@ -192,7 +191,7 @@ var static_default = {
|
|
|
192
191
|
};
|
|
193
192
|
|
|
194
193
|
//#endregion
|
|
195
|
-
//#region
|
|
194
|
+
//#region tmp_prebundle/schema.ts
|
|
196
195
|
const segments = {
|
|
197
196
|
"": root_default,
|
|
198
197
|
"static": static_default
|
|
@@ -208,16 +207,16 @@ const schema = {
|
|
|
208
207
|
};
|
|
209
208
|
|
|
210
209
|
//#endregion
|
|
211
|
-
//#region
|
|
212
|
-
const UserRPC = (0,
|
|
210
|
+
//#region tmp_prebundle/index.ts
|
|
211
|
+
const UserRPC = (0, vovk.createRPC)(schema, "", "UserRPC", vovk.fetcher, {
|
|
213
212
|
validateOnClient: vovk_ajv.validateOnClient,
|
|
214
213
|
apiRoot: "http://localhost:3000/api"
|
|
215
214
|
});
|
|
216
|
-
const StreamRPC = (0,
|
|
215
|
+
const StreamRPC = (0, vovk.createRPC)(schema, "", "StreamRPC", vovk.fetcher, {
|
|
217
216
|
validateOnClient: vovk_ajv.validateOnClient,
|
|
218
217
|
apiRoot: "http://localhost:3000/api"
|
|
219
218
|
});
|
|
220
|
-
const OpenApiRPC = (0,
|
|
219
|
+
const OpenApiRPC = (0, vovk.createRPC)(schema, "static", "OpenApiRPC", vovk.fetcher, {
|
|
221
220
|
validateOnClient: vovk_ajv.validateOnClient,
|
|
222
221
|
apiRoot: "http://localhost:3000/api"
|
|
223
222
|
});
|
package/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as vovk0 from "vovk";
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
2
|
+
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
3
|
+
import * as zod0 from "zod";
|
|
4
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
|
+
import * as vovk_mjs_client_types0 from "vovk/mjs/client/types";
|
|
6
|
+
import * as openapi3_ts_oas310 from "openapi3-ts/oas31";
|
|
6
7
|
|
|
7
|
-
//#region
|
|
8
|
+
//#region tmp_prebundle/schema.d.ts
|
|
8
9
|
declare const schema: {
|
|
9
10
|
$schema: string;
|
|
10
11
|
segments: {
|
|
@@ -176,45 +177,25 @@ declare const schema: {
|
|
|
176
177
|
};
|
|
177
178
|
};
|
|
178
179
|
//#endregion
|
|
179
|
-
//#region
|
|
180
|
+
//#region tmp_prebundle/index.d.ts
|
|
180
181
|
declare const UserRPC: {
|
|
181
|
-
updateUser: (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
init?: RequestInit;
|
|
187
|
-
}>>(options: {
|
|
188
|
-
body: {
|
|
189
|
-
email: string;
|
|
190
|
-
profile: {
|
|
191
|
-
name: string;
|
|
192
|
-
age: number;
|
|
193
|
-
};
|
|
182
|
+
updateUser: vovk_mjs_client_types0.ClientMethod<((req: vovk0.VovkRequest<{
|
|
183
|
+
email: string;
|
|
184
|
+
profile: {
|
|
185
|
+
name: string;
|
|
186
|
+
age: number;
|
|
194
187
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
interpretAs?: string | undefined;
|
|
205
|
-
init?: RequestInit | undefined;
|
|
206
|
-
transform?: ((staticMethodReturn: {
|
|
207
|
-
success: true;
|
|
208
|
-
}, resp: Response) => R) | undefined;
|
|
209
|
-
fetcher?: VovkClientFetcher<F> | undefined;
|
|
210
|
-
}) => R extends object ? Promise<Awaited<R>> : Promise<{
|
|
188
|
+
}, {
|
|
189
|
+
notify: "email" | "push" | "none";
|
|
190
|
+
}, {
|
|
191
|
+
id: string;
|
|
192
|
+
}>, {
|
|
193
|
+
id
|
|
194
|
+
}: {
|
|
195
|
+
id: string;
|
|
196
|
+
}) => Promise<{
|
|
211
197
|
success: true;
|
|
212
198
|
}>) & {
|
|
213
|
-
isRPC: true;
|
|
214
|
-
schema: vovk0.VovkHandlerSchema;
|
|
215
|
-
controllerSchema: vovk0.VovkControllerSchema;
|
|
216
|
-
segmentSchema: vovk0.VovkSegmentSchema;
|
|
217
|
-
fullSchema: vovk0.VovkSchema;
|
|
218
199
|
__types: {
|
|
219
200
|
body: {
|
|
220
201
|
email: string;
|
|
@@ -235,92 +216,104 @@ declare const UserRPC: {
|
|
|
235
216
|
iteration: unknown;
|
|
236
217
|
isForm: false;
|
|
237
218
|
};
|
|
219
|
+
isRPC?: boolean;
|
|
238
220
|
} & {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
name: string;
|
|
244
|
-
age: number;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
query: {
|
|
248
|
-
notify: "email" | "push" | "none";
|
|
249
|
-
};
|
|
250
|
-
params: {
|
|
251
|
-
id: string;
|
|
252
|
-
};
|
|
253
|
-
apiRoot?: string | undefined;
|
|
254
|
-
disableClientValidation?: boolean | undefined;
|
|
255
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
256
|
-
interpretAs?: string | undefined;
|
|
257
|
-
init?: RequestInit | undefined;
|
|
258
|
-
transform?: ((staticMethodReturn: {
|
|
259
|
-
success: true;
|
|
260
|
-
}, resp: Response) => unknown) | undefined;
|
|
261
|
-
fetcher?: VovkClientFetcher<unknown> | undefined;
|
|
262
|
-
}, options?: Omit<_tanstack_react_query8.UseQueryOptions<Promise<{
|
|
263
|
-
success: true;
|
|
264
|
-
}>, Error, Promise<{
|
|
265
|
-
success: true;
|
|
266
|
-
}>, readonly unknown[]>, "queryFn" | "queryKey"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseQueryResult<{
|
|
267
|
-
success: true;
|
|
268
|
-
}, vovk0.HttpException>;
|
|
269
|
-
useMutation: (options?: Omit<_tanstack_react_query8.UseMutationOptions<Promise<{
|
|
270
|
-
success: true;
|
|
271
|
-
}>, Error, void, unknown>, "mutationFn"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseMutationResult<{
|
|
221
|
+
schema: vovk0.VovkHandlerSchema;
|
|
222
|
+
wrapper?: ((req: vovk0.VovkRequest<any, any, any>, params: {
|
|
223
|
+
id: string;
|
|
224
|
+
}) => Promise<{
|
|
272
225
|
success: true;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
226
|
+
}>) | undefined;
|
|
227
|
+
} & {
|
|
228
|
+
fn: {
|
|
229
|
+
<RETURN_TYPE = Promise<{
|
|
230
|
+
success: true;
|
|
231
|
+
}>>(input?: ({
|
|
232
|
+
disableClientValidation?: boolean;
|
|
233
|
+
} & {
|
|
234
|
+
body?: {
|
|
235
|
+
email: string;
|
|
236
|
+
profile: {
|
|
237
|
+
name: string;
|
|
238
|
+
age: number;
|
|
239
|
+
};
|
|
240
|
+
} | undefined;
|
|
241
|
+
} & {
|
|
242
|
+
query?: {
|
|
243
|
+
notify: "email" | "push" | "none";
|
|
244
|
+
} | undefined;
|
|
245
|
+
} & {
|
|
246
|
+
params?: {
|
|
247
|
+
id: string;
|
|
248
|
+
} | undefined;
|
|
249
|
+
} & {
|
|
250
|
+
meta?: {
|
|
251
|
+
[key: string]: any;
|
|
252
|
+
__disableClientValidation?: boolean;
|
|
279
253
|
};
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
notify: "email" | "push" | "none";
|
|
283
|
-
};
|
|
284
|
-
params: {
|
|
285
|
-
id: string;
|
|
286
|
-
};
|
|
287
|
-
apiRoot?: string | undefined;
|
|
288
|
-
disableClientValidation?: boolean | undefined;
|
|
289
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
290
|
-
interpretAs?: string | undefined;
|
|
291
|
-
init?: RequestInit | undefined;
|
|
292
|
-
transform?: ((staticMethodReturn: {
|
|
254
|
+
}) | undefined): RETURN_TYPE;
|
|
255
|
+
<RETURN_TYPE = Promise<{
|
|
293
256
|
success: true;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
257
|
+
}>>(input: {
|
|
258
|
+
disableClientValidation?: boolean;
|
|
259
|
+
} & {
|
|
260
|
+
body?: {
|
|
261
|
+
email: string;
|
|
262
|
+
profile: {
|
|
263
|
+
name: string;
|
|
264
|
+
age: number;
|
|
265
|
+
};
|
|
266
|
+
} | undefined;
|
|
267
|
+
} & {
|
|
268
|
+
query?: {
|
|
269
|
+
notify: "email" | "push" | "none";
|
|
270
|
+
} | undefined;
|
|
271
|
+
} & {
|
|
272
|
+
params?: {
|
|
273
|
+
id: string;
|
|
274
|
+
} | undefined;
|
|
275
|
+
} & {
|
|
276
|
+
meta?: {
|
|
277
|
+
[key: string]: any;
|
|
278
|
+
__disableClientValidation?: boolean;
|
|
279
|
+
};
|
|
280
|
+
}): RETURN_TYPE;
|
|
281
|
+
};
|
|
282
|
+
models: {
|
|
283
|
+
iteration?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
284
|
+
output?: zod0.ZodObject<{
|
|
285
|
+
success: zod0.ZodBoolean;
|
|
286
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
287
|
+
params?: zod0.ZodObject<{
|
|
288
|
+
id: zod0.ZodUUID;
|
|
289
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
290
|
+
query?: zod0.ZodObject<{
|
|
291
|
+
notify: zod0.ZodEnum<{
|
|
292
|
+
email: "email";
|
|
293
|
+
push: "push";
|
|
294
|
+
none: "none";
|
|
295
|
+
}>;
|
|
296
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
297
|
+
body?: zod0.ZodObject<{
|
|
298
|
+
email: zod0.ZodEmail;
|
|
299
|
+
profile: zod0.ZodObject<{
|
|
300
|
+
name: zod0.ZodString;
|
|
301
|
+
age: zod0.ZodInt;
|
|
302
|
+
}, zod_v4_core0.$strip>;
|
|
303
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
304
|
+
};
|
|
305
|
+
}, {
|
|
301
306
|
apiRoot?: string;
|
|
302
307
|
disableClientValidation?: boolean;
|
|
303
|
-
validateOnClient?: vovk0.VovkValidateOnClient;
|
|
308
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | undefined;
|
|
304
309
|
interpretAs?: string;
|
|
305
310
|
init?: RequestInit;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
interpretAs?: string | undefined;
|
|
311
|
-
init?: RequestInit | undefined;
|
|
312
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
313
|
-
message: string;
|
|
314
|
-
}, void, unknown>, resp: Response) => R) | undefined;
|
|
315
|
-
fetcher?: VovkClientFetcher<F> | undefined;
|
|
316
|
-
} | undefined) => Promise<vovk0.VovkStreamAsyncIterable<{
|
|
311
|
+
}, unknown>;
|
|
312
|
+
};
|
|
313
|
+
declare const StreamRPC: {
|
|
314
|
+
streamTokens: vovk_mjs_client_types0.ClientMethod<(() => AsyncGenerator<{
|
|
317
315
|
message: string;
|
|
318
|
-
}
|
|
319
|
-
isRPC: true;
|
|
320
|
-
schema: vovk0.VovkHandlerSchema;
|
|
321
|
-
controllerSchema: vovk0.VovkControllerSchema;
|
|
322
|
-
segmentSchema: vovk0.VovkSegmentSchema;
|
|
323
|
-
fullSchema: vovk0.VovkSchema;
|
|
316
|
+
}, void, unknown>) & {
|
|
324
317
|
__types: {
|
|
325
318
|
body: unknown;
|
|
326
319
|
query: unknown;
|
|
@@ -331,43 +324,66 @@ declare const StreamRPC: {
|
|
|
331
324
|
};
|
|
332
325
|
isForm: false;
|
|
333
326
|
};
|
|
327
|
+
isRPC?: boolean;
|
|
334
328
|
} & {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
disableClientValidation?: boolean | undefined;
|
|
338
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
339
|
-
interpretAs?: string | undefined;
|
|
340
|
-
init?: RequestInit | undefined;
|
|
341
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
342
|
-
message: string;
|
|
343
|
-
}, void, unknown>, resp: Response) => unknown) | undefined;
|
|
344
|
-
fetcher?: VovkClientFetcher<unknown> | undefined;
|
|
345
|
-
} | undefined, options?: Omit<_tanstack_react_query8.UseQueryOptions<Promise<vovk0.VovkStreamAsyncIterable<{
|
|
346
|
-
message: string;
|
|
347
|
-
}>>, Error, Promise<vovk0.VovkStreamAsyncIterable<{
|
|
348
|
-
message: string;
|
|
349
|
-
}>>, readonly unknown[]>, "queryFn" | "queryKey"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseQueryResult<{
|
|
350
|
-
message: string;
|
|
351
|
-
}[], vovk0.HttpException>;
|
|
352
|
-
useMutation: (options?: Omit<_tanstack_react_query8.UseMutationOptions<Promise<vovk0.VovkStreamAsyncIterable<{
|
|
353
|
-
message: string;
|
|
354
|
-
}>>, Error, void, unknown>, "mutationFn"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseMutationResult<vovk0.VovkStreamAsyncIterable<{
|
|
329
|
+
schema: vovk0.VovkHandlerSchema;
|
|
330
|
+
wrapper?: ((req: vovk0.VovkRequest<any, any, any>, params: undefined) => AsyncGenerator<{
|
|
355
331
|
message: string;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
interpretAs?: string | undefined;
|
|
361
|
-
init?: RequestInit | undefined;
|
|
362
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
332
|
+
}, void, unknown>) | undefined;
|
|
333
|
+
} & {
|
|
334
|
+
fn: {
|
|
335
|
+
<RETURN_TYPE = AsyncGenerator<{
|
|
363
336
|
message: string;
|
|
364
|
-
}, void, unknown
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
337
|
+
}, void, unknown>>(input?: ({
|
|
338
|
+
disableClientValidation?: boolean;
|
|
339
|
+
} & {
|
|
340
|
+
body?: unknown;
|
|
341
|
+
} & {
|
|
342
|
+
query?: unknown;
|
|
343
|
+
} & {
|
|
344
|
+
params?: unknown;
|
|
345
|
+
} & {
|
|
346
|
+
meta?: {
|
|
347
|
+
[key: string]: any;
|
|
348
|
+
__disableClientValidation?: boolean;
|
|
349
|
+
};
|
|
350
|
+
}) | undefined): RETURN_TYPE;
|
|
351
|
+
<RETURN_TYPE = AsyncGenerator<{
|
|
352
|
+
message: string;
|
|
353
|
+
}, void, unknown>>(input: {
|
|
354
|
+
disableClientValidation?: boolean;
|
|
355
|
+
} & {
|
|
356
|
+
body?: unknown;
|
|
357
|
+
} & {
|
|
358
|
+
query?: unknown;
|
|
359
|
+
} & {
|
|
360
|
+
params?: unknown;
|
|
361
|
+
} & {
|
|
362
|
+
meta?: {
|
|
363
|
+
[key: string]: any;
|
|
364
|
+
__disableClientValidation?: boolean;
|
|
365
|
+
};
|
|
366
|
+
}): RETURN_TYPE;
|
|
367
|
+
};
|
|
368
|
+
models: {
|
|
369
|
+
iteration?: zod0.ZodObject<{
|
|
370
|
+
message: zod0.ZodString;
|
|
371
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
372
|
+
output?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
373
|
+
params?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
374
|
+
query?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
375
|
+
body?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
376
|
+
};
|
|
377
|
+
}, {
|
|
378
|
+
apiRoot?: string;
|
|
379
|
+
disableClientValidation?: boolean;
|
|
380
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | undefined;
|
|
381
|
+
interpretAs?: string;
|
|
382
|
+
init?: RequestInit;
|
|
383
|
+
}, unknown>;
|
|
368
384
|
};
|
|
369
385
|
declare const OpenApiRPC: {
|
|
370
|
-
getSpec: () => Promise<
|
|
386
|
+
getSpec: () => Promise<openapi3_ts_oas310.OpenAPIObject>;
|
|
371
387
|
};
|
|
372
388
|
//#endregion
|
|
373
389
|
export { OpenApiRPC, StreamRPC, UserRPC, schema };
|
package/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as vovk0 from "vovk";
|
|
2
|
-
import
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
2
|
+
import * as _standard_schema_spec0 from "@standard-schema/spec";
|
|
3
|
+
import * as zod0 from "zod";
|
|
4
|
+
import * as zod_v4_core0 from "zod/v4/core";
|
|
5
|
+
import * as vovk_mjs_client_types0 from "vovk/mjs/client/types";
|
|
6
|
+
import * as openapi3_ts_oas310 from "openapi3-ts/oas31";
|
|
6
7
|
|
|
7
|
-
//#region
|
|
8
|
+
//#region tmp_prebundle/schema.d.ts
|
|
8
9
|
declare const schema: {
|
|
9
10
|
$schema: string;
|
|
10
11
|
segments: {
|
|
@@ -176,45 +177,25 @@ declare const schema: {
|
|
|
176
177
|
};
|
|
177
178
|
};
|
|
178
179
|
//#endregion
|
|
179
|
-
//#region
|
|
180
|
+
//#region tmp_prebundle/index.d.ts
|
|
180
181
|
declare const UserRPC: {
|
|
181
|
-
updateUser: (
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
init?: RequestInit;
|
|
187
|
-
}>>(options: {
|
|
188
|
-
body: {
|
|
189
|
-
email: string;
|
|
190
|
-
profile: {
|
|
191
|
-
name: string;
|
|
192
|
-
age: number;
|
|
193
|
-
};
|
|
182
|
+
updateUser: vovk_mjs_client_types0.ClientMethod<((req: vovk0.VovkRequest<{
|
|
183
|
+
email: string;
|
|
184
|
+
profile: {
|
|
185
|
+
name: string;
|
|
186
|
+
age: number;
|
|
194
187
|
};
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
interpretAs?: string | undefined;
|
|
205
|
-
init?: RequestInit | undefined;
|
|
206
|
-
transform?: ((staticMethodReturn: {
|
|
207
|
-
success: true;
|
|
208
|
-
}, resp: Response) => R) | undefined;
|
|
209
|
-
fetcher?: VovkClientFetcher<F> | undefined;
|
|
210
|
-
}) => R extends object ? Promise<Awaited<R>> : Promise<{
|
|
188
|
+
}, {
|
|
189
|
+
notify: "email" | "push" | "none";
|
|
190
|
+
}, {
|
|
191
|
+
id: string;
|
|
192
|
+
}>, {
|
|
193
|
+
id
|
|
194
|
+
}: {
|
|
195
|
+
id: string;
|
|
196
|
+
}) => Promise<{
|
|
211
197
|
success: true;
|
|
212
198
|
}>) & {
|
|
213
|
-
isRPC: true;
|
|
214
|
-
schema: vovk0.VovkHandlerSchema;
|
|
215
|
-
controllerSchema: vovk0.VovkControllerSchema;
|
|
216
|
-
segmentSchema: vovk0.VovkSegmentSchema;
|
|
217
|
-
fullSchema: vovk0.VovkSchema;
|
|
218
199
|
__types: {
|
|
219
200
|
body: {
|
|
220
201
|
email: string;
|
|
@@ -235,92 +216,104 @@ declare const UserRPC: {
|
|
|
235
216
|
iteration: unknown;
|
|
236
217
|
isForm: false;
|
|
237
218
|
};
|
|
219
|
+
isRPC?: boolean;
|
|
238
220
|
} & {
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
name: string;
|
|
244
|
-
age: number;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
query: {
|
|
248
|
-
notify: "email" | "push" | "none";
|
|
249
|
-
};
|
|
250
|
-
params: {
|
|
251
|
-
id: string;
|
|
252
|
-
};
|
|
253
|
-
apiRoot?: string | undefined;
|
|
254
|
-
disableClientValidation?: boolean | undefined;
|
|
255
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
256
|
-
interpretAs?: string | undefined;
|
|
257
|
-
init?: RequestInit | undefined;
|
|
258
|
-
transform?: ((staticMethodReturn: {
|
|
259
|
-
success: true;
|
|
260
|
-
}, resp: Response) => unknown) | undefined;
|
|
261
|
-
fetcher?: VovkClientFetcher<unknown> | undefined;
|
|
262
|
-
}, options?: Omit<_tanstack_react_query8.UseQueryOptions<Promise<{
|
|
263
|
-
success: true;
|
|
264
|
-
}>, Error, Promise<{
|
|
265
|
-
success: true;
|
|
266
|
-
}>, readonly unknown[]>, "queryFn" | "queryKey"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseQueryResult<{
|
|
267
|
-
success: true;
|
|
268
|
-
}, vovk0.HttpException>;
|
|
269
|
-
useMutation: (options?: Omit<_tanstack_react_query8.UseMutationOptions<Promise<{
|
|
270
|
-
success: true;
|
|
271
|
-
}>, Error, void, unknown>, "mutationFn"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseMutationResult<{
|
|
221
|
+
schema: vovk0.VovkHandlerSchema;
|
|
222
|
+
wrapper?: ((req: vovk0.VovkRequest<any, any, any>, params: {
|
|
223
|
+
id: string;
|
|
224
|
+
}) => Promise<{
|
|
272
225
|
success: true;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
226
|
+
}>) | undefined;
|
|
227
|
+
} & {
|
|
228
|
+
fn: {
|
|
229
|
+
<RETURN_TYPE = Promise<{
|
|
230
|
+
success: true;
|
|
231
|
+
}>>(input?: ({
|
|
232
|
+
disableClientValidation?: boolean;
|
|
233
|
+
} & {
|
|
234
|
+
body?: {
|
|
235
|
+
email: string;
|
|
236
|
+
profile: {
|
|
237
|
+
name: string;
|
|
238
|
+
age: number;
|
|
239
|
+
};
|
|
240
|
+
} | undefined;
|
|
241
|
+
} & {
|
|
242
|
+
query?: {
|
|
243
|
+
notify: "email" | "push" | "none";
|
|
244
|
+
} | undefined;
|
|
245
|
+
} & {
|
|
246
|
+
params?: {
|
|
247
|
+
id: string;
|
|
248
|
+
} | undefined;
|
|
249
|
+
} & {
|
|
250
|
+
meta?: {
|
|
251
|
+
[key: string]: any;
|
|
252
|
+
__disableClientValidation?: boolean;
|
|
279
253
|
};
|
|
280
|
-
};
|
|
281
|
-
|
|
282
|
-
notify: "email" | "push" | "none";
|
|
283
|
-
};
|
|
284
|
-
params: {
|
|
285
|
-
id: string;
|
|
286
|
-
};
|
|
287
|
-
apiRoot?: string | undefined;
|
|
288
|
-
disableClientValidation?: boolean | undefined;
|
|
289
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
290
|
-
interpretAs?: string | undefined;
|
|
291
|
-
init?: RequestInit | undefined;
|
|
292
|
-
transform?: ((staticMethodReturn: {
|
|
254
|
+
}) | undefined): RETURN_TYPE;
|
|
255
|
+
<RETURN_TYPE = Promise<{
|
|
293
256
|
success: true;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
257
|
+
}>>(input: {
|
|
258
|
+
disableClientValidation?: boolean;
|
|
259
|
+
} & {
|
|
260
|
+
body?: {
|
|
261
|
+
email: string;
|
|
262
|
+
profile: {
|
|
263
|
+
name: string;
|
|
264
|
+
age: number;
|
|
265
|
+
};
|
|
266
|
+
} | undefined;
|
|
267
|
+
} & {
|
|
268
|
+
query?: {
|
|
269
|
+
notify: "email" | "push" | "none";
|
|
270
|
+
} | undefined;
|
|
271
|
+
} & {
|
|
272
|
+
params?: {
|
|
273
|
+
id: string;
|
|
274
|
+
} | undefined;
|
|
275
|
+
} & {
|
|
276
|
+
meta?: {
|
|
277
|
+
[key: string]: any;
|
|
278
|
+
__disableClientValidation?: boolean;
|
|
279
|
+
};
|
|
280
|
+
}): RETURN_TYPE;
|
|
281
|
+
};
|
|
282
|
+
models: {
|
|
283
|
+
iteration?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
284
|
+
output?: zod0.ZodObject<{
|
|
285
|
+
success: zod0.ZodBoolean;
|
|
286
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
287
|
+
params?: zod0.ZodObject<{
|
|
288
|
+
id: zod0.ZodUUID;
|
|
289
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
290
|
+
query?: zod0.ZodObject<{
|
|
291
|
+
notify: zod0.ZodEnum<{
|
|
292
|
+
email: "email";
|
|
293
|
+
push: "push";
|
|
294
|
+
none: "none";
|
|
295
|
+
}>;
|
|
296
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
297
|
+
body?: zod0.ZodObject<{
|
|
298
|
+
email: zod0.ZodEmail;
|
|
299
|
+
profile: zod0.ZodObject<{
|
|
300
|
+
name: zod0.ZodString;
|
|
301
|
+
age: zod0.ZodInt;
|
|
302
|
+
}, zod_v4_core0.$strip>;
|
|
303
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
304
|
+
};
|
|
305
|
+
}, {
|
|
301
306
|
apiRoot?: string;
|
|
302
307
|
disableClientValidation?: boolean;
|
|
303
|
-
validateOnClient?: vovk0.VovkValidateOnClient;
|
|
308
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | undefined;
|
|
304
309
|
interpretAs?: string;
|
|
305
310
|
init?: RequestInit;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
interpretAs?: string | undefined;
|
|
311
|
-
init?: RequestInit | undefined;
|
|
312
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
313
|
-
message: string;
|
|
314
|
-
}, void, unknown>, resp: Response) => R) | undefined;
|
|
315
|
-
fetcher?: VovkClientFetcher<F> | undefined;
|
|
316
|
-
} | undefined) => Promise<vovk0.VovkStreamAsyncIterable<{
|
|
311
|
+
}, unknown>;
|
|
312
|
+
};
|
|
313
|
+
declare const StreamRPC: {
|
|
314
|
+
streamTokens: vovk_mjs_client_types0.ClientMethod<(() => AsyncGenerator<{
|
|
317
315
|
message: string;
|
|
318
|
-
}
|
|
319
|
-
isRPC: true;
|
|
320
|
-
schema: vovk0.VovkHandlerSchema;
|
|
321
|
-
controllerSchema: vovk0.VovkControllerSchema;
|
|
322
|
-
segmentSchema: vovk0.VovkSegmentSchema;
|
|
323
|
-
fullSchema: vovk0.VovkSchema;
|
|
316
|
+
}, void, unknown>) & {
|
|
324
317
|
__types: {
|
|
325
318
|
body: unknown;
|
|
326
319
|
query: unknown;
|
|
@@ -331,43 +324,66 @@ declare const StreamRPC: {
|
|
|
331
324
|
};
|
|
332
325
|
isForm: false;
|
|
333
326
|
};
|
|
327
|
+
isRPC?: boolean;
|
|
334
328
|
} & {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
disableClientValidation?: boolean | undefined;
|
|
338
|
-
validateOnClient?: vovk0.VovkValidateOnClient | undefined;
|
|
339
|
-
interpretAs?: string | undefined;
|
|
340
|
-
init?: RequestInit | undefined;
|
|
341
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
342
|
-
message: string;
|
|
343
|
-
}, void, unknown>, resp: Response) => unknown) | undefined;
|
|
344
|
-
fetcher?: VovkClientFetcher<unknown> | undefined;
|
|
345
|
-
} | undefined, options?: Omit<_tanstack_react_query8.UseQueryOptions<Promise<vovk0.VovkStreamAsyncIterable<{
|
|
346
|
-
message: string;
|
|
347
|
-
}>>, Error, Promise<vovk0.VovkStreamAsyncIterable<{
|
|
348
|
-
message: string;
|
|
349
|
-
}>>, readonly unknown[]>, "queryFn" | "queryKey"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseQueryResult<{
|
|
350
|
-
message: string;
|
|
351
|
-
}[], vovk0.HttpException>;
|
|
352
|
-
useMutation: (options?: Omit<_tanstack_react_query8.UseMutationOptions<Promise<vovk0.VovkStreamAsyncIterable<{
|
|
353
|
-
message: string;
|
|
354
|
-
}>>, Error, void, unknown>, "mutationFn"> | undefined, queryClient?: _tanstack_query_core9.QueryClient) => _tanstack_react_query8.UseMutationResult<vovk0.VovkStreamAsyncIterable<{
|
|
329
|
+
schema: vovk0.VovkHandlerSchema;
|
|
330
|
+
wrapper?: ((req: vovk0.VovkRequest<any, any, any>, params: undefined) => AsyncGenerator<{
|
|
355
331
|
message: string;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
interpretAs?: string | undefined;
|
|
361
|
-
init?: RequestInit | undefined;
|
|
362
|
-
transform?: ((staticMethodReturn: AsyncGenerator<{
|
|
332
|
+
}, void, unknown>) | undefined;
|
|
333
|
+
} & {
|
|
334
|
+
fn: {
|
|
335
|
+
<RETURN_TYPE = AsyncGenerator<{
|
|
363
336
|
message: string;
|
|
364
|
-
}, void, unknown
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
337
|
+
}, void, unknown>>(input?: ({
|
|
338
|
+
disableClientValidation?: boolean;
|
|
339
|
+
} & {
|
|
340
|
+
body?: unknown;
|
|
341
|
+
} & {
|
|
342
|
+
query?: unknown;
|
|
343
|
+
} & {
|
|
344
|
+
params?: unknown;
|
|
345
|
+
} & {
|
|
346
|
+
meta?: {
|
|
347
|
+
[key: string]: any;
|
|
348
|
+
__disableClientValidation?: boolean;
|
|
349
|
+
};
|
|
350
|
+
}) | undefined): RETURN_TYPE;
|
|
351
|
+
<RETURN_TYPE = AsyncGenerator<{
|
|
352
|
+
message: string;
|
|
353
|
+
}, void, unknown>>(input: {
|
|
354
|
+
disableClientValidation?: boolean;
|
|
355
|
+
} & {
|
|
356
|
+
body?: unknown;
|
|
357
|
+
} & {
|
|
358
|
+
query?: unknown;
|
|
359
|
+
} & {
|
|
360
|
+
params?: unknown;
|
|
361
|
+
} & {
|
|
362
|
+
meta?: {
|
|
363
|
+
[key: string]: any;
|
|
364
|
+
__disableClientValidation?: boolean;
|
|
365
|
+
};
|
|
366
|
+
}): RETURN_TYPE;
|
|
367
|
+
};
|
|
368
|
+
models: {
|
|
369
|
+
iteration?: zod0.ZodObject<{
|
|
370
|
+
message: zod0.ZodString;
|
|
371
|
+
}, zod_v4_core0.$strip> | undefined;
|
|
372
|
+
output?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
373
|
+
params?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
374
|
+
query?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
375
|
+
body?: _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined;
|
|
376
|
+
};
|
|
377
|
+
}, {
|
|
378
|
+
apiRoot?: string;
|
|
379
|
+
disableClientValidation?: boolean;
|
|
380
|
+
validateOnClient?: vovk0.VovkValidateOnClient<unknown> | undefined;
|
|
381
|
+
interpretAs?: string;
|
|
382
|
+
init?: RequestInit;
|
|
383
|
+
}, unknown>;
|
|
368
384
|
};
|
|
369
385
|
declare const OpenApiRPC: {
|
|
370
|
-
getSpec: () => Promise<
|
|
386
|
+
getSpec: () => Promise<openapi3_ts_oas310.OpenAPIObject>;
|
|
371
387
|
};
|
|
372
388
|
//#endregion
|
|
373
389
|
export { OpenApiRPC, StreamRPC, UserRPC, schema };
|
package/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { fetcher } from "vovk";
|
|
2
|
-
import { createRPC } from "vovk-react-query";
|
|
1
|
+
import { createRPC, fetcher } from "vovk";
|
|
3
2
|
import { validateOnClient } from "vovk-ajv";
|
|
4
3
|
|
|
5
4
|
//#region .vovk-schema/_meta.json
|
|
@@ -169,7 +168,7 @@ var static_default = {
|
|
|
169
168
|
};
|
|
170
169
|
|
|
171
170
|
//#endregion
|
|
172
|
-
//#region
|
|
171
|
+
//#region tmp_prebundle/schema.ts
|
|
173
172
|
const segments = {
|
|
174
173
|
"": root_default,
|
|
175
174
|
"static": static_default
|
|
@@ -185,7 +184,7 @@ const schema = {
|
|
|
185
184
|
};
|
|
186
185
|
|
|
187
186
|
//#endregion
|
|
188
|
-
//#region
|
|
187
|
+
//#region tmp_prebundle/index.ts
|
|
189
188
|
const UserRPC = createRPC(schema, "", "UserRPC", fetcher, {
|
|
190
189
|
validateOnClient,
|
|
191
190
|
apiRoot: "http://localhost:3000/api"
|
package/package.json
CHANGED
package/schema.cjs
CHANGED
package/schema.d.cts
CHANGED