@tailor-platform/sdk 1.75.0 → 1.76.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/{application-DYshsH-K.mjs → application-BUfYmf0O.mjs} +274 -10
- package/dist/application-BUfYmf0O.mjs.map +1 -0
- package/dist/application-DbvD5UUz.mjs +3 -0
- package/dist/cli/index.mjs +218 -66
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.mjs +2 -2
- package/dist/cli/query/index.d.mts +4 -0
- package/dist/completion/zsh-worker.zsh +2 -2
- package/dist/configure/index.mjs +1 -1
- package/dist/configure/services/tailordb/schema.d.mts +28 -15
- package/dist/resource_pb-BRv7AMXK.mjs +49 -0
- package/dist/resource_pb-BRv7AMXK.mjs.map +1 -0
- package/dist/{runtime-CJ5usBOu.mjs → runtime-_vUgjiqT.mjs} +27 -252
- package/dist/runtime-_vUgjiqT.mjs.map +1 -0
- package/dist/{schema-Dl_y0m9e.mjs → schema-DrVyN-LP.mjs} +60 -36
- package/dist/schema-DrVyN-LP.mjs.map +1 -0
- package/dist/{service_pb-D-PXRoMg.mjs → service_pb-B2FF59sP.mjs} +1 -1
- package/dist/{service_pb-4unFyubn.mjs → service_pb-B5w9rjPY.mjs} +3 -46
- package/dist/service_pb-B5w9rjPY.mjs.map +1 -0
- package/docs/cli/auth.md +3 -3
- package/docs/cli/setup.md +8 -8
- package/docs/services/tailordb.md +20 -0
- package/package.json +1 -1
- package/dist/application-BJKNlv8c.mjs +0 -3
- package/dist/application-DYshsH-K.mjs.map +0 -1
- package/dist/runtime-CJ5usBOu.mjs.map +0 -1
- package/dist/schema-Dl_y0m9e.mjs.map +0 -1
- package/dist/service_pb-4unFyubn.mjs.map +0 -1
package/docs/cli/auth.md
CHANGED
|
@@ -186,9 +186,9 @@ tailor-sdk machineuser token [options] [name]
|
|
|
186
186
|
|
|
187
187
|
**Arguments**
|
|
188
188
|
|
|
189
|
-
| Argument | Description
|
|
190
|
-
| -------- |
|
|
191
|
-
| `name` | Machine user name. Falls back to the active profile's default machine user. | No |
|
|
189
|
+
| Argument | Description | Required |
|
|
190
|
+
| -------- | ------------------------------------------------------------------------------------------------------------------- | -------- |
|
|
191
|
+
| `name` | Machine user name. Falls back to TAILOR_PLATFORM_MACHINE_USER_NAME, then the active profile's default machine user. | No |
|
|
192
192
|
|
|
193
193
|
**Options**
|
|
194
194
|
|
package/docs/cli/setup.md
CHANGED
|
@@ -100,14 +100,14 @@ tailor-sdk setup coordinate [options]
|
|
|
100
100
|
|
|
101
101
|
**Options**
|
|
102
102
|
|
|
103
|
-
| Option | Alias | Description
|
|
104
|
-
| ----------------------------- | ----- |
|
|
105
|
-
| `--name <NAME>` | `-n` | Coordinator name (used in the generated workflow file name and job names)
|
|
106
|
-
| `--action <ACTION>` | - | Composite action to include
|
|
107
|
-
| `--branch <BRANCH>` | - | Branch target: deploy trigger branch (defaults to the detected default branch)
|
|
108
|
-
| `--tag` | - | Generate a tag target coordinator
|
|
109
|
-
| `--environment <ENVIRONMENT>` | - | GitHub Environment for the plan/deploy jobs
|
|
110
|
-
| `--force` | - | Discard hand edits and regenerate
|
|
103
|
+
| Option | Alias | Description | Required | Default |
|
|
104
|
+
| ----------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
|
|
105
|
+
| `--name <NAME>` | `-n` | Coordinator name (used in the generated workflow file name and job names) | Yes | - |
|
|
106
|
+
| `--action <ACTION>` | - | Composite action to include. Repeat for separate deploy steps, or use commas to deploy actions as one multi-config group. tailor- prefix optional. | Yes | - |
|
|
107
|
+
| `--branch <BRANCH>` | - | Branch target: deploy trigger branch (defaults to the detected default branch) | No | - |
|
|
108
|
+
| `--tag` | - | Generate a tag target coordinator | No | `false` |
|
|
109
|
+
| `--environment <ENVIRONMENT>` | - | GitHub Environment for the plan/deploy jobs | No | - |
|
|
110
|
+
| `--force` | - | Discard hand edits and regenerate | No | `false` |
|
|
111
111
|
|
|
112
112
|
See [Global Options](../cli-reference.md#global-options) for options available to all commands.
|
|
113
113
|
|
|
@@ -340,6 +340,8 @@ export const user = db
|
|
|
340
340
|
});
|
|
341
341
|
```
|
|
342
342
|
|
|
343
|
+
**Note:** `.hooks()` can only be called once on a type. Duplicate type-level calls fail at compile time and throw at runtime.
|
|
344
|
+
|
|
343
345
|
### Validation
|
|
344
346
|
|
|
345
347
|
Add validation rules to fields. Validators receive three arguments (executed after hooks):
|
|
@@ -403,6 +405,8 @@ export const user = db
|
|
|
403
405
|
});
|
|
404
406
|
```
|
|
405
407
|
|
|
408
|
+
**Note:** `.validate()` can only be called once on a type. Duplicate type-level calls fail at compile time and throw at runtime.
|
|
409
|
+
|
|
406
410
|
### Vector Search
|
|
407
411
|
|
|
408
412
|
```typescript
|
|
@@ -434,6 +438,22 @@ export const user = db.type("User", {
|
|
|
434
438
|
|
|
435
439
|
## Type Modifiers
|
|
436
440
|
|
|
441
|
+
Type builder methods that set one type-level configuration can be called only once on the same type. Duplicate calls fail at compile time and throw at runtime. This applies to `.description()`, `.hooks()`, `.validate()`, `.features()`, `.indexes()`, `.files()`, `.permission()`, and `.gqlPermission()`.
|
|
442
|
+
|
|
443
|
+
Conditional assignment is still supported when only one branch calls the method:
|
|
444
|
+
|
|
445
|
+
```typescript
|
|
446
|
+
let user = db.type("User", {
|
|
447
|
+
name: db.string(),
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
if (enableFiles) {
|
|
451
|
+
user = user.files({
|
|
452
|
+
avatar: "profile image",
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
437
457
|
### Composite Indexes
|
|
438
458
|
|
|
439
459
|
```typescript
|
package/package.json
CHANGED