@qlever-llc/trellis 0.8.3 → 0.9.0-rc.2
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/README.md +1 -1
- package/bin/trellis-generate.js +132 -0
- package/esm/auth/browser/login.d.ts.map +1 -1
- package/esm/auth/browser/login.js +46 -3
- package/esm/auth/browser/portal.d.ts.map +1 -1
- package/esm/auth/browser/portal.js +5 -1
- package/esm/auth/browser/session.d.ts +18 -7
- package/esm/auth/browser/session.d.ts.map +1 -1
- package/esm/auth/browser/session.js +47 -11
- package/esm/auth/browser/storage.d.ts +6 -1
- package/esm/auth/browser/storage.d.ts.map +1 -1
- package/esm/auth/browser/storage.js +15 -3
- package/esm/auth/browser.d.ts +2 -2
- package/esm/auth/browser.d.ts.map +1 -1
- package/esm/auth/browser.js +1 -1
- package/esm/auth/device_activation.d.ts +36 -33
- package/esm/auth/device_activation.d.ts.map +1 -1
- package/esm/auth/device_activation.js +26 -22
- package/esm/auth/mod.d.ts +4 -4
- package/esm/auth/mod.d.ts.map +1 -1
- package/esm/auth/mod.js +2 -2
- package/esm/auth/proof.d.ts +3 -1
- package/esm/auth/proof.d.ts.map +1 -1
- package/esm/auth/proof.js +21 -15
- package/esm/auth/protocol.d.ts +2457 -941
- package/esm/auth/protocol.d.ts.map +1 -1
- package/esm/auth/protocol.js +747 -375
- package/esm/auth/schemas.d.ts +25 -4
- package/esm/auth/schemas.d.ts.map +1 -1
- package/esm/auth/schemas.js +14 -4
- package/esm/auth/session_auth.d.ts +1 -1
- package/esm/auth/session_auth.d.ts.map +1 -1
- package/esm/auth/session_auth.js +7 -1
- package/esm/client_connect.d.ts +2 -0
- package/esm/client_connect.d.ts.map +1 -1
- package/esm/client_connect.js +76 -15
- package/esm/contract.d.ts +3 -0
- package/esm/contract.d.ts.map +1 -1
- package/esm/contract_support/mod.d.ts +422 -43
- package/esm/contract_support/mod.d.ts.map +1 -1
- package/esm/contract_support/mod.js +734 -33
- package/esm/contract_support/protocol.d.ts +20 -5
- package/esm/contract_support/protocol.d.ts.map +1 -1
- package/esm/contract_support/protocol.js +18 -10
- package/esm/contract_support/runtime.d.ts +11 -0
- package/esm/contract_support/runtime.d.ts.map +1 -1
- package/esm/contract_support/schema_pointers.d.ts.map +1 -1
- package/esm/contract_support/schema_pointers.js +32 -14
- package/esm/device.d.ts +2 -0
- package/esm/device.d.ts.map +1 -1
- package/esm/device.js +3 -0
- package/esm/errors/AuthError.d.ts +1 -1
- package/esm/errors/AuthError.d.ts.map +1 -1
- package/esm/errors/AuthError.js +5 -1
- package/esm/errors/index.d.ts +4 -4
- package/esm/generated-sdk/auth/api.d.ts +27 -9
- package/esm/generated-sdk/auth/api.d.ts.map +1 -1
- package/esm/generated-sdk/auth/api.js +16 -590
- package/esm/generated-sdk/auth/client.d.ts +91 -85
- package/esm/generated-sdk/auth/client.d.ts.map +1 -1
- package/esm/generated-sdk/auth/contract.d.ts +1 -1
- package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
- package/esm/generated-sdk/auth/contract.js +4 -2
- package/esm/generated-sdk/auth/mod.d.ts +1 -0
- package/esm/generated-sdk/auth/mod.d.ts.map +1 -1
- package/esm/generated-sdk/auth/owned_api.d.ts +3 -0
- package/esm/generated-sdk/auth/owned_api.d.ts.map +1 -0
- package/esm/generated-sdk/auth/owned_api.js +594 -0
- package/esm/generated-sdk/auth/schemas.d.ts +9959 -5160
- package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/auth/schemas.js +136 -137
- package/esm/generated-sdk/auth/types.d.ts +2418 -1557
- package/esm/generated-sdk/auth/types.d.ts.map +1 -1
- package/esm/generated-sdk/auth/types.js +1 -1
- package/esm/generated-sdk/health/api.d.ts +24 -9
- package/esm/generated-sdk/health/api.d.ts.map +1 -1
- package/esm/generated-sdk/health/api.js +12 -20
- package/esm/generated-sdk/health/client.d.ts +2 -1
- package/esm/generated-sdk/health/client.d.ts.map +1 -1
- package/esm/generated-sdk/health/contract.d.ts.map +1 -1
- package/esm/generated-sdk/health/contract.js +2 -0
- package/esm/generated-sdk/health/owned_api.d.ts +3 -0
- package/esm/generated-sdk/health/owned_api.d.ts.map +1 -0
- package/esm/generated-sdk/health/owned_api.js +16 -0
- package/esm/generated-sdk/health/types.d.ts +2 -0
- package/esm/generated-sdk/health/types.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/api.d.ts +33 -9
- package/esm/generated-sdk/jobs/api.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/api.js +22 -87
- package/esm/generated-sdk/jobs/client.d.ts +9 -2
- package/esm/generated-sdk/jobs/client.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/contract.d.ts +1 -1
- package/esm/generated-sdk/jobs/contract.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/contract.js +4 -2
- package/esm/generated-sdk/jobs/owned_api.d.ts +3 -0
- package/esm/generated-sdk/jobs/owned_api.d.ts.map +1 -0
- package/esm/generated-sdk/jobs/owned_api.js +118 -0
- package/esm/generated-sdk/jobs/schemas.d.ts +336 -123
- package/esm/generated-sdk/jobs/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/schemas.js +17 -15
- package/esm/generated-sdk/jobs/types.d.ts +144 -34
- package/esm/generated-sdk/jobs/types.d.ts.map +1 -1
- package/esm/generated-sdk/jobs/types.js +36 -1
- package/esm/generated-sdk/state/api.d.ts +27 -9
- package/esm/generated-sdk/state/api.d.ts.map +1 -1
- package/esm/generated-sdk/state/api.js +16 -71
- package/esm/generated-sdk/state/client.d.ts +4 -2
- package/esm/generated-sdk/state/client.d.ts.map +1 -1
- package/esm/generated-sdk/state/contract.d.ts +1 -1
- package/esm/generated-sdk/state/contract.d.ts.map +1 -1
- package/esm/generated-sdk/state/contract.js +4 -2
- package/esm/generated-sdk/state/owned_api.d.ts +3 -0
- package/esm/generated-sdk/state/owned_api.d.ts.map +1 -0
- package/esm/generated-sdk/state/owned_api.js +66 -0
- package/esm/generated-sdk/state/schemas.d.ts +264 -284
- package/esm/generated-sdk/state/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/state/schemas.js +6 -6
- package/esm/generated-sdk/state/types.d.ts +24 -23
- package/esm/generated-sdk/state/types.d.ts.map +1 -1
- package/esm/generated-sdk/state/types.js +1 -1
- package/esm/generated-sdk/trellis-core/api.d.ts +27 -9
- package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/api.js +16 -39
- package/esm/generated-sdk/trellis-core/client.d.ts +5 -2
- package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/contract.d.ts +1 -1
- package/esm/generated-sdk/trellis-core/contract.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/contract.js +4 -2
- package/esm/generated-sdk/trellis-core/owned_api.d.ts +3 -0
- package/esm/generated-sdk/trellis-core/owned_api.d.ts.map +1 -0
- package/esm/generated-sdk/trellis-core/owned_api.js +42 -0
- package/esm/generated-sdk/trellis-core/schemas.d.ts +259 -11
- package/esm/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/schemas.js +5 -3
- package/esm/generated-sdk/trellis-core/types.d.ts +56 -1
- package/esm/generated-sdk/trellis-core/types.d.ts.map +1 -1
- package/esm/generated-sdk/trellis-core/types.js +1 -1
- package/esm/helpers.d.ts.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -0
- package/esm/jobs.d.ts +10 -1
- package/esm/jobs.d.ts.map +1 -1
- package/esm/jobs.js +16 -1
- package/esm/kv.d.ts.map +1 -1
- package/esm/kv.js +10 -4
- package/esm/models/auth/rpc/Logout.d.ts +4 -4
- package/esm/models/auth/rpc/Logout.d.ts.map +1 -1
- package/esm/models/auth/rpc/Logout.js +2 -2
- package/esm/models/trellis/Page.d.ts +2 -0
- package/esm/models/trellis/Page.d.ts.map +1 -0
- package/esm/models/trellis/Page.js +1 -0
- package/esm/models/trellis/State.d.ts +1 -0
- package/esm/models/trellis/State.d.ts.map +1 -1
- package/esm/models/trellis/State.js +1 -0
- package/esm/models/trellis/rpc/StateList.d.ts +9 -12
- package/esm/models/trellis/rpc/StateList.d.ts.map +1 -1
- package/esm/models/trellis/rpc/StateList.js +16 -18
- package/esm/npm/src/auth/browser/login.d.ts.map +1 -1
- package/esm/npm/src/auth/browser/login.js +46 -3
- package/esm/npm/src/auth/browser/portal.d.ts.map +1 -1
- package/esm/npm/src/auth/browser/portal.js +5 -1
- package/esm/npm/src/auth/browser/session.d.ts +18 -7
- package/esm/npm/src/auth/browser/session.d.ts.map +1 -1
- package/esm/npm/src/auth/browser/session.js +47 -11
- package/esm/npm/src/auth/browser/storage.d.ts +6 -1
- package/esm/npm/src/auth/browser/storage.d.ts.map +1 -1
- package/esm/npm/src/auth/browser/storage.js +15 -3
- package/esm/npm/src/auth/browser.d.ts +2 -2
- package/esm/npm/src/auth/browser.d.ts.map +1 -1
- package/esm/npm/src/auth/browser.js +1 -1
- package/esm/npm/src/auth/device_activation.d.ts +36 -33
- package/esm/npm/src/auth/device_activation.d.ts.map +1 -1
- package/esm/npm/src/auth/device_activation.js +26 -22
- package/esm/npm/src/auth/mod.d.ts +4 -4
- package/esm/npm/src/auth/mod.d.ts.map +1 -1
- package/esm/npm/src/auth/mod.js +2 -2
- package/esm/npm/src/auth/proof.d.ts +3 -1
- package/esm/npm/src/auth/proof.d.ts.map +1 -1
- package/esm/npm/src/auth/proof.js +21 -15
- package/esm/npm/src/auth/protocol.d.ts +2457 -941
- package/esm/npm/src/auth/protocol.d.ts.map +1 -1
- package/esm/npm/src/auth/protocol.js +747 -375
- package/esm/npm/src/auth/schemas.d.ts +25 -4
- package/esm/npm/src/auth/schemas.d.ts.map +1 -1
- package/esm/npm/src/auth/schemas.js +14 -4
- package/esm/npm/src/auth/session_auth.d.ts +1 -1
- package/esm/npm/src/auth/session_auth.d.ts.map +1 -1
- package/esm/npm/src/auth/session_auth.js +7 -1
- package/esm/npm/src/client_connect.d.ts +2 -0
- package/esm/npm/src/client_connect.d.ts.map +1 -1
- package/esm/npm/src/client_connect.js +76 -15
- package/esm/npm/src/contract.d.ts +3 -0
- package/esm/npm/src/contract.d.ts.map +1 -1
- package/esm/npm/src/contract_support/mod.d.ts +422 -43
- package/esm/npm/src/contract_support/mod.d.ts.map +1 -1
- package/esm/npm/src/contract_support/mod.js +734 -33
- package/esm/npm/src/contract_support/protocol.d.ts +20 -5
- package/esm/npm/src/contract_support/protocol.d.ts.map +1 -1
- package/esm/npm/src/contract_support/protocol.js +18 -10
- package/esm/npm/src/contract_support/runtime.d.ts +11 -0
- package/esm/npm/src/contract_support/runtime.d.ts.map +1 -1
- package/esm/npm/src/contract_support/schema_pointers.d.ts.map +1 -1
- package/esm/npm/src/contract_support/schema_pointers.js +32 -14
- package/esm/npm/src/device/deno.d.ts.map +1 -1
- package/esm/npm/src/device/deno.js +6 -0
- package/esm/npm/src/device.d.ts +2 -0
- package/esm/npm/src/device.d.ts.map +1 -1
- package/esm/npm/src/device.js +3 -0
- package/esm/npm/src/errors/AuthError.d.ts +1 -1
- package/esm/npm/src/errors/AuthError.d.ts.map +1 -1
- package/esm/npm/src/errors/AuthError.js +5 -1
- package/esm/npm/src/errors/index.d.ts +4 -4
- package/esm/npm/src/helpers.d.ts.map +1 -1
- package/esm/npm/src/index.d.ts +4 -3
- package/esm/npm/src/index.d.ts.map +1 -1
- package/esm/npm/src/index.js +1 -0
- package/esm/npm/src/jobs.d.ts +10 -1
- package/esm/npm/src/jobs.d.ts.map +1 -1
- package/esm/npm/src/jobs.js +16 -1
- package/esm/npm/src/kv.d.ts.map +1 -1
- package/esm/npm/src/kv.js +10 -4
- package/esm/npm/src/models/auth/rpc/Logout.d.ts +4 -4
- package/esm/npm/src/models/auth/rpc/Logout.d.ts.map +1 -1
- package/esm/npm/src/models/auth/rpc/Logout.js +2 -2
- package/esm/npm/src/models/trellis/Page.d.ts +2 -0
- package/esm/npm/src/models/trellis/Page.d.ts.map +1 -0
- package/esm/npm/src/models/trellis/Page.js +1 -0
- package/esm/npm/src/models/trellis/State.d.ts +1 -0
- package/esm/npm/src/models/trellis/State.d.ts.map +1 -1
- package/esm/npm/src/models/trellis/State.js +1 -0
- package/esm/npm/src/models/trellis/rpc/StateList.d.ts +9 -12
- package/esm/npm/src/models/trellis/rpc/StateList.d.ts.map +1 -1
- package/esm/npm/src/models/trellis/rpc/StateList.js +16 -18
- package/esm/npm/src/operations.d.ts +16 -7
- package/esm/npm/src/operations.d.ts.map +1 -1
- package/esm/npm/src/operations.js +84 -19
- package/esm/npm/src/runtime_transport.d.ts +2 -0
- package/esm/npm/src/runtime_transport.d.ts.map +1 -1
- package/esm/npm/src/runtime_transport.js +1 -0
- package/esm/npm/src/server/internal_jobs/active-job.d.ts +2 -1
- package/esm/npm/src/server/internal_jobs/active-job.d.ts.map +1 -1
- package/esm/npm/src/server/internal_jobs/active-job.js +3 -0
- package/esm/npm/src/server/internal_jobs/job-manager.d.ts +4 -1
- package/esm/npm/src/server/internal_jobs/job-manager.d.ts.map +1 -1
- package/esm/npm/src/server/internal_jobs/job-manager.js +61 -1
- package/esm/npm/src/server/internal_jobs/projection.js +1 -0
- package/esm/npm/src/server/internal_jobs/runtime-worker.d.ts +13 -1
- package/esm/npm/src/server/internal_jobs/runtime-worker.d.ts.map +1 -1
- package/esm/npm/src/server/internal_jobs/runtime-worker.js +73 -13
- package/esm/npm/src/server/internal_jobs/types.d.ts +19 -0
- package/esm/npm/src/server/internal_jobs/types.d.ts.map +1 -1
- package/esm/npm/src/server/internal_jobs/types.js +10 -0
- package/esm/npm/src/server/runtime.d.ts +1 -0
- package/esm/npm/src/server/runtime.d.ts.map +1 -1
- package/esm/npm/src/server/service.d.ts +10 -1
- package/esm/npm/src/server/service.d.ts.map +1 -1
- package/esm/npm/src/server/service.js +190 -64
- package/esm/npm/src/server/transfer.d.ts.map +1 -1
- package/esm/npm/src/server/transfer.js +4 -0
- package/esm/npm/src/server.d.ts.map +1 -1
- package/esm/npm/src/server.js +337 -34
- package/esm/npm/src/store.d.ts +8 -1
- package/esm/npm/src/store.d.ts.map +1 -1
- package/esm/npm/src/store.js +46 -8
- package/esm/npm/src/transfer.d.ts +3 -0
- package/esm/npm/src/transfer.d.ts.map +1 -1
- package/esm/npm/src/transfer.js +20 -30
- package/esm/npm/src/trellis.d.ts +85 -22
- package/esm/npm/src/trellis.d.ts.map +1 -1
- package/esm/npm/src/trellis.js +525 -61
- package/esm/operations.d.ts +16 -7
- package/esm/operations.d.ts.map +1 -1
- package/esm/operations.js +84 -19
- package/esm/runtime_transport.d.ts +2 -0
- package/esm/runtime_transport.d.ts.map +1 -1
- package/esm/runtime_transport.js +1 -0
- package/esm/store.d.ts +8 -1
- package/esm/store.d.ts.map +1 -1
- package/esm/store.js +46 -8
- package/esm/transfer.d.ts +3 -0
- package/esm/transfer.d.ts.map +1 -1
- package/esm/transfer.js +20 -30
- package/esm/trellis.d.ts +85 -22
- package/esm/trellis.d.ts.map +1 -1
- package/esm/trellis.js +525 -61
- package/package.json +6 -4
- package/script/auth/browser/login.d.ts.map +1 -1
- package/script/auth/browser/login.js +46 -3
- package/script/auth/browser/portal.d.ts.map +1 -1
- package/script/auth/browser/portal.js +5 -1
- package/script/auth/browser/session.d.ts +18 -7
- package/script/auth/browser/session.d.ts.map +1 -1
- package/script/auth/browser/session.js +47 -11
- package/script/auth/browser/storage.d.ts +6 -1
- package/script/auth/browser/storage.d.ts.map +1 -1
- package/script/auth/browser/storage.js +15 -3
- package/script/auth/browser.d.ts +2 -2
- package/script/auth/browser.d.ts.map +1 -1
- package/script/auth/browser.js +2 -1
- package/script/auth/device_activation.d.ts +36 -33
- package/script/auth/device_activation.d.ts.map +1 -1
- package/script/auth/device_activation.js +25 -21
- package/script/auth/mod.d.ts +4 -4
- package/script/auth/mod.d.ts.map +1 -1
- package/script/auth/mod.js +132 -137
- package/script/auth/proof.d.ts +3 -1
- package/script/auth/proof.d.ts.map +1 -1
- package/script/auth/proof.js +21 -15
- package/script/auth/protocol.d.ts +2457 -941
- package/script/auth/protocol.d.ts.map +1 -1
- package/script/auth/protocol.js +749 -377
- package/script/auth/schemas.d.ts +25 -4
- package/script/auth/schemas.d.ts.map +1 -1
- package/script/auth/schemas.js +16 -5
- package/script/auth/session_auth.d.ts +1 -1
- package/script/auth/session_auth.d.ts.map +1 -1
- package/script/auth/session_auth.js +7 -1
- package/script/client_connect.d.ts +2 -0
- package/script/client_connect.d.ts.map +1 -1
- package/script/client_connect.js +76 -15
- package/script/contract.d.ts +3 -0
- package/script/contract.d.ts.map +1 -1
- package/script/contract_support/mod.d.ts +422 -43
- package/script/contract_support/mod.d.ts.map +1 -1
- package/script/contract_support/mod.js +757 -51
- package/script/contract_support/protocol.d.ts +20 -5
- package/script/contract_support/protocol.d.ts.map +1 -1
- package/script/contract_support/protocol.js +20 -11
- package/script/contract_support/runtime.d.ts +11 -0
- package/script/contract_support/runtime.d.ts.map +1 -1
- package/script/contract_support/schema_pointers.d.ts.map +1 -1
- package/script/contract_support/schema_pointers.js +32 -14
- package/script/device.d.ts +2 -0
- package/script/device.d.ts.map +1 -1
- package/script/device.js +3 -0
- package/script/errors/AuthError.d.ts +1 -1
- package/script/errors/AuthError.d.ts.map +1 -1
- package/script/errors/AuthError.js +5 -1
- package/script/errors/index.d.ts +4 -4
- package/script/generated-sdk/auth/api.d.ts +27 -9
- package/script/generated-sdk/auth/api.d.ts.map +1 -1
- package/script/generated-sdk/auth/api.js +17 -591
- package/script/generated-sdk/auth/client.d.ts +91 -85
- package/script/generated-sdk/auth/client.d.ts.map +1 -1
- package/script/generated-sdk/auth/contract.d.ts +1 -1
- package/script/generated-sdk/auth/contract.d.ts.map +1 -1
- package/script/generated-sdk/auth/contract.js +4 -2
- package/script/generated-sdk/auth/mod.d.ts +1 -0
- package/script/generated-sdk/auth/mod.d.ts.map +1 -1
- package/script/generated-sdk/auth/owned_api.d.ts +3 -0
- package/script/generated-sdk/auth/owned_api.d.ts.map +1 -0
- package/script/generated-sdk/auth/owned_api.js +597 -0
- package/script/generated-sdk/auth/schemas.d.ts +9959 -5160
- package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
- package/script/generated-sdk/auth/schemas.js +139 -140
- package/script/generated-sdk/auth/types.d.ts +2418 -1557
- package/script/generated-sdk/auth/types.d.ts.map +1 -1
- package/script/generated-sdk/auth/types.js +1 -1
- package/script/generated-sdk/health/api.d.ts +24 -9
- package/script/generated-sdk/health/api.d.ts.map +1 -1
- package/script/generated-sdk/health/api.js +13 -21
- package/script/generated-sdk/health/client.d.ts +2 -1
- package/script/generated-sdk/health/client.d.ts.map +1 -1
- package/script/generated-sdk/health/contract.d.ts.map +1 -1
- package/script/generated-sdk/health/contract.js +2 -0
- package/script/generated-sdk/health/owned_api.d.ts +3 -0
- package/script/generated-sdk/health/owned_api.d.ts.map +1 -0
- package/script/generated-sdk/health/owned_api.js +19 -0
- package/script/generated-sdk/health/types.d.ts +2 -0
- package/script/generated-sdk/health/types.d.ts.map +1 -1
- package/script/generated-sdk/jobs/api.d.ts +33 -9
- package/script/generated-sdk/jobs/api.d.ts.map +1 -1
- package/script/generated-sdk/jobs/api.js +23 -88
- package/script/generated-sdk/jobs/client.d.ts +9 -2
- package/script/generated-sdk/jobs/client.d.ts.map +1 -1
- package/script/generated-sdk/jobs/contract.d.ts +1 -1
- package/script/generated-sdk/jobs/contract.d.ts.map +1 -1
- package/script/generated-sdk/jobs/contract.js +4 -2
- package/script/generated-sdk/jobs/owned_api.d.ts +3 -0
- package/script/generated-sdk/jobs/owned_api.d.ts.map +1 -0
- package/script/generated-sdk/jobs/owned_api.js +154 -0
- package/script/generated-sdk/jobs/schemas.d.ts +336 -123
- package/script/generated-sdk/jobs/schemas.d.ts.map +1 -1
- package/script/generated-sdk/jobs/schemas.js +18 -16
- package/script/generated-sdk/jobs/types.d.ts +144 -34
- package/script/generated-sdk/jobs/types.d.ts.map +1 -1
- package/script/generated-sdk/jobs/types.js +38 -2
- package/script/generated-sdk/state/api.d.ts +27 -9
- package/script/generated-sdk/state/api.d.ts.map +1 -1
- package/script/generated-sdk/state/api.js +17 -72
- package/script/generated-sdk/state/client.d.ts +4 -2
- package/script/generated-sdk/state/client.d.ts.map +1 -1
- package/script/generated-sdk/state/contract.d.ts +1 -1
- package/script/generated-sdk/state/contract.d.ts.map +1 -1
- package/script/generated-sdk/state/contract.js +4 -2
- package/script/generated-sdk/state/owned_api.d.ts +3 -0
- package/script/generated-sdk/state/owned_api.d.ts.map +1 -0
- package/script/generated-sdk/state/owned_api.js +69 -0
- package/script/generated-sdk/state/schemas.d.ts +264 -284
- package/script/generated-sdk/state/schemas.d.ts.map +1 -1
- package/script/generated-sdk/state/schemas.js +6 -6
- package/script/generated-sdk/state/types.d.ts +24 -23
- package/script/generated-sdk/state/types.d.ts.map +1 -1
- package/script/generated-sdk/state/types.js +1 -1
- package/script/generated-sdk/trellis-core/api.d.ts +27 -9
- package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/api.js +17 -40
- package/script/generated-sdk/trellis-core/client.d.ts +5 -2
- package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/contract.d.ts +1 -1
- package/script/generated-sdk/trellis-core/contract.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/contract.js +4 -2
- package/script/generated-sdk/trellis-core/owned_api.d.ts +3 -0
- package/script/generated-sdk/trellis-core/owned_api.d.ts.map +1 -0
- package/script/generated-sdk/trellis-core/owned_api.js +45 -0
- package/script/generated-sdk/trellis-core/schemas.d.ts +259 -11
- package/script/generated-sdk/trellis-core/schemas.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/schemas.js +6 -4
- package/script/generated-sdk/trellis-core/types.d.ts +56 -1
- package/script/generated-sdk/trellis-core/types.d.ts.map +1 -1
- package/script/generated-sdk/trellis-core/types.js +1 -1
- package/script/helpers.d.ts.map +1 -1
- package/script/index.d.ts +4 -3
- package/script/index.d.ts.map +1 -1
- package/script/index.js +5 -2
- package/script/jobs.d.ts +10 -1
- package/script/jobs.d.ts.map +1 -1
- package/script/jobs.js +17 -2
- package/script/kv.d.ts.map +1 -1
- package/script/kv.js +10 -4
- package/script/models/auth/rpc/Logout.d.ts +4 -4
- package/script/models/auth/rpc/Logout.d.ts.map +1 -1
- package/script/models/auth/rpc/Logout.js +3 -3
- package/script/models/trellis/Page.d.ts +2 -0
- package/script/models/trellis/Page.d.ts.map +1 -0
- package/script/models/trellis/Page.js +6 -0
- package/script/models/trellis/State.d.ts +1 -0
- package/script/models/trellis/State.d.ts.map +1 -1
- package/script/models/trellis/State.js +1 -0
- package/script/models/trellis/rpc/StateList.d.ts +9 -12
- package/script/models/trellis/rpc/StateList.d.ts.map +1 -1
- package/script/models/trellis/rpc/StateList.js +16 -18
- package/script/npm/src/auth/browser/login.d.ts.map +1 -1
- package/script/npm/src/auth/browser/login.js +46 -3
- package/script/npm/src/auth/browser/portal.d.ts.map +1 -1
- package/script/npm/src/auth/browser/portal.js +5 -1
- package/script/npm/src/auth/browser/session.d.ts +18 -7
- package/script/npm/src/auth/browser/session.d.ts.map +1 -1
- package/script/npm/src/auth/browser/session.js +47 -11
- package/script/npm/src/auth/browser/storage.d.ts +6 -1
- package/script/npm/src/auth/browser/storage.d.ts.map +1 -1
- package/script/npm/src/auth/browser/storage.js +15 -3
- package/script/npm/src/auth/browser.d.ts +2 -2
- package/script/npm/src/auth/browser.d.ts.map +1 -1
- package/script/npm/src/auth/browser.js +2 -1
- package/script/npm/src/auth/device_activation.d.ts +36 -33
- package/script/npm/src/auth/device_activation.d.ts.map +1 -1
- package/script/npm/src/auth/device_activation.js +25 -21
- package/script/npm/src/auth/mod.d.ts +4 -4
- package/script/npm/src/auth/mod.d.ts.map +1 -1
- package/script/npm/src/auth/mod.js +132 -137
- package/script/npm/src/auth/proof.d.ts +3 -1
- package/script/npm/src/auth/proof.d.ts.map +1 -1
- package/script/npm/src/auth/proof.js +21 -15
- package/script/npm/src/auth/protocol.d.ts +2457 -941
- package/script/npm/src/auth/protocol.d.ts.map +1 -1
- package/script/npm/src/auth/protocol.js +749 -377
- package/script/npm/src/auth/schemas.d.ts +25 -4
- package/script/npm/src/auth/schemas.d.ts.map +1 -1
- package/script/npm/src/auth/schemas.js +16 -5
- package/script/npm/src/auth/session_auth.d.ts +1 -1
- package/script/npm/src/auth/session_auth.d.ts.map +1 -1
- package/script/npm/src/auth/session_auth.js +7 -1
- package/script/npm/src/client_connect.d.ts +2 -0
- package/script/npm/src/client_connect.d.ts.map +1 -1
- package/script/npm/src/client_connect.js +76 -15
- package/script/npm/src/contract.d.ts +3 -0
- package/script/npm/src/contract.d.ts.map +1 -1
- package/script/npm/src/contract_support/mod.d.ts +422 -43
- package/script/npm/src/contract_support/mod.d.ts.map +1 -1
- package/script/npm/src/contract_support/mod.js +757 -51
- package/script/npm/src/contract_support/protocol.d.ts +20 -5
- package/script/npm/src/contract_support/protocol.d.ts.map +1 -1
- package/script/npm/src/contract_support/protocol.js +20 -11
- package/script/npm/src/contract_support/runtime.d.ts +11 -0
- package/script/npm/src/contract_support/runtime.d.ts.map +1 -1
- package/script/npm/src/contract_support/schema_pointers.d.ts.map +1 -1
- package/script/npm/src/contract_support/schema_pointers.js +32 -14
- package/script/npm/src/device/deno.d.ts.map +1 -1
- package/script/npm/src/device/deno.js +6 -0
- package/script/npm/src/device.d.ts +2 -0
- package/script/npm/src/device.d.ts.map +1 -1
- package/script/npm/src/device.js +3 -0
- package/script/npm/src/errors/AuthError.d.ts +1 -1
- package/script/npm/src/errors/AuthError.d.ts.map +1 -1
- package/script/npm/src/errors/AuthError.js +5 -1
- package/script/npm/src/errors/index.d.ts +4 -4
- package/script/npm/src/helpers.d.ts.map +1 -1
- package/script/npm/src/index.d.ts +4 -3
- package/script/npm/src/index.d.ts.map +1 -1
- package/script/npm/src/index.js +5 -2
- package/script/npm/src/jobs.d.ts +10 -1
- package/script/npm/src/jobs.d.ts.map +1 -1
- package/script/npm/src/jobs.js +17 -2
- package/script/npm/src/kv.d.ts.map +1 -1
- package/script/npm/src/kv.js +10 -4
- package/script/npm/src/models/auth/rpc/Logout.d.ts +4 -4
- package/script/npm/src/models/auth/rpc/Logout.d.ts.map +1 -1
- package/script/npm/src/models/auth/rpc/Logout.js +3 -3
- package/script/npm/src/models/trellis/Page.d.ts +2 -0
- package/script/npm/src/models/trellis/Page.d.ts.map +1 -0
- package/script/npm/src/models/trellis/Page.js +6 -0
- package/script/npm/src/models/trellis/State.d.ts +1 -0
- package/script/npm/src/models/trellis/State.d.ts.map +1 -1
- package/script/npm/src/models/trellis/State.js +1 -0
- package/script/npm/src/models/trellis/rpc/StateList.d.ts +9 -12
- package/script/npm/src/models/trellis/rpc/StateList.d.ts.map +1 -1
- package/script/npm/src/models/trellis/rpc/StateList.js +16 -18
- package/script/npm/src/operations.d.ts +16 -7
- package/script/npm/src/operations.d.ts.map +1 -1
- package/script/npm/src/operations.js +84 -19
- package/script/npm/src/runtime_transport.d.ts +2 -0
- package/script/npm/src/runtime_transport.d.ts.map +1 -1
- package/script/npm/src/runtime_transport.js +2 -1
- package/script/npm/src/server/internal_jobs/active-job.d.ts +2 -1
- package/script/npm/src/server/internal_jobs/active-job.d.ts.map +1 -1
- package/script/npm/src/server/internal_jobs/active-job.js +3 -0
- package/script/npm/src/server/internal_jobs/job-manager.d.ts +4 -1
- package/script/npm/src/server/internal_jobs/job-manager.d.ts.map +1 -1
- package/script/npm/src/server/internal_jobs/job-manager.js +61 -1
- package/script/npm/src/server/internal_jobs/projection.js +1 -0
- package/script/npm/src/server/internal_jobs/runtime-worker.d.ts +13 -1
- package/script/npm/src/server/internal_jobs/runtime-worker.d.ts.map +1 -1
- package/script/npm/src/server/internal_jobs/runtime-worker.js +74 -13
- package/script/npm/src/server/internal_jobs/types.d.ts +19 -0
- package/script/npm/src/server/internal_jobs/types.d.ts.map +1 -1
- package/script/npm/src/server/internal_jobs/types.js +11 -1
- package/script/npm/src/server/runtime.d.ts +1 -0
- package/script/npm/src/server/runtime.d.ts.map +1 -1
- package/script/npm/src/server/service.d.ts +10 -1
- package/script/npm/src/server/service.d.ts.map +1 -1
- package/script/npm/src/server/service.js +188 -62
- package/script/npm/src/server/transfer.d.ts.map +1 -1
- package/script/npm/src/server/transfer.js +4 -0
- package/script/npm/src/server.d.ts.map +1 -1
- package/script/npm/src/server.js +336 -33
- package/script/npm/src/store.d.ts +8 -1
- package/script/npm/src/store.d.ts.map +1 -1
- package/script/npm/src/store.js +46 -8
- package/script/npm/src/transfer.d.ts +3 -0
- package/script/npm/src/transfer.d.ts.map +1 -1
- package/script/npm/src/transfer.js +19 -29
- package/script/npm/src/trellis.d.ts +85 -22
- package/script/npm/src/trellis.d.ts.map +1 -1
- package/script/npm/src/trellis.js +525 -61
- package/script/operations.d.ts +16 -7
- package/script/operations.d.ts.map +1 -1
- package/script/operations.js +84 -19
- package/script/runtime_transport.d.ts +2 -0
- package/script/runtime_transport.d.ts.map +1 -1
- package/script/runtime_transport.js +2 -1
- package/script/store.d.ts +8 -1
- package/script/store.d.ts.map +1 -1
- package/script/store.js +46 -8
- package/script/transfer.d.ts +3 -0
- package/script/transfer.d.ts.map +1 -1
- package/script/transfer.js +19 -29
- package/script/trellis.d.ts +85 -22
- package/script/trellis.d.ts.map +1 -1
- package/script/trellis.js +525 -61
- package/esm/models/trellis/Paginate.d.ts +0 -7
- package/esm/models/trellis/Paginate.d.ts.map +0 -1
- package/esm/models/trellis/Paginate.js +0 -5
- package/esm/npm/src/models/trellis/Paginate.d.ts +0 -7
- package/esm/npm/src/models/trellis/Paginate.d.ts.map +0 -1
- package/esm/npm/src/models/trellis/Paginate.js +0 -5
- package/script/models/trellis/Paginate.d.ts +0 -7
- package/script/models/trellis/Paginate.d.ts.map +0 -1
- package/script/models/trellis/Paginate.js +0 -11
- package/script/npm/src/models/trellis/Paginate.d.ts +0 -7
- package/script/npm/src/models/trellis/Paginate.d.ts.map +0 -1
- package/script/npm/src/models/trellis/Paginate.js +0 -11
|
@@ -1,97 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
// Generated from ./generated/contracts/manifests/trellis.jobs@v1.json
|
|
2
|
+
import { OWNED_API } from "./owned_api.js";
|
|
3
|
+
import { OWNED_API as AuthApi } from "@qlever-llc/trellis/sdk/auth";
|
|
4
|
+
import { OWNED_API as CoreApi } from "@qlever-llc/trellis/sdk/core";
|
|
5
|
+
import { OWNED_API as HealthApi } from "@qlever-llc/trellis/sdk/health";
|
|
6
|
+
export { OWNED_API };
|
|
7
|
+
export const USED_API = {
|
|
4
8
|
rpc: {
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
output: schema(JobsCancelResponseSchema),
|
|
9
|
-
callerCapabilities: ["jobs.admin.mutate"],
|
|
10
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
11
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
12
|
-
},
|
|
13
|
-
"Jobs.DismissDLQ": {
|
|
14
|
-
subject: "rpc.v1.Jobs.DismissDLQ",
|
|
15
|
-
input: schema(JobsDismissDLQRequestSchema),
|
|
16
|
-
output: schema(JobsDismissDLQResponseSchema),
|
|
17
|
-
callerCapabilities: ["jobs.admin.mutate"],
|
|
18
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
19
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
20
|
-
},
|
|
21
|
-
"Jobs.Get": {
|
|
22
|
-
subject: "rpc.v1.Jobs.Get",
|
|
23
|
-
input: schema(JobsGetRequestSchema),
|
|
24
|
-
output: schema(JobsGetResponseSchema),
|
|
25
|
-
callerCapabilities: ["jobs.admin.read"],
|
|
26
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
27
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
28
|
-
},
|
|
29
|
-
"Jobs.Health": {
|
|
30
|
-
subject: "rpc.v1.Jobs.Health",
|
|
31
|
-
input: schema(EmptySchema),
|
|
32
|
-
output: schema(JobsHealthResponseSchema),
|
|
33
|
-
callerCapabilities: ["jobs.admin.read"],
|
|
34
|
-
errors: ["UnexpectedError"],
|
|
35
|
-
declaredErrorTypes: ["UnexpectedError"],
|
|
36
|
-
},
|
|
37
|
-
"Jobs.List": {
|
|
38
|
-
subject: "rpc.v1.Jobs.List",
|
|
39
|
-
input: schema(JobsListRequestSchema),
|
|
40
|
-
output: schema(JobsListResponseSchema),
|
|
41
|
-
callerCapabilities: ["jobs.admin.read"],
|
|
42
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
43
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
44
|
-
},
|
|
45
|
-
"Jobs.ListDLQ": {
|
|
46
|
-
subject: "rpc.v1.Jobs.ListDLQ",
|
|
47
|
-
input: schema(JobsListDLQRequestSchema),
|
|
48
|
-
output: schema(JobsListDLQResponseSchema),
|
|
49
|
-
callerCapabilities: ["jobs.admin.read"],
|
|
50
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
51
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
52
|
-
},
|
|
53
|
-
"Jobs.ListServices": {
|
|
54
|
-
subject: "rpc.v1.Jobs.ListServices",
|
|
55
|
-
input: schema(EmptySchema),
|
|
56
|
-
output: schema(JobsListServicesResponseSchema),
|
|
57
|
-
callerCapabilities: ["jobs.admin.read"],
|
|
58
|
-
errors: ["UnexpectedError"],
|
|
59
|
-
declaredErrorTypes: ["UnexpectedError"],
|
|
60
|
-
},
|
|
61
|
-
"Jobs.ReplayDLQ": {
|
|
62
|
-
subject: "rpc.v1.Jobs.ReplayDLQ",
|
|
63
|
-
input: schema(JobsReplayDLQRequestSchema),
|
|
64
|
-
output: schema(JobsReplayDLQResponseSchema),
|
|
65
|
-
callerCapabilities: ["jobs.admin.mutate"],
|
|
66
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
67
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
68
|
-
},
|
|
69
|
-
"Jobs.Retry": {
|
|
70
|
-
subject: "rpc.v1.Jobs.Retry",
|
|
71
|
-
input: schema(JobsRetryRequestSchema),
|
|
72
|
-
output: schema(JobsRetryResponseSchema),
|
|
73
|
-
callerCapabilities: ["jobs.admin.mutate"],
|
|
74
|
-
errors: ["UnexpectedError", "ValidationError"],
|
|
75
|
-
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
76
|
-
},
|
|
9
|
+
get "Auth.Requests.Validate"() { return AuthApi.rpc["Auth.Requests.Validate"]; },
|
|
10
|
+
get "Trellis.Bindings.Get"() { return CoreApi.rpc["Trellis.Bindings.Get"]; },
|
|
11
|
+
get "Trellis.Catalog"() { return CoreApi.rpc["Trellis.Catalog"]; },
|
|
77
12
|
},
|
|
78
13
|
operations: {},
|
|
79
|
-
events: {
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
rpc: {},
|
|
84
|
-
operations: {},
|
|
85
|
-
events: {},
|
|
14
|
+
events: {
|
|
15
|
+
get "Health.Heartbeat"() { return HealthApi.events["Health.Heartbeat"]; },
|
|
16
|
+
},
|
|
17
|
+
feeds: {},
|
|
86
18
|
subjects: {},
|
|
87
19
|
};
|
|
88
20
|
export const API = {
|
|
89
21
|
owned: OWNED_API,
|
|
90
22
|
used: USED_API,
|
|
91
|
-
trellis
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
23
|
+
get trellis() {
|
|
24
|
+
return {
|
|
25
|
+
rpc: { ...OWNED_API.rpc, ...USED_API.rpc },
|
|
26
|
+
operations: { ...OWNED_API.operations, ...USED_API.operations },
|
|
27
|
+
events: { ...OWNED_API.events, ...USED_API.events },
|
|
28
|
+
feeds: { ...OWNED_API.feeds, ...USED_API.feeds },
|
|
29
|
+
subjects: { ...OWNED_API.subjects, ...USED_API.subjects },
|
|
30
|
+
};
|
|
96
31
|
},
|
|
97
32
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { AsyncResult, BaseError, EventOpts, MaybeAsync, ReceiveTransferGrant, ReceiveTransferHandle, RequestOpts, SendTransferGrant, SendTransferHandle, TrellisConnection, UnexpectedError, ValidationError } from "@qlever-llc/trellis";
|
|
1
|
+
import type { AsyncResult, BaseError, EventOpts, FeedInputBuilder, MaybeAsync, ReceiveTransferGrant, ReceiveTransferHandle, RequestOpts, SendTransferGrant, SendTransferHandle, TrellisConnection, UnexpectedError, ValidationError } from "@qlever-llc/trellis";
|
|
2
2
|
import type { API } from "./api.js";
|
|
3
3
|
import type * as Types from "./types.js";
|
|
4
|
+
import type * as AuthSdk from "@qlever-llc/trellis/sdk/auth";
|
|
5
|
+
import type * as CoreSdk from "@qlever-llc/trellis/sdk/core";
|
|
6
|
+
import type * as HealthSdk from "@qlever-llc/trellis/sdk/health";
|
|
4
7
|
type EventCallback<TMessage> = {
|
|
5
8
|
bivarianceHack(message: TMessage): MaybeAsync<void, BaseError>;
|
|
6
9
|
}["bivarianceHack"];
|
|
@@ -23,8 +26,12 @@ export interface TrellisJobsClient {
|
|
|
23
26
|
request(method: "Jobs.ListServices", input: Types.JobsListServicesInput, opts?: RequestOpts): AsyncResult<Types.JobsListServicesOutput, BaseError>;
|
|
24
27
|
request(method: "Jobs.ReplayDLQ", input: Types.JobsReplayDLQInput, opts?: RequestOpts): AsyncResult<Types.JobsReplayDLQOutput, BaseError>;
|
|
25
28
|
request(method: "Jobs.Retry", input: Types.JobsRetryInput, opts?: RequestOpts): AsyncResult<Types.JobsRetryOutput, BaseError>;
|
|
26
|
-
|
|
29
|
+
request(method: "Auth.Requests.Validate", input: AuthSdk.AuthRequestsValidateInput, opts?: RequestOpts): AsyncResult<AuthSdk.AuthRequestsValidateOutput, BaseError>;
|
|
30
|
+
request(method: "Trellis.Bindings.Get", input: CoreSdk.TrellisBindingsGetInput, opts?: RequestOpts): AsyncResult<CoreSdk.TrellisBindingsGetOutput, BaseError>;
|
|
31
|
+
request(method: "Trellis.Catalog", input: CoreSdk.TrellisCatalogInput, opts?: RequestOpts): AsyncResult<CoreSdk.TrellisCatalogOutput, BaseError>;
|
|
32
|
+
publish(event: "Health.Heartbeat", data: Omit<HealthSdk.HealthHeartbeatEvent, "header">): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
27
33
|
event(event: string, subjectData: Record<string, unknown>, fn: EventCallback<unknown>, opts?: EventOpts): AsyncResult<void, ValidationError | UnexpectedError>;
|
|
34
|
+
feed(feed: string): FeedInputBuilder<unknown, unknown>;
|
|
28
35
|
wait(): AsyncResult<void, BaseError>;
|
|
29
36
|
}
|
|
30
37
|
export type Client = TrellisJobsClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/.build/generated-sdk/jobs/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAuB,UAAU,EAAyD,oBAAoB,EAAE,qBAAqB,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/.build/generated-sdk/jobs/client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAuB,UAAU,EAAyD,oBAAoB,EAAE,qBAAqB,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAA2D,iBAAiB,EAAE,eAAe,EAAE,eAAe,EAAyB,MAAM,qBAAqB,CAAC;AAC7Z,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;AACzC,OAAO,KAAK,KAAK,OAAO,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,KAAK,OAAO,MAAM,sBAAsB,CAAC;AACrD,OAAO,KAAK,KAAK,SAAS,MAAM,wBAAwB,CAAC;AAEzD,KAAK,aAAa,CAAC,QAAQ,IAAI;IAC7B,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;CAChE,CAAC,gBAAgB,CAAC,CAAC;AAEpB,MAAM,MAAM,gBAAgB,GAAG,EAAE,CAAC;AAElC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,OAAO,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,gBAAgB,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,iBAAiB,CAAC;IACvC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,CAAC;IACvD,QAAQ,CAAC,KAAK,EAAE,oBAAoB,GAAG,qBAAqB,CAAC;IAC7D,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACjI,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,KAAK,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IAC7I,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;IACxH,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,CAAC,eAAe,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;IACjI,OAAO,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,CAAC,aAAa,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,cAAc,EAAE,SAAS,CAAC,CAAC;IAC3H,OAAO,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,KAAK,CAAC,gBAAgB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;IACpI,OAAO,CAAC,MAAM,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,sBAAsB,EAAE,SAAS,CAAC,CAAC;IACnJ,OAAO,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,mBAAmB,EAAE,SAAS,CAAC,CAAC;IAC1I,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAC9H,OAAO,CAAC,MAAM,EAAE,wBAAwB,EAAE,KAAK,EAAE,OAAO,CAAC,yBAAyB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC;IACpK,OAAO,CAAC,MAAM,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,CAAC,uBAAuB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;IAC9J,OAAO,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC,CAAC;IACjJ,OAAO,CAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,oBAAoB,EAAE,QAAQ,CAAC,GAAG,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,CAAC,CAAC;IAC/I,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,eAAe,CAAC,CAAC;IAC/J,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,IAAI,IAAI,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;CACtC;AAED,MAAM,MAAM,MAAM,GAAG,iBAAiB,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { TrellisAPI } from "@qlever-llc/trellis/contracts";
|
|
|
2
2
|
import type { SdkContractModule, TrellisContractV1 } from "@qlever-llc/trellis";
|
|
3
3
|
import { API } from "./api.js";
|
|
4
4
|
export declare const CONTRACT_ID: "trellis.jobs@v1";
|
|
5
|
-
export declare const CONTRACT_DIGEST: "
|
|
5
|
+
export declare const CONTRACT_DIGEST: "InKlHrBQMwe1afDDAlaXtBftAkk91t71DChQksD8u1s";
|
|
6
6
|
export declare const CONTRACT: TrellisContractV1;
|
|
7
7
|
export declare const sdk: SdkContractModule<typeof CONTRACT_ID, typeof API.owned>;
|
|
8
8
|
export declare const use: import("@qlever-llc/trellis").ContractUseFn<"trellis.jobs@v1", TrellisAPI>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../../src/.build/generated-sdk/jobs/contract.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,iBAAiB,EAAE,iBAAiB,EAAW,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,eAAO,MAAM,WAAW,EAAG,iBAA0B,CAAC;AACtD,eAAO,MAAM,eAAe,EAAG,6CAAsD,CAAC;AACtF,eAAO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../../../../src/.build/generated-sdk/jobs/contract.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAyB,iBAAiB,EAAE,iBAAiB,EAAW,MAAM,qBAAqB,CAAC;AAChH,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAI/B,eAAO,MAAM,WAAW,EAAG,iBAA0B,CAAC;AACtD,eAAO,MAAM,eAAe,EAAG,6CAAsD,CAAC;AACtF,eAAO,MAAM,QAAQ,EAAyquB,iBAAiB,CAAC;AA0BhtuB,eAAO,MAAM,GAAG,EAAE,iBAAiB,CAAC,OAAO,WAAW,EAAE,OAAO,GAAG,CAAC,KAAK,CA8BvE,CAAC;AAEF,eAAO,MAAM,GAAG,4EAAU,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { API } from "./api.js";
|
|
2
2
|
const CONTRACT_MODULE_METADATA = Symbol.for("@qlever-llc/trellis/contracts/contract-module");
|
|
3
3
|
export const CONTRACT_ID = "trellis.jobs@v1";
|
|
4
|
-
export const CONTRACT_DIGEST = "
|
|
5
|
-
export const CONTRACT = { "description": "Trellis-managed background job administration API.", "displayName": "Trellis Jobs", "format": "trellis.contract.v1", "id": "trellis.jobs@v1", "kind": "service", "resources": { "kv": { "jobsState": { "history": 1, "purpose": "Projected Trellis job state for admin queries.", "required": true, "schema": { "schema": "Job" }, "ttlMs": 0 } } }, "rpc": { "Jobs.Cancel": { "capabilities": { "call": ["jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsCancelRequest" }, "output": { "schema": "JobsCancelResponse" }, "subject": "rpc.v1.Jobs.Cancel", "version": "v1" }, "Jobs.DismissDLQ": { "capabilities": { "call": ["jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsDismissDLQRequest" }, "output": { "schema": "JobsDismissDLQResponse" }, "subject": "rpc.v1.Jobs.DismissDLQ", "version": "v1" }, "Jobs.Get": { "capabilities": { "call": ["jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsGetRequest" }, "output": { "schema": "JobsGetResponse" }, "subject": "rpc.v1.Jobs.Get", "version": "v1" }, "Jobs.Health": { "capabilities": { "call": ["jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }], "input": { "schema": "Empty" }, "output": { "schema": "JobsHealthResponse" }, "subject": "rpc.v1.Jobs.Health", "version": "v1" }, "Jobs.List": { "capabilities": { "call": ["jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsListRequest" }, "output": { "schema": "JobsListResponse" }, "subject": "rpc.v1.Jobs.List", "version": "v1" }, "Jobs.ListDLQ": { "capabilities": { "call": ["jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsListDLQRequest" }, "output": { "schema": "JobsListDLQResponse" }, "subject": "rpc.v1.Jobs.ListDLQ", "version": "v1" }, "Jobs.ListServices": { "capabilities": { "call": ["jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }], "input": { "schema": "Empty" }, "output": { "schema": "JobsListServicesResponse" }, "subject": "rpc.v1.Jobs.ListServices", "version": "v1" }, "Jobs.ReplayDLQ": { "capabilities": { "call": ["jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsReplayDLQRequest" }, "output": { "schema": "JobsReplayDLQResponse" }, "subject": "rpc.v1.Jobs.ReplayDLQ", "version": "v1" }, "Jobs.Retry": { "capabilities": { "call": ["jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsRetryRequest" }, "output": { "schema": "JobsRetryResponse" }, "subject": "rpc.v1.Jobs.Retry", "version": "v1" } }, "schemas": { "Empty": { "properties": {}, "type": "object" }, "Job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "JobLogEntry": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "JobProgress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "JobState": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "JobsCancelRequest": { "properties": { "id": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "id"], "type": "object" }, "JobsCancelResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsDismissDLQRequest": { "properties": { "id": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "id"], "type": "object" }, "JobsDismissDLQResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsGetRequest": { "properties": { "id": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "id"], "type": "object" }, "JobsGetResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "type": "object" }, "JobsHealthResponse": { "properties": { "checks": { "items": { "patternProperties": { "^.*$": {} }, "type": "object" }, "type": "array" }, "service": { "minLength": 1, "type": "string" }, "status": {}, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["service", "status", "timestamp", "checks"], "type": "object" }, "JobsListDLQRequest": { "properties": { "limit": { "minimum": 1, "type": "integer" }, "service": { "minLength": 1, "type": "string" }, "since": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "type": { "minLength": 1, "type": "string" } }, "type": "object" }, "JobsListDLQResponse": { "properties": { "jobs": { "items": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "type": "array" } }, "required": ["jobs"], "type": "object" }, "JobsListRequest": { "properties": { "limit": { "minimum": 1, "type": "integer" }, "service": { "minLength": 1, "type": "string" }, "since": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "type": { "minLength": 1, "type": "string" } }, "type": "object" }, "JobsListResponse": { "properties": { "jobs": { "items": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "type": "array" } }, "required": ["jobs"], "type": "object" }, "JobsListServicesResponse": { "properties": { "services": { "items": { "properties": { "healthy": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "workers": { "items": { "properties": { "concurrency": { "minimum": 1, "type": "integer" }, "instanceId": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" }, "timestamp": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "instanceId", "timestamp"], "type": "object" }, "type": "array" } }, "required": ["name", "healthy", "workers"], "type": "object" }, "type": "array" } }, "required": ["services"], "type": "object" }, "JobsReplayDLQRequest": { "properties": { "id": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "id"], "type": "object" }, "JobsReplayDLQResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsRetryRequest": { "properties": { "id": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "id"], "type": "object" }, "JobsRetryResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "required": ["current", "total"], "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" } } };
|
|
4
|
+
export const CONTRACT_DIGEST = "InKlHrBQMwe1afDDAlaXtBftAkk91t71DChQksD8u1s";
|
|
5
|
+
export const CONTRACT = { "capabilities": { "trellis.jobs::jobs.admin.mutate": { "consequence": "Can change background job execution state.", "description": "Cancel, retry, replay, or dismiss Jobs service work items.", "displayName": "Mutate jobs admin data" }, "trellis.jobs::jobs.admin.read": { "description": "View Jobs service health, services, jobs, and dead-letter queues.", "displayName": "Read jobs admin data" } }, "description": "Trellis-managed background job administration API.", "displayName": "Trellis Jobs", "errors": { "NotFoundError": { "schema": { "schema": "NotFoundErrorData" }, "type": "NotFoundError" } }, "format": "trellis.contract.v1", "id": "trellis.jobs@v1", "kind": "service", "rpc": { "Jobs.Cancel": { "capabilities": { "call": ["trellis.jobs::jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, { "type": "NotFoundError" }], "input": { "schema": "JobsCancelRequest" }, "output": { "schema": "JobsCancelResponse" }, "subject": "rpc.v1.Jobs.Cancel", "version": "v1" }, "Jobs.DismissDLQ": { "capabilities": { "call": ["trellis.jobs::jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, { "type": "NotFoundError" }], "input": { "schema": "JobsDismissDLQRequest" }, "output": { "schema": "JobsDismissDLQResponse" }, "subject": "rpc.v1.Jobs.DismissDLQ", "version": "v1" }, "Jobs.Get": { "capabilities": { "call": ["trellis.jobs::jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, { "type": "NotFoundError" }], "input": { "schema": "JobsGetRequest" }, "output": { "schema": "JobsGetResponse" }, "subject": "rpc.v1.Jobs.Get", "version": "v1" }, "Jobs.Health": { "capabilities": { "call": ["trellis.jobs::jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }], "input": { "schema": "Empty" }, "output": { "schema": "JobsHealthResponse" }, "subject": "rpc.v1.Jobs.Health", "version": "v1" }, "Jobs.List": { "capabilities": { "call": ["trellis.jobs::jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsListRequest" }, "output": { "schema": "JobsListResponse" }, "subject": "rpc.v1.Jobs.List", "version": "v1" }, "Jobs.ListDLQ": { "capabilities": { "call": ["trellis.jobs::jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsListDLQRequest" }, "output": { "schema": "JobsListDLQResponse" }, "subject": "rpc.v1.Jobs.ListDLQ", "version": "v1" }, "Jobs.ListServices": { "capabilities": { "call": ["trellis.jobs::jobs.admin.read"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }], "input": { "schema": "JobsListServicesRequest" }, "output": { "schema": "JobsListServicesResponse" }, "subject": "rpc.v1.Jobs.ListServices", "version": "v1" }, "Jobs.ReplayDLQ": { "capabilities": { "call": ["trellis.jobs::jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, { "type": "NotFoundError" }], "input": { "schema": "JobsReplayDLQRequest" }, "output": { "schema": "JobsReplayDLQResponse" }, "subject": "rpc.v1.Jobs.ReplayDLQ", "version": "v1" }, "Jobs.Retry": { "capabilities": { "call": ["trellis.jobs::jobs.admin.mutate"] }, "errors": [{ "type": "UnexpectedError" }, { "type": "ValidationError" }, { "type": "NotFoundError" }], "input": { "schema": "JobsRetryRequest" }, "output": { "schema": "JobsRetryResponse" }, "subject": "rpc.v1.Jobs.Retry", "version": "v1" } }, "schemas": { "Empty": { "properties": {}, "type": "object" }, "Job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "JobContext": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "JobLogEntry": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "JobProgress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "JobState": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "JobsCancelRequest": { "description": "Jobs admin ids are globally addressable; callers identify jobs by id only.", "properties": { "id": { "minLength": 1, "type": "string" } }, "required": ["id"], "type": "object" }, "JobsCancelResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsDismissDLQRequest": { "description": "Jobs admin ids are globally addressable; callers identify jobs by id only.", "properties": { "id": { "minLength": 1, "type": "string" } }, "required": ["id"], "type": "object" }, "JobsDismissDLQResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsGetRequest": { "description": "Jobs admin ids are globally addressable; callers identify jobs by id only.", "properties": { "id": { "minLength": 1, "type": "string" } }, "required": ["id"], "type": "object" }, "JobsGetResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsHealthResponse": { "properties": { "checks": { "items": { "patternProperties": { "^.*$": {} }, "type": "object" }, "type": "array" }, "service": { "minLength": 1, "type": "string" }, "status": {}, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["service", "status", "timestamp", "checks"], "type": "object" }, "JobsListDLQRequest": { "properties": { "limit": { "minimum": 1, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" }, "service": { "minLength": 1, "type": "string" }, "since": { "format": "date-time", "type": "string" }, "type": { "minLength": 1, "type": "string" } }, "required": ["limit"], "type": "object" }, "JobsListDLQResponse": { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "items": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "type": "array" }, "limit": { "minimum": 1, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" }, "JobsListRequest": { "properties": { "limit": { "minimum": 1, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" }, "service": { "minLength": 1, "type": "string" }, "since": { "format": "date-time", "type": "string" }, "state": { "items": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "type": "array" }, "type": { "minLength": 1, "type": "string" } }, "required": ["limit"], "type": "object" }, "JobsListResponse": { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "items": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" }, "type": "array" }, "limit": { "minimum": 1, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" }, "JobsListServicesRequest": { "properties": { "limit": { "minimum": 1, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["limit"], "type": "object" }, "JobsListServicesResponse": { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "items": { "properties": { "healthy": { "type": "boolean" }, "name": { "minLength": 1, "type": "string" }, "workers": { "items": { "properties": { "concurrency": { "minimum": 1, "type": "integer" }, "instanceId": { "minLength": 1, "type": "string" }, "jobType": { "minLength": 1, "type": "string" }, "service": { "minLength": 1, "type": "string" }, "timestamp": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["service", "jobType", "instanceId", "timestamp"], "type": "object" }, "type": "array" } }, "required": ["name", "healthy", "workers"], "type": "object" }, "type": "array" }, "limit": { "minimum": 1, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" }, "JobsReplayDLQRequest": { "description": "Jobs admin ids are globally addressable; callers identify jobs by id only.", "properties": { "id": { "minLength": 1, "type": "string" } }, "required": ["id"], "type": "object" }, "JobsReplayDLQResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "JobsRetryRequest": { "description": "Jobs admin ids are globally addressable; callers identify jobs by id only.", "properties": { "id": { "minLength": 1, "type": "string" } }, "required": ["id"], "type": "object" }, "JobsRetryResponse": { "properties": { "job": { "properties": { "completedAt": { "format": "date-time", "type": "string" }, "context": { "properties": { "requestId": { "minLength": 1, "type": "string" }, "traceId": { "pattern": "^[0-9a-f]{32}$", "type": "string" }, "traceparent": { "pattern": "^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$", "type": "string" }, "tracestate": { "minLength": 1, "type": "string" } }, "required": ["requestId", "traceId", "traceparent"], "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deadline": { "format": "date-time", "type": "string" }, "id": { "minLength": 1, "type": "string" }, "lastError": { "type": "string" }, "logs": { "items": { "properties": { "level": { "anyOf": [{ "const": "info", "type": "string" }, { "const": "warn", "type": "string" }, { "const": "error", "type": "string" }] }, "message": { "type": "string" }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["timestamp", "level", "message"], "type": "object" }, "type": "array" }, "maxTries": { "minimum": 1, "type": "integer" }, "payload": {}, "progress": { "properties": { "current": { "minimum": 0, "type": "integer" }, "message": { "type": "string" }, "step": { "type": "string" }, "total": { "minimum": 0, "type": "integer" } }, "type": "object" }, "result": {}, "service": { "minLength": 1, "type": "string" }, "startedAt": { "format": "date-time", "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "active", "type": "string" }, { "const": "retry", "type": "string" }, { "const": "completed", "type": "string" }, { "const": "failed", "type": "string" }, { "const": "cancelled", "type": "string" }, { "const": "expired", "type": "string" }, { "const": "dead", "type": "string" }, { "const": "dismissed", "type": "string" }] }, "tries": { "minimum": 0, "type": "integer" }, "type": { "minLength": 1, "type": "string" }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["id", "context", "service", "type", "state", "payload", "createdAt", "updatedAt", "tries", "maxTries"], "type": "object" } }, "required": ["job"], "type": "object" }, "NotFoundErrorData": { "properties": { "context": { "patternProperties": { "^.*$": {} }, "type": "object" }, "id": { "minLength": 1, "type": "string" }, "jobId": { "minLength": 1, "type": "string" }, "message": { "type": "string" }, "resource": { "minLength": 1, "type": "string" }, "traceId": { "type": "string" }, "type": { "const": "NotFoundError", "type": "string" } }, "required": ["id", "type", "message", "resource"], "type": "object" } }, "uses": { "required": { "auth": { "contract": "trellis.auth@v1", "rpc": { "call": ["Auth.Requests.Validate"] } }, "core": { "contract": "trellis.core@v1", "rpc": { "call": ["Trellis.Bindings.Get", "Trellis.Catalog"] } }, "health": { "contract": "trellis.health@v1", "events": { "publish": ["Health.Heartbeat"] } } } } };
|
|
6
6
|
function assertSelectedKeysExist(kind, keys, api) {
|
|
7
7
|
if (!keys) {
|
|
8
8
|
return;
|
|
@@ -18,6 +18,7 @@ function assertValidUseSpec(spec) {
|
|
|
18
18
|
assertSelectedKeysExist("operations", spec.operations?.call, API.owned.operations);
|
|
19
19
|
assertSelectedKeysExist("events", spec.events?.publish, API.owned.events);
|
|
20
20
|
assertSelectedKeysExist("events", spec.events?.subscribe, API.owned.events);
|
|
21
|
+
assertSelectedKeysExist("feeds", spec.feeds?.subscribe, API.owned.feeds);
|
|
21
22
|
}
|
|
22
23
|
export const sdk = {
|
|
23
24
|
CONTRACT_ID,
|
|
@@ -38,6 +39,7 @@ export const sdk = {
|
|
|
38
39
|
},
|
|
39
40
|
}
|
|
40
41
|
: {}),
|
|
42
|
+
...(spec.feeds?.subscribe ? { feeds: { subscribe: [...spec.feeds.subscribe] } } : {}),
|
|
41
43
|
};
|
|
42
44
|
Object.defineProperty(dependencyUse, CONTRACT_MODULE_METADATA, {
|
|
43
45
|
value: sdk,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"owned_api.d.ts","sourceRoot":"","sources":["../../../../../../src/.build/generated-sdk/jobs/owned_api.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,SAAS,YAsHA,CAAC"}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { schema } from "@qlever-llc/trellis/contracts";
|
|
2
|
+
import * as Types from "./types.js";
|
|
3
|
+
import { EmptySchema, JobsCancelRequestSchema, JobsCancelResponseSchema, JobsDismissDLQRequestSchema, JobsDismissDLQResponseSchema, JobsGetRequestSchema, JobsGetResponseSchema, JobsHealthResponseSchema, JobsListDLQRequestSchema, JobsListDLQResponseSchema, JobsListRequestSchema, JobsListResponseSchema, JobsListServicesRequestSchema, JobsListServicesResponseSchema, JobsReplayDLQRequestSchema, JobsReplayDLQResponseSchema, JobsRetryRequestSchema, JobsRetryResponseSchema, NotFoundErrorDataSchema } from "./schemas.js";
|
|
4
|
+
export const OWNED_API = {
|
|
5
|
+
rpc: {
|
|
6
|
+
"Jobs.Cancel": {
|
|
7
|
+
subject: "rpc.v1.Jobs.Cancel",
|
|
8
|
+
input: schema(JobsCancelRequestSchema),
|
|
9
|
+
output: schema(JobsCancelResponseSchema),
|
|
10
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.mutate"],
|
|
11
|
+
errors: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
12
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
13
|
+
runtimeErrors: [
|
|
14
|
+
{
|
|
15
|
+
type: "NotFoundError",
|
|
16
|
+
schema: schema(NotFoundErrorDataSchema),
|
|
17
|
+
fromSerializable: Types.NotFoundError.fromSerializable,
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
"Jobs.DismissDLQ": {
|
|
22
|
+
subject: "rpc.v1.Jobs.DismissDLQ",
|
|
23
|
+
input: schema(JobsDismissDLQRequestSchema),
|
|
24
|
+
output: schema(JobsDismissDLQResponseSchema),
|
|
25
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.mutate"],
|
|
26
|
+
errors: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
27
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
28
|
+
runtimeErrors: [
|
|
29
|
+
{
|
|
30
|
+
type: "NotFoundError",
|
|
31
|
+
schema: schema(NotFoundErrorDataSchema),
|
|
32
|
+
fromSerializable: Types.NotFoundError.fromSerializable,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
"Jobs.Get": {
|
|
37
|
+
subject: "rpc.v1.Jobs.Get",
|
|
38
|
+
input: schema(JobsGetRequestSchema),
|
|
39
|
+
output: schema(JobsGetResponseSchema),
|
|
40
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.read"],
|
|
41
|
+
errors: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
42
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
43
|
+
runtimeErrors: [
|
|
44
|
+
{
|
|
45
|
+
type: "NotFoundError",
|
|
46
|
+
schema: schema(NotFoundErrorDataSchema),
|
|
47
|
+
fromSerializable: Types.NotFoundError.fromSerializable,
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
"Jobs.Health": {
|
|
52
|
+
subject: "rpc.v1.Jobs.Health",
|
|
53
|
+
input: schema(EmptySchema),
|
|
54
|
+
output: schema(JobsHealthResponseSchema),
|
|
55
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.read"],
|
|
56
|
+
errors: ["UnexpectedError"],
|
|
57
|
+
declaredErrorTypes: ["UnexpectedError"],
|
|
58
|
+
},
|
|
59
|
+
"Jobs.List": {
|
|
60
|
+
subject: "rpc.v1.Jobs.List",
|
|
61
|
+
input: schema(JobsListRequestSchema),
|
|
62
|
+
output: schema(JobsListResponseSchema),
|
|
63
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.read"],
|
|
64
|
+
errors: ["UnexpectedError", "ValidationError"],
|
|
65
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
66
|
+
},
|
|
67
|
+
"Jobs.ListDLQ": {
|
|
68
|
+
subject: "rpc.v1.Jobs.ListDLQ",
|
|
69
|
+
input: schema(JobsListDLQRequestSchema),
|
|
70
|
+
output: schema(JobsListDLQResponseSchema),
|
|
71
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.read"],
|
|
72
|
+
errors: ["UnexpectedError", "ValidationError"],
|
|
73
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
74
|
+
},
|
|
75
|
+
"Jobs.ListServices": {
|
|
76
|
+
subject: "rpc.v1.Jobs.ListServices",
|
|
77
|
+
input: schema(JobsListServicesRequestSchema),
|
|
78
|
+
output: schema(JobsListServicesResponseSchema),
|
|
79
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.read"],
|
|
80
|
+
errors: ["UnexpectedError", "ValidationError"],
|
|
81
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError"],
|
|
82
|
+
},
|
|
83
|
+
"Jobs.ReplayDLQ": {
|
|
84
|
+
subject: "rpc.v1.Jobs.ReplayDLQ",
|
|
85
|
+
input: schema(JobsReplayDLQRequestSchema),
|
|
86
|
+
output: schema(JobsReplayDLQResponseSchema),
|
|
87
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.mutate"],
|
|
88
|
+
errors: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
89
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
90
|
+
runtimeErrors: [
|
|
91
|
+
{
|
|
92
|
+
type: "NotFoundError",
|
|
93
|
+
schema: schema(NotFoundErrorDataSchema),
|
|
94
|
+
fromSerializable: Types.NotFoundError.fromSerializable,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
"Jobs.Retry": {
|
|
99
|
+
subject: "rpc.v1.Jobs.Retry",
|
|
100
|
+
input: schema(JobsRetryRequestSchema),
|
|
101
|
+
output: schema(JobsRetryResponseSchema),
|
|
102
|
+
callerCapabilities: ["trellis.jobs::jobs.admin.mutate"],
|
|
103
|
+
errors: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
104
|
+
declaredErrorTypes: ["UnexpectedError", "ValidationError", "NotFoundError"],
|
|
105
|
+
runtimeErrors: [
|
|
106
|
+
{
|
|
107
|
+
type: "NotFoundError",
|
|
108
|
+
schema: schema(NotFoundErrorDataSchema),
|
|
109
|
+
fromSerializable: Types.NotFoundError.fromSerializable,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
operations: {},
|
|
115
|
+
events: {},
|
|
116
|
+
feeds: {},
|
|
117
|
+
subjects: {},
|
|
118
|
+
};
|