@fern-api/fern-api-dev 3.51.3-1-gfd39619eacb → 3.51.3-2-gc87b26eb5c9

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 +74 -4
  2. package/package.json +1 -1
package/cli.cjs CHANGED
@@ -1500993,10 +1500993,20 @@ var BaseType = class extends AstNode {
1500993
1500993
  /**
1500994
1500994
  * Wraps this type in an Optional type if it's not already optional.
1500995
1500995
  * If this type is already optional, returns it unchanged.
1500996
+ * Semantically represents: field can be omitted from JSON.
1500996
1500997
  */
1500997
1500998
  asOptional() {
1500998
1500999
  return new Optional(this, this.generation);
1500999
1501000
  }
1501001
+ /**
1501002
+ * Wraps this type in a Nullable type if it's not already nullable.
1501003
+ * If this type is already nullable, returns it unchanged.
1501004
+ * Semantically represents: value can be null.
1501005
+ * Note: In C#, both optional and nullable use the same ? syntax.
1501006
+ */
1501007
+ asNullable() {
1501008
+ return new Nullable(this, this.generation);
1501009
+ }
1501000
1501010
  /**
1501001
1501011
  * Returns the underlying type if this is an Optional type, otherwise returns this type unchanged.
1501002
1501012
  * This is useful for getting the non-nullable version of a type.
@@ -1501090,6 +1501100,49 @@ var Optional = class extends ReferenceType {
1501090
1501100
  asOptional() {
1501091
1501101
  return this;
1501092
1501102
  }
1501103
+ asNullable() {
1501104
+ return this;
1501105
+ }
1501106
+ asNonOptional() {
1501107
+ return this.value;
1501108
+ }
1501109
+ write(writer2) {
1501110
+ this.value.write(writer2);
1501111
+ if (!this.value.isOptional) {
1501112
+ writer2.write("?");
1501113
+ }
1501114
+ }
1501115
+ };
1501116
+ var Nullable = class extends ReferenceType {
1501117
+ isOptional = true;
1501118
+ /**
1501119
+ * The underlying non-nullable type.
1501120
+ */
1501121
+ value;
1501122
+ /**
1501123
+ * Creates a new nullable type.
1501124
+ * @param value - The underlying non-nullable type
1501125
+ * @param generation - The generation context for code generation
1501126
+ */
1501127
+ constructor(value, generation) {
1501128
+ super(generation);
1501129
+ this.value = value;
1501130
+ }
1501131
+ get isCollection() {
1501132
+ return false;
1501133
+ }
1501134
+ get multipartMethodName() {
1501135
+ return this.value.multipartMethodName;
1501136
+ }
1501137
+ get multipartMethodNameForCollection() {
1501138
+ return this.value.multipartMethodNameForCollection;
1501139
+ }
1501140
+ asOptional() {
1501141
+ return this;
1501142
+ }
1501143
+ asNullable() {
1501144
+ return this;
1501145
+ }
1501093
1501146
  asNonOptional() {
1501094
1501147
  return this.value;
1501095
1501148
  }
@@ -1501127,10 +1501180,15 @@ var OptionalWrapper = class extends ReferenceType {
1501127
1501180
  asOptional() {
1501128
1501181
  return this;
1501129
1501182
  }
1501183
+ asNullable() {
1501184
+ return this;
1501185
+ }
1501130
1501186
  asNonOptional() {
1501131
1501187
  return this.value;
1501132
1501188
  }
1501133
1501189
  write(writer2) {
1501190
+ const optionalRef = this.generation.Types.Optional;
1501191
+ writer2.addReference(optionalRef);
1501134
1501192
  writer2.write("Optional<");
1501135
1501193
  this.value.write(writer2);
1501136
1501194
  writer2.write(">");
@@ -1501860,6 +1501918,9 @@ var ClassReference = class extends Node3 {
1501860
1501918
  asOptional() {
1501861
1501919
  return new Optional(this, this.generation);
1501862
1501920
  }
1501921
+ asNullable() {
1501922
+ return new Nullable(this, this.generation);
1501923
+ }
1501863
1501924
  asNonOptional() {
1501864
1501925
  return this;
1501865
1501926
  }
@@ -1502555,6 +1502616,7 @@ var is7 = {
1502555
1502616
  Type: (value) => value instanceof BaseType,
1502556
1502617
  ClassReference: (value) => value instanceof ClassReference,
1502557
1502618
  Optional: (value) => value instanceof Optional,
1502619
+ OptionalWrapper: (value) => value instanceof OptionalWrapper,
1502558
1502620
  AsyncEnumerable: (value) => value != null && value.asNonOptional().fullyQualifiedName.startsWith("System.Collections.Generic.IAsyncEnumerable"),
1502559
1502621
  Record: {
1502560
1502622
  empty: (value) => value == null || Object.keys(value || {}).length === 0,
@@ -1504143,6 +1504205,9 @@ var DefinedType = class extends Node3 {
1504143
1504205
  asOptional() {
1504144
1504206
  return new Optional(this, this.generation);
1504145
1504207
  }
1504208
+ asNullable() {
1504209
+ return new Nullable(this, this.generation);
1504210
+ }
1504146
1504211
  asNonOptional() {
1504147
1504212
  return this;
1504148
1504213
  }
@@ -1508250,6 +1508315,11 @@ var Generation = class {
1508250
1508315
  namespace: this.namespaces.core,
1508251
1508316
  origin: this.model.staticExplicit("FormRequest")
1508252
1508317
  }),
1508318
+ /** Optional<T> wrapper type for explicit undefined/null semantics */
1508319
+ Optional: () => this.csharp.classReference({
1508320
+ namespace: this.namespaces.core,
1508321
+ origin: this.model.staticExplicit("Optional")
1508322
+ }),
1508253
1508323
  /** Configuration options for the SDK client (base URL, headers, timeout, etc.) */
1508254
1508324
  ClientOptions: () => this.csharp.classReference({
1508255
1508325
  origin: this.model.staticExplicit("ClientOptions"),
@@ -1662489,7 +1662559,7 @@ var AccessTokenPosthogManager = class {
1662489
1662559
  properties: {
1662490
1662560
  ...event,
1662491
1662561
  ...event.properties,
1662492
- version: "3.51.3-1-gfd39619eacb",
1662562
+ version: "3.51.3-2-gc87b26eb5c9",
1662493
1662563
  usingAccessToken: true
1662494
1662564
  }
1662495
1662565
  });
@@ -1662539,7 +1662609,7 @@ var UserPosthogManager = class {
1662539
1662609
  distinctId: this.userId ?? await this.getPersistedDistinctId(),
1662540
1662610
  event: "CLI",
1662541
1662611
  properties: {
1662542
- version: "3.51.3-1-gfd39619eacb",
1662612
+ version: "3.51.3-2-gc87b26eb5c9",
1662543
1662613
  ...event,
1662544
1662614
  ...event.properties,
1662545
1662615
  usingAccessToken: false,
@@ -1695681,7 +1695751,7 @@ var CliContext = class {
1695681
1695751
  if (false) {
1695682
1695752
  this.logger.error("CLI_VERSION is not defined");
1695683
1695753
  }
1695684
- return "3.51.3-1-gfd39619eacb";
1695754
+ return "3.51.3-2-gc87b26eb5c9";
1695685
1695755
  }
1695686
1695756
  getCliName() {
1695687
1695757
  if (false) {
@@ -1698794,7 +1698864,7 @@ var import_path54 = __toESM(require("path"), 1);
1698794
1698864
  var LOCAL_STORAGE_FOLDER4 = ".fern-dev";
1698795
1698865
  var LOGS_FOLDER_NAME = "logs";
1698796
1698866
  function getCliSource() {
1698797
- const version7 = "3.51.3-1-gfd39619eacb";
1698867
+ const version7 = "3.51.3-2-gc87b26eb5c9";
1698798
1698868
  return `cli@${version7}`;
1698799
1698869
  }
1698800
1698870
  var DebugLogger = class {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "3.51.3-1-gfd39619eacb",
2
+ "version": "3.51.3-2-gc87b26eb5c9",
3
3
  "repository": {
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/fern-api/fern.git",