@hey-api/openapi-ts 0.78.0 → 0.78.1
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/dist/{chunk-RASXZ2HF.js → chunk-4AJU36PO.js} +12 -12
- package/dist/chunk-4AJU36PO.js.map +1 -0
- package/dist/clients/core/bodySerializer.ts +9 -5
- package/dist/index.cjs +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/internal.cjs +9 -9
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/dist/{types.d-BsTxgeRq.d.cts → types.d-DtZlpeRE.d.cts} +48 -9
- package/dist/{types.d-BsTxgeRq.d.ts → types.d-DtZlpeRE.d.ts} +48 -9
- package/package.json +1 -1
- package/dist/chunk-RASXZ2HF.js.map +0 -1
package/dist/internal.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Config, I as IR, U as UserConfig, W as WatchValues } from './types.d-
|
|
1
|
+
import { i as Config, I as IR, U as UserConfig, W as WatchValues } from './types.d-DtZlpeRE.cjs';
|
|
2
2
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'typescript';
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as Config, I as IR, U as UserConfig, W as WatchValues } from './types.d-
|
|
1
|
+
import { i as Config, I as IR, U as UserConfig, W as WatchValues } from './types.d-DtZlpeRE.js';
|
|
2
2
|
import { JSONSchema } from '@hey-api/json-schema-ref-parser';
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'typescript';
|
package/dist/internal.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {createRequire}from'module';export{I as getSpec,H as initConfigs,F as parseOpenApiSpec}from'./chunk-
|
|
1
|
+
import {createRequire}from'module';export{I as getSpec,H as initConfigs,F as parseOpenApiSpec}from'./chunk-4AJU36PO.js';createRequire(import.meta.url);//# sourceMappingURL=internal.js.map
|
|
2
2
|
//# sourceMappingURL=internal.js.map
|
|
@@ -2640,18 +2640,23 @@ interface EnsureUniqueIdentifierData {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
|
|
2642
2642
|
type ObjectType<T> = Extract<T, Record<string, any>> extends never ? Record<string, any> : Extract<T, Record<string, any>>;
|
|
2643
|
+
type MappersType<T> = {
|
|
2644
|
+
boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;
|
|
2645
|
+
number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;
|
|
2646
|
+
object?: (value: Partial<ObjectType<T>>) => Partial<ObjectType<T>>;
|
|
2647
|
+
string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;
|
|
2648
|
+
} extends infer U ? {
|
|
2649
|
+
[K in keyof U as U[K] extends never ? never : K]: U[K];
|
|
2650
|
+
} : never;
|
|
2651
|
+
type IsObjectOnly<T> = T extends Record<string, any> | undefined ? Extract<T, string | boolean | number> extends never ? true : false : false;
|
|
2643
2652
|
type ValueToObject = <T extends undefined | string | boolean | number | Record<string, any>>(args: {
|
|
2644
2653
|
defaultValue: ObjectType<T>;
|
|
2645
|
-
mappers: {
|
|
2646
|
-
boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;
|
|
2647
|
-
number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;
|
|
2648
|
-
object?: (value: Partial<ObjectType<T>>) => Partial<ObjectType<T>>;
|
|
2649
|
-
string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;
|
|
2650
|
-
} extends infer U ? {
|
|
2651
|
-
[K in keyof U as U[K] extends never ? never : K]: U[K];
|
|
2652
|
-
} : never;
|
|
2653
2654
|
value: T;
|
|
2654
|
-
}
|
|
2655
|
+
} & (IsObjectOnly<T> extends true ? {
|
|
2656
|
+
mappers?: MappersType<T>;
|
|
2657
|
+
} : {
|
|
2658
|
+
mappers: MappersType<T>;
|
|
2659
|
+
})) => ObjectType<T>;
|
|
2655
2660
|
|
|
2656
2661
|
type Input = {
|
|
2657
2662
|
/**
|
|
@@ -9798,6 +9803,23 @@ type Config = Plugin.Name<'zod'> & {
|
|
|
9798
9803
|
* @default true
|
|
9799
9804
|
*/
|
|
9800
9805
|
comments?: boolean;
|
|
9806
|
+
/**
|
|
9807
|
+
* Configuration for date handling in generated Zod schemas.
|
|
9808
|
+
*
|
|
9809
|
+
* Controls how date values are processed and validated using Zod's
|
|
9810
|
+
* date validation features.
|
|
9811
|
+
*/
|
|
9812
|
+
dates?: {
|
|
9813
|
+
/**
|
|
9814
|
+
* Whether to include timezone offset information when handling dates.
|
|
9815
|
+
*
|
|
9816
|
+
* When enabled, date strings will preserve timezone information.
|
|
9817
|
+
* When disabled, dates will be treated as local time.
|
|
9818
|
+
*
|
|
9819
|
+
* @default false
|
|
9820
|
+
*/
|
|
9821
|
+
offset?: boolean;
|
|
9822
|
+
};
|
|
9801
9823
|
/**
|
|
9802
9824
|
* Configuration for reusable schema definitions.
|
|
9803
9825
|
*
|
|
@@ -9939,6 +9961,23 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
|
|
|
9939
9961
|
* @default true
|
|
9940
9962
|
*/
|
|
9941
9963
|
comments: boolean;
|
|
9964
|
+
/**
|
|
9965
|
+
* Configuration for date handling in generated Zod schemas.
|
|
9966
|
+
*
|
|
9967
|
+
* Controls how date values are processed and validated using Zod's
|
|
9968
|
+
* date validation features.
|
|
9969
|
+
*/
|
|
9970
|
+
dates: {
|
|
9971
|
+
/**
|
|
9972
|
+
* Whether to include timezone offset information when handling dates.
|
|
9973
|
+
*
|
|
9974
|
+
* When enabled, date strings will preserve timezone information.
|
|
9975
|
+
* When disabled, dates will be treated as local time.
|
|
9976
|
+
*
|
|
9977
|
+
* @default false
|
|
9978
|
+
*/
|
|
9979
|
+
offset: boolean;
|
|
9980
|
+
};
|
|
9942
9981
|
/**
|
|
9943
9982
|
* Configuration for reusable schema definitions.
|
|
9944
9983
|
*
|
|
@@ -2640,18 +2640,23 @@ interface EnsureUniqueIdentifierData {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
|
|
2642
2642
|
type ObjectType<T> = Extract<T, Record<string, any>> extends never ? Record<string, any> : Extract<T, Record<string, any>>;
|
|
2643
|
+
type MappersType<T> = {
|
|
2644
|
+
boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;
|
|
2645
|
+
number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;
|
|
2646
|
+
object?: (value: Partial<ObjectType<T>>) => Partial<ObjectType<T>>;
|
|
2647
|
+
string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;
|
|
2648
|
+
} extends infer U ? {
|
|
2649
|
+
[K in keyof U as U[K] extends never ? never : K]: U[K];
|
|
2650
|
+
} : never;
|
|
2651
|
+
type IsObjectOnly<T> = T extends Record<string, any> | undefined ? Extract<T, string | boolean | number> extends never ? true : false : false;
|
|
2643
2652
|
type ValueToObject = <T extends undefined | string | boolean | number | Record<string, any>>(args: {
|
|
2644
2653
|
defaultValue: ObjectType<T>;
|
|
2645
|
-
mappers: {
|
|
2646
|
-
boolean: T extends boolean ? (value: boolean) => Partial<ObjectType<T>> : never;
|
|
2647
|
-
number: T extends number ? (value: number) => Partial<ObjectType<T>> : never;
|
|
2648
|
-
object?: (value: Partial<ObjectType<T>>) => Partial<ObjectType<T>>;
|
|
2649
|
-
string: T extends string ? (value: string) => Partial<ObjectType<T>> : never;
|
|
2650
|
-
} extends infer U ? {
|
|
2651
|
-
[K in keyof U as U[K] extends never ? never : K]: U[K];
|
|
2652
|
-
} : never;
|
|
2653
2654
|
value: T;
|
|
2654
|
-
}
|
|
2655
|
+
} & (IsObjectOnly<T> extends true ? {
|
|
2656
|
+
mappers?: MappersType<T>;
|
|
2657
|
+
} : {
|
|
2658
|
+
mappers: MappersType<T>;
|
|
2659
|
+
})) => ObjectType<T>;
|
|
2655
2660
|
|
|
2656
2661
|
type Input = {
|
|
2657
2662
|
/**
|
|
@@ -9798,6 +9803,23 @@ type Config = Plugin.Name<'zod'> & {
|
|
|
9798
9803
|
* @default true
|
|
9799
9804
|
*/
|
|
9800
9805
|
comments?: boolean;
|
|
9806
|
+
/**
|
|
9807
|
+
* Configuration for date handling in generated Zod schemas.
|
|
9808
|
+
*
|
|
9809
|
+
* Controls how date values are processed and validated using Zod's
|
|
9810
|
+
* date validation features.
|
|
9811
|
+
*/
|
|
9812
|
+
dates?: {
|
|
9813
|
+
/**
|
|
9814
|
+
* Whether to include timezone offset information when handling dates.
|
|
9815
|
+
*
|
|
9816
|
+
* When enabled, date strings will preserve timezone information.
|
|
9817
|
+
* When disabled, dates will be treated as local time.
|
|
9818
|
+
*
|
|
9819
|
+
* @default false
|
|
9820
|
+
*/
|
|
9821
|
+
offset?: boolean;
|
|
9822
|
+
};
|
|
9801
9823
|
/**
|
|
9802
9824
|
* Configuration for reusable schema definitions.
|
|
9803
9825
|
*
|
|
@@ -9939,6 +9961,23 @@ type ResolvedConfig = Plugin.Name<'zod'> & {
|
|
|
9939
9961
|
* @default true
|
|
9940
9962
|
*/
|
|
9941
9963
|
comments: boolean;
|
|
9964
|
+
/**
|
|
9965
|
+
* Configuration for date handling in generated Zod schemas.
|
|
9966
|
+
*
|
|
9967
|
+
* Controls how date values are processed and validated using Zod's
|
|
9968
|
+
* date validation features.
|
|
9969
|
+
*/
|
|
9970
|
+
dates: {
|
|
9971
|
+
/**
|
|
9972
|
+
* Whether to include timezone offset information when handling dates.
|
|
9973
|
+
*
|
|
9974
|
+
* When enabled, date strings will preserve timezone information.
|
|
9975
|
+
* When disabled, dates will be treated as local time.
|
|
9976
|
+
*
|
|
9977
|
+
* @default false
|
|
9978
|
+
*/
|
|
9979
|
+
offset: boolean;
|
|
9980
|
+
};
|
|
9942
9981
|
/**
|
|
9943
9982
|
* Configuration for reusable schema definitions.
|
|
9944
9983
|
*
|