@qlever-llc/trellis 0.10.7 → 0.10.9

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.
Files changed (57) hide show
  1. package/esm/auth/protocol.d.ts +120 -3
  2. package/esm/auth/protocol.d.ts.map +1 -1
  3. package/esm/auth/protocol.js +43 -1
  4. package/esm/contract_support/mod.d.ts +1 -1
  5. package/esm/contract_support/mod.d.ts.map +1 -1
  6. package/esm/contract_support/mod.js +1 -1
  7. package/esm/contract_support/protocol.d.ts +67 -0
  8. package/esm/contract_support/protocol.d.ts.map +1 -1
  9. package/esm/contract_support/protocol.js +90 -0
  10. package/esm/generated-sdk/auth/contract.d.ts +1 -1
  11. package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
  12. package/esm/generated-sdk/auth/contract.js +2 -2
  13. package/esm/generated-sdk/auth/schemas.d.ts +329 -2
  14. package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
  15. package/esm/generated-sdk/auth/schemas.js +3 -3
  16. package/esm/generated-sdk/auth/types.d.ts +47 -3
  17. package/esm/generated-sdk/auth/types.d.ts.map +1 -1
  18. package/esm/generated-sdk/auth/types.js +1 -1
  19. package/esm/index.d.ts +2 -2
  20. package/esm/index.d.ts.map +1 -1
  21. package/esm/index.js +1 -1
  22. package/esm/server/service.d.ts +11 -2
  23. package/esm/server/service.d.ts.map +1 -1
  24. package/esm/server/service.js +28 -4
  25. package/package.json +2 -2
  26. package/script/auth/protocol.d.ts +120 -3
  27. package/script/auth/protocol.d.ts.map +1 -1
  28. package/script/auth/protocol.js +47 -5
  29. package/script/contract_support/mod.d.ts +1 -1
  30. package/script/contract_support/mod.d.ts.map +1 -1
  31. package/script/contract_support/mod.js +8 -1
  32. package/script/contract_support/protocol.d.ts +67 -0
  33. package/script/contract_support/protocol.d.ts.map +1 -1
  34. package/script/contract_support/protocol.js +96 -1
  35. package/script/generated-sdk/auth/contract.d.ts +1 -1
  36. package/script/generated-sdk/auth/contract.d.ts.map +1 -1
  37. package/script/generated-sdk/auth/contract.js +2 -2
  38. package/script/generated-sdk/auth/schemas.d.ts +329 -2
  39. package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
  40. package/script/generated-sdk/auth/schemas.js +3 -3
  41. package/script/generated-sdk/auth/types.d.ts +47 -3
  42. package/script/generated-sdk/auth/types.d.ts.map +1 -1
  43. package/script/generated-sdk/auth/types.js +1 -1
  44. package/script/index.d.ts +2 -2
  45. package/script/index.d.ts.map +1 -1
  46. package/script/index.js +9 -2
  47. package/script/server/service.d.ts +11 -2
  48. package/script/server/service.d.ts.map +1 -1
  49. package/script/server/service.js +27 -3
  50. package/src/auth/protocol.ts +55 -1
  51. package/src/contract_support/mod.ts +12 -0
  52. package/src/contract_support/protocol.ts +137 -0
  53. package/src/index.ts +12 -0
  54. package/src/sdk/_generated/auth/contract.ts +2 -2
  55. package/src/sdk/_generated/auth/schemas.ts +3 -3
  56. package/src/sdk/_generated/auth/types.ts +4 -4
  57. package/src/server/service.ts +52 -3
