@fern-api/fern-api-dev 4.94.1-1-gadcb416250c → 4.94.1-16-g570413b0bdb

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 +45 -19
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -485946,7 +485946,9 @@ var Name2 = schemas_exports3.objectWithoutOptionalProperties({
485946
485946
  // ../../ir-sdk/lib/sdk/serialization/resources/dynamic/resources/auth/types/BasicAuth.js
485947
485947
  var BasicAuth = schemas_exports3.objectWithoutOptionalProperties({
485948
485948
  username: Name2,
485949
- password: Name2
485949
+ usernameOmit: schemas_exports3.boolean().optional(),
485950
+ password: Name2,
485951
+ passwordOmit: schemas_exports3.boolean().optional()
485950
485952
  });
485951
485953
 
485952
485954
  // ../../ir-sdk/lib/sdk/serialization/resources/dynamic/resources/auth/types/BearerAuth.js
@@ -559088,17 +559090,12 @@ var DynamicSnippetsConverter = class {
559088
559090
  const scheme = auth8.schemes[0];
559089
559091
  switch (scheme.type) {
559090
559092
  case "basic": {
559091
- const basicAuth = {
559093
+ return dynamic_exports.Auth.basic({
559092
559094
  username: this.inflateName(scheme.username),
559093
- password: this.inflateName(scheme.password)
559094
- };
559095
- if (scheme.usernameOmit) {
559096
- basicAuth.usernameOmit = scheme.usernameOmit;
559097
- }
559098
- if (scheme.passwordOmit) {
559099
- basicAuth.passwordOmit = scheme.passwordOmit;
559100
- }
559101
- return dynamic_exports.Auth.basic(basicAuth);
559095
+ usernameOmit: scheme.usernameOmit,
559096
+ password: this.inflateName(scheme.password),
559097
+ passwordOmit: scheme.passwordOmit
559098
+ });
559102
559099
  }
559103
559100
  case "bearer":
559104
559101
  return dynamic_exports.Auth.bearer({
@@ -559138,8 +559135,8 @@ var DynamicSnippetsConverter = class {
559138
559135
  });
559139
559136
  case "basic":
559140
559137
  return dynamic_exports.AuthValues.basic({
559141
- username: "<username>",
559142
- password: "<password>"
559138
+ username: scheme.usernameOmit ? "" : "<username>",
559139
+ password: scheme.passwordOmit ? "" : "<password>"
559143
559140
  });
559144
559141
  case "header":
559145
559142
  return dynamic_exports.AuthValues.header({
@@ -618020,7 +618017,7 @@ var AccessTokenPosthogManager = class {
618020
618017
  properties: {
618021
618018
  ...event,
618022
618019
  ...event.properties,
618023
- version: "4.94.1-1-gadcb416250c",
618020
+ version: "4.94.1-16-g570413b0bdb",
618024
618021
  usingAccessToken: true
618025
618022
  }
618026
618023
  });
@@ -618074,7 +618071,7 @@ var UserPosthogManager = class {
618074
618071
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
618075
618072
  event: "CLI",
618076
618073
  properties: {
618077
- version: "4.94.1-1-gadcb416250c",
618074
+ version: "4.94.1-16-g570413b0bdb",
618078
618075
  ...event,
618079
618076
  ...event.properties,
618080
618077
  usingAccessToken: false,
@@ -829198,7 +829195,7 @@ var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
829198
829195
  var LOGS_FOLDER_NAME = "logs";
829199
829196
  var MAX_LOGS_DIR_SIZE_BYTES = 100 * 1024 * 1024;
829200
829197
  function getCliSource() {
829201
- const version7 = "4.94.1-1-gadcb416250c";
829198
+ const version7 = "4.94.1-16-g570413b0bdb";
829202
829199
  return `cli@${version7}`;
829203
829200
  }
829204
829201
  var DebugLogger = class {
@@ -841161,7 +841158,7 @@ var LegacyDocsPublisher = class {
841161
841158
  previewId,
841162
841159
  disableTemplates: void 0,
841163
841160
  skipUpload,
841164
- cliVersion: "4.94.1-1-gadcb416250c",
841161
+ cliVersion: "4.94.1-16-g570413b0bdb",
841165
841162
  loginCommand: "fern auth login"
841166
841163
  });
841167
841164
  if (taskContext.getResult() === TaskResult.Failure) {
@@ -870222,10 +870219,23 @@ var EndpointSnippetGenerator4 = class {
870222
870219
  this.context.errors.add({ severity: Severity.Warning, message });
870223
870220
  }
870224
870221
  getRootClientBasicAuthArgs({ auth: auth8, values: values2 }) {
870222
+ const authRecord = auth8;
870223
+ const usernameOmitted = !!authRecord.usernameOmit;
870224
+ const passwordOmitted = !!authRecord.passwordOmit;
870225
+ const credentialParts = [];
870226
+ if (!usernameOmitted) {
870227
+ credentialParts.push(`"${values2.username}"`);
870228
+ }
870229
+ if (!passwordOmitted) {
870230
+ credentialParts.push(`"${values2.password}"`);
870231
+ }
870232
+ if (credentialParts.length === 0) {
870233
+ return [];
870234
+ }
870225
870235
  return [
870226
870236
  {
870227
870237
  name: "credentials",
870228
- value: java_exports.TypeLiteral.raw(`"${values2.username}", "${values2.password}"`)
870238
+ value: java_exports.TypeLiteral.raw(credentialParts.join(", "))
870229
870239
  }
870230
870240
  ];
870231
870241
  }
@@ -875904,6 +875914,7 @@ var DynamicTypeLiteralMapper3 = class {
875904
875914
  }
875905
875915
  }
875906
875916
  convertDiscriminatedUnion({ discriminatedUnion: discriminatedUnion2, value: value2 }) {
875917
+ const typedDictRequests = this.context.useTypedDictRequests();
875907
875918
  const discriminatedUnionTypeInstance = this.context.resolveDiscriminatedUnionTypeInstance({
875908
875919
  discriminatedUnion: discriminatedUnion2,
875909
875920
  value: value2
@@ -875919,6 +875930,13 @@ var DynamicTypeLiteralMapper3 = class {
875919
875930
  if (unionProperties == null) {
875920
875931
  return python_exports.TypeInstantiation.nop();
875921
875932
  }
875933
+ if (typedDictRequests) {
875934
+ const discriminantEntry = {
875935
+ name: this.context.getPropertyName(discriminatedUnion2.discriminant.name),
875936
+ value: python_exports.TypeInstantiation.str(discriminatedUnionTypeInstance.discriminantValue.wireValue)
875937
+ };
875938
+ return python_exports.TypeInstantiation.typedDict([discriminantEntry, ...unionProperties], { multiline: true });
875939
+ }
875922
875940
  const variantClassReference = this.context.getDiscriminatedUnionVariantClassReference({
875923
875941
  unionDeclaration: discriminatedUnion2.declaration,
875924
875942
  discriminantValue: unionVariant.discriminantValue
@@ -876049,7 +876067,11 @@ var DynamicTypeLiteralMapper3 = class {
876049
876067
  return result.filter((entry) => !python_exports.TypeInstantiation.isNop(entry.value));
876050
876068
  }
876051
876069
  convertObject({ object_, value: value2 }) {
876070
+ const typedDictRequests = this.context.useTypedDictRequests();
876052
876071
  const entries23 = this.convertObjectEntries({ object_, value: value2 });
876072
+ if (typedDictRequests) {
876073
+ return python_exports.TypeInstantiation.typedDict(entries23, { multiline: true });
876074
+ }
876053
876075
  const classReference4 = this.context.getTypeClassReference(object_.declaration);
876054
876076
  return python_exports.TypeInstantiation.reference(python_exports.instantiateClass({
876055
876077
  classReference: classReference4,
@@ -876200,6 +876222,7 @@ var DynamicTypeLiteralMapper3 = class {
876200
876222
  }
876201
876223
  }
876202
876224
  synthesizeDefaultNamed({ named, typeId, seen }) {
876225
+ const typedDictRequests = this.context.useTypedDictRequests();
876203
876226
  const newSeen = new Set(seen);
876204
876227
  newSeen.add(typeId);
876205
876228
  switch (named.type) {
@@ -876235,6 +876258,9 @@ var DynamicTypeLiteralMapper3 = class {
876235
876258
  });
876236
876259
  }
876237
876260
  }
876261
+ if (typedDictRequests) {
876262
+ return python_exports.TypeInstantiation.typedDict(entries23, { multiline: true });
876263
+ }
876238
876264
  const classReference4 = this.context.getTypeClassReference(named.declaration);
876239
876265
  return python_exports.TypeInstantiation.reference(python_exports.instantiateClass({
876240
876266
  classReference: classReference4,
@@ -915624,7 +915650,7 @@ var CliContext = class _CliContext {
915624
915650
  if (false) {
915625
915651
  this.logger.error("CLI_VERSION is not defined");
915626
915652
  }
915627
- return "4.94.1-1-gadcb416250c";
915653
+ return "4.94.1-16-g570413b0bdb";
915628
915654
  }
915629
915655
  getCliName() {
915630
915656
  if (false) {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.94.1-1-gadcb416250c",
2
+ "version": "4.94.1-16-g570413b0bdb",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",