@tailor-platform/sdk 0.0.1 → 0.8.1

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 ADDED
@@ -0,0 +1,790 @@
1
+ # @tailor-platform/sdk
2
+
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#11](https://github.com/tailor-platform/sdk/pull/11) [`64436f0`](https://github.com/tailor-platform/sdk/commit/64436f00d936631a239c8229c1c94be4c8230ece) Thanks [@haru0017](https://github.com/haru0017)! - Make `sp_cert_base64` and `sp_key_base64` optional.
8
+
9
+ ## 0.8.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#3](https://github.com/tailor-platform/sdk/pull/3) [`b9c3dba`](https://github.com/tailor-platform/sdk/commit/b9c3dbaa4b1df4beb27f5b1da7fe23a83a278637) Thanks [@toiroakr](https://github.com/toiroakr)! - chore!: rename tailor-sdk to sdk
14
+
15
+ ## 0.7.6
16
+
17
+ ### Patch Changes
18
+
19
+ - [#730](https://github.com/tailor-platform/sdk/pull/730) [`c737903`](https://github.com/tailor-platform/sdk/commit/c73790316fb70924cfe47ea447782648691eb78e) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: generate watch mode
20
+
21
+ ## 0.7.5
22
+
23
+ ### Patch Changes
24
+
25
+ - [#723](https://github.com/tailor-platform/sdk/pull/723) [`c9233ea`](https://github.com/tailor-platform/sdk/commit/c9233eae05a0c6d09bfb02891f283b278119290c) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add tailordb command with truncate functionality
26
+
27
+ see `tailor-sdk tailordb --help`
28
+
29
+ ## 0.7.4
30
+
31
+ ### Patch Changes
32
+
33
+ - [#721](https://github.com/tailor-platform/sdk/pull/721) [`d83ca38`](https://github.com/tailor-platform/sdk/commit/d83ca38cd9e3f40cbecd342fad6c7d36ece68d5d) Thanks [@remiposo](https://github.com/remiposo)! - Improve Built-in IdP not found error message
34
+
35
+ ## 0.7.3
36
+
37
+ ### Patch Changes
38
+
39
+ - [#718](https://github.com/tailor-platform/sdk/pull/718) [`857811e`](https://github.com/tailor-platform/sdk/commit/857811e3d57b3b86b45bfe3bb0f9a8b231ff28f5) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add personal access token management commands
40
+
41
+ see `tailor-sdk user pat --help`
42
+
43
+ ## 0.7.2
44
+
45
+ ### Patch Changes
46
+
47
+ - [#716](https://github.com/tailor-platform/sdk/pull/716) [`9e094fa`](https://github.com/tailor-platform/sdk/commit/9e094fa6831837063f4ea62722882c26d31dd256) Thanks [@remiposo](https://github.com/remiposo)! - Apply concurrently
48
+
49
+ ## 0.7.1
50
+
51
+ ### Patch Changes
52
+
53
+ - [#713](https://github.com/tailor-platform/sdk/pull/713) [`b1c9e3c`](https://github.com/tailor-platform/sdk/commit/b1c9e3c252d1bbc86701255b92877ba3344ba102) Thanks [@remiposo](https://github.com/remiposo)! - Also accept simple objects instead of `t.object()` in resolver output
54
+
55
+ Previously, you had to always use `t.object()`, but now you can specify output in the same format as input.
56
+
57
+ ```typescript
58
+ // OK
59
+ createResolver({
60
+ output: t.object({
61
+ name: t.string(),
62
+ age: t.int(),
63
+ }),
64
+ });
65
+
66
+ // Also OK (same meaning as above)
67
+ createResolver({
68
+ output: {
69
+ name: t.string(),
70
+ age: t.int(),
71
+ },
72
+ });
73
+ ```
74
+
75
+ ## 0.7.0
76
+
77
+ ### Minor Changes
78
+
79
+ - [#706](https://github.com/tailor-platform/sdk/pull/706) [`6942868`](https://github.com/tailor-platform/sdk/commit/69428681170f6a4a6ec44bdc630be1da456106f0) Thanks [@remiposo](https://github.com/remiposo)! - Changed the interface for `apply` / `generate`
80
+
81
+ **Breaking Changes:**
82
+
83
+ When calling `apply` / `generate` as functions, specifying `configPath` as the first argument was mandatory, but We've made it optional to align with other commands.
84
+
85
+ before:
86
+
87
+ ```ts
88
+ import { apply } from "@tailor-platform/sdk/cli";
89
+
90
+ // default
91
+ await apply("tailor.config.ts");
92
+ // custom path
93
+ await apply("./path/to/tailor.config.ts");
94
+ ```
95
+
96
+ after:
97
+
98
+ ```ts
99
+ import { apply } from "@tailor-platform/sdk/cli";
100
+
101
+ // default
102
+ await apply();
103
+ // custom path
104
+ await apply({ configPath: "./path/to/tailor.config.ts" });
105
+ ```
106
+
107
+ ## 0.6.2
108
+
109
+ ### Patch Changes
110
+
111
+ - [#702](https://github.com/tailor-platform/sdk/pull/702) [`6a4f2b1`](https://github.com/tailor-platform/sdk/commit/6a4f2b174cfaec0e0f76380a4f5855d7b275b916) Thanks [@remiposo](https://github.com/remiposo)! - Apply the default value only when ignores is not specified
112
+
113
+ - [#700](https://github.com/tailor-platform/sdk/pull/700) [`3ab0b98`](https://github.com/tailor-platform/sdk/commit/3ab0b9820fed04d1b19c38c70d938bca79c8ba1b) Thanks [@remiposo](https://github.com/remiposo)! - Exported some commands as functions
114
+
115
+ Exported `tailor-sdk workspace create|delete|list` and `tailor-sdk machineuser list|token` as functions. The allowed options are the same except for CLI-specific ones (e.g., `--format`, `--yes`)
116
+
117
+ ```typescript
118
+ import { machineUserToken } from "@tailor-platform/sdk/cli";
119
+
120
+ const tokens = await machineUserToken({ name: "admin" });
121
+ ```
122
+
123
+ ## 0.6.1
124
+
125
+ ### Patch Changes
126
+
127
+ - [#698](https://github.com/tailor-platform/sdk/pull/698) [`c781753`](https://github.com/tailor-platform/sdk/commit/c781753971a8b3443bce1e03e9d629ce9667e5fa) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: time regex
128
+
129
+ ## 0.6.0
130
+
131
+ ### Minor Changes
132
+
133
+ - [#690](https://github.com/tailor-platform/sdk/pull/690) [`790eb46`](https://github.com/tailor-platform/sdk/commit/790eb46d8830c15e4d76610187da5acd74aad172) Thanks [@remiposo](https://github.com/remiposo)! - Deletion and renaming of builtin generators
134
+
135
+ **Breaking Changes:**
136
+
137
+ Renamed `@tailor/kysely-type` to `@tailor-platform/kysely-type`. Also deleted `@tailor/db-type`.
138
+ If there are any use cases where you're already using `@tailor/db-type` and its deletion would be problematic, please let me know.
139
+ A type error occurs with `defineGenerators()`, so please change the configuration to resolve it.
140
+
141
+ before:
142
+
143
+ ```typescript
144
+ defineGenerators(
145
+ ["@tailor/kysely-type", { distPath: "./generated/kysely.ts" }],
146
+ ["@tailor/db-type", { distPath: "./generated/db.ts" }],
147
+ );
148
+ ```
149
+
150
+ after:
151
+
152
+ ```typescript
153
+ defineGenerators([
154
+ "@tailor-platform/kysely-type",
155
+ { distPath: "./generated/kysely.ts" },
156
+ ]);
157
+ ```
158
+
159
+ ## 0.5.6
160
+
161
+ ### Patch Changes
162
+
163
+ - [#691](https://github.com/tailor-platform/sdk/pull/691) [`4e949b6`](https://github.com/tailor-platform/sdk/commit/4e949b67291ce8775c189a793a99f768ab8904db) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add seed generator
164
+
165
+ Added `@tailor-platform/seed` generator that automatically generates seed data files from TailorDB type definitions. This generator creates:
166
+ - GraphQL Ingest mapping files (`mappings/*.json`) and GraphQL files for bulk data loading via [gql-ingest](https://github.com/jackchuka/gql-ingest)
167
+ - lines-db schema files (`data/*.schema.ts`) for validation via [lines-db](https://github.com/toiroakr/lines-db)
168
+ - Configuration file (`config.yaml`) defining entity dependencies
169
+
170
+ **Usage:**
171
+
172
+ ```typescript
173
+ import { defineGenerators } from "@tailor-platform/sdk";
174
+
175
+ export const generators = defineGenerators([
176
+ ["@tailor-platform/seed", { distPath: "./seed" }],
177
+ ]);
178
+ ```
179
+
180
+ This will generate seed data infrastructure based on your TailorDB types, enabling validation with [`lines-db`](https://github.com/toiroakr/lines-db) and data ingestion with [`gql-ingest`](https://github.com/jackchuka/gql-ingest).
181
+
182
+ ## 0.5.5
183
+
184
+ ### Patch Changes
185
+
186
+ - [#686](https://github.com/tailor-platform/sdk/pull/686) [`e8841b6`](https://github.com/tailor-platform/sdk/commit/e8841b654507b67fcd4b0d1919159bd7c0ab217b) Thanks [@remiposo](https://github.com/remiposo)! - Added ignores option
187
+
188
+ When specifying files for db, resolver, and executor, we can now exclude specific files with `ignores`. Test-related files (`**/*.test.ts`, `**/*.spec.ts`) are excluded by default.
189
+
190
+ ```typescript
191
+ defineConfig({
192
+ db: {
193
+ "my-db": {
194
+ files: ["db/**/*.ts"],
195
+ ignores: ["db/**/*.draft.ts"],
196
+ },
197
+ },
198
+ });
199
+ ```
200
+
201
+ ## 0.5.4
202
+
203
+ ### Patch Changes
204
+
205
+ - [#682](https://github.com/tailor-platform/sdk/pull/682) [`7678f09`](https://github.com/tailor-platform/sdk/commit/7678f09909e4d604604e8845d39e86be3e7fa47a) Thanks [@remiposo](https://github.com/remiposo)! - Renamed from Tailor SDK to Tailor Platform SDK
206
+
207
+ ## 0.5.3
208
+
209
+ ## 0.5.2
210
+
211
+ ### Patch Changes
212
+
213
+ - [#675](https://github.com/tailor-platform/sdk/pull/675) [`8cb1c77`](https://github.com/tailor-platform/sdk/commit/8cb1c77582da17f7fa4171ea15fe4d5aa465a9bd) Thanks [@remiposo](https://github.com/remiposo)! - Added testing guides
214
+
215
+ ## 0.5.1
216
+
217
+ ### Patch Changes
218
+
219
+ - [#672](https://github.com/tailor-platform/sdk/pull/672) [`4730eb1`](https://github.com/tailor-platform/sdk/commit/4730eb1023b6cb3c74483c419242c7a1a4328897) Thanks [@remiposo](https://github.com/remiposo)! - Use `z.custom<Function>` instead of `z.function`
220
+
221
+ - [#673](https://github.com/tailor-platform/sdk/pull/673) [`7672c9b`](https://github.com/tailor-platform/sdk/commit/7672c9b7866a3a0864bd04cda114b546e07d5051) Thanks [@remiposo](https://github.com/remiposo)! - Exported Namespace of kysely-type
222
+
223
+ Exported Namespace to enable retrieving Kysely types like `Selectable<Namespace["main-db"]["User"]>`.
224
+
225
+ ## 0.5.0
226
+
227
+ ### Minor Changes
228
+
229
+ - [#664](https://github.com/tailor-platform/sdk/pull/664) [`f3e99fb`](https://github.com/tailor-platform/sdk/commit/f3e99fb0b7848fbaaf25c876e44e387e5138fb09) Thanks [@remiposo](https://github.com/remiposo)! - Aligned `createExecutor` interface with `createResolver`
230
+
231
+ **Breaking Changes:**
232
+
233
+ `createExecutor` interface has changed significantly.
234
+ Previously, it was defined by chaining `.on` and `.executeFunction`, but it's been changed to simply pass an object similar to `createResolver`.
235
+
236
+ before:
237
+
238
+ ```typescript
239
+ createExecutor("executor-name", "Executor description")
240
+ .on(recordCreatedTrigger(user, ({ newRecord }) => newRecord.age < 18))
241
+ .executeFunction({
242
+ fn: async ({ newRecord }) => {
243
+ // executor logic here
244
+ },
245
+ });
246
+ ```
247
+
248
+ after:
249
+
250
+ ```typescript
251
+ createExecutor({
252
+ name: "executor-name",
253
+ description: "Executor description",
254
+ trigger: recordCreatedTrigger({
255
+ type: user,
256
+ condition: ({ newRecord }) => newRecord.age < 18,
257
+ }),
258
+ operation: {
259
+ kind: "function",
260
+ body: async ({ newRecord }) => {
261
+ // executor logic here
262
+ },
263
+ },
264
+ });
265
+ ```
266
+
267
+ Additionally, the function set in `body` can now be easily retrieved with typing. This should be useful when you want to execute the function in unit tests, for example.
268
+
269
+ ```typescript
270
+ const executor = createExecutor({
271
+ // ...other properties
272
+ operation: {
273
+ kind: "function",
274
+ body: async ({ newRecord }) => {
275
+ // executor logic here
276
+ },
277
+ },
278
+ });
279
+
280
+ const body = executor.operation.body;
281
+ ```
282
+
283
+ ## 0.4.0
284
+
285
+ ### Minor Changes
286
+
287
+ - [#665](https://github.com/tailor-platform/sdk/pull/665) [`16e7cf2`](https://github.com/tailor-platform/sdk/commit/16e7cf2045cfa7dff717ce9001a2925cd5588d5f) Thanks [@toiroakr](https://github.com/toiroakr)! - chore!: rename pipeline -> resolver
288
+
289
+ ## 0.3.0
290
+
291
+ ### Minor Changes
292
+
293
+ - [#661](https://github.com/tailor-platform/sdk/pull/661) [`bf4583c`](https://github.com/tailor-platform/sdk/commit/bf4583cef16bcc7b88118d2814b2beec28b825dd) Thanks [@t](https://github.com/t)! - feat!: remove TailorType and set typename for resolver
294
+
295
+ ## Breaking Changes
296
+
297
+ ### Removed `t.type()` - use plain objects for input and `t.object()` for output
298
+
299
+ The `t.type()` wrapper has been removed from resolver definitions. Input fields are now passed directly as an object, and output uses `t.object()` instead.
300
+
301
+ **Before:**
302
+
303
+ ```typescript
304
+ createResolver({
305
+ name: "add",
306
+ operation: "query",
307
+ input: t.type({
308
+ a: t.int(),
309
+ b: t.int(),
310
+ }),
311
+ output: t.type({
312
+ result: t.int(),
313
+ }),
314
+ body: (context) => {
315
+ return { result: context.input.a + context.input.b };
316
+ },
317
+ });
318
+ ```
319
+
320
+ **After:**
321
+
322
+ ```typescript
323
+ createResolver({
324
+ name: "add",
325
+ operation: "query",
326
+ input: {
327
+ a: t.int(),
328
+ b: t.int(),
329
+ },
330
+ output: t.object({
331
+ result: t.int(),
332
+ }),
333
+ body: (context) => {
334
+ return { result: context.input.a + context.input.b };
335
+ },
336
+ });
337
+ ```
338
+
339
+ ## New Feature
340
+
341
+ ### Added `typeName()` method for custom GraphQL type names
342
+
343
+ You can now set custom GraphQL type names for enum and nested object fields using the `.typeName()` method. This is useful when you want to control the generated GraphQL type names.
344
+
345
+ ```typescript
346
+ createResolver({
347
+ name: "stepChain",
348
+ operation: "query",
349
+ input: {
350
+
351
+ .object({
352
+ name: t.object({
353
+ first: t.string(),
354
+ last: t.string(),
355
+ }),
356
+ activatedAt: t.datetime({ optional: true }),
357
+ })
358
+ .typeName("StepChainUser"),
359
+ },
360
+ output: t.object({
361
+ result: t.string(),
362
+ }),
363
+ body: (context) => {
364
+ return {
365
+ result: `${context.input.user.name.first} ${context.input.user.name.last}`,
366
+ };
367
+ },
368
+ });
369
+ ```
370
+
371
+ ## 0.2.1
372
+
373
+ ### Patch Changes
374
+
375
+ - [#658](https://github.com/tailor-platform/sdk/pull/658) [`affac14`](https://github.com/tailor-platform/sdk/commit/affac14e1a33486da3b1540432172018a0e1ca0c) Thanks [@remiposo](https://github.com/remiposo)! - Supported disabling executors
376
+
377
+ Made it possible to disable executors by setting the disabled option to true.
378
+
379
+ ```typescript
380
+ const disabled = createExecutor("test-executor", {
381
+ disabled: true,
382
+ })
383
+ .on(incomingWebhookTrigger())
384
+ .executeFunction({
385
+ fn: () => {
386
+ // Do something
387
+ },
388
+ });
389
+ ```
390
+
391
+ ## 0.2.0
392
+
393
+ ### Minor Changes
394
+
395
+ - [#650](https://github.com/tailor-platform/sdk/pull/650) [`fcbcc8d`](https://github.com/tailor-platform/sdk/commit/fcbcc8d35c74b7ae0f458487d4779a07292133aa) Thanks [@remiposo](https://github.com/remiposo)! - Removed unused dbNamespace
396
+
397
+ Removed dbNamespace option. While this is a breaking change, it should have minimal impact since it's no longer used. If it's still specified, a type error will occur, so simply remove it.
398
+
399
+ ## 0.1.1
400
+
401
+ ### Patch Changes
402
+
403
+ - [#647](https://github.com/tailor-platform/sdk/pull/647) [`b3f744b`](https://github.com/tailor-platform/sdk/commit/b3f744bd0db1751951389f013f6c2e4a6b97e743) Thanks [@remiposo](https://github.com/remiposo)! - Added show command
404
+
405
+ Added a command to retrieve information about deployed applications. This can be used to obtain application endpoints after deployment in CI and similar environments.
406
+
407
+ ```bash
408
+ tailor-sdk apply --workspace-id <your-workspace-id>
409
+ tailor-sdk show --workspace-id <your-workspace-id> -f json | jq -r '.url'
410
+ ```
411
+
412
+ - [#649](https://github.com/tailor-platform/sdk/pull/649) [`46e0b7b`](https://github.com/tailor-platform/sdk/commit/46e0b7bf56243ea72ae24a477ef9b48779245d49) Thanks [@remiposo](https://github.com/remiposo)! - Added machineuser commands
413
+
414
+ ```bash
415
+ tailor-sdk machineuser list --workspace-id <your-workspace-id>
416
+ tailor-sdk machineuser token <machine-user-name> --workspace-id <your-workspace-id>
417
+ ```
418
+
419
+ ## 0.1.0
420
+
421
+ ### Minor Changes
422
+
423
+ - [#643](https://github.com/tailor-platform/sdk/pull/643) [`793a792`](https://github.com/tailor-platform/sdk/commit/793a7924bd6df4b5c23c5747e1935772ada0c152) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: remove assertNonNull option
424
+
425
+ ## Breaking Changes
426
+
427
+ ### Removed `assertNonNull` option from field definitions
428
+
429
+ The `assertNonNull` option has been removed from field configurations. This option was previously used with `.hooks()` to ensure fields always return non-null values in resolver outputs, even when marked as `optional: true`.
430
+
431
+ **Before:**
432
+
433
+ ```typescript
434
+ const model = db.type("Model", {
435
+ field: db.string({ optional: true, assertNonNull: true }).hooks({
436
+ create: () => "default-value",
437
+ }),
438
+ });
439
+ ```
440
+
441
+ **After:**
442
+
443
+ ```typescript
444
+ const model = db.type("Model", {
445
+ field: db.string().hooks({
446
+ create: () => "default-value",
447
+ }),
448
+ });
449
+ ```
450
+
451
+ When you use `.hooks()` with a `create` hook that always provides a value, the field should be defined as non-nullable (without `optional: true`).
452
+
453
+ ### Serial fields must be non-nullable
454
+
455
+ The `.serial()` method can now only be used on non-nullable fields. If you were using `serial()` with `optional: true`, you must remove the `optional: true` option.
456
+
457
+ **Before:**
458
+
459
+ ```typescript
460
+ const invoice = db.type("Invoice", {
461
+ invoiceNumber: db.string({ optional: true }).serial({
462
+ start: 1000,
463
+ format: "INV-%05d",
464
+ }),
465
+ });
466
+ ```
467
+
468
+ **After:**
469
+
470
+ ```typescript
471
+ const invoice = db.type("Invoice", {
472
+ invoiceNumber: db.string().serial({
473
+ start: 1000,
474
+ format: "INV-%05d",
475
+ }),
476
+ });
477
+ ```
478
+
479
+ ### Hook function argument types
480
+
481
+ The `data` parameter in hook functions now treats all fields as optional (`T | null | undefined`), regardless of whether they are required in the schema.
482
+
483
+ **Before:**
484
+
485
+ ```typescript
486
+ fullAddress: db.string({ optional: true }).hooks({
487
+ create: ({ data }) => `${data.postalCode} ${data.address} ${data.city}`,
488
+ // data.postalCode was guaranteed to be present
489
+ });
490
+ ```
491
+
492
+ **After:**
493
+
494
+ ```typescript
495
+ fullAddress: db.string({ optional: true }).hooks({
496
+ create: ({ data }) =>
497
+ `${data.postalCode ?? ""} ${data.address ?? ""} ${data.city ?? ""}`,
498
+ // All fields may be undefined - use ?? or add null checks
499
+ });
500
+ ```
501
+
502
+ ## 0.0.99
503
+
504
+ ### Patch Changes
505
+
506
+ - [#641](https://github.com/tailor-platform/sdk/pull/641) [`fd8b630`](https://github.com/tailor-platform/sdk/commit/fd8b630a7c92263ee377c8bc2a83f76c338d78e4) Thanks [@remiposo](https://github.com/remiposo)! - Rename workspace destory command
507
+
508
+ - [#645](https://github.com/tailor-platform/sdk/pull/645) [`738a904`](https://github.com/tailor-platform/sdk/commit/738a904d77e5e3f1a65543f2859b0d7f543b2437) Thanks [@remiposo](https://github.com/remiposo)! - Changed to display ID of created workspace
509
+
510
+ Made it easier to retrieve the ID of workspaces created with `tailor-sdk workspace create`.
511
+ This is useful for cases where you want to apply after creating a workspace in CI environments and similar scenarios.
512
+
513
+ ```bash
514
+ tailor-sdk workspace create --name "my-workspace" --region asia-northeast --format json | jq -r '.id'
515
+ ```
516
+
517
+ ## 0.0.98
518
+
519
+ ### Patch Changes
520
+
521
+ - [#639](https://github.com/tailor-platform/sdk/pull/639) [`07ef858`](https://github.com/tailor-platform/sdk/commit/07ef85825b51e4a83ab437bad4148d1b33d7a0f1) Thanks [@remiposo](https://github.com/remiposo)! - Adjusted the output format of user commands
522
+
523
+ ## 0.0.97
524
+
525
+ ### Patch Changes
526
+
527
+ - [#636](https://github.com/tailor-platform/sdk/pull/636) [`ffc1ef7`](https://github.com/tailor-platform/sdk/commit/ffc1ef74e02e9bcf711431709088d1ff2997dd65) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: export generator types
528
+
529
+ ## 0.0.96
530
+
531
+ ### Patch Changes
532
+
533
+ - [#626](https://github.com/tailor-platform/sdk/pull/626) [`b176af1`](https://github.com/tailor-platform/sdk/commit/b176af18c0ab23a4832517921b233d7206a2e6e6) Thanks [@remiposo](https://github.com/remiposo)! - Changed how workspaceID and authentication credentials are specified
534
+
535
+ Previously, authentication credentials were stored in the tailorctl config file (`~/.tailorctl/config`), but we've changed to store them in a new format file (`~/.config/tailor-platform/config.yaml`). When you run SDK commands, migration happens automatically, so generally no user action is required.
536
+ We've also changed how workspaceID is specified during apply. Previously, you specified workspaceID in the configuration file (`tailor.config.ts`), but we've removed this. Instead, please specify `--workspace-id` flag or `TAILOR_PLATFORM_WORKSPACE_ID` environment variable when running the apply command.
537
+
538
+ ```bash
539
+ tailor-sdk apply --workspace-id <your-workspace-id>
540
+ # or
541
+ TAILOR_PLATFORM_WORKSPACE_ID=<your-workspace-id> tailor-sdk apply
542
+ ```
543
+
544
+ - [#634](https://github.com/tailor-platform/sdk/pull/634) [`9b86782`](https://github.com/tailor-platform/sdk/commit/9b8678220375725f0f872deb37ed60a12a1ba124) Thanks [@remiposo](https://github.com/remiposo)! - Added user and profile management commands
545
+
546
+ These commands are primarily for making it easier to manage multiple Tailor Platform accounts. The configured content is saved in `.config/tailor-platform/config.yaml` along with authentication credentials.
547
+
548
+ ```bash
549
+ # Login to Tailor Platform (add a new user)
550
+ tailor-sdk login
551
+
552
+ # Create a new profile
553
+ tailor-sdk profile create <profile-name> --user <user-email> --workspace-id <workspace-id>
554
+
555
+ # Apply using a specific profile (no need to specify workspace ID or user credentials)
556
+ tailor-sdk apply --profile <profile-name>
557
+ # or
558
+ TAILOR_PLATFORM_PROFILE=<profile-name> tailor-sdk apply
559
+ ```
560
+
561
+ ## 0.0.95
562
+
563
+ ### Patch Changes
564
+
565
+ - [#627](https://github.com/tailor-platform/sdk/pull/627) [`6582379`](https://github.com/tailor-platform/sdk/commit/6582379d81c7d5469e27d672c9313a1cb9b81c50) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: unnest resolver input type
566
+
567
+ ## Breaking Changes
568
+
569
+ The structure of resolver input arguments in GraphQL queries/mutations has changed. Previously, all input fields were nested under a single `input` argument, but now they are passed as flat, top-level arguments.
570
+
571
+ ### Migration Guide
572
+
573
+ You have two migration options:
574
+
575
+ #### Option 1: Update GraphQL queries
576
+
577
+ Update your GraphQL queries to pass arguments as flat parameters.
578
+
579
+ **Before:**
580
+
581
+ ```gql
582
+ query {
583
+ add(input: { a: 1, b: 2 }) {
584
+ result
585
+ }
586
+ }
587
+ ```
588
+
589
+ **After:**
590
+
591
+ ```gql
592
+ query {
593
+ add(a: 1, b: 2) {
594
+ result
595
+ }
596
+ }
597
+ ```
598
+
599
+ #### Option 2: Wrap input type to maintain existing GraphQL API
600
+
601
+ If you need to maintain backward compatibility with existing GraphQL queries, wrap your input type in a single `input` field:
602
+
603
+ ```typescript
604
+ createResolver({
605
+ name: "add",
606
+ operation: "query",
607
+ input: t.type({
608
+ input: t.object({
609
+ a: t.int(),
610
+ b: t.int(),
611
+ }),
612
+ }),
613
+ body: (context) => {
614
+ return { result: context.input.input.a + context.input.input.b };
615
+ },
616
+ output: t.type({ result: t.int() }),
617
+ });
618
+ ```
619
+
620
+ This way, your existing GraphQL queries with `add(input: { a: 1, b: 2 })` will continue to work.
621
+
622
+ ## 0.0.94
623
+
624
+ ### Patch Changes
625
+
626
+ - [#623](https://github.com/tailor-platform/sdk/pull/623) [`452a5d7`](https://github.com/tailor-platform/sdk/commit/452a5d7904d1b04b26638fce337d865b358f1f5b) Thanks [@remiposo](https://github.com/remiposo)! - Made all commands accept the --env-file flag
627
+
628
+ - [#621](https://github.com/tailor-platform/sdk/pull/621) [`6291874`](https://github.com/tailor-platform/sdk/commit/629187471b0189331445ad179f9cfae91902a0a4) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: validate resolver input
629
+
630
+ - [#625](https://github.com/tailor-platform/sdk/pull/625) [`d08ec14`](https://github.com/tailor-platform/sdk/commit/d08ec14886f91a71c6358d58db7e0f16d3f06ebe) Thanks [@remiposo](https://github.com/remiposo)! - Display stack trace only when the --verbose flag is specified
631
+
632
+ ## 0.0.93
633
+
634
+ ### Patch Changes
635
+
636
+ - [#617](https://github.com/tailor-platform/sdk/pull/617) [`d45fe83`](https://github.com/tailor-platform/sdk/commit/d45fe834398426c94e5239e9bc94a5736df87016) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add tailordb.Client mock for apply
637
+
638
+ - [#613](https://github.com/tailor-platform/sdk/pull/613) [`62c8fe3`](https://github.com/tailor-platform/sdk/commit/62c8fe35e50e14778db57ccd8e517b1b44dbdfbd) Thanks [@remiposo](https://github.com/remiposo)! - chore: Update documentation structure
639
+
640
+ ## 0.0.92
641
+
642
+ ### Patch Changes
643
+
644
+ - [#607](https://github.com/tailor-platform/sdk/pull/607) [`ab2cadd`](https://github.com/tailor-platform/sdk/commit/ab2cadd9f92ac488ae1963d0768e2ca96ec66e0f) Thanks [@toiroakr](https://github.com/toiroakr)! - refactor: move inflection to out of configuration
645
+
646
+ ## 0.0.91
647
+
648
+ ### Patch Changes
649
+
650
+ - [#601](https://github.com/tailor-platform/sdk/pull/601) [`4f2803a`](https://github.com/tailor-platform/sdk/commit/4f2803a1ab00a28d466f86764955656e8ea23829) Thanks [@remiposo](https://github.com/remiposo)! - Add workspace management comand
651
+
652
+ - [#606](https://github.com/tailor-platform/sdk/pull/606) [`f1be4bf`](https://github.com/tailor-platform/sdk/commit/f1be4bf0f324e5ea1896fa4c1a9415b48eb0b134) Thanks [@toiroakr](https://github.com/toiroakr)! - feat!: kysely-db generator renewal
653
+
654
+ - [#604](https://github.com/tailor-platform/sdk/pull/604) [`491626b`](https://github.com/tailor-platform/sdk/commit/491626b65bbde4bfebe45b542ef3bcea7b13fde1) Thanks [@remiposo](https://github.com/remiposo)! - Add login/logout command
655
+
656
+ ## 0.0.90
657
+
658
+ ### Patch Changes
659
+
660
+ - [#598](https://github.com/tailor-platform/sdk/pull/598) [`7b2ffaf`](https://github.com/tailor-platform/sdk/commit/7b2ffaf47b8f324bf489c7734f566be320dd69cc) Thanks [@toiroakr](https://github.com/toiroakr)! - chore: improve url schema
661
+
662
+ - [#600](https://github.com/tailor-platform/sdk/pull/600) [`ec16341`](https://github.com/tailor-platform/sdk/commit/ec16341c0d5aaf5c786f03216ab5642ff4fe7683) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: remove callbackUrl from defineStaticWebsite
663
+
664
+ ## 0.0.89
665
+
666
+ ### Patch Changes
667
+
668
+ - [#597](https://github.com/tailor-platform/sdk/pull/597) [`36ea41c`](https://github.com/tailor-platform/sdk/commit/36ea41c4fea9c4d6ff4b5b1d7fd8582ceae09c89) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: stricter define function types
669
+
670
+ - [#595](https://github.com/tailor-platform/sdk/pull/595) [`2d3f019`](https://github.com/tailor-platform/sdk/commit/2d3f01977bcf271a8874fc5f6d273d6c1c1561f8) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add defineIdp
671
+
672
+ ## 0.0.88
673
+
674
+ ### Patch Changes
675
+
676
+ - [#594](https://github.com/tailor-platform/sdk/pull/594) [`ac244cd`](https://github.com/tailor-platform/sdk/commit/ac244cd7769cfe92a962ea48918559dd403991df) Thanks [@toiroakr](https://github.com/toiroakr)! - feat: add defineStaticWebsite
677
+
678
+ - [#589](https://github.com/tailor-platform/sdk/pull/589) [`5195548`](https://github.com/tailor-platform/sdk/commit/5195548158aa61fe7b33a75a4812d5345adde3da) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: type guard for workspaceId
679
+
680
+ ## 0.0.87
681
+
682
+ ### Patch Changes
683
+
684
+ - [#585](https://github.com/tailor-platform/sdk/pull/585) [`3f13d44`](https://github.com/tailor-platform/sdk/commit/3f13d4463047862cfe438f71d87629e49320c6eb) Thanks [@toiroakr](https://github.com/toiroakr)! - chore: update resolver schema
685
+
686
+ ## 0.0.86
687
+
688
+ ### Patch Changes
689
+
690
+ - [#575](https://github.com/tailor-platform/sdk/pull/575) [`0d64a86`](https://github.com/tailor-platform/sdk/commit/0d64a869766049ffb8462dace6222db53e23dbce) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: strict resolver output type
691
+
692
+ ## 0.0.85
693
+
694
+ ### Patch Changes
695
+
696
+ - [#573](https://github.com/tailor-platform/sdk/pull/573) [`11cae3e`](https://github.com/tailor-platform/sdk/commit/11cae3e8aa89fc8d71993a0bb9e28c02123f185f) Thanks [@toiroakr](https://github.com/toiroakr)! - fix: generated type reference
697
+
698
+ ## 0.0.84
699
+
700
+ ### Patch Changes
701
+
702
+ - [#570](https://github.com/tailor-platform/sdk/pull/570) [`20b760e`](https://github.com/tailor-platform/sdk/commit/20b760e9b3f85e200ed9ec7d1bef73efbc2f1299) Thanks [@remiposo](https://github.com/remiposo)! - Use type import in kysely generator
703
+
704
+ ## 0.0.83
705
+
706
+ ### Patch Changes
707
+
708
+ - [#559](https://github.com/tailor-platform/sdk/pull/559) [`ebcb667`](https://github.com/tailor-platform/sdk/commit/ebcb6674bbc1fc3ac819bb0e2930255a660ade1b) Thanks [@toiroakr](https://github.com/toiroakr)! - Remove steps from resolver
709
+
710
+ ## 0.0.82
711
+
712
+ ### Patch Changes
713
+
714
+ - [#563](https://github.com/tailor-platform/sdk/pull/563) [`14333f9`](https://github.com/tailor-platform/sdk/commit/14333f9eac7eb53f4856388c367b8e00e16e86de) Thanks [@remiposo](https://github.com/remiposo)! - Fixed to set more appropriate GraphQL types in pipeline input / output
715
+
716
+ - [#565](https://github.com/tailor-platform/sdk/pull/565) [`dbaa31e`](https://github.com/tailor-platform/sdk/commit/dbaa31e74522fd34dde3bd3e3b71b4190cfdf514) Thanks [@remiposo](https://github.com/remiposo)! - fix: ensure the vault and secret exist
717
+
718
+ - [#558](https://github.com/tailor-platform/sdk/pull/558) [`ce877a1`](https://github.com/tailor-platform/sdk/commit/ce877a1ff421e8f3f902d3902cfa66b3ea2bae51) Thanks [@remiposo](https://github.com/remiposo)! - feat: Remove client from exectutor args when dbNamespace is not specified
719
+
720
+ ## 0.0.81
721
+
722
+ ### Patch Changes
723
+
724
+ - [#552](https://github.com/tailor-platform/sdk/pull/552) [`c9f10c5`](https://github.com/tailor-platform/sdk/commit/c9f10c5ca80ebb1e282b3639e2b7a24b4aefba7d) Thanks [@toiroakr](https://github.com/toiroakr)! - Simplified permission definitions with automatic type generation
725
+
726
+ ## 0.0.80
727
+
728
+ ### Patch Changes
729
+
730
+ - [#548](https://github.com/tailor-platform/sdk/pull/548) [`ce834be`](https://github.com/tailor-platform/sdk/commit/ce834bec7c7d80a3f56a520339a569fef9225888) Thanks [@toiroakr](https://github.com/toiroakr)! - kysely-type generator: support assertNonNull
731
+
732
+ ## 0.0.79
733
+
734
+ ### Patch Changes
735
+
736
+ - [#545](https://github.com/tailor-platform/sdk/pull/545) [`e82a038`](https://github.com/tailor-platform/sdk/commit/e82a038b022ebf58dd377a247b7bdf1fa608701c) Thanks [@remiposo](https://github.com/remiposo)! - chore: Add LICENSE
737
+
738
+ ## 0.0.78
739
+
740
+ ### Patch Changes
741
+
742
+ - [#535](https://github.com/tailor-platform/sdk/pull/535) [`fd011ba`](https://github.com/tailor-platform/sdk/commit/fd011ba2a0c3719d87a3e5434f86aacc11a52ba8) Thanks [@remiposo](https://github.com/remiposo)! - fix: remove unusable variables from executeFunction/executeJobFunction
743
+
744
+ - [#527](https://github.com/tailor-platform/sdk/pull/527) [`f9eae29`](https://github.com/tailor-platform/sdk/commit/f9eae29e80238e9783e831a7ec02c5a3583d03b6) Thanks [@remiposo](https://github.com/remiposo)! - refactor: Executor service
745
+
746
+ ## 0.0.77
747
+
748
+ ### Patch Changes
749
+
750
+ - [#524](https://github.com/tailor-platform/sdk/pull/524) [`5f0272a`](https://github.com/tailor-platform/sdk/commit/5f0272a35b6ab24b69f781123477bc42e50e02cd) Thanks [@remiposo](https://github.com/remiposo)! - test: add incomingWebhookTrigger test cases
751
+
752
+ ## 0.0.76
753
+
754
+ ### Patch Changes
755
+
756
+ - [#521](https://github.com/tailor-platform/sdk/pull/521) [`f380645`](https://github.com/tailor-platform/sdk/commit/f3806455815ed4efd80cfe11428bd7862c77b401) Thanks [@remiposo](https://github.com/remiposo)! - chore: Update CHANGELOG.md format
757
+
758
+ ## 0.0.75
759
+
760
+ ### Patch Changes
761
+
762
+ - dca9f5b: Separate generator config from defineConfig
763
+
764
+ ## 0.0.74
765
+
766
+ ### Patch Changes
767
+
768
+ - e41001c: refactor: Remove any related to relation
769
+ - c1a972a: fix: Fixed the issue where fn arguments became never for scheduleTrigger
770
+
771
+ ## 0.0.73
772
+
773
+ ### Patch Changes
774
+
775
+ - 9be7344: Change defineConfig to be tailored specifically for a single app
776
+ - 6d5b956: Fixed deps so that the cron type for schedule triggers works properly
777
+
778
+ ## 0.0.72
779
+
780
+ ### Patch Changes
781
+
782
+ - ea06320: Fixed the issue where relations couldn't be set to fields other than `id`
783
+
784
+ Fixed deployment errors caused by always trying to set foreign keys to `id`, and now foreign keys are set to the correct fields.
785
+
786
+ ## 0.0.71
787
+
788
+ ### Patch Changes
789
+
790
+ - 9f7a52c: Add CHANGELOG.md