diff --git a/.fern/metadata.json b/.fern/metadata.json
index 289609fc..4ffc3676 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,29 +1,29 @@
{
- "cliVersion": "5.59.0",
- "generatorName": "fernapi/fern-typescript-node-sdk",
- "generatorVersion": "3.75.0",
- "generatorConfig": {
- "allowExtraFields": true,
- "allowCustomFetcher": true,
- "enableInlineTypes": false,
- "fetchSupport": "native",
- "fileResponseType": "binary-response",
- "formDataSupport": "Node18",
- "includeApiReference": true,
- "inlineFileProperties": true,
- "inlinePathParameters": true,
- "namespaceExport": "TrueFoundry",
- "noSerdeLayer": false,
- "omitUndefined": true,
- "retainOriginalCasing": false,
- "skipResponseValidation": true,
- "streamType": "web",
- "useDefaultRequestParameterValues": true
- },
- "originGitCommit": "32fe60c676059f66eca28ed6042c72b38db2ff04",
- "originGitCommitIsDirty": false,
- "invokedBy": "ci",
- "requestedVersion": "0.0.0",
- "ciProvider": "github",
- "sdkVersion": "0.0.0"
-}
\ No newline at end of file
+ "cliVersion": "5.89.4",
+ "generatorName": "fernapi/fern-typescript-node-sdk",
+ "generatorVersion": "3.86.0",
+ "generatorConfig": {
+ "allowExtraFields": true,
+ "allowCustomFetcher": true,
+ "enableInlineTypes": false,
+ "fetchSupport": "native",
+ "fileResponseType": "binary-response",
+ "formDataSupport": "Node18",
+ "includeApiReference": true,
+ "inlineFileProperties": true,
+ "inlinePathParameters": true,
+ "namespaceExport": "TrueFoundry",
+ "noSerdeLayer": false,
+ "omitUndefined": true,
+ "retainOriginalCasing": false,
+ "skipResponseValidation": true,
+ "streamType": "web",
+ "useDefaultRequestParameterValues": true
+ },
+ "originGitCommit": "ee220d57a9ea7d75b0042756f2870909b45115ab",
+ "originGitCommitIsDirty": false,
+ "invokedBy": "ci",
+ "requestedVersion": "0.0.0",
+ "ciProvider": "github",
+ "sdkVersion": "0.0.0"
+}
diff --git a/README.md b/README.md
index c601fad5..a3867379 100644
--- a/README.md
+++ b/README.md
@@ -50,25 +50,10 @@ Instantiate and use the client with the following:
```typescript
import { TrueFoundryClient } from "truefoundry-sdk";
-const client = new TrueFoundryClient({ environment: "YOUR_BASE_URL", apiKey: "YOUR_API_KEY" });
+const client = new TrueFoundryClient({ baseUrl: "YOUR_BASE_URL", apiKey: "YOUR_API_KEY" });
const pageableResponse = await client.applications.list({
limit: 10,
- offset: 0,
- applicationId: "applicationId",
- workspaceId: "workspaceId",
- applicationName: "applicationName",
- fqn: "fqn",
- workspaceFqn: "workspaceFqn",
- applicationType: "async-service",
- nameSearchQuery: "nameSearchQuery",
- environmentId: "environmentId",
- clusterId: "clusterId",
- applicationSetId: "applicationSetId",
- paused: true,
- deviceTypeFilter: "cpu",
- lastDeployedBySubjects: "lastDeployedBySubjects",
- lifecycleStage: "active",
- isRecommendationPresentAndVisible: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -77,22 +62,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.applications.list({
limit: 10,
- offset: 0,
- applicationId: "applicationId",
- workspaceId: "workspaceId",
- applicationName: "applicationName",
- fqn: "fqn",
- workspaceFqn: "workspaceFqn",
- applicationType: "async-service",
- nameSearchQuery: "nameSearchQuery",
- environmentId: "environmentId",
- clusterId: "clusterId",
- applicationSetId: "applicationSetId",
- paused: true,
- deviceTypeFilter: "cpu",
- lastDeployedBySubjects: "lastDeployedBySubjects",
- lifecycleStage: "active",
- isRecommendationPresentAndVisible: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -110,7 +80,7 @@ following namespace:
```typescript
import { TrueFoundry } from "truefoundry-sdk";
-const request: TrueFoundry.InternalGetIdFromFqnRequest = {
+const request: TrueFoundry.GetIdFromFqnInternalRequest = {
...
};
```
@@ -142,12 +112,11 @@ List endpoints are paginated. The SDK provides an iterator so that you can simpl
```typescript
import { TrueFoundryClient } from "truefoundry-sdk";
-const client = new TrueFoundryClient({ environment: "YOUR_BASE_URL", apiKey: "YOUR_API_KEY" });
+const client = new TrueFoundryClient({ baseUrl: "YOUR_BASE_URL", apiKey: "YOUR_API_KEY" });
const pageableResponse = await client.users.list({
limit: 10,
offset: 0,
- query: "john@example.com",
- showInvalidUsers: true
+ query: "john@example.com"
});
for await (const item of pageableResponse) {
console.log(item);
@@ -157,8 +126,7 @@ for await (const item of pageableResponse) {
let page = await client.users.list({
limit: 10,
offset: 0,
- query: "john@example.com",
- showInvalidUsers: true
+ query: "john@example.com"
});
while (page.hasNextPage()) {
page = page.getNextPage();
diff --git a/package.json b/package.json
index f3347094..110735de 100644
--- a/package.json
+++ b/package.json
@@ -66,6 +66,17 @@
},
"default": "./dist/cjs/api/resources/teams/exports.js"
},
+ "./gatewayBudgets": {
+ "import": {
+ "types": "./dist/esm/api/resources/gatewayBudgets/exports.d.mts",
+ "default": "./dist/esm/api/resources/gatewayBudgets/exports.mjs"
+ },
+ "require": {
+ "types": "./dist/cjs/api/resources/gatewayBudgets/exports.d.ts",
+ "default": "./dist/cjs/api/resources/gatewayBudgets/exports.js"
+ },
+ "default": "./dist/cjs/api/resources/gatewayBudgets/exports.js"
+ },
"./personalAccessTokens": {
"import": {
"types": "./dist/esm/api/resources/personalAccessTokens/exports.d.mts",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index ea5ae6e9..cee962a3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,16 +19,16 @@ importers:
version: 2.11.2(@types/node@20.19.43)(typescript@5.9.3)
ts-loader:
specifier: ^9.5.4
- version: 9.6.2(typescript@5.9.3)(webpack@5.108.3)
+ version: 9.6.2(typescript@5.9.3)(webpack@5.109.2)
typescript:
specifier: ~5.9.3
version: 5.9.3
vitest:
specifier: ^4.1.1
- version: 4.1.9(@types/node@20.19.43)(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.1.3(@types/node@20.19.43)(terser@5.48.0))
+ version: 4.1.10(@types/node@20.19.43)(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0))
webpack:
specifier: ^5.105.4
- version: 5.108.3
+ version: 5.109.2
packages:
@@ -95,15 +95,6 @@ packages:
'@bundled-es-modules/statuses@1.0.1':
resolution: {integrity: sha512-yn7BklA5acgcBr+7w064fGV+SGIFySjCKpqjcWgBAIfrAkY+4GQTJJHQMeT3V/sgz23VTEVV8TtOmkvJAhFVfg==}
- '@emnapi/core@1.11.1':
- resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==}
-
- '@emnapi/runtime@1.11.1':
- resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==}
-
- '@emnapi/wasi-threads@1.2.2':
- resolution: {integrity: sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==}
-
'@inquirer/ansi@1.0.2':
resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==}
engines: {node: '>=18'}
@@ -159,12 +150,6 @@ packages:
resolution: {integrity: sha512-2+BzZbjRO7Ct61k8fMNHEtoKjeWI9pIlHFTqBwZ5icHpqszIgEZbjb1MW5Z0+bITTCTl3gk4PDBxs9tA/csXvA==}
engines: {node: '>=18'}
- '@napi-rs/wasm-runtime@1.1.6':
- resolution: {integrity: sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==}
- peerDependencies:
- '@emnapi/core': ^1.7.1
- '@emnapi/runtime': ^1.7.1
-
'@open-draft/deferred-promise@2.2.0':
resolution: {integrity: sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==}
@@ -174,100 +159,95 @@ packages:
'@open-draft/until@2.1.0':
resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==}
- '@oxc-project/types@0.138.0':
- resolution: {integrity: sha512-1a7ZKmrRTCoN1XMZ4L0PyyqrMnrNlLyPuOkdSX2MZg7IiIGRUyurNhAm73ptDOraoBcIordsIGKNPKUzy3ZmfA==}
+ '@oxc-project/types@0.142.0':
+ resolution: {integrity: sha512-7W+2q5AKQVU36fkaryontrHn3YDt1RyUYXatw9i5H8ocYe2sPKSFB6eS8WNPeRKiN1qAWWZUPm7gwFzJGrccqQ==}
- '@rolldown/binding-android-arm64@1.1.4':
- resolution: {integrity: sha512-EZLpf/8y7GXkkra90ML47kzik/GMP3EMcE9bPyHmRfxLC6z9+aW5A8poCsoxjrT5GfEcNAAvWwUHjvP1pUQkfw==}
+ '@rolldown/binding-android-arm64@1.2.2':
+ resolution: {integrity: sha512-l7x215OGvo1s52JWmR8U/DAVzEDWBCIbTm28aeJV/WDTSHgcKXaZTuBT0hJMs5NggilfJTW3clZVvd24yfKJxA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [android]
- '@rolldown/binding-darwin-arm64@1.1.4':
- resolution: {integrity: sha512-aUi+HBvmYb7j8krl1+qJgkG8C17fO79gk3c+jPw4S8glRFc1DTija9S3EyaTSQUm5GJXYKDAsugBEhFHH2vYiQ==}
+ '@rolldown/binding-darwin-arm64@1.2.2':
+ resolution: {integrity: sha512-9u9Xv6c1AJZT0FfwH5vrMG5Jjcwhc1MlyrPu0XfTqkzsmqfks2M6W/o5XwAJgVVN/jHpqqngC1WevHKKTIUtIA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [darwin]
- '@rolldown/binding-darwin-x64@1.1.4':
- resolution: {integrity: sha512-F7hHC3gwY11+vByKPRWqwGbeXWVgKmL+pTGCinaEhdihzBV2aQ0fvZOch9cXYUOKuKKq429HeYXOqQLc7wFCEg==}
+ '@rolldown/binding-darwin-x64@1.2.2':
+ resolution: {integrity: sha512-9W1mbGZAfW3oqd85bhBkmpyHCCzL1TeG/zFFP3vg7b0rlly8cxOcre5nXwz+LHazCwac2MNWgPdPCHndABjpWQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [darwin]
- '@rolldown/binding-freebsd-x64@1.1.4':
- resolution: {integrity: sha512-sI5yw+7s92SK6odiEhD5lKCBlWcpjHS5qyqpVQbZAJ0fIzEUXrmbl3DH2ybR3PZogulNJF+COLtmA8hUfvkCCQ==}
+ '@rolldown/binding-freebsd-x64@1.2.2':
+ resolution: {integrity: sha512-0p1lhiCSCyaerFwtrdZQUx7NqGk6LQnaRKWX7tFQqwQgvX0rjM15cIkm3pax1UpEakK14C4mOxx/jSqCBdBRqQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [freebsd]
- '@rolldown/binding-linux-arm-gnueabihf@1.1.4':
- resolution: {integrity: sha512-mCi0OKgEieFircrtVYmQAFGszRtMnZ6fpZAXrxanXAu7lqZcsK1E1RAaZNG0uKAnxox3B1f4EyQNnoyMfN1vAA==}
+ '@rolldown/binding-linux-arm-gnueabihf@1.2.2':
+ resolution: {integrity: sha512-e+cOJXrJ2L3zx6YzqPg+f6Wbk3V1cKB8bOhbaYdVYN3DdquzNdRAmrbETz1qnt5yp/c7JNlNjmITiA2cVneQ7w==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm]
os: [linux]
- '@rolldown/binding-linux-arm64-gnu@1.1.4':
- resolution: {integrity: sha512-B9Ial3Kv5sh0SHnB1g/QWcUQCEvCF6QKGAl4zXypYj65mVI+B4AhFBwPtSN7pDrJeIx8Z7zdy4ntx+wQABom7w==}
+ '@rolldown/binding-linux-arm64-gnu@1.2.2':
+ resolution: {integrity: sha512-JsSMsj6sNat/MuhG5fnBD7QgbtpHKVe30x5/bAVirDHdhoQRXJkF6xc0Jqk8O4fiCUQAzMOoH9wZi3m60c8wtg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [glibc]
- '@rolldown/binding-linux-arm64-musl@1.1.4':
- resolution: {integrity: sha512-lZVym0PuHE1KZ22gmFTC15lAkrg9iTszR617oYRB/iPY1A56ywoJzVKOJBKaot5RiikCObmur6pogpse3gRcng==}
+ '@rolldown/binding-linux-arm64-musl@1.2.2':
+ resolution: {integrity: sha512-B5G/zJdHaoJn9vD50eGHWkiWfmq8Uhi3IiLPJTzmZTrAalk1bztUikSXo0qga18ibE0IXboyeMUnhPjhAJ45wQ==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [linux]
libc: [musl]
- '@rolldown/binding-linux-ppc64-gnu@1.1.4':
- resolution: {integrity: sha512-t2DNiLJWNTbnEHyUzTumldML6ET4/g16467LZoDDJ3tSxGvguL5/NyC2lCsNKuyRycg9XeDQF5SSv+TNOhQEXg==}
+ '@rolldown/binding-linux-ppc64-gnu@1.2.2':
+ resolution: {integrity: sha512-6mC/awzKka8W6EoekjegpfGkjz8jXWDX63pqu/HYVpyKtZfu65Jsh4QAH3Kej3CAv/c1oGX7psTmFEbr0mDxLA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [ppc64]
os: [linux]
libc: [glibc]
- '@rolldown/binding-linux-s390x-gnu@1.1.4':
- resolution: {integrity: sha512-0WIRnL1Uw4BvTZRLQt+PVgo6ZKTJadlC2btP+/EOXv2f/DWbY0rEgl+y834mIVwP1FkTlWVTrGGJXf12lru7EQ==}
+ '@rolldown/binding-linux-s390x-gnu@1.2.2':
+ resolution: {integrity: sha512-412MX9fJLdA1IK28EZnc8jYv2HRTleOZgfLQumJ5zy7OeJLZlg/CETwFaXjNmGVxG51cFHpKLqb5LKvBC+HsHA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [s390x]
os: [linux]
libc: [glibc]
- '@rolldown/binding-linux-x64-gnu@1.1.4':
- resolution: {integrity: sha512-JWtGshGfX+oENAKonoNkqEJX+7hC8yfhi9GUyPX1VX4mdh1y5r+ZiJLR5XzAB0aoP6s/PcILsGjKq8O0mm24bw==}
+ '@rolldown/binding-linux-x64-gnu@1.2.2':
+ resolution: {integrity: sha512-Q/+HI/ToJafZ1iCqGgVQXUEkIjufHCTF0gBQ2a5o3cg7GJ2h0qyq3nvvSmU+bGda2/7ygXpTY4TM6gO9OhQ0ZA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [glibc]
- '@rolldown/binding-linux-x64-musl@1.1.4':
- resolution: {integrity: sha512-rT6yQcxUuXs4CnbofqwHRRV0iem349rLMYpTjkgQGLjrY4ado/eDzwPZPTCgTOlF6Nkp8NEv70yLMTn6qkWxsQ==}
+ '@rolldown/binding-linux-x64-musl@1.2.2':
+ resolution: {integrity: sha512-ZKp/w41n6wCvxzxQHtQSbuphfX3Y4cCvbjkKHusrLx4lh+JWLTU7StSltO/DKARISzbj368d+qUaCjI8K2wzXw==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [linux]
libc: [musl]
- '@rolldown/binding-openharmony-arm64@1.1.4':
- resolution: {integrity: sha512-KXMGoboq5cyaCQjDA4GLuRiOwBQ0EyFnJoVViLeZ45/3rFItRODEr+NdsBcVpll40hhNArlm/speWGRvj08LzA==}
+ '@rolldown/binding-openharmony-arm64@1.2.2':
+ resolution: {integrity: sha512-pxE6xD4KS3eAROkKK5yrhB9/3+vhlhVGMvlQLbdpzrBGDbKrnzx3RLwPaHvasLo6jgaiBLn7e04Df9C4tYhjmA==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [openharmony]
- '@rolldown/binding-wasm32-wasi@1.1.4':
- resolution: {integrity: sha512-5K83rb36oJiY7BCyE9zLZtGcPV4g5wvq+xwdO0XPIwDVZI8cyB/AUjkNXGb92/rnmezEkjMOpgY61rtwjQtFwg==}
- engines: {node: ^20.19.0 || >=22.12.0}
- cpu: [wasm32]
-
- '@rolldown/binding-win32-arm64-msvc@1.1.4':
- resolution: {integrity: sha512-PnWBtw3TV5KOg69HQQDR0mnQuyCmSGR2pAB4DC1rPF808fgKeTUMj2EOEyKATpgiuxuR5APQmiDO7PDgEjTFSA==}
+ '@rolldown/binding-win32-arm64-msvc@1.2.2':
+ resolution: {integrity: sha512-4MqEue5re+xIZzAWsB8sj0P1kqZySWqIuN4t6QaIO/YA6SFwySOLruvWQFzfmqk8LBK2P30KCSJwf6mJCZZ5/A==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [arm64]
os: [win32]
- '@rolldown/binding-win32-x64-msvc@1.1.4':
- resolution: {integrity: sha512-M1lpniBePobTfsa7Ks9a199e1akxsXn+GYBUKsEzv3YFzOm1HJAMNwKI3qr0Zq+mxwx9gOZoTdP1yXRYsZUocQ==}
+ '@rolldown/binding-win32-x64-msvc@1.2.2':
+ resolution: {integrity: sha512-NweNxxD0Nf9t8v7kodun45Ijp3EIwYY+uydPP6qBEYvfBqhIjN6dZMzlQja3tqX/aLs3F3Uz+AxDpKgRhpOZQg==}
engines: {node: ^20.19.0 || >=22.12.0}
cpu: [x64]
os: [win32]
@@ -278,9 +258,6 @@ packages:
'@standard-schema/spec@1.1.0':
resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==}
- '@tybys/wasm-util@0.10.3':
- resolution: {integrity: sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==}
-
'@types/chai@5.2.3':
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
@@ -302,11 +279,11 @@ packages:
'@types/statuses@2.0.6':
resolution: {integrity: sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==}
- '@vitest/expect@4.1.9':
- resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==}
+ '@vitest/expect@4.1.10':
+ resolution: {integrity: sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==}
- '@vitest/mocker@4.1.9':
- resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==}
+ '@vitest/mocker@4.1.10':
+ resolution: {integrity: sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==}
peerDependencies:
msw: ^2.4.9
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -316,20 +293,20 @@ packages:
vite:
optional: true
- '@vitest/pretty-format@4.1.9':
- resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==}
+ '@vitest/pretty-format@4.1.10':
+ resolution: {integrity: sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==}
- '@vitest/runner@4.1.9':
- resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==}
+ '@vitest/runner@4.1.10':
+ resolution: {integrity: sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==}
- '@vitest/snapshot@4.1.9':
- resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==}
+ '@vitest/snapshot@4.1.10':
+ resolution: {integrity: sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==}
- '@vitest/spy@4.1.9':
- resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==}
+ '@vitest/spy@4.1.10':
+ resolution: {integrity: sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==}
- '@vitest/utils@4.1.9':
- resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==}
+ '@vitest/utils@4.1.10':
+ resolution: {integrity: sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==}
'@webassemblyjs/ast@1.14.1':
resolution: {integrity: sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==}
@@ -382,14 +359,8 @@ packages:
'@xtuc/long@4.2.2':
resolution: {integrity: sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==}
- acorn-import-phases@1.0.4:
- resolution: {integrity: sha512-wKmbr/DDiIXzEOiWrTTUcDm24kQ2vGfZQvM2fwg2vXqR5uW6aapr7ObPtj1th32b9u90/Pf4AItvdTh42fBmVQ==}
- engines: {node: '>=10.13.0'}
- peerDependencies:
- acorn: ^8.14.0
-
- acorn@8.17.0:
- resolution: {integrity: sha512-xRQbDb9BnwDafYNn6Vwl839DYVjqXYb1XVGtWAZ1kcDc6iwAL4hg3B1dZlRiuENFeO2H53gFG3in621AdERVAg==}
+ acorn@8.18.0:
+ resolution: {integrity: sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==}
engines: {node: '>=0.4.0'}
hasBin: true
@@ -421,21 +392,21 @@ packages:
resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==}
engines: {node: '>=12'}
- baseline-browser-mapping@2.10.41:
- resolution: {integrity: sha512-WwS7MHhqGHHlaVsqRZnhvCEMS0owDX+SxRlve7JkuH7My1Ara3ZriTmCQupPfYjxMZ8I/tgxtJYr2t7taHaH4A==}
+ baseline-browser-mapping@2.11.12:
+ resolution: {integrity: sha512-r7WnVImvVCeFpf2DOXfy41aPWzeNg3H/A2X4dKmy1QL0MSyyk/e7z8ihJ3N6Nn2PsdhkVlqnEfnUE4a05P2aTA==}
engines: {node: '>=6.0.0'}
hasBin: true
- browserslist@4.28.4:
- resolution: {integrity: sha512-MTc8i/x9jBQd1iMw2CFGS+rwMa07eYjLR0CCTLDACl9xhxy+nIs3KeML/biicXtk9JrZ6dnnTatmc7ErPXIxqw==}
+ browserslist@4.28.7:
+ resolution: {integrity: sha512-JxV13hNrFxqjOc8alRbq9dK1MM79NEXYpma2B2J4wAtpWS5zIEIKqWPGCl7N4o7Uc7B7itylh7SuDujATRyyTw==}
engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7}
hasBin: true
buffer-from@1.1.2:
resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==}
- caniuse-lite@1.0.30001800:
- resolution: {integrity: sha512-MMHtuAz9Ys840zAY5F4k6fV5GaivZ9sPk+nz0mY+GYVzRBnYkN0mpqkSR92oWRQ19yQWo4HvBV/FnC16AJX8MA==}
+ caniuse-lite@1.0.30001806:
+ resolution: {integrity: sha512-72Cuvd95zbSYPKq6Fhg8eDJRlzgWDf7/mtoZv6Qe/DYNCEBdNxoA3+rZAU2ZhGCpZlns3EssFavaZomckT5Uuw==}
chai@6.2.2:
resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==}
@@ -478,18 +449,18 @@ packages:
resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
engines: {node: '>=8'}
- electron-to-chromium@1.5.385:
- resolution: {integrity: sha512-78sa/M08MNAYHQfjoWMvOlKQqZ0ElhSm/L5HNUc96VZ3b+KvDVnngFm8sYQy0XrhTRgAhggHr5abA7yTvRdo4Q==}
+ electron-to-chromium@1.5.399:
+ resolution: {integrity: sha512-lEcqhErbHjXRvd41rnWLpzbyU/IXfIYo7QwaFWmxGeLiLyY2TBCdHnWY88vB+p3ubnihRypDm66panXl7TylLA==}
emoji-regex@8.0.0:
resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==}
- enhanced-resolve@5.24.1:
- resolution: {integrity: sha512-7DdUaTjmNwMcH2gLr1qycesKII3BK4RLy/mdAb7x10Lq7bR4aNKHt1BR1ZALSv0rPM/hF5wYF0PhGop/rJm8vw==}
+ enhanced-resolve@5.24.5:
+ resolution: {integrity: sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==}
engines: {node: '>=10.13.0'}
- es-module-lexer@2.3.0:
- resolution: {integrity: sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==}
+ es-module-lexer@2.3.1:
+ resolution: {integrity: sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==}
escalade@3.2.0:
resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==}
@@ -525,8 +496,8 @@ packages:
fast-deep-equal@3.1.3:
resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==}
- fast-uri@3.1.3:
- resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==}
+ fast-uri@3.1.5:
+ resolution: {integrity: sha512-gHwA1O9LDIcKunMKhObS/HimwtehO1nPUECKAu5TpKgaO19fcWEl4bliWe1jWxVFvIXztJjjQ4L8XQ1EU9f7Jw==}
fdir@6.5.0:
resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==}
@@ -574,84 +545,80 @@ packages:
json-schema-traverse@1.0.0:
resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==}
- lightningcss-android-arm64@1.32.0:
- resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==}
+ lightningcss-android-arm64@1.33.0:
+ resolution: {integrity: sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [android]
- lightningcss-darwin-arm64@1.32.0:
- resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==}
+ lightningcss-darwin-arm64@1.33.0:
+ resolution: {integrity: sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [darwin]
- lightningcss-darwin-x64@1.32.0:
- resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==}
+ lightningcss-darwin-x64@1.33.0:
+ resolution: {integrity: sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [darwin]
- lightningcss-freebsd-x64@1.32.0:
- resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==}
+ lightningcss-freebsd-x64@1.33.0:
+ resolution: {integrity: sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [freebsd]
- lightningcss-linux-arm-gnueabihf@1.32.0:
- resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==}
+ lightningcss-linux-arm-gnueabihf@1.33.0:
+ resolution: {integrity: sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm]
os: [linux]
- lightningcss-linux-arm64-gnu@1.32.0:
- resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==}
+ lightningcss-linux-arm64-gnu@1.33.0:
+ resolution: {integrity: sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
libc: [glibc]
- lightningcss-linux-arm64-musl@1.32.0:
- resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==}
+ lightningcss-linux-arm64-musl@1.33.0:
+ resolution: {integrity: sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [linux]
libc: [musl]
- lightningcss-linux-x64-gnu@1.32.0:
- resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==}
+ lightningcss-linux-x64-gnu@1.33.0:
+ resolution: {integrity: sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
libc: [glibc]
- lightningcss-linux-x64-musl@1.32.0:
- resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==}
+ lightningcss-linux-x64-musl@1.33.0:
+ resolution: {integrity: sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [linux]
libc: [musl]
- lightningcss-win32-arm64-msvc@1.32.0:
- resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==}
+ lightningcss-win32-arm64-msvc@1.33.0:
+ resolution: {integrity: sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==}
engines: {node: '>= 12.0.0'}
cpu: [arm64]
os: [win32]
- lightningcss-win32-x64-msvc@1.32.0:
- resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==}
+ lightningcss-win32-x64-msvc@1.33.0:
+ resolution: {integrity: sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==}
engines: {node: '>= 12.0.0'}
cpu: [x64]
os: [win32]
- lightningcss@1.32.0:
- resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==}
+ lightningcss@1.33.0:
+ resolution: {integrity: sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==}
engines: {node: '>= 12.0.0'}
- loader-runner@4.3.2:
- resolution: {integrity: sha512-DFEqQ3ihfS9blba08cLfYf1NRAIEm+dDjic073DRDc3/JspI/8wYmtDsHwd3+4hwvdxSK7PGaElfTmm0awWJ4w==}
- engines: {node: '>=6.11.5'}
-
magic-string@0.30.21:
resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==}
@@ -719,20 +686,20 @@ packages:
resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==}
engines: {node: ^18.17.0 || >=20.5.0}
- nanoid@3.3.15:
- resolution: {integrity: sha512-y7Wygv/7mEOvxTuEQDB8StXdMRBWf1kR/tlhAzBRUFkB2jfcLOAxO/SHmOO2zgz1pVgK29/kyupn059/bCHdjA==}
+ nanoid@3.3.17:
+ resolution: {integrity: sha512-xQLf0A3HOMlgHq0n247/LRuAOYmB7dXJ/DvAxGvsSBij45XtBSmQycu+F8ODbHwns/XyFZagyL1+J0Offw1E0g==}
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
neo-async@2.6.2:
resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}
- node-releases@2.0.50:
- resolution: {integrity: sha512-J6l92tKHX6w8Jy5nO1Vuc01NoIiRGi/d6qBKVxh+IQ8Cr3b6HbVNfKiF8ZpFKufTwpwxMmce2W3iQZ861ZRyTg==}
+ node-releases@2.0.51:
+ resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==}
engines: {node: '>=18'}
- obug@2.1.3:
- resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==}
+ obug@2.1.4:
+ resolution: {integrity: sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==}
engines: {node: '>=12.20.0'}
outvariant@1.4.3:
@@ -751,8 +718,8 @@ packages:
resolution: {integrity: sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==}
engines: {node: '>=12'}
- postcss@8.5.16:
- resolution: {integrity: sha512-vuwillviilfKZsg0VGj5R/YwwcHx4SLsIOI/7K6mQkWx+l5cUHTjj5g0AasTBcyXsbfTgrwsUNmVUb5xVwyPwg==}
+ postcss@8.5.25:
+ resolution: {integrity: sha512-DTPx3RWSSnWyzLxQnlH0rJP+EW5ekl16ZU4/psbIhA0e53kJfdgaN5vKM+xP7yJtXVu+nfdVFmlgFDEKAe4Pyw==}
engines: {node: ^10 || ^12 || >=14}
require-directory@2.1.1:
@@ -766,8 +733,8 @@ packages:
rettime@0.7.0:
resolution: {integrity: sha512-LPRKoHnLKd/r3dVxcwO7vhCW+orkOGj9ViueosEBK6ie89CijnfRlhaDhHq/3Hxu4CkWQtxwlBG0mzTQY6uQjw==}
- rolldown@1.1.4:
- resolution: {integrity: sha512-IjZYiLxZwpnhwhdBH2ugdTGVSdhCQUmLxLoqyjiL0JxYjyRst+5a0P3xfrTxJ5F638j4Mvvw5FAX5XE6eHpXbA==}
+ rolldown@1.2.2:
+ resolution: {integrity: sha512-opwpo1tQBAcpSUJDt94B7hhLNGOKjCdE//XXjeLrnx9b83bjnw45tXdg1b09yEw/VLFBJGZpwRULMmOZo7ol+A==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
@@ -804,8 +771,8 @@ packages:
resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==}
engines: {node: '>= 0.8'}
- std-env@4.1.0:
- resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==}
+ std-env@4.2.0:
+ resolution: {integrity: sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==}
strict-event-emitter@0.5.1:
resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==}
@@ -830,35 +797,35 @@ packages:
resolution: {integrity: sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==}
engines: {node: '>=6'}
- terser@5.48.0:
- resolution: {integrity: sha512-J/9An6vs9Us6wKRriSFXBWdRZapREHqFzdNUKk0pmu804EMR6dr6winwo7e5JDxN4xahxQsuysyYFwlwj4XN/Q==}
+ terser@5.49.0:
+ resolution: {integrity: sha512-SNiDnXyHSrxVcIOtVbULzcTmniUiwcV7Nwdyj1twVubeTmbjoa8p69KKDpfkdoOavuM4/GRm1+ykI8qqnavHoA==}
engines: {node: '>=10'}
hasBin: true
tinybench@2.9.0:
resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==}
- tinyexec@1.2.4:
- resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==}
+ tinyexec@1.3.0:
+ resolution: {integrity: sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==}
engines: {node: '>=18'}
tinyglobby@0.2.17:
resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==}
engines: {node: '>=12.0.0'}
- tinyrainbow@3.1.0:
- resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==}
+ tinyrainbow@3.1.1:
+ resolution: {integrity: sha512-yau8yJdTt989Mm0Bd/236QnzEiPf2xLLTqUZRUJOo/3CB078LSwzei343DgtJVmfJKJE3TMINY1u42SQsP6mXw==}
engines: {node: '>=14.0.0'}
- tldts-core@7.4.6:
- resolution: {integrity: sha512-TkQNGJIhlEphpHCjKodMTSe23egUZr/g+flI2qkLgiJ/maAzSgXypSLRTNH3nCmqgayEmtcJBiLcfODSAr1xoA==}
+ tldts-core@7.4.10:
+ resolution: {integrity: sha512-KnQjp53ZekKgm/r3l+u8kJGGzYgrWdP8+Mql7a4vijh2WE0IrZWspQj/TpTxDho/YxO+AnOZnIjQcCD+q6iJsw==}
- tldts@7.4.6:
- resolution: {integrity: sha512-rbP0Gyx8b3Ae9yO//CU2wbSnQNoQ66m1nJdSbSHmnwKwzkkz/u8mERYU8T2rmlmy+bJvRNn84yNCW8gYqox44Q==}
+ tldts@7.4.10:
+ resolution: {integrity: sha512-GgouD1B+sWwvkaEq8vXC15DjQitxbvs12oIXELpconwm+Tg3zfcEv4jgzq3vtKverDXsg3VI8aRgNL2Nra0Iog==}
hasBin: true
- tough-cookie@6.0.1:
- resolution: {integrity: sha512-LktZQb3IeoUWB9lqR5EWTHgW/VTITCXg4D21M+lvybRVdylLrRMnqaIONLVb5mav8vM19m44HIcGq4qASeu2Qw==}
+ tough-cookie@6.0.2:
+ resolution: {integrity: sha512-exgYmnmL/sJpR3upZfXG5PoatXQii55xAiXGXzY+sROLZ/Y+SLcp9PgJNI9Vz37HpQ74WvDcLT8eqm+kV3FzrA==}
engines: {node: '>=16'}
ts-loader@9.6.2:
@@ -872,9 +839,6 @@ packages:
loader-utils:
optional: true
- tslib@2.8.1:
- resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}
-
type-fest@4.41.0:
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
engines: {node: '>=16'}
@@ -893,13 +857,13 @@ packages:
peerDependencies:
browserslist: '>= 4.21.0'
- vite@8.1.3:
- resolution: {integrity: sha512-Ds+gBRbj0lwRO2Y5hwnUBdxSwlAve9LeRyU4sNnAr0ewW0gWF0n5bgXgUzbgZ49MV9BVUAQUFYVcDUcilUExMA==}
+ vite@8.2.0:
+ resolution: {integrity: sha512-pn+CFpM0lwDeKwmOq1ZaBK/9sjorZcgqxki6MbY/jPEVd9vichIlmlD4HmQ5wdP5EgqQCFRaACBxMC7uEGc6lQ==}
engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true
peerDependencies:
'@types/node': ^20.19.0 || >=22.12.0
- '@vitejs/devtools': ^0.3.0
+ '@vitejs/devtools': ^0.4.0
esbuild: ^0.27.0 || ^0.28.0
jiti: '>=1.21.0'
less: ^4.0.0
@@ -936,20 +900,20 @@ packages:
yaml:
optional: true
- vitest@4.1.9:
- resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==}
+ vitest@4.1.10:
+ resolution: {integrity: sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==}
engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0}
hasBin: true
peerDependencies:
'@edge-runtime/vm': '*'
'@opentelemetry/api': ^1.9.0
'@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0
- '@vitest/browser-playwright': 4.1.9
- '@vitest/browser-preview': 4.1.9
- '@vitest/browser-webdriverio': 4.1.9
- '@vitest/coverage-istanbul': 4.1.9
- '@vitest/coverage-v8': 4.1.9
- '@vitest/ui': 4.1.9
+ '@vitest/browser-playwright': 4.1.10
+ '@vitest/browser-preview': 4.1.10
+ '@vitest/browser-webdriverio': 4.1.10
+ '@vitest/coverage-istanbul': 4.1.10
+ '@vitest/coverage-v8': 4.1.10
+ '@vitest/ui': 4.1.10
happy-dom: '*'
jsdom: '*'
vite: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -981,12 +945,12 @@ packages:
resolution: {integrity: sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==}
engines: {node: '>=10.13.0'}
- webpack-sources@3.5.0:
- resolution: {integrity: sha512-HPuy+uuoTCaaoEoI1LQ3JN9+vrPBvEesnnX1jADHy728cHSMlq4wUc4afYqahq2B1mhQVZxCXOkNTnXltr+2vQ==}
+ webpack-sources@3.5.1:
+ resolution: {integrity: sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==}
engines: {node: '>=10.13.0'}
- webpack@5.108.3:
- resolution: {integrity: sha512-hOpaCHmQVVY66IVTjofnH14IgSdmod2aquSGHGuYig/OIdWge01Hk2Wt988DZcwXumFUT4+FvJY5N+ikl8o/ww==}
+ webpack@5.109.2:
+ resolution: {integrity: sha512-U9/cvLzxObKNEZ9+TtdqrHM5/9z3lgl2c+c4BzbqGxFQvQvBAq87yql5A8pQ+rrMbS496MZJeF5enVBndIy2hw==}
engines: {node: '>=10.13.0'}
hasBin: true
peerDependencies:
@@ -1069,22 +1033,6 @@ snapshots:
dependencies:
statuses: 2.0.2
- '@emnapi/core@1.11.1':
- dependencies:
- '@emnapi/wasi-threads': 1.2.2
- tslib: 2.8.1
- optional: true
-
- '@emnapi/runtime@1.11.1':
- dependencies:
- tslib: 2.8.1
- optional: true
-
- '@emnapi/wasi-threads@1.2.2':
- dependencies:
- tslib: 2.8.1
- optional: true
-
'@inquirer/ansi@1.0.2': {}
'@inquirer/confirm@5.1.21(@types/node@20.19.43)':
@@ -1141,13 +1089,6 @@ snapshots:
outvariant: 1.4.3
strict-event-emitter: 0.5.1
- '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)':
- dependencies:
- '@emnapi/core': 1.11.1
- '@emnapi/runtime': 1.11.1
- '@tybys/wasm-util': 0.10.3
- optional: true
-
'@open-draft/deferred-promise@2.2.0': {}
'@open-draft/logger@0.3.0':
@@ -1157,66 +1098,54 @@ snapshots:
'@open-draft/until@2.1.0': {}
- '@oxc-project/types@0.138.0': {}
+ '@oxc-project/types@0.142.0': {}
- '@rolldown/binding-android-arm64@1.1.4':
+ '@rolldown/binding-android-arm64@1.2.2':
optional: true
- '@rolldown/binding-darwin-arm64@1.1.4':
+ '@rolldown/binding-darwin-arm64@1.2.2':
optional: true
- '@rolldown/binding-darwin-x64@1.1.4':
+ '@rolldown/binding-darwin-x64@1.2.2':
optional: true
- '@rolldown/binding-freebsd-x64@1.1.4':
+ '@rolldown/binding-freebsd-x64@1.2.2':
optional: true
- '@rolldown/binding-linux-arm-gnueabihf@1.1.4':
+ '@rolldown/binding-linux-arm-gnueabihf@1.2.2':
optional: true
- '@rolldown/binding-linux-arm64-gnu@1.1.4':
+ '@rolldown/binding-linux-arm64-gnu@1.2.2':
optional: true
- '@rolldown/binding-linux-arm64-musl@1.1.4':
+ '@rolldown/binding-linux-arm64-musl@1.2.2':
optional: true
- '@rolldown/binding-linux-ppc64-gnu@1.1.4':
+ '@rolldown/binding-linux-ppc64-gnu@1.2.2':
optional: true
- '@rolldown/binding-linux-s390x-gnu@1.1.4':
+ '@rolldown/binding-linux-s390x-gnu@1.2.2':
optional: true
- '@rolldown/binding-linux-x64-gnu@1.1.4':
+ '@rolldown/binding-linux-x64-gnu@1.2.2':
optional: true
- '@rolldown/binding-linux-x64-musl@1.1.4':
+ '@rolldown/binding-linux-x64-musl@1.2.2':
optional: true
- '@rolldown/binding-openharmony-arm64@1.1.4':
+ '@rolldown/binding-openharmony-arm64@1.2.2':
optional: true
- '@rolldown/binding-wasm32-wasi@1.1.4':
- dependencies:
- '@emnapi/core': 1.11.1
- '@emnapi/runtime': 1.11.1
- '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)
+ '@rolldown/binding-win32-arm64-msvc@1.2.2':
optional: true
- '@rolldown/binding-win32-arm64-msvc@1.1.4':
- optional: true
-
- '@rolldown/binding-win32-x64-msvc@1.1.4':
+ '@rolldown/binding-win32-x64-msvc@1.2.2':
optional: true
'@rolldown/pluginutils@1.0.1': {}
'@standard-schema/spec@1.1.0': {}
- '@tybys/wasm-util@0.10.3':
- dependencies:
- tslib: 2.8.1
- optional: true
-
'@types/chai@5.2.3':
dependencies:
'@types/deep-eql': 4.0.2
@@ -1236,47 +1165,47 @@ snapshots:
'@types/statuses@2.0.6': {}
- '@vitest/expect@4.1.9':
+ '@vitest/expect@4.1.10':
dependencies:
'@standard-schema/spec': 1.1.0
'@types/chai': 5.2.3
- '@vitest/spy': 4.1.9
- '@vitest/utils': 4.1.9
+ '@vitest/spy': 4.1.10
+ '@vitest/utils': 4.1.10
chai: 6.2.2
- tinyrainbow: 3.1.0
+ tinyrainbow: 3.1.1
- '@vitest/mocker@4.1.9(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.1.3(@types/node@20.19.43)(terser@5.48.0))':
+ '@vitest/mocker@4.1.10(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0))':
dependencies:
- '@vitest/spy': 4.1.9
+ '@vitest/spy': 4.1.10
estree-walker: 3.0.3
magic-string: 0.30.21
optionalDependencies:
msw: 2.11.2(@types/node@20.19.43)(typescript@5.9.3)
- vite: 8.1.3(@types/node@20.19.43)(terser@5.48.0)
+ vite: 8.2.0(@types/node@20.19.43)(terser@5.49.0)
- '@vitest/pretty-format@4.1.9':
+ '@vitest/pretty-format@4.1.10':
dependencies:
- tinyrainbow: 3.1.0
+ tinyrainbow: 3.1.1
- '@vitest/runner@4.1.9':
+ '@vitest/runner@4.1.10':
dependencies:
- '@vitest/utils': 4.1.9
+ '@vitest/utils': 4.1.10
pathe: 2.0.3
- '@vitest/snapshot@4.1.9':
+ '@vitest/snapshot@4.1.10':
dependencies:
- '@vitest/pretty-format': 4.1.9
- '@vitest/utils': 4.1.9
+ '@vitest/pretty-format': 4.1.10
+ '@vitest/utils': 4.1.10
magic-string: 0.30.21
pathe: 2.0.3
- '@vitest/spy@4.1.9': {}
+ '@vitest/spy@4.1.10': {}
- '@vitest/utils@4.1.9':
+ '@vitest/utils@4.1.10':
dependencies:
- '@vitest/pretty-format': 4.1.9
+ '@vitest/pretty-format': 4.1.10
convert-source-map: 2.0.0
- tinyrainbow: 3.1.0
+ tinyrainbow: 3.1.1
'@webassemblyjs/ast@1.14.1':
dependencies:
@@ -1358,11 +1287,7 @@ snapshots:
'@xtuc/long@4.2.2': {}
- acorn-import-phases@1.0.4(acorn@8.17.0):
- dependencies:
- acorn: 8.17.0
-
- acorn@8.17.0: {}
+ acorn@8.18.0: {}
ajv-formats@2.1.1(ajv@8.20.0):
optionalDependencies:
@@ -1376,7 +1301,7 @@ snapshots:
ajv@8.20.0:
dependencies:
fast-deep-equal: 3.1.3
- fast-uri: 3.1.3
+ fast-uri: 3.1.5
json-schema-traverse: 1.0.0
require-from-string: 2.0.2
@@ -1388,19 +1313,19 @@ snapshots:
assertion-error@2.0.1: {}
- baseline-browser-mapping@2.10.41: {}
+ baseline-browser-mapping@2.11.12: {}
- browserslist@4.28.4:
+ browserslist@4.28.7:
dependencies:
- baseline-browser-mapping: 2.10.41
- caniuse-lite: 1.0.30001800
- electron-to-chromium: 1.5.385
- node-releases: 2.0.50
- update-browserslist-db: 1.2.3(browserslist@4.28.4)
+ baseline-browser-mapping: 2.11.12
+ caniuse-lite: 1.0.30001806
+ electron-to-chromium: 1.5.399
+ node-releases: 2.0.51
+ update-browserslist-db: 1.2.3(browserslist@4.28.7)
buffer-from@1.1.2: {}
- caniuse-lite@1.0.30001800: {}
+ caniuse-lite@1.0.30001806: {}
chai@6.2.2: {}
@@ -1433,16 +1358,16 @@ snapshots:
detect-libc@2.1.2: {}
- electron-to-chromium@1.5.385: {}
+ electron-to-chromium@1.5.399: {}
emoji-regex@8.0.0: {}
- enhanced-resolve@5.24.1:
+ enhanced-resolve@5.24.5:
dependencies:
graceful-fs: 4.2.11
tapable: 2.3.3
- es-module-lexer@2.3.0: {}
+ es-module-lexer@2.3.1: {}
escalade@3.2.0: {}
@@ -1469,7 +1394,7 @@ snapshots:
fast-deep-equal@3.1.3: {}
- fast-uri@3.1.3: {}
+ fast-uri@3.1.5: {}
fdir@6.5.0(picomatch@4.0.5):
optionalDependencies:
@@ -1500,56 +1425,54 @@ snapshots:
json-schema-traverse@1.0.0: {}
- lightningcss-android-arm64@1.32.0:
+ lightningcss-android-arm64@1.33.0:
optional: true
- lightningcss-darwin-arm64@1.32.0:
+ lightningcss-darwin-arm64@1.33.0:
optional: true
- lightningcss-darwin-x64@1.32.0:
+ lightningcss-darwin-x64@1.33.0:
optional: true
- lightningcss-freebsd-x64@1.32.0:
+ lightningcss-freebsd-x64@1.33.0:
optional: true
- lightningcss-linux-arm-gnueabihf@1.32.0:
+ lightningcss-linux-arm-gnueabihf@1.33.0:
optional: true
- lightningcss-linux-arm64-gnu@1.32.0:
+ lightningcss-linux-arm64-gnu@1.33.0:
optional: true
- lightningcss-linux-arm64-musl@1.32.0:
+ lightningcss-linux-arm64-musl@1.33.0:
optional: true
- lightningcss-linux-x64-gnu@1.32.0:
+ lightningcss-linux-x64-gnu@1.33.0:
optional: true
- lightningcss-linux-x64-musl@1.32.0:
+ lightningcss-linux-x64-musl@1.33.0:
optional: true
- lightningcss-win32-arm64-msvc@1.32.0:
+ lightningcss-win32-arm64-msvc@1.33.0:
optional: true
- lightningcss-win32-x64-msvc@1.32.0:
+ lightningcss-win32-x64-msvc@1.33.0:
optional: true
- lightningcss@1.32.0:
+ lightningcss@1.33.0:
dependencies:
detect-libc: 2.1.2
optionalDependencies:
- lightningcss-android-arm64: 1.32.0
- lightningcss-darwin-arm64: 1.32.0
- lightningcss-darwin-x64: 1.32.0
- lightningcss-freebsd-x64: 1.32.0
- lightningcss-linux-arm-gnueabihf: 1.32.0
- lightningcss-linux-arm64-gnu: 1.32.0
- lightningcss-linux-arm64-musl: 1.32.0
- lightningcss-linux-x64-gnu: 1.32.0
- lightningcss-linux-x64-musl: 1.32.0
- lightningcss-win32-arm64-msvc: 1.32.0
- lightningcss-win32-x64-msvc: 1.32.0
-
- loader-runner@4.3.2: {}
+ lightningcss-android-arm64: 1.33.0
+ lightningcss-darwin-arm64: 1.33.0
+ lightningcss-darwin-x64: 1.33.0
+ lightningcss-freebsd-x64: 1.33.0
+ lightningcss-linux-arm-gnueabihf: 1.33.0
+ lightningcss-linux-arm64-gnu: 1.33.0
+ lightningcss-linux-arm64-musl: 1.33.0
+ lightningcss-linux-x64-gnu: 1.33.0
+ lightningcss-linux-x64-musl: 1.33.0
+ lightningcss-win32-arm64-msvc: 1.33.0
+ lightningcss-win32-x64-msvc: 1.33.0
magic-string@0.30.21:
dependencies:
@@ -1559,13 +1482,13 @@ snapshots:
mime-db@1.54.0: {}
- minimizer-webpack-plugin@5.6.1(webpack@5.108.3):
+ minimizer-webpack-plugin@5.6.1(webpack@5.109.2):
dependencies:
'@jridgewell/trace-mapping': 0.3.31
jest-worker: 27.5.1
schema-utils: 4.3.3
- terser: 5.48.0
- webpack: 5.108.3
+ terser: 5.49.0
+ webpack: 5.109.2
msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3):
dependencies:
@@ -1585,7 +1508,7 @@ snapshots:
picocolors: 1.1.1
rettime: 0.7.0
strict-event-emitter: 0.5.1
- tough-cookie: 6.0.1
+ tough-cookie: 6.0.2
type-fest: 4.41.0
yargs: 17.7.3
optionalDependencies:
@@ -1595,13 +1518,13 @@ snapshots:
mute-stream@2.0.0: {}
- nanoid@3.3.15: {}
+ nanoid@3.3.17: {}
neo-async@2.6.2: {}
- node-releases@2.0.50: {}
+ node-releases@2.0.51: {}
- obug@2.1.3: {}
+ obug@2.1.4: {}
outvariant@1.4.3: {}
@@ -1613,9 +1536,9 @@ snapshots:
picomatch@4.0.5: {}
- postcss@8.5.16:
+ postcss@8.5.25:
dependencies:
- nanoid: 3.3.15
+ nanoid: 3.3.17
picocolors: 1.1.1
source-map-js: 1.2.1
@@ -1625,26 +1548,25 @@ snapshots:
rettime@0.7.0: {}
- rolldown@1.1.4:
+ rolldown@1.2.2:
dependencies:
- '@oxc-project/types': 0.138.0
+ '@oxc-project/types': 0.142.0
'@rolldown/pluginutils': 1.0.1
optionalDependencies:
- '@rolldown/binding-android-arm64': 1.1.4
- '@rolldown/binding-darwin-arm64': 1.1.4
- '@rolldown/binding-darwin-x64': 1.1.4
- '@rolldown/binding-freebsd-x64': 1.1.4
- '@rolldown/binding-linux-arm-gnueabihf': 1.1.4
- '@rolldown/binding-linux-arm64-gnu': 1.1.4
- '@rolldown/binding-linux-arm64-musl': 1.1.4
- '@rolldown/binding-linux-ppc64-gnu': 1.1.4
- '@rolldown/binding-linux-s390x-gnu': 1.1.4
- '@rolldown/binding-linux-x64-gnu': 1.1.4
- '@rolldown/binding-linux-x64-musl': 1.1.4
- '@rolldown/binding-openharmony-arm64': 1.1.4
- '@rolldown/binding-wasm32-wasi': 1.1.4
- '@rolldown/binding-win32-arm64-msvc': 1.1.4
- '@rolldown/binding-win32-x64-msvc': 1.1.4
+ '@rolldown/binding-android-arm64': 1.2.2
+ '@rolldown/binding-darwin-arm64': 1.2.2
+ '@rolldown/binding-darwin-x64': 1.2.2
+ '@rolldown/binding-freebsd-x64': 1.2.2
+ '@rolldown/binding-linux-arm-gnueabihf': 1.2.2
+ '@rolldown/binding-linux-arm64-gnu': 1.2.2
+ '@rolldown/binding-linux-arm64-musl': 1.2.2
+ '@rolldown/binding-linux-ppc64-gnu': 1.2.2
+ '@rolldown/binding-linux-s390x-gnu': 1.2.2
+ '@rolldown/binding-linux-x64-gnu': 1.2.2
+ '@rolldown/binding-linux-x64-musl': 1.2.2
+ '@rolldown/binding-openharmony-arm64': 1.2.2
+ '@rolldown/binding-win32-arm64-msvc': 1.2.2
+ '@rolldown/binding-win32-x64-msvc': 1.2.2
schema-utils@4.3.3:
dependencies:
@@ -1672,7 +1594,7 @@ snapshots:
statuses@2.0.2: {}
- std-env@4.1.0: {}
+ std-env@4.2.0: {}
strict-event-emitter@0.5.1: {}
@@ -1696,44 +1618,41 @@ snapshots:
tapable@2.3.3: {}
- terser@5.48.0:
+ terser@5.49.0:
dependencies:
'@jridgewell/source-map': 0.3.11
- acorn: 8.17.0
+ acorn: 8.18.0
commander: 2.20.3
source-map-support: 0.5.21
tinybench@2.9.0: {}
- tinyexec@1.2.4: {}
+ tinyexec@1.3.0: {}
tinyglobby@0.2.17:
dependencies:
fdir: 6.5.0(picomatch@4.0.5)
picomatch: 4.0.5
- tinyrainbow@3.1.0: {}
+ tinyrainbow@3.1.1: {}
- tldts-core@7.4.6: {}
+ tldts-core@7.4.10: {}
- tldts@7.4.6:
+ tldts@7.4.10:
dependencies:
- tldts-core: 7.4.6
+ tldts-core: 7.4.10
- tough-cookie@6.0.1:
+ tough-cookie@6.0.2:
dependencies:
- tldts: 7.4.6
+ tldts: 7.4.10
- ts-loader@9.6.2(typescript@5.9.3)(webpack@5.108.3):
+ ts-loader@9.6.2(typescript@5.9.3)(webpack@5.109.2):
dependencies:
chalk: 4.1.2
picomatch: 4.0.5
source-map: 0.7.6
typescript: 5.9.3
- webpack: 5.108.3
-
- tslib@2.8.1:
- optional: true
+ webpack: 5.109.2
type-fest@4.41.0: {}
@@ -1741,45 +1660,45 @@ snapshots:
undici-types@6.21.0: {}
- update-browserslist-db@1.2.3(browserslist@4.28.4):
+ update-browserslist-db@1.2.3(browserslist@4.28.7):
dependencies:
- browserslist: 4.28.4
+ browserslist: 4.28.7
escalade: 3.2.0
picocolors: 1.1.1
- vite@8.1.3(@types/node@20.19.43)(terser@5.48.0):
+ vite@8.2.0(@types/node@20.19.43)(terser@5.49.0):
dependencies:
- lightningcss: 1.32.0
+ lightningcss: 1.33.0
picomatch: 4.0.5
- postcss: 8.5.16
- rolldown: 1.1.4
+ postcss: 8.5.25
+ rolldown: 1.2.2
tinyglobby: 0.2.17
optionalDependencies:
'@types/node': 20.19.43
fsevents: 2.3.3
- terser: 5.48.0
-
- vitest@4.1.9(@types/node@20.19.43)(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.1.3(@types/node@20.19.43)(terser@5.48.0)):
- dependencies:
- '@vitest/expect': 4.1.9
- '@vitest/mocker': 4.1.9(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.1.3(@types/node@20.19.43)(terser@5.48.0))
- '@vitest/pretty-format': 4.1.9
- '@vitest/runner': 4.1.9
- '@vitest/snapshot': 4.1.9
- '@vitest/spy': 4.1.9
- '@vitest/utils': 4.1.9
- es-module-lexer: 2.3.0
+ terser: 5.49.0
+
+ vitest@4.1.10(@types/node@20.19.43)(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0)):
+ dependencies:
+ '@vitest/expect': 4.1.10
+ '@vitest/mocker': 4.1.10(msw@2.11.2(@types/node@20.19.43)(typescript@5.9.3))(vite@8.2.0(@types/node@20.19.43)(terser@5.49.0))
+ '@vitest/pretty-format': 4.1.10
+ '@vitest/runner': 4.1.10
+ '@vitest/snapshot': 4.1.10
+ '@vitest/spy': 4.1.10
+ '@vitest/utils': 4.1.10
+ es-module-lexer: 2.3.1
expect-type: 1.4.0
magic-string: 0.30.21
- obug: 2.1.3
+ obug: 2.1.4
pathe: 2.0.3
picomatch: 4.0.5
- std-env: 4.1.0
+ std-env: 4.2.0
tinybench: 2.9.0
- tinyexec: 1.2.4
+ tinyexec: 1.3.0
tinyglobby: 0.2.17
- tinyrainbow: 3.1.0
- vite: 8.1.3(@types/node@20.19.43)(terser@5.48.0)
+ tinyrainbow: 3.1.1
+ vite: 8.2.0(@types/node@20.19.43)(terser@5.49.0)
why-is-node-running: 2.3.0
optionalDependencies:
'@types/node': 20.19.43
@@ -1790,32 +1709,30 @@ snapshots:
dependencies:
graceful-fs: 4.2.11
- webpack-sources@3.5.0: {}
+ webpack-sources@3.5.1: {}
- webpack@5.108.3:
+ webpack@5.109.2:
dependencies:
'@types/estree': 1.0.9
'@types/json-schema': 7.0.15
'@webassemblyjs/ast': 1.14.1
'@webassemblyjs/wasm-edit': 1.14.1
'@webassemblyjs/wasm-parser': 1.14.1
- acorn: 8.17.0
- acorn-import-phases: 1.0.4(acorn@8.17.0)
- browserslist: 4.28.4
+ acorn: 8.18.0
+ browserslist: 4.28.7
chrome-trace-event: 1.0.4
- enhanced-resolve: 5.24.1
- es-module-lexer: 2.3.0
+ enhanced-resolve: 5.24.5
+ es-module-lexer: 2.3.1
eslint-scope: 5.1.1
events: 3.3.0
graceful-fs: 4.2.11
- loader-runner: 4.3.2
mime-db: 1.54.0
- minimizer-webpack-plugin: 5.6.1(webpack@5.108.3)
+ minimizer-webpack-plugin: 5.6.1(webpack@5.109.2)
neo-async: 2.6.2
schema-utils: 4.3.3
tapable: 2.3.3
watchpack: 2.5.2
- webpack-sources: 3.5.0
+ webpack-sources: 3.5.1
transitivePeerDependencies:
- '@minify-html/node'
- '@swc/core'
diff --git a/reference.md b/reference.md
index e2aa8ba5..67838ece 100644
--- a/reference.md
+++ b/reference.md
@@ -199,7 +199,7 @@ await client.internal.getIdFromFqn("type", {
-
-**request:** `TrueFoundry.InternalGetIdFromFqnRequest`
+**request:** `TrueFoundry.GetIdFromFqnInternalRequest`
@@ -250,8 +250,7 @@ List users in the current tenant.
const pageableResponse = await client.users.list({
limit: 10,
offset: 0,
- query: "john@example.com",
- showInvalidUsers: true
+ query: "john@example.com"
});
for await (const item of pageableResponse) {
console.log(item);
@@ -261,8 +260,7 @@ for await (const item of pageableResponse) {
let page = await client.users.list({
limit: 10,
offset: 0,
- query: "john@example.com",
- showInvalidUsers: true
+ query: "john@example.com"
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -285,7 +283,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.UsersListRequest`
+**request:** `TrueFoundry.ListUsersRequest`
@@ -526,9 +524,7 @@ Permanently delete a user by ID. The user must not be a collaborator on any reso
```typescript
-await client.users.delete("jqfwg345gi25n5ju2yz5iz6m", {
- tenantName: "tenantName"
-});
+await client.users.delete("jqfwg345gi25n5ju2yz5iz6m");
```
@@ -552,7 +548,7 @@ await client.users.delete("jqfwg345gi25n5ju2yz5iz6m", {
-
-**request:** `TrueFoundry.UsersDeleteRequest`
+**request:** `TrueFoundry.DeleteUsersRequest`
@@ -1037,7 +1033,7 @@ await client.users.getTeams("jqfwg345gi25n5ju2yz5iz6m");
-
-List teams accessible to the current user.
+List teams accessible to the current user. Set includeMembership=false to omit full member and manager lists and return cached membership summaries instead.
@@ -1054,9 +1050,7 @@ List teams accessible to the current user.
```typescript
const pageableResponse = await client.teams.list({
limit: 10,
- offset: 0,
- role: "manager",
- attributes: ["attributes"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -1065,9 +1059,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.teams.list({
limit: 10,
- offset: 0,
- role: "manager",
- attributes: ["attributes"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -1090,7 +1082,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.TeamsListRequest`
+**request:** `TrueFoundry.ListTeamsRequest`
@@ -1207,8 +1199,8 @@ List users who are members of a team.
```typescript
const pageableResponse = await client.teams.listMembers("jqfwg345gi25n5ju2yz5iz6m", {
- limit: 10,
offset: 0,
+ limit: 10,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"email\",\"op\":\"STRING_CONTAINS\",\"value\":\"@example.com\"}]}"
});
for await (const item of pageableResponse) {
@@ -1217,8 +1209,8 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.teams.listMembers("jqfwg345gi25n5ju2yz5iz6m", {
- limit: 10,
offset: 0,
+ limit: 10,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"email\",\"op\":\"STRING_CONTAINS\",\"value\":\"@example.com\"}]}"
});
while (page.hasNextPage()) {
@@ -1250,7 +1242,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.TeamsListMembersRequest`
+**request:** `TrueFoundry.ListMembersTeamsRequest`
@@ -1298,8 +1290,8 @@ List users who hold the team-manager role on a team.
```typescript
const pageableResponse = await client.teams.listManagers("jqfwg345gi25n5ju2yz5iz6m", {
- limit: 10,
offset: 0,
+ limit: 10,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"email\",\"op\":\"STRING_CONTAINS\",\"value\":\"@example.com\"}]}"
});
for await (const item of pageableResponse) {
@@ -1308,24 +1300,459 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.teams.listManagers("jqfwg345gi25n5ju2yz5iz6m", {
- limit: 10,
offset: 0,
+ limit: 10,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"email\",\"op\":\"STRING_CONTAINS\",\"value\":\"@example.com\"}]}"
});
while (page.hasNextPage()) {
page = page.getNextPage();
}
-// You can also access the underlying response
-const response = page.response;
+// You can also access the underlying response
+const response = page.response;
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `string` — System-generated team ID.
+
+
+
+
+
+-
+
+**request:** `TrueFoundry.ListManagersTeamsRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `TeamsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.teams.get(id) -> TrueFoundry.GetTeamResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get a single team by its ID.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `string` — System-generated team ID.
+
+
+
+
+
+-
+
+**requestOptions:** `TeamsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.teams.delete(id) -> TrueFoundry.DeleteTeamResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Permanently delete the team with the given ID. This action is irreversible.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `string` — System-generated team ID.
+
+
+
+
+
+-
+
+**requestOptions:** `TeamsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.teams.getPermissions(id) -> TrueFoundry.GetTeamPermissionsResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Get all role bindings associated with a team.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.teams.getPermissions("jqfwg345gi25n5ju2yz5iz6m");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `string` — System-generated team ID.
+
+
+
+
+
+-
+
+**requestOptions:** `TeamsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+## GatewayBudgets
+client.gatewayBudgets.list({ ...params }) -> TrueFoundry.ListBudgetsResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+List the gateway budgets the caller can read within the tenant.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.gatewayBudgets.list();
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `TrueFoundry.ListGatewayBudgetsRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.gatewayBudgets.createOrUpdate({ ...params }) -> TrueFoundry.GatewayBudget
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Creates or updates a budget manifest for the tenant. Budgets are upserted by `manifest.name` (unique per tenant).
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.gatewayBudgets.createOrUpdate({
+ manifest: {
+ type: "tenant-budget-config",
+ name: "name",
+ limits: {},
+ appliesTo: {
+ type: "aggregate"
+ },
+ mode: "enforce"
+ }
+});
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**request:** `TrueFoundry.CreateOrUpdateBudgetRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.gatewayBudgets.getMyUsage() -> TrueFoundry.BudgetUsageResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns every per-user budget that currently applies to the caller, with current usage per period.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.gatewayBudgets.getMyUsage();
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
+
+
+
+
+
+
+
+
+
+
+
+client.gatewayBudgets.simulate({ ...params }) -> TrueFoundry.BudgetUsageResponse
+
+-
-```
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns the budgets that would apply to a hypothetical user/team/model/metadata selection, with current usage.
-#### ⚙️ Parameters
+#### 🔌 Usage
-
@@ -1333,15 +1760,24 @@ const response = page.response;
-
-**id:** `string` — System-generated team ID.
-
+```typescript
+await client.gatewayBudgets.simulate();
+
+```
+
+
+
+#### ⚙️ Parameters
-
-**request:** `TrueFoundry.TeamsListManagersRequest`
+
+-
+
+**request:** `TrueFoundry.SimulateBudgetRequest`
@@ -1349,7 +1785,7 @@ const response = page.response;
-
-**requestOptions:** `TeamsClient.RequestOptions`
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
@@ -1361,7 +1797,7 @@ const response = page.response;
-client.teams.get(id) -> TrueFoundry.GetTeamResponse
+client.gatewayBudgets.get(id) -> TrueFoundry.GatewayBudget
-
@@ -1373,7 +1809,7 @@ const response = page.response;
-
-Get a single team by its ID.
+Returns a single budget by id.
@@ -1388,7 +1824,7 @@ Get a single team by its ID.
-
```typescript
-await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
+await client.gatewayBudgets.get("id");
```
@@ -1404,7 +1840,7 @@ await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
-
-**id:** `string` — System-generated team ID.
+**id:** `string` — The budget id to retrieve or delete.
@@ -1412,7 +1848,7 @@ await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
-
-**requestOptions:** `TeamsClient.RequestOptions`
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
@@ -1424,7 +1860,7 @@ await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
-client.teams.delete(id) -> TrueFoundry.DeleteTeamResponse
+client.gatewayBudgets.delete(id) -> void
-
@@ -1436,7 +1872,7 @@ await client.teams.get("jqfwg345gi25n5ju2yz5iz6m");
-
-Permanently delete the team with the given ID. This action is irreversible.
+Permanently deletes a budget manifest.
@@ -1451,7 +1887,7 @@ Permanently delete the team with the given ID. This action is irreversible.
-
```typescript
-await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
+await client.gatewayBudgets.delete("id");
```
@@ -1467,7 +1903,7 @@ await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
-
-**id:** `string` — System-generated team ID.
+**id:** `string` — The budget id to retrieve or delete.
@@ -1475,7 +1911,7 @@ await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
-
-**requestOptions:** `TeamsClient.RequestOptions`
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
@@ -1487,7 +1923,7 @@ await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
-client.teams.getPermissions(id) -> TrueFoundry.GetTeamPermissionsResponse
+client.gatewayBudgets.getLeaderboard(id, { ...params }) -> TrueFoundry.BudgetUsageResponse
-
@@ -1499,7 +1935,7 @@ await client.teams.delete("jqfwg345gi25n5ju2yz5iz6m");
-
-Get all role bindings associated with a team.
+Returns the top spenders for a budget in its applies_to dimension, for the configured period. Aggregate budgets return a single whole-budget entity (entity: null).
@@ -1514,7 +1950,9 @@ Get all role bindings associated with a team.
-
```typescript
-await client.teams.getPermissions("jqfwg345gi25n5ju2yz5iz6m");
+await client.gatewayBudgets.getLeaderboard("id", {
+ limit: 50
+});
```
@@ -1530,7 +1968,7 @@ await client.teams.getPermissions("jqfwg345gi25n5ju2yz5iz6m");
-
-**id:** `string` — System-generated team ID.
+**id:** `string` — The budget id to retrieve or delete.
@@ -1538,7 +1976,15 @@ await client.teams.getPermissions("jqfwg345gi25n5ju2yz5iz6m");
-
-**requestOptions:** `TeamsClient.RequestOptions`
+**request:** `TrueFoundry.GetLeaderboardGatewayBudgetsRequest`
+
+
+
+
+
+-
+
+**requestOptions:** `GatewayBudgetsClient.RequestOptions`
@@ -1614,7 +2060,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.PersonalAccessTokensListRequest`
+**request:** `TrueFoundry.ListPersonalAccessTokensRequest`
@@ -1854,9 +2300,7 @@ Get an existing personal access token by name. If none exists, a new one is crea
-
```typescript
-await client.personalAccessTokens.get("name", {
- teamName: "teamName"
-});
+await client.personalAccessTokens.get("name");
```
@@ -1880,7 +2324,7 @@ await client.personalAccessTokens.get("name", {
-
-**request:** `TrueFoundry.PersonalAccessTokensGetRequest`
+**request:** `TrueFoundry.GetPersonalAccessTokensRequest`
@@ -1932,8 +2376,6 @@ const pageableResponse = await client.virtualAccounts.list({
limit: 10,
offset: 0,
nameSearchQuery: "staging-bot",
- ownedByTeams: ["ownedByTeams"],
- isExpired: true,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"name\",\"op\":\"STRING_CONTAINS\",\"value\":\"bot\"}]}"
});
for await (const item of pageableResponse) {
@@ -1945,8 +2387,6 @@ let page = await client.virtualAccounts.list({
limit: 10,
offset: 0,
nameSearchQuery: "staging-bot",
- ownedByTeams: ["ownedByTeams"],
- isExpired: true,
filter: "{\"type\":\"AND\",\"children\":[{\"column\":\"name\",\"op\":\"STRING_CONTAINS\",\"value\":\"bot\"}]}"
});
while (page.hasNextPage()) {
@@ -1970,7 +2410,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.VirtualAccountsListRequest`
+**request:** `TrueFoundry.ListVirtualAccountsRequest`
@@ -2489,8 +2929,7 @@ List clusters the caller can read.
```typescript
const pageableResponse = await client.clusters.list({
limit: 10,
- offset: 0,
- attributes: ["attributes"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -2499,8 +2938,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.clusters.list({
limit: 10,
- offset: 0,
- attributes: ["attributes"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -2523,7 +2961,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ClustersListRequest`
+**request:** `TrueFoundry.ListClustersRequest`
@@ -2772,8 +3210,7 @@ List addons installed on the cluster.
```typescript
await client.clusters.getAddons("id", {
limit: 10,
- offset: 0,
- attributes: ["attributes"]
+ offset: 0
});
```
@@ -2798,7 +3235,7 @@ await client.clusters.getAddons("id", {
-
-**request:** `TrueFoundry.ClustersGetAddonsRequest`
+**request:** `TrueFoundry.GetAddonsClustersRequest`
@@ -2911,22 +3348,7 @@ List applications the caller can read.
```typescript
const pageableResponse = await client.applications.list({
limit: 10,
- offset: 0,
- applicationId: "applicationId",
- workspaceId: "workspaceId",
- applicationName: "applicationName",
- fqn: "fqn",
- workspaceFqn: "workspaceFqn",
- applicationType: "async-service",
- nameSearchQuery: "nameSearchQuery",
- environmentId: "environmentId",
- clusterId: "clusterId",
- applicationSetId: "applicationSetId",
- paused: true,
- deviceTypeFilter: "cpu",
- lastDeployedBySubjects: "lastDeployedBySubjects",
- lifecycleStage: "active",
- isRecommendationPresentAndVisible: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -2935,22 +3357,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.applications.list({
limit: 10,
- offset: 0,
- applicationId: "applicationId",
- workspaceId: "workspaceId",
- applicationName: "applicationName",
- fqn: "fqn",
- workspaceFqn: "workspaceFqn",
- applicationType: "async-service",
- nameSearchQuery: "nameSearchQuery",
- environmentId: "environmentId",
- clusterId: "clusterId",
- applicationSetId: "applicationSetId",
- paused: true,
- deviceTypeFilter: "cpu",
- lastDeployedBySubjects: "lastDeployedBySubjects",
- lifecycleStage: "active",
- isRecommendationPresentAndVisible: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -2973,7 +3380,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ApplicationsListRequest`
+**request:** `TrueFoundry.ListApplicationsRequest`
@@ -3383,7 +3790,7 @@ await client.applications.scaleToOriginal("id");
-client.applications.cancelDeployment(id, deploymentId) -> TrueFoundry.ApplicationsCancelDeploymentResponse
+client.applications.cancelDeployment(id, deploymentId) -> TrueFoundry.CancelDeploymentApplicationsResponse
-
@@ -3528,7 +3935,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ApplicationVersionsListRequest`
+**request:** `TrueFoundry.ListApplicationVersionsRequest`
@@ -3649,13 +4056,7 @@ List Job Runs for provided Job Id. Filter the data based on parameters passed in
```typescript
const pageableResponse = await client.jobs.listRuns("jobId", {
limit: 10,
- offset: 0,
- searchPrefix: "searchPrefix",
- sortBy: "startTime",
- order: "asc",
- triggeredBy: ["triggeredBy"],
- status: ["CREATED"],
- versionNumbers: [1.1]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -3664,13 +4065,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.jobs.listRuns("jobId", {
limit: 10,
- offset: 0,
- searchPrefix: "searchPrefix",
- sortBy: "startTime",
- order: "asc",
- triggeredBy: ["triggeredBy"],
- status: ["CREATED"],
- versionNumbers: [1.1]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -3701,7 +4096,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.JobsListRunsRequest`
+**request:** `TrueFoundry.ListRunsJobsRequest`
@@ -3972,7 +4367,7 @@ await client.jobs.terminate({
-
-**request:** `TrueFoundry.JobsTerminateRequest`
+**request:** `TrueFoundry.TerminateJobsRequest`
@@ -4023,11 +4418,7 @@ List workspaces the caller can read.
const pageableResponse = await client.workspaces.list({
limit: 10,
offset: 0,
- clusterId: "jqfwg345gi25n5ju2yz5iz6m",
- name: "name",
- fqn: "fqn",
- includeCluster: true,
- attributes: ["attributes"]
+ clusterId: "jqfwg345gi25n5ju2yz5iz6m"
});
for await (const item of pageableResponse) {
console.log(item);
@@ -4037,11 +4428,7 @@ for await (const item of pageableResponse) {
let page = await client.workspaces.list({
limit: 10,
offset: 0,
- clusterId: "jqfwg345gi25n5ju2yz5iz6m",
- name: "name",
- fqn: "fqn",
- includeCluster: true,
- attributes: ["attributes"]
+ clusterId: "jqfwg345gi25n5ju2yz5iz6m"
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -4064,7 +4451,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.WorkspacesListRequest`
+**request:** `TrueFoundry.ListWorkspacesRequest`
@@ -4183,8 +4570,7 @@ Search workspaces using a structured filter expression. Return a paginated list
const pageableResponse = await client.workspaces.search({
limit: 10,
offset: 0,
- filter: "[{\"type\":\"name\",\"operator\":\"STRING_CONTAINS\",\"value\":\"prod\"}]",
- includeCluster: true
+ filter: "[{\"type\":\"name\",\"operator\":\"STRING_CONTAINS\",\"value\":\"prod\"}]"
});
for await (const item of pageableResponse) {
console.log(item);
@@ -4194,8 +4580,7 @@ for await (const item of pageableResponse) {
let page = await client.workspaces.search({
limit: 10,
offset: 0,
- filter: "[{\"type\":\"name\",\"operator\":\"STRING_CONTAINS\",\"value\":\"prod\"}]",
- includeCluster: true
+ filter: "[{\"type\":\"name\",\"operator\":\"STRING_CONTAINS\",\"value\":\"prod\"}]"
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -4218,7 +4603,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.WorkspacesSearchRequest`
+**request:** `TrueFoundry.SearchWorkspacesRequest`
@@ -4426,7 +4811,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.EnvironmentsListRequest`
+**request:** `TrueFoundry.ListEnvironmentsRequest`
@@ -4809,9 +5194,7 @@ Delete the secret and all its versions permanently.
-
```typescript
-await client.secrets.delete("id", {
- forceDelete: true
-});
+await client.secrets.delete("id");
```
@@ -4835,7 +5218,7 @@ await client.secrets.delete("id", {
-
-**request:** `TrueFoundry.SecretsDeleteRequest`
+**request:** `TrueFoundry.DeleteSecretsRequest`
@@ -4885,10 +5268,7 @@ List secret groups the caller has access to, along with associated secrets for e
```typescript
const pageableResponse = await client.secretGroups.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- search: "search",
- attributes: ["attributes"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -4897,10 +5277,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.secretGroups.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- search: "search",
- attributes: ["attributes"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -4923,7 +5300,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.SecretGroupsListRequest`
+**request:** `TrueFoundry.ListSecretGroupsRequest`
@@ -5251,9 +5628,7 @@ Delete the secret group and all its associated secrets and secret versions perma
-
```typescript
-await client.secretGroups.delete("id", {
- forceDelete: true
-});
+await client.secretGroups.delete("id");
```
@@ -5277,7 +5652,7 @@ await client.secretGroups.delete("id", {
-
-**request:** `TrueFoundry.SecretGroupsDeleteRequest`
+**request:** `TrueFoundry.DeleteSecretGroupsRequest`
@@ -5325,14 +5700,7 @@ Get events for an application, filtered by pod names, job run, or time range.
-
```typescript
-await client.events.get({
- startTs: "startTs",
- endTs: "endTs",
- applicationId: "applicationId",
- applicationFqn: "applicationFqn",
- podNames: ["podNames"],
- jobRunName: "jobRunName"
-});
+await client.events.get();
```
@@ -5348,7 +5716,7 @@ await client.events.get({
-
-**request:** `TrueFoundry.EventsGetRequest`
+**request:** `TrueFoundry.GetEventsRequest`
@@ -5396,13 +5764,7 @@ Get alerts for a given application or cluster filtered by start and end timestam
-
```typescript
-await client.alerts.list({
- startTs: "startTs",
- endTs: "endTs",
- clusterId: "clusterId",
- applicationId: "applicationId",
- alertStatus: "firing"
-});
+await client.alerts.list();
```
@@ -5418,7 +5780,7 @@ await client.alerts.list({
-
-**request:** `TrueFoundry.AlertsListRequest`
+**request:** `TrueFoundry.ListAlertsRequest`
@@ -5468,11 +5830,7 @@ List all Agents for a tenant.
```typescript
const pageableResponse = await client.agents.list({
limit: 10,
- offset: 0,
- name: "name",
- namePrefix: "namePrefix",
- type: "remote-agent",
- attributes: ["attributes"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -5481,11 +5839,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.agents.list({
limit: 10,
- offset: 0,
- name: "name",
- namePrefix: "namePrefix",
- type: "remote-agent",
- attributes: ["attributes"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -5508,7 +5862,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.AgentsListRequest`
+**request:** `TrueFoundry.ListAgentsRequest`
@@ -5726,6 +6080,69 @@ await client.agents.delete("jqfwg345gi25n5ju2yz5iz6m");
+
+
+
+
+client.agents.getToken(id) -> TrueFoundry.GetAgentIdentityTokenResponse
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns the TrueFoundry-backed token for the agent's linked identity, generating one on demand if none exists yet (or the stored one has expired). Only valid for agents whose identity is TrueFoundry-backed. Requires manage access on the agent since the token authenticates as it. 404s if the agent has no linked identity.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```typescript
+await client.agents.getToken("jqfwg345gi25n5ju2yz5iz6m");
+
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**id:** `string` — System-generated agent ID.
+
+
+
+
+
+-
+
+**requestOptions:** `AgentsClient.RequestOptions`
+
+
+
+
+
+
+
@@ -5760,8 +6177,7 @@ List Agent Versions for the provided agent id
```typescript
const pageableResponse = await client.agentVersions.list({
limit: 10,
- offset: 0,
- id: "id"
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -5770,8 +6186,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.agentVersions.list({
limit: 10,
- offset: 0,
- id: "id"
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -5794,7 +6209,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.AgentVersionsListRequest`
+**request:** `TrueFoundry.ListAgentVersionsRequest`
@@ -5970,11 +6385,7 @@ List prompts with optional filtering by FQN, ML Repo, or name.
```typescript
const pageableResponse = await client.prompts.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- includeEmptyPrompts: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -5983,11 +6394,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.prompts.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- includeEmptyPrompts: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -6010,7 +6417,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.PromptsListRequest`
+**request:** `TrueFoundry.ListPromptsRequest`
@@ -6134,13 +6541,7 @@ List prompt versions with optional filtering by tag, FQN, prompt ID, ML Repo, na
```typescript
const pageableResponse = await client.promptVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- promptId: "prompt_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -6149,13 +6550,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.promptVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- promptId: "prompt_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -6178,7 +6573,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.PromptVersionsListRequest`
+**request:** `TrueFoundry.ListPromptVersionsRequest`
@@ -6546,12 +6941,7 @@ List artifacts with optional filtering by FQN, ML Repo, name, or run ID.
```typescript
const pageableResponse = await client.artifacts.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- runId: "run_id",
- includeEmptyArtifacts: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -6560,12 +6950,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.artifacts.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- runId: "run_id",
- includeEmptyArtifacts: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -6588,7 +6973,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ArtifactsListRequest`
+**request:** `TrueFoundry.ListArtifactsRequest`
@@ -6712,16 +7097,7 @@ List artifact versions with optional filtering by tag, FQN, artifact ID, ML Repo
```typescript
const pageableResponse = await client.artifactVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- artifactId: "artifact_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -6730,16 +7106,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.artifactVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- artifactId: "artifact_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -6762,7 +7129,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ArtifactVersionsListRequest`
+**request:** `TrueFoundry.ListArtifactVersionsRequest`
@@ -7482,9 +7849,7 @@ List ML Repos with optional filtering by name.
```typescript
const pageableResponse = await client.mlRepos.list({
limit: 10,
- offset: 0,
- name: "name",
- attributes: ["attributes"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -7493,9 +7858,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.mlRepos.list({
limit: 10,
- offset: 0,
- name: "name",
- attributes: ["attributes"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -7518,7 +7881,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.MlReposListRequest`
+**request:** `TrueFoundry.ListMlReposRequest`
@@ -7641,10 +8004,7 @@ List data directories with optional filtering by FQN, ML Repo, or name.
```typescript
const pageableResponse = await client.dataDirectories.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name"
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -7653,10 +8013,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.dataDirectories.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name"
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -7679,7 +8036,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.DataDirectoriesListRequest`
+**request:** `TrueFoundry.ListDataDirectoriesRequest`
@@ -8143,9 +8500,7 @@ Delete a data directory, optionally including its contents.
```typescript
-await client.dataDirectories.delete("id", {
- deleteContents: true
-});
+await client.dataDirectories.delete("id");
```
@@ -8169,7 +8524,7 @@ await client.dataDirectories.delete("id", {
-
-**request:** `TrueFoundry.DataDirectoriesDeleteRequest`
+**request:** `TrueFoundry.DeleteDataDirectoriesRequest`
@@ -8581,7 +8936,7 @@ await client.runs.getMetricHistory("id", {
-
-**request:** `TrueFoundry.RunsGetMetricHistoryRequest`
+**request:** `TrueFoundry.GetMetricHistoryRunsRequest`
@@ -9195,12 +9550,7 @@ List models with optional filtering by FQN, ML Repo, name, or run ID.
```typescript
const pageableResponse = await client.models.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- runId: "run_id",
- includeEmptyModels: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -9209,12 +9559,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.models.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- runId: "run_id",
- includeEmptyModels: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -9237,7 +9582,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ModelsListRequest`
+**request:** `TrueFoundry.ListModelsRequest`
@@ -9361,16 +9706,7 @@ List model versions with optional filtering by tag, FQN, model ID, ML Repo, name
```typescript
const pageableResponse = await client.modelVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- modelId: "model_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -9379,16 +9715,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.modelVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- modelId: "model_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -9411,7 +9738,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.ModelVersionsListRequest`
+**request:** `TrueFoundry.ListModelVersionsRequest`
@@ -9654,21 +9981,7 @@ Get runtime logs (stdout/stderr) emitted by the pods of a deployed application.
await client.logs.get({
startTs: "1779262323000000000",
endTs: "1779348723000000000",
- limit: 1,
- direction: "asc",
- numLogsToIgnore: 1,
- applicationId: "applicationId",
- applicationFqn: "applicationFqn",
- deploymentId: "deploymentId",
- jobRunName: "jobRunName",
- podName: "podName",
- containerName: "containerName",
- podNames: ["podNames"],
- podNamesRegex: "podNamesRegex",
- searchFilters: "[{\"string\":\"error\",\"type\":\"substring\",\"operator\":\"equal\"}]",
- searchString: "searchString",
- searchType: "regex",
- searchOperator: "equal"
+ searchFilters: "[{\"string\":\"error\",\"type\":\"substring\",\"operator\":\"equal\"}]"
});
```
@@ -9685,7 +9998,7 @@ await client.logs.get({
-
-**request:** `TrueFoundry.LogsGetRequest`
+**request:** `TrueFoundry.GetLogsRequest`
@@ -9861,11 +10174,7 @@ List agent skills with optional filtering by FQN, ML Repo, or name.
```typescript
const pageableResponse = await client.agentSkills.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- includeEmptyAgentSkills: true
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -9874,11 +10183,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.agentSkills.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- mlRepoId: "ml_repo_id",
- name: "name",
- includeEmptyAgentSkills: true
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -9901,7 +10206,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.AgentSkillsListRequest`
+**request:** `TrueFoundry.ListAgentSkillsRequest`
@@ -10027,12 +10332,7 @@ List agent skill versions with optional filtering by FQN, agent skill ID, ML Rep
```typescript
const pageableResponse = await client.agentSkillVersions.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- agentSkillId: "agent_skill_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -10041,12 +10341,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.agentSkillVersions.list({
limit: 10,
- offset: 0,
- fqn: "fqn",
- agentSkillId: "agent_skill_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -10069,7 +10364,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.AgentSkillVersionsListRequest`
+**request:** `TrueFoundry.ListAgentSkillVersionsRequest`
@@ -10381,7 +10676,7 @@ await client.internal.aiGateway.getGatewayConfig("gateway-rate-limiting-config")
-
-**type:** `TrueFoundry.AiGatewayGetGatewayConfigRequestType` — The type of gateway configuration to retrieve or delete.
+**type:** `TrueFoundry.GetGatewayConfigAiGatewayRequestType` — The type of gateway configuration to retrieve or delete.
@@ -10759,10 +11054,7 @@ Generate deployment endpoint based on the provided query parameters.
await client.internal.deployments.getSuggestedEndpoint({
applicationType: "async-service",
applicationName: "applicationName",
- workspaceId: "workspaceId",
- baseDomain: "baseDomain",
- port: "port",
- preferWildcard: true
+ workspaceId: "workspaceId"
});
```
@@ -10779,7 +11071,7 @@ await client.internal.deployments.getSuggestedEndpoint({
-
-**request:** `TrueFoundry.internal.DeploymentsGetSuggestedEndpointRequest`
+**request:** `TrueFoundry.internal.GetSuggestedEndpointDeploymentsRequest`
@@ -10827,9 +11119,7 @@ Promote an application rollout for canary and blue-green.
```typescript
-await client.internal.applications.promoteRollout("id", {
- full: true
-});
+await client.internal.applications.promoteRollout("id");
```
@@ -10853,7 +11143,7 @@ await client.internal.applications.promoteRollout("id", {
-
-**request:** `TrueFoundry.internal.ApplicationsPromoteRolloutRequest`
+**request:** `TrueFoundry.internal.PromoteRolloutApplicationsRequest`
@@ -10900,9 +11190,7 @@ Get the pod template hash to deployment version map for a specific application.
```typescript
-await client.internal.applications.getPodTemplateHashToDeploymentVersion("id", {
- podTemplateHashes: "podTemplateHashes"
-});
+await client.internal.applications.getPodTemplateHashToDeploymentVersion("id");
```
@@ -10926,7 +11214,7 @@ await client.internal.applications.getPodTemplateHashToDeploymentVersion("id", {
-
-**request:** `TrueFoundry.internal.ApplicationsGetPodTemplateHashToDeploymentVersionRequest`
+**request:** `TrueFoundry.internal.GetPodTemplateHashToDeploymentVersionApplicationsRequest`
@@ -10976,8 +11264,6 @@ List metric charts available for an application.
```typescript
await client.internal.metrics.getCharts("workspaceId", {
applicationId: "applicationId",
- startTs: "startTs",
- endTs: "endTs",
filterEntity: "application",
filterQuery: "{\"pod\":\"my-app-abc123-xyz\"}"
});
@@ -11004,7 +11290,7 @@ await client.internal.metrics.getCharts("workspaceId", {
-
-**request:** `TrueFoundry.internal.MetricsGetChartsRequest`
+**request:** `TrueFoundry.internal.GetChartsMetricsRequest`
@@ -11157,18 +11443,7 @@ List artifact versions with internal metadata, optionally including model versio
```typescript
const pageableResponse = await client.internal.artifactVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- artifactId: "artifact_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true,
- includeModelVersions: true,
- artifactTypes: ["artifact_types"]
+ offset: 0
});
for await (const item of pageableResponse) {
console.log(item);
@@ -11177,18 +11452,7 @@ for await (const item of pageableResponse) {
// Or you can manually iterate page-by-page
let page = await client.internal.artifactVersions.list({
limit: 10,
- offset: 0,
- tag: "tag",
- fqn: "fqn",
- artifactId: "artifact_id",
- mlRepoId: "ml_repo_id",
- name: "name",
- version: 1,
- runIds: ["run_ids"],
- runSteps: [1.1],
- includeInternalMetadata: true,
- includeModelVersions: true,
- artifactTypes: ["artifact_types"]
+ offset: 0
});
while (page.hasNextPage()) {
page = page.getNextPage();
@@ -11211,7 +11475,7 @@ const response = page.response;
-
-**request:** `TrueFoundry.internal.ArtifactVersionsListRequest`
+**request:** `TrueFoundry.internal.ListArtifactVersionsRequest`
@@ -11326,10 +11590,7 @@ Get docker registry credentials for building and pushing an image.
```typescript
-await client.internal.dockerRegistries.getCredentials({
- fqn: "fqn",
- clusterId: "clusterId"
-});
+await client.internal.dockerRegistries.getCredentials();
```
@@ -11345,7 +11606,7 @@ await client.internal.dockerRegistries.getCredentials({
-
-**request:** `TrueFoundry.internal.DockerRegistriesGetCredentialsRequest`
+**request:** `TrueFoundry.internal.GetCredentialsDockerRegistriesRequest`
@@ -11366,7 +11627,7 @@ await client.internal.dockerRegistries.getCredentials({
## Internal Workflows
-client.internal.workflows.executeWorkflow(applicationId, { ...params }) -> TrueFoundry.WorkflowsExecuteWorkflowResponse
+client.internal.workflows.executeWorkflow(applicationId, { ...params }) -> TrueFoundry.ExecuteWorkflowWorkflowsResponse
-
@@ -11468,10 +11729,7 @@ Get logs emitted by the image build and deploy pipeline for a specific build of
await client.internal.buildLogs.get("pipelineRunName", {
startTs: "1635467890123456789",
endTs: "1635467891123456789",
- limit: "limit",
- direction: "direction",
- filterQuery: "{\"matchString\":\"error\",\"type\":\"substring\",\"operator\":\"equal\"}",
- numLogsToIgnore: 1.1
+ filterQuery: "{\"matchString\":\"error\",\"type\":\"substring\",\"operator\":\"equal\"}"
});
```
@@ -11496,7 +11754,7 @@ await client.internal.buildLogs.get("pipelineRunName", {
-
-**request:** `TrueFoundry.internal.BuildLogsGetRequest`
+**request:** `TrueFoundry.internal.GetBuildLogsRequest`
diff --git a/scripts/rename-to-esm-files.js b/scripts/rename-to-esm-files.js
index dc1df1cb..0a03de13 100644
--- a/scripts/rename-to-esm-files.js
+++ b/scripts/rename-to-esm-files.js
@@ -1,6 +1,7 @@
#!/usr/bin/env node
const fs = require("fs").promises;
+const fsSync = require("fs");
const path = require("path");
const extensionMap = {
@@ -44,8 +45,32 @@ async function updateFiles(files) {
console.log(`Updated imports in ${updatedFiles.length} files.`);
}
+const KNOWN_EXTENSIONS = new Set([".js", ".mjs", ".cjs", ".jsx", ".json", ".ts", ".mts", ".cts", ".tsx", ".node"]);
+
+function hasFileExtension(importPath) {
+ const basename = path.basename(importPath);
+ const dotIndex = basename.lastIndexOf(".");
+ if (dotIndex <= 0) {
+ return false;
+ }
+ return KNOWN_EXTENSIONS.has(basename.slice(dotIndex).toLowerCase());
+}
+
+function resolveExtensionlessImport(dir, importPath) {
+ const resolvedPath = path.resolve(dir, importPath);
+ if (fsSync.existsSync(`${resolvedPath}.js`)) {
+ return `${importPath}.mjs`;
+ }
+ const indexPath = path.join(resolvedPath, "index.js");
+ if (fsSync.existsSync(indexPath)) {
+ return `${importPath}/index.mjs`;
+ }
+ return null;
+}
+
async function updateFileContents(file) {
const content = await fs.readFile(file, "utf8");
+ const dir = path.dirname(file);
let newContent = content;
// Update each extension type defined in the map
@@ -62,6 +87,46 @@ async function updateFileContents(file) {
newContent = newContent.replace(dynamicRegex, `$1("$2${newExt}")`);
}
+ // Handle extensionless relative imports (e.g. from "./oauth" or from "../utils").
+ // These violate the ESM spec and break Node's ESM loader and Turbopack.
+ const staticExtensionless = /(import|export)(.+from\s+['"])(\.\.?\/[^'"]+?)(['"])/g;
+ const staticReplacements = [];
+ let match;
+ while ((match = staticExtensionless.exec(newContent)) !== null) {
+ const importPath = match[3];
+ if (hasFileExtension(importPath)) continue;
+ const resolved = resolveExtensionlessImport(dir, importPath);
+ if (resolved != null) {
+ staticReplacements.push({
+ start: match.index,
+ end: match.index + match[0].length,
+ replacement: `${match[1]}${match[2]}${resolved}${match[4]}`,
+ });
+ }
+ }
+ for (const { start, end, replacement } of staticReplacements.reverse()) {
+ newContent = newContent.slice(0, start) + replacement + newContent.slice(end);
+ }
+
+ // Handle extensionless dynamic imports
+ const dynamicExtensionless = /(yield\s+import|await\s+import|import)\s*\(\s*['"](\.\.?\/[^'"]+?)['"]\s*\)/g;
+ const dynamicReplacements = [];
+ while ((match = dynamicExtensionless.exec(newContent)) !== null) {
+ const importPath = match[2];
+ if (hasFileExtension(importPath)) continue;
+ const resolved = resolveExtensionlessImport(dir, importPath);
+ if (resolved != null) {
+ dynamicReplacements.push({
+ start: match.index,
+ end: match.index + match[0].length,
+ replacement: `${match[1]}("${resolved}")`,
+ });
+ }
+ }
+ for (const { start, end, replacement } of dynamicReplacements.reverse()) {
+ newContent = newContent.slice(0, start) + replacement + newContent.slice(end);
+ }
+
if (content !== newContent) {
await fs.writeFile(file, newContent, "utf8");
return true;
diff --git a/src/BaseClient.ts b/src/BaseClient.ts
index 0eebfaa9..eb96d1a8 100644
--- a/src/BaseClient.ts
+++ b/src/BaseClient.ts
@@ -1,15 +1,14 @@
// This file was auto-generated by Fern from our API Definition.
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
-import * as core from "./core/index.js";
-import type { AuthProvider } from "./core/auth/index.js";
import { mergeHeaders } from "./core/headers.js";
+import * as core from "./core/index.js";
export type AuthOption =
| false
| core.AuthProvider["getAuthRequest"]
| core.AuthProvider
- | (BearerAuthProvider.AuthOptions);
+ | BearerAuthProvider.AuthOptions;
export type BaseClientOptions = {
environment: core.Supplier;
@@ -41,6 +40,8 @@ export interface BaseRequestOptions {
abortSignal?: AbortSignal;
/** Additional query string parameters to include in the request. */
queryParams?: Record;
+ /** A dictionary containing additional parameters to spread into the request's body. */
+ additionalBodyParameters?: Record;
/** Additional headers to include in the request. */
headers?: Record | null | undefined>;
/** Options for SSE stream reconnection behavior. Has no effect on non-resumable endpoints. */
@@ -50,18 +51,26 @@ export interface BaseRequestOptions {
export type NormalizedClientOptions = T & {
logging: core.logging.Logger;
authProvider?: core.AuthProvider;
-}
+};
-export type NormalizedClientOptionsWithAuth = NormalizedClientOptions & {
- authProvider: core.AuthProvider;
-}
+export type NormalizedClientOptionsWithAuth =
+ NormalizedClientOptions & {
+ authProvider: core.AuthProvider;
+ };
export function normalizeClientOptions(
- options: T
+ options: T,
): NormalizedClientOptions {
const headers = mergeHeaders(
- { "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "truefoundry-sdk", "X-Fern-SDK-Version": "0.0.0", "User-Agent": "truefoundry-sdk/0.0.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version },
- options?.headers
+ {
+ "X-Fern-Language": "JavaScript",
+ "X-Fern-SDK-Name": "truefoundry-sdk",
+ "X-Fern-SDK-Version": "0.0.0",
+ "User-Agent": "truefoundry-sdk/0.0.0",
+ "X-Fern-Runtime": core.RUNTIME.type,
+ "X-Fern-Runtime-Version": core.RUNTIME.version,
+ },
+ options?.headers,
);
return {
@@ -72,7 +81,7 @@ export function normalizeClientOptions(
- options: T
+ options: T,
): NormalizedClientOptionsWithAuth {
const normalized = normalizeClientOptions(options) as NormalizedClientOptionsWithAuth;
@@ -98,10 +107,10 @@ export function normalizeClientOptionsWithAuth(
- options: NormalizedClientOptions
+ options: NormalizedClientOptions,
): NormalizedClientOptionsWithAuth {
return {
...options,
- authProvider: new core.NoOpAuthProvider()
+ authProvider: new core.NoOpAuthProvider(),
};
}
diff --git a/src/Client.ts b/src/Client.ts
index 9063e9fe..f1fb7a6c 100644
--- a/src/Client.ts
+++ b/src/Client.ts
@@ -1,9 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "./api/index.js";
-import { AgentsClient } from "./api/resources/agents/client/Client.js";
+import type * as TrueFoundry from "./api/index.js";
import { AgentSkillsClient } from "./api/resources/agentSkills/client/Client.js";
import { AgentSkillVersionsClient } from "./api/resources/agentSkillVersions/client/Client.js";
+import { AgentsClient } from "./api/resources/agents/client/Client.js";
import { AgentVersionsClient } from "./api/resources/agentVersions/client/Client.js";
import { AlertsClient } from "./api/resources/alerts/client/Client.js";
import { ApplicationsClient } from "./api/resources/applications/client/Client.js";
@@ -14,6 +14,7 @@ import { ClustersClient } from "./api/resources/clusters/client/Client.js";
import { DataDirectoriesClient } from "./api/resources/dataDirectories/client/Client.js";
import { EnvironmentsClient } from "./api/resources/environments/client/Client.js";
import { EventsClient } from "./api/resources/events/client/Client.js";
+import { GatewayBudgetsClient } from "./api/resources/gatewayBudgets/client/Client.js";
import { InternalClient } from "./api/resources/internal/client/Client.js";
import { JobsClient } from "./api/resources/jobs/client/Client.js";
import { LogsClient } from "./api/resources/logs/client/Client.js";
@@ -32,9 +33,10 @@ import { UsersClient } from "./api/resources/users/client/Client.js";
import { VirtualAccountsClient } from "./api/resources/virtualAccounts/client/Client.js";
import { WorkspacesClient } from "./api/resources/workspaces/client/Client.js";
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
-import * as core from "./core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "./BaseClient.js";
import { mergeHeaders } from "./core/headers.js";
+import * as core from "./core/index.js";
+import { mergeAdditionalBodyParameters } from "./core/requestBody.js";
import { handleNonStatusCodeError } from "./errors/handleNonStatusCodeError.js";
import * as errors from "./errors/index.js";
import * as serializers from "./serialization/index.js";
@@ -42,8 +44,7 @@ import * as serializers from "./serialization/index.js";
export declare namespace TrueFoundryClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class TrueFoundryClient {
@@ -51,6 +52,7 @@ export class TrueFoundryClient {
protected _internal: InternalClient | undefined;
protected _users: UsersClient | undefined;
protected _teams: TeamsClient | undefined;
+ protected _gatewayBudgets: GatewayBudgetsClient | undefined;
protected _personalAccessTokens: PersonalAccessTokensClient | undefined;
protected _virtualAccounts: VirtualAccountsClient | undefined;
protected _clusters: ClustersClient | undefined;
@@ -80,10 +82,7 @@ export class TrueFoundryClient {
protected _traces: TracesClient | undefined;
constructor(options: TrueFoundryClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
public get internal(): InternalClient {
@@ -98,6 +97,10 @@ export class TrueFoundryClient {
return (this._teams ??= new TeamsClient(this._options));
}
+ public get gatewayBudgets(): GatewayBudgetsClient {
+ return (this._gatewayBudgets ??= new GatewayBudgetsClient(this._options));
+ }
+
public get personalAccessTokens(): PersonalAccessTokensClient {
return (this._personalAccessTokens ??= new PersonalAccessTokensClient(this._options));
}
@@ -212,6 +215,9 @@ export class TrueFoundryClient {
* @param {TrueFoundry.TrueFoundryApplyRequest} request
* @param {TrueFoundryClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.apply({
* manifest: {
@@ -225,36 +231,67 @@ export class TrueFoundryClient {
* }
* })
*/
- public apply(request: TrueFoundry.TrueFoundryApplyRequest, requestOptions?: TrueFoundryClient.RequestOptions): core.HttpResponsePromise {
+ public apply(
+ request: TrueFoundry.TrueFoundryApplyRequest,
+ requestOptions?: TrueFoundryClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__apply(request, requestOptions));
}
- private async __apply(request: TrueFoundry.TrueFoundryApplyRequest, requestOptions?: TrueFoundryClient.RequestOptions): Promise> {
+ private async __apply(
+ request: TrueFoundry.TrueFoundryApplyRequest,
+ requestOptions?: TrueFoundryClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/apply"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/apply",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.TrueFoundryApplyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.TrueFoundryApplyRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.TrueFoundryApplyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.TrueFoundryApplyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
@@ -267,6 +304,9 @@ export class TrueFoundryClient {
* @param {TrueFoundry.TrueFoundryDeleteRequest} request
* @param {TrueFoundryClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.delete({
* manifest: {
@@ -280,36 +320,67 @@ export class TrueFoundryClient {
* }
* })
*/
- public delete(request: TrueFoundry.TrueFoundryDeleteRequest, requestOptions?: TrueFoundryClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ request: TrueFoundry.TrueFoundryDeleteRequest,
+ requestOptions?: TrueFoundryClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
}
- private async __delete(request: TrueFoundry.TrueFoundryDeleteRequest, requestOptions?: TrueFoundryClient.RequestOptions): Promise> {
+ private async __delete(
+ request: TrueFoundry.TrueFoundryDeleteRequest,
+ requestOptions?: TrueFoundryClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/delete"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/delete",
+ ),
method: "POST",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.TrueFoundryDeleteRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.TrueFoundryDeleteRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.TrueFoundryDeleteResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.TrueFoundryDeleteResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
@@ -326,16 +397,24 @@ export class TrueFoundryClient {
* @param {core.PassthroughRequest.RequestOptions} requestOptions - Per-request overrides (timeout, retries, headers, abort signal).
* @returns {Promise} A standard Response object.
*/
- public async fetch(input: Request | string | URL, init?: RequestInit, requestOptions?: core.PassthroughRequest.RequestOptions): Promise {
-
- return core.makePassthroughRequest(input, init, {
- baseUrl: this._options.baseUrl ?? this._options.environment,
- headers: this._options.headers,
- timeoutInSeconds: this._options.timeoutInSeconds,
- maxRetries: this._options.maxRetries,
- fetch: this._options.fetch,
- logging: this._options.logging,
- getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers,
- }, requestOptions);
+ public async fetch(
+ input: Request | string | URL,
+ init?: RequestInit,
+ requestOptions?: core.PassthroughRequest.RequestOptions,
+ ): Promise {
+ return core.makePassthroughRequest(
+ input,
+ init,
+ {
+ baseUrl: this._options.baseUrl ?? this._options.environment,
+ headers: this._options.headers,
+ timeoutInSeconds: this._options.timeoutInSeconds,
+ maxRetries: this._options.maxRetries,
+ fetch: this._options.fetch,
+ logging: this._options.logging,
+ getAuthHeaders: async () => (await this._options.authProvider.getAuthRequest()).headers,
+ },
+ requestOptions,
+ );
}
}
diff --git a/src/api/client/requests/TrueFoundryApplyRequest.ts b/src/api/client/requests/TrueFoundryApplyRequest.ts
index a129ffb7..d055043a 100644
--- a/src/api/client/requests/TrueFoundryApplyRequest.ts
+++ b/src/api/client/requests/TrueFoundryApplyRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../index.js";
+import type * as TrueFoundry from "../../index.js";
/**
* @example
@@ -20,5 +20,5 @@ export interface TrueFoundryApplyRequest {
/** Manifest of the resource to be created or updated */
manifest: TrueFoundry.TrueFoundryApplyRequestManifest;
/** Dry run the apply operation without actually applying */
- dryRun?: boolean;
+ dryRun?: boolean | null;
}
diff --git a/src/api/client/requests/TrueFoundryDeleteRequest.ts b/src/api/client/requests/TrueFoundryDeleteRequest.ts
index e445f7b9..929350c4 100644
--- a/src/api/client/requests/TrueFoundryDeleteRequest.ts
+++ b/src/api/client/requests/TrueFoundryDeleteRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../index.js";
+import type * as TrueFoundry from "../../index.js";
/**
* @example
diff --git a/src/api/errors/BadRequestError.ts b/src/api/errors/BadRequestError.ts
index 999d5575..8ed981ac 100644
--- a/src/api/errors/BadRequestError.ts
+++ b/src/api/errors/BadRequestError.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
export class BadRequestError extends errors.TrueFoundryError {
@@ -9,7 +9,7 @@ export class BadRequestError extends errors.TrueFoundryError {
message: "BadRequestError",
statusCode: 400,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/ConflictError.ts b/src/api/errors/ConflictError.ts
index 16af9569..f872e1cb 100644
--- a/src/api/errors/ConflictError.ts
+++ b/src/api/errors/ConflictError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class ConflictError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "ConflictError",
statusCode: 409,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/ExpectationFailedError.ts b/src/api/errors/ExpectationFailedError.ts
index 3d852795..4d6d546c 100644
--- a/src/api/errors/ExpectationFailedError.ts
+++ b/src/api/errors/ExpectationFailedError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class ExpectationFailedError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "ExpectationFailedError",
statusCode: 417,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/FailedDependencyError.ts b/src/api/errors/FailedDependencyError.ts
index bfc68dfd..87a81e33 100644
--- a/src/api/errors/FailedDependencyError.ts
+++ b/src/api/errors/FailedDependencyError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class FailedDependencyError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "FailedDependencyError",
statusCode: 424,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/ForbiddenError.ts b/src/api/errors/ForbiddenError.ts
index 10fef13b..7a7c9057 100644
--- a/src/api/errors/ForbiddenError.ts
+++ b/src/api/errors/ForbiddenError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class ForbiddenError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "ForbiddenError",
statusCode: 403,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/InternalServerError.ts b/src/api/errors/InternalServerError.ts
index 28db1f5e..49f8d445 100644
--- a/src/api/errors/InternalServerError.ts
+++ b/src/api/errors/InternalServerError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class InternalServerError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "InternalServerError",
statusCode: 500,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/MethodNotAllowedError.ts b/src/api/errors/MethodNotAllowedError.ts
index 34a30149..4a5b7f6f 100644
--- a/src/api/errors/MethodNotAllowedError.ts
+++ b/src/api/errors/MethodNotAllowedError.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
export class MethodNotAllowedError extends errors.TrueFoundryError {
@@ -9,7 +9,7 @@ export class MethodNotAllowedError extends errors.TrueFoundryError {
message: "MethodNotAllowedError",
statusCode: 405,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/NotFoundError.ts b/src/api/errors/NotFoundError.ts
index 05d07d66..8895d114 100644
--- a/src/api/errors/NotFoundError.ts
+++ b/src/api/errors/NotFoundError.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
export class NotFoundError extends errors.TrueFoundryError {
@@ -9,7 +9,7 @@ export class NotFoundError extends errors.TrueFoundryError {
message: "NotFoundError",
statusCode: 404,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/NotImplementedError.ts b/src/api/errors/NotImplementedError.ts
index bacfad89..07837eb5 100644
--- a/src/api/errors/NotImplementedError.ts
+++ b/src/api/errors/NotImplementedError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class NotImplementedError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "NotImplementedError",
statusCode: 501,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/UnauthorizedError.ts b/src/api/errors/UnauthorizedError.ts
index a161ae26..47d87e09 100644
--- a/src/api/errors/UnauthorizedError.ts
+++ b/src/api/errors/UnauthorizedError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class UnauthorizedError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "UnauthorizedError",
statusCode: 401,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/errors/UnprocessableEntityError.ts b/src/api/errors/UnprocessableEntityError.ts
index 71394f65..d753fb42 100644
--- a/src/api/errors/UnprocessableEntityError.ts
+++ b/src/api/errors/UnprocessableEntityError.ts
@@ -1,16 +1,18 @@
// This file was auto-generated by Fern from our API Definition.
-import * as core from "../../core/index.js";
+import type * as core from "../../core/index.js";
import * as errors from "../../errors/index.js";
-import * as TrueFoundry from "../index.js";
+import type * as TrueFoundry from "../index.js";
export class UnprocessableEntityError extends errors.TrueFoundryError {
+ public declare readonly body: TrueFoundry.HttpError;
+
constructor(body: TrueFoundry.HttpError, rawResponse?: core.RawResponse) {
super({
message: "UnprocessableEntityError",
statusCode: 422,
body: body,
- rawResponse: rawResponse
+ rawResponse: rawResponse,
});
Object.setPrototypeOf(this, new.target.prototype);
if (Error.captureStackTrace) {
diff --git a/src/api/resources/agentSkillVersions/client/Client.ts b/src/api/resources/agentSkillVersions/client/Client.ts
index eb0376ad..5cfae452 100644
--- a/src/api/resources/agentSkillVersions/client/Client.ts
+++ b/src/api/resources/agentSkillVersions/client/Client.ts
@@ -1,9 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,73 +12,114 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace AgentSkillVersionsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class AgentSkillVersionsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: AgentSkillVersionsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List agent skill versions with optional filtering by FQN, agent skill ID, ML Repo, name, or version.
*
- * @param {TrueFoundry.AgentSkillVersionsListRequest} request
+ * @param {TrueFoundry.ListAgentSkillVersionsRequest} request
* @param {AgentSkillVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.agentSkillVersions.list({
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * agentSkillId: "agent_skill_id",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * version: 1
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.AgentSkillVersionsListRequest = {}, requestOptions?: AgentSkillVersionsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.AgentSkillVersionsListRequest): Promise> => { const { limit = 100, offset = 0, fqn, agentSkillId, mlRepoId, name, version } = request; const _queryParams: Record = {
- limit,
- offset,
- fqn,
- agent_skill_id: agentSkillId,
- ml_repo_id: mlRepoId,
- name,
- version
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agent-skill-versions"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListAgentSkillVersionsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agent-skill-versions"); });
+ public async list(
+ request: TrueFoundry.ListAgentSkillVersionsRequest = {},
+ requestOptions?: AgentSkillVersionsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListAgentSkillVersionsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, fqn, agentSkillId, mlRepoId, name, version } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ fqn,
+ agent_skill_id: agentSkillId,
+ ml_repo_id: mlRepoId,
+ name,
+ version,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agent-skill-versions",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListAgentSkillVersionsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/agent-skill-versions",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -89,19 +130,35 @@ export class AgentSkillVersionsClient {
* @param {AgentSkillVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agentSkillVersions.get("agent_skill_version_id")
*/
- public get(agent_skill_version_id: string, requestOptions?: AgentSkillVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ agent_skill_version_id: string,
+ requestOptions?: AgentSkillVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(agent_skill_version_id, requestOptions));
}
- private async __get(agent_skill_version_id: string, requestOptions?: AgentSkillVersionsClient.RequestOptions): Promise> {
+ private async __get(
+ agent_skill_version_id: string,
+ requestOptions?: AgentSkillVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agent-skill-versions/${core.url.encodePathParam(agent_skill_version_id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agent-skill-versions/${core.url.encodePathParam(agent_skill_version_id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -109,24 +166,40 @@ export class AgentSkillVersionsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAgentSkillVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAgentSkillVersionResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agent-skill-versions/{agent_skill_version_id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/agent-skill-versions/{agent_skill_version_id}",
+ );
}
/**
@@ -136,19 +209,35 @@ export class AgentSkillVersionsClient {
* @param {AgentSkillVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agentSkillVersions.delete("agent_skill_version_id")
*/
- public delete(agent_skill_version_id: string, requestOptions?: AgentSkillVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ agent_skill_version_id: string,
+ requestOptions?: AgentSkillVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(agent_skill_version_id, requestOptions));
}
- private async __delete(agent_skill_version_id: string, requestOptions?: AgentSkillVersionsClient.RequestOptions): Promise> {
+ private async __delete(
+ agent_skill_version_id: string,
+ requestOptions?: AgentSkillVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agent-skill-versions/${core.url.encodePathParam(agent_skill_version_id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agent-skill-versions/${core.url.encodePathParam(agent_skill_version_id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -156,23 +245,39 @@ export class AgentSkillVersionsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/api/svc/v1/agent-skill-versions/{agent_skill_version_id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/api/svc/v1/agent-skill-versions/{agent_skill_version_id}",
+ );
}
}
diff --git a/src/api/resources/agentSkillVersions/client/requests/AgentSkillVersionsListRequest.ts b/src/api/resources/agentSkillVersions/client/requests/ListAgentSkillVersionsRequest.ts
similarity index 59%
rename from src/api/resources/agentSkillVersions/client/requests/AgentSkillVersionsListRequest.ts
rename to src/api/resources/agentSkillVersions/client/requests/ListAgentSkillVersionsRequest.ts
index 2d8b9cbd..bac176f6 100644
--- a/src/api/resources/agentSkillVersions/client/requests/AgentSkillVersionsListRequest.ts
+++ b/src/api/resources/agentSkillVersions/client/requests/ListAgentSkillVersionsRequest.ts
@@ -4,27 +4,22 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * agentSkillId: "agent_skill_id",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * version: 1
+ * offset: 0
* }
*/
-export interface AgentSkillVersionsListRequest {
+export interface ListAgentSkillVersionsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Fully Qualified Name uniquely identifying the agent skill version. */
- fqn?: string;
+ fqn?: string | null;
/** Identifier of the agent skill whose versions are being listed. */
- agentSkillId?: string;
+ agentSkillId?: string | null;
/** Identifier of the ML Repo to filter agent skill versions by. */
- mlRepoId?: string;
+ mlRepoId?: string | null;
/** Name of the agent skill to filter versions by. */
- name?: string;
+ name?: string | null;
/** Version number (positive integer) to filter by. */
- version?: number;
+ version?: number | null;
}
diff --git a/src/api/resources/agentSkillVersions/client/requests/index.ts b/src/api/resources/agentSkillVersions/client/requests/index.ts
index 16123636..36fd70be 100644
--- a/src/api/resources/agentSkillVersions/client/requests/index.ts
+++ b/src/api/resources/agentSkillVersions/client/requests/index.ts
@@ -1 +1 @@
-export type { AgentSkillVersionsListRequest } from "./AgentSkillVersionsListRequest.js";
+export type { ListAgentSkillVersionsRequest } from "./ListAgentSkillVersionsRequest.js";
diff --git a/src/api/resources/agentSkills/client/Client.ts b/src/api/resources/agentSkills/client/Client.ts
index 00d731f3..22a375a1 100644
--- a/src/api/resources/agentSkills/client/Client.ts
+++ b/src/api/resources/agentSkills/client/Client.ts
@@ -1,9 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,18 +13,14 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace AgentSkillsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class AgentSkillsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: AgentSkillsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
@@ -33,19 +30,35 @@ export class AgentSkillsClient {
* @param {AgentSkillsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agentSkills.get("agent_skill_id")
*/
- public get(agent_skill_id: string, requestOptions?: AgentSkillsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ agent_skill_id: string,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(agent_skill_id, requestOptions));
}
- private async __get(agent_skill_id: string, requestOptions?: AgentSkillsClient.RequestOptions): Promise> {
+ private async __get(
+ agent_skill_id: string,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agent-skills/${core.url.encodePathParam(agent_skill_id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agent-skills/${core.url.encodePathParam(agent_skill_id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -53,24 +66,40 @@ export class AgentSkillsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAgentSkillResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAgentSkillResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agent-skills/{agent_skill_id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/agent-skills/{agent_skill_id}",
+ );
}
/**
@@ -80,19 +109,35 @@ export class AgentSkillsClient {
* @param {AgentSkillsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agentSkills.delete("agent_skill_id")
*/
- public delete(agent_skill_id: string, requestOptions?: AgentSkillsClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ agent_skill_id: string,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(agent_skill_id, requestOptions));
}
- private async __delete(agent_skill_id: string, requestOptions?: AgentSkillsClient.RequestOptions): Promise> {
+ private async __delete(
+ agent_skill_id: string,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agent-skills/${core.url.encodePathParam(agent_skill_id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agent-skills/${core.url.encodePathParam(agent_skill_id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -100,77 +145,139 @@ export class AgentSkillsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/api/svc/v1/agent-skills/{agent_skill_id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/api/svc/v1/agent-skills/{agent_skill_id}",
+ );
}
/**
* List agent skills with optional filtering by FQN, ML Repo, or name.
*
- * @param {TrueFoundry.AgentSkillsListRequest} request
+ * @param {TrueFoundry.ListAgentSkillsRequest} request
* @param {AgentSkillsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.agentSkills.list({
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * includeEmptyAgentSkills: true
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.AgentSkillsListRequest = {}, requestOptions?: AgentSkillsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.AgentSkillsListRequest): Promise> => { const { limit = 100, offset = 0, fqn, mlRepoId, name, includeEmptyAgentSkills = true } = request; const _queryParams: Record = {
- limit,
- offset,
- fqn,
- ml_repo_id: mlRepoId,
- name,
- include_empty_agent_skills: includeEmptyAgentSkills
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agent-skills"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListAgentSkillsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agent-skills"); });
+ public async list(
+ request: TrueFoundry.ListAgentSkillsRequest = {},
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListAgentSkillsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, fqn, mlRepoId, name, includeEmptyAgentSkills = true } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ fqn,
+ ml_repo_id: mlRepoId,
+ name,
+ include_empty_agent_skills: includeEmptyAgentSkills,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agent-skills",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListAgentSkillsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/agent-skills",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -180,6 +287,9 @@ export class AgentSkillsClient {
* @param {TrueFoundry.ApplyAgentSkillRequest} request
* @param {AgentSkillsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.agentSkills.createOrUpdate({
* manifest: {
@@ -196,39 +306,75 @@ export class AgentSkillsClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.ApplyAgentSkillRequest, requestOptions?: AgentSkillsClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.ApplyAgentSkillRequest,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.ApplyAgentSkillRequest, requestOptions?: AgentSkillsClient.RequestOptions): Promise> {
+ private async __createOrUpdate(
+ request: TrueFoundry.ApplyAgentSkillRequest,
+ requestOptions?: AgentSkillsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agent-skill-versions"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agent-skill-versions",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.ApplyAgentSkillRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.ApplyAgentSkillRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAgentSkillVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAgentSkillVersionResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/api/svc/v1/agent-skill-versions");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "PUT",
+ "/api/svc/v1/agent-skill-versions",
+ );
}
}
diff --git a/src/api/resources/agentSkills/client/requests/ApplyAgentSkillRequest.ts b/src/api/resources/agentSkills/client/requests/ApplyAgentSkillRequest.ts
index bf37e3ff..15df1c73 100644
--- a/src/api/resources/agentSkills/client/requests/ApplyAgentSkillRequest.ts
+++ b/src/api/resources/agentSkills/client/requests/ApplyAgentSkillRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
diff --git a/src/api/resources/agentSkills/client/requests/AgentSkillsListRequest.ts b/src/api/resources/agentSkills/client/requests/ListAgentSkillsRequest.ts
similarity index 57%
rename from src/api/resources/agentSkills/client/requests/AgentSkillsListRequest.ts
rename to src/api/resources/agentSkills/client/requests/ListAgentSkillsRequest.ts
index 013ba2f8..720f6e89 100644
--- a/src/api/resources/agentSkills/client/requests/AgentSkillsListRequest.ts
+++ b/src/api/resources/agentSkills/client/requests/ListAgentSkillsRequest.ts
@@ -4,24 +4,20 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * includeEmptyAgentSkills: true
+ * offset: 0
* }
*/
-export interface AgentSkillsListRequest {
+export interface ListAgentSkillsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Fully Qualified Name uniquely identifying the agent skill. */
- fqn?: string;
+ fqn?: string | null;
/** Identifier of the ML Repo to filter agent skills by. */
- mlRepoId?: string;
+ mlRepoId?: string | null;
/** Name of the agent skill to filter by. */
- name?: string;
+ name?: string | null;
/** Whether to include agent skills that have no versions. */
- includeEmptyAgentSkills?: boolean;
+ includeEmptyAgentSkills?: boolean | null;
}
diff --git a/src/api/resources/agentSkills/client/requests/index.ts b/src/api/resources/agentSkills/client/requests/index.ts
index b43f146a..b57c8645 100644
--- a/src/api/resources/agentSkills/client/requests/index.ts
+++ b/src/api/resources/agentSkills/client/requests/index.ts
@@ -1,2 +1,2 @@
-export type { AgentSkillsListRequest } from "./AgentSkillsListRequest.js";
export type { ApplyAgentSkillRequest } from "./ApplyAgentSkillRequest.js";
+export type { ListAgentSkillsRequest } from "./ListAgentSkillsRequest.js";
diff --git a/src/api/resources/agentVersions/client/Client.ts b/src/api/resources/agentVersions/client/Client.ts
index 5011ecc1..3e119322 100644
--- a/src/api/resources/agentVersions/client/Client.ts
+++ b/src/api/resources/agentVersions/client/Client.ts
@@ -1,76 +1,121 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
-import * as TrueFoundry from "../../../index.js";
+import type * as TrueFoundry from "../../../index.js";
export declare namespace AgentVersionsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class AgentVersionsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: AgentVersionsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List Agent Versions for the provided agent id
*
- * @param {TrueFoundry.AgentVersionsListRequest} request
+ * @param {TrueFoundry.ListAgentVersionsRequest} request
* @param {AgentVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.agentVersions.list({
* limit: 10,
- * offset: 0,
- * id: "id"
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.AgentVersionsListRequest = {}, requestOptions?: AgentVersionsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.AgentVersionsListRequest): Promise> => { const { limit = 100, offset = 0, id } = request; const _queryParams: Record = {
- limit,
- offset,
- id
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agent-versions"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListAgentVersionsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agent-versions"); });
+ public async list(
+ request: TrueFoundry.ListAgentVersionsRequest = {},
+ requestOptions?: AgentVersionsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListAgentVersionsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, id } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ id,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agent-versions",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListAgentVersionsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/agent-versions",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
}
diff --git a/src/api/resources/agentVersions/client/requests/AgentVersionsListRequest.ts b/src/api/resources/agentVersions/client/requests/ListAgentVersionsRequest.ts
similarity index 60%
rename from src/api/resources/agentVersions/client/requests/AgentVersionsListRequest.ts
rename to src/api/resources/agentVersions/client/requests/ListAgentVersionsRequest.ts
index 027498f5..ddd7e989 100644
--- a/src/api/resources/agentVersions/client/requests/AgentVersionsListRequest.ts
+++ b/src/api/resources/agentVersions/client/requests/ListAgentVersionsRequest.ts
@@ -4,15 +4,14 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * id: "id"
+ * offset: 0
* }
*/
-export interface AgentVersionsListRequest {
+export interface ListAgentVersionsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Agent Id */
- id?: string;
+ id?: string | null;
}
diff --git a/src/api/resources/agentVersions/client/requests/index.ts b/src/api/resources/agentVersions/client/requests/index.ts
index 434dc607..f8e9b868 100644
--- a/src/api/resources/agentVersions/client/requests/index.ts
+++ b/src/api/resources/agentVersions/client/requests/index.ts
@@ -1 +1 @@
-export type { AgentVersionsListRequest } from "./AgentVersionsListRequest.js";
+export type { ListAgentVersionsRequest } from "./ListAgentVersionsRequest.js";
diff --git a/src/api/resources/agents/client/Client.ts b/src/api/resources/agents/client/Client.ts
index 5ddd65fc..b9f591b8 100644
--- a/src/api/resources/agents/client/Client.ts
+++ b/src/api/resources/agents/client/Client.ts
@@ -1,9 +1,11 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { toJson } from "../../../../core/json.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,76 +14,131 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace AgentsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class AgentsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: AgentsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List all Agents for a tenant.
*
- * @param {TrueFoundry.AgentsListRequest} request
+ * @param {TrueFoundry.ListAgentsRequest} request
* @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.UnauthorizedError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agents.list({
* limit: 10,
- * offset: 0,
- * name: "name",
- * namePrefix: "namePrefix",
- * type: "remote-agent",
- * attributes: ["attributes"]
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.AgentsListRequest = {}, requestOptions?: AgentsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.AgentsListRequest): Promise> => { const { limit = 100, offset = 0, name, namePrefix, "type": type_, attributes } = request; const _queryParams: Record = {
- limit,
- offset,
- name,
- namePrefix,
- type: type_ != null ? serializers.AgentsListRequestType.jsonOrThrow(type_, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }) : undefined,
- attributes
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agents"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListAgentsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
+ public async list(
+ request: TrueFoundry.ListAgentsRequest = {},
+ requestOptions?: AgentsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListAgentsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, name, namePrefix, type: type_, attributes } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ name,
+ namePrefix,
+ type:
+ type_ !== undefined
+ ? serializers.ListAgentsRequestType.jsonOrThrow(type_, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ })
+ : undefined,
+ attributes: attributes !== undefined ? toJson(attributes) : undefined,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agents",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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,
});
- }
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agents"); });
+ if (_response.ok) {
+ return {
+ data: serializers.ListAgentsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agents");
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -96,6 +153,8 @@ export class AgentsClient {
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.InternalServerError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agents.createOrUpdate({
@@ -113,43 +172,107 @@ export class AgentsClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.CreateOrUpdateAgentRequest, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.CreateOrUpdateAgentRequest,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.CreateOrUpdateAgentRequest, requestOptions?: AgentsClient.RequestOptions): Promise> {
+ private async __createOrUpdate(
+ request: TrueFoundry.CreateOrUpdateAgentRequest,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/agents"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/agents",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.CreateOrUpdateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.CreateOrUpdateAgentRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAgentVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAgentVersionResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 400: throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 500: throw new TrueFoundry.InternalServerError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 400:
+ throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 500:
+ throw new TrueFoundry.InternalServerError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -164,19 +287,35 @@ export class AgentsClient {
*
* @throws {@link TrueFoundry.UnauthorizedError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agents.get("jqfwg345gi25n5ju2yz5iz6m")
*/
- public get(id: string, requestOptions?: AgentsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
}
- private async __get(id: string, requestOptions?: AgentsClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agents/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agents/${core.url.encodePathParam(id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -184,21 +323,42 @@ export class AgentsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAgentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAgentResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -215,6 +375,8 @@ export class AgentsClient {
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.InternalServerError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.agents.delete("jqfwg345gi25n5ju2yz5iz6m")
@@ -223,11 +385,22 @@ export class AgentsClient {
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
}
- private async __delete(id: string, requestOptions?: AgentsClient.RequestOptions): Promise> {
+ private async __delete(
+ id: string,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/agents/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agents/${core.url.encodePathParam(id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -235,7 +408,7 @@ export class AgentsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
return { data: undefined, rawResponse: _response.rawResponse };
@@ -243,18 +416,160 @@ export class AgentsClient {
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 500: throw new TrueFoundry.InternalServerError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 500:
+ throw new TrueFoundry.InternalServerError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/api/svc/v1/agents/{id}");
}
+
+ /**
+ * Returns the TrueFoundry-backed token for the agent's linked identity, generating one on demand if none exists yet (or the stored one has expired). Only valid for agents whose identity is TrueFoundry-backed. Requires manage access on the agent since the token authenticates as it. 404s if the agent has no linked identity.
+ *
+ * @param {string} id - System-generated agent ID.
+ * @param {AgentsClient.RequestOptions} requestOptions - Request-specific configuration.
+ *
+ * @throws {@link TrueFoundry.UnauthorizedError}
+ * @throws {@link TrueFoundry.ForbiddenError}
+ * @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link TrueFoundry.UnprocessableEntityError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
+ * @example
+ * await client.agents.getToken("jqfwg345gi25n5ju2yz5iz6m")
+ */
+ public getToken(
+ id: string,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): core.HttpResponsePromise {
+ return core.HttpResponsePromise.fromPromise(this.__getToken(id, requestOptions));
+ }
+
+ private async __getToken(
+ id: string,
+ requestOptions?: AgentsClient.RequestOptions,
+ ): Promise> {
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/agents/${core.url.encodePathParam(id)}/token`,
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
+ 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: serializers.GetAgentIdentityTokenResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 422:
+ throw new TrueFoundry.UnprocessableEntityError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/agents/{id}/token");
+ }
}
diff --git a/src/api/resources/agents/client/requests/CreateOrUpdateAgentRequest.ts b/src/api/resources/agents/client/requests/CreateOrUpdateAgentRequest.ts
index c4eedc0e..e815c611 100644
--- a/src/api/resources/agents/client/requests/CreateOrUpdateAgentRequest.ts
+++ b/src/api/resources/agents/client/requests/CreateOrUpdateAgentRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
@@ -23,5 +23,5 @@ export interface CreateOrUpdateAgentRequest {
/** Agent Manifest */
manifest: TrueFoundry.AgentManifest;
/** Validate the manifest and collaborators without persisting or syncing to the gateway store */
- dryRun?: boolean;
+ dryRun?: boolean | null;
}
diff --git a/src/api/resources/agents/client/requests/AgentsListRequest.ts b/src/api/resources/agents/client/requests/ListAgentsRequest.ts
similarity index 64%
rename from src/api/resources/agents/client/requests/AgentsListRequest.ts
rename to src/api/resources/agents/client/requests/ListAgentsRequest.ts
index 964f6a53..f6ec1e6f 100644
--- a/src/api/resources/agents/client/requests/AgentsListRequest.ts
+++ b/src/api/resources/agents/client/requests/ListAgentsRequest.ts
@@ -1,29 +1,25 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
* {
* limit: 10,
- * offset: 0,
- * name: "name",
- * namePrefix: "namePrefix",
- * type: "remote-agent",
- * attributes: ["attributes"]
+ * offset: 0
* }
*/
-export interface AgentsListRequest {
+export interface ListAgentsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Agent Name */
- name?: string;
+ name?: string | null;
/** When set, only agents whose name starts with this string (case-sensitive). Ignored when `name` is also provided. */
- namePrefix?: string;
+ namePrefix?: string | null;
/** Filter by latest manifest discriminator (`remote-agent`, `truefoundry-agent`, or `agent`). NOTE: `agent` is a legacy type and will be removed in the future. */
- type?: TrueFoundry.AgentsListRequestType;
+ type?: TrueFoundry.ListAgentsRequestType | null;
/** Comma-separated list of attributes to return (e.g. id,name). When provided, only the specified fields are fetched. `id` is always included. */
- attributes?: string | string[];
+ attributes?: string[] | null;
}
diff --git a/src/api/resources/agents/client/requests/index.ts b/src/api/resources/agents/client/requests/index.ts
index 6f0e31a0..97d7b333 100644
--- a/src/api/resources/agents/client/requests/index.ts
+++ b/src/api/resources/agents/client/requests/index.ts
@@ -1,2 +1,2 @@
-export type { AgentsListRequest } from "./AgentsListRequest.js";
export type { CreateOrUpdateAgentRequest } from "./CreateOrUpdateAgentRequest.js";
+export type { ListAgentsRequest } from "./ListAgentsRequest.js";
diff --git a/src/api/resources/agents/types/AgentsListRequestType.ts b/src/api/resources/agents/types/AgentsListRequestType.ts
deleted file mode 100644
index 12f69458..00000000
--- a/src/api/resources/agents/types/AgentsListRequestType.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const AgentsListRequestType = {
- RemoteAgent: "remote-agent",
- TruefoundryAgent: "truefoundry-agent",
- Agent: "agent"
- } as const;
-export type AgentsListRequestType = typeof AgentsListRequestType[keyof typeof AgentsListRequestType];
diff --git a/src/api/resources/agents/types/ListAgentsRequestType.ts b/src/api/resources/agents/types/ListAgentsRequestType.ts
new file mode 100644
index 00000000..c53de885
--- /dev/null
+++ b/src/api/resources/agents/types/ListAgentsRequestType.ts
@@ -0,0 +1,8 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const ListAgentsRequestType = {
+ RemoteAgent: "remote-agent",
+ TruefoundryAgent: "truefoundry-agent",
+ Agent: "agent",
+} as const;
+export type ListAgentsRequestType = (typeof ListAgentsRequestType)[keyof typeof ListAgentsRequestType];
diff --git a/src/api/resources/agents/types/index.ts b/src/api/resources/agents/types/index.ts
index f9cb644c..51e547e5 100644
--- a/src/api/resources/agents/types/index.ts
+++ b/src/api/resources/agents/types/index.ts
@@ -1 +1 @@
-export * from "./AgentsListRequestType.js";
+export * from "./ListAgentsRequestType.js";
diff --git a/src/api/resources/alerts/client/Client.ts b/src/api/resources/alerts/client/Client.ts
index 8f12a56f..17f05a3e 100644
--- a/src/api/resources/alerts/client/Client.ts
+++ b/src/api/resources/alerts/client/Client.ts
@@ -1,9 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,77 +12,116 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace AlertsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class AlertsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: AlertsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* Get alerts for a given application or cluster filtered by start and end timestamp
*
- * @param {TrueFoundry.AlertsListRequest} request
+ * @param {TrueFoundry.ListAlertsRequest} request
* @param {AlertsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.BadRequestError}
* @throws {@link TrueFoundry.ForbiddenError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
- * await client.alerts.list({
- * startTs: "startTs",
- * endTs: "endTs",
- * clusterId: "clusterId",
- * applicationId: "applicationId",
- * alertStatus: "firing"
- * })
+ * await client.alerts.list()
*/
- public list(request: TrueFoundry.AlertsListRequest = {}, requestOptions?: AlertsClient.RequestOptions): core.HttpResponsePromise {
+ public list(
+ request: TrueFoundry.ListAlertsRequest = {},
+ requestOptions?: AlertsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
}
- private async __list(request: TrueFoundry.AlertsListRequest = {}, requestOptions?: AlertsClient.RequestOptions): Promise> {
+ private async __list(
+ request: TrueFoundry.ListAlertsRequest = {},
+ requestOptions?: AlertsClient.RequestOptions,
+ ): Promise> {
const { startTs, endTs, clusterId, applicationId, alertStatus } = request;
const _queryParams: Record = {
startTs,
endTs,
clusterId,
applicationId,
- alertStatus: alertStatus != null ? serializers.AlertStatus.jsonOrThrow(alertStatus, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }) : undefined
+ alertStatus:
+ alertStatus != null
+ ? serializers.AlertStatus.jsonOrThrow(alertStatus, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ })
+ : undefined,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/alerts"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/alerts",
+ ),
method: "GET",
headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetAlertsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetAlertsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 400: throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 400:
+ throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
diff --git a/src/api/resources/alerts/client/requests/AlertsListRequest.ts b/src/api/resources/alerts/client/requests/ListAlertsRequest.ts
similarity index 54%
rename from src/api/resources/alerts/client/requests/AlertsListRequest.ts
rename to src/api/resources/alerts/client/requests/ListAlertsRequest.ts
index dfdf0346..92d65e26 100644
--- a/src/api/resources/alerts/client/requests/AlertsListRequest.ts
+++ b/src/api/resources/alerts/client/requests/ListAlertsRequest.ts
@@ -1,26 +1,20 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
- * {
- * startTs: "startTs",
- * endTs: "endTs",
- * clusterId: "clusterId",
- * applicationId: "applicationId",
- * alertStatus: "firing"
- * }
+ * {}
*/
-export interface AlertsListRequest {
+export interface ListAlertsRequest {
/** Start timestamp for filtering alerts (ISO 8601 format, UTC). Must be before endTs. */
- startTs?: string;
+ startTs?: string | null;
/** End timestamp for filtering alerts (ISO 8601 format, UTC). Must be after startTs. */
- endTs?: string;
+ endTs?: string | null;
/** Unique identifier of the cluster. */
- clusterId?: string;
+ clusterId?: string | null;
/** Unique identifier of the application. */
- applicationId?: string;
+ applicationId?: string | null;
/** Filter by alert status. */
alertStatus?: TrueFoundry.AlertStatus;
}
diff --git a/src/api/resources/alerts/client/requests/index.ts b/src/api/resources/alerts/client/requests/index.ts
index 209e870f..b1cc6cb5 100644
--- a/src/api/resources/alerts/client/requests/index.ts
+++ b/src/api/resources/alerts/client/requests/index.ts
@@ -1 +1 @@
-export type { AlertsListRequest } from "./AlertsListRequest.js";
+export type { ListAlertsRequest } from "./ListAlertsRequest.js";
diff --git a/src/api/resources/applicationVersions/client/Client.ts b/src/api/resources/applicationVersions/client/Client.ts
index b8dd1da1..44d06aef 100644
--- a/src/api/resources/applicationVersions/client/Client.ts
+++ b/src/api/resources/applicationVersions/client/Client.ts
@@ -1,9 +1,9 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,29 +12,27 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace ApplicationVersionsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class ApplicationVersionsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: ApplicationVersionsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List deployments for a given application. Each deployment is a new version of the application.
*
* @param {string} id - Unique identifier of the application
- * @param {TrueFoundry.ApplicationVersionsListRequest} request
+ * @param {TrueFoundry.ListApplicationVersionsRequest} request
* @param {ApplicationVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applicationVersions.list("id", {
@@ -44,43 +42,103 @@ export class ApplicationVersionsClient {
* deploymentId: "deployment123"
* })
*/
- public async list(id: string, request: TrueFoundry.ApplicationVersionsListRequest = {}, requestOptions?: ApplicationVersionsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ApplicationVersionsListRequest): Promise> => { const { limit = 100, offset = 0, version, deploymentId } = request; const _queryParams: Record = {
- limit,
- offset,
- version,
- deploymentId
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments`),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListApplicationDeploymentsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
+ public async list(
+ id: string,
+ request: TrueFoundry.ListApplicationVersionsRequest = {},
+ requestOptions?: ApplicationVersionsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListApplicationVersionsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, version, deploymentId } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ version,
+ deploymentId,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments`,
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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,
});
- }
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/apps/{id}/deployments"); });
+ if (_response.ok) {
+ return {
+ data: serializers.ListApplicationDeploymentsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/apps/{id}/deployments",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -93,19 +151,37 @@ export class ApplicationVersionsClient {
*
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applicationVersions.get("id", "deploymentId")
*/
- public get(id: string, deploymentId: string, requestOptions?: ApplicationVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, deploymentId, requestOptions));
}
- private async __get(id: string, deploymentId: string, requestOptions?: ApplicationVersionsClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -113,24 +189,50 @@ export class ApplicationVersionsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/apps/{id}/deployments/{deploymentId}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/apps/{id}/deployments/{deploymentId}",
+ );
}
}
diff --git a/src/api/resources/applicationVersions/client/requests/ApplicationVersionsListRequest.ts b/src/api/resources/applicationVersions/client/requests/ListApplicationVersionsRequest.ts
similarity index 68%
rename from src/api/resources/applicationVersions/client/requests/ApplicationVersionsListRequest.ts
rename to src/api/resources/applicationVersions/client/requests/ListApplicationVersionsRequest.ts
index 64efddc7..61a8d0f6 100644
--- a/src/api/resources/applicationVersions/client/requests/ApplicationVersionsListRequest.ts
+++ b/src/api/resources/applicationVersions/client/requests/ListApplicationVersionsRequest.ts
@@ -9,13 +9,13 @@
* deploymentId: "deployment123"
* }
*/
-export interface ApplicationVersionsListRequest {
+export interface ListApplicationVersionsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Deployment version to filter by */
- version?: string;
+ version?: string | null;
/** Deployment ID to filter by */
- deploymentId?: string;
+ deploymentId?: string | null;
}
diff --git a/src/api/resources/applicationVersions/client/requests/index.ts b/src/api/resources/applicationVersions/client/requests/index.ts
index e498217f..436acc71 100644
--- a/src/api/resources/applicationVersions/client/requests/index.ts
+++ b/src/api/resources/applicationVersions/client/requests/index.ts
@@ -1 +1 @@
-export type { ApplicationVersionsListRequest } from "./ApplicationVersionsListRequest.js";
+export type { ListApplicationVersionsRequest } from "./ListApplicationVersionsRequest.js";
diff --git a/src/api/resources/applications/client/Client.ts b/src/api/resources/applications/client/Client.ts
index 389787a3..b1f9ca84 100644
--- a/src/api/resources/applications/client/Client.ts
+++ b/src/api/resources/applications/client/Client.ts
@@ -1,9 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,98 +13,167 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace ApplicationsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class ApplicationsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: ApplicationsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List applications the caller can read.
*
- * @param {TrueFoundry.ApplicationsListRequest} request
+ * @param {TrueFoundry.ListApplicationsRequest} request
* @param {ApplicationsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.BadRequestError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.list({
* limit: 10,
- * offset: 0,
- * applicationId: "applicationId",
- * workspaceId: "workspaceId",
- * applicationName: "applicationName",
- * fqn: "fqn",
- * workspaceFqn: "workspaceFqn",
- * applicationType: "async-service",
- * nameSearchQuery: "nameSearchQuery",
- * environmentId: "environmentId",
- * clusterId: "clusterId",
- * applicationSetId: "applicationSetId",
- * paused: true,
- * deviceTypeFilter: "cpu",
- * lastDeployedBySubjects: "lastDeployedBySubjects",
- * lifecycleStage: "active",
- * isRecommendationPresentAndVisible: true
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.ApplicationsListRequest = {}, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ApplicationsListRequest): Promise> => { const { limit = 100, offset = 0, applicationId, workspaceId, applicationName, fqn, workspaceFqn, applicationType, nameSearchQuery, environmentId, clusterId, applicationSetId, paused, deviceTypeFilter, lastDeployedBySubjects, lifecycleStage, isRecommendationPresentAndVisible } = request; const _queryParams: Record = {
- limit,
- offset,
- applicationId,
- workspaceId,
- applicationName,
- fqn,
- workspaceFqn,
- applicationType: applicationType != null ? serializers.ApplicationType.jsonOrThrow(applicationType, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }) : undefined,
- nameSearchQuery,
- environmentId,
- clusterId,
- applicationSetId,
- paused,
- deviceTypeFilter: deviceTypeFilter != null ? serializers.ApplicationsListRequestDeviceTypeFilter.jsonOrThrow(deviceTypeFilter, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }) : undefined,
- lastDeployedBySubjects,
- lifecycleStage: lifecycleStage != null ? serializers.ApplicationsListRequestLifecycleStage.jsonOrThrow(lifecycleStage, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }) : undefined,
- isRecommendationPresentAndVisible
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/apps"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListApplicationsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 400: throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
+ public async list(
+ request: TrueFoundry.ListApplicationsRequest = {},
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListApplicationsRequest,
+ ): Promise> => {
+ const {
+ limit = 100,
+ offset = 0,
+ applicationId,
+ workspaceId,
+ applicationName,
+ fqn,
+ workspaceFqn,
+ applicationType,
+ nameSearchQuery,
+ environmentId,
+ clusterId,
+ applicationSetId,
+ paused,
+ deviceTypeFilter,
+ lastDeployedBySubjects,
+ lifecycleStage,
+ isRecommendationPresentAndVisible,
+ } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ applicationId,
+ workspaceId,
+ applicationName,
+ fqn,
+ workspaceFqn,
+ applicationType:
+ applicationType != null
+ ? serializers.ApplicationType.jsonOrThrow(applicationType, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ })
+ : undefined,
+ nameSearchQuery,
+ environmentId,
+ clusterId,
+ applicationSetId,
+ paused,
+ deviceTypeFilter:
+ deviceTypeFilter !== undefined
+ ? serializers.ListApplicationsRequestDeviceTypeFilter.jsonOrThrow(deviceTypeFilter, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ })
+ : undefined,
+ lastDeployedBySubjects,
+ lifecycleStage:
+ lifecycleStage !== undefined
+ ? serializers.ListApplicationsRequestLifecycleStage.jsonOrThrow(lifecycleStage, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ })
+ : undefined,
+ isRecommendationPresentAndVisible,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/apps",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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,
});
- }
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/apps"); });
+ if (_response.ok) {
+ return {
+ data: serializers.ListApplicationsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 400:
+ throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/apps");
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -117,6 +187,8 @@ export class ApplicationsClient {
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.ConflictError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.createOrUpdate({
@@ -125,42 +197,96 @@ export class ApplicationsClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.CreateDeploymentRequest, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.CreateDeploymentRequest,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.CreateDeploymentRequest, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __createOrUpdate(
+ request: TrueFoundry.CreateDeploymentRequest,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/apps"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/apps",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.CreateDeploymentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.CreateDeploymentRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 400: throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 409: throw new TrueFoundry.ConflictError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 400:
+ throw new TrueFoundry.BadRequestError(_response.error.body, _response.rawResponse);
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 409:
+ throw new TrueFoundry.ConflictError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -175,19 +301,35 @@ export class ApplicationsClient {
*
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.get("id")
*/
- public get(id: string, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
}
- private async __get(id: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -195,21 +337,42 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetApplicationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetApplicationResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -224,19 +387,35 @@ export class ApplicationsClient {
*
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.delete("id")
*/
- public delete(id: string, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
}
- private async __delete(id: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __delete(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -244,21 +423,42 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.DeleteApplicationResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.DeleteApplicationResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -274,19 +474,37 @@ export class ApplicationsClient {
*
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.redeploy("id", "deploymentId")
*/
- public redeploy(id: string, deploymentId: string, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public redeploy(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__redeploy(id, deploymentId, requestOptions));
}
- private async __redeploy(id: string, deploymentId: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __redeploy(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}/redeploy`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}/redeploy`,
+ ),
method: "POST",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -294,25 +512,51 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetApplicationDeploymentResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/apps/{id}/deployments/{deploymentId}/redeploy");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/apps/{id}/deployments/{deploymentId}/redeploy",
+ );
}
/**
@@ -325,6 +569,8 @@ export class ApplicationsClient {
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.MethodNotAllowedError}
* @throws {@link TrueFoundry.NotImplementedError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.scaleToZero("id")
@@ -333,11 +579,22 @@ export class ApplicationsClient {
return core.HttpResponsePromise.fromPromise(this.__scaleToZero(id, requestOptions));
}
- private async __scaleToZero(id: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __scaleToZero(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/scale-to-zero`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/scale-to-zero`,
+ ),
method: "PATCH",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -345,7 +602,7 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
return { data: undefined, rawResponse: _response.rawResponse };
@@ -353,19 +610,47 @@ export class ApplicationsClient {
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 405: throw new TrueFoundry.MethodNotAllowedError(_response.error.body, _response.rawResponse);
- case 501: throw new TrueFoundry.NotImplementedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 405:
+ throw new TrueFoundry.MethodNotAllowedError(_response.error.body, _response.rawResponse);
+ case 501:
+ throw new TrueFoundry.NotImplementedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/api/svc/v1/apps/{id}/scale-to-zero");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "PATCH",
+ "/api/svc/v1/apps/{id}/scale-to-zero",
+ );
}
/**
@@ -377,19 +662,35 @@ export class ApplicationsClient {
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.NotImplementedError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.scaleToOriginal("id")
*/
- public scaleToOriginal(id: string, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public scaleToOriginal(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__scaleToOriginal(id, requestOptions));
}
- private async __scaleToOriginal(id: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __scaleToOriginal(
+ id: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/scale-to-original`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/scale-to-original`,
+ ),
method: "PATCH",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -397,26 +698,62 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.Deployment.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.Deployment.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 501: throw new TrueFoundry.NotImplementedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 501:
+ throw new TrueFoundry.NotImplementedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/api/svc/v1/apps/{id}/scale-to-original");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "PATCH",
+ "/api/svc/v1/apps/{id}/scale-to-original",
+ );
}
/**
@@ -429,19 +766,37 @@ export class ApplicationsClient {
* @throws {@link TrueFoundry.ForbiddenError}
* @throws {@link TrueFoundry.NotFoundError}
* @throws {@link TrueFoundry.ConflictError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.applications.cancelDeployment("id", "deploymentId")
*/
- public cancelDeployment(id: string, deploymentId: string, requestOptions?: ApplicationsClient.RequestOptions): core.HttpResponsePromise {
+ public cancelDeployment(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__cancelDeployment(id, deploymentId, requestOptions));
}
- private async __cancelDeployment(id: string, deploymentId: string, requestOptions?: ApplicationsClient.RequestOptions): Promise> {
+ private async __cancelDeployment(
+ id: string,
+ deploymentId: string,
+ requestOptions?: ApplicationsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}/cancel`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/apps/${core.url.encodePathParam(id)}/deployments/${core.url.encodePathParam(deploymentId)}/cancel`,
+ ),
method: "POST",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -449,25 +804,61 @@ export class ApplicationsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.ApplicationsCancelDeploymentResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.CancelDeploymentApplicationsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 403: throw new TrueFoundry.ForbiddenError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- case 409: throw new TrueFoundry.ConflictError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 403:
+ throw new TrueFoundry.ForbiddenError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ case 409:
+ throw new TrueFoundry.ConflictError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/apps/{id}/deployments/{deploymentId}/cancel");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/apps/{id}/deployments/{deploymentId}/cancel",
+ );
}
}
diff --git a/src/api/resources/applications/client/requests/CreateDeploymentRequest.ts b/src/api/resources/applications/client/requests/CreateDeploymentRequest.ts
index 0fe710a6..274d0772 100644
--- a/src/api/resources/applications/client/requests/CreateDeploymentRequest.ts
+++ b/src/api/resources/applications/client/requests/CreateDeploymentRequest.ts
@@ -12,17 +12,17 @@ export interface CreateDeploymentRequest {
/** Manifest of application */
manifest: Record;
/** Dry run */
- dryRun?: boolean;
+ dryRun?: boolean | null;
/** Cancels any ongoing deployments */
- forceDeploy?: boolean;
+ forceDeploy?: boolean | null;
/** Trigger on deploy */
- triggerOnDeploy?: boolean;
+ triggerOnDeploy?: boolean | null;
/** workspace id of the workspace */
- workspaceId?: string;
+ workspaceId?: string | null;
/** Id of the application */
- applicationId?: string;
+ applicationId?: string | null;
/** Name of application */
- name?: string;
+ name?: string | null;
/** Application Set Id */
- applicationSetId?: string;
+ applicationSetId?: string | null;
}
diff --git a/src/api/resources/applications/client/requests/ApplicationsListRequest.ts b/src/api/resources/applications/client/requests/ListApplicationsRequest.ts
similarity index 50%
rename from src/api/resources/applications/client/requests/ApplicationsListRequest.ts
rename to src/api/resources/applications/client/requests/ListApplicationsRequest.ts
index 3d7a848e..03a7f6c7 100644
--- a/src/api/resources/applications/client/requests/ApplicationsListRequest.ts
+++ b/src/api/resources/applications/client/requests/ListApplicationsRequest.ts
@@ -1,62 +1,47 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
* {
* limit: 10,
- * offset: 0,
- * applicationId: "applicationId",
- * workspaceId: "workspaceId",
- * applicationName: "applicationName",
- * fqn: "fqn",
- * workspaceFqn: "workspaceFqn",
- * applicationType: "async-service",
- * nameSearchQuery: "nameSearchQuery",
- * environmentId: "environmentId",
- * clusterId: "clusterId",
- * applicationSetId: "applicationSetId",
- * paused: true,
- * deviceTypeFilter: "cpu",
- * lastDeployedBySubjects: "lastDeployedBySubjects",
- * lifecycleStage: "active",
- * isRecommendationPresentAndVisible: true
+ * offset: 0
* }
*/
-export interface ApplicationsListRequest {
+export interface ListApplicationsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Unique identifier of the application to filter by */
- applicationId?: string;
+ applicationId?: string | null;
/** Workspace IDs to filter by (comma-separated) */
- workspaceId?: string;
+ workspaceId?: string | null;
/** Exact application name to filter by. Takes precedence over nameSearchQuery if both are provided. */
- applicationName?: string;
+ applicationName?: string | null;
/** FQN of the application to filter by. */
- fqn?: string;
+ fqn?: string | null;
/** FQN of the workspace to filter by. */
- workspaceFqn?: string;
+ workspaceFqn?: string | null;
/** Application type to filter by (comma-separated). */
applicationType?: TrueFoundry.ApplicationType;
/** Substring search query for application name. Ignored if applicationName is also provided. */
- nameSearchQuery?: string;
+ nameSearchQuery?: string | null;
/** Environment IDs to filter by (comma-separated) */
- environmentId?: string;
+ environmentId?: string | null;
/** Cluster IDs to filter by (comma-separated) */
- clusterId?: string;
+ clusterId?: string | null;
/** Application set ID to filter by */
- applicationSetId?: string;
+ applicationSetId?: string | null;
/** Filter by explicit pause state (true = paused, false = not paused). Does not account for autoshutdown. */
- paused?: boolean;
+ paused?: boolean | null;
/** Device type to filter by (comma-separated). */
- deviceTypeFilter?: TrueFoundry.ApplicationsListRequestDeviceTypeFilter;
+ deviceTypeFilter?: TrueFoundry.ListApplicationsRequestDeviceTypeFilter | null;
/** Subject slugs of last deployers to filter by (comma-separated). Email for users (e.g. user@example.com), name for virtual accounts. */
- lastDeployedBySubjects?: string;
+ lastDeployedBySubjects?: string | null;
/** Application lifecycle stage to filter by */
- lifecycleStage?: TrueFoundry.ApplicationsListRequestLifecycleStage;
+ lifecycleStage?: TrueFoundry.ListApplicationsRequestLifecycleStage | null;
/** Whether the application has visible recommendations */
- isRecommendationPresentAndVisible?: boolean;
+ isRecommendationPresentAndVisible?: boolean | null;
}
diff --git a/src/api/resources/applications/client/requests/index.ts b/src/api/resources/applications/client/requests/index.ts
index b50ad798..f3ffc597 100644
--- a/src/api/resources/applications/client/requests/index.ts
+++ b/src/api/resources/applications/client/requests/index.ts
@@ -1,2 +1,2 @@
-export type { ApplicationsListRequest } from "./ApplicationsListRequest.js";
export type { CreateDeploymentRequest } from "./CreateDeploymentRequest.js";
+export type { ListApplicationsRequest } from "./ListApplicationsRequest.js";
diff --git a/src/api/resources/applications/types/ApplicationsListRequestDeviceTypeFilter.ts b/src/api/resources/applications/types/ApplicationsListRequestDeviceTypeFilter.ts
deleted file mode 100644
index c5e4f368..00000000
--- a/src/api/resources/applications/types/ApplicationsListRequestDeviceTypeFilter.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const ApplicationsListRequestDeviceTypeFilter = {
- Cpu: "cpu",
- NvidiaGpu: "nvidia_gpu",
- AwsInferentia: "aws_inferentia",
- NvidiaMigGpu: "nvidia_mig_gpu",
- NvidiaTimeslicingGpu: "nvidia_timeslicing_gpu",
- GcpTpu: "gcp_tpu"
- } as const;
-export type ApplicationsListRequestDeviceTypeFilter = typeof ApplicationsListRequestDeviceTypeFilter[keyof typeof ApplicationsListRequestDeviceTypeFilter];
diff --git a/src/api/resources/applications/types/ApplicationsListRequestLifecycleStage.ts b/src/api/resources/applications/types/ApplicationsListRequestLifecycleStage.ts
deleted file mode 100644
index 86f64ac2..00000000
--- a/src/api/resources/applications/types/ApplicationsListRequestLifecycleStage.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-// This file was auto-generated by Fern from our API Definition.
-
-export const ApplicationsListRequestLifecycleStage = {
- Active: "active",
- Deleting: "deleting",
- DeletionFailed: "deletion_failed"
- } as const;
-export type ApplicationsListRequestLifecycleStage = typeof ApplicationsListRequestLifecycleStage[keyof typeof ApplicationsListRequestLifecycleStage];
diff --git a/src/api/resources/applications/types/ApplicationsCancelDeploymentResponse.ts b/src/api/resources/applications/types/CancelDeploymentApplicationsResponse.ts
similarity index 68%
rename from src/api/resources/applications/types/ApplicationsCancelDeploymentResponse.ts
rename to src/api/resources/applications/types/CancelDeploymentApplicationsResponse.ts
index c6c7b04a..099e5554 100644
--- a/src/api/resources/applications/types/ApplicationsCancelDeploymentResponse.ts
+++ b/src/api/resources/applications/types/CancelDeploymentApplicationsResponse.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-export interface ApplicationsCancelDeploymentResponse {
+export interface CancelDeploymentApplicationsResponse {
/** Deployment cancelled */
message?: string;
}
diff --git a/src/api/resources/applications/types/ListApplicationsRequestDeviceTypeFilter.ts b/src/api/resources/applications/types/ListApplicationsRequestDeviceTypeFilter.ts
new file mode 100644
index 00000000..64d01a7e
--- /dev/null
+++ b/src/api/resources/applications/types/ListApplicationsRequestDeviceTypeFilter.ts
@@ -0,0 +1,12 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const ListApplicationsRequestDeviceTypeFilter = {
+ Cpu: "cpu",
+ NvidiaGpu: "nvidia_gpu",
+ AwsInferentia: "aws_inferentia",
+ NvidiaMigGpu: "nvidia_mig_gpu",
+ NvidiaTimeslicingGpu: "nvidia_timeslicing_gpu",
+ GcpTpu: "gcp_tpu",
+} as const;
+export type ListApplicationsRequestDeviceTypeFilter =
+ (typeof ListApplicationsRequestDeviceTypeFilter)[keyof typeof ListApplicationsRequestDeviceTypeFilter];
diff --git a/src/api/resources/applications/types/ListApplicationsRequestLifecycleStage.ts b/src/api/resources/applications/types/ListApplicationsRequestLifecycleStage.ts
new file mode 100644
index 00000000..b0915c85
--- /dev/null
+++ b/src/api/resources/applications/types/ListApplicationsRequestLifecycleStage.ts
@@ -0,0 +1,9 @@
+// This file was auto-generated by Fern from our API Definition.
+
+export const ListApplicationsRequestLifecycleStage = {
+ Active: "active",
+ Deleting: "deleting",
+ DeletionFailed: "deletion_failed",
+} as const;
+export type ListApplicationsRequestLifecycleStage =
+ (typeof ListApplicationsRequestLifecycleStage)[keyof typeof ListApplicationsRequestLifecycleStage];
diff --git a/src/api/resources/applications/types/index.ts b/src/api/resources/applications/types/index.ts
index 758fdc1f..041c901a 100644
--- a/src/api/resources/applications/types/index.ts
+++ b/src/api/resources/applications/types/index.ts
@@ -1,3 +1,3 @@
-export * from "./ApplicationsCancelDeploymentResponse.js";
-export * from "./ApplicationsListRequestDeviceTypeFilter.js";
-export * from "./ApplicationsListRequestLifecycleStage.js";
+export * from "./CancelDeploymentApplicationsResponse.js";
+export * from "./ListApplicationsRequestDeviceTypeFilter.js";
+export * from "./ListApplicationsRequestLifecycleStage.js";
diff --git a/src/api/resources/artifactVersions/client/Client.ts b/src/api/resources/artifactVersions/client/Client.ts
index 74e746f8..632a4d59 100644
--- a/src/api/resources/artifactVersions/client/Client.ts
+++ b/src/api/resources/artifactVersions/client/Client.ts
@@ -1,9 +1,11 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { toJson } from "../../../../core/json.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,81 +14,130 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace ArtifactVersionsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class ArtifactVersionsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: ArtifactVersionsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List artifact versions with optional filtering by tag, FQN, artifact ID, ML Repo, name, version, run IDs, or run steps.
*
- * @param {TrueFoundry.ArtifactVersionsListRequest} request
+ * @param {TrueFoundry.ListArtifactVersionsRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.list({
* limit: 10,
- * offset: 0,
- * tag: "tag",
- * fqn: "fqn",
- * artifactId: "artifact_id",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * version: 1,
- * runIds: ["run_ids"],
- * runSteps: [1.1],
- * includeInternalMetadata: true
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.ArtifactVersionsListRequest = {}, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ArtifactVersionsListRequest): Promise> => { const { limit = 100, offset = 0, tag, fqn, artifactId, mlRepoId, name, version, runIds, runSteps, includeInternalMetadata = false } = request; const _queryParams: Record = {
- limit,
- offset,
- tag,
- fqn,
- artifact_id: artifactId,
- ml_repo_id: mlRepoId,
- name,
- version,
- run_ids: runIds,
- run_steps: runSteps,
- include_internal_metadata: includeInternalMetadata
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListArtifactVersionsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/artifact-versions"); });
+ public async list(
+ request: TrueFoundry.ListArtifactVersionsRequest = {},
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListArtifactVersionsRequest,
+ ): Promise> => {
+ const {
+ limit = 100,
+ offset = 0,
+ tag,
+ fqn,
+ artifactId,
+ mlRepoId,
+ name,
+ version,
+ runIds,
+ runSteps,
+ includeInternalMetadata = false,
+ } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ tag,
+ fqn,
+ artifact_id: artifactId,
+ ml_repo_id: mlRepoId,
+ name,
+ version,
+ run_ids: runIds !== undefined ? toJson(runIds) : undefined,
+ run_steps: runSteps !== undefined ? toJson(runSteps) : undefined,
+ include_internal_metadata: includeInternalMetadata,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListArtifactVersionsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/artifact-versions",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -96,46 +147,85 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.ApplyArtifactVersionTagsRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.applyTags({
* artifactVersionId: "artifact_version_id",
* tags: ["tags"]
* })
*/
- public applyTags(request: TrueFoundry.ApplyArtifactVersionTagsRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public applyTags(
+ request: TrueFoundry.ApplyArtifactVersionTagsRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__applyTags(request, requestOptions));
}
- private async __applyTags(request: TrueFoundry.ApplyArtifactVersionTagsRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __applyTags(
+ request: TrueFoundry.ApplyArtifactVersionTagsRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/tags"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/tags",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.ApplyArtifactVersionTagsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.ApplyArtifactVersionTagsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "PUT", "/api/svc/v1/artifact-versions/tags");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "PUT",
+ "/api/svc/v1/artifact-versions/tags",
+ );
}
/**
@@ -144,6 +234,9 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.GetSignedUrLsRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.getSignedUrls({
* id: "id",
@@ -151,40 +244,76 @@ export class ArtifactVersionsClient {
* operation: "READ"
* })
*/
- public getSignedUrls(request: TrueFoundry.GetSignedUrLsRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public getSignedUrls(
+ request: TrueFoundry.GetSignedUrLsRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__getSignedUrls(request, requestOptions));
}
- private async __getSignedUrls(request: TrueFoundry.GetSignedUrLsRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __getSignedUrls(
+ request: TrueFoundry.GetSignedUrLsRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/signed-urls"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/signed-urls",
+ ),
method: "POST",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.GetSignedUrLsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.GetSignedUrLsRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetSignedUrLsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetSignedUrLsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/artifact-versions/signed-urls");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/artifact-versions/signed-urls",
+ );
}
/**
@@ -193,6 +322,9 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.CreateMultiPartUploadRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.createMultiPartUpload({
* id: "id",
@@ -200,40 +332,76 @@ export class ArtifactVersionsClient {
* numParts: 1.1
* })
*/
- public createMultiPartUpload(request: TrueFoundry.CreateMultiPartUploadRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public createMultiPartUpload(
+ request: TrueFoundry.CreateMultiPartUploadRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createMultiPartUpload(request, requestOptions));
}
- private async __createMultiPartUpload(request: TrueFoundry.CreateMultiPartUploadRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __createMultiPartUpload(
+ request: TrueFoundry.CreateMultiPartUploadRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/signed-urls/multipart"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/signed-urls/multipart",
+ ),
method: "POST",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.CreateMultiPartUploadRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.CreateMultiPartUploadRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.MultiPartUploadResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.MultiPartUploadResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/artifact-versions/signed-urls/multipart");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/artifact-versions/signed-urls/multipart",
+ );
}
/**
@@ -242,41 +410,92 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.ListFilesRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.listFiles({
* id: "id"
* })
*/
- public async listFiles(request: TrueFoundry.ListFilesRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ListFilesRequest): Promise> => { const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/files"),
- method: "POST",
- headers: _headers,
- contentType: "application/json",
- queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
- requestType: "json",
- body: serializers.ListFilesRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
- 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: serializers.ListFilesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/artifact-versions/files"); });
+ public async listFiles(
+ request: TrueFoundry.ListFilesRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListFilesRequest,
+ ): Promise> => {
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/files",
+ ),
+ method: "POST",
+ headers: _headers,
+ contentType: "application/json",
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
+ requestType: "json",
+ body: mergeAdditionalBodyParameters(
+ serializers.ListFilesRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
+ 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: serializers.ListFilesResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/artifact-versions/files",
+ );
+ },
+ );
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => response?.pagination.nextPageToken != null && !(typeof response?.pagination.nextPageToken === "string" && response?.pagination.nextPageToken === ""),
- getItems: response => response?.data ?? [],
- loadPage: response => { return list(core.setObjectProperty(request, "pageToken", response?.pagination.nextPageToken)); }
+ hasNextPage: (response) =>
+ response?.pagination.nextPageToken != null &&
+ !(typeof response?.pagination.nextPageToken === "string" && response?.pagination.nextPageToken === ""),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ return list(core.setObjectProperty(request, "pageToken", response?.pagination.nextPageToken));
+ },
});
}
@@ -286,6 +505,9 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.StageArtifactRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.stage({
* manifest: {
@@ -300,40 +522,76 @@ export class ArtifactVersionsClient {
* }
* })
*/
- public stage(request: TrueFoundry.StageArtifactRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public stage(
+ request: TrueFoundry.StageArtifactRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__stage(request, requestOptions));
}
- private async __stage(request: TrueFoundry.StageArtifactRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __stage(
+ request: TrueFoundry.StageArtifactRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/stage"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/stage",
+ ),
method: "POST",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.StageArtifactRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.StageArtifactRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.StageArtifactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.StageArtifactResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/artifact-versions/stage");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/artifact-versions/stage",
+ );
}
/**
@@ -342,45 +600,84 @@ export class ArtifactVersionsClient {
* @param {TrueFoundry.MarkStageArtifactFailureRequest} request
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifactVersions.markStageFailure({
* id: "id"
* })
*/
- public markStageFailure(request: TrueFoundry.MarkStageArtifactFailureRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public markStageFailure(
+ request: TrueFoundry.MarkStageArtifactFailureRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__markStageFailure(request, requestOptions));
}
- private async __markStageFailure(request: TrueFoundry.MarkStageArtifactFailureRequest, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __markStageFailure(
+ request: TrueFoundry.MarkStageArtifactFailureRequest,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions/mark-stage-failure"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions/mark-stage-failure",
+ ),
method: "POST",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.MarkStageArtifactFailureRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.MarkStageArtifactFailureRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/api/svc/v1/artifact-versions/mark-stage-failure");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "POST",
+ "/api/svc/v1/artifact-versions/mark-stage-failure",
+ );
}
/**
@@ -390,19 +687,35 @@ export class ArtifactVersionsClient {
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.artifactVersions.get("id")
*/
- public get(id: string, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
}
- private async __get(id: string, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/artifact-versions/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/artifact-versions/${core.url.encodePathParam(id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -410,24 +723,40 @@ export class ArtifactVersionsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetArtifactVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetArtifactVersionResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/artifact-versions/{id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/artifact-versions/{id}",
+ );
}
/**
@@ -437,19 +766,35 @@ export class ArtifactVersionsClient {
* @param {ArtifactVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.artifactVersions.delete("id")
*/
- public delete(id: string, requestOptions?: ArtifactVersionsClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ id: string,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
}
- private async __delete(id: string, requestOptions?: ArtifactVersionsClient.RequestOptions): Promise> {
+ private async __delete(
+ id: string,
+ requestOptions?: ArtifactVersionsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/artifact-versions/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/artifact-versions/${core.url.encodePathParam(id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -457,23 +802,39 @@ export class ArtifactVersionsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/api/svc/v1/artifact-versions/{id}");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "DELETE",
+ "/api/svc/v1/artifact-versions/{id}",
+ );
}
}
diff --git a/src/api/resources/artifactVersions/client/requests/ArtifactVersionsListRequest.ts b/src/api/resources/artifactVersions/client/requests/ListArtifactVersionsRequest.ts
similarity index 57%
rename from src/api/resources/artifactVersions/client/requests/ArtifactVersionsListRequest.ts
rename to src/api/resources/artifactVersions/client/requests/ListArtifactVersionsRequest.ts
index e368596e..bbb91255 100644
--- a/src/api/resources/artifactVersions/client/requests/ArtifactVersionsListRequest.ts
+++ b/src/api/resources/artifactVersions/client/requests/ListArtifactVersionsRequest.ts
@@ -4,39 +4,30 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * tag: "tag",
- * fqn: "fqn",
- * artifactId: "artifact_id",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * version: 1,
- * runIds: ["run_ids"],
- * runSteps: [1.1],
- * includeInternalMetadata: true
+ * offset: 0
* }
*/
-export interface ArtifactVersionsListRequest {
+export interface ListArtifactVersionsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Tag to filter artifact versions by. */
- tag?: string;
+ tag?: string | null;
/** Fully Qualified Name uniquely identifying the artifact version. */
- fqn?: string;
+ fqn?: string | null;
/** Identifier of the artifact whose versions to list. */
- artifactId?: string;
+ artifactId?: string | null;
/** Identifier of the ML Repo the artifact versions belong to. */
- mlRepoId?: string;
+ mlRepoId?: string | null;
/** Name of the artifact version. */
- name?: string;
+ name?: string | null;
/** Version number (positive integer) to filter by. */
- version?: number;
+ version?: number | null;
/** Run IDs to filter artifact versions by. */
- runIds?: string | string[];
+ runIds?: string[] | null;
/** Run steps to filter artifact versions by. */
- runSteps?: number | number[];
+ runSteps?: number[] | null;
/** Whether to include internal metadata in the response. */
includeInternalMetadata?: boolean;
}
diff --git a/src/api/resources/artifactVersions/client/requests/StageArtifactRequest.ts b/src/api/resources/artifactVersions/client/requests/StageArtifactRequest.ts
index ace00e4f..50b4a759 100644
--- a/src/api/resources/artifactVersions/client/requests/StageArtifactRequest.ts
+++ b/src/api/resources/artifactVersions/client/requests/StageArtifactRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
diff --git a/src/api/resources/artifactVersions/client/requests/index.ts b/src/api/resources/artifactVersions/client/requests/index.ts
index e2b88a1e..50fa4f44 100644
--- a/src/api/resources/artifactVersions/client/requests/index.ts
+++ b/src/api/resources/artifactVersions/client/requests/index.ts
@@ -1,4 +1,4 @@
export type { ApplyArtifactVersionTagsRequest } from "./ApplyArtifactVersionTagsRequest.js";
-export type { ArtifactVersionsListRequest } from "./ArtifactVersionsListRequest.js";
+export type { ListArtifactVersionsRequest } from "./ListArtifactVersionsRequest.js";
export type { MarkStageArtifactFailureRequest } from "./MarkStageArtifactFailureRequest.js";
export type { StageArtifactRequest } from "./StageArtifactRequest.js";
diff --git a/src/api/resources/artifactVersions/types/StageArtifactRequestManifest.ts b/src/api/resources/artifactVersions/types/StageArtifactRequestManifest.ts
index 1d358034..3f54429d 100644
--- a/src/api/resources/artifactVersions/types/StageArtifactRequestManifest.ts
+++ b/src/api/resources/artifactVersions/types/StageArtifactRequestManifest.ts
@@ -1,11 +1,11 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../index.js";
+import type * as TrueFoundry from "../../../index.js";
/**
* Manifest containing metadata for the artifact to be staged (model or generic artifact)
*/
-export type StageArtifactRequestManifest =
+export type StageArtifactRequestManifest =
| TrueFoundry.ArtifactManifest
| TrueFoundry.ModelManifest
| TrueFoundry.AgentSkillManifest;
diff --git a/src/api/resources/artifacts/client/Client.ts b/src/api/resources/artifacts/client/Client.ts
index 2c8bbfc8..ab2cfcc1 100644
--- a/src/api/resources/artifacts/client/Client.ts
+++ b/src/api/resources/artifacts/client/Client.ts
@@ -1,9 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,18 +13,14 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace ArtifactsClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class ArtifactsClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: ArtifactsClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
@@ -33,19 +30,35 @@ export class ArtifactsClient {
* @param {ArtifactsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.artifacts.get("jqfwg345gi25n5ju2yz5iz6m")
*/
- public get(id: string, requestOptions?: ArtifactsClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
}
- private async __get(id: string, requestOptions?: ArtifactsClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/artifacts/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/artifacts/${core.url.encodePathParam(id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -53,20 +66,31 @@ export class ArtifactsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetArtifactResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetArtifactResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -80,19 +104,35 @@ export class ArtifactsClient {
* @param {ArtifactsClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.artifacts.delete("jqfwg345gi25n5ju2yz5iz6m")
*/
- public delete(id: string, requestOptions?: ArtifactsClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ id: string,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
}
- private async __delete(id: string, requestOptions?: ArtifactsClient.RequestOptions): Promise> {
+ private async __delete(
+ id: string,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/artifacts/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/artifacts/${core.url.encodePathParam(id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -100,20 +140,31 @@ export class ArtifactsClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.EmptyResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.EmptyResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -123,56 +174,96 @@ export class ArtifactsClient {
/**
* List artifacts with optional filtering by FQN, ML Repo, name, or run ID.
*
- * @param {TrueFoundry.ArtifactsListRequest} request
+ * @param {TrueFoundry.ListArtifactsRequest} request
* @param {ArtifactsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifacts.list({
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * runId: "run_id",
- * includeEmptyArtifacts: true
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.ArtifactsListRequest = {}, requestOptions?: ArtifactsClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ArtifactsListRequest): Promise> => { const { limit = 100, offset = 0, fqn, mlRepoId, name, runId, includeEmptyArtifacts = true } = request; const _queryParams: Record = {
- limit,
- offset,
- fqn,
- ml_repo_id: mlRepoId,
- name,
- run_id: runId,
- include_empty_artifacts: includeEmptyArtifacts
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifacts"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListArtifactsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/artifacts"); });
+ public async list(
+ request: TrueFoundry.ListArtifactsRequest = {},
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListArtifactsRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, fqn, mlRepoId, name, runId, includeEmptyArtifacts = true } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ fqn,
+ ml_repo_id: mlRepoId,
+ name,
+ run_id: runId,
+ include_empty_artifacts: includeEmptyArtifacts,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifacts",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListArtifactsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/artifacts");
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -182,6 +273,9 @@ export class ArtifactsClient {
* @param {TrueFoundry.ApplyArtifactRequest} request
* @param {ArtifactsClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.artifacts.createOrUpdate({
* manifest: {
@@ -196,36 +290,67 @@ export class ArtifactsClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.ApplyArtifactRequest, requestOptions?: ArtifactsClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.ApplyArtifactRequest,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.ApplyArtifactRequest, requestOptions?: ArtifactsClient.RequestOptions): Promise> {
+ private async __createOrUpdate(
+ request: TrueFoundry.ApplyArtifactRequest,
+ requestOptions?: ArtifactsClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/artifact-versions"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/artifact-versions",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.ApplyArtifactRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.ApplyArtifactRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetArtifactVersionResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetArtifactVersionResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
throw new errors.TrueFoundryError({
statusCode: _response.error.statusCode,
body: _response.error.body,
- rawResponse: _response.rawResponse
+ rawResponse: _response.rawResponse,
});
}
diff --git a/src/api/resources/artifacts/client/requests/ApplyArtifactRequest.ts b/src/api/resources/artifacts/client/requests/ApplyArtifactRequest.ts
index 34c741ab..8e831794 100644
--- a/src/api/resources/artifacts/client/requests/ApplyArtifactRequest.ts
+++ b/src/api/resources/artifacts/client/requests/ApplyArtifactRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
diff --git a/src/api/resources/artifacts/client/requests/ArtifactsListRequest.ts b/src/api/resources/artifacts/client/requests/ListArtifactsRequest.ts
similarity index 56%
rename from src/api/resources/artifacts/client/requests/ArtifactsListRequest.ts
rename to src/api/resources/artifacts/client/requests/ListArtifactsRequest.ts
index 6278a533..287df77a 100644
--- a/src/api/resources/artifacts/client/requests/ArtifactsListRequest.ts
+++ b/src/api/resources/artifacts/client/requests/ListArtifactsRequest.ts
@@ -4,27 +4,22 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * mlRepoId: "ml_repo_id",
- * name: "name",
- * runId: "run_id",
- * includeEmptyArtifacts: true
+ * offset: 0
* }
*/
-export interface ArtifactsListRequest {
+export interface ListArtifactsRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Human-readable Fully Qualified Name of the artifact. */
- fqn?: string;
+ fqn?: string | null;
/** Identifier of the ML Repo to filter artifacts by. */
- mlRepoId?: string;
+ mlRepoId?: string | null;
/** Name of the artifact to filter by. */
- name?: string;
+ name?: string | null;
/** Identifier of the run to filter artifacts by. */
- runId?: string;
+ runId?: string | null;
/** Whether to include artifacts that have no versions. */
- includeEmptyArtifacts?: boolean;
+ includeEmptyArtifacts?: boolean | null;
}
diff --git a/src/api/resources/artifacts/client/requests/index.ts b/src/api/resources/artifacts/client/requests/index.ts
index 0a61745d..93d8a2e4 100644
--- a/src/api/resources/artifacts/client/requests/index.ts
+++ b/src/api/resources/artifacts/client/requests/index.ts
@@ -1,2 +1,2 @@
export type { ApplyArtifactRequest } from "./ApplyArtifactRequest.js";
-export type { ArtifactsListRequest } from "./ArtifactsListRequest.js";
+export type { ListArtifactsRequest } from "./ListArtifactsRequest.js";
diff --git a/src/api/resources/clusters/client/Client.ts b/src/api/resources/clusters/client/Client.ts
index 9502d522..a0b535d0 100644
--- a/src/api/resources/clusters/client/Client.ts
+++ b/src/api/resources/clusters/client/Client.ts
@@ -1,9 +1,11 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { toJson } from "../../../../core/json.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,70 +14,120 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace ClustersClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class ClustersClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: ClustersClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List clusters the caller can read.
*
- * @param {TrueFoundry.ClustersListRequest} request
+ * @param {TrueFoundry.ListClustersRequest} request
* @param {ClustersClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.UnauthorizedError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.list({
* limit: 10,
- * offset: 0,
- * attributes: ["attributes"]
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.ClustersListRequest = {}, requestOptions?: ClustersClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.ClustersListRequest): Promise> => { const { limit = 100, offset = 0, attributes } = request; const _queryParams: Record = {
- limit,
- offset,
- attributes
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/clusters"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListClustersResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
+ public async list(
+ request: TrueFoundry.ListClustersRequest = {},
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListClustersRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, attributes } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ attributes: attributes !== undefined ? toJson(attributes) : undefined,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/clusters",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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,
});
- }
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/clusters"); });
+ if (_response.ok) {
+ return {
+ data: serializers.ListClustersResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ switch (_response.error.statusCode) {
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ }
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/clusters");
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -88,6 +140,8 @@ export class ClustersClient {
* @throws {@link TrueFoundry.UnauthorizedError}
* @throws {@link TrueFoundry.ConflictError}
* @throws {@link TrueFoundry.UnprocessableEntityError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.createOrUpdate({
@@ -103,41 +157,103 @@ export class ClustersClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.CreateOrUpdateClusterRequest, requestOptions?: ClustersClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.CreateOrUpdateClusterRequest,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.CreateOrUpdateClusterRequest, requestOptions?: ClustersClient.RequestOptions): Promise> {
+ private async __createOrUpdate(
+ request: TrueFoundry.CreateOrUpdateClusterRequest,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/clusters"),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/clusters",
+ ),
method: "PUT",
headers: _headers,
contentType: "application/json",
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
requestType: "json",
- body: serializers.CreateOrUpdateClusterRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, omitUndefined: true }),
+ body: mergeAdditionalBodyParameters(
+ serializers.CreateOrUpdateClusterRequest.jsonOrThrow(request, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ omitUndefined: true,
+ }),
+ requestOptions?.additionalBodyParameters,
+ ),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetClusterResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetClusterResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 409: throw new TrueFoundry.ConflictError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 422: throw new TrueFoundry.UnprocessableEntityError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 409:
+ throw new TrueFoundry.ConflictError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 422:
+ throw new TrueFoundry.UnprocessableEntityError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -152,19 +268,35 @@ export class ClustersClient {
*
* @throws {@link TrueFoundry.UnauthorizedError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.get("id")
*/
- public get(id: string, requestOptions?: ClustersClient.RequestOptions): core.HttpResponsePromise {
+ public get(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
}
- private async __get(id: string, requestOptions?: ClustersClient.RequestOptions): Promise> {
+ private async __get(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/clusters/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/clusters/${core.url.encodePathParam(id)}`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -172,21 +304,42 @@ export class ClustersClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.GetClusterResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.GetClusterResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -201,19 +354,35 @@ export class ClustersClient {
*
* @throws {@link TrueFoundry.UnauthorizedError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.delete("id")
*/
- public delete(id: string, requestOptions?: ClustersClient.RequestOptions): core.HttpResponsePromise {
+ public delete(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__delete(id, requestOptions));
}
- private async __delete(id: string, requestOptions?: ClustersClient.RequestOptions): Promise> {
+ private async __delete(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/clusters/${core.url.encodePathParam(id)}`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/clusters/${core.url.encodePathParam(id)}`,
+ ),
method: "DELETE",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -221,21 +390,42 @@ export class ClustersClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.DeleteClusterResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.DeleteClusterResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
@@ -246,60 +436,107 @@ export class ClustersClient {
* List addons installed on the cluster.
*
* @param {string} id - Unique identifier of the cluster.
- * @param {TrueFoundry.ClustersGetAddonsRequest} request
+ * @param {TrueFoundry.GetAddonsClustersRequest} request
* @param {ClustersClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.UnauthorizedError}
* @throws {@link TrueFoundry.NotFoundError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.getAddons("id", {
* limit: 10,
- * offset: 0,
- * attributes: ["attributes"]
+ * offset: 0
* })
*/
- public getAddons(id: string, request: TrueFoundry.ClustersGetAddonsRequest = {}, requestOptions?: ClustersClient.RequestOptions): core.HttpResponsePromise {
+ public getAddons(
+ id: string,
+ request: TrueFoundry.GetAddonsClustersRequest = {},
+ requestOptions?: ClustersClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__getAddons(id, request, requestOptions));
}
- private async __getAddons(id: string, request: TrueFoundry.ClustersGetAddonsRequest = {}, requestOptions?: ClustersClient.RequestOptions): Promise> {
+ private async __getAddons(
+ id: string,
+ request: TrueFoundry.GetAddonsClustersRequest = {},
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
const { limit = 100, offset = 0, attributes } = request;
const _queryParams: Record = {
limit,
offset,
- attributes
+ attributes: attributes !== undefined ? toJson(attributes) : undefined,
};
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/clusters/${core.url.encodePathParam(id)}/get-addons`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/clusters/${core.url.encodePathParam(id)}/get-addons`,
+ ),
method: "GET",
headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
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
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.ListClusterAddonsResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.ListClusterAddonsResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- case 404: throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ case 404:
+ throw new TrueFoundry.NotFoundError(_response.error.body, _response.rawResponse);
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/clusters/{id}/get-addons");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/clusters/{id}/get-addons",
+ );
}
/**
@@ -309,19 +546,35 @@ export class ClustersClient {
* @param {ClustersClient.RequestOptions} requestOptions - Request-specific configuration.
*
* @throws {@link TrueFoundry.UnauthorizedError}
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
*
* @example
* await client.clusters.isConnected("id")
*/
- public isConnected(id: string, requestOptions?: ClustersClient.RequestOptions): core.HttpResponsePromise {
+ public isConnected(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__isConnected(id, requestOptions));
}
- private async __isConnected(id: string, requestOptions?: ClustersClient.RequestOptions): Promise> {
+ private async __isConnected(
+ id: string,
+ requestOptions?: ClustersClient.RequestOptions,
+ ): Promise> {
const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
- let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers);
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), `api/svc/v1/clusters/${core.url.encodePathParam(id)}/is-connected`),
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ `api/svc/v1/clusters/${core.url.encodePathParam(id)}/is-connected`,
+ ),
method: "GET",
headers: _headers,
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
@@ -329,23 +582,48 @@ export class ClustersClient {
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
abortSignal: requestOptions?.abortSignal,
fetchFn: this._options?.fetch,
- logging: this._options.logging
+ logging: this._options.logging,
});
if (_response.ok) {
- return { data: serializers.IsClusterConnectedResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
+ return {
+ data: serializers.IsClusterConnectedResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
}
if (_response.error.reason === "status-code") {
switch (_response.error.statusCode) {
- case 401: throw new TrueFoundry.UnauthorizedError(serializers.HttpError.parseOrThrow(_response.error.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), _response.rawResponse);
- default: throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
+ case 401:
+ throw new TrueFoundry.UnauthorizedError(
+ serializers.HttpError.parseOrThrow(_response.error.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ _response.rawResponse,
+ );
+ default:
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
}
}
- return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/clusters/{id}/is-connected");
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/clusters/{id}/is-connected",
+ );
}
}
diff --git a/src/api/resources/clusters/client/requests/CreateOrUpdateClusterRequest.ts b/src/api/resources/clusters/client/requests/CreateOrUpdateClusterRequest.ts
index 5a26ee57..9b854697 100644
--- a/src/api/resources/clusters/client/requests/CreateOrUpdateClusterRequest.ts
+++ b/src/api/resources/clusters/client/requests/CreateOrUpdateClusterRequest.ts
@@ -1,6 +1,6 @@
// This file was auto-generated by Fern from our API Definition.
-import * as TrueFoundry from "../../../../index.js";
+import type * as TrueFoundry from "../../../../index.js";
/**
* @example
@@ -21,5 +21,5 @@ export interface CreateOrUpdateClusterRequest {
/** Full cluster manifest. */
manifest: TrueFoundry.ClusterManifest;
/** When true, validates the request without persisting changes. */
- dryRun?: boolean;
+ dryRun?: boolean | null;
}
diff --git a/src/api/resources/clusters/client/requests/ClustersListRequest.ts b/src/api/resources/clusters/client/requests/GetAddonsClustersRequest.ts
similarity index 66%
rename from src/api/resources/clusters/client/requests/ClustersListRequest.ts
rename to src/api/resources/clusters/client/requests/GetAddonsClustersRequest.ts
index ab4af632..ec7aeae9 100644
--- a/src/api/resources/clusters/client/requests/ClustersListRequest.ts
+++ b/src/api/resources/clusters/client/requests/GetAddonsClustersRequest.ts
@@ -4,15 +4,14 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * attributes: ["attributes"]
+ * offset: 0
* }
*/
-export interface ClustersListRequest {
+export interface GetAddonsClustersRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Comma-separated list of attributes to return (e.g. id,name). When provided, only the specified fields are fetched. `id` is always included. */
- attributes?: string | string[];
+ attributes?: string[] | null;
}
diff --git a/src/api/resources/clusters/client/requests/ClustersGetAddonsRequest.ts b/src/api/resources/clusters/client/requests/ListClustersRequest.ts
similarity index 65%
rename from src/api/resources/clusters/client/requests/ClustersGetAddonsRequest.ts
rename to src/api/resources/clusters/client/requests/ListClustersRequest.ts
index e39d522a..e1de8bb3 100644
--- a/src/api/resources/clusters/client/requests/ClustersGetAddonsRequest.ts
+++ b/src/api/resources/clusters/client/requests/ListClustersRequest.ts
@@ -4,15 +4,14 @@
* @example
* {
* limit: 10,
- * offset: 0,
- * attributes: ["attributes"]
+ * offset: 0
* }
*/
-export interface ClustersGetAddonsRequest {
+export interface ListClustersRequest {
/** Number of items per page */
- limit?: number;
+ limit?: number | null;
/** Number of items to skip */
- offset?: number;
+ offset?: number | null;
/** Comma-separated list of attributes to return (e.g. id,name). When provided, only the specified fields are fetched. `id` is always included. */
- attributes?: string | string[];
+ attributes?: string[] | null;
}
diff --git a/src/api/resources/clusters/client/requests/index.ts b/src/api/resources/clusters/client/requests/index.ts
index 6d6817fd..c3b0beda 100644
--- a/src/api/resources/clusters/client/requests/index.ts
+++ b/src/api/resources/clusters/client/requests/index.ts
@@ -1,3 +1,3 @@
-export type { ClustersGetAddonsRequest } from "./ClustersGetAddonsRequest.js";
-export type { ClustersListRequest } from "./ClustersListRequest.js";
export type { CreateOrUpdateClusterRequest } from "./CreateOrUpdateClusterRequest.js";
+export type { GetAddonsClustersRequest } from "./GetAddonsClustersRequest.js";
+export type { ListClustersRequest } from "./ListClustersRequest.js";
diff --git a/src/api/resources/dataDirectories/client/Client.ts b/src/api/resources/dataDirectories/client/Client.ts
index 932aa29d..84329306 100644
--- a/src/api/resources/dataDirectories/client/Client.ts
+++ b/src/api/resources/dataDirectories/client/Client.ts
@@ -1,9 +1,10 @@
// This file was auto-generated by Fern from our API Definition.
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
-import { normalizeClientOptionsWithAuth, type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
-import * as core from "../../../../core/index.js";
+import { type NormalizedClientOptionsWithAuth, normalizeClientOptionsWithAuth } from "../../../../BaseClient.js";
import { mergeHeaders } from "../../../../core/headers.js";
+import * as core from "../../../../core/index.js";
+import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.js";
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.js";
import * as errors from "../../../../errors/index.js";
import * as serializers from "../../../../serialization/index.js";
@@ -12,69 +13,112 @@ import * as TrueFoundry from "../../../index.js";
export declare namespace DataDirectoriesClient {
export type Options = BaseClientOptions;
- export interface RequestOptions extends BaseRequestOptions {
- }
+ export interface RequestOptions extends BaseRequestOptions {}
}
export class DataDirectoriesClient {
protected readonly _options: NormalizedClientOptionsWithAuth;
constructor(options: DataDirectoriesClient.Options) {
-
-
- this._options = normalizeClientOptionsWithAuth(options);
-
+ this._options = normalizeClientOptionsWithAuth(options);
}
/**
* List data directories with optional filtering by FQN, ML Repo, or name.
*
- * @param {TrueFoundry.DataDirectoriesListRequest} request
+ * @param {TrueFoundry.ListDataDirectoriesRequest} request
* @param {DataDirectoriesClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.dataDirectories.list({
* limit: 10,
- * offset: 0,
- * fqn: "fqn",
- * mlRepoId: "ml_repo_id",
- * name: "name"
+ * offset: 0
* })
*/
- public async list(request: TrueFoundry.DataDirectoriesListRequest = {}, requestOptions?: DataDirectoriesClient.RequestOptions): Promise> {
- const list = core.HttpResponsePromise.interceptFunction(async (request: TrueFoundry.DataDirectoriesListRequest): Promise> => { const { limit = 100, offset = 0, fqn, mlRepoId, name } = request; const _queryParams: Record = {
- limit,
- offset,
- fqn,
- ml_repo_id: mlRepoId,
- name
- }; const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest(); let _headers: core.Fetcher.Args["headers"] = mergeHeaders(_authRequest.headers, this._options?.headers, requestOptions?.headers); const _response = await (this._options.fetcher ?? core.fetcher)({
- url: core.url.join(await core.Supplier.get(this._options.baseUrl) ?? await core.Supplier.get(this._options.environment), "api/svc/v1/data-directories"),
- method: "GET",
- headers: _headers,
- queryString: core.url.queryBuilder().addMany(_queryParams).mergeAdditional(requestOptions?.queryParams).build(),
- 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: serializers.ListDataDirectoriesResponse.parseOrThrow(_response.body, { unrecognizedObjectKeys: "passthrough", allowUnrecognizedUnionMembers: true, allowUnrecognizedEnumValues: true, skipValidation: true, breadcrumbsPrefix: ["response"] }), rawResponse: _response.rawResponse };
- } if (_response.error.reason === "status-code") {
- throw new errors.TrueFoundryError({
- statusCode: _response.error.statusCode,
- body: _response.error.body,
- rawResponse: _response.rawResponse
- });
- } return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/api/svc/v1/data-directories"); });
+ public async list(
+ request: TrueFoundry.ListDataDirectoriesRequest = {},
+ requestOptions?: DataDirectoriesClient.RequestOptions,
+ ): Promise> {
+ const list = core.HttpResponsePromise.interceptFunction(
+ async (
+ request: TrueFoundry.ListDataDirectoriesRequest,
+ ): Promise> => {
+ const { limit = 100, offset = 0, fqn, mlRepoId, name } = request;
+ const _queryParams: Record = {
+ limit,
+ offset,
+ fqn,
+ ml_repo_id: mlRepoId,
+ name,
+ };
+ const _authRequest: core.AuthRequest = await this._options.authProvider.getAuthRequest();
+ const _headers: core.Fetcher.Args["headers"] = mergeHeaders(
+ _authRequest.headers,
+ this._options?.headers,
+ requestOptions?.headers,
+ );
+ const _response = await (this._options.fetcher ?? core.fetcher)({
+ url: core.url.join(
+ (await core.Supplier.get(this._options.baseUrl)) ??
+ (await core.Supplier.get(this._options.environment)),
+ "api/svc/v1/data-directories",
+ ),
+ method: "GET",
+ headers: _headers,
+ queryString: core.url
+ .queryBuilder()
+ .addMany(_queryParams)
+ .mergeAdditional(requestOptions?.queryParams)
+ .build(),
+ 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: serializers.ListDataDirectoriesResponse.parseOrThrow(_response.body, {
+ unrecognizedObjectKeys: "passthrough",
+ allowUnrecognizedUnionMembers: true,
+ allowUnrecognizedEnumValues: true,
+ skipValidation: true,
+ breadcrumbsPrefix: ["response"],
+ }),
+ rawResponse: _response.rawResponse,
+ };
+ }
+ if (_response.error.reason === "status-code") {
+ throw new errors.TrueFoundryError({
+ statusCode: _response.error.statusCode,
+ body: _response.error.body,
+ rawResponse: _response.rawResponse,
+ });
+ }
+ return handleNonStatusCodeError(
+ _response.error,
+ _response.rawResponse,
+ "GET",
+ "/api/svc/v1/data-directories",
+ );
+ },
+ );
let _offset = request?.offset != null ? request?.offset : 0;
const dataWithRawResponse = await list(request).withRawResponse();
return new core.Page({
response: dataWithRawResponse.data,
rawResponse: dataWithRawResponse.rawResponse,
- hasNextPage: response => (response?.data ?? []).length > 0 && (request?.limit == null || (response?.data ?? []).length >= request?.limit),
- getItems: response => response?.data ?? [],
- loadPage: response => { _offset += response?.data != null ? response.data.length : 1; return list(core.setObjectProperty(request, "offset", _offset)); }
+ hasNextPage: (response) =>
+ (response?.data ?? []).length > 0 &&
+ (request?.limit == null || (response?.data ?? []).length >= request?.limit),
+ getItems: (response) => response?.data ?? [],
+ loadPage: (response) => {
+ _offset += response?.data != null ? response.data.length : 1;
+ return list(core.setObjectProperty(request, "offset", _offset));
+ },
});
}
@@ -84,6 +128,9 @@ export class DataDirectoriesClient {
* @param {TrueFoundry.ApplyDataDirectoryRequest} request
* @param {DataDirectoriesClient.RequestOptions} requestOptions - Request-specific configuration.
*
+ * @throws {@link errors.TrueFoundryError}
+ * @throws {@link errors.TrueFoundryTimeoutError}
+ *
* @example
* await client.dataDirectories.createOrUpdate({
* manifest: {
@@ -99,36 +146,67 @@ export class DataDirectoriesClient {
* }
* })
*/
- public createOrUpdate(request: TrueFoundry.ApplyDataDirectoryRequest, requestOptions?: DataDirectoriesClient.RequestOptions): core.HttpResponsePromise {
+ public createOrUpdate(
+ request: TrueFoundry.ApplyDataDirectoryRequest,
+ requestOptions?: DataDirectoriesClient.RequestOptions,
+ ): core.HttpResponsePromise {
return core.HttpResponsePromise.fromPromise(this.__createOrUpdate(request, requestOptions));
}
- private async __createOrUpdate(request: TrueFoundry.ApplyDataDirectoryRequest, requestOptions?: DataDirectoriesClient.RequestOptions): Promise