@ps-aux/api-client-gen 0.7.0-rc.3 → 0.7.0-rc.4
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 +7 -5
- package/dist/bin.cjs +74 -9
- package/dist/bin.mjs +56 -10
- package/dist/generateApiClient.cjs +560 -78
- package/dist/generateApiClient.mjs +564 -85
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +80 -5
- package/dist/index.d.mts +80 -5
- package/dist/index.d.ts +80 -5
- package/dist/index.mjs +1 -1
- package/package.json +6 -4
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1998,6 +1998,12 @@ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $Z
|
|
|
1998
1998
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
1999
1999
|
}
|
|
2000
2000
|
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
2001
|
+
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
2002
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2003
|
+
keyType: Key;
|
|
2004
|
+
valueType: Value;
|
|
2005
|
+
}
|
|
2006
|
+
declare const ZodRecord: $constructor<ZodRecord>;
|
|
2001
2007
|
interface ZodEnum<
|
|
2002
2008
|
/** @ts-ignore Cast variance */
|
|
2003
2009
|
out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
@@ -2063,7 +2069,7 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2063
2069
|
}
|
|
2064
2070
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2065
2071
|
|
|
2066
|
-
declare const
|
|
2072
|
+
declare const profileConfigSchema: ZodObject<{
|
|
2067
2073
|
srcSpec: ZodString;
|
|
2068
2074
|
dstDir: ZodString;
|
|
2069
2075
|
apiName: ZodString;
|
|
@@ -2072,7 +2078,7 @@ declare const configSchema: ZodObject<{
|
|
|
2072
2078
|
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2073
2079
|
allSchemas: ZodDefault<ZodBoolean>;
|
|
2074
2080
|
}, $strict>>;
|
|
2075
|
-
codegen: ZodObject<{
|
|
2081
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2076
2082
|
unwrap: ZodDefault<ZodBoolean>;
|
|
2077
2083
|
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2078
2084
|
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
@@ -2083,7 +2089,18 @@ declare const configSchema: ZodObject<{
|
|
|
2083
2089
|
union: "union";
|
|
2084
2090
|
enum: "enum";
|
|
2085
2091
|
}>>;
|
|
2086
|
-
|
|
2092
|
+
comments: ZodPrefault<ZodObject<{
|
|
2093
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2094
|
+
operation: ZodPrefault<ZodObject<{
|
|
2095
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2096
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2097
|
+
description: ZodDefault<ZodBoolean>;
|
|
2098
|
+
}, $strict>>;
|
|
2099
|
+
schema: ZodPrefault<ZodObject<{
|
|
2100
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2101
|
+
}, $strict>>;
|
|
2102
|
+
}, $strict>>;
|
|
2103
|
+
}, $strict>>;
|
|
2087
2104
|
compat: ZodOptional<ZodObject<{
|
|
2088
2105
|
uppercaseEnumKeys: ZodBoolean;
|
|
2089
2106
|
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
@@ -2103,8 +2120,66 @@ declare const configSchema: ZodObject<{
|
|
|
2103
2120
|
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2104
2121
|
}, $strict>>;
|
|
2105
2122
|
}, $strict>;
|
|
2123
|
+
declare const configSchema: ZodRecord<ZodString, ZodObject<{
|
|
2124
|
+
srcSpec: ZodString;
|
|
2125
|
+
dstDir: ZodString;
|
|
2126
|
+
apiName: ZodString;
|
|
2127
|
+
openApiGenerator: ZodUnion<readonly [ZodObject<{
|
|
2128
|
+
selection: ZodOptional<ZodObject<{
|
|
2129
|
+
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2130
|
+
allSchemas: ZodDefault<ZodBoolean>;
|
|
2131
|
+
}, $strict>>;
|
|
2132
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2133
|
+
unwrap: ZodDefault<ZodBoolean>;
|
|
2134
|
+
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2135
|
+
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
2136
|
+
object: "object";
|
|
2137
|
+
positional: "positional";
|
|
2138
|
+
}>>;
|
|
2139
|
+
enumStyle: ZodDefault<ZodEnum<{
|
|
2140
|
+
union: "union";
|
|
2141
|
+
enum: "enum";
|
|
2142
|
+
}>>;
|
|
2143
|
+
comments: ZodPrefault<ZodObject<{
|
|
2144
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2145
|
+
operation: ZodPrefault<ZodObject<{
|
|
2146
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2147
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2148
|
+
description: ZodDefault<ZodBoolean>;
|
|
2149
|
+
}, $strict>>;
|
|
2150
|
+
schema: ZodPrefault<ZodObject<{
|
|
2151
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2152
|
+
}, $strict>>;
|
|
2153
|
+
}, $strict>>;
|
|
2154
|
+
}, $strict>>;
|
|
2155
|
+
compat: ZodOptional<ZodObject<{
|
|
2156
|
+
uppercaseEnumKeys: ZodBoolean;
|
|
2157
|
+
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
2158
|
+
}, $strict>>;
|
|
2159
|
+
}, $strict>, ZodObject<{
|
|
2160
|
+
legacy: ZodObject<{
|
|
2161
|
+
ignoreOperationsWithTags: ZodOptional<ZodArray<ZodString>>;
|
|
2162
|
+
}, $strict>;
|
|
2163
|
+
}, $strict>]>;
|
|
2164
|
+
responseWrapper: ZodOptional<ZodObject<{
|
|
2165
|
+
symbol: ZodString;
|
|
2166
|
+
import: ZodOptional<ZodString>;
|
|
2167
|
+
unwrapExpr: ZodOptional<ZodString>;
|
|
2168
|
+
}, $strict>>;
|
|
2169
|
+
zodSchemas: ZodOptional<ZodObject<{
|
|
2170
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
2171
|
+
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2172
|
+
}, $strict>>;
|
|
2173
|
+
}, $strict>>;
|
|
2174
|
+
type ProfileConfigInput = input<typeof profileConfigSchema>;
|
|
2175
|
+
type ProfileConfig = output<typeof profileConfigSchema>;
|
|
2106
2176
|
type ConfigInput = input<typeof configSchema>;
|
|
2177
|
+
type Config = output<typeof configSchema>;
|
|
2178
|
+
type ConfigFileInput = ConfigInput;
|
|
2179
|
+
type ConfigFile = Config;
|
|
2180
|
+
declare const defineConfig: <T extends ConfigFileInput>(config: T) => T;
|
|
2107
2181
|
|
|
2108
|
-
declare const generateApiClient: (params:
|
|
2182
|
+
declare const generateApiClient: (params: ProfileConfigInput, configFilePath: string, log?: (msg: string) => void) => Promise<void>;
|
|
2109
2183
|
|
|
2110
|
-
export { generateApiClient };
|
|
2184
|
+
export { defineConfig, generateApiClient };
|
|
2185
|
+
export type { Config, ConfigFile, ConfigFileInput, ConfigInput, ProfileConfig, ProfileConfigInput };
|
package/dist/index.d.mts
CHANGED
|
@@ -1998,6 +1998,12 @@ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $Z
|
|
|
1998
1998
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
1999
1999
|
}
|
|
2000
2000
|
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
2001
|
+
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
2002
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2003
|
+
keyType: Key;
|
|
2004
|
+
valueType: Value;
|
|
2005
|
+
}
|
|
2006
|
+
declare const ZodRecord: $constructor<ZodRecord>;
|
|
2001
2007
|
interface ZodEnum<
|
|
2002
2008
|
/** @ts-ignore Cast variance */
|
|
2003
2009
|
out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
@@ -2063,7 +2069,7 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2063
2069
|
}
|
|
2064
2070
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2065
2071
|
|
|
2066
|
-
declare const
|
|
2072
|
+
declare const profileConfigSchema: ZodObject<{
|
|
2067
2073
|
srcSpec: ZodString;
|
|
2068
2074
|
dstDir: ZodString;
|
|
2069
2075
|
apiName: ZodString;
|
|
@@ -2072,7 +2078,7 @@ declare const configSchema: ZodObject<{
|
|
|
2072
2078
|
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2073
2079
|
allSchemas: ZodDefault<ZodBoolean>;
|
|
2074
2080
|
}, $strict>>;
|
|
2075
|
-
codegen: ZodObject<{
|
|
2081
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2076
2082
|
unwrap: ZodDefault<ZodBoolean>;
|
|
2077
2083
|
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2078
2084
|
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
@@ -2083,7 +2089,18 @@ declare const configSchema: ZodObject<{
|
|
|
2083
2089
|
union: "union";
|
|
2084
2090
|
enum: "enum";
|
|
2085
2091
|
}>>;
|
|
2086
|
-
|
|
2092
|
+
comments: ZodPrefault<ZodObject<{
|
|
2093
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2094
|
+
operation: ZodPrefault<ZodObject<{
|
|
2095
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2096
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2097
|
+
description: ZodDefault<ZodBoolean>;
|
|
2098
|
+
}, $strict>>;
|
|
2099
|
+
schema: ZodPrefault<ZodObject<{
|
|
2100
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2101
|
+
}, $strict>>;
|
|
2102
|
+
}, $strict>>;
|
|
2103
|
+
}, $strict>>;
|
|
2087
2104
|
compat: ZodOptional<ZodObject<{
|
|
2088
2105
|
uppercaseEnumKeys: ZodBoolean;
|
|
2089
2106
|
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
@@ -2103,8 +2120,66 @@ declare const configSchema: ZodObject<{
|
|
|
2103
2120
|
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2104
2121
|
}, $strict>>;
|
|
2105
2122
|
}, $strict>;
|
|
2123
|
+
declare const configSchema: ZodRecord<ZodString, ZodObject<{
|
|
2124
|
+
srcSpec: ZodString;
|
|
2125
|
+
dstDir: ZodString;
|
|
2126
|
+
apiName: ZodString;
|
|
2127
|
+
openApiGenerator: ZodUnion<readonly [ZodObject<{
|
|
2128
|
+
selection: ZodOptional<ZodObject<{
|
|
2129
|
+
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2130
|
+
allSchemas: ZodDefault<ZodBoolean>;
|
|
2131
|
+
}, $strict>>;
|
|
2132
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2133
|
+
unwrap: ZodDefault<ZodBoolean>;
|
|
2134
|
+
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2135
|
+
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
2136
|
+
object: "object";
|
|
2137
|
+
positional: "positional";
|
|
2138
|
+
}>>;
|
|
2139
|
+
enumStyle: ZodDefault<ZodEnum<{
|
|
2140
|
+
union: "union";
|
|
2141
|
+
enum: "enum";
|
|
2142
|
+
}>>;
|
|
2143
|
+
comments: ZodPrefault<ZodObject<{
|
|
2144
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2145
|
+
operation: ZodPrefault<ZodObject<{
|
|
2146
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2147
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2148
|
+
description: ZodDefault<ZodBoolean>;
|
|
2149
|
+
}, $strict>>;
|
|
2150
|
+
schema: ZodPrefault<ZodObject<{
|
|
2151
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2152
|
+
}, $strict>>;
|
|
2153
|
+
}, $strict>>;
|
|
2154
|
+
}, $strict>>;
|
|
2155
|
+
compat: ZodOptional<ZodObject<{
|
|
2156
|
+
uppercaseEnumKeys: ZodBoolean;
|
|
2157
|
+
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
2158
|
+
}, $strict>>;
|
|
2159
|
+
}, $strict>, ZodObject<{
|
|
2160
|
+
legacy: ZodObject<{
|
|
2161
|
+
ignoreOperationsWithTags: ZodOptional<ZodArray<ZodString>>;
|
|
2162
|
+
}, $strict>;
|
|
2163
|
+
}, $strict>]>;
|
|
2164
|
+
responseWrapper: ZodOptional<ZodObject<{
|
|
2165
|
+
symbol: ZodString;
|
|
2166
|
+
import: ZodOptional<ZodString>;
|
|
2167
|
+
unwrapExpr: ZodOptional<ZodString>;
|
|
2168
|
+
}, $strict>>;
|
|
2169
|
+
zodSchemas: ZodOptional<ZodObject<{
|
|
2170
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
2171
|
+
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2172
|
+
}, $strict>>;
|
|
2173
|
+
}, $strict>>;
|
|
2174
|
+
type ProfileConfigInput = input<typeof profileConfigSchema>;
|
|
2175
|
+
type ProfileConfig = output<typeof profileConfigSchema>;
|
|
2106
2176
|
type ConfigInput = input<typeof configSchema>;
|
|
2177
|
+
type Config = output<typeof configSchema>;
|
|
2178
|
+
type ConfigFileInput = ConfigInput;
|
|
2179
|
+
type ConfigFile = Config;
|
|
2180
|
+
declare const defineConfig: <T extends ConfigFileInput>(config: T) => T;
|
|
2107
2181
|
|
|
2108
|
-
declare const generateApiClient: (params:
|
|
2182
|
+
declare const generateApiClient: (params: ProfileConfigInput, configFilePath: string, log?: (msg: string) => void) => Promise<void>;
|
|
2109
2183
|
|
|
2110
|
-
export { generateApiClient };
|
|
2184
|
+
export { defineConfig, generateApiClient };
|
|
2185
|
+
export type { Config, ConfigFile, ConfigFileInput, ConfigInput, ProfileConfig, ProfileConfigInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1998,6 +1998,12 @@ interface ZodIntersection<A extends SomeType = $ZodType, B extends SomeType = $Z
|
|
|
1998
1998
|
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
1999
1999
|
}
|
|
2000
2000
|
declare const ZodIntersection: $constructor<ZodIntersection>;
|
|
2001
|
+
interface ZodRecord<Key extends $ZodRecordKey = $ZodRecordKey, Value extends SomeType = $ZodType> extends _ZodType<$ZodRecordInternals<Key, Value>>, $ZodRecord<Key, Value> {
|
|
2002
|
+
"~standard": ZodStandardSchemaWithJSON<this>;
|
|
2003
|
+
keyType: Key;
|
|
2004
|
+
valueType: Value;
|
|
2005
|
+
}
|
|
2006
|
+
declare const ZodRecord: $constructor<ZodRecord>;
|
|
2001
2007
|
interface ZodEnum<
|
|
2002
2008
|
/** @ts-ignore Cast variance */
|
|
2003
2009
|
out T extends EnumLike = EnumLike> extends _ZodType<$ZodEnumInternals<T>>, $ZodEnum<T> {
|
|
@@ -2063,7 +2069,7 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
|
|
|
2063
2069
|
}
|
|
2064
2070
|
declare const ZodReadonly: $constructor<ZodReadonly>;
|
|
2065
2071
|
|
|
2066
|
-
declare const
|
|
2072
|
+
declare const profileConfigSchema: ZodObject<{
|
|
2067
2073
|
srcSpec: ZodString;
|
|
2068
2074
|
dstDir: ZodString;
|
|
2069
2075
|
apiName: ZodString;
|
|
@@ -2072,7 +2078,7 @@ declare const configSchema: ZodObject<{
|
|
|
2072
2078
|
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2073
2079
|
allSchemas: ZodDefault<ZodBoolean>;
|
|
2074
2080
|
}, $strict>>;
|
|
2075
|
-
codegen: ZodObject<{
|
|
2081
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2076
2082
|
unwrap: ZodDefault<ZodBoolean>;
|
|
2077
2083
|
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2078
2084
|
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
@@ -2083,7 +2089,18 @@ declare const configSchema: ZodObject<{
|
|
|
2083
2089
|
union: "union";
|
|
2084
2090
|
enum: "enum";
|
|
2085
2091
|
}>>;
|
|
2086
|
-
|
|
2092
|
+
comments: ZodPrefault<ZodObject<{
|
|
2093
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2094
|
+
operation: ZodPrefault<ZodObject<{
|
|
2095
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2096
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2097
|
+
description: ZodDefault<ZodBoolean>;
|
|
2098
|
+
}, $strict>>;
|
|
2099
|
+
schema: ZodPrefault<ZodObject<{
|
|
2100
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2101
|
+
}, $strict>>;
|
|
2102
|
+
}, $strict>>;
|
|
2103
|
+
}, $strict>>;
|
|
2087
2104
|
compat: ZodOptional<ZodObject<{
|
|
2088
2105
|
uppercaseEnumKeys: ZodBoolean;
|
|
2089
2106
|
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
@@ -2103,8 +2120,66 @@ declare const configSchema: ZodObject<{
|
|
|
2103
2120
|
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2104
2121
|
}, $strict>>;
|
|
2105
2122
|
}, $strict>;
|
|
2123
|
+
declare const configSchema: ZodRecord<ZodString, ZodObject<{
|
|
2124
|
+
srcSpec: ZodString;
|
|
2125
|
+
dstDir: ZodString;
|
|
2126
|
+
apiName: ZodString;
|
|
2127
|
+
openApiGenerator: ZodUnion<readonly [ZodObject<{
|
|
2128
|
+
selection: ZodOptional<ZodObject<{
|
|
2129
|
+
ignoreOperationsWithTags: ZodDefault<ZodArray<ZodString>>;
|
|
2130
|
+
allSchemas: ZodDefault<ZodBoolean>;
|
|
2131
|
+
}, $strict>>;
|
|
2132
|
+
codegen: ZodPrefault<ZodObject<{
|
|
2133
|
+
unwrap: ZodDefault<ZodBoolean>;
|
|
2134
|
+
withRequestParams: ZodDefault<ZodBoolean>;
|
|
2135
|
+
pathParamsStyle: ZodDefault<ZodEnum<{
|
|
2136
|
+
object: "object";
|
|
2137
|
+
positional: "positional";
|
|
2138
|
+
}>>;
|
|
2139
|
+
enumStyle: ZodDefault<ZodEnum<{
|
|
2140
|
+
union: "union";
|
|
2141
|
+
enum: "enum";
|
|
2142
|
+
}>>;
|
|
2143
|
+
comments: ZodPrefault<ZodObject<{
|
|
2144
|
+
enabled: ZodDefault<ZodBoolean>;
|
|
2145
|
+
operation: ZodPrefault<ZodObject<{
|
|
2146
|
+
tags: ZodDefault<ZodBoolean>;
|
|
2147
|
+
summary: ZodDefault<ZodBoolean>;
|
|
2148
|
+
description: ZodDefault<ZodBoolean>;
|
|
2149
|
+
}, $strict>>;
|
|
2150
|
+
schema: ZodPrefault<ZodObject<{
|
|
2151
|
+
metadata: ZodDefault<ZodBoolean>;
|
|
2152
|
+
}, $strict>>;
|
|
2153
|
+
}, $strict>>;
|
|
2154
|
+
}, $strict>>;
|
|
2155
|
+
compat: ZodOptional<ZodObject<{
|
|
2156
|
+
uppercaseEnumKeys: ZodBoolean;
|
|
2157
|
+
swaggerTsApiRequiredBooleans: ZodBoolean;
|
|
2158
|
+
}, $strict>>;
|
|
2159
|
+
}, $strict>, ZodObject<{
|
|
2160
|
+
legacy: ZodObject<{
|
|
2161
|
+
ignoreOperationsWithTags: ZodOptional<ZodArray<ZodString>>;
|
|
2162
|
+
}, $strict>;
|
|
2163
|
+
}, $strict>]>;
|
|
2164
|
+
responseWrapper: ZodOptional<ZodObject<{
|
|
2165
|
+
symbol: ZodString;
|
|
2166
|
+
import: ZodOptional<ZodString>;
|
|
2167
|
+
unwrapExpr: ZodOptional<ZodString>;
|
|
2168
|
+
}, $strict>>;
|
|
2169
|
+
zodSchemas: ZodOptional<ZodObject<{
|
|
2170
|
+
enabled: ZodOptional<ZodBoolean>;
|
|
2171
|
+
localDateTimes: ZodOptional<ZodBoolean>;
|
|
2172
|
+
}, $strict>>;
|
|
2173
|
+
}, $strict>>;
|
|
2174
|
+
type ProfileConfigInput = input<typeof profileConfigSchema>;
|
|
2175
|
+
type ProfileConfig = output<typeof profileConfigSchema>;
|
|
2106
2176
|
type ConfigInput = input<typeof configSchema>;
|
|
2177
|
+
type Config = output<typeof configSchema>;
|
|
2178
|
+
type ConfigFileInput = ConfigInput;
|
|
2179
|
+
type ConfigFile = Config;
|
|
2180
|
+
declare const defineConfig: <T extends ConfigFileInput>(config: T) => T;
|
|
2107
2181
|
|
|
2108
|
-
declare const generateApiClient: (params:
|
|
2182
|
+
declare const generateApiClient: (params: ProfileConfigInput, configFilePath: string, log?: (msg: string) => void) => Promise<void>;
|
|
2109
2183
|
|
|
2110
|
-
export { generateApiClient };
|
|
2184
|
+
export { defineConfig, generateApiClient };
|
|
2185
|
+
export type { Config, ConfigFile, ConfigFileInput, ConfigInput, ProfileConfig, ProfileConfigInput };
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ps-aux/api-client-gen",
|
|
3
|
-
"version": "0.7.0-rc.
|
|
3
|
+
"version": "0.7.0-rc.4",
|
|
4
4
|
"main": "dist/index.cjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"pack:tarball": "npm run build && npm pack",
|
|
15
15
|
"prepublishOnly": "echo \"Publishing disabled for this repo. Use CI workflow.\" && exit 1",
|
|
16
16
|
"test": "npm run test:generation && npm run test:generated-code && npm run tc:after-gen",
|
|
17
|
-
"test:generation": "vitest run test/generateApiClient.spec.ts test/gen-open-api/*/generate*.spec.ts test/gen-open-api/*/integration.spec.ts",
|
|
17
|
+
"test:generation": "vitest run test/generateApiClient.spec.ts test/e2e/e2e.spec.ts test/gen-open-api/*/generate*.spec.ts test/gen-open-api/*/integration.spec.ts",
|
|
18
18
|
"test:generated-code": "vitest run test/gen-open-api/swagger-ts-api/contract.spec.ts test/gen-open-api/v-next/contract.spec.ts",
|
|
19
19
|
"tc": "echo 'No typecheck'",
|
|
20
20
|
"tc:after-gen": "tsc",
|
|
@@ -23,15 +23,17 @@
|
|
|
23
23
|
"author": "psaux",
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"
|
|
26
|
+
"c12": "4.0.0-beta.4",
|
|
27
27
|
"eta": "^2.2.0",
|
|
28
|
+
"jiti": "^2.6.1",
|
|
28
29
|
"prettier": "^3.8.1",
|
|
29
30
|
"swagger-typescript-api": "13.0.23",
|
|
30
31
|
"ts-to-zod": "5.1.0",
|
|
31
32
|
"zod": "^4.3.6"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
|
-
"@local/open-api": "file:../../shared/open-api"
|
|
35
|
+
"@local/open-api": "file:../../shared/open-api",
|
|
36
|
+
"ts-dedent": "^2.2.0"
|
|
35
37
|
},
|
|
36
38
|
"description": "CLI and programmatic generator for OpenAPI clients with optional Zod schemas.",
|
|
37
39
|
"keywords": [
|