@tailor-platform/sdk 0.16.0 → 0.16.1
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 +12 -0
- package/README.md +1 -0
- package/dist/cli/api.mjs +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/{resume-ar5nEitS.mjs → resume-DvbIclRU.mjs} +11 -4
- package/dist/{resume-ar5nEitS.mjs.map → resume-DvbIclRU.mjs.map} +1 -1
- package/docs/cli-reference.md +141 -0
- package/docs/core-concepts.md +13 -13
- package/package.json +6 -6
package/docs/cli-reference.md
CHANGED
|
@@ -564,6 +564,147 @@ Returns the OAuth2 client credentials with the following fields:
|
|
|
564
564
|
- `redirectUris` - Registered redirect URIs
|
|
565
565
|
- `createdAt` - Creation timestamp
|
|
566
566
|
|
|
567
|
+
### workflow
|
|
568
|
+
|
|
569
|
+
Manage workflows and workflow executions.
|
|
570
|
+
|
|
571
|
+
```bash
|
|
572
|
+
tailor-sdk workflow <subcommand> [options]
|
|
573
|
+
```
|
|
574
|
+
|
|
575
|
+
#### workflow list
|
|
576
|
+
|
|
577
|
+
List all workflows in the workspace.
|
|
578
|
+
|
|
579
|
+
```bash
|
|
580
|
+
tailor-sdk workflow list [options]
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
**Options:**
|
|
584
|
+
|
|
585
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
586
|
+
- `-p, --profile` - Workspace profile to use
|
|
587
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
588
|
+
|
|
589
|
+
#### workflow get
|
|
590
|
+
|
|
591
|
+
Get workflow details.
|
|
592
|
+
|
|
593
|
+
```bash
|
|
594
|
+
tailor-sdk workflow get <nameOrId> [options]
|
|
595
|
+
```
|
|
596
|
+
|
|
597
|
+
**Arguments:**
|
|
598
|
+
|
|
599
|
+
- `nameOrId` - Workflow name or ID (required)
|
|
600
|
+
|
|
601
|
+
**Options:**
|
|
602
|
+
|
|
603
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
604
|
+
- `-p, --profile` - Workspace profile to use
|
|
605
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
606
|
+
|
|
607
|
+
#### workflow start
|
|
608
|
+
|
|
609
|
+
Start a workflow execution.
|
|
610
|
+
|
|
611
|
+
```bash
|
|
612
|
+
tailor-sdk workflow start <nameOrId> [options]
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
**Arguments:**
|
|
616
|
+
|
|
617
|
+
- `nameOrId` - Workflow name or ID (required)
|
|
618
|
+
|
|
619
|
+
**Options:**
|
|
620
|
+
|
|
621
|
+
- `-m, --machineuser` - Machine user name (required)
|
|
622
|
+
- `-g, --arg` - Workflow argument (JSON string)
|
|
623
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
624
|
+
- `-p, --profile` - Workspace profile to use
|
|
625
|
+
- `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
|
|
626
|
+
- `--wait` - Wait for execution to complete
|
|
627
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
628
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
629
|
+
|
|
630
|
+
**Usage Examples:**
|
|
631
|
+
|
|
632
|
+
```bash
|
|
633
|
+
# Start a workflow
|
|
634
|
+
tailor-sdk workflow start my-workflow -m admin-machine-user
|
|
635
|
+
|
|
636
|
+
# Start with argument
|
|
637
|
+
tailor-sdk workflow start my-workflow -m admin -g '{"userId": "123"}'
|
|
638
|
+
|
|
639
|
+
# Start and wait for completion
|
|
640
|
+
tailor-sdk workflow start my-workflow -m admin --wait
|
|
641
|
+
```
|
|
642
|
+
|
|
643
|
+
#### workflow executions
|
|
644
|
+
|
|
645
|
+
List or get workflow executions.
|
|
646
|
+
|
|
647
|
+
```bash
|
|
648
|
+
tailor-sdk workflow executions [executionId] [options]
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
**Arguments:**
|
|
652
|
+
|
|
653
|
+
- `executionId` - Execution ID (optional, if provided shows details)
|
|
654
|
+
|
|
655
|
+
**Options:**
|
|
656
|
+
|
|
657
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
658
|
+
- `-p, --profile` - Workspace profile to use
|
|
659
|
+
- `-n, --workflow-name` - Filter by workflow name (list mode only)
|
|
660
|
+
- `-s, --status` - Filter by status: `PENDING`, `PENDING_RESUME`, `RUNNING`, `SUCCESS`, `FAILED` (list mode only)
|
|
661
|
+
- `--wait` - Wait for execution to complete (detail mode only)
|
|
662
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
663
|
+
- `--logs` - Display job execution logs (detail mode only)
|
|
664
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
665
|
+
|
|
666
|
+
**Usage Examples:**
|
|
667
|
+
|
|
668
|
+
```bash
|
|
669
|
+
# List all executions
|
|
670
|
+
tailor-sdk workflow executions
|
|
671
|
+
|
|
672
|
+
# Filter by workflow name
|
|
673
|
+
tailor-sdk workflow executions -n my-workflow
|
|
674
|
+
|
|
675
|
+
# Filter by status
|
|
676
|
+
tailor-sdk workflow executions -s RUNNING
|
|
677
|
+
|
|
678
|
+
# Get execution details
|
|
679
|
+
tailor-sdk workflow executions <execution-id>
|
|
680
|
+
|
|
681
|
+
# Get execution details with logs
|
|
682
|
+
tailor-sdk workflow executions <execution-id> --logs
|
|
683
|
+
|
|
684
|
+
# Wait for execution to complete
|
|
685
|
+
tailor-sdk workflow executions <execution-id> --wait
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
#### workflow resume
|
|
689
|
+
|
|
690
|
+
Resume a failed or pending workflow execution.
|
|
691
|
+
|
|
692
|
+
```bash
|
|
693
|
+
tailor-sdk workflow resume <executionId> [options]
|
|
694
|
+
```
|
|
695
|
+
|
|
696
|
+
**Arguments:**
|
|
697
|
+
|
|
698
|
+
- `executionId` - Failed or pending execution ID (required)
|
|
699
|
+
|
|
700
|
+
**Options:**
|
|
701
|
+
|
|
702
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
703
|
+
- `-p, --profile` - Workspace profile to use
|
|
704
|
+
- `--wait` - Wait for execution to complete after resuming
|
|
705
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
706
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
707
|
+
|
|
567
708
|
### secret
|
|
568
709
|
|
|
569
710
|
Manage Secret Manager vaults and secrets.
|
package/docs/core-concepts.md
CHANGED
|
@@ -8,18 +8,18 @@ Define TailorDB Types in files matching glob patterns specified in `tailor.confi
|
|
|
8
8
|
|
|
9
9
|
Define TailorDB Fields using methods like `db.string()`, `db.int()`, etc. All TailorDB Field types are supported:
|
|
10
10
|
|
|
11
|
-
| Method | TailorDB | TypeScript
|
|
12
|
-
| --------------- | -------- |
|
|
13
|
-
| `db.string()` | String | string
|
|
14
|
-
| `db.int()` | Integer | number
|
|
15
|
-
| `db.float()` | Float | number
|
|
16
|
-
| `db.bool()` | Boolean | boolean
|
|
17
|
-
| `db.date()` | Date | string
|
|
18
|
-
| `db.datetime()` | DateTime | string
|
|
19
|
-
| `db.time()` | Time | string
|
|
20
|
-
| `db.uuid()` | UUID | string
|
|
21
|
-
| `db.enum()` | Enum | string
|
|
22
|
-
| `db.object()` | Nested | object
|
|
11
|
+
| Method | TailorDB | TypeScript |
|
|
12
|
+
| --------------- | -------- | -------------- |
|
|
13
|
+
| `db.string()` | String | string |
|
|
14
|
+
| `db.int()` | Integer | number |
|
|
15
|
+
| `db.float()` | Float | number |
|
|
16
|
+
| `db.bool()` | Boolean | boolean |
|
|
17
|
+
| `db.date()` | Date | string |
|
|
18
|
+
| `db.datetime()` | DateTime | string \| Date |
|
|
19
|
+
| `db.time()` | Time | string |
|
|
20
|
+
| `db.uuid()` | UUID | string |
|
|
21
|
+
| `db.enum()` | Enum | string |
|
|
22
|
+
| `db.object()` | Nested | object |
|
|
23
23
|
|
|
24
24
|
**Enum fields** - specify allowed values as arguments:
|
|
25
25
|
|
|
@@ -438,7 +438,7 @@ createExecutor({
|
|
|
438
438
|
"Content-Type": "application/json",
|
|
439
439
|
"X-API-Key": { vault: "api-keys", key: "external-api" },
|
|
440
440
|
},
|
|
441
|
-
|
|
441
|
+
requestBody: ({ newRecord }) => ({
|
|
442
442
|
id: newRecord.id,
|
|
443
443
|
timestamp: new Date(),
|
|
444
444
|
data: newRecord,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/configure/index.mjs",
|
|
@@ -55,23 +55,23 @@
|
|
|
55
55
|
"madge": "8.0.0",
|
|
56
56
|
"multiline-ts": "4.0.1",
|
|
57
57
|
"open": "10.2.0",
|
|
58
|
-
"ora": "
|
|
58
|
+
"ora": "9.0.0",
|
|
59
59
|
"oxc-parser": "0.98.0",
|
|
60
60
|
"pkg-types": "2.3.0",
|
|
61
61
|
"rolldown": "1.0.0-beta.41",
|
|
62
62
|
"table": "6.9.0",
|
|
63
63
|
"ts-cron-validator": "1.1.5",
|
|
64
64
|
"tsx": "4.21.0",
|
|
65
|
-
"type-fest": "5.
|
|
65
|
+
"type-fest": "5.3.1",
|
|
66
66
|
"uuid": "13.0.0",
|
|
67
67
|
"xdg-basedir": "5.1.0",
|
|
68
68
|
"zod": "4.1.13"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@eslint/js": "9.39.1",
|
|
72
|
-
"@tailor-platform/function-types": "0.
|
|
72
|
+
"@tailor-platform/function-types": "0.8.0",
|
|
73
73
|
"@types/madge": "5.0.3",
|
|
74
|
-
"@types/node": "22.19.
|
|
74
|
+
"@types/node": "22.19.2",
|
|
75
75
|
"cross-env": "10.1.0",
|
|
76
76
|
"eslint": "9.39.1",
|
|
77
77
|
"eslint-plugin-jsdoc": "61.4.1",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"sonda": "0.10.1",
|
|
80
80
|
"tsdown": "0.15.6",
|
|
81
81
|
"typescript": "5.9.3",
|
|
82
|
-
"typescript-eslint": "8.
|
|
82
|
+
"typescript-eslint": "8.49.0",
|
|
83
83
|
"vitest": "4.0.14"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|