Skip to content

Commit afbca83

Browse files
committed
SDK regeneration
1 parent 12358f9 commit afbca83

File tree

83 files changed

+4687
-2758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+4687
-2758
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88

99
steps:
1010
- name: Checkout repo
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

1313
- name: Set up node
1414
uses: actions/setup-node@v3
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout repo
24-
uses: actions/checkout@v3
24+
uses: actions/checkout@v4
2525

2626
- name: Set up node
2727
uses: actions/setup-node@v3
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Checkout repo
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
- name: Set up node
4040
uses: actions/setup-node@v3
4141
- name: Install dependencies

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@
22

33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ftruefoundry%2Ftruefoundry-typescript-sdk)
44
[![npm shield](https://img.shields.io/npm/v/truefoundry-sdk)](https://www.npmjs.com/package/truefoundry-sdk)
5-
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/truefoundry/truefoundry-typescript-sdk)
65

7-
The Truefoundry TypeScript library provides convenient access to the Truefoundry API from TypeScript.
6+
This library provides convenient access to the TrueFoundry API.
7+
8+
> [!tip]
9+
> You can ask questions about this SDK using DeepWiki
10+
>
11+
> - Python: [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/truefoundry/truefoundry-python-sdk)
12+
> - TypeScript: [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/truefoundry/truefoundry-typescript-sdk)
813
914
## Installation
1015

@@ -70,6 +75,7 @@ try {
7075
console.log(err.statusCode);
7176
console.log(err.message);
7277
console.log(err.body);
78+
console.log(err.rawResponse);
7379
}
7480
}
7581
```
@@ -156,6 +162,18 @@ const response = await client.applications.list(..., {
156162
controller.abort(); // aborts the request
157163
```
158164

165+
### Access Raw Response Data
166+
167+
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
168+
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
169+
170+
```typescript
171+
const { data, rawResponse } = await client.applications.list(...).withRawResponse();
172+
173+
console.log(data);
174+
console.log(rawResponse.headers['X-My-Header']);
175+
```
176+
159177
### Runtime Compatibility
160178

161179
The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
@@ -170,7 +188,7 @@ runtimes:
170188

171189
### Customizing Fetch Client
172190

173-
The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an
191+
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
174192
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
175193

