diff --git a/docs/sdk/cli-reference.md b/docs/sdk/cli-reference.md index 47f20d8..27f7975 100644 --- a/docs/sdk/cli-reference.md +++ b/docs/sdk/cli-reference.md @@ -1,6 +1,6 @@ -# CLI Reference +# tailor-sdk -The Tailor Platform SDK provides a command-line interface for managing projects and workspaces. +Tailor Platform SDK - The SDK to work with Tailor Platform ## Usage @@ -8,20 +8,30 @@ The Tailor Platform SDK provides a command-line interface for managing projects tailor-sdk [options] ``` +## Global Options + + + + +| Option | Alias | Description | Required | Default | +|--------|-------|-------------|----------|---------| +| `--env-file ` | `-e` | Path to the environment file (error if not found) | No | - | +| `--env-file-if-exists ` | - | Path to the environment file (ignored if not found) | No | - | +| `--verbose` | - | Enable verbose logging | No | `false` | +| `--json` | `-j` | Output as JSON | No | `false` | + + + ## Common Options The following options are available for most commands: -| Option | Short | Description | -| ---------------------- | ----- | --------------------------------------------------- | -| `--env-file` | `-e` | Path to environment file (error if not found) | -| `--env-file-if-exists` | | Path to environment file (ignored if not found) | -| `--verbose` | | Enable verbose logging (show stack traces on error) | -| `--json` | `-j` | Output as JSON (where applicable) | -| `--workspace-id` | `-w` | Workspace ID (for deployment commands) | -| `--profile` | `-p` | Workspace profile | -| `--config` | `-c` | Path to SDK config file | -| `--yes` | `-y` | Skip confirmation prompts | +| Option | Short | Description | +| ---------------- | ----- | -------------------------------------- | +| `--workspace-id` | `-w` | Workspace ID (for deployment commands) | +| `--profile` | `-p` | Workspace profile | +| `--config` | `-c` | Path to SDK config file | +| `--yes` | `-y` | Skip confirmation prompts | ### Environment File Loading @@ -43,14 +53,14 @@ tailor-sdk apply --env-file .env --env-file .env.production You can use environment variables to configure workspace and authentication: -| Variable | Description | -| --------------------------------- | ------------------------------------------------------------ | -| `TAILOR_PLATFORM_WORKSPACE_ID` | Workspace ID for deployment commands | -| `TAILOR_PLATFORM_TOKEN` | Authentication token (alternative to `login`) | -| `TAILOR_TOKEN` | **Deprecated.** Use `TAILOR_PLATFORM_TOKEN` instead | -| `TAILOR_PLATFORM_PROFILE` | Workspace profile name | -| `TAILOR_PLATFORM_SDK_CONFIG_PATH` | Path to SDK config file | -| `EDITOR` | Editor to open generated files (e.g., `vim`, `code`, `nano`) | +| Variable | Description | +| --------------------------------- | --------------------------------------------------------------------------- | +| `TAILOR_PLATFORM_WORKSPACE_ID` | Workspace ID for deployment commands | +| `TAILOR_PLATFORM_TOKEN` | Authentication token (alternative to `login`) | +| `TAILOR_TOKEN` | **Deprecated.** Use `TAILOR_PLATFORM_TOKEN` instead | +| `TAILOR_PLATFORM_PROFILE` | Workspace profile name | +| `TAILOR_PLATFORM_SDK_CONFIG_PATH` | Path to SDK config file | +| `VISUAL` / `EDITOR` | Preferred editor for commands that open files (e.g., `vim`, `code`, `nano`) | ### Authentication Token Priority diff --git a/docs/sdk/cli/application.md b/docs/sdk/cli/application.md index da60ace..cc38860 100644 --- a/docs/sdk/cli/application.md +++ b/docs/sdk/cli/application.md @@ -44,6 +44,12 @@ tailor-sdk init [options] [name] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## generate @@ -77,6 +83,12 @@ tailor-sdk generate [options] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## apply @@ -103,19 +115,25 @@ tailor-sdk apply [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | -| `--dry-run` | `-d` | Run the command without making any changes | No | - | -| `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | -| `--no-cache` | - | Disable bundle caching for this run | No | - | -| `--clean-cache` | - | Clean the bundle cache before building | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | +| `--dry-run` | `-d` | Run the command without making any changes | No | - | - | +| `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - | +| `--no-cache` | - | Disable bundle caching for this run | No | - | - | +| `--clean-cache` | - | Clean the bundle cache before building | No | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Migration Handling:** When migrations are configured (`db.tailordb.migration` in config), the `apply` command automatically: @@ -164,15 +182,21 @@ tailor-sdk remove [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## show @@ -199,15 +223,20 @@ tailor-sdk show [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## open @@ -234,14 +263,20 @@ tailor-sdk open [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## api @@ -278,11 +313,16 @@ tailor-sdk api [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--body ` | `-b` | Request body as JSON | No | `"{}"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--body ` | `-b` | Request body as JSON | No | `"{}"` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/cli/auth.md b/docs/sdk/cli/auth.md index 8b9ad8f..1e03030 100644 --- a/docs/sdk/cli/auth.md +++ b/docs/sdk/cli/auth.md @@ -34,6 +34,12 @@ tailor-sdk machineuser [command] | [`machineuser token`](#machineuser-token) | Get an access token for a machine user. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### machineuser list @@ -60,14 +66,19 @@ tailor-sdk machineuser list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### machineuser token @@ -104,14 +115,19 @@ tailor-sdk machineuser token [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ## oauth2client @@ -144,6 +160,12 @@ tailor-sdk oauth2client [command] | [`oauth2client list`](#oauth2client-list) | List all OAuth2 clients in the application. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### oauth2client list @@ -170,14 +192,19 @@ tailor-sdk oauth2client list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### oauth2client get @@ -214,15 +241,20 @@ tailor-sdk oauth2client get [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Output:** Returns a list of OAuth2 clients with the following fields: diff --git a/docs/sdk/cli/completion.md b/docs/sdk/cli/completion.md index f92341f..e108565 100644 --- a/docs/sdk/cli/completion.md +++ b/docs/sdk/cli/completion.md @@ -41,3 +41,9 @@ tailor-sdk completion [options] [shell] | `--instructions` | `-i` | Show installation instructions | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/cli/executor.md b/docs/sdk/cli/executor.md index 269e351..e3a6e2d 100644 --- a/docs/sdk/cli/executor.md +++ b/docs/sdk/cli/executor.md @@ -38,6 +38,12 @@ tailor-sdk executor [command] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### executor list @@ -64,14 +70,19 @@ tailor-sdk executor list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### executor get @@ -108,14 +119,19 @@ tailor-sdk executor get [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### executor jobs @@ -153,17 +169,16 @@ tailor-sdk executor jobs [options] [jobId] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------------------------------------------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--status ` | `-s` | Filter by status (PENDING, RUNNING, SUCCESS, FAILED, CANCELED) (list mode only) | No | - | -| `--attempts` | - | Show job attempts (only with job ID) (detail mode only) | No | `false` | -| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable (detail mode only) | No | `false` | -| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | -| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | -| `--limit ` | - | Maximum number of jobs to list (default: 50, max: 1000) (list mode only) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------------------------------------------------------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--status ` | `-s` | Filter by status (PENDING, RUNNING, SUCCESS, FAILED, CANCELED) (list mode only) | No | - | - | +| `--attempts` | - | Show job attempts (only with job ID) (detail mode only) | No | `false` | - | +| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable (detail mode only) | No | `false` | - | +| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - | +| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - | +| `--limit ` | - | Maximum number of jobs to list (default: 50, max: 1000) (list mode only) | No | - | - | @@ -215,6 +230,12 @@ $ tailor-sdk executor jobs my-executor -W -l + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### executor trigger @@ -251,16 +272,15 @@ tailor-sdk executor trigger [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ---------------------------------------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--data ` | `-d` | Request body (JSON string) | No | - | -| `--header
` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | No | - | -| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | No | `false` | -| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | -| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ---------------------------------------------------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--data ` | `-d` | Request body (JSON string) | No | - | - | +| `--header
` | `-H` | Request header (format: 'Key: Value', can be specified multiple times) | No | - | - | +| `--wait` | `-W` | Wait for job completion and downstream execution (workflow/function) if applicable | No | `false` | - | +| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - | +| `--logs` | `-l` | Display function execution logs after completion (requires --wait) | No | `false` | - | @@ -321,6 +341,12 @@ The `--logs` option displays logs from the downstream execution when available. + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### executor webhook @@ -353,6 +379,12 @@ tailor-sdk executor webhook [command] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### executor webhook list @@ -379,10 +411,15 @@ tailor-sdk executor webhook list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/cli/function.md b/docs/sdk/cli/function.md index fd69d71..60dbbfc 100644 --- a/docs/sdk/cli/function.md +++ b/docs/sdk/cli/function.md @@ -34,6 +34,12 @@ tailor-sdk function [command] | [`function test-run`](#function-test-run) | Run a function on the Tailor Platform server without deploying. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### function logs @@ -70,14 +76,19 @@ tailor-sdk function logs [options] [executionId] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Usage Examples:** ```bash @@ -124,15 +135,14 @@ tailor-sdk function test-run [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------------------------------------------------------ | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--name ` | `-n` | Workflow job name to run (matches the `name` field of createWorkflowJob) | No | - | -| `--arg ` | `-a` | JSON argument to pass to the function | No | - | -| `--machine-user ` | `-m` | Machine user name for authentication | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------------------------------------------------------ | -------- | -------------------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--name ` | `-n` | Workflow job name to run (matches the `name` field of createWorkflowJob) | No | - | - | +| `--arg ` | `-a` | JSON argument to pass to the function | No | - | - | +| `--machine-user ` | `-m` | Machine user name for authentication | No | - | - | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | - | @@ -170,3 +180,9 @@ When a `.js` file is provided, detection and bundling are skipped and the file i > Triggered jobs are not executed; only the target job's `body` function runs in isolation. + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/cli/secret.md b/docs/sdk/cli/secret.md index 7612160..c97e3a1 100644 --- a/docs/sdk/cli/secret.md +++ b/docs/sdk/cli/secret.md @@ -37,6 +37,12 @@ tailor-sdk secret [command] | [`secret vault`](#secret-vault) | Manage Secret Manager vaults. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### secret vault @@ -70,6 +76,12 @@ tailor-sdk secret vault [command] | [`secret vault list`](#secret-vault-list) | List all Secret Manager vaults in the workspace. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### secret vault create @@ -106,12 +118,18 @@ tailor-sdk secret vault create [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### secret vault delete @@ -148,13 +166,19 @@ tailor-sdk secret vault delete [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### secret vault list @@ -181,13 +205,18 @@ tailor-sdk secret vault list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### secret create @@ -214,15 +243,21 @@ tailor-sdk secret create [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--vault-name ` | `-V` | Vault name | Yes | - | -| `--name ` | `-n` | Secret name | Yes | - | -| `--value ` | `-v` | Secret value | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--vault-name ` | `-V` | Vault name | Yes | - | - | +| `--name ` | `-n` | Secret name | Yes | - | - | +| `--value ` | `-v` | Secret value | Yes | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### secret update @@ -249,15 +284,21 @@ tailor-sdk secret update [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--vault-name ` | `-V` | Vault name | Yes | - | -| `--name ` | `-n` | Secret name | Yes | - | -| `--value ` | `-v` | Secret value | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--vault-name ` | `-V` | Vault name | Yes | - | - | +| `--name ` | `-n` | Secret name | Yes | - | - | +| `--value ` | `-v` | Secret value | Yes | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### secret list @@ -284,14 +325,19 @@ tailor-sdk secret list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--vault-name ` | `-V` | Vault name | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--vault-name ` | `-V` | Vault name | Yes | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### secret delete @@ -318,12 +364,18 @@ tailor-sdk secret delete [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--vault-name ` | `-V` | Vault name | Yes | - | -| `--name ` | `-n` | Secret name | Yes | - | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--vault-name ` | `-V` | Vault name | Yes | - | - | +| `--name ` | `-n` | Secret name | Yes | - | - | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/cli/staticwebsite.md b/docs/sdk/cli/staticwebsite.md index 471d0db..2860d1a 100644 --- a/docs/sdk/cli/staticwebsite.md +++ b/docs/sdk/cli/staticwebsite.md @@ -35,6 +35,12 @@ tailor-sdk staticwebsite [command] | [`staticwebsite list`](#staticwebsite-list) | List all static websites in a workspace. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### staticwebsite deploy @@ -61,15 +67,20 @@ tailor-sdk staticwebsite deploy [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--name ` | `-n` | Static website name | Yes | - | -| `--dir ` | `-d` | Path to the static website files | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--name ` | `-n` | Static website name | Yes | - | - | +| `--dir ` | `-d` | Path to the static website files | Yes | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### staticwebsite list @@ -96,13 +107,18 @@ tailor-sdk staticwebsite list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### staticwebsite get @@ -139,14 +155,19 @@ tailor-sdk staticwebsite get [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Example:** ```bash diff --git a/docs/sdk/cli/tailordb.md b/docs/sdk/cli/tailordb.md index 95a8d66..af62ec7 100644 --- a/docs/sdk/cli/tailordb.md +++ b/docs/sdk/cli/tailordb.md @@ -35,6 +35,12 @@ tailor-sdk tailordb [command] | [`tailordb truncate`](#tailordb-truncate) | Truncate (delete all records from) TailorDB tables. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### tailordb truncate @@ -71,16 +77,22 @@ tailor-sdk tailordb truncate [options] [types] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------------------------ | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | -| `--all` | `-a` | Truncate all tables in all namespaces | No | `false` | -| `--namespace ` | `-n` | Truncate all tables in specified namespace | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------------------------ | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | +| `--all` | `-a` | Truncate all tables in all namespaces | No | `false` | - | +| `--namespace ` | `-n` | Truncate all tables in specified namespace | No | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### tailordb migration @@ -114,6 +126,12 @@ tailor-sdk tailordb migration [command] | [`tailordb migration status`](#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb migration generate @@ -140,14 +158,20 @@ tailor-sdk tailordb migration generate [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------- | ----- | ------------------------------------------ | -------- | -------------------- | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--name ` | `-n` | Optional description for the migration | No | - | -| `--init` | - | Delete existing migrations and start fresh | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------- | ----- | ------------------------------------------ | -------- | -------------------- | --------------------------------- | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--name ` | `-n` | Optional description for the migration | No | - | - | +| `--init` | - | Delete existing migrations and start fresh | No | `false` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb migration set @@ -184,15 +208,21 @@ tailor-sdk tailordb migration set [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | -| `--namespace ` | `-n` | Target TailorDB namespace (required if multiple namespaces exist) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | +| `--namespace ` | `-n` | Target TailorDB namespace (required if multiple namespaces exist) | No | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb migration status @@ -219,14 +249,20 @@ tailor-sdk tailordb migration status [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--namespace ` | `-n` | Target TailorDB namespace (shows all namespaces if not specified) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--namespace ` | `-n` | Target TailorDB namespace (shows all namespaces if not specified) | No | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### tailordb erd @@ -260,6 +296,12 @@ tailor-sdk tailordb erd [command] | [`tailordb erd deploy`](#tailordb-erd-deploy) | Deploy ERD static website for TailorDB namespace(s). | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb erd export @@ -286,16 +328,21 @@ tailor-sdk tailordb erd export [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--namespace ` | `-n` | TailorDB namespace name (optional if only one namespace is defined in config) | No | - | -| `--output ` | `-o` | Output directory path for tbls-compatible ERD JSON (writes to `//schema.json`) | No | `".tailor-sdk/erd"` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ---------------------------------------------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--namespace ` | `-n` | TailorDB namespace name (optional if only one namespace is defined in config) | No | - | - | +| `--output ` | `-o` | Output directory path for tbls-compatible ERD JSON (writes to `//schema.json`) | No | `".tailor-sdk/erd"` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb erd serve @@ -322,14 +369,20 @@ tailor-sdk tailordb erd serve [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--namespace ` | `-n` | TailorDB namespace name (uses first namespace in config if not specified) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--namespace ` | `-n` | TailorDB namespace name (uses first namespace in config if not specified) | No | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### tailordb erd deploy @@ -356,16 +409,21 @@ tailor-sdk tailordb erd deploy [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------------------------------------------------------------------- | -------- | -------------------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--namespace ` | `-n` | TailorDB namespace name (optional - deploys all namespaces with erdSite if omitted) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--namespace ` | `-n` | TailorDB namespace name (optional - deploys all namespaces with erdSite if omitted) | No | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Usage Examples:** ```bash @@ -454,7 +512,7 @@ The `main` function receives a Kysely transaction object. All database operation **Editor Integration:** -If the `EDITOR` environment variable is set, the generated script file will automatically open in your preferred editor: +If `VISUAL` or `EDITOR` is set, the generated script file will automatically open in your preferred editor: ```bash export EDITOR=vim diff --git a/docs/sdk/cli/user.md b/docs/sdk/cli/user.md index 081c400..ce315d7 100644 --- a/docs/sdk/cli/user.md +++ b/docs/sdk/cli/user.md @@ -19,11 +19,17 @@ Login to Tailor Platform. **Usage** ``` -tailor-sdk login [options] +tailor-sdk login ``` + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## logout @@ -41,11 +47,17 @@ Logout from Tailor Platform. **Usage** ``` -tailor-sdk logout [options] +tailor-sdk logout ``` + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ## user @@ -80,6 +92,12 @@ tailor-sdk user [command] | [`user switch`](#user-switch) | Set current user. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### user current @@ -97,10 +115,16 @@ Show current user. **Usage** ``` -tailor-sdk user current [options] +tailor-sdk user current ``` + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### user list @@ -118,7 +142,7 @@ List all users. **Usage** ``` -tailor-sdk user list [options] +tailor-sdk user list ``` @@ -132,6 +156,12 @@ tailor-sdk user list [options] | `--json` | `-j` | Output as JSON | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### user switch @@ -149,7 +179,7 @@ Set current user. **Usage** ``` -tailor-sdk user switch [options] +tailor-sdk user switch ``` @@ -163,6 +193,12 @@ tailor-sdk user switch [options] | `user` | User email | Yes | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### user pat @@ -180,7 +216,7 @@ Manage personal access tokens. **Usage** ``` -tailor-sdk user pat [options] [command] +tailor-sdk user pat [command] ``` @@ -207,6 +243,12 @@ tailor-sdk user pat [options] [command] | [`user pat update`](#user-pat-update) | Update a personal access token (delete and recreate). | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### user pat list @@ -224,7 +266,7 @@ List all personal access tokens. **Usage** ``` -tailor-sdk user pat list [options] +tailor-sdk user pat list ``` @@ -238,6 +280,12 @@ tailor-sdk user pat list [options] | `--json` | `-j` | Output as JSON | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### user pat create @@ -276,10 +324,15 @@ tailor-sdk user pat create [options] | Option | Alias | Description | Required | Default | | --------- | ----- | ------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | | `--write` | `-W` | Grant write permission (default: read-only) | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### user pat delete @@ -297,7 +350,7 @@ Delete a personal access token. **Usage** ``` -tailor-sdk user pat delete [options] +tailor-sdk user pat delete ``` @@ -311,6 +364,12 @@ tailor-sdk user pat delete [options] | `name` | Token name | Yes | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + #### user pat update @@ -349,11 +408,16 @@ tailor-sdk user pat update [options] | Option | Alias | Description | Required | Default | | --------- | ----- | ---------------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | | `--write` | `-W` | Grant write permission (if not specified, keeps read-only) | No | `false` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + When no subcommand is provided, defaults to `list`. **Output (default):** diff --git a/docs/sdk/cli/workflow.md b/docs/sdk/cli/workflow.md index ea65b17..e2655d9 100644 --- a/docs/sdk/cli/workflow.md +++ b/docs/sdk/cli/workflow.md @@ -37,6 +37,12 @@ tailor-sdk workflow [command] | [`workflow resume`](#workflow-resume) | Resume a failed or pending workflow execution. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workflow list @@ -63,13 +69,18 @@ tailor-sdk workflow list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workflow get @@ -106,13 +117,18 @@ tailor-sdk workflow get [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workflow start @@ -149,19 +165,24 @@ tailor-sdk workflow start [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------------------------------------- | -------- | -------------------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | -| `--machineuser ` | `-m` | Machine user name | Yes | - | -| `--arg ` | `-a` | Workflow argument (JSON string) | No | - | -| `--wait` | `-W` | Wait for execution to complete | No | `false` | -| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | -| `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------------------------------------- | -------- | -------------------- | --------------------------------- | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--config ` | `-c` | Path to SDK config file | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` | +| `--machineuser ` | `-m` | Machine user name | Yes | - | - | +| `--arg ` | `-a` | Workflow argument (JSON string) | No | - | - | +| `--wait` | `-W` | Wait for execution to complete | No | `false` | - | +| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - | +| `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workflow executions @@ -198,18 +219,23 @@ tailor-sdk workflow executions [options] [executionId] **Options** -| Option | Alias | Description | Required | Default | -| --------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--workflow-name ` | `-n` | Filter by workflow name (list mode only) | No | - | -| `--status ` | `-s` | Filter by status (list mode only) | No | - | -| `--wait` | `-W` | Wait for execution to complete | No | `false` | -| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | -| `--logs` | - | Display job execution logs (detail mode only) | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| --------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--workflow-name ` | `-n` | Filter by workflow name (list mode only) | No | - | - | +| `--status ` | `-s` | Filter by status (list mode only) | No | - | - | +| `--wait` | `-W` | Wait for execution to complete | No | `false` | - | +| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - | +| `--logs` | - | Display job execution logs (detail mode only) | No | `false` | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workflow resume @@ -246,17 +272,22 @@ tailor-sdk workflow resume [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--wait` | `-W` | Wait for execution to complete | No | `false` | -| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | -| `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--wait` | `-W` | Wait for execution to complete | No | `false` | - | +| `--interval ` | `-i` | Polling interval when using --wait (e.g., '3s', '500ms', '1m') | No | `"3s"` | - | +| `--logs` | `-l` | Display job execution logs after completion (requires --wait) | No | `false` | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + **Usage Examples:** ```bash diff --git a/docs/sdk/cli/workspace.md b/docs/sdk/cli/workspace.md index 8e68cab..44e556b 100644 --- a/docs/sdk/cli/workspace.md +++ b/docs/sdk/cli/workspace.md @@ -39,6 +39,12 @@ tailor-sdk workspace [command] | [`workspace user`](#workspace-user) | Manage workspace users | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workspace create @@ -65,18 +71,23 @@ tailor-sdk workspace create [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------------- | ----- | ----------------------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--name ` | `-n` | Workspace name | Yes | - | -| `--region ` | `-r` | Workspace region (us-west, asia-northeast) | Yes | - | -| `--delete-protection` | `-d` | Enable delete protection | No | `false` | -| `--organization-id ` | `-o` | Organization ID to workspace associate with | No | - | -| `--folder-id ` | `-f` | Folder ID to workspace associate with | No | - | -| `--profile-name ` | `-p` | Profile name to create | No | - | -| `--profile-user ` | - | User email for the profile (defaults to current user) | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------------- | ----- | ----------------------------------------------------- | -------- | ------- | --------------------------------- | +| `--name ` | `-n` | Workspace name | Yes | - | - | +| `--region ` | `-r` | Workspace region (us-west, asia-northeast) | Yes | - | - | +| `--delete-protection` | `-d` | Enable delete protection | No | `false` | - | +| `--organization-id ` | `-o` | Organization ID to workspace associate with | No | - | `TAILOR_PLATFORM_ORGANIZATION_ID` | +| `--folder-id ` | `-f` | Folder ID to workspace associate with | No | - | `TAILOR_PLATFORM_FOLDER_ID` | +| `--profile-name ` | `-p` | Profile name to create | No | - | - | +| `--profile-user ` | - | User email for the profile (defaults to current user) | No | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workspace list @@ -105,10 +116,15 @@ tailor-sdk workspace list [options] | Option | Alias | Description | Required | Default | | ----------------- | ----- | ------------------------------------ | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | | `--limit ` | `-l` | Maximum number of workspaces to list | No | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### workspace delete @@ -141,6 +157,12 @@ tailor-sdk workspace delete [options] | `--yes` | `-y` | Skip confirmation prompts | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ## profile @@ -175,6 +197,12 @@ tailor-sdk profile [command] | [`profile update`](#profile-update) | Update profile properties. | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### profile create @@ -211,13 +239,18 @@ tailor-sdk profile create [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--user ` | `-u` | User email | Yes | - | -| `--workspace-id ` | `-w` | Workspace ID | Yes | - | +| Option | Alias | Description | Required | Default | +| ------------------------------- | ----- | ------------ | -------- | ------- | +| `--user ` | `-u` | User email | Yes | - | +| `--workspace-id ` | `-w` | Workspace ID | Yes | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### profile list @@ -235,7 +268,7 @@ List all profiles. **Usage** ``` -tailor-sdk profile list [options] +tailor-sdk profile list ``` @@ -249,6 +282,12 @@ tailor-sdk profile list [options] | `--json` | `-j` | Output as JSON | No | `false` | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### profile update @@ -287,11 +326,16 @@ tailor-sdk profile update [options] | Option | Alias | Description | Required | Default | | ------------------------------- | ----- | ---------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | | `--user ` | `-u` | New user email | No | - | | `--workspace-id ` | `-w` | New workspace ID | No | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + ### profile delete @@ -309,7 +353,7 @@ Delete a profile. **Usage** ``` -tailor-sdk profile delete [options] +tailor-sdk profile delete ``` @@ -324,6 +368,12 @@ tailor-sdk profile delete [options] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### workspace app @@ -357,6 +407,12 @@ tailor-sdk workspace app [command] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace app health @@ -383,15 +439,20 @@ tailor-sdk workspace app health [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--name ` | `-n` | Application name | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--name ` | `-n` | Application name | Yes | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace app list @@ -418,15 +479,20 @@ tailor-sdk workspace app list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--limit ` | `-l` | Maximum number of applications to list | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--limit ` | `-l` | Maximum number of applications to list | No | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### workspace get @@ -453,14 +519,19 @@ tailor-sdk workspace get [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### workspace restore @@ -494,6 +565,12 @@ tailor-sdk workspace restore [options] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + ### workspace user @@ -529,6 +606,12 @@ tailor-sdk workspace user [command] + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace user invite @@ -555,15 +638,21 @@ tailor-sdk workspace user invite [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | -------------------------------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--email ` | - | Email address of the user to invite | Yes | - | -| `--role ` | `-r` | Role to assign (admin, editor, viewer) | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | -------------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--email ` | - | Email address of the user to invite | Yes | - | - | +| `--role ` | `-r` | Role to assign (admin, editor, viewer) | Yes | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace user list @@ -590,15 +679,20 @@ tailor-sdk workspace user list [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------------- | -------- | ------- | -| `--json` | `-j` | Output as JSON | No | `false` | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--limit ` | `-l` | Maximum number of users to list | No | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--limit ` | `-l` | Maximum number of users to list | No | - | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace user remove @@ -625,15 +719,21 @@ tailor-sdk workspace user remove [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ----------------------------------- | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--email ` | - | Email address of the user to remove | Yes | - | -| `--yes` | `-y` | Skip confirmation prompts | No | `false` | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ----------------------------------- | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--email ` | - | Email address of the user to remove | Yes | - | - | +| `--yes` | `-y` | Skip confirmation prompts | No | `false` | - | + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + + #### workspace user update @@ -660,11 +760,17 @@ tailor-sdk workspace user update [options] **Options** -| Option | Alias | Description | Required | Default | -| ------------------------------- | ----- | ------------------------------------------ | -------- | ------- | -| `--workspace-id ` | `-w` | Workspace ID | No | - | -| `--profile ` | `-p` | Workspace profile | No | - | -| `--email ` | - | Email address of the user to update | Yes | - | -| `--role ` | `-r` | New role to assign (admin, editor, viewer) | Yes | - | +| Option | Alias | Description | Required | Default | Env | +| ------------------------------- | ----- | ------------------------------------------ | -------- | ------- | ------------------------------ | +| `--workspace-id ` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` | +| `--profile ` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` | +| `--email ` | - | Email address of the user to update | Yes | - | - | +| `--role ` | `-r` | New role to assign (admin, editor, viewer) | Yes | - | - | + + + +See [Global Options](../cli-reference.md#global-options) for options available to all commands. + + diff --git a/docs/sdk/services/workflow.md b/docs/sdk/services/workflow.md index 419f84a..35a2dec 100644 --- a/docs/sdk/services/workflow.md +++ b/docs/sdk/services/workflow.md @@ -148,6 +148,32 @@ export default createWorkflow({ }); ``` +## Retry Policy + +You can configure automatic retry behavior with exponential backoff by setting `retryPolicy` on a workflow. All fields are required when `retryPolicy` is set: + +| Field | Type | Description | +| ------------------- | -------- | ---------------------------------------------------------- | +| `maxRetries` | `number` | Maximum number of retries (1–10) | +| `initialBackoff` | `string` | Initial backoff duration (e.g., `"1s"`, `"500ms"`, max 1h) | +| `maxBackoff` | `string` | Maximum backoff duration (e.g., `"30s"`, `"5m"`, max 24h) | +| `backoffMultiplier` | `number` | Backoff multiplier for exponential backoff (>= 1) | + +Duration strings support `ms`, `s`, and `m` units. `initialBackoff` must be less than or equal to `maxBackoff`. + +```typescript +export default createWorkflow({ + name: "order-processing", + mainJob: processOrder, + retryPolicy: { + maxRetries: 3, + initialBackoff: "1s", + maxBackoff: "30s", + backoffMultiplier: 2, + }, +}); +``` + ## Triggering a Workflow from a Resolver You can start a workflow execution from a resolver using `workflow.trigger()`.