Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cliVersion": "5.50.0",
"generatorName": "fernapi/fern-typescript-node-sdk",
"generatorVersion": "3.70.7",
"generatorVersion": "3.88.1",
"generatorConfig": {
"allowCustomFetcher": true,
"includeApiReference": true,
Expand Down Expand Up @@ -53,10 +53,10 @@
]
}
},
"originGitCommit": "2b057076e5ae2f32f2925743ebe8a584917851cc",
"originGitCommit": "008b7147a27272499bf4b17fa96d4357ca3b62e9",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "1.5.9",
"requestedVersion": "1.5.10",
"ciProvider": "github",
"sdkVersion": "1.5.9"
"sdkVersion": "1.5.10"
}
51 changes: 29 additions & 22 deletions .fern/replay.lock

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@schematichq/schematic-typescript-node",
"version": "1.5.9",
"version": "1.5.10",
"private": false,
"repository": {
"type": "git",
Expand Down
5 changes: 0 additions & 5 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9360,7 +9360,6 @@ await client.plans.retryCustomPlanBilling("custom_plan_billing_id", {
```typescript
await client.plans.createCustomPlan({
companyId: "company_id",
description: "description",
name: "name"
});

Expand Down Expand Up @@ -9479,7 +9478,6 @@ await client.plans.listPlans({

```typescript
await client.plans.createPlan({
description: "description",
name: "name",
planType: "plan"
});
Expand Down Expand Up @@ -9760,7 +9758,6 @@ await client.plans.upsertBillingProductPlan("plan_id", {
```typescript
await client.plans.upsertPlanForBillingProduct({
billingProvider: "metronome",
description: "description",
externalResourceId: "external_resource_id",
name: "name",
planType: "plan"
Expand Down Expand Up @@ -10593,7 +10590,6 @@ await client.planbundle.createCustomPlanBundle({
}],
plan: {
companyId: "company_id",
description: "description",
name: "name"
}
});
Expand Down Expand Up @@ -10650,7 +10646,6 @@ await client.planbundle.createPlanBundle({
action: "create"
}],
plan: {
description: "description",
name: "name",
planType: "plan"
}
Expand Down
10 changes: 8 additions & 2 deletions src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export type BaseClientOptions = {
fetcher?: core.FetchFunction;
/** Configure logging for the client. */
logging?: core.logging.LogConfig | core.logging.Logger;
/** Default options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */
stream?: { reconnectionEnabled?: boolean; maxReconnectionAttempts?: number };
/** Override auth. Pass false to disable, a function returning auth headers, an AuthProvider, or auth options. */
auth?: AuthOption;
} & HeaderAuthProvider.AuthOptions;
Expand All @@ -39,8 +41,12 @@ export interface BaseRequestOptions {
abortSignal?: AbortSignal;
/** Additional query string parameters to include in the request. */
queryParams?: Record<string, unknown>;
/** A dictionary containing additional parameters to spread into the request's body. */
additionalBodyParameters?: Record<string, unknown>;
/** Additional headers to include in the request. */
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
/** Options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */
stream?: { reconnectionEnabled?: boolean; maxReconnectionAttempts?: number };
}

export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
Expand All @@ -60,8 +66,8 @@ export function normalizeClientOptions<T extends BaseClientOptions = BaseClientO
{
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@schematichq/schematic-typescript-node",
"X-Fern-SDK-Version": "1.5.9",
"User-Agent": "@schematichq/schematic-typescript-node/1.5.9",
"X-Fern-SDK-Version": "1.5.10",
"User-Agent": "@schematichq/schematic-typescript-node/1.5.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
},
Expand Down
3 changes: 3 additions & 0 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ export class SchematicClient {
/**
* @param {SchematicClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link errors.SchematicError}
* @throws {@link errors.SchematicTimeoutError}
*
* @example
* await client.getCreditLedger()
*/
Expand Down
4 changes: 3 additions & 1 deletion src/api/errors/BadRequestError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as errors from "../../errors/index";
import type * as Schematic from "../index";

export class BadRequestError extends errors.SchematicError {
public declare readonly body: Schematic.ApiError;

constructor(body: Schematic.ApiError, rawResponse?: core.RawResponse) {
super({
message: "BadRequestError",
Expand All @@ -17,6 +19,6 @@ export class BadRequestError extends errors.SchematicError {
Error.captureStackTrace(this, this.constructor);
}

this.name = this.constructor.name;
this.name = "BadRequestError";
}
}
4 changes: 3 additions & 1 deletion src/api/errors/ForbiddenError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as errors from "../../errors/index";
import type * as Schematic from "../index";

export class ForbiddenError extends errors.SchematicError {
public declare readonly body: Schematic.ApiError;

constructor(body: Schematic.ApiError, rawResponse?: core.RawResponse) {
super({
message: "ForbiddenError",
Expand All @@ -17,6 +19,6 @@ export class ForbiddenError extends errors.SchematicError {
Error.captureStackTrace(this, this.constructor);
}

this.name = this.constructor.name;
this.name = "ForbiddenError";
}
}
4 changes: 3 additions & 1 deletion src/api/errors/InternalServerError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as errors from "../../errors/index";
import type * as Schematic from "../index";

export class InternalServerError extends errors.SchematicError {
public declare readonly body: Schematic.ApiError;

constructor(body: Schematic.ApiError, rawResponse?: core.RawResponse) {
super({
message: "InternalServerError",
Expand All @@ -17,6 +19,6 @@ export class InternalServerError extends errors.SchematicError {
Error.captureStackTrace(this, this.constructor);
}

this.name = this.constructor.name;
this.name = "InternalServerError";
}
}
4 changes: 3 additions & 1 deletion src/api/errors/NotFoundError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as errors from "../../errors/index";
import type * as Schematic from "../index";

export class NotFoundError extends errors.SchematicError {
public declare readonly body: Schematic.ApiError;

constructor(body: Schematic.ApiError, rawResponse?: core.RawResponse) {
super({
message: "NotFoundError",
Expand All @@ -17,6 +19,6 @@ export class NotFoundError extends errors.SchematicError {
Error.captureStackTrace(this, this.constructor);
}

this.name = this.constructor.name;
this.name = "NotFoundError";
}
}
4 changes: 3 additions & 1 deletion src/api/errors/UnauthorizedError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import * as errors from "../../errors/index";
import type * as Schematic from "../index";

export class UnauthorizedError extends errors.SchematicError {
public declare readonly body: Schematic.ApiError;

constructor(body: Schematic.ApiError, rawResponse?: core.RawResponse) {
super({
message: "UnauthorizedError",
Expand All @@ -17,6 +19,6 @@ export class UnauthorizedError extends errors.SchematicError {
Error.captureStackTrace(this, this.constructor);
}

this.name = this.constructor.name;
this.name = "UnauthorizedError";
}
}
18 changes: 12 additions & 6 deletions src/api/resources/accesstokens/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClie
import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient";
import * as core from "../../../../core";
import { mergeHeaders } from "../../../../core/headers";
import { mergeAdditionalBodyParameters } from "../../../../core/requestBody";
import * as environments from "../../../../environments";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError";
import * as errors from "../../../../errors/index";
Expand Down Expand Up @@ -32,6 +33,8 @@ export class AccesstokensClient {
* @throws {@link Schematic.ForbiddenError}
* @throws {@link Schematic.NotFoundError}
* @throws {@link Schematic.InternalServerError}
* @throws {@link errors.SchematicError}
* @throws {@link errors.SchematicTimeoutError}
*
* @example
* await client.accesstokens.issueTemporaryAccessToken({
Expand Down Expand Up @@ -69,12 +72,15 @@ export class AccesstokensClient {
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
body: {
...serializers.IssueTemporaryAccessTokenRequestBody.jsonOrThrow(request, {
unrecognizedObjectKeys: "strip",
}),
resource_type: "company",
},
body: mergeAdditionalBodyParameters(
{
...serializers.IssueTemporaryAccessTokenRequestBody.jsonOrThrow(request, {
unrecognizedObjectKeys: "strip",
}),
resource_type: "company",
},
requestOptions?.additionalBodyParameters,
),
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
Expand Down
Loading