@linkt/sdk 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/LICENSE +201 -0
- package/README.md +424 -0
- package/api-promise.d.mts +2 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +2 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +2 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +206 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +206 -0
- package/client.d.ts.map +1 -0
- package/client.js +473 -0
- package/client.js.map +1 -0
- package/client.mjs +469 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +2 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +2 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +2 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +6 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +6 -0
- package/index.d.ts.map +1 -0
- package/index.js +30 -0
- package/index.js.map +1 -0
- package/index.mjs +7 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +35 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +32 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/qs/formats.d.mts +7 -0
- package/internal/qs/formats.d.mts.map +1 -0
- package/internal/qs/formats.d.ts +7 -0
- package/internal/qs/formats.d.ts.map +1 -0
- package/internal/qs/formats.js +13 -0
- package/internal/qs/formats.js.map +1 -0
- package/internal/qs/formats.mjs +9 -0
- package/internal/qs/formats.mjs.map +1 -0
- package/internal/qs/index.d.mts +10 -0
- package/internal/qs/index.d.mts.map +1 -0
- package/internal/qs/index.d.ts +10 -0
- package/internal/qs/index.d.ts.map +1 -0
- package/internal/qs/index.js +14 -0
- package/internal/qs/index.js.map +1 -0
- package/internal/qs/index.mjs +10 -0
- package/internal/qs/index.mjs.map +1 -0
- package/internal/qs/stringify.d.mts +3 -0
- package/internal/qs/stringify.d.mts.map +1 -0
- package/internal/qs/stringify.d.ts +3 -0
- package/internal/qs/stringify.d.ts.map +1 -0
- package/internal/qs/stringify.js +277 -0
- package/internal/qs/stringify.js.map +1 -0
- package/internal/qs/stringify.mjs +274 -0
- package/internal/qs/stringify.mjs.map +1 -0
- package/internal/qs/types.d.mts +57 -0
- package/internal/qs/types.d.mts.map +1 -0
- package/internal/qs/types.d.ts +57 -0
- package/internal/qs/types.d.ts.map +1 -0
- package/internal/qs/types.js +3 -0
- package/internal/qs/types.js.map +1 -0
- package/internal/qs/types.mjs +2 -0
- package/internal/qs/types.mjs.map +1 -0
- package/internal/qs/utils.d.mts +15 -0
- package/internal/qs/utils.d.mts.map +1 -0
- package/internal/qs/utils.d.ts +15 -0
- package/internal/qs/utils.d.ts.map +1 -0
- package/internal/qs/utils.js +230 -0
- package/internal/qs/utils.js.map +1 -0
- package/internal/qs/utils.mjs +217 -0
- package/internal/qs/utils.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +20 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +20 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +81 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +86 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +80 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +7 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +7 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +11 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +8 -0
- package/internal/utils.mjs.map +1 -0
- package/package.json +137 -0
- package/resource.d.mts +2 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +2 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +2 -0
- package/resource.mjs.map +1 -0
- package/resources/files.d.mts +170 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +170 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +39 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +35 -0
- package/resources/files.mjs.map +1 -0
- package/resources/icp.d.mts +162 -0
- package/resources/icp.d.mts.map +1 -0
- package/resources/icp.d.ts +162 -0
- package/resources/icp.d.ts.map +1 -0
- package/resources/icp.js +69 -0
- package/resources/icp.js.map +1 -0
- package/resources/icp.mjs +65 -0
- package/resources/icp.mjs.map +1 -0
- package/resources/index.d.mts +7 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +7 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +17 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +8 -0
- package/resources/index.mjs.map +1 -0
- package/resources/run.d.mts +224 -0
- package/resources/run.d.mts.map +1 -0
- package/resources/run.d.ts +224 -0
- package/resources/run.d.ts.map +1 -0
- package/resources/run.js +107 -0
- package/resources/run.js.map +1 -0
- package/resources/run.mjs +103 -0
- package/resources/run.mjs.map +1 -0
- package/resources/sheet/entity.d.mts +52 -0
- package/resources/sheet/entity.d.mts.map +1 -0
- package/resources/sheet/entity.d.ts +52 -0
- package/resources/sheet/entity.d.ts.map +1 -0
- package/resources/sheet/entity.js +45 -0
- package/resources/sheet/entity.js.map +1 -0
- package/resources/sheet/entity.mjs +41 -0
- package/resources/sheet/entity.mjs.map +1 -0
- package/resources/sheet/index.d.mts +4 -0
- package/resources/sheet/index.d.mts.map +1 -0
- package/resources/sheet/index.d.ts +4 -0
- package/resources/sheet/index.d.ts.map +1 -0
- package/resources/sheet/index.js +11 -0
- package/resources/sheet/index.js.map +1 -0
- package/resources/sheet/index.mjs +5 -0
- package/resources/sheet/index.mjs.map +1 -0
- package/resources/sheet/schema.d.mts +207 -0
- package/resources/sheet/schema.d.mts.map +1 -0
- package/resources/sheet/schema.d.ts +207 -0
- package/resources/sheet/schema.d.ts.map +1 -0
- package/resources/sheet/schema.js +65 -0
- package/resources/sheet/schema.js.map +1 -0
- package/resources/sheet/schema.mjs +61 -0
- package/resources/sheet/schema.mjs.map +1 -0
- package/resources/sheet/sheet.d.mts +195 -0
- package/resources/sheet/sheet.d.mts.map +1 -0
- package/resources/sheet/sheet.d.ts +195 -0
- package/resources/sheet/sheet.d.ts.map +1 -0
- package/resources/sheet/sheet.js +90 -0
- package/resources/sheet/sheet.js.map +1 -0
- package/resources/sheet/sheet.mjs +85 -0
- package/resources/sheet/sheet.mjs.map +1 -0
- package/resources/sheet.d.mts +2 -0
- package/resources/sheet.d.mts.map +1 -0
- package/resources/sheet.d.ts +2 -0
- package/resources/sheet.d.ts.map +1 -0
- package/resources/sheet.js +6 -0
- package/resources/sheet.js.map +1 -0
- package/resources/sheet.mjs +3 -0
- package/resources/sheet.mjs.map +1 -0
- package/resources/signal.d.mts +79 -0
- package/resources/signal.d.mts.map +1 -0
- package/resources/signal.d.ts +79 -0
- package/resources/signal.d.ts.map +1 -0
- package/resources/signal.js +26 -0
- package/resources/signal.js.map +1 -0
- package/resources/signal.mjs +22 -0
- package/resources/signal.mjs.map +1 -0
- package/resources/task.d.mts +717 -0
- package/resources/task.d.mts.map +1 -0
- package/resources/task.d.ts +717 -0
- package/resources/task.d.ts.map +1 -0
- package/resources/task.js +108 -0
- package/resources/task.js.map +1 -0
- package/resources/task.mjs +104 -0
- package/resources/task.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +877 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/index.ts +22 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +50 -0
- package/src/internal/qs/LICENSE.md +13 -0
- package/src/internal/qs/README.md +3 -0
- package/src/internal/qs/formats.ts +10 -0
- package/src/internal/qs/index.ts +13 -0
- package/src/internal/qs/stringify.ts +385 -0
- package/src/internal/qs/types.ts +71 -0
- package/src/internal/qs/utils.ts +265 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +95 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +127 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +8 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +2 -0
- package/src/resources/files.ts +219 -0
- package/src/resources/icp.ts +227 -0
- package/src/resources/index.ts +64 -0
- package/src/resources/run.ts +293 -0
- package/src/resources/sheet/entity.ts +97 -0
- package/src/resources/sheet/index.ts +30 -0
- package/src/resources/sheet/schema.ts +246 -0
- package/src/resources/sheet/sheet.ts +318 -0
- package/src/resources/sheet.ts +3 -0
- package/src/resources/signal.ts +117 -0
- package/src/resources/task.ts +912 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +2 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +2 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +2 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../internal/request-options';
|
|
7
|
+
import { path } from '../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Run extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Execute an agent by creating a new run.
|
|
12
|
+
*
|
|
13
|
+
* Creates a new workflow execution asynchronously. Prefer using POST
|
|
14
|
+
* /v1/task/{task_id}/execute for task-based workflows.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```ts
|
|
18
|
+
* const run = await client.run.create({
|
|
19
|
+
* agent_id: '5eb7cf5a86d9755df3a6c593',
|
|
20
|
+
* parameters: { foo: 'bar' },
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
create(body: RunCreateParams, options?: RequestOptions): APIPromise<RunCreateResponse> {
|
|
25
|
+
return this._client.post('/v1/run', { body, ...options });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Get a specific run by ID.
|
|
30
|
+
*
|
|
31
|
+
* Automatically refreshes status from Prefect if the run is still active.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const run = await client.run.retrieve(
|
|
36
|
+
* '5eb7cf5a86d9755df3a6c593',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
retrieve(runID: string, options?: RequestOptions): APIPromise<RunRetrieveResponse> {
|
|
41
|
+
return this._client.get(path`/v1/run/${runID}`, options);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List all runs for the organization.
|
|
46
|
+
*
|
|
47
|
+
* Runs are workflow executions created from tasks. Filter by status to find active
|
|
48
|
+
* runs (RUNNING, PENDING) or completed ones (COMPLETED, FAILED).
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```ts
|
|
52
|
+
* const runs = await client.run.list();
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
list(query: RunListParams | null | undefined = {}, options?: RequestOptions): APIPromise<RunListResponse> {
|
|
56
|
+
return this._client.get('/v1/run', { query, ...options });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Delete a run.
|
|
61
|
+
*
|
|
62
|
+
* Permanently deletes the run record. This operation cannot be undone.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* await client.run.delete('5eb7cf5a86d9755df3a6c593');
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
delete(runID: string, options?: RequestOptions): APIPromise<void> {
|
|
70
|
+
return this._client.delete(path`/v1/run/${runID}`, {
|
|
71
|
+
...options,
|
|
72
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Cancel a running workflow.
|
|
78
|
+
*
|
|
79
|
+
* Cancels both the Prefect flow and updates the database record. Only effective
|
|
80
|
+
* for non-terminal runs.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```ts
|
|
84
|
+
* await client.run.cancel('5eb7cf5a86d9755df3a6c593');
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
cancel(runID: string, options?: RequestOptions): APIPromise<void> {
|
|
88
|
+
return this._client.post(path`/v1/run/${runID}/cancel`, {
|
|
89
|
+
...options,
|
|
90
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Get the queue status for a run.
|
|
96
|
+
*
|
|
97
|
+
* Shows entities being processed by the workflow. States: queued (waiting),
|
|
98
|
+
* processing (active), completed (done), discarded (skipped). Set
|
|
99
|
+
* include_history=true to see all processed entities.
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```ts
|
|
103
|
+
* const response = await client.run.getQueue(
|
|
104
|
+
* '5eb7cf5a86d9755df3a6c593',
|
|
105
|
+
* );
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
getQueue(
|
|
109
|
+
runID: string,
|
|
110
|
+
query: RunGetQueueParams | null | undefined = {},
|
|
111
|
+
options?: RequestOptions,
|
|
112
|
+
): APIPromise<RunGetQueueResponse> {
|
|
113
|
+
return this._client.get(path`/v1/run/${runID}/queue`, { query, ...options });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export type RunCreateResponse = { [key: string]: unknown };
|
|
118
|
+
|
|
119
|
+
export type RunRetrieveResponse = { [key: string]: unknown };
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Response schema for paginated list of agent runs.
|
|
123
|
+
*
|
|
124
|
+
* Follows the established pattern from other list endpoints:
|
|
125
|
+
*
|
|
126
|
+
* - SheetListResponse (src/api/schema/sheet.py)
|
|
127
|
+
* - ICPListResponse (src/api/schema/icp.py)
|
|
128
|
+
*
|
|
129
|
+
* Attributes: runs: List of AgentRun objects for the current page total: Total
|
|
130
|
+
* number of runs matching the filter criteria page: Current page number (1-based)
|
|
131
|
+
* page_size: Number of items per page
|
|
132
|
+
*/
|
|
133
|
+
export interface RunListResponse {
|
|
134
|
+
page: number;
|
|
135
|
+
|
|
136
|
+
page_size: number;
|
|
137
|
+
|
|
138
|
+
runs: Array<{ [key: string]: unknown }>;
|
|
139
|
+
|
|
140
|
+
total: number;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Response schema for run queue status with optional history.
|
|
145
|
+
*
|
|
146
|
+
* Provides a read-only view into the current state of a run's entity queue,
|
|
147
|
+
* including queued entities, processing history, and statistics.
|
|
148
|
+
*
|
|
149
|
+
* Attributes: entities: List of entities (current queue or full history based on
|
|
150
|
+
* request) stats: Queue statistics or state counts total: Total number of entities
|
|
151
|
+
* returned offset: Offset used for pagination (0-indexed) limit: Maximum number of
|
|
152
|
+
* entities returned state_counts: Optional breakdown of entities by state
|
|
153
|
+
* include_history: Whether response includes historical data
|
|
154
|
+
*/
|
|
155
|
+
export interface RunGetQueueResponse {
|
|
156
|
+
entities: Array<{ [key: string]: unknown }>;
|
|
157
|
+
|
|
158
|
+
limit: number;
|
|
159
|
+
|
|
160
|
+
offset: number;
|
|
161
|
+
|
|
162
|
+
stats: { [key: string]: unknown };
|
|
163
|
+
|
|
164
|
+
total: number;
|
|
165
|
+
|
|
166
|
+
include_history?: boolean;
|
|
167
|
+
|
|
168
|
+
state_counts?: { [key: string]: number } | null;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export interface RunCreateParams {
|
|
172
|
+
agent_id: string;
|
|
173
|
+
|
|
174
|
+
parameters: { [key: string]: unknown };
|
|
175
|
+
|
|
176
|
+
icp_id?: string | null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface RunListParams {
|
|
180
|
+
/**
|
|
181
|
+
* Filter by agent ID (legacy)
|
|
182
|
+
*/
|
|
183
|
+
agent_id?: string | null;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Filter by agent type
|
|
187
|
+
*/
|
|
188
|
+
agent_type?: string | null;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Filter runs created after this date (ISO 8601 format: 2024-01-15T10:30:00Z)
|
|
192
|
+
*/
|
|
193
|
+
created_after?: string | null;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Filter runs created before this date (ISO 8601 format)
|
|
197
|
+
*/
|
|
198
|
+
created_before?: string | null;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Filter by ICP ID
|
|
202
|
+
*/
|
|
203
|
+
icp_id?: string | null;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Sort order: -1 for descending, 1 for ascending
|
|
207
|
+
*/
|
|
208
|
+
order?: number | null;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Page number (1-based)
|
|
212
|
+
*/
|
|
213
|
+
page?: number;
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Items per page (max 100)
|
|
217
|
+
*/
|
|
218
|
+
page_size?: number;
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Field to sort by (e.g., 'created_at', 'updated_at', 'agent_type')
|
|
222
|
+
*/
|
|
223
|
+
sort_by?: string | null;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Filter by run status (SCHEDULED, PENDING, RUNNING, COMPLETED, FAILED, CANCELED,
|
|
227
|
+
* CRASHED, PAUSED)
|
|
228
|
+
*/
|
|
229
|
+
status?:
|
|
230
|
+
| 'SCHEDULED'
|
|
231
|
+
| 'PENDING'
|
|
232
|
+
| 'RUNNING'
|
|
233
|
+
| 'COMPLETED'
|
|
234
|
+
| 'FAILED'
|
|
235
|
+
| 'CANCELED'
|
|
236
|
+
| 'CRASHED'
|
|
237
|
+
| 'PAUSED'
|
|
238
|
+
| null;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Filter by task ID
|
|
242
|
+
*/
|
|
243
|
+
task_id?: string | null;
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Filter by task type (signal, search, profile, ingest)
|
|
247
|
+
*/
|
|
248
|
+
task_type?: string | null;
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Filter runs updated after this date (ISO 8601 format)
|
|
252
|
+
*/
|
|
253
|
+
updated_after?: string | null;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Filter runs updated before this date (ISO 8601 format)
|
|
257
|
+
*/
|
|
258
|
+
updated_before?: string | null;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export interface RunGetQueueParams {
|
|
262
|
+
/**
|
|
263
|
+
* Include processing history from all states
|
|
264
|
+
*/
|
|
265
|
+
include_history?: boolean;
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Maximum number of entities to return
|
|
269
|
+
*/
|
|
270
|
+
limit?: number;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Starting position in queue (0-indexed)
|
|
274
|
+
*/
|
|
275
|
+
offset?: number;
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Filter by state: queued, processing, completed, discarded
|
|
279
|
+
*/
|
|
280
|
+
state?: string | null;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export declare namespace Run {
|
|
284
|
+
export {
|
|
285
|
+
type RunCreateResponse as RunCreateResponse,
|
|
286
|
+
type RunRetrieveResponse as RunRetrieveResponse,
|
|
287
|
+
type RunListResponse as RunListResponse,
|
|
288
|
+
type RunGetQueueResponse as RunGetQueueResponse,
|
|
289
|
+
type RunCreateParams as RunCreateParams,
|
|
290
|
+
type RunListParams as RunListParams,
|
|
291
|
+
type RunGetQueueParams as RunGetQueueParams,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Entity extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Get a specific entity from a sheet.
|
|
12
|
+
*/
|
|
13
|
+
retrieve(
|
|
14
|
+
entityID: string,
|
|
15
|
+
params: EntityRetrieveParams,
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromise<EntityRetrieveResponse> {
|
|
18
|
+
const { sheet_id } = params;
|
|
19
|
+
return this._client.get(path`/v1/sheet/${sheet_id}/entity/${entityID}`, options);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Update the comments on an entity.
|
|
24
|
+
*
|
|
25
|
+
* Pass null to clear existing comments.
|
|
26
|
+
*/
|
|
27
|
+
updateComments(
|
|
28
|
+
entityID: string,
|
|
29
|
+
params: EntityUpdateCommentsParams,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): APIPromise<void> {
|
|
32
|
+
const { sheet_id, ...body } = params;
|
|
33
|
+
return this._client.put(path`/v1/sheet/${sheet_id}/entity/${entityID}/comments`, {
|
|
34
|
+
body,
|
|
35
|
+
...options,
|
|
36
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Update the status of an entity.
|
|
42
|
+
*
|
|
43
|
+
* Use status to mark entities as qualified (true) or disqualified (false) from
|
|
44
|
+
* your target list.
|
|
45
|
+
*/
|
|
46
|
+
updateStatus(
|
|
47
|
+
entityID: string,
|
|
48
|
+
params: EntityUpdateStatusParams,
|
|
49
|
+
options?: RequestOptions,
|
|
50
|
+
): APIPromise<void> {
|
|
51
|
+
const { sheet_id, ...body } = params;
|
|
52
|
+
return this._client.put(path`/v1/sheet/${sheet_id}/entity/${entityID}/status`, {
|
|
53
|
+
body,
|
|
54
|
+
...options,
|
|
55
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export type EntityRetrieveResponse = { [key: string]: unknown };
|
|
61
|
+
|
|
62
|
+
export interface EntityRetrieveParams {
|
|
63
|
+
sheet_id: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface EntityUpdateCommentsParams {
|
|
67
|
+
/**
|
|
68
|
+
* Path param:
|
|
69
|
+
*/
|
|
70
|
+
sheet_id: string;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Body param: Comments for the entity
|
|
74
|
+
*/
|
|
75
|
+
comments?: string | null;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface EntityUpdateStatusParams {
|
|
79
|
+
/**
|
|
80
|
+
* Path param:
|
|
81
|
+
*/
|
|
82
|
+
sheet_id: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Body param:
|
|
86
|
+
*/
|
|
87
|
+
status: boolean;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export declare namespace Entity {
|
|
91
|
+
export {
|
|
92
|
+
type EntityRetrieveResponse as EntityRetrieveResponse,
|
|
93
|
+
type EntityRetrieveParams as EntityRetrieveParams,
|
|
94
|
+
type EntityUpdateCommentsParams as EntityUpdateCommentsParams,
|
|
95
|
+
type EntityUpdateStatusParams as EntityUpdateStatusParams,
|
|
96
|
+
};
|
|
97
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export {
|
|
4
|
+
Entity,
|
|
5
|
+
type EntityRetrieveResponse,
|
|
6
|
+
type EntityRetrieveParams,
|
|
7
|
+
type EntityUpdateCommentsParams,
|
|
8
|
+
type EntityUpdateStatusParams,
|
|
9
|
+
} from './entity';
|
|
10
|
+
export {
|
|
11
|
+
Schema,
|
|
12
|
+
type SchemaGetResponse,
|
|
13
|
+
type SchemaGetDefaultResponse,
|
|
14
|
+
type SchemaGetFieldDefinitionsResponse,
|
|
15
|
+
type SchemaAddFieldsParams,
|
|
16
|
+
type SchemaDeleteFieldsParams,
|
|
17
|
+
} from './schema';
|
|
18
|
+
export {
|
|
19
|
+
SheetResource,
|
|
20
|
+
type EntityType,
|
|
21
|
+
type Sheet,
|
|
22
|
+
type SheetListResponse,
|
|
23
|
+
type SheetExportCsvResponse,
|
|
24
|
+
type SheetGetEntitiesResponse,
|
|
25
|
+
type SheetCreateParams,
|
|
26
|
+
type SheetUpdateParams,
|
|
27
|
+
type SheetListParams,
|
|
28
|
+
type SheetExportCsvParams,
|
|
29
|
+
type SheetGetEntitiesParams,
|
|
30
|
+
} from './sheet';
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { buildHeaders } from '../../internal/headers';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { path } from '../../internal/utils/path';
|
|
8
|
+
|
|
9
|
+
export class Schema extends APIResource {
|
|
10
|
+
/**
|
|
11
|
+
* Add custom fields to a sheet's entity schema.
|
|
12
|
+
*
|
|
13
|
+
* Custom fields extend the default schema to capture additional data points for
|
|
14
|
+
* entities in this sheet.
|
|
15
|
+
*/
|
|
16
|
+
addFields(sheetID: string, body: SchemaAddFieldsParams, options?: RequestOptions): APIPromise<void> {
|
|
17
|
+
return this._client.put(path`/v1/sheet/schema/${sheetID}`, {
|
|
18
|
+
body,
|
|
19
|
+
...options,
|
|
20
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Remove custom fields from a sheet's entity schema.
|
|
26
|
+
*
|
|
27
|
+
* Only custom fields can be removed; default fields cannot be deleted. Existing
|
|
28
|
+
* entity data in removed fields remains in the database but becomes inaccessible.
|
|
29
|
+
*/
|
|
30
|
+
deleteFields(sheetID: string, body: SchemaDeleteFieldsParams, options?: RequestOptions): APIPromise<void> {
|
|
31
|
+
return this._client.delete(path`/v1/sheet/schema/${sheetID}`, {
|
|
32
|
+
body,
|
|
33
|
+
...options,
|
|
34
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get the schema for a specific sheet.
|
|
40
|
+
*
|
|
41
|
+
* Returns the sheet's current schema including default fields and any custom
|
|
42
|
+
* fields that have been added.
|
|
43
|
+
*/
|
|
44
|
+
get(sheetID: string, options?: RequestOptions): APIPromise<SchemaGetResponse> {
|
|
45
|
+
return this._client.get(path`/v1/sheet/schema/${sheetID}`, options);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the default schemas for all entity types.
|
|
50
|
+
*
|
|
51
|
+
* Returns JSON Schema definitions for company, person, job_board, and
|
|
52
|
+
* school_district entity types. Use this to understand the standard fields
|
|
53
|
+
* available before adding custom fields.
|
|
54
|
+
*/
|
|
55
|
+
getDefault(options?: RequestOptions): APIPromise<SchemaGetDefaultResponse> {
|
|
56
|
+
return this._client.get('/v1/sheet/schema/default', options);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Get the available field type definitions.
|
|
61
|
+
*
|
|
62
|
+
* Returns JSON Schema definitions for field types that can be used when adding
|
|
63
|
+
* custom fields to sheets.
|
|
64
|
+
*/
|
|
65
|
+
getFieldDefinitions(options?: RequestOptions): APIPromise<SchemaGetFieldDefinitionsResponse> {
|
|
66
|
+
return this._client.get('/v1/sheet/schema/field', options);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* JSON schema for the sheet.
|
|
72
|
+
*/
|
|
73
|
+
export interface SchemaGetResponse {
|
|
74
|
+
/**
|
|
75
|
+
* The title of the schema
|
|
76
|
+
*/
|
|
77
|
+
title: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The type of the schema
|
|
81
|
+
*/
|
|
82
|
+
type: string;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Definitions for nested schemas
|
|
86
|
+
*/
|
|
87
|
+
$defs?: { [key: string]: unknown };
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The properties of the schema
|
|
91
|
+
*/
|
|
92
|
+
properties?: { [key: string]: unknown };
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Required fields in the schema
|
|
96
|
+
*/
|
|
97
|
+
required?: Array<string>;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* List of default schemas for sheets.
|
|
102
|
+
*/
|
|
103
|
+
export interface SchemaGetDefaultResponse {
|
|
104
|
+
schemas: { [key: string]: SchemaGetDefaultResponse.Schemas };
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export namespace SchemaGetDefaultResponse {
|
|
108
|
+
/**
|
|
109
|
+
* JSON schema for the sheet.
|
|
110
|
+
*/
|
|
111
|
+
export interface Schemas {
|
|
112
|
+
/**
|
|
113
|
+
* The title of the schema
|
|
114
|
+
*/
|
|
115
|
+
title: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The type of the schema
|
|
119
|
+
*/
|
|
120
|
+
type: string;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Definitions for nested schemas
|
|
124
|
+
*/
|
|
125
|
+
$defs?: { [key: string]: unknown };
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The properties of the schema
|
|
129
|
+
*/
|
|
130
|
+
properties?: { [key: string]: unknown };
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Required fields in the schema
|
|
134
|
+
*/
|
|
135
|
+
required?: Array<string>;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* List of default field definitions for sheets.
|
|
141
|
+
*/
|
|
142
|
+
export interface SchemaGetFieldDefinitionsResponse {
|
|
143
|
+
fields: { [key: string]: SchemaGetFieldDefinitionsResponse.Fields };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export namespace SchemaGetFieldDefinitionsResponse {
|
|
147
|
+
/**
|
|
148
|
+
* JSON schema for the sheet.
|
|
149
|
+
*/
|
|
150
|
+
export interface Fields {
|
|
151
|
+
/**
|
|
152
|
+
* The title of the schema
|
|
153
|
+
*/
|
|
154
|
+
title: string;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The type of the schema
|
|
158
|
+
*/
|
|
159
|
+
type: string;
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Definitions for nested schemas
|
|
163
|
+
*/
|
|
164
|
+
$defs?: { [key: string]: unknown };
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* The properties of the schema
|
|
168
|
+
*/
|
|
169
|
+
properties?: { [key: string]: unknown };
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Required fields in the schema
|
|
173
|
+
*/
|
|
174
|
+
required?: Array<string>;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface SchemaAddFieldsParams {
|
|
179
|
+
fields: Array<SchemaAddFieldsParams.Field>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export namespace SchemaAddFieldsParams {
|
|
183
|
+
/**
|
|
184
|
+
* Definition for a custom field in a sheet.
|
|
185
|
+
*/
|
|
186
|
+
export interface Field {
|
|
187
|
+
/**
|
|
188
|
+
* Field type
|
|
189
|
+
*/
|
|
190
|
+
field_type: 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'reference' | 'enum';
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Field name
|
|
194
|
+
*/
|
|
195
|
+
name: string;
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Additional JSON schema properties
|
|
199
|
+
*/
|
|
200
|
+
additional_props?: { [key: string]: unknown };
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Schema for array items when field_type is ARRAY
|
|
204
|
+
*/
|
|
205
|
+
array_items?: { [key: string]: unknown } | null;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Field description
|
|
209
|
+
*/
|
|
210
|
+
description?: string;
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* List of allowed values when field_type is ENUM
|
|
214
|
+
*/
|
|
215
|
+
enum_values?: Array<unknown> | null;
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Properties for object fields when field_type is OBJECT
|
|
219
|
+
*/
|
|
220
|
+
properties?: { [key: string]: unknown } | null;
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Referenced model name when field_type is REFERENCE
|
|
224
|
+
*/
|
|
225
|
+
reference_model?: string | null;
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Whether field is required - always false for custom fields
|
|
229
|
+
*/
|
|
230
|
+
required?: boolean;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface SchemaDeleteFieldsParams {
|
|
235
|
+
fields: Array<string>;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare namespace Schema {
|
|
239
|
+
export {
|
|
240
|
+
type SchemaGetResponse as SchemaGetResponse,
|
|
241
|
+
type SchemaGetDefaultResponse as SchemaGetDefaultResponse,
|
|
242
|
+
type SchemaGetFieldDefinitionsResponse as SchemaGetFieldDefinitionsResponse,
|
|
243
|
+
type SchemaAddFieldsParams as SchemaAddFieldsParams,
|
|
244
|
+
type SchemaDeleteFieldsParams as SchemaDeleteFieldsParams,
|
|
245
|
+
};
|
|
246
|
+
}
|