@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,912 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as TaskAPI from './task';
|
|
5
|
+
import * as SheetAPI from './sheet/sheet';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { buildHeaders } from '../internal/headers';
|
|
8
|
+
import { RequestOptions } from '../internal/request-options';
|
|
9
|
+
import { path } from '../internal/utils/path';
|
|
10
|
+
|
|
11
|
+
export class Task extends APIResource {
|
|
12
|
+
/**
|
|
13
|
+
* Create a new task template.
|
|
14
|
+
*
|
|
15
|
+
* Tasks define reusable workflow configurations that reference Prefect
|
|
16
|
+
* deployments. Execute a task to create runs.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const task = await client.task.create({
|
|
21
|
+
* deployment_name: 'deployment_name',
|
|
22
|
+
* description: 'description',
|
|
23
|
+
* flow_name: 'flow_name',
|
|
24
|
+
* name: 'x',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
create(body: TaskCreateParams, options?: RequestOptions): APIPromise<TaskCreateResponse> {
|
|
29
|
+
return this._client.post('/v1/task', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get a specific task by ID.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const task = await client.task.retrieve(
|
|
38
|
+
* '5eb7cf5a86d9755df3a6c593',
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
retrieve(taskID: string, options?: RequestOptions): APIPromise<TaskRetrieveResponse> {
|
|
43
|
+
return this._client.get(path`/v1/task/${taskID}`, options);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Update an existing task.
|
|
48
|
+
*
|
|
49
|
+
* Only provided fields will be updated; omitted fields remain unchanged. The
|
|
50
|
+
* flow_name cannot be changed after creation.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```ts
|
|
54
|
+
* await client.task.update('5eb7cf5a86d9755df3a6c593');
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
update(taskID: string, body: TaskUpdateParams, options?: RequestOptions): APIPromise<void> {
|
|
58
|
+
return this._client.put(path`/v1/task/${taskID}`, {
|
|
59
|
+
body,
|
|
60
|
+
...options,
|
|
61
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* List all tasks for the organization.
|
|
67
|
+
*
|
|
68
|
+
* Tasks are reusable workflow templates. Filter by flow_name to see specific
|
|
69
|
+
* workflow types (search, ingest, signal).
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```ts
|
|
73
|
+
* const tasks = await client.task.list();
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
list(
|
|
77
|
+
query: TaskListParams | null | undefined = {},
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): APIPromise<TaskListResponse> {
|
|
80
|
+
return this._client.get('/v1/task', { query, ...options });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Delete a task.
|
|
85
|
+
*
|
|
86
|
+
* A task cannot be deleted if it has active (non-terminal) runs. This operation
|
|
87
|
+
* cannot be undone.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* await client.task.delete('5eb7cf5a86d9755df3a6c593');
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
delete(taskID: string, options?: RequestOptions): APIPromise<void> {
|
|
95
|
+
return this._client.delete(path`/v1/task/${taskID}`, {
|
|
96
|
+
...options,
|
|
97
|
+
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Execute a task by creating a new run.
|
|
103
|
+
*
|
|
104
|
+
* Creates a new workflow execution asynchronously and returns tracking information
|
|
105
|
+
* immediately. Monitor the run status using the returned run_id.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```ts
|
|
109
|
+
* const response = await client.task.execute(
|
|
110
|
+
* '5eb7cf5a86d9755df3a6c593',
|
|
111
|
+
* );
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
execute(
|
|
115
|
+
taskID: string,
|
|
116
|
+
body: TaskExecuteParams,
|
|
117
|
+
options?: RequestOptions,
|
|
118
|
+
): APIPromise<TaskExecuteResponse> {
|
|
119
|
+
return this._client.post(path`/v1/task/${taskID}/execute`, { body, ...options });
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Configuration for one-time CSV enrichment tasks.
|
|
125
|
+
*
|
|
126
|
+
* Used by ingest_csv workflows to enrich entities from uploaded CSV files. The
|
|
127
|
+
* csv_entity_type tracks the entity type of rows IN THE CSV, which may differ from
|
|
128
|
+
* the ICP hierarchy (e.g., CSV has people, but ICP has company→person).
|
|
129
|
+
*
|
|
130
|
+
* Attributes: file_id: Reference to uploaded CSV file in S3 (via File document)
|
|
131
|
+
* primary_column: Column containing entity names for matching csv_entity_type:
|
|
132
|
+
* Entity type of rows in CSV (may differ from ICP hierarchy)
|
|
133
|
+
*/
|
|
134
|
+
export interface IngestTaskConfig {
|
|
135
|
+
/**
|
|
136
|
+
* Entity type in the CSV (e.g., 'person', 'company')
|
|
137
|
+
*/
|
|
138
|
+
csv_entity_type: string;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* File ID referencing uploaded CSV in MongoDB
|
|
142
|
+
*/
|
|
143
|
+
file_id: string;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Column containing entity names
|
|
147
|
+
*/
|
|
148
|
+
primary_column: string;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Config type for ingest tasks
|
|
152
|
+
*/
|
|
153
|
+
config_type?: 'ingest-task';
|
|
154
|
+
|
|
155
|
+
version?: 'v1.0';
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Optional webhook URL to notify when workflow run completes
|
|
159
|
+
*/
|
|
160
|
+
webhook_url?: string | null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Search v2 dual-agent configuration.
|
|
165
|
+
*/
|
|
166
|
+
export interface SearchV2Config {
|
|
167
|
+
/**
|
|
168
|
+
* Jinja2 analyst agent instructions
|
|
169
|
+
*/
|
|
170
|
+
analyst_prompt: string;
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Jinja2 discovery agent instructions
|
|
174
|
+
*/
|
|
175
|
+
discovery_prompt: string;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Config type (search-prompt for legacy, search-task for normalized)
|
|
179
|
+
*/
|
|
180
|
+
config_type?: 'search-prompt' | 'search-task';
|
|
181
|
+
|
|
182
|
+
version?: 'v2.0';
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Optional webhook URL to notify when workflow run completes
|
|
186
|
+
*/
|
|
187
|
+
webhook_url?: string | null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Search v3.0 configuration with planning-driven approach.
|
|
192
|
+
*
|
|
193
|
+
* Key differences from v2.0:
|
|
194
|
+
*
|
|
195
|
+
* - No hardcoded discovery_prompt or analyst_prompt
|
|
196
|
+
* - desired_contact_count extracted from ICP builder session
|
|
197
|
+
* - user_feedback field for append-only feedback accumulation
|
|
198
|
+
*/
|
|
199
|
+
export interface SearchV3Config {
|
|
200
|
+
/**
|
|
201
|
+
* Normalized config type for all search tasks
|
|
202
|
+
*/
|
|
203
|
+
config_type?: 'search-task';
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Number of contacts to find per company (from ICP builder session)
|
|
207
|
+
*/
|
|
208
|
+
desired_contact_count?: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Accumulated user feedback (append-only)
|
|
212
|
+
*/
|
|
213
|
+
user_feedback?: string;
|
|
214
|
+
|
|
215
|
+
version?: 'v3.0';
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* Optional webhook URL to notify when workflow run completes
|
|
219
|
+
*/
|
|
220
|
+
webhook_url?: string | null;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* CSV-based signal monitoring configuration.
|
|
225
|
+
*
|
|
226
|
+
* Monitors signals for companies/people uploaded via CSV file.
|
|
227
|
+
*
|
|
228
|
+
* Attributes: version: Config version (always "v2.0") config_type: Config type
|
|
229
|
+
* discriminator (always "signal-csv") entity_type: Type of entity being monitored
|
|
230
|
+
* (company, person, etc.) file_id: ID of the uploaded CSV file primary_column:
|
|
231
|
+
* Column containing entity names (defaults to "name") signal_types: Types of
|
|
232
|
+
* signals to monitor for these entities monitoring_frequency: How often to check
|
|
233
|
+
* for signals (daily/weekly/monthly) webhook_url: Optional webhook URL to notify
|
|
234
|
+
* when signal run completes
|
|
235
|
+
*/
|
|
236
|
+
export interface SignalCsvConfigInput {
|
|
237
|
+
/**
|
|
238
|
+
* ID of the uploaded CSV file
|
|
239
|
+
*/
|
|
240
|
+
file_id: string;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Types of signals to monitor for these entities
|
|
244
|
+
*/
|
|
245
|
+
signal_types: Array<SignalTypeConfig>;
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Config type discriminator
|
|
249
|
+
*/
|
|
250
|
+
config_type?: 'signal-csv';
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Type of entity being monitored (company, school district, person, etc.)
|
|
254
|
+
*/
|
|
255
|
+
entity_type?: SheetAPI.EntityType;
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* How often to check for new signals (daily, weekly, monthly)
|
|
259
|
+
*/
|
|
260
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* Column containing entity names. Defaults to 'name'. Used to extract entity names
|
|
264
|
+
* from CSV rows during signal workflow.
|
|
265
|
+
*/
|
|
266
|
+
primary_column?: string;
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Config version
|
|
270
|
+
*/
|
|
271
|
+
version?: 'v2.0';
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Optional webhook URL to notify when signal run completes
|
|
275
|
+
*/
|
|
276
|
+
webhook_url?: string | null;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Sheet-based signal monitoring configuration.
|
|
281
|
+
*
|
|
282
|
+
* Monitors signals for entities from an existing discovery ICP's sheet. Unlike CSV
|
|
283
|
+
* mode, signals are deterministically linked to source entities without requiring
|
|
284
|
+
* analyst agent processing.
|
|
285
|
+
*
|
|
286
|
+
* UPDATED 2025-12-29: Removed source_sheet_id field. Sheets are uniquely
|
|
287
|
+
* identified by (source_icp_id, entity_type), so source_sheet_id was redundant and
|
|
288
|
+
* never used at runtime.
|
|
289
|
+
*
|
|
290
|
+
* Attributes: source_icp_id: ID of the discovery ICP containing entities to
|
|
291
|
+
* monitor entity_type: Type of entity being monitored (selects which sheet)
|
|
292
|
+
* entity_filters: Optional MongoDB query to filter entities signal_types: Types of
|
|
293
|
+
* signals to monitor monitoring_frequency: How often to check for signals
|
|
294
|
+
* webhook_url: Optional webhook URL to notify when signal run completes
|
|
295
|
+
*/
|
|
296
|
+
export interface SignalSheetConfigInput {
|
|
297
|
+
/**
|
|
298
|
+
* Types of signals to monitor
|
|
299
|
+
*/
|
|
300
|
+
signal_types: Array<SignalTypeConfig>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* ID of the discovery ICP containing entities to monitor
|
|
304
|
+
*/
|
|
305
|
+
source_icp_id: string;
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Config type discriminator
|
|
309
|
+
*/
|
|
310
|
+
config_type?: 'signal-sheet';
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Optional MongoDB query to filter entities within the sheet
|
|
314
|
+
*/
|
|
315
|
+
entity_filters?: { [key: string]: unknown } | null;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Type of entity being monitored (company, person, school_district, etc.)
|
|
319
|
+
*/
|
|
320
|
+
entity_type?: SheetAPI.EntityType;
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* How often to check for new signals
|
|
324
|
+
*/
|
|
325
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
326
|
+
|
|
327
|
+
/**
|
|
328
|
+
* Config version
|
|
329
|
+
*/
|
|
330
|
+
version?: 'v2.0';
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Optional webhook URL to notify when signal run completes
|
|
334
|
+
*/
|
|
335
|
+
webhook_url?: string | null;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
* Topic-based signal monitoring configuration.
|
|
340
|
+
*
|
|
341
|
+
* Monitors signals based on criteria without requiring pre-existing entities.
|
|
342
|
+
*
|
|
343
|
+
* Attributes: version: Config version (always "v2.0") config_type: Config type
|
|
344
|
+
* discriminator (always "signal-topic") entity_type: Type of entity being
|
|
345
|
+
* monitored (company, person, etc.) topic_criteria: Natural language description
|
|
346
|
+
* of what to monitor signal_types: Types of signals to monitor for this topic
|
|
347
|
+
* monitoring_frequency: How often to check for signals (daily/weekly/monthly)
|
|
348
|
+
* geographic_filters: Optional geographic regions to focus on industry_filters:
|
|
349
|
+
* Optional industries to focus on company_size_filters: Optional company size
|
|
350
|
+
* criteria webhook_url: Optional webhook URL to notify when signal run completes
|
|
351
|
+
*/
|
|
352
|
+
export interface SignalTopicConfigInput {
|
|
353
|
+
/**
|
|
354
|
+
* Types of signals to monitor for this topic
|
|
355
|
+
*/
|
|
356
|
+
signal_types: Array<SignalTypeConfig>;
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Natural language description of what to monitor
|
|
360
|
+
*/
|
|
361
|
+
topic_criteria: string;
|
|
362
|
+
|
|
363
|
+
/**
|
|
364
|
+
* Company size criteria (e.g., employee count ranges)
|
|
365
|
+
*/
|
|
366
|
+
company_size_filters?: Array<string> | null;
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Config type discriminator
|
|
370
|
+
*/
|
|
371
|
+
config_type?: 'signal-topic';
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* Type of entity being monitored (company, school district, person, etc.)
|
|
375
|
+
*/
|
|
376
|
+
entity_type?: SheetAPI.EntityType;
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Geographic regions to focus on
|
|
380
|
+
*/
|
|
381
|
+
geographic_filters?: Array<string> | null;
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Industries to focus on
|
|
385
|
+
*/
|
|
386
|
+
industry_filters?: Array<string> | null;
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* How often to check for new signals (daily, weekly, monthly)
|
|
390
|
+
*/
|
|
391
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* Config version
|
|
395
|
+
*/
|
|
396
|
+
version?: 'v2.0';
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Optional webhook URL to notify when signal run completes
|
|
400
|
+
*/
|
|
401
|
+
webhook_url?: string | null;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* Configuration for a single signal type to monitor.
|
|
406
|
+
*
|
|
407
|
+
* Allows both standard signal types and custom types using OTHER.
|
|
408
|
+
*/
|
|
409
|
+
export interface SignalTypeConfig {
|
|
410
|
+
/**
|
|
411
|
+
* Detailed description of what to monitor
|
|
412
|
+
*/
|
|
413
|
+
description: string;
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* Display name for this signal type
|
|
417
|
+
*/
|
|
418
|
+
display: string;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* Signal type to monitor (use OTHER for custom types)
|
|
422
|
+
*/
|
|
423
|
+
type:
|
|
424
|
+
| 'funding'
|
|
425
|
+
| 'leadership_change'
|
|
426
|
+
| 'layoff'
|
|
427
|
+
| 'product_launch'
|
|
428
|
+
| 'partnership'
|
|
429
|
+
| 'acquisition'
|
|
430
|
+
| 'expansion'
|
|
431
|
+
| 'award'
|
|
432
|
+
| 'pivot'
|
|
433
|
+
| 'regulatory'
|
|
434
|
+
| 'rfp'
|
|
435
|
+
| 'contract_renewal'
|
|
436
|
+
| 'hiring_surge'
|
|
437
|
+
| 'infrastructure'
|
|
438
|
+
| 'compliance'
|
|
439
|
+
| 'job_posting'
|
|
440
|
+
| 'other';
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Standard single-prompt configuration for most flows. Used by: ingest, profile,
|
|
445
|
+
* signal, and future single-prompt flows.
|
|
446
|
+
*
|
|
447
|
+
* NOTE: config_type should match flow_name (e.g., 'profile-prompt',
|
|
448
|
+
* 'ingest-prompt'). This is enforced by Task model validator.
|
|
449
|
+
*/
|
|
450
|
+
export interface StandardPromptConfig {
|
|
451
|
+
/**
|
|
452
|
+
* Config type (e.g., 'profile-prompt', 'ingest-prompt')
|
|
453
|
+
*/
|
|
454
|
+
config_type: string;
|
|
455
|
+
|
|
456
|
+
/**
|
|
457
|
+
* Jinja2 template for task instructions
|
|
458
|
+
*/
|
|
459
|
+
prompt: string;
|
|
460
|
+
|
|
461
|
+
version?: 'v1.0';
|
|
462
|
+
|
|
463
|
+
/**
|
|
464
|
+
* Optional webhook URL to notify when workflow run completes
|
|
465
|
+
*/
|
|
466
|
+
webhook_url?: string | null;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export type TaskCreateResponse = { [key: string]: unknown };
|
|
470
|
+
|
|
471
|
+
export type TaskRetrieveResponse = { [key: string]: unknown };
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Response model for paginated task list.
|
|
475
|
+
*/
|
|
476
|
+
export interface TaskListResponse {
|
|
477
|
+
/**
|
|
478
|
+
* Current page number (1-based)
|
|
479
|
+
*/
|
|
480
|
+
page: number;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Number of items per page
|
|
484
|
+
*/
|
|
485
|
+
page_size: number;
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* List of tasks
|
|
489
|
+
*/
|
|
490
|
+
tasks: Array<TaskListResponse.Task>;
|
|
491
|
+
|
|
492
|
+
/**
|
|
493
|
+
* Total number of tasks matching filters
|
|
494
|
+
*/
|
|
495
|
+
total: number;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export namespace TaskListResponse {
|
|
499
|
+
/**
|
|
500
|
+
* Response model for task data.
|
|
501
|
+
*/
|
|
502
|
+
export interface Task {
|
|
503
|
+
/**
|
|
504
|
+
* Task ID
|
|
505
|
+
*/
|
|
506
|
+
id: string;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* Creation timestamp
|
|
510
|
+
*/
|
|
511
|
+
created_at: string;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Prefect deployment name
|
|
515
|
+
*/
|
|
516
|
+
deployment_name: string;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* Task description
|
|
520
|
+
*/
|
|
521
|
+
description: string;
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Prefect flow name
|
|
525
|
+
*/
|
|
526
|
+
flow_name: string;
|
|
527
|
+
|
|
528
|
+
/**
|
|
529
|
+
* Task name
|
|
530
|
+
*/
|
|
531
|
+
name: string;
|
|
532
|
+
|
|
533
|
+
/**
|
|
534
|
+
* Last update timestamp
|
|
535
|
+
*/
|
|
536
|
+
updated_at: string;
|
|
537
|
+
|
|
538
|
+
/**
|
|
539
|
+
* Task ICP ID
|
|
540
|
+
*/
|
|
541
|
+
icp_id?: string | null;
|
|
542
|
+
|
|
543
|
+
/**
|
|
544
|
+
* Template prompt for the task. Can include placeholders for runtime parameters.
|
|
545
|
+
*/
|
|
546
|
+
prompt?: string | null;
|
|
547
|
+
|
|
548
|
+
/**
|
|
549
|
+
* Flow-specific task configuration with versioning
|
|
550
|
+
*/
|
|
551
|
+
task_config?:
|
|
552
|
+
| { [key: string]: unknown }
|
|
553
|
+
| TaskAPI.StandardPromptConfig
|
|
554
|
+
| TaskAPI.SearchV2Config
|
|
555
|
+
| TaskAPI.SearchV3Config
|
|
556
|
+
| TaskAPI.IngestTaskConfig
|
|
557
|
+
| Task.SignalTopicConfigOutput
|
|
558
|
+
| Task.SignalCsvConfigOutput
|
|
559
|
+
| Task.SignalSheetConfigOutput
|
|
560
|
+
| null;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export namespace Task {
|
|
564
|
+
/**
|
|
565
|
+
* Topic-based signal monitoring configuration.
|
|
566
|
+
*
|
|
567
|
+
* Monitors signals based on criteria without requiring pre-existing entities.
|
|
568
|
+
*
|
|
569
|
+
* Attributes: version: Config version (always "v2.0") config_type: Config type
|
|
570
|
+
* discriminator (always "signal-topic") entity_type: Type of entity being
|
|
571
|
+
* monitored (company, person, etc.) topic_criteria: Natural language description
|
|
572
|
+
* of what to monitor signal_types: Types of signals to monitor for this topic
|
|
573
|
+
* monitoring_frequency: How often to check for signals (daily/weekly/monthly)
|
|
574
|
+
* geographic_filters: Optional geographic regions to focus on industry_filters:
|
|
575
|
+
* Optional industries to focus on company_size_filters: Optional company size
|
|
576
|
+
* criteria webhook_url: Optional webhook URL to notify when signal run completes
|
|
577
|
+
*/
|
|
578
|
+
export interface SignalTopicConfigOutput {
|
|
579
|
+
/**
|
|
580
|
+
* Types of signals to monitor for this topic
|
|
581
|
+
*/
|
|
582
|
+
signal_types: Array<TaskAPI.SignalTypeConfig>;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Natural language description of what to monitor
|
|
586
|
+
*/
|
|
587
|
+
topic_criteria: string;
|
|
588
|
+
|
|
589
|
+
/**
|
|
590
|
+
* Company size criteria (e.g., employee count ranges)
|
|
591
|
+
*/
|
|
592
|
+
company_size_filters?: Array<string> | null;
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* Config type discriminator
|
|
596
|
+
*/
|
|
597
|
+
config_type?: 'signal-topic';
|
|
598
|
+
|
|
599
|
+
/**
|
|
600
|
+
* Type of entity being monitored (company, school district, person, etc.)
|
|
601
|
+
*/
|
|
602
|
+
entity_type?: SheetAPI.EntityType;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Geographic regions to focus on
|
|
606
|
+
*/
|
|
607
|
+
geographic_filters?: Array<string> | null;
|
|
608
|
+
|
|
609
|
+
/**
|
|
610
|
+
* Industries to focus on
|
|
611
|
+
*/
|
|
612
|
+
industry_filters?: Array<string> | null;
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* How often to check for new signals (daily, weekly, monthly)
|
|
616
|
+
*/
|
|
617
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* Config version
|
|
621
|
+
*/
|
|
622
|
+
version?: 'v2.0';
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Optional webhook URL to notify when signal run completes
|
|
626
|
+
*/
|
|
627
|
+
webhook_url?: string | null;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
/**
|
|
631
|
+
* CSV-based signal monitoring configuration.
|
|
632
|
+
*
|
|
633
|
+
* Monitors signals for companies/people uploaded via CSV file.
|
|
634
|
+
*
|
|
635
|
+
* Attributes: version: Config version (always "v2.0") config_type: Config type
|
|
636
|
+
* discriminator (always "signal-csv") entity_type: Type of entity being monitored
|
|
637
|
+
* (company, person, etc.) file_id: ID of the uploaded CSV file primary_column:
|
|
638
|
+
* Column containing entity names (defaults to "name") signal_types: Types of
|
|
639
|
+
* signals to monitor for these entities monitoring_frequency: How often to check
|
|
640
|
+
* for signals (daily/weekly/monthly) webhook_url: Optional webhook URL to notify
|
|
641
|
+
* when signal run completes
|
|
642
|
+
*/
|
|
643
|
+
export interface SignalCsvConfigOutput {
|
|
644
|
+
/**
|
|
645
|
+
* ID of the uploaded CSV file
|
|
646
|
+
*/
|
|
647
|
+
file_id: string;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* Types of signals to monitor for these entities
|
|
651
|
+
*/
|
|
652
|
+
signal_types: Array<TaskAPI.SignalTypeConfig>;
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Config type discriminator
|
|
656
|
+
*/
|
|
657
|
+
config_type?: 'signal-csv';
|
|
658
|
+
|
|
659
|
+
/**
|
|
660
|
+
* Type of entity being monitored (company, school district, person, etc.)
|
|
661
|
+
*/
|
|
662
|
+
entity_type?: SheetAPI.EntityType;
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* How often to check for new signals (daily, weekly, monthly)
|
|
666
|
+
*/
|
|
667
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
668
|
+
|
|
669
|
+
/**
|
|
670
|
+
* Column containing entity names. Defaults to 'name'. Used to extract entity names
|
|
671
|
+
* from CSV rows during signal workflow.
|
|
672
|
+
*/
|
|
673
|
+
primary_column?: string;
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Config version
|
|
677
|
+
*/
|
|
678
|
+
version?: 'v2.0';
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Optional webhook URL to notify when signal run completes
|
|
682
|
+
*/
|
|
683
|
+
webhook_url?: string | null;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* Sheet-based signal monitoring configuration.
|
|
688
|
+
*
|
|
689
|
+
* Monitors signals for entities from an existing discovery ICP's sheet. Unlike CSV
|
|
690
|
+
* mode, signals are deterministically linked to source entities without requiring
|
|
691
|
+
* analyst agent processing.
|
|
692
|
+
*
|
|
693
|
+
* UPDATED 2025-12-29: Removed source_sheet_id field. Sheets are uniquely
|
|
694
|
+
* identified by (source_icp_id, entity_type), so source_sheet_id was redundant and
|
|
695
|
+
* never used at runtime.
|
|
696
|
+
*
|
|
697
|
+
* Attributes: source_icp_id: ID of the discovery ICP containing entities to
|
|
698
|
+
* monitor entity_type: Type of entity being monitored (selects which sheet)
|
|
699
|
+
* entity_filters: Optional MongoDB query to filter entities signal_types: Types of
|
|
700
|
+
* signals to monitor monitoring_frequency: How often to check for signals
|
|
701
|
+
* webhook_url: Optional webhook URL to notify when signal run completes
|
|
702
|
+
*/
|
|
703
|
+
export interface SignalSheetConfigOutput {
|
|
704
|
+
/**
|
|
705
|
+
* Types of signals to monitor
|
|
706
|
+
*/
|
|
707
|
+
signal_types: Array<TaskAPI.SignalTypeConfig>;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* ID of the discovery ICP containing entities to monitor
|
|
711
|
+
*/
|
|
712
|
+
source_icp_id: string;
|
|
713
|
+
|
|
714
|
+
/**
|
|
715
|
+
* Config type discriminator
|
|
716
|
+
*/
|
|
717
|
+
config_type?: 'signal-sheet';
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Optional MongoDB query to filter entities within the sheet
|
|
721
|
+
*/
|
|
722
|
+
entity_filters?: { [key: string]: unknown } | null;
|
|
723
|
+
|
|
724
|
+
/**
|
|
725
|
+
* Type of entity being monitored (company, person, school_district, etc.)
|
|
726
|
+
*/
|
|
727
|
+
entity_type?: SheetAPI.EntityType;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* How often to check for new signals
|
|
731
|
+
*/
|
|
732
|
+
monitoring_frequency?: 'daily' | 'weekly' | 'monthly';
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Config version
|
|
736
|
+
*/
|
|
737
|
+
version?: 'v2.0';
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Optional webhook URL to notify when signal run completes
|
|
741
|
+
*/
|
|
742
|
+
webhook_url?: string | null;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Response model for task execution.
|
|
749
|
+
*/
|
|
750
|
+
export interface TaskExecuteResponse {
|
|
751
|
+
/**
|
|
752
|
+
* The Prefect flow run ID
|
|
753
|
+
*/
|
|
754
|
+
flow_run_id: string;
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* The ID of the created run
|
|
758
|
+
*/
|
|
759
|
+
run_id: string;
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Initial status of the run
|
|
763
|
+
*/
|
|
764
|
+
status: string;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export interface TaskCreateParams {
|
|
768
|
+
/**
|
|
769
|
+
* The Prefect deployment name for this flow
|
|
770
|
+
*/
|
|
771
|
+
deployment_name: string;
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Detailed description of what this task accomplishes
|
|
775
|
+
*/
|
|
776
|
+
description: string;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* The Prefect flow name (e.g., 'search', 'ingest', 'signal')
|
|
780
|
+
*/
|
|
781
|
+
flow_name: string;
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* Human-readable name for the task
|
|
785
|
+
*/
|
|
786
|
+
name: string;
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Optional ICP ID for signal monitoring tasks
|
|
790
|
+
*/
|
|
791
|
+
icp_id?: string | null;
|
|
792
|
+
|
|
793
|
+
/**
|
|
794
|
+
* Template prompt for the task. Can include placeholders for runtime parameters.
|
|
795
|
+
*/
|
|
796
|
+
prompt?: string | null;
|
|
797
|
+
|
|
798
|
+
/**
|
|
799
|
+
* Flow-specific task configuration with versioning
|
|
800
|
+
*/
|
|
801
|
+
task_config?:
|
|
802
|
+
| { [key: string]: unknown }
|
|
803
|
+
| StandardPromptConfig
|
|
804
|
+
| SearchV2Config
|
|
805
|
+
| SearchV3Config
|
|
806
|
+
| IngestTaskConfig
|
|
807
|
+
| SignalTopicConfigInput
|
|
808
|
+
| SignalCsvConfigInput
|
|
809
|
+
| SignalSheetConfigInput
|
|
810
|
+
| null;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
export interface TaskUpdateParams {
|
|
814
|
+
/**
|
|
815
|
+
* Updated deployment name
|
|
816
|
+
*/
|
|
817
|
+
deployment_name?: string | null;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Updated task description
|
|
821
|
+
*/
|
|
822
|
+
description?: string | null;
|
|
823
|
+
|
|
824
|
+
/**
|
|
825
|
+
* Updated ICP Connection
|
|
826
|
+
*/
|
|
827
|
+
icp_id?: string | null;
|
|
828
|
+
|
|
829
|
+
/**
|
|
830
|
+
* Updated task name
|
|
831
|
+
*/
|
|
832
|
+
name?: string | null;
|
|
833
|
+
|
|
834
|
+
/**
|
|
835
|
+
* Updated task prompt template
|
|
836
|
+
*/
|
|
837
|
+
prompt?: string | null;
|
|
838
|
+
|
|
839
|
+
/**
|
|
840
|
+
* Updated flow-specific task configuration with versioning
|
|
841
|
+
*/
|
|
842
|
+
task_config?:
|
|
843
|
+
| { [key: string]: unknown }
|
|
844
|
+
| StandardPromptConfig
|
|
845
|
+
| SearchV2Config
|
|
846
|
+
| SearchV3Config
|
|
847
|
+
| IngestTaskConfig
|
|
848
|
+
| SignalTopicConfigInput
|
|
849
|
+
| SignalCsvConfigInput
|
|
850
|
+
| SignalSheetConfigInput
|
|
851
|
+
| null;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export interface TaskListParams {
|
|
855
|
+
/**
|
|
856
|
+
* Filter by flow name
|
|
857
|
+
*/
|
|
858
|
+
flow_name?: string | null;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Sort order: -1 for descending, 1 for ascending
|
|
862
|
+
*/
|
|
863
|
+
order?: number | null;
|
|
864
|
+
|
|
865
|
+
/**
|
|
866
|
+
* Page number (1-based)
|
|
867
|
+
*/
|
|
868
|
+
page?: number;
|
|
869
|
+
|
|
870
|
+
/**
|
|
871
|
+
* Items per page (max 100)
|
|
872
|
+
*/
|
|
873
|
+
page_size?: number;
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* Field to sort by (e.g., 'created_at', 'updated_at', 'name')
|
|
877
|
+
*/
|
|
878
|
+
sort_by?: string | null;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface TaskExecuteParams {
|
|
882
|
+
/**
|
|
883
|
+
* Optional ICP ID to attach to this run for workflows that require ICP context
|
|
884
|
+
*/
|
|
885
|
+
icp_id?: string | null;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Runtime parameters to pass to the task execution
|
|
889
|
+
*/
|
|
890
|
+
parameters?: { [key: string]: unknown };
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
export declare namespace Task {
|
|
894
|
+
export {
|
|
895
|
+
type IngestTaskConfig as IngestTaskConfig,
|
|
896
|
+
type SearchV2Config as SearchV2Config,
|
|
897
|
+
type SearchV3Config as SearchV3Config,
|
|
898
|
+
type SignalCsvConfigInput as SignalCsvConfigInput,
|
|
899
|
+
type SignalSheetConfigInput as SignalSheetConfigInput,
|
|
900
|
+
type SignalTopicConfigInput as SignalTopicConfigInput,
|
|
901
|
+
type SignalTypeConfig as SignalTypeConfig,
|
|
902
|
+
type StandardPromptConfig as StandardPromptConfig,
|
|
903
|
+
type TaskCreateResponse as TaskCreateResponse,
|
|
904
|
+
type TaskRetrieveResponse as TaskRetrieveResponse,
|
|
905
|
+
type TaskListResponse as TaskListResponse,
|
|
906
|
+
type TaskExecuteResponse as TaskExecuteResponse,
|
|
907
|
+
type TaskCreateParams as TaskCreateParams,
|
|
908
|
+
type TaskUpdateParams as TaskUpdateParams,
|
|
909
|
+
type TaskListParams as TaskListParams,
|
|
910
|
+
type TaskExecuteParams as TaskExecuteParams,
|
|
911
|
+
};
|
|
912
|
+
}
|