@tailor-platform/sdk 1.6.2 → 1.7.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.
@@ -1,6 +1,6 @@
1
1
  /// <reference path="./../../user-defined.d.ts" />
2
- import { nt as TailorDBType, yt as TailorField } from "../../index-Dg8SBgrV.mjs";
3
- import { U as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-DjdAxcQn.mjs";
2
+ import { ht as TailorField, nt as TailorDBType } from "../../index-DraFftyF.mjs";
3
+ import { U as WORKFLOW_TEST_ENV_KEY, n as output } from "../../index-BSrVjiPg.mjs";
4
4
  import { StandardSchemaV1 } from "@standard-schema/spec";
5
5
 
6
6
  //#region src/utils/test/index.d.ts
@@ -0,0 +1,117 @@
1
+ # Executor Commands
2
+
3
+ Commands for managing executors and executor jobs.
4
+
5
+ ## executor
6
+
7
+ Manage executors and executor jobs.
8
+
9
+ ```bash
10
+ tailor-sdk executor <subcommand> [options]
11
+ ```
12
+
13
+ ### executor trigger
14
+
15
+ Trigger an executor manually.
16
+
17
+ Only executors with `incomingWebhook` or `schedule` trigger types can be triggered manually. Executors with `event` trigger types (such as `recordCreated`, `recordUpdated`, `recordDeleted`) cannot be triggered manually.
18
+
19
+ The `--data` and `--header` options are only available for `incomingWebhook` trigger type.
20
+
21
+ ```bash
22
+ tailor-sdk executor trigger <executorName> [options]
23
+ ```
24
+
25
+ **Arguments:**
26
+
27
+ - `executorName` - Executor name (required)
28
+
29
+ **Options:**
30
+
31
+ - `-d, --data` - Request body (JSON string)
32
+ - `-H, --header` - Request header (format: `Key: Value`, can be specified multiple times)
33
+ - `-W, --wait` - Wait for job completion and downstream execution (workflow/function) if applicable
34
+ - `-i, --interval` - Polling interval when using --wait (default: `3s`)
35
+ - `-l, --logs` - Display function execution logs after completion (requires --wait)
36
+ - `-w, --workspace-id` - ID of the workspace
37
+ - `-p, --profile` - Workspace profile to use
38
+ - `-j, --json` - Output as JSON
39
+
40
+ **Usage Examples:**
41
+
42
+ ```bash
43
+ # Trigger an executor
44
+ tailor-sdk executor trigger my-executor
45
+
46
+ # Trigger with data
47
+ tailor-sdk executor trigger my-executor -d '{"message": "hello"}'
48
+
49
+ # Trigger with data and headers
50
+ tailor-sdk executor trigger my-executor -d '{"message": "hello"}' -H "X-Custom: value" -H "X-Another: value2"
51
+
52
+ # Trigger and wait for completion
53
+ tailor-sdk executor trigger my-executor -W
54
+
55
+ # Trigger, wait, and show logs
56
+ tailor-sdk executor trigger my-executor -W -l
57
+ ```
58
+
59
+ ### executor jobs
60
+
61
+ List or get executor jobs.
62
+
63
+ ```bash
64
+ tailor-sdk executor jobs <executorName> [jobId] [options]
65
+ ```
66
+
67
+ **Arguments:**
68
+
69
+ - `executorName` - Executor name (required)
70
+ - `jobId` - Job ID (optional, if provided shows job details)
71
+
72
+ **Options:**
73
+
74
+ - `-s, --status` - Filter by status: `PENDING`, `RUNNING`, `SUCCESS`, `FAILED`, `CANCELED` (list mode only)
75
+ - `--limit` - Maximum number of jobs to list (default: `50`, max: `1000`) (list mode only)
76
+ - `--attempts` - Show job attempts (detail mode only)
77
+ - `-W, --wait` - Wait for job completion and downstream execution (detail mode only)
78
+ - `-i, --interval` - Polling interval when using --wait (default: `3s`)
79
+ - `-l, --logs` - Display function execution logs after completion (requires --wait)
80
+ - `-w, --workspace-id` - ID of the workspace
81
+ - `-p, --profile` - Workspace profile to use
82
+ - `-j, --json` - Output as JSON
83
+
84
+ **Usage Examples:**
85
+
86
+ ```bash
87
+ # List jobs for an executor (default: 50 jobs)
88
+ tailor-sdk executor jobs my-executor
89
+
90
+ # Limit the number of jobs
91
+ tailor-sdk executor jobs my-executor --limit 10
92
+
93
+ # Filter by status
94
+ tailor-sdk executor jobs my-executor -s RUNNING
95
+
96
+ # Get job details
97
+ tailor-sdk executor jobs my-executor <job-id>
98
+
99
+ # Get job details with attempts
100
+ tailor-sdk executor jobs my-executor <job-id> --attempts
101
+
102
+ # Wait for job to complete
103
+ tailor-sdk executor jobs my-executor <job-id> -W
104
+
105
+ # Wait for job with logs
106
+ tailor-sdk executor jobs my-executor <job-id> -W -l
107
+ ```
108
+
109
+ ## Downstream Execution Tracking
110
+
111
+ When using `--wait`, the CLI tracks not only the executor job but also any downstream executions:
112
+
113
+ - **Workflow targets**: Waits for the workflow execution to complete (SUCCESS, FAILED, or PENDING_RESUME). Shows real-time status changes and currently running job names during execution (same output as `workflow start --wait`).
114
+ - **Function targets**: Waits for the function execution to complete
115
+ - **Webhook/GraphQL targets**: Only waits for the executor job itself
116
+
117
+ The `--logs` option displays logs from the downstream execution when available.
@@ -152,6 +152,15 @@ Commands for managing workflows and executions.
152
152
  | [workflow executions](./cli/workflow.md#workflow-executions) | List or get executions |
153
153
  | [workflow resume](./cli/workflow.md#workflow-resume) | Resume a failed execution |
154
154
 
155
+ ### [Executor Commands](./cli/executor.md)
156
+
157
+ Commands for managing executors and executor jobs.
158
+
159
+ | Command | Description |
160
+ | ------------------------------------------------------ | ---------------------------- |
161
+ | [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually |
162
+ | [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs |
163
+
155
164
  ### [Secret Commands](./cli/secret.md)
156
165
 
157
166
  Commands for managing secrets and vaults.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.6.2",
3
+ "version": "1.7.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,5 +0,0 @@
1
- import "./chunk-CIV_ash9.mjs";
2
- import "./auth-0Zh4xp4z.mjs";
3
- import { t as defineApplication } from "./application-4cO5Zvfo.mjs";
4
-
5
- export { defineApplication };