From c34ae6f649e513c086721e03f3a91b25a5849aba Mon Sep 17 00:00:00 2001 From: JOY <5027251+JOY@users.noreply.github.com> Date: Thu, 30 Jul 2026 15:35:35 +0700 Subject: [PATCH] chore: refresh store codegen snapshot --- .github/workflows/store-codegen-drift.yml | 21 ++++++- packages/store/scripts/api-schema/schema.json | 63 +++++++++++++++++++ .../src/gateway/AUTO_GENERATED/.schema-hash | 2 +- .../store/src/gateway/AUTO_GENERATED/auth.ts | 24 +++++++ 4 files changed, 108 insertions(+), 2 deletions(-) diff --git a/.github/workflows/store-codegen-drift.yml b/.github/workflows/store-codegen-drift.yml index c0788fba85..574f4a4dcd 100644 --- a/.github/workflows/store-codegen-drift.yml +++ b/.github/workflows/store-codegen-drift.yml @@ -29,8 +29,27 @@ jobs: if: failure() && steps.drift.outcome == 'failure' run: git diff --name-only -- packages/store/scripts/api-schema/schema.json packages/store/src/gateway/AUTO_GENERATED/ > "${RUNNER_TEMP}/drift-files.txt" - - name: Open or update drift issue + - name: Report drift if: failure() && steps.drift.outcome == 'failure' + run: | + { + echo "## Store codegen drift detected" + echo + echo 'The generated Store API client is out of sync with the staging CGW schema.' + echo + echo '**Fix:**' + echo '```bash' + echo 'yarn workspace @safe-global/store build:dev' + echo '```' + echo + echo '**Changed files:**' + echo '```text' + cat "${RUNNER_TEMP}/drift-files.txt" + echo '```' + } >> "${GITHUB_STEP_SUMMARY}" + + - name: Open or update drift issue + if: failure() && steps.drift.outcome == 'failure' && vars.ENABLE_DRIFT_ISSUES == 'true' continue-on-error: true uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/packages/store/scripts/api-schema/schema.json b/packages/store/scripts/api-schema/schema.json index 2d2f76f15a..40aad2cc43 100644 --- a/packages/store/scripts/api-schema/schema.json +++ b/packages/store/scripts/api-schema/schema.json @@ -174,6 +174,15 @@ "schema": { "type": "string" } + }, + { + "name": "enroll", + "required": false, + "in": "query", + "description": "When true, requests hosted enrollment of a new authenticator: the provider challenges an existing factor, then walks the user through enrolling the new one.", + "schema": { + "type": "boolean" + } } ], "responses": { @@ -244,6 +253,35 @@ ] } }, + "/v1/auth/oidc/mfa/authenticators": { + "get": { + "description": "Lists the MFA authentication methods of the authenticated user for the self-service authenticator management UI.", + "operationId": "oidcAuthListAuthenticatorsV1", + "parameters": [], + "responses": { + "200": { + "description": "MFA authentication methods", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Authenticator" + } + } + } + } + }, + "403": { + "description": "Not authenticated" + } + }, + "summary": "List MFA authenticators", + "tags": [ + "auth" + ] + } + }, "/v1/chains/{chainId}/safes/{safeAddress}/balances/{fiatCode}": { "get": { "description": "Retrieves token balances for a Safe on a specific chain, converted to the specified fiat currency. Includes native tokens, ERC-20 tokens, and their current market values.", @@ -6371,6 +6409,31 @@ } } }, + "Authenticator": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Auth0 authentication method identifier (e.g. totp|...)" + }, + "type": { + "type": "string", + "description": "Authentication method type (e.g. totp)" + }, + "name": { + "type": "string", + "description": "User-visible authenticator name" + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 timestamp of when the method was enrolled" + } + }, + "required": [ + "id", + "type" + ] + }, "NativeToken": { "type": "object", "properties": { diff --git a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash index 2a8adb52a2..31fdd2bef0 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/.schema-hash +++ b/packages/store/src/gateway/AUTO_GENERATED/.schema-hash @@ -1 +1 @@ -d87ba47e4b0d1a80ef8a9c38bac6e6f9fff04131ec3587d79d8a08ce7ddd1810 +fd472742cf02d28f896f3e389d0fab8a78ebca07f9aeb6b22afc479be27519fe diff --git a/packages/store/src/gateway/AUTO_GENERATED/auth.ts b/packages/store/src/gateway/AUTO_GENERATED/auth.ts index f5fa33ab1e..cca6b00582 100644 --- a/packages/store/src/gateway/AUTO_GENERATED/auth.ts +++ b/packages/store/src/gateway/AUTO_GENERATED/auth.ts @@ -32,6 +32,7 @@ const injectedRtkApi = api params: { redirect_url: queryArg.redirectUrl, connection: queryArg.connection, + enroll: queryArg.enroll, }, }), providesTags: ['auth'], @@ -48,6 +49,13 @@ const injectedRtkApi = api }), providesTags: ['auth'], }), + oidcAuthListAuthenticatorsV1: build.query< + OidcAuthListAuthenticatorsV1ApiResponse, + OidcAuthListAuthenticatorsV1ApiArg + >({ + query: () => ({ url: `/v1/auth/oidc/mfa/authenticators` }), + providesTags: ['auth'], + }), }), overrideExisting: false, }) @@ -73,6 +81,8 @@ export type OidcAuthAuthorizeV1ApiArg = { redirectUrl?: string /** OIDC connection name to route to a specific identity provider. */ connection?: string + /** When true, requests hosted enrollment of a new authenticator: the provider challenges an existing factor, then walks the user through enrolling the new one. */ + enroll?: boolean } export type OidcAuthCallbackV1ApiResponse = unknown export type OidcAuthCallbackV1ApiArg = { @@ -85,6 +95,8 @@ export type OidcAuthCallbackV1ApiArg = { /** Description of the error returned by the OIDC provider (if failed) */ errorDescription?: string } +export type OidcAuthListAuthenticatorsV1ApiResponse = /** status 200 MFA authentication methods */ Authenticator[] +export type OidcAuthListAuthenticatorsV1ApiArg = void export type UserSession = { id: string authMethod: 'siwe' | 'oidc' @@ -104,6 +116,16 @@ export type LogoutDto = { /** Post-logout redirect URL (must be same-origin as pre-configured URL) */ redirect_url?: string } +export type Authenticator = { + /** Auth0 authentication method identifier (e.g. totp|...) */ + id: string + /** Authentication method type (e.g. totp) */ + type: string + /** User-visible authenticator name */ + name?: string + /** ISO 8601 timestamp of when the method was enrolled */ + createdAt?: string +} export const { useAuthGetMeV1Query, useLazyAuthGetMeV1Query, @@ -116,4 +138,6 @@ export const { useLazyOidcAuthAuthorizeV1Query, useOidcAuthCallbackV1Query, useLazyOidcAuthCallbackV1Query, + useOidcAuthListAuthenticatorsV1Query, + useLazyOidcAuthListAuthenticatorsV1Query, } = injectedRtkApi