@fern-api/fern-api-dev 5.95.1 → 5.97.0

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 +230 -40
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -58486,6 +58486,8 @@ var init_OAuthSchemeSchema2 = __esm({
58486
58486
  "token-url": schemas_exports.string().optional(),
58487
58487
  "refresh-url": schemas_exports.string().optional(),
58488
58488
  "redirect-uri": RedirectUriSchema.optional(),
58489
+ "success-redirect-url": schemas_exports.string().optional(),
58490
+ "error-redirect-url": schemas_exports.string().optional(),
58489
58491
  pkce: OAuthPkceSchema.optional(),
58490
58492
  "authorization-parameters": schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
58491
58493
  "device-authorization-parameters": schemas_exports.record(schemas_exports.string(), schemas_exports.string()).optional(),
@@ -73891,6 +73893,8 @@ var init_OAuthAuthorizationCode2 = __esm({
73891
73893
  refreshUrl: schemas_exports3.string().optional(),
73892
73894
  redirectUri: schemas_exports3.string().optional(),
73893
73895
  redirectUriBackupPorts: schemas_exports3.list(schemas_exports3.number()).optional(),
73896
+ successRedirectUrl: schemas_exports3.string().optional(),
73897
+ errorRedirectUrl: schemas_exports3.string().optional(),
73894
73898
  scopes: schemas_exports3.list(schemas_exports3.string()).optional(),
73895
73899
  pkce: OAuthPkceConfiguration,
73896
73900
  authorizationParameters: schemas_exports3.record(schemas_exports3.string(), schemas_exports3.string()).optional(),
@@ -129783,6 +129787,8 @@ var init_OAuthSchemeSchema4 = __esm({
129783
129787
  "token-url": schemas_exports8.string().optional(),
129784
129788
  "refresh-url": schemas_exports8.string().optional(),
129785
129789
  "redirect-uri": RedirectUriSchema2.optional(),
129790
+ "success-redirect-url": schemas_exports8.string().optional(),
129791
+ "error-redirect-url": schemas_exports8.string().optional(),
129786
129792
  pkce: OAuthPkceSchema2.optional(),
129787
129793
  "authorization-parameters": schemas_exports8.record(schemas_exports8.string(), schemas_exports8.string()).optional(),
129788
129794
  "device-authorization-parameters": schemas_exports8.record(schemas_exports8.string(), schemas_exports8.string()).optional(),
@@ -278062,6 +278068,8 @@ function generateOAuth({ key: key2, file: file4, docs: docs2, rawScheme, propert
278062
278068
  refreshUrl: rawScheme["refresh-url"],
278063
278069
  redirectUri: getRedirectUri(rawScheme["redirect-uri"]),
278064
278070
  redirectUriBackupPorts: getRedirectUriBackupPorts(rawScheme["redirect-uri"]),
278071
+ successRedirectUrl: rawScheme["success-redirect-url"],
278072
+ errorRedirectUrl: rawScheme["error-redirect-url"],
278065
278073
  scopes: rawScheme.scopes,
278066
278074
  pkce: { method: OAuthPkceMethod.S256 },
278067
278075
  authorizationParameters: rawScheme["authorization-parameters"],
@@ -324662,6 +324670,28 @@ var init_api_yml_schema = __esm({
324662
324670
  ],
324663
324671
  description: "The loopback redirect (callback) URI for the authorization-code flow. Must be a loopback host over http \u2014 `127.0.0.1` (recommended, RFC 8252 \xA77.3) or `localhost` \u2014 with any path; the generated CLI binds and sends this URI exactly, so it must match the redirect registered with the authorization server (e.g. `http://127.0.0.1:8484/callback` or `http://localhost:8484/callback`). Provide a bare string to pin a single port, or an object with `url` plus `ports` to add backup ports tried when the primary is busy. Omit it entirely to use an ephemeral (OS-assigned) port."
324664
324672
  },
324673
+ "success-redirect-url": {
324674
+ oneOf: [
324675
+ {
324676
+ type: "string"
324677
+ },
324678
+ {
324679
+ type: "null"
324680
+ }
324681
+ ],
324682
+ description: "A page the generated CLI redirects the browser to once it captures the authorization code, for the authorization-code flow. Must be an absolute http(s) URL. This is not an OAuth `redirect_uri` and does not need registering with the authorization server \u2014 the redirect happens on the loopback listener after the code is captured, and no `code` or `state` is forwarded. Omit it to serve the CLI's built-in success page."
324683
+ },
324684
+ "error-redirect-url": {
324685
+ oneOf: [
324686
+ {
324687
+ type: "string"
324688
+ },
324689
+ {
324690
+ type: "null"
324691
+ }
324692
+ ],
324693
+ description: "A page the generated CLI redirects the browser to when authorization fails (the user denies consent, or the callback is unusable), for the authorization-code flow. Must be an absolute http(s) URL. The `error` and `error_description` query parameters are appended so the page can explain what happened \u2014 merged into any query string already on the URL, and inserted before a fragment if there is one. Omit it to serve the CLI's built-in failure page."
324694
+ },
324665
324695
  pkce: {
324666
324696
  oneOf: [
324667
324697
  {
@@ -691824,13 +691854,13 @@ var ValidOauthRule = {
691824
691854
  if (oauth.type === "authorization-code" || oauth.type === "device-code") {
691825
691855
  return validatePublicClientFlow(oauth);
691826
691856
  }
691857
+ violations.push(...rejectCallbackRedirectUrls(oauth));
691827
691858
  if (oauth["get-token"] == null) {
691828
- return [
691829
- {
691830
- severity: "fatal",
691831
- message: "OAuth client-credentials flow requires a `get-token` endpoint."
691832
- }
691833
- ];
691859
+ violations.push({
691860
+ severity: "fatal",
691861
+ message: "OAuth client-credentials flow requires a `get-token` endpoint."
691862
+ });
691863
+ return violations;
691834
691864
  }
691835
691865
  const tokenEndpointReference = oauth["get-token"].endpoint;
691836
691866
  const resolvedTokenEndpoint = endpointResolver.resolveEndpoint({
@@ -691933,6 +691963,15 @@ function validatePublicClientFlow(oauth) {
691933
691963
  }
691934
691964
  }
691935
691965
  }
691966
+ for (const field5 of CALLBACK_REDIRECT_URL_FIELDS) {
691967
+ const url3 = oauth[field5];
691968
+ if (url3 != null) {
691969
+ const urlError = validateCallbackRedirectUrl({ field: field5, url: url3 });
691970
+ if (urlError != null) {
691971
+ violations.push({ severity: "fatal", message: urlError });
691972
+ }
691973
+ }
691974
+ }
691936
691975
  } else {
691937
691976
  if (oauth["redirect-uri"] != null) {
691938
691977
  violations.push({
@@ -691946,9 +691985,41 @@ function validatePublicClientFlow(oauth) {
691946
691985
  message: "OAuth device-code flow does not use PKCE; remove `pkce` (it applies only to the authorization-code flow)."
691947
691986
  });
691948
691987
  }
691988
+ violations.push(...rejectCallbackRedirectUrls(oauth));
691949
691989
  }
691950
691990
  return violations;
691951
691991
  }
691992
+ var CALLBACK_REDIRECT_URL_FIELDS = ["success-redirect-url", "error-redirect-url"];
691993
+ function rejectCallbackRedirectUrls(oauth) {
691994
+ return CALLBACK_REDIRECT_URL_FIELDS.filter((field5) => oauth[field5] != null).map((field5) => ({
691995
+ severity: "fatal",
691996
+ message: `OAuth ${oauth.type} flow has no browser callback; remove \`${field5}\` (it applies only to the authorization-code flow).`
691997
+ }));
691998
+ }
691999
+ function validateCallbackRedirectUrl({ field: field5, url: url3 }) {
692000
+ let parsed;
692001
+ try {
692002
+ parsed = new URL(url3);
692003
+ } catch {
692004
+ return `OAuth ${field5} '${url3}' is not a valid URL. Use an absolute http(s) URL, e.g. https://acme.com/cli/welcome.`;
692005
+ }
692006
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
692007
+ return `OAuth ${field5} '${url3}' must use http or https \u2014 the generated CLI redirects the browser to it.`;
692008
+ }
692009
+ if (containsControlCharacter(url3)) {
692010
+ return `OAuth ${field5} '${url3}' must not contain control characters.`;
692011
+ }
692012
+ return void 0;
692013
+ }
692014
+ function containsControlCharacter(value2) {
692015
+ for (let index3 = 0; index3 < value2.length; index3++) {
692016
+ const charCode = value2.charCodeAt(index3);
692017
+ if (charCode <= 31 || charCode === 127) {
692018
+ return true;
692019
+ }
692020
+ }
692021
+ return false;
692022
+ }
691952
692023
  function validateRedirectUri(redirectUri) {
691953
692024
  let parsed;
691954
692025
  try {
@@ -702967,7 +703038,7 @@ var AccessTokenPosthogManager = class {
702967
703038
  properties: {
702968
703039
  ...event,
702969
703040
  ...event.properties,
702970
- version: "5.95.1",
703041
+ version: "5.97.0",
702971
703042
  usingAccessToken: true,
702972
703043
  ...getRunIdProperties()
702973
703044
  }
@@ -703033,7 +703104,7 @@ var UserPosthogManager = class {
703033
703104
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
703034
703105
  event: "CLI",
703035
703106
  properties: {
703036
- version: "5.95.1",
703107
+ version: "5.97.0",
703037
703108
  ...event,
703038
703109
  ...event.properties,
703039
703110
  usingAccessToken: false,
@@ -848151,8 +848222,8 @@ var V67_TO_V66_MIGRATION = {
848151
848222
  [GeneratorName.SWIFT_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
848152
848223
  [GeneratorName.PHP_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
848153
848224
  [GeneratorName.PHP_SDK]: "2.11.2-rc.0",
848154
- [GeneratorName.RUST_MODEL]: GeneratorWasNeverUpdatedToConsumeNewIR,
848155
- [GeneratorName.RUST_SDK]: GeneratorWasNeverUpdatedToConsumeNewIR,
848225
+ [GeneratorName.RUST_MODEL]: "0.6.0-rc.0",
848226
+ [GeneratorName.RUST_SDK]: "0.46.0",
848156
848227
  [GeneratorName.CLI]: "0.0.1"
848157
848228
  },
848158
848229
  jsonifyEarlierVersion: (ir3) => IrSerialization_exports.V66.IntermediateRepresentation.jsonOrThrow(ir3, {
@@ -884199,7 +884270,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
884199
884270
  var LOGS_FOLDER_NAME = "logs";
884200
884271
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
884201
884272
  function getCliSource() {
884202
- const version7 = "5.95.1";
884273
+ const version7 = "5.97.0";
884203
884274
  return `cli@${version7}`;
884204
884275
  }
884205
884276
  var DebugLogger = class {
@@ -909515,7 +909586,7 @@ var LegacyDocsPublisher = class {
909515
909586
  previewId,
909516
909587
  disableTemplates: void 0,
909517
909588
  skipUpload,
909518
- cliVersion: "5.95.1",
909589
+ cliVersion: "5.97.0",
909519
909590
  loginCommand: "fern auth login"
909520
909591
  });
909521
909592
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -936180,6 +936251,7 @@ var BaseJavaCustomConfigSchema = external_exports2.object({
936180
936251
  "inline-path-parameters": external_exports2.boolean().optional(),
936181
936252
  "package-layout": external_exports2.enum(["flat", "nested"]).optional(),
936182
936253
  "package-prefix": external_exports2.string().optional(),
936254
+ "respect-optional-request-body": external_exports2.boolean().optional(),
936183
936255
  "use-local-date-for-dates": external_exports2.boolean().optional(),
936184
936256
  // General options.
936185
936257
  "custom-dependencies": external_exports2.array(external_exports2.string()).optional(),
@@ -939589,7 +939661,7 @@ var EndpointSnippetGenerator3 = class {
939589
939661
  }
939590
939662
  this.context.errors.unscope();
939591
939663
  this.context.errors.scope(Scope4.RequestBody);
939592
- if (request7.body != null) {
939664
+ if (request7.body != null && !this.callOmitsRequestBody({ request: request7, snippet })) {
939593
939665
  args.push(this.getBodyRequestArg({ body: request7.body, value: snippet.requestBody }));
939594
939666
  }
939595
939667
  this.context.errors.unscope();
@@ -939599,6 +939671,20 @@ var EndpointSnippetGenerator3 = class {
939599
939671
  }
939600
939672
  return args;
939601
939673
  }
939674
+ /**
939675
+ * Whether the call leaves the body out entirely, which the shorter overload accepts. Applies
939676
+ * only to a body the caller may omit, and only once the generator opts in to that.
939677
+ */
939678
+ callOmitsRequestBody({ request: request7, snippet }) {
939679
+ if (this.context.customConfig?.["respect-optional-request-body"] !== true) {
939680
+ return false;
939681
+ }
939682
+ if (request7.bodyRequired !== false) {
939683
+ return false;
939684
+ }
939685
+ const value2 = snippet.requestBody;
939686
+ return value2 == null || typeof value2 === "object" && !Array.isArray(value2) && Object.keys(value2).length === 0;
939687
+ }
939602
939688
  usesOptionalNullable() {
939603
939689
  return this.context.customConfig?.["collapse-optional-nullable"] === true;
939604
939690
  }
@@ -954763,18 +954849,39 @@ var EndpointSnippetGenerator7 = class {
954763
954849
  }
954764
954850
  getMethodArgsForBodyRequest({ request: request7, snippet }) {
954765
954851
  const args = [];
954852
+ const bodyMayBeOmitted = this.bodyMayBeOmitted({ request: request7 });
954853
+ const omitsBody = bodyMayBeOmitted && this.callOmitsRequestBody({ snippet });
954766
954854
  const requestComponents = this.buildRequestComponents({
954767
954855
  pathParameters: [...this.context.ir.pathParameters ?? [], ...request7.pathParameters ?? []],
954768
954856
  snippet,
954769
- body: request7.body
954857
+ body: omitsBody ? void 0 : request7.body
954770
954858
  });
954771
954859
  args.push(...requestComponents.pathArgs);
954772
- if (requestComponents.bodyArg != null) {
954773
- args.push(rust_exports.Expression.referenceOf(requestComponents.bodyArg));
954860
+ if (omitsBody) {
954861
+ args.push(rust_exports.Expression.raw("None"));
954862
+ } else if (requestComponents.bodyArg != null) {
954863
+ const bodyArg = rust_exports.Expression.referenceOf(requestComponents.bodyArg);
954864
+ args.push(bodyMayBeOmitted ? rust_exports.Expression.functionCall("Some", [bodyArg]) : bodyArg);
954774
954865
  }
954775
954866
  args.push(rust_exports.Expression.raw("None"));
954776
954867
  return args;
954777
954868
  }
954869
+ /**
954870
+ * Whether the generated body parameter is an `Option`, which mirrors the condition the SDK
954871
+ * generator applies before it lets a caller leave the body out. Reading `bodyRequired` at all is
954872
+ * opt-in so that existing snippets keep the shape they always had.
954873
+ */
954874
+ bodyMayBeOmitted({ request: request7 }) {
954875
+ return this.context.customConfig?.respectOptionalRequestBody === true && request7.bodyRequired === false && request7.body?.type === "typeReference";
954876
+ }
954877
+ /**
954878
+ * Whether the call leaves the body out entirely, which `None` expresses. Only an absent body
954879
+ * counts: an example that documents an empty object still sends that object, so it keeps
954880
+ * rendering a body expression.
954881
+ */
954882
+ callOmitsRequestBody({ snippet }) {
954883
+ return snippet.requestBody == null;
954884
+ }
954778
954885
  getMethodArgsForInlinedRequest({ endpoint: endpoint3, request: request7, snippet }) {
954779
954886
  const args = [];
954780
954887
  this.context.errors.scope(Scope4.PathParameters);
@@ -960237,6 +960344,7 @@ var TypescriptCustomConfigSchema = external_exports2.strictObject({
960237
960344
  useDefaultRequestParameterValues: external_exports2.optional(external_exports2.boolean()),
960238
960345
  packageManager: external_exports2.optional(external_exports2.enum(["pnpm", "yarn"])),
960239
960346
  flattenRequestParameters: external_exports2.optional(external_exports2.boolean()),
960347
+ respectOptionalRequestBody: external_exports2.optional(external_exports2.boolean()),
960240
960348
  exportAllRequestsAtRoot: external_exports2.optional(external_exports2.boolean()),
960241
960349
  customReadmeSections: external_exports2.optional(external_exports2.array(CustomReadmeSectionSchema2)),
960242
960350
  testFramework: external_exports2.optional(external_exports2.enum(["jest", "vitest"])),
@@ -961175,18 +961283,39 @@ function resolveNaming({ namespaceExport, naming }) {
961175
961283
  // ../../../generators/typescript-v2/dynamic-snippets/lib/context/DynamicTypeLiteralMapper.js
961176
961284
  init_lib4();
961177
961285
 
961178
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/index.mjs
961286
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/index.mjs
961179
961287
  var api_exports23 = {};
961180
961288
  __export(api_exports23, {
961289
+ AvailabilityStatus: () => AvailabilityStatus30,
961290
+ GlobalParameterApplyMode: () => GlobalParameterApplyMode4,
961291
+ GlobalParameterLocation: () => GlobalParameterLocation4,
961292
+ PrimitiveTypeV1: () => PrimitiveTypeV146,
961181
961293
  commons: () => commons_exports60,
961182
961294
  dynamic: () => dynamic_exports30,
961183
- generatorExec: () => generatorExec_exports30
961295
+ generatorExec: () => generatorExec_exports30,
961296
+ globalParameters: () => globalParameters_exports6,
961297
+ types: () => types_exports69
961184
961298
  });
961185
961299
 
961186
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/commons/index.mjs
961300
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/commons/index.mjs
961187
961301
  var commons_exports60 = {};
961302
+ __export(commons_exports60, {
961303
+ AvailabilityStatus: () => AvailabilityStatus30
961304
+ });
961305
+
961306
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/commons/types/AvailabilityStatus.mjs
961307
+ var AvailabilityStatus30 = {
961308
+ InDevelopment: "IN_DEVELOPMENT",
961309
+ PreRelease: "PRE_RELEASE",
961310
+ GeneralAvailability: "GENERAL_AVAILABILITY",
961311
+ Deprecated: "DEPRECATED",
961312
+ Alpha: "ALPHA",
961313
+ Beta: "BETA",
961314
+ Preview: "PREVIEW",
961315
+ Legacy: "LEGACY"
961316
+ };
961188
961317
 
961189
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/index.mjs
961318
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/index.mjs
961190
961319
  var dynamic_exports30 = {};
961191
961320
  __export(dynamic_exports30, {
961192
961321
  ErrorSeverity: () => ErrorSeverity30,
@@ -961205,28 +961334,28 @@ __export(dynamic_exports30, {
961205
961334
  variables: () => variables_exports47
961206
961335
  });
961207
961336
 
961208
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/auth/index.mjs
961337
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/auth/index.mjs
961209
961338
  var auth_exports65 = {};
961210
961339
 
961211
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/commons/index.mjs
961340
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/commons/index.mjs
961212
961341
  var commons_exports61 = {};
961213
961342
 
961214
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/declaration/index.mjs
961343
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/declaration/index.mjs
961215
961344
  var declaration_exports30 = {};
961216
961345
 
961217
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/endpoints/index.mjs
961346
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/endpoints/index.mjs
961218
961347
  var endpoints_exports30 = {};
961219
961348
 
961220
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/environment/index.mjs
961349
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/environment/index.mjs
961221
961350
  var environment_exports57 = {};
961222
961351
 
961223
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/index.mjs
961352
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/index.mjs
961224
961353
  var http_exports45 = {};
961225
961354
  __export(http_exports45, {
961226
961355
  HttpMethod: () => HttpMethod49
961227
961356
  });
961228
961357
 
961229
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/types/HttpMethod.mjs
961358
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/http/types/HttpMethod.mjs
961230
961359
  var HttpMethod49 = {
961231
961360
  Get: "GET",
961232
961361
  Post: "POST",
@@ -961236,35 +961365,35 @@ var HttpMethod49 = {
961236
961365
  Head: "HEAD"
961237
961366
  };
961238
961367
 
961239
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/ir/index.mjs
961368
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/ir/index.mjs
961240
961369
  var ir_exports59 = {};
961241
961370
 
961242
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/index.mjs
961371
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/index.mjs
961243
961372
  var snippets_exports30 = {};
961244
961373
  __export(snippets_exports30, {
961245
961374
  ErrorSeverity: () => ErrorSeverity30
961246
961375
  });
961247
961376
 
961248
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/types/ErrorSeverity.mjs
961377
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/snippets/types/ErrorSeverity.mjs
961249
961378
  var ErrorSeverity30 = {
961250
961379
  Critical: "CRITICAL",
961251
961380
  Warning: "WARNING"
961252
961381
  };
961253
961382
 
961254
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/index.mjs
961383
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/index.mjs
961255
961384
  var types_exports68 = {};
961256
961385
  __export(types_exports68, {
961257
961386
  ObjectPropertyAccess: () => ObjectPropertyAccess43,
961258
961387
  PrimitiveTypeV1: () => PrimitiveTypeV145
961259
961388
  });
961260
961389
 
961261
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.mjs
961390
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/ObjectPropertyAccess.mjs
961262
961391
  var ObjectPropertyAccess43 = {
961263
961392
  ReadOnly: "READ_ONLY",
961264
961393
  WriteOnly: "WRITE_ONLY"
961265
961394
  };
961266
961395
 
961267
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.mjs
961396
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/types/types/PrimitiveTypeV1.mjs
961268
961397
  var PrimitiveTypeV145 = {
961269
961398
  Integer: "INTEGER",
961270
961399
  /**
@@ -961284,28 +961413,75 @@ var PrimitiveTypeV145 = {
961284
961413
  BigInteger: "BIG_INTEGER"
961285
961414
  };
961286
961415
 
961287
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/variables/index.mjs
961416
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/dynamic/resources/variables/index.mjs
961288
961417
  var variables_exports47 = {};
961289
961418
 
961290
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/index.mjs
961419
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/index.mjs
961291
961420
  var generatorExec_exports30 = {};
961292
961421
  __export(generatorExec_exports30, {
961293
961422
  LicenseId: () => LicenseId30,
961294
961423
  config: () => config_exports30
961295
961424
  });
961296
961425
 
961297
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/index.mjs
961426
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/index.mjs
961298
961427
  var config_exports30 = {};
961299
961428
  __export(config_exports30, {
961300
961429
  LicenseId: () => LicenseId30
961301
961430
  });
961302
961431
 
961303
- // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@66.1.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/types/LicenseId.mjs
961432
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/generatorExec/resources/config/types/LicenseId.mjs
961304
961433
  var LicenseId30 = {
961305
961434
  Mit: "MIT",
961306
961435
  Apache2: "Apache-2.0"
961307
961436
  };
961308
961437
 
961438
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/index.mjs
961439
+ var globalParameters_exports6 = {};
961440
+ __export(globalParameters_exports6, {
961441
+ GlobalParameterApplyMode: () => GlobalParameterApplyMode4,
961442
+ GlobalParameterLocation: () => GlobalParameterLocation4
961443
+ });
961444
+
961445
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/types/GlobalParameterApplyMode.mjs
961446
+ var GlobalParameterApplyMode4 = {
961447
+ Explicit: "explicit",
961448
+ Auto: "auto"
961449
+ };
961450
+
961451
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/globalParameters/types/GlobalParameterLocation.mjs
961452
+ var GlobalParameterLocation4 = {
961453
+ Header: "header",
961454
+ Query: "query",
961455
+ Body: "body",
961456
+ Path: "path"
961457
+ };
961458
+
961459
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/types/index.mjs
961460
+ var types_exports69 = {};
961461
+ __export(types_exports69, {
961462
+ PrimitiveTypeV1: () => PrimitiveTypeV146
961463
+ });
961464
+
961465
+ // ../../../node_modules/.pnpm/@fern-api+dynamic-ir-sdk@67.21.0/node_modules/@fern-api/dynamic-ir-sdk/dist/esm/api/resources/types/types/PrimitiveTypeV1.mjs
961466
+ var PrimitiveTypeV146 = {
961467
+ Integer: "INTEGER",
961468
+ /**
961469
+ * Within the range -2^53 to 2^53 */
961470
+ Long: "LONG",
961471
+ Uint: "UINT",
961472
+ Uint64: "UINT_64",
961473
+ Float: "FLOAT",
961474
+ Double: "DOUBLE",
961475
+ Boolean: "BOOLEAN",
961476
+ String: "STRING",
961477
+ Date: "DATE",
961478
+ DateTime: "DATE_TIME",
961479
+ DateTimeRfc2822: "DATE_TIME_RFC_2822",
961480
+ Uuid: "UUID",
961481
+ Base64: "BASE_64",
961482
+ BigInteger: "BIG_INTEGER"
961483
+ };
961484
+
961309
961485
  // ../../../generators/typescript-v2/dynamic-snippets/lib/context/DynamicTypeLiteralMapper.js
961310
961486
  var UNION_VALUE_KEY2 = "value";
961311
961487
  var DynamicTypeLiteralMapper7 = class {
@@ -962242,7 +962418,7 @@ var EndpointSnippetGenerator9 = class {
962242
962418
  }
962243
962419
  this.context.errors.unscope();
962244
962420
  this.context.errors.scope(Scope4.RequestBody);
962245
- if (request7.body != null) {
962421
+ if (request7.body != null && !this.callOmitsRequestBody({ request: request7, snippet })) {
962246
962422
  const bodyArg = this.getBodyRequestArg({ body: request7.body, value: snippet.requestBody });
962247
962423
  if (!typescript_exports.TypeLiteral.isNop(bodyArg)) {
962248
962424
  args.push(bodyArg);
@@ -962251,6 +962427,20 @@ var EndpointSnippetGenerator9 = class {
962251
962427
  this.context.errors.unscope();
962252
962428
  return args;
962253
962429
  }
962430
+ /**
962431
+ * Whether the call leaves the body out entirely, which the optional parameter allows. Applies
962432
+ * only to a body the caller may omit, and only once the generator opts in to that.
962433
+ */
962434
+ callOmitsRequestBody({ request: request7, snippet }) {
962435
+ if (this.context.customConfig?.respectOptionalRequestBody !== true) {
962436
+ return false;
962437
+ }
962438
+ if (request7.bodyRequired !== false) {
962439
+ return false;
962440
+ }
962441
+ const value2 = snippet.requestBody;
962442
+ return value2 == null || typeof value2 === "object" && !Array.isArray(value2) && Object.keys(value2).length === 0;
962443
+ }
962254
962444
  getBodyRequestArg({ body, value: value2 }) {
962255
962445
  switch (body.type) {
962256
962446
  case "bytes":
@@ -976633,7 +976823,7 @@ function getAutomationContextFromEnv() {
976633
976823
  config_branch: process.env.FERN_CONFIG_BRANCH,
976634
976824
  config_pr_number: process.env.FERN_CONFIG_PR_NUMBER,
976635
976825
  trigger: process.env.GITHUB_EVENT_NAME,
976636
- cli_version: "5.95.1"
976826
+ cli_version: "5.97.0"
976637
976827
  };
976638
976828
  }
976639
976829
  function isAutomationMode() {
@@ -977465,7 +977655,7 @@ var CliContext = class _CliContext {
977465
977655
  if (false) {
977466
977656
  this.logger.error("CLI_VERSION is not defined");
977467
977657
  }
977468
- return "5.95.1";
977658
+ return "5.97.0";
977469
977659
  }
977470
977660
  getCliName() {
977471
977661
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.95.1",
2
+ "version": "5.97.0",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",