From 89e83517b04c243dce8bc9539dab6ae075e61c4f Mon Sep 17 00:00:00 2001 From: Niels Swimberghe <3382717+Swimburger@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:17:10 -0500 Subject: [PATCH] fix missing client class --- .../src/GeneratedSdkClientClassImpl.ts | 6 +- seed/ts-sdk/any-auth/src/Client.ts | 6 +- seed/ts-sdk/api-wide-base-path/src/Client.ts | 4 +- .../audiences/no-custom-config/src/Client.ts | 10 +- .../api/resources/folderA/client/Client.ts | 4 +- .../api/resources/folderD/client/Client.ts | 4 +- .../with-partner-audience/src/Client.ts | 4 +- .../api/resources/folderD/client/Client.ts | 4 +- .../auth-environment-variables/src/Client.ts | 4 +- .../src/Client.ts | 4 +- seed/ts-sdk/basic-auth/src/Client.ts | 4 +- .../src/Client.ts | 4 +- seed/ts-sdk/bytes/src/Client.ts | 4 +- .../api/resources/ast/types/PrimitiveValue.ts | 1 - .../api/resources/ast/types/PrimitiveValue.ts | 1 - .../cross-package-type-names/src/Client.ts | 10 +- .../api/resources/folderA/client/Client.ts | 4 +- .../api/resources/folderD/client/Client.ts | 4 +- seed/ts-sdk/custom-auth/src/Client.ts | 4 +- seed/ts-sdk/enum/src/Client.ts | 10 +- seed/ts-sdk/enum/src/api/types/Color.ts | 1 - seed/ts-sdk/enum/src/api/types/Operand.ts | 1 - .../error-property/union-utils/src/Client.ts | 4 +- .../examples-with-api-reference/src/Client.ts | 34 ++- .../src/api/resources/file/client/Client.ts | 7 +- .../resources/notification/client/Client.ts | 4 +- .../src/api/resources/health/client/Client.ts | 4 +- .../resources/types/types/MigrationStatus.ts | 1 - .../src/api/types/BasicType.ts | 1 - .../src/api/types/ComplexType.ts | 1 - .../retain-original-casing/src/Client.ts | 34 ++- .../src/api/resources/file/client/Client.ts | 7 +- .../resources/notification/client/Client.ts | 4 +- .../src/api/resources/health/client/Client.ts | 4 +- .../resources/types/types/MigrationStatus.ts | 1 - .../src/api/types/BasicType.ts | 1 - .../src/api/types/ComplexType.ts | 1 - .../allow-extra-fields/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - seed/ts-sdk/exhaustive/bigint/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - seed/ts-sdk/exhaustive/bundle/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - .../custom-package-json/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - .../exhaustive/dev-dependencies/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - seed/ts-sdk/exhaustive/jsr/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - .../exhaustive/no-custom-config/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - .../retain-original-casing/src/Client.ts | 16 +- .../api/resources/endpoints/client/Client.ts | 25 +-- .../resources/enum/types/WeatherReport.ts | 1 - seed/ts-sdk/extra-properties/src/Client.ts | 4 +- .../src/Client.ts | 4 +- .../no-custom-config/src/Client.ts | 4 +- .../no-custom-config/src/Client.ts | 4 +- .../api/resources/service/types/ObjectType.ts | 1 - .../wrap-file-properties/src/Client.ts | 4 +- .../api/resources/service/types/ObjectType.ts | 1 - seed/ts-sdk/folders/src/Client.ts | 23 +- .../src/api/resources/a/client/Client.ts | 7 +- .../src/api/resources/folder/client/Client.ts | 12 +- seed/ts-sdk/idempotency-headers/src/Client.ts | 4 +- .../api/resources/payment/client/Client.ts | 5 - .../api/resources/payment/types/Currency.ts | 1 - .../imdb/no-custom-config/src/Client.ts | 4 +- seed/ts-sdk/imdb/noScripts/src/Client.ts | 4 +- seed/ts-sdk/imdb/omit-undefined/src/Client.ts | 4 +- seed/ts-sdk/inline-types/inline/README.md | 12 - seed/ts-sdk/inline-types/inline/src/Client.ts | 210 ++++++++++++++++++ .../requests/GetDiscriminatedUnionRequest.ts | 6 + .../GetUndiscriminatedUnionRequest.ts | 3 + .../api/client/requests/PostRootRequest.ts | 3 + .../inline/src/api/types/ReferenceType.ts | 3 + .../inline/src/api/types/RootType1.ts | 21 ++ .../inline/src/api/types/UserId.ts | 3 + .../inline/src/core/api-promise/APIPromise.ts | 54 ----- .../inline/src/core/api-promise/index.ts | 1 - .../inline-types/inline/src/core/index.ts | 1 - seed/ts-sdk/inline-types/no-inline/README.md | 12 - .../inline-types/no-inline/src/Client.ts | 210 ++++++++++++++++++ .../src/api/types/DiscriminatedUnion1.ts | 3 + .../types/DiscriminatedUnion1InlineType1.ts | 3 + ...scriminatedUnion1InlineType1InlineType1.ts | 3 + .../types/DiscriminatedUnion1InlineType2.ts | 3 + .../no-inline/src/api/types/InlineEnum1.ts | 3 + .../no-inline/src/api/types/ReferenceType.ts | 3 + .../src/api/types/RequestTypeInlineType1.ts | 3 + .../no-inline/src/api/types/RootType1.ts | 3 + .../src/api/types/RootType1FooListItem.ts | 3 + .../src/api/types/RootType1FooMapValue.ts | 3 + .../src/api/types/RootType1FooSetItem.ts | 3 + .../src/api/types/RootType1InlineType1.ts | 3 + .../RootType1InlineType1NestedInlineType1.ts | 3 + .../src/api/types/UndiscriminatedUnion1.ts | 3 + ...ndiscriminatedUnion1DiscriminatedUnion1.ts | 3 + ...tedUnion1DiscriminatedUnion1InlineType1.ts | 3 + ...scriminatedUnion1InlineType1InlineType1.ts | 3 + ...tedUnion1DiscriminatedUnion1InlineType2.ts | 3 + .../types/UndiscriminatedUnion1InlineEnum1.ts | 3 + .../UndiscriminatedUnion1InlineListItem1.ts | 3 + .../UndiscriminatedUnion1InlineMapItem1.ts | 3 + .../UndiscriminatedUnion1InlineSetItem1.ts | 3 + .../types/UndiscriminatedUnion1InlineType1.ts | 3 + ...scriminatedUnion1InlineType1InlineType1.ts | 3 + .../types/UndiscriminatedUnion1InlineType2.ts | 3 + .../no-inline/src/api/types/UserId.ts | 3 + .../src/core/api-promise/APIPromise.ts | 54 ----- .../no-inline/src/core/api-promise/index.ts | 1 - .../inline-types/no-inline/src/core/index.ts | 1 - seed/ts-sdk/literal/src/Client.ts | 16 +- .../mixed-case/no-custom-config/src/Client.ts | 4 +- .../resources/service/types/ResourceStatus.ts | 1 - .../retain-original-casing/src/Client.ts | 4 +- .../resources/service/types/ResourceStatus.ts | 1 - .../ts-sdk/mixed-file-directory/src/Client.ts | 7 +- .../src/api/resources/user/client/Client.ts | 12 +- .../user/resources/events/client/Client.ts | 12 +- seed/ts-sdk/multi-line-docs/src/Client.ts | 4 +- .../multi-line-docs/src/api/types/Operand.ts | 1 - .../src/Client.ts | 7 +- .../multi-url-environment/src/Client.ts | 7 +- seed/ts-sdk/no-environment/src/Client.ts | 4 +- .../src/Client.ts | 3 +- .../src/Client.ts | 3 +- .../never-throw-errors/src/Client.ts | 3 +- .../no-custom-config/src/Client.ts | 3 +- .../oauth-client-credentials/src/Client.ts | 3 +- .../src/api/resources/file/types/FileInfo.ts | 1 - seed/ts-sdk/optional/src/Client.ts | 4 +- seed/ts-sdk/package-yml/src/Client.ts | 12 +- seed/ts-sdk/pagination/src/Client.ts | 4 +- .../src/api/resources/users/types/Order.ts | 1 - seed/ts-sdk/path-parameters/src/Client.ts | 4 +- seed/ts-sdk/plain-text/src/Client.ts | 4 +- .../no-custom-config/src/Client.ts | 4 +- .../no-serde-layer-query/src/Client.ts | 4 +- seed/ts-sdk/reserved-keywords/src/Client.ts | 4 +- seed/ts-sdk/response-property/src/Client.ts | 4 +- .../server-sent-event-examples/src/Client.ts | 4 +- seed/ts-sdk/server-sent-events/src/Client.ts | 4 +- .../src/Client.ts | 4 +- .../src/Client.ts | 4 +- .../allow-custom-fetcher/src/Client.ts | 4 +- .../streaming/no-custom-config/src/Client.ts | 4 +- seed/ts-sdk/trace/exhaustive/src/Client.ts | 25 +-- .../api/resources/commons/types/Language.ts | 1 - .../migration/types/MigrationStatus.ts | 1 - .../playlist/types/ReservedKeywordEnum.ts | 1 - .../types/ExecutionSessionStatus.ts | 1 - .../types/RunningSubmissionState.ts | 1 - .../submission/types/SubmissionTypeEnum.ts | 1 - .../src/api/resources/v2/client/Client.ts | 23 +- .../v2/resources/v3/client/Client.ts | 4 +- .../trace/no-custom-config/src/Client.ts | 25 +-- .../api/resources/commons/types/Language.ts | 1 - .../migration/types/MigrationStatus.ts | 1 - .../playlist/types/ReservedKeywordEnum.ts | 1 - .../types/ExecutionSessionStatus.ts | 1 - .../types/RunningSubmissionState.ts | 1 - .../submission/types/SubmissionTypeEnum.ts | 1 - .../src/api/resources/v2/client/Client.ts | 23 +- .../v2/resources/v3/client/Client.ts | 4 +- .../trace/no-zurg-no-throwing/src/Client.ts | 25 +-- .../api/resources/commons/types/Language.ts | 1 - .../migration/types/MigrationStatus.ts | 1 - .../playlist/types/ReservedKeywordEnum.ts | 1 - .../types/ExecutionSessionStatus.ts | 1 - .../types/RunningSubmissionState.ts | 1 - .../submission/types/SubmissionTypeEnum.ts | 1 - .../src/api/resources/v2/client/Client.ts | 23 +- .../v2/resources/v3/client/Client.ts | 4 +- seed/ts-sdk/trace/no-zurg-trace/src/Client.ts | 25 +-- .../api/resources/commons/types/Language.ts | 1 - .../migration/types/MigrationStatus.ts | 1 - .../playlist/types/ReservedKeywordEnum.ts | 1 - .../types/ExecutionSessionStatus.ts | 1 - .../types/RunningSubmissionState.ts | 1 - .../submission/types/SubmissionTypeEnum.ts | 1 - .../src/api/resources/v2/client/Client.ts | 23 +- .../v2/resources/v3/client/Client.ts | 4 +- seed/ts-sdk/ts-express-casing/src/Client.ts | 4 +- .../no-custom-config/src/Client.ts | 4 +- .../src/api/resources/union/types/KeyType.ts | 1 - .../skip-response-validation/src/Client.ts | 4 +- .../src/api/resources/union/types/KeyType.ts | 1 - seed/ts-sdk/unions/src/Client.ts | 4 +- .../unknown/no-custom-config/src/Client.ts | 4 +- .../unknown/unknown-as-any/src/Client.ts | 4 +- seed/ts-sdk/validation/src/api/types/Shape.ts | 1 - seed/ts-sdk/variables/src/Client.ts | 4 +- seed/ts-sdk/version-no-default/src/Client.ts | 4 +- seed/ts-sdk/version/src/Client.ts | 4 +- 202 files changed, 967 insertions(+), 770 deletions(-) delete mode 100644 seed/ts-sdk/inline-types/inline/src/core/api-promise/APIPromise.ts delete mode 100644 seed/ts-sdk/inline-types/inline/src/core/api-promise/index.ts delete mode 100644 seed/ts-sdk/inline-types/no-inline/src/core/api-promise/APIPromise.ts delete mode 100644 seed/ts-sdk/inline-types/no-inline/src/core/api-promise/index.ts diff --git a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts index d5586164fb3..22923cff469 100644 --- a/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts +++ b/generators/typescript/sdk/client-class-generator/src/GeneratedSdkClientClassImpl.ts @@ -455,9 +455,9 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { name: this.serviceClassName, isExported: true, properties: [], + getAccessors: [], ctors: [], - methods: [], - getAccessors: [] + methods: [] }; maybeAddDocsStructure(serviceClass, this.package_.docs); @@ -698,6 +698,8 @@ export class GeneratedSdkClientClassImpl implements GeneratedSdkClientClass { statements: this.getCustomAuthorizationHeaderStatements(context).map(getTextOfTsNode) }); } + + context.sourceFile.addClass(serviceClass); } private shouldGenerateAuthorizationHeaderHelperMethod(): boolean { diff --git a/seed/ts-sdk/any-auth/src/Client.ts b/seed/ts-sdk/any-auth/src/Client.ts index 45f77a755b0..b25af8ab9b6 100644 --- a/seed/ts-sdk/any-auth/src/Client.ts +++ b/seed/ts-sdk/any-auth/src/Client.ts @@ -29,6 +29,8 @@ export declare namespace SeedAnyAuthClient { export class SeedAnyAuthClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; + protected _user: User | undefined; constructor(protected readonly _options: SeedAnyAuthClient.Options) { const clientId = this._options.clientId ?? process.env["MY_CLIENT_ID"]; @@ -54,8 +56,6 @@ export class SeedAnyAuthClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, @@ -63,8 +63,6 @@ export class SeedAnyAuthClient { })); } - protected _user: User | undefined; - public get user(): User { return (this._user ??= new User({ ...this._options, diff --git a/seed/ts-sdk/api-wide-base-path/src/Client.ts b/seed/ts-sdk/api-wide-base-path/src/Client.ts index 740060cfeb5..0f7902ce3b9 100644 --- a/seed/ts-sdk/api-wide-base-path/src/Client.ts +++ b/seed/ts-sdk/api-wide-base-path/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiWideBasePathClient { } export class SeedApiWideBasePathClient { - constructor(protected readonly _options: SeedApiWideBasePathClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedApiWideBasePathClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts index d22419839b1..c6205ef10e9 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/Client.ts @@ -26,22 +26,20 @@ export declare namespace SeedAudiencesClient { } export class SeedAudiencesClient { - constructor(protected readonly _options: SeedAudiencesClient.Options) {} - protected _folderA: FolderA | undefined; + protected _folderD: FolderD | undefined; + protected _foo: Foo | undefined; + + constructor(protected readonly _options: SeedAudiencesClient.Options) {} public get folderA(): FolderA { return (this._folderA ??= new FolderA(this._options)); } - protected _folderD: FolderD | undefined; - public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } - protected _foo: Foo | undefined; - public get foo(): Foo { return (this._foo ??= new Foo(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts index eb30358e2c9..56f024fc889 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderA/client/Client.ts @@ -24,10 +24,10 @@ export declare namespace FolderA { } export class FolderA { - constructor(protected readonly _options: FolderA.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderA.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts index bc2daead282..895b670d53b 100644 --- a/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/audiences/no-custom-config/src/api/resources/folderD/client/Client.ts @@ -24,10 +24,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts index 9cb5420954a..425b13be819 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedAudiencesClient { } export class SeedAudiencesClient { - constructor(protected readonly _options: SeedAudiencesClient.Options) {} - protected _folderD: FolderD | undefined; + constructor(protected readonly _options: SeedAudiencesClient.Options) {} + public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } diff --git a/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts index 3a085b790da..c5ea0e6e17c 100644 --- a/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/audiences/with-partner-audience/src/api/resources/folderD/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/auth-environment-variables/src/Client.ts b/seed/ts-sdk/auth-environment-variables/src/Client.ts index db99f8b24f4..df39c03d0a7 100644 --- a/seed/ts-sdk/auth-environment-variables/src/Client.ts +++ b/seed/ts-sdk/auth-environment-variables/src/Client.ts @@ -32,10 +32,10 @@ export declare namespace SeedAuthEnvironmentVariablesClient { } export class SeedAuthEnvironmentVariablesClient { - constructor(protected readonly _options: SeedAuthEnvironmentVariablesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedAuthEnvironmentVariablesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts index 035aac8211a..ed8da1e63e8 100644 --- a/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts +++ b/seed/ts-sdk/basic-auth-environment-variables/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedBasicAuthEnvironmentVariablesClient { } export class SeedBasicAuthEnvironmentVariablesClient { - constructor(protected readonly _options: SeedBasicAuthEnvironmentVariablesClient.Options) {} - protected _basicAuth: BasicAuth | undefined; + constructor(protected readonly _options: SeedBasicAuthEnvironmentVariablesClient.Options) {} + public get basicAuth(): BasicAuth { return (this._basicAuth ??= new BasicAuth(this._options)); } diff --git a/seed/ts-sdk/basic-auth/src/Client.ts b/seed/ts-sdk/basic-auth/src/Client.ts index e178bc364bc..5f757f98ceb 100644 --- a/seed/ts-sdk/basic-auth/src/Client.ts +++ b/seed/ts-sdk/basic-auth/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedBasicAuthClient { } export class SeedBasicAuthClient { - constructor(protected readonly _options: SeedBasicAuthClient.Options) {} - protected _basicAuth: BasicAuth | undefined; + constructor(protected readonly _options: SeedBasicAuthClient.Options) {} + public get basicAuth(): BasicAuth { return (this._basicAuth ??= new BasicAuth(this._options)); } diff --git a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts index 12dd0ac531b..536e2a04e2d 100644 --- a/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts +++ b/seed/ts-sdk/bearer-token-environment-variable/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedBearerTokenEnvironmentVariableClient { } export class SeedBearerTokenEnvironmentVariableClient { - constructor(protected readonly _options: SeedBearerTokenEnvironmentVariableClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedBearerTokenEnvironmentVariableClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/bytes/src/Client.ts b/seed/ts-sdk/bytes/src/Client.ts index 5b809080e1e..19f3ec412ba 100644 --- a/seed/ts-sdk/bytes/src/Client.ts +++ b/seed/ts-sdk/bytes/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedBytesClient { } export class SeedBytesClient { - constructor(protected readonly _options: SeedBytesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedBytesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-sdk/circular-references-advanced/src/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts b/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts index 58baf11d749..1b01851df2f 100644 --- a/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts +++ b/seed/ts-sdk/circular-references/src/api/resources/ast/types/PrimitiveValue.ts @@ -3,7 +3,6 @@ */ export type PrimitiveValue = "STRING" | "NUMBER"; - export const PrimitiveValue = { String: "STRING", Number: "NUMBER", diff --git a/seed/ts-sdk/cross-package-type-names/src/Client.ts b/seed/ts-sdk/cross-package-type-names/src/Client.ts index 156252ec396..a6270ec4b53 100644 --- a/seed/ts-sdk/cross-package-type-names/src/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/Client.ts @@ -25,22 +25,20 @@ export declare namespace SeedCrossPackageTypeNamesClient { } export class SeedCrossPackageTypeNamesClient { - constructor(protected readonly _options: SeedCrossPackageTypeNamesClient.Options) {} - protected _folderA: FolderA | undefined; + protected _folderD: FolderD | undefined; + protected _foo: Foo | undefined; + + constructor(protected readonly _options: SeedCrossPackageTypeNamesClient.Options) {} public get folderA(): FolderA { return (this._folderA ??= new FolderA(this._options)); } - protected _folderD: FolderD | undefined; - public get folderD(): FolderD { return (this._folderD ??= new FolderD(this._options)); } - protected _foo: Foo | undefined; - public get foo(): Foo { return (this._foo ??= new Foo(this._options)); } diff --git a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts index 5aa684888bd..524f39daaa0 100644 --- a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderA/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderA { } export class FolderA { - constructor(protected readonly _options: FolderA.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderA.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts index 3a085b790da..c5ea0e6e17c 100644 --- a/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts +++ b/seed/ts-sdk/cross-package-type-names/src/api/resources/folderD/client/Client.ts @@ -23,10 +23,10 @@ export declare namespace FolderD { } export class FolderD { - constructor(protected readonly _options: FolderD.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: FolderD.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/custom-auth/src/Client.ts b/seed/ts-sdk/custom-auth/src/Client.ts index 74409ceb17a..d4855a6f33a 100644 --- a/seed/ts-sdk/custom-auth/src/Client.ts +++ b/seed/ts-sdk/custom-auth/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedCustomAuthClient { } export class SeedCustomAuthClient { - constructor(protected readonly _options: SeedCustomAuthClient.Options) {} - protected _customAuth: CustomAuth | undefined; + constructor(protected readonly _options: SeedCustomAuthClient.Options) {} + public get customAuth(): CustomAuth { return (this._customAuth ??= new CustomAuth(this._options)); } diff --git a/seed/ts-sdk/enum/src/Client.ts b/seed/ts-sdk/enum/src/Client.ts index 317d1772fc1..0a8562b1384 100644 --- a/seed/ts-sdk/enum/src/Client.ts +++ b/seed/ts-sdk/enum/src/Client.ts @@ -25,22 +25,20 @@ export declare namespace SeedEnumClient { } export class SeedEnumClient { - constructor(protected readonly _options: SeedEnumClient.Options) {} - protected _inlinedRequest: InlinedRequest | undefined; + protected _pathParam: PathParam | undefined; + protected _queryParam: QueryParam | undefined; + + constructor(protected readonly _options: SeedEnumClient.Options) {} public get inlinedRequest(): InlinedRequest { return (this._inlinedRequest ??= new InlinedRequest(this._options)); } - protected _pathParam: PathParam | undefined; - public get pathParam(): PathParam { return (this._pathParam ??= new PathParam(this._options)); } - protected _queryParam: QueryParam | undefined; - public get queryParam(): QueryParam { return (this._queryParam ??= new QueryParam(this._options)); } diff --git a/seed/ts-sdk/enum/src/api/types/Color.ts b/seed/ts-sdk/enum/src/api/types/Color.ts index 2fa67f67f83..fab9171627b 100644 --- a/seed/ts-sdk/enum/src/api/types/Color.ts +++ b/seed/ts-sdk/enum/src/api/types/Color.ts @@ -7,7 +7,6 @@ * SeedEnum.Color.Red */ export type Color = "red" | "blue"; - export const Color = { Red: "red", Blue: "blue", diff --git a/seed/ts-sdk/enum/src/api/types/Operand.ts b/seed/ts-sdk/enum/src/api/types/Operand.ts index 42d2b063976..ad952151633 100644 --- a/seed/ts-sdk/enum/src/api/types/Operand.ts +++ b/seed/ts-sdk/enum/src/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-sdk/error-property/union-utils/src/Client.ts b/seed/ts-sdk/error-property/union-utils/src/Client.ts index bc1b9597428..ec8a1eb055e 100644 --- a/seed/ts-sdk/error-property/union-utils/src/Client.ts +++ b/seed/ts-sdk/error-property/union-utils/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedErrorPropertyClient { } export class SeedErrorPropertyClient { - constructor(protected readonly _options: SeedErrorPropertyClient.Options) {} - protected _propertyBasedError: PropertyBasedError | undefined; + constructor(protected readonly _options: SeedErrorPropertyClient.Options) {} + public get propertyBasedError(): PropertyBasedError { return (this._propertyBasedError ??= new PropertyBasedError(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts index 98ed475d957..86550294c18 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/Client.ts @@ -30,8 +30,24 @@ export declare namespace SeedExamplesClient { } export class SeedExamplesClient { + protected _file: File_ | undefined; + protected _health: Health | undefined; + protected _service: Service | undefined; + constructor(protected readonly _options: SeedExamplesClient.Options) {} + public get file(): File_ { + return (this._file ??= new File_(this._options)); + } + + public get health(): Health { + return (this._health ??= new Health(this._options)); + } + + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {string} request * @param {SeedExamplesClient.RequestOptions} requestOptions - Request-specific configuration. @@ -153,24 +169,6 @@ export class SeedExamplesClient { } } - protected _file: File_ | undefined; - - public get file(): File_ { - return (this._file ??= new File_(this._options)); - } - - protected _health: Health | undefined; - - public get health(): Health { - return (this._health ??= new Health(this._options)); - } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts index 215152278d5..9bb28c947a2 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/client/Client.ts @@ -26,16 +26,15 @@ export declare namespace File_ { } export class File_ { - constructor(protected readonly _options: File_.Options) {} - protected _notification: Notification | undefined; + protected _service: Service | undefined; + + constructor(protected readonly _options: File_.Options) {} public get notification(): Notification { return (this._notification ??= new Notification(this._options)); } - protected _service: Service | undefined; - public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts index b60310ce619..b656ba4419e 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/file/resources/notification/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Notification { } export class Notification { - constructor(protected readonly _options: Notification.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Notification.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts index 08f634494cc..eeae565550f 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/health/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Health { } export class Health { - constructor(protected readonly _options: Health.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Health.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts index c45e7382155..11502aa2e9d 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/resources/types/types/MigrationStatus.ts @@ -17,7 +17,6 @@ export type MigrationStatus = * The migration failed. */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts index 32e12a88016..d20f2862feb 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/BasicType.ts @@ -3,7 +3,6 @@ */ export type BasicType = "primitive" | "literal"; - export const BasicType = { Primitive: "primitive", Literal: "literal", diff --git a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts index f61ca784ac5..4ef541c74d4 100644 --- a/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts +++ b/seed/ts-sdk/examples/examples-with-api-reference/src/api/types/ComplexType.ts @@ -3,7 +3,6 @@ */ export type ComplexType = "object" | "union" | "unknown"; - export const ComplexType = { Object: "object", Union: "union", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts index 98ed475d957..86550294c18 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/Client.ts @@ -30,8 +30,24 @@ export declare namespace SeedExamplesClient { } export class SeedExamplesClient { + protected _file: File_ | undefined; + protected _health: Health | undefined; + protected _service: Service | undefined; + constructor(protected readonly _options: SeedExamplesClient.Options) {} + public get file(): File_ { + return (this._file ??= new File_(this._options)); + } + + public get health(): Health { + return (this._health ??= new Health(this._options)); + } + + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {string} request * @param {SeedExamplesClient.RequestOptions} requestOptions - Request-specific configuration. @@ -153,24 +169,6 @@ export class SeedExamplesClient { } } - protected _file: File_ | undefined; - - public get file(): File_ { - return (this._file ??= new File_(this._options)); - } - - protected _health: Health | undefined; - - public get health(): Health { - return (this._health ??= new Health(this._options)); - } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts index 215152278d5..9bb28c947a2 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/client/Client.ts @@ -26,16 +26,15 @@ export declare namespace File_ { } export class File_ { - constructor(protected readonly _options: File_.Options) {} - protected _notification: Notification | undefined; + protected _service: Service | undefined; + + constructor(protected readonly _options: File_.Options) {} public get notification(): Notification { return (this._notification ??= new Notification(this._options)); } - protected _service: Service | undefined; - public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts index b60310ce619..b656ba4419e 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/file/resources/notification/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Notification { } export class Notification { - constructor(protected readonly _options: Notification.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Notification.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts index 08f634494cc..eeae565550f 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/health/client/Client.ts @@ -25,10 +25,10 @@ export declare namespace Health { } export class Health { - constructor(protected readonly _options: Health.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: Health.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts index c45e7382155..11502aa2e9d 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/resources/types/types/MigrationStatus.ts @@ -17,7 +17,6 @@ export type MigrationStatus = * The migration failed. */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts index 32e12a88016..d20f2862feb 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/types/BasicType.ts @@ -3,7 +3,6 @@ */ export type BasicType = "primitive" | "literal"; - export const BasicType = { Primitive: "primitive", Literal: "literal", diff --git a/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts b/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts index f61ca784ac5..4ef541c74d4 100644 --- a/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts +++ b/seed/ts-sdk/examples/retain-original-casing/src/api/types/ComplexType.ts @@ -3,7 +3,6 @@ */ export type ComplexType = "object" | "union" | "unknown"; - export const ComplexType = { Object: "object", Union: "union", diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/allow-extra-fields/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/bigint/src/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/bigint/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/bundle/src/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..2bb2cffb1d4 100644 --- a/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/bundle/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..2bb2cffb1d4 100644 --- a/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/custom-package-json/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts index ac84bf99d12..ecf0e60dc0a 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace FiddleClient { } export class FiddleClient { - constructor(protected readonly _options: FiddleClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: FiddleClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts index 4cd2ac175cf..2bb2cffb1d4 100644 --- a/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/dev-dependencies/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/jsr/src/Client.ts b/seed/ts-sdk/exhaustive/jsr/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/Client.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/jsr/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/no-custom-config/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts index 9da7b36ff52..119821de7f2 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/Client.ts @@ -28,34 +28,30 @@ export declare namespace SeedExhaustiveClient { } export class SeedExhaustiveClient { - constructor(protected readonly _options: SeedExhaustiveClient.Options) {} - protected _endpoints: Endpoints | undefined; + protected _inlinedRequests: InlinedRequests | undefined; + protected _noAuth: NoAuth | undefined; + protected _noReqBody: NoReqBody | undefined; + protected _reqWithHeaders: ReqWithHeaders | undefined; + + constructor(protected readonly _options: SeedExhaustiveClient.Options) {} public get endpoints(): Endpoints { return (this._endpoints ??= new Endpoints(this._options)); } - protected _inlinedRequests: InlinedRequests | undefined; - public get inlinedRequests(): InlinedRequests { return (this._inlinedRequests ??= new InlinedRequests(this._options)); } - protected _noAuth: NoAuth | undefined; - public get noAuth(): NoAuth { return (this._noAuth ??= new NoAuth(this._options)); } - protected _noReqBody: NoReqBody | undefined; - public get noReqBody(): NoReqBody { return (this._noReqBody ??= new NoReqBody(this._options)); } - protected _reqWithHeaders: ReqWithHeaders | undefined; - public get reqWithHeaders(): ReqWithHeaders { return (this._reqWithHeaders ??= new ReqWithHeaders(this._options)); } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts index e3e9747f1f7..280f29aa453 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/endpoints/client/Client.ts @@ -31,52 +31,45 @@ export declare namespace Endpoints { } export class Endpoints { - constructor(protected readonly _options: Endpoints.Options) {} - protected _container: Container | undefined; + protected _contentType: ContentType | undefined; + protected _enum: Enum | undefined; + protected _httpMethods: HttpMethods | undefined; + protected _object: Object_ | undefined; + protected _params: Params | undefined; + protected _primitive: Primitive | undefined; + protected _union: Union | undefined; + + constructor(protected readonly _options: Endpoints.Options) {} public get container(): Container { return (this._container ??= new Container(this._options)); } - protected _contentType: ContentType | undefined; - public get contentType(): ContentType { return (this._contentType ??= new ContentType(this._options)); } - protected _enum: Enum | undefined; - public get enum(): Enum { return (this._enum ??= new Enum(this._options)); } - protected _httpMethods: HttpMethods | undefined; - public get httpMethods(): HttpMethods { return (this._httpMethods ??= new HttpMethods(this._options)); } - protected _object: Object_ | undefined; - public get object(): Object_ { return (this._object ??= new Object_(this._options)); } - protected _params: Params | undefined; - public get params(): Params { return (this._params ??= new Params(this._options)); } - protected _primitive: Primitive | undefined; - public get primitive(): Primitive { return (this._primitive ??= new Primitive(this._options)); } - protected _union: Union | undefined; - public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts index df4b29b1c64..6a0091bb8c0 100644 --- a/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts +++ b/seed/ts-sdk/exhaustive/retain-original-casing/src/api/resources/types/resources/enum/types/WeatherReport.ts @@ -3,7 +3,6 @@ */ export type WeatherReport = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; - export const WeatherReport = { Sunny: "SUNNY", Cloudy: "CLOUDY", diff --git a/seed/ts-sdk/extra-properties/src/Client.ts b/seed/ts-sdk/extra-properties/src/Client.ts index cac7af1b6d0..746bc930c51 100644 --- a/seed/ts-sdk/extra-properties/src/Client.ts +++ b/seed/ts-sdk/extra-properties/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedExtraPropertiesClient { } export class SeedExtraPropertiesClient { - constructor(protected readonly _options: SeedExtraPropertiesClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedExtraPropertiesClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts b/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts index 9aca32bf5c1..b45035e0c17 100644 --- a/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts +++ b/seed/ts-sdk/file-download/file-download-reponse-headers/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileDownloadClient { } export class SeedFileDownloadClient { - constructor(protected readonly _options: SeedFileDownloadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileDownloadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts index 9aca32bf5c1..b45035e0c17 100644 --- a/seed/ts-sdk/file-download/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-download/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileDownloadClient { } export class SeedFileDownloadClient { - constructor(protected readonly _options: SeedFileDownloadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileDownloadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts index d65bcc99609..1d225c25ff2 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileUploadClient { } export class SeedFileUploadClient { - constructor(protected readonly _options: SeedFileUploadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileUploadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts b/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts index b660d8ceb02..7bc09b0223f 100644 --- a/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts +++ b/seed/ts-sdk/file-upload/no-custom-config/src/api/resources/service/types/ObjectType.ts @@ -3,7 +3,6 @@ */ export type ObjectType = "FOO" | "BAR"; - export const ObjectType = { Foo: "FOO", Bar: "BAR", diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts b/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts index d65bcc99609..1d225c25ff2 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts +++ b/seed/ts-sdk/file-upload/wrap-file-properties/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedFileUploadClient { } export class SeedFileUploadClient { - constructor(protected readonly _options: SeedFileUploadClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedFileUploadClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts b/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts index b660d8ceb02..7bc09b0223f 100644 --- a/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts +++ b/seed/ts-sdk/file-upload/wrap-file-properties/src/api/resources/service/types/ObjectType.ts @@ -3,7 +3,6 @@ */ export type ObjectType = "FOO" | "BAR"; - export const ObjectType = { Foo: "FOO", Bar: "BAR", diff --git a/seed/ts-sdk/folders/src/Client.ts b/seed/ts-sdk/folders/src/Client.ts index 1c0fb057786..616b0a0e74b 100644 --- a/seed/ts-sdk/folders/src/Client.ts +++ b/seed/ts-sdk/folders/src/Client.ts @@ -25,8 +25,19 @@ export declare namespace SeedApiClient { } export class SeedApiClient { + protected _a: A | undefined; + protected _folder: Folder | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get a(): A { + return (this._a ??= new A(this._options)); + } + + public get folder(): Folder { + return (this._folder ??= new Folder(this._options)); + } + /** * @param {SeedApiClient.RequestOptions} requestOptions - Request-specific configuration. * @@ -77,16 +88,4 @@ export class SeedApiClient { }); } } - - protected _a: A | undefined; - - public get a(): A { - return (this._a ??= new A(this._options)); - } - - protected _folder: Folder | undefined; - - public get folder(): Folder { - return (this._folder ??= new Folder(this._options)); - } } diff --git a/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts b/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts index c325b854601..2374693fd3a 100644 --- a/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts +++ b/seed/ts-sdk/folders/src/api/resources/a/client/Client.ts @@ -24,16 +24,15 @@ export declare namespace A { } export class A { - constructor(protected readonly _options: A.Options) {} - protected _b: B | undefined; + protected _c: C | undefined; + + constructor(protected readonly _options: A.Options) {} public get b(): B { return (this._b ??= new B(this._options)); } - protected _c: C | undefined; - public get c(): C { return (this._c ??= new C(this._options)); } diff --git a/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts b/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts index d0ad9155ff0..92c243cfbe4 100644 --- a/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts +++ b/seed/ts-sdk/folders/src/api/resources/folder/client/Client.ts @@ -24,8 +24,14 @@ export declare namespace Folder { } export class Folder { + protected _service: Service | undefined; + constructor(protected readonly _options: Folder.Options) {} + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {Folder.RequestOptions} requestOptions - Request-specific configuration. * @@ -76,10 +82,4 @@ export class Folder { }); } } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } } diff --git a/seed/ts-sdk/idempotency-headers/src/Client.ts b/seed/ts-sdk/idempotency-headers/src/Client.ts index e1b06ab66c1..9ecaef8348a 100644 --- a/seed/ts-sdk/idempotency-headers/src/Client.ts +++ b/seed/ts-sdk/idempotency-headers/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedIdempotencyHeadersClient { } export class SeedIdempotencyHeadersClient { - constructor(protected readonly _options: SeedIdempotencyHeadersClient.Options) {} - protected _payment: Payment | undefined; + constructor(protected readonly _options: SeedIdempotencyHeadersClient.Options) {} + public get payment(): Payment { return (this._payment ??= new Payment(this._options)); } diff --git a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts index da77f0c6073..ed2479483c2 100644 --- a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts +++ b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/client/Client.ts @@ -24,11 +24,6 @@ export declare namespace Payment { /** Additional headers to include in the request. */ headers?: Record; } - - interface IdempotentRequestOptions extends RequestOptions { - idempotencyKey: string; - idempotencyExpiration: number; - } } export class Payment { diff --git a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts index 16022be914e..17ebd363838 100644 --- a/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts +++ b/seed/ts-sdk/idempotency-headers/src/api/resources/payment/types/Currency.ts @@ -3,7 +3,6 @@ */ export type Currency = "USD" | "YEN"; - export const Currency = { Usd: "USD", Yen: "YEN", diff --git a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/imdb/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/imdb/no-custom-config/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/imdb/noScripts/src/Client.ts b/seed/ts-sdk/imdb/noScripts/src/Client.ts index ba235fe39a6..93246172fb2 100644 --- a/seed/ts-sdk/imdb/noScripts/src/Client.ts +++ b/seed/ts-sdk/imdb/noScripts/src/Client.ts @@ -24,11 +24,11 @@ export declare namespace SeedApiClient { } export class SeedApiClient { + protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) { } - protected _imdb: Imdb | undefined; - public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/imdb/omit-undefined/src/Client.ts +++ b/seed/ts-sdk/imdb/omit-undefined/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/inline-types/inline/README.md b/seed/ts-sdk/inline-types/inline/README.md index b9101d258f3..3a27a521141 100644 --- a/seed/ts-sdk/inline-types/inline/README.md +++ b/seed/ts-sdk/inline-types/inline/README.md @@ -65,18 +65,6 @@ try { ## Advanced -### Raw Responses - -The SDK provides access to raw response data, including headers, through the `.asRaw()` method. When using `.asRaw()`, -the parsed response body will be available in the `body` field, along with the response headers: - -```typescript -const response = await client.getRoot(...).asRaw(); - -console.log(response.headers['X-My-Header']); -console.log(response.body); -``` - ### Additional Headers If you would like to send additional headers as part of the request, use the `headers` request option. diff --git a/seed/ts-sdk/inline-types/inline/src/Client.ts b/seed/ts-sdk/inline-types/inline/src/Client.ts index 0919c04d936..888489f9147 100644 --- a/seed/ts-sdk/inline-types/inline/src/Client.ts +++ b/seed/ts-sdk/inline-types/inline/src/Client.ts @@ -23,3 +23,213 @@ export declare namespace SeedObjectClient { headers?: Record; } } + +export class SeedObjectClient { + constructor(protected readonly _options: SeedObjectClient.Options) {} + + /** + * @param {SeedObject.PostRootRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getRoot({ + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * }) + */ + public async getRoot( + request: SeedObject.PostRootRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/root"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as SeedObject.RootType1; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError("Timeout exceeded when calling POST /root/root."); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetDiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getDiscriminatedUnion({ + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getDiscriminatedUnion( + request: SeedObject.GetDiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/discriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/discriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetUndiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getUndiscriminatedUnion({ + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getUndiscriminatedUnion( + request: SeedObject.GetUndiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/undiscriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/undiscriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } +} diff --git a/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts b/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts index f3bc63bfba4..734bf3d746d 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetDiscriminatedUnionRequest.ts @@ -29,6 +29,9 @@ export interface GetDiscriminatedUnionRequest { } export namespace GetDiscriminatedUnionRequest { + /** + * lorem ipsum + */ export type Bar = /** * lorem ipsum */ @@ -52,6 +55,9 @@ export namespace GetDiscriminatedUnionRequest { } export namespace DiscriminatedUnion1InlineType1 { + /** + * lorem ipsum + */ export interface Bar { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts b/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts index 26d451b41fe..dda9e5023fe 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/client/requests/GetUndiscriminatedUnionRequest.ts @@ -28,6 +28,9 @@ export interface GetUndiscriminatedUnionRequest { } export namespace GetUndiscriminatedUnionRequest { + /** + * lorem ipsum + */ export type Bar = /** * lorem ipsum */ diff --git a/seed/ts-sdk/inline-types/inline/src/api/client/requests/PostRootRequest.ts b/seed/ts-sdk/inline-types/inline/src/api/client/requests/PostRootRequest.ts index 1905cf98bb5..beab02b7863 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/client/requests/PostRootRequest.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/client/requests/PostRootRequest.ts @@ -17,6 +17,9 @@ export interface PostRootRequest { } export namespace PostRootRequest { + /** + * lorem ipsum + */ export interface Bar { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/inline/src/api/types/ReferenceType.ts b/seed/ts-sdk/inline-types/inline/src/api/types/ReferenceType.ts index d61cd584a28..3754bc9c7e2 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/types/ReferenceType.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/types/ReferenceType.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export interface ReferenceType { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/inline/src/api/types/RootType1.ts b/seed/ts-sdk/inline-types/inline/src/api/types/RootType1.ts index e6a0112403e..6f221f4f03c 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/types/RootType1.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/types/RootType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1 { /** lorem ipsum */ foo: string; @@ -20,6 +23,9 @@ export interface RootType1 { } export namespace RootType1 { + /** + * lorem ipsum + */ export interface Bar { /** lorem ipsum */ foo: string; @@ -30,6 +36,9 @@ export namespace RootType1 { } export namespace Bar { + /** + * lorem ipsum + */ export interface Bar { /** lorem ipsum */ foo: string; @@ -42,6 +51,9 @@ export namespace RootType1 { } export namespace Bar { + /** + * lorem ipsum + */ export type MyEnum = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; export const MyEnum = { Sunny: "SUNNY", @@ -53,6 +65,9 @@ export namespace RootType1 { } export namespace FooMap { + /** + * lorem ipsum + */ export interface Value { /** lorem ipsum */ foo: string; @@ -64,6 +79,9 @@ export namespace RootType1 { type FooList = FooList.Item[]; export namespace FooList { + /** + * lorem ipsum + */ export interface Item { /** lorem ipsum */ foo: string; @@ -75,6 +93,9 @@ export namespace RootType1 { type FooSet = FooSet.Item[]; export namespace FooSet { + /** + * lorem ipsum + */ export interface Item { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/inline/src/api/types/UserId.ts b/seed/ts-sdk/inline-types/inline/src/api/types/UserId.ts index f9c9a8a9a6d..5a6e3e5152f 100644 --- a/seed/ts-sdk/inline-types/inline/src/api/types/UserId.ts +++ b/seed/ts-sdk/inline-types/inline/src/api/types/UserId.ts @@ -2,4 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export type UserId = string; diff --git a/seed/ts-sdk/inline-types/inline/src/core/api-promise/APIPromise.ts b/seed/ts-sdk/inline-types/inline/src/core/api-promise/APIPromise.ts deleted file mode 100644 index 0dadda8a6d7..00000000000 --- a/seed/ts-sdk/inline-types/inline/src/core/api-promise/APIPromise.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { APIResponse } from "../fetcher/APIResponse"; - -/** - * APIPromise wraps a Promise that resolves with an APIResponse. - * It provides convenient methods for handling both successful responses and errors. - * - * By default, when awaited, it will return just the response body data. - * Use the `asRaw()` method to get access to both the response data and headers. - * - * @example - * // Get just the response data - * const data = await apiPromise; - * - * // Get response with headers - * const { data, headers } = await apiPromise.asRaw(); - * - * @template T The type of the successful response body - */ -export class APIPromise extends Promise { - constructor( - private readonly responsePromise: Promise>, - executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void - ) { - super(executor); - } - - public async asRaw(): Promise<{ - data: T; - headers?: Record; - }> { - const response = await this.responsePromise; - if (!response.ok) { - throw response.error; - } - return { - data: response.body, - headers: response.headers, - }; - } - - public static from(responsePromise: Promise>): APIPromise { - return new APIPromise(responsePromise, (resolve, reject) => { - responsePromise - .then((response) => { - if (response.ok) { - resolve(response.body); - } else { - reject(response.error); - } - }) - .catch(reject); - }); - } -} diff --git a/seed/ts-sdk/inline-types/inline/src/core/api-promise/index.ts b/seed/ts-sdk/inline-types/inline/src/core/api-promise/index.ts deleted file mode 100644 index 91b2cf080cd..00000000000 --- a/seed/ts-sdk/inline-types/inline/src/core/api-promise/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { APIPromise } from "./APIPromise"; diff --git a/seed/ts-sdk/inline-types/inline/src/core/index.ts b/seed/ts-sdk/inline-types/inline/src/core/index.ts index 2e6234b11f1..000107d9932 100644 --- a/seed/ts-sdk/inline-types/inline/src/core/index.ts +++ b/seed/ts-sdk/inline-types/inline/src/core/index.ts @@ -1,3 +1,2 @@ export * from "./fetcher"; export * from "./runtime"; -export * from "./api-promise"; diff --git a/seed/ts-sdk/inline-types/no-inline/README.md b/seed/ts-sdk/inline-types/no-inline/README.md index b9101d258f3..3a27a521141 100644 --- a/seed/ts-sdk/inline-types/no-inline/README.md +++ b/seed/ts-sdk/inline-types/no-inline/README.md @@ -65,18 +65,6 @@ try { ## Advanced -### Raw Responses - -The SDK provides access to raw response data, including headers, through the `.asRaw()` method. When using `.asRaw()`, -the parsed response body will be available in the `body` field, along with the response headers: - -```typescript -const response = await client.getRoot(...).asRaw(); - -console.log(response.headers['X-My-Header']); -console.log(response.body); -``` - ### Additional Headers If you would like to send additional headers as part of the request, use the `headers` request option. diff --git a/seed/ts-sdk/inline-types/no-inline/src/Client.ts b/seed/ts-sdk/inline-types/no-inline/src/Client.ts index 0919c04d936..888489f9147 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/Client.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/Client.ts @@ -23,3 +23,213 @@ export declare namespace SeedObjectClient { headers?: Record; } } + +export class SeedObjectClient { + constructor(protected readonly _options: SeedObjectClient.Options) {} + + /** + * @param {SeedObject.PostRootRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getRoot({ + * bar: { + * foo: "foo" + * }, + * foo: "foo" + * }) + */ + public async getRoot( + request: SeedObject.PostRootRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/root"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return _response.body as SeedObject.RootType1; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError("Timeout exceeded when calling POST /root/root."); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetDiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getDiscriminatedUnion({ + * bar: { + * type: "type1", + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getDiscriminatedUnion( + request: SeedObject.GetDiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/discriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/discriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } + + /** + * @param {SeedObject.GetUndiscriminatedUnionRequest} request + * @param {SeedObjectClient.RequestOptions} requestOptions - Request-specific configuration. + * + * @example + * await client.getUndiscriminatedUnion({ + * bar: { + * foo: "foo", + * bar: { + * foo: "foo", + * ref: { + * foo: "foo" + * } + * }, + * ref: { + * foo: "foo" + * } + * }, + * foo: "foo" + * }) + */ + public async getUndiscriminatedUnion( + request: SeedObject.GetUndiscriminatedUnionRequest, + requestOptions?: SeedObjectClient.RequestOptions + ): Promise { + const _response = await core.fetcher({ + url: urlJoin(await core.Supplier.get(this._options.environment), "/root/undiscriminated-union"), + method: "POST", + headers: { + "X-Fern-Language": "JavaScript", + "X-Fern-SDK-Name": "@fern/inline-types", + "X-Fern-SDK-Version": "0.0.1", + "User-Agent": "@fern/inline-types/0.0.1", + "X-Fern-Runtime": core.RUNTIME.type, + "X-Fern-Runtime-Version": core.RUNTIME.version, + ...requestOptions?.headers, + }, + contentType: "application/json", + requestType: "json", + body: request, + timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000, + maxRetries: requestOptions?.maxRetries, + abortSignal: requestOptions?.abortSignal, + }); + if (_response.ok) { + return; + } + + if (_response.error.reason === "status-code") { + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.body, + }); + } + + switch (_response.error.reason) { + case "non-json": + throw new errors.SeedObjectError({ + statusCode: _response.error.statusCode, + body: _response.error.rawBody, + }); + case "timeout": + throw new errors.SeedObjectTimeoutError( + "Timeout exceeded when calling POST /root/undiscriminated-union." + ); + case "unknown": + throw new errors.SeedObjectError({ + message: _response.error.errorMessage, + }); + } + } +} diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts index 8b170e6f6a5..0c87d7c56be 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export type DiscriminatedUnion1 = /** * lorem ipsum */ diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts index 806b834eb13..aee4789e932 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface DiscriminatedUnion1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts index ab21087cb12..259925b7704 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface DiscriminatedUnion1InlineType1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts index b2c6fd01f4f..b90bfb679a2 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/DiscriminatedUnion1InlineType2.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface DiscriminatedUnion1InlineType2 { /** lorem ipsum */ baz: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/InlineEnum1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/InlineEnum1.ts index 09390713bda..c678052d190 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/InlineEnum1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/InlineEnum1.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export type InlineEnum1 = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; export const InlineEnum1 = { Sunny: "SUNNY", diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/ReferenceType.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/ReferenceType.ts index d61cd584a28..3754bc9c7e2 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/ReferenceType.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/ReferenceType.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export interface ReferenceType { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts index b094568bb4b..1e390edb73c 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RequestTypeInlineType1.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export interface RequestTypeInlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1.ts index 0d41623ecb8..d0d33243bcc 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooListItem.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooListItem.ts index fe476c36d6d..0ffcae98837 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooListItem.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooListItem.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1FooListItem { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooMapValue.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooMapValue.ts index 63bcaf40397..431bc3c905f 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooMapValue.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooMapValue.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1FooMapValue { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooSetItem.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooSetItem.ts index 6c501a772eb..b4c3b6b5788 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooSetItem.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1FooSetItem.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1FooSetItem { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1.ts index e4be9b8c09e..786b87523f5 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts index 683aea2f2fb..7f2cca73ba7 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/RootType1InlineType1NestedInlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface RootType1InlineType1NestedInlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts index 8e2d1703356..e27127ef2eb 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export type UndiscriminatedUnion1 = /** * lorem ipsum */ diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts index d304b6acb80..c63cb20ea1b 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export type UndiscriminatedUnion1DiscriminatedUnion1 = /** * lorem ipsum */ diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts index 9860154e089..ed023f35ece 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts index 9f25888ad56..06dc9f4879f 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts index df0e03a8485..a691050422a 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1DiscriminatedUnion1InlineType2.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1DiscriminatedUnion1InlineType2 { /** lorem ipsum */ baz: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts index eb1a3f34e18..b0184d4a8fe 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineEnum1.ts @@ -2,6 +2,9 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export type UndiscriminatedUnion1InlineEnum1 = "SUNNY" | "CLOUDY" | "RAINING" | "SNOWING"; export const UndiscriminatedUnion1InlineEnum1 = { Sunny: "SUNNY", diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts index 190b323b9d9..a4e8738f30e 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineListItem1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineListItem1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts index 1f88e452e37..2c343a1648d 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineMapItem1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineMapItem1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts index e9b7cf77227..bfb627dff7a 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineSetItem1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineSetItem1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts index c41107e088d..cd15e0f5170 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts index 0e36ad82327..104de7c900d 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType1InlineType1.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineType1InlineType1 { /** lorem ipsum */ foo: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts index eba86798a58..ceaf78891a0 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UndiscriminatedUnion1InlineType2.ts @@ -4,6 +4,9 @@ import * as SeedObject from "../index"; +/** + * lorem ipsum + */ export interface UndiscriminatedUnion1InlineType2 { /** lorem ipsum */ baz: string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/api/types/UserId.ts b/seed/ts-sdk/inline-types/no-inline/src/api/types/UserId.ts index f9c9a8a9a6d..5a6e3e5152f 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/api/types/UserId.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/api/types/UserId.ts @@ -2,4 +2,7 @@ * This file was auto-generated by Fern from our API Definition. */ +/** + * lorem ipsum + */ export type UserId = string; diff --git a/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/APIPromise.ts b/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/APIPromise.ts deleted file mode 100644 index 0dadda8a6d7..00000000000 --- a/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/APIPromise.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { APIResponse } from "../fetcher/APIResponse"; - -/** - * APIPromise wraps a Promise that resolves with an APIResponse. - * It provides convenient methods for handling both successful responses and errors. - * - * By default, when awaited, it will return just the response body data. - * Use the `asRaw()` method to get access to both the response data and headers. - * - * @example - * // Get just the response data - * const data = await apiPromise; - * - * // Get response with headers - * const { data, headers } = await apiPromise.asRaw(); - * - * @template T The type of the successful response body - */ -export class APIPromise extends Promise { - constructor( - private readonly responsePromise: Promise>, - executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void - ) { - super(executor); - } - - public async asRaw(): Promise<{ - data: T; - headers?: Record; - }> { - const response = await this.responsePromise; - if (!response.ok) { - throw response.error; - } - return { - data: response.body, - headers: response.headers, - }; - } - - public static from(responsePromise: Promise>): APIPromise { - return new APIPromise(responsePromise, (resolve, reject) => { - responsePromise - .then((response) => { - if (response.ok) { - resolve(response.body); - } else { - reject(response.error); - } - }) - .catch(reject); - }); - } -} diff --git a/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/index.ts b/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/index.ts deleted file mode 100644 index 91b2cf080cd..00000000000 --- a/seed/ts-sdk/inline-types/no-inline/src/core/api-promise/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { APIPromise } from "./APIPromise"; diff --git a/seed/ts-sdk/inline-types/no-inline/src/core/index.ts b/seed/ts-sdk/inline-types/no-inline/src/core/index.ts index 2e6234b11f1..000107d9932 100644 --- a/seed/ts-sdk/inline-types/no-inline/src/core/index.ts +++ b/seed/ts-sdk/inline-types/no-inline/src/core/index.ts @@ -1,3 +1,2 @@ export * from "./fetcher"; export * from "./runtime"; -export * from "./api-promise"; diff --git a/seed/ts-sdk/literal/src/Client.ts b/seed/ts-sdk/literal/src/Client.ts index beae0adc7a1..fab963ef52a 100644 --- a/seed/ts-sdk/literal/src/Client.ts +++ b/seed/ts-sdk/literal/src/Client.ts @@ -35,34 +35,30 @@ export declare namespace SeedLiteralClient { } export class SeedLiteralClient { - constructor(protected readonly _options: SeedLiteralClient.Options) {} - protected _headers: Headers | undefined; + protected _inlined: Inlined | undefined; + protected _path: Path | undefined; + protected _query: Query | undefined; + protected _reference: Reference | undefined; + + constructor(protected readonly _options: SeedLiteralClient.Options) {} public get headers(): Headers { return (this._headers ??= new Headers(this._options)); } - protected _inlined: Inlined | undefined; - public get inlined(): Inlined { return (this._inlined ??= new Inlined(this._options)); } - protected _path: Path | undefined; - public get path(): Path { return (this._path ??= new Path(this._options)); } - protected _query: Query | undefined; - public get query(): Query { return (this._query ??= new Query(this._options)); } - protected _reference: Reference | undefined; - public get reference(): Reference { return (this._reference ??= new Reference(this._options)); } diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts index 905b9f9a158..87bf9228957 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMixedCaseClient { } export class SeedMixedCaseClient { - constructor(protected readonly _options: SeedMixedCaseClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedMixedCaseClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-sdk/mixed-case/no-custom-config/src/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts index 905b9f9a158..87bf9228957 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMixedCaseClient { } export class SeedMixedCaseClient { - constructor(protected readonly _options: SeedMixedCaseClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedMixedCaseClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts index 62f07d2f99a..7205d324fcc 100644 --- a/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts +++ b/seed/ts-sdk/mixed-case/retain-original-casing/src/api/resources/service/types/ResourceStatus.ts @@ -3,7 +3,6 @@ */ export type ResourceStatus = "ACTIVE" | "INACTIVE"; - export const ResourceStatus = { Active: "ACTIVE", Inactive: "INACTIVE", diff --git a/seed/ts-sdk/mixed-file-directory/src/Client.ts b/seed/ts-sdk/mixed-file-directory/src/Client.ts index aae52f6ad82..61326d94564 100644 --- a/seed/ts-sdk/mixed-file-directory/src/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/Client.ts @@ -24,16 +24,15 @@ export declare namespace SeedMixedFileDirectoryClient { } export class SeedMixedFileDirectoryClient { - constructor(protected readonly _options: SeedMixedFileDirectoryClient.Options) {} - protected _organization: Organization | undefined; + protected _user: User | undefined; + + constructor(protected readonly _options: SeedMixedFileDirectoryClient.Options) {} public get organization(): Organization { return (this._organization ??= new Organization(this._options)); } - protected _user: User | undefined; - public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts index 6fb59a7705f..604de03ddde 100644 --- a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/client/Client.ts @@ -27,8 +27,14 @@ export declare namespace User { } export class User { + protected _events: Events | undefined; + constructor(protected readonly _options: User.Options) {} + public get events(): Events { + return (this._events ??= new Events(this._options)); + } + /** * List all users. * @@ -99,10 +105,4 @@ export class User { }); } } - - protected _events: Events | undefined; - - public get events(): Events { - return (this._events ??= new Events(this._options)); - } } diff --git a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts index 2db1db50034..5584e1af374 100644 --- a/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts +++ b/seed/ts-sdk/mixed-file-directory/src/api/resources/user/resources/events/client/Client.ts @@ -27,8 +27,14 @@ export declare namespace Events { } export class Events { + protected _metadata: Metadata | undefined; + constructor(protected readonly _options: Events.Options) {} + public get metadata(): Metadata { + return (this._metadata ??= new Metadata(this._options)); + } + /** * List all user events. * @@ -101,10 +107,4 @@ export class Events { }); } } - - protected _metadata: Metadata | undefined; - - public get metadata(): Metadata { - return (this._metadata ??= new Metadata(this._options)); - } } diff --git a/seed/ts-sdk/multi-line-docs/src/Client.ts b/seed/ts-sdk/multi-line-docs/src/Client.ts index 171ad8f9792..d13fa629e36 100644 --- a/seed/ts-sdk/multi-line-docs/src/Client.ts +++ b/seed/ts-sdk/multi-line-docs/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedMultiLineDocsClient { } export class SeedMultiLineDocsClient { - constructor(protected readonly _options: SeedMultiLineDocsClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedMultiLineDocsClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts b/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts index 8713015fe94..9971b6648f3 100644 --- a/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts +++ b/seed/ts-sdk/multi-line-docs/src/api/types/Operand.ts @@ -19,7 +19,6 @@ export type Operand = * The name and value should be similar * are similar for less than. */ | "less_than"; - export const Operand = { GreaterThan: ">", EqualTo: "=", diff --git a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts index 66409931816..554992f3f04 100644 --- a/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment-no-default/src/Client.ts @@ -29,16 +29,15 @@ export declare namespace SeedMultiUrlEnvironmentNoDefaultClient { } export class SeedMultiUrlEnvironmentNoDefaultClient { - constructor(protected readonly _options: SeedMultiUrlEnvironmentNoDefaultClient.Options) {} - protected _ec2: Ec2 | undefined; + protected _s3: S3 | undefined; + + constructor(protected readonly _options: SeedMultiUrlEnvironmentNoDefaultClient.Options) {} public get ec2(): Ec2 { return (this._ec2 ??= new Ec2(this._options)); } - protected _s3: S3 | undefined; - public get s3(): S3 { return (this._s3 ??= new S3(this._options)); } diff --git a/seed/ts-sdk/multi-url-environment/src/Client.ts b/seed/ts-sdk/multi-url-environment/src/Client.ts index 76916a7df87..a10684d594c 100644 --- a/seed/ts-sdk/multi-url-environment/src/Client.ts +++ b/seed/ts-sdk/multi-url-environment/src/Client.ts @@ -28,16 +28,15 @@ export declare namespace SeedMultiUrlEnvironmentClient { } export class SeedMultiUrlEnvironmentClient { - constructor(protected readonly _options: SeedMultiUrlEnvironmentClient.Options) {} - protected _ec2: Ec2 | undefined; + protected _s3: S3 | undefined; + + constructor(protected readonly _options: SeedMultiUrlEnvironmentClient.Options) {} public get ec2(): Ec2 { return (this._ec2 ??= new Ec2(this._options)); } - protected _s3: S3 | undefined; - public get s3(): S3 { return (this._s3 ??= new S3(this._options)); } diff --git a/seed/ts-sdk/no-environment/src/Client.ts b/seed/ts-sdk/no-environment/src/Client.ts index e1f27033c35..c593b72d1ef 100644 --- a/seed/ts-sdk/no-environment/src/Client.ts +++ b/seed/ts-sdk/no-environment/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedNoEnvironmentClient { } export class SeedNoEnvironmentClient { - constructor(protected readonly _options: SeedNoEnvironmentClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedNoEnvironmentClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts index 8b03b81efbc..150ebb19d83 100644 --- a/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-default/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsDefaultClient { export class SeedOauthClientCredentialsDefaultClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsDefaultClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsDefaultClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts index b859a31d2f8..49e0e32f0c2 100644 --- a/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-environment-variables/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsEnvironmentVariablesClient { export class SeedOauthClientCredentialsEnvironmentVariablesClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsEnvironmentVariablesClient.Options) { const clientId = this._options.clientId ?? process.env["CLIENT_ID"]; @@ -51,8 +52,6 @@ export class SeedOauthClientCredentialsEnvironmentVariablesClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/never-throw-errors/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials-nested-root/no-custom-config/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/oauth-client-credentials/src/Client.ts b/seed/ts-sdk/oauth-client-credentials/src/Client.ts index a370684e3cb..29a66bd2e37 100644 --- a/seed/ts-sdk/oauth-client-credentials/src/Client.ts +++ b/seed/ts-sdk/oauth-client-credentials/src/Client.ts @@ -26,6 +26,7 @@ export declare namespace SeedOauthClientCredentialsClient { export class SeedOauthClientCredentialsClient { private readonly _oauthTokenProvider: core.OAuthTokenProvider; + protected _auth: Auth | undefined; constructor(protected readonly _options: SeedOauthClientCredentialsClient.Options) { this._oauthTokenProvider = new core.OAuthTokenProvider({ @@ -37,8 +38,6 @@ export class SeedOauthClientCredentialsClient { }); } - protected _auth: Auth | undefined; - public get auth(): Auth { return (this._auth ??= new Auth({ ...this._options, diff --git a/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts b/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts index 26407d4b8aa..f2bc29c15db 100644 --- a/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts +++ b/seed/ts-sdk/objects-with-imports/src/api/resources/file/types/FileInfo.ts @@ -16,7 +16,6 @@ export type FileInfo = /** * A directory (e.g. foo/). */ | "DIRECTORY"; - export const FileInfo = { Regular: "REGULAR", Directory: "DIRECTORY", diff --git a/seed/ts-sdk/optional/src/Client.ts b/seed/ts-sdk/optional/src/Client.ts index 96468097b54..fad5fd8d0ea 100644 --- a/seed/ts-sdk/optional/src/Client.ts +++ b/seed/ts-sdk/optional/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedObjectsWithImportsClient { } export class SeedObjectsWithImportsClient { - constructor(protected readonly _options: SeedObjectsWithImportsClient.Options) {} - protected _optional: Optional | undefined; + constructor(protected readonly _options: SeedObjectsWithImportsClient.Options) {} + public get optional(): Optional { return (this._optional ??= new Optional(this._options)); } diff --git a/seed/ts-sdk/package-yml/src/Client.ts b/seed/ts-sdk/package-yml/src/Client.ts index 88c0d2f16c0..74c0d236c13 100644 --- a/seed/ts-sdk/package-yml/src/Client.ts +++ b/seed/ts-sdk/package-yml/src/Client.ts @@ -28,8 +28,14 @@ export declare namespace SeedPackageYmlClient { } export class SeedPackageYmlClient { + protected _service: Service | undefined; + constructor(protected readonly _options: SeedPackageYmlClient.Options) {} + public get service(): Service { + return (this._service ??= new Service(this._options)); + } + /** * @param {SeedPackageYml.EchoRequest} request * @param {SeedPackageYmlClient.RequestOptions} requestOptions - Request-specific configuration. @@ -96,10 +102,4 @@ export class SeedPackageYmlClient { }); } } - - protected _service: Service | undefined; - - public get service(): Service { - return (this._service ??= new Service(this._options)); - } } diff --git a/seed/ts-sdk/pagination/src/Client.ts b/seed/ts-sdk/pagination/src/Client.ts index 327e761ba5b..b7b8d4a8d58 100644 --- a/seed/ts-sdk/pagination/src/Client.ts +++ b/seed/ts-sdk/pagination/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedPaginationClient { } export class SeedPaginationClient { - constructor(protected readonly _options: SeedPaginationClient.Options) {} - protected _users: Users | undefined; + constructor(protected readonly _options: SeedPaginationClient.Options) {} + public get users(): Users { return (this._users ??= new Users(this._options)); } diff --git a/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts b/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts index e5763cabff4..a6405828876 100644 --- a/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts +++ b/seed/ts-sdk/pagination/src/api/resources/users/types/Order.ts @@ -3,7 +3,6 @@ */ export type Order = "asc" | "desc"; - export const Order = { Asc: "asc", Desc: "desc", diff --git a/seed/ts-sdk/path-parameters/src/Client.ts b/seed/ts-sdk/path-parameters/src/Client.ts index 4d69aeee0a4..37998672270 100644 --- a/seed/ts-sdk/path-parameters/src/Client.ts +++ b/seed/ts-sdk/path-parameters/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedPathParametersClient { } export class SeedPathParametersClient { - constructor(protected readonly _options: SeedPathParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedPathParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/plain-text/src/Client.ts b/seed/ts-sdk/plain-text/src/Client.ts index 5328ade7f16..b53a41c2ae8 100644 --- a/seed/ts-sdk/plain-text/src/Client.ts +++ b/seed/ts-sdk/plain-text/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedPlainTextClient { } export class SeedPlainTextClient { - constructor(protected readonly _options: SeedPlainTextClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedPlainTextClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts index 52b8a1e8b7a..3ae49d51366 100644 --- a/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/query-parameters/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedQueryParametersClient { } export class SeedQueryParametersClient { - constructor(protected readonly _options: SeedQueryParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedQueryParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts b/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts index 52b8a1e8b7a..3ae49d51366 100644 --- a/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts +++ b/seed/ts-sdk/query-parameters/no-serde-layer-query/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedQueryParametersClient { } export class SeedQueryParametersClient { - constructor(protected readonly _options: SeedQueryParametersClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedQueryParametersClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/reserved-keywords/src/Client.ts b/seed/ts-sdk/reserved-keywords/src/Client.ts index 863822b6564..25bb8d7f51e 100644 --- a/seed/ts-sdk/reserved-keywords/src/Client.ts +++ b/seed/ts-sdk/reserved-keywords/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedNurseryApiClient { } export class SeedNurseryApiClient { - constructor(protected readonly _options: SeedNurseryApiClient.Options) {} - protected _package: Package | undefined; + constructor(protected readonly _options: SeedNurseryApiClient.Options) {} + public get package(): Package { return (this._package ??= new Package(this._options)); } diff --git a/seed/ts-sdk/response-property/src/Client.ts b/seed/ts-sdk/response-property/src/Client.ts index d6a900c49d9..95e831fc6e3 100644 --- a/seed/ts-sdk/response-property/src/Client.ts +++ b/seed/ts-sdk/response-property/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedResponsePropertyClient { } export class SeedResponsePropertyClient { - constructor(protected readonly _options: SeedResponsePropertyClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedResponsePropertyClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/server-sent-event-examples/src/Client.ts b/seed/ts-sdk/server-sent-event-examples/src/Client.ts index 262e3ccf1e2..77e6ab92912 100644 --- a/seed/ts-sdk/server-sent-event-examples/src/Client.ts +++ b/seed/ts-sdk/server-sent-event-examples/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedServerSentEventsClient { } export class SeedServerSentEventsClient { - constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} - protected _completions: Completions | undefined; + constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} + public get completions(): Completions { return (this._completions ??= new Completions(this._options)); } diff --git a/seed/ts-sdk/server-sent-events/src/Client.ts b/seed/ts-sdk/server-sent-events/src/Client.ts index 262e3ccf1e2..77e6ab92912 100644 --- a/seed/ts-sdk/server-sent-events/src/Client.ts +++ b/seed/ts-sdk/server-sent-events/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedServerSentEventsClient { } export class SeedServerSentEventsClient { - constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} - protected _completions: Completions | undefined; + constructor(protected readonly _options: SeedServerSentEventsClient.Options) {} + public get completions(): Completions { return (this._completions ??= new Completions(this._options)); } diff --git a/seed/ts-sdk/single-url-environment-default/src/Client.ts b/seed/ts-sdk/single-url-environment-default/src/Client.ts index 33641f5a0b8..6602dbe2d42 100644 --- a/seed/ts-sdk/single-url-environment-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-default/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedSingleUrlEnvironmentDefaultClient { } export class SeedSingleUrlEnvironmentDefaultClient { - constructor(protected readonly _options: SeedSingleUrlEnvironmentDefaultClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedSingleUrlEnvironmentDefaultClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts index 5660b88fec7..ed1e9884382 100644 --- a/seed/ts-sdk/single-url-environment-no-default/src/Client.ts +++ b/seed/ts-sdk/single-url-environment-no-default/src/Client.ts @@ -25,10 +25,10 @@ export declare namespace SeedSingleUrlEnvironmentNoDefaultClient { } export class SeedSingleUrlEnvironmentNoDefaultClient { - constructor(protected readonly _options: SeedSingleUrlEnvironmentNoDefaultClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedSingleUrlEnvironmentNoDefaultClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts b/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts index b8a3d466961..6e031d82774 100644 --- a/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts +++ b/seed/ts-sdk/streaming/allow-custom-fetcher/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedStreamingClient { } export class SeedStreamingClient { - constructor(protected readonly _options: SeedStreamingClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedStreamingClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts index a968a322c37..4a12bf2c1a6 100644 --- a/seed/ts-sdk/streaming/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/streaming/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedStreamingClient { } export class SeedStreamingClient { - constructor(protected readonly _options: SeedStreamingClient.Options) {} - protected _dummy: Dummy | undefined; + constructor(protected readonly _options: SeedStreamingClient.Options) {} + public get dummy(): Dummy { return (this._dummy ??= new Dummy(this._options)); } diff --git a/seed/ts-sdk/trace/exhaustive/src/Client.ts b/seed/ts-sdk/trace/exhaustive/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/exhaustive/src/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts index d8f7b5fa4fc..96c2b5aaf69 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts index 33b907f3dd3..1d6e3f19e09 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 4c75fc5b90c..94b02d4adad 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts index ac12d367212..f5d27d3ecf7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts index c66c82a3d7c..bfbd67c25f9 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts index 1fde8fc6512..7460088a2e8 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", _visit: (value: SubmissionTypeEnum, visitor: SubmissionTypeEnum.Visitor) => { diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts index d12b3ac96e0..cdef4245681 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -77,18 +88,6 @@ export class V2 { }; } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/exhaustive/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-custom-config/src/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts index ea7ff879e01..627705ac28b 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -89,18 +100,6 @@ export class V2 { } } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-custom-config/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts index 525147c83e1..5d9a4606e81 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -76,18 +87,6 @@ export class V2 { }; } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-no-throwing/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts index 29bb5b0d035..845a9793bbd 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/Client.ts @@ -36,52 +36,45 @@ export declare namespace SeedTraceClient { } export class SeedTraceClient { - constructor(protected readonly _options: SeedTraceClient.Options = {}) {} - protected _v2: V2 | undefined; + protected _admin: Admin | undefined; + protected _homepage: Homepage | undefined; + protected _migration: Migration | undefined; + protected _playlist: Playlist | undefined; + protected _problem: Problem | undefined; + protected _submission: Submission | undefined; + protected _sysprop: Sysprop | undefined; + + constructor(protected readonly _options: SeedTraceClient.Options = {}) {} public get v2(): V2 { return (this._v2 ??= new V2(this._options)); } - protected _admin: Admin | undefined; - public get admin(): Admin { return (this._admin ??= new Admin(this._options)); } - protected _homepage: Homepage | undefined; - public get homepage(): Homepage { return (this._homepage ??= new Homepage(this._options)); } - protected _migration: Migration | undefined; - public get migration(): Migration { return (this._migration ??= new Migration(this._options)); } - protected _playlist: Playlist | undefined; - public get playlist(): Playlist { return (this._playlist ??= new Playlist(this._options)); } - protected _problem: Problem | undefined; - public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } - protected _submission: Submission | undefined; - public get submission(): Submission { return (this._submission ??= new Submission(this._options)); } - protected _sysprop: Sysprop | undefined; - public get sysprop(): Sysprop { return (this._sysprop ??= new Sysprop(this._options)); } diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts index 0cc47c2d31f..7f1719a43ea 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/commons/types/Language.ts @@ -3,7 +3,6 @@ */ export type Language = "JAVA" | "JAVASCRIPT" | "PYTHON"; - export const Language = { Java: "JAVA", Javascript: "JAVASCRIPT", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts index 0a6bc6f9b03..a38078ae2c0 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/migration/types/MigrationStatus.ts @@ -10,7 +10,6 @@ export type MigrationStatus = * The migration is failed */ | "FAILED" | "FINISHED"; - export const MigrationStatus = { Running: "RUNNING", Failed: "FAILED", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts index 8ccd3d4c13e..a77a48fd64a 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/playlist/types/ReservedKeywordEnum.ts @@ -3,7 +3,6 @@ */ export type ReservedKeywordEnum = "is" | "as"; - export const ReservedKeywordEnum = { Is: "is", As: "as", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts index a14d2035332..3709aaa7a69 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/ExecutionSessionStatus.ts @@ -9,7 +9,6 @@ export type ExecutionSessionStatus = | "RUNNING_CONTAINER" | "LIVE_CONTAINER" | "FAILED_TO_LAUNCH"; - export const ExecutionSessionStatus = { CreatingContainer: "CREATING_CONTAINER", ProvisioningContainer: "PROVISIONING_CONTAINER", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts index 5d15c5180a9..38031ccd887 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/RunningSubmissionState.ts @@ -8,7 +8,6 @@ export type RunningSubmissionState = | "WRITING_SUBMISSION_TO_FILE" | "COMPILING_SUBMISSION" | "RUNNING_SUBMISSION"; - export const RunningSubmissionState = { QueueingSubmission: "QUEUEING_SUBMISSION", KillingHistoricalSubmissions: "KILLING_HISTORICAL_SUBMISSIONS", diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts index bff5583dad7..8414392abfc 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/submission/types/SubmissionTypeEnum.ts @@ -6,7 +6,6 @@ * Keep in sync with SubmissionType. */ export type SubmissionTypeEnum = "TEST"; - export const SubmissionTypeEnum = { Test: "TEST", } as const; diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts index ea7ff879e01..627705ac28b 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/client/Client.ts @@ -31,8 +31,19 @@ export declare namespace V2 { } export class V2 { + protected _problem: Problem | undefined; + protected _v3: V3 | undefined; + constructor(protected readonly _options: V2.Options = {}) {} + public get problem(): Problem { + return (this._problem ??= new Problem(this._options)); + } + + public get v3(): V3 { + return (this._v3 ??= new V3(this._options)); + } + /** * @param {V2.RequestOptions} requestOptions - Request-specific configuration. * @@ -89,18 +100,6 @@ export class V2 { } } - protected _problem: Problem | undefined; - - public get problem(): Problem { - return (this._problem ??= new Problem(this._options)); - } - - protected _v3: V3 | undefined; - - public get v3(): V3 { - return (this._v3 ??= new V3(this._options)); - } - protected async _getAuthorizationHeader(): Promise { const bearer = await core.Supplier.get(this._options.token); if (bearer != null) { diff --git a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts index faa07d6c9d0..4aa14f494e7 100644 --- a/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts +++ b/seed/ts-sdk/trace/no-zurg-trace/src/api/resources/v2/resources/v3/client/Client.ts @@ -29,10 +29,10 @@ export declare namespace V3 { } export class V3 { - constructor(protected readonly _options: V3.Options = {}) {} - protected _problem: Problem | undefined; + constructor(protected readonly _options: V3.Options = {}) {} + public get problem(): Problem { return (this._problem ??= new Problem(this._options)); } diff --git a/seed/ts-sdk/ts-express-casing/src/Client.ts b/seed/ts-sdk/ts-express-casing/src/Client.ts index 16058002bad..f31d80e954d 100644 --- a/seed/ts-sdk/ts-express-casing/src/Client.ts +++ b/seed/ts-sdk/ts-express-casing/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedApiClient { } export class SeedApiClient { - constructor(protected readonly _options: SeedApiClient.Options) {} - protected _imdb: Imdb | undefined; + constructor(protected readonly _options: SeedApiClient.Options) {} + public get imdb(): Imdb { return (this._imdb ??= new Imdb(this._options)); } diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts index 2889e6278b9..2ea9f06ad57 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUndiscriminatedUnionsClient { } export class SeedUndiscriminatedUnionsClient { - constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts index 90f84c1ff15..e40980b26f7 100644 --- a/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts +++ b/seed/ts-sdk/undiscriminated-unions/no-custom-config/src/api/resources/union/types/KeyType.ts @@ -3,7 +3,6 @@ */ export type KeyType = "name" | "value"; - export const KeyType = { Name: "name", Value: "value", diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts index 2889e6278b9..2ea9f06ad57 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUndiscriminatedUnionsClient { } export class SeedUndiscriminatedUnionsClient { - constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUndiscriminatedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts index 90f84c1ff15..e40980b26f7 100644 --- a/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts +++ b/seed/ts-sdk/undiscriminated-unions/skip-response-validation/src/api/resources/union/types/KeyType.ts @@ -3,7 +3,6 @@ */ export type KeyType = "name" | "value"; - export const KeyType = { Name: "name", Value: "value", diff --git a/seed/ts-sdk/unions/src/Client.ts b/seed/ts-sdk/unions/src/Client.ts index fcec22ebc30..dd5a1d445f6 100644 --- a/seed/ts-sdk/unions/src/Client.ts +++ b/seed/ts-sdk/unions/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnionsClient { } export class SeedUnionsClient { - constructor(protected readonly _options: SeedUnionsClient.Options) {} - protected _union: Union | undefined; + constructor(protected readonly _options: SeedUnionsClient.Options) {} + public get union(): Union { return (this._union ??= new Union(this._options)); } diff --git a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts index 5643ebbfd88..a2b8cb10302 100644 --- a/seed/ts-sdk/unknown/no-custom-config/src/Client.ts +++ b/seed/ts-sdk/unknown/no-custom-config/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnknownAsAnyClient { } export class SeedUnknownAsAnyClient { - constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} - protected _unknown: Unknown | undefined; + constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} + public get unknown(): Unknown { return (this._unknown ??= new Unknown(this._options)); } diff --git a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts index 5643ebbfd88..a2b8cb10302 100644 --- a/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts +++ b/seed/ts-sdk/unknown/unknown-as-any/src/Client.ts @@ -23,10 +23,10 @@ export declare namespace SeedUnknownAsAnyClient { } export class SeedUnknownAsAnyClient { - constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} - protected _unknown: Unknown | undefined; + constructor(protected readonly _options: SeedUnknownAsAnyClient.Options) {} + public get unknown(): Unknown { return (this._unknown ??= new Unknown(this._options)); } diff --git a/seed/ts-sdk/validation/src/api/types/Shape.ts b/seed/ts-sdk/validation/src/api/types/Shape.ts index 0d256b8b1c4..d80208737b9 100644 --- a/seed/ts-sdk/validation/src/api/types/Shape.ts +++ b/seed/ts-sdk/validation/src/api/types/Shape.ts @@ -3,7 +3,6 @@ */ export type Shape = "SQUARE" | "CIRCLE" | "TRIANGLE"; - export const Shape = { Square: "SQUARE", Circle: "CIRCLE", diff --git a/seed/ts-sdk/variables/src/Client.ts b/seed/ts-sdk/variables/src/Client.ts index 807156edd09..347bde94942 100644 --- a/seed/ts-sdk/variables/src/Client.ts +++ b/seed/ts-sdk/variables/src/Client.ts @@ -24,10 +24,10 @@ export declare namespace SeedVariablesClient { } export class SeedVariablesClient { - constructor(protected readonly _options: SeedVariablesClient.Options) {} - protected _service: Service | undefined; + constructor(protected readonly _options: SeedVariablesClient.Options) {} + public get service(): Service { return (this._service ??= new Service(this._options)); } diff --git a/seed/ts-sdk/version-no-default/src/Client.ts b/seed/ts-sdk/version-no-default/src/Client.ts index 9ca004ffd1a..d920fc35b56 100644 --- a/seed/ts-sdk/version-no-default/src/Client.ts +++ b/seed/ts-sdk/version-no-default/src/Client.ts @@ -27,10 +27,10 @@ export declare namespace SeedVersionClient { } export class SeedVersionClient { - constructor(protected readonly _options: SeedVersionClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedVersionClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); } diff --git a/seed/ts-sdk/version/src/Client.ts b/seed/ts-sdk/version/src/Client.ts index de3a2acb811..fcdcc08adc6 100644 --- a/seed/ts-sdk/version/src/Client.ts +++ b/seed/ts-sdk/version/src/Client.ts @@ -27,10 +27,10 @@ export declare namespace SeedVersionClient { } export class SeedVersionClient { - constructor(protected readonly _options: SeedVersionClient.Options) {} - protected _user: User | undefined; + constructor(protected readonly _options: SeedVersionClient.Options) {} + public get user(): User { return (this._user ??= new User(this._options)); }