Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
988cfb4
SDK regeneration
fern-api[bot] Apr 13, 2026
e8936dc
SDK regeneration
fern-api[bot] Apr 14, 2026
1d5a4fd
SDK regeneration
fern-api[bot] Apr 14, 2026
b434585
SDK regeneration
fern-api[bot] Apr 14, 2026
11d3541
SDK regeneration
fern-api[bot] Apr 14, 2026
9cb68db
SDK regeneration
fern-api[bot] Apr 15, 2026
ecfbe76
SDK regeneration
fern-api[bot] Apr 15, 2026
80c5562
SDK regeneration
fern-api[bot] Apr 15, 2026
736e819
SDK regeneration
fern-api[bot] Apr 15, 2026
470d8b3
SDK regeneration
fern-api[bot] Apr 15, 2026
449c6f0
SDK regeneration
fern-api[bot] Apr 16, 2026
66d099e
SDK regeneration
fern-api[bot] Apr 23, 2026
ac11ac6
SDK regeneration
fern-api[bot] Apr 23, 2026
e97ccfe
SDK regeneration
fern-api[bot] Apr 23, 2026
8fab2ef
SDK regeneration
fern-api[bot] Apr 28, 2026
aa8306d
SDK regeneration
fern-api[bot] Apr 28, 2026
51fa448
Merge branch 'master' into new-new-templates-n-sections
tve-corti Apr 28, 2026
f083cbb
fix: add default tenant
tve-corti Apr 28, 2026
a6dc04c
SDK regeneration
fern-api[bot] Apr 28, 2026
222f74e
SDK regeneration
fern-api[bot] Apr 28, 2026
006a9ec
SDK regeneration
fern-api[bot] Apr 28, 2026
5e57d7d
SDK regeneration
fern-api[bot] Apr 28, 2026
63d60dc
SDK regeneration
fern-api[bot] Apr 28, 2026
00c5a82
SDK regeneration
fern-api[bot] May 5, 2026
1b6b665
Merge branch 'master' into new-new-templates-n-sections
tve-corti May 5, 2026
636367a
SDK regeneration
fern-api[bot] May 5, 2026
941413f
SDK regeneration
fern-api[bot] May 5, 2026
53f4146
SDK regeneration
fern-api[bot] May 6, 2026
30d0943
SDK regeneration
fern-api[bot] May 6, 2026
55dba97
SDK regeneration
fern-api[bot] May 6, 2026
da07604
SDK regeneration
fern-api[bot] May 6, 2026
3827ac8
SDK regeneration
fern-api[bot] May 6, 2026
e4216c2
SDK regeneration
fern-api[bot] May 6, 2026
12a4ee4
SDK regeneration
fern-api[bot] May 11, 2026
d7d09c5
SDK regeneration
fern-api[bot] May 12, 2026
b461a86
SDK regeneration
fern-api[bot] May 12, 2026
2f9a8c3
SDK regeneration
fern-api[bot] May 12, 2026
0876fbc
SDK regeneration
fern-api[bot] May 12, 2026
3496247
SDK regeneration
fern-api[bot] May 13, 2026
600498b
SDK regeneration
fern-api[bot] May 13, 2026
88e69ef
SDK regeneration
fern-api[bot] May 13, 2026
b5d3282
SDK regeneration
fern-api[bot] May 13, 2026
afe66ea
SDK regeneration
fern-api[bot] May 13, 2026
526e4ee
SDK regeneration
fern-api[bot] May 13, 2026
ac0e2a1
SDK regeneration
fern-api[bot] May 13, 2026
4624ac1
SDK regeneration
fern-api[bot] May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"cliVersion": "4.86.1",
"cliVersion": "5.15.3",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.54.0",
"generatorConfig": {
Expand All @@ -15,7 +15,9 @@
},
"packageJson": {
"scripts": {
"test:integration": "vitest --config vitest.integration.config.mts"
"test:integration": "pnpm test:integration:main && pnpm test:integration:empty-state",
"test:integration:main": "vitest run --config vitest.integration.config.mts --project integration",
"test:integration:empty-state": "vitest run --config vitest.integration.config.mts --project integration-empty-state"
},
"exports": {
"./utils": {
Expand All @@ -32,6 +34,6 @@
}
}
},
"originGitCommit": "23bce53307f0836f2dcd50e82ef0aba136e7ec2f",
"originGitCommit": "d2d0dc77f42a7e837cee698d1a16ce6b3416bda9",
"sdkVersion": "0.0.0-dev"
}
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export type BaseClientOptions = {
/** Specify a custom URL to connect the client to. */
baseUrl?: core.Supplier<string>;
/** Override the Tenant-Name header */
tenantName: core.Supplier<string>;
tenantName?: core.Supplier<string | undefined>;
/** Additional headers to include in requests. */
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
/** The default maximum time to wait for a response in seconds. */
Expand All @@ -31,7 +31,7 @@ export interface BaseRequestOptions {
/** A hook to abort the request. */
abortSignal?: AbortSignal;
/** Override the Tenant-Name header */
tenantName?: string;
tenantName?: string | undefined;
/** Additional query string parameters to include in the request. */
queryParams?: Record<string, unknown>;
/** Additional headers to include in the request. */
Expand Down
30 changes: 30 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
// This file was auto-generated by Fern from our API Definition.

import { AgentsClient } from "./api/resources/agents/client/Client.js";
import { AlphaDocumentsClient } from "./api/resources/alphaDocuments/client/Client.js";
import { AlphaSectionsClient } from "./api/resources/alphaSections/client/Client.js";
import { AlphaSectionVersionsClient } from "./api/resources/alphaSectionVersions/client/Client.js";
import { AlphaTemplatesClient } from "./api/resources/alphaTemplates/client/Client.js";
import { AlphaTemplateVersionsClient } from "./api/resources/alphaTemplateVersions/client/Client.js";
import { AuthClient } from "./api/resources/auth/client/Client.js";
import { CodesClient } from "./api/resources/codes/client/Client.js";
import { DocumentsClient } from "./api/resources/documents/client/Client.js";
Expand Down Expand Up @@ -30,6 +35,11 @@ export class CortiClient {
protected _documents: DocumentsClient | undefined;
protected _templates: TemplatesClient | undefined;
protected _codes: CodesClient | undefined;
protected _alphaTemplates: AlphaTemplatesClient | undefined;
protected _alphaTemplateVersions: AlphaTemplateVersionsClient | undefined;
protected _alphaSections: AlphaSectionsClient | undefined;
protected _alphaSectionVersions: AlphaSectionVersionsClient | undefined;
protected _alphaDocuments: AlphaDocumentsClient | undefined;
protected _agents: AgentsClient | undefined;
protected _stream: StreamClient | undefined;
protected _transcribe: TranscribeClient | undefined;
Expand Down Expand Up @@ -70,6 +80,26 @@ export class CortiClient {
return (this._codes ??= new CodesClient(this._options));
}

public get alphaTemplates(): AlphaTemplatesClient {
return (this._alphaTemplates ??= new AlphaTemplatesClient(this._options));
}

public get alphaTemplateVersions(): AlphaTemplateVersionsClient {
return (this._alphaTemplateVersions ??= new AlphaTemplateVersionsClient(this._options));
}

public get alphaSections(): AlphaSectionsClient {
return (this._alphaSections ??= new AlphaSectionsClient(this._options));
}

public get alphaSectionVersions(): AlphaSectionVersionsClient {
return (this._alphaSectionVersions ??= new AlphaSectionVersionsClient(this._options));
}

public get alphaDocuments(): AlphaDocumentsClient {
return (this._alphaDocuments ??= new AlphaDocumentsClient(this._options));
}

public get agents(): AgentsClient {
return (this._agents ??= new AgentsClient(this._options));
}
Expand Down
3 changes: 1 addition & 2 deletions src/api/errors/UnprocessableEntityError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
import type * as Corti from "../index.js";

export class UnprocessableEntityError extends errors.CortiError {
constructor(body: Corti.AgentsValidationErrorResponse, rawResponse?: core.RawResponse) {
constructor(body?: unknown, rawResponse?: core.RawResponse) {
super({
message: "UnprocessableEntityError",
statusCode: 422,
Expand Down
44 changes: 4 additions & 40 deletions src/api/resources/agents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,7 @@ export class AgentsClient {
case 401:
throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
case 422:
throw new Corti.UnprocessableEntityError(
serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
_response.rawResponse,
);
throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({
statusCode: _response.error.statusCode,
Expand Down Expand Up @@ -429,16 +420,7 @@ export class AgentsClient {
case 404:
throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
case 422:
throw new Corti.UnprocessableEntityError(
serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
_response.rawResponse,
);
throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({
statusCode: _response.error.statusCode,
Expand Down Expand Up @@ -621,16 +603,7 @@ export class AgentsClient {
case 404:
throw new Corti.NotFoundError(_response.error.body, _response.rawResponse);
case 422:
throw new Corti.UnprocessableEntityError(
serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
_response.rawResponse,
);
throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({
statusCode: _response.error.statusCode,
Expand Down Expand Up @@ -909,16 +882,7 @@ export class AgentsClient {
case 401:
throw new Corti.UnauthorizedError(_response.error.body, _response.rawResponse);
case 422:
throw new Corti.UnprocessableEntityError(
serializers.AgentsValidationErrorResponse.parseOrThrow(_response.error.body, {
unrecognizedObjectKeys: "passthrough",
allowUnrecognizedUnionMembers: true,
allowUnrecognizedEnumValues: true,
skipValidation: true,
breadcrumbsPrefix: ["response"],
}),
_response.rawResponse,
);
throw new Corti.UnprocessableEntityError(_response.error.body, _response.rawResponse);
default:
throw new errors.CortiError({
statusCode: _response.error.statusCode,
Expand Down
72 changes: 72 additions & 0 deletions src/api/resources/alphaDocuments/client/Client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// This file was auto-generated by Fern from our API Definition.

import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.js";
import * as core from "../../../../core/index.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";

export declare namespace AlphaDocumentsClient {
export type Options = BaseClientOptions;

export interface RequestOptions extends BaseRequestOptions {}
}

export class AlphaDocumentsClient {
protected readonly _options: NormalizedClientOptionsWithAuth<AlphaDocumentsClient.Options>;

constructor(options: AlphaDocumentsClient.Options) {
this._options = normalizeClientOptionsWithAuth(options);
}

/**
* @param {AlphaDocumentsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @example
* await client.alphaDocuments.generate()
*/
public generate(requestOptions?: AlphaDocumentsClient.RequestOptions): core.HttpResponsePromise<void> {
return core.HttpResponsePromise.fromPromise(this.__generate(requestOptions));
}

private async __generate(
requestOptions?: AlphaDocumentsClient.RequestOptions,
): Promise<core.WithRawResponse<void>> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
_authRequest.headers,
this._options?.headers,
mergeOnlyDefinedHeaders({ "Tenant-Name": requestOptions?.tenantName ?? this._options?.tenantName }),
requestOptions?.headers,
);
const _response = await core.fetcher({
url: core.url.join(
(await core.Supplier.get(this._options.baseUrl)) ??
(await core.Supplier.get(this._options.environment)).base,
"alpha/documents",
),
method: "POST",
headers: _headers,
queryParameters: requestOptions?.queryParams,
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
logging: this._options.logging,
});
if (_response.ok) {
return { data: undefined, rawResponse: _response.rawResponse };
}

if (_response.error.reason === "status-code") {
throw new errors.CortiError({
statusCode: _response.error.statusCode,
body: _response.error.body,
rawResponse: _response.rawResponse,
});
}

return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/alpha/documents");
}
}
1 change: 1 addition & 0 deletions src/api/resources/alphaDocuments/client/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {};
1 change: 1 addition & 0 deletions src/api/resources/alphaDocuments/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from "./client/index.js";
Loading
Loading