@@ -18,7 +18,7 @@ import {GraphQLVariables, graphqlRequest, CacheOptions, UnauthorizedHandler} fro
1818import { businessPlatformFqdn } from '@shopify/cli-kit/node/context/fqdn'
1919
2020export async function organizationsRequest < T > (
21- organizationId : string ,
21+ shopId : string ,
2222 query : string ,
2323 token : string ,
2424 variables ?: GraphQLVariables ,
@@ -27,9 +27,8 @@ export async function organizationsRequest<T>(
2727) : Promise < T > {
2828 const api = 'BusinessPlatform'
2929 const fqdn = await businessPlatformFqdn ( )
30- const decodedOrganizationGid = Buffer . from ( organizationId , 'base64' ) . toString ( 'utf-8' )
31- const numericOrganizationId = decodedOrganizationGid . split ( '/' ) . pop ( )
32- const url = `https://${ fqdn } /organizations/api/unstable/organization/${ numericOrganizationId } /graphql`
30+ const numericShopId = shopId . split ( '/' ) . pop ( )
31+ const url = `https://${ fqdn } /organizations/api/unstable/shop/${ numericShopId } /graphql`
3332
3433 return graphqlRequest < T > ( {
3534 token,
@@ -43,7 +42,7 @@ export async function organizationsRequest<T>(
4342}
4443
4544export async function startBulkDataStoreCopy (
46- organizationId : string ,
45+ shopId : string ,
4746 sourceShopDomain : string ,
4847 targetShopDomain : string ,
4948 resourceConfigs : ResourceConfigs ,
@@ -71,7 +70,7 @@ export async function startBulkDataStoreCopy(
7170 }
7271
7372 return organizationsRequest < BulkDataStoreCopyStartResponse > (
74- organizationId ,
73+ shopId ,
7574 bulkDataStoreCopyStartMutation ,
7675 token ,
7776 {
@@ -83,7 +82,7 @@ export async function startBulkDataStoreCopy(
8382}
8483
8584export async function startBulkDataStoreExport (
86- organizationId : string ,
85+ shopId : string ,
8786 sourceShopDomain : string ,
8887 token : string ,
8988 unauthorizedHandler ?: UnauthorizedHandler ,
@@ -95,7 +94,7 @@ export async function startBulkDataStoreExport(
9594 }
9695
9796 return organizationsRequest < BulkDataStoreExportStartResponse > (
98- organizationId ,
97+ shopId ,
9998 bulkDataStoreExportStartMutation ,
10099 token ,
101100 {
@@ -107,7 +106,7 @@ export async function startBulkDataStoreExport(
107106}
108107
109108export async function startBulkDataStoreImport (
110- organizationId : string ,
109+ shopId : string ,
111110 targetShopDomain : string ,
112111 importUrl : string ,
113112 resourceConfigs : ResourceConfigs ,
@@ -133,7 +132,7 @@ export async function startBulkDataStoreImport(
133132 }
134133
135134 return organizationsRequest < BulkDataStoreImportStartResponse > (
136- organizationId ,
135+ shopId ,
137136 bulkDataStoreImportStartMutation ,
138137 token ,
139138 {
@@ -145,13 +144,13 @@ export async function startBulkDataStoreImport(
145144}
146145
147146export async function pollBulkDataOperation (
148- organizationId : string ,
147+ shopId : string ,
149148 operationId : string ,
150149 token : string ,
151150 unauthorizedHandler ?: UnauthorizedHandler ,
152151) : Promise < BulkDataOperationByIdResponse > {
153152 return organizationsRequest < BulkDataOperationByIdResponse > (
154- organizationId ,
153+ shopId ,
155154 bulkDataOperationByIdQuery ,
156155 token ,
157156 {
0 commit comments