@oatscenter/trellis 0.100.0-rc.59 → 0.100.0-rc.60
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/auth/browser/storage.js +3 -0
- package/auth/protocol_wasm/client/trellis_protocol_wasm_bg.wasm +0 -0
- package/auth/protocol_wasm/provider/trellis_protocol_wasm_bg.wasm +0 -0
- package/auth/protocol_wasm.d.ts +1 -1
- package/internal_sdk/generated/_internal/evidence.js +1 -1
- package/internal_sdk/generated/package.json +2 -2
- package/kv.js +3 -0
- package/package.json +2 -2
- package/service/runtime/operation_record.d.ts +6 -1
- package/service/runtime/operation_record.js +7 -2
package/auth/browser/storage.js
CHANGED
|
@@ -79,6 +79,9 @@ export class BrowserSessionStore {
|
|
|
79
79
|
]);
|
|
80
80
|
let database;
|
|
81
81
|
try {
|
|
82
|
+
// Browser custody schema version frozen at 1 for 0.100.0; changes require
|
|
83
|
+
// human review and approval, plus post-0.100.0 auto-migration unless
|
|
84
|
+
// breakage is explicitly approved.
|
|
82
85
|
const opening = indexedDB.open("trellis-oauth", 1);
|
|
83
86
|
opening.onupgradeneeded = () => {
|
|
84
87
|
opening.result.createObjectStore("credentials", { keyPath: "id" });
|
|
Binary file
|
|
Binary file
|
package/auth/protocol_wasm.d.ts
CHANGED
|
@@ -781,7 +781,7 @@ type TransferControlBase = {
|
|
|
781
781
|
receivedSeq: string;
|
|
782
782
|
consumedSeq: string;
|
|
783
783
|
};
|
|
784
|
-
/** Strict
|
|
784
|
+
/** Strict caller controls, parsed and validated by canonical Rust/WASM. */
|
|
785
785
|
export type TransferControlWire = TransferControlBase & ({
|
|
786
786
|
action: "activate";
|
|
787
787
|
receiveMaxFrameBytes: number;
|
|
@@ -6,7 +6,7 @@ export const packageEvidence = {
|
|
|
6
6
|
"digest": "S-KQhr769N2ATfSHw1c0C32DdOl42iYQCUHHUh5edtk",
|
|
7
7
|
"name": "trellis",
|
|
8
8
|
"source": "package \"trellis\";\nmodel AuthAcceptedApi {\n acceptedAt: timestamp;\n acceptedRevision: AuthRevision;\n apiId: AuthApiId;\n canonicalDigest: AuthDigest;\n capabilities: list<AuthCapabilityDefinition>;\n description: string;\n generation: AuthRevision;\n title: string;\n /// The authored release version, when the API names one.\n version?: string;\n}\n\n/// One role, role capability, role member, direct grant or app consent an import recreated or skipped.\nmodel AuthAccessChange {\n capability?: AuthCapabilityId;\n clientId?: string;\n kind: AuthAccessChangeKind;\n matchedBy?: AuthAccessMatch;\n /// The user here who was given it.\n matchedUserId?: string;\n /// Why it was skipped, in plain words.\n reason?: string;\n /// The role's name.\n role?: string;\n roleId?: ulid;\n /// The user's ID in the exporting installation.\n userId?: string;\n}\n\nenum AuthAccessChangeKind {\n \"appConsent\";\n \"assignment\";\n \"grant\";\n \"role\";\n \"roleCapability\";\n}\n\n/// How an import found a user: by their user ID, or by one of their sign-ins.\nenum AuthAccessMatch {\n \"id\";\n \"signIn\";\n}\n\n/// The access an import recreated, and what it skipped and why. A record found already present is in neither list.\nmodel AuthAccessReport {\n recreated: list<AuthAccessChange>;\n skipped: list<AuthAccessChange>;\n}\n\nenum AuthActionDirection {\n \"call\";\n \"cancel\";\n \"consume\";\n \"control\";\n \"delete\";\n \"invoke\";\n \"observe\";\n \"process\";\n \"publish\";\n \"read\";\n \"submit\";\n \"subscribe\";\n \"write\";\n}\n\nenum AuthActionKind {\n \"event\";\n \"live\";\n \"operation\";\n \"rpc\";\n \"transfer\";\n}\n\nmodel AuthActionSummary {\n direction: AuthActionDirection;\n kind: AuthActionKind;\n name: AuthName;\n}\n\nmodel AuthAdmissionRenewRequest {\n contextDigest: AuthDigest;\n}\n\nmodel AuthAdmissionRenewResponse {\n admissionCredential: string;\n expiresAt: timestamp;\n}\n\nmodel AuthApiAcceptRequest {\n canonicalDigest: AuthDigest;\n expectedAcceptedRevision: uint64;\n expectedGeneration: uint64;\n idempotencyKey: AuthIdempotencyKey;\n mappingEdits: list<AuthReviewedMappingEdit>;\n reviewId: ulid;\n roleEdits: list<AuthReviewedRoleEdit>;\n}\n\nmodel AuthApiAcceptResponse {\n api: AuthAcceptedApi;\n enforcement?: AuthEnforcementProgress;\n}\n\n/// One RPC, operation, event or live feed an API offers. Schemas are JSON\n/// Schema documents carrying the IDL's descriptions.\nmodel AuthApiAction {\n description?: string;\n /// An RPC result may carry a download.\n download: bool;\n errors: list<AuthApiActionError>;\n /// What a caller sends: an RPC's request, an operation's invocation, or a\n /// live feed's request.\n input?: json;\n kind: AuthActionKind;\n /// The action's name, such as `Users.Create`.\n name: string;\n /// What an RPC returns or an operation completes with.\n output?: json;\n /// RPC results come a page at a time.\n paginated: bool;\n /// The payload fields an event is routed by, as dotted paths.\n params: list<string>;\n /// An event's data, or each item a live feed sends.\n payload?: json;\n /// An operation's durable progress.\n progress?: json;\n /// An operation's named signals and their data.\n signals: map<json>;\n /// Uploaded bytes go straight to the handler instead of being staged.\n stream: bool;\n /// An operation's live-only updates.\n update?: json;\n /// An operation accepts uploaded bytes.\n upload: bool;\n}\n\n/// A domain error an action may return.\nmodel AuthApiActionError {\n name: string;\n /// JSON Schema of the error's data, when it carries any.\n payload?: json;\n}\n\nmodel AuthApiForceReplaceRequest {\n acknowledgeBreakage: bool;\n acknowledgeConsentImpact: bool;\n canonicalDigest: AuthDigest;\n expectedAcceptedRevision: AuthRevision;\n expectedGeneration: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n mappingEdits: list<AuthReviewedMappingEdit>;\n reviewId: ulid;\n roleEdits: list<AuthReviewedRoleEdit>;\n}\n\nmodel AuthApiGetRequest {\n apiId: AuthApiId;\n}\n\nmodel AuthApiGetResponse {\n actions: list<AuthApiAction>;\n api: AuthAcceptedApi;\n canonicalIdl: string;\n}\n\ntype AuthApiId = string(min_length=1, max_length=256);\n\nmodel AuthApiReview {\n actionChanges: list<AuthActionSummary>;\n affectedDeploymentIds: list<ulid>;\n affectedRoleIds: list<ulid>;\n apiId: AuthApiId;\n breakage: list<string>;\n canonicalDigest: AuthDigest;\n capabilityChanges: list<AuthCapabilityChange>;\n compatible: bool;\n currentAcceptedRevision?: AuthRevision;\n currentGeneration?: AuthRevision;\n expiresAt: timestamp;\n reviewId: ulid;\n}\n\nmodel AuthApiReviewRequest {\n apiId: AuthApiId;\n packageEvidence: AuthPackageEvidence;\n}\n\nmodel AuthApiReviewResponse {\n review: AuthApiReview;\n}\n\ntype AuthApisListResponse = CursorPage<AuthAcceptedApi>;\n\n/// An app's own settings, as every signed-in user of it reads them.\nmodel AuthAppConfigResponse {\n revision?: AuthConfigRevisionNumber;\n values: map<json>;\n}\n\nmodel AuthAttachment {\n admittedAt?: timestamp;\n admittedTransportPolicyDigest: AuthDigest;\n attachmentId: ulid;\n authorizationSessionId: ulid;\n brokerClientId: uint64;\n closedAt?: timestamp;\n serverId: string;\n sessionPublicKey: AuthPublicKey;\n state: AuthAttachmentState;\n}\n\nenum AuthAttachmentState {\n \"admitted\";\n \"closed\";\n \"pending\";\n}\n\nmodel AuthAuthorityRenewRequest {\n contextDigest: AuthDigest;\n}\n\nmodel AuthAuthorityRenewResponse {\n authority: AuthSignedBlob;\n catalog: AuthSignedBlob;\n contextDigest: AuthDigest;\n providers: list<AuthSignedBlob>;\n}\n\nmodel AuthAuthorizationSession {\n authorizationSessionId: ulid;\n binding: AuthRuntimeBinding;\n createdAt: timestamp;\n credentialKind: AuthCredentialKind;\n identityKeyId?: AuthKeyId;\n loginSessionId?: ulid;\n maximumContextExpiresAt?: timestamp;\n notAfter?: timestamp;\n oauthGrantId?: ulid;\n principalId: ulid;\n principalKind: AuthPrincipalKind;\n reason?: AuthRevocationReason;\n retiredAt?: timestamp;\n runtimeId: string;\n sessionPublicKey: AuthPublicKey;\n state: AuthAuthorizationSessionState;\n}\n\nmodel AuthAuthorizationSessionRevokeRequest {\n authorizationSessionId: ulid;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthAuthorizationSessionRevokeResponse {\n authorizationSessionId: ulid;\n enforcement: AuthEnforcementProgress;\n retiredAt: timestamp;\n}\n\nenum AuthAuthorizationSessionState {\n \"active\";\n \"revoked\";\n \"superseded\";\n}\n\nmodel AuthAuthorizationSessionsListRequest {\n clientId?: AuthClientId;\n deploymentId?: ulid;\n loginSessionId?: ulid;\n oauthGrantId?: ulid;\n page?: CursorQuery;\n principalId?: ulid;\n state?: AuthAuthorizationSessionState;\n}\n\ntype AuthAuthorizationSessionsListResponse = CursorPage<AuthAuthorizationSession>;\n\nenum AuthBindingKind {\n \"browser\";\n \"device\";\n \"native\";\n \"service\";\n}\n\nmodel AuthCapabilitiesListRequest {\n apiId?: AuthApiId;\n page?: CursorQuery;\n search?: AuthSearch;\n}\n\ntype AuthCapabilitiesListResponse = CursorPage<AuthCapabilityDefinition>;\n\nmodel AuthCapabilityChange {\n capabilityId: AuthCapabilityId;\n description: string;\n previousConsentRevision?: AuthRevision;\n previousIdentityGeneration?: AuthRevision;\n proposedConsentRevision?: AuthRevision;\n}\n\n/// A capability, or a developer-defined group that stands for its members.\nmodel AuthCapabilityDefinition {\n allows: list<AuthActionSummary>;\n apiId: AuthApiId;\n consentRevision: AuthRevision;\n description: string;\n grants: string;\n identity: AuthCapabilityIdentity;\n kind: AuthCapabilityKind;\n /// A group's current member capabilities.\n members: list<string>;\n title: string;\n}\n\nmodel AuthCapabilityGrant {\n capability: AuthCapabilityIdentity;\n expiresAt?: timestamp;\n grantId: ulid;\n principalId: ulid;\n revision: AuthRevision;\n}\n\nmodel AuthCapabilityGrantRequest {\n capabilityId: AuthCapabilityId;\n expectedRevision: uint64;\n expiresAt?: timestamp;\n idempotencyKey: AuthIdempotencyKey;\n principalId: ulid;\n}\n\nmodel AuthCapabilityGrantResponse {\n enforcement?: AuthEnforcementProgress;\n grant: AuthCapabilityGrant;\n}\n\nmodel AuthCapabilityGrantsListRequest {\n capabilityId?: AuthCapabilityId;\n page?: CursorQuery;\n principalId?: ulid;\n}\n\ntype AuthCapabilityGrantsListResponse = CursorPage<AuthCapabilityGrant>;\n\ntype AuthCapabilityId = string(min_length=1, max_length=512);\n\nmodel AuthCapabilityIdentity {\n capabilityId: AuthCapabilityId;\n identityGeneration: AuthRevision;\n}\n\n/// The presentation group users choose access by; ungrouped capabilities\n/// belong to their API's own group.\nenum AuthCapabilityKind {\n \"capability\";\n \"group\";\n}\n\nmodel AuthCapabilityRevokeRequest {\n expectedRevision: AuthRevision;\n grantId: ulid;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthCapabilitySelection {\n optionalCapabilities: list<AuthCapabilityId>;\n requiredCapabilities: list<AuthCapabilityId>;\n}\n\nmodel AuthCapabilitySource {\n grantId?: ulid;\n kind: AuthCapabilitySourceKind;\n mappingId?: ulid;\n providerId?: ulid;\n roleId?: ulid;\n}\n\n/// How a principal holds a capability: a role, a direct grant, a role an\n/// identity provider's group gives, being the default administrator, or, for\n/// the \"account\" group, being an active user.\nenum AuthCapabilitySourceKind {\n \"account\";\n \"administrator\";\n \"direct\";\n \"oidcRole\";\n \"role\";\n}\n\ntype AuthClientId = string(min_length=1, max_length=2048);\n\n/// Attach an app build's settings declaration to its registered client.\nmodel AuthConfigAppDeclareRequest {\n clientId: AuthClientId;\n idempotencyKey: AuthIdempotencyKey;\n /// Package evidence of the build that declares the app.\n packageEvidence: json;\n /// The app or agent request in that package, such as `acme-orders.Panel`.\n requestId: string;\n}\n\n/// What an instance did with a revision of its settings. `pending` until it\n/// reads the newest one; `rejected` when one of its own checks refused it, in\n/// which case it keeps the values it accepted last.\nenum AuthConfigApplyState {\n \"applied\";\n \"pending\";\n \"rejected\";\n}\n\nmodel AuthConfigApplyStatus {\n /// When the instance reported it, or for `pending`, when the newest\n /// revision was saved.\n at?: timestamp;\n /// Fields a check refused. Empty when it refused the revision as a whole.\n fields: list<AuthConfigFieldName>;\n /// The instance's own override revision; absent while it has none.\n instanceRevision?: AuthConfigRevisionNumber;\n /// For `rejected`, when every refused value that came from beneath the\n /// instance's overrides was its own override in the settings it applied\n /// last and still runs: that instance revision. Rolling the instance back\n /// to it restores those overrides without changing the deployment's\n /// settings.\n overrideRevision?: AuthConfigRevisionNumber;\n reason?: AuthConfigRejectReason;\n /// The deployment revision; absent while the deployment has none.\n revision?: AuthConfigRevisionNumber;\n /// For `rejected`, where each refused field's value came from in the\n /// revisions the instance refused: its own overrides (`instance`), its\n /// deployment's settings, or the build's default. Rolling back the layer\n /// that holds a refused value undoes it.\n sources?: map<AuthConfigSource>;\n state: AuthConfigApplyState;\n}\n\n/// Configuration changed; the payload says whose and the current revision, never values.\nmodel AuthConfigChanged {\n clientId?: AuthClientId;\n deploymentId?: ulid;\n eventId: ulid;\n instanceId?: ulid;\n occurredAt: timestamp;\n /// Absent when a new app declaration changed what an app reads and its\n /// client has no stored settings.\n revision?: AuthConfigRevisionNumber;\n}\n\n/// A field a build declares, before anything is stored for it.\nmodel AuthConfigDeclaration {\n default?: json;\n description: string;\n name: AuthConfigFieldName;\n required: bool;\n restart: bool;\n /// JSON Schema of the field's type.\n schema: json;\n secret: bool;\n title: string;\n}\n\nmodel AuthConfigField {\n default?: json;\n description: string;\n /// Why the value stored here doesn't fit this build: the wrong type, or a\n /// secret stored as a plain setting or the other way round. This build\n /// ignores it and keeps the value stored before it, or the default.\n invalid?: string;\n /// A value is stored for this field here or on the deployment.\n isSet: bool;\n name: AuthConfigFieldName;\n required: bool;\n /// Read only when the participant connects.\n restart: bool;\n /// JSON Schema of the field's type.\n schema: json;\n /// Write-only; its value is never returned to an administrator.\n secret: bool;\n source: AuthConfigSource;\n /// A plain value is stored under this secret's name, saved before the\n /// build declared it secret. It is never shown or delivered; setting the\n /// field as a secret replaces it.\n storedAsPlain: bool;\n title: string;\n /// The effective value of a setting. Never present for a secret.\n value?: json;\n}\n\ntype AuthConfigFieldName = string(min_length=1, max_length=128);\n\nmodel AuthConfigGetRequest {\n target: AuthConfigTarget;\n}\n\n/// Which configuration an instance loaded when it last connected.\nmodel AuthConfigInstanceStatus {\n connectedAt?: timestamp;\n connectedInstanceRevision?: AuthConfigRevisionNumber;\n connectedRevision?: AuthConfigRevisionNumber;\n instanceId: ulid;\n /// A setting that applies after a restart has a different value for this\n /// instance's build than the one it loaded when it connected.\n restartPending: bool;\n /// What the instance did with its newest settings. Absent when its build\n /// declares no settings.\n settings?: AuthConfigApplyStatus;\n title: string;\n}\n\n/// What a service or device did with the settings it read last.\nenum AuthConfigOutcome {\n \"applied\";\n \"rejected\";\n}\n\nmodel AuthConfigOwnReportRequest {\n /// Fields its checks refused; empty for `applied`.\n fields: list<AuthConfigFieldName>;\n /// The instance revision it read, as `Config.Own.Get` returned it.\n instanceRevision?: AuthConfigRevisionNumber;\n /// Why, in its own words. Auth keeps the first KiB and marks a cut with `…`.\n reason?: string;\n /// The deployment revision it read, as `Config.Own.Get` returned it.\n revision?: AuthConfigRevisionNumber;\n state: AuthConfigOutcome;\n}\n\n/// Why an instance's checks refused a revision, in its own words.\ntype AuthConfigRejectReason = string(max_length=1024);\n\nmodel AuthConfigResponse {\n /// Whether a build's declaration is known: the installed build's, an app's\n /// attached declaration, or, for a claim, the build its service submitted.\n declared: bool;\n /// For an instance target, the deployment revision under its overrides.\n deploymentRevision?: AuthConfigRevisionNumber;\n fields: list<AuthConfigField>;\n instances: list<AuthConfigInstanceStatus>;\n /// Required fields without a usable value; instances wait until they are set.\n missing: list<AuthConfigFieldName>;\n /// Current revision stored at this target; absent before the first write.\n revision?: AuthConfigRevisionNumber;\n target: AuthConfigTarget;\n /// Stored values the build doesn't declare, here and on the deployment.\n unused: list<AuthConfigUnusedValue>;\n}\n\nmodel AuthConfigRevision {\n /// Fields this revision changed from the one before it.\n changed: list<AuthConfigFieldName>;\n /// Secret fields whose value this revision changed.\n changedSecrets: list<AuthConfigFieldName>;\n createdAt: timestamp;\n createdBy: string;\n current: bool;\n /// Fields whose plain values are left out of `values` because the\n /// installed build declares them secret.\n hiddenValues: list<AuthConfigFieldName>;\n revision: AuthConfigRevisionNumber;\n /// Stored settings; secrets are never included, nor plain values stored\n /// under a name the installed build declares secret.\n values: map<json>;\n}\n\nmodel AuthConfigRevisionDeleteRequest {\n idempotencyKey: AuthIdempotencyKey;\n revision: AuthConfigRevisionNumber;\n target: AuthConfigTarget;\n}\n\ntype AuthConfigRevisionNumber = uint32(min=1);\n\nmodel AuthConfigRevisionsListRequest {\n page?: CursorQuery;\n target: AuthConfigTarget;\n}\n\ntype AuthConfigRevisionsListResponse = CursorPage<AuthConfigRevision>;\n\nmodel AuthConfigRollbackRequest {\n expectedRevision: AuthConfigRevisionNumber;\n idempotencyKey: AuthIdempotencyKey;\n /// The earlier revision whose values become a new revision.\n revision: AuthConfigRevisionNumber;\n target: AuthConfigTarget;\n}\n\n/// Show one stored secret of a deployment, instance, or service claim.\nmodel AuthConfigSecretRevealRequest {\n field: AuthConfigFieldName;\n target: AuthConfigTarget;\n}\n\n/// A stored secret's value, for the administrator who asked to see it.\nmodel AuthConfigSecretRevealResponse {\n /// Where it is stored: the target itself, or for an instance, the\n /// deployment beneath its overrides.\n source: AuthConfigSource;\n /// The stored value, as it was set.\n value: json;\n}\n\nmodel AuthConfigSetRequest {\n /// The revision this change is based on; absent only for the first write.\n expectedRevision?: AuthConfigRevisionNumber;\n idempotencyKey: AuthIdempotencyKey;\n /// Secrets by field name, stored sealed under the same rule.\n secrets?: map<json>;\n target: AuthConfigTarget;\n /// Fields whose stored value is removed, so the default or deployment value applies.\n unset?: list<AuthConfigFieldName>;\n /// Settings by field name. Any lowerCamelCase name is stored, whether or\n /// not a build declares it; a build ignores what it doesn't declare and\n /// what doesn't fit its type.\n values?: map<json>;\n}\n\n/// Where a field's effective value comes from.\nenum AuthConfigSource {\n \"default\";\n \"deployment\";\n \"instance\";\n \"unset\";\n}\n\n/// Whose configuration: a deployment, one of its instances, an app's client,\n/// or a service claim waiting for its service. A claim's settings become its\n/// deployment's when the claim is approved.\nmodel AuthConfigTarget {\n claimId?: ulid;\n clientId?: AuthClientId;\n deploymentId?: ulid;\n instanceId?: ulid;\n}\n\n/// A stored value the build doesn't declare. It is kept for a build that does.\nmodel AuthConfigUnusedValue {\n name: AuthConfigFieldName;\n secret: bool;\n source: AuthConfigSource;\n /// The stored value of a setting. Never present for a secret.\n value?: json;\n}\n\nmodel AuthConnectionsKickRequest {\n attachmentId: ulid;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthConnectionsKickResponse {\n attachmentId: ulid;\n enforcement: AuthEnforcementProgress;\n}\n\nmodel AuthConnectionsListRequest {\n authorizationSessionId?: ulid;\n page?: CursorQuery;\n principalId?: ulid;\n state?: AuthAttachmentState;\n}\n\ntype AuthConnectionsListResponse = CursorPage<AuthAttachment>;\n\nmodel AuthConsentChoice {\n capability: AuthCapabilityIdentity;\n consentRevision: AuthRevision;\n decision: AuthDecision;\n expiresAt?: timestamp;\n}\n\nenum AuthCredentialKind {\n \"oauthGrant\";\n \"provisionedIdentity\";\n}\n\ntype AuthCursor = string(min_length=1, max_length=4096);\n\nenum AuthDecision {\n \"approved\";\n \"declined\";\n}\n\nmodel AuthDelegation {\n binding: AuthDelegationBinding;\n choices: list<AuthConsentChoice>;\n delegationId: ulid;\n principalId: ulid;\n revision: AuthRevision;\n}\n\nmodel AuthDelegationBinding {\n clientId: AuthClientId;\n durableDpopJkt?: string;\n kind: AuthPublicClientKind;\n origin?: string;\n}\n\nmodel AuthDelegationReviewRequest {\n delegationId: ulid;\n}\n\nmodel AuthDelegationReviewResponse {\n currentCapabilities: list<AuthCapabilityDefinition>;\n delegation: AuthDelegation;\n}\n\nmodel AuthDelegationRevokeRequest {\n delegationId: ulid;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthDelegationsListRequest {\n clientId?: AuthClientId;\n page?: CursorQuery;\n principalId?: ulid;\n}\n\ntype AuthDelegationsListResponse = CursorPage<AuthDelegation>;\n\nmodel AuthDeployment {\n deploymentId: ulid;\n implementationDigest: AuthDigest;\n /// When the deployment was imported into this installation from another one with `Deployments.Import`; unset for a deployment created here.\n importedAt?: timestamp;\n kind: AuthDeploymentKind;\n participantId: string;\n revision: AuthRevision;\n selection: AuthCapabilitySelection;\n state: AuthDeploymentState;\n title: string;\n}\n\nmodel AuthDeploymentApplyRequest {\n acknowledgeSharedApis?: bool;\n /// Confirms approving webhook endpoints that check nothing (`verify none`).\n acknowledgeUnauthenticatedWebhooks?: bool;\n deploymentId: ulid;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n packageEvidence: AuthPackageEvidence;\n}\n\nmodel AuthDeploymentCreateRequest {\n acknowledgeSharedApis?: bool;\n /// Confirms approving webhook endpoints that check nothing (`verify none`).\n acknowledgeUnauthenticatedWebhooks?: bool;\n idempotencyKey: AuthIdempotencyKey;\n kind: AuthDeploymentKind;\n packageEvidence: AuthPackageEvidence;\n participantId: string;\n title: AuthName;\n}\n\n/// Which finished export to download.\nmodel AuthDeploymentExportDownloadRequest {\n exportId: ulid;\n}\n\nmodel AuthDeploymentExportDownloadResponse {\n exportId: ulid;\n size: uint64;\n}\n\n/// Which service deployment to export.\nmodel AuthDeploymentExportRequest {\n deploymentId: ulid;\n}\n\n/// A finished export, ready to download until it expires.\nmodel AuthDeploymentExportResult {\n expiresAt: timestamp;\n exportId: ulid;\n report: AuthServiceBundleReport;\n /// Size of the bundle's content in bytes.\n size: uint64;\n}\n\nmodel AuthDeploymentGetRequest {\n deploymentId: ulid;\n}\n\nmodel AuthDeploymentGetResponse {\n deployment: AuthDeployment;\n}\n\n/// Data already in this installation's NATS under the deployment's own names,\n/// which loading the bundle replaces: left behind by an earlier attempt of\n/// the import, or by the deployment's earlier life here.\nmodel AuthDeploymentImportReplacement {\n /// The stream.\n stream: string;\n /// The subjects whose messages are replaced, when the stream is shared; absent when the whole stream is.\n subjects?: string;\n}\n\n/// How to import the bundle content sent with the operation.\nmodel AuthDeploymentImportRequest {\n acknowledgeSharedApis?: bool;\n /// Confirms importing webhook endpoints that check nothing (`verify none`).\n acknowledgeUnauthenticatedWebhooks?: bool;\n /// Verify the bundle and report what the import would do, changing nothing.\n check?: bool;\n /// Approves replacing what `replaces` lists with the bundle's data. Without\n /// it, an import that finds any of it changes nothing.\n replaceExisting?: bool;\n}\n\nmodel AuthDeploymentImportResult {\n /// Whether the import changed anything: false for a check, and for an import that found something to replace without `replaceExisting`.\n applied: bool;\n /// What loading the bundle replaces, or would replace.\n replaces: list<AuthDeploymentImportReplacement>;\n report: AuthServiceBundleReport;\n /// Whether this run went on with an earlier import of the same deployment that stopped before its data loaded.\n resumed: bool;\n}\n\n/// One deployment's own retirement rules. An absent field follows the installation.\nmodel AuthDeploymentInstancePolicy {\n retireOffline?: bool;\n retireOfflineAfterSeconds?: AuthRetirementSeconds;\n retireProvisioned?: bool;\n}\n\nenum AuthDeploymentKind {\n \"device\";\n \"service\";\n}\n\nmodel AuthDeploymentMutationRequest {\n deploymentId: ulid;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthDeploymentMutationResponse {\n deployment: AuthDeployment;\n enforcement?: AuthEnforcementProgress;\n}\n\nenum AuthDeploymentState {\n \"disabled\";\n \"enabled\";\n \"removed\";\n}\n\ntype AuthDeploymentsListResponse = CursorPage<AuthDeployment>;\n\ntype AuthDescription = string(max_length=4096);\n\nmodel AuthDeviceCompanion {\n clientId: AuthClientId;\n instanceId: ulid;\n oauthGrantId: ulid;\n requestId: string;\n revision: AuthRevision;\n}\n\nmodel AuthDeviceCompanionAttachRequest {\n confirmationCode: AuthDeviceConfirmationCode;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n reviewId: ulid;\n}\n\nmodel AuthDeviceCompanionRevokeRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n instanceId: ulid;\n}\n\ntype AuthDeviceConfirmationCode = string(min_length=8, max_length=8);\n\nmodel AuthDeviceEnrollmentRequest {\n challengeDigest: AuthDigest;\n confirmationCode: AuthDeviceConfirmationCode;\n connectionId: ulid;\n iat: AuthDeviceProofIssuedAt;\n identityKeyId: AuthDigest;\n identityPublicKey: AuthPublicKey;\n participantId: string;\n proof: AuthDeviceProof;\n provisioningSecret?: AuthDeviceProvisioningSecret;\n requestId: ulid;\n sessionKey: AuthPublicKey;\n sessionProof: AuthDeviceProof;\n}\n\nmodel AuthDeviceProof {\n format: string;\n signature: string;\n}\n\n/// JSON-number Unix milliseconds; the session-proof verifier also requires an integer.\ntype AuthDeviceProofIssuedAt = number(min=0, max=9007199254740991);\n\ntype AuthDeviceProvisioningSecret = string(min_length=43, max_length=43);\n\nmodel AuthDeviceReview {\n companionClientId?: AuthClientId;\n companionRequestId?: string;\n companionRequired?: bool;\n deploymentId: ulid;\n expiresAt: timestamp;\n instanceId: ulid;\n participantId: string;\n reviewId: ulid;\n revision: AuthRevision;\n state: AuthDeviceReviewState;\n}\n\nmodel AuthDeviceReviewDecideRequest {\n confirmationCode: AuthDeviceConfirmationCode;\n decision: AuthDecision;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n reviewId: ulid;\n}\n\nmodel AuthDeviceReviewGetRequest {\n confirmationCode: AuthDeviceConfirmationCode;\n reviewId: ulid;\n}\n\nmodel AuthDeviceReviewResponse {\n review: AuthDeviceReview;\n}\n\nenum AuthDeviceReviewState {\n \"approved\";\n \"expired\";\n \"pending\";\n \"rejected\";\n}\n\ntype AuthDeviceReviewsListResponse = CursorPage<AuthDeviceReview>;\n\nmodel AuthDiagnosticsCertificate {\n issuer: string;\n notAfter: timestamp;\n path: string;\n /// `served` or `issuingCa`.\n role: string;\n sha256Fingerprint: string;\n subject: string;\n}\n\n/// The certificate the Trellis listener serves and the CA that issued a\n/// generated one.\nmodel AuthDiagnosticsCertificates {\n certificates: list<AuthDiagnosticsCertificate>;\n findings: list<AuthDiagnosticsFinding>;\n status: AuthDiagnosticsStatus;\n /// `tls`, `proxy` (a proxy in front serves the certificate) or\n /// `loopbackDevelopment` (plain HTTP on loopback).\n transport: string;\n}\n\nmodel AuthDiagnosticsDeployment {\n deploymentId: string;\n instances: list<AuthDiagnosticsInstance>;\n participantId: string;\n status: AuthDiagnosticsStatus;\n title: string;\n}\n\n/// Free and total space of the file system holding the Auth database.\nmodel AuthDiagnosticsDisk {\n findings: list<AuthDiagnosticsFinding>;\n free?: uint64;\n path: string;\n status: AuthDiagnosticsStatus;\n total?: uint64;\n}\n\nmodel AuthDiagnosticsFailure {\n at: timestamp;\n code?: string;\n error: string;\n /// The reference the caller was shown, and the `error_id` of the log line.\n id: string;\n route?: string;\n}\n\n/// The most recent failures this server process logged with a reference,\n/// newest first. The process keeps the last 50 in memory only.\nmodel AuthDiagnosticsFailures {\n failures: list<AuthDiagnosticsFailure>;\n findings: list<AuthDiagnosticsFinding>;\n status: AuthDiagnosticsStatus;\n}\n\n/// One thing an operator should look at.\nmodel AuthDiagnosticsFinding {\n message: string;\n status: AuthDiagnosticsStatus;\n}\n\n/// Each service deployment with its instances, and every instance or device\n/// that is not healthy, with each failing check.\nmodel AuthDiagnosticsHealth {\n deployments: list<AuthDiagnosticsDeployment>;\n findings: list<AuthDiagnosticsFinding>;\n status: AuthDiagnosticsStatus;\n}\n\nmodel AuthDiagnosticsInstance {\n instanceId: string;\n /// `offline`, `waitingForSettings`, `waitingForApproval` or `starting`\n /// before it reports on its current connection, then the health it reports:\n /// `healthy`, `degraded`, `unhealthy`, or `unresponsive` once its heartbeats stop.\n /// `unknown` when its health couldn't be read or is kept on another host.\n state: string;\n status: AuthDiagnosticsStatus;\n}\n\n/// JetStream storage and memory, used and reserved, against their limits.\n/// Absent numbers are ones JetStream did not answer.\nmodel AuthDiagnosticsJetStream {\n consumers?: uint64;\n findings: list<AuthDiagnosticsFinding>;\n maxConsumers?: uint64;\n maxStreams?: uint64;\n memory?: AuthDiagnosticsUsage;\n serverMemory?: AuthDiagnosticsUsage;\n serverStorage?: AuthDiagnosticsUsage;\n status: AuthDiagnosticsStatus;\n storage?: AuthDiagnosticsUsage;\n streams?: uint64;\n}\n\n/// The server process that answered.\nmodel AuthDiagnosticsServer {\n findings: list<AuthDiagnosticsFinding>;\n installationId: string;\n /// The `trellis-server` mode the answering process runs, such as `all`.\n mode: string;\n startedAt: timestamp;\n status: AuthDiagnosticsStatus;\n uptimeSeconds: uint64;\n version: string;\n}\n\nmodel AuthDiagnosticsSetAside {\n at: timestamp;\n error: string;\n /// The Auth effect's kind, such as `kick`, or `healthStatusEvent`.\n kind: string;\n}\n\n/// How serious a diagnostics finding is. A section's and the report's status\n/// is the worst of the findings under it.\nenum AuthDiagnosticsStatus {\n \"ok\";\n \"problem\";\n \"warning\";\n}\n\nmodel AuthDiagnosticsStuckWork {\n error: string;\n since: timestamp;\n workId: string;\n}\n\n/// Bytes stored and reserved against a limit.\nmodel AuthDiagnosticsUsage {\n /// Absent when no limit is set.\n limit?: uint64;\n reserved: uint64;\n used: uint64;\n}\n\n/// Background work that cannot finish: enforcement whose pages keep failing,\n/// and effects and health events set aside because trying again cannot help.\nmodel AuthDiagnosticsWork {\n findings: list<AuthDiagnosticsFinding>;\n setAside: list<AuthDiagnosticsSetAside>;\n status: AuthDiagnosticsStatus;\n stuckEnforcement: list<AuthDiagnosticsStuckWork>;\n}\n\ntype AuthDigest = string(min_length=1, max_length=128);\n\nmodel AuthEffectiveAccessResponse {\n capabilities: list<AuthEffectiveCapability>;\n principal: AuthPrincipal;\n}\n\nmodel AuthEffectiveCapability {\n definition: AuthCapabilityDefinition;\n expiresAt?: timestamp;\n sources: list<AuthCapabilitySource>;\n}\n\n/// The retirement rules that apply to one deployment.\nmodel AuthEffectiveInstancePolicy {\n retireOffline: bool;\n retireOfflineAfterSeconds: AuthRetirementSeconds;\n retireProvisioned: bool;\n}\n\nmodel AuthEmpty {\n}\n\nmodel AuthEnforcementProgress {\n failedKicks: uint64;\n pendingKicks: uint64;\n retiredSessions: uint64;\n scannedSessions: uint64;\n state: AuthEnforcementState;\n workId: ulid;\n}\n\nenum AuthEnforcementState {\n \"completed\";\n \"queued\";\n \"running\";\n}\n\nmodel AuthEnrollmentAlert {\n count: uint64;\n kind: AuthEnrollmentAlertKind;\n lastAt: timestamp;\n}\n\n/// `revokedUsed` and `expiredUsed`: someone presented it after it stopped\n/// working, so a copy is still out there. `instanceLimit` and `rateLimited`: it\n/// hit its cap or hourly rate. `participantMismatch` and `buildMismatch`: a\n/// process of another service, or with another build, presented it.\nenum AuthEnrollmentAlertKind {\n \"buildMismatch\";\n \"expiredUsed\";\n \"instanceLimit\";\n \"participantMismatch\";\n \"rateLimited\";\n \"revokedUsed\";\n}\n\ntype AuthEnrollmentLimit = uint32(min=1, max=1000000);\n\n/// A secret that lets the processes holding it register themselves as new\n/// instances of one deployment. Only its hash is kept.\nmodel AuthEnrollmentSecret {\n /// What went wrong with it in the last 24 hours. Empty when nothing did.\n alerts: list<AuthEnrollmentAlert>;\n createdAt: timestamp;\n /// Its instances may only run the deployment's installed build: their own updates are refused.\n currentBuildOnly: bool;\n deploymentId: ulid;\n /// The most new instances it may create in any hour.\n enrollmentsPerHour: AuthEnrollmentLimit;\n /// After this it creates no more instances. Absent: it works until revoked.\n expiresAt?: timestamp;\n /// Instances it created that are not retired or removed.\n instances: uint64;\n /// When it last created an instance.\n lastUsedAt?: timestamp;\n /// The most instances it may have at once, counting those not retired or removed.\n maxInstances: AuthEnrollmentLimit;\n revision: AuthRevision;\n revokedAt?: timestamp;\n secretId: ulid;\n title: AuthName;\n}\n\nmodel AuthEnrollmentSecretIssueRequest {\n currentBuildOnly?: bool;\n deploymentId: ulid;\n /// Absent takes the installation's `secretEnrollmentsPerHour`.\n enrollmentsPerHour?: AuthEnrollmentLimit;\n expiresAt?: timestamp;\n idempotencyKey: AuthIdempotencyKey;\n /// Absent takes the installation's `secretMaxInstances`.\n maxInstances?: AuthEnrollmentLimit;\n title: AuthName;\n}\n\nmodel AuthEnrollmentSecretIssueResponse {\n secret: AuthEnrollmentSecret;\n /// The secret, shown only in the first response. Trellis keeps only its\n /// hash, so a repeated request with the same idempotency key returns the\n /// record without it.\n text?: string;\n}\n\nmodel AuthEnrollmentSecretResponse {\n secret: AuthEnrollmentSecret;\n}\n\nmodel AuthEnrollmentSecretRevokeRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n /// Also retire every instance the secret created, which disconnects them.\n retireInstances?: bool;\n secretId: ulid;\n}\n\nmodel AuthEnrollmentSecretRevokeResponse {\n /// Connections of those instances that were still open when the revocation\n /// committed. Trellis closes them through its enforcement pipeline.\n closingConnections: uint64;\n /// Instances retired with the secret.\n retiredInstances: uint64;\n secret: AuthEnrollmentSecret;\n}\n\ntype AuthEnrollmentSecretText = string(min_length=1, max_length=256);\n\n/// Replaces the secret's title and limits; an absent `expiresAt` means it never expires.\nmodel AuthEnrollmentSecretUpdateRequest {\n currentBuildOnly: bool;\n enrollmentsPerHour: AuthEnrollmentLimit;\n expectedRevision: AuthRevision;\n expiresAt?: timestamp;\n idempotencyKey: AuthIdempotencyKey;\n maxInstances: AuthEnrollmentLimit;\n secretId: ulid;\n title: AuthName;\n}\n\nmodel AuthEnrollmentSecretsListRequest {\n deploymentId: ulid;\n page?: CursorQuery;\n}\n\ntype AuthEnrollmentSecretsListResponse = CursorPage<AuthEnrollmentSecret>;\n\nmodel AuthErrorDetails {\n code: AuthMachineCode;\n}\n\nmodel AuthEventConsumerEvidence {\n consumer: string;\n filterSubjects: list<string>;\n replayConsumer: string;\n stream: string;\n}\n\ntype AuthExistingPassword = string(max_length=512);\n\ntype AuthGraceSeconds = uint32(max=86400);\n\ntype AuthIdempotencyKey = ulid;\n\nmodel AuthIdentityLinkCreateRequest {\n idempotencyKey: AuthIdempotencyKey;\n providerId: ulid;\n}\n\nmodel AuthIdentityLinkCreateResponse {\n authorizationUrl: string;\n expiresAt: timestamp;\n}\n\nmodel AuthIdentityLinkProvider {\n providerId: ulid;\n title: string;\n}\n\nmodel AuthIdentityLinkProvidersResponse {\n providers: list<AuthIdentityLinkProvider>;\n}\n\n/// The installation's rules for enrolled and offline instances.\nmodel AuthInstallationInstancePolicy {\n /// How long a just-enrolled instance that has not connected yet is protected from replacement.\n firstConnectGraceSeconds: AuthGraceSeconds;\n /// Whether instances offline longer than `retireOfflineAfterSeconds` are retired.\n retireOffline: bool;\n retireOfflineAfterSeconds: AuthRetirementSeconds;\n /// Whether provisioned instances are retired too, not only enrolled ones.\n retireProvisioned: bool;\n /// Days a retired or removed instance's record is kept.\n retiredRecordDays: AuthRecordDays;\n /// The hourly rate a new secret takes.\n secretEnrollmentsPerHour: AuthEnrollmentLimit;\n /// The instance cap a new secret takes.\n secretMaxInstances: AuthEnrollmentLimit;\n}\n\nmodel AuthInstanceMutationRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n instanceId: ulid;\n}\n\nmodel AuthInstanceMutationResponse {\n enforcement?: AuthEnforcementProgress;\n instance: AuthProvisionedInstance;\n}\n\n/// How an instance came to exist: an administrator provisioned it, or a\n/// process enrolled it with an enrollment secret.\nmodel AuthInstanceOrigin {\n kind: AuthInstanceOriginKind;\n /// The enrollment secret that created it.\n secretId?: ulid;\n secretTitle?: AuthName;\n}\n\nenum AuthInstanceOriginKind {\n \"enrolled\";\n \"provisioned\";\n}\n\nmodel AuthInstancePolicyGetRequest {\n deploymentId?: ulid;\n}\n\nmodel AuthInstancePolicyResponse {\n /// With `deploymentId`: what the deployment sets itself.\n deployment?: AuthDeploymentInstancePolicy;\n /// With `deploymentId`: what applies to it.\n effective?: AuthEffectiveInstancePolicy;\n installation: AuthInstallationInstancePolicy;\n}\n\n/// Without `deploymentId`, replaces the installation's rules with\n/// `installation`. With it, replaces the deployment's own rules with\n/// `deployment` (absent clears them).\nmodel AuthInstancePolicySetRequest {\n deployment?: AuthDeploymentInstancePolicy;\n deploymentId?: ulid;\n idempotencyKey: AuthIdempotencyKey;\n installation?: AuthInstallationInstancePolicy;\n}\n\nmodel AuthInstanceProvisionRequest {\n deploymentId: ulid;\n idempotencyKey: AuthIdempotencyKey;\n identityPublicKey?: AuthPublicKey;\n title: AuthName;\n}\n\nmodel AuthInstanceProvisionResponse {\n instance: AuthProvisionedInstance;\n provisioningSecret?: string;\n}\n\n/// `removed`: an administrator removed it. `retired`: Trellis retired it\n/// automatically (see `retiredReason`). Neither can connect or be turned on again.\nenum AuthInstanceState {\n \"active\";\n \"disabled\";\n \"removed\";\n \"retired\";\n}\n\n/// What a connected instance waits for before it can serve.\nmodel AuthInstanceWaiting {\n /// Required settings its build has no value for.\n missingSettings: list<AuthConfigFieldName>;\n /// Console page where an administrator sets them.\n settingsUrl?: string;\n /// The update its build submitted, waiting for an administrator.\n update?: AuthInstanceWaitingUpdate;\n}\n\nmodel AuthInstanceWaitingUpdate {\n /// Console page where an administrator reviews the update. Absent when the installation serves no Console.\n reviewUrl?: string;\n updateId: ulid;\n}\n\nmodel AuthInstancesListRequest {\n deploymentId?: ulid;\n page?: CursorQuery;\n}\n\ntype AuthInstancesListResponse = CursorPage<AuthProvisionedInstance>;\n\nmodel AuthIssuerRevokeRequest {\n idempotencyKey: AuthIdempotencyKey;\n keyId: AuthKeyId;\n}\n\nmodel AuthIssuerRevokeResponse {\n enforcement: AuthEnforcementProgress;\n keyId: AuthKeyId;\n}\n\nmodel AuthIssuerRotateRequest {\n expectedCurrentKeyId: AuthKeyId;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthIssuerRotateResponse {\n /// When Trellis starts signing with the new key. Until then the current key\n /// signs, while the new key's chain link reaches every participant.\n activatesAt: timestamp;\n keyId: AuthKeyId;\n rotation: AuthSignedBlob;\n}\n\nmodel AuthJobResourceEvidence {\n consumer: string;\n namespace: string;\n publishPrefix: string;\n workStream: string;\n workSubject: string;\n}\n\ntype AuthKeyId = string(min_length=1, max_length=128);\n\nenum AuthLoginMethod {\n \"local\";\n \"oidc\";\n}\n\nmodel AuthLoginRevokeRequest {\n idempotencyKey: AuthIdempotencyKey;\n loginSessionId: ulid;\n}\n\nmodel AuthLoginSession {\n claimFreshUntil?: timestamp;\n createdAt: timestamp;\n expiresAt: timestamp;\n loginSessionId: ulid;\n method: AuthLoginMethod;\n principalId: ulid;\n providerId?: ulid;\n state: AuthLoginState;\n}\n\nenum AuthLoginState {\n \"active\";\n \"revoked\";\n}\n\ntype AuthMachineCode = string(min_length=1, max_length=64);\n\n/// A dependency no held or supplied package satisfies.\nmodel AuthMissingPackage {\n /// Versions held or supplied that do not match, newest first.\n availableVersions: list<AuthShortName>;\n name: AuthName;\n /// The packages that depend on it.\n requiredBy: list<AuthName>;\n /// The version requirements its dependents state; empty when any version does.\n requirements: list<string>;\n}\n\nmodel AuthMutationResult {\n enforcement?: AuthEnforcementProgress;\n revision: AuthRevision;\n}\n\ntype AuthName = string(min_length=1, max_length=256);\n\nmodel AuthOAuthClient {\n clientId: AuthClientId;\n description: string;\n development: bool;\n enabled: bool;\n impliedConsent: list<AuthCapabilityId>;\n kind: AuthPublicClientKind;\n redirectUris: list<string>;\n revision: AuthRevision;\n signUp: AuthOAuthClientSignUp;\n title: string;\n}\n\nmodel AuthOAuthClientGetRequest {\n clientId: AuthClientId;\n}\n\nmodel AuthOAuthClientGetResponse {\n client: AuthOAuthClient;\n}\n\nmodel AuthOAuthClientMutationRequest {\n clientId: AuthClientId;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthOAuthClientPutRequest {\n clientId: AuthClientId;\n description: AuthDescription;\n development: bool;\n expectedRevision: uint64;\n idempotencyKey: AuthIdempotencyKey;\n impliedConsent: list<AuthCapabilityId>;\n kind: AuthPublicClientKind;\n redirectUris: list<string>;\n title: AuthName;\n}\n\n/// Ways someone signing in to the app may create their own account. Each new\n/// account gets the roles marked for new users.\nmodel AuthOAuthClientSignUp {\n /// A username and password chosen on the Portal.\n password: bool;\n /// A first sign-in with an active identity provider.\n providers: bool;\n}\n\nmodel AuthOAuthClientSignUpUpdateRequest {\n clientId: AuthClientId;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n signUp: AuthOAuthClientSignUp;\n}\n\ntype AuthOAuthClientsListResponse = CursorPage<AuthOAuthClient>;\n\n/// A parameter Auth adds to every authorization request it sends the\n/// provider, for sign-in and for linking, such as Auth0's\n/// `organization=<org id>`.\nmodel AuthOIDCAuthorizationParameter {\n name: string;\n value: string;\n}\n\nmodel AuthOIDCProvider {\n authorizationParameters: list<AuthOIDCAuthorizationParameter>;\n /// SHA-256 fingerprint of the issuer certificate Auth trusts for this\n /// provider besides the system trust store, as colon-separated uppercase\n /// hex. Absent when the provider relies on the system trust store alone.\n certificateFingerprint?: string;\n claimFreshnessSeconds: AuthPositiveSeconds;\n clientId: string;\n enabled: bool;\n hasClientSecret: bool;\n issuer: string;\n promptAfterSignOut: AuthOIDCSignOutPrompt;\n providerId: ulid;\n revision: AuthRevision;\n roleClaim: string;\n scopes: list<string>;\n title: string;\n}\n\nmodel AuthOIDCProviderGetRequest {\n providerId: ulid;\n}\n\nmodel AuthOIDCProviderGetResponse {\n provider: AuthOIDCProvider;\n}\n\nmodel AuthOIDCProviderMutationRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n providerId: ulid;\n}\n\nmodel AuthOIDCProviderPutRequest {\n /// At most 16, with unique names of letters, digits, `-`, `_` and `.`.\n /// Names Auth sets itself (`client_id`, `redirect_uri`, `response_type`,\n /// `scope`, `state`, `nonce`, `code_challenge`, `code_challenge_method` and\n /// `prompt`) are refused. Left out, none.\n authorizationParameters?: list<AuthOIDCAuthorizationParameter>;\n /// Trust the issuer certificate with this SHA-256 fingerprint for this\n /// provider, for an issuer whose certificate nothing on the server vouches\n /// for. Auth reads the chain the issuer presents and refuses the change when\n /// its issuer has another fingerprint. Left out, the provider keeps its\n /// current pin; `null` removes it.\n certificateFingerprint?: string | null;\n claimFreshnessSeconds: AuthPositiveSeconds;\n clientId: string;\n clientSecret?: string;\n expectedRevision: uint64;\n idempotencyKey: AuthIdempotencyKey;\n issuer: string;\n /// Left out, `login`.\n promptAfterSignOut?: AuthOIDCSignOutPrompt;\n providerId?: ulid;\n roleClaim: string;\n scopes: list<string>;\n title: AuthName;\n}\n\ntype AuthOIDCProvidersListResponse = CursorPage<AuthOIDCProvider>;\n\nmodel AuthOIDCRoleMapping {\n externalRole: string;\n mappingId: ulid;\n providerId: ulid;\n revision: AuthRevision;\n roleIds: list<ulid>;\n}\n\nmodel AuthOIDCRoleMappingDeleteRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n mappingId: ulid;\n}\n\nmodel AuthOIDCRoleMappingPutRequest {\n expectedRevision: uint64;\n externalRole: AuthName;\n idempotencyKey: AuthIdempotencyKey;\n mappingId?: ulid;\n providerId: ulid;\n roleIds: list<ulid>;\n}\n\nmodel AuthOIDCRoleMappingPutResponse {\n enforcement?: AuthEnforcementProgress;\n mapping: AuthOIDCRoleMapping;\n}\n\nmodel AuthOIDCRoleMappingsListRequest {\n page?: CursorQuery;\n providerId: ulid;\n}\n\ntype AuthOIDCRoleMappingsListResponse = CursorPage<AuthOIDCRoleMapping>;\n\n/// The `prompt` Auth sends the provider on the first OIDC sign-in after this\n/// browser signed out: `login` (OIDC `prompt=login`) asks for credentials\n/// again; `selectAccount` (`select_account`) shows an account chooser, which\n/// lets the person pick an account but does not prove they signed in again;\n/// `consent` asks the person to approve this Trellis again; `none` sends no\n/// prompt, so the provider may sign the person straight back in.\nenum AuthOIDCSignOutPrompt {\n \"consent\";\n \"login\";\n \"none\";\n \"selectAccount\";\n}\n\nmodel AuthOwnConfigRequest {\n /// The caller is connecting, so its restart-only values take effect now.\n atConnect: bool;\n}\n\nmodel AuthOwnConfigResponse {\n /// Console page where an administrator sets the missing values.\n configUrl?: string;\n deploymentRevision?: AuthConfigRevisionNumber;\n instanceRevision?: AuthConfigRevisionNumber;\n /// Fields whose stored value doesn't fit this build, with why. The build\n /// uses the value stored before it, or the default.\n invalid: map<string>;\n /// Required fields without a usable value; the participant waits for them.\n missing: list<AuthConfigFieldName>;\n /// Effective values, secrets included, with defaults applied.\n values: map<json>;\n}\n\nmodel AuthPackageEvidence {\n packages: list<AuthPackageSourceEvidence>;\n rootDigest: AuthDigest;\n rootPackage: AuthName;\n}\n\n/// One IDL file of a package.\nmodel AuthPackageFile {\n /// The file's path relative to the package's trellis.toml, or just its name.\n path: AuthPath;\n text: string;\n}\n\nenum AuthPackageOrigin {\n \"builtin\";\n \"installed\";\n \"registry\";\n \"supplied\";\n}\n\n/// A published package release. Give exactly one of `version` and `digest`.\nmodel AuthPackagePullRequest {\n /// The release's OCI manifest digest, such as `sha256:…`, to get exactly the release that was reviewed.\n digest?: AuthDigest;\n /// The package's full identity, such as `ghcr.io/acme/orders`, which is also its repository. Trellis signs in with the registry added for its workspace, or pulls anonymously.\n package: AuthName;\n /// The release version, such as `1.2.0`.\n version?: AuthShortName;\n}\n\nmodel AuthPackagePullResponse {\n /// The dependencies it was published with.\n dependencies: list<AuthResolvedPackage>;\n /// The complete evidence for `Deployments.Create` or `Deployments.Apply`, compiled from the release and the exact dependencies it was published with.\n packageEvidence: AuthPackageEvidence;\n /// The package's services and devices.\n participants: list<AuthResolvedParticipant>;\n published: AuthPublishedPackage;\n}\n\nmodel AuthPackageRegistriesListResponse {\n registries: list<AuthPackageRegistry>;\n}\n\n/// A registry Trellis pulls published packages from.\nmodel AuthPackageRegistry {\n name: AuthShortName;\n /// The workspace Trellis signs in to this registry for, such as `ghcr.io/oats-center`. A package's repository is its workspace followed by its name.\n prefix: AuthName;\n updatedAt: timestamp;\n /// The user Trellis signs in to the registry as; absent when it pulls anonymously.\n username?: AuthName;\n}\n\n/// How Trellis signs in to a private registry. The secret is sealed with the storage key and never returned.\nmodel AuthPackageRegistryCredentials {\n /// A password or access token.\n secret: AuthRegistrySecret;\n username: AuthName;\n}\n\nmodel AuthPackageRegistryPutRequest {\n /// Absent to pull anonymously, as a public registry allows. Putting a registry again replaces its credentials.\n credentials?: AuthPackageRegistryCredentials;\n idempotencyKey: AuthIdempotencyKey;\n name: AuthShortName;\n prefix: AuthName;\n}\n\nmodel AuthPackageRegistryPutResponse {\n registry: AuthPackageRegistry;\n}\n\nmodel AuthPackageRegistryRemoveRequest {\n idempotencyKey: AuthIdempotencyKey;\n name: AuthShortName;\n}\n\nmodel AuthPackageResolveRequest {\n /// Packages supplied for dependencies Trellis does not hold. Each is used before any package Trellis holds with the same name.\n packages?: list<AuthPackageSources>;\n /// The package that declares the service or device.\n root: AuthPackageSources;\n}\n\nmodel AuthPackageResolveResponse {\n /// The package chosen for each dependency, by name.\n dependencies: list<AuthResolvedPackage>;\n missing: list<AuthMissingPackage>;\n /// The complete evidence for `Deployments.Create`, once every dependency resolved.\n packageEvidence?: AuthPackageEvidence;\n /// The root package's services and devices.\n participants: list<AuthResolvedParticipant>;\n /// Supplied packages that don't compile, with why. Nothing else was compiled; resolve again without them.\n rejected: list<AuthRejectedPackage>;\n /// Imports, in a package without trellis.toml, that name no package Trellis holds or was supplied. Only its trellis.toml can say what they are.\n unknownImports: list<string>;\n}\n\nmodel AuthPackageSourceEvidence {\n digest: AuthDigest;\n name: AuthName;\n source: string;\n version: AuthShortName;\n}\n\n/// A package's own IDL: its manifest when it has one, and its `.trellis` files.\nmodel AuthPackageSources {\n files: list<AuthPackageFile>;\n /// The package's trellis.toml. Its listed sources are found among `files` by path, or by file name when only one file has it.\n manifest?: string;\n /// The package name, when there is no manifest.\n name?: AuthName;\n /// The package version, when there is no manifest.\n version?: AuthShortName;\n}\n\nmodel AuthPageRequest {\n page?: CursorQuery;\n search?: AuthSearch;\n}\n\ntype AuthPassword = string(min_length=8, max_length=512);\n\nmodel AuthPasswordChangeRequest {\n currentPassword: AuthExistingPassword;\n idempotencyKey: AuthIdempotencyKey;\n newPassword: AuthPassword;\n}\n\n/// Shortest local password Auth accepts, in characters (Unicode code points).\ntype AuthPasswordMinLength = uint32(min=8, max=128);\n\nmodel AuthPasswordResetCreateRequest {\n idempotencyKey: AuthIdempotencyKey;\n userId: ulid;\n}\n\nmodel AuthPasswordResetCreateResponse {\n expiresAt: timestamp;\n token: string;\n}\n\ntype AuthPath = string(min_length=1, max_length=4096);\n\nmodel AuthPortalCopy {\n footer?: AuthPortalFooter;\n signInSubtitle?: AuthPortalSubtitle;\n signInTitle?: AuthPortalTitle;\n}\n\ntype AuthPortalFooter = string(max_length=500);\n\nmodel AuthPortalLogo {\n base64: AuthPortalLogoData;\n format: AuthPortalLogoFormat;\n}\n\n/// At most 256 KiB once decoded.\ntype AuthPortalLogoData = string(min_length=1, max_length=349528);\n\nenum AuthPortalLogoFormat {\n \"jpeg\";\n \"png\";\n \"svg\";\n \"webp\";\n}\n\ntype AuthPortalName = string(min_length=1, max_length=64);\n\n/// Hex colours such as #0050b3 for the Portal's own palette.\nmodel AuthPortalPalette {\n ink?: string;\n line?: string;\n lineStrong?: string;\n muted?: string;\n onPrimary?: string;\n page?: string;\n primary?: string;\n primaryHover?: string;\n soft?: string;\n surface?: string;\n}\n\ntype AuthPortalStylesheet = string(max_length=65536);\n\ntype AuthPortalSubtitle = string(max_length=280);\n\n/// Without clientId, the installation theme every client inherits.\nmodel AuthPortalTheme {\n clientId?: AuthClientId;\n colors: AuthPortalPalette;\n copy: AuthPortalCopy;\n darkColors: AuthPortalPalette;\n logo?: AuthPortalLogo;\n name?: AuthPortalName;\n revision: AuthRevision;\n stylesheet?: AuthPortalStylesheet;\n updatedAt: timestamp;\n}\n\nmodel AuthPortalThemeDeleteRequest {\n clientId?: AuthClientId;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthPortalThemeGetRequest {\n clientId?: AuthClientId;\n}\n\nmodel AuthPortalThemeGetResponse {\n theme?: AuthPortalTheme;\n}\n\n/// Replaces the whole theme; only the installation theme takes a stylesheet.\nmodel AuthPortalThemePutRequest {\n clientId?: AuthClientId;\n colors: AuthPortalPalette;\n copy: AuthPortalCopy;\n darkColors: AuthPortalPalette;\n expectedRevision: uint64;\n idempotencyKey: AuthIdempotencyKey;\n logo?: AuthPortalLogo;\n name?: AuthPortalName;\n stylesheet?: AuthPortalStylesheet;\n}\n\nmodel AuthPortalThemeSummary {\n clientId?: AuthClientId;\n name?: string;\n revision: AuthRevision;\n updatedAt: timestamp;\n}\n\ntype AuthPortalThemesListResponse = CursorPage<AuthPortalThemeSummary>;\n\ntype AuthPortalTitle = string(max_length=120);\n\ntype AuthPositiveSeconds = uint32(min=1);\n\nmodel AuthPrincipal {\n createdAt: timestamp;\n enabled: bool;\n kind: AuthPrincipalKind;\n principalId: ulid;\n revision: AuthRevision;\n title: string;\n}\n\nenum AuthPrincipalKind {\n \"device\";\n \"service\";\n \"user\";\n}\n\nmodel AuthPrincipalRequest {\n principalId: ulid;\n}\n\nmodel AuthProvisionedInstance {\n /// When the instance's current connection began. Absent while it is not connected.\n connectedAt?: timestamp;\n deploymentId: ulid;\n identityPublicKey?: AuthPublicKey;\n instanceId: ulid;\n /// When one of its connections was last admitted or closed. Absent until it first connects.\n lastSeenAt?: timestamp;\n origin: AuthInstanceOrigin;\n /// Digest of the build the instance's installed revision names.\n participantDigest?: AuthDigest;\n principal: AuthPrincipal;\n retiredAt?: timestamp;\n retiredReason?: AuthRetiredReason;\n revision: AuthRevision;\n /// `removed` and `retired` instances keep their record for a while but can never connect or be turned on again.\n state: AuthInstanceState;\n /// Whether the instance runs the deployment's installed build. One that does not cannot be turned on until it connects with that build.\n upToDate: bool;\n /// What the connected instance waits for before it can serve. Absent when it waits for nothing Trellis holds.\n waiting?: AuthInstanceWaiting;\n}\n\nenum AuthPublicClientKind {\n \"browser\";\n \"native\";\n}\n\ntype AuthPublicKey = string(min_length=43, max_length=43);\n\n/// The release a pull fetched and checked.\nmodel AuthPublishedPackage {\n /// The release's OCI manifest digest; pulling by it gets exactly this release again.\n digest: AuthDigest;\n /// The package's full identity.\n package: AuthName;\n version: AuthShortName;\n}\n\ntype AuthRecordDays = uint32(min=1, max=36500);\n\ntype AuthRegistrySecret = string(min_length=1, max_length=4096);\n\n/// A supplied package that doesn't compile.\nmodel AuthRejectedPackage {\n /// Its position in the request's `packages`, which says which files were at fault whatever their manifest names.\n index: uint32;\n /// The package name its trellis.toml gives.\n name: AuthName;\n reason: string;\n}\n\n/// The package chosen for one dependency.\nmodel AuthResolvedPackage {\n name: AuthName;\n origin: AuthPackageOrigin;\n /// Other versions Trellis holds that also match, newest first. The highest matching version is chosen.\n otherVersions: list<AuthShortName>;\n version: AuthShortName;\n}\n\nmodel AuthResolvedParticipant {\n /// The settings it declares.\n config: list<AuthConfigDeclaration>;\n kind: AuthDeploymentKind;\n participantId: string;\n}\n\nmodel AuthResourceBinding {\n browserOrigin?: string;\n clientId?: string;\n kind: AuthResourceKind;\n localName: string;\n ownerId: ulid;\n ownerKind: AuthResourceOwnerKind;\n participantId?: string;\n resourceId: AuthDigest;\n revision: AuthRevision;\n state: AuthResourceState;\n}\n\nmodel AuthResourceBindingsQueryRequest {\n instanceId?: ulid;\n kind: AuthResourceEvidenceKind;\n localName?: string;\n ownerId?: ulid;\n page?: CursorQuery;\n participantId?: string;\n resourceId?: AuthDigest;\n}\n\ntype AuthResourceBindingsQueryResponse = CursorPage<AuthResourceEvidence>;\n\nmodel AuthResourceEvidence {\n eventConsumer?: AuthEventConsumerEvidence;\n installedRevision: AuthRevision;\n job?: AuthJobResourceEvidence;\n kind: AuthResourceEvidenceKind;\n localName: string;\n ownerId: ulid;\n participantId: string;\n resourceBindingsDigest?: AuthDigest;\n resourceId: AuthDigest;\n state: AuthResourceEvidenceState;\n}\n\nenum AuthResourceEvidenceKind {\n \"eventConsumer\";\n \"jobQueue\";\n}\n\nenum AuthResourceEvidenceState {\n \"available\";\n \"stale\";\n \"unavailable\";\n}\n\nmodel AuthResourceGetRequest {\n resourceId: AuthDigest;\n}\n\nmodel AuthResourceGetResponse {\n resource: AuthResourceBinding;\n}\n\nenum AuthResourceKind {\n \"eventConsumer\";\n \"job\";\n \"kv\";\n \"state\";\n \"store\";\n \"webhook\";\n}\n\nenum AuthResourceOwnerKind {\n \"deployment\";\n \"user\";\n}\n\nmodel AuthResourceRemoveRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n resourceId: AuthDigest;\n}\n\nenum AuthResourceState {\n \"destroying\";\n \"detached\";\n \"failed\";\n \"pending\";\n \"ready\";\n}\n\nmodel AuthResourcesListRequest {\n ownerId?: ulid;\n ownerKind?: AuthResourceOwnerKind;\n page?: CursorQuery;\n state?: AuthResourceState;\n}\n\ntype AuthResourcesListResponse = CursorPage<AuthResourceBinding>;\n\n/// Why Trellis retired an instance: `offline` past the retirement period,\n/// `stopped` (it retired itself at a graceful stop), `replaced` (its secret was\n/// at its cap and a new enrollment took its place), or `secretRevoked` (its\n/// secret was revoked with `retireInstances`).\nenum AuthRetiredReason {\n \"offline\";\n \"replaced\";\n \"secretRevoked\";\n \"stopped\";\n}\n\ntype AuthRetirementSeconds = uint32(min=3600);\n\nmodel AuthReviewedMappingEdit {\n expectedRevision: AuthRevision;\n mappingId: ulid;\n roleIds: list<ulid>;\n}\n\nmodel AuthReviewedRoleEdit {\n capabilityIds: list<AuthCapabilityId>;\n expectedRevision: AuthRevision;\n roleId: ulid;\n}\n\ntype AuthRevision = uint64(min=1);\n\nenum AuthRevocationReason {\n \"apiForceReplacement\";\n \"credentialRevoked\";\n \"deploymentDisabled\";\n \"explicitRevoke\";\n \"issuerCompromised\";\n \"loginExpired\";\n \"logout\";\n \"oauthFamilyRevoked\";\n \"policyReduced\";\n}\n\nmodel AuthRole {\n /// Auth assigns this role to every user it creates.\n assignToNewUsers: bool;\n capabilities: list<AuthCapabilityIdentity>;\n description: string;\n identityGeneration: AuthRevision;\n revision: AuthRevision;\n roleId: ulid;\n title: string;\n}\n\nmodel AuthRoleAssignRequest {\n expectedRevision: uint64;\n expiresAt?: timestamp;\n idempotencyKey: AuthIdempotencyKey;\n principalId: ulid;\n roleId: ulid;\n}\n\nmodel AuthRoleAssignResponse {\n assignment: AuthRoleAssignment;\n enforcement?: AuthEnforcementProgress;\n}\n\nmodel AuthRoleAssignment {\n assignmentId: ulid;\n expiresAt?: timestamp;\n principalId: ulid;\n revision: AuthRevision;\n roleId: ulid;\n roleIdentityGeneration: AuthRevision;\n}\n\nmodel AuthRoleAssignmentsListRequest {\n page?: CursorQuery;\n principalId?: ulid;\n roleId?: ulid;\n}\n\ntype AuthRoleAssignmentsListResponse = CursorPage<AuthRoleAssignment>;\n\nmodel AuthRoleDeleteRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n roleId: ulid;\n}\n\nmodel AuthRoleGetRequest {\n roleId: ulid;\n}\n\nmodel AuthRoleGetResponse {\n role: AuthRole;\n}\n\nmodel AuthRolePutRequest {\n /// Assign to every user created from now on; existing users keep their roles.\n assignToNewUsers: bool;\n capabilityIds: list<AuthCapabilityId>;\n description: AuthDescription;\n expectedRevision: uint64;\n idempotencyKey: AuthIdempotencyKey;\n roleId?: ulid;\n title: AuthName;\n}\n\nmodel AuthRolePutResponse {\n enforcement?: AuthEnforcementProgress;\n role: AuthRole;\n}\n\nmodel AuthRoleRevokeRequest {\n assignmentId: ulid;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\ntype AuthRolesListResponse = CursorPage<AuthRole>;\n\nmodel AuthRuntimeBinding {\n clientId?: AuthClientId;\n deploymentId?: ulid;\n durableDpopJkt?: string;\n instanceId?: ulid;\n kind: AuthBindingKind;\n origin?: string;\n participantId?: string;\n}\n\n/// One report of an installation's state, for diagnosing it without a shell\n/// on its host. Each section lists its findings; the rest is what it measured.\nmodel AuthRuntimeDiagnosticsResponse {\n asOf: timestamp;\n certificates: AuthDiagnosticsCertificates;\n /// Free and total space of the file system holding the local Auth database, when local storage is used.\n disk?: AuthDiagnosticsDisk;\n failures: AuthDiagnosticsFailures;\n health: AuthDiagnosticsHealth;\n /// JetStream usage against its limits, when this installation uses JetStream.\n jetstream?: AuthDiagnosticsJetStream;\n server: AuthDiagnosticsServer;\n /// The worst status of any section.\n status: AuthDiagnosticsStatus;\n work: AuthDiagnosticsWork;\n}\n\nmodel AuthRuntimeUpdate {\n /// When the server last asked GitHub.\n checkedAt: timestamp;\n /// The newest release's version.\n version: string;\n}\n\n/// The Trellis server the caller is connected to.\nmodel AuthRuntimeVersionResponse {\n /// A newer release on the server's channel. Only administrators see it.\n update?: AuthRuntimeUpdate;\n /// The running server's version.\n version: string;\n}\n\ntype AuthSearch = string(max_length=256);\n\nmodel AuthSecurityEvent {\n attachmentId?: ulid;\n authorizationSessionId?: ulid;\n enforcement?: AuthEnforcementProgress;\n eventId: ulid;\n issuerKeyId?: AuthKeyId;\n occurredAt: timestamp;\n principalId?: ulid;\n}\n\n/// A capability of the service's APIs that a bundle carries as granted directly to users.\nmodel AuthServiceBundleGrant {\n capability: AuthCapabilityId;\n /// How many users held it directly in the exporting installation.\n users: uint64;\n}\n\n/// One instance a bundle carries: its identity, never its seed.\nmodel AuthServiceBundleInstance {\n /// The public half of the instance's identity key.\n identityPublicKey: string;\n instanceId: ulid;\n state: AuthInstanceState;\n title: string;\n}\n\n/// How far an export or import has come.\nmodel AuthServiceBundleProgress {\n /// Bundle bytes written or read so far.\n bytes: uint64;\n /// What is being done, in plain words.\n step: string;\n}\n\n/// What a service bundle holds, what stayed behind, and what an import recreated.\nmodel AuthServiceBundleReport {\n /// What the import recreated and skipped; absent from an export's report.\n access?: AuthAccessReport;\n /// SHA-256 of the bundle's content, recorded in both installations' audit entries.\n contentDigest: AuthDigest;\n deploymentId: ulid;\n /// How many enrollment secrets moved, revoked ones included.\n enrollmentSecrets: uint64;\n exportedAt: timestamp;\n /// Direct grants the bundle carries, which an import recreates.\n grants: list<AuthServiceBundleGrant>;\n instances: list<AuthServiceBundleInstance>;\n /// What stayed in the exporting installation, in plain words.\n leftBehind: list<string>;\n participantId: string;\n resources: list<AuthServiceBundleResource>;\n /// Roles the bundle carries, which an import recreates.\n roles: list<AuthServiceBundleRole>;\n /// The installation the bundle was exported from.\n sourceInstallationId: string;\n sourceOrigin: string;\n title: string;\n webhooks: list<AuthServiceBundleWebhook>;\n}\n\n/// One resource a bundle carries, with the data it holds.\nmodel AuthServiceBundleResource {\n bytes: uint64;\n kind: AuthResourceKind;\n /// Stored entries: KV revisions, store objects, or unfinished jobs.\n messages: uint64;\n name: string;\n}\n\n/// A role a bundle carries: one that gives a capability of an API the service provides.\nmodel AuthServiceBundleRole {\n /// Every capability the role gives, those of other APIs included.\n capabilities: list<AuthCapabilityId>;\n /// How many users had the role in the exporting installation.\n members: uint64;\n name: string;\n roleId: ulid;\n}\n\n/// One webhook endpoint a bundle carries. Its random URL ID moves with it.\nmodel AuthServiceBundleWebhook {\n endpoint: string;\n /// The URL path, the same in every installation.\n path: string;\n /// The full URL in this installation.\n url: string;\n}\n\n/// A service deployment that takes whatever service first connects with its\n/// identity. The connecting service submits its IDL as an update to the claim;\n/// approving it creates the deployment (`deploymentId`) and its instance.\nmodel AuthServiceClaim {\n claimId: ulid;\n createdAt: timestamp;\n deploymentId?: ulid;\n instanceTitle: AuthName;\n revision: AuthRevision;\n state: AuthServiceClaimState;\n title: AuthName;\n}\n\nmodel AuthServiceClaimCreateRequest {\n idempotencyKey: AuthIdempotencyKey;\n identityPublicKey: AuthPublicKey;\n instanceTitle: AuthName;\n title: AuthName;\n}\n\nmodel AuthServiceClaimRemoveRequest {\n claimId: ulid;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n}\n\nmodel AuthServiceClaimResponse {\n claim: AuthServiceClaim;\n}\n\nenum AuthServiceClaimState {\n \"claimed\";\n \"removed\";\n \"waiting\";\n}\n\ntype AuthServiceClaimsListResponse = CursorPage<AuthServiceClaim>;\n\n/// Sent to `POST /auth/service/enroll` by a process that holds an enrollment\n/// secret. `proof` is the new identity key's signature over the rest.\nmodel AuthServiceEnrollmentRequest {\n enrollmentSecret: AuthEnrollmentSecretText;\n iat: AuthDeviceProofIssuedAt;\n identityKeyId: AuthDigest;\n identityPublicKey: AuthPublicKey;\n participantDigest: AuthDigest;\n participantId: string;\n proof: AuthDeviceProof;\n requestId: ulid;\n title: AuthName;\n}\n\nmodel AuthServiceEnrollmentResponse {\n deploymentId: ulid;\n instanceId: ulid;\n title: AuthName;\n}\n\n/// `removed`: an administrator removed its instance; the process should stop.\n/// `retired` or `unregistered`: the key will never connect, so a process with an\n/// enrollment secret enrolls a new one. `active` and `disabled`: the key is\n/// still registered.\nenum AuthServiceIdentityState {\n \"active\";\n \"disabled\";\n \"removed\";\n \"retired\";\n \"unregistered\";\n}\n\n/// Sent to `POST /auth/service/identity` by a process that holds an identity\n/// key, to learn what became of it. `proof` is the key's signature over the rest.\nmodel AuthServiceIdentityStatusRequest {\n iat: AuthDeviceProofIssuedAt;\n identityKeyId: AuthDigest;\n identityPublicKey: AuthPublicKey;\n proof: AuthDeviceProof;\n requestId: ulid;\n}\n\nmodel AuthServiceIdentityStatusResponse {\n state: AuthServiceIdentityState;\n}\n\nmodel AuthServiceUpdate {\n changes: AuthServiceUpdateChanges;\n decidedAt?: timestamp;\n decidedBy?: AuthServiceUpdateDecider;\n deploymentId: ulid;\n instanceId: ulid;\n participantDigest: AuthDigest;\n participantId: string;\n requestedAt: timestamp;\n reviewUrl?: string;\n revision: AuthRevision;\n state: AuthServiceUpdateState;\n updateId: ulid;\n}\n\nmodel AuthServiceUpdateChanges {\n acceptedApis: list<AuthApiId>;\n acceptedUsedApis: list<AuthApiId>;\n addedApis: list<AuthApiId>;\n addedCapabilities: list<AuthCapabilityId>;\n addedResources: list<AuthServiceUpdateResource>;\n changedResources: list<AuthServiceUpdateResource>;\n reattachedResources: list<AuthServiceUpdateResource>;\n removedApis: list<AuthApiId>;\n removedCapabilities: list<AuthCapabilityId>;\n removedResources: list<AuthServiceUpdateResource>;\n sharedApis: list<AuthApiId>;\n /// Webhook endpoints the build adds or changes, described for approval.\n webhooks: list<AuthWebhookSummary>;\n}\n\nmodel AuthServiceUpdateDecideRequest {\n acknowledgeSharedApis?: bool;\n /// Confirms approving webhook endpoints that check nothing (`verify none`).\n acknowledgeUnauthenticatedWebhooks?: bool;\n decision: AuthDecision;\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n updateId: ulid;\n}\n\n/// Who decided a service update.\nmodel AuthServiceUpdateDecider {\n /// `user` for a person's decision; `automatic` when Trellis decided without asking, such as installing a build that asked for no more access.\n kind: AuthServiceUpdateDeciderKind;\n /// The user's display name, or their username, for `user`.\n name?: string;\n /// The user who decided, for `user`.\n principalId?: ulid;\n}\n\nenum AuthServiceUpdateDeciderKind {\n \"automatic\";\n \"user\";\n}\n\nmodel AuthServiceUpdateResource {\n kind: AuthResourceKind;\n name: string;\n}\n\nmodel AuthServiceUpdateResponse {\n update: AuthServiceUpdate;\n}\n\nenum AuthServiceUpdateState {\n \"applied\";\n \"pending\";\n \"rejected\";\n \"superseded\";\n}\n\nmodel AuthServiceUpdateStatusRequest {\n updateId: ulid;\n}\n\nmodel AuthServiceUpdateSubmitRequest {\n packageEvidence: AuthPackageEvidence;\n participantId: string;\n}\n\nmodel AuthServiceUpdatesListRequest {\n deploymentId?: ulid;\n page?: CursorQuery;\n}\n\ntype AuthServiceUpdatesListResponse = CursorPage<AuthServiceUpdate>;\n\ntype AuthSessionsListResponse = CursorPage<AuthLoginSession>;\n\nmodel AuthSessionsLogoutResponse {\n enforcement: AuthEnforcementProgress;\n loginSessionId: ulid;\n}\n\nmodel AuthSessionsMeResponse {\n authorizationSessionId: ulid;\n login?: AuthLoginSession;\n principal: AuthPrincipal;\n}\n\ntype AuthShortName = string(min_length=1, max_length=128);\n\n/// How users may sign in to this installation. Takes effect immediately.\n/// OIDC sign-in is on exactly when an OIDC provider is enabled; at least one\n/// of local users and an enabled provider stays available.\nmodel AuthSignInSettings {\n /// Create your own username-and-password account, through apps that also\n /// allow it. Needs localUsers.\n localSignUp: bool;\n /// Sign in with a username and password.\n localUsers: bool;\n /// Every new or changed local password, including sign-up, is at least\n /// this long. Existing passwords are not checked again.\n passwordMinLength: AuthPasswordMinLength;\n revision: AuthRevision;\n}\n\nmodel AuthSignInSettingsGetResponse {\n settings: AuthSignInSettings;\n}\n\nmodel AuthSignInSettingsUpdateRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n localSignUp: bool;\n localUsers: bool;\n passwordMinLength: AuthPasswordMinLength;\n}\n\ntype AuthSignedBlob = bytes;\n\nmodel AuthUser {\n account?: AuthUserAccountDetails;\n avatarUrl?: string;\n displayName: string;\n email?: string;\n emailVerified: bool;\n familyName?: string;\n givenName?: string;\n principalId: ulid;\n}\n\nmodel AuthUserAccountDetails {\n hasLocalPassword: bool;\n /// The linked OIDC sign-in whose picture the account shows. Absent, it\n /// shows the Gravatar for its email.\n pictureProviderId?: ulid;\n principal: AuthPrincipal;\n profileRevision: AuthRevision;\n username: string;\n}\n\nmodel AuthUserCreateRequest {\n displayName: AuthName;\n email?: string;\n familyName?: AuthName;\n givenName?: AuthName;\n idempotencyKey: AuthIdempotencyKey;\n /// OIDC sign-ins to link to the new account in the same transaction. Each\n /// provider must be enabled, and a sign-in another user has fails the whole\n /// creation with `identity_linked_to_another_user`.\n identities?: list<AuthUserFindIdentity>;\n password?: AuthPassword;\n /// The new user's Trellis user ID. Leave it out for a new one. Give one to\n /// keep the ID a user has in another installation, so that services that\n /// stored it need no change. An ID that any user, service or device has or\n /// had here fails the creation with `already_in_use`.\n userId?: ulid;\n username: AuthName;\n}\n\nmodel AuthUserDeleteRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n userId: ulid;\n}\n\n/// An OIDC sign-in: the configured provider's ID and the provider's exact `sub`.\nmodel AuthUserFindIdentity {\n providerId: ulid;\n subject: string;\n}\n\n/// The account, with its state and revision in `user.account.principal`, and\n/// every OIDC sign-in linked to it.\nmodel AuthUserFindMatch {\n identities: list<AuthUserIdentity>;\n user: AuthUser;\n}\n\n/// Exactly one key: a user ID, or an OIDC sign-in.\nmodel AuthUserFindRequest {\n identity?: AuthUserFindIdentity;\n userId?: ulid;\n}\n\n/// Absent when no account matches.\nmodel AuthUserFindResponse {\n found?: AuthUserFindMatch;\n}\n\nmodel AuthUserGetRequest {\n userId: ulid;\n}\n\nmodel AuthUserGetResponse {\n user: AuthUser;\n}\n\n/// An administrator links an OIDC sign-in to an account. `expectedRevision` is\n/// the account's `user.account.principal.revision`.\nmodel AuthUserIdentitiesLinkRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n identity: AuthUserFindIdentity;\n userId: ulid;\n}\n\ntype AuthUserIdentitiesListResponse = CursorPage<AuthUserIdentity>;\n\n/// An administrator removes an OIDC sign-in from an account. `expectedRevision`\n/// is the account's `user.account.principal.revision`.\nmodel AuthUserIdentitiesUnlinkRequest {\n expectedRevision: AuthRevision;\n idempotencyKey: AuthIdempotencyKey;\n identity: AuthUserFindIdentity;\n userId: ulid;\n}\n\nmodel AuthUserIdentity {\n identityId: ulid;\n issuer: string;\n linkedAt: timestamp;\n providerId: ulid;\n subject: string;\n}\n\nmodel AuthUserIdentityUnlinkRequest {\n idempotencyKey: AuthIdempotencyKey;\n identityId: ulid;\n}\n\nmodel AuthUserProfileUpdateRequest {\n clearEmail?: bool;\n clearFamilyName?: bool;\n clearGivenName?: bool;\n displayName?: AuthName;\n email?: string;\n expectedRevision: AuthRevision;\n familyName?: AuthName;\n givenName?: AuthName;\n idempotencyKey: AuthIdempotencyKey;\n /// Show the picture from this linked OIDC sign-in.\n pictureProviderId?: ulid;\n /// Show the Gravatar for the account's email instead of an OIDC sign-in's picture.\n useGravatar?: bool;\n}\n\nmodel AuthUserUpdateRequest {\n clearEmail?: bool;\n clearFamilyName?: bool;\n clearGivenName?: bool;\n displayName?: AuthName;\n email?: string;\n enabled: bool;\n expectedProfileRevision?: AuthRevision;\n expectedRevision: AuthRevision;\n familyName?: AuthName;\n givenName?: AuthName;\n idempotencyKey: AuthIdempotencyKey;\n userId: ulid;\n}\n\ntype AuthUsersListResponse = CursorPage<AuthUser>;\n\n/// What an administrator changes about a webhook endpoint.\nenum AuthWebhookChange {\n \"disable\";\n \"enable\";\n \"retireUrl\";\n \"rotateUrl\";\n \"set\";\n}\n\n/// A webhook runtime setting a deployment may override.\nenum AuthWebhookSetting {\n \"asyncDecideDeadline\";\n \"burst\";\n \"dedupeWindow\";\n \"failuresPerMinute\";\n \"intakeMaxBytes\";\n \"intakeRetention\";\n \"maxBody\";\n \"recordRetention\";\n \"requestsPerSecond\";\n \"rotationOverlap\";\n \"syncDecideDeadline\";\n}\n\n/// A webhook endpoint as an approver sees it.\nmodel AuthWebhookSummary {\n decides: bool;\n methods: list<string>;\n mode: string;\n name: string;\n title: string;\n /// The endpoint checks nothing; approving it needs acknowledgeUnauthenticatedWebhooks.\n unauthenticated: bool;\n /// Each verifier in plain words.\n verifiers: list<string>;\n}\n\nmodel AuthWebhooksUpdateRequest {\n change: AuthWebhookChange;\n deploymentId: ulid;\n endpoint: string;\n idempotencyKey: AuthIdempotencyKey;\n /// The setting `set` changes.\n setting?: AuthWebhookSetting;\n /// Milliseconds for durations, bytes for sizes, a count otherwise; null returns to the default.\n value?: uint64 | null;\n}\n\nmodel AuthWebhooksUpdateResponse {\n enabled: bool;\n endpoint: string;\n}\n\nmodel Empty {\n}\n\nmodel EventConsumerStatusRow {\n ackPending: int64;\n ackWaitMs?: int64;\n consumerName: string;\n contractId?: string;\n deadLetters: int64;\n deploymentId?: string;\n filterSubjects: list<string>;\n group?: string;\n managedBy?: EventConsumerStatusRowManagedBy;\n maxDeliver?: int64;\n oldestPendingAt?: string;\n oldestPendingEventId?: string;\n pending: int64;\n redelivered?: int64;\n resourceId: string;\n status: EventConsumerStatusRowStatus;\n stream: string;\n waitingPulls: int64;\n}\n\nenum EventConsumerStatusRowManagedBy {\n \"authority\";\n \"external\";\n \"platform\";\n}\n\nenum EventConsumerStatusRowStatus {\n \"behind\";\n \"current\";\n \"failing\";\n \"inactive\";\n \"missing\";\n \"orphaned\";\n \"processing\";\n \"saturated\";\n}\n\nmodel EventsConsumersInspectRequest {\n resourceId: string;\n}\n\nmodel EventsConsumersInspectResponse {\n consumer: EventConsumerStatusRow;\n}\n\nmodel EventsConsumersQueryRequest {\n contractId?: string;\n deploymentId?: string;\n order?: EventsConsumersQueryRequestOrder;\n ownerContractId?: string;\n page?: CursorQuery;\n resourceId?: string;\n status?: list<EventsConsumersQueryRequestStatus>;\n subject?: string;\n}\n\ntype EventsConsumersQueryRequestLimit = int64(min=1, max=500);\n\nenum EventsConsumersQueryRequestOrder {\n \"attention\";\n \"resource\";\n}\n\nenum EventsConsumersQueryRequestStatus {\n \"behind\";\n \"current\";\n \"failing\";\n \"inactive\";\n \"missing\";\n \"orphaned\";\n \"processing\";\n \"saturated\";\n}\n\ntype EventsConsumersQueryResponse = CursorPage<EventConsumerStatusRow>;\n\nmodel EventsConsumersReportDeliveryRequest {\n deliveryCount: uint32;\n deliveryProof: string;\n error?: string;\n outcome: EventsDeliveryOutcome;\n replayGeneration?: uint32;\n resourceId: string;\n sourceSequence: uint64;\n sourceStream: string;\n}\n\nmodel EventsConsumersReportDeliveryResponse {\n deadLetter?: EventsDeadLetter;\n stale: bool;\n}\n\nmodel EventsDeadLetter {\n deadLetterId: string;\n deliveries: uint32;\n generation: uint32;\n lastError?: string;\n originalSequence: uint64;\n originalStream: string;\n resourceId: string;\n revision: uint64;\n state: EventsDeadLetterState;\n updatedAt: string;\n}\n\nmodel EventsDeadLetterCounts {\n dead: uint64;\n dismissed: uint64;\n replayPending: uint64;\n replaying: uint64;\n resolved: uint64;\n}\n\nmodel EventsDeadLetterDetail {\n deadLetter: EventsDeadLetter;\n originalHeaders: map<string>;\n originalPayload: bytes;\n originalPublishedAt: string;\n originalSubject: string;\n transitionReferences: list<uint64>;\n verificationStatus: EventsDeadLetterVerificationStatus;\n}\n\nenum EventsDeadLetterState {\n \"dead\";\n \"dismissed\";\n \"replayPending\";\n \"replaying\";\n \"resolved\";\n}\n\nenum EventsDeadLetterVerificationStatus {\n \"invalid\";\n \"revoked\";\n \"unavailable\";\n \"verified\";\n}\n\nmodel EventsDeadLettersDismissRequest {\n deadLetterId: string;\n expectedRevision: uint64;\n requestId: string;\n resourceId: string;\n}\n\nmodel EventsDeadLettersDismissResponse {\n deadLetter: EventsDeadLetter;\n}\n\nmodel EventsDeadLettersInspectRequest {\n deadLetterId: string;\n resourceId: string;\n}\n\nmodel EventsDeadLettersInspectResponse {\n deadLetter: EventsDeadLetterDetail;\n}\n\nmodel EventsDeadLettersQueryRequest {\n page?: CursorQuery;\n resourceId?: string;\n state?: list<EventsDeadLetterState>;\n}\n\ntype EventsDeadLettersQueryResponse = CursorPage<EventsDeadLetter>;\n\nmodel EventsDeadLettersReplayRequest {\n deadLetterId: string;\n expectedRevision: uint64;\n requestId: string;\n resourceId: string;\n}\n\nmodel EventsDeadLettersReplayResponse {\n deadLetter: EventsDeadLetter;\n}\n\nenum EventsDeliveryOutcome {\n \"exhausted\";\n \"succeeded\";\n \"unreplayable\";\n}\n\nmodel EventsDiagnosticsRequest {\n}\n\nmodel EventsDiagnosticsResponse {\n asOf: string;\n catchingUp: bool;\n completeSince?: string;\n gapDetected: bool;\n lastStreamSequence: uint64;\n prunedBefore?: string;\n retainedFrom?: string;\n revision: uint64;\n}\n\nmodel EventsErrorData {\n code: string;\n currentRevision?: uint64;\n deadLetterId?: string;\n resourceId?: string;\n}\n\nmodel EventsEventDetail {\n headers: map<string>;\n payload: bytes;\n row: EventsRow;\n}\n\nmodel EventsInspectRequest {\n eventId?: string;\n streamSequence?: int64;\n}\n\nmodel EventsInspectResponse {\n event: EventsEventDetail;\n}\n\nmodel EventsMetricsRequest {\n resourceId?: string;\n window?: string;\n}\n\nmodel EventsMetricsResponse {\n buckets: list<EventsMetricsResponseBucketsItem>;\n summary: EventsMetricsResponseSummary;\n}\n\nmodel EventsMetricsResponseBucketsItem {\n byResolution: EventsMetricsResponseBucketsItemByResolution;\n byVerificationStatus: EventsMetricsResponseBucketsItemByVerificationStatus;\n integrityExceptions: int64;\n payloadSizeBytes: int64;\n start: string;\n total: int64;\n}\n\nmodel EventsMetricsResponseBucketsItemByResolution {\n malformed?: int64;\n resolved?: int64;\n unresolved?: int64;\n}\n\nmodel EventsMetricsResponseBucketsItemByVerificationStatus {\n authUnavailable?: int64;\n invalidSignature?: int64;\n missingProof?: int64;\n missingSession?: int64;\n outsideSessionWindow?: int64;\n subjectDenied?: int64;\n verified?: int64;\n}\n\nmodel EventsMetricsResponseSummary {\n byResolution: EventsMetricsResponseSummaryByResolution;\n byVerificationStatus: EventsMetricsResponseSummaryByVerificationStatus;\n deadLettersByState: EventsDeadLetterCounts;\n eventTypes: list<EventsMetricsResponseSummaryEventTypesItem>;\n integrityExceptions: int64;\n payloadSizeBytes: int64;\n total: int64;\n uniqueSubjects: int64;\n}\n\nmodel EventsMetricsResponseSummaryByResolution {\n malformed?: int64;\n resolved?: int64;\n unresolved?: int64;\n}\n\nmodel EventsMetricsResponseSummaryByVerificationStatus {\n authUnavailable?: int64;\n invalidSignature?: int64;\n missingProof?: int64;\n missingSession?: int64;\n outsideSessionWindow?: int64;\n subjectDenied?: int64;\n verified?: int64;\n}\n\nmodel EventsMetricsResponseSummaryEventTypesItem {\n count: int64;\n ownerContractId: string;\n ownerEventName: string;\n}\n\nmodel EventsQueryRequest {\n consumerDeploymentId?: string;\n consumerName?: string;\n excludeEventTypes?: list<EventsQueryRequestExcludeEventTypesItem>;\n includeEventTypes?: list<EventsQueryRequestIncludeEventTypesItem>;\n integrityExceptionOnly?: bool;\n ownerContractId?: string;\n ownerEventName?: string;\n page?: CursorQuery;\n publisherDeploymentId?: string;\n publisherParticipantId?: string;\n resolution?: list<EventsQueryRequestResolution>;\n search?: string;\n sort?: EventsQueryRequestSort;\n subject?: string;\n verificationStatus?: list<EventsQueryRequestVerificationStatus>;\n window?: string;\n}\n\nmodel EventsQueryRequestExcludeEventTypesItem {\n ownerContractId: string;\n ownerEventName: string;\n}\n\nmodel EventsQueryRequestIncludeEventTypesItem {\n ownerContractId: string;\n ownerEventName: string;\n}\n\ntype EventsQueryRequestLimit = int64(min=1, max=500);\n\nenum EventsQueryRequestResolution {\n \"malformed\";\n \"resolved\";\n \"unresolved\";\n}\n\nmodel EventsQueryRequestSort {\n direction: EventsSortDirection;\n field: EventsSortField;\n}\n\nenum EventsQueryRequestVerificationStatus {\n \"verified\";\n}\n\ntype EventsQueryResponse = CursorPage<EventsRow>;\n\nmodel EventsRow {\n eventId: string;\n eventTime: string;\n headerCount: int64;\n ownerContractId?: string;\n ownerEventName?: string;\n payloadSizeBytes: int64;\n publisherDeploymentId?: string;\n publisherInstanceId?: string;\n publisherKind?: EventsRowPublisherKind;\n publisherParticipantDigest?: string;\n publisherParticipantId?: string;\n resolution: EventsRowResolution;\n streamSequence: int64;\n subject: string;\n traceId?: string;\n verificationStatus: EventsRowVerificationStatus;\n}\n\nenum EventsRowPublisherKind {\n \"device\";\n \"service\";\n \"user\";\n}\n\nenum EventsRowResolution {\n \"malformed\";\n \"resolved\";\n \"unresolved\";\n}\n\nenum EventsRowVerificationStatus {\n \"verified\";\n}\n\nenum EventsSortDirection {\n \"asc\";\n \"desc\";\n}\n\nenum EventsSortField {\n \"eventTime\";\n \"payloadSize\";\n \"streamSequence\";\n}\n\nmodel EventsWatchFrame {\n events: list<EventsEventDetail>;\n lastStreamSequence: uint64;\n}\n\nmodel EventsWatchRequest {\n consumerDeploymentId?: string;\n consumerName?: string;\n excludeEventTypes?: list<EventsQueryRequestExcludeEventTypesItem>;\n includeEventTypes?: list<EventsQueryRequestIncludeEventTypesItem>;\n ownerContractId?: string;\n ownerEventName?: string;\n publisherDeploymentId?: string;\n publisherParticipantId?: string;\n resourceId?: string;\n subject?: string;\n}\n\nmodel HealthHeartbeatSample {\n checks: list<HealthHeartbeatSampleChecksItem>;\n participant: HealthHeartbeatSampleParticipant;\n /// Where a service is in its lifecycle: connected and starting its handlers, serving, or stopping. A participant that does not report it leaves it out.\n phase?: HealthHeartbeatSamplePhase;\n reportedStatus: HealthHeartbeatSampleReportedStatus;\n sample: HealthHeartbeatSampleSample;\n summary?: HealthHeartbeatSampleSummary;\n}\n\nmodel HealthHeartbeatSampleChecksItem {\n error?: HealthHeartbeatSampleChecksItemError;\n info?: HealthHeartbeatSampleChecksItemInfo;\n latencyMs: HealthHeartbeatSampleChecksItemLatencyMs;\n name: HealthHeartbeatSampleChecksItemName;\n status: HealthHeartbeatSampleChecksItemStatus;\n summary?: HealthHeartbeatSampleChecksItemSummary;\n}\n\ntype HealthHeartbeatSampleChecksItemError = string(max_length=1024);\n\nmodel HealthHeartbeatSampleChecksItemInfo {\n}\n\ntype HealthHeartbeatSampleChecksItemLatencyMs = number(min=0, max=3600000);\n\ntype HealthHeartbeatSampleChecksItemName = string(min_length=1, max_length=128);\n\nenum HealthHeartbeatSampleChecksItemStatus {\n \"degraded\";\n \"failed\";\n \"ok\";\n}\n\ntype HealthHeartbeatSampleChecksItemSummary = string(max_length=1024);\n\nmodel HealthHeartbeatSampleParticipant {\n contractDigest: HealthHeartbeatSampleParticipantContractDigest;\n contractId: HealthHeartbeatSampleParticipantContractId;\n info?: HealthHeartbeatSampleParticipantInfo;\n instanceId: HealthHeartbeatSampleParticipantInstanceId;\n kind: HealthHeartbeatSampleParticipantKind;\n name: HealthHeartbeatSampleParticipantName;\n publishIntervalMs: HealthHeartbeatSampleParticipantPublishIntervalMs;\n runtime: HealthHeartbeatSampleParticipantRuntime;\n runtimeVersion?: HealthHeartbeatSampleParticipantRuntimeVersion;\n startedAt: string;\n version?: HealthHeartbeatSampleParticipantVersion;\n}\n\ntype HealthHeartbeatSampleParticipantContractDigest = string(min_length=1, max_length=256);\n\ntype HealthHeartbeatSampleParticipantContractId = string(min_length=1, max_length=256);\n\nmodel HealthHeartbeatSampleParticipantInfo {\n}\n\ntype HealthHeartbeatSampleParticipantInstanceId = string(min_length=1, max_length=128);\n\nenum HealthHeartbeatSampleParticipantKind {\n \"device\";\n \"service\";\n}\n\ntype HealthHeartbeatSampleParticipantName = string(min_length=1, max_length=256);\n\ntype HealthHeartbeatSampleParticipantPublishIntervalMs = int64(min=1000, max=600000);\n\nenum HealthHeartbeatSampleParticipantRuntime {\n \"deno\";\n \"node\";\n \"rust\";\n}\n\ntype HealthHeartbeatSampleParticipantRuntimeVersion = string(max_length=256);\n\ntype HealthHeartbeatSampleParticipantVersion = string(max_length=256);\n\n/// `connecting`: connected and starting its handlers, or reconnecting after losing its connection. `serving`: every handler, job worker and consumer takes work. `stopping`: no longer takes new work and is finishing what it holds.\nenum HealthHeartbeatSamplePhase {\n \"connecting\";\n \"serving\";\n \"stopping\";\n}\n\nenum HealthHeartbeatSampleReportedStatus {\n \"degraded\";\n \"healthy\";\n \"unhealthy\";\n}\n\nmodel HealthHeartbeatSampleSample {\n id: string;\n time: string;\n}\n\ntype HealthHeartbeatSampleSummary = string(max_length=1024);\n\nmodel HealthInspectRequest {\n contractId: HealthInspectRequestContractId;\n historyLimit?: HealthInspectRequestHistoryLimit;\n historySince?: string;\n instanceId?: HealthInspectRequestInstanceId;\n participantKind: HealthInspectRequestParticipantKind;\n}\n\ntype HealthInspectRequestContractId = string(min_length=1, max_length=256);\n\ntype HealthInspectRequestHistoryLimit = int64(min=1, max=500);\n\ntype HealthInspectRequestInstanceId = string(min_length=1, max_length=128);\n\nenum HealthInspectRequestParticipantKind {\n \"device\";\n \"service\";\n}\n\nmodel HealthInspectResponse {\n asOf: string;\n history: list<HealthInspectResponseHistoryItem>;\n instances: list<HealthInspectResponseInstancesItem>;\n participant: HealthInspectResponseParticipant;\n projection: HealthInspectResponseProjection;\n}\n\nmodel HealthInspectResponseHistoryItem {\n checks: list<HealthInspectResponseHistoryItemChecksItem>;\n effectiveStatus: HealthInspectResponseHistoryItemEffectiveStatus;\n endedAt?: string;\n instanceId: string;\n intervalId: HealthInspectResponseHistoryItemIntervalId;\n reason: string;\n reportedStatus: HealthInspectResponseHistoryItemReportedStatus;\n startedAt: string;\n}\n\nmodel HealthInspectResponseHistoryItemChecksItem {\n name: string;\n status: HealthInspectResponseHistoryItemChecksItemStatus;\n}\n\nenum HealthInspectResponseHistoryItemChecksItemStatus {\n \"degraded\";\n \"failed\";\n \"ok\";\n}\n\nenum HealthInspectResponseHistoryItemEffectiveStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\ntype HealthInspectResponseHistoryItemIntervalId = int64(min=1);\n\nenum HealthInspectResponseHistoryItemReportedStatus {\n \"degraded\";\n \"healthy\";\n \"unhealthy\";\n}\n\nmodel HealthInspectResponseInstancesItem {\n ageMs: uint64;\n contractDigest: string;\n deploymentId: string;\n effectiveStatus: HealthInspectResponseInstancesItemEffectiveStatus;\n heartbeatDeadline: string;\n instanceId: string;\n latestSample: HealthInspectResponseInstancesItemLatestSample;\n observedAt: string;\n reportedStatus: HealthInspectResponseInstancesItemReportedStatus;\n startedAt: string;\n}\n\nenum HealthInspectResponseInstancesItemEffectiveStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\nmodel HealthInspectResponseInstancesItemLatestSample {\n checks: list<HealthInspectResponseInstancesItemLatestSampleChecksItem>;\n participant: HealthInspectResponseInstancesItemLatestSampleParticipant;\n /// The lifecycle phase the instance last reported.\n phase?: HealthHeartbeatSamplePhase;\n reportedStatus: HealthInspectResponseInstancesItemLatestSampleReportedStatus;\n sample: HealthInspectResponseInstancesItemLatestSampleSample;\n summary?: HealthInspectResponseInstancesItemLatestSampleSummary;\n}\n\nmodel HealthInspectResponseInstancesItemLatestSampleChecksItem {\n error?: HealthInspectResponseInstancesItemLatestSampleChecksItemError;\n info?: HealthInspectResponseInstancesItemLatestSampleChecksItemInfo;\n latencyMs: HealthInspectResponseInstancesItemLatestSampleChecksItemLatencyMs;\n name: HealthInspectResponseInstancesItemLatestSampleChecksItemName;\n status: HealthInspectResponseInstancesItemLatestSampleChecksItemStatus;\n summary?: HealthInspectResponseInstancesItemLatestSampleChecksItemSummary;\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleChecksItemError = string(max_length=1024);\n\nmodel HealthInspectResponseInstancesItemLatestSampleChecksItemInfo {\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleChecksItemLatencyMs = number(min=0, max=3600000);\n\ntype HealthInspectResponseInstancesItemLatestSampleChecksItemName = string(min_length=1, max_length=128);\n\nenum HealthInspectResponseInstancesItemLatestSampleChecksItemStatus {\n \"degraded\";\n \"failed\";\n \"ok\";\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleChecksItemSummary = string(max_length=1024);\n\nmodel HealthInspectResponseInstancesItemLatestSampleParticipant {\n contractDigest: HealthInspectResponseInstancesItemLatestSampleParticipantContractDigest;\n contractId: HealthInspectResponseInstancesItemLatestSampleParticipantContractId;\n info?: HealthInspectResponseInstancesItemLatestSampleParticipantInfo;\n instanceId: HealthInspectResponseInstancesItemLatestSampleParticipantInstanceId;\n kind: HealthInspectResponseInstancesItemLatestSampleParticipantKind;\n name: HealthInspectResponseInstancesItemLatestSampleParticipantName;\n publishIntervalMs: HealthInspectResponseInstancesItemLatestSampleParticipantPublishIntervalMs;\n runtime: HealthInspectResponseInstancesItemLatestSampleParticipantRuntime;\n runtimeVersion?: HealthInspectResponseInstancesItemLatestSampleParticipantRuntimeVersion;\n startedAt: string;\n version?: HealthInspectResponseInstancesItemLatestSampleParticipantVersion;\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantContractDigest = string(min_length=1, max_length=256);\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantContractId = string(min_length=1, max_length=256);\n\nmodel HealthInspectResponseInstancesItemLatestSampleParticipantInfo {\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantInstanceId = string(min_length=1, max_length=128);\n\nenum HealthInspectResponseInstancesItemLatestSampleParticipantKind {\n \"device\";\n \"service\";\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantName = string(min_length=1, max_length=256);\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantPublishIntervalMs = int64(min=1000, max=600000);\n\nenum HealthInspectResponseInstancesItemLatestSampleParticipantRuntime {\n \"deno\";\n \"node\";\n \"rust\";\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantRuntimeVersion = string(max_length=256);\n\ntype HealthInspectResponseInstancesItemLatestSampleParticipantVersion = string(max_length=256);\n\nenum HealthInspectResponseInstancesItemLatestSampleReportedStatus {\n \"degraded\";\n \"healthy\";\n \"unhealthy\";\n}\n\nmodel HealthInspectResponseInstancesItemLatestSampleSample {\n id: string;\n time: string;\n}\n\ntype HealthInspectResponseInstancesItemLatestSampleSummary = string(max_length=1024);\n\nenum HealthInspectResponseInstancesItemReportedStatus {\n \"degraded\";\n \"healthy\";\n \"unhealthy\";\n}\n\nmodel HealthInspectResponseParticipant {\n contractId: string;\n effectiveStatus: HealthInspectResponseParticipantEffectiveStatus;\n offlineInstances: uint64;\n onlineInstances: uint64;\n participantKind: HealthInspectResponseParticipantParticipantKind;\n participantName: string;\n}\n\nenum HealthInspectResponseParticipantEffectiveStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\nenum HealthInspectResponseParticipantParticipantKind {\n \"device\";\n \"service\";\n}\n\nmodel HealthInspectResponseProjection {\n completeSince?: string;\n gapDetected: bool;\n lastStreamSequence: uint64;\n retainedFrom?: string;\n revision: uint64;\n}\n\nmodel HealthMetricsRequest {\n checkNames?: list<HealthMetricsRequestCheckNamesItem>;\n contractId: HealthMetricsRequestContractId;\n end: string;\n instanceIds?: list<HealthMetricsRequestInstanceIdsItem>;\n participantKind: HealthMetricsRequestParticipantKind;\n start: string;\n stepMs: HealthMetricsRequestStepMs;\n}\n\ntype HealthMetricsRequestCheckNamesItem = string(min_length=1, max_length=128);\n\ntype HealthMetricsRequestContractId = string(min_length=1, max_length=256);\n\ntype HealthMetricsRequestInstanceIdsItem = string(min_length=1, max_length=128);\n\nenum HealthMetricsRequestParticipantKind {\n \"device\";\n \"service\";\n}\n\ntype HealthMetricsRequestStepMs = int64(min=300000);\n\nmodel HealthMetricsResponse {\n asOf: string;\n projection: HealthMetricsResponseProjection;\n series: list<HealthMetricsResponseSeriesItem>;\n summary: HealthMetricsResponseSummary;\n}\n\nmodel HealthMetricsResponseProjection {\n completeSince?: string;\n gapDetected: bool;\n lastStreamSequence: uint64;\n retainedFrom?: string;\n revision: uint64;\n}\n\nmodel HealthMetricsResponseSeriesItem {\n buckets: list<HealthMetricsResponseSeriesItemBucketsItem>;\n contractId: string;\n instanceId: string;\n participantKind: HealthMetricsResponseSeriesItemParticipantKind;\n}\n\nmodel HealthMetricsResponseSeriesItemBucketsItem {\n checks: list<HealthMetricsResponseSeriesItemBucketsItemChecksItem>;\n degradedMs: uint64;\n end: string;\n healthyMs: uint64;\n observedMs: uint64;\n offlineMs: uint64;\n sampleCount: uint64;\n start: string;\n unhealthyMs: uint64;\n}\n\nmodel HealthMetricsResponseSeriesItemBucketsItemChecksItem {\n degradedCount: uint64;\n failedCount: uint64;\n latencyAverageMs: HealthMetricsResponseSeriesItemBucketsItemChecksItemLatencyAverageMs;\n latencyMaxMs: HealthMetricsResponseSeriesItemBucketsItemChecksItemLatencyMaxMs;\n name: string;\n okCount: uint64;\n sampleCount: uint64;\n}\n\ntype HealthMetricsResponseSeriesItemBucketsItemChecksItemLatencyAverageMs = number(min=0);\n\ntype HealthMetricsResponseSeriesItemBucketsItemChecksItemLatencyMaxMs = number(min=0);\n\nenum HealthMetricsResponseSeriesItemParticipantKind {\n \"device\";\n \"service\";\n}\n\nmodel HealthMetricsResponseSummary {\n availability?: HealthMetricsResponseSummaryAvailability;\n observedMs: uint64;\n onlineMs: uint64;\n sampleCount: uint64;\n transitions: uint64;\n}\n\ntype HealthMetricsResponseSummaryAvailability = number(min=0, max=1);\n\nmodel HealthNotFoundErrorData {\n resource: HealthNotFoundErrorDataResource;\n}\n\ntype HealthNotFoundErrorDataResource = string(min_length=1);\n\nmodel HealthProjectionDiagnostics {\n completeSince?: string;\n gapDetected: bool;\n lastStreamSequence: uint64;\n retainedFrom?: string;\n revision: uint64;\n}\n\nmodel HealthQueryRequest {\n contractIds?: list<HealthQueryRequestContractIdsItem>;\n deploymentIds?: list<HealthQueryRequestDeploymentIdsItem>;\n page?: CursorQuery;\n participantKinds?: list<HealthQueryRequestParticipantKinds>;\n search?: HealthQueryRequestSearch;\n statuses?: list<HealthQueryRequestStatuses>;\n}\n\ntype HealthQueryRequestContractIdsItem = string(min_length=1, max_length=256);\n\ntype HealthQueryRequestDeploymentIdsItem = string(min_length=1, max_length=128);\n\ntype HealthQueryRequestLimit = int64(min=1, max=200);\n\nenum HealthQueryRequestParticipantKinds {\n \"device\";\n \"service\";\n}\n\ntype HealthQueryRequestSearch = string(max_length=256);\n\nenum HealthQueryRequestStatuses {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\ntype HealthQueryResponse = CursorPage<HealthQueryResponseEntriesItem>;\n\nmodel HealthQueryResponseEntriesItem {\n contractDigests: list<HealthQueryResponseEntriesItemContractDigestsItem>;\n contractId: string;\n deploymentIds: list<HealthQueryResponseEntriesItemDeploymentIdsItem>;\n effectiveStatus: HealthQueryResponseEntriesItemEffectiveStatus;\n lastSeenAt: string;\n offlineInstances: uint64;\n onlineInstances: uint64;\n participantKind: HealthQueryResponseEntriesItemParticipantKind;\n participantName: string;\n runtimes: list<string>;\n versions: list<string>;\n}\n\ntype HealthQueryResponseEntriesItemContractDigestsItem = string(min_length=1, max_length=128);\n\ntype HealthQueryResponseEntriesItemDeploymentIdsItem = string(min_length=1, max_length=128);\n\nenum HealthQueryResponseEntriesItemEffectiveStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\nenum HealthQueryResponseEntriesItemParticipantKind {\n \"device\";\n \"service\";\n}\n\ntype HealthQueryResponseLimit = int64(min=1);\n\nmodel HealthQueryResponseProjection {\n completeSince?: string;\n gapDetected: bool;\n lastStreamSequence: uint64;\n retainedFrom?: string;\n revision: uint64;\n}\n\nmodel HealthStatusChangedEvent {\n changedAt: string;\n header: HealthStatusChangedEventHeader;\n lastSeenAt: string;\n participant: HealthStatusChangedEventParticipant;\n previousStatus: HealthStatusChangedEventPreviousStatus;\n reason: string;\n reportedStatus: HealthStatusChangedEventReportedStatus;\n status: HealthStatusChangedEventStatus;\n summary?: HealthStatusChangedEventSummary;\n}\n\nmodel HealthStatusChangedEventHeader {\n id: HealthStatusChangedEventHeaderId;\n time: string;\n}\n\ntype HealthStatusChangedEventHeaderId = string(min_length=1, max_length=128);\n\nmodel HealthStatusChangedEventParticipant {\n contractId: string;\n deploymentId: string;\n instanceId: string;\n kind: HealthStatusChangedEventParticipantKind;\n name: string;\n}\n\nenum HealthStatusChangedEventParticipantKind {\n \"device\";\n \"service\";\n}\n\nenum HealthStatusChangedEventPreviousStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\nenum HealthStatusChangedEventReportedStatus {\n \"degraded\";\n \"healthy\";\n \"unhealthy\";\n}\n\nenum HealthStatusChangedEventStatus {\n \"degraded\";\n \"healthy\";\n \"offline\";\n \"unhealthy\";\n}\n\ntype HealthStatusChangedEventSummary = string(max_length=1024);\n\nmodel HealthStorageClass {\n bytes: uint64;\n location: string;\n name: HealthStorageClassName;\n oldestAt?: string;\n records?: uint64;\n retention: string;\n}\n\nenum HealthStorageClassName {\n \"authDatabase\";\n \"deadLetterJournal\";\n \"deadLetters\";\n \"eventStream\";\n \"eventsDatabase\";\n \"healthDatabase\";\n \"healthStream\";\n \"jobAdvisories\";\n \"jobHistory\";\n \"jobWork\";\n \"jobsDatabase\";\n \"recordedEvents\";\n \"replayStream\";\n}\n\n/// JetStream storage and memory that Trellis uses and reserves, against the\n/// broker's limits. A stream's size bound is reserved in full when the stream\n/// is created, so reservations can run out while little is stored.\nmodel HealthStorageJetStream {\n consumers: uint64;\n /// The account's largest streams by bytes stored or reserved. Absent when\n /// JetStream did not list every stream, rather than a partial list.\n largestStreams?: list<HealthStorageJetStreamStream>;\n maxConsumers?: uint64;\n maxStreams?: uint64;\n /// Memory storage of the Trellis NATS account.\n memory: HealthStorageJetStreamUsage;\n /// Each limit that is close, and each refusal, with the numbers.\n problems: list<string>;\n /// Memory storage of the NATS server with the most memory committed, when\n /// Trellis can ask the servers. In a cluster this can be a different server\n /// than `serverStorage`.\n serverMemory?: HealthStorageJetStreamUsage;\n /// File storage of the NATS server with the most storage committed, when\n /// Trellis can ask the servers.\n serverStorage?: HealthStorageJetStreamUsage;\n /// `degraded` while used or reserved storage or memory, streams, or\n /// consumers reach 85% of a limit, or JetStream refuses a Trellis resource.\n status: HealthStorageJetStreamStatus;\n /// File storage of the Trellis NATS account.\n storage: HealthStorageJetStreamUsage;\n streams: uint64;\n}\n\nenum HealthStorageJetStreamStatus {\n \"degraded\";\n \"ok\";\n}\n\nmodel HealthStorageJetStreamStream {\n bytes: uint64;\n /// The stream's size bound, which JetStream reserves.\n maxBytes?: uint64;\n messages: uint64;\n name: string;\n}\n\n/// Bytes stored and reserved against a limit.\nmodel HealthStorageJetStreamUsage {\n /// Absent when no limit is set.\n limit?: uint64;\n reserved: uint64;\n used: uint64;\n}\n\nmodel HealthStorageRequest {\n}\n\nmodel HealthStorageResponse {\n asOf: string;\n classes: list<HealthStorageClass>;\n /// JetStream usage against its limits, when JetStream answers.\n jetstream?: HealthStorageJetStream;\n}\n\nmodel HealthSummaryRequest {\n contractIds?: list<HealthQueryRequestContractIdsItem>;\n deploymentIds?: list<HealthQueryRequestDeploymentIdsItem>;\n participantKinds?: list<HealthQueryRequestParticipantKinds>;\n search?: HealthQueryRequestSearch;\n statuses?: list<HealthQueryRequestStatuses>;\n}\n\nmodel HealthSummaryResponse {\n asOf: string;\n count: uint64;\n projection: HealthQueryResponseProjection;\n}\n\ntype HealthWatchFrame = bytes;\n\nmodel HealthWatchFrameValue1 {\n projectionRevision: uint64;\n type: HealthWatchFrameValue1Type;\n}\n\nenum HealthWatchFrameValue1Type {\n \"ready\";\n}\n\nmodel HealthWatchFrameValue2 {\n changes?: list<HealthWatchFrameValue2ChangesItem>;\n projectionRevision: uint64;\n type: HealthWatchFrameValue2Type;\n}\n\nmodel HealthWatchFrameValue2ChangesItem {\n contractId: string;\n deploymentId: string;\n instanceId: string;\n participantKind: HealthWatchFrameValue2ChangesItemParticipantKind;\n}\n\nenum HealthWatchFrameValue2ChangesItemParticipantKind {\n \"device\";\n \"service\";\n}\n\nenum HealthWatchFrameValue2Type {\n \"healthInvalidated\";\n}\n\nmodel HealthWatchRequest {\n contractIds?: list<HealthWatchRequestContractIdsItem>;\n deploymentIds?: list<HealthWatchRequestDeploymentIdsItem>;\n instanceIds?: list<HealthWatchRequestInstanceIdsItem>;\n participantKinds?: list<HealthWatchRequestParticipantKinds>;\n}\n\ntype HealthWatchRequestContractIdsItem = string(min_length=1, max_length=256);\n\ntype HealthWatchRequestDeploymentIdsItem = string(min_length=1, max_length=128);\n\ntype HealthWatchRequestInstanceIdsItem = string(min_length=1, max_length=128);\n\nenum HealthWatchRequestParticipantKinds {\n \"device\";\n \"service\";\n}\n\nmodel Job {\n completedAt?: string;\n concurrency?: JobConcurrency;\n context: JobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobErrorDetail;\n id: JobId;\n lastError?: string;\n lineage?: JobLineage;\n logs?: list<JobLogsItem>;\n maxTries: JobMaxTries;\n payload: bytes;\n progress?: JobProgress;\n queuePolicy?: JobQueuePolicy;\n result?: bytes;\n service: JobService;\n startedAt?: string;\n state: JobState;\n tries: uint64;\n trigger?: JobTrigger;\n type: JobType;\n updatedAt: string;\n waitingOn?: list<JobWaitingOnItem>;\n}\n\nmodel JobConcurrency {\n heartbeatAt?: string;\n key: JobConcurrencyKey;\n keyHash: JobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobConcurrencyKey = string(min_length=1);\n\ntype JobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobConcurrencyMetadata {\n heartbeatAt?: string;\n key: JobConcurrencyMetadataKey;\n keyHash: JobConcurrencyMetadataKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobConcurrencyMetadataKey = string(min_length=1);\n\ntype JobConcurrencyMetadataKeyHash = string(min_length=1);\n\nmodel JobContext {\n requestId: JobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobContextTracestate;\n}\n\ntype JobContextRequestId = string(min_length=1);\n\ntype JobContextTracestate = string(min_length=1);\n\nmodel JobErrorDetail {\n causes?: list<JobErrorDetailCausesItem>;\n fingerprint: JobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobErrorDetailWorker;\n}\n\nmodel JobErrorDetailCausesItem {\n}\n\ntype JobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobId = string(min_length=1);\n\nmodel JobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobLogEntry {\n level: JobLogEntryLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobLogEntryLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\nmodel JobLogsItem {\n level: JobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobMaxTries = int64(min=1);\n\nmodel JobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobQueuePolicy {\n existingJobId?: JobQueuePolicyExistingJobId;\n outcome: JobQueuePolicyOutcome;\n reason?: JobQueuePolicyReason;\n replacedJobId?: JobQueuePolicyReplacedJobId;\n}\n\ntype JobQueuePolicyExistingJobId = string(min_length=1);\n\nmodel JobQueuePolicyMetadata {\n existingJobId?: JobQueuePolicyMetadataExistingJobId;\n outcome: JobQueuePolicyMetadataOutcome;\n reason?: JobQueuePolicyMetadataReason;\n replacedJobId?: JobQueuePolicyMetadataReplacedJobId;\n}\n\ntype JobQueuePolicyMetadataExistingJobId = string(min_length=1);\n\ntype JobQueuePolicyMetadataOutcome = string(min_length=1);\n\ntype JobQueuePolicyMetadataReason = string(min_length=1);\n\ntype JobQueuePolicyMetadataReplacedJobId = string(min_length=1);\n\ntype JobQueuePolicyOutcome = string(min_length=1);\n\ntype JobQueuePolicyReason = string(min_length=1);\n\ntype JobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobService = string(min_length=1);\n\nenum JobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobTimelineEvent {\n error?: string;\n errorDetail?: JobTimelineEventErrorDetail;\n logs?: list<JobTimelineEventLogsItem>;\n message?: string;\n previousState?: JobTimelineEventPreviousState;\n progress?: JobTimelineEventProgress;\n projected?: bool;\n rawEvent?: bytes;\n reason?: string;\n sequence: uint64;\n state: JobTimelineEventState;\n timestamp: string;\n tries?: uint64;\n type: JobTimelineEventType;\n waitEdge?: JobTimelineEventWaitEdge;\n workerInstanceId?: string;\n}\n\nmodel JobTimelineEventErrorDetail {\n causes?: list<JobTimelineEventErrorDetailCausesItem>;\n fingerprint: JobTimelineEventErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobTimelineEventErrorDetailWorker;\n}\n\nmodel JobTimelineEventErrorDetailCausesItem {\n}\n\ntype JobTimelineEventErrorDetailFingerprint = string(min_length=1);\n\nmodel JobTimelineEventErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\nmodel JobTimelineEventLogsItem {\n level: JobTimelineEventLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobTimelineEventLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\nenum JobTimelineEventPreviousState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobTimelineEventProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nenum JobTimelineEventState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobTimelineEventType = string(min_length=1);\n\nmodel JobTimelineEventWaitEdge {\n id: JobTimelineEventWaitEdgeId;\n label?: JobTimelineEventWaitEdgeLabel;\n startedAt: string;\n target: JobTimelineEventWaitEdgeTarget;\n}\n\ntype JobTimelineEventWaitEdgeId = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeLabel = string(min_length=1);\n\nmodel JobTimelineEventWaitEdgeTarget {\n id?: JobTimelineEventWaitEdgeTargetId;\n key?: JobTimelineEventWaitEdgeTargetKey;\n kind: JobTimelineEventWaitEdgeTargetKind;\n label?: JobTimelineEventWaitEdgeTargetLabel;\n operation?: JobTimelineEventWaitEdgeTargetOperation;\n operationId?: JobTimelineEventWaitEdgeTargetOperationId;\n service?: JobTimelineEventWaitEdgeTargetService;\n system?: JobTimelineEventWaitEdgeTargetSystem;\n type?: JobTimelineEventWaitEdgeTargetType;\n}\n\ntype JobTimelineEventWaitEdgeTargetId = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetKey = string(min_length=1);\n\nenum JobTimelineEventWaitEdgeTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobTimelineEventWaitEdgeTargetLabel = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetOperation = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetOperationId = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetService = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetSystem = string(min_length=1);\n\ntype JobTimelineEventWaitEdgeTargetType = string(min_length=1);\n\nmodel JobTrigger {\n id?: string;\n kind: JobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobType = string(min_length=1);\n\nmodel JobWaitEdge {\n id: JobWaitEdgeId;\n label?: JobWaitEdgeLabel;\n startedAt: string;\n target: JobWaitEdgeTarget;\n}\n\ntype JobWaitEdgeId = string(min_length=1);\n\ntype JobWaitEdgeLabel = string(min_length=1);\n\nmodel JobWaitEdgeTarget {\n id?: JobWaitEdgeTargetId;\n key?: JobWaitEdgeTargetKey;\n kind: JobWaitEdgeTargetKind;\n label?: JobWaitEdgeTargetLabel;\n operation?: JobWaitEdgeTargetOperation;\n operationId?: JobWaitEdgeTargetOperationId;\n service?: JobWaitEdgeTargetService;\n system?: JobWaitEdgeTargetSystem;\n type?: JobWaitEdgeTargetType;\n}\n\ntype JobWaitEdgeTargetId = string(min_length=1);\n\ntype JobWaitEdgeTargetKey = string(min_length=1);\n\nenum JobWaitEdgeTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobWaitEdgeTargetLabel = string(min_length=1);\n\ntype JobWaitEdgeTargetOperation = string(min_length=1);\n\ntype JobWaitEdgeTargetOperationId = string(min_length=1);\n\ntype JobWaitEdgeTargetService = string(min_length=1);\n\ntype JobWaitEdgeTargetSystem = string(min_length=1);\n\ntype JobWaitEdgeTargetType = string(min_length=1);\n\nmodel JobWaitTarget {\n id?: JobWaitTargetId;\n key?: JobWaitTargetKey;\n kind: JobWaitTargetKind;\n label?: JobWaitTargetLabel;\n operation?: JobWaitTargetOperation;\n operationId?: JobWaitTargetOperationId;\n service?: JobWaitTargetService;\n system?: JobWaitTargetSystem;\n type?: JobWaitTargetType;\n}\n\ntype JobWaitTargetId = string(min_length=1);\n\ntype JobWaitTargetKey = string(min_length=1);\n\nenum JobWaitTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobWaitTargetLabel = string(min_length=1);\n\ntype JobWaitTargetOperation = string(min_length=1);\n\ntype JobWaitTargetOperationId = string(min_length=1);\n\ntype JobWaitTargetService = string(min_length=1);\n\ntype JobWaitTargetSystem = string(min_length=1);\n\ntype JobWaitTargetType = string(min_length=1);\n\nmodel JobWaitingOnItem {\n id: JobWaitingOnItemId;\n label?: JobWaitingOnItemLabel;\n startedAt: string;\n target: JobWaitingOnItemTarget;\n}\n\ntype JobWaitingOnItemId = string(min_length=1);\n\ntype JobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobWaitingOnItemTarget {\n id?: JobWaitingOnItemTargetId;\n key?: JobWaitingOnItemTargetKey;\n kind: JobWaitingOnItemTargetKind;\n label?: JobWaitingOnItemTargetLabel;\n operation?: JobWaitingOnItemTargetOperation;\n operationId?: JobWaitingOnItemTargetOperationId;\n service?: JobWaitingOnItemTargetService;\n system?: JobWaitingOnItemTargetSystem;\n type?: JobWaitingOnItemTargetType;\n}\n\ntype JobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsCancelRequest {\n id: JobsCancelRequestId;\n reason?: JobsCancelRequestReason;\n}\n\ntype JobsCancelRequestId = string(min_length=1);\n\ntype JobsCancelRequestReason = string(min_length=1);\n\nmodel JobsCancelResponse {\n job: JobsCancelResponseJob;\n}\n\nmodel JobsCancelResponseJob {\n completedAt?: string;\n concurrency?: JobsCancelResponseJobConcurrency;\n context: JobsCancelResponseJobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsCancelResponseJobErrorDetail;\n id: JobsCancelResponseJobId;\n lastError?: string;\n lineage?: JobsCancelResponseJobLineage;\n logs?: list<JobsCancelResponseJobLogsItem>;\n maxTries: JobsCancelResponseJobMaxTries;\n payload: bytes;\n progress?: JobsCancelResponseJobProgress;\n queuePolicy?: JobsCancelResponseJobQueuePolicy;\n result?: bytes;\n service: JobsCancelResponseJobService;\n startedAt?: string;\n state: JobsCancelResponseJobState;\n tries: uint64;\n trigger?: JobsCancelResponseJobTrigger;\n type: JobsCancelResponseJobType;\n updatedAt: string;\n waitingOn?: list<JobsCancelResponseJobWaitingOnItem>;\n}\n\nmodel JobsCancelResponseJobConcurrency {\n heartbeatAt?: string;\n key: JobsCancelResponseJobConcurrencyKey;\n keyHash: JobsCancelResponseJobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsCancelResponseJobConcurrencyKey = string(min_length=1);\n\ntype JobsCancelResponseJobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsCancelResponseJobContext {\n requestId: JobsCancelResponseJobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsCancelResponseJobContextTracestate;\n}\n\ntype JobsCancelResponseJobContextRequestId = string(min_length=1);\n\ntype JobsCancelResponseJobContextTracestate = string(min_length=1);\n\nmodel JobsCancelResponseJobErrorDetail {\n causes?: list<JobsCancelResponseJobErrorDetailCausesItem>;\n fingerprint: JobsCancelResponseJobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsCancelResponseJobErrorDetailWorker;\n}\n\nmodel JobsCancelResponseJobErrorDetailCausesItem {\n}\n\ntype JobsCancelResponseJobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsCancelResponseJobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsCancelResponseJobId = string(min_length=1);\n\nmodel JobsCancelResponseJobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsCancelResponseJobLogsItem {\n level: JobsCancelResponseJobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsCancelResponseJobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsCancelResponseJobMaxTries = int64(min=1);\n\nmodel JobsCancelResponseJobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsCancelResponseJobQueuePolicy {\n existingJobId?: JobsCancelResponseJobQueuePolicyExistingJobId;\n outcome: JobsCancelResponseJobQueuePolicyOutcome;\n reason?: JobsCancelResponseJobQueuePolicyReason;\n replacedJobId?: JobsCancelResponseJobQueuePolicyReplacedJobId;\n}\n\ntype JobsCancelResponseJobQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsCancelResponseJobQueuePolicyOutcome = string(min_length=1);\n\ntype JobsCancelResponseJobQueuePolicyReason = string(min_length=1);\n\ntype JobsCancelResponseJobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsCancelResponseJobService = string(min_length=1);\n\nenum JobsCancelResponseJobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsCancelResponseJobTrigger {\n id?: string;\n kind: JobsCancelResponseJobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsCancelResponseJobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsCancelResponseJobType = string(min_length=1);\n\nmodel JobsCancelResponseJobWaitingOnItem {\n id: JobsCancelResponseJobWaitingOnItemId;\n label?: JobsCancelResponseJobWaitingOnItemLabel;\n startedAt: string;\n target: JobsCancelResponseJobWaitingOnItemTarget;\n}\n\ntype JobsCancelResponseJobWaitingOnItemId = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsCancelResponseJobWaitingOnItemTarget {\n id?: JobsCancelResponseJobWaitingOnItemTargetId;\n key?: JobsCancelResponseJobWaitingOnItemTargetKey;\n kind: JobsCancelResponseJobWaitingOnItemTargetKind;\n label?: JobsCancelResponseJobWaitingOnItemTargetLabel;\n operation?: JobsCancelResponseJobWaitingOnItemTargetOperation;\n operationId?: JobsCancelResponseJobWaitingOnItemTargetOperationId;\n service?: JobsCancelResponseJobWaitingOnItemTargetService;\n system?: JobsCancelResponseJobWaitingOnItemTargetSystem;\n type?: JobsCancelResponseJobWaitingOnItemTargetType;\n}\n\ntype JobsCancelResponseJobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsCancelResponseJobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsCancelResponseJobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsCancelResponseJobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsDismissDLQRequest {\n id: JobsDismissDLQRequestId;\n reason?: JobsDismissDLQRequestReason;\n}\n\ntype JobsDismissDLQRequestId = string(min_length=1);\n\ntype JobsDismissDLQRequestReason = string(min_length=1);\n\nmodel JobsDismissDLQResponse {\n job: JobsDismissDLQResponseJob;\n}\n\nmodel JobsDismissDLQResponseJob {\n completedAt?: string;\n concurrency?: JobsDismissDLQResponseJobConcurrency;\n context: JobsDismissDLQResponseJobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsDismissDLQResponseJobErrorDetail;\n id: JobsDismissDLQResponseJobId;\n lastError?: string;\n lineage?: JobsDismissDLQResponseJobLineage;\n logs?: list<JobsDismissDLQResponseJobLogsItem>;\n maxTries: JobsDismissDLQResponseJobMaxTries;\n payload: bytes;\n progress?: JobsDismissDLQResponseJobProgress;\n queuePolicy?: JobsDismissDLQResponseJobQueuePolicy;\n result?: bytes;\n service: JobsDismissDLQResponseJobService;\n startedAt?: string;\n state: JobsDismissDLQResponseJobState;\n tries: uint64;\n trigger?: JobsDismissDLQResponseJobTrigger;\n type: JobsDismissDLQResponseJobType;\n updatedAt: string;\n waitingOn?: list<JobsDismissDLQResponseJobWaitingOnItem>;\n}\n\nmodel JobsDismissDLQResponseJobConcurrency {\n heartbeatAt?: string;\n key: JobsDismissDLQResponseJobConcurrencyKey;\n keyHash: JobsDismissDLQResponseJobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsDismissDLQResponseJobConcurrencyKey = string(min_length=1);\n\ntype JobsDismissDLQResponseJobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobContext {\n requestId: JobsDismissDLQResponseJobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsDismissDLQResponseJobContextTracestate;\n}\n\ntype JobsDismissDLQResponseJobContextRequestId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobContextTracestate = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobErrorDetail {\n causes?: list<JobsDismissDLQResponseJobErrorDetailCausesItem>;\n fingerprint: JobsDismissDLQResponseJobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsDismissDLQResponseJobErrorDetailWorker;\n}\n\nmodel JobsDismissDLQResponseJobErrorDetailCausesItem {\n}\n\ntype JobsDismissDLQResponseJobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsDismissDLQResponseJobId = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsDismissDLQResponseJobLogsItem {\n level: JobsDismissDLQResponseJobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsDismissDLQResponseJobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsDismissDLQResponseJobMaxTries = int64(min=1);\n\nmodel JobsDismissDLQResponseJobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsDismissDLQResponseJobQueuePolicy {\n existingJobId?: JobsDismissDLQResponseJobQueuePolicyExistingJobId;\n outcome: JobsDismissDLQResponseJobQueuePolicyOutcome;\n reason?: JobsDismissDLQResponseJobQueuePolicyReason;\n replacedJobId?: JobsDismissDLQResponseJobQueuePolicyReplacedJobId;\n}\n\ntype JobsDismissDLQResponseJobQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobQueuePolicyOutcome = string(min_length=1);\n\ntype JobsDismissDLQResponseJobQueuePolicyReason = string(min_length=1);\n\ntype JobsDismissDLQResponseJobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobService = string(min_length=1);\n\nenum JobsDismissDLQResponseJobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsDismissDLQResponseJobTrigger {\n id?: string;\n kind: JobsDismissDLQResponseJobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsDismissDLQResponseJobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsDismissDLQResponseJobType = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobWaitingOnItem {\n id: JobsDismissDLQResponseJobWaitingOnItemId;\n label?: JobsDismissDLQResponseJobWaitingOnItemLabel;\n startedAt: string;\n target: JobsDismissDLQResponseJobWaitingOnItemTarget;\n}\n\ntype JobsDismissDLQResponseJobWaitingOnItemId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsDismissDLQResponseJobWaitingOnItemTarget {\n id?: JobsDismissDLQResponseJobWaitingOnItemTargetId;\n key?: JobsDismissDLQResponseJobWaitingOnItemTargetKey;\n kind: JobsDismissDLQResponseJobWaitingOnItemTargetKind;\n label?: JobsDismissDLQResponseJobWaitingOnItemTargetLabel;\n operation?: JobsDismissDLQResponseJobWaitingOnItemTargetOperation;\n operationId?: JobsDismissDLQResponseJobWaitingOnItemTargetOperationId;\n service?: JobsDismissDLQResponseJobWaitingOnItemTargetService;\n system?: JobsDismissDLQResponseJobWaitingOnItemTargetSystem;\n type?: JobsDismissDLQResponseJobWaitingOnItemTargetType;\n}\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsDismissDLQResponseJobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsDismissDLQResponseJobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsGetKeyRequest {\n key: JobsGetKeyRequestKey;\n service: JobsGetKeyRequestService;\n type: JobsGetKeyRequestType;\n}\n\ntype JobsGetKeyRequestKey = string(min_length=1);\n\ntype JobsGetKeyRequestService = string(min_length=1);\n\ntype JobsGetKeyRequestType = string(min_length=1);\n\nmodel JobsGetKeyResponse {\n active: list<JobsGetKeyResponseActiveItem>;\n key: JobsGetKeyResponseKey;\n keyHash: JobsGetKeyResponseKeyHash;\n latestPolicyReason?: JobsGetKeyResponseLatestPolicyReason;\n queued: list<JobsGetKeyResponseQueuedItem>;\n queuedDepth: uint64;\n service: JobsGetKeyResponseService;\n staleTakeoverCount: uint64;\n type: JobsGetKeyResponseType;\n}\n\nmodel JobsGetKeyResponseActiveItem {\n heartbeatAgeMs: uint64;\n heartbeatAt: string;\n instanceId: string;\n jobId: JobsGetKeyResponseActiveItemJobId;\n leaseExpiresAt: string;\n startedAt: string;\n}\n\ntype JobsGetKeyResponseActiveItemJobId = string(min_length=1);\n\ntype JobsGetKeyResponseKey = string(min_length=1);\n\ntype JobsGetKeyResponseKeyHash = string(min_length=1);\n\ntype JobsGetKeyResponseLatestPolicyReason = string(min_length=1);\n\nmodel JobsGetKeyResponseQueuedItem {\n createdAt: string;\n jobId: JobsGetKeyResponseQueuedItemJobId;\n}\n\ntype JobsGetKeyResponseQueuedItemJobId = string(min_length=1);\n\ntype JobsGetKeyResponseService = string(min_length=1);\n\ntype JobsGetKeyResponseType = string(min_length=1);\n\nmodel JobsHistoryEntry {\n payload: bytes;\n sequence: uint64;\n}\n\nmodel JobsHistoryRequest {\n fromSequence: uint64;\n jobId: string;\n queue: string;\n throughSequence?: uint64;\n}\n\nmodel JobsHistoryResponse {\n entries: list<JobsHistoryEntry>;\n nextSequence?: uint64;\n throughSequence: uint64;\n}\n\nmodel JobsInspectRequest {\n id: JobsInspectRequestId;\n}\n\ntype JobsInspectRequestId = string(min_length=1);\n\nmodel JobsInspectResponse {\n attempts: list<JobsInspectResponseAttemptsItem>;\n errors: list<JobsInspectResponseErrorsItem>;\n job: JobsInspectResponseJob;\n lineage?: JobsInspectResponseLineage;\n related: list<JobsInspectResponseRelatedItem>;\n timeline: list<JobsInspectResponseTimelineItem>;\n trigger?: JobsInspectResponseTrigger;\n}\n\nmodel JobsInspectResponseAttemptsItem {\n endedAt?: string;\n error?: JobsInspectResponseAttemptsItemError;\n startedAt: string;\n state?: JobsInspectResponseAttemptsItemState;\n try: uint64;\n}\n\nmodel JobsInspectResponseAttemptsItemError {\n causes?: list<JobsInspectResponseAttemptsItemErrorCausesItem>;\n fingerprint: JobsInspectResponseAttemptsItemErrorFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsInspectResponseAttemptsItemErrorWorker;\n}\n\nmodel JobsInspectResponseAttemptsItemErrorCausesItem {\n}\n\ntype JobsInspectResponseAttemptsItemErrorFingerprint = string(min_length=1);\n\nmodel JobsInspectResponseAttemptsItemErrorWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\nenum JobsInspectResponseAttemptsItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsInspectResponseErrorsItem {\n causes?: list<JobsInspectResponseErrorsItemCausesItem>;\n fingerprint: JobsInspectResponseErrorsItemFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsInspectResponseErrorsItemWorker;\n}\n\nmodel JobsInspectResponseErrorsItemCausesItem {\n}\n\ntype JobsInspectResponseErrorsItemFingerprint = string(min_length=1);\n\nmodel JobsInspectResponseErrorsItemWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\nmodel JobsInspectResponseJob {\n completedAt?: string;\n concurrency?: JobsInspectResponseJobConcurrency;\n context: JobsInspectResponseJobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsInspectResponseJobErrorDetail;\n id: JobsInspectResponseJobId;\n lastError?: string;\n lineage?: JobsInspectResponseJobLineage;\n logs?: list<JobsInspectResponseJobLogsItem>;\n maxTries: JobsInspectResponseJobMaxTries;\n payload: bytes;\n progress?: JobsInspectResponseJobProgress;\n queuePolicy?: JobsInspectResponseJobQueuePolicy;\n result?: bytes;\n service: JobsInspectResponseJobService;\n startedAt?: string;\n state: JobsInspectResponseJobState;\n tries: uint64;\n trigger?: JobsInspectResponseJobTrigger;\n type: JobsInspectResponseJobType;\n updatedAt: string;\n waitingOn?: list<JobsInspectResponseJobWaitingOnItem>;\n}\n\nmodel JobsInspectResponseJobConcurrency {\n heartbeatAt?: string;\n key: JobsInspectResponseJobConcurrencyKey;\n keyHash: JobsInspectResponseJobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsInspectResponseJobConcurrencyKey = string(min_length=1);\n\ntype JobsInspectResponseJobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsInspectResponseJobContext {\n requestId: JobsInspectResponseJobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsInspectResponseJobContextTracestate;\n}\n\ntype JobsInspectResponseJobContextRequestId = string(min_length=1);\n\ntype JobsInspectResponseJobContextTracestate = string(min_length=1);\n\nmodel JobsInspectResponseJobErrorDetail {\n causes?: list<JobsInspectResponseJobErrorDetailCausesItem>;\n fingerprint: JobsInspectResponseJobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsInspectResponseJobErrorDetailWorker;\n}\n\nmodel JobsInspectResponseJobErrorDetailCausesItem {\n}\n\ntype JobsInspectResponseJobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsInspectResponseJobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsInspectResponseJobId = string(min_length=1);\n\nmodel JobsInspectResponseJobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsInspectResponseJobLogsItem {\n level: JobsInspectResponseJobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsInspectResponseJobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsInspectResponseJobMaxTries = int64(min=1);\n\nmodel JobsInspectResponseJobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsInspectResponseJobQueuePolicy {\n existingJobId?: JobsInspectResponseJobQueuePolicyExistingJobId;\n outcome: JobsInspectResponseJobQueuePolicyOutcome;\n reason?: JobsInspectResponseJobQueuePolicyReason;\n replacedJobId?: JobsInspectResponseJobQueuePolicyReplacedJobId;\n}\n\ntype JobsInspectResponseJobQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsInspectResponseJobQueuePolicyOutcome = string(min_length=1);\n\ntype JobsInspectResponseJobQueuePolicyReason = string(min_length=1);\n\ntype JobsInspectResponseJobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsInspectResponseJobService = string(min_length=1);\n\nenum JobsInspectResponseJobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsInspectResponseJobTrigger {\n id?: string;\n kind: JobsInspectResponseJobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsInspectResponseJobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsInspectResponseJobType = string(min_length=1);\n\nmodel JobsInspectResponseJobWaitingOnItem {\n id: JobsInspectResponseJobWaitingOnItemId;\n label?: JobsInspectResponseJobWaitingOnItemLabel;\n startedAt: string;\n target: JobsInspectResponseJobWaitingOnItemTarget;\n}\n\ntype JobsInspectResponseJobWaitingOnItemId = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsInspectResponseJobWaitingOnItemTarget {\n id?: JobsInspectResponseJobWaitingOnItemTargetId;\n key?: JobsInspectResponseJobWaitingOnItemTargetKey;\n kind: JobsInspectResponseJobWaitingOnItemTargetKind;\n label?: JobsInspectResponseJobWaitingOnItemTargetLabel;\n operation?: JobsInspectResponseJobWaitingOnItemTargetOperation;\n operationId?: JobsInspectResponseJobWaitingOnItemTargetOperationId;\n service?: JobsInspectResponseJobWaitingOnItemTargetService;\n system?: JobsInspectResponseJobWaitingOnItemTargetSystem;\n type?: JobsInspectResponseJobWaitingOnItemTargetType;\n}\n\ntype JobsInspectResponseJobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsInspectResponseJobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsInspectResponseJobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsInspectResponseJobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsInspectResponseLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsInspectResponseRelatedItem {\n completedAt?: string;\n context?: JobsInspectResponseRelatedItemContext;\n createdAt: string;\n errorFingerprint?: string;\n id: JobsInspectResponseRelatedItemId;\n lastError?: string;\n lineage?: JobsInspectResponseRelatedItemLineage;\n matchedBy?: JobsInspectResponseRelatedItemMatchedBy;\n maxTries: JobsInspectResponseRelatedItemMaxTries;\n progress?: JobsInspectResponseRelatedItemProgress;\n queueAgeMs?: uint64;\n queueKey?: string;\n runtimeBand?: string;\n runtimeMs?: uint64;\n service: JobsInspectResponseRelatedItemService;\n startedAt?: string;\n state: JobsInspectResponseRelatedItemState;\n tries: uint64;\n trigger?: JobsInspectResponseRelatedItemTrigger;\n type: JobsInspectResponseRelatedItemType;\n updatedAt: string;\n waitingOn?: list<JobsInspectResponseRelatedItemWaitingOnItem>;\n}\n\nmodel JobsInspectResponseRelatedItemContext {\n requestId: JobsInspectResponseRelatedItemContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsInspectResponseRelatedItemContextTracestate;\n}\n\ntype JobsInspectResponseRelatedItemContextRequestId = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemContextTracestate = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemId = string(min_length=1);\n\nmodel JobsInspectResponseRelatedItemLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nenum JobsInspectResponseRelatedItemMatchedBy {\n \"concurrency\";\n \"operation\";\n \"parent\";\n \"root\";\n \"trace\";\n \"wait\";\n}\n\ntype JobsInspectResponseRelatedItemMaxTries = int64(min=1);\n\nmodel JobsInspectResponseRelatedItemProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\ntype JobsInspectResponseRelatedItemService = string(min_length=1);\n\nenum JobsInspectResponseRelatedItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsInspectResponseRelatedItemTrigger {\n id?: string;\n kind: JobsInspectResponseRelatedItemTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsInspectResponseRelatedItemTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsInspectResponseRelatedItemType = string(min_length=1);\n\nmodel JobsInspectResponseRelatedItemWaitingOnItem {\n id: JobsInspectResponseRelatedItemWaitingOnItemId;\n label?: JobsInspectResponseRelatedItemWaitingOnItemLabel;\n startedAt: string;\n target: JobsInspectResponseRelatedItemWaitingOnItemTarget;\n}\n\ntype JobsInspectResponseRelatedItemWaitingOnItemId = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsInspectResponseRelatedItemWaitingOnItemTarget {\n id?: JobsInspectResponseRelatedItemWaitingOnItemTargetId;\n key?: JobsInspectResponseRelatedItemWaitingOnItemTargetKey;\n kind: JobsInspectResponseRelatedItemWaitingOnItemTargetKind;\n label?: JobsInspectResponseRelatedItemWaitingOnItemTargetLabel;\n operation?: JobsInspectResponseRelatedItemWaitingOnItemTargetOperation;\n operationId?: JobsInspectResponseRelatedItemWaitingOnItemTargetOperationId;\n service?: JobsInspectResponseRelatedItemWaitingOnItemTargetService;\n system?: JobsInspectResponseRelatedItemWaitingOnItemTargetSystem;\n type?: JobsInspectResponseRelatedItemWaitingOnItemTargetType;\n}\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsInspectResponseRelatedItemWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsInspectResponseRelatedItemWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsInspectResponseTimelineItem {\n error?: string;\n errorDetail?: JobsInspectResponseTimelineItemErrorDetail;\n logs?: list<JobsInspectResponseTimelineItemLogsItem>;\n message?: string;\n previousState?: JobsInspectResponseTimelineItemPreviousState;\n progress?: JobsInspectResponseTimelineItemProgress;\n projected?: bool;\n rawEvent?: bytes;\n reason?: string;\n sequence: uint64;\n state: JobsInspectResponseTimelineItemState;\n timestamp: string;\n tries?: uint64;\n type: JobsInspectResponseTimelineItemType;\n waitEdge?: JobsInspectResponseTimelineItemWaitEdge;\n workerInstanceId?: string;\n}\n\nmodel JobsInspectResponseTimelineItemErrorDetail {\n causes?: list<JobsInspectResponseTimelineItemErrorDetailCausesItem>;\n fingerprint: JobsInspectResponseTimelineItemErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsInspectResponseTimelineItemErrorDetailWorker;\n}\n\nmodel JobsInspectResponseTimelineItemErrorDetailCausesItem {\n}\n\ntype JobsInspectResponseTimelineItemErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsInspectResponseTimelineItemErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\nmodel JobsInspectResponseTimelineItemLogsItem {\n level: JobsInspectResponseTimelineItemLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsInspectResponseTimelineItemLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\nenum JobsInspectResponseTimelineItemPreviousState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsInspectResponseTimelineItemProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nenum JobsInspectResponseTimelineItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsInspectResponseTimelineItemType = string(min_length=1);\n\nmodel JobsInspectResponseTimelineItemWaitEdge {\n id: JobsInspectResponseTimelineItemWaitEdgeId;\n label?: JobsInspectResponseTimelineItemWaitEdgeLabel;\n startedAt: string;\n target: JobsInspectResponseTimelineItemWaitEdgeTarget;\n}\n\ntype JobsInspectResponseTimelineItemWaitEdgeId = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeLabel = string(min_length=1);\n\nmodel JobsInspectResponseTimelineItemWaitEdgeTarget {\n id?: JobsInspectResponseTimelineItemWaitEdgeTargetId;\n key?: JobsInspectResponseTimelineItemWaitEdgeTargetKey;\n kind: JobsInspectResponseTimelineItemWaitEdgeTargetKind;\n label?: JobsInspectResponseTimelineItemWaitEdgeTargetLabel;\n operation?: JobsInspectResponseTimelineItemWaitEdgeTargetOperation;\n operationId?: JobsInspectResponseTimelineItemWaitEdgeTargetOperationId;\n service?: JobsInspectResponseTimelineItemWaitEdgeTargetService;\n system?: JobsInspectResponseTimelineItemWaitEdgeTargetSystem;\n type?: JobsInspectResponseTimelineItemWaitEdgeTargetType;\n}\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetId = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetKey = string(min_length=1);\n\nenum JobsInspectResponseTimelineItemWaitEdgeTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetLabel = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetOperation = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetOperationId = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetService = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetSystem = string(min_length=1);\n\ntype JobsInspectResponseTimelineItemWaitEdgeTargetType = string(min_length=1);\n\nmodel JobsInspectResponseTrigger {\n id?: string;\n kind: JobsInspectResponseTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsInspectResponseTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\nmodel JobsListDLQRequest {\n page?: CursorQuery;\n service?: JobsListDLQRequestService;\n since?: string;\n type?: JobsListDLQRequestType;\n}\n\ntype JobsListDLQRequestLimit = int64(min=1);\n\ntype JobsListDLQRequestService = string(min_length=1);\n\ntype JobsListDLQRequestType = string(min_length=1);\n\ntype JobsListDLQResponse = CursorPage<JobsListDLQResponseEntriesItem>;\n\nmodel JobsListDLQResponseEntriesItem {\n completedAt?: string;\n concurrency?: JobsListDLQResponseEntriesItemConcurrency;\n context: JobsListDLQResponseEntriesItemContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsListDLQResponseEntriesItemErrorDetail;\n id: JobsListDLQResponseEntriesItemId;\n lastError?: string;\n lineage?: JobsListDLQResponseEntriesItemLineage;\n logs?: list<JobsListDLQResponseEntriesItemLogsItem>;\n maxTries: JobsListDLQResponseEntriesItemMaxTries;\n payload: bytes;\n progress?: JobsListDLQResponseEntriesItemProgress;\n queuePolicy?: JobsListDLQResponseEntriesItemQueuePolicy;\n result?: bytes;\n service: JobsListDLQResponseEntriesItemService;\n startedAt?: string;\n state: JobsListDLQResponseEntriesItemState;\n tries: uint64;\n trigger?: JobsListDLQResponseEntriesItemTrigger;\n type: JobsListDLQResponseEntriesItemType;\n updatedAt: string;\n waitingOn?: list<JobsListDLQResponseEntriesItemWaitingOnItem>;\n}\n\nmodel JobsListDLQResponseEntriesItemConcurrency {\n heartbeatAt?: string;\n key: JobsListDLQResponseEntriesItemConcurrencyKey;\n keyHash: JobsListDLQResponseEntriesItemConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsListDLQResponseEntriesItemConcurrencyKey = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemContext {\n requestId: JobsListDLQResponseEntriesItemContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsListDLQResponseEntriesItemContextTracestate;\n}\n\ntype JobsListDLQResponseEntriesItemContextRequestId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemContextTracestate = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemErrorDetail {\n causes?: list<JobsListDLQResponseEntriesItemErrorDetailCausesItem>;\n fingerprint: JobsListDLQResponseEntriesItemErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsListDLQResponseEntriesItemErrorDetailWorker;\n}\n\nmodel JobsListDLQResponseEntriesItemErrorDetailCausesItem {\n}\n\ntype JobsListDLQResponseEntriesItemErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsListDLQResponseEntriesItemId = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsListDLQResponseEntriesItemLogsItem {\n level: JobsListDLQResponseEntriesItemLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsListDLQResponseEntriesItemLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsListDLQResponseEntriesItemMaxTries = int64(min=1);\n\nmodel JobsListDLQResponseEntriesItemProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsListDLQResponseEntriesItemQueuePolicy {\n existingJobId?: JobsListDLQResponseEntriesItemQueuePolicyExistingJobId;\n outcome: JobsListDLQResponseEntriesItemQueuePolicyOutcome;\n reason?: JobsListDLQResponseEntriesItemQueuePolicyReason;\n replacedJobId?: JobsListDLQResponseEntriesItemQueuePolicyReplacedJobId;\n}\n\ntype JobsListDLQResponseEntriesItemQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemQueuePolicyOutcome = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemQueuePolicyReason = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemService = string(min_length=1);\n\nenum JobsListDLQResponseEntriesItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsListDLQResponseEntriesItemTrigger {\n id?: string;\n kind: JobsListDLQResponseEntriesItemTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsListDLQResponseEntriesItemTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsListDLQResponseEntriesItemType = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemWaitingOnItem {\n id: JobsListDLQResponseEntriesItemWaitingOnItemId;\n label?: JobsListDLQResponseEntriesItemWaitingOnItemLabel;\n startedAt: string;\n target: JobsListDLQResponseEntriesItemWaitingOnItemTarget;\n}\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsListDLQResponseEntriesItemWaitingOnItemTarget {\n id?: JobsListDLQResponseEntriesItemWaitingOnItemTargetId;\n key?: JobsListDLQResponseEntriesItemWaitingOnItemTargetKey;\n kind: JobsListDLQResponseEntriesItemWaitingOnItemTargetKind;\n label?: JobsListDLQResponseEntriesItemWaitingOnItemTargetLabel;\n operation?: JobsListDLQResponseEntriesItemWaitingOnItemTargetOperation;\n operationId?: JobsListDLQResponseEntriesItemWaitingOnItemTargetOperationId;\n service?: JobsListDLQResponseEntriesItemWaitingOnItemTargetService;\n system?: JobsListDLQResponseEntriesItemWaitingOnItemTargetSystem;\n type?: JobsListDLQResponseEntriesItemWaitingOnItemTargetType;\n}\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsListDLQResponseEntriesItemWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsListDLQResponseEntriesItemWaitingOnItemTargetType = string(min_length=1);\n\ntype JobsListDLQResponseLimit = int64(min=1);\n\nmodel JobsListServicesRequest {\n page?: CursorQuery;\n}\n\ntype JobsListServicesRequestLimit = int64(min=1);\n\ntype JobsListServicesResponse = CursorPage<JobsListServicesResponseEntriesItem>;\n\nmodel JobsListServicesResponseEntriesItem {\n healthy: bool;\n name: JobsListServicesResponseEntriesItemName;\n workers: list<JobsListServicesResponseEntriesItemWorkersItem>;\n}\n\ntype JobsListServicesResponseEntriesItemName = string(min_length=1);\n\nmodel JobsListServicesResponseEntriesItemWorkersItem {\n concurrency?: JobsListServicesResponseEntriesItemWorkersItemConcurrency;\n instanceId: JobsListServicesResponseEntriesItemWorkersItemInstanceId;\n jobType: JobsListServicesResponseEntriesItemWorkersItemJobType;\n service: JobsListServicesResponseEntriesItemWorkersItemService;\n timestamp: string;\n version?: JobsListServicesResponseEntriesItemWorkersItemVersion;\n}\n\ntype JobsListServicesResponseEntriesItemWorkersItemConcurrency = int64(min=1);\n\ntype JobsListServicesResponseEntriesItemWorkersItemInstanceId = string(min_length=1);\n\ntype JobsListServicesResponseEntriesItemWorkersItemJobType = string(min_length=1);\n\ntype JobsListServicesResponseEntriesItemWorkersItemService = string(min_length=1);\n\ntype JobsListServicesResponseEntriesItemWorkersItemVersion = string(min_length=1);\n\ntype JobsListServicesResponseLimit = int64(min=1);\n\nmodel JobsMetricsBucket {\n end: string;\n groups: list<JobsMetricsBucketGroupsItem>;\n start: string;\n}\n\nmodel JobsMetricsBucketGroup {\n cancelled: uint64;\n completed: uint64;\n dead: uint64;\n dismissed: uint64;\n failed: uint64;\n key: string;\n label: string;\n queueWait: JobsMetricsBucketGroupQueueWait;\n retried: uint64;\n runtime: JobsMetricsBucketGroupRuntime;\n started: uint64;\n submitted: uint64;\n}\n\nmodel JobsMetricsBucketGroupQueueWait {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsBucketGroupRuntime {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsBucketGroupsItem {\n cancelled: uint64;\n completed: uint64;\n dead: uint64;\n dismissed: uint64;\n failed: uint64;\n key: string;\n label: string;\n queueWait: JobsMetricsBucketGroupsItemQueueWait;\n retried: uint64;\n runtime: JobsMetricsBucketGroupsItemRuntime;\n started: uint64;\n submitted: uint64;\n}\n\nmodel JobsMetricsBucketGroupsItemQueueWait {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsBucketGroupsItemRuntime {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsLatency {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsRequest {\n groupBy: JobsMetricsRequestGroupBy;\n queueKey?: string;\n service?: JobsMetricsRequestService;\n state?: list<JobsMetricsRequestState>;\n step: string;\n trigger?: string;\n type?: JobsMetricsRequestType;\n window: string;\n}\n\nenum JobsMetricsRequestGroupBy {\n \"queueKey\";\n \"service\";\n \"state\";\n \"trigger\";\n \"type\";\n}\n\ntype JobsMetricsRequestService = string(min_length=1);\n\nenum JobsMetricsRequestState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsMetricsRequestType = string(min_length=1);\n\nmodel JobsMetricsResponse {\n buckets: list<JobsMetricsResponseBucketsItem>;\n generatedAt: string;\n groupBy: string;\n step: string;\n summary: list<JobsMetricsResponseSummaryItem>;\n window: string;\n}\n\nmodel JobsMetricsResponseBucketsItem {\n end: string;\n groups: list<JobsMetricsResponseBucketsItemGroupsItem>;\n start: string;\n}\n\nmodel JobsMetricsResponseBucketsItemGroupsItem {\n cancelled: uint64;\n completed: uint64;\n dead: uint64;\n dismissed: uint64;\n failed: uint64;\n key: string;\n label: string;\n queueWait: JobsMetricsResponseBucketsItemGroupsItemQueueWait;\n retried: uint64;\n runtime: JobsMetricsResponseBucketsItemGroupsItemRuntime;\n started: uint64;\n submitted: uint64;\n}\n\nmodel JobsMetricsResponseBucketsItemGroupsItemQueueWait {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsResponseBucketsItemGroupsItemRuntime {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsResponseSummaryItem {\n byState: map<uint64>;\n dead?: uint64;\n failed?: uint64;\n failureRate?: JobsMetricsResponseSummaryItemFailureRate;\n key: string;\n label: string;\n latestUpdatedAt?: string;\n oldestCreatedAt?: string;\n queueWait: JobsMetricsResponseSummaryItemQueueWait;\n queued?: uint64;\n running?: uint64;\n runtime: JobsMetricsResponseSummaryItemRuntime;\n slow?: uint64;\n total: uint64;\n}\n\ntype JobsMetricsResponseSummaryItemFailureRate = number(min=0);\n\nmodel JobsMetricsResponseSummaryItemQueueWait {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsResponseSummaryItemRuntime {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsSummaryGroup {\n byState: map<uint64>;\n dead?: uint64;\n failed?: uint64;\n failureRate?: JobsMetricsSummaryGroupFailureRate;\n key: string;\n label: string;\n latestUpdatedAt?: string;\n oldestCreatedAt?: string;\n queueWait: JobsMetricsSummaryGroupQueueWait;\n queued?: uint64;\n running?: uint64;\n runtime: JobsMetricsSummaryGroupRuntime;\n slow?: uint64;\n total: uint64;\n}\n\ntype JobsMetricsSummaryGroupFailureRate = number(min=0);\n\nmodel JobsMetricsSummaryGroupQueueWait {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsMetricsSummaryGroupRuntime {\n count: uint64;\n maxMs?: uint64;\n p50Ms?: uint64;\n p95Ms?: uint64;\n}\n\nmodel JobsNotFoundErrorData {\n jobId?: JobsNotFoundErrorDataJobId;\n resource: JobsNotFoundErrorDataResource;\n}\n\ntype JobsNotFoundErrorDataJobId = string(min_length=1);\n\ntype JobsNotFoundErrorDataResource = string(min_length=1);\n\nmodel JobsQueryRequest {\n groupBy?: JobsQueryRequestGroupBy;\n page?: CursorQuery;\n queueKey?: string;\n runtimeBand?: JobsQueryRequestRuntimeBand;\n search?: string;\n service?: JobsQueryRequestService;\n sort?: JobsQueryRequestSort;\n state?: list<JobsQueryRequestState>;\n trigger?: string;\n type?: JobsQueryRequestType;\n window?: string;\n}\n\nenum JobsQueryRequestGroupBy {\n \"queueKey\";\n \"runtimeBand\";\n \"service\";\n \"state\";\n \"trigger\";\n \"type\";\n}\n\ntype JobsQueryRequestLimit = int64(min=1);\n\nenum JobsQueryRequestRuntimeBand {\n \"queued\";\n \"running\";\n \"slow\";\n \"terminal\";\n}\n\ntype JobsQueryRequestService = string(min_length=1);\n\nmodel JobsQueryRequestSort {\n direction?: JobsQueryRequestSortDirection;\n field: JobsQueryRequestSortField;\n}\n\nenum JobsQueryRequestSortDirection {\n \"asc\";\n \"desc\";\n}\n\nenum JobsQueryRequestSortField {\n \"depth\";\n \"failureRate\";\n \"queueAge\";\n \"retries\";\n \"runtime\";\n \"updatedAt\";\n}\n\nenum JobsQueryRequestState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsQueryRequestType = string(min_length=1);\n\ntype JobsQueryResponse = CursorPage<JobsQueryResponseEntriesItem>;\n\nmodel JobsQueryResponseEntriesItem {\n completedAt?: string;\n context?: JobsQueryResponseEntriesItemContext;\n createdAt: string;\n errorFingerprint?: string;\n id: JobsQueryResponseEntriesItemId;\n lastError?: string;\n lineage?: JobsQueryResponseEntriesItemLineage;\n maxTries: JobsQueryResponseEntriesItemMaxTries;\n progress?: JobsQueryResponseEntriesItemProgress;\n queueAgeMs?: uint64;\n queueKey?: string;\n runtimeBand?: string;\n runtimeMs?: uint64;\n service: JobsQueryResponseEntriesItemService;\n startedAt?: string;\n state: JobsQueryResponseEntriesItemState;\n tries: uint64;\n trigger?: JobsQueryResponseEntriesItemTrigger;\n type: JobsQueryResponseEntriesItemType;\n updatedAt: string;\n waitingOn?: list<JobsQueryResponseEntriesItemWaitingOnItem>;\n}\n\nmodel JobsQueryResponseEntriesItemContext {\n requestId: JobsQueryResponseEntriesItemContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsQueryResponseEntriesItemContextTracestate;\n}\n\ntype JobsQueryResponseEntriesItemContextRequestId = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemContextTracestate = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemId = string(min_length=1);\n\nmodel JobsQueryResponseEntriesItemLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\ntype JobsQueryResponseEntriesItemMaxTries = int64(min=1);\n\nmodel JobsQueryResponseEntriesItemProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\ntype JobsQueryResponseEntriesItemService = string(min_length=1);\n\nenum JobsQueryResponseEntriesItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsQueryResponseEntriesItemTrigger {\n id?: string;\n kind: JobsQueryResponseEntriesItemTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsQueryResponseEntriesItemTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsQueryResponseEntriesItemType = string(min_length=1);\n\nmodel JobsQueryResponseEntriesItemWaitingOnItem {\n id: JobsQueryResponseEntriesItemWaitingOnItemId;\n label?: JobsQueryResponseEntriesItemWaitingOnItemLabel;\n startedAt: string;\n target: JobsQueryResponseEntriesItemWaitingOnItemTarget;\n}\n\ntype JobsQueryResponseEntriesItemWaitingOnItemId = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsQueryResponseEntriesItemWaitingOnItemTarget {\n id?: JobsQueryResponseEntriesItemWaitingOnItemTargetId;\n key?: JobsQueryResponseEntriesItemWaitingOnItemTargetKey;\n kind: JobsQueryResponseEntriesItemWaitingOnItemTargetKind;\n label?: JobsQueryResponseEntriesItemWaitingOnItemTargetLabel;\n operation?: JobsQueryResponseEntriesItemWaitingOnItemTargetOperation;\n operationId?: JobsQueryResponseEntriesItemWaitingOnItemTargetOperationId;\n service?: JobsQueryResponseEntriesItemWaitingOnItemTargetService;\n system?: JobsQueryResponseEntriesItemWaitingOnItemTargetSystem;\n type?: JobsQueryResponseEntriesItemWaitingOnItemTargetType;\n}\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsQueryResponseEntriesItemWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsQueryResponseEntriesItemWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsQueryResponseGroupsItem {\n count: uint64;\n depth?: uint64;\n failureRate?: JobsQueryResponseGroupsItemFailureRate;\n key: string;\n label: string;\n latestUpdatedAt?: string;\n oldestCreatedAt?: string;\n state?: JobsQueryResponseGroupsItemState;\n}\n\ntype JobsQueryResponseGroupsItemFailureRate = number(min=0);\n\nenum JobsQueryResponseGroupsItemState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsQueryResponseLimit = int64(min=1);\n\nmodel JobsQueryResponseStats {\n byState: map<uint64>;\n dead?: uint64;\n failed?: uint64;\n queued?: uint64;\n running?: uint64;\n slow?: uint64;\n total: uint64;\n}\n\nmodel JobsReplayDLQRequest {\n id: JobsReplayDLQRequestId;\n reason?: JobsReplayDLQRequestReason;\n}\n\ntype JobsReplayDLQRequestId = string(min_length=1);\n\ntype JobsReplayDLQRequestReason = string(min_length=1);\n\nmodel JobsReplayDLQResponse {\n job: JobsReplayDLQResponseJob;\n}\n\nmodel JobsReplayDLQResponseJob {\n completedAt?: string;\n concurrency?: JobsReplayDLQResponseJobConcurrency;\n context: JobsReplayDLQResponseJobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsReplayDLQResponseJobErrorDetail;\n id: JobsReplayDLQResponseJobId;\n lastError?: string;\n lineage?: JobsReplayDLQResponseJobLineage;\n logs?: list<JobsReplayDLQResponseJobLogsItem>;\n maxTries: JobsReplayDLQResponseJobMaxTries;\n payload: bytes;\n progress?: JobsReplayDLQResponseJobProgress;\n queuePolicy?: JobsReplayDLQResponseJobQueuePolicy;\n result?: bytes;\n service: JobsReplayDLQResponseJobService;\n startedAt?: string;\n state: JobsReplayDLQResponseJobState;\n tries: uint64;\n trigger?: JobsReplayDLQResponseJobTrigger;\n type: JobsReplayDLQResponseJobType;\n updatedAt: string;\n waitingOn?: list<JobsReplayDLQResponseJobWaitingOnItem>;\n}\n\nmodel JobsReplayDLQResponseJobConcurrency {\n heartbeatAt?: string;\n key: JobsReplayDLQResponseJobConcurrencyKey;\n keyHash: JobsReplayDLQResponseJobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsReplayDLQResponseJobConcurrencyKey = string(min_length=1);\n\ntype JobsReplayDLQResponseJobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobContext {\n requestId: JobsReplayDLQResponseJobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsReplayDLQResponseJobContextTracestate;\n}\n\ntype JobsReplayDLQResponseJobContextRequestId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobContextTracestate = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobErrorDetail {\n causes?: list<JobsReplayDLQResponseJobErrorDetailCausesItem>;\n fingerprint: JobsReplayDLQResponseJobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsReplayDLQResponseJobErrorDetailWorker;\n}\n\nmodel JobsReplayDLQResponseJobErrorDetailCausesItem {\n}\n\ntype JobsReplayDLQResponseJobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsReplayDLQResponseJobId = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsReplayDLQResponseJobLogsItem {\n level: JobsReplayDLQResponseJobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsReplayDLQResponseJobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsReplayDLQResponseJobMaxTries = int64(min=1);\n\nmodel JobsReplayDLQResponseJobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsReplayDLQResponseJobQueuePolicy {\n existingJobId?: JobsReplayDLQResponseJobQueuePolicyExistingJobId;\n outcome: JobsReplayDLQResponseJobQueuePolicyOutcome;\n reason?: JobsReplayDLQResponseJobQueuePolicyReason;\n replacedJobId?: JobsReplayDLQResponseJobQueuePolicyReplacedJobId;\n}\n\ntype JobsReplayDLQResponseJobQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobQueuePolicyOutcome = string(min_length=1);\n\ntype JobsReplayDLQResponseJobQueuePolicyReason = string(min_length=1);\n\ntype JobsReplayDLQResponseJobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobService = string(min_length=1);\n\nenum JobsReplayDLQResponseJobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsReplayDLQResponseJobTrigger {\n id?: string;\n kind: JobsReplayDLQResponseJobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsReplayDLQResponseJobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsReplayDLQResponseJobType = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobWaitingOnItem {\n id: JobsReplayDLQResponseJobWaitingOnItemId;\n label?: JobsReplayDLQResponseJobWaitingOnItemLabel;\n startedAt: string;\n target: JobsReplayDLQResponseJobWaitingOnItemTarget;\n}\n\ntype JobsReplayDLQResponseJobWaitingOnItemId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsReplayDLQResponseJobWaitingOnItemTarget {\n id?: JobsReplayDLQResponseJobWaitingOnItemTargetId;\n key?: JobsReplayDLQResponseJobWaitingOnItemTargetKey;\n kind: JobsReplayDLQResponseJobWaitingOnItemTargetKind;\n label?: JobsReplayDLQResponseJobWaitingOnItemTargetLabel;\n operation?: JobsReplayDLQResponseJobWaitingOnItemTargetOperation;\n operationId?: JobsReplayDLQResponseJobWaitingOnItemTargetOperationId;\n service?: JobsReplayDLQResponseJobWaitingOnItemTargetService;\n system?: JobsReplayDLQResponseJobWaitingOnItemTargetSystem;\n type?: JobsReplayDLQResponseJobWaitingOnItemTargetType;\n}\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsReplayDLQResponseJobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsReplayDLQResponseJobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsRetryRequest {\n id: JobsRetryRequestId;\n reason?: JobsRetryRequestReason;\n}\n\ntype JobsRetryRequestId = string(min_length=1);\n\ntype JobsRetryRequestReason = string(min_length=1);\n\nmodel JobsRetryResponse {\n job: JobsRetryResponseJob;\n}\n\nmodel JobsRetryResponseJob {\n completedAt?: string;\n concurrency?: JobsRetryResponseJobConcurrency;\n context: JobsRetryResponseJobContext;\n createdAt: string;\n deadline?: string;\n errorDetail?: JobsRetryResponseJobErrorDetail;\n id: JobsRetryResponseJobId;\n lastError?: string;\n lineage?: JobsRetryResponseJobLineage;\n logs?: list<JobsRetryResponseJobLogsItem>;\n maxTries: JobsRetryResponseJobMaxTries;\n payload: bytes;\n progress?: JobsRetryResponseJobProgress;\n queuePolicy?: JobsRetryResponseJobQueuePolicy;\n result?: bytes;\n service: JobsRetryResponseJobService;\n startedAt?: string;\n state: JobsRetryResponseJobState;\n tries: uint64;\n trigger?: JobsRetryResponseJobTrigger;\n type: JobsRetryResponseJobType;\n updatedAt: string;\n waitingOn?: list<JobsRetryResponseJobWaitingOnItem>;\n}\n\nmodel JobsRetryResponseJobConcurrency {\n heartbeatAt?: string;\n key: JobsRetryResponseJobConcurrencyKey;\n keyHash: JobsRetryResponseJobConcurrencyKeyHash;\n leaseExpiresAt?: string;\n staleTakeoverCount?: uint64;\n}\n\ntype JobsRetryResponseJobConcurrencyKey = string(min_length=1);\n\ntype JobsRetryResponseJobConcurrencyKeyHash = string(min_length=1);\n\nmodel JobsRetryResponseJobContext {\n requestId: JobsRetryResponseJobContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsRetryResponseJobContextTracestate;\n}\n\ntype JobsRetryResponseJobContextRequestId = string(min_length=1);\n\ntype JobsRetryResponseJobContextTracestate = string(min_length=1);\n\nmodel JobsRetryResponseJobErrorDetail {\n causes?: list<JobsRetryResponseJobErrorDetailCausesItem>;\n fingerprint: JobsRetryResponseJobErrorDetailFingerprint;\n firstSeen?: string;\n message: string;\n occurrenceCount?: uint64;\n stack?: string;\n type?: string;\n worker?: JobsRetryResponseJobErrorDetailWorker;\n}\n\nmodel JobsRetryResponseJobErrorDetailCausesItem {\n}\n\ntype JobsRetryResponseJobErrorDetailFingerprint = string(min_length=1);\n\nmodel JobsRetryResponseJobErrorDetailWorker {\n instanceId?: string;\n runtime?: string;\n service?: string;\n version?: string;\n}\n\ntype JobsRetryResponseJobId = string(min_length=1);\n\nmodel JobsRetryResponseJobLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\nmodel JobsRetryResponseJobLogsItem {\n level: JobsRetryResponseJobLogsItemLevel;\n message: string;\n timestamp: string;\n}\n\nenum JobsRetryResponseJobLogsItemLevel {\n \"error\";\n \"info\";\n \"warn\";\n}\n\ntype JobsRetryResponseJobMaxTries = int64(min=1);\n\nmodel JobsRetryResponseJobProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\nmodel JobsRetryResponseJobQueuePolicy {\n existingJobId?: JobsRetryResponseJobQueuePolicyExistingJobId;\n outcome: JobsRetryResponseJobQueuePolicyOutcome;\n reason?: JobsRetryResponseJobQueuePolicyReason;\n replacedJobId?: JobsRetryResponseJobQueuePolicyReplacedJobId;\n}\n\ntype JobsRetryResponseJobQueuePolicyExistingJobId = string(min_length=1);\n\ntype JobsRetryResponseJobQueuePolicyOutcome = string(min_length=1);\n\ntype JobsRetryResponseJobQueuePolicyReason = string(min_length=1);\n\ntype JobsRetryResponseJobQueuePolicyReplacedJobId = string(min_length=1);\n\ntype JobsRetryResponseJobService = string(min_length=1);\n\nenum JobsRetryResponseJobState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsRetryResponseJobTrigger {\n id?: string;\n kind: JobsRetryResponseJobTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsRetryResponseJobTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsRetryResponseJobType = string(min_length=1);\n\nmodel JobsRetryResponseJobWaitingOnItem {\n id: JobsRetryResponseJobWaitingOnItemId;\n label?: JobsRetryResponseJobWaitingOnItemLabel;\n startedAt: string;\n target: JobsRetryResponseJobWaitingOnItemTarget;\n}\n\ntype JobsRetryResponseJobWaitingOnItemId = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsRetryResponseJobWaitingOnItemTarget {\n id?: JobsRetryResponseJobWaitingOnItemTargetId;\n key?: JobsRetryResponseJobWaitingOnItemTargetKey;\n kind: JobsRetryResponseJobWaitingOnItemTargetKind;\n label?: JobsRetryResponseJobWaitingOnItemTargetLabel;\n operation?: JobsRetryResponseJobWaitingOnItemTargetOperation;\n operationId?: JobsRetryResponseJobWaitingOnItemTargetOperationId;\n service?: JobsRetryResponseJobWaitingOnItemTargetService;\n system?: JobsRetryResponseJobWaitingOnItemTargetSystem;\n type?: JobsRetryResponseJobWaitingOnItemTargetType;\n}\n\ntype JobsRetryResponseJobWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsRetryResponseJobWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsRetryResponseJobWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsRetryResponseJobWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsSummaryRequest {\n groupBy?: JobsQueryRequestGroupBy;\n queueKey?: string;\n runtimeBand?: JobsQueryRequestRuntimeBand;\n search?: string;\n service?: JobsQueryRequestService;\n state?: list<JobsQueryRequestState>;\n trigger?: string;\n type?: JobsQueryRequestType;\n window?: string;\n}\n\nmodel JobsSummaryResponse {\n count: uint64;\n groups: list<JobsQueryResponseGroupsItem>;\n stats: JobsQueryResponseStats;\n}\n\ntype JobsWatchFrame = bytes;\n\nmodel JobsWatchFrameValue1 {\n kind: JobsWatchFrameValue1Kind;\n timestamp: string;\n}\n\nenum JobsWatchFrameValue1Kind {\n \"ready\";\n}\n\nmodel JobsWatchFrameValue2 {\n id: JobsWatchFrameValue2Id;\n kind: JobsWatchFrameValue2Kind;\n service: JobsWatchFrameValue2Service;\n state: JobsWatchFrameValue2State;\n type: JobsWatchFrameValue2Type;\n updatedAt: string;\n}\n\ntype JobsWatchFrameValue2Id = string(min_length=1);\n\nenum JobsWatchFrameValue2Kind {\n \"jobChanged\";\n}\n\ntype JobsWatchFrameValue2Service = string(min_length=1);\n\nenum JobsWatchFrameValue2State {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsWatchFrameValue2Type = string(min_length=1);\n\nmodel JobsWatchFrameValue3 {\n kind: JobsWatchFrameValue3Kind;\n reason: string;\n timestamp: string;\n}\n\nenum JobsWatchFrameValue3Kind {\n \"queryInvalidated\";\n}\n\nmodel JobsWatchFrameValue4 {\n id: JobsWatchFrameValue4Id;\n kind: JobsWatchFrameValue4Kind;\n timestamp: string;\n}\n\ntype JobsWatchFrameValue4Id = string(min_length=1);\n\nenum JobsWatchFrameValue4Kind {\n \"jobInspectChanged\";\n}\n\nmodel JobsWatchRequest {\n includeInitial?: bool;\n jobId?: JobsWatchRequestJobId;\n query?: JobsWatchRequestQuery;\n}\n\ntype JobsWatchRequestJobId = string(min_length=1);\n\nmodel JobsWatchRequestQuery {\n groupBy?: JobsWatchRequestQueryGroupBy;\n queueKey?: string;\n runtimeBand?: JobsWatchRequestQueryRuntimeBand;\n search?: string;\n service?: JobsWatchRequestQueryService;\n sort?: JobsWatchRequestQuerySort;\n state?: list<JobsWatchRequestQueryState>;\n trigger?: string;\n type?: JobsWatchRequestQueryType;\n window?: string;\n}\n\nenum JobsWatchRequestQueryGroupBy {\n \"queueKey\";\n \"runtimeBand\";\n \"service\";\n \"state\";\n \"trigger\";\n \"type\";\n}\n\nenum JobsWatchRequestQueryRuntimeBand {\n \"queued\";\n \"running\";\n \"slow\";\n \"terminal\";\n}\n\ntype JobsWatchRequestQueryService = string(min_length=1);\n\nmodel JobsWatchRequestQuerySort {\n direction?: JobsWatchRequestQuerySortDirection;\n field: JobsWatchRequestQuerySortField;\n}\n\nenum JobsWatchRequestQuerySortDirection {\n \"asc\";\n \"desc\";\n}\n\nenum JobsWatchRequestQuerySortField {\n \"depth\";\n \"failureRate\";\n \"queueAge\";\n \"retries\";\n \"runtime\";\n \"updatedAt\";\n}\n\nenum JobsWatchRequestQueryState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\ntype JobsWatchRequestQueryType = string(min_length=1);\n\nmodel JobsWorkbenchGroup {\n count: uint64;\n depth?: uint64;\n failureRate?: JobsWorkbenchGroupFailureRate;\n key: string;\n label: string;\n latestUpdatedAt?: string;\n oldestCreatedAt?: string;\n state?: JobsWorkbenchGroupState;\n}\n\ntype JobsWorkbenchGroupFailureRate = number(min=0);\n\nenum JobsWorkbenchGroupState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsWorkbenchJobRow {\n completedAt?: string;\n context?: JobsWorkbenchJobRowContext;\n createdAt: string;\n errorFingerprint?: string;\n id: JobsWorkbenchJobRowId;\n lastError?: string;\n lineage?: JobsWorkbenchJobRowLineage;\n maxTries: JobsWorkbenchJobRowMaxTries;\n progress?: JobsWorkbenchJobRowProgress;\n queueAgeMs?: uint64;\n queueKey?: string;\n runtimeBand?: string;\n runtimeMs?: uint64;\n service: JobsWorkbenchJobRowService;\n startedAt?: string;\n state: JobsWorkbenchJobRowState;\n tries: uint64;\n trigger?: JobsWorkbenchJobRowTrigger;\n type: JobsWorkbenchJobRowType;\n updatedAt: string;\n waitingOn?: list<JobsWorkbenchJobRowWaitingOnItem>;\n}\n\nmodel JobsWorkbenchJobRowContext {\n requestId: JobsWorkbenchJobRowContextRequestId;\n traceId: string;\n traceparent: string;\n tracestate?: JobsWorkbenchJobRowContextTracestate;\n}\n\ntype JobsWorkbenchJobRowContextRequestId = string(min_length=1);\n\ntype JobsWorkbenchJobRowContextTracestate = string(min_length=1);\n\ntype JobsWorkbenchJobRowId = string(min_length=1);\n\nmodel JobsWorkbenchJobRowLineage {\n operationId?: string;\n parentJobId?: string;\n relatedKeys?: list<string>;\n rootJobId?: string;\n}\n\ntype JobsWorkbenchJobRowMaxTries = int64(min=1);\n\nmodel JobsWorkbenchJobRowProgress {\n current?: uint64;\n message?: string;\n step?: string;\n total?: uint64;\n}\n\ntype JobsWorkbenchJobRowService = string(min_length=1);\n\nenum JobsWorkbenchJobRowState {\n \"active\";\n \"cancelled\";\n \"completed\";\n \"dead\";\n \"dismissed\";\n \"expired\";\n \"failed\";\n \"pending\";\n \"retry\";\n \"skipped\";\n \"stale\";\n}\n\nmodel JobsWorkbenchJobRowTrigger {\n id?: string;\n kind: JobsWorkbenchJobRowTriggerKind;\n operationId?: string;\n parentJobId?: string;\n requestId?: string;\n subject?: string;\n traceId?: string;\n}\n\nenum JobsWorkbenchJobRowTriggerKind {\n \"event\";\n \"manualReplay\";\n \"operation\";\n \"parentJob\";\n \"rpc\";\n \"schedule\";\n \"serviceCode\";\n}\n\ntype JobsWorkbenchJobRowType = string(min_length=1);\n\nmodel JobsWorkbenchJobRowWaitingOnItem {\n id: JobsWorkbenchJobRowWaitingOnItemId;\n label?: JobsWorkbenchJobRowWaitingOnItemLabel;\n startedAt: string;\n target: JobsWorkbenchJobRowWaitingOnItemTarget;\n}\n\ntype JobsWorkbenchJobRowWaitingOnItemId = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemLabel = string(min_length=1);\n\nmodel JobsWorkbenchJobRowWaitingOnItemTarget {\n id?: JobsWorkbenchJobRowWaitingOnItemTargetId;\n key?: JobsWorkbenchJobRowWaitingOnItemTargetKey;\n kind: JobsWorkbenchJobRowWaitingOnItemTargetKind;\n label?: JobsWorkbenchJobRowWaitingOnItemTargetLabel;\n operation?: JobsWorkbenchJobRowWaitingOnItemTargetOperation;\n operationId?: JobsWorkbenchJobRowWaitingOnItemTargetOperationId;\n service?: JobsWorkbenchJobRowWaitingOnItemTargetService;\n system?: JobsWorkbenchJobRowWaitingOnItemTargetSystem;\n type?: JobsWorkbenchJobRowWaitingOnItemTargetType;\n}\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetId = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetKey = string(min_length=1);\n\nenum JobsWorkbenchJobRowWaitingOnItemTargetKind {\n \"external\";\n \"job\";\n \"operation\";\n}\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetLabel = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetOperation = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetOperationId = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetService = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetSystem = string(min_length=1);\n\ntype JobsWorkbenchJobRowWaitingOnItemTargetType = string(min_length=1);\n\nmodel JobsWorkbenchStats {\n byState: map<uint64>;\n dead?: uint64;\n failed?: uint64;\n queued?: uint64;\n running?: uint64;\n slow?: uint64;\n total: uint64;\n}\n\nmodel ResourceActual {\n history?: ResourceHistory;\n maxObjectBytes?: ResourceCapacityBytes;\n maxTotalBytes?: ResourceCapacityBytes;\n maxValueBytes?: ResourceCapacityBytes;\n representationVersion?: StateRepresentationVersion;\n ttlMs?: uint64;\n}\n\ntype ResourceBindingRevision = int64(min=1, max=9007199254740991);\n\ntype ResourceCapacityBytes = uint64(max=9007199254740991);\n\nmodel ResourceCommitment {\n desiredMaxObjectBytes?: ResourceCapacityBytes;\n desiredMaxTotalBytes?: ResourceCapacityBytes;\n desiredMaxValueBytes?: ResourceCapacityBytes;\n history?: ResourceHistory;\n ttlMs?: uint64;\n}\n\nmodel ResourceDesired {\n commitment: ResourceCommitment;\n representationVersion?: StateRepresentationVersion;\n}\n\ntype ResourceHistory = uint64(max=9007199254740991);\n\nmodel ResourceHistoryEntry {\n actual?: ResourceActual;\n changedAt: string;\n desired: ResourceDesired;\n state: ResourceLifecycleState;\n version: ResourceVersion;\n}\n\ntype ResourceId = string(min_length=1);\n\nmodel ResourceInspection {\n actual?: ResourceActual;\n bindingRevision: ResourceBindingRevision;\n commitment: ResourceCommitment;\n createdAt: string;\n desired: ResourceDesired;\n history: list<ResourceHistoryEntry>;\n kind: ResourceKind;\n localName: ResourceLocalName;\n ownerId: ResourceOwnerId;\n ownerKind: ResourceOwnerKind;\n participantId: ResourceParticipantId;\n physicalId?: ResourcePhysicalId;\n readiness: ResourceReadiness;\n resourceId: ResourceId;\n state: ResourceLifecycleState;\n updatedAt: string;\n version: ResourceVersion;\n}\n\nenum ResourceKind {\n \"consumer\";\n \"job\";\n \"kv\";\n \"state\";\n \"store\";\n}\n\nenum ResourceLifecycleState {\n \"destroying\";\n \"detached\";\n \"failed\";\n \"pending\";\n \"ready\";\n}\n\ntype ResourceLocalName = string(min_length=1);\n\ntype ResourceOwnerId = string(min_length=1);\n\nenum ResourceOwnerKind {\n \"agent\";\n \"app\";\n \"device\";\n \"service\";\n}\n\ntype ResourceParticipantId = string(min_length=1);\n\ntype ResourcePhysicalId = string(min_length=1);\n\nmodel ResourceReadiness {\n ready: bool;\n reason?: string;\n}\n\ntype ResourceVersion = int64(min=1, max=9007199254740991);\n\nmodel ResourcesDestroyRequest {\n confirmPhysicalId: ResourcePhysicalId;\n expectedRevision: ResourceBindingRevision;\n resourceId: ResourceId;\n}\n\nmodel ResourcesDestroyResponse {\n destroyed: bool;\n}\n\nmodel ResourcesInspectRequest {\n resourceId: ResourceId;\n}\n\nmodel ResourcesInspectResponse {\n resource: ResourceInspection;\n}\n\nmodel ResourcesQueryRequest {\n kind?: ResourceKind;\n ownerId?: ResourceOwnerId;\n ownerKind?: ResourceOwnerKind;\n page?: CursorQuery;\n participantId?: ResourceParticipantId;\n state?: ResourceLifecycleState;\n}\n\ntype ResourcesQueryResponse = CursorPage<ResourceInspection>;\n\nmodel StateConflict {\n current?: StoredState;\n}\n\nmodel StateDeleteRequest {\n resourceName: StateResourceName;\n revision?: StateRevision;\n}\n\nmodel StateDeleteResponse {\n deleted: bool;\n}\n\nmodel StateGetRequest {\n resourceName: StateResourceName;\n}\n\nmodel StateGetResponse {\n entry?: StoredState;\n}\n\nenum StatePutMode {\n \"create\";\n \"replace\";\n \"set\";\n}\n\nmodel StatePutRequest {\n mode: StatePutMode;\n representationVersion: StateRepresentationVersion;\n resourceName: StateResourceName;\n revision?: StateRevision;\n value: bytes;\n}\n\nmodel StatePutResponse {\n entry: StoredState;\n}\n\nmodel StateRegisterRequest {\n accepts: list<StateRepresentation>;\n expectedRevision: StateRevision;\n idempotencyKey: ulid;\n representation: StateRepresentation;\n resourceName: StateResourceName;\n}\n\nmodel StateRegisterResponse {\n revision: StateRevision;\n}\n\nmodel StateRegistrationConflict {\n currentRevision: StateRevision;\n}\n\nmodel StateRepresentation {\n schema: bytes;\n version: StateRepresentationVersion;\n}\n\nmodel StateRepresentationError {\n representationVersion: StateRepresentationVersion;\n resourceName: StateResourceName;\n}\n\ntype StateRepresentationVersion = uint32(min=1);\n\n/// JetStream refused the write because State has no room left; nothing was written.\nmodel StateResourceExhausted {\n /// What JetStream ran out of, in a few words.\n reason: string;\n resourceName: StateResourceName;\n}\n\ntype StateResourceName = string(min_length=1);\n\ntype StateRevision = string(min_length=1);\n\nmodel StoredState {\n createdAt: timestamp;\n representationVersion: StateRepresentationVersion;\n revision: StateRevision;\n updatedAt: timestamp;\n value: bytes;\n}\n\nmodel TrellisSurfaceStatusRequest {\n action?: TrellisSurfaceStatusRequestAction;\n contractId: TrellisSurfaceStatusRequestContractId;\n kind: TrellisSurfaceStatusRequestKind;\n surface: TrellisSurfaceStatusRequestSurface;\n}\n\nenum TrellisSurfaceStatusRequestAction {\n \"call\";\n \"observe\";\n \"publish\";\n \"subscribe\";\n}\n\ntype TrellisSurfaceStatusRequestContractId = string(min_length=1);\n\nenum TrellisSurfaceStatusRequestKind {\n \"event\";\n \"live\";\n \"operation\";\n \"rpc\";\n}\n\ntype TrellisSurfaceStatusRequestSurface = string(min_length=1);\n\nmodel TrellisSurfaceStatusResponse {\n status: bytes;\n}\n\nmodel TrellisSurfaceStatusResponseStatus1 {\n liveImplementer: bool;\n runtime: TrellisSurfaceStatusResponseStatus1Runtime;\n state: TrellisSurfaceStatusResponseStatus1State;\n}\n\nenum TrellisSurfaceStatusResponseStatus1Runtime {\n \"disabled\";\n \"live\";\n \"no_live_implementer\";\n}\n\nenum TrellisSurfaceStatusResponseStatus1State {\n \"available\";\n}\n\nmodel TrellisSurfaceStatusResponseStatus2 {\n reason: TrellisSurfaceStatusResponseStatus2Reason;\n state: TrellisSurfaceStatusResponseStatus2State;\n}\n\nenum TrellisSurfaceStatusResponseStatus2Reason {\n \"authority_unavailable\";\n}\n\nenum TrellisSurfaceStatusResponseStatus2State {\n \"unavailable\";\n}\n\nmodel TrellisSurfaceStatusResponseStatus3 {\n missingCapabilities: list<string>;\n state: TrellisSurfaceStatusResponseStatus3State;\n}\n\nenum TrellisSurfaceStatusResponseStatus3State {\n \"unauthorized\";\n}\n\nmodel TrellisSurfaceStatusResponseStatus4 {\n contractId: TrellisSurfaceStatusResponseStatus4ContractId;\n state: TrellisSurfaceStatusResponseStatus4State;\n}\n\ntype TrellisSurfaceStatusResponseStatus4ContractId = string(min_length=1);\n\nenum TrellisSurfaceStatusResponseStatus4State {\n \"unknown_contract\";\n}\n\nmodel TrellisSurfaceStatusResponseStatus5 {\n contractId: TrellisSurfaceStatusResponseStatus5ContractId;\n kind: TrellisSurfaceStatusResponseStatus5Kind;\n state: TrellisSurfaceStatusResponseStatus5State;\n surface: TrellisSurfaceStatusResponseStatus5Surface;\n}\n\ntype TrellisSurfaceStatusResponseStatus5ContractId = string(min_length=1);\n\ntype TrellisSurfaceStatusResponseStatus5Kind = string(min_length=1);\n\nenum TrellisSurfaceStatusResponseStatus5State {\n \"unknown_surface\";\n}\n\ntype TrellisSurfaceStatusResponseStatus5Surface = string(min_length=1);\n\n/// The record Trellis keeps of one request.\nmodel WebhookAttempt {\n attemptId: ulid;\n bodySha256: string;\n bodySize: uint64;\n clientAddress: string;\n /// The `Received` event's ID, once one was published.\n deliveryId: ulid | null;\n endpoint: string;\n /// \"current\" or \"previous\" when a secret matched.\n matchedKey: string | null;\n method: string;\n outcome: WebhookOutcome;\n /// Names only the failed check, never a value.\n reason: string | null;\n receivedAt: timestamp;\n service: string;\n status: uint32 | null;\n /// Whether the stored request can still be verified again.\n stored: bool;\n verdict: WebhookVerdict | null;\n}\n\n/// A check a request passed, and which secret it matched.\nmodel WebhookCheck {\n /// \"current\" or \"previous\" for a check that uses a secret.\n key: string | null;\n kind: WebhookCheckKind;\n}\n\n/// A check a request passed.\nenum WebhookCheckKind {\n \"address\";\n \"basic\";\n \"decide\";\n \"hmac\";\n \"none\";\n \"token\";\n}\n\n/// What Trellis sends a service's decide handler.\nmodel WebhookDecideRequest {\n /// 1 for the first call. Async decide calls are retried.\n attempt: uint32;\n deadline: timestamp;\n delivery: WebhookDelivery;\n mode: WebhookMode;\n}\n\n/// A decide handler's answer.\nmodel WebhookDecision {\n /// Replaces the declared dedupe key, for senders that put their ID in the body.\n dedupeKey?: string;\n /// Recorded with the request. Never sent to the sender.\n reason?: string;\n /// Sent to the sender in sync mode. Ignored in async mode.\n response?: WebhookResponse;\n verdict: WebhookVerdict;\n}\n\n/// A webhook request that passed verification, exactly as Trellis received it.\nmodel WebhookDelivery {\n /// The body as received, or after decoding its content encoding.\n body: bytes;\n bodySha256: string;\n checks: list<WebhookCheck>;\n clientAddress: string;\n contentType: string | null;\n dedupeKey: string | null;\n /// Unique ID of this request; also the event's ID.\n deliveryId: ulid;\n /// The endpoint's name in the service's IDL.\n endpoint: string;\n /// Request headers in order, with lowercase names and without credentials.\n headers: list<WebhookField>;\n method: string;\n receivedAt: timestamp;\n /// The service deployment that declared the endpoint.\n service: string;\n /// The Trellis origin plus the path and query exactly as received, without a credential.\n url: string;\n}\n\n/// One endpoint a service declared.\nmodel WebhookEndpoint {\n decides: bool;\n description: string;\n enabled: bool;\n endpoint: string;\n methods: list<string>;\n mode: WebhookMode;\n /// Earlier URLs that still work until retired.\n previousUrls: list<string>;\n /// Requests in the last 24 hours, by outcome.\n recent: list<WebhookOutcomeCount>;\n secrets: list<WebhookSecretStatus>;\n service: string;\n settings: WebhookSettings;\n title: string;\n unauthenticated: bool;\n /// The URL senders use.\n url: string;\n /// The verifiers in plain words.\n verifiers: list<string>;\n}\n\n/// One request header or form field.\nmodel WebhookField {\n name: string;\n value: string;\n}\n\n/// When Trellis answers the sender.\nenum WebhookMode {\n \"async\";\n \"sync\";\n}\n\n/// What became of a request.\nenum WebhookOutcome {\n \"accepted\";\n \"duplicate\";\n \"expired\";\n \"ignored\";\n \"invalid_decision\";\n \"limited\";\n \"pending\";\n \"rejected\";\n \"unavailable\";\n}\n\n/// Requests an endpoint received recently, by outcome.\nmodel WebhookOutcomeCount {\n count: uint64;\n outcome: WebhookOutcome;\n}\n\n/// An HTTP response a decide handler gives the sender in sync mode.\nmodel WebhookResponse {\n body: bytes;\n headers: list<WebhookField>;\n status: uint32;\n}\n\n/// A secret an endpoint verifies with.\nmodel WebhookSecretStatus {\n /// When a request to this endpoint last matched the current value, since\n /// the change that set it.\n currentLastMatchedAt: timestamp | null;\n isSet: bool;\n /// The setting's name.\n name: string;\n /// When the previous value stops being accepted, while it still is.\n previousAcceptedUntil: timestamp | null;\n /// When a request to this endpoint last matched the value the newest\n /// change replaced, after that change.\n previousLastMatchedAt: timestamp | null;\n}\n\n/// An endpoint's runtime settings, as the deployment set them or as they default.\nmodel WebhookSettings {\n asyncDecideDeadlineMs: uint64;\n burst: uint32;\n dedupeWindowMs: uint64;\n failuresPerMinute: uint32;\n intakeMaxBytes: uint64;\n intakeRetentionMs: uint64;\n maxBodyBytes: uint64;\n recordRetentionMs: uint64;\n requestsPerSecond: uint32;\n rotationOverlapMs: uint64;\n syncDecideDeadlineMs: uint64;\n}\n\n/// What the service's decide handler concluded.\nenum WebhookVerdict {\n \"accept\";\n \"ignore\";\n \"reject\";\n}\n\n/// A request record of one endpoint. A record of another service or endpoint\n/// is not found.\nmodel WebhooksAttemptsInspectRequest {\n attemptId: ulid;\n endpoint: string;\n service: string;\n}\n\nmodel WebhooksAttemptsInspectResponse {\n attempt: WebhookAttempt;\n /// The stored request, while the intake stream still holds it.\n delivery: WebhookDelivery | null;\n}\n\nmodel WebhooksAttemptsQueryRequest {\n /// Return records older than this one.\n before?: ulid;\n endpoint?: string;\n limit?: uint32;\n outcome?: WebhookOutcome;\n service: string;\n since?: timestamp;\n}\n\nmodel WebhooksAttemptsQueryResponse {\n attempts: list<WebhookAttempt>;\n next: ulid | null;\n}\n\n/// A stored request of one endpoint. A record of another service or endpoint\n/// is not found.\nmodel WebhooksAttemptsReverifyRequest {\n attemptId: ulid;\n endpoint: string;\n service: string;\n}\n\nmodel WebhooksAttemptsReverifyResponse {\n attempt: WebhookAttempt;\n}\n\nmodel WebhooksEndpointsListRequest {\n service?: string;\n}\n\nmodel WebhooksEndpointsListResponse {\n endpoints: list<WebhookEndpoint>;\n}\n\napi auth@v1 {\n title \"Trellis Auth\";\n description \"Manage principals, whole-capability roles, public OAuth clients, consent, accepted APIs, and logical authorization sessions.\";\n version \"1.0.0\";\n error AuthError(AuthErrorDetails);\n error UnexpectedError(AuthErrorDetails);\n error ValidationError(AuthErrorDetails);\n /// An app session ended.\n event AuthorizationSessions.Retired {\n payload AuthSecurityEvent;\n }\n /// Configuration changed. Carries whose and the revision, never values.\n event Config.Changed {\n payload AuthConfigChanged;\n }\n /// A connection to Trellis closed.\n event Connections.Closed {\n payload AuthSecurityEvent;\n }\n /// An administrator disconnected a connection.\n event Connections.Kicked {\n payload AuthSecurityEvent;\n }\n event Connections.Opened {\n payload AuthSecurityEvent;\n }\n /// Trellis stopped trusting an issuer key.\n event Issuers.Revoked {\n payload AuthSecurityEvent;\n }\n /// Trellis announced a new issuer key, which signs after the activation delay.\n event Issuers.Rotated {\n payload AuthSecurityEvent;\n }\n /// Export a service deployment, with its build, instances, settings, secrets and data, for import into another installation. Exporting changes nothing in this installation. Download the finished bundle with Deployments.Exports.Download.\n operation Deployments.Export {\n input AuthDeploymentExportRequest;\n output AuthDeploymentExportResult;\n progress AuthServiceBundleProgress;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Import an exported service, sent as the operation's byte stream. The deployment keeps its ID; an import that would replace an existing deployment is refused.\n operation Deployments.Import {\n input AuthDeploymentImportRequest;\n output AuthDeploymentImportResult;\n progress AuthServiceBundleProgress;\n errors [AuthError, UnexpectedError, ValidationError];\n stream;\n }\n /// Renew the calling connection's admission before it expires.\n rpc Admission.Renew {\n input AuthAdmissionRenewRequest;\n output AuthAdmissionRenewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Accept a reviewed API definition.\n rpc Apis.Accept {\n input AuthApiAcceptRequest;\n output AuthApiAcceptResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Accept a reviewed definition that breaks the current one.\n rpc Apis.ForceReplace {\n input AuthApiForceReplaceRequest;\n output AuthApiAcceptResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one accepted API: its actions, their schemas and descriptions, its permissions and its IDL.\n rpc Apis.Get {\n input AuthApiGetRequest;\n output AuthApiGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the APIs this installation has accepted.\n rpc Apis.List {\n input AuthPageRequest;\n output AuthApisListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Check a new or changed API definition before accepting it, showing what would change.\n rpc Apis.Review {\n input AuthApiReviewRequest;\n output AuthApiReviewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Renew the calling session's signed authority before it expires.\n rpc Authority.Renew {\n input AuthAuthorityRenewRequest;\n output AuthAuthorityRenewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List active app sessions.\n rpc AuthorizationSessions.List {\n input AuthAuthorizationSessionsListRequest;\n output AuthAuthorizationSessionsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// End an app session.\n rpc AuthorizationSessions.Revoke {\n input AuthAuthorizationSessionRevokeRequest;\n output AuthAuthorizationSessionRevokeResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the permissions and groups installed APIs define, with what each allows.\n rpc Capabilities.List {\n input AuthCapabilitiesListRequest;\n output AuthCapabilitiesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Give a person one permission or group directly, optionally until a set time.\n rpc CapabilityGrants.Grant {\n input AuthCapabilityGrantRequest;\n output AuthCapabilityGrantResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List permissions given directly to users, outside roles.\n rpc CapabilityGrants.List {\n input AuthCapabilityGrantsListRequest;\n output AuthCapabilityGrantsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Take back a permission given directly.\n rpc CapabilityGrants.Revoke {\n input AuthCapabilityRevokeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// An app reads its own settings, which are public to its users.\n rpc Config.App.Get {\n input AuthEmpty;\n output AuthAppConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Attach the settings an app build declares to its registered client.\n rpc Config.Apps.Declare {\n input AuthConfigAppDeclareRequest;\n output AuthConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Someone or something connected to Trellis.\n /// See a deployment's, instance's, or app's configuration. Secrets show only whether they are set.\n rpc Config.Get {\n input AuthConfigGetRequest;\n output AuthConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// A service or device reads its own configuration, secrets included.\n rpc Config.Own.Get {\n input AuthOwnConfigRequest;\n output AuthOwnConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// A service or device reports whether it applied the settings it read\n /// or its own checks rejected them.\n rpc Config.Own.Report {\n input AuthConfigOwnReportRequest;\n output AuthEmpty;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Delete an old configuration revision. The current one cannot be deleted,\n /// and one that holds a secret needs `config.manageSecrets`.\n rpc Config.Revisions.Delete {\n input AuthConfigRevisionDeleteRequest;\n output AuthConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List configuration revisions, newest first.\n rpc Config.Revisions.List {\n input AuthConfigRevisionsListRequest;\n output AuthConfigRevisionsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Make an earlier revision's values current again, as a new revision.\n rpc Config.Rollback {\n input AuthConfigRollbackRequest;\n output AuthConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Show one stored secret's value to an administrator who asks for it.\n /// Every settings capability reaches it so a refusal can name what is\n /// missing, but only `config.manageSecrets` is shown the value. Each reveal\n /// is audited, never its value.\n rpc Config.Secrets.Reveal {\n input AuthConfigSecretRevealRequest;\n output AuthConfigSecretRevealResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change configuration values, producing a new revision.\n rpc Config.Set {\n input AuthConfigSetRequest;\n output AuthConfigResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Disconnect a live connection now.\n rpc Connections.Kick {\n input AuthConnectionsKickRequest;\n output AuthConnectionsKickResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List live connections to Trellis.\n rpc Connections.List {\n input AuthConnectionsListRequest;\n output AuthConnectionsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// List the apps users have allowed to act for them.\n rpc Delegations.List {\n input AuthDelegationsListRequest;\n output AuthDelegationsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// See exactly what one app was allowed to do for a person.\n rpc Delegations.Review {\n input AuthDelegationReviewRequest;\n output AuthDelegationReviewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Stop an app acting for a person.\n rpc Delegations.Revoke {\n input AuthDelegationRevokeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Apply a service or device definition to a deployment.\n rpc Deployments.Apply {\n input AuthDeploymentApplyRequest;\n output AuthDeploymentMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Create a deployment for a service or device kind.\n rpc Deployments.Create {\n input AuthDeploymentCreateRequest;\n output AuthDeploymentMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn a deployment off. Its instances stop connecting.\n rpc Deployments.Disable {\n input AuthDeploymentMutationRequest;\n output AuthDeploymentMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn a deployment on.\n rpc Deployments.Enable {\n input AuthDeploymentMutationRequest;\n output AuthDeploymentMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Download the content of a finished export. Only the administrator who exported it may.\n rpc Deployments.Exports.Download {\n input AuthDeploymentExportDownloadRequest;\n output AuthDeploymentExportDownloadResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n download;\n }\n /// Get one deployment.\n rpc Deployments.Get {\n input AuthDeploymentGetRequest;\n output AuthDeploymentGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List deployments.\n rpc Deployments.List {\n input AuthPageRequest;\n output AuthDeploymentsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Remove a deployment.\n rpc Deployments.Remove {\n input AuthDeploymentMutationRequest;\n output AuthDeploymentMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Attach a companion app to an activated device.\n rpc DeviceCompanions.Attach {\n input AuthDeviceCompanionAttachRequest;\n output AuthDeviceCompanion;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Detach a device's companion app.\n rpc DeviceCompanions.Revoke {\n input AuthDeviceCompanionRevokeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Stop a device connecting.\n rpc Devices.Disable {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Let a device connect.\n rpc Devices.Enable {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List devices.\n rpc Devices.List {\n input AuthInstancesListRequest;\n output AuthInstancesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Provision a device with its own identity.\n rpc Devices.Provision {\n input AuthInstanceProvisionRequest;\n output AuthInstanceProvisionResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Remove a device.\n rpc Devices.Remove {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Approve or reject a device activation.\n rpc Devices.Reviews.Decide {\n input AuthDeviceReviewDecideRequest;\n output AuthDeviceReviewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one device activation waiting for review.\n rpc Devices.Reviews.Get {\n input AuthDeviceReviewGetRequest;\n output AuthDeviceReviewResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List device activations waiting for review.\n rpc Devices.Reviews.List {\n input AuthPageRequest;\n output AuthDeviceReviewsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Issue an enrollment secret for one deployment. Its text is returned once.\n rpc EnrollmentSecrets.Issue {\n input AuthEnrollmentSecretIssueRequest;\n output AuthEnrollmentSecretIssueResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List a deployment's enrollment secrets, revoked ones included.\n rpc EnrollmentSecrets.List {\n input AuthEnrollmentSecretsListRequest;\n output AuthEnrollmentSecretsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Stop an enrollment secret from creating instances, optionally retiring the ones it created.\n rpc EnrollmentSecrets.Revoke {\n input AuthEnrollmentSecretRevokeRequest;\n output AuthEnrollmentSecretRevokeResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change an enrollment secret's title and limits.\n rpc EnrollmentSecrets.Update {\n input AuthEnrollmentSecretUpdateRequest;\n output AuthEnrollmentSecretResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Read the installation's rules for enrolled and offline instances, and one deployment's.\n rpc InstancePolicy.Get {\n input AuthInstancePolicyGetRequest;\n output AuthInstancePolicyResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change the installation's or one deployment's rules for enrolled and offline instances.\n rpc InstancePolicy.Set {\n input AuthInstancePolicySetRequest;\n output AuthInstancePolicyResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Stop trusting an issuer key. Sessions it signed must sign in again.\n rpc Issuers.Revoke {\n input AuthIssuerRevokeRequest;\n output AuthIssuerRevokeResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Announce a new issuer key; Trellis signs with it after the activation delay.\n rpc Issuers.Rotate {\n input AuthIssuerRotateRequest;\n output AuthIssuerRotateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Delete a registered app.\n rpc OAuthClients.Delete {\n input AuthOAuthClientMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn an app off. Users can no longer sign in to it.\n rpc OAuthClients.Disable {\n input AuthOAuthClientMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn a disabled app back on. Saving an app's settings never does.\n rpc OAuthClients.Enable {\n input AuthOAuthClientMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one registered app.\n rpc OAuthClients.Get {\n input AuthOAuthClientGetRequest;\n output AuthOAuthClientGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List registered apps.\n rpc OAuthClients.List {\n input AuthPageRequest;\n output AuthOAuthClientsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Register an app or change its settings.\n rpc OAuthClients.Put {\n input AuthOAuthClientPutRequest;\n output AuthOAuthClientGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Choose whether users signing in to this app may create their own account.\n rpc OAuthClients.SignUp.Update {\n input AuthOAuthClientSignUpUpdateRequest;\n output AuthOAuthClientGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Delete an OIDC provider.\n rpc OIDCProviders.Delete {\n input AuthOIDCProviderMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn an OIDC provider off.\n rpc OIDCProviders.Disable {\n input AuthOIDCProviderMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Turn an OIDC provider back on.\n rpc OIDCProviders.Enable {\n input AuthOIDCProviderMutationRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one OIDC provider.\n rpc OIDCProviders.Get {\n input AuthOIDCProviderGetRequest;\n output AuthOIDCProviderGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List OIDC providers.\n rpc OIDCProviders.List {\n input AuthPageRequest;\n output AuthOIDCProvidersListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Add an OIDC provider or change its settings.\n rpc OIDCProviders.Put {\n input AuthOIDCProviderPutRequest;\n output AuthOIDCProviderGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Stop a provider group giving roles.\n rpc OIDCRoleMappings.Delete {\n input AuthOIDCRoleMappingDeleteRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List which provider groups give which roles.\n rpc OIDCRoleMappings.List {\n input AuthOIDCRoleMappingsListRequest;\n output AuthOIDCRoleMappingsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Give roles to everyone in a provider group.\n rpc OIDCRoleMappings.Put {\n input AuthOIDCRoleMappingPutRequest;\n output AuthOIDCRoleMappingPutResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the registries Trellis pulls published packages from.\n rpc PackageRegistries.List {\n input AuthEmpty;\n output AuthPackageRegistriesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Add a registry, or replace the one with the same name.\n rpc PackageRegistries.Put {\n input AuthPackageRegistryPutRequest;\n output AuthPackageRegistryPutResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Remove a registry and its stored credentials.\n rpc PackageRegistries.Remove {\n input AuthPackageRegistryRemoveRequest;\n output AuthEmpty;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Fetch a published package release from a registry an administrator added, check every digest it was published with, and build its package evidence from exactly the dependencies it was published with.\n rpc Packages.Pull {\n input AuthPackagePullRequest;\n output AuthPackagePullResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Build a service's or device's package evidence from its own IDL files, taking its dependencies from Trellis's built-in packages, the packages of installed services and devices, and the packages supplied with it. Nothing is fetched; dependencies none of these satisfy are listed instead.\n rpc Packages.Resolve {\n input AuthPackageResolveRequest;\n output AuthPackageResolveResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Remove an app's sign-in page theme so it uses the installation's.\n rpc PortalThemes.Delete {\n input AuthPortalThemeDeleteRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get the sign-in page theme for the installation or one app.\n rpc PortalThemes.Get {\n input AuthPortalThemeGetRequest;\n output AuthPortalThemeGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List sign-in page themes.\n rpc PortalThemes.List {\n input AuthPageRequest;\n output AuthPortalThemesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Set the sign-in page theme for the installation or one app.\n rpc PortalThemes.Put {\n input AuthPortalThemePutRequest;\n output AuthPortalThemeGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Everything a person or service can do, and where each permission comes from.\n rpc Principals.EffectiveAccess {\n input AuthPrincipalRequest;\n output AuthEffectiveAccessResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Which deployments use which resources.\n rpc ResourceBindings.Query {\n input AuthResourceBindingsQueryRequest;\n output AuthResourceBindingsQueryResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Get one resource.\n rpc Resources.Get {\n input AuthResourceGetRequest;\n output AuthResourceGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the storage, jobs and other resources deployments use.\n rpc Resources.List {\n input AuthResourcesListRequest;\n output AuthResourcesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Remove a resource and what it stores.\n rpc Resources.Remove {\n input AuthResourceRemoveRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Give a person a role, optionally until a set time.\n rpc RoleAssignments.Assign {\n input AuthRoleAssignRequest;\n output AuthRoleAssignResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List who has which roles, optionally for one person or role.\n rpc RoleAssignments.List {\n input AuthRoleAssignmentsListRequest;\n output AuthRoleAssignmentsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Take a role away from a person.\n rpc RoleAssignments.Revoke {\n input AuthRoleRevokeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Delete a role. Everyone who had it loses what it gave them.\n rpc Roles.Delete {\n input AuthRoleDeleteRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one role and what it holds.\n rpc Roles.Get {\n input AuthRoleGetRequest;\n output AuthRoleGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List roles, newest first, optionally matching a search.\n rpc Roles.List {\n input AuthPageRequest;\n output AuthRolesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Create a role or replace its title, description and permissions.\n rpc Roles.Put {\n input AuthRolePutRequest;\n output AuthRolePutResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// One report of this Trellis's state: the server, health, JetStream, disk,\n /// certificates, recent server failures, and stuck background work.\n rpc Runtime.Diagnostics {\n input AuthEmpty;\n output AuthRuntimeDiagnosticsResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// The version of the Trellis server, and for administrators a newer\n /// release when one is out.\n rpc Runtime.Version {\n input AuthEmpty;\n output AuthRuntimeVersionResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Let a new service identity join a deployment the first time it connects.\n rpc ServiceClaims.Create {\n input AuthServiceClaimCreateRequest;\n output AuthServiceClaimResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List service identities waiting to join.\n rpc ServiceClaims.List {\n input AuthPageRequest;\n output AuthServiceClaimsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Turn a waiting service identity away.\n rpc ServiceClaims.Remove {\n input AuthServiceClaimRemoveRequest;\n output AuthServiceClaimResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Stop a service instance connecting.\n rpc ServiceInstances.Disable {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Let a service instance connect.\n rpc ServiceInstances.Enable {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List service instances.\n rpc ServiceInstances.List {\n input AuthInstancesListRequest;\n output AuthInstancesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Provision a service instance with its own identity.\n rpc ServiceInstances.Provision {\n input AuthInstanceProvisionRequest;\n output AuthInstanceProvisionResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Remove a service instance.\n rpc ServiceInstances.Remove {\n input AuthInstanceMutationRequest;\n output AuthInstanceMutationResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// An enrolled instance retires itself at a graceful stop, since its in-memory key goes with the process.\n rpc ServiceInstances.RetireOwn {\n input AuthEmpty;\n output AuthEmpty;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Approve or reject a service update.\n rpc ServiceUpdates.Decide {\n input AuthServiceUpdateDecideRequest;\n output AuthServiceUpdateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one service update and what it would change.\n rpc ServiceUpdates.Get {\n input AuthServiceUpdateStatusRequest;\n output AuthServiceUpdateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List service updates waiting for an administrator.\n rpc ServiceUpdates.List {\n input AuthServiceUpdatesListRequest;\n output AuthServiceUpdatesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Whether a submitted service update was accepted.\n rpc ServiceUpdates.Status {\n input AuthServiceUpdateStatusRequest;\n output AuthServiceUpdateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Submit a service's new definition when it connects.\n rpc ServiceUpdates.Submit {\n input AuthServiceUpdateSubmitRequest;\n output AuthServiceUpdateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List an account's sign-ins.\n rpc Sessions.List {\n input AuthPageRequest;\n output AuthSessionsListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Sign the calling session out.\n rpc Sessions.Logout {\n input AuthEmpty;\n output AuthSessionsLogoutResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Who the calling session belongs to and what it may do.\n rpc Sessions.Me {\n input AuthEmpty;\n output AuthSessionsMeResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// End one of an account's sign-ins.\n rpc Sessions.Revoke {\n input AuthLoginRevokeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// How users may sign in to this installation.\n rpc SignInSettings.Get {\n input AuthEmpty;\n output AuthSignInSettingsGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change how users may sign in. Takes effect immediately.\n rpc SignInSettings.Update {\n input AuthSignInSettingsUpdateRequest;\n output AuthSignInSettingsGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the OIDC sign-ins linked to an account.\n rpc UserIdentities.List {\n input AuthPageRequest;\n output AuthUserIdentitiesListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Remove a linked OIDC sign-in from an account.\n rpc UserIdentities.Unlink {\n input AuthUserIdentityUnlinkRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Create an account. It gets the roles marked for new users.\n rpc Users.Create {\n input AuthUserCreateRequest;\n output AuthUserGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Delete a person's account. They are signed out everywhere, and their sign-ins, profile and access are removed.\n rpc Users.Delete {\n input AuthUserDeleteRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Find one person's account, enabled or not, by its user ID or by a linked OIDC sign-in.\n rpc Users.Find {\n input AuthUserFindRequest;\n output AuthUserFindResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Get one person's account.\n rpc Users.Get {\n input AuthUserGetRequest;\n output AuthUserGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Link an OIDC sign-in to a person's account, so their next sign-in through\n /// that provider with that `sub` lands on it. Linking a sign-in the account\n /// already has changes nothing; one another account has fails with\n /// `identity_linked_to_another_user`.\n rpc Users.Identities.Link {\n input AuthUserIdentitiesLinkRequest;\n output AuthUserFindMatch;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Remove an OIDC sign-in from a person's account and end the sign-ins made\n /// with it. Refused when it is the account's only way to sign in.\n rpc Users.Identities.Unlink {\n input AuthUserIdentitiesUnlinkRequest;\n output AuthUserFindMatch;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Start linking an OIDC sign-in to your account.\n rpc Users.IdentityLink.Create {\n input AuthIdentityLinkCreateRequest;\n output AuthIdentityLinkCreateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List the OIDC providers you can link to your account.\n rpc Users.IdentityLink.Providers {\n input AuthEmpty;\n output AuthIdentityLinkProvidersResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// List users, optionally matching a search or status.\n rpc Users.List {\n input AuthPageRequest;\n output AuthUsersListResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Change your own password. Your other sign-ins end.\n rpc Users.Password.Change {\n input AuthPasswordChangeRequest;\n output AuthMutationResult;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Create a one-time link that lets a person set a new password.\n rpc Users.PasswordReset.Create {\n input AuthPasswordResetCreateRequest;\n output AuthPasswordResetCreateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change your own name or picture.\n rpc Users.Profile.Update {\n input AuthUserProfileUpdateRequest;\n output AuthUserGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// The calling person's own account.\n rpc Users.Resolve {\n input AuthEmpty;\n output AuthUserGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Change a person's name, email or whether they can sign in.\n rpc Users.Update {\n input AuthUserUpdateRequest;\n output AuthUserGetResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n /// Enable, disable, or rotate the URL of a service's webhook endpoint, or change one of its runtime settings.\n rpc Webhooks.Update {\n input AuthWebhooksUpdateRequest;\n output AuthWebhooksUpdateResponse;\n errors [AuthError, UnexpectedError, ValidationError];\n }\n capabilities {\n capability account.changePassword {\n title \"Change your password\";\n description \"Change your password using your current one.\";\n grants \"Changes your password and signs out your other sessions.\";\n allows {\n rpc Users.Password.Change;\n }\n }\n capability account.edit {\n title \"Edit your profile\";\n description \"Change your display name, email, and photo.\";\n grants \"Changes what other apps see about you. Emails entered here are not verified.\";\n allows {\n rpc Users.Profile.Update;\n }\n }\n capability account.linkDevice {\n title \"Link to a device\";\n description \"Link this sign-in to a device you approved, or unlink it.\";\n grants \"The device can recognize this sign-in. Unlinking signs it out.\";\n allows {\n rpc DeviceCompanions.Attach;\n rpc DeviceCompanions.Revoke;\n rpc Devices.Reviews.Get;\n }\n }\n capability account.read {\n title \"See your profile\";\n description \"See your name, email, and account, and sign you out.\";\n grants \"Can read your profile and email and end your current sign-in.\";\n allows {\n rpc Runtime.Version;\n rpc Sessions.Logout;\n rpc Sessions.Me;\n rpc Users.Resolve;\n }\n }\n capability accounts.manage {\n administrative;\n title \"Manage accounts\";\n description \"Find, add, change and delete users' accounts, link their OIDC sign-ins, and send them password reset links.\";\n grants \"Can create, change, sign out and delete any account except the default administrator's.\";\n allows {\n rpc Users.Create;\n rpc Users.Delete;\n rpc Users.Find;\n rpc Users.Get;\n rpc Users.Identities.Link;\n rpc Users.Identities.Unlink;\n rpc Users.IdentityLink.Providers;\n rpc Users.List;\n rpc Users.PasswordReset.Create;\n rpc Users.Update;\n }\n }\n capability apis.accept {\n administrative;\n title \"Install API updates\";\n description \"Review and install compatible API updates.\";\n grants \"Changes what installed APIs offer to every app.\";\n allows {\n rpc Apis.Accept;\n rpc Apis.Get;\n rpc Apis.List;\n rpc Apis.Review;\n }\n }\n capability apis.forceReplace {\n administrative;\n title \"Force API replacements\";\n description \"Install API updates that break compatibility.\";\n grants \"Affected apps lose access and are signed out until users approve them again.\";\n allows {\n rpc Apis.ForceReplace;\n rpc Apis.Get;\n rpc Apis.List;\n rpc Apis.Review;\n }\n }\n capability bindings.readEvents {\n title \"Read event delivery settings\";\n description \"Look up which services own which event consumers.\";\n grants \"Can see event consumer ownership.\";\n allows {\n rpc ResourceBindings.Query;\n }\n }\n capability bindings.readJobs {\n title \"Read job storage settings\";\n description \"Look up which services own which job queues.\";\n grants \"Can see job queue ownership.\";\n allows {\n rpc ResourceBindings.Query;\n }\n }\n capability clients.manage {\n administrative;\n title \"Manage apps\";\n description \"Register apps and change their sign-in settings.\";\n grants \"Decides which apps can ask users for access.\";\n allows {\n rpc OAuthClients.Delete;\n rpc OAuthClients.Disable;\n rpc OAuthClients.Enable;\n rpc OAuthClients.Get;\n rpc OAuthClients.List;\n rpc OAuthClients.Put;\n rpc OAuthClients.SignUp.Update;\n rpc PortalThemes.Delete;\n rpc PortalThemes.Get;\n rpc PortalThemes.List;\n rpc PortalThemes.Put;\n }\n }\n capability config.manage {\n administrative;\n title \"Change settings\";\n description \"Change, roll back, and delete the settings of services, devices, and apps, except secrets.\";\n grants \"Can change how every service, device, and app behaves.\";\n allows {\n rpc Config.Apps.Declare;\n rpc Config.Get;\n rpc Config.Revisions.Delete;\n rpc Config.Revisions.List;\n rpc Config.Rollback;\n rpc Config.Secrets.Reveal;\n rpc Config.Set;\n }\n }\n capability config.manageSecrets {\n administrative;\n title \"Manage secrets\";\n description \"Set, replace, and show the secret settings of services, such as passwords and keys. Each time a secret is shown is recorded.\";\n grants \"Can read and replace any service's passwords and keys.\";\n allows {\n rpc Config.Get;\n rpc Config.Revisions.Delete;\n rpc Config.Revisions.List;\n rpc Config.Rollback;\n rpc Config.Secrets.Reveal;\n rpc Config.Set;\n }\n }\n capability config.read {\n administrative;\n title \"See settings\";\n description \"See the settings of services, devices, and apps. Secrets show only whether they are set.\";\n grants \"Can see every service's, device's, and app's settings, but no secret.\";\n allows {\n rpc Config.Get;\n rpc Config.Revisions.List;\n rpc Config.Secrets.Reveal;\n }\n }\n capability config.readApp {\n title \"Read the app's settings\";\n description \"An app reads the settings an administrator keeps for it and hears when they change.\";\n grants \"The app can read its own settings, which every one of its users can see.\";\n allows {\n rpc Config.App.Get;\n subscribe event Config.Changed;\n }\n }\n capability config.readOwn {\n title \"Read its own settings\";\n description \"A service or device reads the settings Trellis keeps for it, hears when they change, and reports whether it applied them.\";\n grants \"The service or device can read its own settings, secrets included.\";\n allows {\n rpc Config.Own.Get;\n rpc Config.Own.Report;\n subscribe event Config.Changed;\n }\n }\n capability delegations.read {\n title \"See your connected apps\";\n description \"See which apps you have allowed and what they can do.\";\n grants \"Can see your app choices.\";\n allows {\n rpc Delegations.List;\n rpc Delegations.Review;\n }\n }\n capability delegations.revoke {\n title \"Disconnect your apps\";\n description \"Remove an app's access to your account.\";\n grants \"The app loses access and is signed out.\";\n allows {\n rpc Delegations.Revoke;\n }\n }\n capability diagnostics.read {\n title \"See diagnostics\";\n description \"See one report of this Trellis's state: health, storage, certificates, and recent server failures.\";\n grants \"Can see server failures, certificates, disk space, and the health of every service.\";\n allows {\n rpc Runtime.Diagnostics;\n }\n }\n capability identities.manage {\n title \"Manage linked sign-ins\";\n description \"Link or unlink OIDC accounts.\";\n grants \"Changes which accounts can sign in as you.\";\n allows {\n rpc UserIdentities.Unlink;\n rpc Users.IdentityLink.Create;\n rpc Users.IdentityLink.Providers;\n }\n }\n capability identities.read {\n title \"See linked sign-ins\";\n description \"See which OIDC accounts you can sign in with.\";\n grants \"Can see your linked accounts.\";\n allows {\n rpc UserIdentities.List;\n }\n }\n capability instances.retireOwn {\n title \"Retire itself\";\n description \"An enrolled service instance retires itself when it stops.\";\n grants \"The instance can end its own registration; it cannot affect any other.\";\n allows {\n rpc ServiceInstances.RetireOwn;\n }\n }\n capability platform.manage {\n administrative;\n title \"Manage this Trellis\";\n description \"Decide who administers this Trellis and manage its signing keys.\";\n grants \"Full control of this Trellis installation.\";\n allows {\n rpc Issuers.Revoke;\n rpc Issuers.Rotate;\n rpc PortalThemes.Delete;\n rpc PortalThemes.Get;\n rpc PortalThemes.List;\n rpc PortalThemes.Put;\n rpc SignInSettings.Get;\n rpc SignInSettings.Update;\n }\n }\n capability roles.manage {\n administrative;\n title \"Manage roles and access\";\n description \"Change roles, who has them, what each person may do, and roles given by OIDC sign-in.\";\n grants \"Can give any person or app access to anything in this Trellis.\";\n allows {\n rpc Capabilities.List;\n rpc CapabilityGrants.Grant;\n rpc CapabilityGrants.List;\n rpc CapabilityGrants.Revoke;\n rpc OIDCRoleMappings.Delete;\n rpc OIDCRoleMappings.List;\n rpc OIDCRoleMappings.Put;\n rpc Principals.EffectiveAccess;\n rpc RoleAssignments.Assign;\n rpc RoleAssignments.List;\n rpc RoleAssignments.Revoke;\n rpc Roles.Delete;\n rpc Roles.Get;\n rpc Roles.List;\n rpc Roles.Put;\n }\n }\n capability security.observe {\n title \"Watch security activity\";\n description \"Follow sign-ins, sign-outs, and key changes as they happen.\";\n grants \"Can see security activity live.\";\n allows {\n subscribe event AuthorizationSessions.Retired;\n subscribe event Connections.Closed;\n subscribe event Connections.Kicked;\n subscribe event Connections.Opened;\n subscribe event Issuers.Revoked;\n subscribe event Issuers.Rotated;\n }\n }\n capability serviceUpdates.submit {\n title \"Submit its own updates\";\n description \"A service submits a new version of itself for installation.\";\n grants \"The service can ask to be updated; new access still needs an administrator.\";\n allows {\n rpc ServiceUpdates.Status;\n rpc ServiceUpdates.Submit;\n }\n }\n capability sessions.read {\n title \"See your sign-ins\";\n description \"See when and where you signed in.\";\n grants \"Can see your sign-in history.\";\n allows {\n rpc Sessions.List;\n }\n }\n capability sessions.revoke {\n title \"Sign out your sessions\";\n description \"End one of your sign-ins.\";\n grants \"Signs out apps that use that sign-in.\";\n allows {\n rpc Sessions.Revoke;\n }\n }\n capability users.manage {\n administrative;\n title \"Manage sign-in and services\";\n description \"Change sign-in providers, services, devices, storage, sessions, and connections.\";\n grants \"Can change any service or device in this Trellis and sign anyone out.\";\n allows {\n operation Deployments.Export;\n operation Deployments.Import;\n rpc AuthorizationSessions.List;\n rpc AuthorizationSessions.Revoke;\n rpc Connections.Kick;\n rpc Connections.List;\n rpc Deployments.Apply;\n rpc Deployments.Create;\n rpc Deployments.Disable;\n rpc Deployments.Enable;\n rpc Deployments.Exports.Download;\n rpc Deployments.Get;\n rpc Deployments.List;\n rpc Deployments.Remove;\n rpc Devices.Disable;\n rpc Devices.Enable;\n rpc Devices.List;\n rpc Devices.Provision;\n rpc Devices.Remove;\n rpc Devices.Reviews.Decide;\n rpc Devices.Reviews.Get;\n rpc Devices.Reviews.List;\n rpc EnrollmentSecrets.Issue;\n rpc EnrollmentSecrets.List;\n rpc EnrollmentSecrets.Revoke;\n rpc EnrollmentSecrets.Update;\n rpc InstancePolicy.Get;\n rpc InstancePolicy.Set;\n rpc OIDCProviders.Delete;\n rpc OIDCProviders.Disable;\n rpc OIDCProviders.Enable;\n rpc OIDCProviders.Get;\n rpc OIDCProviders.List;\n rpc OIDCProviders.Put;\n rpc PackageRegistries.List;\n rpc PackageRegistries.Put;\n rpc PackageRegistries.Remove;\n rpc Packages.Pull;\n rpc Packages.Resolve;\n rpc Resources.Get;\n rpc Resources.List;\n rpc Resources.Remove;\n rpc ServiceClaims.Create;\n rpc ServiceClaims.List;\n rpc ServiceClaims.Remove;\n rpc ServiceInstances.Disable;\n rpc ServiceInstances.Enable;\n rpc ServiceInstances.List;\n rpc ServiceInstances.Provision;\n rpc ServiceInstances.Remove;\n rpc ServiceUpdates.Decide;\n rpc ServiceUpdates.Get;\n rpc ServiceUpdates.List;\n rpc Webhooks.Update;\n }\n }\n capability users.read {\n title \"See users\";\n description \"Find users and see their names, emails, and photos.\";\n grants \"Can see everyone's name, email, and photo.\";\n allows {\n rpc Users.Get;\n rpc Users.List;\n }\n }\n group account {\n title \"Your account\";\n description \"See and manage your profile, password, sign-ins, linked identities, connected apps, and devices.\";\n grants \"Can read and change your account and sign you out.\";\n capability account.changePassword;\n capability account.edit;\n capability account.linkDevice;\n capability account.read;\n capability config.readApp;\n capability delegations.read;\n capability delegations.revoke;\n capability identities.manage;\n capability identities.read;\n capability sessions.read;\n capability sessions.revoke;\n }\n group administration {\n title \"Administer this Trellis\";\n description \"Manage users, roles, apps, APIs, and who administers this Trellis.\";\n grants \"Full control of this Trellis installation.\";\n capability accounts.manage;\n capability apis.accept;\n capability apis.forceReplace;\n capability clients.manage;\n capability config.manage;\n capability config.manageSecrets;\n capability config.read;\n capability platform.manage;\n capability roles.manage;\n capability users.manage;\n }\n }\n}\n\napi core@v1 {\n title \"Trellis Core\";\n description \"Trellis runtime and resource administration RPCs.\";\n version \"1.0.0\";\n error UnexpectedError;\n error ValidationError;\n /// Destroy a resource and what it stores.\n rpc Resources.Destroy {\n input ResourcesDestroyRequest;\n output ResourcesDestroyResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// Get one resource and how it is used.\n rpc Resources.Inspect {\n input ResourcesInspectRequest;\n output ResourcesInspectResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// List the resources the caller can see.\n rpc Resources.Query {\n input ResourcesQueryRequest;\n output ResourcesQueryResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Whether this Trellis is up, and the APIs it serves.\n rpc Surface.Status {\n input TrellisSurfaceStatusRequest;\n output TrellisSurfaceStatusResponse;\n errors [UnexpectedError, ValidationError];\n }\n capabilities {\n capability authority.read {\n title \"See runtime status\";\n description \"Check which Trellis features are ready.\";\n grants \"Can see runtime readiness.\";\n allows {\n rpc Surface.Status;\n }\n }\n capability resources.destroy {\n title \"Delete managed resources\";\n description \"Permanently delete Trellis-managed storage.\";\n grants \"Permanently deletes data.\";\n allows {\n rpc Resources.Destroy;\n }\n }\n capability resources.read {\n title \"See managed resources\";\n description \"See Trellis-managed storage and its status.\";\n grants \"Can see resource settings and history.\";\n allows {\n rpc Resources.Inspect;\n rpc Resources.Query;\n }\n }\n }\n}\n\napi events@v1 {\n title \"Trellis Events\";\n description \"Event observability, managed Consumer diagnostics, and dead-letter lifecycle.\";\n version \"1.0.0\";\n error Conflict(EventsErrorData);\n error Forbidden(EventsErrorData);\n error NotFoundError;\n error Unavailable(EventsErrorData);\n error UnexpectedError;\n error UnreplayableOriginal(EventsErrorData);\n error ValidationError;\n /// Follow published events and delivery changes as they happen.\n live Watch {\n input EventsWatchRequest;\n event EventsWatchFrame;\n }\n /// Get one event consumer and how far behind it is.\n rpc Consumers.Inspect {\n input EventsConsumersInspectRequest;\n output EventsConsumersInspectResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// List event consumers and their delivery status.\n rpc Consumers.Query {\n input EventsConsumersQueryRequest;\n output EventsConsumersQueryResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// A service reports how delivering an event to it went.\n rpc Consumers.ReportDelivery {\n input EventsConsumersReportDeliveryRequest;\n output EventsConsumersReportDeliveryResponse;\n errors [Conflict, Forbidden, NotFoundError, Unavailable, ValidationError];\n }\n /// Discard a failed delivery.\n rpc DeadLetters.Dismiss {\n input EventsDeadLettersDismissRequest;\n output EventsDeadLettersDismissResponse;\n errors [Conflict, Forbidden, NotFoundError, Unavailable, ValidationError];\n }\n /// Get one failed delivery, its data and the error.\n rpc DeadLetters.Inspect {\n input EventsDeadLettersInspectRequest;\n output EventsDeadLettersInspectResponse;\n errors [Forbidden, NotFoundError, Unavailable, ValidationError];\n }\n /// List events that failed to reach a service.\n rpc DeadLetters.Query {\n input EventsDeadLettersQueryRequest;\n output EventsDeadLettersQueryResponse;\n errors [Forbidden, UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Send a failed event to its service again.\n rpc DeadLetters.Replay {\n input EventsDeadLettersReplayRequest;\n output EventsDeadLettersReplayResponse;\n errors [Conflict, Forbidden, NotFoundError, Unavailable, UnreplayableOriginal, ValidationError];\n }\n /// Problems with event storage and processing, and whether history is complete.\n rpc Diagnostics {\n input EventsDiagnosticsRequest;\n output EventsDiagnosticsResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// Get one published event and its data.\n rpc Inspect {\n input EventsInspectRequest;\n output EventsInspectResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Event volume and delivery speed over a time window.\n rpc Metrics {\n input EventsMetricsRequest;\n output EventsMetricsResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// List published events, newest first, optionally by type, sender or text.\n rpc Query {\n input EventsQueryRequest;\n output EventsQueryResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n capabilities {\n capability consumers.inspect {\n title \"See event consumers\";\n description \"See which services receive events and how delivery is going.\";\n grants \"Can see delivery status.\";\n allows {\n rpc Consumers.Inspect;\n rpc Consumers.Query;\n }\n }\n capability deadLetters.dismiss {\n title \"Dismiss failed deliveries\";\n description \"Clear a failed delivery from the list.\";\n grants \"Removes it from follow-up.\";\n allows {\n rpc DeadLetters.Dismiss;\n }\n }\n capability deadLetters.inspect {\n title \"See failed deliveries\";\n description \"See events that services could not process.\";\n grants \"Can see failed event data and errors.\";\n allows {\n rpc DeadLetters.Inspect;\n rpc DeadLetters.Query;\n }\n }\n capability deadLetters.replay {\n title \"Retry failed deliveries\";\n description \"Send a failed event to its service again.\";\n grants \"The service may repeat its work.\";\n allows {\n rpc DeadLetters.Replay;\n }\n }\n capability diagnostics.read {\n title \"See event diagnostics\";\n description \"See problems with event storage and processing.\";\n grants \"Can see event system errors.\";\n allows {\n rpc Diagnostics;\n }\n }\n capability events.inspect {\n title \"Open events\";\n description \"See an event's full contents and delivery.\";\n grants \"Can see event data.\";\n allows {\n rpc Inspect;\n }\n }\n capability events.observe {\n title \"Watch events live\";\n description \"Follow new events as they happen.\";\n grants \"Can see events live.\";\n allows {\n live Watch;\n }\n }\n capability events.query {\n title \"Search events\";\n description \"Find events in the history.\";\n grants \"Can see event summaries.\";\n allows {\n rpc Query;\n }\n }\n capability metrics.read {\n title \"See event metrics\";\n description \"See event volume and delivery speed.\";\n grants \"Can see event metrics.\";\n allows {\n rpc Metrics;\n }\n }\n capability replays.process {\n title \"Process own event replays\";\n description \"Let a service finish replays of its own events.\";\n grants \"The service can complete its own replays.\";\n allows {\n rpc Consumers.ReportDelivery;\n rpc DeadLetters.Inspect;\n }\n }\n group operator {\n title \"Operate events\";\n description \"Watch events and consumers, and replay or dismiss failed deliveries.\";\n grants \"Can see event data and replay or discard failed deliveries.\";\n capability consumers.inspect;\n capability deadLetters.dismiss;\n capability deadLetters.inspect;\n capability deadLetters.replay;\n capability diagnostics.read;\n capability events.inspect;\n capability events.observe;\n capability events.query;\n capability metrics.read;\n }\n }\n}\n\napi health@v1 {\n title \"Trellis Health\";\n description \"Trellis-managed participant health projection and operational history.\";\n version \"1.0.0\";\n error NotFoundError(HealthNotFoundErrorData);\n error UnexpectedError;\n error ValidationError;\n /// A service or device reports its health and checks.\n event Heartbeat {\n payload HealthHeartbeatSample;\n }\n /// A service or device became healthy, degraded or unreachable.\n event StatusChanged {\n payload HealthStatusChangedEvent;\n }\n /// Follow health changes as they happen.\n live Watch {\n input HealthWatchRequest;\n event HealthWatchFrame;\n }\n /// Get one service or device's latest health and checks.\n rpc Inspect {\n input HealthInspectRequest;\n output HealthInspectResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Health check results over a time window.\n rpc Metrics {\n input HealthMetricsRequest;\n output HealthMetricsResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// List services and devices by health.\n rpc Query {\n input HealthQueryRequest;\n output HealthQueryResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// How much disk each kind of Trellis data uses and how old it is, and how\n /// close JetStream is to its limits.\n rpc Storage {\n input HealthStorageRequest;\n output HealthStorageResponse;\n errors [UnexpectedError];\n }\n /// How many services and devices are healthy, degraded or down.\n rpc Summary {\n input HealthSummaryRequest;\n output HealthSummaryResponse;\n errors [UnexpectedError, ValidationError];\n }\n capabilities {\n capability health.inspect {\n title \"See health details\";\n description \"See a service's or device's health history.\";\n grants \"Can see health details.\";\n allows {\n rpc Inspect;\n }\n }\n capability health.observe {\n title \"Watch health live\";\n description \"Follow health changes as they happen.\";\n grants \"Can see health live.\";\n allows {\n live Watch;\n }\n }\n capability health.query {\n title \"Search health\";\n description \"Find services and devices by health.\";\n grants \"Can see health summaries.\";\n allows {\n rpc Query;\n }\n }\n capability health.report {\n title \"Report own health\";\n description \"Let a service or device report its own health.\";\n grants \"Records health for that service or device only.\";\n allows {\n publish event Heartbeat;\n }\n }\n capability metrics.read {\n title \"See health metrics\";\n description \"See health measurements over time.\";\n grants \"Can see health metrics.\";\n allows {\n rpc Metrics;\n rpc Storage;\n }\n }\n capability status.observe {\n title \"Get health alerts\";\n description \"Be told when something becomes healthy or unhealthy.\";\n grants \"Receives health changes.\";\n allows {\n subscribe event StatusChanged;\n }\n }\n capability summary.read {\n title \"See health overview\";\n description \"See how many things are healthy or not.\";\n grants \"Can see overall health.\";\n allows {\n rpc Summary;\n }\n }\n group monitor {\n title \"Monitor health\";\n description \"See the health of services and devices and get alerts.\";\n grants \"Can see health data.\";\n capability health.inspect;\n capability health.observe;\n capability health.query;\n capability metrics.read;\n capability status.observe;\n capability summary.read;\n }\n }\n}\n\napi jobs@v1 {\n title \"Trellis Jobs\";\n description \"Trellis-managed background job administration API.\";\n version \"1.0.0\";\n error NotFoundError(JobsNotFoundErrorData);\n error UnexpectedError;\n error ValidationError;\n /// Follow job changes as they happen.\n live Watch {\n input JobsWatchRequest;\n event JobsWatchFrame;\n }\n /// Cancel a job that hasn't finished.\n rpc Cancel {\n input JobsCancelRequest;\n output JobsCancelResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Discard a job that failed for good.\n rpc DismissDLQ {\n input JobsDismissDLQRequest;\n output JobsDismissDLQResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Find a job by its key.\n rpc GetKey {\n input JobsGetKeyRequest;\n output JobsGetKeyResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// What happened to one job, attempt by attempt.\n rpc History {\n input JobsHistoryRequest;\n output JobsHistoryResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// Get one job and its current state.\n rpc Inspect {\n input JobsInspectRequest;\n output JobsInspectResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// List jobs that failed for good.\n rpc ListDLQ {\n input JobsListDLQRequest;\n output JobsListDLQResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// List the services that run jobs, and their workers.\n rpc ListServices {\n input JobsListServicesRequest;\n output JobsListServicesResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Job volume, duration and failures over a time window.\n rpc Metrics {\n input JobsMetricsRequest;\n output JobsMetricsResponse;\n errors [UnexpectedError, ValidationError];\n }\n /// List jobs, optionally by service, kind or state.\n rpc Query {\n input JobsQueryRequest;\n output JobsQueryResponse;\n errors [UnexpectedError, ValidationError];\n pagination cursor;\n }\n /// Run a job that failed for good again.\n rpc ReplayDLQ {\n input JobsReplayDLQRequest;\n output JobsReplayDLQResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Retry a failed job now.\n rpc Retry {\n input JobsRetryRequest;\n output JobsRetryResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// How many jobs are waiting, running, done or failed.\n rpc Summary {\n input JobsSummaryRequest;\n output JobsSummaryResponse;\n errors [UnexpectedError, ValidationError];\n }\n capabilities {\n capability deadLetters.dismiss {\n title \"Dismiss failed jobs\";\n description \"Clear a failed job from the list.\";\n grants \"Removes it from follow-up.\";\n allows {\n rpc DismissDLQ;\n }\n }\n capability deadLetters.read {\n title \"See failed jobs\";\n description \"See jobs that failed for good.\";\n grants \"Can see failed jobs.\";\n allows {\n rpc ListDLQ;\n }\n }\n capability deadLetters.replay {\n title \"Rerun failed jobs\";\n description \"Send a failed job back to run again.\";\n grants \"Work may run again and repeat its effects.\";\n allows {\n rpc ReplayDLQ;\n }\n }\n capability history.read {\n title \"Read own job history\";\n description \"Let a service read the history of its own jobs.\";\n grants \"Only that service's jobs are returned.\";\n allows {\n rpc History;\n }\n }\n capability jobs.cancel {\n title \"Cancel jobs\";\n description \"Stop a waiting or running job.\";\n grants \"Can stop work.\";\n allows {\n rpc Cancel;\n }\n }\n capability jobs.findByKey {\n title \"Find jobs by key\";\n description \"Look up a job by its key.\";\n grants \"Can find jobs by key.\";\n allows {\n rpc GetKey;\n }\n }\n capability jobs.inspect {\n title \"Open jobs\";\n description \"See a job's input, result, and history.\";\n grants \"Can see job data.\";\n allows {\n rpc Inspect;\n }\n }\n capability jobs.observe {\n title \"Watch jobs live\";\n description \"Follow job changes as they happen.\";\n grants \"Can see jobs live.\";\n allows {\n live Watch;\n }\n }\n capability jobs.query {\n title \"Search jobs\";\n description \"Find background jobs.\";\n grants \"Can see job summaries.\";\n allows {\n rpc Query;\n }\n }\n capability jobs.retry {\n title \"Retry jobs\";\n description \"Run a job again.\";\n grants \"Work may run again.\";\n allows {\n rpc Retry;\n }\n }\n capability metrics.read {\n title \"See job metrics\";\n description \"See job speed and throughput.\";\n grants \"Can see job metrics.\";\n allows {\n rpc Metrics;\n }\n }\n capability services.list {\n title \"See job services\";\n description \"See which services run jobs.\";\n grants \"Can see services and their queues.\";\n allows {\n rpc ListServices;\n }\n }\n capability summary.read {\n title \"See job overview\";\n description \"See how many jobs are waiting, running, or failed.\";\n grants \"Can see job counts.\";\n allows {\n rpc Summary;\n }\n }\n group operator {\n title \"Operate jobs\";\n description \"Watch jobs and workers, and cancel, retry, replay, or dismiss jobs.\";\n grants \"Can see job data and change how jobs run.\";\n capability deadLetters.dismiss;\n capability deadLetters.read;\n capability deadLetters.replay;\n capability history.read;\n capability jobs.cancel;\n capability jobs.findByKey;\n capability jobs.inspect;\n capability jobs.observe;\n capability jobs.query;\n capability jobs.retry;\n capability metrics.read;\n capability services.list;\n capability summary.read;\n }\n }\n}\n\napi state@v1 {\n title \"Trellis State\";\n description \"Trellis-managed single-value State for user bindings and service/device principals.\";\n version \"1.0.0\";\n error Conflict(StateConflict);\n error CorruptRepresentation(StateRepresentationError);\n error RegistrationConflict(StateRegistrationConflict);\n error ResourceExhausted(StateResourceExhausted);\n error UnsupportedRepresentation(StateRepresentationError);\n /// Follow changes to stored values as they happen.\n live Watch {\n input StateGetRequest;\n event StateGetResponse;\n }\n /// Delete a stored value.\n rpc Delete {\n input StateDeleteRequest;\n output StateDeleteResponse;\n errors [Conflict];\n }\n /// Read a stored value.\n rpc Get {\n input StateGetRequest;\n output StateGetResponse;\n errors [CorruptRepresentation, UnsupportedRepresentation];\n }\n /// Store a value, optionally only if it hasn't changed since you read it.\n rpc Put {\n input StatePutRequest;\n output StatePutResponse;\n errors [Conflict, CorruptRepresentation, ResourceExhausted, UnsupportedRepresentation];\n }\n /// Register the state a program keeps, before using it.\n rpc Register {\n input StateRegisterRequest;\n output StateRegisterResponse;\n errors [RegistrationConflict];\n }\n capabilities {\n capability values.delete {\n title \"Delete saved data\";\n description \"Delete data in its space.\";\n grants \"Can remove saved data.\";\n allows {\n rpc Delete;\n }\n }\n capability values.read {\n title \"Read saved data\";\n description \"Read data saved in its space.\";\n grants \"Can see saved data.\";\n allows {\n live Watch;\n rpc Get;\n }\n }\n capability values.write {\n title \"Save data\";\n description \"Create or replace data in its space.\";\n grants \"Can change saved data.\";\n allows {\n rpc Put;\n rpc Register;\n }\n }\n }\n}\n\napi webhooks@v1 {\n title \"Trellis Webhooks\";\n description \"Webhook endpoints services declare, and the requests Trellis received for them.\";\n version \"1.0.0\";\n error NotFoundError;\n error Unavailable;\n error UnexpectedError;\n error ValidationError;\n /// A request to an endpoint passed verification.\n event Received {\n payload WebhookDelivery;\n params [service, endpoint];\n }\n /// Get one request record with its headers and body.\n rpc Attempts.Inspect {\n input WebhooksAttemptsInspectRequest;\n output WebhooksAttemptsInspectResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// List request records, newest first, without bodies.\n rpc Attempts.Query {\n input WebhooksAttemptsQueryRequest;\n output WebhooksAttemptsQueryResponse;\n errors [NotFoundError, UnexpectedError, ValidationError];\n }\n /// Verify a stored request again with the current verifiers and secrets.\n rpc Attempts.Reverify {\n input WebhooksAttemptsReverifyRequest;\n output WebhooksAttemptsReverifyResponse;\n errors [NotFoundError, Unavailable, UnexpectedError, ValidationError];\n }\n /// What the service's decide handler receives. Trellis never serves it.\n rpc Decide {\n input WebhookDecideRequest;\n output WebhookDecision;\n errors [UnexpectedError, ValidationError];\n }\n /// List webhook endpoints, their URLs, and recent requests.\n rpc Endpoints.List {\n input WebhooksEndpointsListRequest;\n output WebhooksEndpointsListResponse;\n errors [UnexpectedError, ValidationError];\n }\n capabilities {\n capability attempts.inspect {\n title \"Open webhook requests\";\n description \"See request bodies and header values.\";\n grants \"Can see webhook data, which may hold personal or payment details.\";\n allows {\n rpc Attempts.Inspect;\n }\n }\n capability attempts.query {\n title \"See webhook requests\";\n description \"List webhook endpoints and the requests they received, without bodies.\";\n grants \"Can see webhook endpoints and request outcomes.\";\n allows {\n rpc Attempts.Query;\n rpc Endpoints.List;\n }\n }\n capability attempts.reverify {\n title \"Verify webhook requests again\";\n description \"Run a stored request through verification again.\";\n grants \"A request may reach its service after all.\";\n allows {\n rpc Attempts.Reverify;\n }\n }\n }\n}\n\nservice eventsRuntime {\n implements events;\n use auth {\n required capability bindings.readEvents;\n }\n}\n\nservice healthRuntime {\n implements health;\n}\n\nservice jobsRuntime {\n implements jobs;\n use auth {\n required capability bindings.readJobs;\n }\n}\n\nservice platform {\n implements auth;\n implements core;\n implements state;\n implements webhooks;\n kv connections {\n title \"Connections\";\n description \"Operational attachment presence; policy and enforcement remain in Auth's durable store.\";\n schema AuthAttachment;\n version 1;\n history 1;\n ttl 120000ms;\n desired_max_value 16384B;\n }\n}\n\nagent cli {\n use auth {\n capability account.changePassword;\n capability account.edit;\n capability account.read;\n capability accounts.manage;\n capability apis.accept;\n capability apis.forceReplace;\n capability clients.manage;\n capability config.manage;\n capability config.manageSecrets;\n capability config.read;\n capability delegations.read;\n capability delegations.revoke;\n capability diagnostics.read;\n capability identities.manage;\n capability identities.read;\n capability platform.manage;\n capability roles.manage;\n capability sessions.read;\n capability sessions.revoke;\n capability users.manage;\n capability users.read;\n }\n use core {\n capability resources.destroy;\n capability resources.read;\n }\n use events {\n capability consumers.inspect;\n capability deadLetters.dismiss;\n capability deadLetters.inspect;\n capability deadLetters.replay;\n capability events.inspect;\n capability events.query;\n }\n use health {\n capability health.inspect;\n capability health.observe;\n capability health.query;\n capability metrics.read;\n }\n use jobs {\n capability jobs.query;\n }\n use state {\n capability values.delete;\n }\n use webhooks {\n capability attempts.inspect;\n capability attempts.query;\n capability attempts.reverify;\n }\n}\n\napp console {\n use auth {\n capability account.changePassword;\n capability account.edit;\n capability account.read;\n capability accounts.manage;\n capability apis.accept;\n capability apis.forceReplace;\n capability clients.manage;\n capability config.manage;\n capability config.manageSecrets;\n capability config.read;\n capability delegations.read;\n capability delegations.revoke;\n capability diagnostics.read;\n capability identities.manage;\n capability identities.read;\n capability platform.manage;\n capability roles.manage;\n capability security.observe;\n capability sessions.read;\n capability sessions.revoke;\n capability users.manage;\n capability users.read;\n }\n use core {\n capability resources.destroy;\n capability resources.read;\n }\n use events {\n capability consumers.inspect;\n capability deadLetters.dismiss;\n capability deadLetters.inspect;\n capability deadLetters.replay;\n capability diagnostics.read;\n capability events.inspect;\n capability events.observe;\n capability events.query;\n capability metrics.read;\n }\n use health {\n capability health.inspect;\n capability health.observe;\n capability health.query;\n capability metrics.read;\n capability summary.read;\n }\n use jobs {\n capability deadLetters.dismiss;\n capability deadLetters.read;\n capability deadLetters.replay;\n capability jobs.cancel;\n capability jobs.findByKey;\n capability jobs.inspect;\n capability jobs.observe;\n capability jobs.query;\n capability jobs.retry;\n capability metrics.read;\n capability services.list;\n capability summary.read;\n }\n use state {\n capability values.delete;\n capability values.read;\n capability values.write;\n }\n use webhooks {\n capability attempts.inspect;\n capability attempts.query;\n capability attempts.reverify;\n }\n}\n\n",
|
|
9
|
-
"version": "0.100.0-rc.
|
|
9
|
+
"version": "0.100.0-rc.60"
|
|
10
10
|
}],
|
|
11
11
|
"rootDigest": "S-KQhr769N2ATfSHw1c0C32DdOl42iYQCUHHUh5edtk",
|
|
12
12
|
"rootPackage": "trellis"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oatscenter/trellis-internal-sdk",
|
|
3
|
-
"version": "0.100.0-rc.
|
|
3
|
+
"version": "0.100.0-rc.60",
|
|
4
4
|
"private": true,
|
|
5
5
|
"trellisGenerated": true,
|
|
6
6
|
"description": "Generated Trellis APIs and participants.",
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
}
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@oatscenter/trellis": "^0.100.0-rc.
|
|
72
|
+
"@oatscenter/trellis": "^0.100.0-rc.60"
|
|
73
73
|
}
|
|
74
74
|
}
|
package/kv.js
CHANGED
|
@@ -6,6 +6,9 @@ import { resourceExhausted, } from "./errors/ResourceExhaustedError.js";
|
|
|
6
6
|
import { decodeSubject, escapeKvKey } from "./helpers.js";
|
|
7
7
|
import { recordCatalogDuration } from "./telemetry/metrics.js";
|
|
8
8
|
const KV_MAGIC = new Uint8Array([0x54, 0x52, 0x4b, 0x56]);
|
|
9
|
+
// TRKV envelope format byte frozen at 1 for 0.100.0; changes require human
|
|
10
|
+
// review and approval, plus post-0.100.0 auto-migration/compatibility unless
|
|
11
|
+
// breakage is approved.
|
|
9
12
|
const KV_ENVELOPE_FORMAT = 1;
|
|
10
13
|
const KV_ENVELOPE_HEADER_BYTES = 9;
|
|
11
14
|
const textEncoder = new TextEncoder();
|
package/package.json
CHANGED
|
@@ -69,9 +69,9 @@
|
|
|
69
69
|
"zod": "^4.3.6",
|
|
70
70
|
"ulid": "^3.0.2",
|
|
71
71
|
"uqr": "0.1.3",
|
|
72
|
-
"@oatscenter/result": "0.100.0-rc.
|
|
72
|
+
"@oatscenter/result": "0.100.0-rc.60"
|
|
73
73
|
},
|
|
74
|
-
"version": "0.100.0-rc.
|
|
74
|
+
"version": "0.100.0-rc.60",
|
|
75
75
|
"type": "module",
|
|
76
76
|
"license": "Apache-2.0",
|
|
77
77
|
"publishConfig": {
|
|
@@ -49,6 +49,11 @@ type StoredRecord = {
|
|
|
49
49
|
};
|
|
50
50
|
/** Lossless transfer metadata projected from the shared Rust record. @internal */
|
|
51
51
|
export type PersistedOperationUpload = Omit<NonNullable<StoredRecord["transfer"]>, "grant">;
|
|
52
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Private repository adapter. TRKV framing and carrier ownership remain in KV.
|
|
54
|
+
* Version 1 is frozen for the first release (`0.100.0`); changes require human
|
|
55
|
+
* review and approval, plus post-`0.100.0` automatic migration unless breakage
|
|
56
|
+
* is explicitly approved.
|
|
57
|
+
*/
|
|
53
58
|
export declare const operationRecordRepresentation: KvRepresentation<DurableOperationRecord>;
|
|
54
59
|
export {};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { normalizeOperationRecordWasm, } from "../../auth/protocol_wasm.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Private repository adapter. TRKV framing and carrier ownership remain in KV.
|
|
4
|
+
* Version 1 is frozen for the first release (`0.100.0`); changes require human
|
|
5
|
+
* review and approval, plus post-`0.100.0` automatic migration unless breakage
|
|
6
|
+
* is explicitly approved.
|
|
7
|
+
*/
|
|
3
8
|
export const operationRecordRepresentation = {
|
|
4
|
-
version:
|
|
9
|
+
version: 1,
|
|
5
10
|
migrations: {},
|
|
6
11
|
codec: {
|
|
7
12
|
encode(value) {
|