@tailor-platform/sdk 2.0.0-next.2 → 2.0.0-next.3
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 +466 -10
- package/README.md +9 -9
- package/agent-skills/{tailor-sdk → tailor}/SKILL.md +3 -1
- package/dist/aigateway-B3oZZE6v.mjs +15 -0
- package/dist/aigateway-B3oZZE6v.mjs.map +1 -0
- package/dist/application-D2hSK1ZL.mjs +3 -0
- package/dist/application-eHp9jXld.mjs +6393 -0
- package/dist/application-eHp9jXld.mjs.map +1 -0
- package/dist/{authconnection-D2MhtTN5.mjs → authconnection-BGQM8FZI.mjs} +2 -2
- package/dist/authconnection-BGQM8FZI.mjs.map +1 -0
- 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.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 +2136 -519
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.d.mts +81 -21107
- package/dist/cli/lib.mjs +6 -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 +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 +303 -0
- package/dist/completion/zsh-worker.zsh +1523 -1123
- package/dist/configure/config/index.d.mts +21 -0
- package/dist/configure/config/types.d.mts +103 -0
- package/dist/configure/index.d.mts +122 -9
- package/dist/configure/index.mjs +24 -21
- 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 +32 -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/index.d.mts +6 -0
- package/dist/configure/services/workflow/job.d.mts +79 -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.map +1 -1
- 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-utils-CYZnO1pX.mjs.map +1 -1
- package/dist/{globals-Cf0sxIt8.mjs → globals-DhwZj0RB.mjs} +4 -46
- package/dist/globals-DhwZj0RB.mjs.map +1 -0
- package/dist/{idp-BDbK5gjm.mjs → idp-Bx25ZBdN.mjs} +9 -1
- package/dist/idp-Bx25ZBdN.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-5eAChaHO.mjs} +4 -2
- package/dist/kysely-type-5eAChaHO.mjs.map +1 -0
- 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/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-ZpBacA07.mjs} +3426 -2041
- package/dist/register-ts-hook-ZpBacA07.mjs.map +1 -0
- package/dist/registry-DH4m7eYo.mjs.map +1 -1
- 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/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 -1
- package/dist/runtime/context.d.mts +46 -2
- package/dist/runtime/file.d.mts +210 -2
- package/dist/runtime/globals.d.mts +31 -19
- package/dist/runtime/iconv.d.mts +121 -2
- package/dist/runtime/idp.d.mts +186 -2
- package/dist/runtime/idp.mjs +1 -1
- package/dist/runtime/index.d.mts +47 -9
- package/dist/runtime/index.mjs +5 -4
- package/dist/runtime/secretmanager.d.mts +54 -2
- package/dist/{types-BZ7QKVE8.d.mts → runtime/types.d.mts} +4 -5
- package/dist/runtime/workflow.d.mts +112 -2
- package/dist/runtime/workflow.mjs +2 -2
- package/dist/{schema-Dtw9Orye.mjs → schema-89dYxNC2.mjs} +17 -182
- package/dist/schema-89dYxNC2.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/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-CIrhGwHk.mjs +988 -0
- package/dist/service_pb-CIrhGwHk.mjs.map +1 -0
- package/dist/service_pb-DjwIn4jO.mjs +3 -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 +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-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 +739 -8
- 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 +115 -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-BOmaZwwG.mjs → workflow-Bo59B75H.mjs} +9 -2
- package/dist/workflow-Bo59B75H.mjs.map +1 -0
- package/docs/cli/application.md +98 -250
- package/docs/cli/auth.md +48 -292
- 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 +10 -4
- package/docs/github-actions.md +46 -19
- package/docs/migration/v2.md +286 -26
- package/docs/multi-environment.md +29 -7
- package/docs/plugin/index.md +6 -6
- package/docs/quickstart.md +8 -7
- package/docs/runtime.md +5 -1
- package/docs/services/aigateway.md +18 -2
- package/docs/services/auth.md +32 -40
- package/docs/services/http-adapter.md +16 -1
- package/docs/services/idp.md +55 -2
- package/docs/services/resolver.md +1 -1
- package/docs/services/secret.md +11 -11
- package/docs/services/staticwebsite.md +8 -2
- package/docs/services/tailordb-migration.md +24 -22
- package/docs/services/tailordb.md +25 -2
- package/docs/services/workflow.md +14 -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.map +0 -1
- package/dist/authconnection-DvUQAjQS.d.mts +0 -39
- 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-Dq3NIt_F.d.mts +0 -211
- 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/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/kysely-type-DR8uzZTA.mjs.map +0 -1
- package/dist/mock-FPxmnt-y.mjs +0 -759
- package/dist/mock-FPxmnt-y.mjs.map +0 -1
- 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/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.map +0 -1
- package/dist/workflow-BVy4XWjS.d.mts +0 -101
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
//#region src/cli/commands/tailordb/migrate/snapshot-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Schema snapshot data model for TailorDB migrations.
|
|
4
|
+
*
|
|
5
|
+
* Leaf module: these types describe the persisted snapshot format
|
|
6
|
+
* (XXXX/schema.json) and are shared by snapshot.ts (snapshot management)
|
|
7
|
+
* and diff-calculator.ts (diff types and formatting) without creating
|
|
8
|
+
* import cycles between them.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Hook configuration in schema snapshot
|
|
12
|
+
*/
|
|
13
|
+
interface SnapshotHook {
|
|
14
|
+
expr: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validation configuration in schema snapshot
|
|
18
|
+
*/
|
|
19
|
+
interface SnapshotValidation {
|
|
20
|
+
script?: {
|
|
21
|
+
expr: string;
|
|
22
|
+
};
|
|
23
|
+
errorMessage: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Serial configuration in schema snapshot
|
|
27
|
+
*/
|
|
28
|
+
interface SnapshotSerial {
|
|
29
|
+
start: number;
|
|
30
|
+
maxValue?: number;
|
|
31
|
+
format?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Enum value with optional description in schema snapshot
|
|
35
|
+
*/
|
|
36
|
+
interface SnapshotEnumValue {
|
|
37
|
+
value: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Field configuration in schema snapshot
|
|
42
|
+
*/
|
|
43
|
+
interface SnapshotFieldConfig {
|
|
44
|
+
type: string;
|
|
45
|
+
required: boolean;
|
|
46
|
+
array?: boolean;
|
|
47
|
+
index?: boolean;
|
|
48
|
+
unique?: boolean;
|
|
49
|
+
allowedValues?: SnapshotEnumValue[];
|
|
50
|
+
foreignKey?: boolean;
|
|
51
|
+
foreignKeyType?: string;
|
|
52
|
+
foreignKeyField?: string;
|
|
53
|
+
description?: string;
|
|
54
|
+
vector?: boolean;
|
|
55
|
+
hooks?: {
|
|
56
|
+
create?: SnapshotHook;
|
|
57
|
+
update?: SnapshotHook;
|
|
58
|
+
};
|
|
59
|
+
validate?: SnapshotValidation[];
|
|
60
|
+
serial?: SnapshotSerial;
|
|
61
|
+
scale?: number;
|
|
62
|
+
/** Nested fields (recursive) */
|
|
63
|
+
fields?: Record<string, SnapshotFieldConfig>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Index configuration in schema snapshot
|
|
67
|
+
*/
|
|
68
|
+
interface SnapshotIndexConfig {
|
|
69
|
+
fields: string[];
|
|
70
|
+
unique?: boolean;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Relationship configuration in schema snapshot
|
|
74
|
+
*/
|
|
75
|
+
interface SnapshotRelationship {
|
|
76
|
+
targetType: string;
|
|
77
|
+
targetField: string;
|
|
78
|
+
sourceField: string;
|
|
79
|
+
isArray: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Field-reference operand in a permission condition. Always an object with
|
|
84
|
+
* exactly one of `user` / `record` / `newRecord` / `oldRecord` keys.
|
|
85
|
+
*/
|
|
86
|
+
type SnapshotFieldRefOperand = {
|
|
87
|
+
user: string;
|
|
88
|
+
} | {
|
|
89
|
+
record: string;
|
|
90
|
+
} | {
|
|
91
|
+
newRecord: string;
|
|
92
|
+
} | {
|
|
93
|
+
oldRecord: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Literal value operand (right-hand side of a permission condition). Matches
|
|
97
|
+
* the SDK-level value operand surface — primitives and their arrays — as
|
|
98
|
+
* defined in the Zod parser schema (RecordPermissionOperandSchema /
|
|
99
|
+
* GqlPermissionOperandSchema in parser/service/tailordb/schema.ts).
|
|
100
|
+
*/
|
|
101
|
+
type SnapshotValueOperand = string | boolean | string[] | boolean[];
|
|
102
|
+
/**
|
|
103
|
+
* Permission operand union. Either a field-ref object or a literal value.
|
|
104
|
+
*/
|
|
105
|
+
type SnapshotPermissionOperand = SnapshotFieldRefOperand | SnapshotValueOperand;
|
|
106
|
+
/**
|
|
107
|
+
* Permission operators
|
|
108
|
+
*/
|
|
109
|
+
type SnapshotPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
|
|
110
|
+
/**
|
|
111
|
+
* Permission condition tuple
|
|
112
|
+
*/
|
|
113
|
+
type SnapshotPermissionCondition = readonly [SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotPermissionOperand];
|
|
114
|
+
/**
|
|
115
|
+
* Action permission policy
|
|
116
|
+
*/
|
|
117
|
+
interface SnapshotActionPermission {
|
|
118
|
+
conditions: readonly SnapshotPermissionCondition[];
|
|
119
|
+
description?: string;
|
|
120
|
+
permit: "allow" | "deny";
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Record-level permission configuration
|
|
124
|
+
*/
|
|
125
|
+
interface SnapshotRecordPermission {
|
|
126
|
+
create: readonly SnapshotActionPermission[];
|
|
127
|
+
read: readonly SnapshotActionPermission[];
|
|
128
|
+
update: readonly SnapshotActionPermission[];
|
|
129
|
+
delete: readonly SnapshotActionPermission[];
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* GQL permission actions
|
|
133
|
+
*/
|
|
134
|
+
type SnapshotGqlAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert" | "all";
|
|
135
|
+
/**
|
|
136
|
+
* GQL permission policy
|
|
137
|
+
*/
|
|
138
|
+
interface SnapshotGqlPermissionPolicy {
|
|
139
|
+
conditions: readonly SnapshotPermissionCondition[];
|
|
140
|
+
actions: readonly SnapshotGqlAction[];
|
|
141
|
+
permit: "allow" | "deny";
|
|
142
|
+
description?: string;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* GQL permission configuration
|
|
146
|
+
*/
|
|
147
|
+
type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
|
|
148
|
+
/**
|
|
149
|
+
* Type definition in schema snapshot.
|
|
150
|
+
* `pluralForm` is always materialized — either set by the SDK user, derived
|
|
151
|
+
* via inflection at snapshot construction, or backfilled when loading legacy
|
|
152
|
+
* snapshots in `loadSnapshot`.
|
|
153
|
+
*/
|
|
154
|
+
interface TailorDBSnapshotType {
|
|
155
|
+
name: string;
|
|
156
|
+
pluralForm: string;
|
|
157
|
+
description?: string;
|
|
158
|
+
fields: Record<string, SnapshotFieldConfig>;
|
|
159
|
+
settings?: {
|
|
160
|
+
aggregation?: boolean;
|
|
161
|
+
bulkUpsert?: boolean;
|
|
162
|
+
gqlOperations?: {
|
|
163
|
+
create?: boolean;
|
|
164
|
+
update?: boolean;
|
|
165
|
+
delete?: boolean;
|
|
166
|
+
read?: boolean;
|
|
167
|
+
};
|
|
168
|
+
publishEvents?: boolean;
|
|
169
|
+
};
|
|
170
|
+
indexes?: Record<string, SnapshotIndexConfig>;
|
|
171
|
+
files?: Record<string, string>;
|
|
172
|
+
forwardRelationships?: Record<string, SnapshotRelationship>;
|
|
173
|
+
backwardRelationships?: Record<string, SnapshotRelationship>;
|
|
174
|
+
permissions?: {
|
|
175
|
+
record?: SnapshotRecordPermission;
|
|
176
|
+
gql?: SnapshotGqlPermission;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Schema snapshot - full schema state at a point in time.
|
|
181
|
+
* Stored as XXXX/schema.json. Defined here (leaf module) so that
|
|
182
|
+
* snapshot-schema.ts can reference it without importing snapshot.ts.
|
|
183
|
+
*/
|
|
184
|
+
interface SchemaSnapshot {
|
|
185
|
+
/** Format version for future compatibility */
|
|
186
|
+
version: number;
|
|
187
|
+
namespace: string;
|
|
188
|
+
createdAt: string;
|
|
189
|
+
types: Record<string, TailorDBSnapshotType>;
|
|
190
|
+
}
|
|
191
|
+
declare const normalizedSchemaSnapshotBrand: unique symbol;
|
|
192
|
+
/**
|
|
193
|
+
* Schema snapshot normalized to a canonical form for consistent comparison.
|
|
194
|
+
*
|
|
195
|
+
* Returned by snapshot creation and loading functions so drift detection stays
|
|
196
|
+
* stable when local definitions omit defaults that the platform materializes.
|
|
197
|
+
*/
|
|
198
|
+
type NormalizedSchemaSnapshot = SchemaSnapshot & {
|
|
199
|
+
readonly [normalizedSchemaSnapshotBrand]: true;
|
|
200
|
+
};
|
|
201
|
+
//#endregion
|
|
202
|
+
export { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotActionPermission, SnapshotEnumValue, SnapshotFieldConfig, SnapshotFieldRefOperand, SnapshotGqlAction, SnapshotGqlPermission, SnapshotGqlPermissionPolicy, SnapshotHook, SnapshotIndexConfig, SnapshotPermissionCondition, SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotRecordPermission, SnapshotRelationship, SnapshotSerial, SnapshotValidation, SnapshotValueOperand, TailorDBSnapshotType };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { TailorDBType } from "../../../../parser/service/tailordb/types.mjs";
|
|
2
|
+
import { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotActionPermission, SnapshotEnumValue, SnapshotFieldConfig, SnapshotFieldRefOperand, SnapshotGqlAction, SnapshotGqlPermission, SnapshotGqlPermissionPolicy, SnapshotHook, SnapshotIndexConfig, SnapshotPermissionCondition, SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotRecordPermission, SnapshotRelationship, SnapshotSerial, SnapshotValidation, SnapshotValueOperand, TailorDBSnapshotType } from "./snapshot-types.mjs";
|
|
3
|
+
import { MigrationDiff } from "./diff-calculator.mjs";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/commands/tailordb/migrate/snapshot.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* Initial schema migration number (0000)
|
|
8
|
+
*/
|
|
9
|
+
declare const INITIAL_SCHEMA_NUMBER = 0;
|
|
10
|
+
/**
|
|
11
|
+
* Migration file names (used within migration directories)
|
|
12
|
+
*/
|
|
13
|
+
declare const SCHEMA_FILE_NAME = "schema.json";
|
|
14
|
+
/** File name for migration diff metadata. */
|
|
15
|
+
declare const DIFF_FILE_NAME = "diff.json";
|
|
16
|
+
/** File name for migration script. */
|
|
17
|
+
declare const MIGRATE_FILE_NAME = "migrate.ts";
|
|
18
|
+
/** File name for generated DB type definitions. */
|
|
19
|
+
declare const DB_TYPES_FILE_NAME = "db.ts";
|
|
20
|
+
/**
|
|
21
|
+
* Migration file type
|
|
22
|
+
*/
|
|
23
|
+
type MigrationFileType = "schema" | "diff" | "migrate" | "db";
|
|
24
|
+
/**
|
|
25
|
+
* Get migration directory path for a given number
|
|
26
|
+
* @param {string} migrationsDir - Base migrations directory path
|
|
27
|
+
* @param {number} num - Migration number
|
|
28
|
+
* @returns {string} Full directory path for the migration
|
|
29
|
+
*/
|
|
30
|
+
declare function getMigrationDirPath(migrationsDir: string, num: number): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get migration file path for a given number and type
|
|
33
|
+
* @param {string} migrationsDir - Migrations directory path
|
|
34
|
+
* @param {number} num - Migration number
|
|
35
|
+
* @param {MigrationFileType} type - File type
|
|
36
|
+
* @returns {string} Full file path
|
|
37
|
+
*/
|
|
38
|
+
declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
|
|
39
|
+
/**
|
|
40
|
+
* Create a schema snapshot from local type definitions
|
|
41
|
+
* @param {Record<string, TailorDBType>} types - Local type definitions
|
|
42
|
+
* @param {string} namespace - Namespace for the snapshot
|
|
43
|
+
* @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
|
|
44
|
+
*/
|
|
45
|
+
declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): NormalizedSchemaSnapshot;
|
|
46
|
+
/**
|
|
47
|
+
* Get all migration directories and their files, sorted by number
|
|
48
|
+
* @param {string} migrationsDir - Migrations directory path
|
|
49
|
+
* @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
|
|
50
|
+
*/
|
|
51
|
+
declare function getMigrationFiles(migrationsDir: string): {
|
|
52
|
+
number: number;
|
|
53
|
+
type: "schema" | "diff";
|
|
54
|
+
path: string;
|
|
55
|
+
}[];
|
|
56
|
+
/**
|
|
57
|
+
* Get the next migration number for a directory
|
|
58
|
+
* Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
|
|
59
|
+
* @param {string} migrationsDir - Migrations directory path
|
|
60
|
+
* @returns {number} Next migration number
|
|
61
|
+
*/
|
|
62
|
+
declare function getNextMigrationNumber(migrationsDir: string): number;
|
|
63
|
+
/**
|
|
64
|
+
* Reconstruct the latest schema snapshot from all migration files
|
|
65
|
+
* Returns null if no migrations exist
|
|
66
|
+
* @param {string} migrationsDir - Migrations directory path
|
|
67
|
+
* @param {number} [maxVersion] - Optional maximum migration version to apply
|
|
68
|
+
* @returns {NormalizedSchemaSnapshot | null} Reconstructed normalized snapshot or null if no migrations exist
|
|
69
|
+
*/
|
|
70
|
+
declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): NormalizedSchemaSnapshot | null;
|
|
71
|
+
/**
|
|
72
|
+
* Get the latest migration number from a directory
|
|
73
|
+
* Returns 0 if no migrations exist
|
|
74
|
+
* @param {string} migrationsDir - Migrations directory path
|
|
75
|
+
* @returns {number} Latest migration number or 0 if no migrations exist
|
|
76
|
+
*/
|
|
77
|
+
declare function getLatestMigrationNumber(migrationsDir: string): number;
|
|
78
|
+
/**
|
|
79
|
+
* Compare two snapshots and generate a diff
|
|
80
|
+
* @param {SchemaSnapshot} previous - Previous schema snapshot
|
|
81
|
+
* @param {SchemaSnapshot} current - Current schema snapshot
|
|
82
|
+
* @returns {MigrationDiff} Migration diff between snapshots
|
|
83
|
+
*/
|
|
84
|
+
declare function compareSnapshots(previous: SchemaSnapshot, current: SchemaSnapshot): MigrationDiff;
|
|
85
|
+
/**
|
|
86
|
+
* Compare a snapshot against canonical TailorDBSnapshotType-shaped local types.
|
|
87
|
+
* Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via
|
|
88
|
+
* `createSnapshotType`. As a safety net, `compareSnapshots` re-runs idempotent
|
|
89
|
+
* normalization on both sides, so a caller that forgets will still get correct
|
|
90
|
+
* comparisons (no silent false drift).
|
|
91
|
+
* @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
|
|
92
|
+
* @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped types
|
|
93
|
+
* @param {string} namespace - Namespace for comparison
|
|
94
|
+
* @returns {MigrationDiff} Migration diff
|
|
95
|
+
*/
|
|
96
|
+
declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBSnapshotType>, namespace: string): MigrationDiff;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MigrationFileType, type NormalizedSchemaSnapshot, SCHEMA_FILE_NAME, type SchemaSnapshot, type SnapshotFieldConfig, type TailorDBSnapshotType, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber, reconstructSnapshotFromMigrations };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/cli/commands/tailordb/truncate.d.ts
|
|
4
|
+
interface TruncateOptions {
|
|
5
|
+
workspaceId?: string;
|
|
6
|
+
profile?: string;
|
|
7
|
+
configPath?: string;
|
|
8
|
+
all?: boolean;
|
|
9
|
+
namespace?: string;
|
|
10
|
+
types?: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Truncate TailorDB data based on the given options.
|
|
14
|
+
* @param options - Truncate options (all, namespace, or types)
|
|
15
|
+
* @returns Promise that resolves when truncation completes
|
|
16
|
+
*/
|
|
17
|
+
declare function truncate(options?: TruncateOptions): Promise<void>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { TruncateOptions, truncate };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Order } from "../../shared/args.mjs";
|
|
2
|
+
import { WorkflowExecutionInfo, WorkflowJobExecutionInfo } from "./transform.mjs";
|
|
3
|
+
import { WorkflowWaitUntil } from "./status.mjs";
|
|
4
|
+
import { WorkflowWaitResult } from "./waiter.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
//#region src/cli/commands/workflow/executions.d.ts
|
|
8
|
+
type WorkflowLike = {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> = {
|
|
12
|
+
workflow?: W;
|
|
13
|
+
status?: string;
|
|
14
|
+
workspaceId?: string;
|
|
15
|
+
profile?: string;
|
|
16
|
+
order?: Order;
|
|
17
|
+
limit?: number;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use ListWorkflowExecutionsTypedOptions instead.
|
|
21
|
+
*/
|
|
22
|
+
interface ListWorkflowExecutionsOptions {
|
|
23
|
+
workspaceId?: string;
|
|
24
|
+
profile?: string;
|
|
25
|
+
workflowName?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
order?: Order;
|
|
28
|
+
limit?: number;
|
|
29
|
+
}
|
|
30
|
+
interface GetWorkflowExecutionOptions {
|
|
31
|
+
executionId: string;
|
|
32
|
+
workspaceId?: string;
|
|
33
|
+
profile?: string;
|
|
34
|
+
interval?: number;
|
|
35
|
+
timeout?: number;
|
|
36
|
+
until?: WorkflowWaitUntil;
|
|
37
|
+
logs?: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
|
|
40
|
+
jobDetails?: (WorkflowJobExecutionInfo & {
|
|
41
|
+
logs?: string;
|
|
42
|
+
result?: string;
|
|
43
|
+
})[];
|
|
44
|
+
}
|
|
45
|
+
interface WorkflowExecutionWaitInfo extends WorkflowExecutionDetailInfo {
|
|
46
|
+
statusClass: WorkflowWaitResult["statusClass"];
|
|
47
|
+
elapsedMs: number;
|
|
48
|
+
attempts: number;
|
|
49
|
+
timedOut: boolean;
|
|
50
|
+
lastError: string | null;
|
|
51
|
+
}
|
|
52
|
+
interface GetWorkflowExecutionResult {
|
|
53
|
+
execution: WorkflowExecutionDetailInfo;
|
|
54
|
+
wait: () => Promise<WorkflowExecutionWaitInfo>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* List workflow executions with optional filters.
|
|
58
|
+
*
|
|
59
|
+
* Returns at most `options.limit` items. When `limit` is omitted or 0 the
|
|
60
|
+
* function pages through every execution. The CLI caps this at 50 by
|
|
61
|
+
* default via `pagedLogArgs`; programmatic callers that want the same
|
|
62
|
+
* cap should pass `limit: 50` explicitly.
|
|
63
|
+
* @param options - Workflow execution listing options
|
|
64
|
+
* @returns List of workflow executions
|
|
65
|
+
*/
|
|
66
|
+
declare function listWorkflowExecutions<W extends WorkflowLike>(options?: ListWorkflowExecutionsTypedOptions<W>): Promise<WorkflowExecutionInfo[]>;
|
|
67
|
+
declare function listWorkflowExecutions(options?: ListWorkflowExecutionsOptions): Promise<WorkflowExecutionInfo[]>;
|
|
68
|
+
/**
|
|
69
|
+
* Get a single workflow execution with optional logs.
|
|
70
|
+
* @param options - Workflow execution lookup options
|
|
71
|
+
* @returns Workflow execution with optional logs
|
|
72
|
+
*/
|
|
73
|
+
declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { GetWorkflowExecutionOptions, GetWorkflowExecutionResult, ListWorkflowExecutionsOptions, ListWorkflowExecutionsTypedOptions, WorkflowExecutionDetailInfo, WorkflowExecutionWaitInfo, getWorkflowExecution, listWorkflowExecutions };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { WorkflowInfo } from "./transform.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/cli/commands/workflow/get.d.ts
|
|
5
|
+
type WorkflowLike = {
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
type GetWorkflowTypedOptions<W extends WorkflowLike = WorkflowLike> = {
|
|
9
|
+
workflow: W;
|
|
10
|
+
workspaceId?: string;
|
|
11
|
+
profile?: string;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @deprecated Use GetWorkflowTypedOptions instead.
|
|
15
|
+
*/
|
|
16
|
+
interface GetWorkflowOptions {
|
|
17
|
+
name: string;
|
|
18
|
+
workspaceId?: string;
|
|
19
|
+
profile?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get a workflow by name and return CLI-friendly info.
|
|
23
|
+
* @param options - Workflow lookup options
|
|
24
|
+
* @returns Workflow information
|
|
25
|
+
*/
|
|
26
|
+
declare function getWorkflow<W extends WorkflowLike>(options: GetWorkflowTypedOptions<W>): Promise<WorkflowInfo>;
|
|
27
|
+
declare function getWorkflow(options: GetWorkflowOptions): Promise<WorkflowInfo>;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { GetWorkflowOptions, GetWorkflowTypedOptions, getWorkflow };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Order } from "../../shared/args.mjs";
|
|
2
|
+
import { WorkflowListInfo } from "./transform.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/commands/workflow/list.d.ts
|
|
6
|
+
interface ListWorkflowsOptions {
|
|
7
|
+
workspaceId?: string;
|
|
8
|
+
profile?: string;
|
|
9
|
+
order?: Order;
|
|
10
|
+
limit?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* List workflows in the workspace and return CLI-friendly info.
|
|
14
|
+
* @param options - Workflow listing options
|
|
15
|
+
* @returns List of workflows
|
|
16
|
+
*/
|
|
17
|
+
declare function listWorkflows(options?: ListWorkflowsOptions): Promise<WorkflowListInfo[]>;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { ListWorkflowsOptions, listWorkflows };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WorkflowWaitResult } from "./waiter.mjs";
|
|
2
|
+
import { WaitOptions } from "./start.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/commands/workflow/resume.d.ts
|
|
6
|
+
interface ResumeWorkflowOptions {
|
|
7
|
+
executionId: string;
|
|
8
|
+
workspaceId?: string;
|
|
9
|
+
profile?: string;
|
|
10
|
+
interval?: number;
|
|
11
|
+
}
|
|
12
|
+
interface ResumeWorkflowResultWithWait {
|
|
13
|
+
executionId: string;
|
|
14
|
+
wait: (options?: WaitOptions) => Promise<WorkflowWaitResult>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resume a suspended workflow execution and return a handle to wait for completion.
|
|
18
|
+
* @param options - Resume options
|
|
19
|
+
* @returns Resume result with wait helper
|
|
20
|
+
*/
|
|
21
|
+
declare function resumeWorkflow(options: ResumeWorkflowOptions): Promise<ResumeWorkflowResultWithWait>;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ResumeWorkflowOptions, ResumeWorkflowResultWithWait, resumeWorkflow };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { WorkflowWaitUntil } from "./status.mjs";
|
|
2
|
+
import { WorkflowWaitResult } from "./waiter.mjs";
|
|
3
|
+
import { Jsonifiable } from "type-fest";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { MachineUserName } from "@tailor-platform/sdk";
|
|
6
|
+
|
|
7
|
+
//#region src/cli/commands/workflow/start.d.ts
|
|
8
|
+
type WorkflowLike = {
|
|
9
|
+
name: string;
|
|
10
|
+
mainJob: {
|
|
11
|
+
body: unknown;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
type WorkflowInput<W extends WorkflowLike> = W extends WorkflowLike ? W["mainJob"]["body"] extends ((...args: infer Args) => unknown) ? Args[0] : never : never;
|
|
15
|
+
type StartWorkflowArgOptionForSingleWorkflow<W extends WorkflowLike> = WorkflowLike extends W ? {
|
|
16
|
+
arg?: Jsonifiable;
|
|
17
|
+
} : undefined extends WorkflowInput<W> ? {
|
|
18
|
+
arg?: WorkflowInput<W>;
|
|
19
|
+
} : {
|
|
20
|
+
arg: WorkflowInput<W>;
|
|
21
|
+
};
|
|
22
|
+
type StartWorkflowArgOption<W extends WorkflowLike> = W extends WorkflowLike ? StartWorkflowArgOptionForSingleWorkflow<W> : never;
|
|
23
|
+
/**
|
|
24
|
+
* @deprecated Use StartWorkflowTypedOptions instead.
|
|
25
|
+
*/
|
|
26
|
+
interface StartWorkflowOptions {
|
|
27
|
+
name: string;
|
|
28
|
+
machineUser?: string;
|
|
29
|
+
arg?: Jsonifiable;
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
profile?: string;
|
|
32
|
+
configPath?: string;
|
|
33
|
+
interval?: number;
|
|
34
|
+
}
|
|
35
|
+
type StartWorkflowTypedBaseOptions<W extends WorkflowLike> = {
|
|
36
|
+
workflow: W;
|
|
37
|
+
invoker: MachineUserName;
|
|
38
|
+
workspaceId?: string;
|
|
39
|
+
profile?: string;
|
|
40
|
+
configPath?: string;
|
|
41
|
+
interval?: number;
|
|
42
|
+
};
|
|
43
|
+
type StartWorkflowTypedOptions<W extends WorkflowLike = WorkflowLike> = W extends WorkflowLike ? StartWorkflowTypedBaseOptions<W> & StartWorkflowArgOption<W> : never;
|
|
44
|
+
interface WaitOptions {
|
|
45
|
+
showProgress?: boolean;
|
|
46
|
+
timeout?: number;
|
|
47
|
+
until?: WorkflowWaitUntil;
|
|
48
|
+
}
|
|
49
|
+
interface StartWorkflowResultWithWait {
|
|
50
|
+
executionId: string;
|
|
51
|
+
wait: (options?: WaitOptions) => Promise<WorkflowWaitResult>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Start a workflow and return a handle to wait for completion.
|
|
55
|
+
* @param options - Start options
|
|
56
|
+
* @returns Start result with wait helper
|
|
57
|
+
*/
|
|
58
|
+
declare function startWorkflow<W extends WorkflowLike>(options: StartWorkflowTypedOptions<W>): Promise<StartWorkflowResultWithWait>;
|
|
59
|
+
declare function startWorkflow(options: StartWorkflowOptions): Promise<StartWorkflowResultWithWait>;
|
|
60
|
+
//#endregion
|
|
61
|
+
export { StartWorkflowOptions, StartWorkflowResultWithWait, StartWorkflowTypedOptions, WaitOptions, startWorkflow };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
//#region src/cli/commands/workflow/status.d.ts
|
|
2
|
+
type WorkflowWaitUntil = "success" | "suspended" | "terminal";
|
|
3
|
+
type WorkflowExecutionStatusClass = "success" | "suspended" | "failure" | "transient";
|
|
4
|
+
//#endregion
|
|
5
|
+
export { WorkflowExecutionStatusClass, WorkflowWaitUntil };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//#region src/cli/commands/workflow/transform.d.ts
|
|
2
|
+
interface WorkflowListInfo {
|
|
3
|
+
name: string;
|
|
4
|
+
mainJob: string;
|
|
5
|
+
jobFunctions: number;
|
|
6
|
+
updatedAt: Date | null;
|
|
7
|
+
}
|
|
8
|
+
interface WorkflowInfo {
|
|
9
|
+
name: string;
|
|
10
|
+
id: string;
|
|
11
|
+
mainJob: string;
|
|
12
|
+
jobFunctions: Record<string, string>;
|
|
13
|
+
createdAt: Date | null;
|
|
14
|
+
updatedAt: Date | null;
|
|
15
|
+
}
|
|
16
|
+
interface WorkflowJobExecutionInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
stackedJobName: string;
|
|
19
|
+
status: string;
|
|
20
|
+
executionId: string;
|
|
21
|
+
startedAt: Date | null;
|
|
22
|
+
finishedAt: Date | null;
|
|
23
|
+
}
|
|
24
|
+
interface WorkflowExecutionInfo {
|
|
25
|
+
id: string;
|
|
26
|
+
workflowName: string;
|
|
27
|
+
status: string;
|
|
28
|
+
jobExecutions: number;
|
|
29
|
+
startedAt: Date | null;
|
|
30
|
+
finishedAt: Date | null;
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { WorkflowExecutionInfo, WorkflowInfo, WorkflowJobExecutionInfo, WorkflowListInfo };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WaitWorkflowExecutionOptions, WorkflowWaitResult } from "./waiter.mjs";
|
|
2
|
+
import { getWorkflowExecution } from "./executions.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
|
|
5
|
+
//#region src/cli/commands/workflow/wait.d.ts
|
|
6
|
+
interface WorkflowWaitOutput extends WorkflowWaitResult {
|
|
7
|
+
jobDetails?: Awaited<ReturnType<typeof getWorkflowExecution>>["execution"]["jobDetails"];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Wait for an existing workflow execution by ID.
|
|
11
|
+
* @param options - Workflow wait options
|
|
12
|
+
* @returns Workflow wait result
|
|
13
|
+
*/
|
|
14
|
+
declare function waitWorkflowExecution(options: WaitWorkflowExecutionOptions): Promise<WorkflowWaitResult>;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { WorkflowWaitOutput, waitWorkflowExecution };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { WorkflowExecutionInfo } from "./transform.mjs";
|
|
2
|
+
import { WorkflowExecutionStatusClass, WorkflowWaitUntil } from "./status.mjs";
|
|
3
|
+
|
|
4
|
+
//#region src/cli/commands/workflow/waiter.d.ts
|
|
5
|
+
interface WaitWorkflowExecutionOptions {
|
|
6
|
+
executionId: string;
|
|
7
|
+
workspaceId?: string;
|
|
8
|
+
profile?: string;
|
|
9
|
+
interval?: number;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
until?: WorkflowWaitUntil;
|
|
12
|
+
showProgress?: boolean;
|
|
13
|
+
trackJobs?: boolean;
|
|
14
|
+
}
|
|
15
|
+
interface WorkflowWaitResult extends WorkflowExecutionInfo {
|
|
16
|
+
statusClass: WorkflowExecutionStatusClass | "unknown";
|
|
17
|
+
elapsedMs: number;
|
|
18
|
+
attempts: number;
|
|
19
|
+
timedOut: boolean;
|
|
20
|
+
lastError: string | null;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { WaitWorkflowExecutionOptions, WorkflowWaitResult };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppHealthInfo } from "./transform.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/cli/commands/workspace/app/health.d.ts
|
|
5
|
+
declare const healthOptionsSchema: z.ZodObject<{
|
|
6
|
+
workspaceId: z.ZodOptional<z.ZodUUID>;
|
|
7
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type HealthOptions = z.input<typeof healthOptionsSchema>;
|
|
11
|
+
/**
|
|
12
|
+
* Get application schema health status.
|
|
13
|
+
* @param options - Health check options
|
|
14
|
+
* @returns Application health information
|
|
15
|
+
*/
|
|
16
|
+
declare function getAppHealth(options: HealthOptions): Promise<AppHealthInfo>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { HealthOptions, getAppHealth };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AppInfo } from "./transform.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/cli/commands/workspace/app/list.d.ts
|
|
5
|
+
declare const listAppsOptionsSchema: z.ZodObject<{
|
|
6
|
+
workspaceId: z.ZodOptional<z.ZodUUID>;
|
|
7
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
8
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
9
|
+
asc: "asc";
|
|
10
|
+
desc: "desc";
|
|
11
|
+
}>>;
|
|
12
|
+
limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type ListAppsOptions = z.input<typeof listAppsOptionsSchema>;
|
|
15
|
+
/**
|
|
16
|
+
* List applications in a workspace with an optional order and limit.
|
|
17
|
+
* @param options - Application listing options
|
|
18
|
+
* @returns List of applications
|
|
19
|
+
*/
|
|
20
|
+
declare function listApps(options: ListAppsOptions): Promise<AppInfo[]>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ListAppsOptions, listApps };
|