diff --git a/.github/workflows/ir-publish.yml b/.github/workflows/ir-publish.yml index a1546acde94..df12a9d7ce4 100644 --- a/.github/workflows/ir-publish.yml +++ b/.github/workflows/ir-publish.yml @@ -25,6 +25,24 @@ jobs: cd packages/ir-sdk version=$(cat fern/apis/ir-types-latest/VERSION) fern generate --api ir-types-latest --group node --version $version + + dynamic-ir: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Install Fern + run: npm install -g fern-api + + - name: Release SDKs + env: + FERN_TOKEN: ${{ secrets.FERN_TOKEN }} + NPM_TOKEN: ${{ secrets.FERN_NPM_TOKEN }} + run: | + cd packages/ir-sdk + version=$(cat fern/apis/ir-types-latest/VERSION) + fern generate --api ir-types-latest --group dynamic-ir --version $version python: runs-on: ubuntu-latest diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION index eae2612ced4..20ecaca5580 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/VERSION +++ b/packages/ir-sdk/fern/apis/ir-types-latest/VERSION @@ -1 +1 @@ -53.15.0 +53.16.0 diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/api.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/api.yml index fad938d2e18..23504fbb1a5 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/api.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/api.yml @@ -1,5 +1,9 @@ name: ir -docs: | - - Add `float` primitive type. - - Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`. - - Add gRPC/Protobuf types. \ No newline at end of file +audiences: + - dynamic + +# Notes: +# - Add dynamic IR and generator-exec config. +# - Add `float` primitive type. +# - Add a `PrimitiveTypeV2` variant for every `PrimitiveTypeV1`. +# - Add gRPC/Protobuf types. \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml index 640689a6eee..be5b3e03e77 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/dynamic/ir.yml @@ -4,6 +4,8 @@ imports: types: ./types.yml types: DynamicIntermediateRepresentation: + audiences: + - dynamic docs: | This represents the IR required to generate dynamic snippets. diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/definition/generator-exec/config.yml b/packages/ir-sdk/fern/apis/ir-types-latest/definition/generator-exec/config.yml new file mode 100644 index 00000000000..22846a5f8fa --- /dev/null +++ b/packages/ir-sdk/fern/apis/ir-types-latest/definition/generator-exec/config.yml @@ -0,0 +1,224 @@ +types: + GeneratorConfig: + audiences: + - dynamic + properties: + dryRun: boolean + irFilepath: string + originalReadmeFilepath: optional + license: optional + output: GeneratorOutputConfig + publish: + type: optional + docs: Deprecated. Use output.mode instead. + workspaceName: string + organization: string + customConfig: unknown + environment: GeneratorEnvironment + whitelabel: boolean + writeUnitTests: boolean + generatePaginatedClients: optional + generateOauthClients: boolean + LicenseConfig: + union: + basic: BasicLicense + custom: CustomLicense + BasicLicense: + properties: + id: LicenseId + LicenseId: + enum: + - MIT + - name: apache2 + value: Apache-2.0 + CustomLicense: + properties: + filename: string + GeneratorOutputConfig: + properties: + path: string + snippetFilepath: optional + snippetTemplateFilepath: optional + publishingMetadata: optional + mode: OutputMode + OutputMode: + union: + publish: GeneratorPublishConfig + downloadFiles: {} + github: GithubOutputMode + GeneratorPublishConfig: + properties: + registries: + type: GeneratorRegistriesConfig + docs: Deprecated, use publishTargets instead. + registriesV2: + type: GeneratorRegistriesConfigV2 + docs: Deprecated, use publishTargets instead. + publishTarget: optional + version: string + GithubOutputMode: + properties: + version: string + repoUrl: + type: string + docs: A full repo url (i.e. https://github.com/fern-api/fern) + installationToken: + type: optional + docs: | + The token scoped to installing the repository. If not specified, the generator + should NOT attempt to clone the repository. + publishInfo: optional + OutputMetadataAuthor: + properties: + name: string + email: string + OutputMetadata: + properties: + description: optional + authors: optional> + PublishingMetadata: + docs: This should effectively be deprecated in favor of a more specific configuration per-output mode (pypi, maven, etc.). + properties: + package_description: optional + publisher_email: optional + reference_url: optional + publisher_name: optional + GithubPublishInfo: + union: + npm: NpmGithubPublishInfo + maven: MavenGithubPublishInfo + postman: PostmanGithubPublishInfo + pypi: PypiGithubPublishInfo + rubygems: RubyGemsGithubPublishInfo + nuget: NugetGithubPublishInfo + EnvironmentVariable: string + NpmGithubPublishInfo: + properties: + registryUrl: string + packageName: string + tokenEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + MavenCentralSignatureGithubInfo: + properties: + keyIdEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + secretKeyEnvironmentVariable: EnvironmentVariable + MavenGithubPublishInfo: + properties: + registryUrl: string + coordinate: string + usernameEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + signature: optional + shouldGeneratePublishWorkflow: optional + PostmanGithubPublishInfo: + properties: + apiKeyEnvironmentVariable: EnvironmentVariable + workspaceIdEnvironmentVariable: EnvironmentVariable + PypiMetadata: + extends: OutputMetadata + properties: + keywords: optional> + documentationLink: optional + homepageLink: optional + PypiGithubPublishInfo: + properties: + registryUrl: string + packageName: string + usernameEnvironmentVariable: EnvironmentVariable + passwordEnvironmentVariable: EnvironmentVariable + pypiMetadata: optional + shouldGeneratePublishWorkflow: optional + RubyGemsGithubPublishInfo: + properties: + registryUrl: string + packageName: string + apiKeyEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + NugetGithubPublishInfo: + properties: + registryUrl: string + packageName: string + apiKeyEnvironmentVariable: EnvironmentVariable + shouldGeneratePublishWorkflow: optional + GeneratorRegistriesConfig: + properties: + maven: MavenRegistryConfig + npm: NpmRegistryConfig + MavenCentralSignature: + properties: + keyId: string + password: string + secretKey: string + MavenRegistryConfig: + properties: + registryUrl: string + username: string + password: string + group: string + signature: optional + NpmRegistryConfig: + properties: + registryUrl: string + token: string + scope: string + GeneratorRegistriesConfigV2: + properties: + maven: MavenRegistryConfigV2 + npm: NpmRegistryConfigV2 + pypi: PypiRegistryConfig + rubygems: RubyGemsRegistryConfig + nuget: NugetRegistryConfig + GeneratorPublishTarget: + union: + maven: MavenRegistryConfigV2 + npm: NpmRegistryConfigV2 + pypi: PypiRegistryConfig + postman: PostmanConfig + rubygems: RubyGemsRegistryConfig + nuget: NugetRegistryConfig + MavenRegistryConfigV2: + properties: + registryUrl: string + username: string + password: string + coordinate: string + signature: optional + NpmRegistryConfigV2: + properties: + registryUrl: string + token: string + packageName: string + PypiRegistryConfig: + properties: + registryUrl: string + username: string + password: string + packageName: string + pypiMetadata: optional + RubyGemsRegistryConfig: + properties: + registryUrl: string + apiKey: string + packageName: string + NugetRegistryConfig: + properties: + registryUrl: string + apiKey: string + packageName: string + PostmanConfig: + properties: + apiKey: string + workspaceId: string + GeneratorEnvironment: + discriminant: + value: _type + name: type + union: + local: {} + remote: RemoteGeneratorEnvironment + RemoteGeneratorEnvironment: + properties: + coordinatorUrl: string + coordinatorUrlV2: string + id: string \ No newline at end of file diff --git a/packages/ir-sdk/fern/apis/ir-types-latest/generators.yml b/packages/ir-sdk/fern/apis/ir-types-latest/generators.yml index 36261cad8ef..0c3295a13b3 100644 --- a/packages/ir-sdk/fern/apis/ir-types-latest/generators.yml +++ b/packages/ir-sdk/fern/apis/ir-types-latest/generators.yml @@ -11,6 +11,19 @@ groups: outputSourceFiles: true includeUtilsOnUnionMembers: true noOptionalProperties: true + dynamic-ir: + audiences: + - dynamic + generators: + - name: fernapi/fern-typescript-node-sdk + version: 0.38.6 + output: + location: npm + package-name: "@fern-api/dynamic-ir-sdk" + token: ${{NPM_TOKEN}} + config: + noOptionalProperties: true + noSerdeLayer: true node: generators: - name: fernapi/fern-typescript-node-sdk diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/index.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/index.ts new file mode 100644 index 00000000000..3e5335fe421 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/index.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/index.ts new file mode 100644 index 00000000000..eea524d6557 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/BasicLicense.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/BasicLicense.ts new file mode 100644 index 00000000000..a47d6a273c7 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/BasicLicense.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface BasicLicense { + id: FernIr.generatorExec.LicenseId; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/CustomLicense.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/CustomLicense.ts new file mode 100644 index 00000000000..878bf309d7b --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/CustomLicense.ts @@ -0,0 +1,7 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface CustomLicense { + filename: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/EnvironmentVariable.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/EnvironmentVariable.ts new file mode 100644 index 00000000000..a4328b9976e --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/EnvironmentVariable.ts @@ -0,0 +1,5 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type EnvironmentVariable = string; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorConfig.ts new file mode 100644 index 00000000000..e61c7fded74 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorConfig.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GeneratorConfig { + dryRun: boolean; + irFilepath: string; + originalReadmeFilepath: string | undefined; + license: FernIr.generatorExec.LicenseConfig | undefined; + output: FernIr.generatorExec.GeneratorOutputConfig; + /** Deprecated. Use output.mode instead. */ + publish: FernIr.generatorExec.GeneratorPublishConfig | undefined; + workspaceName: string; + organization: string; + customConfig: unknown; + environment: FernIr.generatorExec.GeneratorEnvironment; + whitelabel: boolean; + writeUnitTests: boolean; + generatePaginatedClients: boolean | undefined; + generateOauthClients: boolean; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts new file mode 100644 index 00000000000..dd9ebeb0583 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts @@ -0,0 +1,72 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type GeneratorEnvironment = + | FernIr.generatorExec.GeneratorEnvironment.Local + | FernIr.generatorExec.GeneratorEnvironment.Remote; + +export declare namespace GeneratorEnvironment { + interface Local extends _Utils { + type: "local"; + } + + interface Remote extends FernIr.generatorExec.RemoteGeneratorEnvironment, _Utils { + type: "remote"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.generatorExec.GeneratorEnvironment._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + local: () => _Result; + remote: (value: FernIr.generatorExec.RemoteGeneratorEnvironment) => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const GeneratorEnvironment = { + local: (): FernIr.generatorExec.GeneratorEnvironment.Local => { + return { + type: "local", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorEnvironment.Local, + visitor: FernIr.generatorExec.GeneratorEnvironment._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorEnvironment._visit(this, visitor); + }, + }; + }, + + remote: ( + value: FernIr.generatorExec.RemoteGeneratorEnvironment + ): FernIr.generatorExec.GeneratorEnvironment.Remote => { + return { + ...value, + type: "remote", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorEnvironment.Remote, + visitor: FernIr.generatorExec.GeneratorEnvironment._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorEnvironment._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.generatorExec.GeneratorEnvironment, + visitor: FernIr.generatorExec.GeneratorEnvironment._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "local": + return visitor.local(); + case "remote": + return visitor.remote(value); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts new file mode 100644 index 00000000000..9a5a8c03b66 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GeneratorOutputConfig { + path: string; + snippetFilepath: string | undefined; + snippetTemplateFilepath: string | undefined; + publishingMetadata: FernIr.generatorExec.PublishingMetadata | undefined; + mode: FernIr.generatorExec.OutputMode; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts new file mode 100644 index 00000000000..16aee493731 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GeneratorPublishConfig { + /** Deprecated, use publishTargets instead. */ + registries: FernIr.generatorExec.GeneratorRegistriesConfig; + /** Deprecated, use publishTargets instead. */ + registriesV2: FernIr.generatorExec.GeneratorRegistriesConfigV2; + publishTarget: FernIr.generatorExec.GeneratorPublishTarget | undefined; + version: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts new file mode 100644 index 00000000000..a58d2e1cc05 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts @@ -0,0 +1,157 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type GeneratorPublishTarget = + | FernIr.generatorExec.GeneratorPublishTarget.Maven + | FernIr.generatorExec.GeneratorPublishTarget.Npm + | FernIr.generatorExec.GeneratorPublishTarget.Pypi + | FernIr.generatorExec.GeneratorPublishTarget.Postman + | FernIr.generatorExec.GeneratorPublishTarget.Rubygems + | FernIr.generatorExec.GeneratorPublishTarget.Nuget; + +export declare namespace GeneratorPublishTarget { + interface Maven extends FernIr.generatorExec.MavenRegistryConfigV2, _Utils { + type: "maven"; + } + + interface Npm extends FernIr.generatorExec.NpmRegistryConfigV2, _Utils { + type: "npm"; + } + + interface Pypi extends FernIr.generatorExec.PypiRegistryConfig, _Utils { + type: "pypi"; + } + + interface Postman extends FernIr.generatorExec.PostmanConfig, _Utils { + type: "postman"; + } + + interface Rubygems extends FernIr.generatorExec.RubyGemsRegistryConfig, _Utils { + type: "rubygems"; + } + + interface Nuget extends FernIr.generatorExec.NugetRegistryConfig, _Utils { + type: "nuget"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + maven: (value: FernIr.generatorExec.MavenRegistryConfigV2) => _Result; + npm: (value: FernIr.generatorExec.NpmRegistryConfigV2) => _Result; + pypi: (value: FernIr.generatorExec.PypiRegistryConfig) => _Result; + postman: (value: FernIr.generatorExec.PostmanConfig) => _Result; + rubygems: (value: FernIr.generatorExec.RubyGemsRegistryConfig) => _Result; + nuget: (value: FernIr.generatorExec.NugetRegistryConfig) => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const GeneratorPublishTarget = { + maven: (value: FernIr.generatorExec.MavenRegistryConfigV2): FernIr.generatorExec.GeneratorPublishTarget.Maven => { + return { + ...value, + type: "maven", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Maven, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + npm: (value: FernIr.generatorExec.NpmRegistryConfigV2): FernIr.generatorExec.GeneratorPublishTarget.Npm => { + return { + ...value, + type: "npm", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Npm, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + pypi: (value: FernIr.generatorExec.PypiRegistryConfig): FernIr.generatorExec.GeneratorPublishTarget.Pypi => { + return { + ...value, + type: "pypi", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Pypi, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + postman: (value: FernIr.generatorExec.PostmanConfig): FernIr.generatorExec.GeneratorPublishTarget.Postman => { + return { + ...value, + type: "postman", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Postman, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + rubygems: ( + value: FernIr.generatorExec.RubyGemsRegistryConfig + ): FernIr.generatorExec.GeneratorPublishTarget.Rubygems => { + return { + ...value, + type: "rubygems", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Rubygems, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + nuget: (value: FernIr.generatorExec.NugetRegistryConfig): FernIr.generatorExec.GeneratorPublishTarget.Nuget => { + return { + ...value, + type: "nuget", + _visit: function <_Result>( + this: FernIr.generatorExec.GeneratorPublishTarget.Nuget, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ) { + return FernIr.generatorExec.GeneratorPublishTarget._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.generatorExec.GeneratorPublishTarget, + visitor: FernIr.generatorExec.GeneratorPublishTarget._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "maven": + return visitor.maven(value); + case "npm": + return visitor.npm(value); + case "pypi": + return visitor.pypi(value); + case "postman": + return visitor.postman(value); + case "rubygems": + return visitor.rubygems(value); + case "nuget": + return visitor.nuget(value); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts new file mode 100644 index 00000000000..9e3d3bb2b7a --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GeneratorRegistriesConfig { + maven: FernIr.generatorExec.MavenRegistryConfig; + npm: FernIr.generatorExec.NpmRegistryConfig; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts new file mode 100644 index 00000000000..962b5550a65 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GeneratorRegistriesConfigV2 { + maven: FernIr.generatorExec.MavenRegistryConfigV2; + npm: FernIr.generatorExec.NpmRegistryConfigV2; + pypi: FernIr.generatorExec.PypiRegistryConfig; + rubygems: FernIr.generatorExec.RubyGemsRegistryConfig; + nuget: FernIr.generatorExec.NugetRegistryConfig; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubOutputMode.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubOutputMode.ts new file mode 100644 index 00000000000..e28b8606c22 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubOutputMode.ts @@ -0,0 +1,17 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface GithubOutputMode { + version: string; + /** A full repo url (i.e. https://github.com/fern-api/fern) */ + repoUrl: string; + /** + * The token scoped to installing the repository. If not specified, the generator + * should NOT attempt to clone the repository. + */ + installationToken: string | undefined; + publishInfo: FernIr.generatorExec.GithubPublishInfo | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubPublishInfo.ts new file mode 100644 index 00000000000..d2258326946 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/GithubPublishInfo.ts @@ -0,0 +1,157 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type GithubPublishInfo = + | FernIr.generatorExec.GithubPublishInfo.Npm + | FernIr.generatorExec.GithubPublishInfo.Maven + | FernIr.generatorExec.GithubPublishInfo.Postman + | FernIr.generatorExec.GithubPublishInfo.Pypi + | FernIr.generatorExec.GithubPublishInfo.Rubygems + | FernIr.generatorExec.GithubPublishInfo.Nuget; + +export declare namespace GithubPublishInfo { + interface Npm extends FernIr.generatorExec.NpmGithubPublishInfo, _Utils { + type: "npm"; + } + + interface Maven extends FernIr.generatorExec.MavenGithubPublishInfo, _Utils { + type: "maven"; + } + + interface Postman extends FernIr.generatorExec.PostmanGithubPublishInfo, _Utils { + type: "postman"; + } + + interface Pypi extends FernIr.generatorExec.PypiGithubPublishInfo, _Utils { + type: "pypi"; + } + + interface Rubygems extends FernIr.generatorExec.RubyGemsGithubPublishInfo, _Utils { + type: "rubygems"; + } + + interface Nuget extends FernIr.generatorExec.NugetGithubPublishInfo, _Utils { + type: "nuget"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + npm: (value: FernIr.generatorExec.NpmGithubPublishInfo) => _Result; + maven: (value: FernIr.generatorExec.MavenGithubPublishInfo) => _Result; + postman: (value: FernIr.generatorExec.PostmanGithubPublishInfo) => _Result; + pypi: (value: FernIr.generatorExec.PypiGithubPublishInfo) => _Result; + rubygems: (value: FernIr.generatorExec.RubyGemsGithubPublishInfo) => _Result; + nuget: (value: FernIr.generatorExec.NugetGithubPublishInfo) => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const GithubPublishInfo = { + npm: (value: FernIr.generatorExec.NpmGithubPublishInfo): FernIr.generatorExec.GithubPublishInfo.Npm => { + return { + ...value, + type: "npm", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Npm, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + maven: (value: FernIr.generatorExec.MavenGithubPublishInfo): FernIr.generatorExec.GithubPublishInfo.Maven => { + return { + ...value, + type: "maven", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Maven, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + postman: (value: FernIr.generatorExec.PostmanGithubPublishInfo): FernIr.generatorExec.GithubPublishInfo.Postman => { + return { + ...value, + type: "postman", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Postman, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + pypi: (value: FernIr.generatorExec.PypiGithubPublishInfo): FernIr.generatorExec.GithubPublishInfo.Pypi => { + return { + ...value, + type: "pypi", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Pypi, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + rubygems: ( + value: FernIr.generatorExec.RubyGemsGithubPublishInfo + ): FernIr.generatorExec.GithubPublishInfo.Rubygems => { + return { + ...value, + type: "rubygems", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Rubygems, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + nuget: (value: FernIr.generatorExec.NugetGithubPublishInfo): FernIr.generatorExec.GithubPublishInfo.Nuget => { + return { + ...value, + type: "nuget", + _visit: function <_Result>( + this: FernIr.generatorExec.GithubPublishInfo.Nuget, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ) { + return FernIr.generatorExec.GithubPublishInfo._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.generatorExec.GithubPublishInfo, + visitor: FernIr.generatorExec.GithubPublishInfo._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "npm": + return visitor.npm(value); + case "maven": + return visitor.maven(value); + case "postman": + return visitor.postman(value); + case "pypi": + return visitor.pypi(value); + case "rubygems": + return visitor.rubygems(value); + case "nuget": + return visitor.nuget(value); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseConfig.ts new file mode 100644 index 00000000000..0fdb58e03bf --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseConfig.ts @@ -0,0 +1,69 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type LicenseConfig = FernIr.generatorExec.LicenseConfig.Basic | FernIr.generatorExec.LicenseConfig.Custom; + +export declare namespace LicenseConfig { + interface Basic extends FernIr.generatorExec.BasicLicense, _Utils { + type: "basic"; + } + + interface Custom extends FernIr.generatorExec.CustomLicense, _Utils { + type: "custom"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.generatorExec.LicenseConfig._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + basic: (value: FernIr.generatorExec.BasicLicense) => _Result; + custom: (value: FernIr.generatorExec.CustomLicense) => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const LicenseConfig = { + basic: (value: FernIr.generatorExec.BasicLicense): FernIr.generatorExec.LicenseConfig.Basic => { + return { + ...value, + type: "basic", + _visit: function <_Result>( + this: FernIr.generatorExec.LicenseConfig.Basic, + visitor: FernIr.generatorExec.LicenseConfig._Visitor<_Result> + ) { + return FernIr.generatorExec.LicenseConfig._visit(this, visitor); + }, + }; + }, + + custom: (value: FernIr.generatorExec.CustomLicense): FernIr.generatorExec.LicenseConfig.Custom => { + return { + ...value, + type: "custom", + _visit: function <_Result>( + this: FernIr.generatorExec.LicenseConfig.Custom, + visitor: FernIr.generatorExec.LicenseConfig._Visitor<_Result> + ) { + return FernIr.generatorExec.LicenseConfig._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.generatorExec.LicenseConfig, + visitor: FernIr.generatorExec.LicenseConfig._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "basic": + return visitor.basic(value); + case "custom": + return visitor.custom(value); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseId.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseId.ts new file mode 100644 index 00000000000..c7bc747c0ec --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/LicenseId.ts @@ -0,0 +1,28 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export type LicenseId = "MIT" | "Apache-2.0"; + +export const LicenseId = { + Mit: "MIT", + Apache2: "Apache-2.0", + _visit: (value: LicenseId, visitor: LicenseId.Visitor) => { + switch (value) { + case LicenseId.Mit: + return visitor.mit(); + case LicenseId.Apache2: + return visitor.apache2(); + default: + return visitor._other(); + } + }, +} as const; + +export declare namespace LicenseId { + interface Visitor { + mit: () => R; + apache2: () => R; + _other: () => R; + } +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignature.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignature.ts new file mode 100644 index 00000000000..68e3942fd67 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignature.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface MavenCentralSignature { + keyId: string; + password: string; + secretKey: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts new file mode 100644 index 00000000000..9b62cf4a760 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface MavenCentralSignatureGithubInfo { + keyIdEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + passwordEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + secretKeyEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts new file mode 100644 index 00000000000..41af481bab0 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface MavenGithubPublishInfo { + registryUrl: string; + coordinate: string; + usernameEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + passwordEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + signature: FernIr.generatorExec.MavenCentralSignatureGithubInfo | undefined; + shouldGeneratePublishWorkflow: boolean | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts new file mode 100644 index 00000000000..2732de5ccce --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface MavenRegistryConfig { + registryUrl: string; + username: string; + password: string; + group: string; + signature: FernIr.generatorExec.MavenCentralSignature | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts new file mode 100644 index 00000000000..7684872ce62 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface MavenRegistryConfigV2 { + registryUrl: string; + username: string; + password: string; + coordinate: string; + signature: FernIr.generatorExec.MavenCentralSignature | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts new file mode 100644 index 00000000000..8d4410157be --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface NpmGithubPublishInfo { + registryUrl: string; + packageName: string; + tokenEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + shouldGeneratePublishWorkflow: boolean | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts new file mode 100644 index 00000000000..aa3c3ab5da4 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface NpmRegistryConfig { + registryUrl: string; + token: string; + scope: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts new file mode 100644 index 00000000000..db33f034e94 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface NpmRegistryConfigV2 { + registryUrl: string; + token: string; + packageName: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts new file mode 100644 index 00000000000..d1107526baa --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface NugetGithubPublishInfo { + registryUrl: string; + packageName: string; + apiKeyEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + shouldGeneratePublishWorkflow: boolean | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts new file mode 100644 index 00000000000..1d434c11246 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface NugetRegistryConfig { + registryUrl: string; + apiKey: string; + packageName: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadata.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadata.ts new file mode 100644 index 00000000000..07badde5cd8 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadata.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface OutputMetadata { + description: string | undefined; + authors: FernIr.generatorExec.OutputMetadataAuthor[] | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts new file mode 100644 index 00000000000..a6f6230a8f1 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface OutputMetadataAuthor { + name: string; + email: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMode.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMode.ts new file mode 100644 index 00000000000..d965170c3df --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/OutputMode.ts @@ -0,0 +1,91 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export type OutputMode = + | FernIr.generatorExec.OutputMode.Publish + | FernIr.generatorExec.OutputMode.DownloadFiles + | FernIr.generatorExec.OutputMode.Github; + +export declare namespace OutputMode { + interface Publish extends FernIr.generatorExec.GeneratorPublishConfig, _Utils { + type: "publish"; + } + + interface DownloadFiles extends _Utils { + type: "downloadFiles"; + } + + interface Github extends FernIr.generatorExec.GithubOutputMode, _Utils { + type: "github"; + } + + interface _Utils { + _visit: <_Result>(visitor: FernIr.generatorExec.OutputMode._Visitor<_Result>) => _Result; + } + + interface _Visitor<_Result> { + publish: (value: FernIr.generatorExec.GeneratorPublishConfig) => _Result; + downloadFiles: () => _Result; + github: (value: FernIr.generatorExec.GithubOutputMode) => _Result; + _other: (value: { type: string }) => _Result; + } +} + +export const OutputMode = { + publish: (value: FernIr.generatorExec.GeneratorPublishConfig): FernIr.generatorExec.OutputMode.Publish => { + return { + ...value, + type: "publish", + _visit: function <_Result>( + this: FernIr.generatorExec.OutputMode.Publish, + visitor: FernIr.generatorExec.OutputMode._Visitor<_Result> + ) { + return FernIr.generatorExec.OutputMode._visit(this, visitor); + }, + }; + }, + + downloadFiles: (): FernIr.generatorExec.OutputMode.DownloadFiles => { + return { + type: "downloadFiles", + _visit: function <_Result>( + this: FernIr.generatorExec.OutputMode.DownloadFiles, + visitor: FernIr.generatorExec.OutputMode._Visitor<_Result> + ) { + return FernIr.generatorExec.OutputMode._visit(this, visitor); + }, + }; + }, + + github: (value: FernIr.generatorExec.GithubOutputMode): FernIr.generatorExec.OutputMode.Github => { + return { + ...value, + type: "github", + _visit: function <_Result>( + this: FernIr.generatorExec.OutputMode.Github, + visitor: FernIr.generatorExec.OutputMode._Visitor<_Result> + ) { + return FernIr.generatorExec.OutputMode._visit(this, visitor); + }, + }; + }, + + _visit: <_Result>( + value: FernIr.generatorExec.OutputMode, + visitor: FernIr.generatorExec.OutputMode._Visitor<_Result> + ): _Result => { + switch (value.type) { + case "publish": + return visitor.publish(value); + case "downloadFiles": + return visitor.downloadFiles(); + case "github": + return visitor.github(value); + default: + return visitor._other(value as any); + } + }, +} as const; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanConfig.ts new file mode 100644 index 00000000000..b64246aa5b1 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanConfig.ts @@ -0,0 +1,8 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface PostmanConfig { + apiKey: string; + workspaceId: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts new file mode 100644 index 00000000000..40a32adaef9 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts @@ -0,0 +1,10 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface PostmanGithubPublishInfo { + apiKeyEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + workspaceIdEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PublishingMetadata.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PublishingMetadata.ts new file mode 100644 index 00000000000..a0fcf22d3c6 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PublishingMetadata.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +/** + * This should effectively be deprecated in favor of a more specific configuration per-output mode (pypi, maven, etc.). + */ +export interface PublishingMetadata { + packageDescription: string | undefined; + publisherEmail: string | undefined; + referenceUrl: string | undefined; + publisherName: string | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts new file mode 100644 index 00000000000..3f1409cdcef --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts @@ -0,0 +1,14 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface PypiGithubPublishInfo { + registryUrl: string; + packageName: string; + usernameEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + passwordEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + pypiMetadata: FernIr.generatorExec.PypiMetadata | undefined; + shouldGeneratePublishWorkflow: boolean | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiMetadata.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiMetadata.ts new file mode 100644 index 00000000000..0f81c8ae4ed --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiMetadata.ts @@ -0,0 +1,11 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface PypiMetadata extends FernIr.generatorExec.OutputMetadata { + keywords: string[] | undefined; + documentationLink: string | undefined; + homepageLink: string | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts new file mode 100644 index 00000000000..41683635a0e --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts @@ -0,0 +1,13 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface PypiRegistryConfig { + registryUrl: string; + username: string; + password: string; + packageName: string; + pypiMetadata: FernIr.generatorExec.PypiMetadata | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts new file mode 100644 index 00000000000..929aa08cd5e --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface RemoteGeneratorEnvironment { + coordinatorUrl: string; + coordinatorUrlV2: string; + id: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts new file mode 100644 index 00000000000..fe49e7e9c61 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts @@ -0,0 +1,12 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as FernIr from "../../../../../index"; + +export interface RubyGemsGithubPublishInfo { + registryUrl: string; + packageName: string; + apiKeyEnvironmentVariable: FernIr.generatorExec.EnvironmentVariable; + shouldGeneratePublishWorkflow: boolean | undefined; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts new file mode 100644 index 00000000000..ecd84695496 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts @@ -0,0 +1,9 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +export interface RubyGemsRegistryConfig { + registryUrl: string; + apiKey: string; + packageName: string; +} diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/index.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/index.ts new file mode 100644 index 00000000000..1e82187ade3 --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/config/types/index.ts @@ -0,0 +1,36 @@ +export * from "./GeneratorConfig"; +export * from "./LicenseConfig"; +export * from "./BasicLicense"; +export * from "./LicenseId"; +export * from "./CustomLicense"; +export * from "./GeneratorOutputConfig"; +export * from "./OutputMode"; +export * from "./GeneratorPublishConfig"; +export * from "./GithubOutputMode"; +export * from "./OutputMetadataAuthor"; +export * from "./OutputMetadata"; +export * from "./PublishingMetadata"; +export * from "./GithubPublishInfo"; +export * from "./EnvironmentVariable"; +export * from "./NpmGithubPublishInfo"; +export * from "./MavenCentralSignatureGithubInfo"; +export * from "./MavenGithubPublishInfo"; +export * from "./PostmanGithubPublishInfo"; +export * from "./PypiMetadata"; +export * from "./PypiGithubPublishInfo"; +export * from "./RubyGemsGithubPublishInfo"; +export * from "./NugetGithubPublishInfo"; +export * from "./GeneratorRegistriesConfig"; +export * from "./MavenCentralSignature"; +export * from "./MavenRegistryConfig"; +export * from "./NpmRegistryConfig"; +export * from "./GeneratorRegistriesConfigV2"; +export * from "./GeneratorPublishTarget"; +export * from "./MavenRegistryConfigV2"; +export * from "./NpmRegistryConfigV2"; +export * from "./PypiRegistryConfig"; +export * from "./RubyGemsRegistryConfig"; +export * from "./NugetRegistryConfig"; +export * from "./PostmanConfig"; +export * from "./GeneratorEnvironment"; +export * from "./RemoteGeneratorEnvironment"; diff --git a/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/index.ts b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/index.ts new file mode 100644 index 00000000000..020463c11cb --- /dev/null +++ b/packages/ir-sdk/src/sdk/api/resources/generatorExec/resources/index.ts @@ -0,0 +1,2 @@ +export * as config from "./config"; +export * from "./config/types"; diff --git a/packages/ir-sdk/src/sdk/api/resources/index.ts b/packages/ir-sdk/src/sdk/api/resources/index.ts index 33573120659..89d8f1c4f59 100644 --- a/packages/ir-sdk/src/sdk/api/resources/index.ts +++ b/packages/ir-sdk/src/sdk/api/resources/index.ts @@ -9,6 +9,7 @@ export * as environment from "./environment"; export * from "./environment/types"; export * as errors from "./errors"; export * from "./errors/types"; +export * as generatorExec from "./generatorExec"; export * as http from "./http"; export * from "./http/types"; export * as ir from "./ir"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/index.ts new file mode 100644 index 00000000000..3e5335fe421 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/index.ts @@ -0,0 +1 @@ +export * from "./resources"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/index.ts new file mode 100644 index 00000000000..eea524d6557 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/index.ts @@ -0,0 +1 @@ +export * from "./types"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/BasicLicense.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/BasicLicense.ts new file mode 100644 index 00000000000..79708791c60 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/BasicLicense.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { LicenseId } from "./LicenseId"; + +export const BasicLicense: core.serialization.ObjectSchema< + serializers.generatorExec.BasicLicense.Raw, + FernIr.generatorExec.BasicLicense +> = core.serialization.objectWithoutOptionalProperties({ + id: LicenseId, +}); + +export declare namespace BasicLicense { + interface Raw { + id: LicenseId.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/CustomLicense.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/CustomLicense.ts new file mode 100644 index 00000000000..56bf44f1777 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/CustomLicense.ts @@ -0,0 +1,20 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const CustomLicense: core.serialization.ObjectSchema< + serializers.generatorExec.CustomLicense.Raw, + FernIr.generatorExec.CustomLicense +> = core.serialization.objectWithoutOptionalProperties({ + filename: core.serialization.string(), +}); + +export declare namespace CustomLicense { + interface Raw { + filename: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/EnvironmentVariable.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/EnvironmentVariable.ts new file mode 100644 index 00000000000..712401b012d --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/EnvironmentVariable.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const EnvironmentVariable: core.serialization.Schema< + serializers.generatorExec.EnvironmentVariable.Raw, + FernIr.generatorExec.EnvironmentVariable +> = core.serialization.string(); + +export declare namespace EnvironmentVariable { + type Raw = string; +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorConfig.ts new file mode 100644 index 00000000000..ca7f507ac4f --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorConfig.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { LicenseConfig } from "./LicenseConfig"; +import { GeneratorOutputConfig } from "./GeneratorOutputConfig"; +import { GeneratorPublishConfig } from "./GeneratorPublishConfig"; +import { GeneratorEnvironment } from "./GeneratorEnvironment"; + +export const GeneratorConfig: core.serialization.ObjectSchema< + serializers.generatorExec.GeneratorConfig.Raw, + FernIr.generatorExec.GeneratorConfig +> = core.serialization.objectWithoutOptionalProperties({ + dryRun: core.serialization.boolean(), + irFilepath: core.serialization.string(), + originalReadmeFilepath: core.serialization.string().optional(), + license: LicenseConfig.optional(), + output: GeneratorOutputConfig, + publish: GeneratorPublishConfig.optional(), + workspaceName: core.serialization.string(), + organization: core.serialization.string(), + customConfig: core.serialization.unknown(), + environment: GeneratorEnvironment, + whitelabel: core.serialization.boolean(), + writeUnitTests: core.serialization.boolean(), + generatePaginatedClients: core.serialization.boolean().optional(), + generateOauthClients: core.serialization.boolean(), +}); + +export declare namespace GeneratorConfig { + interface Raw { + dryRun: boolean; + irFilepath: string; + originalReadmeFilepath?: string | null; + license?: LicenseConfig.Raw | null; + output: GeneratorOutputConfig.Raw; + publish?: GeneratorPublishConfig.Raw | null; + workspaceName: string; + organization: string; + customConfig?: unknown; + environment: GeneratorEnvironment.Raw; + whitelabel: boolean; + writeUnitTests: boolean; + generatePaginatedClients?: boolean | null; + generateOauthClients: boolean; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts new file mode 100644 index 00000000000..01ee862907f --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorEnvironment.ts @@ -0,0 +1,42 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { RemoteGeneratorEnvironment } from "./RemoteGeneratorEnvironment"; + +export const GeneratorEnvironment: core.serialization.Schema< + serializers.generatorExec.GeneratorEnvironment.Raw, + FernIr.generatorExec.GeneratorEnvironment +> = core.serialization + .union(core.serialization.discriminant("type", "_type"), { + local: core.serialization.object({}), + remote: RemoteGeneratorEnvironment, + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "local": + return FernIr.generatorExec.GeneratorEnvironment.local(); + case "remote": + return FernIr.generatorExec.GeneratorEnvironment.remote(value); + default: + return value as FernIr.generatorExec.GeneratorEnvironment; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace GeneratorEnvironment { + type Raw = GeneratorEnvironment.Local | GeneratorEnvironment.Remote; + + interface Local { + _type: "local"; + } + + interface Remote extends RemoteGeneratorEnvironment.Raw { + _type: "remote"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts new file mode 100644 index 00000000000..61dfeede52b --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorOutputConfig.ts @@ -0,0 +1,30 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { PublishingMetadata } from "./PublishingMetadata"; +import { OutputMode } from "./OutputMode"; + +export const GeneratorOutputConfig: core.serialization.ObjectSchema< + serializers.generatorExec.GeneratorOutputConfig.Raw, + FernIr.generatorExec.GeneratorOutputConfig +> = core.serialization.objectWithoutOptionalProperties({ + path: core.serialization.string(), + snippetFilepath: core.serialization.string().optional(), + snippetTemplateFilepath: core.serialization.string().optional(), + publishingMetadata: PublishingMetadata.optional(), + mode: OutputMode, +}); + +export declare namespace GeneratorOutputConfig { + interface Raw { + path: string; + snippetFilepath?: string | null; + snippetTemplateFilepath?: string | null; + publishingMetadata?: PublishingMetadata.Raw | null; + mode: OutputMode.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts new file mode 100644 index 00000000000..4d8cebdd85e --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishConfig.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { GeneratorRegistriesConfig } from "./GeneratorRegistriesConfig"; +import { GeneratorRegistriesConfigV2 } from "./GeneratorRegistriesConfigV2"; +import { GeneratorPublishTarget } from "./GeneratorPublishTarget"; + +export const GeneratorPublishConfig: core.serialization.ObjectSchema< + serializers.generatorExec.GeneratorPublishConfig.Raw, + FernIr.generatorExec.GeneratorPublishConfig +> = core.serialization.objectWithoutOptionalProperties({ + registries: GeneratorRegistriesConfig, + registriesV2: GeneratorRegistriesConfigV2, + publishTarget: GeneratorPublishTarget.optional(), + version: core.serialization.string(), +}); + +export declare namespace GeneratorPublishConfig { + interface Raw { + registries: GeneratorRegistriesConfig.Raw; + registriesV2: GeneratorRegistriesConfigV2.Raw; + publishTarget?: GeneratorPublishTarget.Raw | null; + version: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts new file mode 100644 index 00000000000..057965b8012 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorPublishTarget.ts @@ -0,0 +1,81 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { MavenRegistryConfigV2 } from "./MavenRegistryConfigV2"; +import { NpmRegistryConfigV2 } from "./NpmRegistryConfigV2"; +import { PypiRegistryConfig } from "./PypiRegistryConfig"; +import { PostmanConfig } from "./PostmanConfig"; +import { RubyGemsRegistryConfig } from "./RubyGemsRegistryConfig"; +import { NugetRegistryConfig } from "./NugetRegistryConfig"; + +export const GeneratorPublishTarget: core.serialization.Schema< + serializers.generatorExec.GeneratorPublishTarget.Raw, + FernIr.generatorExec.GeneratorPublishTarget +> = core.serialization + .union("type", { + maven: MavenRegistryConfigV2, + npm: NpmRegistryConfigV2, + pypi: PypiRegistryConfig, + postman: PostmanConfig, + rubygems: RubyGemsRegistryConfig, + nuget: NugetRegistryConfig, + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "maven": + return FernIr.generatorExec.GeneratorPublishTarget.maven(value); + case "npm": + return FernIr.generatorExec.GeneratorPublishTarget.npm(value); + case "pypi": + return FernIr.generatorExec.GeneratorPublishTarget.pypi(value); + case "postman": + return FernIr.generatorExec.GeneratorPublishTarget.postman(value); + case "rubygems": + return FernIr.generatorExec.GeneratorPublishTarget.rubygems(value); + case "nuget": + return FernIr.generatorExec.GeneratorPublishTarget.nuget(value); + default: + return value as FernIr.generatorExec.GeneratorPublishTarget; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace GeneratorPublishTarget { + type Raw = + | GeneratorPublishTarget.Maven + | GeneratorPublishTarget.Npm + | GeneratorPublishTarget.Pypi + | GeneratorPublishTarget.Postman + | GeneratorPublishTarget.Rubygems + | GeneratorPublishTarget.Nuget; + + interface Maven extends MavenRegistryConfigV2.Raw { + type: "maven"; + } + + interface Npm extends NpmRegistryConfigV2.Raw { + type: "npm"; + } + + interface Pypi extends PypiRegistryConfig.Raw { + type: "pypi"; + } + + interface Postman extends PostmanConfig.Raw { + type: "postman"; + } + + interface Rubygems extends RubyGemsRegistryConfig.Raw { + type: "rubygems"; + } + + interface Nuget extends NugetRegistryConfig.Raw { + type: "nuget"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts new file mode 100644 index 00000000000..cad5dc2dc38 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfig.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { MavenRegistryConfig } from "./MavenRegistryConfig"; +import { NpmRegistryConfig } from "./NpmRegistryConfig"; + +export const GeneratorRegistriesConfig: core.serialization.ObjectSchema< + serializers.generatorExec.GeneratorRegistriesConfig.Raw, + FernIr.generatorExec.GeneratorRegistriesConfig +> = core.serialization.objectWithoutOptionalProperties({ + maven: MavenRegistryConfig, + npm: NpmRegistryConfig, +}); + +export declare namespace GeneratorRegistriesConfig { + interface Raw { + maven: MavenRegistryConfig.Raw; + npm: NpmRegistryConfig.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts new file mode 100644 index 00000000000..48b466a2778 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GeneratorRegistriesConfigV2.ts @@ -0,0 +1,33 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { MavenRegistryConfigV2 } from "./MavenRegistryConfigV2"; +import { NpmRegistryConfigV2 } from "./NpmRegistryConfigV2"; +import { PypiRegistryConfig } from "./PypiRegistryConfig"; +import { RubyGemsRegistryConfig } from "./RubyGemsRegistryConfig"; +import { NugetRegistryConfig } from "./NugetRegistryConfig"; + +export const GeneratorRegistriesConfigV2: core.serialization.ObjectSchema< + serializers.generatorExec.GeneratorRegistriesConfigV2.Raw, + FernIr.generatorExec.GeneratorRegistriesConfigV2 +> = core.serialization.objectWithoutOptionalProperties({ + maven: MavenRegistryConfigV2, + npm: NpmRegistryConfigV2, + pypi: PypiRegistryConfig, + rubygems: RubyGemsRegistryConfig, + nuget: NugetRegistryConfig, +}); + +export declare namespace GeneratorRegistriesConfigV2 { + interface Raw { + maven: MavenRegistryConfigV2.Raw; + npm: NpmRegistryConfigV2.Raw; + pypi: PypiRegistryConfig.Raw; + rubygems: RubyGemsRegistryConfig.Raw; + nuget: NugetRegistryConfig.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubOutputMode.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubOutputMode.ts new file mode 100644 index 00000000000..98272085777 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubOutputMode.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { GithubPublishInfo } from "./GithubPublishInfo"; + +export const GithubOutputMode: core.serialization.ObjectSchema< + serializers.generatorExec.GithubOutputMode.Raw, + FernIr.generatorExec.GithubOutputMode +> = core.serialization.objectWithoutOptionalProperties({ + version: core.serialization.string(), + repoUrl: core.serialization.string(), + installationToken: core.serialization.string().optional(), + publishInfo: GithubPublishInfo.optional(), +}); + +export declare namespace GithubOutputMode { + interface Raw { + version: string; + repoUrl: string; + installationToken?: string | null; + publishInfo?: GithubPublishInfo.Raw | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubPublishInfo.ts new file mode 100644 index 00000000000..3e6ba1d128b --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/GithubPublishInfo.ts @@ -0,0 +1,81 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { NpmGithubPublishInfo } from "./NpmGithubPublishInfo"; +import { MavenGithubPublishInfo } from "./MavenGithubPublishInfo"; +import { PostmanGithubPublishInfo } from "./PostmanGithubPublishInfo"; +import { PypiGithubPublishInfo } from "./PypiGithubPublishInfo"; +import { RubyGemsGithubPublishInfo } from "./RubyGemsGithubPublishInfo"; +import { NugetGithubPublishInfo } from "./NugetGithubPublishInfo"; + +export const GithubPublishInfo: core.serialization.Schema< + serializers.generatorExec.GithubPublishInfo.Raw, + FernIr.generatorExec.GithubPublishInfo +> = core.serialization + .union("type", { + npm: NpmGithubPublishInfo, + maven: MavenGithubPublishInfo, + postman: PostmanGithubPublishInfo, + pypi: PypiGithubPublishInfo, + rubygems: RubyGemsGithubPublishInfo, + nuget: NugetGithubPublishInfo, + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "npm": + return FernIr.generatorExec.GithubPublishInfo.npm(value); + case "maven": + return FernIr.generatorExec.GithubPublishInfo.maven(value); + case "postman": + return FernIr.generatorExec.GithubPublishInfo.postman(value); + case "pypi": + return FernIr.generatorExec.GithubPublishInfo.pypi(value); + case "rubygems": + return FernIr.generatorExec.GithubPublishInfo.rubygems(value); + case "nuget": + return FernIr.generatorExec.GithubPublishInfo.nuget(value); + default: + return value as FernIr.generatorExec.GithubPublishInfo; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace GithubPublishInfo { + type Raw = + | GithubPublishInfo.Npm + | GithubPublishInfo.Maven + | GithubPublishInfo.Postman + | GithubPublishInfo.Pypi + | GithubPublishInfo.Rubygems + | GithubPublishInfo.Nuget; + + interface Npm extends NpmGithubPublishInfo.Raw { + type: "npm"; + } + + interface Maven extends MavenGithubPublishInfo.Raw { + type: "maven"; + } + + interface Postman extends PostmanGithubPublishInfo.Raw { + type: "postman"; + } + + interface Pypi extends PypiGithubPublishInfo.Raw { + type: "pypi"; + } + + interface Rubygems extends RubyGemsGithubPublishInfo.Raw { + type: "rubygems"; + } + + interface Nuget extends NugetGithubPublishInfo.Raw { + type: "nuget"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseConfig.ts new file mode 100644 index 00000000000..b849fdda08f --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseConfig.ts @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { BasicLicense } from "./BasicLicense"; +import { CustomLicense } from "./CustomLicense"; + +export const LicenseConfig: core.serialization.Schema< + serializers.generatorExec.LicenseConfig.Raw, + FernIr.generatorExec.LicenseConfig +> = core.serialization + .union("type", { + basic: BasicLicense, + custom: CustomLicense, + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "basic": + return FernIr.generatorExec.LicenseConfig.basic(value); + case "custom": + return FernIr.generatorExec.LicenseConfig.custom(value); + default: + return value as FernIr.generatorExec.LicenseConfig; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace LicenseConfig { + type Raw = LicenseConfig.Basic | LicenseConfig.Custom; + + interface Basic extends BasicLicense.Raw { + type: "basic"; + } + + interface Custom extends CustomLicense.Raw { + type: "custom"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseId.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseId.ts new file mode 100644 index 00000000000..241fb6ae9ef --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/LicenseId.ts @@ -0,0 +1,16 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const LicenseId: core.serialization.Schema< + serializers.generatorExec.LicenseId.Raw, + FernIr.generatorExec.LicenseId +> = core.serialization.enum_(["MIT", "Apache-2.0"]); + +export declare namespace LicenseId { + type Raw = "MIT" | "Apache-2.0"; +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignature.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignature.ts new file mode 100644 index 00000000000..f7819c337e4 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignature.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const MavenCentralSignature: core.serialization.ObjectSchema< + serializers.generatorExec.MavenCentralSignature.Raw, + FernIr.generatorExec.MavenCentralSignature +> = core.serialization.objectWithoutOptionalProperties({ + keyId: core.serialization.string(), + password: core.serialization.string(), + secretKey: core.serialization.string(), +}); + +export declare namespace MavenCentralSignature { + interface Raw { + keyId: string; + password: string; + secretKey: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts new file mode 100644 index 00000000000..094ec55559e --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenCentralSignatureGithubInfo.ts @@ -0,0 +1,25 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; + +export const MavenCentralSignatureGithubInfo: core.serialization.ObjectSchema< + serializers.generatorExec.MavenCentralSignatureGithubInfo.Raw, + FernIr.generatorExec.MavenCentralSignatureGithubInfo +> = core.serialization.objectWithoutOptionalProperties({ + keyIdEnvironmentVariable: EnvironmentVariable, + passwordEnvironmentVariable: EnvironmentVariable, + secretKeyEnvironmentVariable: EnvironmentVariable, +}); + +export declare namespace MavenCentralSignatureGithubInfo { + interface Raw { + keyIdEnvironmentVariable: EnvironmentVariable.Raw; + passwordEnvironmentVariable: EnvironmentVariable.Raw; + secretKeyEnvironmentVariable: EnvironmentVariable.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts new file mode 100644 index 00000000000..3f482bac489 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenGithubPublishInfo.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; +import { MavenCentralSignatureGithubInfo } from "./MavenCentralSignatureGithubInfo"; + +export const MavenGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.MavenGithubPublishInfo.Raw, + FernIr.generatorExec.MavenGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + coordinate: core.serialization.string(), + usernameEnvironmentVariable: EnvironmentVariable, + passwordEnvironmentVariable: EnvironmentVariable, + signature: MavenCentralSignatureGithubInfo.optional(), + shouldGeneratePublishWorkflow: core.serialization.boolean().optional(), +}); + +export declare namespace MavenGithubPublishInfo { + interface Raw { + registryUrl: string; + coordinate: string; + usernameEnvironmentVariable: EnvironmentVariable.Raw; + passwordEnvironmentVariable: EnvironmentVariable.Raw; + signature?: MavenCentralSignatureGithubInfo.Raw | null; + shouldGeneratePublishWorkflow?: boolean | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts new file mode 100644 index 00000000000..c01ede4b1c1 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfig.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { MavenCentralSignature } from "./MavenCentralSignature"; + +export const MavenRegistryConfig: core.serialization.ObjectSchema< + serializers.generatorExec.MavenRegistryConfig.Raw, + FernIr.generatorExec.MavenRegistryConfig +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + username: core.serialization.string(), + password: core.serialization.string(), + group: core.serialization.string(), + signature: MavenCentralSignature.optional(), +}); + +export declare namespace MavenRegistryConfig { + interface Raw { + registryUrl: string; + username: string; + password: string; + group: string; + signature?: MavenCentralSignature.Raw | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts new file mode 100644 index 00000000000..a303f3eef20 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/MavenRegistryConfigV2.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { MavenCentralSignature } from "./MavenCentralSignature"; + +export const MavenRegistryConfigV2: core.serialization.ObjectSchema< + serializers.generatorExec.MavenRegistryConfigV2.Raw, + FernIr.generatorExec.MavenRegistryConfigV2 +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + username: core.serialization.string(), + password: core.serialization.string(), + coordinate: core.serialization.string(), + signature: MavenCentralSignature.optional(), +}); + +export declare namespace MavenRegistryConfigV2 { + interface Raw { + registryUrl: string; + username: string; + password: string; + coordinate: string; + signature?: MavenCentralSignature.Raw | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts new file mode 100644 index 00000000000..88d38eb4e32 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmGithubPublishInfo.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; + +export const NpmGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.NpmGithubPublishInfo.Raw, + FernIr.generatorExec.NpmGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + packageName: core.serialization.string(), + tokenEnvironmentVariable: EnvironmentVariable, + shouldGeneratePublishWorkflow: core.serialization.boolean().optional(), +}); + +export declare namespace NpmGithubPublishInfo { + interface Raw { + registryUrl: string; + packageName: string; + tokenEnvironmentVariable: EnvironmentVariable.Raw; + shouldGeneratePublishWorkflow?: boolean | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts new file mode 100644 index 00000000000..5776621d33a --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfig.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const NpmRegistryConfig: core.serialization.ObjectSchema< + serializers.generatorExec.NpmRegistryConfig.Raw, + FernIr.generatorExec.NpmRegistryConfig +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + token: core.serialization.string(), + scope: core.serialization.string(), +}); + +export declare namespace NpmRegistryConfig { + interface Raw { + registryUrl: string; + token: string; + scope: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts new file mode 100644 index 00000000000..e823771bf1e --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NpmRegistryConfigV2.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const NpmRegistryConfigV2: core.serialization.ObjectSchema< + serializers.generatorExec.NpmRegistryConfigV2.Raw, + FernIr.generatorExec.NpmRegistryConfigV2 +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + token: core.serialization.string(), + packageName: core.serialization.string(), +}); + +export declare namespace NpmRegistryConfigV2 { + interface Raw { + registryUrl: string; + token: string; + packageName: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts new file mode 100644 index 00000000000..567e17efe82 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetGithubPublishInfo.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; + +export const NugetGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.NugetGithubPublishInfo.Raw, + FernIr.generatorExec.NugetGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + packageName: core.serialization.string(), + apiKeyEnvironmentVariable: EnvironmentVariable, + shouldGeneratePublishWorkflow: core.serialization.boolean().optional(), +}); + +export declare namespace NugetGithubPublishInfo { + interface Raw { + registryUrl: string; + packageName: string; + apiKeyEnvironmentVariable: EnvironmentVariable.Raw; + shouldGeneratePublishWorkflow?: boolean | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts new file mode 100644 index 00000000000..437b388949c --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/NugetRegistryConfig.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const NugetRegistryConfig: core.serialization.ObjectSchema< + serializers.generatorExec.NugetRegistryConfig.Raw, + FernIr.generatorExec.NugetRegistryConfig +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + apiKey: core.serialization.string(), + packageName: core.serialization.string(), +}); + +export declare namespace NugetRegistryConfig { + interface Raw { + registryUrl: string; + apiKey: string; + packageName: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadata.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadata.ts new file mode 100644 index 00000000000..d2e1efeaa38 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadata.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { OutputMetadataAuthor } from "./OutputMetadataAuthor"; + +export const OutputMetadata: core.serialization.ObjectSchema< + serializers.generatorExec.OutputMetadata.Raw, + FernIr.generatorExec.OutputMetadata +> = core.serialization.objectWithoutOptionalProperties({ + description: core.serialization.string().optional(), + authors: core.serialization.list(OutputMetadataAuthor).optional(), +}); + +export declare namespace OutputMetadata { + interface Raw { + description?: string | null; + authors?: OutputMetadataAuthor.Raw[] | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts new file mode 100644 index 00000000000..e6fe6dc53e6 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMetadataAuthor.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const OutputMetadataAuthor: core.serialization.ObjectSchema< + serializers.generatorExec.OutputMetadataAuthor.Raw, + FernIr.generatorExec.OutputMetadataAuthor +> = core.serialization.objectWithoutOptionalProperties({ + name: core.serialization.string(), + email: core.serialization.string(), +}); + +export declare namespace OutputMetadataAuthor { + interface Raw { + name: string; + email: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMode.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMode.ts new file mode 100644 index 00000000000..ea6b9a460c2 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/OutputMode.ts @@ -0,0 +1,50 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { GeneratorPublishConfig } from "./GeneratorPublishConfig"; +import { GithubOutputMode } from "./GithubOutputMode"; + +export const OutputMode: core.serialization.Schema< + serializers.generatorExec.OutputMode.Raw, + FernIr.generatorExec.OutputMode +> = core.serialization + .union("type", { + publish: GeneratorPublishConfig, + downloadFiles: core.serialization.object({}), + github: GithubOutputMode, + }) + .transform({ + transform: (value) => { + switch (value.type) { + case "publish": + return FernIr.generatorExec.OutputMode.publish(value); + case "downloadFiles": + return FernIr.generatorExec.OutputMode.downloadFiles(); + case "github": + return FernIr.generatorExec.OutputMode.github(value); + default: + return value as FernIr.generatorExec.OutputMode; + } + }, + untransform: ({ _visit, ...value }) => value as any, + }); + +export declare namespace OutputMode { + type Raw = OutputMode.Publish | OutputMode.DownloadFiles | OutputMode.Github; + + interface Publish extends GeneratorPublishConfig.Raw { + type: "publish"; + } + + interface DownloadFiles { + type: "downloadFiles"; + } + + interface Github extends GithubOutputMode.Raw { + type: "github"; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanConfig.ts new file mode 100644 index 00000000000..5f935e66d98 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanConfig.ts @@ -0,0 +1,22 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const PostmanConfig: core.serialization.ObjectSchema< + serializers.generatorExec.PostmanConfig.Raw, + FernIr.generatorExec.PostmanConfig +> = core.serialization.objectWithoutOptionalProperties({ + apiKey: core.serialization.string(), + workspaceId: core.serialization.string(), +}); + +export declare namespace PostmanConfig { + interface Raw { + apiKey: string; + workspaceId: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts new file mode 100644 index 00000000000..b440e63a74b --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PostmanGithubPublishInfo.ts @@ -0,0 +1,23 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; + +export const PostmanGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.PostmanGithubPublishInfo.Raw, + FernIr.generatorExec.PostmanGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + apiKeyEnvironmentVariable: EnvironmentVariable, + workspaceIdEnvironmentVariable: EnvironmentVariable, +}); + +export declare namespace PostmanGithubPublishInfo { + interface Raw { + apiKeyEnvironmentVariable: EnvironmentVariable.Raw; + workspaceIdEnvironmentVariable: EnvironmentVariable.Raw; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PublishingMetadata.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PublishingMetadata.ts new file mode 100644 index 00000000000..ca30a604af9 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PublishingMetadata.ts @@ -0,0 +1,26 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const PublishingMetadata: core.serialization.ObjectSchema< + serializers.generatorExec.PublishingMetadata.Raw, + FernIr.generatorExec.PublishingMetadata +> = core.serialization.objectWithoutOptionalProperties({ + packageDescription: core.serialization.property("package_description", core.serialization.string().optional()), + publisherEmail: core.serialization.property("publisher_email", core.serialization.string().optional()), + referenceUrl: core.serialization.property("reference_url", core.serialization.string().optional()), + publisherName: core.serialization.property("publisher_name", core.serialization.string().optional()), +}); + +export declare namespace PublishingMetadata { + interface Raw { + package_description?: string | null; + publisher_email?: string | null; + reference_url?: string | null; + publisher_name?: string | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts new file mode 100644 index 00000000000..bc3d56a89aa --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiGithubPublishInfo.ts @@ -0,0 +1,32 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; +import { PypiMetadata } from "./PypiMetadata"; + +export const PypiGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.PypiGithubPublishInfo.Raw, + FernIr.generatorExec.PypiGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + packageName: core.serialization.string(), + usernameEnvironmentVariable: EnvironmentVariable, + passwordEnvironmentVariable: EnvironmentVariable, + pypiMetadata: PypiMetadata.optional(), + shouldGeneratePublishWorkflow: core.serialization.boolean().optional(), +}); + +export declare namespace PypiGithubPublishInfo { + interface Raw { + registryUrl: string; + packageName: string; + usernameEnvironmentVariable: EnvironmentVariable.Raw; + passwordEnvironmentVariable: EnvironmentVariable.Raw; + pypiMetadata?: PypiMetadata.Raw | null; + shouldGeneratePublishWorkflow?: boolean | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiMetadata.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiMetadata.ts new file mode 100644 index 00000000000..27d2cd43ba2 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiMetadata.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { OutputMetadata } from "./OutputMetadata"; + +export const PypiMetadata: core.serialization.ObjectSchema< + serializers.generatorExec.PypiMetadata.Raw, + FernIr.generatorExec.PypiMetadata +> = core.serialization + .objectWithoutOptionalProperties({ + keywords: core.serialization.list(core.serialization.string()).optional(), + documentationLink: core.serialization.string().optional(), + homepageLink: core.serialization.string().optional(), + }) + .extend(OutputMetadata); + +export declare namespace PypiMetadata { + interface Raw extends OutputMetadata.Raw { + keywords?: string[] | null; + documentationLink?: string | null; + homepageLink?: string | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts new file mode 100644 index 00000000000..a039441c49b --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/PypiRegistryConfig.ts @@ -0,0 +1,29 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { PypiMetadata } from "./PypiMetadata"; + +export const PypiRegistryConfig: core.serialization.ObjectSchema< + serializers.generatorExec.PypiRegistryConfig.Raw, + FernIr.generatorExec.PypiRegistryConfig +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + username: core.serialization.string(), + password: core.serialization.string(), + packageName: core.serialization.string(), + pypiMetadata: PypiMetadata.optional(), +}); + +export declare namespace PypiRegistryConfig { + interface Raw { + registryUrl: string; + username: string; + password: string; + packageName: string; + pypiMetadata?: PypiMetadata.Raw | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts new file mode 100644 index 00000000000..0a9cbc8723e --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RemoteGeneratorEnvironment.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const RemoteGeneratorEnvironment: core.serialization.ObjectSchema< + serializers.generatorExec.RemoteGeneratorEnvironment.Raw, + FernIr.generatorExec.RemoteGeneratorEnvironment +> = core.serialization.objectWithoutOptionalProperties({ + coordinatorUrl: core.serialization.string(), + coordinatorUrlV2: core.serialization.string(), + id: core.serialization.string(), +}); + +export declare namespace RemoteGeneratorEnvironment { + interface Raw { + coordinatorUrl: string; + coordinatorUrlV2: string; + id: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts new file mode 100644 index 00000000000..ca226ac4f22 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsGithubPublishInfo.ts @@ -0,0 +1,27 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; +import { EnvironmentVariable } from "./EnvironmentVariable"; + +export const RubyGemsGithubPublishInfo: core.serialization.ObjectSchema< + serializers.generatorExec.RubyGemsGithubPublishInfo.Raw, + FernIr.generatorExec.RubyGemsGithubPublishInfo +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + packageName: core.serialization.string(), + apiKeyEnvironmentVariable: EnvironmentVariable, + shouldGeneratePublishWorkflow: core.serialization.boolean().optional(), +}); + +export declare namespace RubyGemsGithubPublishInfo { + interface Raw { + registryUrl: string; + packageName: string; + apiKeyEnvironmentVariable: EnvironmentVariable.Raw; + shouldGeneratePublishWorkflow?: boolean | null; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts new file mode 100644 index 00000000000..c148caea363 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/RubyGemsRegistryConfig.ts @@ -0,0 +1,24 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ + +import * as serializers from "../../../../../index"; +import * as FernIr from "../../../../../../api/index"; +import * as core from "../../../../../../core"; + +export const RubyGemsRegistryConfig: core.serialization.ObjectSchema< + serializers.generatorExec.RubyGemsRegistryConfig.Raw, + FernIr.generatorExec.RubyGemsRegistryConfig +> = core.serialization.objectWithoutOptionalProperties({ + registryUrl: core.serialization.string(), + apiKey: core.serialization.string(), + packageName: core.serialization.string(), +}); + +export declare namespace RubyGemsRegistryConfig { + interface Raw { + registryUrl: string; + apiKey: string; + packageName: string; + } +} diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/index.ts new file mode 100644 index 00000000000..1e82187ade3 --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/config/types/index.ts @@ -0,0 +1,36 @@ +export * from "./GeneratorConfig"; +export * from "./LicenseConfig"; +export * from "./BasicLicense"; +export * from "./LicenseId"; +export * from "./CustomLicense"; +export * from "./GeneratorOutputConfig"; +export * from "./OutputMode"; +export * from "./GeneratorPublishConfig"; +export * from "./GithubOutputMode"; +export * from "./OutputMetadataAuthor"; +export * from "./OutputMetadata"; +export * from "./PublishingMetadata"; +export * from "./GithubPublishInfo"; +export * from "./EnvironmentVariable"; +export * from "./NpmGithubPublishInfo"; +export * from "./MavenCentralSignatureGithubInfo"; +export * from "./MavenGithubPublishInfo"; +export * from "./PostmanGithubPublishInfo"; +export * from "./PypiMetadata"; +export * from "./PypiGithubPublishInfo"; +export * from "./RubyGemsGithubPublishInfo"; +export * from "./NugetGithubPublishInfo"; +export * from "./GeneratorRegistriesConfig"; +export * from "./MavenCentralSignature"; +export * from "./MavenRegistryConfig"; +export * from "./NpmRegistryConfig"; +export * from "./GeneratorRegistriesConfigV2"; +export * from "./GeneratorPublishTarget"; +export * from "./MavenRegistryConfigV2"; +export * from "./NpmRegistryConfigV2"; +export * from "./PypiRegistryConfig"; +export * from "./RubyGemsRegistryConfig"; +export * from "./NugetRegistryConfig"; +export * from "./PostmanConfig"; +export * from "./GeneratorEnvironment"; +export * from "./RemoteGeneratorEnvironment"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/index.ts new file mode 100644 index 00000000000..020463c11cb --- /dev/null +++ b/packages/ir-sdk/src/sdk/serialization/resources/generatorExec/resources/index.ts @@ -0,0 +1,2 @@ +export * as config from "./config"; +export * from "./config/types"; diff --git a/packages/ir-sdk/src/sdk/serialization/resources/index.ts b/packages/ir-sdk/src/sdk/serialization/resources/index.ts index 33573120659..89d8f1c4f59 100644 --- a/packages/ir-sdk/src/sdk/serialization/resources/index.ts +++ b/packages/ir-sdk/src/sdk/serialization/resources/index.ts @@ -9,6 +9,7 @@ export * as environment from "./environment"; export * from "./environment/types"; export * as errors from "./errors"; export * from "./errors/types"; +export * as generatorExec from "./generatorExec"; export * as http from "./http"; export * from "./http/types"; export * as ir from "./ir";