@fern-api/fern-api-dev 5.7.0 → 5.7.1-2-gb0f84fcf76c

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.
Files changed (2) hide show
  1. package/cli.cjs +130 -51
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -489185,6 +489185,7 @@ var ObjectProperty = schemas_exports3.objectWithoutOptionalProperties({
489185
489185
  name: NameAndWireValueOrString,
489186
489186
  valueType: schemas_exports3.lazy(() => TypeReference3),
489187
489187
  propertyAccess: ObjectPropertyAccess5.optional(),
489188
+ defaultValue: schemas_exports3.unknown().optional(),
489188
489189
  v2Examples: V2SchemaExamples.optional()
489189
489190
  }).extend(Declaration);
489190
489191
 
@@ -489254,6 +489255,7 @@ var QueryParameter = schemas_exports3.objectWithoutOptionalProperties({
489254
489255
  valueType: schemas_exports3.lazy(() => TypeReference3),
489255
489256
  allowMultiple: schemas_exports3.boolean(),
489256
489257
  clientDefault: Literal2.optional(),
489258
+ defaultValue: schemas_exports3.unknown().optional(),
489257
489259
  v2Examples: V2SchemaExamples.optional(),
489258
489260
  explode: schemas_exports3.boolean().optional()
489259
489261
  }).extend(Declaration);
@@ -490594,6 +490596,7 @@ var HttpHeader = schemas_exports3.objectWithoutOptionalProperties({
490594
490596
  valueType: schemas_exports3.lazy(() => TypeReference3),
490595
490597
  env: schemas_exports3.string().optional(),
490596
490598
  clientDefault: Literal2.optional(),
490599
+ defaultValue: schemas_exports3.unknown().optional(),
490597
490600
  v2Examples: V2SchemaExamples.optional()
490598
490601
  }).extend(Declaration);
490599
490602
 
