diff --git a/.vacuum.yaml b/.vacuum.yaml index 4d39d20..c5b03df 100644 --- a/.vacuum.yaml +++ b/.vacuum.yaml @@ -18,3 +18,26 @@ rules: # Error response descriptions (e.g. "Not found", "Internal server error") repeat # across endpoints by design — they describe the same error type consistently. description-duplication: false + + # Every operation must declare the crec:* permission(s) it requires, or + # explicitly declare x-permissions: [] for an intentional exemption + # (see cmd/gen-permissions exemptRoutes). The authoritative, exemption-aware + # gate is `task lint:permissions` (cmd/gen-permissions) — this rule just + # surfaces the same problem earlier, in `vacuum lint` / the vacuum language + # server. + x-permissions-required: + description: Every operation must declare the crec:* permission(s) it requires, or explicitly declare x-permissions:[] for an intentional exemption (see cmd/gen-permissions exemptRoutes) + message: "operation is missing x-permissions: [crec::, ...] (or x-permissions: [] for an intentional exemption)" + severity: error + given: $.paths[*][*] + then: + field: x-permissions + function: schema + functionOptions: + forceValidation: true + schema: + type: array + minItems: 0 + items: + type: string + pattern: "^crec:[^:]+:[^:]+(:[^:]+)?$" diff --git a/Taskfile.yaml b/Taskfile.yaml index 31639b7..afecaaa 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -27,6 +27,6 @@ tasks: validate-openapi: silent: true - desc: "Validate openapi spec" + desc: "Validate openapi spec (includes x-permissions check via vacuum ruleset)" cmds: - vacuum lint --ruleset .vacuum.yaml ./api/openapi.yaml diff --git a/api/openapi.yaml b/api/openapi.yaml index ad9c061..14a327a 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -34,6 +34,7 @@ paths: tags: - Health operationId: getHealthCheck + x-permissions: [] summary: Health check endpoint responses: "200": @@ -48,10 +49,13 @@ paths: tags: - Networks operationId: listNetworks + x-permissions: [crec:network:read] summary: Retrieves available networks. responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -71,6 +75,7 @@ paths: tags: - Wallets operationId: createWallet + x-permissions: [crec:wallet:write] summary: Creates a new wallet. requestBody: description: Wallet creation parameters. @@ -83,6 +88,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "201": description: Wallet created successfully content: @@ -115,6 +122,7 @@ paths: tags: - Wallets operationId: listWallets + x-permissions: [crec:wallet:read] summary: Retrieves wallets for the organization. description: | Returns wallets for the organization. Archived wallets are excluded by default. @@ -178,6 +186,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -197,6 +207,7 @@ paths: tags: - Wallets operationId: getWallet + x-permissions: [crec:wallet:read] summary: Retrieves a specific wallet by ID. parameters: - in: path @@ -209,6 +220,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Wallet found content: @@ -234,6 +247,7 @@ paths: tags: - Wallets operationId: updateWallet + x-permissions: [crec:wallet:write, crec:wallet:archive:write] summary: Updates a wallet name. parameters: - in: path @@ -254,6 +268,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Wallet updated successfully content: @@ -295,6 +311,7 @@ paths: tags: - Channels operationId: createChannel + x-permissions: [crec:channel:write] summary: Creates a new channel. requestBody: description: Channel creation parameters. @@ -307,6 +324,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "201": description: Channel created successfully content: @@ -339,6 +358,7 @@ paths: tags: - Channels operationId: listChannels + x-permissions: [crec:channel:read] summary: Retrieves channels for the organization. description: | Returns channels for the organization. Archived channels are excluded by default. @@ -377,6 +397,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -396,6 +418,7 @@ paths: tags: - Channels operationId: getChannel + x-permissions: [crec:channel:read] summary: Retrieves a specific channel by ID. parameters: - in: path @@ -408,6 +431,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Channel found content: @@ -433,6 +458,7 @@ paths: tags: - Channels operationId: updateChannel + x-permissions: [crec:channel:write, crec:channel:archive:write] summary: Updates a channel. description: | Updates channel properties. Can be used to update the name, description, or to transition the channel status (e.g., to archived). @@ -456,6 +482,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Channel updated successfully content: @@ -497,6 +525,7 @@ paths: tags: - Queries operationId: createQuery + x-permissions: [crec:query:write] summary: Creates a chain query under a channel. description: | Creates a channel-scoped Chain Query Request. New queries are rejected for archived channels. @@ -552,6 +581,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "202": description: Query accepted for execution. content: @@ -598,6 +629,7 @@ paths: tags: - Queries operationId: listQueries + x-permissions: [crec:query:read] summary: Lists chain queries for a channel. description: | Returns chain query records for the channel. @@ -659,6 +691,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -776,6 +810,7 @@ paths: tags: - Queries operationId: getQuery + x-permissions: [crec:query:read] summary: Retrieves a specific chain query by ID. description: | Returns request fields, status timestamps, expiration, and terminal verifiable fields from the query resource. @@ -796,6 +831,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Query found content: @@ -843,6 +880,7 @@ paths: tags: - Watchers operationId: createWatcher + x-permissions: [crec:watcher:write] summary: Creates a watcher in a channel. parameters: - in: path @@ -863,6 +901,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "201": description: Watcher created successfully content: @@ -902,6 +942,7 @@ paths: tags: - Watchers operationId: listWatchers + x-permissions: [crec:watcher:read] summary: Retrieves watchers for a channel. description: | Returns watchers for the specified channel. Archived watchers are excluded by default. @@ -977,6 +1018,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -1003,6 +1046,7 @@ paths: tags: - Watchers operationId: getWatcher + x-permissions: [crec:watcher:read] summary: Retrieves a specific watcher by ID. parameters: - in: path @@ -1022,6 +1066,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Watcher found content: @@ -1047,6 +1093,7 @@ paths: tags: - Watchers operationId: updateWatcher + x-permissions: [crec:watcher:write, crec:watcher:archive:write] summary: Updates a watcher. description: | Updates watcher properties. Can be used to update the name or to transition the watcher status (e.g., to archived). @@ -1077,6 +1124,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Watcher updated successfully content: @@ -1125,6 +1174,7 @@ paths: tags: - Operations operationId: createOperation + x-permissions: [crec:operation:write] summary: Creates a signed operation or draft request, scoped to a channel. description: | Creates a signed or draft operation first, depending on the presence of a signature. @@ -1150,6 +1200,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "201": description: Operation created successfully content: @@ -1193,6 +1245,7 @@ paths: tags: - Operations operationId: listOperations + x-permissions: [crec:operation:read] summary: Retrieves operations for a channel. description: | Returns operation records for the channel, including audit subjects and preview snapshots when available. @@ -1283,6 +1336,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Successful operation content: @@ -1323,6 +1378,7 @@ paths: tags: - Operations operationId: getOperation + x-permissions: [crec:operation:read] summary: Gets Operation record for a specific operation. description: | Returns the operation record. @@ -1344,6 +1400,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Operation found content: @@ -1369,6 +1427,7 @@ paths: tags: - Operations operationId: finalizeOrCancelOperation + x-permissions: [crec:operation:signature:write] summary: Finalizes or cancels an operation. description: | Finalize by sending status accepted with signature and digest. @@ -1400,6 +1459,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Operation updated successfully content: @@ -1440,6 +1501,7 @@ paths: tags: - Events operationId: listChannelEvents + x-permissions: [crec:event:read] summary: Retrieves events from a channel. parameters: - in: path @@ -1467,6 +1529,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Events retrieved successfully content: @@ -1501,6 +1565,7 @@ paths: tags: - Events operationId: searchChannelEvents + x-permissions: [crec:event:read] summary: Query and search historical events from a channel. description: | Retrieves events with filtering capabilities. Use this endpoint for historical queries and searches. For real-time polling, use the /events endpoint. @@ -1650,6 +1715,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Events retrieved successfully content: @@ -1684,6 +1751,7 @@ paths: tags: - Events operationId: getChannelEvent + x-permissions: [crec:event:read] summary: Retrieves a specific event by ID from a channel. parameters: - in: path @@ -1703,6 +1771,8 @@ paths: responses: "401": $ref: "#/components/responses/OrganizationNotFound" + "403": + $ref: "#/components/responses/PermissionDenied" "200": description: Event found content: @@ -1746,6 +1816,15 @@ components: schema: $ref: "#/components/schemas/ApplicationError" example: {type: "ORGANIZATION_NOT_FOUND", message: "organization not found"} + PermissionDenied: + description: > + Forbidden — the authenticated principal lacks the required CREC permission + for this operation. + content: + application/json: + schema: + $ref: "#/components/schemas/ApplicationError" + example: {type: "PERMISSION_DENIED", message: "principal lacks permission crec:wallet:write"} schemas: WalletStatus: type: string @@ -1969,6 +2048,10 @@ components: format: int64 description: Unix timestamp in seconds example: 1601528660 + Actor: + type: string + description: Resource attribution actor — ":" for a user, "api:" for an API key. + example: "usr_01J8K2M3N4P5Q6R7S8T9V0:jane@example.com" HealthCheck: description: Health check response. type: object @@ -2094,6 +2177,18 @@ components: $ref: "#/components/schemas/WalletConfiguration" created_at: $ref: "#/components/schemas/Timestamp" + updated_at: + $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. required: - wallet_id - name @@ -2310,6 +2405,7 @@ components: - "CONFLICT" - "INTERNAL_ERROR" - "ORGANIZATION_NOT_FOUND" + - "PERMISSION_DENIED" code: $ref: "#/components/schemas/ApplicationErrorCode" message: @@ -2372,10 +2468,19 @@ components: status: $ref: "#/components/schemas/ChannelStatus" created_at: - type: integer - format: int64 - description: Timestamp of when the channel was created - example: 1715698800 + $ref: "#/components/schemas/Timestamp" + updated_at: + $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. required: - channel_id - name @@ -2560,6 +2665,8 @@ components: signatures: ["0x789abc"] created_at: 1715698800 updated_at: 1715698815 + created_by: "usr_01J8K2M3N4P5Q6R7S8T9V0:jane@example.com" + updated_by: "usr_01J8K2M3N4P5Q6R7S8T9V0:jane@example.com" expires_at: 1715702400 accepted_at: 1715698800 sending_at: 1715698801 @@ -2596,6 +2703,16 @@ components: $ref: "#/components/schemas/Timestamp" updated_at: $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. expires_at: $ref: "#/components/schemas/Timestamp" accepted_at: @@ -2798,10 +2915,19 @@ components: description: ID of the channel this watcher belongs to example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" created_at: - type: integer - format: int64 - description: Timestamp of when the watcher was created - example: 1715698800 + $ref: "#/components/schemas/Timestamp" + updated_at: + $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. status: $ref: "#/components/schemas/WatcherStatus" chain_selector: @@ -2867,10 +2993,19 @@ components: description: ID of the channel this watcher belongs to example: "7c9e6679-7425-40de-944b-e07fc1f90ae7" created_at: - type: integer - format: int64 - description: Timestamp of when the watcher was created - example: 1715698800 + $ref: "#/components/schemas/Timestamp" + updated_at: + $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. status: $ref: "#/components/schemas/WatcherStatus" chain_selector: @@ -3018,6 +3153,16 @@ components: $ref: "#/components/schemas/Timestamp" updated_at: $ref: "#/components/schemas/Timestamp" + created_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that created the resource. Flat display-string form; initiator carries the structured Subject equivalent. Null when there is no attributable subject (e.g. background job). + updated_by: + nullable: true + allOf: + - $ref: "#/components/schemas/Actor" + description: Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. operation_writer_workflow_id: allOf: - $ref: "#/components/schemas/CREWorkflowId" diff --git a/client/client.gen.go b/client/client.gen.go index 7d281ee..1d8f83f 100644 --- a/client/client.gen.go +++ b/client/client.gen.go @@ -28,6 +28,7 @@ const ( INTERNALERROR ApplicationErrorType = "INTERNAL_ERROR" NOTFOUND ApplicationErrorType = "NOT_FOUND" ORGANIZATIONNOTFOUND ApplicationErrorType = "ORGANIZATION_NOT_FOUND" + PERMISSIONDENIED ApplicationErrorType = "PERMISSION_DENIED" VALIDATIONERROR ApplicationErrorType = "VALIDATION_ERROR" ) @@ -166,6 +167,9 @@ const ( WatcherStatusPending WatcherStatus = "pending" ) +// Actor Resource attribution actor — ":" for a user, "api:" for an API key. +type Actor = string + // ApplicationError Standard error response body. type ApplicationError struct { // Code Machine-readable error code for classified tenant error responses. @@ -222,8 +226,11 @@ type Channel struct { // ChannelId Unique identifier for the channel ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the channel was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // Description Description of the channel Description *string `json:"description,omitempty"` @@ -233,6 +240,12 @@ type Channel struct { // Status Status of a channel Status ChannelStatus `json:"status"` + + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` } // ChannelList Paginated list of channels. @@ -584,6 +597,9 @@ type Operation struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Flat display-string form; initiator carries the structured Subject equivalent. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Deadline Unix timestamp deadline for the operation. A value of 0 means no expiration. Deadline int64 `json:"deadline"` @@ -625,6 +641,9 @@ type Operation struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletOperationId Unique wallet operation identifier WalletOperationId string `json:"wallet_operation_id"` } @@ -734,6 +753,9 @@ type Query struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // EventHash Verifiable event hash for the terminal query result. EventHash *string `json:"event_hash,omitempty"` @@ -770,6 +792,9 @@ type Query struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // VerifiableResult Base64-encoded verifiable query result. VerifiableResult *string `json:"verifiable_result,omitempty"` @@ -960,6 +985,9 @@ type Wallet struct { // CreatedAt Unix timestamp in seconds CreatedAt *Timestamp `json:"created_at,omitempty"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Description Description of the wallet Description *string `json:"description,omitempty"` @@ -972,6 +1000,12 @@ type Wallet struct { // StatusChannelId Channel ID where wallet status events are published StatusChannelId *openapi_types.UUID `json:"status_channel_id,omitempty"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletId Unique identifier for the wallet WalletId openapi_types.UUID `json:"wallet_id"` @@ -1037,8 +1071,11 @@ type Watcher struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1058,6 +1095,12 @@ type Watcher struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1135,8 +1178,11 @@ type WatcherSummary struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1150,6 +1196,12 @@ type WatcherSummary struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1160,6 +1212,9 @@ type WatcherSummary struct { // OrganizationNotFound Standard error response body. type OrganizationNotFound = ApplicationError +// PermissionDenied Standard error response body. +type PermissionDenied = ApplicationError + // ListChannelsParams defines parameters for ListChannels. type ListChannelsParams struct { // Name Filter channels by name (case-insensitive partial match) @@ -4581,6 +4636,7 @@ type ListChannelsResponse struct { HTTPResponse *http.Response JSON200 *ChannelList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON500 *ApplicationError } @@ -4606,6 +4662,7 @@ type CreateChannelResponse struct { JSON201 *Channel JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON409 *ApplicationError JSON500 *ApplicationError } @@ -4631,6 +4688,7 @@ type GetChannelResponse struct { HTTPResponse *http.Response JSON200 *Channel JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4657,6 +4715,7 @@ type UpdateChannelResponse struct { JSON200 *Channel JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON500 *ApplicationError @@ -4684,6 +4743,7 @@ type ListChannelEventsResponse struct { JSON200 *EventList JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4710,6 +4770,7 @@ type SearchChannelEventsResponse struct { JSON200 *EventList JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4735,6 +4796,7 @@ type GetChannelEventResponse struct { HTTPResponse *http.Response JSON200 *Event JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4760,6 +4822,7 @@ type ListOperationsResponse struct { HTTPResponse *http.Response JSON200 *OperationList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4786,6 +4849,7 @@ type CreateOperationResponse struct { JSON201 *OperationResponse JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON500 *ApplicationError @@ -4812,6 +4876,7 @@ type GetOperationResponse struct { HTTPResponse *http.Response JSON200 *Operation JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4838,6 +4903,7 @@ type FinalizeOrCancelOperationResponse struct { JSON200 *Operation JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError } @@ -4863,6 +4929,7 @@ type ListQueriesResponse struct { HTTPResponse *http.Response JSON200 *QueryList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4889,6 +4956,7 @@ type CreateQueryResponse struct { JSON202 *QueryAcceptedResponse JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON429 *ApplicationError @@ -4916,6 +4984,7 @@ type GetQueryResponse struct { HTTPResponse *http.Response JSON200 *Query JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4941,6 +5010,7 @@ type ListWatchersResponse struct { HTTPResponse *http.Response JSON200 *WatcherList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -4967,6 +5037,7 @@ type CreateWatcherResponse struct { JSON201 *Watcher JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON500 *ApplicationError @@ -4993,6 +5064,7 @@ type GetWatcherResponse struct { HTTPResponse *http.Response JSON200 *Watcher JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -5020,6 +5092,7 @@ type UpdateWatcherResponse struct { JSON202 *Watcher JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON500 *ApplicationError @@ -5068,6 +5141,7 @@ type ListNetworksResponse struct { HTTPResponse *http.Response JSON200 *NetworkList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON500 *ApplicationError } @@ -5092,6 +5166,7 @@ type ListWalletsResponse struct { HTTPResponse *http.Response JSON200 *WalletList JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON500 *ApplicationError } @@ -5117,6 +5192,7 @@ type CreateWalletResponse struct { JSON201 *Wallet JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON409 *ApplicationError JSON500 *ApplicationError } @@ -5142,6 +5218,7 @@ type GetWalletResponse struct { HTTPResponse *http.Response JSON200 *Wallet JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON500 *ApplicationError } @@ -5168,6 +5245,7 @@ type UpdateWalletResponse struct { JSON200 *Wallet JSON400 *ApplicationError JSON401 *OrganizationNotFound + JSON403 *PermissionDenied JSON404 *ApplicationError JSON409 *ApplicationError JSON500 *ApplicationError @@ -5505,6 +5583,13 @@ func ParseListChannelsResponse(rsp *http.Response) (*ListChannelsResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5552,6 +5637,13 @@ func ParseCreateChannelResponse(rsp *http.Response) (*CreateChannelResponse, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5599,6 +5691,13 @@ func ParseGetChannelResponse(rsp *http.Response) (*GetChannelResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5653,6 +5752,13 @@ func ParseUpdateChannelResponse(rsp *http.Response) (*UpdateChannelResponse, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5714,6 +5820,13 @@ func ParseListChannelEventsResponse(rsp *http.Response) (*ListChannelEventsRespo } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5768,6 +5881,13 @@ func ParseSearchChannelEventsResponse(rsp *http.Response) (*SearchChannelEventsR } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5815,6 +5935,13 @@ func ParseGetChannelEventResponse(rsp *http.Response) (*GetChannelEventResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5862,6 +5989,13 @@ func ParseListOperationsResponse(rsp *http.Response) (*ListOperationsResponse, e } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5916,6 +6050,13 @@ func ParseCreateOperationResponse(rsp *http.Response) (*CreateOperationResponse, } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -5970,6 +6111,13 @@ func ParseGetOperationResponse(rsp *http.Response) (*GetOperationResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6024,6 +6172,13 @@ func ParseFinalizeOrCancelOperationResponse(rsp *http.Response) (*FinalizeOrCanc } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6071,6 +6226,13 @@ func ParseListQueriesResponse(rsp *http.Response) (*ListQueriesResponse, error) } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6125,6 +6287,13 @@ func ParseCreateQueryResponse(rsp *http.Response) (*CreateQueryResponse, error) } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6186,6 +6355,13 @@ func ParseGetQueryResponse(rsp *http.Response) (*GetQueryResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6233,6 +6409,13 @@ func ParseListWatchersResponse(rsp *http.Response) (*ListWatchersResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6287,6 +6470,13 @@ func ParseCreateWatcherResponse(rsp *http.Response) (*CreateWatcherResponse, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6341,6 +6531,13 @@ func ParseGetWatcherResponse(rsp *http.Response) (*GetWatcherResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6402,6 +6599,13 @@ func ParseUpdateWatcherResponse(rsp *http.Response) (*UpdateWatcherResponse, err } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6482,6 +6686,13 @@ func ParseListNetworksResponse(rsp *http.Response) (*ListNetworksResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6522,6 +6733,13 @@ func ParseListWalletsResponse(rsp *http.Response) (*ListWalletsResponse, error) } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 500: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6569,6 +6787,13 @@ func ParseCreateWalletResponse(rsp *http.Response) (*CreateWalletResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 409: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6616,6 +6841,13 @@ func ParseGetWalletResponse(rsp *http.Response) (*GetWalletResponse, error) { } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { @@ -6670,6 +6902,13 @@ func ParseUpdateWalletResponse(rsp *http.Response) (*UpdateWalletResponse, error } response.JSON401 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 403: + var dest PermissionDenied + if err := json.Unmarshal(bodyBytes, &dest); err != nil { + return nil, err + } + response.JSON403 = &dest + case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 404: var dest ApplicationError if err := json.Unmarshal(bodyBytes, &dest); err != nil { diff --git a/ginserver/ginserver.gen.go b/ginserver/ginserver.gen.go index c5705e6..8c79ea7 100644 --- a/ginserver/ginserver.gen.go +++ b/ginserver/ginserver.gen.go @@ -26,6 +26,7 @@ const ( INTERNALERROR ApplicationErrorType = "INTERNAL_ERROR" NOTFOUND ApplicationErrorType = "NOT_FOUND" ORGANIZATIONNOTFOUND ApplicationErrorType = "ORGANIZATION_NOT_FOUND" + PERMISSIONDENIED ApplicationErrorType = "PERMISSION_DENIED" VALIDATIONERROR ApplicationErrorType = "VALIDATION_ERROR" ) @@ -164,6 +165,9 @@ const ( WatcherStatusPending WatcherStatus = "pending" ) +// Actor Resource attribution actor — ":" for a user, "api:" for an API key. +type Actor = string + // ApplicationError Standard error response body. type ApplicationError struct { // Code Machine-readable error code for classified tenant error responses. @@ -220,8 +224,11 @@ type Channel struct { // ChannelId Unique identifier for the channel ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the channel was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // Description Description of the channel Description *string `json:"description,omitempty"` @@ -231,6 +238,12 @@ type Channel struct { // Status Status of a channel Status ChannelStatus `json:"status"` + + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` } // ChannelList Paginated list of channels. @@ -582,6 +595,9 @@ type Operation struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Flat display-string form; initiator carries the structured Subject equivalent. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Deadline Unix timestamp deadline for the operation. A value of 0 means no expiration. Deadline int64 `json:"deadline"` @@ -623,6 +639,9 @@ type Operation struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletOperationId Unique wallet operation identifier WalletOperationId string `json:"wallet_operation_id"` } @@ -732,6 +751,9 @@ type Query struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // EventHash Verifiable event hash for the terminal query result. EventHash *string `json:"event_hash,omitempty"` @@ -768,6 +790,9 @@ type Query struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // VerifiableResult Base64-encoded verifiable query result. VerifiableResult *string `json:"verifiable_result,omitempty"` @@ -958,6 +983,9 @@ type Wallet struct { // CreatedAt Unix timestamp in seconds CreatedAt *Timestamp `json:"created_at,omitempty"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Description Description of the wallet Description *string `json:"description,omitempty"` @@ -970,6 +998,12 @@ type Wallet struct { // StatusChannelId Channel ID where wallet status events are published StatusChannelId *openapi_types.UUID `json:"status_channel_id,omitempty"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletId Unique identifier for the wallet WalletId openapi_types.UUID `json:"wallet_id"` @@ -1035,8 +1069,11 @@ type Watcher struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1056,6 +1093,12 @@ type Watcher struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1133,8 +1176,11 @@ type WatcherSummary struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1148,6 +1194,12 @@ type WatcherSummary struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1158,6 +1210,9 @@ type WatcherSummary struct { // OrganizationNotFound Standard error response body. type OrganizationNotFound = ApplicationError +// PermissionDenied Standard error response body. +type PermissionDenied = ApplicationError + // ListChannelsParams defines parameters for ListChannels. type ListChannelsParams struct { // Name Filter channels by name (case-insensitive partial match) @@ -3194,6 +3249,8 @@ func RegisterHandlersWithOptions(router gin.IRouter, si ServerInterface, options type OrganizationNotFoundJSONResponse ApplicationError +type PermissionDeniedJSONResponse ApplicationError + type ListChannelsRequestObject struct { Params ListChannelsParams } @@ -3222,6 +3279,15 @@ func (response ListChannels401JSONResponse) VisitListChannelsResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type ListChannels403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListChannels403JSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListChannels500JSONResponse ApplicationError func (response ListChannels500JSONResponse) VisitListChannelsResponse(w http.ResponseWriter) error { @@ -3268,6 +3334,15 @@ func (response CreateChannel401JSONResponse) VisitCreateChannelResponse(w http.R return json.NewEncoder(w).Encode(response) } +type CreateChannel403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response CreateChannel403JSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type CreateChannel409JSONResponse ApplicationError func (response CreateChannel409JSONResponse) VisitCreateChannelResponse(w http.ResponseWriter) error { @@ -3314,6 +3389,15 @@ func (response GetChannel401JSONResponse) VisitGetChannelResponse(w http.Respons return json.NewEncoder(w).Encode(response) } +type GetChannel403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetChannel403JSONResponse) VisitGetChannelResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetChannel404JSONResponse ApplicationError func (response GetChannel404JSONResponse) VisitGetChannelResponse(w http.ResponseWriter) error { @@ -3370,6 +3454,15 @@ func (response UpdateChannel401JSONResponse) VisitUpdateChannelResponse(w http.R return json.NewEncoder(w).Encode(response) } +type UpdateChannel403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response UpdateChannel403JSONResponse) VisitUpdateChannelResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type UpdateChannel404JSONResponse ApplicationError func (response UpdateChannel404JSONResponse) VisitUpdateChannelResponse(w http.ResponseWriter) error { @@ -3435,6 +3528,15 @@ func (response ListChannelEvents401JSONResponse) VisitListChannelEventsResponse( return json.NewEncoder(w).Encode(response) } +type ListChannelEvents403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListChannelEvents403JSONResponse) VisitListChannelEventsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListChannelEvents404JSONResponse ApplicationError func (response ListChannelEvents404JSONResponse) VisitListChannelEventsResponse(w http.ResponseWriter) error { @@ -3491,6 +3593,15 @@ func (response SearchChannelEvents401JSONResponse) VisitSearchChannelEventsRespo return json.NewEncoder(w).Encode(response) } +type SearchChannelEvents403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response SearchChannelEvents403JSONResponse) VisitSearchChannelEventsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type SearchChannelEvents404JSONResponse ApplicationError func (response SearchChannelEvents404JSONResponse) VisitSearchChannelEventsResponse(w http.ResponseWriter) error { @@ -3538,6 +3649,15 @@ func (response GetChannelEvent401JSONResponse) VisitGetChannelEventResponse(w ht return json.NewEncoder(w).Encode(response) } +type GetChannelEvent403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetChannelEvent403JSONResponse) VisitGetChannelEventResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetChannelEvent404JSONResponse ApplicationError func (response GetChannelEvent404JSONResponse) VisitGetChannelEventResponse(w http.ResponseWriter) error { @@ -3585,6 +3705,15 @@ func (response ListOperations401JSONResponse) VisitListOperationsResponse(w http return json.NewEncoder(w).Encode(response) } +type ListOperations403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListOperations403JSONResponse) VisitListOperationsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListOperations404JSONResponse ApplicationError func (response ListOperations404JSONResponse) VisitListOperationsResponse(w http.ResponseWriter) error { @@ -3641,6 +3770,15 @@ func (response CreateOperation401JSONResponse) VisitCreateOperationResponse(w ht return json.NewEncoder(w).Encode(response) } +type CreateOperation403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response CreateOperation403JSONResponse) VisitCreateOperationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type CreateOperation404JSONResponse ApplicationError func (response CreateOperation404JSONResponse) VisitCreateOperationResponse(w http.ResponseWriter) error { @@ -3697,6 +3835,15 @@ func (response GetOperation401JSONResponse) VisitGetOperationResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type GetOperation403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetOperation403JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetOperation404JSONResponse ApplicationError func (response GetOperation404JSONResponse) VisitGetOperationResponse(w http.ResponseWriter) error { @@ -3754,6 +3901,15 @@ func (response FinalizeOrCancelOperation401JSONResponse) VisitFinalizeOrCancelOp return json.NewEncoder(w).Encode(response) } +type FinalizeOrCancelOperation403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response FinalizeOrCancelOperation403JSONResponse) VisitFinalizeOrCancelOperationResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type FinalizeOrCancelOperation404JSONResponse ApplicationError func (response FinalizeOrCancelOperation404JSONResponse) VisitFinalizeOrCancelOperationResponse(w http.ResponseWriter) error { @@ -3801,6 +3957,15 @@ func (response ListQueries401JSONResponse) VisitListQueriesResponse(w http.Respo return json.NewEncoder(w).Encode(response) } +type ListQueries403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListQueries403JSONResponse) VisitListQueriesResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListQueries404JSONResponse ApplicationError func (response ListQueries404JSONResponse) VisitListQueriesResponse(w http.ResponseWriter) error { @@ -3857,6 +4022,15 @@ func (response CreateQuery401JSONResponse) VisitCreateQueryResponse(w http.Respo return json.NewEncoder(w).Encode(response) } +type CreateQuery403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response CreateQuery403JSONResponse) VisitCreateQueryResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type CreateQuery404JSONResponse ApplicationError func (response CreateQuery404JSONResponse) VisitCreateQueryResponse(w http.ResponseWriter) error { @@ -3922,6 +4096,15 @@ func (response GetQuery401JSONResponse) VisitGetQueryResponse(w http.ResponseWri return json.NewEncoder(w).Encode(response) } +type GetQuery403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetQuery403JSONResponse) VisitGetQueryResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetQuery404JSONResponse ApplicationError func (response GetQuery404JSONResponse) VisitGetQueryResponse(w http.ResponseWriter) error { @@ -3969,6 +4152,15 @@ func (response ListWatchers401JSONResponse) VisitListWatchersResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type ListWatchers403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListWatchers403JSONResponse) VisitListWatchersResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListWatchers404JSONResponse ApplicationError func (response ListWatchers404JSONResponse) VisitListWatchersResponse(w http.ResponseWriter) error { @@ -4025,6 +4217,15 @@ func (response CreateWatcher401JSONResponse) VisitCreateWatcherResponse(w http.R return json.NewEncoder(w).Encode(response) } +type CreateWatcher403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response CreateWatcher403JSONResponse) VisitCreateWatcherResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type CreateWatcher404JSONResponse ApplicationError func (response CreateWatcher404JSONResponse) VisitCreateWatcherResponse(w http.ResponseWriter) error { @@ -4081,6 +4282,15 @@ func (response GetWatcher401JSONResponse) VisitGetWatcherResponse(w http.Respons return json.NewEncoder(w).Encode(response) } +type GetWatcher403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetWatcher403JSONResponse) VisitGetWatcherResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetWatcher404JSONResponse ApplicationError func (response GetWatcher404JSONResponse) VisitGetWatcherResponse(w http.ResponseWriter) error { @@ -4147,6 +4357,15 @@ func (response UpdateWatcher401JSONResponse) VisitUpdateWatcherResponse(w http.R return json.NewEncoder(w).Encode(response) } +type UpdateWatcher403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response UpdateWatcher403JSONResponse) VisitUpdateWatcherResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type UpdateWatcher404JSONResponse ApplicationError func (response UpdateWatcher404JSONResponse) VisitUpdateWatcherResponse(w http.ResponseWriter) error { @@ -4217,6 +4436,15 @@ func (response ListNetworks401JSONResponse) VisitListNetworksResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type ListNetworks403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListNetworks403JSONResponse) VisitListNetworksResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListNetworks500JSONResponse ApplicationError func (response ListNetworks500JSONResponse) VisitListNetworksResponse(w http.ResponseWriter) error { @@ -4254,6 +4482,15 @@ func (response ListWallets401JSONResponse) VisitListWalletsResponse(w http.Respo return json.NewEncoder(w).Encode(response) } +type ListWallets403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response ListWallets403JSONResponse) VisitListWalletsResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type ListWallets500JSONResponse ApplicationError func (response ListWallets500JSONResponse) VisitListWalletsResponse(w http.ResponseWriter) error { @@ -4300,6 +4537,15 @@ func (response CreateWallet401JSONResponse) VisitCreateWalletResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type CreateWallet403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response CreateWallet403JSONResponse) VisitCreateWalletResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type CreateWallet409JSONResponse ApplicationError func (response CreateWallet409JSONResponse) VisitCreateWalletResponse(w http.ResponseWriter) error { @@ -4346,6 +4592,15 @@ func (response GetWallet401JSONResponse) VisitGetWalletResponse(w http.ResponseW return json.NewEncoder(w).Encode(response) } +type GetWallet403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response GetWallet403JSONResponse) VisitGetWalletResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type GetWallet404JSONResponse ApplicationError func (response GetWallet404JSONResponse) VisitGetWalletResponse(w http.ResponseWriter) error { @@ -4402,6 +4657,15 @@ func (response UpdateWallet401JSONResponse) VisitUpdateWalletResponse(w http.Res return json.NewEncoder(w).Encode(response) } +type UpdateWallet403JSONResponse struct{ PermissionDeniedJSONResponse } + +func (response UpdateWallet403JSONResponse) VisitUpdateWalletResponse(w http.ResponseWriter) error { + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(403) + + return json.NewEncoder(w).Encode(response) +} + type UpdateWallet404JSONResponse ApplicationError func (response UpdateWallet404JSONResponse) VisitUpdateWalletResponse(w http.ResponseWriter) error { diff --git a/stdserver/stdserver.gen.go b/stdserver/stdserver.gen.go index aaf106e..7570361 100644 --- a/stdserver/stdserver.gen.go +++ b/stdserver/stdserver.gen.go @@ -26,6 +26,7 @@ const ( INTERNALERROR ApplicationErrorType = "INTERNAL_ERROR" NOTFOUND ApplicationErrorType = "NOT_FOUND" ORGANIZATIONNOTFOUND ApplicationErrorType = "ORGANIZATION_NOT_FOUND" + PERMISSIONDENIED ApplicationErrorType = "PERMISSION_DENIED" VALIDATIONERROR ApplicationErrorType = "VALIDATION_ERROR" ) @@ -164,6 +165,9 @@ const ( WatcherStatusPending WatcherStatus = "pending" ) +// Actor Resource attribution actor — ":" for a user, "api:" for an API key. +type Actor = string + // ApplicationError Standard error response body. type ApplicationError struct { // Code Machine-readable error code for classified tenant error responses. @@ -220,8 +224,11 @@ type Channel struct { // ChannelId Unique identifier for the channel ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the channel was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // Description Description of the channel Description *string `json:"description,omitempty"` @@ -231,6 +238,12 @@ type Channel struct { // Status Status of a channel Status ChannelStatus `json:"status"` + + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` } // ChannelList Paginated list of channels. @@ -582,6 +595,9 @@ type Operation struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Flat display-string form; initiator carries the structured Subject equivalent. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Deadline Unix timestamp deadline for the operation. A value of 0 means no expiration. Deadline int64 `json:"deadline"` @@ -623,6 +639,9 @@ type Operation struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletOperationId Unique wallet operation identifier WalletOperationId string `json:"wallet_operation_id"` } @@ -732,6 +751,9 @@ type Query struct { // CreatedAt Unix timestamp in seconds CreatedAt Timestamp `json:"created_at"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // EventHash Verifiable event hash for the terminal query result. EventHash *string `json:"event_hash,omitempty"` @@ -768,6 +790,9 @@ type Query struct { // UpdatedAt Unix timestamp in seconds UpdatedAt Timestamp `json:"updated_at"` + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // VerifiableResult Base64-encoded verifiable query result. VerifiableResult *string `json:"verifiable_result,omitempty"` @@ -958,6 +983,9 @@ type Wallet struct { // CreatedAt Unix timestamp in seconds CreatedAt *Timestamp `json:"created_at,omitempty"` + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` + // Description Description of the wallet Description *string `json:"description,omitempty"` @@ -970,6 +998,12 @@ type Wallet struct { // StatusChannelId Channel ID where wallet status events are published StatusChannelId *openapi_types.UUID `json:"status_channel_id,omitempty"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WalletId Unique identifier for the wallet WalletId openapi_types.UUID `json:"wallet_id"` @@ -1035,8 +1069,11 @@ type Watcher struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1056,6 +1093,12 @@ type Watcher struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1133,8 +1176,11 @@ type WatcherSummary struct { // ChannelId ID of the channel this watcher belongs to ChannelId openapi_types.UUID `json:"channel_id"` - // CreatedAt Timestamp of when the watcher was created - CreatedAt int64 `json:"created_at"` + // CreatedAt Unix timestamp in seconds + CreatedAt Timestamp `json:"created_at"` + + // CreatedBy Actor that created the resource. Null when there is no attributable subject (e.g. background job). + CreatedBy *Actor `json:"created_by"` // DonFamily DON family the watcher's workflow runs on (e.g., "zone-a"). Used to identify which DON nodes signed the events. DonFamily string `json:"don_family"` @@ -1148,6 +1194,12 @@ type WatcherSummary struct { // Status Status of a watcher entity Status WatcherStatus `json:"status"` + // UpdatedAt Unix timestamp in seconds + UpdatedAt *Timestamp `json:"updated_at,omitempty"` + + // UpdatedBy Actor that last updated the resource. Replaced on every actor-driven update; untouched by background updates. Null when there is no attributable subject. + UpdatedBy *Actor `json:"updated_by"` + // WatcherId Unique identifier for the watcher WatcherId openapi_types.UUID `json:"watcher_id"` @@ -1158,6 +1210,9 @@ type WatcherSummary struct { // OrganizationNotFound Standard error response body. type OrganizationNotFound = ApplicationError +// PermissionDenied Standard error response body. +type PermissionDenied = ApplicationError + // ListChannelsParams defines parameters for ListChannels. type ListChannelsParams struct { // Name Filter channels by name (case-insensitive partial match)