UNPKG

@shopify/cli

Version:

A CLI tool to build for the Shopify platform

560 lines • 108 kB
import{a as Ie,b as Pe,c as _e,d as Me,e as Ee,f as Ce}from"./chunk-DCPBRWVC.js";import{c as he}from"./chunk-QBSKKQBN.js";import{$ as Se,H as ye,I as ve,K as W,L as K,b as ce,ba as F,ca as be,e as L,j as m,ja as Ne,ka as Ae,la as Te,n as ge,na as H,o as C,oa as xe,pa as U,r as s,t as $,x as B,z as fe}from"./chunk-XONFGLJQ.js";import{w as j}from"./chunk-L2MGAEV3.js";import{a as M}from"./chunk-F2QU6WWX.js";import{b as ke}from"./chunk-MHWV5RQV.js";import{d as u,g as k}from"./chunk-M56NDIMD.js";import{Gb as Ve,Ib as Fe,N as se,Qb as T,Ta as me,U as pe,Wa as ue,ga as le,ma as de,tb as Q}from"./chunk-N5PQPIBF.js";import{f as w,j as De}from"./chunk-YTNDFQJT.js";import{d as oe,j as E}from"./chunk-IU2ZQ6TE.js";import{g as r}from"./chunk-VPRTJUIN.js";r();function I(n,{httpsOnly:e=!1,message:i="Invalid URL"}={}){return n.refine(a=>Ue(a,e),{message:i}).refine(a=>!a.includes(` `),{message:i})}function Pa(n,{message:e="URL must be HTTPS URL or start with /"}={}){return n.refine(i=>i.startsWith("/")||Ue(i,!0),{message:e})}function Ue(n,e){try{let i=new URL(n);return e?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function _a(n){return typeof n=="string"&&!n.startsWith("/")?`/${n}`:n}var Tn=30;function Ma(n){return n.length<=Tn}r();r();r();var we=m` mutation AppCreate( $org: Int! $title: String! $appUrl: Url! $redir: [Url]! $type: AppType $requestedAccessScopes: [String!] ) { appCreate( input: { organizationID: $org title: $title applicationUrl: $appUrl redirectUrlWhitelist: $redir appType: $type requestedAccessScopes: $requestedAccessScopes } ) { app { id title apiKey organizationId apiSecretKeys { secret } appType grantedScopes applicationUrl redirectUrlWhitelist requestedAccessScopes webhookApiVersion embedded posEmbedded preferencesUrl gdprWebhooks { customerDeletionUrl customerDataRequestUrl shopDeletionUrl } appProxy { subPath subPathPrefix url } disabledFlags } userErrors { field message } } } `;r();r();async function ze(n){let{currentAccountInfo:e}=await n.currentAccountInfo();if(!e)throw new u("Unable to get current user account");return xn(e)}function xn(n){return n.__typename==="UserAccount"?{type:"UserAccount",email:n.email}:n.__typename==="ServiceAccount"?{type:"ServiceAccount",orgName:n.orgName}:{type:"UnknownAccount"}}r();var Dn=4320*60*1e3;function Re(n){return new ke({projectName:"shopify-app-account-info",cwd:n})}function Oe(n,e){let a=Re(e).get(n);if(a)return new Date().valueOf()-new Date(a.loadedAt).valueOf()>Dn?void 0:a.info}function qe(n,e,i){Re(i).set(n,{info:e,loadedAt:new Date().toISOString()})}async function z(n,e){let i=Oe(e);if(i)return T("Getting partner account info from cache"),i;try{let a=await ze(n);return qe(e,a),a}catch{return T("Error fetching user account info"),{type:"UnknownAccount"}}}r();r();var Qe=m` query allAppExtensionRegistrations($apiKey: String!) { app(apiKey: $apiKey) { extensionRegistrations { id uuid title type draftVersion { config context } activeVersion { config context } } configurationRegistrations { id uuid title type draftVersion { config context } activeVersion { config context } } dashboardManagedExtensionRegistrations { id uuid title type activeVersion { config context } draftVersion { config context } } } } `;r();var Le=m` query activeAppVersion($apiKey: String!) { app(apiKey: $apiKey) { activeAppVersion { appModuleVersions { registrationId registrationUuid registrationTitle type config specification { identifier name experience options { managementExperience } } } } } } `;r();var $e=m` mutation AppDeploy( $apiKey: String! $bundleUrl: String $appModules: [AppModuleSettings!] $skipPublish: Boolean $message: String $versionTag: String $commitReference: String ) { appDeploy( input: { apiKey: $apiKey bundleUrl: $bundleUrl appModules: $appModules skipPublish: $skipPublish message: $message versionTag: $versionTag commitReference: $commitReference } ) { appVersion { uuid id message versionTag location appModuleVersions { uuid registrationUuid validationErrors { message field } } } userErrors { message field category details } } } `;r();var Be=m` mutation GenerateSignedUploadUrl($apiKey: String!, $bundleFormat: Int!) { appVersionGenerateSignedUploadUrl(input: {apiKey: $apiKey, bundleFormat: $bundleFormat}) { signedUploadUrl userErrors { field message } } } `;r();var We=m` mutation ExtensionCreate( $apiKey: String! $type: ExtensionType! $title: String! $config: JSON! $context: String $handle: String ) { extensionCreate( input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context, handle: $handle} ) { extensionRegistration { id uuid type title draftVersion { config registrationId lastUserInteractionAt validationErrors { field message } } } userErrors { field message } } } `;r();var Ke=m` mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) { convertDevToTestStore(input: $input) { convertedToTestStore userErrors { message field } } } `;r();var je=m` query FindOrganization($orgId: ID!, $shopDomain: String) { organizations(id: $orgId, first: 1) { nodes { id businessName stores(shopDomain: $shopDomain, first: 1, archived: false) { nodes { shopId link shopDomain shopName transferDisabled convertableToPartnerTest } } } } } `;r();var He=m` query AppVersionsQuery($apiKey: String!) { app(apiKey: $apiKey) { id organizationId title appVersions { nodes { createdAt createdBy { displayName } message status versionTag } pageInfo { totalResults } } } } `;r();var Ge=m` mutation DevelopmentStorePreviewUpdate($input: DevelopmentStorePreviewUpdateInput!) { developmentStorePreviewUpdate(input: $input) { app { id developmentStorePreviewEnabled } userErrors { message field } } } `;r();var Je=m` query FindAppPreviewMode($apiKey: String!) { app(apiKey: $apiKey) { developmentStorePreviewEnabled } } `;r();var Ze=m` query AppVersionsDiff($apiKey: String!, $versionId: ID!) { app(apiKey: $apiKey) { versionsDiff(appVersionId: $versionId) { added { uuid registrationTitle specification { identifier experience options { managementExperience } } } updated { uuid registrationTitle specification { identifier experience options { managementExperience } } } removed { uuid registrationTitle specification { identifier experience options { managementExperience } } } } } } `;r();var Ye=m` mutation AppRelease($apiKey: String!, $appVersionId: ID, $versionTag: String) { appRelease(input: {apiKey: $apiKey, appVersionId: $appVersionId, versionTag: $versionTag}) { appVersion { versionTag message location } userErrors { message field category details } } } `;r();var Xe=m` query AppVersionByTag($apiKey: String!, $versionTag: String!) { app(apiKey: $apiKey) { appVersion(versionTag: $versionTag) { id uuid versionTag location message appModuleVersions { config specification { identifier name experience options { managementExperience } } } } } } `;r();var ei=` mutation samplePayload($topic: String!, $api_version: String!, $address: String!, $delivery_method: String!, $shared_secret: String!, $api_key: String) { sendSampleWebhook(input: {topic: $topic, apiVersion: $api_version, address: $address, deliveryMethod: $delivery_method, sharedSecret: $shared_secret, apiKey: $api_key}) { samplePayload success headers userErrors { message } } } `;async function wt(n,e,i){let{sendSampleWebhook:a}=await n.sendSampleWebhook(e,i);return a}r();var ii=` query getApiVersions { publicApiVersions } `;async function Ot(n,e){let{publicApiVersions:i}=await n.apiVersions(e),a=i.indexOf("unstable");return a===-1?i.sort().reverse():(i.splice(a,1),i.sort().reverse(),i.push("unstable")),i}r();var ni=` query getWebhookTopics($api_version: String!) { webhookTopics(apiVersion: $api_version) } `;async function Lt(n,e,i){let a={api_version:e},{webhookTopics:t}=await n.topics(a,i);return t}r();var ai=m` mutation MigrateFlowExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) { migrateFlowExtension( input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid} ) { migratedFlowExtension userErrors { field message } } } `;r();var ti=m` mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!, $appProxy: AppProxyInput) { appUpdate( input: { apiKey: $apiKey applicationUrl: $applicationUrl redirectUrlWhitelist: $redirectUrlWhitelist appProxy: $appProxy } ) { userErrors { message field } } } `;r();var ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"currentAccountInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentAccountInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ServiceAccount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"orgName"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UserAccount"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]}}]};r();var oi=m` query RemoteTemplateSpecifications($version: String, $apiKey: String) { templateSpecifications(version: $version, apiKey: $apiKey) { identifier name defaultName group sortPriority supportLinks types { url type extensionPoints supportedFlavors { name value path } } } } `;r();var si=m` query TargetSchemaDefinitionQuery($apiKey: String!, $version: String!, $target: String!) { definition: functionTargetSchemaDefinition(apiKey: $apiKey, version: $version, target: $target) } `;r();var pi=m` query ApiSchemaDefinitionQuery($apiKey: String!, $version: String!, $type: String!) { definition: functionApiSchemaDefinition(apiKey: $apiKey, version: $version, type: $type) } `;r();var li=m` mutation MigrateToUiExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) { migrateToUiExtension( input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid} ) { migratedToUiExtension userErrors { field message } } } `;r();var di=m` query fetchSpecifications($apiKey: String!) { extensionSpecifications(apiKey: $apiKey) { name externalName externalIdentifier identifier gated experience options { managementExperience registrationLimit } features { argo { surface } } validationSchema { jsonSchema } } } `;r();var mi=m` query FindOrganization($id: ID!) { organizations(id: $id, first: 1) { nodes { id businessName } } } `;r();var ui=m` mutation MigrateAppModule($apiKey: String!, $registrationId: ID, $registrationUuid: String, $type: String!) { migrateAppModule( input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid, type: $type} ) { migratedAppModule userErrors { field message } } } `;r();var ci=m` mutation AppLogsSubscribe($apiKey: String!, $shopIds: [ID!]!) { appLogsSubscribe(input: {apiKey: $apiKey, shopIds: $shopIds}) { jwtToken success errors } } `;r();var gi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AllOrgs"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"200"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"businessName"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var fi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ExtensionUpdateDraft"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"registrationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"config"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"context"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"handle"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"extensionUpdateDraft"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}},{kind:"ObjectField",name:{kind:"Name",value:"registrationId"},value:{kind:"Variable",name:{kind:"Name",value:"registrationId"}}},{kind:"ObjectField",name:{kind:"Name",value:"config"},value:{kind:"Variable",name:{kind:"Name",value:"config"}}},{kind:"ObjectField",name:{kind:"Name",value:"context"},value:{kind:"Variable",name:{kind:"Name",value:"context"}}},{kind:"ObjectField",name:{kind:"Name",value:"handle"},value:{kind:"Variable",name:{kind:"Name",value:"handle"}}}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var ki=m` query FindApp($apiKey: String!) { app(apiKey: $apiKey) { id title apiKey organizationId apiSecretKeys { secret } appType grantedScopes applicationUrl redirectUrlWhitelist requestedAccessScopes webhookApiVersion embedded posEmbedded preferencesUrl gdprWebhooks { customerDeletionUrl customerDataRequestUrl shopDeletionUrl } appProxy { subPath subPathPrefix url } developmentStorePreviewEnabled disabledFlags } } `;r();var yi=m` query FindOrganization($id: ID!, $title: String) { organizations(id: $id, first: 1) { nodes { id businessName apps(first: 25, title: $title) { pageInfo { hasNextPage } nodes { id title apiKey } } } } } `;r();var h=class extends u{constructor(e,i){let a="unknown",t=p=>`an ${p}`;ve(e)?(a=e.orgName,t=p=>`the ${p} organization`):ye(e)&&(a=e.email,t=p=>`the ${p} user`);let o=Fe`${Ve.yellow(a)}`.value,d=[[`Your current active session is associated with ${t(o)} account. To start a new session with a different account, run`,{command:"shopify auth login"}],["Have you",{link:{label:"created a Shopify Partners organization",url:"https://partners.shopify.com/signup"}},{char:"?"}],["Does your account include",{subdued:"Manage app"},"permissions?, please contact the owner of the organization to grant you access."],"Have you confirmed your accounts from the emails you received?",["Need to connect to a different App or organization? Run the command again with",{command:"--reset"}]];i&&d.push(["Do you have access to the right Shopify Partners organization? The CLI is loading",{link:{label:"this organization",url:`https://partner.shopify.com/${i}`}}]),super("No Organization found",void 0,d)}};async function Qr(){let n=[];for(let e of vi()){let i=await e.organizations();n.push(...i)}if(n.length===0){let e=Si(),i=await e.session(),a=await z(e,i.userId);throw new h(a)}return n}async function Lr(n,e){return(await e.appPreviewMode({apiKey:n})).app?.developmentStorePreviewEnabled}async function $r(n,e){let i=await e.orgFromId(n);if(!i)throw new h((await e.session()).accountInfo,n);return i}async function Br(n,e,i,a=["APP_DEVELOPMENT"]){let t=await i.storeByDomain(n.id,e,a);if(!t){let d=a.length===1&&a[0]==="APP_DEVELOPMENT"?"Ensure you have provided the correct store domain, that the store is a dev store, and that you have access to the store.":"Ensure you have provided the correct store domain and that you have access to the store.";throw new u(`Could not find store for domain ${e} in organization ${n.businessName}.`,d)}return t}r();var bi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DevStoresByOrg"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"stores"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"500"}},{kind:"Argument",name:{kind:"Name",value:"archived"},value:{kind:"BooleanValue",value:!1}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"DEVELOPMENT"},{kind:"EnumValue",value:"MANAGED"},{kind:"EnumValue",value:"PLUS_SANDBOX"}]}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shopId"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"shopDomain"}},{kind:"Field",name:{kind:"Name",value:"shopName"}},{kind:"Field",name:{kind:"Name",value:"transferDisabled"}},{kind:"Field",name:{kind:"Name",value:"convertableToPartnerTest"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Vn="https://shopify.dev/apps/default-app-home",Fn="https://shopify.dev/apps/default-app-home/api/auth";function In(n,e){let{name:i,isLaunchable:a=!0,scopesArray:t}=e,o=a?"https://example.com":Vn,d=a?"https://example.com/api/auth":Fn;return{org:parseInt(n.id,10),title:i,appUrl:o,redir:[d],requestedAccessScopes:t??[],type:"undecided"}}var x=class n{constructor(e){this.clientName="partners";this.webUiName="Partner Dashboard";this.supportsAtomicDeployments=!1;this.supportsDevSessions=!1;this.supportsStoreSearch=!1;this.organizationSource="Partners";this.bundleFormat="zip";this.supportsDashboardManagedExtensions=!0;this._session=e}static getInstance(e){return n.instance??=new n(e),n.instance}static resetInstance(){n.instance=void 0}async session(){if(!this._session){if(w())throw new Error("PartnersClient.session() should not be invoked dynamically in a unit test");let{token:e,userId:i}=await W();this._session={token:e,businessPlatformToken:"",accountInfo:{type:"UnknownAccount"},userId:i};let a=await z(this,i);this._session={token:e,businessPlatformToken:"",accountInfo:a,userId:i}}return this._session}async request(e,i=void 0,a,t){return Ne(e,await this.token(),i,a,t,this.createUnauthorizedHandler())}async requestDoc(e,i){return Te(e,await this.token(),i,void 0,this.createUnauthorizedHandler())}async token(){return(await this.session()).token}async unsafeRefreshToken(){let{token:e}=await W([],process.env,{noPrompt:!0,forceRefresh:!0}),i=await this.session();return e&&(i.token=e),i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(e){let i={apiKey:e},t=(await this.request(ki,i)).app;if(t){let o=P(t.disabledFlags);return{...t,flags:o,developerPlatformClient:this}}}async organizations(){try{return(await this.requestDoc(gi)).organizations.nodes.map(i=>({id:i.id,businessName:`${i.businessName} (Partner Dashboard)`,source:this.organizationSource}))}catch(e){if(e.statusCode===404)return[];throw e}}async orgFromId(e){let i={id:e},t=(await this.request(mi,i,{cacheTTL:{hours:6}})).organizations.nodes[0];return t?{...t,source:this.organizationSource}:void 0}async orgAndApps(e){let i=await this.fetchOrgAndApps(e);return{organization:i.organization,apps:i.apps.nodes,hasMorePages:i.apps.pageInfo.hasNextPage}}async appsForOrg(e,i){let a=await this.fetchOrgAndApps(e,i);return{apps:a.apps.nodes,hasMorePages:a.apps.pageInfo.hasNextPage}}async specifications({apiKey:e}){let i={apiKey:e};return(await this.request(di,i)).extensionSpecifications.map(({options:t,features:o,...d})=>({...d,uidStrategy:d.experience==="extension"?"uuid":"single",registrationLimit:t.registrationLimit,managementExperience:t.managementExperience,surface:o?.argo?.surface}))}async templateSpecifications({apiKey:e}){let i={apiKey:e},t=(await this.request(oi,i)).templateSpecifications.map(l=>{let{types:c,...v}=l;return{...v,...c[0]}}),o=0,d=t.map(l=>({...l,sortPriority:l.sortPriority??o++})),p=[];for(let l of d)l.group&&!p.includes(l.group)&&p.push(l.group);return{templates:d,groupOrder:p}}async createApp(e,i){let a=In(e,i),t=await this.request(we,a);if(t.appCreate.userErrors.length>0){let d=t.appCreate.userErrors.map(p=>p.message).join(", ");throw new u(d)}let o=P(t.appCreate.app.disabledFlags);return{...t.appCreate.app,organizationId:e.id,newApp:!0,flags:o,developerPlatformClient:this}}async devStoresForOrg(e){let i={id:e};return{stores:(await this.requestDoc(bi,i)).organizations.nodes[0].stores.nodes,hasMorePages:!1}}async appExtensionRegistrations({apiKey:e},i){let a={apiKey:e};return this.request(Qe,a)}async appVersions({apiKey:e}){let i={apiKey:e};return this.request(He,i)}async appInstallCount(e){throw new Error("Unsupported operation")}async appVersionByTag({apiKey:e},i){let a={apiKey:e,versionTag:i},o=(await this.request(Xe,a)).app.appVersion;return{...o,appModuleVersions:o.appModuleVersions.map(d=>({...d,config:d.config?JSON.parse(d.config):void 0}))}}async appVersionsDiff({apiKey:e},{appVersionId:i}){let a={apiKey:e,versionId:i};return this.request(Ze,a)}async activeAppVersion({apiKey:e}){let i={apiKey:e},t=(await this.request(Le,i)).app.activeAppVersion;if(t)return{...t,appModuleVersions:t.appModuleVersions.map(o=>({...o,config:o.config?JSON.parse(o.config):{}}))}}async createExtension(e){return this.request(We,e)}async updateExtension(e){return this.requestDoc(fi,e)}async deploy(e){let{organizationId:i,...a}=e,t=a;return t.appModules=t.appModules?.map(o=>{let{uid:d,...p}=o;return p}),this.request($e,t,void 0,"slow-request")}async release({app:{apiKey:e},version:{appVersionId:i}}){let a={apiKey:e,appVersionId:i};return this.request(Ye,a)}async generateSignedUploadUrl(e){let i={apiKey:e.apiKey,bundleFormat:1},a=await this.request(Be,i);return{assetUrl:a.appVersionGenerateSignedUploadUrl.signedUploadUrl,userErrors:a.appVersionGenerateSignedUploadUrl.userErrors}}async convertToTransferDisabledStore(e){return this.request(Ke,e)}async storeByDomain(e,i,a){let t={orgId:e,shopDomain:i},d=(await this.request(je,t)).organizations.nodes[0]?.stores.nodes[0];if(d)return{...d,provisionable:!1}}async ensureUserAccessToStore(e,i){}async updateDeveloperPreview(e){return this.request(Ge,e)}async appPreviewMode(e){return this.request(Je,e)}async sendSampleWebhook(e,i){return this.request(ei,e)}async apiVersions(e){return this.request(ii)}async topics(e,i){return this.request(ni,e)}async migrateFlowExtension(e){return this.request(ai,e)}async migrateAppModule(e){return this.request(ui,e)}async updateURLs(e){return this.request(ti,e)}async currentAccountInfo(){return this.requestDoc(ri)}async targetSchemaDefinition(e,i,a){let t={target:e.handle,version:e.version,apiKey:i};return(await this.request(si,t)).definition}async apiSchemaDefinition(e,i,a,t){return(await this.request(pi,{...e,apiKey:i})).definition}async migrateToUiExtension(e){return this.request(li,e)}toExtensionGraphQLType(e){return e.toUpperCase()}async subscribeToAppLogs(e,i){return this.request(ci,e)}async appDeepLink({id:e,organizationId:i}){return`https://${await $()}/${i}/apps/${e}`}async appLogs(e,i){let a=await Pn(e);try{let t=await a.json();return a.ok?{app_logs:t.app_logs??[],cursor:t.cursor,status:a.status}:{errors:t.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(t){return{errors:[`Failed to parse response: ${t}`],status:a.status}}}async devSessionCreate(e){throw new Error("Unsupported operation")}async devSessionUpdate(e){throw new Error("Unsupported operation")}async devSessionDelete(e){return Promise.resolve()}async getCreateDevStoreLink(e){let i=`https://${await $()}/${e.id}/stores`;return[`Looks like you don't have any dev stores associated with ${e.businessName}'s Partner Dashboard.`,{link:{url:i,label:"Create a store in Partner Dashboard"}}]}async fetchOrgAndApps(e,i){let a={id:e};i&&(a.title=i);let o=(await this.request(yi,a)).organizations.nodes[0];if(!o){let l=await this.session();throw new h(l.accountInfo,e)}let d={id:o.id,businessName:o.businessName,source:this.organizationSource},p=o.apps.nodes.map(l=>({...l,organizationId:o.id}));return{organization:d,apps:{...o.apps,nodes:p},stores:[]}}createUnauthorizedHandler(){return R(this)}},Pn=async({jwtToken:n,cursor:e,filters:i})=>{let a=await Ae(e,i),t=`Shopify CLI; v=${M}`,o={Authorization:`Bearer ${n}`,"User-Agent":t};return C(a,{method:"GET",headers:o},"non-blocking")};r();r();function Ni(n){return m` query OrganizationBetaFlags($organizationId: OrganizationID!) { organization(organizationId: $organizationId) { id ${n.map(e=>`flag_${e}: hasFeatureFlag(handle: "${e}")`).join(` `)} } }`}r();var Ai={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"OrganizationExpFlags"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationId"},value:{kind:"Variable",name:{kind:"Name",value:"organizationId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"enabledFlags"},arguments:[{kind:"Argument",name:{kind:"Name",value:"flagHandles"},value:{kind:"Variable",name:{kind:"Name",value:"flagHandles"}}}]},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ti={skipEsbuildReactDedeuplication:"SHOPIFY_CLI_SKIP_ESBUILD_REACT_DEDUPLICATION",disableGraphiQLExplorer:"SHOPIFY_CLI_DISABLE_GRAPHIQL",useDynamicConfigSpecifications:"SHOPIFY_CLI_DYNAMIC_CONFIG",enableAppLogPolling:"SHOPIFY_CLI_ENABLE_APP_LOG_POLLING",templatesJsonPath:"SHOPIFY_CLI_APP_TEMPLATES_JSON_PATH",mkcertBinaryPath:"SHOPIFY_CLI_MKCERT_BINARY",disableMinificationOnDev:"SHOPIFY_CLI_DISABLE_MINIFICATION_ON_DEV"},Mn={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},kp={production:".env"},yp={reactTypes:"17.0.30"},xi={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:Mn.web}},vp={graphiql:3457,localhost:3458},Sp=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;r();var Di={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListOrganizations"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"organizationsWithAccessToDestination"},arguments:[{kind:"Argument",name:{kind:"Name",value:"destination"},value:{kind:"EnumValue",value:"APPS_CLI"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();r();var Vi=50,Fi=250,En=s.object({namespace:s.string(),key:s.string()}),Cn=s.object({sms_marketing:s.boolean().optional(),customer_privacy:s.boolean().optional()}),Un=s.object({sources:s.array(s.string()).optional()}),wn=s.object({network_access:s.boolean().optional(),block_progress:s.boolean().optional(),api_access:s.boolean().optional(),collect_buyer_consent:Cn.optional(),iframe:Un.optional()}),zn=s.object({runs_offline:s.boolean().optional()}),xp=s.object({type:s.string().optional(),extensions:s.array(s.any()).optional()}),Rn=s.object({allow_direct_linking:s.boolean().optional()}),On=s.object({module:s.string()}),qn=s.object({target:s.string(),module:s.string(),should_render:On.optional(),tools:s.string().optional(),instructions:s.string().optional(),intents:s.array(s.object({type:s.string(),action:s.string(),schema:s.string(),name:s.string().optional(),description:s.string().optional()})).optional(),metafields:s.array(En).optional(),default_placement:s.string().optional(),urls:s.object({edit:s.string().optional()}).optional(),capabilities:Rn.optional(),preloads:s.object({chat:s.string().optional()}).optional(),assets:s.string().optional()}),Dp=s.array(qn),Ii=s.string(),Qn=s.object({key:s.string().optional(),name:s.string().optional(),description:s.string().optional(),required:s.boolean().optional(),default_value:s.any().optional(),type:s.string(),validations:s.array(s.any()).optional(),marketingActivityCreateUrl:s.string().optional(),marketingActivityDeleteUrl:s.string().optional()}),Pi=s.object({fields:s.array(Qn).optional()}),_i=s.string().trim().nonempty("Handle can't be empty").max(Vi,`Handle can't exceed ${Vi} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(n=>!n.startsWith("-")&&!n.endsWith("-"),"Handle can't start or end with a hyphen"),Ln=s.string().trim().nonempty("UID can't be empty").max(Fi,`UID can't exceed ${Fi} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(n=>!n.startsWith("-")&&!n.endsWith("-"),"UID can't start or end with a hyphen"),O=s.object({name:s.string().optional(),type:s.string().optional(),handle:_i.optional(),uid:Ln.optional(),description:s.string().optional(),api_version:Ii.optional(),extension_points:s.any().optional(),capabilities:wn.optional(),supported_features:zn.optional(),settings:Pi.optional()}),Vp=O.extend({handle:_i}),N=O.omit({handle:!0}),Fp=s.object({api_version:Ii.optional(),description:s.string().optional(),extensions:s.array(s.any()),settings:Pi.optional()});r();r();import{isUtf8 as $n}from"node:buffer";import Mi from"fs";async function Ei(n,e){let i=await ue(oe(n,"locales/*.json"));if(!i||i.length===0)return{};let a=Bn(i);if(a.length===0)throw new u(`Missing default language in ${e} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new u(`Error loading ${e}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let t of i)if(Mi.statSync(t).size===0)throw new u(`Error loading ${e}`,`Locale file ${t} can't be empty`);return{default_locale:a[0],translations:Wn(i,e)}}function Bn(n){return n.filter(i=>E(i).endsWith(".default.json")).map(i=>E(i).split(".")[0])}function Wn(n,e){let i={};for(let a of n){let t=Kn(E(a).split(".")[0],"Locale code is unset"),o=Mi.readFileSync(a);if(!$n(o))throw new u(`Error loading ${e}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);i[t]=o.toString("base64")}return i}function Kn(n,e){if(n===void 0)throw new k(e);return n}function jn(n){return n.experience==="configuration"}function Ci(n){let i={...{externalIdentifier:`${n.identifier}_external`,additionalIdentifiers:[],externalName:pe(n.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:n.identifier,schema:O,registrationLimit:xi.extensions.defaultRegistrationLimit,transform:n.transformLocalToRemote,reverseTransform:n.transformRemoteToLocal,experience:n.experience??"extension",uidStrategy:n.uidStrategy??(n.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:n.getDevSessionUpdateMessages,clientSteps:n.clientSteps},...n};return{...i,contributeToAppConfigurationSchema:a=>{let t=jn(i),o=i.schema._def.shape!==void 0,d=i.uidStrategy==="single";return t&&o&&d?a.merge(i.schema):a},parseConfigurationObject:a=>{let t=i.schema.safeParse(a);return t.success?{state:"ok",data:t.data,errors:void 0}:{state:"error",data:void 0,errors:t.error.errors}}}}function A(n){let e=n.appModuleFeatures??(()=>[]);return Ci({identifier:n.identifier,schema:n.schema,appModuleFeatures:e,transformLocalToRemote:Hn(n.transformConfig),transformRemoteToLocal:Gn(n.schema,n.transformConfig),experience:"configuration",uidStrategy:n.uidStrategy??"single",clientSteps:n.clientSteps,getDevSessionUpdateMessages:n.getDevSessionUpdateMessages,patchWithAppDevURLs:n.patchWithAppDevURLs})}function jp(n){return Ci({identifier:n.identifier,schema:s.any({}),appModuleFeatures:n.appModuleFeatures,experience:n.experience,clientSteps:n.clientSteps,uidStrategy:n.uidStrategy,transformRemoteToLocal:n.transformRemoteToLocal,devSessionWatchConfig:n.devSessionWatchConfig,deployConfig:async(e,i)=>{let a=Jn(e);if(n.appModuleFeatures().includes("localization")){let t=await Ei(i,n.identifier);a={...a,localization:t}}return a}})}function Hn(n){return Object.keys(n).includes("forward")?n.forward:e=>Ui(e,n)}function Gn(n,e){return e?Object.keys(e).includes("reverse")?e.reverse:i=>Ui(i,e,!0):i=>wi(n,i)}function Ui(n,e,i=!1){let a={};for(let[t,o]of Object.entries(e)){let d=i?t:o,p=i?o:t,l=F(n,d);l!==void 0&&be(a,p,l)}return a}function wi(n,e){return Object.keys(n._def.shape()).reduce((i,a)=>{let t=n._def.shape()[a];return t instanceof s.ZodOptional&&(t=t._def.innerType),t instanceof s.ZodObject?i[a]=wi(t,e):(e[a]!==void 0&&(i[a]=e[a]),delete e[a]),i},{})}function Jn(n){let{type:e,handle:i,uid:a,path:t,extensions:o,...d}=n;return d}var Zn=N.extend({application_url:I(s.string({required_error:"Valid URL is required"})),embedded:s.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:s.object({url:I(s.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),Yn={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},G="app_home",Xn=A({identifier:G,schema:Zn,transformConfig:Yn,patchWithAppDevURLs:(n,e)=>{n.application_url=e.applicationUrl},getDevSessionUpdateMessages:async n=>[`Using URL: ${n.application_url}`]}),il=Xn;r();var ea=N.extend({name:s.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:s.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(n=>n&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(n),{message:"String can't contain special characters"}).optional()}),ia={name:"name",app_handle:"handle"},J="branding",na=A({identifier:J,schema:ea,transformConfig:ia}),pl=na;r();var aa=N.extend({access:s.object({admin:s.object({direct_api_mode:s.union([s.literal("online"),s.literal("offline")]).optional(),embedded_app_direct_api_access:s.boolean().optional()}).optional()}).optional(),access_scopes:s.object({scopes:s.string().transform(n=>le(n)??"").optional(),required_scopes:s.array(s.string()).optional(),optional_scopes:s.array(s.string()).optional(),use_legacy_install_flow:s.boolean().optional()}).optional(),auth:s.object({redirect_urls:s.array(I(s.string()))})}),Z="app_access",ta={access:"access",scopes:"access_scopes.scopes",required_scopes:"access_scopes.required_scopes",optional_scopes:"access_scopes.optional_scopes",use_legacy_install_flow:"access_scopes.use_legacy_install_flow",redirect_url_allowlist:"auth.redirect_urls"},ra=A({identifier:Z,schema:aa,transformConfig:ta,getDevSessionUpdateMessages:async n=>{let e=n.access_scopes!==void 0,i=n.access_scopes?.use_legacy_install_flow===!0,a=n.access_scopes?.scopes==null&&n.access_scopes?.required_scopes==null;if(i||e&&a)return["Using legacy install flow - access scopes are not auto-granted"];let t=n.access_scopes?.scopes?n.access_scopes.scopes.split(",").map(o=>o.trim()).join(", "):n.access_scopes?.required_scopes?.join(", ");return t?[`Access scopes auto-granted: ${t}`]:["App has been installed"]},patchWithAppDevURLs:(n,e)=>{e.redirectUrlWhitelist&&(n.auth={redirect_urls:e.redirectUrlWhitelist})}}),yl=ra;r();var zi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionCreate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"websocketUrl"},value:{kind:"Variable",name:{kind:"Name",value:"websocketUrl"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"warnings"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ri={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionUpdate"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"manifest"}},type:{kind:"NamedType",name:{kind:"Name",value:"JSON"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionUpdate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"assetsUrl"},value:{kind:"Variable",name:{kind:"Name",value:"assetsUrl"}}},{kind:"Argument",name:{kind:"Name",value:"manifest"},value:{kind:"Variable",name:{kind:"Name",value:"manifest"}}},{kind:"Argument",name:{kind:"Name",value:"inheritedModuleUids"},value:{kind:"Variable",name:{kind:"Name",value:"inheritedModuleUids"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSession"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"websocketUrl"}},{kind:"Field",name:{kind:"Name",value:"updatedAt"}},{kind:"Field",name:{kind:"Name",value:"user"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"app"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"key"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"field"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Oi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DevSessionDelete"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devSessionDelete"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var qi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FetchStoreByDomain"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"domain"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"filters"}},type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ShopFilterInput"}}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"Variable",name:{kind:"Name",value:"filters"}}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"domain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"externalId"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"storeType"}},{kind:"Field",name:{kind:"Name",value:"primaryDomain"}},{kind:"Field",name:{kind:"Name",value:"shortName"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"currentUser"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationPermissions"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Qi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ListAppDevStores"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"accessibleShops"},arguments:[{kind:"Argument",name:{kind:"Name",value:"filters"},value:{kind:"ListValue",values:[{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_TYPE"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{