@tailor-platform/sdk 1.71.0 → 1.73.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 +46 -0
- package/dist/aigateway-B3oZZE6v.mjs +15 -0
- package/dist/aigateway-B3oZZE6v.mjs.map +1 -0
- package/dist/application-BhRnH42h.mjs +3 -0
- package/dist/{application-DmjIKQ-a.mjs → application-Dxhdq_nu.mjs} +21 -19
- package/dist/application-Dxhdq_nu.mjs.map +1 -0
- package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
- package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
- package/dist/{authconnection-D7lsvsKY.mjs → authconnection-BGQM8FZI.mjs} +2 -3
- package/dist/{authconnection-D7lsvsKY.mjs.map → authconnection-BGQM8FZI.mjs.map} +1 -1
- package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
- package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
- package/dist/cli/cache/bundle-cache.d.mts +1 -0
- package/dist/cli/cache/store.d.mts +1 -0
- package/dist/cli/cache/types.d.mts +1 -0
- package/dist/cli/commands/api/api-call.d.mts +19 -0
- package/dist/cli/commands/api/index.d.mts +3 -0
- package/dist/cli/commands/deploy/aigateway.d.mts +1 -0
- package/dist/cli/commands/deploy/application.d.mts +1 -0
- package/dist/cli/commands/deploy/auth.d.mts +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +24 -0
- package/dist/cli/commands/deploy/executor.d.mts +1 -0
- package/dist/cli/commands/deploy/function-registry-types.d.mts +12 -0
- package/dist/cli/commands/deploy/function-registry.d.mts +2 -0
- package/dist/cli/commands/deploy/idp.d.mts +1 -0
- package/dist/cli/commands/deploy/resolver.d.mts +1 -0
- package/dist/cli/commands/deploy/secret-manager.d.mts +1 -0
- package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
- package/dist/cli/commands/deploy/tailordb/index.d.mts +1 -0
- package/dist/cli/commands/deploy/types.d.mts +1 -0
- package/dist/cli/commands/deploy/workflow.d.mts +1 -0
- package/dist/cli/commands/executor/get.d.mts +29 -0
- package/dist/cli/commands/executor/jobs.d.mts +123 -0
- package/dist/cli/commands/executor/list.d.mts +19 -0
- package/dist/cli/commands/executor/transform.d.mts +41 -0
- package/dist/cli/commands/executor/trigger.d.mts +41 -0
- package/dist/cli/commands/executor/webhook.d.mts +22 -0
- package/dist/cli/commands/function/get.d.mts +18 -0
- package/dist/cli/commands/function/list.d.mts +22 -0
- package/dist/cli/commands/function/transform.d.mts +11 -0
- package/dist/cli/commands/generate/options.d.mts +7 -0
- package/dist/cli/commands/generate/seed/bundler.d.mts +26 -0
- package/dist/cli/commands/generate/service.d.mts +12 -0
- package/dist/cli/commands/generate/types.d.mts +126 -0
- package/dist/cli/commands/machineuser/list.d.mts +27 -0
- package/dist/cli/commands/machineuser/token.d.mts +22 -0
- package/dist/cli/commands/oauth2client/get.d.mts +18 -0
- package/dist/cli/commands/oauth2client/list.d.mts +20 -0
- package/dist/cli/commands/oauth2client/transform.d.mts +20 -0
- package/dist/cli/commands/organization/folder/create.d.mts +18 -0
- package/dist/cli/commands/organization/folder/delete.d.mts +16 -0
- package/dist/cli/commands/organization/folder/get.d.mts +17 -0
- package/dist/cli/commands/organization/folder/list.d.mts +22 -0
- package/dist/cli/commands/organization/folder/update.d.mts +18 -0
- package/dist/cli/commands/organization/get.d.mts +16 -0
- package/dist/cli/commands/organization/list.d.mts +15 -0
- package/dist/cli/commands/organization/transform.d.mts +27 -0
- package/dist/cli/commands/organization/tree.d.mts +25 -0
- package/dist/cli/commands/organization/update.d.mts +17 -0
- package/dist/cli/commands/remove.d.mts +16 -0
- package/dist/cli/commands/show.d.mts +34 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +28 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +19 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +211 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +17 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +202 -0
- package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +113 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +7 -0
- package/dist/cli/commands/tailordb/truncate.d.mts +19 -0
- package/dist/cli/commands/workflow/executions.d.mts +75 -0
- package/dist/cli/commands/workflow/get.d.mts +29 -0
- package/dist/cli/commands/workflow/list.d.mts +19 -0
- package/dist/cli/commands/workflow/resume.d.mts +23 -0
- package/dist/cli/commands/workflow/start.d.mts +63 -0
- package/dist/cli/commands/workflow/status.d.mts +5 -0
- package/dist/cli/commands/workflow/transform.d.mts +33 -0
- package/dist/cli/commands/workflow/wait.d.mts +16 -0
- package/dist/cli/commands/workflow/waiter.d.mts +23 -0
- package/dist/cli/commands/workspace/app/health.d.mts +18 -0
- package/dist/cli/commands/workspace/app/list.d.mts +22 -0
- package/dist/cli/commands/workspace/app/transform.d.mts +18 -0
- package/dist/cli/commands/workspace/create.d.mts +25 -0
- package/dist/cli/commands/workspace/delete.d.mts +15 -0
- package/dist/cli/commands/workspace/get.d.mts +17 -0
- package/dist/cli/commands/workspace/list.d.mts +17 -0
- package/dist/cli/commands/workspace/restore.d.mts +15 -0
- package/dist/cli/commands/workspace/transform.d.mts +16 -0
- package/dist/cli/commands/workspace/user/invite.d.mts +22 -0
- package/dist/cli/commands/workspace/user/list.d.mts +22 -0
- package/dist/cli/commands/workspace/user/remove.d.mts +17 -0
- package/dist/cli/commands/workspace/user/transform.d.mts +8 -0
- package/dist/cli/commands/workspace/user/update.d.mts +22 -0
- package/dist/cli/index.d.mts +1 -2
- package/dist/cli/index.mjs +801 -206
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +80 -21402
- package/dist/cli/lib.mjs +8 -9
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +35 -0
- package/dist/cli/services/application.d.mts +1 -0
- package/dist/cli/services/auth/service.d.mts +1 -0
- package/dist/cli/services/executor/service.d.mts +1 -0
- package/dist/cli/services/http-adapter/bundler.d.mts +1 -0
- package/dist/cli/services/http-adapter/service.d.mts +1 -0
- package/dist/cli/services/resolver/service.d.mts +1 -0
- package/dist/cli/services/tailordb/service.d.mts +1 -0
- package/dist/cli/services/workflow/bundler.d.mts +1 -0
- package/dist/cli/services/workflow/service.d.mts +1 -0
- package/dist/cli/shared/args.d.mts +13 -0
- package/dist/cli/shared/client.d.mts +1273 -0
- package/dist/cli/shared/config-loader.d.mts +44 -0
- package/dist/cli/shared/context.d.mts +28 -0
- package/dist/cli/shared/script-executor.d.mts +74 -0
- package/dist/cli/shared/seed-chunker.d.mts +46 -0
- package/dist/cli/shared/trigger-context.d.mts +1 -0
- package/dist/cli/shared/type-generator.d.mts +20 -0
- package/dist/cli/skills.mjs +1 -2
- package/dist/cli/skills.mjs.map +1 -1
- package/dist/completion/zsh-worker.zsh +124 -25
- package/dist/configure/config/index.d.mts +29 -0
- package/dist/configure/config/types.d.mts +103 -0
- package/dist/configure/index.d.mts +125 -7
- package/dist/configure/index.mjs +5 -6
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/aigateway/index.d.mts +17 -0
- package/dist/configure/services/aigateway/types.d.mts +11 -0
- package/dist/configure/services/auth/index.d.mts +43 -0
- package/dist/{types-v_ErzNUF.d.mts → configure/services/auth/types.d.mts} +7 -172
- package/dist/configure/services/executor/executor.d.mts +82 -0
- package/dist/configure/services/executor/index.d.mts +8 -0
- package/dist/configure/services/executor/operation.d.mts +46 -0
- package/dist/configure/services/executor/trigger/event.d.mts +272 -0
- package/dist/configure/services/executor/trigger/index.d.mts +8 -0
- package/dist/configure/services/executor/trigger/schedule.d.mts +25 -0
- package/dist/configure/services/executor/trigger/webhook.d.mts +44 -0
- package/dist/configure/services/executor/types.d.mts +2 -0
- package/dist/configure/services/http-adapter/http-adapter.d.mts +125 -0
- package/dist/configure/services/http-adapter/index.d.mts +2 -0
- package/dist/configure/services/idp/index.d.mts +64 -0
- package/dist/configure/services/idp/permission.d.mts +80 -0
- package/dist/configure/services/idp/types.d.mts +20 -0
- package/dist/configure/services/index.d.mts +33 -0
- package/dist/configure/services/resolver/index.d.mts +5 -0
- package/dist/configure/services/resolver/resolver.d.mts +77 -0
- package/dist/configure/services/resolver/types.d.mts +6 -0
- package/dist/configure/services/secrets/index.d.mts +38 -0
- package/dist/configure/services/secrets/types.d.mts +11 -0
- package/dist/configure/services/staticwebsite/index.d.mts +19 -0
- package/dist/configure/services/staticwebsite/types.d.mts +11 -0
- package/dist/configure/services/tailordb/index.d.mts +4 -0
- package/dist/configure/services/tailordb/permission.d.mts +119 -0
- package/dist/configure/services/tailordb/schema.d.mts +451 -0
- package/dist/configure/services/tailordb/types.d.mts +149 -0
- package/dist/configure/services/workflow/index.d.mts +7 -0
- package/dist/configure/services/workflow/job.d.mts +81 -0
- package/dist/configure/services/workflow/test-env-key.d.mts +9 -0
- package/dist/configure/services/workflow/types.d.mts +2 -0
- package/dist/configure/services/workflow/wait-point.d.mts +73 -0
- package/dist/configure/services/workflow/workflow.d.mts +55 -0
- package/dist/configure/types/aigateway-name.d.mts +12 -0
- package/dist/configure/types/connection-name.d.mts +12 -0
- package/dist/configure/types/field.d.mts +9 -0
- package/dist/configure/types/field.types.d.mts +109 -0
- package/dist/configure/types/idp-name.d.mts +12 -0
- package/dist/configure/types/index.d.mts +4 -0
- package/dist/configure/types/machine-user.d.mts +12 -0
- package/dist/configure/types/type.d.mts +99 -0
- package/dist/configure/user.d.mts +7 -0
- package/dist/{context-CDQqIv4u.mjs → context-Bd266-ru.mjs} +2 -3
- package/dist/{context-CDQqIv4u.mjs.map → context-Bd266-ru.mjs.map} +1 -1
- package/dist/{crashreport-BwF8cHF0.mjs → crashreport-Dy4ZzSkd.mjs} +1 -2
- package/dist/{crashreport-BqyvFk-_.mjs → crashreport-ayWANEZ6.mjs} +4 -5
- package/dist/{crashreport-BqyvFk-_.mjs.map → crashreport-ayWANEZ6.mjs.map} +1 -1
- package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
- package/dist/{enum-constants-C7DaWeQo.mjs.map → enum-constants-j9QBF0cB.mjs.map} +1 -1
- package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
- package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
- package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
- package/dist/{field-C4zdJLW5.mjs.map → field-DOsJCPFa.mjs.map} +1 -1
- package/dist/{file-BkxupbYP.mjs → file-_oUZo76X.mjs} +2 -3
- package/dist/{file-BkxupbYP.mjs.map → file-_oUZo76X.mjs.map} +1 -1
- package/dist/{file-utils-BHPxPXmn.mjs → file-utils-DcyIPFQh.mjs} +2 -3
- package/dist/{file-utils-BHPxPXmn.mjs.map → file-utils-DcyIPFQh.mjs.map} +1 -1
- package/dist/{globals-ByrCoDip.mjs → globals-B8XX5TRB.mjs} +3 -3
- package/dist/globals-B8XX5TRB.mjs.map +1 -0
- package/dist/{iconv-D1zmPjvi.mjs → iconv-D2vi8G36.mjs} +2 -3
- package/dist/{iconv-D1zmPjvi.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
- package/dist/{idp-ynUfzwpz.mjs → idp-Bx25ZBdN.mjs} +2 -3
- package/dist/{idp-ynUfzwpz.mjs.map → idp-Bx25ZBdN.mjs.map} +1 -1
- package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
- package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
- package/dist/{job-BpsFXPbi.mjs → job-CtU73PGa.mjs} +3 -4
- package/dist/{job-BpsFXPbi.mjs.map → job-CtU73PGa.mjs.map} +1 -1
- package/dist/kysely/index.d.mts +2 -3
- package/dist/kysely/index.mjs +0 -1
- package/dist/kysely/index.mjs.map +1 -1
- package/dist/{kysely-type-CSoZxVKN.mjs → kysely-type-D-zflMGf.mjs} +2 -3
- package/dist/{kysely-type-CSoZxVKN.mjs.map → kysely-type-D-zflMGf.mjs.map} +1 -1
- package/dist/{logger-DKF-JsAK.mjs → logger-BEiZZ3qT.mjs} +1 -2
- package/dist/{logger-DKF-JsAK.mjs.map → logger-BEiZZ3qT.mjs.map} +1 -1
- package/dist/{mock-wf5qeZLi.mjs → mock-Ce1GCi4-.mjs} +60 -5
- package/dist/mock-Ce1GCi4-.mjs.map +1 -0
- package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
- package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
- package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
- package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
- package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
- package/dist/parser/generator-config/schema.d.mts +1 -0
- package/dist/parser/service/auth/index.d.mts +1 -0
- package/dist/parser/service/auth/schema.d.mts +1 -0
- package/dist/parser/service/http-adapter/index.d.mts +1 -0
- package/dist/parser/service/http-adapter/schema.d.mts +1 -0
- package/dist/parser/service/idp/types.d.mts +4 -0
- package/dist/parser/service/tailordb/types.d.mts +126 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +16 -1
- package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
- package/dist/plugin/builtin/file-utils/index.d.mts +16 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -2
- package/dist/plugin/builtin/kysely-type/index.d.mts +16 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
- package/dist/plugin/builtin/seed/index.d.mts +45 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -2
- package/dist/plugin/get-generated-type.d.mts +17 -0
- package/dist/plugin/index.d.mts +3 -118
- package/dist/plugin/index.mjs +0 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/manager.d.mts +1 -0
- package/dist/plugin/types.d.mts +245 -0
- package/dist/plugin/with-context.d.mts +102 -0
- package/dist/{registry-D0uB0OrK.mjs → registry-BozuxbPp.mjs} +1 -2
- package/dist/{registry-D0uB0OrK.mjs.map → registry-BozuxbPp.mjs.map} +1 -1
- package/dist/{repl-editor-DD5YP5mt.mjs → repl-editor-BmQOyZJd.mjs} +2 -3
- package/dist/{repl-editor-DD5YP5mt.mjs.map → repl-editor-BmQOyZJd.mjs.map} +1 -1
- package/dist/{rolldown-runtime-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
- package/dist/runtime/aigateway.d.mts +35 -0
- package/dist/runtime/aigateway.mjs +3 -0
- package/dist/runtime/authconnection.d.mts +31 -2
- package/dist/runtime/authconnection.mjs +1 -2
- package/dist/runtime/context.d.mts +67 -2
- package/dist/runtime/context.mjs +1 -2
- package/dist/runtime/file.d.mts +249 -2
- package/dist/runtime/file.mjs +1 -2
- package/dist/runtime/globals.d.mts +31 -20
- package/dist/runtime/globals.mjs +0 -1
- package/dist/runtime/iconv.d.mts +121 -2
- package/dist/runtime/iconv.mjs +1 -2
- package/dist/runtime/idp.d.mts +186 -2
- package/dist/runtime/idp.mjs +1 -2
- package/dist/runtime/index.d.mts +47 -9
- package/dist/runtime/index.mjs +9 -9
- package/dist/runtime/secretmanager.d.mts +54 -2
- package/dist/runtime/secretmanager.mjs +1 -2
- package/dist/{types-DTcZ2Yax.d.mts → runtime/types.d.mts} +1 -2
- package/dist/runtime/workflow.d.mts +107 -2
- package/dist/runtime/workflow.mjs +2 -3
- package/dist/{runtime-Cd375HD-.mjs → runtime-CEFC05qX.mjs} +81 -130
- package/dist/runtime-CEFC05qX.mjs.map +1 -0
- package/dist/{schema-C4fkpWV_.mjs → schema-DAdZSFOd.mjs} +3 -4
- package/dist/{schema-C4fkpWV_.mjs.map → schema-DAdZSFOd.mjs.map} +1 -1
- package/dist/{secret-file-eB3R3Fil.mjs → secret-file-VSVGy1V0.mjs} +2 -3
- package/dist/{secret-file-eB3R3Fil.mjs.map → secret-file-VSVGy1V0.mjs.map} +1 -1
- package/dist/{secretmanager-h3tBJV8f.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
- package/dist/{secretmanager-h3tBJV8f.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
- package/dist/seed/index.d.mts +1 -2
- package/dist/seed/index.mjs +0 -1
- package/dist/seed/index.mjs.map +1 -1
- package/dist/{seed-YAbtMy65.mjs → seed-DoMTMLcm.mjs} +3 -4
- package/dist/{seed-YAbtMy65.mjs.map → seed-DoMTMLcm.mjs.map} +1 -1
- package/dist/service-BXmdFwSH.mjs +3 -0
- package/dist/{service-DDWgZL_L2.mjs → service-DBFZQloR.mjs} +3 -4
- package/dist/service-DBFZQloR.mjs.map +1 -0
- package/dist/{service-B2Jd9CxS.mjs → service-DiEtAsvc.mjs} +3 -4
- package/dist/{service-B2Jd9CxS.mjs.map → service-DiEtAsvc.mjs.map} +1 -1
- package/dist/{service_pb-BsBR6yW5.mjs → service_pb-CIrhGwHk.mjs} +1 -2
- package/dist/{service_pb-BsBR6yW5.mjs.map → service_pb-CIrhGwHk.mjs.map} +1 -1
- package/dist/{service_pb-BJ9GsAnW.mjs → service_pb-DjwIn4jO.mjs} +1 -2
- package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +204 -0
- package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +58 -0
- package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +316 -0
- package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +161 -0
- package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +2070 -0
- package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +861 -0
- package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +112 -0
- package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +69 -0
- package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +439 -0
- package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +564 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +145 -0
- package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +451 -0
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +192 -0
- package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +50 -0
- package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +407 -0
- package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +430 -0
- package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +73 -0
- package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +17 -0
- package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +309 -0
- package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +591 -0
- package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +330 -0
- package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +113 -0
- package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +346 -0
- package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +54 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +3576 -0
- package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +187 -0
- package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +29 -0
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +429 -0
- package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +90 -0
- package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +684 -0
- package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +797 -0
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +330 -0
- package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +183 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +842 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +276 -0
- package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +2015 -0
- package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +483 -0
- package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
- package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
- package/dist/telemetry-ClwW5ohF.mjs +3 -0
- package/dist/types/aigateway.generated.d.mts +9 -0
- package/dist/types/app-config.generated.d.mts +4 -0
- package/dist/types/auth-connection.generated.d.mts +20 -0
- package/dist/types/auth.generated.d.mts +150 -0
- package/dist/types/executor.generated.d.mts +177 -0
- package/dist/types/generator-config.generated.d.mts +28 -0
- package/dist/types/helpers.d.mts +39 -0
- package/dist/types/http-adapter.generated.d.mts +17 -0
- package/dist/types/idp.generated.d.mts +584 -0
- package/dist/types/resolver.generated.d.mts +38 -0
- package/dist/types/secrets.generated.d.mts +14 -0
- package/dist/types/staticwebsite.generated.d.mts +10 -0
- package/dist/{types-rj8YJcEe.d.mts → types/tailordb.generated.d.mts} +2 -290
- package/dist/types/workflow.generated.d.mts +12 -0
- package/dist/types-qhFZ8y9B.mjs +4 -0
- package/dist/{types-D4QMmNWh.mjs → types-ywCGpzDZ.mjs} +2 -3
- package/dist/{types-D4QMmNWh.mjs.map → types-ywCGpzDZ.mjs.map} +1 -1
- package/dist/utils/test/index.d.mts +6 -89
- package/dist/utils/test/index.mjs +1 -2
- package/dist/utils/test/index.mjs.map +1 -1
- package/dist/utils/test/mock.d.mts +87 -0
- package/dist/vitest/environment.d.mts +1 -2
- package/dist/vitest/environment.mjs +1 -2
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.d.mts +4 -392
- package/dist/vitest/index.mjs +4 -5
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +62 -0
- package/dist/vitest/mock.d.mts +364 -0
- package/dist/vitest/setup.d.mts +1 -2
- package/dist/vitest/setup.mjs +2 -3
- package/dist/vitest/setup.mjs.map +1 -1
- package/dist/{workflow-C8I7shjM.mjs → workflow-DSwnYPPP.mjs} +10 -4
- package/dist/workflow-DSwnYPPP.mjs.map +1 -0
- package/docs/cli/setup.md +129 -19
- package/docs/cli-reference.md +9 -4
- package/docs/runtime.md +5 -1
- package/docs/services/aigateway.md +14 -0
- package/docs/testing.md +48 -2
- package/package.json +6 -1
- package/dist/application-DmjIKQ-a.mjs.map +0 -1
- package/dist/application-a_ApFuPh.mjs +0 -4
- package/dist/authconnection-CqfaJfrC.d.mts +0 -32
- package/dist/context-CUBwSBq4.d.mts +0 -68
- package/dist/file-BzK8z3X-.d.mts +0 -250
- package/dist/globals-ByrCoDip.mjs.map +0 -1
- package/dist/iconv-kwrmd1U_.d.mts +0 -122
- package/dist/idp-BmYwCXnJ.d.mts +0 -187
- package/dist/index-BDBU7x-i.d.mts +0 -18
- package/dist/index-BSlv_YrG.d.mts +0 -46
- package/dist/index-BzGqTY5x.d.mts +0 -1315
- package/dist/index-D3_Au3wu.d.mts +0 -47
- package/dist/index-DtFRlrww.d.mts +0 -18
- package/dist/index-jeE3UvF2.d.mts +0 -18
- package/dist/mock-wf5qeZLi.mjs.map +0 -1
- package/dist/package-json-wzO6nV9O.mjs +0 -4
- package/dist/runtime-Cd375HD-.mjs.map +0 -1
- package/dist/secretmanager-CKLB3wAQ.d.mts +0 -55
- package/dist/service-CRaa4Joe.mjs +0 -4
- package/dist/service-DDWgZL_L2.mjs.map +0 -1
- package/dist/telemetry-w92bvGdC.mjs +0 -4
- package/dist/types-32lUMToj.mjs +0 -5
- package/dist/types-aqnqTCfO.d.mts +0 -602
- package/dist/workflow-C8I7shjM.mjs.map +0 -1
- package/dist/workflow-CMamswkK.d.mts +0 -96
- package/dist/workflow.generated-Da1zECDw.d.mts +0 -1348
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TailorEnv } from "../../../../runtime/types.mjs";
|
|
2
|
+
import { ScheduleTriggerInput } from "../../../../types/executor.generated.mjs";
|
|
3
|
+
import { StandardCRON } from "ts-cron-validator";
|
|
4
|
+
|
|
5
|
+
//#region src/configure/services/executor/trigger/schedule.d.ts
|
|
6
|
+
type Timezone = "UTC" | "Pacific/Midway" | "Pacific/Niue" | "Pacific/Pago_Pago" | "America/Adak" | "Pacific/Honolulu" | "Pacific/Rarotonga" | "Pacific/Tahiti" | "Pacific/Marquesas" | "America/Anchorage" | "America/Juneau" | "America/Metlakatla" | "America/Nome" | "America/Sitka" | "America/Yakutat" | "Pacific/Gambier" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "Pacific/Pitcairn" | "America/Boise" | "America/Cambridge_Bay" | "America/Chihuahua" | "America/Creston" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Edmonton" | "America/Fort_Nelson" | "America/Hermosillo" | "America/Inuvik" | "America/Mazatlan" | "America/Ojinaga" | "America/Phoenix" | "America/Whitehorse" | "America/Yellowknife" | "America/Bahia_Banderas" | "America/Belize" | "America/Chicago" | "America/Costa_Rica" | "America/El_Salvador" | "America/Guatemala" | "America/Indiana/Knox" | "America/Indiana/Tell_City" | "America/Managua" | "America/Matamoros" | "America/Menominee" | "America/Merida" | "America/Mexico_City" | "America/Monterrey" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Regina" | "America/Resolute" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Winnipeg" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Atikokan" | "America/Bogota" | "America/Cancun" | "America/Cayman" | "America/Detroit" | "America/Eirunepe" | "America/Grand_Turk" | "America/Guayaquil" | "America/Havana" | "America/Indiana/Indianapolis" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Iqaluit" | "America/Jamaica" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Lima" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Panama" | "America/Pangnirtung" | "America/Port-au-Prince" | "America/Rio_Branco" | "America/Thunder_Bay" | "America/Toronto" | "America/Anguilla" | "America/Antigua" | "America/Aruba" | "America/Asuncion" | "America/Barbados" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Campo_Grande" | "America/Caracas" | "America/Cuiaba" | "America/Curacao" | "America/Dominica" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grenada" | "America/Guadeloupe" | "America/Guyana" | "America/Halifax" | "America/Kralendijk" | "America/La_Paz" | "America/Lower_Princes" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Moncton" | "America/Montserrat" | "America/Porto_Velho" | "America/Port_of_Spain" | "America/Puerto_Rico" | "America/Santiago" | "America/Santo_Domingo" | "America/St_Barthelemy" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Thule" | "America/Tortola" | "Atlantic/Bermuda" | "America/St_Johns" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Bahia" | "America/Belem" | "America/Cayenne" | "America/Fortaleza" | "America/Godthab" | "America/Maceio" | "America/Miquelon" | "America/Montevideo" | "America/Paramaribo" | "America/Punta_Arenas" | "America/Recife" | "America/Santarem" | "America/Sao_Paulo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Atlantic/Stanley" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Scoresbysund" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Abidjan" | "Africa/Accra" | "Africa/Bamako" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Casablanca" | "Africa/Conakry" | "Africa/Dakar" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Sao_Tome" | "America/Danmarkshavn" | "Antarctica/Troll" | "Atlantic/Canary" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/St_Helena" | "Europe/Dublin" | "Europe/Guernsey" | "Europe/Isle_of_Man" | "Europe/Jersey" | "Europe/Lisbon" | "Europe/London" | "Africa/Algiers" | "Africa/Bangui" | "Africa/Brazzaville" | "Africa/Ceuta" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Malabo" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Porto-Novo" | "Africa/Tunis" | "Africa/Windhoek" | "Arctic/Longyearbyen" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Africa/Blantyre" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Tripoli" | "Asia/Amman" | "Asia/Beirut" | "Asia/Damascus" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Jerusalem" | "Asia/Nicosia" | "Europe/Athens" | "Europe/Bucharest" | "Europe/Chisinau" | "Europe/Helsinki" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Mariehamn" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Uzhgorod" | "Europe/Vilnius" | "Europe/Zaporizhzhia" | "Africa/Addis_Ababa" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Africa/Mogadishu" | "Africa/Nairobi" | "Antarctica/Syowa" | "Asia/Aden" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Kuwait" | "Asia/Qatar" | "Asia/Riyadh" | "Europe/Istanbul" | "Europe/Kirov" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Europe/Volgograd" | "Indian/Antananarivo" | "Indian/Comoro" | "Indian/Mayotte" | "Asia/Tehran" | "Asia/Baku" | "Asia/Dubai" | "Asia/Muscat" | "Asia/Tbilisi" | "Asia/Yerevan" | "Europe/Astrakhan" | "Europe/Samara" | "Europe/Saratov" | "Europe/Ulyanovsk" | "Indian/Mahe" | "Indian/Mauritius" | "Indian/Reunion" | "Asia/Kabul" | "Antarctica/Mawson" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Dushanbe" | "Asia/Karachi" | "Asia/Oral" | "Asia/Qyzylorda" | "Asia/Samarkand" | "Asia/Tashkent" | "Asia/Yekaterinburg" | "Indian/Kerguelen" | "Indian/Maldives" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Antarctica/Vostok" | "Asia/Almaty" | "Asia/Bishkek" | "Asia/Dhaka" | "Asia/Omsk" | "Asia/Qostanay" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Yangon" | "Indian/Cocos" | "Antarctica/Davis" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Hovd" | "Asia/Ho_Chi_Minh" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Tomsk" | "Asia/Vientiane" | "Indian/Christmas" | "Asia/Brunei" | "Asia/Choibalsan" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Macau" | "Asia/Makassar" | "Asia/Manila" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Australia/Eucla" | "Asia/Chita" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Khandyga" | "Asia/Pyongyang" | "Asia/Seoul" | "Asia/Tokyo" | "Asia/Yakutsk" | "Pacific/Palau" | "Australia/Adelaide" | "Australia/Broken_Hill" | "Australia/Darwin" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Asia/Ust-Nera" | "Asia/Vladivostok" | "Australia/Brisbane" | "Australia/Currie" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Melbourne" | "Australia/Sydney" | "Pacific/Chuuk" | "Pacific/Guam" | "Pacific/Port_Moresby" | "Pacific/Saipan" | "Australia/Lord_Howe" | "Antarctica/Casey" | "Asia/Magadan" | "Asia/Sakhalin" | "Asia/Srednekolymsk" | "Pacific/Bougainville" | "Pacific/Efate" | "Pacific/Guadalcanal" | "Pacific/Kosrae" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pohnpei" | "Antarctica/McMurdo" | "Asia/Anadyr" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Tarawa" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
|
|
7
|
+
type ScheduleTrigger<Args> = ScheduleTriggerInput & {
|
|
8
|
+
__args: Args;
|
|
9
|
+
};
|
|
10
|
+
interface ScheduleArgs {
|
|
11
|
+
env: TailorEnv;
|
|
12
|
+
}
|
|
13
|
+
interface ScheduleTriggerOptions<T extends string> {
|
|
14
|
+
cron: StandardCRON<T> extends never ? never : T;
|
|
15
|
+
timezone?: Timezone;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Create a schedule-based trigger using a CRON expression and optional timezone.
|
|
19
|
+
* @template T
|
|
20
|
+
* @param options - Schedule options
|
|
21
|
+
* @returns Schedule trigger
|
|
22
|
+
*/
|
|
23
|
+
declare function scheduleTrigger<T extends string>(options: ScheduleTriggerOptions<T>): ScheduleTrigger<ScheduleArgs>;
|
|
24
|
+
//#endregion
|
|
25
|
+
export { ScheduleArgs, ScheduleTrigger, scheduleTrigger };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TailorEnv } from "../../../../runtime/types.mjs";
|
|
2
|
+
import { JsonValue } from "../../../../types/helpers.mjs";
|
|
3
|
+
import { IncomingWebhookTrigger as IncomingWebhookTrigger$1 } from "../../../../types/executor.generated.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/configure/services/executor/trigger/webhook.d.ts
|
|
6
|
+
interface IncomingWebhookArgs<T extends IncomingWebhookRequest> {
|
|
7
|
+
body: T["body"];
|
|
8
|
+
headers: T["headers"];
|
|
9
|
+
method: "POST" | "GET" | "PUT" | "DELETE";
|
|
10
|
+
rawBody: string;
|
|
11
|
+
env: TailorEnv;
|
|
12
|
+
}
|
|
13
|
+
interface IncomingWebhookRequest {
|
|
14
|
+
body: Record<string, unknown>;
|
|
15
|
+
headers: Record<string, string>;
|
|
16
|
+
}
|
|
17
|
+
interface IncomingWebhookResponseConfig<Args> {
|
|
18
|
+
/**
|
|
19
|
+
* Expression that returns the webhook HTTP response body.
|
|
20
|
+
* Receives the same args as the executor operation.
|
|
21
|
+
*/
|
|
22
|
+
body?: (args: Args) => JsonValue;
|
|
23
|
+
/**
|
|
24
|
+
* HTTP status code for the response.
|
|
25
|
+
* If omitted and `body` is set, the platform uses 200.
|
|
26
|
+
*/
|
|
27
|
+
statusCode?: number;
|
|
28
|
+
}
|
|
29
|
+
type IncomingWebhookResponse<Args> = ((args: Args) => JsonValue) | IncomingWebhookResponseConfig<Args>;
|
|
30
|
+
interface IncomingWebhookTriggerOptions<Args> {
|
|
31
|
+
response?: IncomingWebhookResponse<Args>;
|
|
32
|
+
}
|
|
33
|
+
type IncomingWebhookTrigger<Args> = IncomingWebhookTrigger$1 & {
|
|
34
|
+
__args: Args;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Create a trigger for incoming webhook requests.
|
|
38
|
+
* @template T
|
|
39
|
+
* @param options - Optional trigger options including response configuration
|
|
40
|
+
* @returns Incoming webhook trigger
|
|
41
|
+
*/
|
|
42
|
+
declare function incomingWebhookTrigger<T extends IncomingWebhookRequest>(options?: IncomingWebhookTriggerOptions<IncomingWebhookArgs<T>>): IncomingWebhookTrigger<IncomingWebhookArgs<T>>;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, incomingWebhookTrigger };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { HttpAdapterConfigInput } from "../../../types/http-adapter.generated.mjs";
|
|
2
|
+
import { DocumentNode } from "graphql";
|
|
3
|
+
|
|
4
|
+
//#region src/configure/services/http-adapter/http-adapter.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Lowercase HTTP method keys accepted in `input`, derived from the config
|
|
7
|
+
* schema via the generated type so they cannot drift.
|
|
8
|
+
*/
|
|
9
|
+
type HttpMethodKey = keyof Required<HttpAdapterConfigInput["input"]>;
|
|
10
|
+
/** Incoming HTTP request passed to an `input` handler. */
|
|
11
|
+
type HttpAdapterRequest = {
|
|
12
|
+
method: Uppercase<HttpMethodKey>;
|
|
13
|
+
path: string;
|
|
14
|
+
headers: Record<string, string>;
|
|
15
|
+
query: Record<string, string>;
|
|
16
|
+
body: string;
|
|
17
|
+
};
|
|
18
|
+
/** GraphQL request returned by an `input` handler. */
|
|
19
|
+
type HttpAdapterGraphQLRequest<Query extends HttpAdapterGraphQLQuery = string> = {
|
|
20
|
+
query: Query;
|
|
21
|
+
operationName?: string;
|
|
22
|
+
} & HttpAdapterGraphQLRequestVariables<Query>;
|
|
23
|
+
/**
|
|
24
|
+
* Typed GraphQL document accepted by an HTTP adapter input handler.
|
|
25
|
+
* Compatible with generated `TypedDocumentNode` values.
|
|
26
|
+
*/
|
|
27
|
+
type HttpAdapterTypedDocumentNode<TResult = unknown, TVariables = Record<string, unknown>> = DocumentNode & {
|
|
28
|
+
__apiType?: (variables: TVariables) => TResult;
|
|
29
|
+
__ensureTypesOfVariablesAndResultMatching?: (variables: TVariables) => TResult;
|
|
30
|
+
};
|
|
31
|
+
/** GraphQL query value accepted by an HTTP adapter input handler. */
|
|
32
|
+
type HttpAdapterGraphQLQuery = string | DocumentNode;
|
|
33
|
+
type HttpAdapterGraphQLData<Query> = Query extends HttpAdapterTypedDocumentNode<infer Result, infer _Variables> ? Result : unknown;
|
|
34
|
+
type HttpAdapterGraphQLVariables<Query> = Query extends HttpAdapterTypedDocumentNode<infer _Result, infer Variables> ? Variables : Record<string, unknown>;
|
|
35
|
+
type HttpAdapterHasRequiredVariables<T> = [T] extends [never] ? false : T extends object ? Record<never, never> extends T ? false : true : false;
|
|
36
|
+
type HttpAdapterGraphQLRequestVariables<Query> = true extends HttpAdapterHasRequiredVariables<HttpAdapterGraphQLVariables<Query>> ? {
|
|
37
|
+
variables: HttpAdapterGraphQLVariables<Query>;
|
|
38
|
+
} : {
|
|
39
|
+
variables?: HttpAdapterGraphQLVariables<Query>;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Converts an incoming HTTP request into a GraphQL request.
|
|
43
|
+
* Pass a typed document type as `Query` when annotating extracted handlers.
|
|
44
|
+
*/
|
|
45
|
+
type HttpAdapterInputFn<Query extends HttpAdapterGraphQLQuery = string> = (req: HttpAdapterRequest) => HttpAdapterGraphQLRequest<Query>;
|
|
46
|
+
/** GraphQL execution result passed to the `output` handler. */
|
|
47
|
+
type HttpAdapterGraphQLResponse<Data = unknown> = {
|
|
48
|
+
data?: Data | null;
|
|
49
|
+
errors?: unknown;
|
|
50
|
+
extensions?: unknown;
|
|
51
|
+
};
|
|
52
|
+
/** HTTP response returned by the `output` handler. */
|
|
53
|
+
type HttpAdapterResponse = {
|
|
54
|
+
statusCode?: number;
|
|
55
|
+
headers?: Record<string, string>;
|
|
56
|
+
body: string;
|
|
57
|
+
};
|
|
58
|
+
/** Converts a GraphQL response into an HTTP response. */
|
|
59
|
+
type HttpAdapterOutputFn<Data = unknown> = (resp: HttpAdapterGraphQLResponse<Data>) => HttpAdapterResponse;
|
|
60
|
+
/**
|
|
61
|
+
* Per-method input handlers. At least one method must be provided.
|
|
62
|
+
* Each handler transforms an HTTP request into a GraphQL request.
|
|
63
|
+
*/
|
|
64
|
+
type HttpAdapterInput = Partial<Record<HttpMethodKey, HttpAdapterInputFn<HttpAdapterGraphQLQuery>>>;
|
|
65
|
+
type HttpAdapterInputHandlerData<Handler> = Handler extends ((req: HttpAdapterRequest) => infer Request) ? Request extends {
|
|
66
|
+
query: infer Query;
|
|
67
|
+
} ? HttpAdapterGraphQLData<Query> : unknown : never;
|
|
68
|
+
type HttpAdapterInputData<Input extends HttpAdapterInput> = [HttpAdapterInputHandlerData<Input[keyof Input]>] extends [never] ? unknown : HttpAdapterInputHandlerData<Input[keyof Input]>;
|
|
69
|
+
type HttpAdapterValidatedRequest<Request> = Request extends {
|
|
70
|
+
query: infer Query extends HttpAdapterGraphQLQuery;
|
|
71
|
+
} ? Request & HttpAdapterGraphQLRequest<Query> : never;
|
|
72
|
+
type HttpAdapterValidatedInput<Input extends HttpAdapterInput> = { [Method in keyof Input]: Input[Method] extends ((req: HttpAdapterRequest) => infer Request) ? (req: HttpAdapterRequest) => HttpAdapterValidatedRequest<Request> : Input[Method] };
|
|
73
|
+
/**
|
|
74
|
+
* HTTP adapter configuration accepted by `createHttpAdapter` with typed
|
|
75
|
+
* `input` and `output` signatures.
|
|
76
|
+
*/
|
|
77
|
+
type HttpAdapter<Input extends HttpAdapterInput = HttpAdapterInput> = Omit<HttpAdapterConfigInput, "input" | "output"> & {
|
|
78
|
+
input: Input & HttpAdapterValidatedInput<Input>;
|
|
79
|
+
output?: HttpAdapterOutputFn<HttpAdapterInputData<Input>>;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Defines an HTTP adapter that translates HTTP requests to GraphQL queries
|
|
83
|
+
* and shapes the GraphQL response back into an HTTP response.
|
|
84
|
+
*
|
|
85
|
+
* The adapter MUST be the default export of its file.
|
|
86
|
+
* Files are discovered via the `httpAdapter.files` glob in `defineConfig()`.
|
|
87
|
+
*
|
|
88
|
+
* `input` is an object keyed by lowercase HTTP method (`get`, `post`, `put`,
|
|
89
|
+
* `patch`, `delete`). Each handler can return a GraphQL query string or a
|
|
90
|
+
* typed document node. At least one method must be declared; the methods the
|
|
91
|
+
* adapter serves are derived from these keys.
|
|
92
|
+
*
|
|
93
|
+
* `output` is optional and shared across all methods. If `input` returns typed
|
|
94
|
+
* document nodes, `output` receives the corresponding result type as
|
|
95
|
+
* `resp.data`. If you need different response shapes per method, discriminate
|
|
96
|
+
* inside `output` based on the GraphQL response shape.
|
|
97
|
+
*
|
|
98
|
+
* Each handler runs server-side and must be synchronous: Node APIs, `fetch`,
|
|
99
|
+
* `async`/`await`, Promises, and top-level `await` are not available.
|
|
100
|
+
*
|
|
101
|
+
* Optional fields: `enabled` (default `true`; set `false` to deploy the adapter
|
|
102
|
+
* without serving it) and `priority` (non-negative integer, default `0`; when
|
|
103
|
+
* multiple adapters match the same request path, the lowest value wins).
|
|
104
|
+
* @param config - HTTP adapter configuration
|
|
105
|
+
* @returns Branded HTTP adapter definition
|
|
106
|
+
* @example
|
|
107
|
+
* export default createHttpAdapter({
|
|
108
|
+
* name: "get-user",
|
|
109
|
+
* pathPattern: "/users/*",
|
|
110
|
+
* input: {
|
|
111
|
+
* get: (req) => ({
|
|
112
|
+
* query: `query($id: ID!) { user(id: $id) { id name } }`,
|
|
113
|
+
* variables: { id: req.path.split("/")[2] },
|
|
114
|
+
* }),
|
|
115
|
+
* },
|
|
116
|
+
* output: (resp) => ({
|
|
117
|
+
* statusCode: 200,
|
|
118
|
+
* headers: { "content-type": "application/json" },
|
|
119
|
+
* body: JSON.stringify(resp.data),
|
|
120
|
+
* }),
|
|
121
|
+
* });
|
|
122
|
+
*/
|
|
123
|
+
declare function createHttpAdapter<const Input extends HttpAdapterInput>(config: HttpAdapter<Input>): HttpAdapter<Input>;
|
|
124
|
+
//#endregion
|
|
125
|
+
export { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./http-adapter.mjs";
|
|
2
|
+
export { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput, IdPInput } from "../../../types/idp.generated.mjs";
|
|
2
|
+
import { IdPConfig, IdPExternalConfig, IdpDefinitionBrand } from "./types.mjs";
|
|
3
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./permission.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/configure/services/idp/index.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Define an IdP service configuration for the Tailor SDK.
|
|
8
|
+
* @template TClients
|
|
9
|
+
* @param name - IdP service name
|
|
10
|
+
* @param config - IdP configuration
|
|
11
|
+
* @returns Defined IdP service
|
|
12
|
+
*/
|
|
13
|
+
declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients" | "permission"> & {
|
|
14
|
+
clients: TClients;
|
|
15
|
+
permission?: IdPPermission;
|
|
16
|
+
}): {
|
|
17
|
+
readonly name: string;
|
|
18
|
+
readonly provider: (providerName: string, clientName: TClients[number]) => {
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly kind: "BuiltInIdP";
|
|
21
|
+
readonly namespace: string;
|
|
22
|
+
readonly clientName: TClients[number];
|
|
23
|
+
};
|
|
24
|
+
readonly authorization?: "insecure" | "loggedIn" | {
|
|
25
|
+
cel: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
readonly lang?: "en" | "ja" | undefined;
|
|
28
|
+
readonly userAuthPolicy?: {
|
|
29
|
+
useNonEmailIdentifier?: boolean | undefined;
|
|
30
|
+
allowSelfPasswordReset?: boolean | undefined;
|
|
31
|
+
passwordRequireUppercase?: boolean | undefined;
|
|
32
|
+
passwordRequireLowercase?: boolean | undefined;
|
|
33
|
+
passwordRequireNonAlphanumeric?: boolean | undefined;
|
|
34
|
+
passwordRequireNumeric?: boolean | undefined;
|
|
35
|
+
passwordMinLength?: number | undefined;
|
|
36
|
+
passwordMaxLength?: number | undefined;
|
|
37
|
+
allowedEmailDomains?: string[] | undefined;
|
|
38
|
+
allowGoogleOauth?: boolean | undefined;
|
|
39
|
+
allowMicrosoftOauth?: boolean | undefined;
|
|
40
|
+
disablePasswordAuth?: boolean | undefined;
|
|
41
|
+
enableMfa?: boolean | undefined;
|
|
42
|
+
requireMfa?: boolean | undefined;
|
|
43
|
+
allowedReturnOrigins?: string[] | undefined;
|
|
44
|
+
mfaIssuer?: string | undefined;
|
|
45
|
+
} | undefined;
|
|
46
|
+
readonly publishUserEvents?: boolean | undefined;
|
|
47
|
+
readonly gqlOperations?: "query" | {
|
|
48
|
+
create?: boolean | undefined;
|
|
49
|
+
update?: boolean | undefined;
|
|
50
|
+
delete?: boolean | undefined;
|
|
51
|
+
read?: boolean | undefined;
|
|
52
|
+
sendPasswordResetEmail?: boolean | undefined;
|
|
53
|
+
requestMfaSettingsUrl?: boolean | undefined;
|
|
54
|
+
unenrollMfa?: boolean | undefined;
|
|
55
|
+
} | undefined;
|
|
56
|
+
readonly emailConfig?: {
|
|
57
|
+
fromName?: string | undefined;
|
|
58
|
+
passwordResetSubject?: string | undefined;
|
|
59
|
+
} | undefined;
|
|
60
|
+
readonly clients: TClients;
|
|
61
|
+
readonly permission?: IdPPermission;
|
|
62
|
+
} & IdpDefinitionBrand;
|
|
63
|
+
//#endregion
|
|
64
|
+
export { type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, defineIdp, unsafeAllowAllIdPPermission };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { InferredAttributeMap } from "../../../runtime/types.mjs";
|
|
2
|
+
import { IdPUserField } from "../../../parser/service/idp/types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/configure/services/idp/permission.d.ts
|
|
5
|
+
type EqualityOperator = "=" | "!=";
|
|
6
|
+
type ContainsOperator = "in" | "not in";
|
|
7
|
+
type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
|
|
8
|
+
type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
|
|
9
|
+
type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
|
|
10
|
+
type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
|
|
11
|
+
type UserStringOperand<User extends object = InferredAttributeMap> = {
|
|
12
|
+
user: StringFieldKeys<User> | "id";
|
|
13
|
+
};
|
|
14
|
+
type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
|
|
15
|
+
user: StringArrayFieldKeys<User>;
|
|
16
|
+
};
|
|
17
|
+
type UserBooleanOperand<User extends object = InferredAttributeMap> = {
|
|
18
|
+
user: BooleanFieldKeys<User> | "_loggedIn";
|
|
19
|
+
};
|
|
20
|
+
type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
|
|
21
|
+
user: BooleanArrayFieldKeys<User>;
|
|
22
|
+
};
|
|
23
|
+
type IdPUserOperand<Update extends boolean = false> = Update extends true ? {
|
|
24
|
+
oldIdpUser: IdPUserField;
|
|
25
|
+
} | {
|
|
26
|
+
newIdpUser: IdPUserField;
|
|
27
|
+
} : {
|
|
28
|
+
idpUser: IdPUserField;
|
|
29
|
+
};
|
|
30
|
+
type StringEqualityCondition<User extends object, Update extends boolean> = readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, string | UserStringOperand<User> | IdPUserOperand<Update>] | readonly [string | UserStringOperand<User>, EqualityOperator, IdPUserOperand<Update>];
|
|
31
|
+
type BooleanEqualityCondition<User extends object, Update extends boolean> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, boolean | UserBooleanOperand<User> | IdPUserOperand<Update>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, IdPUserOperand<Update>];
|
|
32
|
+
type EqualityCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringEqualityCondition<User, Update> | BooleanEqualityCondition<User, Update>;
|
|
33
|
+
type StringContainsCondition<User extends object, Update extends boolean> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, string[] | UserStringArrayOperand<User>];
|
|
34
|
+
type BooleanContainsCondition<User extends object, Update extends boolean> = readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>];
|
|
35
|
+
type ContainsCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringContainsCondition<User, Update> | BooleanContainsCondition<User, Update>;
|
|
36
|
+
type IdPPermissionCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = EqualityCondition<User, Update> | ContainsCondition<User, Update>;
|
|
37
|
+
type IdPActionPermission<User extends object = InferredAttributeMap, Update extends boolean = boolean> = {
|
|
38
|
+
conditions: IdPPermissionCondition<User, Update> | readonly IdPPermissionCondition<User, Update>[];
|
|
39
|
+
description?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Whether matching users are granted (`true`) or denied (`false`).
|
|
42
|
+
* Omitting `permit` in this object form defaults to `deny` and emits a
|
|
43
|
+
* warning; set it explicitly. (The array shorthand defaults to `allow`.)
|
|
44
|
+
*/
|
|
45
|
+
permit?: boolean;
|
|
46
|
+
} | readonly [...IdPPermissionCondition<User, Update>, ...([] | [boolean])] | readonly [...IdPPermissionCondition<User, Update>[], ...([] | [boolean])];
|
|
47
|
+
/**
|
|
48
|
+
* Per-operation permission policies for an IdP service.
|
|
49
|
+
* Defines create, read, update, delete, sendPasswordResetEmail, and
|
|
50
|
+
* unenrollMfa permissions.
|
|
51
|
+
*
|
|
52
|
+
* For update operations, use `newIdpUser`/`oldIdpUser` operands instead of `idpUser`.
|
|
53
|
+
* @example
|
|
54
|
+
* const permission: IdPPermission = {
|
|
55
|
+
* create: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
|
|
56
|
+
* read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
57
|
+
* update: [{ conditions: [[{ newIdpUser: "name" }, "=", { user: "id" }]], permit: true }],
|
|
58
|
+
* delete: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
|
|
59
|
+
* sendPasswordResetEmail: [{ conditions: [], permit: true }],
|
|
60
|
+
* unenrollMfa: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
|
|
61
|
+
* };
|
|
62
|
+
*/
|
|
63
|
+
type IdPPermission<User extends object = InferredAttributeMap> = {
|
|
64
|
+
create: readonly IdPActionPermission<User, false>[];
|
|
65
|
+
read: readonly IdPActionPermission<User, false>[];
|
|
66
|
+
update: readonly IdPActionPermission<User, true>[];
|
|
67
|
+
delete: readonly IdPActionPermission<User, false>[];
|
|
68
|
+
sendPasswordResetEmail?: readonly IdPActionPermission<User, false>[];
|
|
69
|
+
unenrollMfa?: readonly IdPActionPermission<User, false>[];
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Grants full IdP permission access without any conditions.
|
|
73
|
+
*
|
|
74
|
+
* Unsafe and intended only for local development, prototyping, or tests.
|
|
75
|
+
* Do not use this in production environments, as it effectively disables
|
|
76
|
+
* authorization checks.
|
|
77
|
+
*/
|
|
78
|
+
declare const unsafeAllowAllIdPPermission: IdPPermission;
|
|
79
|
+
//#endregion
|
|
80
|
+
export { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BuiltinIdP } from "../../../types/auth.generated.mjs";
|
|
2
|
+
import { IdPInput } from "../../../types/idp.generated.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/configure/services/idp/types.d.ts
|
|
5
|
+
declare const idpDefinitionBrand: unique symbol;
|
|
6
|
+
type IdpDefinitionBrand = {
|
|
7
|
+
readonly [idpDefinitionBrand]: true;
|
|
8
|
+
};
|
|
9
|
+
type DefinedIdp<Name extends string, Config, ClientNames extends string> = Config & {
|
|
10
|
+
name: Name;
|
|
11
|
+
provider(providerName: string, clientName: ClientNames): BuiltinIdP;
|
|
12
|
+
} & IdpDefinitionBrand;
|
|
13
|
+
type IdPExternalConfig = {
|
|
14
|
+
name: string;
|
|
15
|
+
external: true;
|
|
16
|
+
};
|
|
17
|
+
type IdPOwnConfig = Omit<DefinedIdp<string, IdPInput, string>, "provider">;
|
|
18
|
+
type IdPConfig = IdPOwnConfig | IdPExternalConfig;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { DefinedIdp, IdPConfig, IdPExternalConfig, IdPOwnConfig, IdpDefinitionBrand };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { AuthConnectionConfig, AuthConnectionOAuth2Config } from "../../types/auth-connection.generated.mjs";
|
|
2
|
+
import { BuiltinIdP, IDToken, IdProvider, OAuth2ClientInput, OIDC, SAML, SCIMAttribute, SCIMAttributeMapping, SCIMAuthorization, SCIMConfig, SCIMResource, TenantProvider } from "../../types/auth.generated.mjs";
|
|
3
|
+
import { AuthConfig, AuthConnectionTokenResult, AuthExternalConfig, AuthOwnConfig, AuthServiceInput, BeforeLoginClaims, BeforeLoginHookArgs, DefinedAuth, FederatedIdentity, FederatedIdentityClaims, FederatedIdentityProvider, OAuth2ClientGrantType, SCIMAttributeType, UserAttributeKey, UserAttributeListKey, UserAttributeMap, UsernameFieldKey, ValueOperand } from "./auth/types.mjs";
|
|
4
|
+
import { Resolver } from "../../types/resolver.generated.mjs";
|
|
5
|
+
import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./tailordb/permission.mjs";
|
|
6
|
+
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./tailordb/schema.mjs";
|
|
7
|
+
import { AIGatewayConfig } from "./aigateway/types.mjs";
|
|
8
|
+
import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput } from "../../types/idp.generated.mjs";
|
|
9
|
+
import { IdPConfig, IdPExternalConfig } from "./idp/types.mjs";
|
|
10
|
+
import { SecretsConfig } from "./secrets/types.mjs";
|
|
11
|
+
import { StaticWebsiteConfig } from "./staticwebsite/types.mjs";
|
|
12
|
+
import { ExecutorServiceConfig, ExecutorServiceInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput } from "../config/types.mjs";
|
|
13
|
+
import { ConcurrencyPolicy, RetryPolicy } from "../../types/workflow.generated.mjs";
|
|
14
|
+
import { AuthInvoker, defineAuth } from "./auth/index.mjs";
|
|
15
|
+
import { createResolver } from "./resolver/resolver.mjs";
|
|
16
|
+
import { QueryType } from "./resolver/types.mjs";
|
|
17
|
+
import { WORKFLOW_TEST_ENV_KEY } from "./workflow/test-env-key.mjs";
|
|
18
|
+
import { WorkflowJob, WorkflowJobContext, createWorkflowJob } from "./workflow/job.mjs";
|
|
19
|
+
import { Workflow, WorkflowConfig, createWorkflow } from "./workflow/workflow.mjs";
|
|
20
|
+
import { FunctionOperation, GqlOperation, Operation, WebhookOperation, WorkflowOperation } from "./executor/operation.mjs";
|
|
21
|
+
import { AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, ResolverExecutedArgs, ResolverExecutedTrigger, TailorDBTrigger, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger } from "./executor/trigger/event.mjs";
|
|
22
|
+
import { ScheduleArgs, ScheduleTrigger, scheduleTrigger } from "./executor/trigger/schedule.mjs";
|
|
23
|
+
import { IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, incomingWebhookTrigger } from "./executor/trigger/webhook.mjs";
|
|
24
|
+
import { Trigger } from "./executor/trigger/index.mjs";
|
|
25
|
+
import { createExecutor } from "./executor/executor.mjs";
|
|
26
|
+
import { WaitPointInstance, defineWaitPoint, defineWaitPoints } from "./workflow/wait-point.mjs";
|
|
27
|
+
import { defineStaticWebSite } from "./staticwebsite/index.mjs";
|
|
28
|
+
import { defineAIGateway } from "./aigateway/index.mjs";
|
|
29
|
+
import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./idp/permission.mjs";
|
|
30
|
+
import { defineIdp } from "./idp/index.mjs";
|
|
31
|
+
import { defineSecretManager } from "./secrets/index.mjs";
|
|
32
|
+
import { HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, createHttpAdapter } from "./http-adapter/http-adapter.mjs";
|
|
33
|
+
export { type AIGatewayConfig, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, AuthInvoker, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type DefinedAuth, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, type PermissionCondition, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, TailorDBTrigger, type TailorDBType, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WORKFLOW_TEST_ENV_KEY, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineIdp, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Resolver } from "../../../types/resolver.generated.mjs";
|
|
2
|
+
import { ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput } from "../../config/types.mjs";
|
|
3
|
+
import { createResolver } from "./resolver.mjs";
|
|
4
|
+
import { QueryType } from "./types.mjs";
|
|
5
|
+
export { type QueryType, type Resolver, type ResolverExternalConfig, type ResolverServiceConfig, type ResolverServiceInput, createResolver };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { TailorEnv, TailorInvoker, TailorUser } from "../../../runtime/types.mjs";
|
|
2
|
+
import { InferFieldsOutput, output } from "../../../types/helpers.mjs";
|
|
3
|
+
import { ResolverInput } from "../../../types/resolver.generated.mjs";
|
|
4
|
+
import { TailorAnyField, TailorField } from "../../types/type.mjs";
|
|
5
|
+
import { MachineUserName } from "../../types/machine-user.mjs";
|
|
6
|
+
import { AuthInvoker } from "../auth/index.mjs";
|
|
7
|
+
|
|
8
|
+
//#region src/configure/services/resolver/resolver.d.ts
|
|
9
|
+
type Context<Input extends Record<string, TailorAnyField> | undefined> = {
|
|
10
|
+
input: Input extends Record<string, TailorAnyField> ? InferFieldsOutput<Input> : never;
|
|
11
|
+
user: TailorUser;
|
|
12
|
+
invoker?: TailorInvoker;
|
|
13
|
+
env: TailorEnv;
|
|
14
|
+
};
|
|
15
|
+
type OutputType<O> = O extends TailorAnyField ? output<O> : O extends Record<string, TailorAnyField> ? InferFieldsOutput<O> : never;
|
|
16
|
+
/**
|
|
17
|
+
* Normalized output type that preserves generic type information.
|
|
18
|
+
* - If Output is already a TailorField, use it as-is
|
|
19
|
+
* - If Output is a Record of fields, wrap it as a nested TailorField
|
|
20
|
+
*/
|
|
21
|
+
type NormalizedOutput<Output extends TailorAnyField | Record<string, TailorAnyField>> = Output extends TailorAnyField ? Output : TailorField<{
|
|
22
|
+
type: "nested";
|
|
23
|
+
array: false;
|
|
24
|
+
}, InferFieldsOutput<Extract<Output, Record<string, TailorAnyField>>>>;
|
|
25
|
+
type ResolverReturn<Input extends Record<string, TailorAnyField> | undefined, Output extends TailorAnyField | Record<string, TailorAnyField>> = Omit<ResolverInput, "input" | "output" | "body" | "authInvoker"> & Readonly<{
|
|
26
|
+
input?: Input;
|
|
27
|
+
output: NormalizedOutput<Output>;
|
|
28
|
+
body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
|
|
29
|
+
authInvoker?: AuthInvoker<string> | MachineUserName;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Create a resolver definition for the Tailor SDK.
|
|
33
|
+
*
|
|
34
|
+
* The `body` function receives a context with `input` (typed from `config.input`),
|
|
35
|
+
* `user`, `invoker` (reflects `authInvoker` delegation), and `env`.
|
|
36
|
+
* The return value of `body` must match the `output` type.
|
|
37
|
+
*
|
|
38
|
+
* `output` accepts either a single TailorField (e.g. `t.string()`) or a
|
|
39
|
+
* Record of fields (e.g. `{ name: t.string(), age: t.int() }`).
|
|
40
|
+
*
|
|
41
|
+
* `publishEvents` enables publishing execution events for this resolver.
|
|
42
|
+
* If not specified, this is automatically set to true when an executor uses this resolver
|
|
43
|
+
* with `resolverExecutedTrigger`. If explicitly set to false while an executor uses this
|
|
44
|
+
* resolver, an error will be thrown during apply.
|
|
45
|
+
* @template Input
|
|
46
|
+
* @template Output
|
|
47
|
+
* @param config - Resolver configuration
|
|
48
|
+
* @returns Normalized resolver configuration
|
|
49
|
+
* @example
|
|
50
|
+
* import { createResolver, t } from "@tailor-platform/sdk";
|
|
51
|
+
*
|
|
52
|
+
* export default createResolver({
|
|
53
|
+
* name: "getUser",
|
|
54
|
+
* operation: "query",
|
|
55
|
+
* input: {
|
|
56
|
+
* id: t.string(),
|
|
57
|
+
* },
|
|
58
|
+
* body: async ({ input, user }) => {
|
|
59
|
+
* const db = getDB("tailordb");
|
|
60
|
+
* const result = await db.selectFrom("User").selectAll().where("id", "=", input.id).executeTakeFirst();
|
|
61
|
+
* return { name: result?.name ?? "", email: result?.email ?? "" };
|
|
62
|
+
* },
|
|
63
|
+
* output: t.object({
|
|
64
|
+
* name: t.string(),
|
|
65
|
+
* email: t.string(),
|
|
66
|
+
* }),
|
|
67
|
+
* });
|
|
68
|
+
*/
|
|
69
|
+
declare function createResolver<Input extends Record<string, TailorAnyField> | undefined = undefined, Output extends TailorAnyField | Record<string, TailorAnyField> = TailorAnyField>(config: Omit<ResolverInput, "input" | "output" | "body" | "authInvoker"> & Readonly<{
|
|
70
|
+
input?: Input;
|
|
71
|
+
output: Output;
|
|
72
|
+
body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
|
|
73
|
+
authInvoker?: AuthInvoker<string> | MachineUserName;
|
|
74
|
+
}>): ResolverReturn<Input, Output>;
|
|
75
|
+
type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { ResolverConfig, createResolver };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { SecretsConfig, SecretsDefinitionBrand } from "./types.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/configure/services/secrets/index.d.ts
|
|
4
|
+
type SecretsVaultInput = Record<string, string>;
|
|
5
|
+
type SecretsVaultInputNullish = Record<string, string | undefined | null>;
|
|
6
|
+
type SecretsInput = Record<string, SecretsVaultInput>;
|
|
7
|
+
type SecretsInputNullish = Record<string, SecretsVaultInputNullish>;
|
|
8
|
+
type SecretsOptions = {
|
|
9
|
+
readonly ignoreNullishValues: boolean;
|
|
10
|
+
};
|
|
11
|
+
type DefinedSecrets<T extends SecretsInputNullish> = {
|
|
12
|
+
readonly vaults: T;
|
|
13
|
+
readonly options: SecretsOptions;
|
|
14
|
+
get<V extends Extract<keyof T, string>, S extends Extract<keyof T[V], string>>(vault: V, secret: S): Promise<string | undefined>;
|
|
15
|
+
getAll<V extends Extract<keyof T, string>, S extends Extract<keyof T[V], string>>(vault: V, secrets: readonly S[]): Promise<(string | undefined)[]>;
|
|
16
|
+
} & SecretsDefinitionBrand;
|
|
17
|
+
/**
|
|
18
|
+
* Define secrets configuration for the Tailor SDK.
|
|
19
|
+
* Each key is a vault name, and its value is a record of secret name to secret value.
|
|
20
|
+
* @param config - Secrets configuration mapping vault names to their secrets
|
|
21
|
+
* @returns Defined secrets with typed runtime access methods
|
|
22
|
+
*/
|
|
23
|
+
declare function defineSecretManager<const T extends SecretsInput>(config: T): DefinedSecrets<T>;
|
|
24
|
+
/**
|
|
25
|
+
* Define secrets configuration for the Tailor SDK with ignoreNullishValues option.
|
|
26
|
+
* When `ignoreNullishValues` is true, secrets with nullish values are skipped during deploy
|
|
27
|
+
* instead of causing an error. This is useful for CI environments where not all
|
|
28
|
+
* secret values are available.
|
|
29
|
+
* @param config - Secrets configuration mapping vault names to their secrets
|
|
30
|
+
* @param options - Options for secret management behavior
|
|
31
|
+
* @param options.ignoreNullishValues - When true, secrets with nullish values are skipped during deploy
|
|
32
|
+
* @returns Defined secrets with typed runtime access methods
|
|
33
|
+
*/
|
|
34
|
+
declare function defineSecretManager<const T extends SecretsInputNullish>(config: T, options: {
|
|
35
|
+
ignoreNullishValues: true;
|
|
36
|
+
}): DefinedSecrets<T>;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { type SecretsConfig, defineSecretManager };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SecretsInput } from "../../../types/secrets.generated.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/configure/services/secrets/types.d.ts
|
|
4
|
+
declare const secretsDefinitionBrand: unique symbol;
|
|
5
|
+
type SecretsDefinitionBrand = {
|
|
6
|
+
readonly [secretsDefinitionBrand]: true;
|
|
7
|
+
};
|
|
8
|
+
/** Type accepted by `AppConfig.secrets`. Only values returned by `defineSecretManager()` satisfy this. */
|
|
9
|
+
type SecretsConfig = SecretsInput & SecretsDefinitionBrand;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SecretsConfig, SecretsDefinitionBrand };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { StaticWebsiteInput } from "../../../types/staticwebsite.generated.mjs";
|
|
2
|
+
import { StaticWebsiteConfig, StaticWebsiteDefinitionBrand } from "./types.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/configure/services/staticwebsite/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Define a static website configuration for the Tailor SDK.
|
|
7
|
+
* @param name - Static website name
|
|
8
|
+
* @param config - Static website configuration
|
|
9
|
+
* @returns Defined static website
|
|
10
|
+
*/
|
|
11
|
+
declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly url: `${string}:url`;
|
|
14
|
+
readonly description?: string | undefined;
|
|
15
|
+
readonly allowedIpAddresses?: string[] | undefined;
|
|
16
|
+
readonly customDomains?: string[] | undefined;
|
|
17
|
+
} & StaticWebsiteDefinitionBrand;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { type StaticWebsiteConfig, defineStaticWebSite };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { StaticWebsiteInput } from "../../../types/staticwebsite.generated.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/configure/services/staticwebsite/types.d.ts
|
|
4
|
+
declare const staticWebsiteDefinitionBrand: unique symbol;
|
|
5
|
+
type StaticWebsiteDefinitionBrand = {
|
|
6
|
+
readonly [staticWebsiteDefinitionBrand]: true;
|
|
7
|
+
};
|
|
8
|
+
/** Type accepted by `AppConfig.staticWebsites`. Only values returned by `defineStaticWebSite()` satisfy this. */
|
|
9
|
+
type StaticWebsiteConfig = StaticWebsiteInput & StaticWebsiteDefinitionBrand;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { StaticWebsiteConfig, StaticWebsiteDefinitionBrand };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DBFieldMetadata, GqlOperationsConfig, Hook, TailorDBServiceInput, TypeFeatures } from "./types.mjs";
|
|
2
|
+
import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./permission.mjs";
|
|
3
|
+
import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./schema.mjs";
|
|
4
|
+
export { type PermissionCondition, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBType, type TailorTypeGqlPermission, type TailorTypePermission, db, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission };
|