@tailor-platform/sdk 1.68.0 → 1.69.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/CHANGELOG.md +75 -0
  2. package/dist/application-Br48NXBD.mjs +4 -0
  3. package/dist/application-Cr-limKC.mjs +6192 -0
  4. package/dist/application-Cr-limKC.mjs.map +1 -0
  5. package/dist/cli/index.mjs +13 -12
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +234 -153
  8. package/dist/cli/lib.mjs +3 -3
  9. package/dist/cli/lib.mjs.map +1 -1
  10. package/dist/cli/skills.mjs +1 -1
  11. package/dist/completion/zsh-worker.zsh +23 -23
  12. package/dist/configure/index.d.mts +2 -2
  13. package/dist/configure/index.mjs +4 -0
  14. package/dist/configure/index.mjs.map +1 -1
  15. package/dist/{crashreport-u9y2npiy.mjs → crashreport-BqyvFk-_.mjs} +2 -2
  16. package/dist/{crashreport-u9y2npiy.mjs.map → crashreport-BqyvFk-_.mjs.map} +1 -1
  17. package/dist/{crashreport-6jpCceOF.mjs → crashreport-BwF8cHF0.mjs} +1 -1
  18. package/dist/enum-constants-C7DaWeQo.mjs.map +1 -1
  19. package/dist/field-C4zdJLW5.mjs.map +1 -1
  20. package/dist/file-utils-BHPxPXmn.mjs.map +1 -1
  21. package/dist/{idp-BlBPtXJ-.d.mts → idp-BmYwCXnJ.d.mts} +30 -3
  22. package/dist/{idp-BZPqpcYY.mjs → idp-ynUfzwpz.mjs} +9 -1
  23. package/dist/idp-ynUfzwpz.mjs.map +1 -0
  24. package/dist/{index-DvEUb3pX.d.mts → index-B7VbJm0_.d.mts} +25 -16
  25. package/dist/{index-DRhMpdnA.d.mts → index-dKNk8hjo.d.mts} +2 -2
  26. package/dist/job-BpsFXPbi.mjs.map +1 -1
  27. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-CSoZxVKN.mjs} +2 -2
  28. package/dist/{kysely-type-D1e0Vwkd.mjs.map → kysely-type-CSoZxVKN.mjs.map} +1 -1
  29. package/dist/{logger-DpJyJvNz.mjs → logger-DKF-JsAK.mjs} +3 -3
  30. package/dist/{logger-DpJyJvNz.mjs.map → logger-DKF-JsAK.mjs.map} +1 -1
  31. package/dist/{mock-DMgIygjE.mjs → mock-wf5qeZLi.mjs} +19 -9
  32. package/dist/mock-wf5qeZLi.mjs.map +1 -0
  33. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  34. package/dist/plugin/index.mjs.map +1 -1
  35. package/dist/registry-D0uB0OrK.mjs.map +1 -1
  36. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DD5YP5mt.mjs} +4 -4
  37. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DD5YP5mt.mjs.map} +1 -1
  38. package/dist/runtime/globals.d.mts +3 -2
  39. package/dist/runtime/idp.d.mts +2 -2
  40. package/dist/runtime/idp.mjs +1 -1
  41. package/dist/runtime/index.d.mts +2 -2
  42. package/dist/runtime/index.mjs +1 -1
  43. package/dist/{runtime-DxaBq6U8.mjs → runtime-jowoN6qC.mjs} +84 -34
  44. package/dist/runtime-jowoN6qC.mjs.map +1 -0
  45. package/dist/schema-1msIhXwA.mjs.map +1 -1
  46. package/dist/seed-YAbtMy65.mjs.map +1 -1
  47. package/dist/{service-wI3Hvrgx.mjs → service-B2Jd9CxS.mjs} +2 -2
  48. package/dist/service-B2Jd9CxS.mjs.map +1 -0
  49. package/dist/service-CRaa4Joe.mjs +4 -0
  50. package/dist/{service-DMohAx8a.mjs → service-DDWgZL_L2.mjs} +2 -2
  51. package/dist/service-DDWgZL_L2.mjs.map +1 -0
  52. package/dist/service_pb-DGSmn-aF.mjs +4 -0
  53. package/dist/{application-WpWwTyk9.mjs → service_pb-DSNjrcbW.mjs} +22 -6176
  54. package/dist/service_pb-DSNjrcbW.mjs.map +1 -0
  55. package/dist/telemetry-BQbbVo2t.mjs.map +1 -1
  56. package/dist/types-CmzfQP_m.mjs.map +1 -1
  57. package/dist/utils/test/index.d.mts +2 -2
  58. package/dist/utils/test/index.mjs.map +1 -1
  59. package/dist/vitest/environment.mjs +1 -1
  60. package/dist/vitest/environment.mjs.map +1 -1
  61. package/dist/vitest/index.mjs +4 -4
  62. package/dist/vitest/index.mjs.map +1 -1
  63. package/dist/vitest/setup.mjs +1 -1
  64. package/dist/{workflow.generated-1S50BhEb.d.mts → workflow.generated-Br9bmLdX.d.mts} +98 -3
  65. package/docs/cli/application.md +5 -202
  66. package/docs/cli/auth.md +12 -256
  67. package/docs/cli/completion.md +0 -24
  68. package/docs/cli/crashreport.md +0 -58
  69. package/docs/cli/executor.md +2 -166
  70. package/docs/cli/function.md +2 -118
  71. package/docs/cli/organization.md +1 -211
  72. package/docs/cli/query.md +0 -20
  73. package/docs/cli/secret.md +70 -250
  74. package/docs/cli/setup.md +1 -41
  75. package/docs/cli/skills.md +0 -39
  76. package/docs/cli/staticwebsite.md +24 -172
  77. package/docs/cli/tailordb.md +5 -255
  78. package/docs/cli/upgrade.md +0 -20
  79. package/docs/cli/user.md +32 -247
  80. package/docs/cli/workflow.md +30 -189
  81. package/docs/cli/workspace.md +158 -537
  82. package/docs/cli-reference.md +55 -37
  83. package/docs/configuration.md +7 -1
  84. package/docs/services/idp.md +55 -2
  85. package/docs/services/staticwebsite.md +7 -1
  86. package/package.json +23 -18
  87. package/dist/application-Djeezk3m.mjs +0 -4
  88. package/dist/application-WpWwTyk9.mjs.map +0 -1
  89. package/dist/idp-BZPqpcYY.mjs.map +0 -1
  90. package/dist/mock-DMgIygjE.mjs.map +0 -1
  91. package/dist/runtime-DxaBq6U8.mjs.map +0 -1
  92. package/dist/service-BHQIerYh.mjs +0 -4
  93. package/dist/service-DMohAx8a.mjs.map +0 -1
  94. package/dist/service-wI3Hvrgx.mjs.map +0 -1
