@tailor-platform/sdk 0.0.1 → 0.8.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 ADDED
@@ -0,0 +1,784 @@
1
+ # @tailor-platform/sdk
2
+
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#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
8
+
9
+ ## 0.7.6
10
+
11
+ ### Patch Changes
12
+
13
+ - [#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
14
+
15
+ ## 0.7.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [#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
20
+
21
+ see `tailor-sdk tailordb --help`
22
+
23
+ ## 0.7.4
24
+
25
+ ### Patch Changes
26
+
27
+ - [#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
28
+
29
+ ## 0.7.3
30
+
31
+ ### Patch Changes
32
+
33
+ - [#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
34
+
35
+ see `tailor-sdk user pat --help`
36
+
37
+ ## 0.7.2
38
+
39
+ ### Patch Changes
40
+
41
+ - [#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
42
+
43
+ ## 0.7.1
44
+
45
+ ### Patch Changes
46
+
47
+ - [#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
48
+
49
+ Previously, you had to always use `t.object()`, but now you can specify output in the same format as input.
50
+
51
+ ```typescript
52
+ // OK
53
+ createResolver({
54
+ output: t.object({
55
+ name: t.string(),
56
+ age: t.int(),
57
+ }),
58
+ });
59
+
60
+ // Also OK (same meaning as above)
61
+ createResolver({
62
+ output: {
63
+ name: t.string(),
64
+ age: t.int(),
65
+ },
66
+ });
67
+ ```
68
+
69
+ ## 0.7.0
70
+
71
+ ### Minor Changes
72
+
73
+ - [#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`
74
+
75
+ **Breaking Changes:**
76
+
77
+ 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.
78
+
79
+ before:
80
+
81
+ ```ts
82
+ import { apply } from "@tailor-platform/sdk/cli";
83
+
84
+ // default
85
+ await apply("tailor.config.ts");
86
+ // custom path
87
+ await apply("./path/to/tailor.config.ts");
88
+ ```
89
+
90
+ after:
91
+
92
+ ```ts
93
+ import { apply } from "@tailor-platform/sdk/cli";
94
+
95
+ // default
96
+ await apply();
97
+ // custom path
98
+ await apply({ configPath: "./path/to/tailor.config.ts" });
99
+ ```
100
+
101
+ ## 0.6.2
102
+
103
+ ### Patch Changes
104
+
105
+ - [#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
106
+
107
+ - [#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
108
+
109
+ 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`)
110
+
111
+ ```typescript
112
+ import { machineUserToken } from "@tailor-platform/sdk/cli";
113
+
114
+ const tokens = await machineUserToken({ name: "admin" });
115
+ ```
116
+
117
+ ## 0.6.1
118
+
119
+ ### Patch Changes
120
+
121
+ - [#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
122
+
123
+ ## 0.6.0
124
+
125
+ ### Minor Changes
126
+
127
+ - [#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
128
+
129
+ **Breaking Changes:**
130
+
131
+ Renamed `@tailor/kysely-type` to `@tailor-platform/kysely-type`. Also deleted `@tailor/db-type`.
132
+ If there are any use cases where you're already using `@tailor/db-type` and its deletion would be problematic, please let me know.
133
+ A type error occurs with `defineGenerators()`, so please change the configuration to resolve it.
134
+
135
+ before:
136
+
137
+ ```typescript
138
+ defineGenerators(
139
+ ["@tailor/kysely-type", { distPath: "./generated/kysely.ts" }],
140
+ ["@tailor/db-type", { distPath: "./generated/db.ts" }],
141
+ );
142
+ ```
143
+
144
+ after:
145
+
146
+ ```typescript
147
+ defineGenerators([
148
+ "@tailor-platform/kysely-type",
149
+ { distPath: "./generated/kysely.ts" },
150
+ ]);
151
+ ```
152
+
153
+ ## 0.5.6
154
+
155
+ ### Patch Changes
156
+
157
+ - [#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
158
+
159
+ Added `@tailor-platform/seed` generator that automatically generates seed data files from TailorDB type definitions. This generator creates:
160
+ - GraphQL Ingest mapping files (`mappings/*.json`) and GraphQL files for bulk data loading via [gql-ingest](https://github.com/jackchuka/gql-ingest)
161
+ - lines-db schema files (`data/*.schema.ts`) for validation via [lines-db](https://github.com/toiroakr/lines-db)
162
+ - Configuration file (`config.yaml`) defining entity dependencies
163
+
164
+ **Usage:**
165
+
166
+ ```typescript
167
+ import { defineGenerators } from "@tailor-platform/sdk";
168
+
169
+ export const generators = defineGenerators([
170
+ ["@tailor-platform/seed", { distPath: "./seed" }],
171
+ ]);
172
+ ```
173
+
174
+ 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).
175
+
176
+ ## 0.5.5
177
+
178
+ ### Patch Changes
179
+
180
+ - [#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
181
+
182
+ 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.
183
+
184
+ ```typescript
185
+ defineConfig({
186
+ db: {
187
+ "my-db": {
188
+ files: ["db/**/*.ts"],
189
+ ignores: ["db/**/*.draft.ts"],
190
+ },
191
+ },
192
+ });
193
+ ```
194
+
195
+ ## 0.5.4
196
+
197
+ ### Patch Changes
198
+
199
+ - [#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
200
+
201
+ ## 0.5.3
202
+
203
+ ## 0.5.2
204
+
205
+ ### Patch Changes
206
+
207
+ - [#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
208
+
209
+ ## 0.5.1
210
+
211
+ ### Patch Changes
212
+
213
+ - [#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`
214
+
215
+ - [#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
216
+
217
+ Exported Namespace to enable retrieving Kysely types like `Selectable<Namespace["main-db"]["User"]>`.
218
+
219
+ ## 0.5.0
220
+
221
+ ### Minor Changes
222
+
223
+ - [#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`
224
+
225
+ **Breaking Changes:**
226
+
227
+ `createExecutor` interface has changed significantly.
228
+ Previously, it was defined by chaining `.on` and `.executeFunction`, but it's been changed to simply pass an object similar to `createResolver`.
229
+
230
+ before:
231
+
232
+ ```typescript
233
+ createExecutor("executor-name", "Executor description")
234
+ .on(recordCreatedTrigger(user, ({ newRecord }) => newRecord.age < 18))
235
+ .executeFunction({
236
+ fn: async ({ newRecord }) => {
237
+ // executor logic here
238
+ },
239
+ });
240
+ ```
241
+
242
+ after:
243
+
244
+ ```typescript
245
+ createExecutor({
246
+ name: "executor-name",
247
+ description: "Executor description",
248
+ trigger: recordCreatedTrigger({
249
+ type: user,
250
+ condition: ({ newRecord }) => newRecord.age < 18,
251
+ }),
252
+ operation: {
253
+ kind: "function",
254
+ body: async ({ newRecord }) => {
255
+ // executor logic here
256
+ },
257
+ },
258
+ });
259
+ ```
260
+
261
+ 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.
262
+
263
+ ```typescript
264
+ const executor = createExecutor({
265
+ // ...other properties
266
+ operation: {
267
+ kind: "function",
268
+ body: async ({ newRecord }) => {
269
+ // executor logic here
270
+ },
271
+ },
272
+ });
273
+
274
+ const body = executor.operation.body;
275
+ ```
276
+
277
+ ## 0.4.0
278
+
279
+ ### Minor Changes
280
+
281
+ - [#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
282
+
283
+ ## 0.3.0
284
+
285
+ ### Minor Changes
286
+
287
+ - [#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
288
+
289
+ ## Breaking Changes
290
+
291
+ ### Removed `t.type()` - use plain objects for input and `t.object()` for output
292
+
293
+ 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.
294
+
295
+ **Before:**
296
+
297
+ ```typescript
298
+ createResolver({
299
+ name: "add",
300
+ operation: "query",
301
+ input: t.type({
302
+ a: t.int(),
303
+ b: t.int(),
304
+ }),
305
+ output: t.type({
306
+ result: t.int(),
307
+ }),
308
+ body: (context) => {
309
+ return { result: context.input.a + context.input.b };
310
+ },
311
+ });
312
+ ```
313
+
314
+ **After:**
315
+
316
+ ```typescript
317
+ createResolver({
318
+ name: "add",
319
+ operation: "query",
320
+ input: {
321
+ a: t.int(),
322
+ b: t.int(),
323
+ },
324
+ output: t.object({
325
+ result: t.int(),
326
+ }),
327
+ body: (context) => {
328
+ return { result: context.input.a + context.input.b };
329
+ },
330
+ });
331
+ ```
332
+
333
+ ## New Feature
334
+
335
+ ### Added `typeName()` method for custom GraphQL type names
336
+
337
+ 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.
338
+
339
+ ```typescript
340
+ createResolver({
341
+ name: "stepChain",
342
+ operation: "query",
343
+ input: {
344
+
345
+ .object({
346
+ name: t.object({
347
+ first: t.string(),
348
+ last: t.string(),
349
+ }),
350
+ activatedAt: t.datetime({ optional: true }),
351
+ })
352
+ .typeName("StepChainUser"),
353
+ },
354
+ output: t.object({
355
+ result: t.string(),
356
+ }),
357
+ body: (context) => {
358
+ return {
359
+ result: `${context.input.user.name.first} ${context.input.user.name.last}`,
360
+ };
361
+ },
362
+ });
363
+ ```
364
+
365
+ ## 0.2.1
366
+
367
+ ### Patch Changes
368
+
369
+ - [#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
370
+
371
+ Made it possible to disable executors by setting the disabled option to true.
372
+
373
+ ```typescript
374
+ const disabled = createExecutor("test-executor", {
375
+ disabled: true,
376
+ })
377
+ .on(incomingWebhookTrigger())
378
+ .executeFunction({
379
+ fn: () => {
380
+ // Do something
381
+ },
382
+ });
383
+ ```
384
+
385
+ ## 0.2.0
386
+
387
+ ### Minor Changes
388
+
389
+ - [#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
390
+
391
+ 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.
392
+
393
+ ## 0.1.1
394
+
395
+ ### Patch Changes
396
+
397
+ - [#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
398
+
399
+ Added a command to retrieve information about deployed applications. This can be used to obtain application endpoints after deployment in CI and similar environments.
400
+
401
+ ```bash
402
+ tailor-sdk apply --workspace-id <your-workspace-id>
403
+ tailor-sdk show --workspace-id <your-workspace-id> -f json | jq -r '.url'
404
+ ```
405
+
406
+ - [#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
407
+
408
+ ```bash
409
+ tailor-sdk machineuser list --workspace-id <your-workspace-id>
410
+ tailor-sdk machineuser token <machine-user-name> --workspace-id <your-workspace-id>
411
+ ```
412
+
413
+ ## 0.1.0
414
+
415
+ ### Minor Changes
416
+
417
+ - [#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
418
+
419
+ ## Breaking Changes
420
+
421
+ ### Removed `assertNonNull` option from field definitions
422
+
423
+ 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`.
424
+
425
+ **Before:**
426
+
427
+ ```typescript
428
+ const model = db.type("Model", {
429
+ field: db.string({ optional: true, assertNonNull: true }).hooks({
430
+ create: () => "default-value",
431
+ }),
432
+ });
433
+ ```
434
+
435
+ **After:**
436
+
437
+ ```typescript
438
+ const model = db.type("Model", {
439
+ field: db.string().hooks({
440
+ create: () => "default-value",
441
+ }),
442
+ });
443
+ ```
444
+
445
+ When you use `.hooks()` with a `create` hook that always provides a value, the field should be defined as non-nullable (without `optional: true`).
446
+
447
+ ### Serial fields must be non-nullable
448
+
449
+ 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.
450
+
451
+ **Before:**
452
+
453
+ ```typescript
454
+ const invoice = db.type("Invoice", {
455
+ invoiceNumber: db.string({ optional: true }).serial({
456
+ start: 1000,
457
+ format: "INV-%05d",
458
+ }),
459
+ });
460
+ ```
461
+
462
+ **After:**
463
+
464
+ ```typescript
465
+ const invoice = db.type("Invoice", {
466
+ invoiceNumber: db.string().serial({
467
+ start: 1000,
468
+ format: "INV-%05d",
469
+ }),
470
+ });
471
+ ```
472
+
473
+ ### Hook function argument types
474
+
475
+ The `data` parameter in hook functions now treats all fields as optional (`T | null | undefined`), regardless of whether they are required in the schema.
476
+
477
+ **Before:**
478
+
479
+ ```typescript
480
+ fullAddress: db.string({ optional: true }).hooks({
481
+ create: ({ data }) => `${data.postalCode} ${data.address} ${data.city}`,
482
+ // data.postalCode was guaranteed to be present
483
+ });
484
+ ```
485
+
486
+ **After:**
487
+
488
+ ```typescript
489
+ fullAddress: db.string({ optional: true }).hooks({
490
+ create: ({ data }) =>
491
+ `${data.postalCode ?? ""} ${data.address ?? ""} ${data.city ?? ""}`,
492
+ // All fields may be undefined - use ?? or add null checks
493
+ });
494
+ ```
495
+
496
+ ## 0.0.99
497
+
498
+ ### Patch Changes
499
+
500
+ - [#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
501
+
502
+ - [#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
503
+
504
+ Made it easier to retrieve the ID of workspaces created with `tailor-sdk workspace create`.
505
+ This is useful for cases where you want to apply after creating a workspace in CI environments and similar scenarios.
506
+
507
+ ```bash
508
+ tailor-sdk workspace create --name "my-workspace" --region asia-northeast --format json | jq -r '.id'
509
+ ```
510
+
511
+ ## 0.0.98
512
+
513
+ ### Patch Changes
514
+
515
+ - [#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
516
+
517
+ ## 0.0.97
518
+
519
+ ### Patch Changes
520
+
521
+ - [#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
522
+
523
+ ## 0.0.96
524
+
525
+ ### Patch Changes
526
+
527
+ - [#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
528
+
529
+ 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.
530
+ 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.
531
+
532
+ ```bash
533
+ tailor-sdk apply --workspace-id <your-workspace-id>
534
+ # or
535
+ TAILOR_PLATFORM_WORKSPACE_ID=<your-workspace-id> tailor-sdk apply
536
+ ```
537
+
538
+ - [#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
539
+
540
+ 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.
541
+
542
+ ```bash
543
+ # Login to Tailor Platform (add a new user)
544
+ tailor-sdk login
545
+
546
+ # Create a new profile
547
+ tailor-sdk profile create <profile-name> --user <user-email> --workspace-id <workspace-id>
548
+
549
+ # Apply using a specific profile (no need to specify workspace ID or user credentials)
550
+ tailor-sdk apply --profile <profile-name>
551
+ # or
552
+ TAILOR_PLATFORM_PROFILE=<profile-name> tailor-sdk apply
553
+ ```
554
+
555
+ ## 0.0.95
556
+
557
+ ### Patch Changes
558
+
559
+ - [#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
560
+
561
+ ## Breaking Changes
562
+
563
+ 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.
564
+
565
+ ### Migration Guide
566
+
567
+ You have two migration options:
568
+
569
+ #### Option 1: Update GraphQL queries
570
+
571
+ Update your GraphQL queries to pass arguments as flat parameters.
572
+
573
+ **Before:**
574
+
575
+ ```gql
576
+ query {
577
+ add(input: { a: 1, b: 2 }) {
578
+ result
579
+ }
580
+ }
581
+ ```
582
+
583
+ **After:**
584
+
585
+ ```gql
586
+ query {
587
+ add(a: 1, b: 2) {
588
+ result
589
+ }
590
+ }
591
+ ```
592
+
593
+ #### Option 2: Wrap input type to maintain existing GraphQL API
594
+
595
+ If you need to maintain backward compatibility with existing GraphQL queries, wrap your input type in a single `input` field:
596
+
597
+ ```typescript
598
+ createResolver({
599
+ name: "add",
600
+ operation: "query",
601
+ input: t.type({
602
+ input: t.object({
603
+ a: t.int(),
604
+ b: t.int(),
605
+ }),
606
+ }),
607
+ body: (context) => {
608
+ return { result: context.input.input.a + context.input.input.b };
609
+ },
610
+ output: t.type({ result: t.int() }),
611
+ });
612
+ ```
613
+
614
+ This way, your existing GraphQL queries with `add(input: { a: 1, b: 2 })` will continue to work.
615
+
616
+ ## 0.0.94
617
+
618
+ ### Patch Changes
619
+
620
+ - [#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
621
+
622
+ - [#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
623
+
624
+ - [#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
625
+
626
+ ## 0.0.93
627
+
628
+ ### Patch Changes
629
+
630
+ - [#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
631
+
632
+ - [#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
633
+
634
+ ## 0.0.92
635
+
636
+ ### Patch Changes
637
+
638
+ - [#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
639
+
640
+ ## 0.0.91
641
+
642
+ ### Patch Changes
643
+
644
+ - [#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
645
+
646
+ - [#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
647
+
648
+ - [#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
649
+
650
+ ## 0.0.90
651
+
652
+ ### Patch Changes
653
+
654
+ - [#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
655
+
656
+ - [#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
657
+
658
+ ## 0.0.89
659
+
660
+ ### Patch Changes
661
+
662
+ - [#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
663
+
664
+ - [#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
665
+
666
+ ## 0.0.88
667
+
668
+ ### Patch Changes
669
+
670
+ - [#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
671
+
672
+ - [#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
673
+
674
+ ## 0.0.87
675
+
676
+ ### Patch Changes
677
+
678
+ - [#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
679
+
680
+ ## 0.0.86
681
+
682
+ ### Patch Changes
683
+
684
+ - [#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
685
+
686
+ ## 0.0.85
687
+
688
+ ### Patch Changes
689
+
690
+ - [#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
691
+
692
+ ## 0.0.84
693
+
694
+ ### Patch Changes
695
+
696
+ - [#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
697
+
698
+ ## 0.0.83
699
+
700
+ ### Patch Changes
701
+
702
+ - [#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
703
+
704
+ ## 0.0.82
705
+
706
+ ### Patch Changes
707
+
708
+ - [#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
709
+
710
+ - [#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
711
+
712
+ - [#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
713
+
714
+ ## 0.0.81
715
+
716
+ ### Patch Changes
717
+
718
+ - [#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
719
+
720
+ ## 0.0.80
721
+
722
+ ### Patch Changes
723
+
724
+ - [#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
725
+
726
+ ## 0.0.79
727
+
728
+ ### Patch Changes
729
+
730
+ - [#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
731
+
732
+ ## 0.0.78
733
+
734
+ ### Patch Changes
735
+
736
+ - [#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
737
+
738
+ - [#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
739
+
740
+ ## 0.0.77
741
+
742
+ ### Patch Changes
743
+
744
+ - [#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
745
+
746
+ ## 0.0.76
747
+
748
+ ### Patch Changes
749
+
750
+ - [#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
751
+
752
+ ## 0.0.75
753
+
754
+ ### Patch Changes
755
+
756
+ - dca9f5b: Separate generator config from defineConfig
757
+
758
+ ## 0.0.74
759
+
760
+ ### Patch Changes
761
+
762
+ - e41001c: refactor: Remove any related to relation
763
+ - c1a972a: fix: Fixed the issue where fn arguments became never for scheduleTrigger
764
+
765
+ ## 0.0.73
766
+
767
+ ### Patch Changes
768
+
769
+ - 9be7344: Change defineConfig to be tailored specifically for a single app
770
+ - 6d5b956: Fixed deps so that the cron type for schedule triggers works properly
771
+
772
+ ## 0.0.72
773
+
774
+ ### Patch Changes
775
+
776
+ - ea06320: Fixed the issue where relations couldn't be set to fields other than `id`
777
+
778
+ Fixed deployment errors caused by always trying to set foreign keys to `id`, and now foreign keys are set to the correct fields.
779
+
780
+ ## 0.0.71
781
+
782
+ ### Patch Changes
783
+
784
+ - 9f7a52c: Add CHANGELOG.md