@@ -5,7 +5,7 @@ exports.AuthResolveDeviceUserAuthoritiesRequestSchema = exports.AuthResolveDevic
5
5
  exports.HealthResponseSchema = exports.HealthRequestSchema = exports.AuthUsersUpdateResponseSchema = exports.AuthUsersUpdateRequestSchema = exports.AuthUsersPasswordResetCreateRequestSchema = exports.AuthUsersPasswordChangeResponseSchema = exports.AuthUsersPasswordChangeRequestSchema = exports.AuthUsersListResponseSchema = exports.AuthUsersListRequestSchema = exports.AuthUsersIdentityLinkCreateRequestSchema = exports.AuthUsersGetResponseSchema = exports.AuthUsersGetRequestSchema = exports.AuthUsersCreateResponseSchema = exports.AuthUsersCreateRequestSchema = exports.AuthUsersAccountFlowCreateResponseSchema = exports.AuthUserIdentitiesUnlinkResponseSchema = exports.AuthUserIdentitiesUnlinkRequestSchema = exports.AuthUserIdentitiesListResponseSchema = exports.AuthUserIdentitiesListRequestSchema = exports.AuthSessionsRevokedEventSchema = exports.AuthSessionsRevokeResponseSchema = exports.AuthSessionsRevokeRequestSchema = exports.AuthSessionsMeResponseSchema = exports.AuthSessionsMeRequestSchema = exports.AuthSessionsLogoutResponseSchema = exports.AuthSessionsLogoutRequestSchema = exports.AuthSessionsListResponseSchema = exports.AuthSessionsListRequestSchema = exports.AuthServiceInstancesRemoveResponseSchema = exports.AuthServiceInstancesRemoveRequestSchema = exports.AuthServiceInstancesProvisionResponseSchema = exports.AuthServiceInstancesProvisionRequestSchema = exports.AuthServiceInstancesListResponseSchema = exports.AuthServiceInstancesListRequestSchema = exports.AuthServiceInstancesEnableResponseSchema = exports.AuthServiceInstancesEnableRequestSchema = exports.AuthServiceInstancesDisableResponseSchema = exports.AuthServiceInstancesDisableRequestSchema = exports.AuthResolveDeviceUserAuthoritiesResponseSchema = void 0;
6
6
  // Generated from ./generated/contracts/manifests/trellis.auth@v1.json
