From aaddee4ef3e820edb6f9fa92919cb4e9a1821dfb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 25 Sep 2026 06:18:52 +0000 Subject: [PATCH] chore: refresh store codegen snapshot --- packages/store/scripts/api-schema/schema.json | 3289 +++++++++++------ .../src/gateway/AUTO_GENERATED/.schema-hash | 2 +- .../src/gateway/AUTO_GENERATED/delegates.ts | 93 + .../src/gateway/AUTO_GENERATED/messages.ts | 30 +- .../src/gateway/AUTO_GENERATED/spaces.ts | 4 +- .../gateway/AUTO_GENERATED/transactions.ts | 20 +- 6 files changed, 2338 insertions(+), 1100 deletions(-) diff --git a/packages/store/scripts/api-schema/schema.json b/packages/store/scripts/api-schema/schema.json index c87e902641..7159b928e9 100644 --- a/packages/store/scripts/api-schema/schema.json +++ b/packages/store/scripts/api-schema/schema.json @@ -498,6 +498,9 @@ } } } + }, + "403": { + "description": "Not an admin" } }, "summary": "Get the billing portal session URL for a space", @@ -584,6 +587,12 @@ } } } + }, + "403": { + "description": "Not an admin, or a payment link this workspace is not offered" + }, + "409": { + "description": "This plan doesn't offer enough Safe seats for the workspace's current Safes" } }, "summary": "Create a checkout session for a payment link", @@ -592,6 +601,136 @@ ] } }, + "/v1/billing/spaces/{spaceId}/subscriptions/{subscriptionId}/preview-update": { + "get": { + "operationId": "billingPreviewSubscriptionUpdateV1", + "parameters": [ + { + "name": "subscriptionId", + "required": true, + "in": "path", + "description": "Subscription identifier", + "schema": { + "type": "string" + } + }, + { + "name": "planId", + "required": true, + "in": "query", + "description": "The price id of the plan to preview", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SubscriptionUpdatePreview" + } + } + } + }, + "403": { + "description": "Not an admin, or a plan this workspace is not offered" + }, + "404": { + "description": "Subscription not found" + }, + "409": { + "description": "Already on this plan" + }, + "422": { + "description": "Malformed subscriptionId or planId" + } + }, + "summary": "Preview what moving a subscription to another plan would cost", + "tags": [ + "billing" + ] + } + }, + "/v1/billing/spaces/{spaceId}/subscriptions/{subscriptionId}": { + "patch": { + "operationId": "billingUpdateSubscriptionV1", + "parameters": [ + { + "name": "subscriptionId", + "required": true, + "in": "path", + "description": "Subscription identifier", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateSubscriptionResult" + } + } + } + }, + "403": { + "description": "Not an admin, a plan this workspace is not offered, or a named paymentLinkId this workspace is not offered" + }, + "404": { + "description": "Subscription not found" + }, + "409": { + "description": "One of:\n- Already on this plan\n- The subscription is not in an updatable state\n- Several offered links sell the plan and none was named\n- The target plan doesn't offer enough Safe seats for the workspace's current Safes" + }, + "422": { + "description": "The named payment link does not offer this plan" + }, + "502": { + "description": "The billing service reported the plan change as unsuccessful" + } + }, + "summary": "Move a subscription onto another plan", + "tags": [ + "billing" + ] + } + }, "/v1/billing/sessions/{sessionId}": { "get": { "operationId": "billingGetCheckoutSessionV1", @@ -1853,6 +1992,9 @@ }, "404": { "description": "Message not found" + }, + "422": { + "description": "Invalid chainId or messageHash" } }, "summary": "Get message by hash", @@ -1908,6 +2050,9 @@ }, "404": { "description": "Safe not found on the specified chain" + }, + "422": { + "description": "Invalid chainId or safeAddress" } }, "summary": "Get messages for Safe", @@ -1956,6 +2101,9 @@ }, "400": { "description": "Invalid message format or signature" + }, + "422": { + "description": "Invalid chainId, safeAddress or request body" } }, "summary": "Create message", @@ -2009,6 +2157,9 @@ }, "404": { "description": "Message not found" + }, + "422": { + "description": "Invalid chainId, messageHash or request body" } }, "summary": "Add message signature", @@ -3626,6 +3777,152 @@ ] } }, + "/v1/spaces/{spaceId}/chains/{chainId}/security/{safeAddress}/recipient/{recipientAddress}": { + "get": { + "description": "Performs real-time security analysis of a recipient address for a Safe registered to a Space, gated by the copilot_scans plan entitlement.", + "operationId": "spaceSafeShieldAnalyzeRecipientV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address, must be registered to the Space", + "schema": { + "type": "string" + } + }, + { + "name": "recipientAddress", + "required": true, + "in": "path", + "description": "Recipient address to analyze", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Recipient interaction analysis results", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SingleRecipientAnalysisDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required" + }, + "402": { + "description": "The Space has no copilot_scans entitlement. The body carries `{ code: \"FEATURE_NOT_GRANTED\", feature }`" + }, + "403": { + "description": "Not a member of this Space, or the Safe is not registered to it" + } + }, + "summary": "Analyze recipient address on a Space", + "tags": [ + "safe-shield" + ] + } + }, + "/v1/spaces/{spaceId}/chains/{chainId}/security/{safeAddress}/counterparty-analysis": { + "post": { + "description": "Performs combined contract and recipient analysis for a Safe transaction on a Safe registered to a Space, gated by the copilot_scans plan entitlement.", + "operationId": "spaceSafeShieldAnalyzeCounterpartyV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address, must be registered to the Space", + "schema": { + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "description": "Transaction data used to analyze all counterparties involved.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CounterpartyAnalysisRequestDto" + } + } + } + }, + "responses": { + "200": { + "description": "Combined counterparty analysis including recipients and contracts grouped by status group and mapped to an address.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CounterpartyAnalysisDto" + } + } + } + }, + "400": { + "description": "Invalid space identifier" + }, + "401": { + "description": "Authentication required" + }, + "402": { + "description": "The Space has no copilot_scans entitlement. The body carries `{ code: \"FEATURE_NOT_GRANTED\", feature }`" + }, + "403": { + "description": "Not a member of this Space, or the Safe is not registered to it" + } + }, + "summary": "Analyze transaction counterparties on a Space", + "tags": [ + "safe-shield" + ] + } + }, "/v1/spaces/{spaceId}/surveys/{slug}/state": { "get": { "description": "Returns the active survey definition and this space's response (if any) in a single round trip. Only active admins of the space can read survey state.", @@ -3792,10 +4089,85 @@ ] } }, - "/v1/chains/{chainId}/owners/{ownerAddress}/safes": { - "get": { - "description": "Retrieves a list of Safe addresses that are owned by the specified address on a specific chain.", - "operationId": "ownersGetSafesByOwnerV1", + "/v1/spaces/{spaceId}/chains/{chainId}/relay": { + "post": { + "description": "Relays a Safe transaction against the workspace's sponsored-transaction allowance, which its plan grants and this spends one unit of per call — a batch included. Unlike the chain-scoped relay endpoint, the chain's own relayer policy does not apply: the allowance is the only limit. A call acting on an existing Safe is admitted only for a Safe the workspace holds; a Safe creation or a passkey signer deployment, having no Safe yet, is admitted as it is there.", + "operationId": "spaceRelayRelayV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe transaction will be executed", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "spaceId", + "required": true, + "in": "path", + "description": "Space UUID", + "schema": { + "example": "123e4567-e89b-12d3-a456-426614174000", + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SpaceRelayDto" + } + } + } + }, + "responses": { + "201": { + "description": "Transaction relayed", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Relay" + } + } + } + }, + "400": { + "description": "Malformed workspace identifier" + }, + "401": { + "description": "Authentication required" + }, + "402": { + "description": "The workspace's sponsored-transaction allowance is spent. The body carries `quota`, `used` and `resetsAt` so a client can offer to pay for the transaction itself." + }, + "403": { + "description": "Not a member of the workspace, the Safe is not one it holds, the chain has no relayer, or the transaction was denied" + }, + "404": { + "description": "Workspace not found" + }, + "422": { + "description": "Request failed schema validation, or the transaction was simulated and would revert (SIMULATION_FAILED) or could not be simulated (INDETERMINATE_SIMULATION)" + }, + "501": { + "description": "The chain's relayer type is not supported" + } + }, + "summary": "Relay a transaction at a workspace's expense", + "tags": [ + "relay" + ] + } + }, + "/v1/chains/{chainId}/owners/{ownerAddress}/safes": { + "get": { + "description": "Retrieves a list of Safe addresses that are owned by the specified address on a specific chain.", + "operationId": "ownersGetSafesByOwnerV1", "parameters": [ { "name": "chainId", @@ -4451,6 +4823,9 @@ } } } + }, + "402": { + "description": "Disabled on Core. The body carries `{ code: \"SAFE_SHIELD_DISABLED_ON_CORE\", message }`." } }, "summary": "Analyze recipient address", @@ -5112,7 +5487,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Transaction" + "$ref": "#/components/schemas/TransactionDetails" } } } @@ -6037,142 +6412,474 @@ ] } }, - "/v1/register/notifications": { + "/v3/chains/{chainId}/delegates": { + "get": { + "description": "Retrieves a paginated list of delegates for a specific chain with optional filtering by Safe, delegate, delegator, or label.", + "operationId": "delegatesGetDelegatesV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where delegates are registered", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "cursor", + "required": false, + "in": "query", + "description": "Pagination cursor for retrieving the next set of results", + "schema": { + "type": "string" + } + }, + { + "name": "label", + "required": false, + "in": "query", + "description": "Filter by delegate label or name", + "schema": { + "type": "string" + } + }, + { + "name": "delegator", + "required": false, + "in": "query", + "description": "Filter by delegator address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "delegate", + "required": false, + "in": "query", + "description": "Filter by delegate address (0x prefixed hex string)", + "schema": { + "type": "string" + } + }, + { + "name": "safe", + "required": false, + "in": "query", + "description": "Filter by Safe address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Paginated list of delegates retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DelegatePage" + } + } + } + } + }, + "summary": "Get delegates", + "tags": [ + "delegates" + ] + }, "post": { - "deprecated": true, - "description": "Registers a device to receive push notifications for Safe events. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsRegisterDeviceV1", - "parameters": [], + "description": "Creates a new delegate relationship between a Safe and a delegate address. Requires proper authorization signature.", + "operationId": "delegatesPostDelegateV3", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the delegate will be registered", + "schema": { + "example": "1", + "type": "string" + } + } + ], "requestBody": { "required": true, - "description": "Device registration data including device token, UUID, and Safe registrations with signatures", + "description": "Delegate creation data including Safe address, delegate address, label, and authorization signature", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RegisterDeviceDto" + "$ref": "#/components/schemas/CreateDelegateDto" } } } }, "responses": { - "200": { - "description": "Device registered successfully for notifications" + "204": { + "description": "Delegate created successfully" }, "400": { - "description": "Invalid device data, expired timestamp, or invalid signature" + "description": "Invalid delegate data, signature, or unauthorized creation attempt" } }, - "summary": "Register device for notifications (deprecated)", + "summary": "Create delegate", "tags": [ - "notifications" + "delegates" ] - } - }, - "/v1/chains/{chainId}/notifications/devices/{uuid}": { - "delete": { - "deprecated": true, - "description": "Removes a device from receiving notifications. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsUnregisterDeviceV1", + }, + "patch": { + "description": "Updates an existing delegate relationship (e.g. the delegate label). Requires proper authorization signature.", + "operationId": "delegatesUpdateDelegateV3", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID (kept for backward compatibility)", + "description": "Chain ID where the delegate is registered", "schema": { "example": "1", "type": "string" } - }, - { - "name": "uuid", - "required": true, - "in": "path", - "description": "Device UUID to unregister", - "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", - "type": "string" - } } ], + "requestBody": { + "required": true, + "description": "Delegate update data including Safe address, delegate address, delegator, label, and authorization signature", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateDelegateV3Dto" + } + } + } + }, "responses": { "204": { - "description": "Device unregistered successfully" + "description": "Delegate updated successfully" + }, + "400": { + "description": "Invalid delegate data, signature, or unauthorized update attempt" } }, - "summary": "Unregister device (deprecated)", + "summary": "Update delegate", "tags": [ - "notifications" + "delegates" ] } }, - "/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safeAddress}": { + "/v3/chains/{chainId}/delegates/{delegateAddress}": { "delete": { - "deprecated": true, - "description": "Removes a specific Safe from receiving notifications on a device. This endpoint is deprecated, please use the v2 version instead.", - "operationId": "notificationsUnregisterSafeV1", + "description": "Removes a delegate relationship for a specific delegate address. Requires proper authorization signature.", + "operationId": "delegatesDeleteDelegateV3", "parameters": [ { "name": "chainId", "required": true, "in": "path", - "description": "Chain ID where the Safe is deployed", + "description": "Chain ID where the delegate is registered", "schema": { "example": "1", "type": "string" } }, { - "name": "uuid", - "required": true, - "in": "path", - "description": "Device UUID", - "schema": { - "example": "550e8400-e29b-41d4-a716-446655440000", - "type": "string" - } - }, - { - "name": "safeAddress", + "name": "delegateAddress", "required": true, "in": "path", - "description": "Safe contract address (0x prefixed hex string)", + "description": "Delegate address to remove (0x prefixed hex string)", "schema": { "type": "string" } } ], - "responses": { - "204": { - "description": "Safe unregistered from device notifications successfully" - } - }, - "summary": "Unregister Safe from device (deprecated)", - "tags": [ - "notifications" - ] - } - }, - "/v2/register/notifications": { - "post": { - "description": "Registers or updates a device to receive push notifications for Safe events. Creates subscriptions for specified Safes and notification types.", - "operationId": "notificationsUpsertSubscriptionsV2", - "parameters": [], "requestBody": { "required": true, - "description": "Device and subscription data including device token, Safe addresses, and notification preferences", + "description": "Signature and data proving authorization to delete the delegate", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpsertSubscriptionsDto" + "$ref": "#/components/schemas/DeleteDelegateV3Dto" } } } }, "responses": { - "201": { - "description": "Device registered successfully with returned device UUID", - "content": { + "204": { + "description": "Delegate deleted successfully" + }, + "400": { + "description": "Invalid signature or unauthorized deletion attempt" + } + }, + "summary": "Delete delegate", + "tags": [ + "delegates" + ] + } + }, + "/v1/chains/{chainId}/tokens/{address}": { + "get": { + "description": "Symbol, name, decimals, logo and trust flag of a token on the given chain, as known by the Transaction Service.", + "operationId": "tokensGetTokenV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID the token is deployed on", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "address", + "required": true, + "in": "path", + "description": "Token contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token metadata", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc721TokenMetadata" + } + ] + } + } + } + }, + "404": { + "description": "The Transaction Service does not know this token" + }, + "422": { + "description": "Invalid chain ID or address" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Get token metadata", + "tags": [ + "tokens" + ] + } + }, + "/v1/chains/{chainId}/tokens": { + "get": { + "description": "Metadata for up to 20 tokens of one chain, in request order. Addresses the Transaction Service does not know are omitted.", + "operationId": "tokensGetTokensV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID the token is deployed on", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "addresses", + "required": true, + "in": "query", + "description": "Comma-separated token contract addresses, at most 20", + "schema": { + "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,0xdAC17F958D2ee523a2206206994597C13D831ec7", + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Token metadata for the known addresses, in request order", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/NativeTokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc20TokenMetadata" + }, + { + "$ref": "#/components/schemas/Erc721TokenMetadata" + } + ] + } + } + } + } + }, + "422": { + "description": "Invalid chain ID, malformed address, empty list or more than 20 addresses" + }, + "429": { + "description": "Rate limit exceeded" + } + }, + "summary": "Get metadata for several tokens", + "tags": [ + "tokens" + ] + } + }, + "/v1/register/notifications": { + "post": { + "deprecated": true, + "description": "Registers a device to receive push notifications for Safe events. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsRegisterDeviceV1", + "parameters": [], + "requestBody": { + "required": true, + "description": "Device registration data including device token, UUID, and Safe registrations with signatures", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterDeviceDto" + } + } + } + }, + "responses": { + "200": { + "description": "Device registered successfully for notifications" + }, + "400": { + "description": "Invalid device data, expired timestamp, or invalid signature" + } + }, + "summary": "Register device for notifications (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v1/chains/{chainId}/notifications/devices/{uuid}": { + "delete": { + "deprecated": true, + "description": "Removes a device from receiving notifications. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsUnregisterDeviceV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID (kept for backward compatibility)", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Device UUID to unregister", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Device unregistered successfully" + } + }, + "summary": "Unregister device (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v1/chains/{chainId}/notifications/devices/{uuid}/safes/{safeAddress}": { + "delete": { + "deprecated": true, + "description": "Removes a specific Safe from receiving notifications on a device. This endpoint is deprecated, please use the v2 version instead.", + "operationId": "notificationsUnregisterSafeV1", + "parameters": [ + { + "name": "chainId", + "required": true, + "in": "path", + "description": "Chain ID where the Safe is deployed", + "schema": { + "example": "1", + "type": "string" + } + }, + { + "name": "uuid", + "required": true, + "in": "path", + "description": "Device UUID", + "schema": { + "example": "550e8400-e29b-41d4-a716-446655440000", + "type": "string" + } + }, + { + "name": "safeAddress", + "required": true, + "in": "path", + "description": "Safe contract address (0x prefixed hex string)", + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "Safe unregistered from device notifications successfully" + } + }, + "summary": "Unregister Safe from device (deprecated)", + "tags": [ + "notifications" + ] + } + }, + "/v2/register/notifications": { + "post": { + "description": "Registers or updates a device to receive push notifications for Safe events. Creates subscriptions for specified Safes and notification types.", + "operationId": "notificationsUpsertSubscriptionsV2", + "parameters": [], + "requestBody": { + "required": true, + "description": "Device and subscription data including device token, Safe addresses, and notification preferences", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpsertSubscriptionsDto" + } + } + } + }, + "responses": { + "201": { + "description": "Device registered successfully with returned device UUID", + "content": { "application/json": { "schema": { "type": "object", @@ -6778,6 +7485,10 @@ "metadata": { "type": "object", "nullable": true + }, + "hasPaymentMethod": { + "type": "boolean", + "description": "Whether the subscription has a default payment method, or its customer does as a fallback" } }, "required": [ @@ -6945,6 +7656,10 @@ "items": { "type": "object" } + }, + "trialPeriodDays": { + "type": "number", + "nullable": true } }, "required": [ @@ -6969,26 +7684,104 @@ "url" ] }, - "CheckoutSession": { + "PreviewLineItem": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "object": { + "description": { "type": "string" }, - "amountSubtotal": { - "type": "number" - }, - "amountTotal": { - "type": "number" + "amount": { + "type": "number", + "description": "Signed amount in minor units; negative for credit on unused time" }, - "cancelUrl": { + "currency": { "type": "string" - }, - "clientReferenceId": { - "type": "object", + } + }, + "required": [ + "description", + "amount", + "currency" + ] + }, + "SubscriptionUpdatePreview": { + "type": "object", + "properties": { + "amountDue": { + "type": "number" + }, + "currency": { + "type": "string" + }, + "nextBillingDate": { + "type": "number", + "description": "Unix timestamp in seconds" + }, + "lineItems": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PreviewLineItem" + } + } + }, + "required": [ + "amountDue", + "currency", + "nextBillingDate", + "lineItems" + ] + }, + "UpdateSubscriptionDto": { + "type": "object", + "properties": { + "planId": { + "type": "string", + "description": "The price id of the plan to move the subscription onto" + }, + "paymentLinkId": { + "type": "string", + "description": "Which offered payment link sells that plan. Only needed to disambiguate when several do" + } + }, + "required": [ + "planId" + ] + }, + "UpdateSubscriptionResult": { + "type": "object", + "properties": { + "subscriptionId": { + "type": "string" + }, + "success": { + "type": "boolean" + } + }, + "required": [ + "subscriptionId", + "success" + ] + }, + "CheckoutSession": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "object": { + "type": "string" + }, + "amountSubtotal": { + "type": "number" + }, + "amountTotal": { + "type": "number" + }, + "cancelUrl": { + "type": "string" + }, + "clientReferenceId": { + "type": "object", "nullable": true }, "created": { @@ -9182,6 +9975,29 @@ "signature" ] }, + "SafeAppInfo": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "logoUri": { + "type": "string", + "nullable": true + } + }, + "required": [ + "id", + "name", + "url" + ] + }, "Message": { "type": "object", "properties": { @@ -9197,11 +10013,13 @@ }, "logoUri": { "type": "string", - "nullable": true + "nullable": true, + "deprecated": true }, "name": { "type": "string", - "nullable": true + "nullable": true, + "deprecated": true }, "message": { "oneOf": [ @@ -9226,7 +10044,13 @@ "type": "number" }, "proposedBy": { - "$ref": "#/components/schemas/AddressInfo" + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] }, "confirmations": { "type": "array", @@ -9241,18 +10065,38 @@ "origin": { "type": "string", "nullable": true + }, + "safeAppInfo": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SafeAppInfo" + } + ] + }, + "safeAppId": { + "type": "number", + "nullable": true, + "deprecated": true } }, "required": [ "messageHash", "status", + "logoUri", + "name", "message", "creationTimestamp", "modifiedTimestamp", "confirmationsSubmitted", "confirmationsRequired", "proposedBy", - "confirmations" + "confirmations", + "preparedSignature", + "origin", + "safeAppInfo", + "safeAppId" ] }, "MessageItem": { @@ -9270,11 +10114,13 @@ }, "logoUri": { "type": "string", - "nullable": true + "nullable": true, + "deprecated": true }, "name": { "type": "string", - "nullable": true + "nullable": true, + "deprecated": true }, "message": { "oneOf": [ @@ -9299,7 +10145,13 @@ "type": "number" }, "proposedBy": { - "$ref": "#/components/schemas/AddressInfo" + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/AddressInfo" + } + ] }, "confirmations": { "type": "array", @@ -9315,6 +10167,20 @@ "type": "string", "nullable": true }, + "safeAppInfo": { + "nullable": true, + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SafeAppInfo" + } + ] + }, + "safeAppId": { + "type": "number", + "nullable": true, + "deprecated": true + }, "type": { "type": "string", "enum": [ @@ -9325,6 +10191,8 @@ "required": [ "messageHash", "status", + "logoUri", + "name", "message", "creationTimestamp", "modifiedTimestamp", @@ -9332,6 +10200,10 @@ "confirmationsRequired", "proposedBy", "confirmations", + "preparedSignature", + "origin", + "safeAppInfo", + "safeAppId", "type" ] }, @@ -9880,7 +10752,9 @@ "SAFE_ADDED", "SAFE_REMOVED", "ADDRESS_BOOK_UPSERTED", - "ADDRESS_BOOK_DELETED" + "ADDRESS_BOOK_DELETED", + "ADDRESS_BOOK_REQUEST_CREATED", + "ADDRESS_BOOK_REQUEST_REJECTED" ] }, "actorUserId": { @@ -10499,1384 +11373,1413 @@ "safes" ] }, - "SurveyOptionDto": { + "SingleRecipientAnalysisResultDto": { "type": "object", "properties": { - "key": { - "type": "string" + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "label": { - "type": "string" + "type": { + "type": "string", + "description": "Recipient interaction status code", + "enum": [ + "NEW_RECIPIENT", + "RECURRING_RECIPIENT", + "LOW_ACTIVITY", + "FAILED" + ], + "example": "NEW_RECIPIENT" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" }, "description": { - "type": "string" + "type": "string", + "description": "Detailed description explaining the finding and its implications" }, - "icon": { - "type": "string" + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ - "key", - "label" + "severity", + "type", + "title", + "description" ] }, - "SurveyPageDto": { + "SingleRecipientAnalysisDto": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "subtitle": { - "type": "string", - "nullable": true - }, - "multiSelect": { - "type": "boolean" + "RECIPIENT_INTERACTION": { + "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", + "example": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" + } }, - "options": { + "RECIPIENT_ACTIVITY": { + "description": "Analysis results related to recipient activity. Shows whether this is a low activity recipient. (Available only for Safes)", + "example": [ + { + "severity": "WARN", + "type": "LOW_ACTIVITY", + "title": "Low activity recipient", + "description": "This address has few transactions." + } + ], "type": "array", "items": { - "$ref": "#/components/schemas/SurveyOptionDto" + "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" } + }, + "isSafe": { + "type": "boolean", + "description": "Indicates whether the analyzed recipient address is a Safe.", + "example": false } }, "required": [ - "id", - "title", - "subtitle", - "multiSelect", - "options" + "RECIPIENT_INTERACTION", + "isSafe" ] }, - "SurveyContentDto": { + "CounterpartyAnalysisRequestDto": { "type": "object", "properties": { - "pages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SurveyPageDto" - } - } + "to": { + "type": "string", + "description": "Recipient address of the transaction." + }, + "value": { + "type": "string", + "description": "Amount to send with the transaction." + }, + "data": { + "type": "string", + "description": "Hex-encoded data payload for the transaction." + }, + "operation": { + "type": "number", + "enum": [ + 0, + 1 + ], + "description": "Operation type: 0 for CALL, 1 for DELEGATECALL." + } }, "required": [ - "pages" + "to", + "value", + "data", + "operation" ] }, - "SurveyDto": { + "RecipientResultDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "slug": { - "type": "string" + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "version": { - "type": "number" + "type": { + "type": "string", + "description": "Bridge compatibility status code", + "enum": [ + "NEW_RECIPIENT", + "RECURRING_RECIPIENT", + "LOW_ACTIVITY", + "INCOMPATIBLE_SAFE", + "MISSING_OWNERSHIP", + "UNSUPPORTED_NETWORK", + "DIFFERENT_SAFE_SETUP", + "FAILED" + ], + "example": "MISSING_OWNERSHIP" }, "title": { - "type": "string" + "type": "string", + "description": "User-facing title of the finding" }, - "subtitle": { + "description": { "type": "string", - "nullable": true + "description": "Detailed description explaining the finding and its implications" }, - "surveyContent": { - "$ref": "#/components/schemas/SurveyContentDto" + "error": { + "type": "string", + "description": "Error message for failed analysis" + }, + "targetChainId": { + "type": "string", + "description": "Target chain ID for bridge operations. Only present for BridgeStatus." } }, "required": [ - "id", - "slug", - "version", + "severity", + "type", "title", - "subtitle", - "surveyContent" + "description" ] }, - "SpaceSurveyResponseDto": { + "RecipientAnalysisDto": { "type": "object", "properties": { - "surveyVersion": { - "type": "number" + "isSafe": { + "type": "boolean", + "description": "Indicates whether the analyzed recipient address is a Safe.", + "example": true }, - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" + "RECIPIENT_INTERACTION": { + "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", + "example": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient." } - }, - "description": "Map from page id → selected option keys" - }, - "submittedAt": { - "format": "date-time", - "type": "string" + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientResultDto" + } }, - "updatedAt": { - "format": "date-time", - "type": "string" + "RECIPIENT_ACTIVITY": { + "description": "Analysis results related to recipient activity frequency. Shows whether this is a low activity recipient.", + "example": [ + { + "severity": "WARN", + "type": "LOW_ACTIVITY", + "title": "Low activity recipient", + "description": "This address has few transactions." + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientResultDto" + } }, - "answeredByUserId": { - "type": "number", - "nullable": true + "BRIDGE": { + "description": "Analysis results for cross-chain bridge operations. Identifies compatibility issues, ownership problems, or unsupported networks.", + "example": [ + { + "severity": "WARN", + "type": "MISSING_OWNERSHIP", + "title": "No ownership on target chain", + "description": "You do not have ownership of a Safe on the target chain.", + "targetChainId": "137" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/RecipientResultDto" + } } }, "required": [ - "surveyVersion", - "selections", - "submittedAt", - "updatedAt", - "answeredByUserId" + "isSafe" ] }, - "SurveyStateDto": { + "ContractAnalysisResultDto": { "type": "object", "properties": { - "survey": { - "$ref": "#/components/schemas/SurveyDto" - }, - "surveyResponse": { - "nullable": true, - "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SpaceSurveyResponseDto" - } + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" ] + }, + "type": { + "type": "string", + "description": "Contract verification status code", + "enum": [ + "VERIFIED", + "NOT_VERIFIED", + "NOT_VERIFIED_BY_SAFE", + "VERIFICATION_UNAVAILABLE", + "NEW_CONTRACT", + "KNOWN_CONTRACT", + "UNEXPECTED_DELEGATECALL", + "UNOFFICIAL_FALLBACK_HANDLER", + "FAILED" + ], + "example": "VERIFIED" + }, + "title": { + "type": "string", + "description": "User-facing title of the finding" + }, + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" + }, + "error": { + "type": "string", + "description": "Error message for failed analysis" } }, "required": [ - "survey", - "surveyResponse" + "severity", + "type", + "title", + "description" ] }, - "SubmitSurveyResponseDto": { + "FallbackHandlerInfoDto": { "type": "object", "properties": { - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - }, - "description": "Map from page id → selected option keys", - "example": { - "use_cases": [ - "run_payments", - "hold_assets" - ] - } + "address": { + "type": "string", + "description": "Address of the fallback handler contract" + }, + "name": { + "type": "string", + "description": "Name of the fallback handler contract" + }, + "logoUrl": { + "type": "string", + "description": "Logo URL for the fallback handler contract" } }, "required": [ - "selections" + "address" ] }, - "SurveyResponseResultDto": { + "FallbackHandlerAnalysisResultDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "spaceUuid": { + "severity": { "type": "string", - "description": "Space UUID" + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" + ] }, - "surveySlug": { - "type": "string" - }, - "surveyVersion": { - "type": "number" + "type": { + "type": "string", + "description": "Status code for unofficial fallback handler", + "enum": [ + "UNOFFICIAL_FALLBACK_HANDLER" + ], + "example": "VERIFIED" }, - "selections": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } + "title": { + "type": "string", + "description": "User-facing title of the finding" }, - "submittedAt": { - "format": "date-time", - "type": "string" + "description": { + "type": "string", + "description": "Detailed description explaining the finding and its implications" }, - "updatedAt": { - "format": "date-time", - "type": "string" + "error": { + "type": "string", + "description": "Error message for failed analysis" }, - "answeredByUserId": { - "type": "number", - "nullable": true - } - }, - "required": [ - "id", - "spaceUuid", - "surveySlug", - "surveyVersion", - "selections", - "submittedAt", - "updatedAt", - "answeredByUserId" - ] - }, - "FeatureKey": { - "type": "string", - "enum": [ - "safe_seats" - ], - "description": "Feature key from the entitlements catalog." - }, - "BinaryEntitlement": { - "type": "object", - "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", + "fallbackHandler": { + "description": "Information about the fallback handler", "allOf": [ { - "$ref": "#/components/schemas/FeatureKey" + "$ref": "#/components/schemas/FallbackHandlerInfoDto" } ] - }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." - }, - "type": { - "type": "string", - "enum": [ - "binary" - ] } }, "required": [ - "feature", - "enabled", - "type" + "severity", + "type", + "title", + "description" ] }, - "ValueEntitlement": { + "ContractAnalysisDto": { "type": "object", "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", - "allOf": [ + "logoUrl": { + "type": "string", + "description": "Logo URL for the contract", + "example": "https://example.com/logo.png" + }, + "name": { + "type": "string", + "description": "Name of the contract", + "example": "Uniswap V3 Router" + }, + "CONTRACT_VERIFICATION": { + "description": "Analysis results for contract verification status. Shows whether contracts are verified and source code is available.", + "example": [ { - "$ref": "#/components/schemas/FeatureKey" + "severity": "INFO", + "type": "VERIFIED", + "title": "Verified contract", + "description": "This contract has been verified and its source code is available" } - ] + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractAnalysisResultDto" + } }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + "CONTRACT_INTERACTION": { + "description": "Analysis results related to contract interaction history. Shows whether this is a new or previously interacted contract.", + "example": [ + { + "severity": "INFO", + "type": "NEW_CONTRACT", + "title": "New contract", + "description": "This is the first time you are interacting with this contract" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractAnalysisResultDto" + } }, - "type": { - "type": "string", - "enum": [ - "value" - ] + "DELEGATECALL": { + "description": "Analysis results for delegatecall operations. Identifies unexpected or potentially dangerous delegate calls.", + "example": [ + { + "severity": "CRITICAL", + "type": "UNEXPECTED_DELEGATECALL", + "title": "Unexpected delegatecall", + "description": "An unexpected delegatecall operation was detected that could be dangerous" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ContractAnalysisResultDto" + } }, - "value": { - "type": "string", - "nullable": true + "FALLBACK_HANDLER": { + "description": "Analysis results for setFallbackHandler operations. Identifies untrusted or unofficial fallback handlers in the transactions.", + "example": [ + { + "severity": "WARN", + "type": "UNOFFICIAL_FALLBACK_HANDLER", + "title": "Unofficial fallback handler", + "description": "Verify the fallback handler is trusted and secure before proceeding.", + "fallbackHandler": { + "address": "0x123", + "name": "CompatibilityFallbackHandler", + "logoUrl": "https://example.com/logo.png" + } + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/FallbackHandlerAnalysisResultDto" + } } - }, - "required": [ - "feature", - "enabled", - "type", - "value" - ] + } }, - "MeteredEntitlement": { + "DeadlockAnalysisResultDto": { "type": "object", "properties": { - "feature": { - "description": "Feature key from the entitlements catalog.", - "allOf": [ - { - "$ref": "#/components/schemas/FeatureKey" - } + "severity": { + "type": "string", + "description": "Severity level indicating the importance and risk", + "enum": [ + "OK", + "INFO", + "WARN", + "CRITICAL" ] }, - "enabled": { - "type": "boolean", - "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." - }, "type": { "type": "string", + "description": "Deadlock analysis status code", "enum": [ - "metered" - ] - }, - "quota": { - "type": "number", - "nullable": true, - "description": "The plan's quota, never inflated to match usage; null means unlimited." - }, - "used": { - "type": "number", - "description": "May legally exceed `quota`." + "DEADLOCK_DETECTED", + "NESTED_SAFE_WARNING", + "FAILED" + ], + "example": "DEADLOCK_DETECTED" }, - "resetsAt": { - "format": "date-time", - "type": "string", - "nullable": true, - "description": "Null for stock-type features (seats) that have no reset window." - } - }, - "required": [ - "feature", - "enabled", - "type", - "quota", - "used", - "resetsAt" - ] - }, - "EntitlementsPlan": { - "type": "object", - "properties": { - "id": { + "title": { "type": "string", - "description": "Plan identifier in the billing service" + "description": "User-facing title of the finding" }, - "name": { + "description": { "type": "string", - "nullable": true + "description": "Detailed description explaining the finding and its implications" }, - "cycleEndsAt": { - "format": "date-time", + "error": { "type": "string", - "nullable": true, - "description": "End of the current billing cycle" + "description": "Error message for failed analysis" } }, "required": [ - "id", - "name", - "cycleEndsAt" + "severity", + "type", + "title", + "description" ] }, - "EntitlementsResponse": { + "DeadlockAnalysisDto": { "type": "object", "properties": { - "plan": { - "nullable": true, - "description": "Null when the workspace has no active subscription.", - "type": "object", - "allOf": [ + "DEADLOCK": { + "description": "Deadlock analysis findings. Identifies signing deadlock risks in nested Safe configurations.", + "example": [ { - "$ref": "#/components/schemas/EntitlementsPlan" + "severity": "CRITICAL", + "type": "DEADLOCK_DETECTED", + "title": "Signing deadlock risk detected", + "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." } - ] - }, - "entitlements": { + ], "type": "array", - "description": "One entry per catalog feature. Which fields an entry carries is decided by `type`: a metered one always carries quota, usage and its reset window, and the others never do.", "items": { - "oneOf": [ - { - "$ref": "#/components/schemas/BinaryEntitlement" - }, - { - "$ref": "#/components/schemas/ValueEntitlement" - }, - { - "$ref": "#/components/schemas/MeteredEntitlement" - } - ], - "discriminator": { - "propertyName": "type", - "mapping": { - "binary": "#/components/schemas/BinaryEntitlement", - "value": "#/components/schemas/ValueEntitlement", - "metered": "#/components/schemas/MeteredEntitlement" - } - } - } - } - }, - "required": [ - "plan", - "entitlements" - ] + "$ref": "#/components/schemas/DeadlockAnalysisResultDto" + } + } + } }, - "SafeList": { + "CounterpartyAnalysisDto": { "type": "object", "properties": { - "safes": { - "type": "array", - "items": { - "type": "string" + "recipient": { + "type": "object", + "description": "Recipient analysis results mapped by address. Contains recipient interaction history and bridge analysis.type: Record.", + "additionalProperties": { + "$ref": "#/components/schemas/RecipientAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "isSafe": true, + "RECIPIENT_INTERACTION": [ + { + "severity": "INFO", + "type": "NEW_RECIPIENT", + "title": "New recipient", + "description": "This is the first time you are interacting with this recipient" + } + ] + } + } + }, + "contract": { + "type": "object", + "description": "Contract analysis results mapped by address. Contains contract verification, interaction history, and delegatecall analysis.type: Record.", + "additionalProperties": { + "$ref": "#/components/schemas/ContractAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "CONTRACT_VERIFICATION": [ + { + "severity": "INFO", + "type": "VERIFIED", + "title": "Verified contract", + "description": "This contract has been verified and its source code is available" + } + ] + } + } + }, + "deadlock": { + "type": "object", + "description": "Deadlock analysis results mapped by Safe address. Contains signing deadlock risk findings for owner/threshold management transactions.", + "additionalProperties": { + "$ref": "#/components/schemas/DeadlockAnalysisDto" + }, + "example": { + "0x0000000000000000000000000000000000000000": { + "DEADLOCK": [ + { + "severity": "CRITICAL", + "type": "DEADLOCK_DETECTED", + "title": "Signing deadlock risk detected", + "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." + } + ] + } } } }, "required": [ - "safes" + "recipient", + "contract", + "deadlock" ] }, - "RelayDto": { + "SurveyOptionDto": { "type": "object", "properties": { - "version": { + "key": { "type": "string" }, - "to": { + "label": { "type": "string" }, - "data": { + "description": { "type": "string" }, - "gasLimit": { - "type": "string", - "nullable": true, - "description": "Accepted for backward compatibility and validation; not forwarded to the relay provider." - }, - "safeTxHash": { - "type": "string", - "description": "Safe transaction hash for relay-fee eligibility check" - }, - "acceptUnverifiedSimulation": { - "type": "boolean", - "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." - } - }, - "required": [ - "version", - "to", - "data" - ] - }, - "Relay": { - "type": "object", - "properties": { - "taskId": { + "icon": { "type": "string" } }, "required": [ - "taskId" + "key", + "label" ] }, - "RelayErrorResponse": { + "SurveyPageDto": { "type": "object", "properties": { - "code": { - "type": "string", - "enum": [ - "SIMULATION_FAILED", - "INDETERMINATE_SIMULATION" - ], - "description": "Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change)." + "id": { + "type": "string" }, - "message": { - "type": "string", - "description": "Human-readable description of the error. Informational only; do not parse." + "title": { + "type": "string" }, - "statusCode": { - "type": "number", - "example": 422 - } - }, - "required": [ - "code", - "message", - "statusCode" - ] - }, - "RelayTaskStatusReceipt": { - "type": "object", - "properties": { - "transactionHash": { + "subtitle": { "type": "string", - "example": "0x4e4bb4493b2183061c3a0106ea96604edcc84f83313dbc0ab718abb1523d1042" + "nullable": true + }, + "multiSelect": { + "type": "boolean" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SurveyOptionDto" + } } }, "required": [ - "transactionHash" + "id", + "title", + "subtitle", + "multiSelect", + "options" ] }, - "RelayTaskStatus": { + "SurveyContentDto": { "type": "object", "properties": { - "status": { - "type": "number", - "description": "Relay task status code: 100=Pending, 110=Submitted, 200=Included, 400=Rejected, 500=Reverted", - "enum": [ - 100, - 110, - 200, - 400, - 500 - ], - "example": 200 - }, - "receipt": { - "description": "On-chain receipt. Only present when status is 200 (Included) or 500 (Reverted)", - "allOf": [ - { - "$ref": "#/components/schemas/RelayTaskStatusReceipt" - } - ] + "pages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SurveyPageDto" + } } }, "required": [ - "status" + "pages" ] }, - "RelaysRemaining": { + "SurveyDto": { "type": "object", "properties": { - "remaining": { + "id": { "type": "number" }, - "limit": { + "slug": { + "type": "string" + }, + "version": { "type": "number" + }, + "title": { + "type": "string" + }, + "subtitle": { + "type": "string", + "nullable": true + }, + "surveyContent": { + "$ref": "#/components/schemas/SurveyContentDto" } }, "required": [ - "remaining", - "limit" + "id", + "slug", + "version", + "title", + "subtitle", + "surveyContent" ] }, - "SafeAppProvider": { + "SpaceSurveyResponseDto": { "type": "object", "properties": { - "url": { + "surveyVersion": { + "type": "number" + }, + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Map from page id → selected option keys" + }, + "submittedAt": { + "format": "date-time", "type": "string" }, - "name": { + "updatedAt": { + "format": "date-time", "type": "string" + }, + "answeredByUserId": { + "type": "number", + "nullable": true } }, "required": [ - "url", - "name" + "surveyVersion", + "selections", + "submittedAt", + "updatedAt", + "answeredByUserId" ] }, - "SafeAppAccessControl": { + "SurveyStateDto": { "type": "object", "properties": { - "type": { - "type": "string" + "survey": { + "$ref": "#/components/schemas/SurveyDto" }, - "value": { + "surveyResponse": { "nullable": true, - "type": "array", - "items": { - "type": "string" - } + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/SpaceSurveyResponseDto" + } + ] } }, "required": [ - "type" + "survey", + "surveyResponse" ] }, - "SafeAppSocialProfile": { + "SubmitSurveyResponseDto": { "type": "object", "properties": { - "platform": { - "type": "string", - "enum": [ - "DISCORD", - "GITHUB", - "TWITTER", - "TELEGRAM", - "UNKNOWN" - ] - }, - "url": { - "type": "string" + "selections": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + }, + "description": "Map from page id → selected option keys", + "example": { + "use_cases": [ + "run_payments", + "hold_assets" + ] + } } }, "required": [ - "platform", - "url" + "selections" ] }, - "SafeApp": { + "SurveyResponseResultDto": { "type": "object", "properties": { "id": { "type": "number" }, - "url": { - "type": "string" - }, - "name": { - "type": "string" - }, - "iconUrl": { + "spaceUuid": { "type": "string", - "nullable": true + "description": "Space UUID" }, - "description": { + "surveySlug": { "type": "string" }, - "chainIds": { - "type": "array", - "items": { - "type": "string" - } + "surveyVersion": { + "type": "number" }, - "provider": { - "nullable": true, + "selections": { "type": "object", - "allOf": [ - { - "$ref": "#/components/schemas/SafeAppProvider" + "additionalProperties": { + "type": "array", + "items": { + "type": "string" } - ] - }, - "accessControl": { - "$ref": "#/components/schemas/SafeAppAccessControl" - }, - "tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "features": { - "type": "array", - "items": { - "type": "string" } }, - "developerWebsite": { - "type": "string", - "nullable": true + "submittedAt": { + "format": "date-time", + "type": "string" }, - "socialProfiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SafeAppSocialProfile" - } + "updatedAt": { + "format": "date-time", + "type": "string" }, - "featured": { - "type": "boolean" + "answeredByUserId": { + "type": "number", + "nullable": true } }, "required": [ "id", - "url", - "name", - "description", - "chainIds", - "accessControl", - "tags", - "features", - "socialProfiles", - "featured" + "spaceUuid", + "surveySlug", + "surveyVersion", + "selections", + "submittedAt", + "updatedAt", + "answeredByUserId" ] }, - "SafeState": { + "FeatureKey": { + "type": "string", + "enum": [ + "safe_seats", + "copilot_scans", + "sponsored_transactions" + ], + "description": "Feature key from the entitlements catalog." + }, + "BinaryEntitlement": { "type": "object", "properties": { - "address": { - "$ref": "#/components/schemas/AddressInfo" - }, - "chainId": { - "type": "string" - }, - "nonce": { - "type": "number" - }, - "threshold": { - "type": "number" - }, - "owners": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } - }, - "implementation": { - "$ref": "#/components/schemas/AddressInfo" - }, - "modules": { - "nullable": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } - }, - "fallbackHandler": { - "nullable": true, - "type": "object", + "feature": { + "description": "Feature key from the entitlements catalog.", "allOf": [ { - "$ref": "#/components/schemas/AddressInfo" + "$ref": "#/components/schemas/FeatureKey" } ] }, - "guard": { - "nullable": true, - "type": "object", + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + }, + "type": { + "type": "string", + "enum": [ + "binary" + ] + } + }, + "required": [ + "feature", + "enabled", + "type" + ] + }, + "ValueEntitlement": { + "type": "object", + "properties": { + "feature": { + "description": "Feature key from the entitlements catalog.", "allOf": [ { - "$ref": "#/components/schemas/AddressInfo" + "$ref": "#/components/schemas/FeatureKey" } ] }, - "version": { - "type": "string", - "nullable": true + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." }, - "implementationVersionState": { + "type": { "type": "string", "enum": [ - "UP_TO_DATE", - "OUTDATED", - "UNKNOWN" + "value" ] }, - "collectiblesTag": { + "value": { "type": "string", "nullable": true + } + }, + "required": [ + "feature", + "enabled", + "type", + "value" + ] + }, + "MeteredEntitlement": { + "type": "object", + "properties": { + "feature": { + "description": "Feature key from the entitlements catalog.", + "allOf": [ + { + "$ref": "#/components/schemas/FeatureKey" + } + ] }, - "txQueuedTag": { + "enabled": { + "type": "boolean", + "description": "Whether the plan grants the feature at all. A metered feature reports its quota and usage even when this is false." + }, + "type": { + "type": "string", + "enum": [ + "metered" + ] + }, + "quota": { + "type": "number", + "nullable": true, + "description": "The plan's quota, never inflated to match usage; null means unlimited." + }, + "used": { + "type": "number", + "description": "May legally exceed `quota`." + }, + "resetsAt": { + "format": "date-time", + "type": "string", + "nullable": true, + "description": "Null for stock-type features (seats) that have no reset window." + } + }, + "required": [ + "feature", + "enabled", + "type", + "quota", + "used", + "resetsAt" + ] + }, + "EntitlementsPlan": { + "type": "object", + "properties": { + "id": { "type": "string", - "nullable": true + "description": "Plan identifier in the billing service" }, - "txHistoryTag": { + "name": { "type": "string", "nullable": true }, - "messagesTag": { + "cycleEndsAt": { + "format": "date-time", "type": "string", - "nullable": true + "nullable": true, + "description": "End of the current billing cycle" } }, "required": [ - "address", - "chainId", - "nonce", - "threshold", - "owners", - "implementation", - "implementationVersionState" + "id", + "name", + "cycleEndsAt" ] }, - "SafeNonces": { + "EntitlementsResponse": { "type": "object", "properties": { - "currentNonce": { - "type": "number" + "plan": { + "nullable": true, + "description": "Null when the workspace has no active subscription.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/EntitlementsPlan" + } + ] }, - "recommendedNonce": { - "type": "number" + "entitlements": { + "type": "array", + "description": "One entry per catalog feature. Which fields an entry carries is decided by `type`: a metered one always carries quota, usage and its reset window, and the others never do.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BinaryEntitlement" + }, + { + "$ref": "#/components/schemas/ValueEntitlement" + }, + { + "$ref": "#/components/schemas/MeteredEntitlement" + } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "binary": "#/components/schemas/BinaryEntitlement", + "value": "#/components/schemas/ValueEntitlement", + "metered": "#/components/schemas/MeteredEntitlement" + } + } + } } }, "required": [ - "currentNonce", - "recommendedNonce" + "plan", + "entitlements" ] }, - "SafeOverview": { + "SpaceRelayDto": { "type": "object", "properties": { - "address": { - "$ref": "#/components/schemas/AddressInfo" - }, - "chainId": { + "version": { "type": "string" }, - "threshold": { - "type": "number" - }, - "owners": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AddressInfo" - } + "to": { + "type": "string" }, - "fiatTotal": { + "data": { "type": "string" }, - "queued": { - "type": "number" + "safeTxHash": { + "type": "string", + "description": "Safe transaction hash, forwarded to the relay provider for traceability. Not verified against the calldata on this route." }, - "awaitingConfirmation": { - "type": "number", - "nullable": true + "acceptUnverifiedSimulation": { + "type": "boolean", + "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." } }, "required": [ - "address", - "chainId", - "threshold", - "owners", - "fiatTotal", - "queued" + "version", + "to", + "data" ] }, - "SingleRecipientAnalysisResultDto": { + "Relay": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { - "type": "string", - "description": "Recipient interaction status code", - "enum": [ - "NEW_RECIPIENT", - "RECURRING_RECIPIENT", - "LOW_ACTIVITY", - "FAILED" - ], - "example": "NEW_RECIPIENT" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" - }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" - }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "taskId": { + "type": "string" } }, "required": [ - "severity", - "type", - "title", - "description" + "taskId" ] }, - "SingleRecipientAnalysisDto": { + "SafeList": { "type": "object", "properties": { - "RECIPIENT_INTERACTION": { - "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", - "example": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" - } - }, - "RECIPIENT_ACTIVITY": { - "description": "Analysis results related to recipient activity. Shows whether this is a low activity recipient. (Available only for Safes)", - "example": [ - { - "severity": "WARN", - "type": "LOW_ACTIVITY", - "title": "Low activity recipient", - "description": "This address has few transactions." - } - ], + "safes": { "type": "array", "items": { - "$ref": "#/components/schemas/SingleRecipientAnalysisResultDto" + "type": "string" } - }, - "isSafe": { - "type": "boolean", - "description": "Indicates whether the analyzed recipient address is a Safe.", - "example": false } }, "required": [ - "RECIPIENT_INTERACTION", - "isSafe" + "safes" ] }, - "CounterpartyAnalysisRequestDto": { + "RelayDto": { "type": "object", "properties": { + "version": { + "type": "string" + }, "to": { - "type": "string", - "description": "Recipient address of the transaction." + "type": "string" }, - "value": { + "data": { + "type": "string" + }, + "gasLimit": { "type": "string", - "description": "Amount to send with the transaction." + "nullable": true, + "description": "Accepted for backward compatibility and validation; not forwarded to the relay provider." }, - "data": { + "safeTxHash": { "type": "string", - "description": "Hex-encoded data payload for the transaction." + "description": "Safe transaction hash for relay-fee eligibility check" }, - "operation": { - "type": "number", - "enum": [ - 0, - 1 - ], - "description": "Operation type: 0 for CALL, 1 for DELEGATECALL." + "acceptUnverifiedSimulation": { + "type": "boolean", + "description": "Set to true to proceed with the relay when a previous attempt returned INDETERMINATE_SIMULATION. The user has acknowledged the simulation could not be completed and accepts the risk." } }, "required": [ + "version", "to", - "value", - "data", - "operation" + "data" ] }, - "RecipientResultDto": { + "RelayErrorResponse": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { + "code": { "type": "string", - "description": "Bridge compatibility status code", "enum": [ - "NEW_RECIPIENT", - "RECURRING_RECIPIENT", - "LOW_ACTIVITY", - "INCOMPATIBLE_SAFE", - "MISSING_OWNERSHIP", - "UNSUPPORTED_NETWORK", - "DIFFERENT_SAFE_SETUP", - "FAILED" + "SIMULATION_FAILED", + "INDETERMINATE_SIMULATION" ], - "example": "MISSING_OWNERSHIP" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" - }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "description": "Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change)." }, - "error": { + "message": { "type": "string", - "description": "Error message for failed analysis" + "description": "Human-readable description of the error. Informational only; do not parse." }, - "targetChainId": { + "statusCode": { + "type": "number", + "example": 422 + } + }, + "required": [ + "code", + "message", + "statusCode" + ] + }, + "RelayTaskStatusReceipt": { + "type": "object", + "properties": { + "transactionHash": { "type": "string", - "description": "Target chain ID for bridge operations. Only present for BridgeStatus." + "example": "0x4e4bb4493b2183061c3a0106ea96604edcc84f83313dbc0ab718abb1523d1042" } }, "required": [ - "severity", - "type", - "title", - "description" + "transactionHash" ] }, - "RecipientAnalysisDto": { + "RelayTaskStatus": { "type": "object", "properties": { - "isSafe": { - "type": "boolean", - "description": "Indicates whether the analyzed recipient address is a Safe.", - "example": true - }, - "RECIPIENT_INTERACTION": { - "description": "Analysis results related to recipient interaction history. Shows whether this is a new or recurring recipient.", - "example": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientResultDto" - } - }, - "RECIPIENT_ACTIVITY": { - "description": "Analysis results related to recipient activity frequency. Shows whether this is a low activity recipient.", - "example": [ - { - "severity": "WARN", - "type": "LOW_ACTIVITY", - "title": "Low activity recipient", - "description": "This address has few transactions." - } + "status": { + "type": "number", + "description": "Relay task status code: 100=Pending, 110=Submitted, 200=Included, 400=Rejected, 500=Reverted", + "enum": [ + 100, + 110, + 200, + 400, + 500 ], - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientResultDto" - } + "example": 200 }, - "BRIDGE": { - "description": "Analysis results for cross-chain bridge operations. Identifies compatibility issues, ownership problems, or unsupported networks.", - "example": [ + "receipt": { + "description": "On-chain receipt. Only present when status is 200 (Included) or 500 (Reverted)", + "allOf": [ { - "severity": "WARN", - "type": "MISSING_OWNERSHIP", - "title": "No ownership on target chain", - "description": "You do not have ownership of a Safe on the target chain.", - "targetChainId": "137" + "$ref": "#/components/schemas/RelayTaskStatusReceipt" } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/RecipientResultDto" - } + ] } }, "required": [ - "isSafe" + "status" ] }, - "ContractAnalysisResultDto": { + "RelaysRemaining": { "type": "object", "properties": { - "severity": { - "type": "string", - "description": "Severity level indicating the importance and risk", - "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" - ] - }, - "type": { - "type": "string", - "description": "Contract verification status code", - "enum": [ - "VERIFIED", - "NOT_VERIFIED", - "NOT_VERIFIED_BY_SAFE", - "VERIFICATION_UNAVAILABLE", - "NEW_CONTRACT", - "KNOWN_CONTRACT", - "UNEXPECTED_DELEGATECALL", - "UNOFFICIAL_FALLBACK_HANDLER", - "FAILED" - ], - "example": "VERIFIED" - }, - "title": { - "type": "string", - "description": "User-facing title of the finding" - }, - "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "remaining": { + "type": "number" }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "limit": { + "type": "number" } }, "required": [ - "severity", - "type", - "title", - "description" + "remaining", + "limit" ] }, - "FallbackHandlerInfoDto": { + "SafeAppProvider": { "type": "object", "properties": { - "address": { - "type": "string", - "description": "Address of the fallback handler contract" + "url": { + "type": "string" }, "name": { - "type": "string", - "description": "Name of the fallback handler contract" + "type": "string" + } + }, + "required": [ + "url", + "name" + ] + }, + "SafeAppAccessControl": { + "type": "object", + "properties": { + "type": { + "type": "string" }, - "logoUrl": { - "type": "string", - "description": "Logo URL for the fallback handler contract" + "value": { + "nullable": true, + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "address" + "type" ] }, - "FallbackHandlerAnalysisResultDto": { + "SafeAppSocialProfile": { "type": "object", "properties": { - "severity": { + "platform": { "type": "string", - "description": "Severity level indicating the importance and risk", "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" + "DISCORD", + "GITHUB", + "TWITTER", + "TELEGRAM", + "UNKNOWN" ] }, - "type": { - "type": "string", - "description": "Status code for unofficial fallback handler", - "enum": [ - "UNOFFICIAL_FALLBACK_HANDLER" - ], - "example": "VERIFIED" + "url": { + "type": "string" + } + }, + "required": [ + "platform", + "url" + ] + }, + "SafeApp": { + "type": "object", + "properties": { + "id": { + "type": "number" }, - "title": { + "url": { + "type": "string" + }, + "name": { + "type": "string" + }, + "iconUrl": { "type": "string", - "description": "User-facing title of the finding" + "nullable": true }, "description": { - "type": "string", - "description": "Detailed description explaining the finding and its implications" + "type": "string" }, - "error": { - "type": "string", - "description": "Error message for failed analysis" + "chainIds": { + "type": "array", + "items": { + "type": "string" + } }, - "fallbackHandler": { - "description": "Information about the fallback handler", + "provider": { + "nullable": true, + "type": "object", "allOf": [ { - "$ref": "#/components/schemas/FallbackHandlerInfoDto" + "$ref": "#/components/schemas/SafeAppProvider" } ] + }, + "accessControl": { + "$ref": "#/components/schemas/SafeAppAccessControl" + }, + "tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "developerWebsite": { + "type": "string", + "nullable": true + }, + "socialProfiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SafeAppSocialProfile" + } + }, + "featured": { + "type": "boolean" } }, "required": [ - "severity", - "type", - "title", - "description" + "id", + "url", + "name", + "description", + "chainIds", + "accessControl", + "tags", + "features", + "socialProfiles", + "featured" ] }, - "ContractAnalysisDto": { + "SafeState": { "type": "object", "properties": { - "logoUrl": { - "type": "string", - "description": "Logo URL for the contract", - "example": "https://example.com/logo.png" + "address": { + "$ref": "#/components/schemas/AddressInfo" }, - "name": { - "type": "string", - "description": "Name of the contract", - "example": "Uniswap V3 Router" + "chainId": { + "type": "string" }, - "CONTRACT_VERIFICATION": { - "description": "Analysis results for contract verification status. Shows whether contracts are verified and source code is available.", - "example": [ - { - "severity": "INFO", - "type": "VERIFIED", - "title": "Verified contract", - "description": "This contract has been verified and its source code is available" - } - ], + "nonce": { + "type": "number" + }, + "threshold": { + "type": "number" + }, + "owners": { "type": "array", "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" + "$ref": "#/components/schemas/AddressInfo" } }, - "CONTRACT_INTERACTION": { - "description": "Analysis results related to contract interaction history. Shows whether this is a new or previously interacted contract.", - "example": [ - { - "severity": "INFO", - "type": "NEW_CONTRACT", - "title": "New contract", - "description": "This is the first time you are interacting with this contract" - } - ], + "implementation": { + "$ref": "#/components/schemas/AddressInfo" + }, + "modules": { + "nullable": true, "type": "array", "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" + "$ref": "#/components/schemas/AddressInfo" } }, - "DELEGATECALL": { - "description": "Analysis results for delegatecall operations. Identifies unexpected or potentially dangerous delegate calls.", - "example": [ + "fallbackHandler": { + "nullable": true, + "type": "object", + "allOf": [ { - "severity": "CRITICAL", - "type": "UNEXPECTED_DELEGATECALL", - "title": "Unexpected delegatecall", - "description": "An unexpected delegatecall operation was detected that could be dangerous" + "$ref": "#/components/schemas/AddressInfo" } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ContractAnalysisResultDto" - } + ] }, - "FALLBACK_HANDLER": { - "description": "Analysis results for setFallbackHandler operations. Identifies untrusted or unofficial fallback handlers in the transactions.", - "example": [ + "guard": { + "nullable": true, + "type": "object", + "allOf": [ { - "severity": "WARN", - "type": "UNOFFICIAL_FALLBACK_HANDLER", - "title": "Unofficial fallback handler", - "description": "Verify the fallback handler is trusted and secure before proceeding.", - "fallbackHandler": { - "address": "0x123", - "name": "CompatibilityFallbackHandler", - "logoUrl": "https://example.com/logo.png" - } + "$ref": "#/components/schemas/AddressInfo" } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/FallbackHandlerAnalysisResultDto" - } - } - } - }, - "DeadlockAnalysisResultDto": { - "type": "object", - "properties": { - "severity": { + ] + }, + "version": { + "type": "string", + "nullable": true + }, + "implementationVersionState": { "type": "string", - "description": "Severity level indicating the importance and risk", "enum": [ - "OK", - "INFO", - "WARN", - "CRITICAL" + "UP_TO_DATE", + "OUTDATED", + "UNKNOWN" ] }, - "type": { + "collectiblesTag": { "type": "string", - "description": "Deadlock analysis status code", - "enum": [ - "DEADLOCK_DETECTED", - "NESTED_SAFE_WARNING", - "FAILED" - ], - "example": "DEADLOCK_DETECTED" + "nullable": true }, - "title": { + "txQueuedTag": { "type": "string", - "description": "User-facing title of the finding" + "nullable": true }, - "description": { + "txHistoryTag": { "type": "string", - "description": "Detailed description explaining the finding and its implications" + "nullable": true }, - "error": { + "messagesTag": { "type": "string", - "description": "Error message for failed analysis" + "nullable": true } }, "required": [ - "severity", - "type", - "title", - "description" + "address", + "chainId", + "nonce", + "threshold", + "owners", + "implementation", + "implementationVersionState" ] }, - "DeadlockAnalysisDto": { + "SafeNonces": { "type": "object", "properties": { - "DEADLOCK": { - "description": "Deadlock analysis findings. Identifies signing deadlock risks in nested Safe configurations.", - "example": [ - { - "severity": "CRITICAL", - "type": "DEADLOCK_DETECTED", - "title": "Signing deadlock risk detected", - "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/DeadlockAnalysisResultDto" - } + "currentNonce": { + "type": "number" + }, + "recommendedNonce": { + "type": "number" } - } + }, + "required": [ + "currentNonce", + "recommendedNonce" + ] }, - "CounterpartyAnalysisDto": { + "SafeOverview": { "type": "object", "properties": { - "recipient": { - "type": "object", - "description": "Recipient analysis results mapped by address. Contains recipient interaction history and bridge analysis.type: Record.", - "additionalProperties": { - "$ref": "#/components/schemas/RecipientAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "isSafe": true, - "RECIPIENT_INTERACTION": [ - { - "severity": "INFO", - "type": "NEW_RECIPIENT", - "title": "New recipient", - "description": "This is the first time you are interacting with this recipient" - } - ] - } - } + "address": { + "$ref": "#/components/schemas/AddressInfo" }, - "contract": { - "type": "object", - "description": "Contract analysis results mapped by address. Contains contract verification, interaction history, and delegatecall analysis.type: Record.", - "additionalProperties": { - "$ref": "#/components/schemas/ContractAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "CONTRACT_VERIFICATION": [ - { - "severity": "INFO", - "type": "VERIFIED", - "title": "Verified contract", - "description": "This contract has been verified and its source code is available" - } - ] - } - } + "chainId": { + "type": "string" }, - "deadlock": { - "type": "object", - "description": "Deadlock analysis results mapped by Safe address. Contains signing deadlock risk findings for owner/threshold management transactions.", - "additionalProperties": { - "$ref": "#/components/schemas/DeadlockAnalysisDto" - }, - "example": { - "0x0000000000000000000000000000000000000000": { - "DEADLOCK": [ - { - "severity": "CRITICAL", - "type": "DEADLOCK_DETECTED", - "title": "Signing deadlock risk detected", - "description": "This change may create a signing cycle between Safes and can permanently lock funds. You will not be allowed to proceed forward." - } - ] - } + "threshold": { + "type": "number" + }, + "owners": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AddressInfo" } + }, + "fiatTotal": { + "type": "string" + }, + "queued": { + "type": "number" + }, + "awaitingConfirmation": { + "type": "number", + "nullable": true } }, "required": [ - "recipient", - "contract", - "deadlock" + "address", + "chainId", + "threshold", + "owners", + "fiatTotal", + "queued" ] }, "ThreatAnalysisRequestDto": { @@ -14355,25 +15258,6 @@ "address" ] }, - "SafeAppInfo": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "logoUri": { - "type": "string", - "nullable": true - } - }, - "required": [ - "name", - "url" - ] - }, "TransactionDetails": { "type": "object", "properties": { @@ -15084,6 +15968,64 @@ "results" ] }, + "NestedTransactionDto": { + "type": "object", + "properties": { + "to": { + "type": "string", + "nullable": true + }, + "value": { + "type": "string" + }, + "data": { + "type": "string", + "nullable": true + }, + "operation": { + "description": "Operation type: 0 for CALL, 1 for DELEGATE", + "allOf": [ + { + "$ref": "#/components/schemas/Operation" + } + ] + }, + "safeTxGas": { + "type": "string" + }, + "baseGas": { + "type": "string" + }, + "gasPrice": { + "type": "string" + }, + "gasToken": { + "type": "string", + "nullable": true + }, + "refundReceiver": { + "type": "string", + "nullable": true + }, + "nonce": { + "type": "string", + "description": "The nested Safe's nonce" + }, + "notes": { + "type": "string", + "nullable": true, + "maxLength": 200 + } + }, + "required": [ + "value", + "operation", + "safeTxGas", + "baseGas", + "gasPrice", + "nonce" + ] + }, "ProposeTransactionDto": { "type": "object", "properties": { @@ -15137,6 +16079,16 @@ "origin": { "type": "string", "nullable": true + }, + "nestedTransaction": { + "nullable": true, + "description": "A child transaction for a second Safe, authorised by the parent transaction being an `approveHash` call committing to its hash. Unknown keys are rejected.", + "type": "object", + "allOf": [ + { + "$ref": "#/components/schemas/NestedTransactionDto" + } + ] } }, "required": [ @@ -15435,6 +16387,169 @@ "signature" ] }, + "UpdateDelegateV3Dto": { + "type": "object", + "properties": { + "safe": { + "type": "string", + "nullable": true + }, + "delegate": { + "type": "string" + }, + "delegator": { + "type": "string" + }, + "signature": { + "type": "string" + }, + "label": { + "type": "string" + } + }, + "required": [ + "delegate", + "delegator", + "signature", + "label" + ] + }, + "DeleteDelegateV3Dto": { + "type": "object", + "properties": { + "delegator": { + "type": "string", + "nullable": true + }, + "safe": { + "type": "string", + "nullable": true + }, + "signature": { + "type": "string" + } + }, + "required": [ + "signature" + ] + }, + "NativeTokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "NATIVE_TOKEN" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, + "Erc20TokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "ERC20" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, + "Erc721TokenMetadata": { + "type": "object", + "properties": { + "address": { + "type": "string" + }, + "decimals": { + "type": "number" + }, + "logoUri": { + "type": "string" + }, + "name": { + "type": "string" + }, + "symbol": { + "type": "string" + }, + "trusted": { + "type": "boolean", + "description": "Whether the Transaction Service lists the token in one of its imported token lists" + }, + "type": { + "type": "string", + "enum": [ + "ERC721" + ] + } + }, + "required": [ + "address", + "decimals", + "logoUri", + "name", + "symbol", + "trusted", + "type" + ] + }, "SafeRegistration": { "type": "object", "properties": { diff --git a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash index 3de9ddc227..67d0e10599 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash +++ b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash @@ -1 +1 @@ -e9984df7d8acc32efa5370bd62918903c1a9aedda334828d00ef55ff0e922556 +993717f10c2d69b1bb43cd0b9bf595091e2bb586a37ddcefce4bb799e197506d diff --git a/packages/store/src/gateway/AUTO_GENERATED/delegates.ts b/packages/store/src/gateway/AUTO_GENERATED/delegates.ts index 1cee45c510..4f7910b2ef 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/delegates.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/delegates.ts @@ -64,6 +64,43 @@ const injectedRtkApi = api }), invalidatesTags: ['delegates'], }), + delegatesGetDelegatesV3: build.query({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + params: { + cursor: queryArg.cursor, + label: queryArg.label, + delegator: queryArg.delegator, + delegate: queryArg.delegate, + safe: queryArg.safe, + }, + }), + providesTags: ['delegates'], + }), + delegatesPostDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + method: 'POST', + body: queryArg.createDelegateDto, + }), + invalidatesTags: ['delegates'], + }), + delegatesUpdateDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates`, + method: 'PATCH', + body: queryArg.updateDelegateV3Dto, + }), + invalidatesTags: ['delegates'], + }), + delegatesDeleteDelegateV3: build.mutation({ + query: (queryArg) => ({ + url: `/v3/chains/${queryArg.chainId}/delegates/${queryArg.delegateAddress}`, + method: 'DELETE', + body: queryArg.deleteDelegateV3Dto, + }), + invalidatesTags: ['delegates'], + }), }), overrideExisting: false, }) @@ -132,6 +169,45 @@ export type DelegatesDeleteDelegateV2ApiArg = { /** Signature and data proving authorization to delete the delegate */ deleteDelegateV2Dto: DeleteDelegateV2Dto } +export type DelegatesGetDelegatesV3ApiResponse = + /** status 200 Paginated list of delegates retrieved successfully */ DelegatePage +export type DelegatesGetDelegatesV3ApiArg = { + /** Chain ID where delegates are registered */ + chainId: string + /** Pagination cursor for retrieving the next set of results */ + cursor?: string + /** Filter by delegate label or name */ + label?: string + /** Filter by delegator address (0x prefixed hex string) */ + delegator?: string + /** Filter by delegate address (0x prefixed hex string) */ + delegate?: string + /** Filter by Safe address (0x prefixed hex string) */ + safe?: string +} +export type DelegatesPostDelegateV3ApiResponse = unknown +export type DelegatesPostDelegateV3ApiArg = { + /** Chain ID where the delegate will be registered */ + chainId: string + /** Delegate creation data including Safe address, delegate address, label, and authorization signature */ + createDelegateDto: CreateDelegateDto +} +export type DelegatesUpdateDelegateV3ApiResponse = unknown +export type DelegatesUpdateDelegateV3ApiArg = { + /** Chain ID where the delegate is registered */ + chainId: string + /** Delegate update data including Safe address, delegate address, delegator, label, and authorization signature */ + updateDelegateV3Dto: UpdateDelegateV3Dto +} +export type DelegatesDeleteDelegateV3ApiResponse = unknown +export type DelegatesDeleteDelegateV3ApiArg = { + /** Chain ID where the delegate is registered */ + chainId: string + /** Delegate address to remove (0x prefixed hex string) */ + delegateAddress: string + /** Signature and data proving authorization to delete the delegate */ + deleteDelegateV3Dto: DeleteDelegateV3Dto +} export type Delegate = { safe?: string | null delegate: string @@ -161,6 +237,18 @@ export type DeleteDelegateV2Dto = { safe?: string | null signature: string } +export type UpdateDelegateV3Dto = { + safe?: string | null + delegate: string + delegator: string + signature: string + label: string +} +export type DeleteDelegateV3Dto = { + delegator?: string | null + safe?: string | null + signature: string +} export const { useDelegatesGetDelegatesV1Query, useLazyDelegatesGetDelegatesV1Query, @@ -170,4 +258,9 @@ export const { useLazyDelegatesGetDelegatesV2Query, useDelegatesPostDelegateV2Mutation, useDelegatesDeleteDelegateV2Mutation, + useDelegatesGetDelegatesV3Query, + useLazyDelegatesGetDelegatesV3Query, + useDelegatesPostDelegateV3Mutation, + useDelegatesUpdateDelegateV3Mutation, + useDelegatesDeleteDelegateV3Mutation, } = injectedRtkApi diff --git a/packages/store/src/gateway/AUTO_GENERATED/messages.ts b/packages/store/src/gateway/AUTO_GENERATED/messages.ts index d552d041f7..de701806da 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/messages.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/messages.ts @@ -110,35 +110,45 @@ export type MessageConfirmation = { owner: AddressInfo signature: string } +export type SafeAppInfo = { + id: number + name: string + url: string + logoUri?: string | null +} export type Message = { messageHash: string status: 'NEEDS_CONFIRMATION' | 'CONFIRMED' - logoUri?: string | null - name?: string | null + logoUri: string | null + name: string | null message: string | TypedData creationTimestamp: number modifiedTimestamp: number confirmationsSubmitted: number confirmationsRequired: number - proposedBy: AddressInfo + proposedBy: AddressInfo | null confirmations: MessageConfirmation[] - preparedSignature?: string | null - origin?: string | null + preparedSignature: string | null + origin: string | null + safeAppInfo: SafeAppInfo | null + safeAppId: number | null } export type MessageItem = { messageHash: string status: 'NEEDS_CONFIRMATION' | 'CONFIRMED' - logoUri?: string | null - name?: string | null + logoUri: string | null + name: string | null message: string | TypedData creationTimestamp: number modifiedTimestamp: number confirmationsSubmitted: number confirmationsRequired: number - proposedBy: AddressInfo + proposedBy: AddressInfo | null confirmations: MessageConfirmation[] - preparedSignature?: string | null - origin?: string | null + preparedSignature: string | null + origin: string | null + safeAppInfo: SafeAppInfo | null + safeAppId: number | null type: 'MESSAGE' } export type DateLabel = { diff --git a/packages/store/src/gateway/AUTO_GENERATED/spaces.ts b/packages/store/src/gateway/AUTO_GENERATED/spaces.ts index b9cb1d8fa2..4b29bd5c53 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/spaces.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/spaces.ts @@ -515,6 +515,8 @@ export type SpaceAuditLogEntryDto = { | 'SAFE_REMOVED' | 'ADDRESS_BOOK_UPSERTED' | 'ADDRESS_BOOK_DELETED' + | 'ADDRESS_BOOK_REQUEST_CREATED' + | 'ADDRESS_BOOK_REQUEST_REJECTED' actorUserId: number /** Resolved (and masked) display string of the acting user. */ actor: string @@ -631,7 +633,7 @@ export type EntitlementsPlan = { /** End of the current billing cycle */ cycleEndsAt: string | null } -export type FeatureKey = 'safe_seats' +export type FeatureKey = 'safe_seats' | 'copilot_scans' | 'sponsored_transactions' export type BinaryEntitlement = { /** Feature key from the entitlements catalog. */ feature: FeatureKey diff --git a/packages/store/src/gateway/AUTO_GENERATED/transactions.ts b/packages/store/src/gateway/AUTO_GENERATED/transactions.ts index 95702cf601..8b5d729fd6 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/transactions.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/transactions.ts @@ -206,7 +206,7 @@ export type TransactionsGetModuleTransactionsV1ApiArg = { cursor?: string } export type TransactionsAddConfirmationV1ApiResponse = - /** status 200 Transaction details with updated confirmation status */ Transaction + /** status 200 Transaction details with updated confirmation status */ TransactionDetails export type TransactionsAddConfirmationV1ApiArg = { /** Chain ID where the Safe is deployed */ chainId: string @@ -809,6 +809,7 @@ export type ModuleExecutionDetails = { address: AddressInfo } export type SafeAppInfo = { + id: number name: string url: string logoUri?: string | null @@ -975,6 +976,21 @@ export type TransactionItemPage = { previous?: string | null results: (TransactionItem | DateLabel)[] } +export type NestedTransactionDto = { + to?: string | null + value: string + data?: string | null + /** Operation type: 0 for CALL, 1 for DELEGATE */ + operation: Operation + safeTxGas: string + baseGas: string + gasPrice: string + gasToken?: string | null + refundReceiver?: string | null + /** The nested Safe's nonce */ + nonce: string + notes?: string | null +} export type ProposeTransactionDto = { to: string value: string @@ -991,6 +1007,8 @@ export type ProposeTransactionDto = { sender: string signature?: string | null origin?: string | null + /** A child transaction for a second Safe, authorised by the parent transaction being an `approveHash` call committing to its hash. Unknown keys are rejected. */ + nestedTransaction?: NestedTransactionDto | null } export type CreationTransaction = { created: string