Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,273 changes: 4,246 additions & 2,027 deletions packages/store/scripts/api-schema/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/store/src/gateway/AUTO_GENERATED/.schema-hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e9984df7d8acc32efa5370bd62918903c1a9aedda334828d00ef55ff0e922556
8effdee12a6cc8346f753081903bb05abafee29d5cebb5dbcf63806561363e4c
3 changes: 3 additions & 0 deletions packages/store/src/gateway/AUTO_GENERATED/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@ export type Theme = {
export type Relayer = {
type: ('GTF' | 'RELAY_FEE' | 'DAILY_LIMIT' | 'NO_FEE_CAMPAIGN') | null
safeCreationSponsored: boolean
/** Use gasPaymentOptions instead. */
safeTransactionSponsored: boolean
enableTenderlySimulationBeforeRelay: boolean
/** Who may pay for a relayed transaction on this chain. */
gasPaymentOptions: ('FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN')[]
}
export type Chain = {
chainId: string
Expand Down
93 changes: 93 additions & 0 deletions packages/store/src/gateway/AUTO_GENERATED/delegates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,43 @@ const injectedRtkApi = api
}),
invalidatesTags: ['delegates'],
}),
delegatesGetDelegatesV3: build.query<DelegatesGetDelegatesV3ApiResponse, DelegatesGetDelegatesV3ApiArg>({
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<DelegatesPostDelegateV3ApiResponse, DelegatesPostDelegateV3ApiArg>({
query: (queryArg) => ({
url: `/v3/chains/${queryArg.chainId}/delegates`,
method: 'POST',
body: queryArg.createDelegateDto,
}),
invalidatesTags: ['delegates'],
}),
delegatesUpdateDelegateV3: build.mutation<DelegatesUpdateDelegateV3ApiResponse, DelegatesUpdateDelegateV3ApiArg>({
query: (queryArg) => ({
url: `/v3/chains/${queryArg.chainId}/delegates`,
method: 'PATCH',
body: queryArg.updateDelegateV3Dto,
}),
invalidatesTags: ['delegates'],
}),
delegatesDeleteDelegateV3: build.mutation<DelegatesDeleteDelegateV3ApiResponse, DelegatesDeleteDelegateV3ApiArg>({
query: (queryArg) => ({
url: `/v3/chains/${queryArg.chainId}/delegates/${queryArg.delegateAddress}`,
method: 'DELETE',
body: queryArg.deleteDelegateV3Dto,
}),
invalidatesTags: ['delegates'],
}),
}),
overrideExisting: false,
})
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -170,4 +258,9 @@ export const {
useLazyDelegatesGetDelegatesV2Query,
useDelegatesPostDelegateV2Mutation,
useDelegatesDeleteDelegateV2Mutation,
useDelegatesGetDelegatesV3Query,
useLazyDelegatesGetDelegatesV3Query,
useDelegatesPostDelegateV3Mutation,
useDelegatesUpdateDelegateV3Mutation,
useDelegatesDeleteDelegateV3Mutation,
} = injectedRtkApi
30 changes: 20 additions & 10 deletions packages/store/src/gateway/AUTO_GENERATED/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 IMPORTANT: Breaking Type Contract Change for proposedBy

Failure Trace:

  1. The diff changes proposedBy in Message and MessageItem from AddressInfo (required, non-null) to AddressInfo | null (required, nullable).
    2. Existing client code (outside this diff) likely contains patterns like message.proposedBy.address or message.proposedBy.name based on the previous type definition.
    3. If the API now returns null for proposedBy (which is now a valid state per the new type), the client code will throw a TypeError: Cannot read properties of null (reading 'address') at runtime.
    4. Even if the API never returns null, the type change forces all consumers to add null checks, indicating a semantic shift in the data contract that breaks existing type-safe code.

