Skip to content

docs(develop-from-scratch): update tutorial for @tailor-platform/sdk#132

Merged
anukiransolur merged 1 commit into
mainfrom
docs/develop-from-scratch-sdk-update
Jun 8, 2026
Merged

docs(develop-from-scratch): update tutorial for @tailor-platform/sdk#132
anukiransolur merged 1 commit into
mainfrom
docs/develop-from-scratch-sdk-update

Conversation

@jackchuka

Copy link
Copy Markdown
Member

What

Updates the develop-from-scratch tutorial to match the current @tailor-platform/sdk API. The pages were already on the new SDK for most things (package name, array enums, resolver: key, @tailor-platform/kysely-type, object-config executor, src/resolver/ path) — these were the remaining stragglers.

Changes

  • All steps: removed workspaceId: process.env.WORKSPACE_ID (and the WORKSPACE_ID guard) from tailor.config.ts. It is no longer a valid defineConfig field — it fails to compile (TS2322: Type 'string' is not assignable to type 'never'). Workspace is now provided at deploy time; the app id is auto-injected on first deploy.
  • Step 1: Deploy instructions now use TAILOR_PLATFORM_WORKSPACE_ID (with --workspace-id shown as an alternative).
  • Step 4: webhook executor body:requestBody:. With body:, the SDK does not recognize the field (callback param is untyped — TS7031 — and the payload is silently dropped). Also fixed the deleted-trigger context field recordoldRecord.

Companion templates PR

The source code these pages link to (tailor-platform/templates/docs/build-from-scratch/sdk) is migrated in tailor-platform/templates#107.

Bring the SDK tutorial in line with the current @tailor-platform/sdk API.

- Remove `workspaceId`/`WORKSPACE_ID` from `tailor.config.ts` in all steps;
  it is no longer a valid `defineConfig` field (fails to compile). Workspace
  is supplied at deploy time via TAILOR_PLATFORM_WORKSPACE_ID / --workspace-id,
  and the app `id` is auto-injected on first deploy.
- Step 1: update Deploy instructions to TAILOR_PLATFORM_WORKSPACE_ID.
- Step 4: webhook executor `body:` -> `requestBody:` (with `body:`, the SDK
  drops the payload and the callback param is untyped); fix deleted-trigger
  context field `record` -> `oldRecord`.
@jackchuka
jackchuka marked this pull request as ready for review June 8, 2026 10:21
@jackchuka
jackchuka requested a review from a team as a code owner June 8, 2026 10:21
@anukiransolur
anukiransolur merged commit d5e7d60 into main Jun 8, 2026
3 checks passed
@anukiransolur
anukiransolur deleted the docs/develop-from-scratch-sdk-update branch June 8, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants