@qlever-llc/trellis 0.8.4 → 0.9.0-rc.10
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 +0 -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 +2 -1
- package/esm/errors/AuthError.d.ts.map +1 -1
- package/esm/errors/AuthError.js +8 -3
- package/esm/errors/index.d.ts +4 -4
- package/esm/errors/index.d.ts.map +1 -1
- package/esm/errors/index.js +1 -0
- 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 +2 -1
- package/esm/npm/src/errors/AuthError.d.ts.map +1 -1
- package/esm/npm/src/errors/AuthError.js +8 -3
- package/esm/npm/src/errors/index.d.ts +4 -4
- package/esm/npm/src/errors/index.d.ts.map +1 -1
- package/esm/npm/src/errors/index.js +1 -0
- package/esm/npm/src/generate.js +39 -26
- 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 +210 -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 -3
- 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 +2 -1
- package/script/errors/AuthError.d.ts.map +1 -1
- package/script/errors/AuthError.js +8 -3
- package/script/errors/index.d.ts +4 -4
- package/script/errors/index.d.ts.map +1 -1
- package/script/errors/index.js +1 -0
- 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 +2 -1
- package/script/npm/src/errors/AuthError.d.ts.map +1 -1
- package/script/npm/src/errors/AuthError.js +8 -3
- package/script/npm/src/errors/index.d.ts +4 -4
- package/script/npm/src/errors/index.d.ts.map +1 -1
- package/script/npm/src/errors/index.js +1 -0
- package/script/npm/src/generate.js +39 -59
- 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 +208 -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/src/_dnt.polyfills.ts +274 -0
- package/src/_dnt.shims.ts +64 -0
- package/src/auth/browser/login.ts +295 -0
- package/src/auth/browser/portal.ts +75 -0
- package/src/auth/browser/session.ts +197 -0
- package/src/auth/browser/storage.ts +105 -0
- package/src/auth/browser.ts +82 -0
- package/src/auth/device_activation.ts +715 -0
- package/src/auth/keys.ts +116 -0
- package/src/auth/mod.ts +298 -0
- package/src/auth/proof.ts +111 -0
- package/src/auth/protocol.ts +1629 -0
- package/src/auth/schemas.ts +145 -0
- package/src/auth/session_auth.ts +167 -0
- package/src/auth/time.ts +15 -0
- package/src/auth/trellis_id.ts +9 -0
- package/src/auth/types.ts +4 -0
- package/src/auth/utils.ts +87 -0
- package/src/auth.ts +2 -0
- package/src/browser.ts +8 -0
- package/src/client.ts +164 -0
- package/src/client_connect.ts +1328 -0
- package/src/codec.ts +107 -0
- package/src/connection.ts +466 -0
- package/src/contract.ts +84 -0
- package/src/contract_support/canonical.ts +217 -0
- package/src/contract_support/mod.ts +5079 -0
- package/src/contract_support/protocol.ts +213 -0
- package/src/contract_support/runtime.ts +129 -0
- package/src/contract_support/schema_pointers.ts +161 -0
- package/src/contracts.ts +9 -0
- package/src/device/deno.ts +941 -0
- package/src/device.ts +989 -0
- package/src/env.ts +1 -0
- package/src/errors/AuthError.ts +82 -0
- package/src/errors/KVError.ts +47 -0
- package/src/errors/RemoteError.ts +111 -0
- package/src/errors/StoreError.ts +43 -0
- package/src/errors/TransferError.ts +43 -0
- package/src/errors/TransportError.ts +48 -0
- package/src/errors/TrellisError.ts +20 -0
- package/src/errors/ValidationError.ts +80 -0
- package/src/errors/index.ts +195 -0
- package/src/generate.ts +329 -0
- package/src/globals.ts +26 -0
- package/src/health.ts +28 -0
- package/src/helpers.ts +63 -0
- package/src/host/mod.ts +9 -0
- package/src/host/node.ts +9 -0
- package/src/index.ts +233 -0
- package/src/jobs.ts +344 -0
- package/src/kv.ts +564 -0
- package/src/models/auth/rpc/Logout.ts +15 -0
- package/src/models/trellis/Page.ts +6 -0
- package/src/models/trellis/State.ts +55 -0
- package/src/models/trellis/TrellisError.ts +21 -0
- package/src/models/trellis/rpc/StateDelete.ts +13 -0
- package/src/models/trellis/rpc/StateGet.ts +25 -0
- package/src/models/trellis/rpc/StateList.ts +26 -0
- package/src/models/trellis/rpc/StatePut.ts +42 -0
- package/src/operations.ts +1508 -0
- package/src/runtime_transport.ts +132 -0
- package/src/sdk/auth.ts +2 -0
- package/src/sdk/core.ts +2 -0
- package/src/sdk/health.ts +2 -0
- package/src/sdk/jobs.ts +2 -0
- package/src/sdk/state.ts +2 -0
- package/src/server/health.ts +379 -0
- package/src/server/health_rpc.ts +51 -0
- package/src/server/health_schemas.ts +61 -0
- package/src/server/internal_jobs/active-job.ts +115 -0
- package/src/server/internal_jobs/bindings.ts +26 -0
- package/src/server/internal_jobs/cancellation-registry.ts +71 -0
- package/src/server/internal_jobs/heartbeat.ts +120 -0
- package/src/server/internal_jobs/job-manager.ts +456 -0
- package/src/server/internal_jobs/projection.ts +48 -0
- package/src/server/internal_jobs/runtime-worker.ts +741 -0
- package/src/server/internal_jobs/types.ts +124 -0
- package/src/server/runtime.ts +27 -0
- package/src/server/service.ts +2377 -0
- package/src/server/subscription.ts +143 -0
- package/src/server/transfer.ts +962 -0
- package/src/server.ts +1725 -0
- package/src/server_logger.ts +10 -0
- package/src/service/deno.ts +18 -0
- package/src/service/mod.ts +68 -0
- package/src/service/node.ts +18 -0
- package/src/store.ts +658 -0
- package/src/tasks.ts +34 -0
- package/src/telemetry/carrier.ts +35 -0
- package/src/telemetry/core.ts +31 -0
- package/src/telemetry/env.ts +23 -0
- package/src/telemetry/mod.ts +26 -0
- package/src/telemetry/nats.ts +15 -0
- package/src/telemetry/result.ts +20 -0
- package/src/telemetry/trace.ts +39 -0
- package/src/telemetry/trellis.ts +1 -0
- package/src/tracing.ts +28 -0
- package/src/transfer.ts +602 -0
- package/src/trellis.ts +3650 -0
- 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
|
@@ -0,0 +1,1629 @@
|
|
|
1
|
+
import { ContractResourceBindingsSchema } from "@qlever-llc/trellis/contracts";
|
|
2
|
+
import type { StaticDecode } from "typebox";
|
|
3
|
+
import { Type } from "typebox";
|
|
4
|
+
import { PageResponseSchema } from "../contract_support/protocol.js";
|
|
5
|
+
import {
|
|
6
|
+
ClientTransportsSchema,
|
|
7
|
+
ContractApprovalCapabilitySchema,
|
|
8
|
+
SentinelCredsSchema,
|
|
9
|
+
UserParticipantKindSchema,
|
|
10
|
+
} from "./schemas.js";
|
|
11
|
+
|
|
12
|
+
const IsoDateStringSchema = Type.String({ format: "date-time" });
|
|
13
|
+
|
|
14
|
+
export const ParticipantKindSchema = Type.Union([
|
|
15
|
+
UserParticipantKindSchema,
|
|
16
|
+
Type.Literal("device"),
|
|
17
|
+
Type.Literal("service"),
|
|
18
|
+
]);
|
|
19
|
+
export type ParticipantKind = StaticDecode<typeof ParticipantKindSchema>;
|
|
20
|
+
|
|
21
|
+
export const DigestSchema = Type.String({ pattern: "^[A-Za-z0-9_-]+$" });
|
|
22
|
+
|
|
23
|
+
export const OpenObjectSchema = Type.Unsafe<Record<string, unknown>>({
|
|
24
|
+
type: "object",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export const ServiceDeploymentSchema = Type.Unsafe<{
|
|
28
|
+
deploymentId: string;
|
|
29
|
+
namespaces: string[];
|
|
30
|
+
disabled: boolean;
|
|
31
|
+
}>(Type.Object({
|
|
32
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
33
|
+
namespaces: Type.Array(Type.String({ minLength: 1 })),
|
|
34
|
+
disabled: Type.Boolean(),
|
|
35
|
+
}));
|
|
36
|
+
|
|
37
|
+
export const ServiceInstanceSchema = Type.Object({
|
|
38
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
39
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
40
|
+
instanceKey: Type.String({ minLength: 1 }),
|
|
41
|
+
disabled: Type.Boolean(),
|
|
42
|
+
currentContractId: Type.Optional(Type.String({ minLength: 1 })),
|
|
43
|
+
currentContractDigest: Type.Optional(DigestSchema),
|
|
44
|
+
capabilities: Type.Array(Type.String()),
|
|
45
|
+
resourceBindings: Type.Optional(ContractResourceBindingsSchema),
|
|
46
|
+
createdAt: IsoDateStringSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export const ApprovalDecisionSchema = Type.Union([
|
|
50
|
+
Type.Literal("approved"),
|
|
51
|
+
Type.Literal("denied"),
|
|
52
|
+
]);
|
|
53
|
+
|
|
54
|
+
export const IdentityAnchorViewSchema = Type.Union([
|
|
55
|
+
Type.Object({
|
|
56
|
+
kind: Type.Literal("web"),
|
|
57
|
+
contractId: Type.String({ minLength: 1 }),
|
|
58
|
+
origin: Type.String({ minLength: 1 }),
|
|
59
|
+
}),
|
|
60
|
+
Type.Object({
|
|
61
|
+
kind: Type.Literal("cli"),
|
|
62
|
+
contractId: Type.String({ minLength: 1 }),
|
|
63
|
+
sessionPublicKey: Type.String({ minLength: 1 }),
|
|
64
|
+
}),
|
|
65
|
+
Type.Object({
|
|
66
|
+
kind: Type.Literal("native"),
|
|
67
|
+
contractId: Type.String({ minLength: 1 }),
|
|
68
|
+
sessionPublicKey: Type.String({ minLength: 1 }),
|
|
69
|
+
}),
|
|
70
|
+
Type.Object({
|
|
71
|
+
kind: Type.Literal("device-user"),
|
|
72
|
+
contractId: Type.String({ minLength: 1 }),
|
|
73
|
+
devicePublicKey: Type.String({ minLength: 1 }),
|
|
74
|
+
}),
|
|
75
|
+
]);
|
|
76
|
+
|
|
77
|
+
export const ContractEvidenceViewSchema = Type.Object({
|
|
78
|
+
contractDigest: DigestSchema,
|
|
79
|
+
contractId: Type.String({ minLength: 1 }),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const ApprovalEvidenceViewSchema = Type.Object({
|
|
83
|
+
contractDigest: DigestSchema,
|
|
84
|
+
contractId: Type.String({ minLength: 1 }),
|
|
85
|
+
displayName: Type.String({ minLength: 1 }),
|
|
86
|
+
description: Type.String({ minLength: 1 }),
|
|
87
|
+
capabilities: Type.Record(Type.String(), ContractApprovalCapabilitySchema),
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export const IdentityEnvelopeApprovalViewSchema = Type.Object({
|
|
91
|
+
identityEnvelopeId: Type.String({ minLength: 1 }),
|
|
92
|
+
identityAnchor: IdentityAnchorViewSchema,
|
|
93
|
+
contractEvidence: ContractEvidenceViewSchema,
|
|
94
|
+
displayName: Type.String({ minLength: 1 }),
|
|
95
|
+
description: Type.String({ minLength: 1 }),
|
|
96
|
+
capabilities: Type.Record(Type.String(), ContractApprovalCapabilitySchema),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
export const ApprovalRecordViewSchema = Type.Object({
|
|
100
|
+
user: Type.String({ minLength: 1 }),
|
|
101
|
+
answer: ApprovalDecisionSchema,
|
|
102
|
+
answeredAt: IsoDateStringSchema,
|
|
103
|
+
updatedAt: IsoDateStringSchema,
|
|
104
|
+
identityEnvelopeId: Type.String({ minLength: 1 }),
|
|
105
|
+
identityAnchor: IdentityAnchorViewSchema,
|
|
106
|
+
contractEvidence: ContractEvidenceViewSchema,
|
|
107
|
+
displayName: Type.String({ minLength: 1 }),
|
|
108
|
+
description: Type.String({ minLength: 1 }),
|
|
109
|
+
capabilities: Type.Record(Type.String(), ContractApprovalCapabilitySchema),
|
|
110
|
+
participantKind: UserParticipantKindSchema,
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export const DeploymentEnvelopeKindSchema = Type.Union([
|
|
114
|
+
Type.Literal("service"),
|
|
115
|
+
Type.Literal("device"),
|
|
116
|
+
Type.Literal("app"),
|
|
117
|
+
Type.Literal("cli"),
|
|
118
|
+
Type.Literal("native"),
|
|
119
|
+
Type.Literal("device-user"),
|
|
120
|
+
]);
|
|
121
|
+
export type DeploymentEnvelopeKind = StaticDecode<
|
|
122
|
+
typeof DeploymentEnvelopeKindSchema
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
export const EnvelopeSurfaceKindSchema = Type.Union([
|
|
126
|
+
Type.Literal("rpc"),
|
|
127
|
+
Type.Literal("operation"),
|
|
128
|
+
Type.Literal("event"),
|
|
129
|
+
Type.Literal("feed"),
|
|
130
|
+
]);
|
|
131
|
+
export type EnvelopeSurfaceKind = StaticDecode<
|
|
132
|
+
typeof EnvelopeSurfaceKindSchema
|
|
133
|
+
>;
|
|
134
|
+
|
|
135
|
+
export const EnvelopeSurfaceActionSchema = Type.Union([
|
|
136
|
+
Type.Literal("call"),
|
|
137
|
+
Type.Literal("publish"),
|
|
138
|
+
Type.Literal("subscribe"),
|
|
139
|
+
Type.Literal("read"),
|
|
140
|
+
Type.Literal("cancel"),
|
|
141
|
+
]);
|
|
142
|
+
export type EnvelopeSurfaceAction = StaticDecode<
|
|
143
|
+
typeof EnvelopeSurfaceActionSchema
|
|
144
|
+
>;
|
|
145
|
+
|
|
146
|
+
export const EnvelopeResourceKindSchema = Type.Union([
|
|
147
|
+
Type.Literal("kv"),
|
|
148
|
+
Type.Literal("store"),
|
|
149
|
+
Type.Literal("jobs"),
|
|
150
|
+
Type.Literal("transfer"),
|
|
151
|
+
]);
|
|
152
|
+
export type EnvelopeResourceKind = StaticDecode<
|
|
153
|
+
typeof EnvelopeResourceKindSchema
|
|
154
|
+
>;
|
|
155
|
+
|
|
156
|
+
export const EnvelopeBoundaryContractSchema = Type.Object({
|
|
157
|
+
contractId: Type.String({ minLength: 1 }),
|
|
158
|
+
required: Type.Boolean(),
|
|
159
|
+
});
|
|
160
|
+
export type EnvelopeBoundaryContract = StaticDecode<
|
|
161
|
+
typeof EnvelopeBoundaryContractSchema
|
|
162
|
+
>;
|
|
163
|
+
|
|
164
|
+
export const EnvelopeBoundarySurfaceSchema = Type.Object({
|
|
165
|
+
contractId: Type.String({ minLength: 1 }),
|
|
166
|
+
kind: EnvelopeSurfaceKindSchema,
|
|
167
|
+
name: Type.String({ minLength: 1 }),
|
|
168
|
+
action: EnvelopeSurfaceActionSchema,
|
|
169
|
+
required: Type.Boolean(),
|
|
170
|
+
});
|
|
171
|
+
export type EnvelopeBoundarySurface = StaticDecode<
|
|
172
|
+
typeof EnvelopeBoundarySurfaceSchema
|
|
173
|
+
>;
|
|
174
|
+
|
|
175
|
+
export const EnvelopeBoundaryResourceSchema = Type.Object({
|
|
176
|
+
kind: EnvelopeResourceKindSchema,
|
|
177
|
+
alias: Type.String({ minLength: 1 }),
|
|
178
|
+
required: Type.Boolean(),
|
|
179
|
+
});
|
|
180
|
+
export type EnvelopeBoundaryResource = StaticDecode<
|
|
181
|
+
typeof EnvelopeBoundaryResourceSchema
|
|
182
|
+
>;
|
|
183
|
+
|
|
184
|
+
export const EnvelopeBoundarySchema = Type.Object({
|
|
185
|
+
contracts: Type.Array(EnvelopeBoundaryContractSchema),
|
|
186
|
+
surfaces: Type.Array(EnvelopeBoundarySurfaceSchema),
|
|
187
|
+
capabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
188
|
+
resources: Type.Array(EnvelopeBoundaryResourceSchema),
|
|
189
|
+
});
|
|
190
|
+
export type EnvelopeBoundary = StaticDecode<typeof EnvelopeBoundarySchema>;
|
|
191
|
+
|
|
192
|
+
export const DeploymentEnvelopeSchema = Type.Object({
|
|
193
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
194
|
+
kind: DeploymentEnvelopeKindSchema,
|
|
195
|
+
disabled: Type.Boolean(),
|
|
196
|
+
createdAt: IsoDateStringSchema,
|
|
197
|
+
updatedAt: IsoDateStringSchema,
|
|
198
|
+
boundary: EnvelopeBoundarySchema,
|
|
199
|
+
});
|
|
200
|
+
export type DeploymentEnvelope = StaticDecode<typeof DeploymentEnvelopeSchema>;
|
|
201
|
+
|
|
202
|
+
export const DeploymentResourceBindingSchema = Type.Object({
|
|
203
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
204
|
+
kind: EnvelopeResourceKindSchema,
|
|
205
|
+
alias: Type.String({ minLength: 1 }),
|
|
206
|
+
binding: Type.Record(Type.String(), Type.Unknown()),
|
|
207
|
+
limits: Type.Union([Type.Record(Type.String(), Type.Unknown()), Type.Null()]),
|
|
208
|
+
createdAt: IsoDateStringSchema,
|
|
209
|
+
updatedAt: IsoDateStringSchema,
|
|
210
|
+
});
|
|
211
|
+
export type DeploymentResourceBinding = StaticDecode<
|
|
212
|
+
typeof DeploymentResourceBindingSchema
|
|
213
|
+
>;
|
|
214
|
+
|
|
215
|
+
export const DeploymentContractEvidenceSchema = Type.Object({
|
|
216
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
217
|
+
contractId: Type.String({ minLength: 1 }),
|
|
218
|
+
contractDigest: DigestSchema,
|
|
219
|
+
contract: OpenObjectSchema,
|
|
220
|
+
firstSeenAt: IsoDateStringSchema,
|
|
221
|
+
lastSeenAt: IsoDateStringSchema,
|
|
222
|
+
ignoredAt: Type.Optional(Type.Union([IsoDateStringSchema, Type.Null()])),
|
|
223
|
+
ignoredBy: Type.Optional(
|
|
224
|
+
Type.Union([Type.Record(Type.String(), Type.Unknown()), Type.Null()]),
|
|
225
|
+
),
|
|
226
|
+
ignoreReason: Type.Optional(
|
|
227
|
+
Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
228
|
+
),
|
|
229
|
+
});
|
|
230
|
+
export type DeploymentContractEvidence = StaticDecode<
|
|
231
|
+
typeof DeploymentContractEvidenceSchema
|
|
232
|
+
>;
|
|
233
|
+
|
|
234
|
+
export const DeploymentPortalRouteSchema = Type.Object({
|
|
235
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
236
|
+
portalId: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
237
|
+
entryUrl: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
238
|
+
disabled: Type.Boolean(),
|
|
239
|
+
updatedAt: IsoDateStringSchema,
|
|
240
|
+
});
|
|
241
|
+
export type DeploymentPortalRoute = StaticDecode<
|
|
242
|
+
typeof DeploymentPortalRouteSchema
|
|
243
|
+
>;
|
|
244
|
+
|
|
245
|
+
export const DeploymentGrantOverrideSchema = Type.Union([
|
|
246
|
+
Type.Object({
|
|
247
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
248
|
+
identityKind: Type.Literal("web"),
|
|
249
|
+
grantKind: Type.Literal("capability"),
|
|
250
|
+
contractId: Type.String({ minLength: 1 }),
|
|
251
|
+
origin: Type.String({ minLength: 1 }),
|
|
252
|
+
sessionPublicKey: Type.Null(),
|
|
253
|
+
capability: Type.String({ minLength: 1 }),
|
|
254
|
+
capabilityGroupKey: Type.Null(),
|
|
255
|
+
}),
|
|
256
|
+
Type.Object({
|
|
257
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
258
|
+
identityKind: Type.Literal("web"),
|
|
259
|
+
grantKind: Type.Literal("capability-group"),
|
|
260
|
+
contractId: Type.String({ minLength: 1 }),
|
|
261
|
+
origin: Type.String({ minLength: 1 }),
|
|
262
|
+
sessionPublicKey: Type.Null(),
|
|
263
|
+
capability: Type.Null(),
|
|
264
|
+
capabilityGroupKey: Type.String({ minLength: 1 }),
|
|
265
|
+
}),
|
|
266
|
+
Type.Object({
|
|
267
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
268
|
+
identityKind: Type.Literal("session"),
|
|
269
|
+
grantKind: Type.Literal("capability"),
|
|
270
|
+
contractId: Type.String({ minLength: 1 }),
|
|
271
|
+
origin: Type.Null(),
|
|
272
|
+
sessionPublicKey: Type.String({ minLength: 1 }),
|
|
273
|
+
capability: Type.String({ minLength: 1 }),
|
|
274
|
+
capabilityGroupKey: Type.Null(),
|
|
275
|
+
}),
|
|
276
|
+
Type.Object({
|
|
277
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
278
|
+
identityKind: Type.Literal("session"),
|
|
279
|
+
grantKind: Type.Literal("capability-group"),
|
|
280
|
+
contractId: Type.String({ minLength: 1 }),
|
|
281
|
+
origin: Type.Null(),
|
|
282
|
+
sessionPublicKey: Type.String({ minLength: 1 }),
|
|
283
|
+
capability: Type.Null(),
|
|
284
|
+
capabilityGroupKey: Type.String({ minLength: 1 }),
|
|
285
|
+
}),
|
|
286
|
+
]);
|
|
287
|
+
export type DeploymentGrantOverride = StaticDecode<
|
|
288
|
+
typeof DeploymentGrantOverrideSchema
|
|
289
|
+
>;
|
|
290
|
+
|
|
291
|
+
export const EnvelopeExpansionRequestSchema = Type.Object({
|
|
292
|
+
requestId: Type.String({ minLength: 1 }),
|
|
293
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
294
|
+
requestedByKind: Type.Union([
|
|
295
|
+
Type.Literal("service"),
|
|
296
|
+
Type.Literal("device"),
|
|
297
|
+
Type.Literal("user"),
|
|
298
|
+
Type.Literal("admin"),
|
|
299
|
+
Type.Literal("automation"),
|
|
300
|
+
]),
|
|
301
|
+
requestedBy: Type.Record(Type.String(), Type.Unknown()),
|
|
302
|
+
contractId: Type.String({ minLength: 1 }),
|
|
303
|
+
contractDigest: DigestSchema,
|
|
304
|
+
contract: OpenObjectSchema,
|
|
305
|
+
state: Type.Union([
|
|
306
|
+
Type.Literal("pending"),
|
|
307
|
+
Type.Literal("approved"),
|
|
308
|
+
Type.Literal("rejected"),
|
|
309
|
+
]),
|
|
310
|
+
createdAt: IsoDateStringSchema,
|
|
311
|
+
decidedAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
312
|
+
decidedBy: Type.Union([
|
|
313
|
+
Type.Record(Type.String(), Type.Unknown()),
|
|
314
|
+
Type.Null(),
|
|
315
|
+
]),
|
|
316
|
+
decisionReason: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
317
|
+
delta: EnvelopeBoundarySchema,
|
|
318
|
+
});
|
|
319
|
+
export type EnvelopeExpansionRequest = StaticDecode<
|
|
320
|
+
typeof EnvelopeExpansionRequestSchema
|
|
321
|
+
>;
|
|
322
|
+
|
|
323
|
+
export const AuthEnvelopesListSchema = Type.Object({
|
|
324
|
+
kind: Type.Optional(DeploymentEnvelopeKindSchema),
|
|
325
|
+
disabled: Type.Optional(Type.Boolean()),
|
|
326
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
327
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
328
|
+
});
|
|
329
|
+
export type AuthEnvelopesListInput = StaticDecode<
|
|
330
|
+
typeof AuthEnvelopesListSchema
|
|
331
|
+
>;
|
|
332
|
+
|
|
333
|
+
export const AuthEnvelopesListResponseSchema = Type.Object({
|
|
334
|
+
...PageResponseSchema(DeploymentEnvelopeSchema).properties,
|
|
335
|
+
});
|
|
336
|
+
export type AuthEnvelopesListResponse = StaticDecode<
|
|
337
|
+
typeof AuthEnvelopesListResponseSchema
|
|
338
|
+
>;
|
|
339
|
+
|
|
340
|
+
export const AuthEnvelopesGetSchema = Type.Object({
|
|
341
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
342
|
+
});
|
|
343
|
+
export type AuthEnvelopesGetInput = StaticDecode<typeof AuthEnvelopesGetSchema>;
|
|
344
|
+
|
|
345
|
+
export const AuthEnvelopesGetResponseSchema = Type.Object({
|
|
346
|
+
envelope: DeploymentEnvelopeSchema,
|
|
347
|
+
resourceBindings: Type.Array(DeploymentResourceBindingSchema),
|
|
348
|
+
contractEvidence: Type.Array(DeploymentContractEvidenceSchema),
|
|
349
|
+
expansionRequests: Type.Array(EnvelopeExpansionRequestSchema),
|
|
350
|
+
portalRoute: Type.Union([DeploymentPortalRouteSchema, Type.Null()]),
|
|
351
|
+
grantOverrides: Type.Array(DeploymentGrantOverrideSchema),
|
|
352
|
+
});
|
|
353
|
+
export type AuthEnvelopesGetResponse = StaticDecode<
|
|
354
|
+
typeof AuthEnvelopesGetResponseSchema
|
|
355
|
+
>;
|
|
356
|
+
|
|
357
|
+
export const AuthEnvelopesGrantOverridesPutSchema = Type.Object({
|
|
358
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
359
|
+
overrides: Type.Array(DeploymentGrantOverrideSchema),
|
|
360
|
+
});
|
|
361
|
+
export type AuthEnvelopesGrantOverridesPutInput = StaticDecode<
|
|
362
|
+
typeof AuthEnvelopesGrantOverridesPutSchema
|
|
363
|
+
>;
|
|
364
|
+
|
|
365
|
+
export const AuthEnvelopesGrantOverridesListSchema = Type.Object({
|
|
366
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
367
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
368
|
+
});
|
|
369
|
+
export type AuthEnvelopesGrantOverridesListInput = StaticDecode<
|
|
370
|
+
typeof AuthEnvelopesGrantOverridesListSchema
|
|
371
|
+
>;
|
|
372
|
+
|
|
373
|
+
export const AuthEnvelopesGrantOverridesListResponseSchema = Type.Object({
|
|
374
|
+
...PageResponseSchema(DeploymentGrantOverrideSchema).properties,
|
|
375
|
+
});
|
|
376
|
+
export type AuthEnvelopesGrantOverridesListResponse = StaticDecode<
|
|
377
|
+
typeof AuthEnvelopesGrantOverridesListResponseSchema
|
|
378
|
+
>;
|
|
379
|
+
|
|
380
|
+
export const AuthEnvelopesGrantOverridesResponseSchema = Type.Object({
|
|
381
|
+
grantOverrides: Type.Array(DeploymentGrantOverrideSchema),
|
|
382
|
+
});
|
|
383
|
+
export type AuthEnvelopesGrantOverridesResponse = StaticDecode<
|
|
384
|
+
typeof AuthEnvelopesGrantOverridesResponseSchema
|
|
385
|
+
>;
|
|
386
|
+
|
|
387
|
+
export const AuthEnvelopesGrantOverridesRemoveSchema = Type.Object({
|
|
388
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
389
|
+
overrides: Type.Array(DeploymentGrantOverrideSchema),
|
|
390
|
+
});
|
|
391
|
+
export type AuthEnvelopesGrantOverridesRemoveInput = StaticDecode<
|
|
392
|
+
typeof AuthEnvelopesGrantOverridesRemoveSchema
|
|
393
|
+
>;
|
|
394
|
+
|
|
395
|
+
export const AuthEnvelopesExpandSchema = Type.Object({
|
|
396
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
397
|
+
contract: OpenObjectSchema,
|
|
398
|
+
expectedDigest: DigestSchema,
|
|
399
|
+
});
|
|
400
|
+
export type AuthEnvelopesExpandInput = StaticDecode<
|
|
401
|
+
typeof AuthEnvelopesExpandSchema
|
|
402
|
+
>;
|
|
403
|
+
|
|
404
|
+
export const AuthEnvelopesExpandResponseSchema = Type.Object({
|
|
405
|
+
envelope: DeploymentEnvelopeSchema,
|
|
406
|
+
delta: EnvelopeBoundarySchema,
|
|
407
|
+
contractEvidence: DeploymentContractEvidenceSchema,
|
|
408
|
+
resourceBindings: Type.Array(DeploymentResourceBindingSchema),
|
|
409
|
+
});
|
|
410
|
+
export type AuthEnvelopesExpandResponse = StaticDecode<
|
|
411
|
+
typeof AuthEnvelopesExpandResponseSchema
|
|
412
|
+
>;
|
|
413
|
+
|
|
414
|
+
export const AuthEnvelopesApproveRequestSchema = Type.Object({
|
|
415
|
+
requestId: Type.String({ minLength: 1 }),
|
|
416
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
417
|
+
});
|
|
418
|
+
export type AuthEnvelopesApproveRequestInput = StaticDecode<
|
|
419
|
+
typeof AuthEnvelopesApproveRequestSchema
|
|
420
|
+
>;
|
|
421
|
+
|
|
422
|
+
export const AuthEnvelopesApproveRequestResponseSchema = Type.Object({
|
|
423
|
+
request: EnvelopeExpansionRequestSchema,
|
|
424
|
+
envelope: DeploymentEnvelopeSchema,
|
|
425
|
+
delta: EnvelopeBoundarySchema,
|
|
426
|
+
contractEvidence: DeploymentContractEvidenceSchema,
|
|
427
|
+
resourceBindings: Type.Array(DeploymentResourceBindingSchema),
|
|
428
|
+
});
|
|
429
|
+
export type AuthEnvelopesApproveRequestResponse = StaticDecode<
|
|
430
|
+
typeof AuthEnvelopesApproveRequestResponseSchema
|
|
431
|
+
>;
|
|
432
|
+
|
|
433
|
+
export const AuthEnvelopeExpansionsListSchema = Type.Object({
|
|
434
|
+
deploymentId: Type.Optional(Type.String({ minLength: 1 })),
|
|
435
|
+
state: Type.Optional(Type.Union([
|
|
436
|
+
Type.Literal("pending"),
|
|
437
|
+
Type.Literal("approved"),
|
|
438
|
+
Type.Literal("rejected"),
|
|
439
|
+
])),
|
|
440
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
441
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
442
|
+
});
|
|
443
|
+
export type AuthEnvelopeExpansionsListInput = StaticDecode<
|
|
444
|
+
typeof AuthEnvelopeExpansionsListSchema
|
|
445
|
+
>;
|
|
446
|
+
|
|
447
|
+
export const AuthEnvelopeExpansionsListResponseSchema = Type.Object({
|
|
448
|
+
...PageResponseSchema(EnvelopeExpansionRequestSchema).properties,
|
|
449
|
+
});
|
|
450
|
+
export type AuthEnvelopeExpansionsListResponse = StaticDecode<
|
|
451
|
+
typeof AuthEnvelopeExpansionsListResponseSchema
|
|
452
|
+
>;
|
|
453
|
+
|
|
454
|
+
export const AuthEnvelopeExpansionsRejectSchema = Type.Object({
|
|
455
|
+
requestId: Type.String({ minLength: 1 }),
|
|
456
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
457
|
+
});
|
|
458
|
+
export type AuthEnvelopeExpansionsRejectInput = StaticDecode<
|
|
459
|
+
typeof AuthEnvelopeExpansionsRejectSchema
|
|
460
|
+
>;
|
|
461
|
+
|
|
462
|
+
export const AuthEnvelopeExpansionsRejectResponseSchema = Type.Object({
|
|
463
|
+
request: EnvelopeExpansionRequestSchema,
|
|
464
|
+
});
|
|
465
|
+
export type AuthEnvelopeExpansionsRejectResponse = StaticDecode<
|
|
466
|
+
typeof AuthEnvelopeExpansionsRejectResponseSchema
|
|
467
|
+
>;
|
|
468
|
+
|
|
469
|
+
export const AuthEnvelopeShrinkResourceSchema = Type.Object({
|
|
470
|
+
kind: EnvelopeResourceKindSchema,
|
|
471
|
+
alias: Type.String({ minLength: 1 }),
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
export const AuthEnvelopeShrinkMissingBoundarySchema = Type.Object({
|
|
475
|
+
missing: EnvelopeBoundarySchema,
|
|
476
|
+
});
|
|
477
|
+
|
|
478
|
+
export const AuthEnvelopeShrinkImpactedSessionSchema = Type.Object({
|
|
479
|
+
sessionKey: Type.String({ minLength: 1 }),
|
|
480
|
+
type: ParticipantKindSchema,
|
|
481
|
+
contractId: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
482
|
+
contractDigest: Type.Union([DigestSchema, Type.Null()]),
|
|
483
|
+
missing: EnvelopeBoundarySchema,
|
|
484
|
+
});
|
|
485
|
+
|
|
486
|
+
export const AuthEnvelopeShrinkImpactedIdentityEnvelopeSchema = Type.Object({
|
|
487
|
+
identityEnvelopeId: Type.String({ minLength: 1 }),
|
|
488
|
+
identityAnchor: IdentityAnchorViewSchema,
|
|
489
|
+
missing: EnvelopeBoundarySchema,
|
|
490
|
+
});
|
|
491
|
+
|
|
492
|
+
export const AuthEnvelopeShrinkImpactedRequestSchema = Type.Object({
|
|
493
|
+
requestId: Type.String({ minLength: 1 }),
|
|
494
|
+
missing: EnvelopeBoundarySchema,
|
|
495
|
+
});
|
|
496
|
+
|
|
497
|
+
export const AuthEnvelopeChangeImpactSchema = Type.Object({
|
|
498
|
+
removed: EnvelopeBoundarySchema,
|
|
499
|
+
impactedSessions: Type.Array(AuthEnvelopeShrinkImpactedSessionSchema),
|
|
500
|
+
impactedServiceInstances: Type.Array(AuthEnvelopeShrinkMissingBoundarySchema),
|
|
501
|
+
impactedDeviceSessions: Type.Array(AuthEnvelopeShrinkImpactedSessionSchema),
|
|
502
|
+
impactedIdentityEnvelopes: Type.Array(
|
|
503
|
+
AuthEnvelopeShrinkImpactedIdentityEnvelopeSchema,
|
|
504
|
+
),
|
|
505
|
+
impactedPendingRequests: Type.Array(AuthEnvelopeShrinkImpactedRequestSchema),
|
|
506
|
+
orphanedResources: Type.Array(AuthEnvelopeShrinkResourceSchema),
|
|
507
|
+
});
|
|
508
|
+
export type AuthEnvelopeChangeImpact = StaticDecode<
|
|
509
|
+
typeof AuthEnvelopeChangeImpactSchema
|
|
510
|
+
>;
|
|
511
|
+
|
|
512
|
+
export const AuthEnvelopesChangesPreviewSchema = Type.Object({
|
|
513
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
514
|
+
proposedBoundary: EnvelopeBoundarySchema,
|
|
515
|
+
});
|
|
516
|
+
export type AuthEnvelopesChangesPreviewInput = StaticDecode<
|
|
517
|
+
typeof AuthEnvelopesChangesPreviewSchema
|
|
518
|
+
>;
|
|
519
|
+
|
|
520
|
+
export const AuthEnvelopesChangesPreviewResponseSchema = Type.Object({
|
|
521
|
+
current: DeploymentEnvelopeSchema,
|
|
522
|
+
proposed: DeploymentEnvelopeSchema,
|
|
523
|
+
impact: AuthEnvelopeChangeImpactSchema,
|
|
524
|
+
});
|
|
525
|
+
export type AuthEnvelopesChangesPreviewResponse = StaticDecode<
|
|
526
|
+
typeof AuthEnvelopesChangesPreviewResponseSchema
|
|
527
|
+
>;
|
|
528
|
+
|
|
529
|
+
export const AuthEnvelopesShrinkSchema = Type.Object({
|
|
530
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
531
|
+
proposedBoundary: EnvelopeBoundarySchema,
|
|
532
|
+
confirm: Type.Boolean(),
|
|
533
|
+
});
|
|
534
|
+
export type AuthEnvelopesShrinkInput = StaticDecode<
|
|
535
|
+
typeof AuthEnvelopesShrinkSchema
|
|
536
|
+
>;
|
|
537
|
+
|
|
538
|
+
export const AuthEnvelopesShrinkResponseSchema = Type.Object({
|
|
539
|
+
envelope: DeploymentEnvelopeSchema,
|
|
540
|
+
impact: AuthEnvelopeChangeImpactSchema,
|
|
541
|
+
retainedResources: Type.Array(AuthEnvelopeShrinkResourceSchema),
|
|
542
|
+
});
|
|
543
|
+
export type AuthEnvelopesShrinkResponse = StaticDecode<
|
|
544
|
+
typeof AuthEnvelopesShrinkResponseSchema
|
|
545
|
+
>;
|
|
546
|
+
|
|
547
|
+
export const AuthServiceInstancesProvisionSchema = Type.Object({
|
|
548
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
549
|
+
instanceKey: Type.String({ minLength: 1 }),
|
|
550
|
+
});
|
|
551
|
+
export const AuthServiceInstancesProvisionResponseSchema = Type.Object({
|
|
552
|
+
instance: ServiceInstanceSchema,
|
|
553
|
+
});
|
|
554
|
+
|
|
555
|
+
export const AuthServiceInstancesListSchema = Type.Object({
|
|
556
|
+
deploymentId: Type.Optional(Type.String({ minLength: 1 })),
|
|
557
|
+
disabled: Type.Optional(Type.Boolean()),
|
|
558
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
559
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
560
|
+
});
|
|
561
|
+
export const AuthServiceInstancesListResponseSchema = Type.Object({
|
|
562
|
+
...PageResponseSchema(ServiceInstanceSchema).properties,
|
|
563
|
+
});
|
|
564
|
+
|
|
565
|
+
export const AuthServiceInstancesDisableSchema = Type.Object({
|
|
566
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
567
|
+
});
|
|
568
|
+
export const AuthServiceInstancesDisableResponseSchema = Type.Object({
|
|
569
|
+
instance: ServiceInstanceSchema,
|
|
570
|
+
});
|
|
571
|
+
|
|
572
|
+
export const AuthServiceInstancesEnableSchema = Type.Object({
|
|
573
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
574
|
+
});
|
|
575
|
+
export const AuthServiceInstancesEnableResponseSchema = Type.Object({
|
|
576
|
+
instance: ServiceInstanceSchema,
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
export const AuthServiceInstancesRemoveSchema = Type.Object({
|
|
580
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
581
|
+
});
|
|
582
|
+
export const AuthServiceInstancesRemoveResponseSchema = Type.Object({
|
|
583
|
+
success: Type.Boolean(),
|
|
584
|
+
});
|
|
585
|
+
|
|
586
|
+
export const ContractAnalysisSummarySchema = Type.Object({
|
|
587
|
+
namespaces: Type.Array(Type.String()),
|
|
588
|
+
rpcMethods: Type.Number(),
|
|
589
|
+
operations: Type.Number(),
|
|
590
|
+
operationControls: Type.Number(),
|
|
591
|
+
events: Type.Number(),
|
|
592
|
+
natsPublish: Type.Number(),
|
|
593
|
+
natsSubscribe: Type.Number(),
|
|
594
|
+
kvResources: Type.Number(),
|
|
595
|
+
storeResources: Type.Number(),
|
|
596
|
+
jobsQueues: Type.Number(),
|
|
597
|
+
});
|
|
598
|
+
|
|
599
|
+
export const ContractAnalysisKvResourceSchema = Type.Object({
|
|
600
|
+
alias: Type.String({ minLength: 1 }),
|
|
601
|
+
purpose: Type.String({ minLength: 1 }),
|
|
602
|
+
required: Type.Boolean(),
|
|
603
|
+
history: Type.Number(),
|
|
604
|
+
ttlMs: Type.Number(),
|
|
605
|
+
maxValueBytes: Type.Optional(Type.Number()),
|
|
606
|
+
});
|
|
607
|
+
|
|
608
|
+
export const ContractAnalysisStoreResourceSchema = Type.Object({
|
|
609
|
+
alias: Type.String({ minLength: 1 }),
|
|
610
|
+
purpose: Type.String({ minLength: 1 }),
|
|
611
|
+
required: Type.Boolean(),
|
|
612
|
+
ttlMs: Type.Number(),
|
|
613
|
+
maxObjectBytes: Type.Optional(Type.Number()),
|
|
614
|
+
maxTotalBytes: Type.Optional(Type.Number()),
|
|
615
|
+
});
|
|
616
|
+
|
|
617
|
+
export const ContractAnalysisJobsQueueSchema = Type.Object({
|
|
618
|
+
queueType: Type.String({ minLength: 1 }),
|
|
619
|
+
payload: Type.Object({ schema: Type.String({ minLength: 1 }) }),
|
|
620
|
+
result: Type.Optional(
|
|
621
|
+
Type.Object({ schema: Type.String({ minLength: 1 }) }),
|
|
622
|
+
),
|
|
623
|
+
maxDeliver: Type.Number(),
|
|
624
|
+
backoffMs: Type.Array(Type.Number()),
|
|
625
|
+
ackWaitMs: Type.Number(),
|
|
626
|
+
defaultDeadlineMs: Type.Optional(Type.Number()),
|
|
627
|
+
progress: Type.Boolean(),
|
|
628
|
+
logs: Type.Boolean(),
|
|
629
|
+
dlq: Type.Boolean(),
|
|
630
|
+
concurrency: Type.Number(),
|
|
631
|
+
});
|
|
632
|
+
|
|
633
|
+
export const ContractAnalysisRpcMethodSchema = Type.Object({
|
|
634
|
+
key: Type.String(),
|
|
635
|
+
subject: Type.String(),
|
|
636
|
+
wildcardSubject: Type.String(),
|
|
637
|
+
callerCapabilities: Type.Array(Type.String()),
|
|
638
|
+
});
|
|
639
|
+
|
|
640
|
+
export const ContractAnalysisOperationSchema = Type.Object({
|
|
641
|
+
key: Type.String(),
|
|
642
|
+
subject: Type.String(),
|
|
643
|
+
wildcardSubject: Type.String(),
|
|
644
|
+
controlSubject: Type.String(),
|
|
645
|
+
wildcardControlSubject: Type.String(),
|
|
646
|
+
callCapabilities: Type.Array(Type.String()),
|
|
647
|
+
readCapabilities: Type.Array(Type.String()),
|
|
648
|
+
cancelCapabilities: Type.Array(Type.String()),
|
|
649
|
+
cancel: Type.Boolean(),
|
|
650
|
+
});
|
|
651
|
+
|
|
652
|
+
export const ContractAnalysisOperationControlSchema = Type.Object({
|
|
653
|
+
key: Type.String(),
|
|
654
|
+
action: Type.Union([
|
|
655
|
+
Type.Literal("get"),
|
|
656
|
+
Type.Literal("wait"),
|
|
657
|
+
Type.Literal("watch"),
|
|
658
|
+
Type.Literal("cancel"),
|
|
659
|
+
]),
|
|
660
|
+
subject: Type.String(),
|
|
661
|
+
wildcardSubject: Type.String(),
|
|
662
|
+
requiredCapabilities: Type.Array(Type.String()),
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
export const ContractAnalysisEventSchema = Type.Object({
|
|
666
|
+
key: Type.String(),
|
|
667
|
+
subject: Type.String(),
|
|
668
|
+
wildcardSubject: Type.String(),
|
|
669
|
+
publishCapabilities: Type.Array(Type.String()),
|
|
670
|
+
subscribeCapabilities: Type.Array(Type.String()),
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
export const ContractAnalysisSubjectSchema = Type.Object({
|
|
674
|
+
key: Type.String(),
|
|
675
|
+
subject: Type.String(),
|
|
676
|
+
publishCapabilities: Type.Array(Type.String()),
|
|
677
|
+
subscribeCapabilities: Type.Array(Type.String()),
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
export const ContractAnalysisNatsRuleSchema = Type.Object({
|
|
681
|
+
kind: Type.String(),
|
|
682
|
+
subject: Type.String(),
|
|
683
|
+
wildcardSubject: Type.String(),
|
|
684
|
+
requiredCapabilities: Type.Array(Type.String()),
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
export const ContractAnalysisSchema = Type.Object({
|
|
688
|
+
namespaces: Type.Array(Type.String()),
|
|
689
|
+
rpc: Type.Object({ methods: Type.Array(ContractAnalysisRpcMethodSchema) }),
|
|
690
|
+
operations: Type.Object({
|
|
691
|
+
operations: Type.Array(ContractAnalysisOperationSchema),
|
|
692
|
+
control: Type.Array(ContractAnalysisOperationControlSchema),
|
|
693
|
+
}),
|
|
694
|
+
events: Type.Object({ events: Type.Array(ContractAnalysisEventSchema) }),
|
|
695
|
+
subjects: Type.Optional(
|
|
696
|
+
Type.Object({ subjects: Type.Array(ContractAnalysisSubjectSchema) }),
|
|
697
|
+
),
|
|
698
|
+
nats: Type.Object({
|
|
699
|
+
publish: Type.Array(ContractAnalysisNatsRuleSchema),
|
|
700
|
+
subscribe: Type.Array(ContractAnalysisNatsRuleSchema),
|
|
701
|
+
}),
|
|
702
|
+
resources: Type.Object({
|
|
703
|
+
kv: Type.Array(ContractAnalysisKvResourceSchema),
|
|
704
|
+
store: Type.Array(ContractAnalysisStoreResourceSchema),
|
|
705
|
+
jobs: Type.Array(ContractAnalysisJobsQueueSchema),
|
|
706
|
+
}),
|
|
707
|
+
});
|
|
708
|
+
|
|
709
|
+
export const AuthenticatedUserSchema = Type.Object({
|
|
710
|
+
userId: Type.String({ minLength: 1 }),
|
|
711
|
+
active: Type.Boolean(),
|
|
712
|
+
name: Type.String(),
|
|
713
|
+
email: Type.String(),
|
|
714
|
+
image: Type.Optional(Type.String()),
|
|
715
|
+
capabilities: Type.Array(Type.String()),
|
|
716
|
+
identity: Type.Object({
|
|
717
|
+
identityId: Type.String({ minLength: 1 }),
|
|
718
|
+
provider: Type.String({ minLength: 1 }),
|
|
719
|
+
subject: Type.String({ minLength: 1 }),
|
|
720
|
+
}),
|
|
721
|
+
lastLogin: Type.Optional(IsoDateStringSchema),
|
|
722
|
+
});
|
|
723
|
+
export type AuthenticatedUser = StaticDecode<typeof AuthenticatedUserSchema>;
|
|
724
|
+
|
|
725
|
+
export const AuthSessionsMeSchema = Type.Object({});
|
|
726
|
+
|
|
727
|
+
export const AuthRequestsValidateSchema = Type.Object({
|
|
728
|
+
sessionKey: Type.String({ minLength: 1 }),
|
|
729
|
+
proof: Type.String({ minLength: 1 }),
|
|
730
|
+
subject: Type.String({ minLength: 1 }),
|
|
731
|
+
payloadHash: Type.String({ minLength: 1 }),
|
|
732
|
+
iat: Type.Integer(),
|
|
733
|
+
requestId: Type.String({ minLength: 1 }),
|
|
734
|
+
capabilities: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
735
|
+
});
|
|
736
|
+
export const AuthenticatedServiceSchema = Type.Object({
|
|
737
|
+
type: Type.Literal("service"),
|
|
738
|
+
id: Type.String(),
|
|
739
|
+
name: Type.String(),
|
|
740
|
+
active: Type.Boolean(),
|
|
741
|
+
capabilities: Type.Array(Type.String()),
|
|
742
|
+
});
|
|
743
|
+
export type AuthenticatedService = StaticDecode<
|
|
744
|
+
typeof AuthenticatedServiceSchema
|
|
745
|
+
>;
|
|
746
|
+
|
|
747
|
+
export const AuthenticatedDeviceSchema = Type.Object({
|
|
748
|
+
type: Type.Literal("device"),
|
|
749
|
+
deviceId: Type.String({ minLength: 1 }),
|
|
750
|
+
deviceType: Type.String({ minLength: 1 }),
|
|
751
|
+
runtimePublicKey: Type.String({ minLength: 1 }),
|
|
752
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
753
|
+
active: Type.Boolean(),
|
|
754
|
+
capabilities: Type.Array(Type.String()),
|
|
755
|
+
});
|
|
756
|
+
export type AuthenticatedDevice = StaticDecode<
|
|
757
|
+
typeof AuthenticatedDeviceSchema
|
|
758
|
+
>;
|
|
759
|
+
|
|
760
|
+
const NullableAuthenticatedUserSchema = Type.Union([
|
|
761
|
+
AuthenticatedUserSchema,
|
|
762
|
+
Type.Null(),
|
|
763
|
+
]);
|
|
764
|
+
|
|
765
|
+
const NullableAuthenticatedDeviceSchema = Type.Union([
|
|
766
|
+
AuthenticatedDeviceSchema,
|
|
767
|
+
Type.Null(),
|
|
768
|
+
]);
|
|
769
|
+
|
|
770
|
+
const NullableAuthenticatedServiceSchema = Type.Union([
|
|
771
|
+
AuthenticatedServiceSchema,
|
|
772
|
+
Type.Null(),
|
|
773
|
+
]);
|
|
774
|
+
|
|
775
|
+
export const AuthSessionsMeResponseSchema = Type.Object({
|
|
776
|
+
participantKind: ParticipantKindSchema,
|
|
777
|
+
user: NullableAuthenticatedUserSchema,
|
|
778
|
+
device: NullableAuthenticatedDeviceSchema,
|
|
779
|
+
service: NullableAuthenticatedServiceSchema,
|
|
780
|
+
});
|
|
781
|
+
export type AuthSessionsMeResponse = StaticDecode<
|
|
782
|
+
typeof AuthSessionsMeResponseSchema
|
|
783
|
+
>;
|
|
784
|
+
|
|
785
|
+
export const CallerViewSchema = Type.Union([
|
|
786
|
+
Type.Object({
|
|
787
|
+
type: Type.Literal("user"),
|
|
788
|
+
participantKind: UserParticipantKindSchema,
|
|
789
|
+
userId: Type.String({ minLength: 1 }),
|
|
790
|
+
identity: Type.Object({
|
|
791
|
+
identityId: Type.String({ minLength: 1 }),
|
|
792
|
+
provider: Type.String({ minLength: 1 }),
|
|
793
|
+
subject: Type.String({ minLength: 1 }),
|
|
794
|
+
}),
|
|
795
|
+
active: Type.Boolean(),
|
|
796
|
+
name: Type.String(),
|
|
797
|
+
email: Type.String(),
|
|
798
|
+
image: Type.Optional(Type.String()),
|
|
799
|
+
capabilities: Type.Array(Type.String()),
|
|
800
|
+
lastAuth: IsoDateStringSchema,
|
|
801
|
+
}),
|
|
802
|
+
AuthenticatedServiceSchema,
|
|
803
|
+
AuthenticatedDeviceSchema,
|
|
804
|
+
]);
|
|
805
|
+
|
|
806
|
+
export const AuthRequestsValidateResponseSchema = Type.Object({
|
|
807
|
+
allowed: Type.Boolean(),
|
|
808
|
+
inboxPrefix: Type.String(),
|
|
809
|
+
caller: CallerViewSchema,
|
|
810
|
+
});
|
|
811
|
+
|
|
812
|
+
export const AuthIdentitiesListSchema = Type.Object({
|
|
813
|
+
user: Type.Optional(Type.String({ minLength: 1 })),
|
|
814
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
815
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
816
|
+
});
|
|
817
|
+
export const AuthIdentitiesListResponseSchema = Type.Object({
|
|
818
|
+
...PageResponseSchema(ApprovalRecordViewSchema).properties,
|
|
819
|
+
});
|
|
820
|
+
|
|
821
|
+
export const AuthIdentityEnvelopesRevokeSchema = Type.Object({
|
|
822
|
+
identityEnvelopeId: Type.String({ minLength: 1 }),
|
|
823
|
+
user: Type.Optional(Type.String({ minLength: 1 })),
|
|
824
|
+
});
|
|
825
|
+
export const AuthIdentityEnvelopesRevokeResponseSchema = Type.Object({
|
|
826
|
+
success: Type.Boolean(),
|
|
827
|
+
});
|
|
828
|
+
|
|
829
|
+
export const UserGrantViewSchema = Type.Object({
|
|
830
|
+
identityEnvelopeId: Type.String({ minLength: 1 }),
|
|
831
|
+
identityAnchor: IdentityAnchorViewSchema,
|
|
832
|
+
contractEvidence: ContractEvidenceViewSchema,
|
|
833
|
+
displayName: Type.String({ minLength: 1 }),
|
|
834
|
+
description: Type.String({ minLength: 1 }),
|
|
835
|
+
participantKind: UserParticipantKindSchema,
|
|
836
|
+
capabilities: Type.Array(Type.String()),
|
|
837
|
+
grantedAt: IsoDateStringSchema,
|
|
838
|
+
updatedAt: IsoDateStringSchema,
|
|
839
|
+
});
|
|
840
|
+
export type UserGrantView = StaticDecode<typeof UserGrantViewSchema>;
|
|
841
|
+
|
|
842
|
+
export const AuthIdentitiesGrantsListSchema = Type.Object({
|
|
843
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
844
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
845
|
+
});
|
|
846
|
+
export const AuthIdentitiesGrantsListResponseSchema = Type.Object({
|
|
847
|
+
...PageResponseSchema(UserGrantViewSchema).properties,
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
export const LoginPortalRecordSchema = Type.Object({
|
|
851
|
+
portalId: Type.String({ minLength: 1 }),
|
|
852
|
+
displayName: Type.String({ minLength: 1 }),
|
|
853
|
+
entryUrl: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
854
|
+
builtIn: Type.Boolean(),
|
|
855
|
+
disabled: Type.Boolean(),
|
|
856
|
+
createdAt: IsoDateStringSchema,
|
|
857
|
+
updatedAt: IsoDateStringSchema,
|
|
858
|
+
});
|
|
859
|
+
export type LoginPortalRecord = StaticDecode<typeof LoginPortalRecordSchema>;
|
|
860
|
+
|
|
861
|
+
export const LoginPortalSettingsSchema = Type.Object({
|
|
862
|
+
portalId: Type.String({ minLength: 1 }),
|
|
863
|
+
localRegistrationEnabled: Type.Boolean(),
|
|
864
|
+
federatedRegistrationEnabled: Type.Boolean(),
|
|
865
|
+
allowedFederatedProviders: Type.Union([
|
|
866
|
+
Type.Array(Type.String({ minLength: 1 })),
|
|
867
|
+
Type.Null(),
|
|
868
|
+
]),
|
|
869
|
+
selfRegisteredAccountActive: Type.Boolean(),
|
|
870
|
+
updatedAt: IsoDateStringSchema,
|
|
871
|
+
});
|
|
872
|
+
export type LoginPortalSettings = StaticDecode<
|
|
873
|
+
typeof LoginPortalSettingsSchema
|
|
874
|
+
>;
|
|
875
|
+
|
|
876
|
+
export const LoginPortalFederatedProviderSchema = Type.Object({
|
|
877
|
+
id: Type.String({ minLength: 1 }),
|
|
878
|
+
displayName: Type.String({ minLength: 1 }),
|
|
879
|
+
type: Type.String({ minLength: 1 }),
|
|
880
|
+
});
|
|
881
|
+
|
|
882
|
+
export const LoginPortalRouteSchema = Type.Object({
|
|
883
|
+
routeKey: Type.String({ minLength: 1 }),
|
|
884
|
+
portalId: Type.String({ minLength: 1 }),
|
|
885
|
+
contractId: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
886
|
+
origin: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
887
|
+
disabled: Type.Boolean(),
|
|
888
|
+
updatedAt: IsoDateStringSchema,
|
|
889
|
+
});
|
|
890
|
+
export type LoginPortalRoute = StaticDecode<typeof LoginPortalRouteSchema>;
|
|
891
|
+
|
|
892
|
+
export const LoginPortalSummarySchema = Type.Object({
|
|
893
|
+
...LoginPortalRecordSchema.properties,
|
|
894
|
+
routeCount: Type.Integer({ minimum: 0 }),
|
|
895
|
+
activeRouteCount: Type.Integer({ minimum: 0 }),
|
|
896
|
+
});
|
|
897
|
+
export type LoginPortalSummary = StaticDecode<
|
|
898
|
+
typeof LoginPortalSummarySchema
|
|
899
|
+
>;
|
|
900
|
+
|
|
901
|
+
export const AuthPortalsListSchema = Type.Object({
|
|
902
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
903
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
904
|
+
});
|
|
905
|
+
export const AuthPortalsListResponseSchema = Type.Object({
|
|
906
|
+
...PageResponseSchema(LoginPortalSummarySchema).properties,
|
|
907
|
+
});
|
|
908
|
+
export const AuthPortalsGetSchema = Type.Object({
|
|
909
|
+
portalId: Type.String({ minLength: 1 }),
|
|
910
|
+
});
|
|
911
|
+
export const AuthPortalsGetResponseSchema = Type.Object({
|
|
912
|
+
portal: LoginPortalRecordSchema,
|
|
913
|
+
settings: LoginPortalSettingsSchema,
|
|
914
|
+
routes: Type.Array(LoginPortalRouteSchema),
|
|
915
|
+
defaultCapabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
916
|
+
defaultCapabilityGroups: Type.Array(Type.String({ minLength: 1 })),
|
|
917
|
+
federatedProviders: Type.Array(LoginPortalFederatedProviderSchema),
|
|
918
|
+
});
|
|
919
|
+
export const AuthPortalsPutSchema = Type.Object({
|
|
920
|
+
portalId: Type.String({ minLength: 1 }),
|
|
921
|
+
displayName: Type.String({ minLength: 1 }),
|
|
922
|
+
entryUrl: Type.String({ minLength: 1 }),
|
|
923
|
+
disabled: Type.Optional(Type.Boolean()),
|
|
924
|
+
});
|
|
925
|
+
export const AuthPortalsPutResponseSchema = Type.Object({
|
|
926
|
+
portal: LoginPortalRecordSchema,
|
|
927
|
+
});
|
|
928
|
+
export const AuthPortalsRemoveSchema = Type.Object({
|
|
929
|
+
portalId: Type.String({ minLength: 1 }),
|
|
930
|
+
});
|
|
931
|
+
export const AuthPortalsRemoveResponseSchema = Type.Object({
|
|
932
|
+
success: Type.Boolean(),
|
|
933
|
+
});
|
|
934
|
+
|
|
935
|
+
export const AuthPortalsLoginSettingsGetSchema = Type.Object({
|
|
936
|
+
portalId: Type.String({ minLength: 1 }),
|
|
937
|
+
});
|
|
938
|
+
export const AuthPortalsLoginSettingsResponseSchema = Type.Object({
|
|
939
|
+
portal: LoginPortalRecordSchema,
|
|
940
|
+
settings: LoginPortalSettingsSchema,
|
|
941
|
+
defaultCapabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
942
|
+
defaultCapabilityGroups: Type.Array(Type.String({ minLength: 1 })),
|
|
943
|
+
federatedProviders: Type.Array(LoginPortalFederatedProviderSchema),
|
|
944
|
+
});
|
|
945
|
+
export const AuthPortalsLoginSettingsUpdateSchema = Type.Object({
|
|
946
|
+
portalId: Type.String({ minLength: 1 }),
|
|
947
|
+
localRegistrationEnabled: Type.Boolean(),
|
|
948
|
+
federatedRegistrationEnabled: Type.Boolean(),
|
|
949
|
+
allowedFederatedProviders: Type.Union([
|
|
950
|
+
Type.Array(Type.String({ minLength: 1 })),
|
|
951
|
+
Type.Null(),
|
|
952
|
+
]),
|
|
953
|
+
selfRegisteredAccountActive: Type.Boolean(),
|
|
954
|
+
defaultCapabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
955
|
+
defaultCapabilityGroups: Type.Array(Type.String({ minLength: 1 })),
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
export const AuthPortalsRoutesPutSchema = Type.Object({
|
|
959
|
+
portalId: Type.String({ minLength: 1 }),
|
|
960
|
+
contractId: Type.Optional(Type.Union([
|
|
961
|
+
Type.String({ minLength: 1 }),
|
|
962
|
+
Type.Null(),
|
|
963
|
+
])),
|
|
964
|
+
origin: Type.Optional(
|
|
965
|
+
Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
966
|
+
),
|
|
967
|
+
disabled: Type.Optional(Type.Boolean()),
|
|
968
|
+
});
|
|
969
|
+
export const AuthPortalsRoutesPutResponseSchema = Type.Object({
|
|
970
|
+
route: LoginPortalRouteSchema,
|
|
971
|
+
});
|
|
972
|
+
export const AuthPortalsRoutesRemoveSchema = Type.Object({
|
|
973
|
+
portalId: Type.String({ minLength: 1 }),
|
|
974
|
+
contractId: Type.Optional(Type.Union([
|
|
975
|
+
Type.String({ minLength: 1 }),
|
|
976
|
+
Type.Null(),
|
|
977
|
+
])),
|
|
978
|
+
origin: Type.Optional(
|
|
979
|
+
Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
980
|
+
),
|
|
981
|
+
});
|
|
982
|
+
export const AuthPortalsRoutesRemoveResponseSchema = Type.Object({
|
|
983
|
+
success: Type.Boolean(),
|
|
984
|
+
});
|
|
985
|
+
|
|
986
|
+
export const FlowRegistrationAvailabilitySchema = Type.Object({
|
|
987
|
+
localIdentity: Type.Object({
|
|
988
|
+
available: Type.Boolean(),
|
|
989
|
+
}),
|
|
990
|
+
federatedIdentity: Type.Object({
|
|
991
|
+
available: Type.Boolean(),
|
|
992
|
+
providers: Type.Array(Type.Object({
|
|
993
|
+
id: Type.String({ minLength: 1 }),
|
|
994
|
+
displayName: Type.String({ minLength: 1 }),
|
|
995
|
+
})),
|
|
996
|
+
}),
|
|
997
|
+
});
|
|
998
|
+
export type FlowRegistrationAvailability = StaticDecode<
|
|
999
|
+
typeof FlowRegistrationAvailabilitySchema
|
|
1000
|
+
>;
|
|
1001
|
+
|
|
1002
|
+
export const PortalFlowStateSchema = Type.Union([
|
|
1003
|
+
Type.Object({
|
|
1004
|
+
status: Type.Literal("choose_provider"),
|
|
1005
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1006
|
+
providers: Type.Array(Type.Object({
|
|
1007
|
+
id: Type.String({ minLength: 1 }),
|
|
1008
|
+
displayName: Type.String({ minLength: 1 }),
|
|
1009
|
+
})),
|
|
1010
|
+
app: Type.Object({
|
|
1011
|
+
contractId: Type.String({ minLength: 1 }),
|
|
1012
|
+
contractDigest: DigestSchema,
|
|
1013
|
+
displayName: Type.String({ minLength: 1 }),
|
|
1014
|
+
description: Type.String({ minLength: 1 }),
|
|
1015
|
+
context: Type.Optional(OpenObjectSchema),
|
|
1016
|
+
}),
|
|
1017
|
+
portal: Type.Optional(LoginPortalRecordSchema),
|
|
1018
|
+
registration: Type.Optional(FlowRegistrationAvailabilitySchema),
|
|
1019
|
+
}),
|
|
1020
|
+
Type.Object({
|
|
1021
|
+
status: Type.Literal("approval_required"),
|
|
1022
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1023
|
+
user: Type.Object({
|
|
1024
|
+
origin: Type.String({ minLength: 1 }),
|
|
1025
|
+
id: Type.String({ minLength: 1 }),
|
|
1026
|
+
name: Type.Optional(Type.String({ minLength: 1 })),
|
|
1027
|
+
email: Type.Optional(Type.String({ minLength: 1 })),
|
|
1028
|
+
image: Type.Optional(Type.String({ minLength: 1 })),
|
|
1029
|
+
}),
|
|
1030
|
+
approval: ApprovalEvidenceViewSchema,
|
|
1031
|
+
}),
|
|
1032
|
+
Type.Object({
|
|
1033
|
+
status: Type.Literal("approval_denied"),
|
|
1034
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1035
|
+
approval: ApprovalEvidenceViewSchema,
|
|
1036
|
+
returnLocation: Type.Optional(Type.String({ minLength: 1 })),
|
|
1037
|
+
}),
|
|
1038
|
+
Type.Object({
|
|
1039
|
+
status: Type.Literal("insufficient_capabilities"),
|
|
1040
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1041
|
+
user: Type.Optional(Type.Object({
|
|
1042
|
+
origin: Type.String({ minLength: 1 }),
|
|
1043
|
+
id: Type.String({ minLength: 1 }),
|
|
1044
|
+
name: Type.Optional(Type.String({ minLength: 1 })),
|
|
1045
|
+
})),
|
|
1046
|
+
approval: ApprovalEvidenceViewSchema,
|
|
1047
|
+
missingCapabilities: Type.Array(Type.String()),
|
|
1048
|
+
userCapabilities: Type.Array(Type.String()),
|
|
1049
|
+
returnLocation: Type.Optional(Type.String({ minLength: 1 })),
|
|
1050
|
+
}),
|
|
1051
|
+
Type.Object({
|
|
1052
|
+
status: Type.Literal("redirect"),
|
|
1053
|
+
location: Type.String({ minLength: 1 }),
|
|
1054
|
+
}),
|
|
1055
|
+
Type.Object({
|
|
1056
|
+
status: Type.Literal("expired"),
|
|
1057
|
+
}),
|
|
1058
|
+
]);
|
|
1059
|
+
export type PortalFlowState = StaticDecode<typeof PortalFlowStateSchema>;
|
|
1060
|
+
export type PortalFlowChooseProviderState = Extract<
|
|
1061
|
+
PortalFlowState,
|
|
1062
|
+
{ status: "choose_provider" }
|
|
1063
|
+
>;
|
|
1064
|
+
export type PortalFlowApprovalRequiredState = Extract<
|
|
1065
|
+
PortalFlowState,
|
|
1066
|
+
{ status: "approval_required" }
|
|
1067
|
+
>;
|
|
1068
|
+
export type PortalFlowApprovalDeniedState = Extract<
|
|
1069
|
+
PortalFlowState,
|
|
1070
|
+
{ status: "approval_denied" }
|
|
1071
|
+
>;
|
|
1072
|
+
export type PortalFlowInsufficientCapabilitiesState = Extract<
|
|
1073
|
+
PortalFlowState,
|
|
1074
|
+
{ status: "insufficient_capabilities" }
|
|
1075
|
+
>;
|
|
1076
|
+
export type PortalFlowRedirectState = Extract<
|
|
1077
|
+
PortalFlowState,
|
|
1078
|
+
{ status: "redirect" }
|
|
1079
|
+
>;
|
|
1080
|
+
export type PortalFlowExpiredState = Extract<
|
|
1081
|
+
PortalFlowState,
|
|
1082
|
+
{ status: "expired" }
|
|
1083
|
+
>;
|
|
1084
|
+
export type PortalFlowApp = PortalFlowChooseProviderState["app"];
|
|
1085
|
+
export type PortalFlowProvider =
|
|
1086
|
+
PortalFlowChooseProviderState["providers"][number];
|
|
1087
|
+
export type PortalFlowApproval = PortalFlowApprovalRequiredState["approval"];
|
|
1088
|
+
export type PortalFlowUser = PortalFlowApprovalRequiredState["user"];
|
|
1089
|
+
|
|
1090
|
+
export const DeviceDeploymentSchema = Type.Unsafe<{
|
|
1091
|
+
deploymentId: string;
|
|
1092
|
+
reviewMode?: "none" | "required";
|
|
1093
|
+
disabled: boolean;
|
|
1094
|
+
}>(Type.Object({
|
|
1095
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1096
|
+
reviewMode: Type.Optional(
|
|
1097
|
+
Type.Union([Type.Literal("none"), Type.Literal("required")]),
|
|
1098
|
+
),
|
|
1099
|
+
disabled: Type.Boolean(),
|
|
1100
|
+
}));
|
|
1101
|
+
|
|
1102
|
+
export const AuthDeploymentKindSchema = Type.Union([
|
|
1103
|
+
Type.Literal("service"),
|
|
1104
|
+
Type.Literal("device"),
|
|
1105
|
+
]);
|
|
1106
|
+
export type AuthDeploymentKind = StaticDecode<typeof AuthDeploymentKindSchema>;
|
|
1107
|
+
|
|
1108
|
+
export const AuthDeploymentSchema = Type.Union([
|
|
1109
|
+
Type.Object({
|
|
1110
|
+
kind: Type.Literal("service"),
|
|
1111
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1112
|
+
namespaces: Type.Array(Type.String({ minLength: 1 })),
|
|
1113
|
+
disabled: Type.Boolean(),
|
|
1114
|
+
}),
|
|
1115
|
+
Type.Object({
|
|
1116
|
+
kind: Type.Literal("device"),
|
|
1117
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1118
|
+
reviewMode: Type.Optional(
|
|
1119
|
+
Type.Union([Type.Literal("none"), Type.Literal("required")]),
|
|
1120
|
+
),
|
|
1121
|
+
disabled: Type.Boolean(),
|
|
1122
|
+
}),
|
|
1123
|
+
]);
|
|
1124
|
+
export type AuthDeployment = StaticDecode<typeof AuthDeploymentSchema>;
|
|
1125
|
+
|
|
1126
|
+
export const AuthDeploymentsCreateSchema = Type.Union([
|
|
1127
|
+
Type.Object({
|
|
1128
|
+
kind: Type.Literal("service"),
|
|
1129
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1130
|
+
namespaces: Type.Array(Type.String({ minLength: 1 })),
|
|
1131
|
+
}),
|
|
1132
|
+
Type.Object({
|
|
1133
|
+
kind: Type.Literal("device"),
|
|
1134
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1135
|
+
reviewMode: Type.Optional(
|
|
1136
|
+
Type.Union([Type.Literal("none"), Type.Literal("required")]),
|
|
1137
|
+
),
|
|
1138
|
+
}),
|
|
1139
|
+
]);
|
|
1140
|
+
export const AuthDeploymentsCreateResponseSchema = Type.Object({
|
|
1141
|
+
deployment: AuthDeploymentSchema,
|
|
1142
|
+
});
|
|
1143
|
+
|
|
1144
|
+
export const AuthDeploymentsListSchema = Type.Object({
|
|
1145
|
+
kind: Type.Optional(AuthDeploymentKindSchema),
|
|
1146
|
+
disabled: Type.Optional(Type.Boolean()),
|
|
1147
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1148
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1149
|
+
});
|
|
1150
|
+
export const AuthDeploymentsListResponseSchema = Type.Object({
|
|
1151
|
+
...PageResponseSchema(AuthDeploymentSchema).properties,
|
|
1152
|
+
});
|
|
1153
|
+
|
|
1154
|
+
export const AuthDeploymentsDisableSchema = Type.Object({
|
|
1155
|
+
kind: AuthDeploymentKindSchema,
|
|
1156
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1157
|
+
});
|
|
1158
|
+
export const AuthDeploymentsDisableResponseSchema = Type.Object({
|
|
1159
|
+
deployment: AuthDeploymentSchema,
|
|
1160
|
+
});
|
|
1161
|
+
|
|
1162
|
+
export const AuthCatalogIssuesResolveSchema = Type.Object({
|
|
1163
|
+
issueId: Type.String({ minLength: 1 }),
|
|
1164
|
+
action: Type.Union([
|
|
1165
|
+
Type.Literal("keep-current"),
|
|
1166
|
+
Type.Literal("force-replace"),
|
|
1167
|
+
]),
|
|
1168
|
+
});
|
|
1169
|
+
export const AuthCatalogIssuesResolveResponseSchema = Type.Object({
|
|
1170
|
+
success: Type.Literal(true),
|
|
1171
|
+
issueId: Type.String({ minLength: 1 }),
|
|
1172
|
+
action: Type.Union([
|
|
1173
|
+
Type.Literal("keep-current"),
|
|
1174
|
+
Type.Literal("force-replace"),
|
|
1175
|
+
]),
|
|
1176
|
+
deletedEvidence: Type.Array(DeploymentContractEvidenceSchema),
|
|
1177
|
+
});
|
|
1178
|
+
|
|
1179
|
+
export const AuthDeploymentsEnableSchema = Type.Object({
|
|
1180
|
+
kind: AuthDeploymentKindSchema,
|
|
1181
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1182
|
+
});
|
|
1183
|
+
export const AuthDeploymentsEnableResponseSchema = Type.Object({
|
|
1184
|
+
deployment: AuthDeploymentSchema,
|
|
1185
|
+
});
|
|
1186
|
+
|
|
1187
|
+
export const AuthDeploymentsRemoveSchema = Type.Object({
|
|
1188
|
+
kind: AuthDeploymentKindSchema,
|
|
1189
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1190
|
+
cascade: Type.Optional(Type.Boolean()),
|
|
1191
|
+
purgeUnusedContracts: Type.Optional(Type.Boolean()),
|
|
1192
|
+
});
|
|
1193
|
+
export const AuthDeploymentsRemoveResponseSchema = Type.Object({
|
|
1194
|
+
success: Type.Boolean(),
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
export const DeviceMetadataSchema = Type.Record(
|
|
1198
|
+
Type.String({ minLength: 1 }),
|
|
1199
|
+
Type.String({ minLength: 1 }),
|
|
1200
|
+
);
|
|
1201
|
+
|
|
1202
|
+
export const DeviceSchema = Type.Object({
|
|
1203
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1204
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1205
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1206
|
+
metadata: Type.Optional(DeviceMetadataSchema),
|
|
1207
|
+
state: Type.Union([
|
|
1208
|
+
Type.Literal("registered"),
|
|
1209
|
+
Type.Literal("activated"),
|
|
1210
|
+
Type.Literal("revoked"),
|
|
1211
|
+
Type.Literal("disabled"),
|
|
1212
|
+
]),
|
|
1213
|
+
currentContractId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1214
|
+
currentContractDigest: Type.Optional(DigestSchema),
|
|
1215
|
+
createdAt: IsoDateStringSchema,
|
|
1216
|
+
activatedAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
1217
|
+
revokedAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
1218
|
+
});
|
|
1219
|
+
|
|
1220
|
+
export const DeviceActivationActorSchema = Type.Object({
|
|
1221
|
+
participantKind: UserParticipantKindSchema,
|
|
1222
|
+
userId: Type.String({ minLength: 1 }),
|
|
1223
|
+
identity: Type.Object({
|
|
1224
|
+
identityId: Type.String({ minLength: 1 }),
|
|
1225
|
+
provider: Type.String({ minLength: 1 }),
|
|
1226
|
+
subject: Type.String({ minLength: 1 }),
|
|
1227
|
+
}),
|
|
1228
|
+
});
|
|
1229
|
+
export type DeviceActivationActor = StaticDecode<
|
|
1230
|
+
typeof DeviceActivationActorSchema
|
|
1231
|
+
>;
|
|
1232
|
+
|
|
1233
|
+
export const DeviceActivationRecordSchema = Type.Object({
|
|
1234
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1235
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1236
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1237
|
+
activatedBy: Type.Optional(DeviceActivationActorSchema),
|
|
1238
|
+
state: Type.Union([Type.Literal("activated"), Type.Literal("revoked")]),
|
|
1239
|
+
activatedAt: IsoDateStringSchema,
|
|
1240
|
+
revokedAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
1241
|
+
});
|
|
1242
|
+
export type DeviceActivationRecord = StaticDecode<
|
|
1243
|
+
typeof DeviceActivationRecordSchema
|
|
1244
|
+
>;
|
|
1245
|
+
|
|
1246
|
+
export const DeviceActivationReviewSchema = Type.Object({
|
|
1247
|
+
reviewId: Type.String({ minLength: 1 }),
|
|
1248
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1249
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1250
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1251
|
+
state: Type.Union([
|
|
1252
|
+
Type.Literal("pending"),
|
|
1253
|
+
Type.Literal("approved"),
|
|
1254
|
+
Type.Literal("rejected"),
|
|
1255
|
+
]),
|
|
1256
|
+
requestedAt: IsoDateStringSchema,
|
|
1257
|
+
decidedAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
1258
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1261
|
+
export const AuthDeviceUserAuthoritiesReviewRequestedEventSchema = Type.Object({
|
|
1262
|
+
reviewId: Type.String({ minLength: 1 }),
|
|
1263
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1264
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1265
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1266
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1267
|
+
requestedAt: IsoDateStringSchema,
|
|
1268
|
+
requestedBy: DeviceActivationActorSchema,
|
|
1269
|
+
});
|
|
1270
|
+
|
|
1271
|
+
export const AuthDeviceUserAuthoritiesRequestedEventSchema = Type.Object({
|
|
1272
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1273
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1274
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1275
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1276
|
+
requestedAt: IsoDateStringSchema,
|
|
1277
|
+
requestedBy: DeviceActivationActorSchema,
|
|
1278
|
+
});
|
|
1279
|
+
|
|
1280
|
+
export const AuthDeviceUserAuthoritiesApprovedEventSchema = Type.Object({
|
|
1281
|
+
reviewId: Type.String({ minLength: 1 }),
|
|
1282
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1283
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1284
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1285
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1286
|
+
requestedAt: IsoDateStringSchema,
|
|
1287
|
+
approvedAt: IsoDateStringSchema,
|
|
1288
|
+
requestedBy: DeviceActivationActorSchema,
|
|
1289
|
+
approvedBy: DeviceActivationActorSchema,
|
|
1290
|
+
});
|
|
1291
|
+
|
|
1292
|
+
export const AuthDeviceUserAuthoritiesResolvedEventSchema = Type.Object({
|
|
1293
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1294
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1295
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1296
|
+
resolvedAt: IsoDateStringSchema,
|
|
1297
|
+
resolvedBy: DeviceActivationActorSchema,
|
|
1298
|
+
flowId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1299
|
+
reviewId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1300
|
+
});
|
|
1301
|
+
|
|
1302
|
+
export const DeviceConnectInfoSchema = Type.Object({
|
|
1303
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1304
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1305
|
+
contractId: Type.String({ minLength: 1 }),
|
|
1306
|
+
contractDigest: DigestSchema,
|
|
1307
|
+
transports: ClientTransportsSchema,
|
|
1308
|
+
transport: Type.Object({
|
|
1309
|
+
sentinel: SentinelCredsSchema,
|
|
1310
|
+
}),
|
|
1311
|
+
auth: Type.Object({
|
|
1312
|
+
mode: Type.Literal("device_identity"),
|
|
1313
|
+
authority: Type.Union([
|
|
1314
|
+
Type.Literal("admin_reviewed"),
|
|
1315
|
+
Type.Literal("user_delegated"),
|
|
1316
|
+
]),
|
|
1317
|
+
iatSkewSeconds: Type.Number(),
|
|
1318
|
+
}),
|
|
1319
|
+
});
|
|
1320
|
+
|
|
1321
|
+
export const AuthDevicesProvisionSchema = Type.Object({
|
|
1322
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1323
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1324
|
+
activationKey: Type.String({ minLength: 1 }),
|
|
1325
|
+
metadata: Type.Optional(DeviceMetadataSchema),
|
|
1326
|
+
});
|
|
1327
|
+
export const AuthDevicesProvisionResponseSchema = Type.Object({
|
|
1328
|
+
instance: DeviceSchema,
|
|
1329
|
+
});
|
|
1330
|
+
export const AuthDevicesListSchema = Type.Object({
|
|
1331
|
+
deploymentId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1332
|
+
state: Type.Optional(Type.Union([
|
|
1333
|
+
Type.Literal("registered"),
|
|
1334
|
+
Type.Literal("activated"),
|
|
1335
|
+
Type.Literal("revoked"),
|
|
1336
|
+
Type.Literal("disabled"),
|
|
1337
|
+
])),
|
|
1338
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1339
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1340
|
+
});
|
|
1341
|
+
export const AuthDevicesListResponseSchema = Type.Object({
|
|
1342
|
+
...PageResponseSchema(DeviceSchema).properties,
|
|
1343
|
+
});
|
|
1344
|
+
export const AuthDevicesDisableSchema = Type.Object({
|
|
1345
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1346
|
+
});
|
|
1347
|
+
export const AuthDevicesDisableResponseSchema = Type.Object({
|
|
1348
|
+
instance: DeviceSchema,
|
|
1349
|
+
});
|
|
1350
|
+
export const AuthDevicesEnableSchema = Type.Object({
|
|
1351
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1352
|
+
});
|
|
1353
|
+
export const AuthDevicesEnableResponseSchema = Type.Object({
|
|
1354
|
+
instance: DeviceSchema,
|
|
1355
|
+
});
|
|
1356
|
+
export const AuthDevicesRemoveSchema = Type.Object({
|
|
1357
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1358
|
+
});
|
|
1359
|
+
export const AuthDevicesRemoveResponseSchema = Type.Object({
|
|
1360
|
+
success: Type.Boolean(),
|
|
1361
|
+
});
|
|
1362
|
+
|
|
1363
|
+
export const AuthResolveDeviceUserAuthoritiesSchema = Type.Object({
|
|
1364
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1365
|
+
});
|
|
1366
|
+
export const AuthResolveDeviceUserAuthoritiesProgressSchema = Type.Object({
|
|
1367
|
+
status: Type.Literal("pending_review"),
|
|
1368
|
+
reviewId: Type.String({ minLength: 1 }),
|
|
1369
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1370
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1371
|
+
requestedAt: IsoDateStringSchema,
|
|
1372
|
+
});
|
|
1373
|
+
export const AuthResolveDeviceUserAuthoritiesResponseSchema = Type.Union([
|
|
1374
|
+
Type.Object({
|
|
1375
|
+
status: Type.Literal("activated"),
|
|
1376
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1377
|
+
deploymentId: Type.String({ minLength: 1 }),
|
|
1378
|
+
activatedAt: IsoDateStringSchema,
|
|
1379
|
+
confirmationCode: Type.Optional(Type.String({ minLength: 1 })),
|
|
1380
|
+
}),
|
|
1381
|
+
Type.Object({
|
|
1382
|
+
status: Type.Literal("rejected"),
|
|
1383
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
1384
|
+
}),
|
|
1385
|
+
]);
|
|
1386
|
+
|
|
1387
|
+
export const WaitForDeviceActivationResponseSchema = Type.Union([
|
|
1388
|
+
Type.Object({ status: Type.Literal("pending") }),
|
|
1389
|
+
Type.Object({
|
|
1390
|
+
status: Type.Literal("activated"),
|
|
1391
|
+
activatedAt: IsoDateStringSchema,
|
|
1392
|
+
confirmationCode: Type.Optional(Type.String({ minLength: 1 })),
|
|
1393
|
+
connectInfo: DeviceConnectInfoSchema,
|
|
1394
|
+
}),
|
|
1395
|
+
Type.Object({
|
|
1396
|
+
status: Type.Literal("rejected"),
|
|
1397
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
1398
|
+
}),
|
|
1399
|
+
]);
|
|
1400
|
+
|
|
1401
|
+
export const WaitForDeviceActivationRequestSchema = Type.Object({
|
|
1402
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1403
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1404
|
+
nonce: Type.String({ minLength: 1 }),
|
|
1405
|
+
contractDigest: DigestSchema,
|
|
1406
|
+
iat: Type.Number(),
|
|
1407
|
+
sig: Type.String({ minLength: 1 }),
|
|
1408
|
+
});
|
|
1409
|
+
|
|
1410
|
+
export const AuthDevicesConnectInfoGetSchema = Type.Object({
|
|
1411
|
+
publicIdentityKey: Type.String({ minLength: 1 }),
|
|
1412
|
+
contractDigest: DigestSchema,
|
|
1413
|
+
iat: Type.Number(),
|
|
1414
|
+
sig: Type.String({ minLength: 1 }),
|
|
1415
|
+
});
|
|
1416
|
+
export const AuthDevicesConnectInfoGetResponseSchema = Type.Object({
|
|
1417
|
+
status: Type.Literal("ready"),
|
|
1418
|
+
connectInfo: DeviceConnectInfoSchema,
|
|
1419
|
+
});
|
|
1420
|
+
|
|
1421
|
+
export const AuthDeviceUserAuthoritiesListSchema = Type.Object({
|
|
1422
|
+
instanceId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1423
|
+
deploymentId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1424
|
+
state: Type.Optional(
|
|
1425
|
+
Type.Union([Type.Literal("activated"), Type.Literal("revoked")]),
|
|
1426
|
+
),
|
|
1427
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1428
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1429
|
+
});
|
|
1430
|
+
export const AuthDeviceUserAuthoritiesListResponseSchema = Type.Object({
|
|
1431
|
+
...PageResponseSchema(DeviceActivationRecordSchema).properties,
|
|
1432
|
+
});
|
|
1433
|
+
export const AuthDeviceUserAuthoritiesRevokeSchema = Type.Object({
|
|
1434
|
+
instanceId: Type.String({ minLength: 1 }),
|
|
1435
|
+
});
|
|
1436
|
+
export const AuthDeviceUserAuthoritiesRevokeResponseSchema = Type.Object({
|
|
1437
|
+
success: Type.Boolean(),
|
|
1438
|
+
});
|
|
1439
|
+
export const AuthDeviceUserAuthoritiesReviewsListSchema = Type.Object({
|
|
1440
|
+
instanceId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1441
|
+
deploymentId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1442
|
+
state: Type.Optional(Type.Union([
|
|
1443
|
+
Type.Literal("pending"),
|
|
1444
|
+
Type.Literal("approved"),
|
|
1445
|
+
Type.Literal("rejected"),
|
|
1446
|
+
])),
|
|
1447
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1448
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1449
|
+
});
|
|
1450
|
+
export const AuthDeviceUserAuthoritiesReviewsListResponseSchema = Type.Object({
|
|
1451
|
+
...PageResponseSchema(DeviceActivationReviewSchema).properties,
|
|
1452
|
+
});
|
|
1453
|
+
export const AuthDeviceUserAuthoritiesReviewsDecideSchema = Type.Object({
|
|
1454
|
+
reviewId: Type.String({ minLength: 1 }),
|
|
1455
|
+
decision: Type.Union([Type.Literal("approve"), Type.Literal("reject")]),
|
|
1456
|
+
reason: Type.Optional(Type.String({ minLength: 1 })),
|
|
1457
|
+
});
|
|
1458
|
+
export const AuthDeviceUserAuthoritiesReviewsDecideResponseSchema = Type.Object(
|
|
1459
|
+
{
|
|
1460
|
+
review: DeviceActivationReviewSchema,
|
|
1461
|
+
activation: Type.Optional(DeviceActivationRecordSchema),
|
|
1462
|
+
confirmationCode: Type.Optional(Type.String({ minLength: 1 })),
|
|
1463
|
+
},
|
|
1464
|
+
);
|
|
1465
|
+
|
|
1466
|
+
export const UserIdentityViewSchema = Type.Object({
|
|
1467
|
+
identityId: Type.String({ minLength: 1 }),
|
|
1468
|
+
provider: Type.String({ minLength: 1 }),
|
|
1469
|
+
subject: Type.String({ minLength: 1 }),
|
|
1470
|
+
displayName: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
1471
|
+
email: Type.Union([Type.String({ minLength: 1 }), Type.Null()]),
|
|
1472
|
+
emailVerified: Type.Boolean(),
|
|
1473
|
+
linkedAt: IsoDateStringSchema,
|
|
1474
|
+
lastLoginAt: Type.Union([IsoDateStringSchema, Type.Null()]),
|
|
1475
|
+
});
|
|
1476
|
+
|
|
1477
|
+
export const UserViewSchema = Type.Object({
|
|
1478
|
+
userId: Type.String({ minLength: 1 }),
|
|
1479
|
+
name: Type.Optional(Type.String()),
|
|
1480
|
+
email: Type.Optional(Type.String()),
|
|
1481
|
+
active: Type.Boolean(),
|
|
1482
|
+
capabilities: Type.Array(Type.String()),
|
|
1483
|
+
capabilityGroups: Type.Array(Type.String()),
|
|
1484
|
+
identities: Type.Array(UserIdentityViewSchema),
|
|
1485
|
+
});
|
|
1486
|
+
|
|
1487
|
+
export const AuthUsersListSchema = Type.Object({
|
|
1488
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1489
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1490
|
+
});
|
|
1491
|
+
export const AuthUsersListResponseSchema = Type.Object({
|
|
1492
|
+
...PageResponseSchema(UserViewSchema).properties,
|
|
1493
|
+
});
|
|
1494
|
+
|
|
1495
|
+
export const AuthUsersGetSchema = Type.Object({
|
|
1496
|
+
userId: Type.String({ minLength: 1 }),
|
|
1497
|
+
});
|
|
1498
|
+
export const AuthUsersGetResponseSchema = Type.Object({
|
|
1499
|
+
user: UserViewSchema,
|
|
1500
|
+
});
|
|
1501
|
+
|
|
1502
|
+
export const AuthUsersCreateSchema = Type.Object({
|
|
1503
|
+
name: Type.Optional(Type.String({ minLength: 1 })),
|
|
1504
|
+
email: Type.Optional(Type.String({ minLength: 1 })),
|
|
1505
|
+
username: Type.Optional(Type.String({ minLength: 1 })),
|
|
1506
|
+
active: Type.Optional(Type.Boolean()),
|
|
1507
|
+
capabilities: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
1508
|
+
capabilityGroups: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
1509
|
+
});
|
|
1510
|
+
export const AuthUsersCreateResponseSchema = Type.Object({
|
|
1511
|
+
user: UserViewSchema,
|
|
1512
|
+
});
|
|
1513
|
+
|
|
1514
|
+
export const AuthUsersIdentityLinkCreateSchema = Type.Object({
|
|
1515
|
+
returnTo: Type.Optional(Type.String({ minLength: 1 })),
|
|
1516
|
+
});
|
|
1517
|
+
|
|
1518
|
+
export const AuthUsersPasswordChangeSchema = Type.Object({
|
|
1519
|
+
currentPassword: Type.String({ minLength: 1 }),
|
|
1520
|
+
newPassword: Type.String({ minLength: 1 }),
|
|
1521
|
+
});
|
|
1522
|
+
|
|
1523
|
+
export const AuthUsersPasswordChangeResponseSchema = Type.Object({
|
|
1524
|
+
success: Type.Boolean(),
|
|
1525
|
+
});
|
|
1526
|
+
|
|
1527
|
+
export const AuthUsersPasswordResetCreateSchema = Type.Object({
|
|
1528
|
+
userId: Type.String({ minLength: 1 }),
|
|
1529
|
+
expiresInSeconds: Type.Optional(
|
|
1530
|
+
Type.Integer({ minimum: 60, maximum: 2592000 }),
|
|
1531
|
+
),
|
|
1532
|
+
});
|
|
1533
|
+
|
|
1534
|
+
export const AuthUsersAccountFlowCreateResponseSchema = Type.Object({
|
|
1535
|
+
flowId: Type.String({ minLength: 1 }),
|
|
1536
|
+
url: Type.String({ minLength: 1 }),
|
|
1537
|
+
expiresAt: IsoDateStringSchema,
|
|
1538
|
+
});
|
|
1539
|
+
|
|
1540
|
+
export const CapabilityDefinitionSchema = Type.Object({
|
|
1541
|
+
key: Type.String({ minLength: 1 }),
|
|
1542
|
+
displayName: Type.String({ minLength: 1 }),
|
|
1543
|
+
description: Type.String({ minLength: 1 }),
|
|
1544
|
+
consequence: Type.Optional(Type.String({ minLength: 1 })),
|
|
1545
|
+
source: Type.Union([Type.Literal("contract"), Type.Literal("platform")]),
|
|
1546
|
+
contractId: Type.Optional(Type.String({ minLength: 1 })),
|
|
1547
|
+
contractDigest: Type.Optional(DigestSchema),
|
|
1548
|
+
contractDisplayName: Type.Optional(Type.String({ minLength: 1 })),
|
|
1549
|
+
});
|
|
1550
|
+
|
|
1551
|
+
export const AuthCapabilitiesListSchema = Type.Object({
|
|
1552
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1553
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1554
|
+
});
|
|
1555
|
+
export const AuthCapabilitiesListResponseSchema = Type.Object({
|
|
1556
|
+
...PageResponseSchema(CapabilityDefinitionSchema).properties,
|
|
1557
|
+
});
|
|
1558
|
+
|
|
1559
|
+
export const CapabilityGroupSchema = Type.Object({
|
|
1560
|
+
groupKey: Type.String({ minLength: 1 }),
|
|
1561
|
+
displayName: Type.String({ minLength: 1 }),
|
|
1562
|
+
description: Type.String({ minLength: 1 }),
|
|
1563
|
+
capabilities: Type.Array(Type.String({ minLength: 1 })),
|
|
1564
|
+
includedGroups: Type.Array(Type.String({ minLength: 1 })),
|
|
1565
|
+
createdAt: IsoDateStringSchema,
|
|
1566
|
+
updatedAt: IsoDateStringSchema,
|
|
1567
|
+
});
|
|
1568
|
+
|
|
1569
|
+
export const AuthCapabilityGroupsListSchema = Type.Object({
|
|
1570
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1571
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1572
|
+
});
|
|
1573
|
+
export const AuthCapabilityGroupsListResponseSchema = Type.Object({
|
|
1574
|
+
...PageResponseSchema(CapabilityGroupSchema).properties,
|
|
1575
|
+
});
|
|
1576
|
+
|
|
1577
|
+
export const AuthCapabilityGroupsGetSchema = Type.Object({
|
|
1578
|
+
groupKey: Type.String({ minLength: 1 }),
|
|
1579
|
+
});
|
|
1580
|
+
export const AuthCapabilityGroupsGetResponseSchema = Type.Object({
|
|
1581
|
+
group: CapabilityGroupSchema,
|
|
1582
|
+
});
|
|
1583
|
+
|
|
1584
|
+
export const AuthCapabilityGroupsPutSchema = Type.Object({
|
|
1585
|
+
groupKey: Type.String({ minLength: 1 }),
|
|
1586
|
+
displayName: Type.String({ minLength: 1 }),
|
|
1587
|
+
description: Type.String({ minLength: 1 }),
|
|
1588
|
+
capabilities: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
1589
|
+
includedGroups: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
1590
|
+
});
|
|
1591
|
+
export const AuthCapabilityGroupsPutResponseSchema = Type.Object({
|
|
1592
|
+
group: CapabilityGroupSchema,
|
|
1593
|
+
});
|
|
1594
|
+
|
|
1595
|
+
export const AuthCapabilityGroupsDeleteSchema = Type.Object({
|
|
1596
|
+
groupKey: Type.String({ minLength: 1 }),
|
|
1597
|
+
});
|
|
1598
|
+
export const AuthCapabilityGroupsDeleteResponseSchema = Type.Object({
|
|
1599
|
+
success: Type.Boolean(),
|
|
1600
|
+
});
|
|
1601
|
+
|
|
1602
|
+
export const AuthUsersUpdateSchema = Type.Object({
|
|
1603
|
+
userId: Type.String({ minLength: 1 }),
|
|
1604
|
+
active: Type.Optional(Type.Boolean()),
|
|
1605
|
+
capabilities: Type.Optional(Type.Array(Type.String())),
|
|
1606
|
+
capabilityGroups: Type.Optional(Type.Array(Type.String({ minLength: 1 }))),
|
|
1607
|
+
name: Type.Optional(Type.String()),
|
|
1608
|
+
email: Type.Optional(Type.String()),
|
|
1609
|
+
});
|
|
1610
|
+
export const AuthUsersUpdateResponseSchema = Type.Object({
|
|
1611
|
+
success: Type.Boolean(),
|
|
1612
|
+
});
|
|
1613
|
+
|
|
1614
|
+
export const AuthUserIdentitiesListSchema = Type.Object({
|
|
1615
|
+
userId: Type.String({ minLength: 1 }),
|
|
1616
|
+
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
1617
|
+
limit: Type.Integer({ minimum: 0, maximum: 500 }),
|
|
1618
|
+
});
|
|
1619
|
+
export const AuthUserIdentitiesListResponseSchema = Type.Object({
|
|
1620
|
+
...PageResponseSchema(UserIdentityViewSchema).properties,
|
|
1621
|
+
});
|
|
1622
|
+
|
|
1623
|
+
export const AuthUserIdentitiesUnlinkSchema = Type.Object({
|
|
1624
|
+
userId: Type.String({ minLength: 1 }),
|
|
1625
|
+
identityId: Type.String({ minLength: 1 }),
|
|
1626
|
+
});
|
|
1627
|
+
export const AuthUserIdentitiesUnlinkResponseSchema = Type.Object({
|
|
1628
|
+
success: Type.Boolean(),
|
|
1629
|
+
});
|