shopify 3.94.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (295) hide show
  1. package/bin/run.js +5 -1
  2. package/dist/analytics-6IHHYAV6.js +1 -0
  3. package/dist/analytics-KKVP5DT3.js +1 -0
  4. package/dist/bootstrap.d.ts +5 -0
  5. package/dist/bootstrap.js +3 -0
  6. package/dist/chunk-22PCRFG4.js +1 -0
  7. package/dist/chunk-26D72ZNV.js +1 -0
  8. package/dist/chunk-2APPXD5Z.js +2 -0
  9. package/dist/chunk-2I4PRX2I.js +1 -0
  10. package/dist/chunk-2VQJQ36C.js +103 -0
  11. package/dist/chunk-323UTVMM.js +1 -0
  12. package/dist/chunk-3DQIVE24.js +9 -0
  13. package/dist/chunk-3F6NZK7S.js +2 -0
  14. package/dist/chunk-3LVGAQB4.js +1 -0
  15. package/dist/chunk-3TNEIDOD.js +1 -0
  16. package/dist/chunk-3VZEETAV.js +1 -0
  17. package/dist/chunk-4G7J6HIV.js +1 -0
  18. package/dist/chunk-4HHXSMD7.js +10 -0
  19. package/dist/chunk-4LNCYIS3.js +1 -0
  20. package/dist/chunk-4ZGSSQC6.js +1 -0
  21. package/dist/chunk-52GC6XUT.js +1 -0
  22. package/dist/chunk-5CH3B62S.js +2 -0
  23. package/dist/chunk-5Y7GIF2W.js +1 -0
  24. package/dist/chunk-66RJ5T7A.js +102 -0
  25. package/dist/chunk-6B53BWJW.js +1 -0
  26. package/dist/chunk-6BMMB2UO.js +1 -0
  27. package/dist/chunk-6HBRBQAN.js +6 -0
  28. package/dist/chunk-6M3ZYNGO.js +451 -0
  29. package/dist/chunk-6TZAAS5H.js +1 -0
  30. package/dist/chunk-72F3YBNA.js +1 -0
  31. package/dist/chunk-74HYYXXE.js +17 -0
  32. package/dist/chunk-75VPUOC5.js +1 -0
  33. package/dist/chunk-7BGM2GAH.js +1 -0
  34. package/dist/chunk-7UYZQN4V.js +18 -0
  35. package/dist/chunk-A74GETYC.js +1 -0
  36. package/dist/chunk-AIV5RI3X.js +1 -0
  37. package/dist/chunk-ALKTLKQ6.js +5 -0
  38. package/dist/chunk-B2EHO7ZC.js +847 -0
  39. package/dist/chunk-B2IVY4V5.js +1 -0
  40. package/dist/chunk-BDVAE5MS.js +28 -0
  41. package/dist/chunk-CERXUPGC.js +14 -0
  42. package/dist/chunk-D3TSJA5S.js +1 -0
  43. package/dist/chunk-D6JARNEH.js +1 -0
  44. package/dist/chunk-DFMQWJQ3.js +3 -0
  45. package/dist/chunk-DJONKJSZ.js +1 -0
  46. package/dist/chunk-DJQVNH7P.js +567 -0
  47. package/dist/chunk-DU4WR4OP.js +1 -0
  48. package/dist/chunk-ELVFJ7BR.js +4 -0
  49. package/dist/chunk-ELYP4KFP.js +8 -0
  50. package/dist/chunk-FFQ5EWII.js +294 -0
  51. package/dist/chunk-FUOIGXI4.js +1 -0
  52. package/dist/chunk-GD7FWXJ5.js +2 -0
  53. package/dist/chunk-GFEAKSGV.js +374 -0
  54. package/dist/chunk-GFJ7UV74.js +1 -0
  55. package/dist/chunk-GNPS5SBU.js +1 -0
  56. package/dist/chunk-GOJ2QHSR.js +1 -0
  57. package/dist/chunk-HSK7YMRE.js +359 -0
  58. package/dist/chunk-HUZUORYM.js +19 -0
  59. package/dist/chunk-HZA6IAA4.js +1 -0
  60. package/dist/chunk-IASVAERO.js +1 -0
  61. package/dist/chunk-IIIVWD4R.js +1 -0
  62. package/dist/chunk-INEU4XKS.js +6 -0
  63. package/dist/chunk-IOLVEXM6.js +1 -0
  64. package/dist/chunk-IU2ZQ6TE.js +2 -0
  65. package/dist/chunk-IX5ICOBV.js +7 -0
  66. package/dist/chunk-J3KVONB3.js +6 -0
  67. package/dist/chunk-JGXWQULI.js +1 -0
  68. package/dist/chunk-JHPRFW5B.js +19 -0
  69. package/dist/chunk-JLBH7RCF.js +4 -0
  70. package/dist/chunk-JPGO36XP.js +1 -0
  71. package/dist/chunk-JUVAGMIH.js +1 -0
  72. package/dist/chunk-JVIKCGDY.js +1 -0
  73. package/dist/chunk-K2WUCOQJ.js +32 -0
  74. package/dist/chunk-K5YV6UVF.js +4 -0
  75. package/dist/chunk-KBQ4LGFB.js +1 -0
  76. package/dist/chunk-KGXQS7LS.js +1 -0
  77. package/dist/chunk-KL5Z3T6L.js +1 -0
  78. package/dist/chunk-KLMDWDT2.js +1 -0
  79. package/dist/chunk-KNVM7N3U.js +1 -0
  80. package/dist/chunk-KWJ562F2.js +12 -0
  81. package/dist/chunk-LALIKZPS.js +5 -0
  82. package/dist/chunk-LAZJ47DZ.js +6 -0
  83. package/dist/chunk-LDGAHMS7.js +159 -0
  84. package/dist/chunk-LNHLDRC5.js +1 -0
  85. package/dist/chunk-LW7U753G.js +1 -0
  86. package/dist/chunk-LX3ZOW52.js +12 -0
  87. package/dist/chunk-LXFJDCNG.js +1 -0
  88. package/dist/chunk-MBAFWQSZ.js +7 -0
  89. package/dist/chunk-MOA33ZFO.js +1 -0
  90. package/dist/chunk-MQNYGGAM.js +1 -0
  91. package/dist/chunk-N5YIPQ6J.js +1 -0
  92. package/dist/chunk-N7RBSKYT.js +1 -0
  93. package/dist/chunk-NF2ABOOU.js +1 -0
  94. package/dist/chunk-NRAFVIU3.js +1 -0
  95. package/dist/chunk-OCOY5MV2.js +1 -0
  96. package/dist/chunk-ODNGDO4H.js +50 -0
  97. package/dist/chunk-OHY4ZL3U.js +2 -0
  98. package/dist/chunk-OLZHWPZP.js +1 -0
  99. package/dist/chunk-OUOYKNMY.js +1 -0
  100. package/dist/chunk-OXPWCC7I.js +64 -0
  101. package/dist/chunk-P5VVOLGV.js +1 -0
  102. package/dist/chunk-P6XE4MH5.js +1 -0
  103. package/dist/chunk-P7R7FBY2.js +3 -0
  104. package/dist/chunk-PD5ZHJWI.js +1 -0
  105. package/dist/chunk-PIBY5DDZ.js +1 -0
  106. package/dist/chunk-Q7ING5F5.js +1 -0
  107. package/dist/chunk-QFWIDATO.js +1 -0
  108. package/dist/chunk-QRRNOVJ3.js +1 -0
  109. package/dist/chunk-QSTEVZFQ.js +1 -0
  110. package/dist/chunk-R466TU3N.js +2 -0
  111. package/dist/chunk-RF2DPBA6.js +1 -0
  112. package/dist/chunk-RFG5RMPL.js +1 -0
  113. package/dist/chunk-RM5SJJN6.js +559 -0
  114. package/dist/chunk-RVNMVBPM.js +1 -0
  115. package/dist/chunk-SBEZBZM7.js +144 -0
  116. package/dist/chunk-SGQ6D3LU.js +15 -0
  117. package/dist/chunk-SRCQVUMC.js +1 -0
  118. package/dist/chunk-TFSBQ4RY.js +5 -0
  119. package/dist/chunk-TQYMC7TH.js +1 -0
  120. package/dist/chunk-UGDBJTLP.js +6 -0
  121. package/dist/chunk-UGXYQ23Y.js +1411 -0
  122. package/dist/chunk-UWJ73J4B.js +1 -0
  123. package/dist/chunk-V2CNCPIE.js +2 -0
  124. package/dist/chunk-VBUZWRUL.js +1 -0
  125. package/dist/chunk-VS3T5YOG.js +264 -0
  126. package/dist/chunk-VWYM4OWK.js +1 -0
  127. package/dist/chunk-VY6SNDKW.js +3 -0
  128. package/dist/chunk-WDC3KIZT.js +2 -0
  129. package/dist/chunk-WFXRSKRK.js +1 -0
  130. package/dist/chunk-WXVZJJOR.js +16 -0
  131. package/dist/chunk-WZBSLU4Q.js +6 -0
  132. package/dist/chunk-XBXMPFXM.js +1 -0
  133. package/dist/chunk-XEFQQPL4.js +1 -0
  134. package/dist/chunk-XLELNRFF.js +3 -0
  135. package/dist/chunk-XNO6DZYP.js +1 -0
  136. package/dist/chunk-Y5JKV2AI.js +1 -0
  137. package/dist/chunk-YC6G4MHD.js +3 -0
  138. package/dist/chunk-YI232QLS.js +1 -0
  139. package/dist/chunk-YMWHHINU.js +1 -0
  140. package/dist/chunk-YOZNRLFC.js +1 -0
  141. package/dist/chunk-YZDDTYTU.js +11 -0
  142. package/dist/chunk-Z35BTAM6.js +2 -0
  143. package/dist/chunk-ZR76GGZ6.js +5 -0
  144. package/dist/chunk-ZTMSBSYD.js +1 -0
  145. package/dist/chunk-ZV6NCNI4.js +586 -0
  146. package/dist/chunk-ZVJVDCIM.js +1 -0
  147. package/dist/cli/commands/app/app-logs/sources.js +2 -0
  148. package/dist/cli/commands/app/build.js +1 -0
  149. package/dist/cli/commands/app/bulk/cancel.js +1 -0
  150. package/dist/cli/commands/app/bulk/execute.js +9 -0
  151. package/dist/cli/commands/app/bulk/status.js +5 -0
  152. package/dist/cli/commands/app/config/link.js +4 -0
  153. package/dist/cli/commands/app/config/pull.js +1 -0
  154. package/dist/cli/commands/app/config/use.js +1 -0
  155. package/dist/cli/commands/app/config/validate.js +3 -0
  156. package/dist/cli/commands/app/demo/watcher.js +1 -0
  157. package/dist/cli/commands/app/deploy.js +22 -0
  158. package/dist/cli/commands/app/dev/clean.js +5 -0
  159. package/dist/cli/commands/app/dev.js +320 -0
  160. package/dist/cli/commands/app/env/pull.js +11 -0
  161. package/dist/cli/commands/app/env/show.js +1 -0
  162. package/dist/cli/commands/app/execute.js +1 -0
  163. package/dist/cli/commands/app/function/build.js +1 -0
  164. package/dist/cli/commands/app/function/info.js +16 -0
  165. package/dist/cli/commands/app/function/replay.js +5 -0
  166. package/dist/cli/commands/app/function/run.js +1 -0
  167. package/dist/cli/commands/app/function/schema.js +1 -0
  168. package/dist/cli/commands/app/function/typegen.js +1 -0
  169. package/dist/cli/commands/app/generate/extension.js +5 -0
  170. package/dist/cli/commands/app/import-custom-data-definitions.js +4 -0
  171. package/dist/cli/commands/app/import-extensions.js +1 -0
  172. package/dist/cli/commands/app/info.js +11 -0
  173. package/dist/cli/commands/app/init.js +10 -0
  174. package/dist/cli/commands/app/logs.js +2 -0
  175. package/dist/cli/commands/app/release.js +4 -0
  176. package/dist/cli/commands/app/versions/list.js +1 -0
  177. package/dist/cli/commands/app/webhook/trigger.js +25 -0
  178. package/dist/cli/commands/auth/login.js +1 -20
  179. package/dist/cli/commands/auth/logout.js +1 -12
  180. package/dist/cli/commands/cache/clear.js +1 -11
  181. package/dist/cli/commands/config/autoupgrade/constants.d.ts +0 -1
  182. package/dist/cli/commands/config/autoupgrade/constants.js +1 -6
  183. package/dist/cli/commands/config/autoupgrade/off.js +1 -22
  184. package/dist/cli/commands/config/autoupgrade/on.js +1 -22
  185. package/dist/cli/commands/config/autoupgrade/status.js +1 -30
  186. package/dist/cli/commands/debug/command-flags.js +1 -79
  187. package/dist/cli/commands/docs/generate.js +1 -157
  188. package/dist/cli/commands/doctor-release/doctor-release.js +1 -25
  189. package/dist/cli/commands/doctor-release/theme/index.js +1 -56
  190. package/dist/cli/commands/help.js +1 -26
  191. package/dist/cli/commands/kitchen-sink/async.js +1 -16
  192. package/dist/cli/commands/kitchen-sink/index.js +1 -21
  193. package/dist/cli/commands/kitchen-sink/prompts.js +1 -16
  194. package/dist/cli/commands/kitchen-sink/static.js +1 -16
  195. package/dist/cli/commands/notifications/generate.js +1 -11
  196. package/dist/cli/commands/notifications/list.js +1 -33
  197. package/dist/cli/commands/organization/list.js +1 -0
  198. package/dist/cli/commands/search.js +1 -27
  199. package/dist/cli/commands/theme/check.js +1 -0
  200. package/dist/cli/commands/theme/console.js +15 -0
  201. package/dist/cli/commands/theme/delete.js +7 -0
  202. package/dist/cli/commands/theme/dev.js +26 -0
  203. package/dist/cli/commands/theme/duplicate.js +32 -0
  204. package/dist/cli/commands/theme/info.js +1 -0
  205. package/dist/cli/commands/theme/init.js +8 -0
  206. package/dist/cli/commands/theme/language-server.js +1 -0
  207. package/dist/cli/commands/theme/list.js +1 -0
  208. package/dist/cli/commands/theme/metafields/pull.js +3 -0
  209. package/dist/cli/commands/theme/open.js +8 -0
  210. package/dist/cli/commands/theme/package.js +7 -0
  211. package/dist/cli/commands/theme/preview.js +1 -0
  212. package/dist/cli/commands/theme/profile.js +3 -0
  213. package/dist/cli/commands/theme/publish.js +7 -0
  214. package/dist/cli/commands/theme/pull.js +3 -0
  215. package/dist/cli/commands/theme/push.js +28 -0
  216. package/dist/cli/commands/theme/rename.js +6 -0
  217. package/dist/cli/commands/theme/share.js +3 -0
  218. package/dist/cli/commands/upgrade.js +1 -17
  219. package/dist/cli/commands/version.js +1 -10
  220. package/dist/command-registry.d.ts +8 -0
  221. package/dist/command-registry.js +1 -0
  222. package/dist/conf-store-U5ZITKJN.js +1 -0
  223. package/dist/custom-oclif-loader-DVFFWCBV.js +1 -0
  224. package/dist/deprecations-TU5UQJVV.js +1 -0
  225. package/dist/dist-2Z5TND4U.js +1 -0
  226. package/dist/dist-GYHFDHKP.js +1 -0
  227. package/dist/environments-Z5PR7DSI.js +1 -0
  228. package/dist/error-IJGNYKZ3.js +1 -0
  229. package/dist/error-handler-WSCGNS2P.js +1 -0
  230. package/dist/fs-5BDEA2KD.js +1 -0
  231. package/dist/hooks/app-init.d.ts +9 -0
  232. package/dist/hooks/app-init.js +1 -0
  233. package/dist/hooks/did-you-mean.d.ts +1 -0
  234. package/dist/hooks/did-you-mean.js +1 -0
  235. package/dist/hooks/hydrogen-init.d.ts +7 -0
  236. package/dist/hooks/hydrogen-init.js +1 -0
  237. package/dist/hooks/plugin-plugins.d.ts +1 -0
  238. package/dist/hooks/plugin-plugins.js +1 -0
  239. package/dist/hooks/postrun.js +1 -1
  240. package/dist/hooks/prerun.js +1 -1
  241. package/dist/hooks/public-metadata.d.ts +1 -0
  242. package/dist/hooks/public-metadata.js +1 -0
  243. package/dist/hooks/sensitive-metadata.d.ts +1 -0
  244. package/dist/hooks/sensitive-metadata.js +1 -0
  245. package/dist/hooks/tunnel-provider.d.ts +1 -0
  246. package/dist/hooks/tunnel-provider.js +1 -0
  247. package/dist/hooks/tunnel-start.d.ts +1 -0
  248. package/dist/hooks/tunnel-start.js +1 -0
  249. package/dist/http-proxy-node16-Q5DZMBHC.js +38 -0
  250. package/dist/index.js +254 -3668
  251. package/dist/is-global-V4ZRHQG2.js +1 -0
  252. package/dist/latest-version-EFWBOTWM.js +49 -0
  253. package/dist/lib-5L7UKDEK.js +1 -0
  254. package/dist/lib-C3VO2BQW.js +1 -0
  255. package/dist/lib-QB6I6CTC.js +1 -0
  256. package/dist/local-6QPX4GCJ.js +1 -0
  257. package/dist/local-storage-JLXBZVWO.js +1 -0
  258. package/dist/metadata-UDMOTRS7.js +1 -0
  259. package/dist/{morph-DQREIZD2.js → morph-EMYAITFM.js} +1 -1
  260. package/dist/node-package-manager-HAFRYGUM.js +1 -0
  261. package/dist/notifications-system-MP7WDOCS.js +1 -0
  262. package/dist/npa-ICFSA3NL.js +1 -0
  263. package/dist/output-YGMHXEIS.js +1 -0
  264. package/dist/{path-HUAU3YBW.js → path-CWUNINMX.js} +1 -1
  265. package/dist/{prettier-PGDJ5B7I.js → prettier-NVRHEAFO.js} +1 -1
  266. package/dist/system-KLXD4FXF.js +1 -0
  267. package/dist/tsconfig.tsbuildinfo +1 -1
  268. package/dist/typescript-K5CWIA4V.js +1 -0
  269. package/dist/ui-GHG3UGB3.js +1 -0
  270. package/dist/upgrade-OPZGPM5J.js +1 -0
  271. package/dist/version-D5PJZIRW.js +1 -0
  272. package/dist/version-KRQBMYCH.js +1 -0
  273. package/dist/workerd-L2EJKIAQ.js +18 -0
  274. package/oclif.manifest.json +5247 -6056
  275. package/package.json +17 -41
  276. package/dist/chunk-2E6Y4J4T.js +0 -3
  277. package/dist/chunk-45T5XUIM.js +0 -1
  278. package/dist/chunk-52KHWFYF.js +0 -1
  279. package/dist/chunk-FU2Y2M3M.js +0 -5
  280. package/dist/chunk-JBSYWYIP.js +0 -2
  281. package/dist/chunk-KVWHPGOA.js +0 -415
  282. package/dist/chunk-LH4VO6EV.js +0 -63
  283. package/dist/chunk-PRNHS74J.js +0 -847
  284. package/dist/chunk-RXF32AET.js +0 -396
  285. package/dist/chunk-SVA22NZQ.js +0 -607
  286. package/dist/chunk-YPE4BWWD.js +0 -3
  287. package/dist/error-handler-CRWXGODM.js +0 -1
  288. package/dist/http-proxy-node16-TTURN6MD.js +0 -38
  289. package/dist/lib-3WHF5XD3.js +0 -1
  290. package/dist/local-7MUCLBBI.js +0 -1
  291. package/dist/node-package-manager-GFIGZZ24.js +0 -1
  292. package/dist/npa-OKDXXRCU.js +0 -1
  293. package/dist/ui-AOFJCTTO.js +0 -1
  294. package/dist/workerd-VBG5LYNX.js +0 -18
  295. /package/dist/{chunk-KADPE3PY.js → chunk-7MUKLZOL.js} +0 -0
