@tailor-platform/sdk 0.16.3 → 0.18.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 +29 -0
- package/README.md +75 -8
- package/dist/cli/api.d.mts +35 -31
- package/dist/cli/api.mjs +2 -2
- package/dist/cli/api.mjs.map +1 -1
- package/dist/cli/index.mjs +51 -75
- package/dist/cli/index.mjs.map +1 -1
- package/dist/configure/index.d.mts +3 -3
- package/dist/{index-Bin7-j3v.d.mts → index-BWqIQ4iC.d.mts} +2 -2
- package/dist/job-CL8myeqs.mjs.map +1 -1
- package/dist/{resume-kyHIaNvK.mjs → resume-ChDChtAZ.mjs} +200 -137
- package/dist/{resume-kyHIaNvK.mjs.map → resume-ChDChtAZ.mjs.map} +1 -1
- package/dist/{types-Da_WnvA0.d.mts → types-DgaCdTug.d.mts} +21 -13
- package/dist/utils/test/index.d.mts +9 -3
- package/dist/utils/test/index.mjs +8 -6
- package/dist/utils/test/index.mjs.map +1 -1
- package/docs/cli/application.md +136 -0
- package/docs/cli/auth.md +110 -0
- package/docs/cli/secret.md +125 -0
- package/docs/cli/user.md +183 -0
- package/docs/cli/workflow.md +144 -0
- package/docs/cli/workspace.md +122 -0
- package/docs/cli-reference.md +80 -801
- package/docs/configuration.md +62 -32
- package/docs/generator/builtin.md +194 -0
- package/docs/generator/custom.md +150 -0
- package/docs/generator/index.md +56 -0
- package/docs/quickstart.md +9 -4
- package/docs/services/auth.md +244 -0
- package/docs/services/executor.md +304 -0
- package/docs/services/idp.md +106 -0
- package/docs/services/resolver.md +213 -0
- package/docs/services/secret.md +116 -0
- package/docs/services/staticwebsite.md +132 -0
- package/docs/services/tailordb.md +325 -0
- package/docs/services/workflow.md +176 -0
- package/docs/testing.md +3 -1
- package/package.json +9 -8
- package/docs/core-concepts.md +0 -609
package/docs/cli/user.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# User & Auth Commands
|
|
2
|
+
|
|
3
|
+
Commands for authentication and user management.
|
|
4
|
+
|
|
5
|
+
## login
|
|
6
|
+
|
|
7
|
+
Login to Tailor Platform.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
tailor-sdk login
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## logout
|
|
14
|
+
|
|
15
|
+
Logout from Tailor Platform.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
tailor-sdk logout
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## user
|
|
22
|
+
|
|
23
|
+
Manage Tailor Platform users.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
tailor-sdk user <subcommand> [options]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### user current
|
|
30
|
+
|
|
31
|
+
Show current user.
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
tailor-sdk user current [options]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### user list
|
|
38
|
+
|
|
39
|
+
List all users.
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
tailor-sdk user list [options]
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Options:**
|
|
46
|
+
|
|
47
|
+
- `--json` - Output as JSON
|
|
48
|
+
|
|
49
|
+
### user use
|
|
50
|
+
|
|
51
|
+
Set current user.
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
tailor-sdk user use <user>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Arguments:**
|
|
58
|
+
|
|
59
|
+
- `user` - User email (required)
|
|
60
|
+
|
|
61
|
+
### user pat
|
|
62
|
+
|
|
63
|
+
Manage personal access tokens.
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
tailor-sdk user pat <subcommand> [options]
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
When no subcommand is provided, defaults to `list`.
|
|
70
|
+
|
|
71
|
+
#### user pat list
|
|
72
|
+
|
|
73
|
+
List all personal access tokens.
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
tailor-sdk user pat list [options]
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Options:**
|
|
80
|
+
|
|
81
|
+
- `--json` - Output as JSON
|
|
82
|
+
|
|
83
|
+
**Output (default):**
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
token-name-1: read/write
|
|
87
|
+
token-name-2: read
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Output (`--json`):**
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
[
|
|
94
|
+
{ "name": "token-name-1", "scopes": ["read", "write"] },
|
|
95
|
+
{ "name": "token-name-2", "scopes": ["read"] }
|
|
96
|
+
]
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
#### user pat create
|
|
100
|
+
|
|
101
|
+
Create a new personal access token.
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
tailor-sdk user pat create <name> [options]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
**Arguments:**
|
|
108
|
+
|
|
109
|
+
- `name` - Token name (required)
|
|
110
|
+
|
|
111
|
+
**Options:**
|
|
112
|
+
|
|
113
|
+
- `-w, --write` - Grant write permission (default: read-only)
|
|
114
|
+
- `--json` - Output as JSON
|
|
115
|
+
|
|
116
|
+
**Output (default):**
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Personal access token created successfully.
|
|
120
|
+
|
|
121
|
+
name: token-name
|
|
122
|
+
scopes: read/write
|
|
123
|
+
token: tpp_xxxxxxxxxxxxx
|
|
124
|
+
|
|
125
|
+
Please save this token in a secure location. You won't be able to see it again.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Output (`--json`):**
|
|
129
|
+
|
|
130
|
+
```json
|
|
131
|
+
{ "name": "token-name", "scopes": ["read", "write"], "token": "eyJhbGc..." }
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### user pat delete
|
|
135
|
+
|
|
136
|
+
Delete a personal access token.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
tailor-sdk user pat delete <name>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Arguments:**
|
|
143
|
+
|
|
144
|
+
- `name` - Token name (required)
|
|
145
|
+
|
|
146
|
+
#### user pat update
|
|
147
|
+
|
|
148
|
+
Update a personal access token (delete and recreate).
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
tailor-sdk user pat update <name> [options]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**Arguments:**
|
|
155
|
+
|
|
156
|
+
- `name` - Token name (required)
|
|
157
|
+
|
|
158
|
+
**Options:**
|
|
159
|
+
|
|
160
|
+
- `-w, --write` - Grant write permission (if not specified, keeps read-only)
|
|
161
|
+
- `--json` - Output as JSON
|
|
162
|
+
|
|
163
|
+
**Output (default):**
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
Personal access token updated successfully.
|
|
167
|
+
|
|
168
|
+
name: token-name
|
|
169
|
+
scopes: read/write
|
|
170
|
+
token: tpp_xxxxxxxxxxxxx
|
|
171
|
+
|
|
172
|
+
Please save this token in a secure location. You won't be able to see it again.
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Output (`--json`):**
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"name": "token-name",
|
|
180
|
+
"scopes": ["read", "write"],
|
|
181
|
+
"token": "tpp_xxxxxxxxxxxxx"
|
|
182
|
+
}
|
|
183
|
+
```
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# Workflow Commands
|
|
2
|
+
|
|
3
|
+
Commands for managing workflows and workflow executions.
|
|
4
|
+
|
|
5
|
+
## workflow
|
|
6
|
+
|
|
7
|
+
Manage workflows and workflow executions.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
tailor-sdk workflow <subcommand> [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### workflow list
|
|
14
|
+
|
|
15
|
+
List all workflows in the workspace.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
tailor-sdk workflow list [options]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Options:**
|
|
22
|
+
|
|
23
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
24
|
+
- `-p, --profile` - Workspace profile to use
|
|
25
|
+
- `--json` - Output as JSON
|
|
26
|
+
|
|
27
|
+
### workflow get
|
|
28
|
+
|
|
29
|
+
Get workflow details.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
tailor-sdk workflow get <nameOrId> [options]
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Arguments:**
|
|
36
|
+
|
|
37
|
+
- `nameOrId` - Workflow name or ID (required)
|
|
38
|
+
|
|
39
|
+
**Options:**
|
|
40
|
+
|
|
41
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
42
|
+
- `-p, --profile` - Workspace profile to use
|
|
43
|
+
- `--json` - Output as JSON
|
|
44
|
+
|
|
45
|
+
### workflow start
|
|
46
|
+
|
|
47
|
+
Start a workflow execution.
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
tailor-sdk workflow start <nameOrId> [options]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Arguments:**
|
|
54
|
+
|
|
55
|
+
- `nameOrId` - Workflow name or ID (required)
|
|
56
|
+
|
|
57
|
+
**Options:**
|
|
58
|
+
|
|
59
|
+
- `-m, --machineuser` - Machine user name (required)
|
|
60
|
+
- `-g, --arg` - Workflow argument (JSON string)
|
|
61
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
62
|
+
- `-p, --profile` - Workspace profile to use
|
|
63
|
+
- `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
|
|
64
|
+
- `--wait` - Wait for execution to complete
|
|
65
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
66
|
+
- `--json` - Output as JSON
|
|
67
|
+
|
|
68
|
+
**Usage Examples:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Start a workflow
|
|
72
|
+
tailor-sdk workflow start my-workflow -m admin-machine-user
|
|
73
|
+
|
|
74
|
+
# Start with argument
|
|
75
|
+
tailor-sdk workflow start my-workflow -m admin -g '{"userId": "123"}'
|
|
76
|
+
|
|
77
|
+
# Start and wait for completion
|
|
78
|
+
tailor-sdk workflow start my-workflow -m admin --wait
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### workflow executions
|
|
82
|
+
|
|
83
|
+
List or get workflow executions.
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
tailor-sdk workflow executions [executionId] [options]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Arguments:**
|
|
90
|
+
|
|
91
|
+
- `executionId` - Execution ID (optional, if provided shows details)
|
|
92
|
+
|
|
93
|
+
**Options:**
|
|
94
|
+
|
|
95
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
96
|
+
- `-p, --profile` - Workspace profile to use
|
|
97
|
+
- `-n, --workflow-name` - Filter by workflow name (list mode only)
|
|
98
|
+
- `-s, --status` - Filter by status: `PENDING`, `PENDING_RESUME`, `RUNNING`, `SUCCESS`, `FAILED` (list mode only)
|
|
99
|
+
- `--wait` - Wait for execution to complete (detail mode only)
|
|
100
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
101
|
+
- `--logs` - Display job execution logs (detail mode only)
|
|
102
|
+
- `--json` - Output as JSON
|
|
103
|
+
|
|
104
|
+
**Usage Examples:**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# List all executions
|
|
108
|
+
tailor-sdk workflow executions
|
|
109
|
+
|
|
110
|
+
# Filter by workflow name
|
|
111
|
+
tailor-sdk workflow executions -n my-workflow
|
|
112
|
+
|
|
113
|
+
# Filter by status
|
|
114
|
+
tailor-sdk workflow executions -s RUNNING
|
|
115
|
+
|
|
116
|
+
# Get execution details
|
|
117
|
+
tailor-sdk workflow executions <execution-id>
|
|
118
|
+
|
|
119
|
+
# Get execution details with logs
|
|
120
|
+
tailor-sdk workflow executions <execution-id> --logs
|
|
121
|
+
|
|
122
|
+
# Wait for execution to complete
|
|
123
|
+
tailor-sdk workflow executions <execution-id> --wait
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### workflow resume
|
|
127
|
+
|
|
128
|
+
Resume a failed or pending workflow execution.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
tailor-sdk workflow resume <executionId> [options]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**Arguments:**
|
|
135
|
+
|
|
136
|
+
- `executionId` - Failed or pending execution ID (required)
|
|
137
|
+
|
|
138
|
+
**Options:**
|
|
139
|
+
|
|
140
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
141
|
+
- `-p, --profile` - Workspace profile to use
|
|
142
|
+
- `--wait` - Wait for execution to complete after resuming
|
|
143
|
+
- `--interval` - Polling interval when using --wait (default: `3s`)
|
|
144
|
+
- `--json` - Output as JSON
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Workspace Commands
|
|
2
|
+
|
|
3
|
+
Commands for managing workspaces and profiles.
|
|
4
|
+
|
|
5
|
+
## workspace
|
|
6
|
+
|
|
7
|
+
Manage Tailor Platform workspaces.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
tailor-sdk workspace <subcommand> [options]
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### workspace create
|
|
14
|
+
|
|
15
|
+
Create a new Tailor Platform workspace.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
tailor-sdk workspace create [options]
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Options:**
|
|
22
|
+
|
|
23
|
+
- `-n, --name` - Name of the workspace (required)
|
|
24
|
+
- `-r, --region` - Region of the workspace: `us-west` or `asia-northeast` (required)
|
|
25
|
+
- `-d, --delete-protection` - Enable delete protection for the workspace
|
|
26
|
+
- `-o, --organization-id` - Organization ID to associate the workspace with
|
|
27
|
+
- `-f, --folder-id` - Folder ID to associate the workspace with
|
|
28
|
+
- `--json` - Output as JSON
|
|
29
|
+
|
|
30
|
+
### workspace list
|
|
31
|
+
|
|
32
|
+
List all Tailor Platform workspaces.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
tailor-sdk workspace list [options]
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Options:**
|
|
39
|
+
|
|
40
|
+
- `--json` - Output as JSON
|
|
41
|
+
- `--limit <number>` - Maximum number of workspaces to list (positive integer)
|
|
42
|
+
|
|
43
|
+
### workspace delete
|
|
44
|
+
|
|
45
|
+
Delete a Tailor Platform workspace.
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
tailor-sdk workspace delete [options]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Options:**
|
|
52
|
+
|
|
53
|
+
- `-w, --workspace-id` - ID of the workspace to delete (required)
|
|
54
|
+
- `-y, --yes` - Skip confirmation prompt
|
|
55
|
+
|
|
56
|
+
## profile
|
|
57
|
+
|
|
58
|
+
Manage workspace profiles (user + workspace combinations).
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
tailor-sdk profile <subcommand> [options]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### profile create
|
|
65
|
+
|
|
66
|
+
Create a new profile.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
tailor-sdk profile create <name> [options]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Arguments:**
|
|
73
|
+
|
|
74
|
+
- `name` - Profile name (required)
|
|
75
|
+
|
|
76
|
+
**Options:**
|
|
77
|
+
|
|
78
|
+
- `-u, --user` - User email (required)
|
|
79
|
+
- `-w, --workspace-id` - Workspace ID (required)
|
|
80
|
+
- `--json` - Output as JSON
|
|
81
|
+
|
|
82
|
+
### profile list
|
|
83
|
+
|
|
84
|
+
List all profiles.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
tailor-sdk profile list [options]
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Options:**
|
|
91
|
+
|
|
92
|
+
- `--json` - Output as JSON
|
|
93
|
+
|
|
94
|
+
### profile update
|
|
95
|
+
|
|
96
|
+
Update profile properties.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
tailor-sdk profile update <name> [options]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
**Arguments:**
|
|
103
|
+
|
|
104
|
+
- `name` - Profile name (required)
|
|
105
|
+
|
|
106
|
+
**Options:**
|
|
107
|
+
|
|
108
|
+
- `-u, --user` - New user email
|
|
109
|
+
- `-w, --workspace-id` - New workspace ID
|
|
110
|
+
- `--json` - Output as JSON
|
|
111
|
+
|
|
112
|
+
### profile delete
|
|
113
|
+
|
|
114
|
+
Delete a profile.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
tailor-sdk profile delete <name>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Arguments:**
|
|
121
|
+
|
|
122
|
+
- `name` - Profile name (required)
|