Skip to content

Commit c5faafa

Browse files
Update SDK pages
1 parent 870915a commit c5faafa

10 files changed

Lines changed: 207 additions & 40 deletions

File tree

docs/sdk/cli-reference.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ Workspace ID resolution follows this priority order:
9595

9696
Commands for managing Tailor Platform applications (work with `tailor.config.ts`).
9797

98-
| Command | Description |
99-
| ----------------------------------------- | ------------------------------------------------------------------- |
100-
| [init](cli/application.md#init) | Initialize a new project using create-sdk. |
101-
| [generate](cli/application.md#generate) | Generate files using Tailor configuration. |
102-
| [apply](cli/application.md#apply) | Apply Tailor configuration to deploy your application. |
103-
| [remove](cli/application.md#remove) | Remove all resources managed by the application from the workspace. |
104-
| [show](cli/application.md#show) | Show information about the deployed application. |
105-
| [open](cli/application.md#open) | Open Tailor Platform Console. |
106-
| [api](cli/application.md#api) | Call Tailor Platform API endpoints directly. |
98+
| Command | Description |
99+
| ----------------------------------------------- | ------------------------------------------------------------------- |
100+
| [init](cli/application.md#init) | Initialize a new project using create-sdk. |
101+
| [generate](cli/application.md#generate) | Generate files using Tailor configuration. |
102+
| [apply](cli/application.md#apply) | Apply Tailor configuration to deploy your application. |
103+
| [remove](cli/application.md#remove) | Remove all resources managed by the application from the workspace. |
104+
| [show](cli/application.md#show) | Show information about the deployed application. |
105+
| [open](cli/application.md#open) | Open Tailor Platform Console. |
106+
| [api list](cli/application.md#api-list) | List all invocable OperatorService methods. |
107+
| [api inspect](cli/application.md#api-inspect) | Print the input message tree of an OperatorService endpoint. |
107108

108109
### [TailorDB Commands](cli/tailordb)
109110

docs/sdk/cli/application.md

Lines changed: 130 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ Call Tailor Platform API endpoints directly.
311311
**Usage**
312312

313313
```
314-
tailor-sdk api [options] <endpoint>
314+
tailor-sdk api [options] [command] <endpoint>
315315
```
316316

317317
<!-- politty:command:api:usage:end -->
@@ -320,9 +320,9 @@ tailor-sdk api [options] <endpoint>
320320

321321
**Arguments**
322322

323-
| Argument | Description | Required |
324-
| ---------- | ------------------------------------------------------------------------------------------- | -------- |
325-
| `endpoint` | API endpoint to call (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication') | Yes |
323+
| Argument | Description | Required |
324+
| ---------- | -------------------------------------------------------------------------------------------- | -------- |
325+
| `endpoint` | API endpoint to call (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication'). | Yes |
326326

327327
<!-- politty:command:api:arguments:end -->
328328

@@ -335,7 +335,7 @@ tailor-sdk api [options] <endpoint>
335335
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
336336
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
337337
| `--config <CONFIG>` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
338-
| `--body <BODY>` | `-b` | Request body as JSON | No | `"{}"` | - |
338+
| `--body <BODY>` | `-b` | Request body as JSON. | No | `"{}"` | - |
339339

340340
<!-- politty:command:api:options:end -->
341341

@@ -345,10 +345,36 @@ See [Global Options](../cli-reference.md#global-options) for options available t
345345

346346
<!-- politty:command:api:global-options-link:end -->
347347

348+
<!-- politty:command:api:examples:start -->
349+
350+
**Examples**
351+
352+
**Call an endpoint; workspaceId is auto-injected.**
353+
354+
```bash
355+
$ tailor-sdk api GetApplication -b '{"applicationName":"app-1"}'
356+
```
357+
358+
**List all invocable OperatorService methods.**
359+
360+
```bash
361+
$ tailor-sdk api list
362+
```
363+
364+
**Show the input message tree for an endpoint.**
365+
366+
```bash
367+
$ tailor-sdk api inspect GetApplication
368+
```
369+
370+
<!-- politty:command:api:examples:end -->
371+
348372
<!-- politty:command:api:notes:start -->
349373

350374
**Notes**
351375

376+
Use `tailor-sdk api list` to enumerate invocable methods and `tailor-sdk api inspect <endpoint>` to print an endpoint's input message tree (combine with `--json` for machine-readable output).
377+
352378
The request body is inferred from the proto definition of the target endpoint, and commonly required fields are auto-injected so they can be omitted from `--body`:
353379

354380
- `workspaceId` — resolved from `-w` / `TAILOR_PLATFORM_WORKSPACE_ID` / the selected profile.
@@ -359,3 +385,102 @@ The request body is inferred from the proto definition of the target endpoint, a
359385
Values already present in `--body` are never overridden. If a value cannot be resolved (e.g. no config found), injection is silently skipped and the server-side validation error takes precedence.
360386

361387
<!-- politty:command:api:notes:end -->
388+
<!-- politty:command:api inspect:heading:start -->
389+
390+
### api inspect
391+
392+
<!-- politty:command:api inspect:heading:end -->
393+
394+
<!-- politty:command:api inspect:description:start -->
395+
396+
Print the input message tree of an OperatorService endpoint.
397+
398+
<!-- politty:command:api inspect:description:end -->
399+
400+
<!-- politty:command:api inspect:usage:start -->
401+
402+
**Usage**
403+
404+
```
405+
tailor-sdk api inspect <endpoint>
406+
```
407+
408+
<!-- politty:command:api inspect:usage:end -->
409+
410+
<!-- politty:command:api inspect:arguments:start -->
411+
412+
**Arguments**
413+
414+
| Argument | Description | Required |
415+
| ---------- | ----------------------------------------------------------------------------------------------- | -------- |
416+
| `endpoint` | API endpoint to inspect (e.g., 'GetApplication' or 'tailor.v1.OperatorService/GetApplication'). | Yes |
417+
418+
<!-- politty:command:api inspect:arguments:end -->
419+
420+
<!-- politty:command:api inspect:global-options-link:start -->
421+
422+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
423+
424+
<!-- politty:command:api inspect:global-options-link:end -->
425+
426+
<!-- politty:command:api inspect:examples:start -->
427+
428+
**Examples**
429+
430+
**Show fields of GetApplicationRequest.**
431+
432+
```bash
433+
$ tailor-sdk api inspect GetApplication
434+
```
435+
436+
**Inspect a deeply nested input with `(oneof config)` annotations.**
437+
438+
```bash
439+
$ tailor-sdk api inspect CreateExecutorExecutor
440+
```
441+
442+
<!-- politty:command:api inspect:examples:end -->
443+
444+
<!-- politty:command:api inspect:notes:start -->
445+
446+
**Notes**
447+
448+
Combine with the global `--json` flag for a machine-readable descriptor. Recursive type references and `oneof` membership are annotated. Use `tailor-sdk api list` to discover endpoint names.
449+
450+
<!-- politty:command:api inspect:notes:end -->
451+
452+
<!-- politty:command:api list:heading:start -->
453+
454+
### api list
455+
456+
<!-- politty:command:api list:heading:end -->
457+
458+
<!-- politty:command:api list:description:start -->
459+
460+
List all invocable OperatorService methods.
461+
462+
<!-- politty:command:api list:description:end -->
463+
464+
<!-- politty:command:api list:usage:start -->
465+
466+
**Usage**
467+
468+
```
469+
tailor-sdk api list
470+
```
471+
472+
<!-- politty:command:api list:usage:end -->
473+
474+
<!-- politty:command:api list:global-options-link:start -->
475+
476+
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
477+
478+
<!-- politty:command:api list:global-options-link:end -->
479+
480+
<!-- politty:command:api list:notes:start -->
481+
482+
**Notes**
483+
484+
Only unary RPCs are listed; streaming methods are excluded because `tailor-sdk api run` issues a single JSON POST and reads one JSON response.
485+
486+
<!-- politty:command:api list:notes:end -->

docs/sdk/cli/crash-report.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,22 @@ List local crash report files.
5757
**Usage**
5858

5959
```
60-
tailor-sdk crash-report list
60+
tailor-sdk crash-report list [options]
6161
```
6262

6363
<!-- politty:command:crash-report list:usage:end -->
6464

65+
<!-- politty:command:crash-report list:options:start -->
66+
67+
**Options**
68+
69+
| Option | Alias | Description | Required | Default |
70+
| ----------------- | ----- | -------------------------------------------------------- | -------- | -------- |
71+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` |
72+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - |
73+
74+
<!-- politty:command:crash-report list:options:end -->
75+
6576
<!-- politty:command:crash-report list:global-options-link:start -->
6677

6778
See [Global Options](../cli-reference.md#global-options) for options available to all commands.

docs/sdk/cli/executor.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,12 @@ tailor-sdk executor webhook list [options]
414414

415415
**Options**
416416

417-
| Option | Alias | Description | Required | Default | Env |
418-
| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ |
419-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
420-
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
417+
| Option | Alias | Description | Required | Default | Env |
418+
| ------------------------------- | ----- | -------------------------------------------------------- | -------- | -------- | ------------------------------ |
419+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
420+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
421+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
422+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - | - |
421423

422424
<!-- politty:command:executor webhook list:options:end -->
423425

docs/sdk/cli/organization.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,12 @@ tailor-sdk organization folder list [options]
222222

223223
**Options**
224224

225-
| Option | Alias | Description | Required | Default | Env |
226-
| --------------------------------------- | ----- | ------------------------------------ | -------- | ------- | --------------------------------- |
227-
| `--organization-id <ORGANIZATION_ID>` | `-o` | Organization ID | Yes | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
228-
| `--parent-folder-id <PARENT_FOLDER_ID>` | - | Parent folder ID to list children of | No | - | - |
229-
| `--limit <LIMIT>` | `-l` | Maximum number of folders to list | No | - | - |
225+
| Option | Alias | Description | Required | Default | Env |
226+
| --------------------------------------- | ----- | -------------------------------------------------------- | -------- | -------- | --------------------------------- |
227+
| `--organization-id <ORGANIZATION_ID>` | `-o` | Organization ID | Yes | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
228+
| `--parent-folder-id <PARENT_FOLDER_ID>` | - | Parent folder ID to list children of | No | - | - |
229+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
230+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - | - |
230231

231232
<!-- politty:command:organization folder list:options:end -->
232233

docs/sdk/cli/workspace.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ tailor-sdk workspace list [options]
114114

115115
**Options**
116116

117-
| Option | Alias | Description | Required | Default |
118-
| ----------------- | ----- | ------------------------------------ | -------- | ------- |
119-
| `--limit <LIMIT>` | `-l` | Maximum number of workspaces to list | No | - |
117+
| Option | Alias | Description | Required | Default |
118+
| ----------------- | ----- | -------------------------------------------------------- | -------- | -------- |
119+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` |
120+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - |
120121

121122
<!-- politty:command:workspace list:options:end -->
122123

@@ -472,11 +473,12 @@ tailor-sdk workspace app list [options]
472473

473474
**Options**
474475

475-
| Option | Alias | Description | Required | Default | Env |
476-
| ------------------------------- | ----- | -------------------------------------- | -------- | ------- | ------------------------------ |
477-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
478-
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
479-
| `--limit <LIMIT>` | `-l` | Maximum number of applications to list | No | - | - |
476+
| Option | Alias | Description | Required | Default | Env |
477+
| ------------------------------- | ----- | -------------------------------------------------------- | -------- | -------- | ------------------------------ |
478+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
479+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
480+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
481+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - | - |
480482

481483
<!-- politty:command:workspace app list:options:end -->
482484

@@ -672,11 +674,12 @@ tailor-sdk workspace user list [options]
672674

673675
**Options**
674676

675-
| Option | Alias | Description | Required | Default | Env |
676-
| ------------------------------- | ----- | ------------------------------- | -------- | ------- | ------------------------------ |
677-
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
678-
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
679-
| `--limit <LIMIT>` | `-l` | Maximum number of users to list | No | - | - |
677+
| Option | Alias | Description | Required | Default | Env |
678+
| ------------------------------- | ----- | -------------------------------------------------------- | -------- | -------- | ------------------------------ |
679+
| `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
680+
| `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
681+
| `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
682+
| `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - | - |
680683

681684
<!-- politty:command:workspace user list:options:end -->
682685

docs/sdk/services/executor.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Fire when IdP users are created, updated, or deleted:
130130
idpUserCreatedTrigger();
131131
```
132132

133+
These triggers require the IdP to publish user lifecycle events. The SDK enables `publishUserEvents` on the IdP automatically during `apply` when any executor uses an `idpUser` trigger; set the value explicitly on `defineIdp()` to override. See [IdP service - publishUserEvents](idp.md#publishuserevents).
134+
133135
### Auth Access Token Triggers
134136

135137
Fire on auth access token lifecycle events:
@@ -203,6 +205,8 @@ createExecutor({
203205
});
204206
```
205207

208+
`function` and `jobFunction` `body` args include an `invoker` field: the principal running this function, overridden by `authInvoker` when set; `null` for anonymous calls. Other operation kinds (`graphql`, `webhook`, `workflow`) do not pass `invoker` into their callbacks.
209+
206210
### Job Function Operation
207211

208212
For long-running operations, use `jobFunction` which runs asynchronously and supports extended execution times. See [Job Function Operation](/guides/executor/job-function-operation) for details.

docs/sdk/services/idp.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,22 @@ defineIdp("my-idp", {
164164

165165
**Validation:** Each field must be 200 characters or less and must not contain newline characters.
166166

167+
### publishUserEvents
168+
169+
Publish IdP user lifecycle events (`idp.user.created`, `idp.user.updated`, `idp.user.deleted`). These events are consumed by executors that use `idpUserCreatedTrigger`, `idpUserUpdatedTrigger`, `idpUserDeletedTrigger`, or `idpUserTrigger`.
170+
171+
```typescript
172+
defineIdp("my-idp", {
173+
clients: ["my-client"],
174+
publishUserEvents: true,
175+
});
176+
```
177+
178+
**Auto-configuration:** When `publishUserEvents` is omitted, the SDK enables it automatically during `apply` if the project defines any executor with an `idpUser` trigger. Set the value explicitly to override:
179+
180+
- `publishUserEvents: true`: always publish events.
181+
- `publishUserEvents: false`: never publish events. The SDK warns when executors with `idpUser` triggers are present, since those executors will not fire for this IdP.
182+
167183
## Using idp.provider()
168184

169185
The `idp.provider()` method creates a type-safe reference to the IdP for use in Auth configuration. The client name is validated at compile time against the clients defined in the IdP.

0 commit comments

Comments
 (0)