@@ -0,0 +1,567 @@
1
+ import{a as Ie,b as Pe,c as _e,d as Me,e as Ee,f as Ce}from"./chunk-XBXMPFXM.js";import{c as he}from"./chunk-52GC6XUT.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-B2EHO7ZC.js";import{w as j}from"./chunk-LAZJ47DZ.js";import{a as M}from"./chunk-7BGM2GAH.js";import{b as ke}from"./chunk-4HHXSMD7.js";import{d as u,g as k}from"./chunk-JPGO36XP.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-GFEAKSGV.js";import{f as w,k as De}from"./chunk-YC6G4MHD.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(`
2
+ `),{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`
3
+ mutation AppCreate(
4
+ $org: Int!
5
+ $title: String!
6
+ $appUrl: Url!
7
+ $redir: [Url]!
8
+ $type: AppType
9
+ $requestedAccessScopes: [String!]
10
+ ) {
11
+ appCreate(
12
+ input: {
13
+ organizationID: $org
14
+ title: $title
15
+ applicationUrl: $appUrl
16
+ redirectUrlWhitelist: $redir
17
+ appType: $type
18
+ requestedAccessScopes: $requestedAccessScopes
19
+ }
20
+ ) {
21
+ app {
22
+ id
23
+ title
24
+ apiKey
25
+ organizationId
26
+ apiSecretKeys {
27
+ secret
28
+ }
29
+ appType
30
+ grantedScopes
31
+ applicationUrl
32
+ redirectUrlWhitelist
33
+ requestedAccessScopes
34
+ webhookApiVersion
35
+ embedded
36
+ posEmbedded
37
+ preferencesUrl
38
+ gdprWebhooks {
39
+ customerDeletionUrl
40
+ customerDataRequestUrl
41
+ shopDeletionUrl
42
+ }
43
+ appProxy {
44
+ subPath
45
+ subPathPrefix
46
+ url
47
+ }
48
+ disabledFlags
49
+ }
50
+ userErrors {
51
+ field
52
+ message
53
+ }
54
+ }
55
+ }
56
+ `;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`
57
+ query allAppExtensionRegistrations($apiKey: String!) {
58
+ app(apiKey: $apiKey) {
59
+ extensionRegistrations {
60
+ id
61
+ uuid
62
+ title
63
+ type
64
+ draftVersion {
65
+ config
66
+ context
67
+ }
68
+ activeVersion {
69
+ config
70
+ context
71
+ }
72
+ }
73
+ configurationRegistrations {
74
+ id
75
+ uuid
76
+ title
77
+ type
78
+ draftVersion {
79
+ config
80
+ context
81
+ }
82
+ activeVersion {
83
+ config
84
+ context
85
+ }
86
+ }
87
+ dashboardManagedExtensionRegistrations {
88
+ id
89
+ uuid
90
+ title
91
+ type
92
+ activeVersion {
93
+ config
94
+ context
95
+ }
96
+ draftVersion {
97
+ config
98
+ context
99
+ }
100
+ }
101
+ }
102
+ }
103
+ `;r();var Le=m`
104
+ query activeAppVersion($apiKey: String!) {
105
+ app(apiKey: $apiKey) {
106
+ activeAppVersion {
107
+ appModuleVersions {
108
+ registrationId
109
+ registrationUuid
110
+ registrationTitle
111
+ type
112
+ config
113
+ specification {
114
+ identifier
115
+ name
116
+ experience
117
+ options {
118
+ managementExperience
119
+ }
120
+ }
121
+ }
122
+ }
123
+ }
124
+ }
125
+ `;r();var $e=m`
126
+ mutation AppDeploy(
127
+ $apiKey: String!
128
+ $bundleUrl: String
129
+ $appModules: [AppModuleSettings!]
130
+ $skipPublish: Boolean
131
+ $message: String
132
+ $versionTag: String
133
+ $commitReference: String
134
+ ) {
135
+ appDeploy(
136
+ input: {
137
+ apiKey: $apiKey
138
+ bundleUrl: $bundleUrl
139
+ appModules: $appModules
140
+ skipPublish: $skipPublish
141
+ message: $message
142
+ versionTag: $versionTag
143
+ commitReference: $commitReference
144
+ }
145
+ ) {
146
+ appVersion {
147
+ uuid
148
+ id
149
+ message
150
+ versionTag
151
+ location
152
+ appModuleVersions {
153
+ uuid
154
+ registrationUuid
155
+ validationErrors {
156
+ message
157
+ field
158
+ }
159
+ }
160
+ }
161
+ userErrors {
162
+ message
163
+ field
164
+ category
165
+ details
166
+ }
167
+ }
168
+ }
169
+ `;r();var Be=m`
170
+ mutation GenerateSignedUploadUrl($apiKey: String!, $bundleFormat: Int!) {
171
+ appVersionGenerateSignedUploadUrl(input: {apiKey: $apiKey, bundleFormat: $bundleFormat}) {
172
+ signedUploadUrl
173
+ userErrors {
174
+ field
175
+ message
176
+ }
177
+ }
178
+ }
179
+ `;r();var We=m`
180
+ mutation ExtensionCreate(
181
+ $apiKey: String!
182
+ $type: ExtensionType!
183
+ $title: String!
184
+ $config: JSON!
185
+ $context: String
186
+ $handle: String
187
+ ) {
188
+ extensionCreate(
189
+ input: {apiKey: $apiKey, type: $type, title: $title, config: $config, context: $context, handle: $handle}
190
+ ) {
191
+ extensionRegistration {
192
+ id
193
+ uuid
194
+ type
195
+ title
196
+ draftVersion {
197
+ config
198
+ registrationId
199
+ lastUserInteractionAt
200
+ validationErrors {
201
+ field
202
+ message
203
+ }
204
+ }
205
+ }
206
+ userErrors {
207
+ field
208
+ message
209
+ }
210
+ }
211
+ }
212
+ `;r();var Ke=m`
213
+ mutation convertDevToTestStore($input: ConvertDevToTestStoreInput!) {
214
+ convertDevToTestStore(input: $input) {
215
+ convertedToTestStore
216
+ userErrors {
217
+ message
218
+ field
219
+ }
220
+ }
221
+ }
222
+ `;r();var je=m`
223
+ query FindOrganization($orgId: ID!, $shopDomain: String) {
224
+ organizations(id: $orgId, first: 1) {
225
+ nodes {
226
+ id
227
+ businessName
228
+ stores(shopDomain: $shopDomain, first: 1, archived: false) {
229
+ nodes {
230
+ shopId
231
+ link
232
+ shopDomain
233
+ shopName
234
+ transferDisabled
235
+ convertableToPartnerTest
236
+ }
237
+ }
238
+ }
239
+ }
240
+ }
241
+ `;r();var He=m`
242
+ query AppVersionsQuery($apiKey: String!) {
243
+ app(apiKey: $apiKey) {
244
+ id
245
+ organizationId
246
+ title
247
+ appVersions {
248
+ nodes {
249
+ createdAt
250
+ createdBy {
251
+ displayName
252
+ }
253
+ message
254
+ status
255
+ versionTag
256
+ }
257
+ pageInfo {
258
+ totalResults
259
+ }
260
+ }
261
+ }
262
+ }
263
+ `;r();var Ge=m`
264
+ mutation DevelopmentStorePreviewUpdate($input: DevelopmentStorePreviewUpdateInput!) {
265
+ developmentStorePreviewUpdate(input: $input) {
266
+ app {
267
+ id
268
+ developmentStorePreviewEnabled
269
+ }
270
+ userErrors {
271
+ message
272
+ field
273
+ }
274
+ }
275
+ }
276
+ `;r();var Je=m`
277
+ query FindAppPreviewMode($apiKey: String!) {
278
+ app(apiKey: $apiKey) {
279
+ developmentStorePreviewEnabled
280
+ }
281
+ }
282
+ `;r();var Ze=m`
283
+ query AppVersionsDiff($apiKey: String!, $versionId: ID!) {
284
+ app(apiKey: $apiKey) {
285
+ versionsDiff(appVersionId: $versionId) {
286
+ added {
287
+ uuid
288
+ registrationTitle
289
+ specification {
290
+ identifier
291
+ experience
292
+ options {
293
+ managementExperience
294
+ }
295
+ }
296
+ }
297
+ updated {
298
+ uuid
299
+ registrationTitle
300
+ specification {
301
+ identifier
302
+ experience
303
+ options {
304
+ managementExperience
305
+ }
306
+ }
307
+ }
308
+ removed {
309
+ uuid
310
+ registrationTitle
311
+ specification {
312
+ identifier
313
+ experience
314
+ options {
315
+ managementExperience
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ `;r();var Ye=m`
323
+ mutation AppRelease($apiKey: String!, $appVersionId: ID, $versionTag: String) {
324
+ appRelease(input: {apiKey: $apiKey, appVersionId: $appVersionId, versionTag: $versionTag}) {
325
+ appVersion {
326
+ versionTag
327
+ message
328
+ location
329
+ }
330
+ userErrors {
331
+ message
332
+ field
333
+ category
334
+ details
335
+ }
336
+ }
337
+ }
338
+ `;r();var Xe=m`
339
+ query AppVersionByTag($apiKey: String!, $versionTag: String!) {
340
+ app(apiKey: $apiKey) {
341
+ appVersion(versionTag: $versionTag) {
342
+ id
343
+ uuid
344
+ versionTag
345
+ location
346
+ message
347
+ appModuleVersions {
348
+ config
349
+ specification {
350
+ identifier
351
+ name
352
+ experience
353
+ options {
354
+ managementExperience
355
+ }
356
+ }
357
+ }
358
+ }
359
+ }
360
+ }
361
+ `;r();var ei=`
362
+ mutation samplePayload($topic: String!, $api_version: String!, $address: String!, $delivery_method: String!, $shared_secret: String!, $api_key: String) {
363
+ sendSampleWebhook(input: {topic: $topic, apiVersion: $api_version, address: $address, deliveryMethod: $delivery_method, sharedSecret: $shared_secret, apiKey: $api_key}) {
364
+ samplePayload
365
+ success
366
+ headers
367
+ userErrors {
368
+ message
369
+ }
370
+ }
371
+ }
372
+ `;async function wt(n,e,i){let{sendSampleWebhook:a}=await n.sendSampleWebhook(e,i);return a}r();var ii=`
373
+ query getApiVersions {
374
+ publicApiVersions
375
+ }
376
+ `;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=`
377
+ query getWebhookTopics($api_version: String!) {
378
+ webhookTopics(apiVersion: $api_version)
379
+ }
380
+ `;async function Lt(n,e,i){let a={api_version:e},{webhookTopics:t}=await n.topics(a,i);return t}r();var ai=m`
381
+ mutation MigrateFlowExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
382
+ migrateFlowExtension(
383
+ input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
384
+ ) {
385
+ migratedFlowExtension
386
+ userErrors {
387
+ field
388
+ message
389
+ }
390
+ }
391
+ }
392
+ `;r();var ti=m`
393
+ mutation appUpdate($apiKey: String!, $applicationUrl: Url!, $redirectUrlWhitelist: [Url]!, $appProxy: AppProxyInput) {
394
+ appUpdate(
395
+ input: {
396
+ apiKey: $apiKey
397
+ applicationUrl: $applicationUrl
398
+ redirectUrlWhitelist: $redirectUrlWhitelist
399
+ appProxy: $appProxy
400
+ }
401
+ ) {
402
+ userErrors {
403
+ message
404
+ field
405
+ }
406
+ }
407
+ }
408
+ `;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`
409
+ query RemoteTemplateSpecifications($version: String, $apiKey: String) {
410
+ templateSpecifications(version: $version, apiKey: $apiKey) {
411
+ identifier
412
+ name
413
+ defaultName
414
+ group
415
+ sortPriority
416
+ supportLinks
417
+ types {
418
+ url
419
+ type
420
+ extensionPoints
421
+ supportedFlavors {
422
+ name
423
+ value
424
+ path
425
+ }
426
+ }
427
+ }
428
+ }
429
+ `;r();var si=m`
430
+ query TargetSchemaDefinitionQuery($apiKey: String!, $version: String!, $target: String!) {
431
+ definition: functionTargetSchemaDefinition(apiKey: $apiKey, version: $version, target: $target)
432
+ }
433
+ `;r();var pi=m`
434
+ query ApiSchemaDefinitionQuery($apiKey: String!, $version: String!, $type: String!) {
435
+ definition: functionApiSchemaDefinition(apiKey: $apiKey, version: $version, type: $type)
436
+ }
437
+ `;r();var li=m`
438
+ mutation MigrateToUiExtension($apiKey: String!, $registrationId: ID, $registrationUuid: String) {
439
+ migrateToUiExtension(
440
+ input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid}
441
+ ) {
442
+ migratedToUiExtension
443
+ userErrors {
444
+ field
445
+ message
446
+ }
447
+ }
448
+ }
449
+ `;r();var di=m`
450
+ query fetchSpecifications($apiKey: String!) {
451
+ extensionSpecifications(apiKey: $apiKey) {
452
+ name
453
+ externalName
454
+ externalIdentifier
455
+ identifier
456
+ gated
457
+ experience
458
+ options {
459
+ managementExperience
460
+ registrationLimit
461
+ }
462
+ features {
463
+ argo {
464
+ surface
465
+ }
466
+ }
467
+ validationSchema {
468
+ jsonSchema
469
+ }
470
+ }
471
+ }
472
+ `;r();var mi=m`
473
+ query FindOrganization($id: ID!) {
474
+ organizations(id: $id, first: 1) {
475
+ nodes {
476
+ id
477
+ businessName
478
+ }
479
+ }
480
+ }
481
+ `;r();var ui=m`
482
+ mutation MigrateAppModule($apiKey: String!, $registrationId: ID, $registrationUuid: String, $type: String!) {
483
+ migrateAppModule(
484
+ input: {apiKey: $apiKey, registrationId: $registrationId, registrationUuid: $registrationUuid, type: $type}
485
+ ) {
486
+ migratedAppModule
487
+ userErrors {
488
+ field
489
+ message
490
+ }
491
+ }
492
+ }
493
+ `;r();var ci=m`
494
+ mutation AppLogsSubscribe($apiKey: String!, $shopIds: [ID!]!) {
495
+ appLogsSubscribe(input: {apiKey: $apiKey, shopIds: $shopIds}) {
496
+ jwtToken
497
+ success
498
+ errors
499
+ }
500
+ }
501
+ `;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`
502
+ query FindApp($apiKey: String!) {
503
+ app(apiKey: $apiKey) {
504
+ id
505
+ title
506
+ apiKey
507
+ organizationId
508
+ apiSecretKeys {
509
+ secret
510
+ }
511
+ appType
512
+ grantedScopes
513
+ applicationUrl
514
+ redirectUrlWhitelist
515
+ requestedAccessScopes
516
+ webhookApiVersion
517
+ embedded
518
+ posEmbedded
519
+ preferencesUrl
520
+ gdprWebhooks {
521
+ customerDeletionUrl
522
+ customerDataRequestUrl
523
+ shopDeletionUrl
524
+ }
525
+ appProxy {
526
+ subPath
527
+ subPathPrefix
528
+ url
529
+ }
530
+ developmentStorePreviewEnabled
531
+ disabledFlags
532
+ }
533
+ }
534
+ `;r();var yi=m`
535
+ query FindOrganization($id: ID!, $title: String) {
536
+ organizations(id: $id, first: 1) {
537
+ nodes {
538
+ id
539
+ businessName
540
+ apps(first: 25, title: $title) {
541
+ pageInfo {
542
+ hasNextPage
543
+ }
544
+ nodes {
545
+ id
546
+ title
547
+ apiKey
548
+ }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ `;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`
554
+ query OrganizationBetaFlags($organizationId: OrganizationID!) {
555
+ organization(organizationId: $organizationId) {
556
+ id
557
+ ${n.map(e=>`flag_${e}: hasFeatureFlag(handle: "${e}")`).join(`
558
+ `)}
559
+ }
560
+ }`}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:{kind:"StringValue",value:"app_development",block:!1}}]},{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"STORE_STATUS"}},{kind:"ObjectField",name:{kind:"Name",value:"operator"},value:{kind:"EnumValue",value:"EQUALS"}},{kind:"ObjectField",name:{kind:"Name",value:"value"},value:{kind:"StringValue",value:"ACTIVE",block:!1}}]}]}},{kind:"Argument",name:{kind:"Name",value:"search"},value:{kind:"Variable",name:{kind:"Name",value:"searchTerm"}}}],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:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{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 Li={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ProvisionShopAccess"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationUserProvisionShopAccessInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organizationUserProvisionShopAccess"},arguments:[{kind:"Argument",name:{kind:"Name",value:"organizationUserProvisionShopAccessInput"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"success"}},{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 $i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"ActiveAppReleaseFromApiKey"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"app"},name:{kind:"Name",value:"appByKey"},arguments:[{kind:"Argument",name:{kind:"Name",value:"key"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"AppVersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AppVersionInfo"},typeCondition:{kind:"NamedType",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:"organizationId"}},{kind:"Field",name:{kind:"Name",value:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"key"}}]}}]}},{kind:"Field",name:{kind:"Name",value:"grantedShopifyApprovalScopes"}}]}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]}}]}}]};r();var Y={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReleaseVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appReleaseCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"versionId"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"release"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{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:"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:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Bi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppVersion"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"metadata"}},type:{kind:"NamedType",name:{kind:"Name",value:"VersionMetadataInput"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appVersionCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}},{kind:"Argument",name:{kind:"Name",value:"metadata"},value:{kind:"Variable",name:{kind:"Name",value:"metadata"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionTag"}},{kind:"Field",name:{kind:"Name",value:"message"}},{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:"field"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"category"}},{kind:"Field",name:{kind:"Name",value:"code"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}}]};r();var Wi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAssetURL"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SourceExtension"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appRequestSourceUploadUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"sourceExtension"},value:{kind:"Variable",name:{kind:"Name",value:"sourceExtension"}}},{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:"sourceUploadUrl"}},{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={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"version"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"versionId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var ji={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersions"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"versions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"20"}}],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:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"createdBy"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}},{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"}}]}},{kind:"Field",name:{kind:"Name",value:"versionsCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Hi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppInstallCount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"appId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"installCount"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Gi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateApp"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AppVersionInput"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appCreate"},arguments:[{kind:"Argument",name:{kind:"Name",value:"initialVersion"},value:{kind:"Variable",name:{kind:"Name",value:"initialVersion"}}},{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:"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:"activeRoot"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"clientCredentials"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"secrets"},selectionSet:{kind:"SelectionSet",selections:[{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:"__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:"category"}},{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"on"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Ji={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"fetchSpecifications"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"specifications"},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:"name"}},{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"features"}},{kind:"Field",name:{kind:"Name",value:"uidStrategy"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"Field",name:{kind:"Name",value:"appModuleLimit"}},{kind:"Field",name:{kind:"Name",value:"isClientProvided"}}]}},{kind:"Field",name:{kind:"Name",value:"validationSchema"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jsonSchema"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Zi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"listApps"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appsConnection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}},{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],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:"key"}},{kind:"Field",name:{kind:"Name",value:"activeRelease"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"version"},selectionSet:{kind:"SelectionSet",selections:[{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"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Yi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganizations"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"organizationId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"OrganizationID"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUserAccount"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},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:"name"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var Xi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserInfo"},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:"email"}},{kind:"Field",name:{kind:"Name",value:"organizations"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"2"}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},selectionSet:{kind:"SelectionSet",selections:[{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();var en={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"availableTopics"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"availableTopics"},arguments:[{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}}]}]}}]};r();var nn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CliTesting"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"address"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"topic"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"cliTesting"},arguments:[{kind:"Argument",name:{kind:"Name",value:"address"},value:{kind:"Variable",name:{kind:"Name",value:"address"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}},{kind:"Argument",name:{kind:"Name",value:"apiVersion"},value:{kind:"Variable",name:{kind:"Name",value:"apiVersion"}}},{kind:"Argument",name:{kind:"Name",value:"deliveryMethod"},value:{kind:"Variable",name:{kind:"Name",value:"deliveryMethod"}}},{kind:"Argument",name:{kind:"Name",value:"sharedSecret"},value:{kind:"Variable",name:{kind:"Name",value:"sharedSecret"}}},{kind:"Argument",name:{kind:"Name",value:"topic"},value:{kind:"Variable",name:{kind:"Name",value:"topic"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"headers"}},{kind:"Field",name:{kind:"Name",value:"samplePayload"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var an={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"publicApiVersions"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var tn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByTarget"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"handle"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"target"},arguments:[{kind:"Argument",name:{kind:"Name",value:"handle"},value:{kind:"Variable",name:{kind:"Name",value:"handle"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();var rn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SchemaDefinitionByApiType"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"type"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"version"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"api"},arguments:[{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"Variable",name:{kind:"Name",value:"type"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"schema"},arguments:[{kind:"Argument",name:{kind:"Name",value:"version"},value:{kind:"Variable",name:{kind:"Name",value:"version"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"definition"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};r();r();r();r();var oa=/^(https:\/\/)/,sa=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,pa=/^arn:aws:events:(?<aws_region>[a-z]{2}-[a-z]+-[0-9]+)::event-source\/aws\.partner\/shopify\.com(\.test)?\/(?<api_client_id>\d+)\/(?<event_source_name>.+)$/;function on(n){return typeof n=="string"&&n.endsWith("/")?n.replace(/\/+$/,""):n}var D=s.string({invalid_type_error:"Value must be string"}).refine(n=>n.startsWith("/")?!0:oa.test(n)||sa.test(n)||pa.test(n),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id} or Eventbridge ARN"});var sn=s.object({topics:s.array(s.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:s.array(s.string({invalid_type_error:"Value must be a string"})).optional(),uri:s.preprocess(n=>on(n),D,{required_error:"Missing value at"}),include_fields:s.array(s.string({invalid_type_error:"Value must be a string"})).optional(),filter:s.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:s.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:s.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:s.array(s.enum(["customers/redact","customers/data_request","shop/redact"]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});r();function pn(n,e){let i=la(n);if(i)return e.addIssue(i),s.NEVER}function la(n){let{subscriptions:e=[]}=n,i=new Set,a=[];if(!e.length)return;if(n.privacy_compliance&&n.subscriptions?.some(o=>o.compliance_topics))return{code:s.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let t=e.flatMap(o=>o.compliance_topics).filter(Boolean);if(se(t).length!==t.length)return{code:s.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[o,{uri:d,topics:p=[],compliance_topics:l=[],filter:c=""}]of e.entries()){let v=["subscriptions",o];if(!p.length&&!l.length)return{code:s.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:v};p.forEach(g=>{let y=`${g}::${d}::${c}`;if(i.has(y)){let S=c?Q.dim(`
561
+
562
+ topic: ${g}
563
+ uri: ${d}
564
+ filter: ${c}`):Q.dim(`
565
+
566
+ topic: ${g}
567
+ uri: ${d}`);a.push(S)}i.add(y)})}if(a.length>0){let o=a.join("");return{code:s.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${o}`,path:["subscriptions"]}}}r();function dn(n){let e=F(n,"webhooks");if(!e)return n;let{api_version:i}=e;return{api_version:i}}function mn(n){let e={},i=F(n,"api_version");return e={...i?{webhooks:{api_version:i}}:{}},e}function un(n){if(n.length===0)return;let e=n.filter(o=>o.topics!==void 0).flatMap(({compliance_topics:o,topics:d,...p})=>cn(d)?.map(c=>({topics:[c],...p}))??[]),i=n.filter(o=>o.topics===void 0||o.compliance_topics!==void 0).map(({compliance_topics:o,topics:d,...p})=>({compliance_topics:o,...p})),a=ua(i,"compliance_topics"),t=da(a);return[...ln(t),...ln(e)]}function cn(n){return n?.sort((e,i)=>e.localeCompare(i))}function ln(n){return n.sort((e,i)=>e.uri.localeCompare(i.uri))}function da(n){return n.forEach(e=>e.compliance_topics=cn(e.compliance_topics)),n}function ma(n,e){return n.find(i=>i.uri===e.uri&&Se(i.include_fields??[],e.include_fields??[])&&i.filter===e.filter)}function ua(n,e){return n.reduce((i,a)=>{let t=ma(i,a);return t?e&&a?.[e]?.length?t[e]?.push(...a[e]):(a.topics&&(t.topics??=[],t.topics.push(...a.topics)),a.compliance_topics&&(t.compliance_topics??=[],t.compliance_topics.push(...a.compliance_topics))):i.push(a),i},[])}var ca=s.object({api_version:s.string({required_error:"String is required"}),privacy_compliance:s.object({customer_deletion_url:D.optional(),customer_data_request_url:D.optional(),shop_deletion_url:D.optional()}).optional(),subscriptions:s.array(sn).optional().transform(n=>un(n??[]))}),gn=N.extend({webhooks:ca.superRefine(pn)});var X="webhooks",ga={forward:dn,reverse:n=>mn(n)},fa=A({identifier:X,schema:gn,transformConfig:ga}),Od=fa;r();var fn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"versionTag"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"versionByTag"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tag"},value:{kind:"Variable",name:{kind:"Name",value:"versionTag"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"VersionInfo"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReleasedAppModule"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AppModule"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"uuid"}},{kind:"Field",name:{kind:"Name",value:"userIdentifier"}},{kind:"Field",name:{kind:"Name",value:"handle"}},{kind:"Field",name:{kind:"Name",value:"config"}},{kind:"Field",name:{kind:"Name",value:"target"}},{kind:"Field",name:{kind:"Name",value:"specification"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"identifier"}},{kind:"Field",name:{kind:"Name",value:"externalIdentifier"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"experience"}},{kind:"Field",name:{kind:"Name",value:"managementExperience"}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"VersionInfo"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Version"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"metadata"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"versionTag"}}]}},{kind:"Field",name:{kind:"Name",value:"appModules"},selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReleasedAppModule"}}]}}]}}]};r();var kn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppLogsSubscribe"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopIds"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"apiKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appLogsSubscribe"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopIds"},value:{kind:"Variable",name:{kind:"Name",value:"shopIds"}}},{kind:"Argument",name:{kind:"Name",value:"apiKey"},value:{kind:"Variable",name:{kind:"Name",value:"apiKey"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"jwtToken"}},{kind:"Field",name:{kind:"Name",value:"success"}},{kind:"Field",name:{kind:"Name",value:"errors"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var yn="https://cdn.shopify.com/static/cli/extensions/templates.json",V=class n{constructor(e){this.clientName="app-management";this.webUiName="Developer Dashboard";this.supportsAtomicDeployments=!0;this.supportsDevSessions=!0;this.supportsStoreSearch=!0;this.organizationSource="BusinessPlatform";this.bundleFormat="br";this.supportsDashboardManagedExtensions=!1;this._session=e}static getInstance(e){return n.instance??=new n(e),n.instance}static resetInstance(){n.instance=void 0}async subscribeToAppLogs(e,i){return this.appManagementRequest({query:kn,variables:{shopIds:e.shopIds,apiKey:e.apiKey}})}async appLogs(e,i){let a=await xa({organizationId:i,jwtToken:e.jwtToken,cursor:e.cursor,filters:e.filters});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 session(){if(!this._session){if(w())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let e=await K(),{appManagementToken:i,businessPlatformToken:a,userId:t}=e,o=await H({query:Xi,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:t},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(ce()&&o.currentUserAccount){let d=o.currentUserAccount.organizations.nodes.map(p=>({name:p.name}));if(d.length>1)throw new k("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:d[0]?.name??"Unknown organization"},userId:t}}else o.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:o.currentUserAccount.email},userId:t}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:t}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let e=await K({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=e.appManagementToken,i.businessPlatformToken=e.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(e){let{app:i}=await this.activeAppVersionRawResult(e);if(!i)return;let{name:a,appModules:t}=i.activeRelease.version,o=t.find(p=>p.specification.externalIdentifier==="app_home"),d=i.activeRoot.clientCredentials.secrets.map(p=>({secret:p.key}));return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:d,organizationId:String(f(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:o?.config?.app_url,embedded:o?.config?.embedded,flags:[],developerPlatformClient:this}}async organizations(){let e=await this.businessPlatformRequest({query:Di});return e.currentUserAccount?e.currentUserAccount.organizationsWithAccessToDestination.nodes.map(a=>({id:Nn(a.id),businessName:a.name,source:this.organizationSource})):[]}async orgFromId(e){let a={organizationId:ee(e)},o=(await this.businessPlatformRequest({query:Yi,variables:a,cacheOptions:{cacheTTL:{hours:6}}})).currentUserAccount?.organization;if(o)return{id:e,businessName:o.name,source:this.organizationSource}}async orgAndApps(e){let[i,{apps:a,hasMorePages:t}]=await Promise.all([this.orgFromId(e),this.appsForOrg(e)]);if(!i){let{accountInfo:o}=await this.session();throw new h(o,e)}return{organization:i,apps:a,hasMorePages:t}}async appsForOrg(e,i=""){let a=Zi,t={query:i.split(" ").filter(p=>p).map(p=>`title:${p}`).join(" "),organizationId:e},o=await this.appManagementRequest({query:a,variables:t});if(!o.appsConnection)throw new k("Server failed to retrieve apps");return{apps:o.appsConnection.edges.map(p=>{let l=p.node;return{id:l.id,apiKey:l.key,title:l.activeRelease.version.name,organizationId:e}}),hasMorePages:o.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:e}){let i=Ji,a={organizationId:ie(e)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(o=>({name:o.name,externalName:o.name,identifier:o.identifier,externalIdentifier:o.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:o.uidStrategy.appModuleLimit,uidStrategy:Ta(o.uidStrategy.__typename),experience:ne(o.experience),validationSchema:o.validationSchema}))}async templateSpecifications({organizationId:e}){let i,{templatesJsonPath:a}=Ti,t=process.env[a];if(t){if(!await me(t))throw new u("There is no file at the path specified for template specifications");let l=await de(t);i=JSON.parse(l)}else try{i=await(await ge(yn)).json()}catch{throw new u(["Failed to fetch extension templates from",{link:{url:yn}},{char:"."},"This likely means a problem with your internet connection."])}let o=0,d=(await Aa(i,async l=>this.organizationBetaFlags(e,l),async l=>this.organizationExpFlags(e,l))).map(l=>({...l,sortPriority:o++})),p=[];for(let l of i)l.group&&!p.includes(l.group)&&p.push(l.group);return{templates:d,groupOrder:p}}async createApp(e,i){let t=(await this.apiVersions(e.id)).publicApiVersions.filter(g=>g!=="unstable").sort().at(-1)??"unstable",o=va(i,e.id,t),d=Gi,p=await this.appManagementRequest({query:d,variables:o});if(!p.appCreate.app||p.appCreate.userErrors?.length>0){let g=p.appCreate.userErrors.map(y=>y.message).join(", ");throw new u(g)}let l=P([]),c=p.appCreate.app,v=c.activeRoot.clientCredentials.secrets.map(g=>({secret:g.key}));return{...c,title:i.name,apiKey:c.key,apiSecretKeys:v,grantedScopes:i?.scopesArray??[],organizationId:e.id,newApp:!0,flags:l,developerPlatformClient:this}}async devStoresForOrg(e,i){let a=await this.businessPlatformOrganizationsRequest({query:Qi,organizationId:String(f(e)),variables:{searchTerm:i}}),t=a.organization;if(!t)throw new u("No organization found");let o=t.accessibleShops?.edges.map(p=>p.node)??[],d=hn(t.currentUser?.organizationPermissions??[]);return{stores:vn(o,d),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async appExtensionRegistrations(e,i){let a=i??await this.activeAppVersion(e),t=[],o=[],d=[];return a.appModuleVersions.forEach(p=>{let l={id:p.registrationId,uuid:p.registrationUuid,title:p.registrationTitle,type:p.type,activeVersion:p.config?{config:JSON.stringify(p.config),...p.target&&{context:p.target}}:void 0};p.specification?.experience==="configuration"?t.push(l):p.specification?.options?.managementExperience==="dashboard"?d.push(l):o.push(l)}),{app:{dashboardManagedExtensionRegistrations:d,configurationRegistrations:t,extensionRegistrations:o}}}async appVersions({id:e,organizationId:i,title:a}){let t=ji,o={appId:e},d=await this.appManagementRequest({query:t,variables:o});return{app:{id:d.app.id,organizationId:i,title:a,appVersions:{nodes:d.app.versions?.edges.map(p=>{let l=p.node;return{createdAt:l.createdAt,createdBy:{displayName:l.createdBy},versionTag:l.metadata.versionTag,status:l.id===d.app.activeRelease.version.id?"active":"inactive",versionId:l.id,message:l.metadata.message}})??[],pageInfo:{totalResults:d.app.versionsCount}}}}}async appInstallCount({id:e}){let i=Hi,a={appId:e};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:e,organizationId:i},a){let t=fn,o={versionTag:a},p=(await this.appManagementRequest({query:t,variables:o})).versionByTag;if(!p)throw new u(`Version not found for tag: ${a}`);return{id:parseInt(p.id,10),uuid:p.id,versionTag:p.metadata.versionTag,location:[await q({organizationId:i,id:e}),"versions",f(p.id)].join("/"),message:p.metadata.message??"",appModuleVersions:p.appModules.map(Sn)}}async appVersionsDiff(e,{versionId:i}){let a={versionId:i},[t,o]=await Promise.all([this.activeAppVersionRawResult(e.apiKey),this.appManagementRequest({query:Ki,variables:a})]),d=t.app.activeRelease.version.appModules,p=o.version.appModules,{added:l,removed:c,updated:v}=Na({currentModules:d,selectedVersionModules:p});function g(y){return{uuid:y.uuid,registrationTitle:y.handle,specification:{identifier:y.specification.identifier,experience:ne(y.specification.experience),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:l.map(g),updated:v.map(g),removed:c.map(g)}}}}async activeAppVersion(e){let i=await this.activeAppVersionRawResult(e.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(Sn),...i.app.activeRelease}}async generateSignedUploadUrl({organizationId:e}){let i={sourceExtension:"BR",organizationId:ie(e)},a=await this.appManagementRequest({query:Wi,variables:i,cacheOptions:{cacheTTL:{minutes:59}}});return{assetUrl:a.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:a.appRequestSourceUploadUrl.userErrors}}async updateExtension(e){throw new k("Not implemented: updateExtension")}async deploy({appManifest:e,appId:i,organizationId:a,versionTag:t,message:o,commitReference:d,bundleUrl:p,skipPublish:l}){let g={appId:i,version:p?{sourceUrl:p}:{source:e},metadata:{versionTag:t,message:o,sourceControlUrl:d}},y=await this.appManagementRequest({query:Bi,variables:g,requestOptions:{requestMode:"slow-request"}}),{version:S}=y.appVersionCreate,_=y.appVersionCreate.userErrors.map(bn)??[];if(!S)return{appDeploy:{userErrors:_}};let b={appDeploy:{appVersion:{uuid:S.id,id:parseInt(S.id,10),versionTag:S.metadata.versionTag,location:await ha(a,i,S.id),appModuleVersions:S.appModules.map(re=>({uuid:re.uuid,registrationUuid:re.uuid,validationErrors:[]})),message:S.metadata.message},userErrors:_}};if(l)return b;let An={appId:i,versionId:S.id},te=await this.appManagementRequest({query:Y,variables:An});return te.appReleaseCreate.userErrors&&(b.appDeploy.userErrors=(b.appDeploy.userErrors??[]).concat(te.appReleaseCreate.userErrors.map(bn))),b}async release({app:{id:e,organizationId:i},version:{versionId:a}}){let t={appId:e,versionId:a},o=await this.appManagementRequest({query:Y,variables:t});return o.appReleaseCreate.release?{appRelease:{appVersion:{versionTag:o.appReleaseCreate.release.version.metadata.versionTag,message:o.appReleaseCreate.release.version.metadata.message,location:[await q({organizationId:i,id:e}),"versions",f(o.appReleaseCreate.release.version.id).toString()].join("/")}}}:{appRelease:{userErrors:o.appReleaseCreate.userErrors?.map(d=>({field:d.field,message:d.message,category:d.category,details:[],on:d.on}))??[]}}}async storeByDomain(e,i,a){let o=(await Promise.all(a.map(p=>this.businessPlatformOrganizationsRequest({query:qi,organizationId:String(f(e)),variables:{domain:i,filters:Da(p)}})))).map(p=>p.organization).filter(p=>p!=null);if(o.length===0)throw new u("No organization found");return o.flatMap(p=>{let l=p.accessibleShops?.edges.map(v=>v.node)??[],c=hn(p.currentUser?.organizationPermissions??[]);return vn(l,c)})[0]}async ensureUserAccessToStore(e,i){if(!i.provisionable)return;let t={input:{shopifyShopId:ba(i.shopId)}},d=(await U({query:Li,token:await this.businessPlatformToken(),organizationId:String(f(e)),variables:t,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!d.success){let p=d.userErrors?.map(l=>l.message).join(", ")??"";throw new k(`Failed to provision user access to store: ${p}`)}}async createExtension(e){throw new k("Not implemented: createExtension")}async convertToTransferDisabledStore(e){throw new k("Not implemented: convertToTransferDisabledStore")}async updateDeveloperPreview(e){throw new k("Not implemented: updateDeveloperPreview")}async appPreviewMode(e){throw new k("Not implemented: appPreviewMode")}async sendSampleWebhook(e,i){let a=nn,t={address:e.address,apiKey:e.api_key,apiVersion:e.api_version,deliveryMethod:e.delivery_method,sharedSecret:e.shared_secret,topic:e.topic},o=await this.webhooksRequest({organizationId:i,query:a,variables:t}),d={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},p=o.cliTesting;return p&&(d={samplePayload:p.samplePayload??"{}",headers:p.headers??"{}",success:p.success,userErrors:p.errors.map(l=>({message:l,fields:[]}))}),{sendSampleWebhook:d}}async apiVersions(e){return{publicApiVersions:(await this.webhooksRequest({organizationId:e,query:an,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:e},i){let a=en,t={apiVersion:e};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:t})).availableTopics??[]}}async migrateFlowExtension(e){throw new k("Not implemented: migrateFlowExtension")}async migrateAppModule(e){throw new k("Not implemented: migrateAppModule")}async updateURLs(e){return T("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async currentAccountInfo(){throw new k("Not implemented: currentAccountInfo")}async targetSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(f(t.id));return(await this.functionsRequest({organizationId:a,query:tn,appId:o,variables:{handle:e.handle,version:e.version}}))?.target?.api?.schema?.definition??null}catch(t){throw new u(`Failed to fetch schema definition: ${t}`)}}async apiSchemaDefinition(e,i,a){try{let{app:t}=await this.activeAppVersionRawResult(i),o=String(f(t.id));return(await this.functionsRequest({organizationId:a,query:rn,appId:o,variables:e}))?.api?.schema?.definition??null}catch(t){throw new u(`Failed to fetch schema definition: ${t}`)}}async migrateToUiExtension(e){throw new k("Not implemented: migrateToUiExtension")}toExtensionGraphQLType(e){return e.toLowerCase()}async appDeepLink({id:e,organizationId:i}){return q({id:e,organizationId:i})}async devSessionCreate({appId:e,assetsUrl:i,shopFqdn:a,websocketUrl:t}){let o=String(f(e));return this.appDevRequest({query:zi,shopFqdn:a,variables:{appId:o,assetsUrl:i??"",websocketUrl:t},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:e,assetsUrl:i,shopFqdn:a,manifest:t,inheritedModuleUids:o}){let p={appId:String(f(e)),assetsUrl:i,manifest:JSON.stringify(t),inheritedModuleUids:o};return this.appDevRequest({query:Ri,shopFqdn:a,variables:p})}async devSessionDelete({appId:e,shopFqdn:i}){let a=String(f(e));return this.appDevRequest({query:Oi,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(e){let i=`https://${await B()}/dashboard/${e.id}/stores`;return[`Looks like you don't have any dev stores associated with ${e.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(e){return this.appManagementRequest({query:$i,variables:{apiKey:e}})}async organizationBetaFlags(e,i){let a={organizationId:ee(e)},t=await xe({query:Ni(i),token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={};return i.forEach(d=>{o[d]=!!t.organization[`flag_${d}`]}),o}async organizationExpFlags(e,i){let a={organizationId:ee(e),flagHandles:i},t=await U({query:Ai,token:await this.businessPlatformToken(),organizationId:e,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),o={},d=t.organization?.enabledFlags??[];return i.forEach((p,l)=>{o[p]=!!d[l]}),o}async appManagementRequest(e){return _e({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(e){return Me({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(e){return H({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(e){return U({...e,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(e){return Ee({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(e){return Ce({...e,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(e="default"){return R(this,e)}},ka="https://shopify.dev/apps/default-app-home",ya="https://shopify.dev/apps/default-app-home/api/auth";function va(n,e,i){let{isLaunchable:a,scopesArray:t,name:o}=n;return{initialVersion:{source:{source:{name:o,modules:[{type:G,config:{app_url:a?"https://example.com":ka,embedded:!0}},{type:J,config:{name:o}},{type:X,config:{api_version:i}},{type:Z,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":ya],...t&&{scopes:t.map(c=>c.trim()).join(",")}}}]}}.source},organizationId:ie(e)}}function Sa(n){let e=n.startsWith("gid://")?f(n):Number(n);if(Number.isNaN(e))throw new Error(`Invalid organization ID: ${n}`);return`gid://organization/Organization/${e}`}function ee(n){return Buffer.from(Sa(n)).toString("base64")}function ie(n){return`gid://shopify/Organization/${n.startsWith("gid://")?f(n):Number(n)}`}function ba(n){let e=`gid://organization/ShopifyShop/${n}`;return Buffer.from(e).toString("base64")}function Nn(n){let e=Buffer.from(n,"base64").toString("ascii");return f(e).toString()}function f(n){return n.startsWith("gid://")?Number(n.match(/^gid.*\/(\d+)$/)[1]):Number(n)}async function q({id:n,organizationId:e}){let i=f(e).toString();return`https://${await B()}/dashboard/${i}/apps/${f(n)}`}async function ha(n,e,i){return`${await q({organizationId:n,id:e})}/versions/${f(i)}`}function Na({currentModules:n,selectedVersionModules:e}){let i=n.map(l=>l.userIdentifier),a=e.map(l=>l.userIdentifier),t=e.filter(l=>!i.includes(l.userIdentifier)),o=n.filter(l=>!a.includes(l.userIdentifier)),d=o.map(l=>l.userIdentifier),p=n.filter(l=>!d.includes(l.userIdentifier));return{added:t,removed:o,updated:p}}async function Aa(n,e,i,a=M){let t=Array.from(new Set(n.map(l=>l.organizationBetaFlags??[]).flat())),o=Array.from(new Set(n.map(l=>l.organizationExpFlags??[]).flat())),[d,p]=await Promise.all([t.length>0?e(t):Promise.resolve({}),o.length>0?i(o):Promise.resolve({})]);return n.filter(l=>{let c=!l.organizationBetaFlags||l.organizationBetaFlags.every(b=>d[b]),v=!l.organizationExpFlags||l.organizationExpFlags.every(b=>p[b]),g=!l.minimumCliVersion||j(a,`>=${l.minimumCliVersion}`),y=!l.deprecatedFromCliVersion||j(a,`<${l.deprecatedFromCliVersion}`),S=g&&y,_=he(a)&&l.deprecatedFromCliVersion===void 0;return c&&v&&(S||_)})}function ne(n){switch(n){case"extension":case"configuration":case"deprecated":return n;default:return T(`Unknown specification experience value "${n}", defaulting to "extension"`),"extension"}}function Ta(n){switch(n){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function vn(n,e){return n.map(i=>{let{externalId:a,primaryDomain:t,name:o,url:d,storeType:p}=i,l=d??t;if(!l)throw new k("The selected store does not have a valid URL");return{shopId:a?Nn(a):void 0,link:t,shopDomain:fe(l),shopName:o,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:e,storeType:p}})}function Sn(n){return{registrationId:n.userIdentifier===n.uuid?"":n.userIdentifier,registrationUuid:n.uuid,registrationTitle:n.handle,type:n.specification.externalIdentifier,config:n.config,target:n.target??"",specification:{...n.specification,identifier:n.specification.identifier,options:{managementExperience:n.specification.managementExperience},experience:ne(n.specification.experience)}}}var xa=async({organizationId:n,jwtToken:e,cursor:i,filters:a})=>{let t=await Pe(n,i,a),o=Ie(e);return C(t,{method:"GET",headers:o})};function bn(n){let e=[],i=n.on[0]?.user_identifier;return i&&e.push({extension_id:i}),{...n,details:e}}function Da(n){return[{field:"STORE_TYPE",operator:"EQUALS",value:n.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function hn(n){return n.includes("ondemand_access_to_stores")}function vi(){let n=[];return n.push(V.getInstance()),L()||n.push(x.getInstance()),n}function Si({organization:n}={}){return n?Va(n):Fa()}function Va(n){return n.source==="BusinessPlatform"?V.getInstance():x.getInstance()}function Fa(){return De()&&!L()?x.getInstance():V.getInstance()}var Ia={};function P(n=[]){let e=[],i=n.map(a=>Ia[a]);return e.filter(a=>!i.includes(a))}var ae=new WeakMap;function R(n,e="default"){return{type:"token_refresh",handler:async()=>{let i=ae.get(n);if(i)await i;else try{i=n.unsafeRefreshToken(),ae.set(n,i),await i}finally{ae.delete(n)}let a=await n.session();return{token:e==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{Ti as a,Mn as b,kp as c,yp as d,xi as e,vp as f,Sp as g,Pa as h,_a as i,Tn as j,Ma as k,Vi as l,Fi as m,En as n,xp as o,Dp as p,Qn as q,O as r,Vp as s,N as t,Fp as u,Ei as v,jn as w,Ci as x,A as y,jp as z,Z as A,yl as B,on as C,D,un as E,ua as F,gn as G,wt as H,Ot as I,Lt as J,x as K,G as L,il as M,J as N,pl as O,X as P,Od as Q,Sa as R,vi as S,Si as T,h as U,Qr as V,Lr as W,$r as X,Br as Y};