@@ -491670,6 +491673,7 @@ var FileUploadBodyPropertyEncoding2 = schemas_exports3.enum_(["exploded", "json"
491670
491673
  var InlinedRequestBodyProperty = schemas_exports3.objectWithoutOptionalProperties({
491671
491674
  name: NameAndWireValueOrString,
491672
491675
  valueType: schemas_exports3.lazy(() => TypeReference3),
491676
+ defaultValue: schemas_exports3.unknown().optional(),
491673
491677
  v2Examples: V2SchemaExamples.optional(),
491674
491678
  propertyAccess: ObjectPropertyAccess5.optional()
491675
491679
  }).extend(WithDocsAndAvailability);
@@ -494717,7 +494721,7 @@ function visitEndpoint({ endpointId, endpoint: endpoint3, service, visitor, node
494717
494721
  availability: noop2,
494718
494722
  type: (type8) => {
494719
494723
  visitTypeReference(type8, [...nodePathForQueryParameter, "type"], {
494720
- _default: queryParameter.default,
494724
+ _default: shouldSkipDefaultValidation(queryParameter) ? void 0 : queryParameter.default,
494721
494725
  validation: queryParameter.validation
494722
494726
  });
494723
494727
  },
@@ -495080,6 +495084,9 @@ function visitHeaders({ headers: headers2, visitor, nodePath }) {
495080
495084
  }
495081
495085
  }
495082
495086
  }
495087
+ function shouldSkipDefaultValidation(queryParameter) {
495088
+ return queryParameter["allow-multiple"] === true && Array.isArray(queryParameter.default);
495089
+ }
495083
495090
 
495084
495091
  // ../fern-definition/validator/lib/ast/visitors/visitErrorDeclarations.js
495085
495092
  init_lib4();
@@ -520809,24 +520816,22 @@ function stringifyValidationError5(error50) {
520809
520816
  }
520810
520817
 
520811
520818
  // ../api-importers/openapi/openapi-ir/lib/sdk/core/schemas/builders/schema-utils/JsonError.js
520812
- var JsonError5 = class extends Error {
520819
+ var JsonError5 = class _JsonError extends Error {
520813
520820
  errors;
520814
520821
  constructor(errors4) {
520815
520822
  super(errors4.map(stringifyValidationError5).join("; "));
520816
520823
  this.errors = errors4;
520817
- Object.setPrototypeOf(this, new.target.prototype);
520818
- this.name = this.constructor.name;
520824
+ Object.setPrototypeOf(this, _JsonError.prototype);
520819
520825
  }
520820
520826
  };
520821
520827
 
520822
520828
  // ../api-importers/openapi/openapi-ir/lib/sdk/core/schemas/builders/schema-utils/ParseError.js
520823
- var ParseError5 = class extends Error {
520829
+ var ParseError5 = class _ParseError extends Error {
520824
520830
  errors;
520825
520831
  constructor(errors4) {
520826
520832
  super(errors4.map(stringifyValidationError5).join("; "));
520827
520833
  this.errors = errors4;
520828
- Object.setPrototypeOf(this, new.target.prototype);
520829
- this.name = this.constructor.name;
520834
+ Object.setPrototypeOf(this, _ParseError.prototype);
520830
520835
  }
520831
520836
  };
520832
520837
 
@@ -522657,7 +522662,8 @@ var AllOfPropertyConflict = schemas_exports9.objectWithoutOptionalProperties({
522657
522662
  var ArraySchema = schemas_exports9.objectWithoutOptionalProperties({
522658
522663
  value: schemas_exports9.lazy(() => Schema2),
522659
522664
  minItems: schemas_exports9.number().optional(),
522660
- maxItems: schemas_exports9.number().optional()
522665
+ maxItems: schemas_exports9.number().optional(),
522666
+ default: schemas_exports9.unknown().optional()
522661
522667
  }).extend(WithSdkGroupName).extend(WithNamespace).extend(WithName3).extend(WithDescription).extend(WithAvailability3).extend(WithTitle).extend(WithInline);
522662
522668
 
522663
522669
  // ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/finalIr/types/AsymmetricAlgorithm.js
@@ -523628,7 +523634,8 @@ var ArraySchemaWithExample = schemas_exports9.objectWithoutOptionalProperties({
523628
523634
  value: schemas_exports9.lazy(() => SchemaWithExample2),
523629
523635
  minItems: schemas_exports9.number().optional(),
523630
523636
  maxItems: schemas_exports9.number().optional(),
523631
- example: schemas_exports9.list(schemas_exports9.unknown()).optional()
523637
+ example: schemas_exports9.list(schemas_exports9.unknown()).optional(),
523638
+ default: schemas_exports9.unknown().optional()
523632
523639
  }).extend(WithSdkGroupName).extend(WithNamespace).extend(WithName3).extend(WithDescription).extend(WithAvailability3).extend(WithTitle).extend(WithInline);
523633
523640
 
523634
523641
  // ../api-importers/openapi/openapi-ir/lib/sdk/serialization/resources/parseIr/types/Base64WithExample.js
@@ -524905,12 +524912,13 @@ function buildArrayTypeReference({ schema: schema2, fileContainingReference, dec
524905
524912
  variant
524906
524913
  });
524907
524914
  const type8 = `list<${getTypeFromTypeReference(item)}>`;
524908
- if (schema2.description == null && schema2.title == null) {
524915
+ if (schema2.description == null && schema2.title == null && schema2.default == null) {
524909
524916
  return type8;
524910
524917
  }
524911
524918
  return {
524912
524919
  ...schema2.description != null ? { docs: schema2.description } : {},
524913
524920
  ...schema2.availability != null ? { availability: convertAvailability(schema2.availability) } : {},
524921
+ ...schema2.default != null ? { default: schema2.default } : {},
524914
524922
  type: type8
524915
524923
  };
524916
524924
  }
@@ -525962,9 +525970,10 @@ function buildHeader({ header, context: context3, fileContainingReference, names
525962
525970
  declarationDepth: 0
525963
525971
  });
525964
525972
  const headerType = getTypeFromTypeReference(typeReference2);
525973
+ const headerDefault = getDefaultFromTypeReference(typeReference2);
525965
525974
  const headerWithoutXPrefix = header.name.replace(/^x-|^X-/, "");
525966
525975
  const headerVariableName = header.parameterNameOverride != null ? header.parameterNameOverride : camelCase_default(headerWithoutXPrefix);
525967
- if (header.description == null && header.name === headerVariableName && header.env == null && header.availability == null && header.clientDefault == null) {
525976
+ if (header.description == null && header.name === headerVariableName && header.env == null && header.availability == null && header.clientDefault == null && headerDefault == null) {
525968
525977
  return headerType;
525969
525978
  }
525970
525979
  const headerSchema = {
@@ -525985,6 +525994,9 @@ function buildHeader({ header, context: context3, fileContainingReference, names
525985
525994
  if (header.clientDefault != null) {
525986
525995
  headerSchema["client-default"] = header.clientDefault;
525987
525996
  }
525997
+ if (headerDefault != null) {
525998
+ headerSchema.default = headerDefault;
525999
+ }
525988
526000
  return headerSchema;
525989
526001
  }
525990
526002
 
@@ -526030,7 +526042,7 @@ function buildQueryParameter({ queryParameter, context: context3, fileContaining
526030
526042
  return void 0;
526031
526043
  }
526032
526044
  let queryParameterType = getTypeFromTypeReference(typeReference2.value);
526033
- const queryParameterDefault = getDefaultFromTypeReference(typeReference2.value);
526045
+ const queryParameterDefault = getDefaultFromOpenApiIrSchema(queryParameter.schema, context3, namespace) ?? getDefaultFromTypeReference(typeReference2.value);
526034
526046
  if (queryParameterType === "unknown") {
526035
526047
  queryParameterType = "string";
526036
526048
  } else if (queryParameterType === "optional<unknown>") {
@@ -526466,6 +526478,21 @@ function getQueryParameterTypeReference({ schema: schema2, context: context3, fi
526466
526478
  };
526467
526479
  }
526468
526480
  }
526481
+ function getDefaultFromOpenApiIrSchema(schema2, context3, namespace) {
526482
+ if (schema2.type === "array") {
526483
+ return schema2.default ?? void 0;
526484
+ }
526485
+ if (schema2.type === "optional" || schema2.type === "nullable") {
526486
+ return getDefaultFromOpenApiIrSchema(schema2.value, context3, namespace);
526487
+ }
526488
+ if (schema2.type === "reference") {
526489
+ const resolved = context3.getSchema(schema2.schema, namespace);
526490
+ if (resolved != null) {
526491
+ return getDefaultFromOpenApiIrSchema(resolved, context3, namespace);
526492
+ }
526493
+ }
526494
+ return void 0;
526495
+ }
526469
526496
  function hasSamePrimitiveValueType({ array: array3, primitive }) {
526470
526497
  return array3?.type === "array" && array3.value.type === "primitive" && primitive?.type === "primitive" && array3.value.schema.type === primitive.schema.type;
526471
526498
  }
@@ -531280,7 +531307,8 @@ function getSchemaFromFernType({ fernType, nameOverride, generatedName, title: t
531280
531307
  example: void 0,
531281
531308
  inline: void 0,
531282
531309
  minItems: void 0,
531283
- maxItems: void 0
531310
+ maxItems: void 0,
531311
+ default: void 0
531284
531312
  }) : void 0,
531285
531313
  optional: (itemType) => itemType != null ? SchemaWithExample.optional({
531286
531314
  nameOverride,
@@ -531316,7 +531344,8 @@ function getSchemaFromFernType({ fernType, nameOverride, generatedName, title: t
531316
531344
  example: void 0,
531317
531345
  inline: void 0,
531318
531346
  minItems: void 0,
531319
- maxItems: void 0
531347
+ maxItems: void 0,
531348
+ default: void 0
531320
531349
  }) : void 0,
531321
531350
  literal: (literal3) => SchemaWithExample.literal({
531322
531351
  nameOverride,
@@ -531593,7 +531622,7 @@ function getAdditionalPropertiesAnyMetadata(additionalProperties7) {
531593
531622
  }
531594
531623
 
531595
531624
  // ../api-importers/openapi/openapi-ir-parser/lib/schema/convertArray.js
531596
- function convertArray({ nameOverride, generatedName, title: title2, breadcrumbs, item, description, availability, wrapAsOptional, wrapAsNullable, context: context3, namespace, groupName, example, source: source2, minItems, maxItems }) {
531625
+ function convertArray({ nameOverride, generatedName, title: title2, breadcrumbs, item, description, availability, wrapAsOptional, wrapAsNullable, context: context3, namespace, groupName, example, source: source2, minItems, maxItems, default: defaultValue }) {
531597
531626
  const itemSchema = item == null ? SchemaWithExample.unknown({
531598
531627
  nameOverride,
531599
531628
  generatedName,
@@ -531617,10 +531646,11 @@ function convertArray({ nameOverride, generatedName, title: title2, breadcrumbs,
531617
531646
  availability,
531618
531647
  example,
531619
531648
  minItems,
531620
- maxItems
531649
+ maxItems,
531650
+ default: defaultValue
531621
531651
  });
531622
531652
  }
531623
- function wrapArray({ nameOverride, generatedName, title: title2, itemSchema, wrapAsOptional, wrapAsNullable, description, availability, namespace, groupName, example, minItems, maxItems }) {
531653
+ function wrapArray({ nameOverride, generatedName, title: title2, itemSchema, wrapAsOptional, wrapAsNullable, description, availability, namespace, groupName, example, minItems, maxItems, default: defaultValue }) {
531624
531654
  let result = SchemaWithExample.array({
531625
531655
  nameOverride,
531626
531656
  generatedName,
@@ -531633,7 +531663,8 @@ function wrapArray({ nameOverride, generatedName, title: title2, itemSchema, wra
531633
531663
  example,
531634
531664
  inline: void 0,
531635
531665
  minItems,
531636
- maxItems
531666
+ maxItems,
531667
+ default: defaultValue
531637
531668
  });
531638
531669
  if (wrapAsNullable) {
531639
531670
  result = SchemaWithExample.nullable({
@@ -531871,7 +531902,8 @@ function convertSchemaWithExampleToSchema(schema2) {
531871
531902
  groupName: schema2.groupName,
531872
531903
  inline: schema2.inline,
531873
531904
  minItems: schema2.minItems,
531874
- maxItems: schema2.maxItems
531905
+ maxItems: schema2.maxItems,
531906
+ default: schema2.default
531875
531907
  });
531876
531908
  case "enum":
531877
531909
  return Schema.enum({
@@ -534028,7 +534060,8 @@ function convertSchemaObject(schema2, wrapAsOptional, wrapAsNullable, context3,
534028
534060
  example: getExampleAsArray({ schema: schema2, logger: context3.logger, fallback: fallback2 }),
534029
534061
  source: source2,
534030
534062
  minItems: schema2.minItems,
534031
- maxItems: schema2.maxItems
534063
+ maxItems: schema2.maxItems,
534064
+ default: schema2.default
534032
534065
  });
534033
534066
  }
534034
534067
  if (schema2.additionalProperties != null && schema2.additionalProperties !== false && hasNoProperties(schema2) && hasNoAllOf(schema2)) {
@@ -536028,7 +536061,8 @@ function convertSchemaToSchemaWithExample(schema2) {
536028
536061
  example: void 0,
536029
536062
  inline: void 0,
536030
536063
  minItems: schema2.minItems,
536031
- maxItems: schema2.maxItems
536064
+ maxItems: schema2.maxItems,
536065
+ default: schema2.default
536032
536066
  });
536033
536067
  case "enum":
536034
536068
  return SchemaWithExample.enum({
@@ -559129,6 +559163,7 @@ function getObjectPropertiesFromRawObjectSchema(object23, file4) {
559129
559163
  }),
559130
559164
  valueType: file4.parseTypeReference(propertyDefinition),
559131
559165
  propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
559166
+ defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
559132
559167
  v2Examples: {
559133
559168
  userSpecifiedExamples: {},
559134
559169
  autogeneratedExamples: {}
@@ -559294,6 +559329,7 @@ function convertInlinedRequestProperty({ propertyKey, propertyDefinition, docs:
559294
559329
  name: getPropertyName({ propertyKey, property: propertyDefinition }).name
559295
559330
  }),
559296
559331
  valueType: file4.parseTypeReference(propertyDefinition),
559332
+ defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
559297
559333
  v2Examples: {
559298
559334
  userSpecifiedExamples: {},
559299
559335
  autogeneratedExamples: {}
@@ -559821,6 +559857,7 @@ function convertDiscriminatedUnionTypeDeclaration({ union: union23, file: file4,
559821
559857
  }),
559822
559858
  valueType: file4.parseTypeReference(propertyDefinition),
559823
559859
  propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
559860
+ defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
559824
559861
  v2Examples: {
559825
559862
  userSpecifiedExamples: {},
559826
559863
  autogeneratedExamples: {}
@@ -561654,8 +561691,10 @@ function convertSingleUnionType({ rawValueType, rawSingleUnionType, fileContaini
561654
561691
  // ../generation/ir-generator/lib/converters/services/convertQueryParameter.js
561655
561692
  function convertQueryParameter({ file: file4, queryParameterKey, queryParameter }) {
561656
561693
  const { name: name2 } = getQueryParameterName({ queryParameterKey, queryParameter });
561657
- const valueType = file4.parseTypeReference(queryParameter);
561658
561694
  const clientDefaultValue = typeof queryParameter !== "string" ? queryParameter["client-default"] : void 0;
561695
+ const defaultValue = typeof queryParameter !== "string" ? queryParameter.default : void 0;
561696
+ const queryParameterForType = typeof queryParameter !== "string" && queryParameter["allow-multiple"] === true && Array.isArray(queryParameter.default) ? { ...queryParameter, default: void 0 } : queryParameter;
561697
+ const valueType = file4.parseTypeReference(queryParameterForType);
561659
561698
  return {
561660
561699
  ...convertDeclaration(queryParameter),
561661
561700
  name: file4.casingsGenerator.generateNameAndWireValue({
@@ -561665,6 +561704,7 @@ function convertQueryParameter({ file: file4, queryParameterKey, queryParameter
561665
561704
  valueType,
561666
561705
  allowMultiple: typeof queryParameter !== "string" && queryParameter["allow-multiple"] != null ? queryParameter["allow-multiple"] : false,
561667
561706
  clientDefault: convertDefaultToLiteral(clientDefaultValue),
561707
+ defaultValue,
561668
561708
  v2Examples: {
561669
561709
  userSpecifiedExamples: {},
561670
561710
  autogeneratedExamples: {}
@@ -562808,6 +562848,7 @@ function convertHttpMethod(method8) {
562808
562848
  function convertHttpHeader({ headerKey, header, file: file4 }) {
562809
562849
  const { name: name2 } = getHeaderName3({ headerKey, header });
562810
562850
  const clientDefaultValue = typeof header !== "string" ? header["client-default"] : void 0;
562851
+ const defaultValue = typeof header !== "string" ? header.default : void 0;
562811
562852
  return {
562812
562853
  ...convertDeclaration(header),
562813
562854
  name: file4.casingsGenerator.generateNameAndWireValue({
@@ -562817,6 +562858,7 @@ function convertHttpHeader({ headerKey, header, file: file4 }) {
562817
562858
  valueType: file4.parseTypeReference(header),
562818
562859
  env: typeof header === "string" ? void 0 : header.env,
562819
562860
  clientDefault: convertDefaultToLiteral(clientDefaultValue),
562861
+ defaultValue,
562820
562862
  v2Examples: {
562821
562863
  userSpecifiedExamples: {},
562822
562864
  autogeneratedExamples: {}
@@ -564401,6 +564443,7 @@ function convertChannel({ channel: channel3, typeResolver, exampleResolver, vari
564401
564443
  valueType,
564402
564444
  allowMultiple: typeof queryParameter !== "string" && queryParameter["allow-multiple"] != null ? queryParameter["allow-multiple"] : false,
564403
564445
  clientDefault: void 0,
564446
+ defaultValue: typeof queryParameter !== "string" ? queryParameter.default : void 0,
564404
564447
  v2Examples: {
564405
564448
  userSpecifiedExamples: {},
564406
564449
  autogeneratedExamples: {}
@@ -565401,6 +565444,7 @@ function convertUndiscriminatedUnionTypeDeclaration({ union: union23, file: file
565401
565444
  }),
565402
565445
  valueType: file4.parseTypeReference(propertyDefinition),
565403
565446
  propertyAccess: getPropertyAccess2({ property: propertyDefinition }),
565447
+ defaultValue: typeof propertyDefinition !== "string" ? propertyDefinition.default : void 0,
565404
565448
  v2Examples: {
565405
565449
  userSpecifiedExamples: {},
565406
565450
  autogeneratedExamples: {}
@@ -571595,6 +571639,21 @@ function validateResolvedType({ resolvedType, _default: _default4, validation: v
571595
571639
  validation: validation2
571596
571640
  });
571597
571641
  }
571642
+ if (resolvedType._type === "container" && (resolvedType.container._type === "list" || resolvedType.container._type === "set")) {
571643
+ if (_default4 != null && !Array.isArray(_default4)) {
571644
+ violations.push({
571645
+ message: `Default value for ${resolvedType.container._type} type must be an array`,
571646
+ severity: "fatal"
571647
+ });
571648
+ }
571649
+ if (validation2 != null) {
571650
+ violations.push({
571651
+ message: `Validation rules are not supported for the ${resolvedType.container._type} type`,
571652
+ severity: "fatal"
571653
+ });
571654
+ }
571655
+ return violations;
571656
+ }
571598
571657
  let typeName = resolvedType._type;
571599
571658
  if (resolvedType._type === "primitive") {
571600
571659
  switch (resolvedType.primitive.v1) {
@@ -604313,6 +604372,11 @@ function convertProperties({ properties: properties7, required: required6, bread
604313
604372
  });
604314
604373
  const convertedProperty = propertySchemaConverter.convert();
604315
604374
  if (convertedProperty != null) {
604375
+ const resolvedPropertySchema = context3.resolveMaybeReference({
604376
+ schemaOrReference: propertySchema,
604377
+ breadcrumbs: propertyBreadcrumbs,
604378
+ skipErrorCollector: true
604379
+ });
604316
604380
  convertedProperties.push({
604317
604381
  name: context3.casingsGenerator.generateNameAndWireValue({
604318
604382
  name: propertyName,
@@ -604322,6 +604386,7 @@ function convertProperties({ properties: properties7, required: required6, bread
604322
604386
  docs: propertySchema.description,
604323
604387
  availability: convertedProperty.availability,
604324
604388
  propertyAccess: context3.getPropertyAccess(propertySchema),
604389
+ defaultValue: resolvedPropertySchema?.default,
604325
604390
  v2Examples: convertedProperty.schema?.typeDeclaration?.v2Examples ?? generatePropertyV2Examples({
604326
604391
  propertySchema,
604327
604392
  breadcrumbs: propertyBreadcrumbs,
@@ -606201,6 +606266,7 @@ var AbstractParameterConverter = class extends AbstractConverter {
606201
606266
  const parameterSchemaWithExampleOverride = this.getParameterSchemaWithExampleOverride({
606202
606267
  schema: resolvedParameterSchema
606203
606268
  });
606269
+ const parameterDefaultValue = resolvedParameterSchema?.default;
606204
606270
  switch (this.parameter.in) {
606205
606271
  case "query":
606206
606272
  return {
@@ -606214,6 +606280,7 @@ var AbstractParameterConverter = class extends AbstractConverter {
606214
606280
  valueType: typeReference2 ?? AbstractConverter.OPTIONAL_STRING,
606215
606281
  allowMultiple: this.parameter.explode ?? false,
606216
606282
  clientDefault: void 0,
606283
+ defaultValue: parameterDefaultValue,
606217
606284
  v2Examples: this.convertParameterExamples({
606218
606285
  schema: parameterSchemaWithExampleOverride ?? schema2
606219
606286
  }),
@@ -606234,6 +606301,7 @@ var AbstractParameterConverter = class extends AbstractConverter {
606234
606301
  valueType: typeReference2 ?? AbstractConverter.OPTIONAL_STRING,
606235
606302
  env: void 0,
606236
606303
  clientDefault: void 0,
606304
+ defaultValue: parameterDefaultValue,
606237
606305
  v2Examples: this.convertParameterExamples({
606238
606306
  schema: parameterSchemaWithExampleOverride ?? schema2
606239
606307
  }),
@@ -608573,7 +608641,8 @@ function convertGlobalHeaderOverrides({ globalHeaderOverrides, context: context3
608573
608641
  },
608574
608642
  availability: void 0,
608575
608643
  docs: void 0,
608576
- clientDefault: void 0
608644
+ clientDefault: void 0,
608645
+ defaultValue: void 0
608577
608646
  });
608578
608647
  } else {
608579
608648
  const name2 = headerSchema.name ?? headerKey;
@@ -608590,7 +608659,8 @@ function convertGlobalHeaderOverrides({ globalHeaderOverrides, context: context3
608590
608659
  },
608591
608660
  availability: void 0,
608592
608661
  docs: headerSchema.docs,
608593
- clientDefault: convertDefaultToLiteral2(headerSchema.default)
608662
+ clientDefault: convertDefaultToLiteral2(headerSchema.default),
608663
+ defaultValue: headerSchema.default
608594
608664
  });
608595
608665
  }
608596
608666
  }
@@ -608621,7 +608691,8 @@ function convertGlobalHeadersExtension({ globalHeaders, context: context3 }) {
608621
608691
  v2Examples: header.optional ? void 0 : constructGlobalHeaderExample({ header, context: context3 }),
608622
608692
  availability: void 0,
608623
608693
  docs: void 0,
608624
- clientDefault: convertDefaultToLiteral3(header["x-fern-default"])
608694
+ clientDefault: convertDefaultToLiteral3(header["x-fern-default"]),
608695
+ defaultValue: void 0
608625
608696
  }));
608626
608697
  }
608627
608698
  function constructGlobalHeaderExample({ header, context: context3 }) {
@@ -610267,8 +610338,9 @@ var ResponseBodyConverter = class extends converters_exports.AbstractConverters.
610267
610338
  }
610268
610339
  const headerSchema = resolvedHeader.schema;
610269
610340
  let valueType = AbstractConverter.OPTIONAL_STRING;
610341
+ let resolvedSchema;
610270
610342
  if (headerSchema != null) {
610271
- const resolvedSchema = this.context.resolveMaybeReference({
610343
+ resolvedSchema = this.context.resolveMaybeReference({
610272
610344
  schemaOrReference: headerSchema,
610273
610345
  breadcrumbs: [...this.breadcrumbs, "headers", headerName, "schema"]
610274
610346
  });
@@ -610301,7 +610373,8 @@ var ResponseBodyConverter = class extends converters_exports.AbstractConverters.
610301
610373
  env: void 0,
610302
610374
  v2Examples,
610303
610375
  availability: void 0,
610304
- clientDefault: void 0
610376
+ clientDefault: void 0,
610377
+ defaultValue: resolvedSchema?.default
610305
610378
  });
610306
610379
  }
610307
610380
  return headers2;
@@ -610542,8 +610615,9 @@ var ResponseErrorConverter = class extends converters_exports.AbstractConverters
610542
610615
  }
610543
610616
  const headerSchema = resolvedHeader.schema;
610544
610617
  let valueType = AbstractConverter.OPTIONAL_STRING;
610618
+ let resolvedSchema;
610545
610619
  if (headerSchema != null) {
610546
- const resolvedSchema = this.context.resolveMaybeReference({
610620
+ resolvedSchema = this.context.resolveMaybeReference({
610547
610621
  schemaOrReference: headerSchema,
610548
610622
  breadcrumbs: [...this.breadcrumbs, "headers", headerName, "schema"]
610549
610623
  });
@@ -610576,7 +610650,8 @@ var ResponseErrorConverter = class extends converters_exports.AbstractConverters
610576
610650
  env: void 0,
610577
610651
  v2Examples,
610578
610652
  availability: void 0,
610579
- clientDefault: void 0
610653
+ clientDefault: void 0,
610654
+ defaultValue: resolvedSchema?.default
610580
610655
  });
610581
610656
  }
610582
610657
  return headers2;
@@ -611100,7 +611175,8 @@ var OperationConverter = class _OperationConverter extends AbstractOperationConv
611100
611175
  docs: void 0,
611101
611176
  env: void 0,
611102
611177
  v2Examples: void 0,
611103
- clientDefault: void 0
611178
+ clientDefault: void 0,
611179
+ defaultValue: void 0
611104
611180
  };
611105
611181
  switch (authScheme.type) {
611106
611182
  case "bearer":
@@ -612388,6 +612464,7 @@ var MethodConverter = class extends AbstractConverter {
612388
612464
  wireValue: resolvedParam.name
612389
612465
  }),
612390
612466
  valueType: schema2.type,
612467
+ defaultValue: resolvedParam.schema != null && typeof resolvedParam.schema === "object" ? resolvedParam.schema.default : void 0,
612391
612468
  v2Examples: schema2.schema?.typeDeclaration.v2Examples,
612392
612469
  propertyAccess: void 0
612393
612470
  });
@@ -622565,7 +622642,7 @@ var AccessTokenPosthogManager = class {
622565
622642
  properties: {
622566
622643
  ...event,
622567
622644
  ...event.properties,
622568
- version: "5.7.0",
622645
+ version: "5.7.1-2-gb0f84fcf76c",
622569
622646
  usingAccessToken: true
622570
622647
  }
622571
622648
  });
@@ -622619,7 +622696,7 @@ var UserPosthogManager = class {
622619
622696
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
622620
622697
  event: "CLI",
622621
622698
  properties: {
622622
- version: "5.7.0",
622699
+ version: "5.7.1-2-gb0f84fcf76c",
622623
622700
  ...event,
622624
622701
  ...event.properties,
622625
622702
  usingAccessToken: false,
@@ -810342,7 +810419,7 @@ function convertTypeShape(irType) {
810342
810419
  properties: object23.properties.map((property24) => ({
810343
810420
  description: property24.docs ?? void 0,
810344
810421
  key: FdrAPI_exports.PropertyKey(getWireValue(property24.name)),
810345
- valueType: convertTypeReference3(property24.valueType),
810422
+ valueType: convertTypeReference3(property24.valueType, property24.defaultValue),
810346
810423
  availability: convertIrAvailability(property24.availability),
810347
810424
  propertyAccess: property24.propertyAccess
810348
810425
  })),
@@ -810353,7 +810430,7 @@ function convertTypeShape(irType) {
810353
810430
  const baseProperties = union23.baseProperties.map((baseProperty2) => {
810354
810431
  return {
810355
810432
  key: FdrAPI_exports.PropertyKey(getWireValue(baseProperty2.name)),
810356
- valueType: convertTypeReference3(baseProperty2.valueType),
810433
+ valueType: convertTypeReference3(baseProperty2.valueType, baseProperty2.defaultValue),
810357
810434
  availability: convertIrAvailability(baseProperty2.availability),
810358
810435
  description: baseProperty2.docs,
810359
810436
  propertyAccess: baseProperty2.propertyAccess
@@ -810429,7 +810506,7 @@ function convertTypeShape(irType) {
810429
810506
  }
810430
810507
  });
810431
810508
  }
810432
- function convertTypeReference3(irTypeReference) {
810509
+ function convertTypeReference3(irTypeReference, documentationDefault) {
810433
810510
  return irTypeReference._visit({
810434
810511
  container: (container) => {
810435
810512
  return api_exports.types.ContainerType._visit(container, {
@@ -810454,7 +810531,7 @@ function convertTypeReference3(irTypeReference) {
810454
810531
  return {
810455
810532
  type: "optional",
810456
810533
  itemType: convertTypeReference3(itemType),
810457
- defaultValue: void 0
810534
+ defaultValue: documentationDefault
810458
810535
  };
810459
810536
  },
810460
810537
  nullable: (itemType) => {
@@ -810739,7 +810816,7 @@ function convertWebhookGroup4(webhookGroup) {
810739
810816
  headers: webhook.headers.map((header) => ({
810740
810817
  description: header.docs ?? void 0,
810741
810818
  key: getWireValue(header.name),
810742
- type: convertTypeReference3(header.valueType),
810819
+ type: convertTypeReference3(header.valueType, header.defaultValue),
810743
810820
  availability: convertIrAvailability(header.availability)
810744
810821
  })),
810745
810822
  payload: convertWebhookPayloadWithFileUpload(webhook.payload, webhook.fileUploadPayload),
@@ -810871,20 +810948,20 @@ function convertService(irService, ir11) {
810871
810948
  queryParameters: irEndpoint.queryParameters.map((queryParameter) => ({
810872
810949
  description: queryParameter.docs ?? void 0,
810873
810950
  key: getWireValue(queryParameter.name),
810874
- type: convertTypeReference3(queryParameter.valueType),
810951
+ type: convertTypeReference3(queryParameter.valueType, queryParameter.defaultValue),
810875
810952
  availability: convertIrAvailability(queryParameter.availability),
810876
810953
  explode: queryParameter.explode
810877
810954
  })),
810878
810955
  headers: [...irService.headers, ...irEndpoint.headers].map((header) => ({
810879
810956
  description: header.docs ?? void 0,
810880
810957
  key: getWireValue(header.name),
810881
- type: convertTypeReference3(header.valueType),
810958
+ type: convertTypeReference3(header.valueType, header.defaultValue),
810882
810959
  availability: convertIrAvailability(header.availability)
810883
810960
  })),
810884
810961
  responseHeaders: irEndpoint.responseHeaders?.map((header) => ({
810885
810962
  description: header.docs ?? void 0,
810886
810963
  key: getWireValue(header.name),
810887
- type: convertTypeReference3(header.valueType),
810964
+ type: convertTypeReference3(header.valueType, header.defaultValue),
810888
810965
  availability: convertIrAvailability(header.availability)
810889
810966
  })),
810890
810967
  request: irEndpoint.requestBody != null ? convertRequestBody3(irEndpoint.requestBody) : void 0,
@@ -810980,14 +811057,14 @@ function convertWebSocketChannel(channel3, ir11) {
810980
811057
  },
810981
811058
  headers: channel3.headers.map((header) => ({
810982
811059
  key: getWireValue(header.name),
810983
- type: convertTypeReference3(header.valueType),
811060
+ type: convertTypeReference3(header.valueType, header.defaultValue),
810984
811061
  description: header.docs,
810985
811062
  availability: convertIrAvailability(header.availability)
810986
811063
  })),
810987
811064
  queryParameters: channel3.queryParameters.map((queryParameter) => ({
810988
811065
  description: queryParameter.docs ?? void 0,
810989
811066
  key: getWireValue(queryParameter.name),
810990
- type: convertTypeReference3(queryParameter.valueType),
811067
+ type: convertTypeReference3(queryParameter.valueType, queryParameter.defaultValue),
810991
811068
  availability: convertIrAvailability(queryParameter.availability),
810992
811069
  explode: queryParameter.explode
810993
811070
  })),
@@ -811193,7 +811270,7 @@ function convertRequestBody3(irRequest) {
811193
811270
  properties: inlinedRequestBody.properties.map((property24) => ({
811194
811271
  description: property24.docs ?? void 0,
811195
811272
  key: FdrAPI_exports.PropertyKey(getWireValue(property24.name)),
811196
- valueType: convertTypeReference3(property24.valueType),
811273
+ valueType: convertTypeReference3(property24.valueType, property24.defaultValue),
811197
811274
  availability: convertIrAvailability(property24.availability),
811198
811275
  propertyAccess: property24.propertyAccess
811199
811276
  })),
@@ -811251,7 +811328,7 @@ function convertRequestBody3(irRequest) {
811251
811328
  bodyProperty: (bodyProperty) => ({
811252
811329
  type: "bodyProperty",
811253
811330
  key: FdrAPI_exports.PropertyKey(getWireValue(bodyProperty.name)),
811254
- valueType: convertTypeReference3(bodyProperty.valueType),
811331
+ valueType: convertTypeReference3(bodyProperty.valueType, bodyProperty.defaultValue),
811255
811332
  contentType: bodyProperty.contentType,
811256
811333
  description: bodyProperty.docs ?? void 0,
811257
811334
  availability: convertIrAvailability(bodyProperty.availability),
@@ -811376,7 +811453,7 @@ function convertResponseErrorsV2(irResponseErrors, ir11) {
811376
811453
  headers: errorDeclaration.headers != null && errorDeclaration.headers.length > 0 ? errorDeclaration.headers.map((header) => ({
811377
811454
  description: header.docs ?? void 0,
811378
811455
  key: getWireValue(header.name),
811379
- type: convertTypeReference3(header.valueType),
811456
+ type: convertTypeReference3(header.valueType, header.defaultValue),
811380
811457
  availability: convertIrAvailability(header.availability)
811381
811458
  })) : void 0
811382
811459
  });
@@ -811432,7 +811509,7 @@ function convertResponseErrorsV2(irResponseErrors, ir11) {
811432
811509
  headers: errorDeclaration.headers != null && errorDeclaration.headers.length > 0 ? errorDeclaration.headers.map((header) => ({
811433
811510
  description: header.docs ?? void 0,
811434
811511
  key: getWireValue(header.name),
811435
- type: convertTypeReference3(header.valueType),
811512
+ type: convertTypeReference3(header.valueType, header.defaultValue),
811436
811513
  availability: convertIrAvailability(header.availability)
811437
811514
  })) : void 0
811438
811515
  });
@@ -811818,7 +811895,7 @@ function convertWebhookPayloadWithFileUpload(irWebhookPayload, fileUploadPayload
811818
811895
  bodyProperty: (bodyProperty) => ({
811819
811896
  type: "bodyProperty",
811820
811897
  key: FdrAPI_exports.PropertyKey(getWireValue(bodyProperty.name)),
811821
- valueType: convertTypeReference3(bodyProperty.valueType),
811898
+ valueType: convertTypeReference3(bodyProperty.valueType, bodyProperty.defaultValue),
811822
811899
  contentType: bodyProperty.contentType,
811823
811900
  description: bodyProperty.docs ?? void 0,
811824
811901
  availability: convertIrAvailability(bodyProperty.availability),
@@ -811976,7 +812053,7 @@ function convertIrToFdrApi({ ir: ir11, snippetsConfig, playgroundConfig, graphql
811976
812053
  availability: convertIrAvailability(header.availability),
811977
812054
  description: header.docs ?? void 0,
811978
812055
  key: getWireValue(header.name),
811979
- type: convertTypeReference3(header.valueType)
812056
+ type: convertTypeReference3(header.valueType, header.defaultValue)
811980
812057
  })),
811981
812058
  navigation: void 0
811982
812059
  };
@@ -846979,7 +847056,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
846979
847056
  var LOGS_FOLDER_NAME = "logs";
846980
847057
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
846981
847058
  function getCliSource() {
846982
- const version7 = "5.7.0";
847059
+ const version7 = "5.7.1-2-gb0f84fcf76c";
846983
847060
  return `cli@${version7}`;
846984
847061
  }
846985
847062
  var DebugLogger = class {
@@ -859551,7 +859628,7 @@ var LegacyDocsPublisher = class {
859551
859628
  previewId,
859552
859629
  disableTemplates: void 0,
859553
859630
  skipUpload,
859554
- cliVersion: "5.7.0",
859631
+ cliVersion: "5.7.1-2-gb0f84fcf76c",
859555
859632
  loginCommand: "fern auth login"
859556
859633
  });
859557
859634
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -930075,6 +930152,7 @@ function convertFields({ fields, breadcrumbs, context: context3, sourceCodeInfoP
930075
930152
  docs: context3.getCommentForPath([...sourceCodeInfoPath, PATH_FIELD_NUMBERS.MESSAGE.FIELD, index3]),
930076
930153
  availability: convertedField.availability,
930077
930154
  propertyAccess: void 0,
930155
+ defaultValue: void 0,
930078
930156
  v2Examples: void 0
930079
930157
  };
930080
930158
  const hasOneofIndex = Object.hasOwn(field5, "oneofIndex");
@@ -930245,6 +930323,7 @@ var MessageConverter = class extends AbstractConverter {
930245
930323
  docs: void 0,
930246
930324
  availability: convertedOneOfField.availability,
930247
930325
  propertyAccess: void 0,
930326
+ defaultValue: void 0,
930248
930327
  v2Examples: void 0
930249
930328
  });
930250
930329
  inlinedTypes = {
@@ -933974,7 +934053,7 @@ var CliContext = class _CliContext {
933974
934053
  if (false) {
933975
934054
  this.logger.error("CLI_VERSION is not defined");
933976
934055
  }
933977
- return "5.7.0";
934056
+ return "5.7.1-2-gb0f84fcf76c";
933978
934057
  }
933979
934058
  getCliName() {
933980
934059
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.7.0",
2
+ "version": "5.7.1-2-gb0f84fcf76c",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",