176194
```typescript

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@
3939
"fs": false,
4040
"os": false,
4141
"path": false
42-
}
42+
},
43+
"packageManager": "[email protected]"
4344
}

reference.md

Lines changed: 5 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,78 +1171,6 @@ await client.virtualAccounts.delete("id");
11711171

11721172
## Secrets
11731173

1174-
<details><summary><code>client.secrets.<a href="/src/api/resources/secrets/client/Client.ts">list</a>({ ...params }) -> core.Page<TrueFoundry.Secret></code></summary>
1175-
<dl>
1176-
<dd>
1177-
1178-
#### 📝 Description
1179-
1180-
<dl>
1181-
<dd>
1182-
1183-
<dl>
1184-
<dd>
1185-
1186-
List secrets associated with a user filtered with optional parameters passed in the body.
1187-
1188-
</dd>
1189-
</dl>
1190-
</dd>
1191-
</dl>
1192-
1193-
#### 🔌 Usage
1194-
1195-
<dl>
1196-
<dd>
1197-
1198-
<dl>
1199-
<dd>
1200-
1201-
```typescript
1202-
const response = await client.secrets.list();
1203-
for await (const item of response) {
1204-
console.log(item);
1205-
}
1206-
1207-
// Or you can manually iterate page-by-page
1208-
const page = await client.secrets.list();
1209-
while (page.hasNextPage()) {
1210-
page = page.getNextPage();
1211-
}
1212-
```
1213-
1214-
</dd>
1215-
</dl>
1216-
</dd>
1217-
</dl>
1218-
1219-
#### ⚙️ Parameters
1220-
1221-
<dl>
1222-
<dd>
1223-
1224-
<dl>
1225-
<dd>
1226-
1227-
**request:** `TrueFoundry.ListSecretsRequest`
1228-
1229-
</dd>
1230-
</dl>
1231-
1232-
<dl>
1233-
<dd>
1234-
1235-
**requestOptions:** `Secrets.RequestOptions`
1236-
1237-
</dd>
1238-
</dl>
1239-
</dd>
1240-
</dl>
1241-
1242-
</dd>
1243-
</dl>
1244-
</details>
1245-
12461174
<details><summary><code>client.secrets.<a href="/src/api/resources/secrets/client/Client.ts">get</a>(id) -> TrueFoundry.GetSecretResponse</code></summary>
12471175
<dl>
12481176
<dd>
@@ -1255,7 +1183,7 @@ while (page.hasNextPage()) {
12551183
<dl>
12561184
<dd>
12571185

1258-
Get Secret associated with provided id
1186+
Get Secret associated with provided id. The secret value is not returned if the control plane has `DISABLE_SECRET_VALUE_VIEW` set
12591187

12601188
</dd>
12611189
</dl>
@@ -1383,7 +1311,7 @@ await client.secrets.delete("id");
13831311
<dl>
13841312
<dd>
13851313

1386-
List the secret groups associated with a user along with the associated secrets for each group. Filtered with the options passed in the query fields.
1314+
List the secret groups associated with a user along with the associated secrets for each group. Filtered with the options passed in the query fields. Note: This method does not return the secret values of the <em>associatedSecrets</em> in the response. A separate API call to `/v1/secrets/{id}` should be made to fetch the associated secret value.
13871315

13881316
</dd>
13891317
</dl>
@@ -1461,7 +1389,7 @@ while (page.hasNextPage()) {
14611389
<dl>
14621390
<dd>
14631391

1464-
Creates a secret group with secrets in it. A secret version for each of the created secret is created with version number as 1. The returned secret group does not have any secrets in the <em>associatedSecrets</em> field. A separate API call should be made to fetch the associated secrets.
1392+
Creates a secret group with secrets in it. A secret version for each of the created secret is created with version number as 1. The returned secret group does not have any secret values in the <em>associatedSecrets</em> field. A separate API call to `/v1/secrets/{id}` should be made to fetch the associated secret value.
14651393

14661394
</dd>
14671395
</dl>
@@ -1533,7 +1461,7 @@ await client.secretGroups.create({
15331461
<dl>
15341462
<dd>
15351463

1536-
Get Secret Group associated with provided secretGroup id
1464+
Get Secret Group by id. This method does not return the secret values of the <em>associatedSecrets</em> in the response. A separate API call to `/v1/secrets/{id}` should be made to fetch the associated secret value.
15371465

15381466
</dd>
15391467
</dl>
@@ -1596,7 +1524,7 @@ await client.secretGroups.get("id");
15961524
<dl>
15971525
<dd>
15981526

1599-
Updates the secrets in a secret group with new values. A new secret version is created for every secret that has a modified value. Returns the updated secret group. The returned secret group does not have any secrets in the <em>associatedSecrets</em> field. A separate API call should be made to fetch the associated secrets.
1527+
Updates the secrets in a secret group with new values. A new secret version is created for every secret that has a modified value and any omitted secrets are deleted. The returned updated secret group does not have any secret values in the <em>associatedSecrets</em> field. A separate API call to `/v1/secrets/{id}` should be made to fetch the associated secret value.
16001528

16011529
</dd>
16021530
</dl>
@@ -1725,69 +1653,6 @@ await client.secretGroups.delete("id");
17251653
</dl>
17261654
</details>
17271655

1728-
<details><summary><code>client.secretGroups.<a href="/src/api/resources/secretGroups/client/Client.ts">listSecrets</a>(id) -> TrueFoundry.Secret[]</code></summary>
1729-
<dl>
1730-
<dd>
1731-
1732-
#### 📝 Description
1733-
1734-
<dl>
1735-
<dd>
1736-
1737-
<dl>
1738-
<dd>
1739-
1740-
List Secrets associated with a Secret Group.
1741-
1742-
</dd>
1743-
</dl>
1744-
</dd>
1745-
</dl>
1746-
1747-
#### 🔌 Usage
1748-
1749-
<dl>
1750-
<dd>
1751-
1752-
<dl>
1753-
<dd>
1754-
1755-
```typescript
1756-
await client.secretGroups.listSecrets("id");
1757-
```
1758-
1759-
</dd>
1760-
</dl>
1761-
</dd>
1762-
</dl>
1763-
1764-
#### ⚙️ Parameters
1765-
1766-
<dl>
1767-
<dd>
1768-
1769-
<dl>
1770-
<dd>
1771-
1772-
**id:** `string` — Secret Id of the secret group.
1773-
1774-
</dd>
1775-
</dl>
1776-
1777-
<dl>
1778-
<dd>
1779-
1780-
**requestOptions:** `SecretGroups.RequestOptions`
1781-
1782-
</dd>
1783-
</dl>
1784-
</dd>
1785-
</dl>
1786-
1787-
</dd>
1788-
</dl>
1789-
</details>
1790-
17911656
## Clusters
17921657

17931658
<details><summary><code>client.clusters.<a href="/src/api/resources/clusters/client/Client.ts">list</a>({ ...params }) -> core.Page<TrueFoundry.Cluster></code></summary>

src/api/errors/BadRequestError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
*/
44

55
import * as errors from "../../errors/index";
6+
import * as core from "../../core";
67

78
export class BadRequestError extends errors.TrueFoundryError {
8-
constructor(body?: unknown) {
9+
constructor(body?: unknown, rawResponse?: core.RawResponse) {
910
super({
1011
message: "BadRequestError",
1112
statusCode: 400,
1213
body: body,
14+
rawResponse: rawResponse,
1315
});
1416
Object.setPrototypeOf(this, BadRequestError.prototype);
1517
}

src/api/errors/ConflictError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
import * as errors from "../../errors/index";
66
import * as TrueFoundry from "../index";
7+
import * as core from "../../core";
78

89
export class ConflictError extends errors.TrueFoundryError {
9-
constructor(body: TrueFoundry.HttpError) {
10+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
1011
super({
1112
message: "ConflictError",
1213
statusCode: 409,
1314
body: body,
15+
rawResponse: rawResponse,
1416
});
1517
Object.setPrototypeOf(this, ConflictError.prototype);
1618
}

src/api/errors/ExpectationFailedError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
import * as errors from "../../errors/index";
66
import * as TrueFoundry from "../index";
7+
import * as core from "../../core";
78

89
export class ExpectationFailedError extends errors.TrueFoundryError {
9-
constructor(body: TrueFoundry.HttpError) {
10+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
1011
super({
1112
message: "ExpectationFailedError",
1213
statusCode: 417,
1314
body: body,
15+
rawResponse: rawResponse,
1416
});
1517
Object.setPrototypeOf(this, ExpectationFailedError.prototype);
1618
}

src/api/errors/FailedDependencyError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
import * as errors from "../../errors/index";
66
import * as TrueFoundry from "../index";
7+
import * as core from "../../core";
78

89
export class FailedDependencyError extends errors.TrueFoundryError {
9-
constructor(body: TrueFoundry.HttpError) {
10+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
1011
super({
1112
message: "FailedDependencyError",
1213
statusCode: 424,
1314
body: body,
15+
rawResponse: rawResponse,
1416
});
1517
Object.setPrototypeOf(this, FailedDependencyError.prototype);
1618
}

src/api/errors/ForbiddenError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44

55
import * as errors from "../../errors/index";
66
import * as TrueFoundry from "../index";
7+
import * as core from "../../core";
78

89
export class ForbiddenError extends errors.TrueFoundryError {
9-
constructor(body: TrueFoundry.HttpError) {
10+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
1011
super({
1112
message: "ForbiddenError",
1213
statusCode: 403,
1314
body: body,
15+
rawResponse: rawResponse,
1416
});
1517
Object.setPrototypeOf(this, ForbiddenError.prototype);
1618
}

src/api/errors/MethodNotAllowedError.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
*/
44

55
import * as errors from "../../errors/index";
6+
import * as core from "../../core";
67

78
export class MethodNotAllowedError extends errors.TrueFoundryError {
8-
constructor(body?: unknown) {
9+
constructor(body?: unknown, rawResponse?: core.RawResponse) {
910
super({
1011
message: "MethodNotAllowedError",
1112
statusCode: 405,
1213
body: body,
14+
rawResponse: rawResponse,
1315
});
1416
Object.setPrototypeOf(this, MethodNotAllowedError.prototype);
1517
}

0 commit comments

Comments
 (0)