From c72d83b5882106275327dd9a67a3c644519ec79e Mon Sep 17 00:00:00 2001 From: Alfonso Noriega Date: Fri, 6 Mar 2026 14:45:46 +0100 Subject: [PATCH] Read client steps from remote config --- .../api/graphql/app-management/generated/specifications.ts | 2 ++ .../graphql/app-management/queries/specifications.graphql | 1 + .../app/src/cli/api/graphql/extension_specifications.ts | 2 ++ .../developer-platform-client/app-management-client.ts | 6 ++++++ 4 files changed, 11 insertions(+) diff --git a/packages/app/src/cli/api/graphql/app-management/generated/specifications.ts b/packages/app/src/cli/api/graphql/app-management/generated/specifications.ts index da6721c922d..ae8581c4ff1 100644 --- a/packages/app/src/cli/api/graphql/app-management/generated/specifications.ts +++ b/packages/app/src/cli/api/graphql/app-management/generated/specifications.ts @@ -13,6 +13,7 @@ export type FetchSpecificationsQuery = { identifier: string externalIdentifier: string features: string[] + clientSteps?: string | null uidStrategy: | {appModuleLimit: number; isClientProvided: boolean} | {appModuleLimit: number; isClientProvided: boolean} @@ -55,6 +56,7 @@ export const FetchSpecifications = { {kind: 'Field', name: {kind: 'Name', value: 'identifier'}}, {kind: 'Field', name: {kind: 'Name', value: 'externalIdentifier'}}, {kind: 'Field', name: {kind: 'Name', value: 'features'}}, + {kind: 'Field', name: {kind: 'Name', value: 'clientSteps'}}, { kind: 'Field', name: {kind: 'Name', value: 'uidStrategy'}, diff --git a/packages/app/src/cli/api/graphql/app-management/queries/specifications.graphql b/packages/app/src/cli/api/graphql/app-management/queries/specifications.graphql index 8190c6ab80b..72a2912aa74 100644 --- a/packages/app/src/cli/api/graphql/app-management/queries/specifications.graphql +++ b/packages/app/src/cli/api/graphql/app-management/queries/specifications.graphql @@ -4,6 +4,7 @@ query fetchSpecifications($organizationId: ID!) { identifier externalIdentifier features + clientSteps uidStrategy { appModuleLimit isClientProvided diff --git a/packages/app/src/cli/api/graphql/extension_specifications.ts b/packages/app/src/cli/api/graphql/extension_specifications.ts index dded2017f04..bc4aff60738 100644 --- a/packages/app/src/cli/api/graphql/extension_specifications.ts +++ b/packages/app/src/cli/api/graphql/extension_specifications.ts @@ -1,3 +1,4 @@ +import {ClientSteps} from '../../services/build/client-steps.js' import {gql} from 'graphql-request' export const ExtensionSpecificationsQuery = gql` @@ -36,6 +37,7 @@ export interface RemoteSpecification { gated: boolean externalIdentifier: string experience: 'extension' | 'configuration' | 'deprecated' + clientSteps?: ClientSteps options: { managementExperience: 'cli' | 'custom' | 'dashboard' registrationLimit: number diff --git a/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts b/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts index f2ca5f2cdee..62d0cde2ba4 100644 --- a/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts +++ b/packages/app/src/cli/utilities/developer-platform-client/app-management-client.ts @@ -141,6 +141,7 @@ import { AppLogsSubscribeMutationVariables, } from '../../api/graphql/app-management/generated/app-logs-subscribe.js' import {SourceExtension} from '../../api/graphql/app-management/generated/types.js' +import {ClientSteps} from '../../services/build/client-steps.js' import {getPartnersToken} from '@shopify/cli-kit/node/environment' import {ensureAuthenticatedAppManagementAndBusinessPlatform, Session} from '@shopify/cli-kit/node/session' import {isUnitTest} from '@shopify/cli-kit/node/context/local' @@ -456,6 +457,7 @@ export class AppManagementClient implements DeveloperPlatformClient { identifier: spec.identifier, externalIdentifier: spec.externalIdentifier, gated: false, + clientSteps: parseClientSteps(spec.clientSteps), options: { managementExperience: 'cli', registrationLimit: spec.uidStrategy.appModuleLimit, @@ -1426,3 +1428,7 @@ function toUserError(err: CreateAppVersionMutation['appVersionCreate']['userErro function isStoreProvisionable(permissions: string[]) { return permissions.includes('ondemand_access_to_stores') } +function parseClientSteps(clientSteps: string | null | undefined): ClientSteps | undefined { + if (!clientSteps) return undefined + return JSON.parse(clientSteps) +}