Actionable Fix:
This is a generated file. The fix must be applied to the source of truth (the API schema or the code generator configuration) to ensure backward compatibility or to coordinate a breaking release. If this is an intentional breaking change, ensure all consumers are updated to handle null for proposedBy. If not, revert the schema change to keep proposedBy as AddressInfo (non-nullable) or ensure the generator marks it as optional AddressInfo | undefined if the field can be absent, rather than nullable AddressInfo | null if the field is always present but can be null.

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 = {
Expand Down
14 changes: 13 additions & 1 deletion packages/store/src/gateway/AUTO_GENERATED/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,24 @@ export type RelayGetRelaysRemainingV1ApiArg = {
chainId: string
/** Safe contract address (0x prefixed hex string) */
safeAddress: string
/** Safe transaction hash (0x prefixed hex string). Required on relay-fee chains to check per-transaction eligibility with the fee service. Optional on daily-limit and no-fee-campaign chains. */
/** Safe transaction hash (0x prefixed hex string). Ignored; kept so existing clients do not break. */
safeTxHash?: string
}
export type Relay = {
taskId: string
}
export type GasPaymentOptionUnavailableResponse = {
code: 'GAS_PAYMENT_OPTION_UNAVAILABLE'
/** Human-readable description of the error. Informational only; do not parse. */
message: string
statusCode: number
/** The gas payment option the request needed. */
requested: 'FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN'
/** NOT_LISTED: the chain does not list the option. NO_RELAYER: the chain has no relayer. NOT_A_WORKSPACE_SAFE: the Safe is not one the workspace holds. REFUNDING_TRANSACTION: the transaction would refund gas (`gasPrice` > 0). */
reason: 'NOT_LISTED' | 'NO_RELAYER' | 'NOT_A_WORKSPACE_SAFE' | 'REFUNDING_TRANSACTION'
/** The options the chain lists; empty without a relayer. */
available: ('FREE_DAILY_LIMIT' | 'SUBSCRIPTION' | 'PAY_FROM_SAFE' | 'NO_FEE_CAMPAIGN')[]
}
export type RelayErrorResponse = {
/** Stable identifier of the error condition. The frontend MUST branch on this value (not on `message`, which is informational and may change). */
code: 'SIMULATION_FAILED' | 'INDETERMINATE_SIMULATION'
Expand Down
39 changes: 38 additions & 1 deletion packages/store/src/gateway/AUTO_GENERATED/spaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ const injectedRtkApi = api
}),
invalidatesTags: ['spaces'],
}),
spaceSafesGetAllV1: build.query<SpaceSafesGetAllV1ApiResponse, SpaceSafesGetAllV1ApiArg>({
query: () => ({ url: `/v1/spaces/safes` }),
providesTags: ['spaces'],
}),
membersInviteUserV1: build.mutation<MembersInviteUserV1ApiResponse, MembersInviteUserV1ApiArg>({
query: (queryArg) => ({
url: `/v1/spaces/${queryArg.spaceId}/members/invite`,
Expand Down Expand Up @@ -199,6 +203,13 @@ const injectedRtkApi = api
query: (queryArg) => ({ url: `/v1/spaces/${queryArg.spaceId}/counterfactual-safes` }),
providesTags: ['spaces'],
}),
entitlementsGetAllEntitlementsV1: build.query<
EntitlementsGetAllEntitlementsV1ApiResponse,
EntitlementsGetAllEntitlementsV1ApiArg
>({
query: () => ({ url: `/v1/spaces/entitlements` }),
providesTags: ['entitlements'],
}),
entitlementsGetEntitlementsV1: build.query<
EntitlementsGetEntitlementsV1ApiResponse,
EntitlementsGetEntitlementsV1ApiArg
Expand Down Expand Up @@ -325,6 +336,9 @@ export type SpaceSafesDeleteV1ApiArg = {
/** List of Safe addresses and their chain information to remove from the space */
deleteSpaceSafesDto: DeleteSpaceSafesDto
}
export type SpaceSafesGetAllV1ApiResponse =
/** status 200 Safes of all spaces retrieved successfully */ GetSpacesSafesResponse[]
export type SpaceSafesGetAllV1ApiArg = void
export type MembersInviteUserV1ApiResponse = /** status 200 Users invited successfully */ Invitation[]
export type MembersInviteUserV1ApiArg = {
/** Space UUID to invite users to */
Expand Down Expand Up @@ -394,6 +408,10 @@ export type SpaceCounterfactualSafesGetV1ApiArg = {
/** Space UUID */
spaceId: string
}
export type EntitlementsGetAllEntitlementsV1ApiResponse = /** status 200 */ {
[key: string]: EntitlementsResponse
}
export type EntitlementsGetAllEntitlementsV1ApiArg = void
export type EntitlementsGetEntitlementsV1ApiResponse = /** status 200 */ EntitlementsResponse
export type EntitlementsGetEntitlementsV1ApiArg = {
/** Space UUID */
Expand Down Expand Up @@ -515,6 +533,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
Expand All @@ -541,6 +561,8 @@ export type SpaceSafeDto = {
}
export type CreateSpaceSafesDto = {
safes: SpaceSafeDto[]
/** Address book entries to upsert for the added Safes, in the same transaction: if either write fails, neither is kept. */
addressBookItems?: AddressBookItem[]
}
export type GetSpaceSafeResponse = {
safes: {
Expand All @@ -550,6 +572,13 @@ export type GetSpaceSafeResponse = {
export type DeleteSpaceSafesDto = {
safes: SpaceSafeDto[]
}
export type GetSpacesSafesResponse = {
safes: {
[key: string]: string[]
}
/** Space UUID */
spaceUuid: string
}
export type Invitation = {
userId: number
name: string
Expand Down Expand Up @@ -581,6 +610,7 @@ export type MemberUser = {
id: number
status: 'PENDING' | 'ACTIVE'
email: string | null
address: string | null
}
export type MemberDto = {
id: number
Expand Down Expand Up @@ -624,14 +654,17 @@ export type GetCounterfactualSafesResponse = {
[key: string]: GetCounterfactualSafeItem[]
}
}
export type EntitlementsPlanStatus = 'active' | 'trialing'
export type EntitlementsPlan = {
/** Plan identifier in the billing service */
id: string
name: string | null
/** End of the current billing cycle */
cycleEndsAt: string | null
/** Status of the subscription the plan comes from */
status: EntitlementsPlanStatus
}
export type FeatureKey = 'safe_seats'
export type FeatureKey = 'safe_seats' | 'copilot_scans' | 'sponsored_transactions' | 'policies'
export type BinaryEntitlement = {
/** Feature key from the entitlements catalog. */
feature: FeatureKey
Expand Down Expand Up @@ -701,6 +734,8 @@ export const {
useSpaceSafesGetV1Query,
useLazySpaceSafesGetV1Query,
useSpaceSafesDeleteV1Mutation,
useSpaceSafesGetAllV1Query,
useLazySpaceSafesGetAllV1Query,
useMembersInviteUserV1Mutation,
useMembersAcceptInviteV1Mutation,
useMembersDeclineInviteV1Mutation,
Expand All @@ -715,6 +750,8 @@ export const {
useMembersRemoveUserV1Mutation,
useSpaceCounterfactualSafesGetV1Query,
useLazySpaceCounterfactualSafesGetV1Query,
useEntitlementsGetAllEntitlementsV1Query,
useLazyEntitlementsGetAllEntitlementsV1Query,
useEntitlementsGetEntitlementsV1Query,
useLazyEntitlementsGetEntitlementsV1Query,
} = injectedRtkApi
20 changes: 19 additions & 1 deletion packages/store/src/gateway/AUTO_GENERATED/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -809,6 +809,7 @@ export type ModuleExecutionDetails = {
address: AddressInfo
}
export type SafeAppInfo = {
id: number
name: string
url: string
logoUri?: string | null
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading