@postman/sdk-config 0.3.3 → 0.3.5
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/index.cjs +48 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -9
- package/dist/index.js.map +1 -1
- package/dist/sdk-config/index.cjs +48 -9
- package/dist/sdk-config/index.cjs.map +1 -1
- package/dist/sdk-config/index.d.cts +1 -1
- package/dist/sdk-config/index.d.ts +1 -1
- package/dist/sdk-config/index.js +48 -9
- package/dist/sdk-config/index.js.map +1 -1
- package/dist/sdk-config/v1/index.cjs +48 -9
- package/dist/sdk-config/v1/index.cjs.map +1 -1
- package/dist/sdk-config/v1/index.d.cts +101 -5
- package/dist/sdk-config/v1/index.d.ts +101 -5
- package/dist/sdk-config/v1/index.js +48 -9
- package/dist/sdk-config/v1/index.js.map +1 -1
- package/dist/sdk-config-ir/index.cjs +16 -0
- package/dist/sdk-config-ir/index.cjs.map +1 -1
- package/dist/sdk-config-ir/index.d.cts +1 -1
- package/dist/sdk-config-ir/index.d.ts +1 -1
- package/dist/sdk-config-ir/index.js +16 -0
- package/dist/sdk-config-ir/index.js.map +1 -1
- package/dist/sdk-config-ir/v1/index.cjs +16 -0
- package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
- package/dist/sdk-config-ir/v1/index.d.cts +86 -8
- package/dist/sdk-config-ir/v1/index.d.ts +86 -8
- package/dist/sdk-config-ir/v1/index.js +16 -0
- package/dist/sdk-config-ir/v1/index.js.map +1 -1
- package/dist/{typescript-CKRe_6MB.d.cts → typescript-BruxA5zG.d.cts} +10 -2
- package/dist/{typescript-CKRe_6MB.d.ts → typescript-BruxA5zG.d.ts} +10 -2
- package/package.json +1 -1
- package/src/sdk-config-ir/v1/README.md +68 -34
package/dist/index.cjs
CHANGED
|
@@ -478,9 +478,9 @@ function takeBoolean(value, aliases, state, basePath) {
|
|
|
478
478
|
consume(state, located.path);
|
|
479
479
|
return located.value;
|
|
480
480
|
}
|
|
481
|
-
function takeNumber(value, aliases, state, basePath) {
|
|
481
|
+
function takeNumber(value, aliases, state, basePath, minimum = 0) {
|
|
482
482
|
const located = locate(value, aliases, basePath);
|
|
483
|
-
if (!located || !isNonNegativeNumber(located.value) || !Number.isInteger(located.value))
|
|
483
|
+
if (!located || !isNonNegativeNumber(located.value) || !Number.isInteger(located.value) || located.value < minimum)
|
|
484
484
|
return void 0;
|
|
485
485
|
consume(state, located.path);
|
|
486
486
|
return located.value;
|
|
@@ -1260,6 +1260,14 @@ var apiImportSettingsSchema = zod.z.strictObject({
|
|
|
1260
1260
|
objectQueryParameters: zod.z.boolean().optional(),
|
|
1261
1261
|
typeDatesAsStrings: zod.z.boolean().optional(),
|
|
1262
1262
|
groupMultiApiEnvironments: zod.z.boolean().optional(),
|
|
1263
|
+
ignoreTags: zod.z.boolean().optional(),
|
|
1264
|
+
disambiguateRequestNames: zod.z.boolean().optional(),
|
|
1265
|
+
respectReadonlySchemas: zod.z.boolean().optional(),
|
|
1266
|
+
discriminatedUnionV2: zod.z.boolean().optional(),
|
|
1267
|
+
undiscriminatedUnionsWithLiterals: zod.z.boolean().optional(),
|
|
1268
|
+
inlineAllOfSchemas: zod.z.boolean().optional(),
|
|
1269
|
+
resolveSchemaCollisions: zod.z.boolean().optional(),
|
|
1270
|
+
asyncApiMessageNaming: zod.z.enum(["v1", "v2"]).optional(),
|
|
1263
1271
|
defaultIntegerFormat: zod.z.enum(["int32", "int64", "uint32", "uint64"]).optional()
|
|
1264
1272
|
});
|
|
1265
1273
|
var sourceSpecTypeSchema = zod.z.enum([
|
|
@@ -1427,6 +1435,14 @@ var pythonGenerationConfigSchema = zod.z.strictObject({
|
|
|
1427
1435
|
pydanticVersion: nonEmptyStringSchema.optional(),
|
|
1428
1436
|
pydantic: pydanticConfigSchema.optional(),
|
|
1429
1437
|
client: pythonClientSchema.optional(),
|
|
1438
|
+
/** Default followed by generated sync and async HTTP clients when the caller does not override it. */
|
|
1439
|
+
followRedirectsByDefault: zod.z.boolean().optional(),
|
|
1440
|
+
/** Chunk size passed to Python byte-stream iterators. */
|
|
1441
|
+
defaultBytesStreamChunkSize: zod.z.number().int().positive().optional(),
|
|
1442
|
+
/** Python interpreter recursion limit installed by the generated package at import time. */
|
|
1443
|
+
recursionLimit: zod.z.number().int().gt(1e3).optional(),
|
|
1444
|
+
/** Published Python extras, keyed by extra name with package dependency names as values. */
|
|
1445
|
+
extras: zod.z.record(nonEmptyStringSchema, zod.z.array(nonEmptyStringSchema)).optional(),
|
|
1430
1446
|
alwaysInitializeOptionals: zod.z.boolean().optional(),
|
|
1431
1447
|
useTypedDictRequests: zod.z.boolean().optional(),
|
|
1432
1448
|
additionalInitExports: zod.z.array(additionalInitExportSchema).optional()
|
|
@@ -2021,6 +2037,16 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2021
2037
|
...optional("statusCodeProfile", statusCodeProfile)
|
|
2022
2038
|
};
|
|
2023
2039
|
}
|
|
2040
|
+
const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
|
|
2041
|
+
const directClientName = takeString(config, ["clientName", "clientClassName"], state, basePath);
|
|
2042
|
+
const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : void 0;
|
|
2043
|
+
const directExportedClientName = takeString(
|
|
2044
|
+
config,
|
|
2045
|
+
["exportedClientName", "exportedClientClassName"],
|
|
2046
|
+
state,
|
|
2047
|
+
basePath
|
|
2048
|
+
);
|
|
2049
|
+
const nestedExportedClientName = pythonClient ? takeString(pythonClient.value, ["exportedClassName"], state, pythonClient.path) : void 0;
|
|
2024
2050
|
const naming = compact({
|
|
2025
2051
|
pagerName: takeString(
|
|
2026
2052
|
config,
|
|
@@ -2028,13 +2054,8 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
|
|
|
2028
2054
|
state,
|
|
2029
2055
|
basePath
|
|
2030
2056
|
),
|
|
2031
|
-
clientName:
|
|
2032
|
-
exportedClientName:
|
|
2033
|
-
config,
|
|
2034
|
-
["exportedClientName", "exportedClientClassName"],
|
|
2035
|
-
state,
|
|
2036
|
-
basePath
|
|
2037
|
-
),
|
|
2057
|
+
clientName: directClientName ?? nestedClientName,
|
|
2058
|
+
exportedClientName: directExportedClientName ?? nestedExportedClientName,
|
|
2038
2059
|
environmentTypeName: takeString(
|
|
2039
2060
|
config,
|
|
2040
2061
|
["environmentClassName", "environmentEnumName"],
|
|
@@ -2132,9 +2153,27 @@ function mapPython(config, state, packageConfig, basePath) {
|
|
|
2132
2153
|
const packageName = takeString(config, ["pypiPackageName"], state, basePath);
|
|
2133
2154
|
if (moduleName !== void 0) packageConfig.moduleName = moduleName;
|
|
2134
2155
|
if (packageName !== void 0) packageConfig.packageName = packageName;
|
|
2156
|
+
const client = takeObject(config, ["client"], state, basePath);
|
|
2157
|
+
const directFileName = takeString(config, ["clientFilename"], state, basePath);
|
|
2158
|
+
const nestedFileName = client ? takeString(client.value, ["filename"], state, client.path) : void 0;
|
|
2159
|
+
const exportedFileName = client ? takeString(client.value, ["exportedFilename"], state, client.path) : void 0;
|
|
2135
2160
|
return compact({
|
|
2136
2161
|
pythonVersion: takeString(config, ["pythonVersion", "pyprojectPythonVersion"], state, basePath),
|
|
2137
2162
|
pydanticVersion: takeString(config, ["pydanticVersion"], state, basePath),
|
|
2163
|
+
...optionalObject(
|
|
2164
|
+
"client",
|
|
2165
|
+
compact({ fileName: directFileName ?? nestedFileName, exportedFileName })
|
|
2166
|
+
),
|
|
2167
|
+
followRedirectsByDefault: takeBoolean(config, ["followRedirectsByDefault"], state, basePath),
|
|
2168
|
+
defaultBytesStreamChunkSize: takeNumber(
|
|
2169
|
+
config,
|
|
2170
|
+
["defaultBytesStreamChunkSize"],
|
|
2171
|
+
state,
|
|
2172
|
+
basePath,
|
|
2173
|
+
1
|
|
2174
|
+
),
|
|
2175
|
+
recursionLimit: takeNumber(config, ["recursionLimit"], state, basePath, 1001),
|
|
2176
|
+
extras: takeStringArrayRecord(config, ["extras"], state, basePath),
|
|
2138
2177
|
alwaysInitializeOptionals: takeBoolean(config, ["alwaysInitializeOptionals"], state, basePath),
|
|
2139
2178
|
useTypedDictRequests: takeBoolean(config, ["useTypedDictRequests"], state, basePath),
|
|
2140
2179
|
additionalInitExports: takePythonAdditionalInitExports(config, state, basePath)
|