7
7
  exports.AuthCapabilitiesListRequestSchema = { "properties": { "limit": { "maximum": 500, "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["limit"], "type": "object" };
8
- exports.AuthCapabilitiesListResponseSchema = { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "default": [], "items": { "properties": { "consequence": { "minLength": 1, "type": "string" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractDisplayName": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "key": { "minLength": 1, "type": "string" }, "source": { "anyOf": [{ "const": "contract", "type": "string" }, { "const": "platform", "type": "string" }] } }, "required": ["key", "displayName", "description", "source"], "type": "object" }, "type": "array" }, "limit": { "minimum": 0, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" };
8
+ exports.AuthCapabilitiesListResponseSchema = { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "default": [], "items": { "properties": { "consequence": { "minLength": 1, "type": "string" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractDisplayName": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "direction": { "anyOf": [{ "const": "creates", "type": "string" }, { "const": "given", "type": "string" }] }, "displayName": { "minLength": 1, "type": "string" }, "key": { "minLength": 1, "type": "string" }, "source": { "anyOf": [{ "const": "contract", "type": "string" }, { "const": "platform", "type": "string" }] } }, "required": ["key", "displayName", "description", "source"], "type": "object" }, "type": "array" }, "limit": { "minimum": 0, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" };
9
9
  exports.AuthCapabilityGroupsDeleteRequestSchema = { "properties": { "groupKey": { "minLength": 1, "type": "string" } }, "required": ["groupKey"], "type": "object" };
10
10
  exports.AuthCapabilityGroupsDeleteResponseSchema = { "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" };
11
11
  exports.AuthCapabilityGroupsGetRequestSchema = { "properties": { "groupKey": { "minLength": 1, "type": "string" } }, "required": ["groupKey"], "type": "object" };
@@ -27,7 +27,7 @@ exports.AuthDeploymentAuthorityAcceptMigrationRequestSchema = { "properties": {
27
27
  exports.AuthDeploymentAuthorityAcceptResponseSchema = { "properties": { "authority": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredState": { "properties": { "capabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "needs": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "resources": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" }, "type": "array" }, "surfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" } }, "required": ["needs", "capabilities", "resources", "surfaces"], "type": "object" }, "disabled": { "type": "boolean" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "kind", "disabled", "desiredState", "version", "createdAt", "updatedAt"], "type": "object" } }, "required": ["authority"], "type": "object" };
28
28
  exports.AuthDeploymentAuthorityAcceptUpdateRequestSchema = { "properties": { "expectedDesiredVersion": { "minLength": 1, "type": "string" }, "planId": { "minLength": 1, "type": "string" } }, "required": ["planId"], "type": "object" };
29
29
  exports.AuthDeploymentAuthorityGetRequestSchema = { "properties": { "deploymentId": { "minLength": 1, "type": "string" } }, "required": ["deploymentId"], "type": "object" };
30
- exports.AuthDeploymentAuthorityGetResponseSchema = { "properties": { "authority": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredState": { "properties": { "capabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "needs": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "resources": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" }, "type": "array" }, "surfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" } }, "required": ["needs", "capabilities", "resources", "surfaces"], "type": "object" }, "disabled": { "type": "boolean" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "kind", "disabled", "desiredState", "version", "createdAt", "updatedAt"], "type": "object" }, "grantOverrides": { "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }] }, "type": "array" }, "materializedAuthority": { "anyOf": [{ "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "error": { "minLength": 1, "type": "string" }, "grants": { "items": { "type": "object" }, "type": "array" }, "reconciledAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resourceBindings": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "binding": { "patternProperties": { "^.*$": {} }, "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "limits": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "kind", "alias", "binding", "limits", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "status": { "anyOf": [{ "const": "current", "type": "string" }, { "const": "pending", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "status", "resourceBindings", "grants", "reconciledAt"], "type": "object" }, { "type": "null" }] }, "portalRoute": { "anyOf": [{ "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "entryUrl": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "portalId", "entryUrl", "disabled", "updatedAt"], "type": "object" }, { "type": "null" }] } }, "required": ["authority", "materializedAuthority", "portalRoute", "grantOverrides"], "type": "object" };
30
+ exports.AuthDeploymentAuthorityGetResponseSchema = { "properties": { "authority": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredState": { "properties": { "capabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "needs": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "resources": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" }, "type": "array" }, "surfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" } }, "required": ["needs", "capabilities", "resources", "surfaces"], "type": "object" }, "disabled": { "type": "boolean" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "kind", "disabled", "desiredState", "version", "createdAt", "updatedAt"], "type": "object" }, "grantOverrides": { "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }] }, "type": "array" }, "materializedAuthority": { "anyOf": [{ "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "error": { "minLength": 1, "type": "string" }, "grants": { "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" } }, "required": ["kind", "capability"], "type": "object" }, { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "surface", "type": "string" }, "name": { "minLength": 1, "type": "string" }, "surfaceKind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] } }, "required": ["kind", "contractId", "surfaceKind", "name"], "type": "object" }, { "properties": { "direction": { "anyOf": [{ "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }] }, "grantSource": { "anyOf": [{ "const": "owned-surface", "type": "string" }, { "const": "used-surface", "type": "string" }, { "const": "resource-binding", "type": "string" }, { "const": "platform-service", "type": "string" }, { "const": "transfer", "type": "string" }] }, "kind": { "const": "nats", "type": "string" }, "requiredCapabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "subject": { "minLength": 1, "type": "string" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "direction", "subject", "requiredCapabilities", "grantSource"], "type": "object" }] }, "type": "array" }, "reconciledAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resourceBindings": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "binding": { "patternProperties": { "^.*$": {} }, "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "limits": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "kind", "alias", "binding", "limits", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "status": { "anyOf": [{ "const": "current", "type": "string" }, { "const": "pending", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "status", "resourceBindings", "grants", "reconciledAt"], "type": "object" }, { "type": "null" }] }, "portalRoute": { "anyOf": [{ "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "entryUrl": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "portalId", "entryUrl", "disabled", "updatedAt"], "type": "object" }, { "type": "null" }] } }, "required": ["authority", "materializedAuthority", "portalRoute", "grantOverrides"], "type": "object" };
31
31
  exports.AuthDeploymentAuthorityGrantOverridesListRequestSchema = { "properties": { "limit": { "maximum": 500, "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["limit"], "type": "object" };
32
32
  exports.AuthDeploymentAuthorityGrantOverridesListResponseSchema = { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "default": [], "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }] }, "type": "array" }, "limit": { "minimum": 0, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" };
33
33
  exports.AuthDeploymentAuthorityGrantOverridesPutRequestSchema = { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "overrides": { "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "web", "type": "string" }, "origin": { "minLength": 1, "type": "string" }, "sessionPublicKey": { "type": "null" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "capabilityGroupKey": { "type": "null" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }, { "properties": { "capability": { "type": "null" }, "capabilityGroupKey": { "minLength": 1, "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "grantKind": { "const": "capability-group", "type": "string" }, "identityKind": { "const": "session", "type": "string" }, "origin": { "type": "null" }, "sessionPublicKey": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "identityKind", "grantKind", "contractId", "origin", "sessionPublicKey", "capability", "capabilityGroupKey"], "type": "object" }] }, "type": "array" } }, "required": ["deploymentId", "overrides"], "type": "object" };
@@ -42,7 +42,7 @@ exports.AuthDeploymentAuthorityPlansGetResponseSchema = { "properties": { "plan"
42
42
  exports.AuthDeploymentAuthorityPlansListRequestSchema = { "properties": { "classification": { "anyOf": [{ "const": "update", "type": "string" }, { "const": "migration", "type": "string" }] }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "limit": { "maximum": 500, "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "accepted", "type": "string" }, { "const": "rejected", "type": "string" }, { "const": "expired", "type": "string" }] } }, "required": ["limit"], "type": "object" };
43
43
  exports.AuthDeploymentAuthorityPlansListResponseSchema = { "properties": { "count": { "minimum": 0, "type": "integer" }, "entries": { "default": [], "items": { "anyOf": [{ "properties": { "classification": { "const": "update", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "decisionAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "decisionBy": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "decisionReason": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredChange": { "type": "object" }, "expiresAt": { "format": "date-time", "type": "string" }, "materializationPreview": { "type": "object" }, "planId": { "minLength": 1, "type": "string" }, "proposal": { "properties": { "contract": { "type": "object" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "proposalId": { "minLength": 1, "type": "string" }, "providedSurfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" }, "requestedNeeds": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "summary": { "type": "object" } }, "required": ["deploymentId", "contractId", "contractDigest", "requestedNeeds", "providedSurfaces"], "type": "object" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "accepted", "type": "string" }, { "const": "rejected", "type": "string" }, { "const": "expired", "type": "string" }] }, "warnings": { "items": { "minLength": 1, "type": "string" }, "type": "array" } }, "required": ["planId", "deploymentId", "proposal", "desiredChange", "materializationPreview", "warnings", "createdAt", "classification"], "type": "object" }, { "properties": { "acknowledgementRequired": { "type": "boolean" }, "classification": { "const": "migration", "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "decisionAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "decisionBy": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "decisionReason": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredChange": { "type": "object" }, "expiresAt": { "format": "date-time", "type": "string" }, "materializationPreview": { "type": "object" }, "planId": { "minLength": 1, "type": "string" }, "proposal": { "properties": { "contract": { "type": "object" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "proposalId": { "minLength": 1, "type": "string" }, "providedSurfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" }, "requestedNeeds": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "summary": { "type": "object" } }, "required": ["deploymentId", "contractId", "contractDigest", "requestedNeeds", "providedSurfaces"], "type": "object" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "accepted", "type": "string" }, { "const": "rejected", "type": "string" }, { "const": "expired", "type": "string" }] }, "warnings": { "items": { "minLength": 1, "type": "string" }, "type": "array" } }, "required": ["planId", "deploymentId", "proposal", "desiredChange", "materializationPreview", "warnings", "createdAt", "classification", "acknowledgementRequired"], "type": "object" }] }, "type": "array" }, "limit": { "minimum": 0, "type": "integer" }, "nextOffset": { "minimum": 0, "type": "integer" }, "offset": { "minimum": 0, "type": "integer" } }, "required": ["entries", "count", "offset", "limit"], "type": "object" };
44
44
  exports.AuthDeploymentAuthorityReconcileRequestSchema = { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" } }, "required": ["deploymentId"], "type": "object" };
45
- exports.AuthDeploymentAuthorityReconcileResponseSchema = { "properties": { "authority": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredState": { "properties": { "capabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "needs": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "resources": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" }, "type": "array" }, "surfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" } }, "required": ["needs", "capabilities", "resources", "surfaces"], "type": "object" }, "disabled": { "type": "boolean" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "kind", "disabled", "desiredState", "version", "createdAt", "updatedAt"], "type": "object" }, "materializedAuthority": { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "error": { "minLength": 1, "type": "string" }, "grants": { "items": { "type": "object" }, "type": "array" }, "reconciledAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resourceBindings": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "binding": { "patternProperties": { "^.*$": {} }, "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "limits": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "kind", "alias", "binding", "limits", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "status": { "anyOf": [{ "const": "current", "type": "string" }, { "const": "pending", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "status", "resourceBindings", "grants", "reconciledAt"], "type": "object" }, "reconciliation": { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "finishedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "message": { "minLength": 1, "type": "string" }, "startedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "idle", "type": "string" }, { "const": "running", "type": "string" }, { "const": "succeeded", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "state", "startedAt", "finishedAt"], "type": "object" } }, "required": ["authority", "materializedAuthority"], "type": "object" };
45
+ exports.AuthDeploymentAuthorityReconcileResponseSchema = { "properties": { "authority": { "properties": { "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "desiredState": { "properties": { "capabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "needs": { "items": { "anyOf": [{ "properties": { "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "contract", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "contractId", "required"], "type": "object" }, { "properties": { "kind": { "const": "surface", "type": "string" }, "required": { "type": "boolean" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "surface", "required"], "type": "object" }, { "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" }, "required": { "type": "boolean" } }, "required": ["kind", "capability", "required"], "type": "object" }, { "properties": { "kind": { "const": "resource", "type": "string" }, "required": { "type": "boolean" }, "resource": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" } }, "required": ["kind", "resource", "required"], "type": "object" }] }, "type": "array" }, "resources": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "definition": { "type": "object" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "required": { "type": "boolean" } }, "required": ["kind", "alias", "required"], "type": "object" }, "type": "array" }, "surfaces": { "items": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" }, "type": "array" } }, "required": ["needs", "capabilities", "resources", "surfaces"], "type": "object" }, "disabled": { "type": "boolean" }, "kind": { "anyOf": [{ "const": "service", "type": "string" }, { "const": "device", "type": "string" }, { "const": "app", "type": "string" }, { "const": "cli", "type": "string" }, { "const": "native", "type": "string" }, { "const": "device-user", "type": "string" }] }, "updatedAt": { "format": "date-time", "type": "string" }, "version": { "minLength": 1, "type": "string" } }, "required": ["deploymentId", "kind", "disabled", "desiredState", "version", "createdAt", "updatedAt"], "type": "object" }, "materializedAuthority": { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "error": { "minLength": 1, "type": "string" }, "grants": { "items": { "anyOf": [{ "properties": { "capability": { "minLength": 1, "type": "string" }, "kind": { "const": "capability", "type": "string" } }, "required": ["kind", "capability"], "type": "object" }, { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "const": "surface", "type": "string" }, "name": { "minLength": 1, "type": "string" }, "surfaceKind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] } }, "required": ["kind", "contractId", "surfaceKind", "name"], "type": "object" }, { "properties": { "direction": { "anyOf": [{ "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }] }, "grantSource": { "anyOf": [{ "const": "owned-surface", "type": "string" }, { "const": "used-surface", "type": "string" }, { "const": "resource-binding", "type": "string" }, { "const": "platform-service", "type": "string" }, { "const": "transfer", "type": "string" }] }, "kind": { "const": "nats", "type": "string" }, "requiredCapabilities": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "subject": { "minLength": 1, "type": "string" }, "surface": { "properties": { "action": { "anyOf": [{ "const": "call", "type": "string" }, { "const": "publish", "type": "string" }, { "const": "subscribe", "type": "string" }, { "const": "observe", "type": "string" }, { "const": "cancel", "type": "string" }] }, "contractId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "rpc", "type": "string" }, { "const": "operation", "type": "string" }, { "const": "event", "type": "string" }, { "const": "feed", "type": "string" }] }, "name": { "minLength": 1, "type": "string" } }, "required": ["contractId", "kind", "name"], "type": "object" } }, "required": ["kind", "direction", "subject", "requiredCapabilities", "grantSource"], "type": "object" }] }, "type": "array" }, "reconciledAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "resourceBindings": { "items": { "properties": { "alias": { "minLength": 1, "type": "string" }, "binding": { "patternProperties": { "^.*$": {} }, "type": "object" }, "createdAt": { "format": "date-time", "type": "string" }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "anyOf": [{ "const": "kv", "type": "string" }, { "const": "store", "type": "string" }, { "const": "jobs", "type": "string" }, { "const": "event-consumer", "type": "string" }, { "const": "transfer", "type": "string" }] }, "limits": { "anyOf": [{ "patternProperties": { "^.*$": {} }, "type": "object" }, { "type": "null" }] }, "updatedAt": { "format": "date-time", "type": "string" } }, "required": ["deploymentId", "kind", "alias", "binding", "limits", "createdAt", "updatedAt"], "type": "object" }, "type": "array" }, "status": { "anyOf": [{ "const": "current", "type": "string" }, { "const": "pending", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "status", "resourceBindings", "grants", "reconciledAt"], "type": "object" }, "reconciliation": { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "desiredVersion": { "minLength": 1, "type": "string" }, "finishedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "message": { "minLength": 1, "type": "string" }, "startedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "idle", "type": "string" }, { "const": "running", "type": "string" }, { "const": "succeeded", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["deploymentId", "desiredVersion", "state", "startedAt", "finishedAt"], "type": "object" } }, "required": ["authority", "materializedAuthority"], "type": "object" };
46
46
  exports.AuthDeploymentAuthorityRejectRequestSchema = { "properties": { "planId": { "minLength": 1, "type": "string" }, "reason": { "minLength": 1, "type": "string" } }, "required": ["planId"], "type": "object" };
47
47
  exports.AuthDeploymentAuthorityRejectResponseSchema = { "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" };
48
48
  exports.AuthDeploymentsCreateRequestSchema = { "anyOf": [{ "properties": { "contractCompatibilityMode": { "anyOf": [{ "const": "strict", "type": "string" }, { "const": "mutable-dev", "type": "string" }] }, "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "const": "service", "type": "string" }, "namespaces": { "items": { "minLength": 1, "type": "string" }, "type": "array" } }, "required": ["kind", "deploymentId", "namespaces"], "type": "object" }, { "properties": { "deploymentId": { "minLength": 1, "type": "string" }, "kind": { "const": "device", "type": "string" }, "reviewMode": { "anyOf": [{ "const": "none", "type": "string" }, { "const": "required", "type": "string" }] } }, "required": ["kind", "deploymentId"], "type": "object" }] };
@@ -1,7 +1,7 @@
1
1
  import type { RpcHandlerFn } from "@qlever-llc/trellis";
2
2
  import type { API } from "./api.js";
3
3
  export declare const CONTRACT_ID: "trellis.auth@v1";
4
- export declare const CONTRACT_DIGEST: "gLadyuZkZX2uxa3wnVMUJkDDddoVgRrDEzH8TIdeDyw";
4
+ export declare const CONTRACT_DIGEST: "XdqgSxkrIhWOu1ODbOk6-QHLTlI52ZP-6qhYJpIdCMc";
5
5
  export type AuthCapabilitiesListInput = {
6
6
  limit: number;
7
7
  offset?: number;
@@ -13,7 +13,9 @@ export type AuthCapabilitiesListOutput = {
13
13
  contractDigest?: string;
14
14
  contractDisplayName?: string;
15
15
  contractId?: string;
16
+ deploymentId?: string;
16
17
  description: string;
18
+ direction?: ("creates" | "given");
17
19
  displayName: string;
18
20
  key: string;
19
21
  source: ("contract" | "platform");
@@ -387,7 +389,28 @@ export type AuthDeploymentAuthorityGetOutput = {
387
389
  deploymentId: string;
388
390
  desiredVersion: string;
389
391
  error?: string;
390
- grants: Array<{}>;
392
+ grants: Array<({
393
+ capability: string;
394
+ kind: "capability";
395
+ } | {
396
+ action?: ("call" | "publish" | "subscribe" | "observe" | "cancel");
397
+ contractId: string;
398
+ kind: "surface";
399
+ name: string;
400
+ surfaceKind: ("rpc" | "operation" | "event" | "feed");
401
+ } | {
402
+ direction: ("publish" | "subscribe");
403
+ grantSource: ("owned-surface" | "used-surface" | "resource-binding" | "platform-service" | "transfer");
404
+ kind: "nats";
405
+ requiredCapabilities: Array<string>;
406
+ subject: string;
407
+ surface?: {
408
+ action?: ("call" | "publish" | "subscribe" | "observe" | "cancel");
409
+ contractId: string;
410
+ kind: ("rpc" | "operation" | "event" | "feed");
411
+ name: string;
412
+ };
413
+ })>;
391
414
  reconciledAt: (string | null);
392
415
  resourceBindings: Array<{
393
416
  alias: string;
@@ -1106,7 +1129,28 @@ export type AuthDeploymentAuthorityReconcileOutput = {
1106
1129
  deploymentId: string;
1107
1130
  desiredVersion: string;
1108
1131
  error?: string;
1109
- grants: Array<{}>;
1132
+ grants: Array<({
1133
+ capability: string;
1134
+ kind: "capability";
1135
+ } | {
1136
+ action?: ("call" | "publish" | "subscribe" | "observe" | "cancel");
1137
+ contractId: string;
1138
+ kind: "surface";
1139
+ name: string;
1140
+ surfaceKind: ("rpc" | "operation" | "event" | "feed");
1141
+ } | {
1142
+ direction: ("publish" | "subscribe");
1143
+ grantSource: ("owned-surface" | "used-surface" | "resource-binding" | "platform-service" | "transfer");
1144
+ kind: "nats";
1145
+ requiredCapabilities: Array<string>;
1146
+ subject: string;
1147
+ surface?: {
1148
+ action?: ("call" | "publish" | "subscribe" | "observe" | "cancel");
1149
+ contractId: string;
1150
+ kind: ("rpc" | "operation" | "event" | "feed");
1151
+ name: string;
1152
+ };
1153
+ })>;
1110
1154
  reconciledAt: (string | null);
1111
1155
  resourceBindings: Array<{
1112
1156
  alias: string;