@tailor-platform/sdk 2.0.0-next.2 → 2.0.0-next.4
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 +511 -10
- package/README.md +9 -9
- package/agent-skills/{tailor-sdk → tailor}/SKILL.md +3 -1
- package/dist/aigateway-DR4Kwuik.mjs +9 -0
- package/dist/aigateway-DR4Kwuik.mjs.map +1 -0
- package/dist/application-BO4ZF8wP.mjs +3 -0
- package/dist/application-BX13RArL.mjs +6669 -0
- package/dist/application-BX13RArL.mjs.map +1 -0
- package/dist/authconnection-CZvi9ANm.mjs +9 -0
- package/dist/authconnection-CZvi9ANm.mjs.map +1 -0
- package/dist/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/apply-phases.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-execution-policy.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 +11 -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 +223 -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 +98 -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 +61 -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/erd-viewer-assets/app.js +279 -36
- package/dist/cli/erd-viewer-assets/index.html +4 -0
- package/dist/cli/erd-viewer-assets/styles.css +252 -5
- package/dist/cli/index.d.mts +18 -3
- package/dist/cli/index.mjs +2237 -520
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +81 -21107
- package/dist/cli/lib.mjs +7 -10
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/query/index.d.mts +39 -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 +26 -0
- package/dist/cli/shared/context.d.mts +28 -0
- package/dist/cli/shared/script-executor.d.mts +75 -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/ts-hook.d.mts +4 -0
- package/dist/cli/ts-hook.mjs +333 -0
- package/dist/completion/zsh-worker.zsh +1531 -1131
- package/dist/configure/config/index.d.mts +21 -0
- package/dist/configure/config/types.d.mts +105 -0
- package/dist/configure/index.d.mts +124 -9
- package/dist/configure/index.mjs +136 -23
- 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 +34 -0
- package/dist/configure/services/auth/types.d.mts +172 -0
- package/dist/configure/services/executor/executor.d.mts +81 -0
- package/dist/configure/services/executor/index.d.mts +8 -0
- package/dist/configure/services/executor/operation.d.mts +45 -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 +34 -0
- package/dist/configure/services/resolver/index.d.mts +5 -0
- package/dist/configure/services/resolver/resolver.d.mts +75 -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 +456 -0
- package/dist/configure/services/tailordb/types.d.mts +149 -0
- package/dist/configure/services/workflow/execution-policy.d.mts +71 -0
- package/dist/configure/services/workflow/execution-policy.types.d.mts +104 -0
- package/dist/configure/services/workflow/index.d.mts +8 -0
- package/dist/configure/services/workflow/job.d.mts +84 -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 +54 -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-runtime.d.mts +17 -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 +2 -0
- package/dist/configure/types/type.d.mts +82 -0
- package/dist/{context-Bd266-ru.mjs → context-DYQVYWqZ.mjs} +4 -5
- package/dist/context-DYQVYWqZ.mjs.map +1 -0
- package/dist/{crashreport-DFq-vsU0.mjs → crashreport-Cg-pqRJV.mjs} +6 -6
- package/dist/{crashreport-DFq-vsU0.mjs.map → crashreport-Cg-pqRJV.mjs.map} +1 -1
- package/dist/{crashreport-BMWcxeSE.mjs → crashreport-D3RjuSYb.mjs} +1 -1
- package/dist/enum-constants-j9QBF0cB.mjs.map +1 -1
- package/dist/{errors-Dtf2WPaW.mjs → errors-118wUDRr.mjs} +2 -2
- package/dist/errors-118wUDRr.mjs.map +1 -0
- package/dist/field-runtime-CAnh_oow.mjs +183 -0
- package/dist/field-runtime-CAnh_oow.mjs.map +1 -0
- package/dist/{file-BbdFGdMV.mjs → file-BUcmVIH2.mjs} +12 -14
- package/dist/file-BUcmVIH2.mjs.map +1 -0
- package/dist/{file-utils-CYZnO1pX.mjs → file-utils-yEiIS4nJ.mjs} +2 -2
- package/dist/file-utils-yEiIS4nJ.mjs.map +1 -0
- package/dist/{globals-Cf0sxIt8.mjs → globals-BjhJJ2dN.mjs} +5 -47
- package/dist/globals-BjhJJ2dN.mjs.map +1 -0
- package/dist/iconv-QWaZh0TT.mjs +38 -0
- package/dist/iconv-QWaZh0TT.mjs.map +1 -0
- package/dist/{idp-BDbK5gjm.mjs → idp-RA_swu-h.mjs} +12 -5
- package/dist/idp-RA_swu-h.mjs.map +1 -0
- package/dist/{interceptor-D-q1rvRl.mjs → interceptor-e33JtsC-.mjs} +2 -2
- package/dist/interceptor-e33JtsC-.mjs.map +1 -0
- package/dist/kysely/index.d.mts +2 -3
- package/dist/{kysely-type-DR8uzZTA.mjs → kysely-type-D-zflMGf.mjs} +2 -2
- package/dist/{kysely-type-DR8uzZTA.mjs.map → kysely-type-D-zflMGf.mjs.map} +1 -1
- package/dist/{logger-CxF-Ex5d.mjs → logger-BEiZZ3qT.mjs} +3 -3
- package/dist/{logger-CxF-Ex5d.mjs.map → logger-BEiZZ3qT.mjs.map} +1 -1
- 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/platform-serialize-RoRtBS0v.mjs +46 -0
- package/dist/platform-serialize-RoRtBS0v.mjs.map +1 -0
- package/dist/plugin/builtin/enum-constants/index.d.mts +16 -1
- package/dist/plugin/builtin/file-utils/index.d.mts +16 -1
- package/dist/plugin/builtin/file-utils/index.mjs +1 -1
- package/dist/plugin/builtin/kysely-type/index.d.mts +16 -1
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/index.d.mts +45 -1
- package/dist/plugin/builtin/seed/index.mjs +1 -1
- package/dist/plugin/get-generated-type.d.mts +17 -0
- package/dist/plugin/index.d.mts +3 -118
- package/dist/plugin/index.mjs +1 -1
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/manager.d.mts +1 -0
- package/dist/plugin/types.d.mts +243 -0
- package/dist/plugin/with-context.d.mts +102 -0
- package/dist/{runtime-CY4JvrDj.mjs → register-ts-hook-BM1caLT0.mjs} +4128 -2744
- package/dist/register-ts-hook-BM1caLT0.mjs.map +1 -0
- package/dist/{registry-DH4m7eYo.mjs → registry-BSbq6SPo.mjs} +4 -3
- package/dist/registry-BSbq6SPo.mjs.map +1 -0
- package/dist/{repl-editor-DmGr9zMw.mjs → repl-editor-BCozyiNq.mjs} +6 -5
- package/dist/{repl-editor-DmGr9zMw.mjs.map → repl-editor-BCozyiNq.mjs.map} +1 -1
- package/dist/resource_pb-BRv7AMXK.mjs +49 -0
- package/dist/resource_pb-BRv7AMXK.mjs.map +1 -0
- package/dist/runtime/aigateway.d.mts +26 -0
- package/dist/runtime/aigateway.mjs +3 -0
- package/dist/runtime/authconnection.d.mts +22 -2
- package/dist/runtime/authconnection.mjs +2 -2
- package/dist/runtime/context.d.mts +55 -2
- package/dist/runtime/context.mjs +2 -2
- package/dist/runtime/file.d.mts +170 -2
- package/dist/runtime/file.mjs +2 -2
- package/dist/runtime/globals.d.mts +31 -19
- package/dist/runtime/iconv.d.mts +73 -2
- package/dist/runtime/iconv.mjs +2 -2
- package/dist/runtime/idp.d.mts +129 -2
- package/dist/runtime/idp.mjs +2 -2
- package/dist/runtime/index.d.mts +47 -9
- package/dist/runtime/index.mjs +9 -8
- package/dist/runtime/secretmanager.d.mts +41 -2
- package/dist/runtime/secretmanager.mjs +2 -2
- package/dist/{types-BZ7QKVE8.d.mts → runtime/types.d.mts} +4 -5
- package/dist/runtime/workflow.d.mts +113 -2
- package/dist/runtime/workflow.mjs +2 -2
- package/dist/{schema-Dtw9Orye.mjs → schema-C4LYbXVG.mjs} +21 -186
- package/dist/schema-C4LYbXVG.mjs.map +1 -0
- package/dist/{secret-file-VSVGy1V0.mjs → secret-file-aoNXJmKa.mjs} +3 -3
- package/dist/secret-file-aoNXJmKa.mjs.map +1 -0
- package/dist/secretmanager-Bd45j7an.mjs +98 -0
- package/dist/secretmanager-Bd45j7an.mjs.map +1 -0
- package/dist/secretmanager-CYlpffsz.mjs +13 -0
- package/dist/secretmanager-CYlpffsz.mjs.map +1 -0
- package/dist/seed/index.d.mts +1 -2
- package/dist/{seed-izIEyP3z.mjs → seed-CRSQJI_z.mjs} +14 -3
- package/dist/seed-CRSQJI_z.mjs.map +1 -0
- package/dist/service-CkIwEctX.mjs +3 -0
- package/dist/{service-DU1mVzri2.mjs → service-DeZeYa06.mjs} +3 -3
- package/dist/service-DeZeYa06.mjs.map +1 -0
- package/dist/{service-DjyqbCaJ.mjs → service-ufH7sS8o.mjs} +396 -58
- package/dist/service-ufH7sS8o.mjs.map +1 -0
- package/dist/service_pb-B2FF59sP.mjs +3 -0
- package/dist/service_pb-B5w9rjPY.mjs +955 -0
- package/dist/service_pb-B5w9rjPY.mjs.map +1 -0
- 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 +862 -0
- package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +310 -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-CdqJEzkj.mjs → telemetry-BRVdwh14.mjs} +3 -3
- package/dist/telemetry-BRVdwh14.mjs.map +1 -0
- package/dist/telemetry-CkbkeJxl.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 +145 -0
- package/dist/types/executor.generated.d.mts +177 -0
- package/dist/types/helpers.d.mts +39 -0
- package/dist/types/http-adapter.generated.d.mts +17 -0
- package/dist/{workflow.generated-ClEjBYhm.d.mts → types/idp.generated.d.mts} +98 -185
- package/dist/types/resolver.generated.d.mts +39 -0
- package/dist/types/secrets.generated.d.mts +14 -0
- package/dist/types/staticwebsite.generated.d.mts +10 -0
- package/dist/{types-CdcQh4Z2.d.mts → types/tailordb.generated.d.mts} +2 -287
- package/dist/types/workflow.generated.d.mts +12 -0
- package/dist/types-C-lQ4se3.mjs +4 -0
- package/dist/types-CXF2OYdR.mjs +199 -0
- package/dist/types-CXF2OYdR.mjs.map +1 -0
- package/dist/utils/test/index.d.mts +5 -89
- 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 +2 -2
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.d.mts +12 -428
- package/dist/vitest/index.mjs +740 -9
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock-kysely.d.mts +62 -0
- package/dist/vitest/mock.d.mts +9 -0
- package/dist/vitest/mocks/aigateway.d.mts +30 -0
- package/dist/vitest/mocks/authconnection.d.mts +28 -0
- package/dist/vitest/mocks/file.d.mts +41 -0
- package/dist/vitest/mocks/iconv.d.mts +27 -0
- package/dist/vitest/mocks/idp.d.mts +44 -0
- package/dist/vitest/mocks/secretmanager.d.mts +33 -0
- package/dist/vitest/mocks/tailordb.d.mts +71 -0
- package/dist/vitest/mocks/workflow.d.mts +117 -0
- package/dist/vitest/setup.d.mts +1 -2
- package/dist/vitest/setup.mjs +2 -2
- package/dist/vitest/workflow-local.d.mts +40 -0
- package/dist/workflow-GNuSnsTx.mjs +22 -0
- package/dist/workflow-GNuSnsTx.mjs.map +1 -0
- package/docs/cli/application.md +98 -250
- package/docs/cli/auth.md +51 -295
- package/docs/cli/completion.md +1 -25
- package/docs/cli/crashreport.md +3 -61
- package/docs/cli/executor.md +23 -187
- package/docs/cli/function.md +14 -130
- package/docs/cli/organization.md +11 -221
- package/docs/cli/plugin.md +29 -0
- package/docs/cli/query.md +2 -22
- package/docs/cli/secret.md +71 -251
- package/docs/cli/setup.md +137 -41
- package/docs/cli/skills.md +50 -39
- package/docs/cli/staticwebsite.md +32 -180
- package/docs/cli/tailordb.md +97 -323
- package/docs/cli/upgrade.md +2 -22
- package/docs/cli/user.md +78 -247
- package/docs/cli/workflow.md +44 -203
- package/docs/cli/workspace.md +165 -538
- package/docs/cli-reference.md +167 -67
- package/docs/configuration.md +34 -4
- package/docs/github-actions.md +46 -19
- package/docs/migration/v2.md +397 -26
- package/docs/multi-environment.md +29 -7
- package/docs/plugin/custom.md +4 -4
- package/docs/plugin/index.md +8 -8
- package/docs/quickstart.md +8 -7
- package/docs/runtime.md +9 -3
- package/docs/services/aigateway.md +18 -2
- package/docs/services/auth.md +34 -42
- package/docs/services/http-adapter.md +16 -1
- package/docs/services/idp.md +55 -2
- package/docs/services/resolver.md +2 -2
- package/docs/services/secret.md +11 -11
- package/docs/services/staticwebsite.md +8 -2
- package/docs/services/tailordb-migration.md +25 -23
- package/docs/services/tailordb.md +55 -32
- package/docs/services/workflow.md +92 -14
- package/docs/testing.md +49 -3
- package/package.json +42 -31
- package/postinstall.mjs +4 -6
- package/dist/application-Dtqap5jM.mjs +0 -3
- package/dist/application-XuMWK4eq.mjs +0 -7257
- package/dist/application-XuMWK4eq.mjs.map +0 -1
- package/dist/authconnection-D2MhtTN5.mjs +0 -15
- package/dist/authconnection-D2MhtTN5.mjs.map +0 -1
- package/dist/authconnection-DvUQAjQS.d.mts +0 -39
- package/dist/context-Bd266-ru.mjs.map +0 -1
- package/dist/context-C2lEi9uw.d.mts +0 -47
- package/dist/errors-Dtf2WPaW.mjs.map +0 -1
- package/dist/field-DOsJCPFa.mjs +0 -22
- package/dist/field-DOsJCPFa.mjs.map +0 -1
- package/dist/file-BbdFGdMV.mjs.map +0 -1
- package/dist/file-Dq3NIt_F.d.mts +0 -211
- package/dist/file-utils-CYZnO1pX.mjs.map +0 -1
- package/dist/globals-Cf0sxIt8.mjs.map +0 -1
- package/dist/http-adapter.generated-DFsXDdm5.d.mts +0 -581
- package/dist/iconv-Co-TOPuH.d.mts +0 -122
- package/dist/iconv-D2vi8G36.mjs +0 -63
- package/dist/iconv-D2vi8G36.mjs.map +0 -1
- package/dist/idp-BDbK5gjm.mjs.map +0 -1
- package/dist/idp-DrhVrLmV.d.mts +0 -160
- package/dist/index-BI-_j9Z3.d.mts +0 -1013
- package/dist/index-C4JirJH8.d.mts +0 -18
- package/dist/index-CZfWhr0a.d.mts +0 -18
- package/dist/index-Cg8VKAdN.d.mts +0 -46
- package/dist/index-DYRjoLXD.d.mts +0 -47
- package/dist/index-lFpcjHPU.d.mts +0 -201
- package/dist/index-nW7hE6oE.d.mts +0 -18
- package/dist/interceptor-D-q1rvRl.mjs.map +0 -1
- package/dist/mock-FPxmnt-y.mjs +0 -759
- package/dist/mock-FPxmnt-y.mjs.map +0 -1
- package/dist/registry-DH4m7eYo.mjs.map +0 -1
- package/dist/rolldown-runtime-DXywRVcq.mjs +0 -20
- package/dist/runtime-CY4JvrDj.mjs.map +0 -1
- package/dist/schema-Dtw9Orye.mjs.map +0 -1
- package/dist/secret-file-VSVGy1V0.mjs.map +0 -1
- package/dist/secretmanager-B3n4KHfm.d.mts +0 -55
- package/dist/secretmanager-BVxw3ih_.mjs +0 -24
- package/dist/secretmanager-BVxw3ih_.mjs.map +0 -1
- package/dist/seed-izIEyP3z.mjs.map +0 -1
- package/dist/service-DCqIWibD.mjs +0 -3
- package/dist/service-DU1mVzri2.mjs.map +0 -1
- package/dist/service-DjyqbCaJ.mjs.map +0 -1
- package/dist/telemetry-CdqJEzkj.mjs.map +0 -1
- package/dist/telemetry-ClwW5ohF.mjs +0 -3
- package/dist/types-74etvaxy.mjs +0 -4
- package/dist/types-BDRml5C3.d.mts +0 -574
- package/dist/types-BQijbo4m.mjs +0 -371
- package/dist/types-BQijbo4m.mjs.map +0 -1
- package/dist/types-BX4q6Mo6.d.mts +0 -339
- package/dist/workflow-BOmaZwwG.mjs +0 -43
- package/dist/workflow-BOmaZwwG.mjs.map +0 -1
- package/dist/workflow-BVy4XWjS.d.mts +0 -101
|
@@ -1,581 +0,0 @@
|
|
|
1
|
-
import { i as InferredAttributeMap, o as TailorPrincipal } from "./types-BZ7QKVE8.mjs";
|
|
2
|
-
import { A as Validators, D as TailorField, E as FieldValidateInput, F as output, P as Prettify, S as EnumValue, T as FieldOutput, a as Hooks, b as ArrayFieldOutput, g as TailorDBType$1, i as Hook, j as InferFieldsOutput, k as TailorToTs, l as RelationType, n as DefinedDBFieldMetadata, o as IndexDef, p as TailorDBField$1, r as ExcludeNestedDBFields, t as DBFieldMetadata, u as SerialConfig, v as TypeFeatures, w as FieldOptions } from "./types-CdcQh4Z2.mjs";
|
|
3
|
-
import { a as PluginConfigs } from "./types-BDRml5C3.mjs";
|
|
4
|
-
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
5
|
-
|
|
6
|
-
//#region src/configure/types/field.d.ts
|
|
7
|
-
type AllowedValues = readonly [string | EnumValue, ...(string | EnumValue)[]];
|
|
8
|
-
type AllowedValuesOutput<V extends AllowedValues> = V[number] extends infer T ? T extends string ? T : T extends {
|
|
9
|
-
value: infer K;
|
|
10
|
-
} ? K : never : never;
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/configure/services/tailordb/permission.d.ts
|
|
13
|
-
/**
|
|
14
|
-
* Record-level permission configuration for a TailorDB type.
|
|
15
|
-
* Defines create, read, update, and delete permissions.
|
|
16
|
-
*
|
|
17
|
-
* Prefer object format with explicit `conditions` and `permit` for readability.
|
|
18
|
-
* Shorthand array format is supported for compatibility, but less readable.
|
|
19
|
-
*
|
|
20
|
-
* For update operations, use `newRecord`/`oldRecord` operands instead of `record`.
|
|
21
|
-
* @example
|
|
22
|
-
* const permission: TailorTypePermission = {
|
|
23
|
-
* create: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
|
|
24
|
-
* read: [{ conditions: [[{ record: "isPublic" }, "=", true]], permit: true }],
|
|
25
|
-
* update: [{ conditions: [[{ newRecord: "ownerId" }, "=", { user: "id" }]], permit: true }],
|
|
26
|
-
* delete: [{ conditions: [[{ record: "ownerId" }, "=", { user: "id" }]], permit: true }],
|
|
27
|
-
* };
|
|
28
|
-
*/
|
|
29
|
-
type TailorTypePermission<User extends object = InferredAttributeMap, Type extends object = object> = {
|
|
30
|
-
create: readonly ActionPermission<"record", User, Type, false>[];
|
|
31
|
-
read: readonly ActionPermission<"record", User, Type, false>[];
|
|
32
|
-
update: readonly ActionPermission<"record", User, Type, true>[];
|
|
33
|
-
delete: readonly ActionPermission<"record", User, Type, false>[];
|
|
34
|
-
};
|
|
35
|
-
type ActionPermission<Level extends "record" | "gql" = "record" | "gql", User extends object = InferredAttributeMap, Type extends object = object, Update extends boolean = boolean> = {
|
|
36
|
-
conditions: PermissionCondition<Level, User, Update, Type> | readonly PermissionCondition<Level, User, Update, Type>[];
|
|
37
|
-
description?: string | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* Whether matching records are granted (`true`) or denied (`false`).
|
|
40
|
-
* Omitting `permit` in this object form defaults to `deny` and emits a
|
|
41
|
-
* warning; set it explicitly. (The array shorthand defaults to `allow`.)
|
|
42
|
-
*/
|
|
43
|
-
permit?: boolean;
|
|
44
|
-
} | readonly [...PermissionCondition<Level, User, Update, Type>, ...([] | [boolean])] | readonly [...PermissionCondition<Level, User, Update, Type>[], ...([] | [boolean])];
|
|
45
|
-
type TailorTypeGqlPermission<User extends object = InferredAttributeMap, Type extends object = object> = readonly GqlPermissionPolicy<User, Type>[];
|
|
46
|
-
type GqlPermissionPolicy<User extends object = InferredAttributeMap, Type extends object = object> = {
|
|
47
|
-
conditions: readonly PermissionCondition<"gql", User, boolean, Type>[];
|
|
48
|
-
actions: "all" | readonly GqlPermissionAction[];
|
|
49
|
-
/**
|
|
50
|
-
* Whether matching requests are granted (`true`) or denied (`false`).
|
|
51
|
-
* Omitting `permit` defaults to `deny` and emits a warning; set it explicitly.
|
|
52
|
-
*/
|
|
53
|
-
permit?: boolean;
|
|
54
|
-
description?: string;
|
|
55
|
-
};
|
|
56
|
-
type GqlPermissionAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert";
|
|
57
|
-
type EqualityOperator = "=" | "!=";
|
|
58
|
-
type ContainsOperator = "in" | "not in";
|
|
59
|
-
type HasAnyOperator = "hasAny" | "not hasAny";
|
|
60
|
-
type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
|
|
61
|
-
type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
|
|
62
|
-
type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
|
|
63
|
-
type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
|
|
64
|
-
type UserStringOperand<User extends object = InferredAttributeMap> = {
|
|
65
|
-
user: StringFieldKeys<User> | "id";
|
|
66
|
-
};
|
|
67
|
-
type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
|
|
68
|
-
user: StringArrayFieldKeys<User>;
|
|
69
|
-
};
|
|
70
|
-
type UserBooleanOperand<User extends object = InferredAttributeMap> = {
|
|
71
|
-
user: BooleanFieldKeys<User> | "_loggedIn";
|
|
72
|
-
};
|
|
73
|
-
type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
|
|
74
|
-
user: BooleanArrayFieldKeys<User>;
|
|
75
|
-
};
|
|
76
|
-
type RecordOperand<Type extends object, Update extends boolean = false> = Update extends true ? {
|
|
77
|
-
oldRecord: (keyof Type & string) | "id";
|
|
78
|
-
} | {
|
|
79
|
-
newRecord: (keyof Type & string) | "id";
|
|
80
|
-
} : {
|
|
81
|
-
record: (keyof Type & string) | "id";
|
|
82
|
-
};
|
|
83
|
-
type StringEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, EqualityOperator, boolean] : never) | readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, string | UserStringOperand<User>] | readonly [string | UserStringOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
|
|
84
|
-
type BooleanEqualityCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, EqualityOperator, boolean | UserBooleanOperand<User>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, RecordOperand<Type, Update>] : never);
|
|
85
|
-
type EqualityCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringEqualityCondition<Level, User, Update, Type> | BooleanEqualityCondition<Level, User, Update, Type>;
|
|
86
|
-
type StringContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, string[] | UserStringArrayOperand<User>] | readonly [string | UserStringOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
|
|
87
|
-
type BooleanContainsCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = (Level extends "gql" ? readonly [string, ContainsOperator, boolean[]] : never) | readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>] | readonly [boolean | UserBooleanOperand<User>, ContainsOperator, RecordOperand<Type, Update>] : never);
|
|
88
|
-
type ContainsCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = StringContainsCondition<Level, User, Update, Type> | BooleanContainsCondition<Level, User, Update, Type>;
|
|
89
|
-
type HasAnyCondition<Level extends "record" | "gql", User extends object, Update extends boolean, Type extends object> = readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | (Level extends "record" ? readonly [RecordOperand<Type, Update>, HasAnyOperator, string[] | UserStringArrayOperand<User>] | readonly [string[] | UserStringArrayOperand<User>, HasAnyOperator, RecordOperand<Type, Update>] : never);
|
|
90
|
-
/**
|
|
91
|
-
* Type representing a permission condition that combines user attributes, record fields, and literal values using comparison operators.
|
|
92
|
-
*
|
|
93
|
-
* The User type is extended by `tailor.d.ts`, which is automatically generated when running `tailor-sdk generate`.
|
|
94
|
-
* Attributes enabled in the config file's `auth.userProfile.attributes` (or
|
|
95
|
-
* `auth.machineUserAttributes` when userProfile is omitted) become available as types.
|
|
96
|
-
* @example
|
|
97
|
-
* ```ts
|
|
98
|
-
* // tailor.config.ts
|
|
99
|
-
* export const auth = defineAuth("my-auth", {
|
|
100
|
-
* userProfile: {
|
|
101
|
-
* type: user,
|
|
102
|
-
* attributes: {
|
|
103
|
-
* isAdmin: true,
|
|
104
|
-
* roles: true,
|
|
105
|
-
* }
|
|
106
|
-
* }
|
|
107
|
-
* });
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
type PermissionCondition<Level extends "record" | "gql" = "record", User extends object = InferredAttributeMap, Update extends boolean = boolean, Type extends object = object> = EqualityCondition<Level, User, Update, Type> | ContainsCondition<Level, User, Update, Type> | HasAnyCondition<Level, User, Update, Type>;
|
|
111
|
-
/**
|
|
112
|
-
* Grants full record-level access without any conditions.
|
|
113
|
-
*
|
|
114
|
-
* Unsafe and intended only for local development, prototyping, or tests.
|
|
115
|
-
* Do not use this in production environments, as it effectively disables
|
|
116
|
-
* authorization checks.
|
|
117
|
-
*/
|
|
118
|
-
declare const unsafeAllowAllTypePermission: TailorTypePermission;
|
|
119
|
-
/**
|
|
120
|
-
* Grants full GraphQL access (all actions) without any conditions.
|
|
121
|
-
*
|
|
122
|
-
* Unsafe and intended only for local development, prototyping, or tests.
|
|
123
|
-
* Do not use this in production environments, as it effectively disables
|
|
124
|
-
* authorization checks.
|
|
125
|
-
*/
|
|
126
|
-
declare const unsafeAllowAllGqlPermission: TailorTypeGqlPermission;
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/configure/services/tailordb/schema.d.ts
|
|
129
|
-
type TailorAnyDBField = TailorDBField<any, any>;
|
|
130
|
-
type TailorAnyDBType = TailorDBType<any, any>;
|
|
131
|
-
/**
|
|
132
|
-
* Full TailorDBField interface with builder methods.
|
|
133
|
-
* Extends the minimal structural interface from types/ with fluent API methods.
|
|
134
|
-
*/
|
|
135
|
-
interface TailorDBField<Defined extends DefinedDBFieldMetadata = DefinedDBFieldMetadata, Output = any> extends Omit<TailorDBField$1<Defined, Output>, "fields"> {
|
|
136
|
-
readonly fields: Record<string, TailorAnyDBField>;
|
|
137
|
-
_metadata: DBFieldMetadata;
|
|
138
|
-
/**
|
|
139
|
-
* Parse and validate a value against this field's validation rules
|
|
140
|
-
*/
|
|
141
|
-
parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
|
|
142
|
-
/**
|
|
143
|
-
* Internal parse method that tracks field path for nested validation
|
|
144
|
-
* @private
|
|
145
|
-
*/
|
|
146
|
-
_parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
|
|
147
|
-
/**
|
|
148
|
-
* typeName is not available on TailorDB fields.
|
|
149
|
-
* Use typeName on pipeline fields (t.enum / t.object) instead.
|
|
150
|
-
*/
|
|
151
|
-
typeName(this: never, typeName: string): never;
|
|
152
|
-
/**
|
|
153
|
-
* Set a description for the field
|
|
154
|
-
*/
|
|
155
|
-
description<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
156
|
-
description: unknown;
|
|
157
|
-
} ? never : TailorField<CurrentDefined, Output>, description: string): TailorDBField<Prettify<CurrentDefined & {
|
|
158
|
-
description: true;
|
|
159
|
-
}>, Output>;
|
|
160
|
-
/**
|
|
161
|
-
* Define a relation to another type.
|
|
162
|
-
*/
|
|
163
|
-
relation<S extends RelationType, T extends TailorAnyDBType, CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
164
|
-
relation: unknown;
|
|
165
|
-
} ? never : TailorDBField<CurrentDefined, Output>, config: RelationConfig<S, T>): TailorDBField<S extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
|
|
166
|
-
unique: true;
|
|
167
|
-
index: true;
|
|
168
|
-
relation: true;
|
|
169
|
-
}> : Prettify<CurrentDefined & {
|
|
170
|
-
index: true;
|
|
171
|
-
relation: true;
|
|
172
|
-
}>, Output>;
|
|
173
|
-
/**
|
|
174
|
-
* Define a self-referencing relation
|
|
175
|
-
*/
|
|
176
|
-
relation<S extends RelationSelfConfig, CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
177
|
-
relation: unknown;
|
|
178
|
-
} ? never : TailorDBField<CurrentDefined, Output>, config: S): TailorDBField<S["type"] extends "oneToOne" | "1-1" ? Prettify<CurrentDefined & {
|
|
179
|
-
unique: true;
|
|
180
|
-
index: true;
|
|
181
|
-
relation: true;
|
|
182
|
-
}> : Prettify<CurrentDefined & {
|
|
183
|
-
index: true;
|
|
184
|
-
relation: true;
|
|
185
|
-
}>, Output>;
|
|
186
|
-
/**
|
|
187
|
-
* Add an index to the field
|
|
188
|
-
*/
|
|
189
|
-
index<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
190
|
-
index: unknown;
|
|
191
|
-
} ? never : CurrentDefined extends {
|
|
192
|
-
array: true;
|
|
193
|
-
} ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
|
|
194
|
-
index: true;
|
|
195
|
-
}>, Output>;
|
|
196
|
-
/**
|
|
197
|
-
* Make the field unique (also adds an index)
|
|
198
|
-
*/
|
|
199
|
-
unique<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
200
|
-
unique: unknown;
|
|
201
|
-
} ? never : CurrentDefined extends {
|
|
202
|
-
array: true;
|
|
203
|
-
} ? never : TailorDBField<CurrentDefined, Output>): TailorDBField<Prettify<CurrentDefined & {
|
|
204
|
-
unique: true;
|
|
205
|
-
index: true;
|
|
206
|
-
}>, Output>;
|
|
207
|
-
/**
|
|
208
|
-
* Enable vector search on the field (string type only)
|
|
209
|
-
*/
|
|
210
|
-
vector<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
211
|
-
vector: unknown;
|
|
212
|
-
} ? never : CurrentDefined extends {
|
|
213
|
-
type: "string";
|
|
214
|
-
array: false;
|
|
215
|
-
} ? TailorDBField<CurrentDefined, Output> : never): TailorDBField<Prettify<CurrentDefined & {
|
|
216
|
-
vector: true;
|
|
217
|
-
}>, Output>;
|
|
218
|
-
/**
|
|
219
|
-
* Add hooks for create/update operations on this field.
|
|
220
|
-
*/
|
|
221
|
-
hooks<CurrentDefined extends Defined, const H extends Hook<unknown, Output>>(this: CurrentDefined extends {
|
|
222
|
-
hooks: unknown;
|
|
223
|
-
} ? never : CurrentDefined extends {
|
|
224
|
-
type: "nested";
|
|
225
|
-
} ? never : TailorDBField<CurrentDefined, Output>, hooks: H): TailorDBField<Prettify<CurrentDefined & {
|
|
226
|
-
hooks?: {
|
|
227
|
-
create: H extends {
|
|
228
|
-
create: unknown;
|
|
229
|
-
} ? true : false;
|
|
230
|
-
update: H extends {
|
|
231
|
-
update: unknown;
|
|
232
|
-
} ? true : false;
|
|
233
|
-
};
|
|
234
|
-
serial: false;
|
|
235
|
-
}>, Output>;
|
|
236
|
-
/**
|
|
237
|
-
* Add validation functions to the field.
|
|
238
|
-
*/
|
|
239
|
-
validate<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
240
|
-
validate: unknown;
|
|
241
|
-
} ? never : TailorDBField<CurrentDefined, Output>, ...validate: FieldValidateInput<Output>[]): TailorDBField<Prettify<CurrentDefined & {
|
|
242
|
-
validate: true;
|
|
243
|
-
}>, Output>;
|
|
244
|
-
/**
|
|
245
|
-
* Configure serial/auto-increment behavior
|
|
246
|
-
*/
|
|
247
|
-
serial<CurrentDefined extends Defined>(this: CurrentDefined extends {
|
|
248
|
-
serial: unknown;
|
|
249
|
-
} ? never : Output extends null ? never : CurrentDefined extends {
|
|
250
|
-
type: "integer" | "string";
|
|
251
|
-
array: false;
|
|
252
|
-
} ? TailorDBField<CurrentDefined, Output> : never, config: SerialConfig<CurrentDefined["type"] & ("integer" | "string")>): TailorDBField<Prettify<CurrentDefined & {
|
|
253
|
-
serial: true;
|
|
254
|
-
hooks: {
|
|
255
|
-
create: false;
|
|
256
|
-
update: false;
|
|
257
|
-
};
|
|
258
|
-
}>, Output>;
|
|
259
|
-
/**
|
|
260
|
-
* Clone the field with optional overrides for field options
|
|
261
|
-
*/
|
|
262
|
-
clone<const NewOpt extends FieldOptions>(options?: NewOpt): TailorDBField<Prettify<Omit<Defined, "array"> & {
|
|
263
|
-
array: NewOpt extends {
|
|
264
|
-
array: true;
|
|
265
|
-
} ? true : Defined["array"];
|
|
266
|
-
}>, FieldOutput<TailorToTs[Defined["type"]], NewOpt>>;
|
|
267
|
-
}
|
|
268
|
-
/**
|
|
269
|
-
* Full TailorDBType interface with builder methods.
|
|
270
|
-
* Extends the minimal structural interface from types/ with fluent API methods.
|
|
271
|
-
*/
|
|
272
|
-
interface TailorDBType<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> extends TailorDBType$1<Fields, User> {
|
|
273
|
-
_description?: string;
|
|
274
|
-
hooks(hooks: Hooks<Fields>): TailorDBType<Fields, User>;
|
|
275
|
-
validate(validators: Validators<Fields>): TailorDBType<Fields, User>;
|
|
276
|
-
features(features: Omit<TypeFeatures, "pluralForm">): TailorDBType<Fields, User>;
|
|
277
|
-
indexes(...indexes: IndexDef<TailorDBType<Fields, User>>[]): TailorDBType<Fields, User>;
|
|
278
|
-
files<const F extends string>(files: Record<F, string> & Partial<Record<keyof output<TailorDBType<Fields, User>>, never>>): TailorDBType<Fields, User>;
|
|
279
|
-
permission<U extends object = User, P extends TailorTypePermission<U, output<TailorDBType<Fields, User>>> = TailorTypePermission<U, output<TailorDBType<Fields, User>>>>(permission: P): TailorDBType<Fields, U>;
|
|
280
|
-
gqlPermission<U extends object = User, P extends TailorTypeGqlPermission<U> = TailorTypeGqlPermission<U>>(permission: P): TailorDBType<Fields, U>;
|
|
281
|
-
description(description: string): TailorDBType<Fields, User>;
|
|
282
|
-
pickFields<K extends keyof Fields>(keys: K[]): Pick<Fields, K>;
|
|
283
|
-
pickFields<K extends keyof Fields, const Opt extends FieldOptions>(keys: K[], options: Opt): { [P in K]: Fields[P] extends TailorDBField<infer D, infer _O> ? TailorDBField<Omit<D, "array"> & {
|
|
284
|
-
array: Opt extends {
|
|
285
|
-
array: true;
|
|
286
|
-
} ? true : D["array"];
|
|
287
|
-
}, FieldOutput<TailorToTs[D["type"]], Opt>> : never };
|
|
288
|
-
omitFields<K extends keyof Fields>(keys: K[]): Omit<Fields, K>;
|
|
289
|
-
plugin<P extends keyof PluginConfigs<keyof Fields & string>>(config: { [K in P]: PluginConfigs<keyof Fields & string>[K] }): TailorDBType<Fields, User>;
|
|
290
|
-
}
|
|
291
|
-
type TailorDBInstance<Fields extends Record<string, TailorAnyDBField> = any, User extends object = InferredAttributeMap> = TailorDBType<Fields, User>;
|
|
292
|
-
interface RelationConfig<S extends RelationType, T extends TailorDBType> {
|
|
293
|
-
type: S;
|
|
294
|
-
toward: {
|
|
295
|
-
type: T;
|
|
296
|
-
as?: string;
|
|
297
|
-
key?: keyof T["fields"] & string;
|
|
298
|
-
};
|
|
299
|
-
backward?: string;
|
|
300
|
-
}
|
|
301
|
-
type RelationSelfConfig = {
|
|
302
|
-
type: RelationType;
|
|
303
|
-
toward: {
|
|
304
|
-
type: "self";
|
|
305
|
-
as?: string;
|
|
306
|
-
key?: string;
|
|
307
|
-
};
|
|
308
|
-
backward?: string;
|
|
309
|
-
};
|
|
310
|
-
type FieldParseArgs = {
|
|
311
|
-
value: unknown;
|
|
312
|
-
data: unknown;
|
|
313
|
-
invoker: TailorPrincipal | null;
|
|
314
|
-
};
|
|
315
|
-
type FieldParseInternalArgs = {
|
|
316
|
-
value: any;
|
|
317
|
-
data: unknown;
|
|
318
|
-
invoker: TailorPrincipal | null;
|
|
319
|
-
pathArray: string[];
|
|
320
|
-
};
|
|
321
|
-
/**
|
|
322
|
-
* Create a UUID field.
|
|
323
|
-
* @param options - Field configuration options
|
|
324
|
-
* @returns A UUID field
|
|
325
|
-
* @example db.uuid()
|
|
326
|
-
* @example db.uuid({ optional: true })
|
|
327
|
-
*/
|
|
328
|
-
declare function uuid<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
329
|
-
type: "uuid";
|
|
330
|
-
array: Opt extends {
|
|
331
|
-
array: true;
|
|
332
|
-
} ? true : false;
|
|
333
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
334
|
-
/**
|
|
335
|
-
* Create a string field.
|
|
336
|
-
* @param options - Field configuration options
|
|
337
|
-
* @returns A string field
|
|
338
|
-
* @example db.string()
|
|
339
|
-
* @example db.string({ optional: true })
|
|
340
|
-
*/
|
|
341
|
-
declare function string<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
342
|
-
type: "string";
|
|
343
|
-
array: Opt extends {
|
|
344
|
-
array: true;
|
|
345
|
-
} ? true : false;
|
|
346
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
347
|
-
/**
|
|
348
|
-
* Create a boolean field.
|
|
349
|
-
* Note: The method name is `bool` but creates a `boolean` type field.
|
|
350
|
-
* @param options - Field configuration options
|
|
351
|
-
* @returns A boolean field
|
|
352
|
-
* @example db.bool()
|
|
353
|
-
* @example db.bool({ optional: true })
|
|
354
|
-
*/
|
|
355
|
-
declare function bool<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
356
|
-
type: "boolean";
|
|
357
|
-
array: Opt extends {
|
|
358
|
-
array: true;
|
|
359
|
-
} ? true : false;
|
|
360
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<boolean, Opt> | null : ArrayFieldOutput<boolean, Opt>>;
|
|
361
|
-
/**
|
|
362
|
-
* Create an integer field.
|
|
363
|
-
* @param options - Field configuration options
|
|
364
|
-
* @returns An integer field
|
|
365
|
-
* @example db.int()
|
|
366
|
-
* @example db.int({ optional: true })
|
|
367
|
-
*/
|
|
368
|
-
declare function int<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
369
|
-
type: "integer";
|
|
370
|
-
array: Opt extends {
|
|
371
|
-
array: true;
|
|
372
|
-
} ? true : false;
|
|
373
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
|
|
374
|
-
/**
|
|
375
|
-
* Create a float (decimal number) field.
|
|
376
|
-
* @param options - Field configuration options
|
|
377
|
-
* @returns A float field
|
|
378
|
-
* @example db.float()
|
|
379
|
-
* @example db.float({ optional: true })
|
|
380
|
-
*/
|
|
381
|
-
declare function float<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
382
|
-
type: "float";
|
|
383
|
-
array: Opt extends {
|
|
384
|
-
array: true;
|
|
385
|
-
} ? true : false;
|
|
386
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>>;
|
|
387
|
-
interface DecimalFieldOptions extends FieldOptions {
|
|
388
|
-
scale?: number;
|
|
389
|
-
}
|
|
390
|
-
/**
|
|
391
|
-
* Create a decimal field (stored as string for precision).
|
|
392
|
-
* @param options - Field configuration options including optional scale (0-12)
|
|
393
|
-
* @returns A decimal field
|
|
394
|
-
* @example db.decimal()
|
|
395
|
-
* @example db.decimal({ scale: 2 })
|
|
396
|
-
* @example db.decimal({ scale: 2, optional: true })
|
|
397
|
-
*/
|
|
398
|
-
declare function decimal<const Opt extends DecimalFieldOptions>(options?: Opt): TailorDBField<{
|
|
399
|
-
type: "decimal";
|
|
400
|
-
array: Opt extends {
|
|
401
|
-
array: true;
|
|
402
|
-
} ? true : false;
|
|
403
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
404
|
-
/**
|
|
405
|
-
* Create a date field (date only, no time component).
|
|
406
|
-
* Format: "yyyy-MM-dd"
|
|
407
|
-
* @param options - Field configuration options
|
|
408
|
-
* @returns A date field
|
|
409
|
-
* @example db.date()
|
|
410
|
-
*/
|
|
411
|
-
declare function date<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
412
|
-
type: "date";
|
|
413
|
-
array: Opt extends {
|
|
414
|
-
array: true;
|
|
415
|
-
} ? true : false;
|
|
416
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
417
|
-
/**
|
|
418
|
-
* Create a datetime field (date and time).
|
|
419
|
-
* Format: ISO 8601 "yyyy-MM-ddTHH:mm:ssZ"
|
|
420
|
-
* @param options - Field configuration options
|
|
421
|
-
* @returns A datetime field
|
|
422
|
-
* @example db.datetime()
|
|
423
|
-
*/
|
|
424
|
-
declare function datetime<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
425
|
-
type: "datetime";
|
|
426
|
-
array: Opt extends {
|
|
427
|
-
array: true;
|
|
428
|
-
} ? true : false;
|
|
429
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string | Date, Opt> | null : ArrayFieldOutput<string | Date, Opt>>;
|
|
430
|
-
/**
|
|
431
|
-
* Create a time field (time only, no date component).
|
|
432
|
-
* Format: "HH:mm"
|
|
433
|
-
* @param options - Field configuration options
|
|
434
|
-
* @returns A time field
|
|
435
|
-
* @example db.time()
|
|
436
|
-
*/
|
|
437
|
-
declare function time<const Opt extends FieldOptions>(options?: Opt): TailorDBField<{
|
|
438
|
-
type: "time";
|
|
439
|
-
array: Opt extends {
|
|
440
|
-
array: true;
|
|
441
|
-
} ? true : false;
|
|
442
|
-
}, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>>;
|
|
443
|
-
/**
|
|
444
|
-
* Create an enum field with a fixed set of allowed string values.
|
|
445
|
-
* @param values - Array of allowed string values, or array of `{ value, description }` objects
|
|
446
|
-
* @param options - Field configuration options
|
|
447
|
-
* @returns An enum field
|
|
448
|
-
* @example db.enum(["active", "inactive", "suspended"])
|
|
449
|
-
* @example db.enum(["small", "medium", "large"], { optional: true })
|
|
450
|
-
*/
|
|
451
|
-
declare function _enum<const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt): TailorDBField<{
|
|
452
|
-
type: "enum";
|
|
453
|
-
array: Opt extends {
|
|
454
|
-
array: true;
|
|
455
|
-
} ? true : false;
|
|
456
|
-
}, FieldOutput<AllowedValuesOutput<V>, Opt>>;
|
|
457
|
-
/**
|
|
458
|
-
* Create a nested object field with sub-fields.
|
|
459
|
-
* @param fields - Record of nested field definitions
|
|
460
|
-
* @param options - Field configuration options
|
|
461
|
-
* @returns A nested object field
|
|
462
|
-
* @example db.object({ street: db.string(), city: db.string(), zip: db.string() })
|
|
463
|
-
* @example db.object({ name: db.string() }, { optional: true })
|
|
464
|
-
*/
|
|
465
|
-
declare function object<const F extends Record<string, TailorAnyDBField> & ExcludeNestedDBFields<F>, const Opt extends FieldOptions>(fields: F, options?: Opt): TailorDBField<{
|
|
466
|
-
type: "nested";
|
|
467
|
-
array: Opt extends {
|
|
468
|
-
array: true;
|
|
469
|
-
} ? true : false;
|
|
470
|
-
}, FieldOutput<InferFieldsOutput<F>, Opt>>;
|
|
471
|
-
declare const idField: TailorDBField<{
|
|
472
|
-
type: "uuid";
|
|
473
|
-
array: false;
|
|
474
|
-
}, string>;
|
|
475
|
-
type idField = typeof idField;
|
|
476
|
-
type DBType<F extends {
|
|
477
|
-
id?: never;
|
|
478
|
-
} & Record<string, TailorAnyDBField>> = TailorDBInstance<{
|
|
479
|
-
id: idField;
|
|
480
|
-
} & F>;
|
|
481
|
-
/**
|
|
482
|
-
* Creates a new database type with the specified fields.
|
|
483
|
-
* An `id` field (UUID) is automatically added to every type.
|
|
484
|
-
* @param name - The name of the type, or a tuple of [name, pluralForm]
|
|
485
|
-
* @param fields - The field definitions for the type
|
|
486
|
-
* @returns A new TailorDBType instance
|
|
487
|
-
* @example
|
|
488
|
-
* export const user = db.type("User", {
|
|
489
|
-
* name: db.string(),
|
|
490
|
-
* email: db.string(),
|
|
491
|
-
* age: db.int({ optional: true }),
|
|
492
|
-
* role: db.enum(["admin", "member"]),
|
|
493
|
-
* ...db.fields.timestamps(),
|
|
494
|
-
* });
|
|
495
|
-
* // Always export both the value and type:
|
|
496
|
-
* export type user = typeof user;
|
|
497
|
-
*/
|
|
498
|
-
declare function dbType<const F extends {
|
|
499
|
-
id?: never;
|
|
500
|
-
} & Record<string, TailorAnyDBField>>(name: string | [string, string], fields: F): DBType<F>;
|
|
501
|
-
/**
|
|
502
|
-
* Creates a new database type with the specified fields and description.
|
|
503
|
-
* An `id` field (UUID) is automatically added to every type.
|
|
504
|
-
* @param name - The name of the type, or a tuple of [name, pluralForm]
|
|
505
|
-
* @param description - A description of the type
|
|
506
|
-
* @param fields - The field definitions for the type
|
|
507
|
-
* @returns A new TailorDBType instance
|
|
508
|
-
*/
|
|
509
|
-
declare function dbType<const F extends {
|
|
510
|
-
id?: never;
|
|
511
|
-
} & Record<string, TailorAnyDBField>>(name: string | [string, string], description: string, fields: F): DBType<F>;
|
|
512
|
-
/** TailorDB schema builder utilities for defining types and fields. */
|
|
513
|
-
declare const db: {
|
|
514
|
-
type: typeof dbType;
|
|
515
|
-
uuid: typeof uuid;
|
|
516
|
-
string: typeof string;
|
|
517
|
-
bool: typeof bool;
|
|
518
|
-
int: typeof int;
|
|
519
|
-
float: typeof float;
|
|
520
|
-
decimal: typeof decimal;
|
|
521
|
-
date: typeof date;
|
|
522
|
-
datetime: typeof datetime;
|
|
523
|
-
time: typeof time;
|
|
524
|
-
enum: typeof _enum;
|
|
525
|
-
object: typeof object;
|
|
526
|
-
fields: {
|
|
527
|
-
/**
|
|
528
|
-
* Creates standard timestamp fields (createdAt, updatedAt) with auto-hooks.
|
|
529
|
-
* createdAt and updatedAt are set on create.
|
|
530
|
-
* User-specified timestamp values are respected when provided (e.g. seeding
|
|
531
|
-
* historical records); the current time is used only when the value is omitted.
|
|
532
|
-
* @returns An object with createdAt and updatedAt fields
|
|
533
|
-
* @example
|
|
534
|
-
* const model = db.type("Model", {
|
|
535
|
-
* name: db.string(),
|
|
536
|
-
* ...db.fields.timestamps(),
|
|
537
|
-
* });
|
|
538
|
-
*/
|
|
539
|
-
timestamps: () => {
|
|
540
|
-
createdAt: TailorDBField<{
|
|
541
|
-
type: "datetime";
|
|
542
|
-
array: false;
|
|
543
|
-
hooks?: {
|
|
544
|
-
create: true;
|
|
545
|
-
update: false;
|
|
546
|
-
} | undefined;
|
|
547
|
-
serial: false;
|
|
548
|
-
description: true;
|
|
549
|
-
}, string | Date>;
|
|
550
|
-
updatedAt: TailorDBField<{
|
|
551
|
-
type: "datetime";
|
|
552
|
-
array: false;
|
|
553
|
-
hooks?: {
|
|
554
|
-
create: true;
|
|
555
|
-
update: true;
|
|
556
|
-
} | undefined;
|
|
557
|
-
serial: false;
|
|
558
|
-
description: true;
|
|
559
|
-
}, string | Date>;
|
|
560
|
-
};
|
|
561
|
-
};
|
|
562
|
-
};
|
|
563
|
-
//#endregion
|
|
564
|
-
//#region src/types/http-adapter.generated.d.ts
|
|
565
|
-
type HttpAdapterConfigInput = {
|
|
566
|
-
/** Unique adapter name within the domain */name: string; /** Path pattern with segment wildcards (trailing or single-segment) */
|
|
567
|
-
pathPattern: string; /** Per-method functions that transform HTTP requests to GraphQL requests */
|
|
568
|
-
input: {
|
|
569
|
-
get?: Function | undefined;
|
|
570
|
-
post?: Function | undefined;
|
|
571
|
-
put?: Function | undefined;
|
|
572
|
-
patch?: Function | undefined;
|
|
573
|
-
delete?: Function | undefined;
|
|
574
|
-
}; /** Whether the adapter is active */
|
|
575
|
-
enabled?: boolean | undefined; /** Matching priority; the lowest value wins when multiple adapters match */
|
|
576
|
-
priority?: number | undefined; /** Function that transforms GraphQL response to HTTP response */
|
|
577
|
-
output?: Function | undefined;
|
|
578
|
-
};
|
|
579
|
-
//#endregion
|
|
580
|
-
export { TailorDBInstance as a, PermissionCondition as c, unsafeAllowAllGqlPermission as d, unsafeAllowAllTypePermission as f, TailorDBField as i, TailorTypeGqlPermission as l, AllowedValuesOutput as m, TailorAnyDBField as n, TailorDBType as o, AllowedValues as p, TailorAnyDBType as r, db as s, HttpAdapterConfigInput as t, TailorTypePermission as u };
|
|
581
|
-
//# sourceMappingURL=http-adapter.generated-DFsXDdm5.d.mts.map
|