Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jan 6, 2025
1 parent 4fd5aed commit f1fdda2
Show file tree
Hide file tree
Showing 73 changed files with 679 additions and 1,384 deletions.
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,6 @@ try {

## Advanced

### Additional Headers

If you would like to send additional headers as part of the request, use the `headers` request option.

```typescript
const response = await client.products.create(..., {
headers: {
'X-Custom-Header': 'custom value'
}
});
```

### Retries

The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/qs": "6.9.8",
"@types/node-fetch": "2.6.9",
"@types/readable-stream": "^4.0.15",
"fetch-mock-jest": "^1.5.1",
"webpack": "^5.94.0",
"ts-loader": "^9.3.1",
"jest": "29.7.0",
Expand Down
2 changes: 0 additions & 2 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ export declare namespace MoniteClient {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down
8 changes: 2 additions & 6 deletions src/api/resources/accessTokens/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace AccessTokens {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -77,7 +75,6 @@ export class AccessTokens {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -111,7 +108,7 @@ export class AccessTokens {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /auth/revoke.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -159,7 +156,6 @@ export class AccessTokens {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -195,7 +191,7 @@ export class AccessTokens {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /auth/token.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
2 changes: 0 additions & 2 deletions src/api/resources/accounting/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ export declare namespace Accounting {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace Connections {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -69,7 +67,6 @@ export class Connections {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -102,7 +99,7 @@ export class Connections {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting_connections.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -145,7 +142,6 @@ export class Connections {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -179,7 +175,7 @@ export class Connections {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling POST /accounting_connections.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -222,7 +218,6 @@ export class Connections {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -255,9 +250,7 @@ export class Connections {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling GET /accounting_connections/{connection_id}."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -300,7 +293,6 @@ export class Connections {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -333,9 +325,7 @@ export class Connections {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling POST /accounting_connections/{connection_id}/disconnect."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -376,7 +366,6 @@ export class Connections {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -409,9 +398,7 @@ export class Connections {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling POST /accounting_connections/{connection_id}/sync."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace LedgerAccounts {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -91,7 +89,6 @@ export class LedgerAccounts {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -125,7 +122,7 @@ export class LedgerAccounts {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /ledger_accounts.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -168,7 +165,6 @@ export class LedgerAccounts {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -201,9 +197,7 @@ export class LedgerAccounts {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling GET /ledger_accounts/{ledger_account_id}."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
10 changes: 2 additions & 8 deletions src/api/resources/accounting/resources/payables/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace Payables {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -87,7 +85,6 @@ export class Payables {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -121,7 +118,7 @@ export class Payables {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting/payables.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -164,7 +161,6 @@ export class Payables {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -197,9 +193,7 @@ export class Payables {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling GET /accounting/payables/{payable_id}."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace Receivables {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -87,7 +85,6 @@ export class Receivables {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -121,7 +118,7 @@ export class Receivables {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting/receivables.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -164,7 +161,6 @@ export class Receivables {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -197,9 +193,7 @@ export class Receivables {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling GET /accounting/receivables/{invoice_id}."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export declare namespace SyncedRecords {
moniteVersion?: string;
/** Override the x-monite-entity-id header */
moniteEntityId?: string | undefined;
/** Additional headers to include in the request. */
headers?: Record<string, string>;
}
}

Expand Down Expand Up @@ -154,7 +152,6 @@ export class SyncedRecords {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
queryParameters: _queryParams,
Expand Down Expand Up @@ -188,7 +185,7 @@ export class SyncedRecords {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError("Timeout exceeded when calling GET /accounting_synced_records.");
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -231,7 +228,6 @@ export class SyncedRecords {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -264,9 +260,7 @@ export class SyncedRecords {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling GET /accounting_synced_records/{synced_record_id}."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down Expand Up @@ -309,7 +303,6 @@ export class SyncedRecords {
"User-Agent": "monite/0.1.0",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
Expand Down Expand Up @@ -342,9 +335,7 @@ export class SyncedRecords {
body: _response.error.rawBody,
});
case "timeout":
throw new errors.MoniteTimeoutError(
"Timeout exceeded when calling POST /accounting_synced_records/{synced_record_id}/push."
);
throw new errors.MoniteTimeoutError();
case "unknown":
throw new errors.MoniteError({
message: _response.error.errorMessage,
Expand Down
Loading

0 comments on commit f1fdda2

Please sign in to comment.