@@ -10,8 +10,6 @@ tailor-sdk <command> [options]
10
10
 
11
11
  ## Global Options
12
12
 
13
- <!-- politty:global-options:start -->
14
-
15
13
  <a id="global-options"></a>
16
14
  | Option | Alias | Description | Required | Default |
17
15
  |--------|-------|-------------|----------|---------|
@@ -20,8 +18,6 @@ tailor-sdk <command> [options]
20
18
  | `--verbose` | - | Enable verbose logging | No | `false` |
21
19
  | `--json` | `-j` | Output as JSON | No | `false` |
22
20
 
23
- <!-- politty:global-options:end -->
24
-
25
21
  ### JSON Output
26
22
 
27
23
  For commands that return structured results, passing `--json` writes one parseable JSON document
@@ -103,8 +99,6 @@ Workspace ID resolution follows this priority order:
103
99
 
104
100
  ## Commands
105
101
 
106
- <!-- politty:index:docs/cli-reference.md:start -->
107
-
108
102
  ### [Application Commands](./cli/application.md)
109
103
 
110
104
  Commands for managing Tailor Platform applications (work with `tailor.config.ts`).
@@ -117,8 +111,9 @@ Commands for managing Tailor Platform applications (work with `tailor.config.ts`
117
111
  | [remove](./cli/application.md#remove) | Remove all resources managed by the application from the workspace. |
118
112
  | [show](./cli/application.md#show) | Show information about the deployed application. |
119
113
  | [open](./cli/application.md#open) | Open Tailor Platform Console. |
120
- | [api list](./cli/application.md#api-list) | List all invocable OperatorService methods. |
114
+ | [api](./cli/application.md#api) | Call Tailor Platform API endpoints directly. |
121
115
  | [api inspect](./cli/application.md#api-inspect) | Print the input message tree of an OperatorService endpoint. |
116
+ | [api list](./cli/application.md#api-list) | List all invocable OperatorService methods. |
122
117
 
123
118
  ### [TailorDB Commands](./cli/tailordb.md)
124
119
 
@@ -126,12 +121,15 @@ Commands for managing TailorDB tables, data, and schema migrations.
126
121
 
127
122
  | Command | Description |
128
123
  | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
124
+ | [tailordb](./cli/tailordb.md#tailordb) | Manage TailorDB tables and data. |
129
125
  | [tailordb truncate](./cli/tailordb.md#tailordb-truncate) | Truncate (delete all records from) TailorDB tables. |
126
+ | [tailordb migration](./cli/tailordb.md#tailordb-migration) | Manage TailorDB schema migrations. |
130
127
  | [tailordb migration generate](./cli/tailordb.md#tailordb-migration-generate) | Generate migration files by detecting schema differences between current local types and the previous migration snapshot. |
131
128
  | [tailordb migration script](./cli/tailordb.md#tailordb-migration-script) | Add a migration script (migrate.ts) template to an existing migration directory. |
132
129
  | [tailordb migration set](./cli/tailordb.md#tailordb-migration-set) | Set migration checkpoint to a specific number. |
133
130
  | [tailordb migration status](./cli/tailordb.md#tailordb-migration-status) | Show the current migration status for TailorDB namespaces, including applied and pending migrations. |
134
131
  | [tailordb migration sync](./cli/tailordb.md#tailordb-migration-sync) | Sync remote TailorDB schema to a specific migration snapshot (recovery from --no-schema-check drift). |
132
+ | [tailordb erd](./cli/tailordb.md#tailordb-erd) | Generate TailorDB ERD viewer artifacts from local TailorDB schema. (beta) |
135
133
  | [tailordb erd export](./cli/tailordb.md#tailordb-erd-export) | Export TailorDB ERD static viewer from local TailorDB schema. |
136
134
  | [tailordb erd serve](./cli/tailordb.md#tailordb-erd-serve) | Generate and serve TailorDB ERD locally with watch reload. (beta) |
137
135
  | [tailordb erd deploy](./cli/tailordb.md#tailordb-erd-deploy) | Deploy ERD static website for TailorDB namespace(s). |
@@ -152,13 +150,15 @@ Commands for authentication and user management.
152
150
  | ------------------------------------------------ | ----------------------------------------------------- |
153
151
  | [login](./cli/user.md#login) | Login to Tailor Platform. |
154
152
  | [logout](./cli/user.md#logout) | Logout from Tailor Platform. |
153
+ | [user](./cli/user.md#user) | Manage Tailor Platform users. |
155
154
  | [user current](./cli/user.md#user-current) | Show current user. |
156
155
  | [user list](./cli/user.md#user-list) | List all users. |
157
- | [user switch](./cli/user.md#user-switch) | Set current user. |
158
- | [user pat list](./cli/user.md#user-pat-list) | List all personal access tokens. |
156
+ | [user pat](./cli/user.md#user-pat) | Manage personal access tokens. |
159
157
  | [user pat create](./cli/user.md#user-pat-create) | Create a new personal access token. |
160
158
  | [user pat delete](./cli/user.md#user-pat-delete) | Delete a personal access token. |
159
+ | [user pat list](./cli/user.md#user-pat-list) | List all personal access tokens. |
161
160
  | [user pat update](./cli/user.md#user-pat-update) | Update a personal access token (delete and recreate). |
161
+ | [user switch](./cli/user.md#user-switch) | Set current user. |
162
162
 
163
163
  ### [Organization Commands](./cli/organization.md)
164
164
 
@@ -166,6 +166,8 @@ Commands for managing organizations and folders.
166
166
 
167
167
  | Command | Description |
168
168
  | ------------------------------------------------------------------------------ | ------------------------------------------------ |
169
+ | [organization](./cli/organization.md#organization) | Manage Tailor Platform organizations. |
170
+ | [organization folder](./cli/organization.md#organization-folder) | Manage organization folders. |
169
171
  | [organization folder create](./cli/organization.md#organization-folder-create) | Create a new folder in an organization. |
170
172
  | [organization folder delete](./cli/organization.md#organization-folder-delete) | Delete a folder from an organization. |
171
173
  | [organization folder get](./cli/organization.md#organization-folder-get) | Show detailed information about a folder. |
@@ -180,23 +182,27 @@ Commands for managing organizations and folders.
180
182
 
181
183
  Commands for managing workspaces and profiles.
182
184
 
183
- | Command | Description |
184
- | ----------------------------------------------------------------- | ------------------------------------------- |
185
- | [workspace app health](./cli/workspace.md#workspace-app-health) | Check application schema health |
186
- | [workspace app list](./cli/workspace.md#workspace-app-list) | List applications in a workspace |
187
- | [workspace create](./cli/workspace.md#workspace-create) | Create a new Tailor Platform workspace. |
188
- | [workspace delete](./cli/workspace.md#workspace-delete) | Delete a Tailor Platform workspace. |
189
- | [workspace get](./cli/workspace.md#workspace-get) | Show detailed information about a workspace |
190
- | [workspace list](./cli/workspace.md#workspace-list) | List all Tailor Platform workspaces. |
191
- | [workspace restore](./cli/workspace.md#workspace-restore) | Restore a deleted workspace |
192
- | [workspace user invite](./cli/workspace.md#workspace-user-invite) | Invite a user to a workspace |
193
- | [workspace user list](./cli/workspace.md#workspace-user-list) | List users in a workspace |
194
- | [workspace user remove](./cli/workspace.md#workspace-user-remove) | Remove a user from a workspace |
195
- | [workspace user update](./cli/workspace.md#workspace-user-update) | Update a user's role in a workspace |
196
- | [profile create](./cli/workspace.md#profile-create) | Create a new profile. |
197
- | [profile delete](./cli/workspace.md#profile-delete) | Delete a profile. |
198
- | [profile list](./cli/workspace.md#profile-list) | List all profiles. |
199
- | [profile update](./cli/workspace.md#profile-update) | Update profile properties. |
185
+ | Command | Description |
186
+ | ----------------------------------------------------------------- | ---------------------------------------------------------- |
187
+ | [workspace](./cli/workspace.md#workspace) | Manage Tailor Platform workspaces. |
188
+ | [workspace app](./cli/workspace.md#workspace-app) | Manage workspace applications |
189
+ | [workspace app health](./cli/workspace.md#workspace-app-health) | Check application schema health |
190
+ | [workspace app list](./cli/workspace.md#workspace-app-list) | List applications in a workspace |
191
+ | [workspace create](./cli/workspace.md#workspace-create) | Create a new Tailor Platform workspace. |
192
+ | [workspace delete](./cli/workspace.md#workspace-delete) | Delete a Tailor Platform workspace. |
193
+ | [workspace get](./cli/workspace.md#workspace-get) | Show detailed information about a workspace |
194
+ | [workspace list](./cli/workspace.md#workspace-list) | List all Tailor Platform workspaces. |
195
+ | [workspace restore](./cli/workspace.md#workspace-restore) | Restore a deleted workspace |
196
+ | [workspace user](./cli/workspace.md#workspace-user) | Manage workspace users |
197
+ | [workspace user invite](./cli/workspace.md#workspace-user-invite) | Invite a user to a workspace |
198
+ | [workspace user list](./cli/workspace.md#workspace-user-list) | List users in a workspace |
199
+ | [workspace user remove](./cli/workspace.md#workspace-user-remove) | Remove a user from a workspace |
200
+ | [workspace user update](./cli/workspace.md#workspace-user-update) | Update a user's role in a workspace |
201
+ | [profile](./cli/workspace.md#profile) | Manage workspace profiles (user + workspace combinations). |
202
+ | [profile create](./cli/workspace.md#profile-create) | Create a new profile. |
203
+ | [profile delete](./cli/workspace.md#profile-delete) | Delete a profile. |
204
+ | [profile list](./cli/workspace.md#profile-list) | List all profiles. |
205
+ | [profile update](./cli/workspace.md#profile-update) | Update profile properties. |
200
206
 
201
207
  ### [Auth Resource Commands](./cli/auth.md)
202
208
 
@@ -204,13 +210,16 @@ Commands for managing Auth service resources.
204
210
 
205
211
  | Command | Description |
206
212
  | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------- |
213
+ | [authconnection](./cli/auth.md#authconnection) | Manage auth connections. |
207
214
  | [authconnection authorize](./cli/auth.md#authconnection-authorize) | Authorize an auth connection via OAuth2 flow. |
215
+ | [authconnection delete](./cli/auth.md#authconnection-delete) | Delete an auth connection entirely. |
208
216
  | [authconnection list](./cli/auth.md#authconnection-list) | List all auth connections. |
209
217
  | [authconnection open](./cli/auth.md#authconnection-open) | Open the auth connections page in the Tailor Platform Console. |
210
218
  | [authconnection revoke](./cli/auth.md#authconnection-revoke) | Revoke an auth connection's tokens (keeps the connection; use 'delete' to remove it). |
211
- | [authconnection delete](./cli/auth.md#authconnection-delete) | Delete an auth connection entirely. |
219
+ | [machineuser](./cli/auth.md#machineuser) | Manage machine users in your Tailor Platform application. |
212
220
  | [machineuser list](./cli/auth.md#machineuser-list) | List all machine users in the application. |
213
221
  | [machineuser token](./cli/auth.md#machineuser-token) | Get an access token for a machine user. |
222
+ | [oauth2client](./cli/auth.md#oauth2client) | Manage OAuth2 clients in your Tailor Platform application. |
214
223
  | [oauth2client list](./cli/auth.md#oauth2client-list) | List all OAuth2 clients in the application. |
215
224
  | [oauth2client get](./cli/auth.md#oauth2client-get) | Get OAuth2 client credentials (including client secret). |
216
225
 
@@ -220,6 +229,7 @@ Commands for managing workflows and executions.
220
229
 
221
230
  | Command | Description |
222
231
  | ------------------------------------------------------------ | ---------------------------------------------- |
232
+ | [workflow](./cli/workflow.md#workflow) | Manage workflows and workflow executions. |
223
233
  | [workflow list](./cli/workflow.md#workflow-list) | List all workflows in the workspace. |
224
234
  | [workflow get](./cli/workflow.md#workflow-get) | Get workflow details. |
225
235
  | [workflow start](./cli/workflow.md#workflow-start) | Start a workflow execution. |
@@ -233,6 +243,7 @@ Commands for managing function registries and viewing function execution logs.
233
243
 
234
244
  | Command | Description |
235
245
  | -------------------------------------------------------- | --------------------------------------------------------------- |
246
+ | [function](./cli/function.md#function) | Manage functions |
236
247
  | [function get](./cli/function.md#function-get) | Get a function registry by name |
237
248
  | [function list](./cli/function.md#function-list) | List function registries in a workspace |
238
249
  | [function logs](./cli/function.md#function-logs) | List or get function execution logs. |
@@ -244,10 +255,12 @@ Commands for managing executors and executor jobs.
244
255
 
245
256
  | Command | Description |
246
257
  | ---------------------------------------------------------------- | --------------------------------------------- |
247
- | [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually. |
248
- | [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs. |
258
+ | [executor](./cli/executor.md#executor) | Manage executors |
249
259
  | [executor list](./cli/executor.md#executor-list) | List all executors |
250
260
  | [executor get](./cli/executor.md#executor-get) | Get executor details |
261
+ | [executor jobs](./cli/executor.md#executor-jobs) | List or get executor jobs. |
262
+ | [executor trigger](./cli/executor.md#executor-trigger) | Trigger an executor manually. |
263
+ | [executor webhook](./cli/executor.md#executor-webhook) | Manage executor webhooks |
251
264
  | [executor webhook list](./cli/executor.md#executor-webhook-list) | List executors with incoming webhook triggers |
252
265
 
253
266
  ### [Secret Commands](./cli/secret.md)
@@ -256,13 +269,15 @@ Commands for managing secrets and vaults.
256
269
 
257
270
  | Command | Description |
258
271
  | ---------------------------------------------------------- | ------------------------------------------------ |
272
+ | [secret](./cli/secret.md#secret) | Manage Secret Manager vaults and secrets. |
273
+ | [secret create](./cli/secret.md#secret-create) | Create a secret in a vault. |
274
+ | [secret delete](./cli/secret.md#secret-delete) | Delete a secret in a vault. |
275
+ | [secret list](./cli/secret.md#secret-list) | List all secrets in a vault. |
276
+ | [secret update](./cli/secret.md#secret-update) | Update a secret in a vault. |
277
+ | [secret vault](./cli/secret.md#secret-vault) | Manage Secret Manager vaults. |
259
278
  | [secret vault create](./cli/secret.md#secret-vault-create) | Create a new Secret Manager vault. |
260
279
  | [secret vault delete](./cli/secret.md#secret-vault-delete) | Delete a Secret Manager vault. |
261
280
  | [secret vault list](./cli/secret.md#secret-vault-list) | List all Secret Manager vaults in the workspace. |
262
- | [secret create](./cli/secret.md#secret-create) | Create a secret in a vault. |
263
- | [secret update](./cli/secret.md#secret-update) | Update a secret in a vault. |
264
- | [secret list](./cli/secret.md#secret-list) | List all secrets in a vault. |
265
- | [secret delete](./cli/secret.md#secret-delete) | Delete a secret in a vault. |
266
281
 
267
282
  ### [Static Website Commands](./cli/staticwebsite.md)
268
283
 
@@ -270,10 +285,12 @@ Commands for managing and deploying static websites.
270
285
 
271
286
  | Command | Description |
272
287
  | ----------------------------------------------------------------------------- | ----------------------------------------------------- |
288
+ | [staticwebsite](./cli/staticwebsite.md#staticwebsite) | Manage static websites in your workspace. |
273
289
  | [staticwebsite deploy](./cli/staticwebsite.md#staticwebsite-deploy) | Deploy a static website from a local build directory. |
274
- | [staticwebsite domain list](./cli/staticwebsite.md#staticwebsite-domain-list) | List custom domains for a static website. |
275
- | [staticwebsite domain get](./cli/staticwebsite.md#staticwebsite-domain-get) | Get details of a custom domain. |
276
290
  | [staticwebsite list](./cli/staticwebsite.md#staticwebsite-list) | List all static websites in a workspace. |
291
+ | [staticwebsite domain](./cli/staticwebsite.md#staticwebsite-domain) | Manage custom domains for static websites. |
292
+ | [staticwebsite domain get](./cli/staticwebsite.md#staticwebsite-domain-get) | Get details of a custom domain. |
293
+ | [staticwebsite domain list](./cli/staticwebsite.md#staticwebsite-domain-list) | List custom domains for a static website. |
277
294
  | [staticwebsite get](./cli/staticwebsite.md#staticwebsite-get) | Get details of a specific static website. |
278
295
 
279
296
  ### [Crash Report Commands](./cli/crashreport.md)
@@ -282,6 +299,7 @@ Commands for managing crash reports.
282
299
 
283
300
  | Command | Description |
284
301
  | --------------------------------------------------------- | ---------------------------------------------- |
302
+ | [crashreport](./cli/crashreport.md#crashreport) | Manage crash reports. |
285
303
  | [crashreport list](./cli/crashreport.md#crashreport-list) | List local crash report files. |
286
304
  | [crashreport send](./cli/crashreport.md#crashreport-send) | Submit a crash report to help improve the SDK. |
287
305
 
@@ -291,6 +309,7 @@ Commands for setting up project infrastructure.
291
309
 
292
310
  | Command | Description |
293
311
  | ----------------------------------------- | -------------------------------------------------------------------------------- |
312
+ | [setup](./cli/setup.md#setup) | Generate a CI deploy workflow for your project. (beta) |
294
313
  | [setup check](./cli/setup.md#setup-check) | Audit generated workflows for drift against the current config/repo (read-only). |
295
314
 
296
315
  ### [Upgrade Commands](./cli/upgrade.md)
@@ -307,6 +326,7 @@ Commands for installing Tailor SDK agent skills.
307
326
 
308
327
  | Command | Description |
309
328
  | ------------------------------------------------ | ------------------------------------------------------------------ |
329
+ | [skills](./cli/skills.md#skills) | Manage Tailor SDK agent skills. |
310
330
  | [skills install](./cli/skills.md#skills-install) | Install the tailor-sdk agent skill from the installed SDK package. |
311
331
 
312
332
  ### [Completion](./cli/completion.md)
@@ -316,5 +336,3 @@ Generate shell completion scripts for bash, zsh, and fish.
316
336
  | Command | Description |
317
337
  | -------------------------------------------- | -------------------------------- |
318
338
  | [completion](./cli/completion.md#completion) | Generate shell completion script |
319
-
320
- <!-- politty:index:docs/cli-reference.md:end -->
@@ -118,8 +118,14 @@ Configure the Built-in IdP service using `defineIdp()`. See [IdP](./services/idp
118
118
  import { defineIdp } from "@tailor-platform/sdk";
119
119
 
120
120
  const idp = defineIdp("my-idp", {
121
- authorization: "loggedIn",
122
121
  clients: ["my-client"],
122
+ permission: {
123
+ create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
124
+ read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
125
+ update: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
126
+ delete: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
127
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
128
+ },
123
129
  });
124
130
 
125
131
  export default defineConfig({
@@ -86,7 +86,8 @@ defineIdp("my-idp", {
86
86
  - `read` - Controls who can read IdP users
87
87
  - `update` - Controls who can update IdP users
88
88
  - `delete` - Controls who can delete IdP users
89
- - `sendPasswordResetEmail` - Controls who can send password reset emails. The examples above disable this operation; to enable it, use a permission such as `[{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }]`.
89
+ - `sendPasswordResetEmail` - Controls who can send password reset emails. Required unless `userAuthPolicy.disablePasswordAuth` is `true` or `gqlOperations.sendPasswordResetEmail` is `false` (the password-reset flow has no meaning when password authentication is off or the operation is disabled). Set `[{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }]` to allow, or `[]` to deny.
90
+ - `unenrollMfa` - Controls who can remove an enrolled MFA factor from a user. Required when `userAuthPolicy.enableMfa` is `true` unless `gqlOperations.unenrollMfa` is `false`; omit otherwise. Typically restricted to administrators.
90
91
 
91
92
  **Policy fields:** each entry in an operation's policy array supports:
92
93
 
@@ -166,6 +167,37 @@ defineIdp("my-idp", {
166
167
  - `allowGoogleOauth` - Enable the "Sign in with Google" button. Default `false`.
167
168
  - `allowMicrosoftOauth` - Enable the "Sign in with Microsoft" button. Default `false`.
168
169
 
170
+ **MFA (TOTP):**
171
+
172
+ ```typescript
173
+ import { defineIdp, defineStaticWebSite } from "@tailor-platform/sdk";
174
+
175
+ const website = defineStaticWebSite("my-frontend", { description: "App frontend" });
176
+
177
+ defineIdp("my-idp", {
178
+ clients: ["my-client"],
179
+ userAuthPolicy: {
180
+ enableMfa: true,
181
+ requireMfa: false,
182
+ allowedReturnOrigins: [website.url, "https://admin.example.com"],
183
+ mfaIssuer: "My App",
184
+ },
185
+ permission: {
186
+ create: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
187
+ read: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
188
+ update: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
189
+ delete: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
190
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
191
+ unenrollMfa: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
192
+ },
193
+ });
194
+ ```
195
+
196
+ - `enableMfa` - Make TOTP MFA available for users in this namespace. Default `false`. When enabled, users can register an authenticator app (Google Authenticator, 1Password, etc.) from the IdP self-service page.
197
+ - `requireMfa` - Force password-authenticated users to enroll and pass an MFA challenge on each sign-in. Default `false`. Social sign-in (`allowGoogleOauth` / `allowMicrosoftOauth`) is not affected; the upstream provider's MFA covers those sessions.
198
+ - `allowedReturnOrigins` - Origins the IdP self-service pages (such as `/mfa/settings`) are allowed to redirect back to. Each entry is either a literal origin (`https://app.example.com`, scheme + host + optional port, no path/query/fragment) or a static-website placeholder `<name>:url` (e.g. `website.url`) that the CLI resolves to the deployed website's URL at apply time. Required when `enableMfa` is `true`.
199
+ - `mfaIssuer` - Label shown next to the user account in authenticator apps when TOTP is enrolled. Up to 64 characters. Falls back to `"Tailor Platform IdP"` when empty.
200
+
169
201
  **Constraints:** the following combinations are rejected at parse time.
170
202
 
171
203
  - `passwordMinLength` must be less than or equal to `passwordMaxLength`.
@@ -173,6 +205,23 @@ defineIdp("my-idp", {
173
205
  - `allowGoogleOauth` requires a non-empty `allowedEmailDomains`.
174
206
  - `allowMicrosoftOauth` requires both a non-empty `allowedEmailDomains` and `disablePasswordAuth: true`.
175
207
  - `disablePasswordAuth` requires `allowGoogleOauth` or `allowMicrosoftOauth`, and cannot be combined with `allowSelfPasswordReset`.
208
+ - `requireMfa: true` requires `enableMfa: true`.
209
+ - `enableMfa: true` requires at least one entry in `allowedReturnOrigins`.
210
+ - `enableMfa: true` requires `permission` to be defined and to include an explicit `unenrollMfa` policy (an empty array `[]` to deny is fine), unless `gqlOperations.unenrollMfa` is `false` (or `gqlOperations: "query"`, which normalizes to the same), in which case the operation is turned off and the policy may be omitted.
211
+
212
+ **Runtime API:** function code can inspect and revoke a user's enrolled factor through `idp.Client`. The `User` records returned by `user`, `userByName`, `users`, `createUser`, and `updateUser` expose `mfaEnrolled` (boolean) and `mfaFactorIds` (string array), and `client.unenrollMfa({ userId, mfaFactorId })` removes a single factor. The factor ID to pass back is one of the entries in `user.mfaFactorIds`. Calling `unenrollMfa` requires the `unenrollMfa` permission above.
213
+
214
+ ```typescript
215
+ import { idp } from "@tailor-platform/sdk/runtime";
216
+
217
+ const client = new idp.Client({ namespace: "my-idp" });
218
+ const user = await client.user("user-id");
219
+ if (user.mfaEnrolled) {
220
+ for (const factorId of user.mfaFactorIds) {
221
+ await client.unenrollMfa({ userId: user.id, mfaFactorId: factorId });
222
+ }
223
+ }
224
+ ```
176
225
 
177
226
  ### gqlOperations
178
227
 
@@ -187,6 +236,8 @@ defineIdp("my-idp", {
187
236
  update: true,
188
237
  delete: false,
189
238
  sendPasswordResetEmail: false,
239
+ requestMfaSettingsUrl: false,
240
+ unenrollMfa: false,
190
241
  },
191
242
  });
192
243
  ```
@@ -198,8 +249,10 @@ defineIdp("my-idp", {
198
249
  - `update` - The `_updateUser` mutation.
199
250
  - `delete` - The `_deleteUser` mutation.
200
251
  - `sendPasswordResetEmail` - The `_sendPasswordResetEmail` mutation.
252
+ - `requestMfaSettingsUrl` - The `_requestMfaSettingsUrl` query that issues a self-service URL for MFA settings.
253
+ - `unenrollMfa` - The `_unenrollMfa` mutation that removes a user's enrolled MFA factor. When set to `false`, `permission.unenrollMfa` may be omitted even with `userAuthPolicy.enableMfa: true`.
201
254
 
202
- **Shortcut:** pass the string `"query"` to expose a read-only IdP. It enables `read` and disables every mutation.
255
+ **Shortcut:** pass the string `"query"` to expose a read-only IdP. It enables the queries (`read`, `requestMfaSettingsUrl`) and disables every mutation.
203
256
 
204
257
  ```typescript
205
258
  defineIdp("my-idp", {
@@ -124,8 +124,14 @@ const website = defineStaticWebSite("my-frontend", {
124
124
  });
125
125
 
126
126
  const idp = defineIdp("my-idp", {
127
- authorization: "loggedIn",
128
127
  clients: ["default-client"],
128
+ permission: {
129
+ create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
130
+ read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
131
+ update: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
132
+ delete: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
133
+ sendPasswordResetEmail: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
134
+ },
129
135
  });
130
136
 
131
137
  const auth = defineAuth("my-auth", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.68.0",
3
+ "version": "1.69.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,6 +16,7 @@
16
16
  "CHANGELOG.md",
17
17
  "dist",
18
18
  "docs",
19
+ "!docs/**/*.*.md",
19
20
  "postinstall.mjs",
20
21
  "README.md",
21
22
  "agent-skills"
@@ -27,6 +28,9 @@
27
28
  ],
28
29
  "main": "./dist/configure/index.mjs",
29
30
  "types": "./dist/configure/index.d.mts",
31
+ "imports": {
32
+ "#/*": "./src/*.ts"
33
+ },
30
34
  "exports": {
31
35
  ".": {
32
36
  "types": "./dist/configure/index.d.mts",
@@ -150,40 +154,40 @@
150
154
  "@opentelemetry/resources": "2.8.0",
151
155
  "@opentelemetry/sdk-trace-node": "2.8.0",
152
156
  "@opentelemetry/semantic-conventions": "1.41.1",
153
- "@oxc-project/types": "0.135.0",
157
+ "@oxc-project/types": "0.137.0",
154
158
  "@standard-schema/spec": "1.1.0",
155
159
  "@tailor-platform/function-kysely-tailordb": "0.1.3",
156
160
  "@toiroakr/lines-db": "0.9.2",
157
161
  "@toiroakr/read-multiline": "0.4.1",
158
- "@urql/core": "6.0.1",
162
+ "@urql/core": "6.0.2",
159
163
  "chalk": "5.6.2",
160
164
  "chokidar": "5.0.0",
161
165
  "confbox": "0.2.4",
162
166
  "date-fns": "4.4.0",
163
- "es-toolkit": "1.47.1",
167
+ "es-toolkit": "1.48.1",
164
168
  "find-up-simple": "1.0.1",
165
169
  "globals": "17.6.0",
166
- "graphql": "16.14.2",
170
+ "graphql": "17.0.1",
167
171
  "inflection": "3.0.2",
168
172
  "kysely": "0.29.2",
169
173
  "madge": "8.0.0",
170
174
  "mime-types": "3.0.2",
171
175
  "open": "11.0.0",
172
- "oxc-parser": "0.135.0",
176
+ "oxc-parser": "0.137.0",
173
177
  "p-limit": "7.3.0",
174
178
  "pathe": "2.0.3",
175
179
  "pgsql-ast-parser": "12.0.2",
176
180
  "pkg-types": "2.3.1",
177
- "politty": "0.6.0",
178
- "rolldown": "1.1.1",
179
- "semver": "7.8.4",
181
+ "politty": "0.9.2",
182
+ "rolldown": "1.1.2",
183
+ "semver": "7.8.5",
180
184
  "sql-highlight": "6.1.0",
181
185
  "std-env": "4.1.0",
182
186
  "table": "6.9.0",
183
187
  "ts-cron-validator": "1.1.5",
184
188
  "tsx": "4.22.4",
185
189
  "type-fest": "5.7.0",
186
- "undici": "8.4.1",
190
+ "undici": "8.5.0",
187
191
  "xdg-basedir": "5.1.0",
188
192
  "zod": "4.4.3"
189
193
  },
@@ -193,16 +197,17 @@
193
197
  "@types/mime-types": "3.0.1",
194
198
  "@types/node": "24.13.2",
195
199
  "@types/semver": "7.7.1",
196
- "@typescript/native-preview": "7.0.0-dev.20260614.1",
197
- "@vitest/coverage-v8": "4.1.8",
198
- "oxfmt": "0.54.0",
199
- "oxlint": "1.69.0",
200
+ "@typescript/native-preview": "7.0.0-dev.20260621.1",
201
+ "@vitest/coverage-v8": "4.1.9",
202
+ "oxfmt": "0.55.0",
203
+ "oxlint": "1.70.0",
200
204
  "oxlint-tsgolint": "0.23.0",
201
- "sonda": "0.13.0",
202
- "tsdown": "0.22.2",
205
+ "sonda": "0.13.1",
206
+ "tsdown": "0.22.3",
203
207
  "typescript": "6.0.3",
204
- "vitest": "4.1.8",
205
- "zinfer": "0.1.8"
208
+ "vitest": "4.1.9",
209
+ "zinfer": "0.2.2",
210
+ "@tailor-platform/tailor-proto": "^0.0.0"
206
211
  },
207
212
  "peerDependencies": {
208
213
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-WpWwTyk9.mjs";
3
-
4
- export { defineApplication, generatePluginFilesIfNeeded };