fern-api 0.15.0-rc81 → 0.15.0-rc83

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/bundle.cjs +191 -80
  2. package/package.json +1 -1
package/bundle.cjs CHANGED
@@ -349161,10 +349161,10 @@ var require_SchemaWithExample = __commonJS({
349161
349161
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
349162
349162
  var SchemaWithExample_exports = {};
349163
349163
  __export2(SchemaWithExample_exports, {
349164
- SchemaWithExample: () => SchemaWithExample10
349164
+ SchemaWithExample: () => SchemaWithExample11
349165
349165
  });
349166
349166
  module2.exports = __toCommonJS2(SchemaWithExample_exports);
349167
- var SchemaWithExample10 = {
349167
+ var SchemaWithExample11 = {
349168
349168
  primitive: (value) => ({
349169
349169
  ...value,
349170
349170
  type: "primitive"
@@ -349579,10 +349579,10 @@ var require_PrimitiveSchemaValueWithExample = __commonJS({
349579
349579
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
349580
349580
  var PrimitiveSchemaValueWithExample_exports = {};
349581
349581
  __export2(PrimitiveSchemaValueWithExample_exports, {
349582
- PrimitiveSchemaValueWithExample: () => PrimitiveSchemaValueWithExample5
349582
+ PrimitiveSchemaValueWithExample: () => PrimitiveSchemaValueWithExample6
349583
349583
  });
349584
349584
  module2.exports = __toCommonJS2(PrimitiveSchemaValueWithExample_exports);
349585
- var PrimitiveSchemaValueWithExample5 = {
349585
+ var PrimitiveSchemaValueWithExample6 = {
349586
349586
  int: (value) => ({
349587
349587
  ...value,
349588
349588
  type: "int"
@@ -707949,7 +707949,7 @@ var AccessTokenPosthogManager = class {
707949
707949
  properties: {
707950
707950
  ...event,
707951
707951
  ...event.properties,
707952
- version: "0.15.0-rc81",
707952
+ version: "0.15.0-rc83",
707953
707953
  usingAccessToken: true
707954
707954
  }
707955
707955
  });
@@ -708011,7 +708011,7 @@ var UserPosthogManager = class {
708011
708011
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
708012
708012
  event: "CLI",
708013
708013
  properties: {
708014
- version: "0.15.0-rc81",
708014
+ version: "0.15.0-rc83",
708015
708015
  ...event,
708016
708016
  ...event.properties
708017
708017
  }
@@ -721576,6 +721576,7 @@ var FernOpenAPIExtension = {
721576
721576
  BOOLEAN_LITERAL: "x-fern-boolean-literal",
721577
721577
  SERVER_NAME_V1: "x-name",
721578
721578
  SERVER_NAME_V2: "x-fern-server-name",
721579
+ TYPE_DEFINITION: "x-fern-type",
721579
721580
  STREAMING: "x-fern-streaming",
721580
721581
  WEBHOOK: "x-fern-webhook",
721581
721582
  ASYNC_CONFIG: "x-fern-async-config",
@@ -721644,7 +721645,7 @@ function isReferenceObject(parameter) {
721644
721645
 
721645
721646
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/convertSchemas.js
721646
721647
  var import_finalIr8 = __toESM(require_finalIr());
721647
- var import_parseIr9 = __toESM(require_parseIr());
721648
+ var import_parseIr10 = __toESM(require_parseIr());
721648
721649
 
721649
721650
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/extensions/extensions.js
721650
721651
  var OpenAPIExtension = {
@@ -721658,6 +721659,112 @@ function getFernEnum(schema2) {
721658
721659
  return getExtension(schema2, FernOpenAPIExtension.FERN_ENUM);
721659
721660
  }
721660
721661
 
721662
+ // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/extensions/getFernTypeExtension.js
721663
+ var import_parseIr = __toESM(require_parseIr());
721664
+ function getFernTypeExtension({ schema: schema2, description }) {
721665
+ const typeDefinition = getExtension(schema2, FernOpenAPIExtension.TYPE_DEFINITION);
721666
+ if (typeDefinition == null) {
721667
+ return;
721668
+ }
721669
+ return recursivelyVisitRawTypeReference(typeDefinition, {
721670
+ primitive: (primitive) => {
721671
+ switch (primitive) {
721672
+ case "BASE_64":
721673
+ return import_parseIr.SchemaWithExample.primitive({
721674
+ description,
721675
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.base64({
721676
+ example: void 0
721677
+ })
721678
+ });
721679
+ case "BOOLEAN":
721680
+ return import_parseIr.SchemaWithExample.primitive({
721681
+ description,
721682
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.boolean({
721683
+ example: void 0
721684
+ })
721685
+ });
721686
+ case "DATE":
721687
+ return import_parseIr.SchemaWithExample.primitive({
721688
+ description,
721689
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.date({
721690
+ example: void 0
721691
+ })
721692
+ });
721693
+ case "DATE_TIME":
721694
+ return import_parseIr.SchemaWithExample.primitive({
721695
+ description,
721696
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.datetime({
721697
+ example: void 0
721698
+ })
721699
+ });
721700
+ case "DOUBLE":
721701
+ return import_parseIr.SchemaWithExample.primitive({
721702
+ description,
721703
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.double({
721704
+ example: void 0
721705
+ })
721706
+ });
721707
+ case "INTEGER":
721708
+ return import_parseIr.SchemaWithExample.primitive({
721709
+ description,
721710
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.int({
721711
+ example: void 0
721712
+ })
721713
+ });
721714
+ case "LONG":
721715
+ return import_parseIr.SchemaWithExample.primitive({
721716
+ description,
721717
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.int64({
721718
+ example: void 0
721719
+ })
721720
+ });
721721
+ case "STRING":
721722
+ case "UUID":
721723
+ return import_parseIr.SchemaWithExample.primitive({
721724
+ description,
721725
+ schema: import_parseIr.PrimitiveSchemaValueWithExample.string({
721726
+ maxLength: void 0,
721727
+ minLength: void 0,
721728
+ example: void 0
721729
+ })
721730
+ });
721731
+ default:
721732
+ assertNever(primitive);
721733
+ }
721734
+ },
721735
+ unknown: () => {
721736
+ return import_parseIr.SchemaWithExample.unknown({
721737
+ example: void 0,
721738
+ description
721739
+ });
721740
+ },
721741
+ map: ({ keyType, valueType }) => (keyType == null ? void 0 : keyType.type) === "primitive" && valueType != null ? import_parseIr.SchemaWithExample.map({
721742
+ key: keyType,
721743
+ value: valueType,
721744
+ description
721745
+ }) : void 0,
721746
+ list: (itemType) => itemType != null ? import_parseIr.SchemaWithExample.array({
721747
+ value: itemType,
721748
+ description
721749
+ }) : void 0,
721750
+ optional: (itemType) => itemType != null ? import_parseIr.SchemaWithExample.optional({
721751
+ value: itemType,
721752
+ description
721753
+ }) : void 0,
721754
+ set: (itemType) => itemType != null ? import_parseIr.SchemaWithExample.array({
721755
+ value: itemType,
721756
+ description
721757
+ }) : void 0,
721758
+ literal: (literal2) => import_parseIr.SchemaWithExample.literal({
721759
+ value: literal2,
721760
+ description
721761
+ }),
721762
+ named: () => {
721763
+ return void 0;
721764
+ }
721765
+ });
721766
+ }
721767
+
721661
721768
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/utils/getSchemaName.js
721662
721769
  function getGeneratedTypeName(breadcrumbs) {
721663
721770
  const underscoreDelimeted = breadcrumbs.join("_");
@@ -721689,7 +721796,7 @@ function getExamplesString(schema2) {
721689
721796
  }
721690
721797
 
721691
721798
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertAdditionalProperties.js
721692
- var import_parseIr = __toESM(require_parseIr());
721799
+ var import_parseIr2 = __toESM(require_parseIr());
721693
721800
  function convertAdditionalProperties({ breadcrumbs, additionalProperties, description, wrapAsNullable, context }) {
721694
721801
  if (typeof additionalProperties === "boolean" || isAdditionalPropertiesEmptyDictionary(additionalProperties)) {
721695
721802
  return wrapMap({
@@ -721697,13 +721804,13 @@ function convertAdditionalProperties({ breadcrumbs, additionalProperties, descri
721697
721804
  description,
721698
721805
  keySchema: {
721699
721806
  description: void 0,
721700
- schema: import_parseIr.PrimitiveSchemaValueWithExample.string({
721807
+ schema: import_parseIr2.PrimitiveSchemaValueWithExample.string({
721701
721808
  minLength: void 0,
721702
721809
  maxLength: void 0,
721703
721810
  example: void 0
721704
721811
  })
721705
721812
  },
721706
- valueSchema: import_parseIr.SchemaWithExample.unknown({
721813
+ valueSchema: import_parseIr2.SchemaWithExample.unknown({
721707
721814
  description: void 0,
721708
721815
  example: void 0
721709
721816
  })
@@ -721714,7 +721821,7 @@ function convertAdditionalProperties({ breadcrumbs, additionalProperties, descri
721714
721821
  description,
721715
721822
  keySchema: {
721716
721823
  description: void 0,
721717
- schema: import_parseIr.PrimitiveSchemaValueWithExample.string({
721824
+ schema: import_parseIr2.PrimitiveSchemaValueWithExample.string({
721718
721825
  minLength: void 0,
721719
721826
  maxLength: void 0,
721720
721827
  example: void 0
@@ -721728,8 +721835,8 @@ function isAdditionalPropertiesEmptyDictionary(additionalProperties) {
721728
721835
  }
721729
721836
  function wrapMap({ keySchema, valueSchema, wrapAsNullable, description }) {
721730
721837
  if (wrapAsNullable) {
721731
- return import_parseIr.SchemaWithExample.nullable({
721732
- value: import_parseIr.SchemaWithExample.map({
721838
+ return import_parseIr2.SchemaWithExample.nullable({
721839
+ value: import_parseIr2.SchemaWithExample.map({
721733
721840
  description,
721734
721841
  key: keySchema,
721735
721842
  value: valueSchema
@@ -721737,7 +721844,7 @@ function wrapMap({ keySchema, valueSchema, wrapAsNullable, description }) {
721737
721844
  description
721738
721845
  });
721739
721846
  }
721740
- return import_parseIr.SchemaWithExample.map({
721847
+ return import_parseIr2.SchemaWithExample.map({
721741
721848
  description,
721742
721849
  key: keySchema,
721743
721850
  value: valueSchema
@@ -721745,9 +721852,9 @@ function wrapMap({ keySchema, valueSchema, wrapAsNullable, description }) {
721745
721852
  }
721746
721853
 
721747
721854
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertArray.js
721748
- var import_parseIr2 = __toESM(require_parseIr());
721855
+ var import_parseIr3 = __toESM(require_parseIr());
721749
721856
  function convertArray({ breadcrumbs, item, description, wrapAsNullable, context }) {
721750
- const itemSchema = item == null ? import_parseIr2.SchemaWithExample.unknown({ description: void 0, example: void 0 }) : convertSchema(item, false, context, [...breadcrumbs, "Item"]);
721857
+ const itemSchema = item == null ? import_parseIr3.SchemaWithExample.unknown({ description: void 0, example: void 0 }) : convertSchema(item, false, context, [...breadcrumbs, "Item"]);
721751
721858
  return wrapArray({
721752
721859
  itemSchema,
721753
721860
  wrapAsNullable,
@@ -721756,22 +721863,22 @@ function convertArray({ breadcrumbs, item, description, wrapAsNullable, context
721756
721863
  }
721757
721864
  function wrapArray({ itemSchema, wrapAsNullable, description }) {
721758
721865
  if (wrapAsNullable) {
721759
- return import_parseIr2.SchemaWithExample.nullable({
721760
- value: import_parseIr2.SchemaWithExample.array({
721866
+ return import_parseIr3.SchemaWithExample.nullable({
721867
+ value: import_parseIr3.SchemaWithExample.array({
721761
721868
  value: itemSchema,
721762
721869
  description
721763
721870
  }),
721764
721871
  description
721765
721872
  });
721766
721873
  }
721767
- return import_parseIr2.SchemaWithExample.array({
721874
+ return import_parseIr3.SchemaWithExample.array({
721768
721875
  value: itemSchema,
721769
721876
  description
721770
721877
  });
721771
721878
  }
721772
721879
 
721773
721880
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertDiscriminatedOneOf.js
721774
- var import_parseIr3 = __toESM(require_parseIr());
721881
+ var import_parseIr4 = __toESM(require_parseIr());
721775
721882
  function convertDiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, properties, description, required, wrapAsNullable, discriminator, context }) {
721776
721883
  const discriminant = discriminator.propertyName;
721777
721884
  const unionSubTypes = Object.fromEntries(Object.entries(discriminator.mapping ?? {}).map(([discriminantValue, schema2]) => {
@@ -721836,8 +721943,8 @@ function convertDiscriminatedOneOfWithVariants({ nameOverride, generatedName, br
721836
721943
  }
721837
721944
  function wrapDiscriminantedOneOf({ nameOverride, generatedName, wrapAsNullable, properties, description, discriminant, subtypes }) {
721838
721945
  if (wrapAsNullable) {
721839
- return import_parseIr3.SchemaWithExample.nullable({
721840
- value: import_parseIr3.SchemaWithExample.oneOf({
721946
+ return import_parseIr4.SchemaWithExample.nullable({
721947
+ value: import_parseIr4.SchemaWithExample.oneOf({
721841
721948
  type: "discriminated",
721842
721949
  description,
721843
721950
  discriminantProperty: discriminant,
@@ -721849,7 +721956,7 @@ function wrapDiscriminantedOneOf({ nameOverride, generatedName, wrapAsNullable,
721849
721956
  description
721850
721957
  });
721851
721958
  }
721852
- return import_parseIr3.SchemaWithExample.oneOf({
721959
+ return import_parseIr4.SchemaWithExample.oneOf({
721853
721960
  type: "discriminated",
721854
721961
  description,
721855
721962
  discriminantProperty: discriminant,
@@ -721861,7 +721968,7 @@ function wrapDiscriminantedOneOf({ nameOverride, generatedName, wrapAsNullable,
721861
721968
  }
721862
721969
 
721863
721970
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertEnum.js
721864
- var import_parseIr4 = __toESM(require_parseIr());
721971
+ var import_parseIr5 = __toESM(require_parseIr());
721865
721972
  var VALID_NAME_REGEX = new RegExp("^[a-zA-Z][a-zA-Z0-9_]*$");
721866
721973
  function convertEnum({ nameOverride, generatedName, fernEnum, enumVarNames, enumValues, description, wrapAsNullable }) {
721867
721974
  const strippedEnumVarNames = stripCommonPrefix(enumVarNames ?? []);
@@ -721887,8 +721994,8 @@ function convertEnum({ nameOverride, generatedName, fernEnum, enumVarNames, enum
721887
721994
  }
721888
721995
  function wrapEnum({ wrapAsNullable, nameOverride, generatedName, values: values3, description }) {
721889
721996
  if (wrapAsNullable) {
721890
- return import_parseIr4.SchemaWithExample.nullable({
721891
- value: import_parseIr4.SchemaWithExample.enum({
721997
+ return import_parseIr5.SchemaWithExample.nullable({
721998
+ value: import_parseIr5.SchemaWithExample.enum({
721892
721999
  nameOverride,
721893
722000
  generatedName,
721894
722001
  values: values3,
@@ -721898,7 +722005,7 @@ function wrapEnum({ wrapAsNullable, nameOverride, generatedName, values: values3
721898
722005
  description
721899
722006
  });
721900
722007
  }
721901
- return import_parseIr4.SchemaWithExample.enum({
722008
+ return import_parseIr5.SchemaWithExample.enum({
721902
722009
  nameOverride,
721903
722010
  generatedName,
721904
722011
  values: values3,
@@ -721995,29 +722102,29 @@ function convertNumberToSnakeCase(number2) {
721995
722102
 
721996
722103
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertLiteral.js
721997
722104
  var import_finalIr6 = __toESM(require_finalIr());
721998
- var import_parseIr5 = __toESM(require_parseIr());
722105
+ var import_parseIr6 = __toESM(require_parseIr());
721999
722106
  function convertLiteral({ wrapAsNullable, value, description }) {
722000
722107
  if (wrapAsNullable) {
722001
- return import_parseIr5.SchemaWithExample.nullable({
722002
- value: import_parseIr5.SchemaWithExample.literal({
722108
+ return import_parseIr6.SchemaWithExample.nullable({
722109
+ value: import_parseIr6.SchemaWithExample.literal({
722003
722110
  value: import_finalIr6.LiteralSchemaValue.string(value),
722004
722111
  description
722005
722112
  }),
722006
722113
  description
722007
722114
  });
722008
722115
  }
722009
- return import_parseIr5.SchemaWithExample.literal({
722116
+ return import_parseIr6.SchemaWithExample.literal({
722010
722117
  value: import_finalIr6.LiteralSchemaValue.string(value),
722011
722118
  description
722012
722119
  });
722013
722120
  }
722014
722121
 
722015
722122
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertNumber.js
722016
- var import_parseIr6 = __toESM(require_parseIr());
722123
+ var import_parseIr7 = __toESM(require_parseIr());
722017
722124
  function convertNumber({ format: format4, description, wrapAsNullable, example }) {
722018
722125
  if (format4 == null || format4 === "double") {
722019
722126
  return wrapPrimitive({
722020
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.double({
722127
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.double({
722021
722128
  example
722022
722129
  }),
722023
722130
  wrapAsNullable,
@@ -722025,7 +722132,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722025
722132
  });
722026
722133
  } else if (format4 === "float") {
722027
722134
  return wrapPrimitive({
722028
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.float({
722135
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.float({
722029
722136
  example
722030
722137
  }),
722031
722138
  wrapAsNullable,
@@ -722033,7 +722140,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722033
722140
  });
722034
722141
  } else if (format4 === "int32") {
722035
722142
  return wrapPrimitive({
722036
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.int({
722143
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.int({
722037
722144
  example
722038
722145
  }),
722039
722146
  wrapAsNullable,
@@ -722041,7 +722148,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722041
722148
  });
722042
722149
  } else if (format4 === "int64") {
722043
722150
  return wrapPrimitive({
722044
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.int64({
722151
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.int64({
722045
722152
  example
722046
722153
  }),
722047
722154
  wrapAsNullable,
@@ -722049,7 +722156,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722049
722156
  });
722050
722157
  } else if (format4 === "time-delta") {
722051
722158
  return wrapPrimitive({
722052
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.float({
722159
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.float({
722053
722160
  example
722054
722161
  }),
722055
722162
  wrapAsNullable,
@@ -722057,7 +722164,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722057
722164
  });
722058
722165
  }
722059
722166
  return wrapPrimitive({
722060
- primitive: import_parseIr6.PrimitiveSchemaValueWithExample.float({
722167
+ primitive: import_parseIr7.PrimitiveSchemaValueWithExample.float({
722061
722168
  example
722062
722169
  }),
722063
722170
  wrapAsNullable,
@@ -722066,7 +722173,7 @@ function convertNumber({ format: format4, description, wrapAsNullable, example }
722066
722173
  }
722067
722174
 
722068
722175
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertObject.js
722069
- var import_parseIr7 = __toESM(require_parseIr());
722176
+ var import_parseIr8 = __toESM(require_parseIr());
722070
722177
 
722071
722178
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/utils/convertSchemaWithExampleToSchema.js
722072
722179
  var import_finalIr7 = __toESM(require_finalIr());
@@ -722331,7 +722438,7 @@ function convertObject2({ nameOverride, generatedName, breadcrumbs, properties,
722331
722438
  }
722332
722439
  const convertedProperties = Object.entries(propertiesToConvert).map(([propertyName, propertySchema]) => {
722333
722440
  const isRequired = allRequired.includes(propertyName);
722334
- const schema2 = isRequired ? convertSchema(propertySchema, false, context, [...breadcrumbs, propertyName]) : import_parseIr7.SchemaWithExample.optional({
722441
+ const schema2 = isRequired ? convertSchema(propertySchema, false, context, [...breadcrumbs, propertyName]) : import_parseIr8.SchemaWithExample.optional({
722335
722442
  description: void 0,
722336
722443
  value: convertSchema(propertySchema, false, context, [...breadcrumbs, propertyName])
722337
722444
  });
@@ -722365,8 +722472,8 @@ function convertObject2({ nameOverride, generatedName, breadcrumbs, properties,
722365
722472
  }
722366
722473
  function wrapObject({ nameOverride, generatedName, wrapAsNullable, properties, description, allOf, allOfPropertyConflicts }) {
722367
722474
  if (wrapAsNullable) {
722368
- return import_parseIr7.SchemaWithExample.nullable({
722369
- value: import_parseIr7.SchemaWithExample.object({
722475
+ return import_parseIr8.SchemaWithExample.nullable({
722476
+ value: import_parseIr8.SchemaWithExample.object({
722370
722477
  description,
722371
722478
  properties,
722372
722479
  nameOverride,
@@ -722377,7 +722484,7 @@ function wrapObject({ nameOverride, generatedName, wrapAsNullable, properties, d
722377
722484
  description
722378
722485
  });
722379
722486
  }
722380
- return import_parseIr7.SchemaWithExample.object({
722487
+ return import_parseIr8.SchemaWithExample.object({
722381
722488
  description,
722382
722489
  properties,
722383
722490
  nameOverride,
@@ -722406,7 +722513,7 @@ function getAllProperties2({ schema: schema2, context, breadcrumbs }) {
722406
722513
  }
722407
722514
 
722408
722515
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/schema/convertUndiscriminatedOneOf.js
722409
- var import_parseIr8 = __toESM(require_parseIr());
722516
+ var import_parseIr9 = __toESM(require_parseIr());
722410
722517
  function convertUndiscriminatedOneOf({ nameOverride, generatedName, breadcrumbs, description, wrapAsNullable, context, subtypes }) {
722411
722518
  const subtypePrefixes = getUniqueSubTypeNames({ schemas: subtypes });
722412
722519
  const convertedSubtypes = subtypes.map((schema2, index2) => {
@@ -722508,8 +722615,8 @@ function getUniqueSubTypeNames({ schemas }) {
722508
722615
  }
722509
722616
  function wrapUndiscriminantedOneOf({ nameOverride, generatedName, wrapAsNullable, description, subtypes }) {
722510
722617
  if (wrapAsNullable) {
722511
- return import_parseIr8.SchemaWithExample.nullable({
722512
- value: import_parseIr8.SchemaWithExample.oneOf({
722618
+ return import_parseIr9.SchemaWithExample.nullable({
722619
+ value: import_parseIr9.SchemaWithExample.oneOf({
722513
722620
  type: "undisciminated",
722514
722621
  description,
722515
722622
  nameOverride,
@@ -722519,7 +722626,7 @@ function wrapUndiscriminantedOneOf({ nameOverride, generatedName, wrapAsNullable
722519
722626
  description
722520
722627
  });
722521
722628
  }
722522
- return import_parseIr8.SchemaWithExample.oneOf({
722629
+ return import_parseIr9.SchemaWithExample.oneOf({
722523
722630
  type: "undisciminated",
722524
722631
  description,
722525
722632
  nameOverride,
@@ -722543,9 +722650,9 @@ function convertSchema(schema2, wrapAsNullable, context, breadcrumbs, referenced
722543
722650
  }
722544
722651
  }
722545
722652
  function convertReferenceObject(schema2, wrapAsNullable, context, breadcrumbs) {
722546
- const referenceSchema = schema2.$ref.includes("properties") ? convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, breadcrumbs, /* @__PURE__ */ new Set()) : import_parseIr9.SchemaWithExample.reference(convertToReferencedSchema(schema2, breadcrumbs));
722653
+ const referenceSchema = schema2.$ref.includes("properties") ? convertSchemaObject(context.resolveSchemaReference(schema2), wrapAsNullable, context, breadcrumbs, /* @__PURE__ */ new Set()) : import_parseIr10.SchemaWithExample.reference(convertToReferencedSchema(schema2, breadcrumbs));
722547
722654
  if (wrapAsNullable) {
722548
- return import_parseIr9.SchemaWithExample.nullable({
722655
+ return import_parseIr10.SchemaWithExample.nullable({
722549
722656
  value: referenceSchema,
722550
722657
  description: void 0
722551
722658
  });
@@ -722557,13 +722664,17 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722557
722664
  const nameOverride = getExtension(schema2, FernOpenAPIExtension.TYPE_NAME);
722558
722665
  const generatedName = getGeneratedTypeName(breadcrumbs);
722559
722666
  const description = schema2.description;
722667
+ const fernSchema = getFernTypeExtension({ schema: schema2, description });
722668
+ if (fernSchema != null) {
722669
+ return fernSchema;
722670
+ }
722560
722671
  if (!wrapAsNullable && schema2.nullable === true) {
722561
722672
  return convertSchemaObject(schema2, true, context, breadcrumbs);
722562
722673
  }
722563
722674
  if (schema2.enum != null) {
722564
722675
  if (!isListOfStrings(schema2.enum)) {
722565
722676
  return wrapPrimitive({
722566
- primitive: import_parseIr9.PrimitiveSchemaValueWithExample.string({
722677
+ primitive: import_parseIr10.PrimitiveSchemaValueWithExample.string({
722567
722678
  minLength: void 0,
722568
722679
  maxLength: void 0,
722569
722680
  example: getExamplesString(schema2)
@@ -722593,7 +722704,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722593
722704
  const firstElement = schema2.type[0];
722594
722705
  const secondElement = schema2.type[1];
722595
722706
  if (firstElement === "null") {
722596
- return import_parseIr9.SchemaWithExample.nullable({
722707
+ return import_parseIr10.SchemaWithExample.nullable({
722597
722708
  value: convertSchemaObject({
722598
722709
  ...schema2,
722599
722710
  type: secondElement
@@ -722601,7 +722712,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722601
722712
  description: schema2.description
722602
722713
  });
722603
722714
  } else if (secondElement === "null") {
722604
- return import_parseIr9.SchemaWithExample.nullable({
722715
+ return import_parseIr10.SchemaWithExample.nullable({
722605
722716
  value: convertSchemaObject({
722606
722717
  ...schema2,
722607
722718
  type: firstElement
@@ -722620,7 +722731,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722620
722731
  });
722621
722732
  }
722622
722733
  return wrapPrimitive({
722623
- primitive: import_parseIr9.PrimitiveSchemaValueWithExample.boolean({
722734
+ primitive: import_parseIr10.PrimitiveSchemaValueWithExample.boolean({
722624
722735
  example: getExampleAsBoolean(schema2)
722625
722736
  }),
722626
722737
  wrapAsNullable,
@@ -722637,7 +722748,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722637
722748
  }
722638
722749
  if (schema2 === "integer" || schema2.type === "integer") {
722639
722750
  return wrapPrimitive({
722640
- primitive: import_parseIr9.PrimitiveSchemaValueWithExample.int({
722751
+ primitive: import_parseIr10.PrimitiveSchemaValueWithExample.int({
722641
722752
  example: getExampleAsNumber(schema2)
722642
722753
  }),
722643
722754
  wrapAsNullable,
@@ -722647,7 +722758,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722647
722758
  if (schema2 === "string" || schema2.type === "string") {
722648
722759
  if (schema2.format === "date-time") {
722649
722760
  return wrapPrimitive({
722650
- primitive: import_parseIr9.PrimitiveSchemaValueWithExample.datetime({
722761
+ primitive: import_parseIr10.PrimitiveSchemaValueWithExample.datetime({
722651
722762
  example: getExamplesString(schema2)
722652
722763
  }),
722653
722764
  wrapAsNullable,
@@ -722663,7 +722774,7 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722663
722774
  });
722664
722775
  }
722665
722776
  return wrapPrimitive({
722666
- primitive: import_parseIr9.PrimitiveSchemaValueWithExample.string({
722777
+ primitive: import_parseIr10.PrimitiveSchemaValueWithExample.string({
722667
722778
  maxLength: schema2.maxLength,
722668
722779
  minLength: schema2.minLength,
722669
722780
  example: getExamplesString(schema2)
@@ -722825,17 +722936,17 @@ function convertSchemaObject(schema2, wrapAsNullable, context, breadcrumbs, prop
722825
722936
  wrapAsNullable,
722826
722937
  keySchema: {
722827
722938
  description: void 0,
722828
- schema: import_parseIr9.PrimitiveSchemaValueWithExample.string({
722939
+ schema: import_parseIr10.PrimitiveSchemaValueWithExample.string({
722829
722940
  minLength: void 0,
722830
722941
  maxLength: void 0,
722831
722942
  example: void 0
722832
722943
  })
722833
722944
  },
722834
- valueSchema: import_parseIr9.SchemaWithExample.unknown({ description: void 0, example: void 0 })
722945
+ valueSchema: import_parseIr10.SchemaWithExample.unknown({ description: void 0, example: void 0 })
722835
722946
  });
722836
722947
  }
722837
722948
  if (schema2.type == null) {
722838
- return import_parseIr9.SchemaWithExample.unknown({
722949
+ return import_parseIr10.SchemaWithExample.unknown({
722839
722950
  description,
722840
722951
  example: void 0
722841
722952
  });
@@ -722878,14 +722989,14 @@ function maybeInjectDescription(schema2, description) {
722878
722989
  description
722879
722990
  });
722880
722991
  } else if (schema2.type === "optional" && schema2.value.type === "reference") {
722881
- return import_parseIr9.SchemaWithExample.optional({
722992
+ return import_parseIr10.SchemaWithExample.optional({
722882
722993
  value: import_finalIr8.Schema.reference({
722883
722994
  ...schema2.value
722884
722995
  }),
722885
722996
  description
722886
722997
  });
722887
722998
  } else if (schema2.type === "nullable" && schema2.value.type === "reference") {
722888
- return import_parseIr9.SchemaWithExample.nullable({
722999
+ return import_parseIr10.SchemaWithExample.nullable({
722889
723000
  value: import_finalIr8.Schema.reference({
722890
723001
  ...schema2.value
722891
723002
  }),
@@ -722917,30 +723028,30 @@ function isAllOfElementEmpty(schema2) {
722917
723028
  }
722918
723029
  function wrapLiteral({ literal: literal2, wrapAsNullable, description }) {
722919
723030
  if (wrapAsNullable) {
722920
- return import_parseIr9.SchemaWithExample.nullable({
722921
- value: import_parseIr9.SchemaWithExample.literal({
723031
+ return import_parseIr10.SchemaWithExample.nullable({
723032
+ value: import_parseIr10.SchemaWithExample.literal({
722922
723033
  value: literal2,
722923
723034
  description
722924
723035
  }),
722925
723036
  description
722926
723037
  });
722927
723038
  }
722928
- return import_parseIr9.SchemaWithExample.literal({
723039
+ return import_parseIr10.SchemaWithExample.literal({
722929
723040
  value: literal2,
722930
723041
  description
722931
723042
  });
722932
723043
  }
722933
723044
  function wrapPrimitive({ primitive, wrapAsNullable, description }) {
722934
723045
  if (wrapAsNullable) {
722935
- return import_parseIr9.SchemaWithExample.nullable({
722936
- value: import_parseIr9.SchemaWithExample.primitive({
723046
+ return import_parseIr10.SchemaWithExample.nullable({
723047
+ value: import_parseIr10.SchemaWithExample.primitive({
722937
723048
  schema: primitive,
722938
723049
  description
722939
723050
  }),
722940
723051
  description
722941
723052
  });
722942
723053
  }
722943
- return import_parseIr9.SchemaWithExample.primitive({
723054
+ return import_parseIr10.SchemaWithExample.primitive({
722944
723055
  schema: primitive,
722945
723056
  description
722946
723057
  });
@@ -723009,7 +723120,7 @@ function getProperty(object, property2) {
723009
723120
 
723010
723121
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/endpoint/convertRequest.js
723011
723122
  var import_finalIr9 = __toESM(require_finalIr());
723012
- var import_parseIr10 = __toESM(require_parseIr());
723123
+ var import_parseIr11 = __toESM(require_parseIr());
723013
723124
  var APPLICATION_JSON_CONTENT = "application/json";
723014
723125
  var APPLICATION_JSON_UTF_8_CONTENT = "application/json; charset=utf-8";
723015
723126
  var MULTIPART_CONTENT = "multipart/form-data";
@@ -723095,7 +723206,7 @@ function convertRequest({ requestBody, document: document4, context, requestBrea
723095
723206
  return void 0;
723096
723207
  }
723097
723208
  const requestSchema = convertSchema(jsonSchema.schema, false, context, requestBreadcrumbs, true);
723098
- return import_parseIr10.RequestWithExample.json({
723209
+ return import_parseIr11.RequestWithExample.json({
723099
723210
  description: void 0,
723100
723211
  schema: requestSchema,
723101
723212
  contentType: jsonSchema.overridenContentType
@@ -723371,7 +723482,7 @@ function getServerName(server) {
723371
723482
 
723372
723483
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/converters/endpoint/convertParameters.js
723373
723484
  var import_finalIr11 = __toESM(require_finalIr());
723374
- var import_parseIr11 = __toESM(require_parseIr());
723485
+ var import_parseIr12 = __toESM(require_parseIr());
723375
723486
 
723376
723487
  // pnp:/home/circleci/project/packages/cli/openapi-parser/lib/v3/extensions/getVariableReference.js
723377
723488
  function getVariableReference(parameter) {
@@ -723391,16 +723502,16 @@ function convertParameters({ path: path31, httpMethod, parameters, context, requ
723391
723502
  let schema2 = resolvedParameter.schema != null ? convertSchema(resolvedParameter.schema, !isRequired, context, [
723392
723503
  ...requestBreadcrumbs,
723393
723504
  resolvedParameter.name
723394
- ]) : isRequired ? import_parseIr11.SchemaWithExample.primitive({
723395
- schema: import_parseIr11.PrimitiveSchemaValueWithExample.string({
723505
+ ]) : isRequired ? import_parseIr12.SchemaWithExample.primitive({
723506
+ schema: import_parseIr12.PrimitiveSchemaValueWithExample.string({
723396
723507
  minLength: void 0,
723397
723508
  maxLength: void 0,
723398
723509
  example: getExamplesString(resolvedParameter.example)
723399
723510
  }),
723400
723511
  description: void 0
723401
- }) : import_parseIr11.SchemaWithExample.optional({
723402
- value: import_parseIr11.SchemaWithExample.primitive({
723403
- schema: import_parseIr11.PrimitiveSchemaValueWithExample.string({
723512
+ }) : import_parseIr12.SchemaWithExample.optional({
723513
+ value: import_parseIr12.SchemaWithExample.primitive({
723514
+ schema: import_parseIr12.PrimitiveSchemaValueWithExample.string({
723404
723515
  minLength: void 0,
723405
723516
  maxLength: void 0,
723406
723517
  example: getExamplesString(resolvedParameter.example)
@@ -723412,7 +723523,7 @@ function convertParameters({ path: path31, httpMethod, parameters, context, requ
723412
723523
  if (resolvedParameter.in === "header" && resolvedParameter.schema != null && !isReferenceObject(resolvedParameter.schema) && resolvedParameter.schema.default != null) {
723413
723524
  const defaultValue = resolvedParameter.schema.default;
723414
723525
  if (typeof defaultValue === "string" && defaultValue.length > 0) {
723415
- schema2 = import_parseIr11.SchemaWithExample.literal({
723526
+ schema2 = import_parseIr12.SchemaWithExample.literal({
723416
723527
  value: import_finalIr11.LiteralSchemaValue.string(defaultValue),
723417
723528
  description: void 0
723418
723529
  });
@@ -732139,10 +732250,10 @@ var CliContext = class {
732139
732250
  return "fern-api";
732140
732251
  }
732141
732252
  getPackageVersion() {
732142
- if ("0.15.0-rc81" == null) {
732253
+ if ("0.15.0-rc83" == null) {
732143
732254
  this.logger.error("CLI_VERSION is not defined");
732144
732255
  }
732145
- return "0.15.0-rc81";
732256
+ return "0.15.0-rc83";
732146
732257
  }
732147
732258
  getCliName() {
732148
732259
  if ("fern" == null) {
@@ -732689,7 +732800,7 @@ function convertService(irService, ir) {
732689
732800
  return irService.endpoints.map((irEndpoint) => {
732690
732801
  var _a2;
732691
732802
  return {
732692
- availability: irEndpoint.availability != null ? convertIrEndpointAvailability({ availability: irEndpoint.availability }) : void 0,
732803
+ availability: irEndpoint.availability != null ? convertIrAvailability({ availability: irEndpoint.availability }) : irService.availability != null ? convertIrAvailability({ availability: irService.availability }) : void 0,
732693
732804
  auth: irEndpoint.auth,
732694
732805
  description: irEndpoint.docs ?? void 0,
732695
732806
  method: convertHttpMethod(irEndpoint.method),
@@ -732723,7 +732834,7 @@ function convertService(irService, ir) {
732723
732834
  };
732724
732835
  });
732725
732836
  }
732726
- function convertIrEndpointAvailability({ availability }) {
732837
+ function convertIrAvailability({ availability }) {
732727
732838
  switch (availability.status) {
732728
732839
  case "DEPRECATED":
732729
732840
  return import_registry_node3.FernRegistry.api.v1.register.Availability.Deprecated;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fern-api",
3
- "version": "0.15.0-rc81",
3
+ "version": "0.15.0-rc83",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/fern-api/fern.git",