fern-api 0.31.10 → 0.31.12
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/bundle.cjs +197 -26
- package/package.json +1 -1
package/bundle.cjs
CHANGED
|
@@ -316578,7 +316578,7 @@ var require_prettier = __commonJS({
|
|
|
316578
316578
|
value: true
|
|
316579
316579
|
});
|
|
316580
316580
|
var schema_1 = require_schema13();
|
|
316581
|
-
var
|
|
316581
|
+
var BooleanSchema2 = class extends schema_1.Schema {
|
|
316582
316582
|
expected() {
|
|
316583
316583
|
return "true or false";
|
|
316584
316584
|
}
|
|
@@ -316586,7 +316586,7 @@ var require_prettier = __commonJS({
|
|
|
316586
316586
|
return typeof value === "boolean";
|
|
316587
316587
|
}
|
|
316588
316588
|
};
|
|
316589
|
-
exports22.BooleanSchema =
|
|
316589
|
+
exports22.BooleanSchema = BooleanSchema2;
|
|
316590
316590
|
}
|
|
316591
316591
|
});
|
|
316592
316592
|
var require_utils25 = __commonJS22({
|
|
@@ -369214,8 +369214,9 @@ var init_PrimitiveSchemaValue = __esm({
|
|
|
369214
369214
|
}
|
|
369215
369215
|
};
|
|
369216
369216
|
},
|
|
369217
|
-
int64: () => {
|
|
369217
|
+
int64: (value) => {
|
|
369218
369218
|
return {
|
|
369219
|
+
...value,
|
|
369219
369220
|
type: "int64",
|
|
369220
369221
|
_visit: function(visitor) {
|
|
369221
369222
|
return PrimitiveSchemaValue._visit(this, visitor);
|
|
@@ -369272,8 +369273,9 @@ var init_PrimitiveSchemaValue = __esm({
|
|
|
369272
369273
|
}
|
|
369273
369274
|
};
|
|
369274
369275
|
},
|
|
369275
|
-
boolean: () => {
|
|
369276
|
+
boolean: (value) => {
|
|
369276
369277
|
return {
|
|
369278
|
+
...value,
|
|
369277
369279
|
type: "boolean",
|
|
369278
369280
|
_visit: function(visitor) {
|
|
369279
369281
|
return PrimitiveSchemaValue._visit(this, visitor);
|
|
@@ -369285,7 +369287,7 @@ var init_PrimitiveSchemaValue = __esm({
|
|
|
369285
369287
|
case "int":
|
|
369286
369288
|
return visitor.int(value);
|
|
369287
369289
|
case "int64":
|
|
369288
|
-
return visitor.int64();
|
|
369290
|
+
return visitor.int64(value);
|
|
369289
369291
|
case "float":
|
|
369290
369292
|
return visitor.float();
|
|
369291
369293
|
case "double":
|
|
@@ -369299,7 +369301,7 @@ var init_PrimitiveSchemaValue = __esm({
|
|
|
369299
369301
|
case "base64":
|
|
369300
369302
|
return visitor.base64();
|
|
369301
369303
|
case "boolean":
|
|
369302
|
-
return visitor.boolean();
|
|
369304
|
+
return visitor.boolean(value);
|
|
369303
369305
|
default:
|
|
369304
369306
|
return visitor._other(value);
|
|
369305
369307
|
}
|
|
@@ -369320,6 +369322,18 @@ var init_DoubleSchema = __esm({
|
|
|
369320
369322
|
}
|
|
369321
369323
|
});
|
|
369322
369324
|
|
|
369325
|
+
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/BooleanSchema.js
|
|
369326
|
+
var init_BooleanSchema = __esm({
|
|
369327
|
+
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/BooleanSchema.js"() {
|
|
369328
|
+
}
|
|
369329
|
+
});
|
|
369330
|
+
|
|
369331
|
+
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/LongSchema.js
|
|
369332
|
+
var init_LongSchema = __esm({
|
|
369333
|
+
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/LongSchema.js"() {
|
|
369334
|
+
}
|
|
369335
|
+
});
|
|
369336
|
+
|
|
369323
369337
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/StringSchema.js
|
|
369324
369338
|
var init_StringSchema = __esm({
|
|
369325
369339
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/api/resources/finalIr/types/StringSchema.js"() {
|
|
@@ -369551,6 +369565,8 @@ var init_types28 = __esm({
|
|
|
369551
369565
|
init_PrimitiveSchemaValue();
|
|
369552
369566
|
init_IntSchema();
|
|
369553
369567
|
init_DoubleSchema();
|
|
369568
|
+
init_BooleanSchema();
|
|
369569
|
+
init_LongSchema();
|
|
369554
369570
|
init_StringSchema();
|
|
369555
369571
|
init_LiteralSchema();
|
|
369556
369572
|
init_LiteralSchemaValue();
|
|
@@ -373006,21 +373022,21 @@ var init_PrimitiveSchemaValue2 = __esm({
|
|
|
373006
373022
|
init_core3();
|
|
373007
373023
|
PrimitiveSchemaValue2 = schemas_exports5.union("type", {
|
|
373008
373024
|
int: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).IntSchema),
|
|
373009
|
-
int64: schemas_exports5.
|
|
373025
|
+
int64: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).LongSchema),
|
|
373010
373026
|
float: schemas_exports5.object({}),
|
|
373011
373027
|
double: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).DoubleSchema),
|
|
373012
373028
|
string: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).StringSchema),
|
|
373013
373029
|
datetime: schemas_exports5.object({}),
|
|
373014
373030
|
date: schemas_exports5.object({}),
|
|
373015
373031
|
base64: schemas_exports5.object({}),
|
|
373016
|
-
boolean: schemas_exports5.
|
|
373032
|
+
boolean: schemas_exports5.lazyObject(async () => (await Promise.resolve().then(() => (init_serialization3(), serialization_exports3))).BooleanSchema)
|
|
373017
373033
|
}).transform({
|
|
373018
373034
|
transform: (value) => {
|
|
373019
373035
|
switch (value.type) {
|
|
373020
373036
|
case "int":
|
|
373021
373037
|
return PrimitiveSchemaValue.int(value);
|
|
373022
373038
|
case "int64":
|
|
373023
|
-
return PrimitiveSchemaValue.int64();
|
|
373039
|
+
return PrimitiveSchemaValue.int64(value);
|
|
373024
373040
|
case "float":
|
|
373025
373041
|
return PrimitiveSchemaValue.float();
|
|
373026
373042
|
case "double":
|
|
@@ -373034,7 +373050,7 @@ var init_PrimitiveSchemaValue2 = __esm({
|
|
|
373034
373050
|
case "base64":
|
|
373035
373051
|
return PrimitiveSchemaValue.base64();
|
|
373036
373052
|
case "boolean":
|
|
373037
|
-
return PrimitiveSchemaValue.boolean();
|
|
373053
|
+
return PrimitiveSchemaValue.boolean(value);
|
|
373038
373054
|
default:
|
|
373039
373055
|
return value;
|
|
373040
373056
|
}
|
|
@@ -373076,6 +373092,28 @@ var init_DoubleSchema2 = __esm({
|
|
|
373076
373092
|
}
|
|
373077
373093
|
});
|
|
373078
373094
|
|
|
373095
|
+
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/BooleanSchema.js
|
|
373096
|
+
var BooleanSchema;
|
|
373097
|
+
var init_BooleanSchema2 = __esm({
|
|
373098
|
+
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/BooleanSchema.js"() {
|
|
373099
|
+
init_core3();
|
|
373100
|
+
BooleanSchema = schemas_exports5.objectWithoutOptionalProperties({
|
|
373101
|
+
default: schemas_exports5.boolean().optional()
|
|
373102
|
+
});
|
|
373103
|
+
}
|
|
373104
|
+
});
|
|
373105
|
+
|
|
373106
|
+
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/LongSchema.js
|
|
373107
|
+
var LongSchema;
|
|
373108
|
+
var init_LongSchema2 = __esm({
|
|
373109
|
+
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/LongSchema.js"() {
|
|
373110
|
+
init_core3();
|
|
373111
|
+
LongSchema = schemas_exports5.objectWithoutOptionalProperties({
|
|
373112
|
+
default: schemas_exports5.number().optional()
|
|
373113
|
+
});
|
|
373114
|
+
}
|
|
373115
|
+
});
|
|
373116
|
+
|
|
373079
373117
|
// pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/finalIr/types/StringSchema.js
|
|
373080
373118
|
var StringSchema;
|
|
373081
373119
|
var init_StringSchema2 = __esm({
|
|
@@ -373394,6 +373432,8 @@ var init_types32 = __esm({
|
|
|
373394
373432
|
init_PrimitiveSchemaValue2();
|
|
373395
373433
|
init_IntSchema2();
|
|
373396
373434
|
init_DoubleSchema2();
|
|
373435
|
+
init_BooleanSchema2();
|
|
373436
|
+
init_LongSchema2();
|
|
373397
373437
|
init_StringSchema2();
|
|
373398
373438
|
init_LiteralSchema2();
|
|
373399
373439
|
init_LiteralSchemaValue2();
|
|
@@ -373421,6 +373461,7 @@ var finalIr_exports2 = {};
|
|
|
373421
373461
|
__export(finalIr_exports2, {
|
|
373422
373462
|
AllOfPropertyConflict: () => AllOfPropertyConflict,
|
|
373423
373463
|
ArraySchema: () => ArraySchema,
|
|
373464
|
+
BooleanSchema: () => BooleanSchema,
|
|
373424
373465
|
CasingOverrides: () => CasingOverrides,
|
|
373425
373466
|
CommonProperty: () => CommonProperty,
|
|
373426
373467
|
CursorPagination: () => CursorPagination2,
|
|
@@ -373451,6 +373492,7 @@ __export(finalIr_exports2, {
|
|
|
373451
373492
|
JsonResponse: () => JsonResponse3,
|
|
373452
373493
|
LiteralSchema: () => LiteralSchema,
|
|
373453
373494
|
LiteralSchemaValue: () => LiteralSchemaValue2,
|
|
373495
|
+
LongSchema: () => LongSchema,
|
|
373454
373496
|
MapSchema: () => MapSchema,
|
|
373455
373497
|
MultipartRequest: () => MultipartRequest,
|
|
373456
373498
|
MultipartRequestProperty: () => MultipartRequestProperty,
|
|
@@ -373992,6 +374034,7 @@ var init_Int64WithExample2 = __esm({
|
|
|
373992
374034
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/parseIr/types/Int64WithExample.js"() {
|
|
373993
374035
|
init_core3();
|
|
373994
374036
|
Int64WithExample = schemas_exports5.objectWithoutOptionalProperties({
|
|
374037
|
+
default: schemas_exports5.number().optional(),
|
|
373995
374038
|
example: schemas_exports5.number().optional()
|
|
373996
374039
|
});
|
|
373997
374040
|
}
|
|
@@ -374080,6 +374123,7 @@ var init_BooleanWithExample2 = __esm({
|
|
|
374080
374123
|
"pnp:/home/circleci/project/packages/cli/openapi-ir-sdk/lib/sdk/serialization/resources/parseIr/types/BooleanWithExample.js"() {
|
|
374081
374124
|
init_core3();
|
|
374082
374125
|
BooleanWithExample = schemas_exports5.objectWithoutOptionalProperties({
|
|
374126
|
+
default: schemas_exports5.boolean().optional(),
|
|
374083
374127
|
example: schemas_exports5.boolean().optional()
|
|
374084
374128
|
});
|
|
374085
374129
|
}
|
|
@@ -374194,6 +374238,7 @@ __export(serialization_exports3, {
|
|
|
374194
374238
|
Base64WithExample: () => Base64WithExample,
|
|
374195
374239
|
BasicSecurityScheme: () => BasicSecurityScheme,
|
|
374196
374240
|
BearerSecurityScheme: () => BearerSecurityScheme,
|
|
374241
|
+
BooleanSchema: () => BooleanSchema,
|
|
374197
374242
|
BooleanWithExample: () => BooleanWithExample,
|
|
374198
374243
|
CasingOverrides: () => CasingOverrides,
|
|
374199
374244
|
CommonProperty: () => CommonProperty,
|
|
@@ -374245,6 +374290,7 @@ __export(serialization_exports3, {
|
|
|
374245
374290
|
LiteralExample: () => LiteralExample2,
|
|
374246
374291
|
LiteralSchema: () => LiteralSchema,
|
|
374247
374292
|
LiteralSchemaValue: () => LiteralSchemaValue2,
|
|
374293
|
+
LongSchema: () => LongSchema,
|
|
374248
374294
|
MapSchema: () => MapSchema,
|
|
374249
374295
|
MapSchemaWithExample: () => MapSchemaWithExample,
|
|
374250
374296
|
MultipartRequest: () => MultipartRequest,
|
|
@@ -1115791,7 +1115837,7 @@ var AccessTokenPosthogManager = class {
|
|
|
1115791
1115837
|
properties: {
|
|
1115792
1115838
|
...event,
|
|
1115793
1115839
|
...event.properties,
|
|
1115794
|
-
version: "0.31.
|
|
1115840
|
+
version: "0.31.12",
|
|
1115795
1115841
|
usingAccessToken: true
|
|
1115796
1115842
|
}
|
|
1115797
1115843
|
});
|
|
@@ -1115853,7 +1115899,7 @@ var UserPosthogManager = class {
|
|
|
1115853
1115899
|
distinctId: this.userId ?? await this.getPersistedDistinctId(),
|
|
1115854
1115900
|
event: "CLI",
|
|
1115855
1115901
|
properties: {
|
|
1115856
|
-
version: "0.31.
|
|
1115902
|
+
version: "0.31.12",
|
|
1115857
1115903
|
...event,
|
|
1115858
1115904
|
...event.properties
|
|
1115859
1115905
|
}
|
|
@@ -1138001,6 +1138047,16 @@ function buildPrimitiveTypeReference(primitiveSchema) {
|
|
|
1138001
1138047
|
description: primitiveSchema.description,
|
|
1138002
1138048
|
schema: primitiveSchema.schema
|
|
1138003
1138049
|
});
|
|
1138050
|
+
case "boolean":
|
|
1138051
|
+
return buildBooleanTypeReference({
|
|
1138052
|
+
description: primitiveSchema.description,
|
|
1138053
|
+
schema: primitiveSchema.schema
|
|
1138054
|
+
});
|
|
1138055
|
+
case "int64":
|
|
1138056
|
+
return buildLongTypeReference({
|
|
1138057
|
+
description: primitiveSchema.description,
|
|
1138058
|
+
schema: primitiveSchema.schema
|
|
1138059
|
+
});
|
|
1138004
1138060
|
}
|
|
1138005
1138061
|
const typeReference = primitiveSchema.schema._visit({
|
|
1138006
1138062
|
int: () => "integer",
|
|
@@ -1138022,6 +1138078,38 @@ function buildPrimitiveTypeReference(primitiveSchema) {
|
|
|
1138022
1138078
|
}
|
|
1138023
1138079
|
return typeReference;
|
|
1138024
1138080
|
}
|
|
1138081
|
+
function buildBooleanTypeReference({ description, schema: schema2 }) {
|
|
1138082
|
+
const type2 = "boolean";
|
|
1138083
|
+
if (description == null && schema2.default == null) {
|
|
1138084
|
+
return type2;
|
|
1138085
|
+
}
|
|
1138086
|
+
const result2 = {
|
|
1138087
|
+
type: type2
|
|
1138088
|
+
};
|
|
1138089
|
+
if (description != null) {
|
|
1138090
|
+
result2.docs = description;
|
|
1138091
|
+
}
|
|
1138092
|
+
if (schema2.default != null) {
|
|
1138093
|
+
result2.default = schema2.default;
|
|
1138094
|
+
}
|
|
1138095
|
+
return result2;
|
|
1138096
|
+
}
|
|
1138097
|
+
function buildLongTypeReference({ description, schema: schema2 }) {
|
|
1138098
|
+
const type2 = "int64";
|
|
1138099
|
+
if (description == null && schema2.default == null) {
|
|
1138100
|
+
return type2;
|
|
1138101
|
+
}
|
|
1138102
|
+
const result2 = {
|
|
1138103
|
+
type: type2
|
|
1138104
|
+
};
|
|
1138105
|
+
if (description != null) {
|
|
1138106
|
+
result2.docs = description;
|
|
1138107
|
+
}
|
|
1138108
|
+
if (schema2.default != null) {
|
|
1138109
|
+
result2.default = schema2.default;
|
|
1138110
|
+
}
|
|
1138111
|
+
return result2;
|
|
1138112
|
+
}
|
|
1138025
1138113
|
function buildStringTypeReference({ description, schema: schema2 }) {
|
|
1138026
1138114
|
const type2 = "string";
|
|
1138027
1138115
|
const validation = maybeStringValidation(schema2);
|
|
@@ -1138087,16 +1138175,35 @@ function maybeStringValidation(schema2) {
|
|
|
1138087
1138175
|
return void 0;
|
|
1138088
1138176
|
}
|
|
1138089
1138177
|
const { format: format5, pattern, minLength, maxLength } = schema2;
|
|
1138090
|
-
|
|
1138178
|
+
const validFormat = maybeValidFormat(format5);
|
|
1138179
|
+
if (validFormat == null && pattern == null && minLength == null && maxLength == null) {
|
|
1138091
1138180
|
return void 0;
|
|
1138092
1138181
|
}
|
|
1138093
1138182
|
return {
|
|
1138094
|
-
format:
|
|
1138183
|
+
format: validFormat,
|
|
1138095
1138184
|
pattern,
|
|
1138096
1138185
|
minLength,
|
|
1138097
1138186
|
maxLength
|
|
1138098
1138187
|
};
|
|
1138099
1138188
|
}
|
|
1138189
|
+
function maybeValidFormat(format5) {
|
|
1138190
|
+
switch (format5) {
|
|
1138191
|
+
case "date":
|
|
1138192
|
+
case "date-time":
|
|
1138193
|
+
case "password":
|
|
1138194
|
+
case "byte":
|
|
1138195
|
+
case "binary":
|
|
1138196
|
+
case "email":
|
|
1138197
|
+
case "uuid":
|
|
1138198
|
+
case "uri":
|
|
1138199
|
+
case "hostname":
|
|
1138200
|
+
case "ipv4":
|
|
1138201
|
+
case "ipv6":
|
|
1138202
|
+
return format5;
|
|
1138203
|
+
default:
|
|
1138204
|
+
return void 0;
|
|
1138205
|
+
}
|
|
1138206
|
+
}
|
|
1138100
1138207
|
function maybeNumberValidation(schema2, type2) {
|
|
1138101
1138208
|
if (schema2 == null) {
|
|
1138102
1138209
|
return void 0;
|
|
@@ -1138990,6 +1139097,7 @@ function getSchemaFromFernType({ fernType, nameOverride, generatedName, descript
|
|
|
1138990
1139097
|
description,
|
|
1138991
1139098
|
groupName,
|
|
1138992
1139099
|
schema: PrimitiveSchemaValueWithExample.boolean({
|
|
1139100
|
+
default: void 0,
|
|
1138993
1139101
|
example: void 0
|
|
1138994
1139102
|
})
|
|
1138995
1139103
|
});
|
|
@@ -1139052,6 +1139160,7 @@ function getSchemaFromFernType({ fernType, nameOverride, generatedName, descript
|
|
|
1139052
1139160
|
description,
|
|
1139053
1139161
|
groupName,
|
|
1139054
1139162
|
schema: PrimitiveSchemaValueWithExample.int64({
|
|
1139163
|
+
default: void 0,
|
|
1139055
1139164
|
example: void 0
|
|
1139056
1139165
|
})
|
|
1139057
1139166
|
});
|
|
@@ -1139640,6 +1139749,7 @@ function convertNumber({ nameOverride, generatedName, format: format5, _default:
|
|
|
1139640
1139749
|
nameOverride,
|
|
1139641
1139750
|
generatedName,
|
|
1139642
1139751
|
primitive: PrimitiveSchemaValueWithExample.int64({
|
|
1139752
|
+
default: _default3,
|
|
1139643
1139753
|
example
|
|
1139644
1139754
|
}),
|
|
1139645
1139755
|
wrapAsNullable,
|
|
@@ -1139924,7 +1140034,7 @@ function convertToPrimitiveSchemaValue(primitiveSchema) {
|
|
|
1139924
1140034
|
case "base64":
|
|
1139925
1140035
|
return PrimitiveSchemaValue.base64();
|
|
1139926
1140036
|
case "boolean":
|
|
1139927
|
-
return PrimitiveSchemaValue.boolean();
|
|
1140037
|
+
return PrimitiveSchemaValue.boolean(primitiveSchema);
|
|
1139928
1140038
|
case "date":
|
|
1139929
1140039
|
return PrimitiveSchemaValue.date();
|
|
1139930
1140040
|
case "datetime":
|
|
@@ -1139936,7 +1140046,7 @@ function convertToPrimitiveSchemaValue(primitiveSchema) {
|
|
|
1139936
1140046
|
case "int":
|
|
1139937
1140047
|
return PrimitiveSchemaValue.int(primitiveSchema);
|
|
1139938
1140048
|
case "int64":
|
|
1139939
|
-
return PrimitiveSchemaValue.int64();
|
|
1140049
|
+
return PrimitiveSchemaValue.int64(primitiveSchema);
|
|
1139940
1140050
|
default:
|
|
1139941
1140051
|
assertNever(primitiveSchema);
|
|
1139942
1140052
|
}
|
|
@@ -1140645,6 +1140755,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
|
|
|
1140645
1140755
|
nameOverride,
|
|
1140646
1140756
|
generatedName,
|
|
1140647
1140757
|
primitive: PrimitiveSchemaValueWithExample.boolean({
|
|
1140758
|
+
default: schema2.default,
|
|
1140648
1140759
|
example: getExampleAsBoolean(schema2)
|
|
1140649
1140760
|
}),
|
|
1140650
1140761
|
wrapAsNullable,
|
|
@@ -1142123,6 +1142234,7 @@ function convertToPrimitiveSchemaValue2(primitiveSchema) {
|
|
|
1142123
1142234
|
});
|
|
1142124
1142235
|
case "boolean":
|
|
1142125
1142236
|
return PrimitiveSchemaValueWithExample.boolean({
|
|
1142237
|
+
default: primitiveSchema.default,
|
|
1142126
1142238
|
example: void 0
|
|
1142127
1142239
|
});
|
|
1142128
1142240
|
case "date":
|
|
@@ -1142159,6 +1142271,7 @@ function convertToPrimitiveSchemaValue2(primitiveSchema) {
|
|
|
1142159
1142271
|
});
|
|
1142160
1142272
|
case "int64":
|
|
1142161
1142273
|
return PrimitiveSchemaValueWithExample.int64({
|
|
1142274
|
+
default: primitiveSchema.default,
|
|
1142162
1142275
|
example: void 0
|
|
1142163
1142276
|
});
|
|
1142164
1142277
|
default:
|
|
@@ -1147053,7 +1147166,9 @@ var FernDefinitionBuilderImpl = class {
|
|
|
1147053
1147166
|
if (this.rootApiFile["auth-schemes"] == null) {
|
|
1147054
1147167
|
this.rootApiFile["auth-schemes"] = {};
|
|
1147055
1147168
|
}
|
|
1147056
|
-
this.rootApiFile["auth-schemes"][name3]
|
|
1147169
|
+
if (this.rootApiFile["auth-schemes"][name3] == null) {
|
|
1147170
|
+
this.rootApiFile["auth-schemes"][name3] = schema2;
|
|
1147171
|
+
}
|
|
1147057
1147172
|
}
|
|
1147058
1147173
|
setDefaultEnvironment(name3) {
|
|
1147059
1147174
|
this.rootApiFile["default-environment"] = name3;
|
|
@@ -1151352,10 +1151467,10 @@ var CliContext = class {
|
|
|
1151352
1151467
|
return "fern-api";
|
|
1151353
1151468
|
}
|
|
1151354
1151469
|
getPackageVersion() {
|
|
1151355
|
-
if ("0.31.
|
|
1151470
|
+
if ("0.31.12" == null) {
|
|
1151356
1151471
|
this.logger.error("CLI_VERSION is not defined");
|
|
1151357
1151472
|
}
|
|
1151358
|
-
return "0.31.
|
|
1151473
|
+
return "0.31.12";
|
|
1151359
1151474
|
}
|
|
1151360
1151475
|
getCliName() {
|
|
1151361
1151476
|
if ("fern" == null) {
|
|
@@ -1192278,11 +1192393,11 @@ function validateResolvedType({ resolvedType, _default: _default3, validation })
|
|
|
1192278
1192393
|
case "INTEGER":
|
|
1192279
1192394
|
return validateIntegerDefaultAndValidation({ _default: _default3, validation });
|
|
1192280
1192395
|
case "BOOLEAN":
|
|
1192281
|
-
|
|
1192282
|
-
break;
|
|
1192396
|
+
return validateBooleanDefaultAndValidation({ _default: _default3, validation });
|
|
1192283
1192397
|
case "LONG":
|
|
1192284
|
-
|
|
1192285
|
-
|
|
1192398
|
+
return validateLongDefaultAndValidation({ _default: _default3, validation });
|
|
1192399
|
+
case "BIG_INTEGER":
|
|
1192400
|
+
return validateBigIntegerDefaultAndValidation({ _default: _default3, validation });
|
|
1192286
1192401
|
case "DATE_TIME":
|
|
1192287
1192402
|
typeName = "datetime";
|
|
1192288
1192403
|
break;
|
|
@@ -1192292,9 +1192407,6 @@ function validateResolvedType({ resolvedType, _default: _default3, validation })
|
|
|
1192292
1192407
|
case "BASE_64":
|
|
1192293
1192408
|
typeName = "base64";
|
|
1192294
1192409
|
break;
|
|
1192295
|
-
case "BIG_INTEGER":
|
|
1192296
|
-
typeName = "bigint";
|
|
1192297
|
-
break;
|
|
1192298
1192410
|
}
|
|
1192299
1192411
|
}
|
|
1192300
1192412
|
if (_default3 != null) {
|
|
@@ -1192363,6 +1192475,65 @@ function validateIntegerDefaultAndValidation({ _default: _default3, validation }
|
|
|
1192363
1192475
|
}
|
|
1192364
1192476
|
return violations;
|
|
1192365
1192477
|
}
|
|
1192478
|
+
function validateBooleanDefaultAndValidation({ _default: _default3, validation }) {
|
|
1192479
|
+
const violations = [];
|
|
1192480
|
+
if (_default3 != null && typeof _default3 !== "boolean") {
|
|
1192481
|
+
violations.push({
|
|
1192482
|
+
message: `Default value '${_default3}' is not a valid boolean`,
|
|
1192483
|
+
severity: "error"
|
|
1192484
|
+
});
|
|
1192485
|
+
}
|
|
1192486
|
+
if (validation != null) {
|
|
1192487
|
+
violations.push({
|
|
1192488
|
+
message: `Validation rules '${JSON.stringify(validation)}' are not compatible with the boolean type`,
|
|
1192489
|
+
severity: "error"
|
|
1192490
|
+
});
|
|
1192491
|
+
}
|
|
1192492
|
+
return violations;
|
|
1192493
|
+
}
|
|
1192494
|
+
function validateLongDefaultAndValidation({ _default: _default3, validation }) {
|
|
1192495
|
+
const violations = [];
|
|
1192496
|
+
if (_default3 != null && typeof _default3 !== "number") {
|
|
1192497
|
+
violations.push({
|
|
1192498
|
+
message: `Default value '${_default3}' is not a valid long`,
|
|
1192499
|
+
severity: "error"
|
|
1192500
|
+
});
|
|
1192501
|
+
}
|
|
1192502
|
+
if (validation != null) {
|
|
1192503
|
+
violations.push({
|
|
1192504
|
+
message: `Validation rules '${JSON.stringify(validation)}' are not compatible with the long type`,
|
|
1192505
|
+
severity: "error"
|
|
1192506
|
+
});
|
|
1192507
|
+
}
|
|
1192508
|
+
return violations;
|
|
1192509
|
+
}
|
|
1192510
|
+
function validateBigIntegerDefaultAndValidation({ _default: _default3, validation }) {
|
|
1192511
|
+
const violations = [];
|
|
1192512
|
+
if (_default3 != null) {
|
|
1192513
|
+
if (typeof _default3 !== "string") {
|
|
1192514
|
+
violations.push({
|
|
1192515
|
+
message: `Default value '${_default3}' is not a valid bigint`,
|
|
1192516
|
+
severity: "error"
|
|
1192517
|
+
});
|
|
1192518
|
+
} else {
|
|
1192519
|
+
try {
|
|
1192520
|
+
BigInt(_default3);
|
|
1192521
|
+
} catch (error) {
|
|
1192522
|
+
violations.push({
|
|
1192523
|
+
message: `Default value '${_default3}' is not a valid bigint`,
|
|
1192524
|
+
severity: "error"
|
|
1192525
|
+
});
|
|
1192526
|
+
}
|
|
1192527
|
+
}
|
|
1192528
|
+
}
|
|
1192529
|
+
if (validation != null) {
|
|
1192530
|
+
violations.push({
|
|
1192531
|
+
message: `Validation rules '${JSON.stringify(validation)}' are not compatible with the bigint type`,
|
|
1192532
|
+
severity: "error"
|
|
1192533
|
+
});
|
|
1192534
|
+
}
|
|
1192535
|
+
return violations;
|
|
1192536
|
+
}
|
|
1192366
1192537
|
function validateIntegerValidation({ name: name3, value }) {
|
|
1192367
1192538
|
if (value != null && !Number.isInteger(value)) {
|
|
1192368
1192539
|
return [
|