shopify 5.0.1 → 5.1.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 (528) hide show
  1. package/dist/analytics-QFDTQYPM.js +1 -0
  2. package/dist/analytics-XADBBHOH.js +1 -0
  3. package/dist/bootstrap.js +1 -1
  4. package/dist/chunk-24Q6X53V.js +1 -0
  5. package/dist/{chunk-F3OM2YO6.js → chunk-25MYHE4W.js} +1 -1
  6. package/dist/{chunk-HP2ZAAY7.js → chunk-27JT4NA4.js} +1 -1
  7. package/dist/chunk-2BYW3BYX.js +1 -0
  8. package/dist/chunk-2KFYIYLI.js +1 -0
  9. package/dist/{chunk-V654BMS7.js → chunk-2KUM2RU4.js} +60 -60
  10. package/dist/chunk-2PD7TNFS.js +275 -0
  11. package/dist/{chunk-3JACWBUC.js → chunk-3C72S6LO.js} +1 -1
  12. package/dist/chunk-3FZ4LE6A.js +10 -0
  13. package/dist/{chunk-ZBVHPC6W.js → chunk-3GD5ESWN.js} +1 -1
  14. package/dist/chunk-3KGN6N7E.js +1 -0
  15. package/dist/{chunk-X4A5D3PZ.js → chunk-3MZ7ELHS.js} +2 -2
  16. package/dist/{chunk-VXL5FBE7.js → chunk-3PS52ZT4.js} +1 -1
  17. package/dist/chunk-3PYDIBTX.js +1 -0
  18. package/dist/chunk-3Z75BVGJ.js +1 -0
  19. package/dist/chunk-4FWPOGPQ.js +1 -0
  20. package/dist/chunk-4IP37MBX.js +1 -0
  21. package/dist/chunk-4NFX7YCT.js +1 -0
  22. package/dist/chunk-4TCXPHKN.js +1 -0
  23. package/dist/chunk-4WBWZIN5.js +6 -0
  24. package/dist/chunk-5534MHZW.js +97 -0
  25. package/dist/{chunk-C4EKNOLY.js → chunk-5C6CXU74.js} +1 -1
  26. package/dist/{chunk-56GKTWFF.js → chunk-5HOZDOJ7.js} +1 -1
  27. package/dist/{chunk-CX3ANDPI.js → chunk-5PSQFQL6.js} +1 -1
  28. package/dist/chunk-5T3ZT6CC.js +1 -0
  29. package/dist/chunk-62NW4EPI.js +17 -0
  30. package/dist/chunk-65NCQJYR.js +1 -0
  31. package/dist/{chunk-QGWC23HQ.js → chunk-6BYHL3DS.js} +1 -1
  32. package/dist/chunk-6I7DT7QR.js +3 -0
  33. package/dist/chunk-6IMTMS2S.js +3 -0
  34. package/dist/chunk-7A77JCED.js +11 -0
  35. package/dist/chunk-7ART2IKU.js +1 -0
  36. package/dist/{chunk-TTBNFGCW.js → chunk-7BPT5V24.js} +2 -2
  37. package/dist/{chunk-V7H7ITCF.js → chunk-7CT3NIXI.js} +1 -1
  38. package/dist/chunk-7DBKSSDK.js +1 -0
  39. package/dist/chunk-7HECBXSP.js +1 -0
  40. package/dist/chunk-7KID5BIR.js +4 -0
  41. package/dist/{chunk-63UKZLPC.js → chunk-7N7KRZOM.js} +1 -1
  42. package/dist/{chunk-NJVNGEOU.js → chunk-7NRHZG5Y.js} +102 -102
  43. package/dist/chunk-7PHDEILV.js +1 -0
  44. package/dist/chunk-A2NSORBM.js +2296 -0
  45. package/dist/chunk-A54TADAZ.js +1 -0
  46. package/dist/{chunk-YTUUU33R.js → chunk-AE3IQG7S.js} +1 -1
  47. package/dist/chunk-AGTUAQHX.js +4 -0
  48. package/dist/chunk-AHYI27QL.js +11 -0
  49. package/dist/chunk-ALINJ6J2.js +1 -0
  50. package/dist/chunk-AMVWKHNY.js +1 -0
  51. package/dist/{chunk-D4LFWIFE.js → chunk-ASKBYEO7.js} +1 -1
  52. package/dist/{chunk-LENSEW2F.js → chunk-AVJJGQOP.js} +1 -1
  53. package/dist/{chunk-QVVQUJQL.js → chunk-AY3AAV77.js} +1 -1
  54. package/dist/{chunk-DSKAIC7O.js → chunk-BFAOTQGH.js} +1 -1
  55. package/dist/{chunk-KGASGUDQ.js → chunk-BPKQA2EO.js} +1 -1
  56. package/dist/{chunk-KLYGMYXV.js → chunk-C2HJEGTS.js} +1 -1
  57. package/dist/chunk-C72QNK6O.js +4 -0
  58. package/dist/chunk-CDSDQTNB.js +16 -0
  59. package/dist/chunk-CEQGOCKX.js +1 -0
  60. package/dist/{chunk-QBE6XVU3.js → chunk-CIGWIKOW.js} +1 -1
  61. package/dist/chunk-CQAD5WML.js +1 -0
  62. package/dist/chunk-CRQQCT7F.js +1 -0
  63. package/dist/chunk-CZNUBAAG.js +3 -0
  64. package/dist/{chunk-WQOPLNDH.js → chunk-D7IMC2G4.js} +1 -1
  65. package/dist/{chunk-LGXNXAQA.js → chunk-DC7ITY6T.js} +1 -1
  66. package/dist/{chunk-7GHSE7SG.js → chunk-DDRP6QTC.js} +1 -1
  67. package/dist/{chunk-4EDE3UH7.js → chunk-DDZYIC76.js} +2 -2
  68. package/dist/chunk-DGIIUQH3.js +1 -0
  69. package/dist/{chunk-5AWELO3D.js → chunk-DMOLPSXF.js} +1 -1
  70. package/dist/{chunk-GSGCSBRN.js → chunk-DOLVBTCB.js} +1 -1
  71. package/dist/{chunk-MXXMIPUN.js → chunk-DTKGI43P.js} +2 -2
  72. package/dist/{chunk-37P5YOP2.js → chunk-DVD7I2TX.js} +2 -2
  73. package/dist/chunk-DVFVO6ZE.js +2 -0
  74. package/dist/{chunk-7U2MTK6I.js → chunk-DXEMSLI6.js} +1 -1
  75. package/dist/chunk-EDWIWZWM.js +15 -0
  76. package/dist/chunk-ELR6AZT4.js +9 -0
  77. package/dist/chunk-EVQPYZ7F.js +5 -0
  78. package/dist/chunk-F5QKMDP3.js +1 -0
  79. package/dist/{chunk-J5DUFSR4.js → chunk-F6IQWX2F.js} +1 -1
  80. package/dist/{chunk-XZLM4HLO.js → chunk-FAVPTYIR.js} +1 -1
  81. package/dist/{chunk-Q7BOSHWX.js → chunk-FDSNRKGQ.js} +1 -1
  82. package/dist/{chunk-DVW7NDVD.js → chunk-FHKK3QU7.js} +1 -1
  83. package/dist/chunk-FKKJQGYX.js +7 -0
  84. package/dist/chunk-FQLXQ7WN.js +16 -0
  85. package/dist/{chunk-6PUU6ZNQ.js → chunk-FRWQJAW2.js} +1 -1
  86. package/dist/{chunk-AIEVQSI3.js → chunk-FU7PYW7H.js} +1 -1
  87. package/dist/{chunk-5YUDEPEY.js → chunk-FYQE5E6U.js} +1 -1
  88. package/dist/chunk-G3EWGBXR.js +1 -0
  89. package/dist/chunk-G3RNO2TC.js +1 -0
  90. package/dist/{chunk-7NYCJG2U.js → chunk-GGCP2TIK.js} +1 -1
  91. package/dist/chunk-GSFWBFFH.js +1 -0
  92. package/dist/{chunk-NUCDRKDW.js → chunk-H2KGP2FM.js} +2 -2
  93. package/dist/{chunk-PVASYKSJ.js → chunk-H4K3F7PP.js} +1 -1
  94. package/dist/chunk-HGZ2HRPO.js +13 -0
  95. package/dist/chunk-HMPRWNGG.js +203 -0
  96. package/dist/chunk-HP4QYSBQ.js +1 -0
  97. package/dist/{chunk-LR4J4KYJ.js → chunk-HSTZV6H7.js} +2 -2
  98. package/dist/{chunk-ZHHTQRWU.js → chunk-HVUMVDUG.js} +1 -1
  99. package/dist/{chunk-IY5EI5V2.js → chunk-HYCNYUHW.js} +1 -1
  100. package/dist/{chunk-FHNJLON5.js → chunk-I3WRA2LH.js} +1 -1
  101. package/dist/{chunk-MS7DTL4U.js → chunk-IRLYC626.js} +2 -2
  102. package/dist/chunk-IWNFPBH2.js +33 -0
  103. package/dist/{chunk-EA5XVQJT.js → chunk-JALDNBTU.js} +1 -1
  104. package/dist/{chunk-ZTZGDZCE.js → chunk-JC37YZ4I.js} +1 -1
  105. package/dist/{chunk-DM7BTMFP.js → chunk-JG4FAT2T.js} +1 -1
  106. package/dist/chunk-JGLLABZR.js +8 -0
  107. package/dist/chunk-JIY6XWSC.js +1 -0
  108. package/dist/{chunk-VG2AESTZ.js → chunk-JIYCZXK5.js} +1 -1
  109. package/dist/chunk-JMSAHCBU.js +35 -0
  110. package/dist/{chunk-CWR3IFXD.js → chunk-JNSVKDBY.js} +1 -1
  111. package/dist/chunk-JQU2BJDH.js +3 -0
  112. package/dist/chunk-JVY6CCLE.js +3 -0
  113. package/dist/{chunk-BAHIL37I.js → chunk-K4QJEQI4.js} +1 -1
  114. package/dist/chunk-KCAWHJGF.js +1 -0
  115. package/dist/{chunk-M73IECPW.js → chunk-KFO2JNF5.js} +1 -1
  116. package/dist/chunk-KFR7HWCG.js +9 -0
  117. package/dist/{chunk-QYFU363G.js → chunk-KHZF73BL.js} +1 -1
  118. package/dist/{chunk-HT66BOEC.js → chunk-KM4LE7K4.js} +2 -2
  119. package/dist/{chunk-IILLQOUC.js → chunk-L2PUDV7Y.js} +1 -1
  120. package/dist/chunk-LFBFPK22.js +1 -0
  121. package/dist/{chunk-BN7ZXAZJ.js → chunk-LG3KEHGD.js} +2 -2
  122. package/dist/chunk-LGDWE3H3.js +1 -0
  123. package/dist/chunk-LPPEAMI6.js +1 -0
  124. package/dist/chunk-LXIWMYM4.js +1 -0
  125. package/dist/chunk-MGWCXTGD.js +1 -0
  126. package/dist/chunk-MGX7UG44.js +1 -0
  127. package/dist/chunk-MKFRKNHF.js +3 -0
  128. package/dist/chunk-MTT6EAQO.js +1 -0
  129. package/dist/{chunk-75LAVRRL.js → chunk-MU7IVBGI.js} +2 -2
  130. package/dist/{chunk-36TZ447N.js → chunk-MYMBHVC4.js} +1 -1
  131. package/dist/chunk-MZDBH4XV.js +4 -0
  132. package/dist/{chunk-3G2PEYPI.js → chunk-NUBJ2HK7.js} +1 -1
  133. package/dist/{chunk-K3YALQBQ.js → chunk-NY5N4ANL.js} +1 -1
  134. package/dist/{chunk-364BVGRY.js → chunk-NYMKGE3J.js} +1 -1
  135. package/dist/{chunk-CX5CC6P5.js → chunk-O472FAYX.js} +1 -1
  136. package/dist/chunk-O7HZ3EIP.js +1 -0
  137. package/dist/chunk-OJOF6IYG.js +9 -0
  138. package/dist/{chunk-EXTVC33U.js → chunk-ONZULPQH.js} +68 -66
  139. package/dist/chunk-ORMXPSJM.js +1 -0
  140. package/dist/chunk-ORYEDUKM.js +5 -0
  141. package/dist/{chunk-MZCIRMZJ.js → chunk-OTMYJWIP.js} +1 -1
  142. package/dist/chunk-OVJVFB5E.js +20 -0
  143. package/dist/chunk-OWQEFORZ.js +1 -0
  144. package/dist/{chunk-43HKFLOU.js → chunk-OXPEBT4I.js} +2 -2
  145. package/dist/chunk-OXZR2MB4.js +6 -0
  146. package/dist/chunk-OY5M52EF.js +6 -0
  147. package/dist/{chunk-FK5OFLSJ.js → chunk-PJZZZNWR.js} +1 -1
  148. package/dist/chunk-Q2LQJYRK.js +16 -0
  149. package/dist/chunk-QBRRFFMZ.js +1 -0
  150. package/dist/{chunk-KNQXCU3Y.js → chunk-QCLE5REL.js} +2 -2
  151. package/dist/chunk-QGQWVA7N.js +1 -0
  152. package/dist/chunk-QKPAB245.js +1 -0
  153. package/dist/chunk-QUPZOBTB.js +1 -0
  154. package/dist/chunk-R4E2E4NN.js +1 -0
  155. package/dist/{chunk-2M4BKFYF.js → chunk-R6US7F33.js} +1 -1
  156. package/dist/chunk-RKNVTEO3.js +5 -0
  157. package/dist/{chunk-2QQ7EBJD.js → chunk-RLOEI6VE.js} +1 -1
  158. package/dist/chunk-RSZAAN37.js +1 -0
  159. package/dist/{chunk-WBJ6ZHYH.js → chunk-S3RROJGG.js} +37 -37
  160. package/dist/chunk-S4KNPCW3.js +81 -0
  161. package/dist/{chunk-YFRI75U4.js → chunk-SBN3ILXO.js} +1 -1
  162. package/dist/chunk-SCDGLREP.js +1 -0
  163. package/dist/chunk-SHOMIS6Q.js +2 -0
  164. package/dist/chunk-SN3PMWUF.js +6 -0
  165. package/dist/chunk-SODCXZ5U.js +1 -0
  166. package/dist/chunk-SPJM7RTD.js +1 -0
  167. package/dist/chunk-SQL67BKI.js +5 -0
  168. package/dist/{chunk-MMUGP3WP.js → chunk-SURFUFAZ.js} +1 -1
  169. package/dist/{chunk-KOTZSPZA.js → chunk-SVQDMZJO.js} +1 -1
  170. package/dist/chunk-T4ZOTYOY.js +1 -0
  171. package/dist/chunk-T6C4WC3Z.js +2 -0
  172. package/dist/chunk-TD6JBHUS.js +1 -0
  173. package/dist/chunk-TIM4CIXZ.js +22 -0
  174. package/dist/{chunk-V2FCZC7U.js → chunk-TP7CTMMT.js} +1 -1
  175. package/dist/chunk-TSPJAMYB.js +1 -0
  176. package/dist/chunk-TSVEV2UD.js +26 -0
  177. package/dist/chunk-TTAT62N3.js +25 -0
  178. package/dist/{chunk-ZVEBXHEY.js → chunk-TUSS6PXB.js} +1 -1
  179. package/dist/chunk-TXP6KFWO.js +5 -0
  180. package/dist/chunk-TZHVCMZN.js +6 -0
  181. package/dist/chunk-UC4TOM36.js +3 -0
  182. package/dist/{chunk-2YGPWG3I.js → chunk-UFY4L5KQ.js} +1 -1
  183. package/dist/chunk-UU6UQ2QY.js +1 -0
  184. package/dist/chunk-V4FC72R6.js +1 -0
  185. package/dist/chunk-VA2S7W7H.js +10 -0
  186. package/dist/chunk-VE3IIC7H.js +1 -0
  187. package/dist/{chunk-EH22T4FI.js → chunk-VJG7VXFU.js} +2 -2
  188. package/dist/chunk-VQSRU5XL.js +4 -0
  189. package/dist/chunk-VRIFLMA3.js +70 -0
  190. package/dist/chunk-WBJFTCEJ.js +1 -0
  191. package/dist/chunk-WBPP6PO7.js +31 -0
  192. package/dist/chunk-WE5KY6T6.js +1 -0
  193. package/dist/chunk-WFPVT2IY.js +1 -0
  194. package/dist/{chunk-ETXBF6Q7.js → chunk-WLYXBQ2M.js} +1 -1
  195. package/dist/chunk-WNVOEE6T.js +7 -0
  196. package/dist/chunk-WPDJVUTY.js +47 -0
  197. package/dist/chunk-WWCYEZUU.js +1 -0
  198. package/dist/chunk-WWVDZ3GC.js +3 -0
  199. package/dist/{chunk-CXPYOLGM.js → chunk-WZBZ7FWP.js} +2 -2
  200. package/dist/chunk-XEZPN5TR.js +22 -0
  201. package/dist/{chunk-AQ34X5B3.js → chunk-XLMKHTJ5.js} +1 -1
  202. package/dist/chunk-XRNBCV2B.js +1 -0
  203. package/dist/{chunk-B4ISKIXN.js → chunk-XWLNCBAG.js} +1 -1
  204. package/dist/chunk-YF4AXKM4.js +1 -0
  205. package/dist/chunk-YKDRUAY3.js +857 -0
  206. package/dist/{chunk-FPOZMNT2.js → chunk-YNFQBYSL.js} +1 -1
  207. package/dist/{chunk-2CJQQQW4.js → chunk-YNZLLZU2.js} +1 -1
  208. package/dist/chunk-YOYPYB4H.js +1 -0
  209. package/dist/{chunk-HF4NDEX3.js → chunk-YR4J46US.js} +1 -1
  210. package/dist/chunk-YTL45RXR.js +103 -0
  211. package/dist/chunk-YVPB7OT6.js +6 -0
  212. package/dist/chunk-YYWSHRO2.js +89 -0
  213. package/dist/{chunk-5XOEMYEQ.js → chunk-Z5QEXS6F.js} +1 -1
  214. package/dist/chunk-Z5WFRYVQ.js +6 -0
  215. package/dist/{chunk-P5W5RVE6.js → chunk-Z6ZRS256.js} +1 -1
  216. package/dist/chunk-ZMOW2YZ4.js +18 -0
  217. package/dist/chunk-ZMU4EYXT.js +1 -0
  218. package/dist/{chunk-ACA2BGAD.js → chunk-ZNEPRGFY.js} +1 -1
  219. package/dist/chunk-ZXZWMXXK.js +7 -0
  220. package/dist/cli/commands/app/build.js +1 -1
  221. package/dist/cli/commands/app/bulk/cancel.js +1 -1
  222. package/dist/cli/commands/app/bulk/execute.js +1 -1
  223. package/dist/cli/commands/app/bulk/status.js +1 -1
  224. package/dist/cli/commands/app/config/link.js +1 -1
  225. package/dist/cli/commands/app/config/pull.js +1 -1
  226. package/dist/cli/commands/app/config/use.js +1 -1
  227. package/dist/cli/commands/app/config/validate.js +1 -1
  228. package/dist/cli/commands/app/demo/watcher.js +1 -1
  229. package/dist/cli/commands/app/deploy.js +1 -1
  230. package/dist/cli/commands/app/dev/clean.js +1 -1
  231. package/dist/cli/commands/app/dev.js +1 -1
  232. package/dist/cli/commands/app/env/pull.js +1 -1
  233. package/dist/cli/commands/app/env/show.js +1 -1
  234. package/dist/cli/commands/app/execute.js +1 -1
  235. package/dist/cli/commands/app/function/build.js +1 -1
  236. package/dist/cli/commands/app/function/info.js +1 -1
  237. package/dist/cli/commands/app/function/replay.js +1 -1
  238. package/dist/cli/commands/app/function/run.js +1 -1
  239. package/dist/cli/commands/app/function/schema.js +1 -1
  240. package/dist/cli/commands/app/function/typegen.js +1 -1
  241. package/dist/cli/commands/app/generate/extension.js +1 -1
  242. package/dist/cli/commands/app/graphiql.js +1 -1
  243. package/dist/cli/commands/app/import/channel-config.js +1 -1
  244. package/dist/cli/commands/app/import/custom-data-definitions.js +1 -1
  245. package/dist/cli/commands/app/import/dashboard-extensions.js +1 -1
  246. package/dist/cli/commands/app/import-custom-data-definitions.js +1 -1
  247. package/dist/cli/commands/app/import-extensions.js +1 -1
  248. package/dist/cli/commands/app/info.js +1 -1
  249. package/dist/cli/commands/app/init.js +1 -1
  250. package/dist/cli/commands/app/logs-next.js +1 -0
  251. package/dist/cli/commands/app/logs.js +1 -1
  252. package/dist/cli/commands/app/release.js +1 -1
  253. package/dist/cli/commands/app/security/check.js +1 -1
  254. package/dist/cli/commands/app/security/clean.js +1 -1
  255. package/dist/cli/commands/app/security/instructions.js +1 -1
  256. package/dist/cli/commands/app/security/record.js +1 -1
  257. package/dist/cli/commands/app/security/review.js +1 -1
  258. package/dist/cli/commands/app/subscription-migrations/cancel.js +1 -1
  259. package/dist/cli/commands/app/subscription-migrations/list.js +1 -1
  260. package/dist/cli/commands/app/subscription-migrations/schedule.js +1 -1
  261. package/dist/cli/commands/app/subscription-migrations/status.js +1 -1
  262. package/dist/cli/commands/app/subscription-migrations/unschedule.js +1 -1
  263. package/dist/cli/commands/app/versions/list.js +1 -1
  264. package/dist/cli/commands/app/webhook/trigger.js +1 -1
  265. package/dist/cli/commands/auth/login.d.ts +10 -10
  266. package/dist/cli/commands/auth/login.js +1 -1
  267. package/dist/cli/commands/auth/logout.d.ts +7 -7
  268. package/dist/cli/commands/auth/logout.js +1 -1
  269. package/dist/cli/commands/cache/clear.js +1 -1
  270. package/dist/cli/commands/config/autoupgrade/off.d.ts +7 -7
  271. package/dist/cli/commands/config/autoupgrade/off.js +1 -1
  272. package/dist/cli/commands/config/autoupgrade/on.d.ts +7 -7
  273. package/dist/cli/commands/config/autoupgrade/on.js +1 -1
  274. package/dist/cli/commands/config/autoupgrade/status.d.ts +7 -7
  275. package/dist/cli/commands/config/autoupgrade/status.js +1 -1
  276. package/dist/cli/commands/debug/command-flags.js +1 -1
  277. package/dist/cli/commands/doc/fetch.d.ts +21 -21
  278. package/dist/cli/commands/doc/fetch.js +1 -1
  279. package/dist/cli/commands/doc/search.d.ts +23 -23
  280. package/dist/cli/commands/doc/search.js +1 -1
  281. package/dist/cli/commands/docs/generate.js +1 -1
  282. package/dist/cli/commands/doctor-release/doctor-release.js +1 -1
  283. package/dist/cli/commands/doctor-release/theme/index.js +1 -1
  284. package/dist/cli/commands/help.d.ts +90 -90
  285. package/dist/cli/commands/help.js +1 -1
  286. package/dist/cli/commands/kitchen-sink/async.js +1 -1
  287. package/dist/cli/commands/kitchen-sink/index.js +1 -1
  288. package/dist/cli/commands/kitchen-sink/prompts.js +1 -1
  289. package/dist/cli/commands/kitchen-sink/static.js +1 -1
  290. package/dist/cli/commands/notifications/generate.js +1 -1
  291. package/dist/cli/commands/notifications/list.js +1 -1
  292. package/dist/cli/commands/organization/list.js +1 -1
  293. package/dist/cli/commands/search.d.ts +7 -7
  294. package/dist/cli/commands/search.js +1 -1
  295. package/dist/cli/commands/send-analytics.js +1 -1
  296. package/dist/cli/commands/theme/check.js +1 -1
  297. package/dist/cli/commands/theme/console.js +1 -1
  298. package/dist/cli/commands/theme/delete.js +1 -1
  299. package/dist/cli/commands/theme/dev.js +1 -1
  300. package/dist/cli/commands/theme/duplicate.js +1 -1
  301. package/dist/cli/commands/theme/info.js +1 -1
  302. package/dist/cli/commands/theme/init.js +1 -1
  303. package/dist/cli/commands/theme/language-server.js +1 -1
  304. package/dist/cli/commands/theme/list.js +1 -1
  305. package/dist/cli/commands/theme/metafields/pull.js +1 -1
  306. package/dist/cli/commands/theme/open.js +1 -1
  307. package/dist/cli/commands/theme/package.js +1 -1
  308. package/dist/cli/commands/theme/preview.js +1 -1
  309. package/dist/cli/commands/theme/profile.js +1 -1
  310. package/dist/cli/commands/theme/publish.js +1 -1
  311. package/dist/cli/commands/theme/pull.js +1 -1
  312. package/dist/cli/commands/theme/push.js +1 -1
  313. package/dist/cli/commands/theme/rename.js +1 -1
  314. package/dist/cli/commands/theme/share.js +1 -1
  315. package/dist/cli/commands/upgrade.d.ts +24 -24
  316. package/dist/cli/commands/upgrade.js +1 -1
  317. package/dist/cli/commands/version.d.ts +7 -7
  318. package/dist/cli/commands/version.js +1 -1
  319. package/dist/cli/help.js +1 -1
  320. package/dist/cli-version-check-V25AVSZ6.js +1 -0
  321. package/dist/{command-event-context-LFUZ7UCA.js → command-event-context-ILIANB5Q.js} +1 -1
  322. package/dist/command-json-schema-C5UZXP2W.js +1 -0
  323. package/dist/command-registry.js +1 -1
  324. package/dist/conf-store-OCGEEV4U.js +1 -0
  325. package/dist/custom-oclif-loader-ZVUKMRGH.js +1 -0
  326. package/dist/data/filters.json +41 -2
  327. package/dist/data/local_block_entry.json +1 -1
  328. package/dist/data/manifest_theme.json +1 -0
  329. package/dist/data/objects.json +78 -36
  330. package/dist/data/section.json +1 -1
  331. package/dist/data/shopify_system_translations.json +240 -23
  332. package/dist/data/strict_settings.json +24 -0
  333. package/dist/data/tags.json +57 -24
  334. package/dist/data/theme_block.json +1 -1
  335. package/dist/deprecations-A5AXXKIK.js +1 -0
  336. package/dist/dist-NORLLIHQ.js +1 -0
  337. package/dist/dist-XBM4XZS4.js +1 -0
  338. package/dist/environment-5P7JJ3GI.js +1 -0
  339. package/dist/environments-Y5JEI3U3.js +1 -0
  340. package/dist/error-GI4DXVDU.js +1 -0
  341. package/dist/error-handler-BS2ZENQV.js +1 -0
  342. package/dist/fs-UOOLPOHJ.js +1 -0
  343. package/dist/hooks/did-you-mean.js +1 -1
  344. package/dist/hooks/hydrogen-init.js +1 -1
  345. package/dist/hooks/plugin-plugins.js +1 -1
  346. package/dist/hooks/postrun.js +1 -1
  347. package/dist/hooks/prerun.js +2 -2
  348. package/dist/hooks/public-metadata.js +1 -1
  349. package/dist/hooks/sensitive-metadata.js +1 -1
  350. package/dist/hooks/tunnel-provider.js +1 -1
  351. package/dist/hooks/tunnel-start.js +1 -1
  352. package/dist/http-2OXOS2AW.js +1 -0
  353. package/dist/http-proxy-node16-NZZ674YW.js +38 -0
  354. package/dist/index.js +12 -12
  355. package/dist/is-global-CI77T7NE.js +1 -0
  356. package/dist/json-error-6PBUR4LQ.js +1 -0
  357. package/dist/latest-version-75YEFEMK.js +9 -0
  358. package/dist/lib-4JVADMNT.js +1 -0
  359. package/dist/lib-L4STV5B2.js +1 -0
  360. package/dist/lib-LEEN55OD.js +1 -0
  361. package/dist/{local-KA3IWOZ6.js → local-5NIWPWDS.js} +1 -1
  362. package/dist/metadata-IXPNNPNJ.js +1 -0
  363. package/dist/{morph-CRY35DIK.js → morph-H7XQP55V.js} +3 -3
  364. package/dist/node-package-manager-ALFEGGD6.js +1 -0
  365. package/dist/notifications-system-FQW3GKH2.js +1 -0
  366. package/dist/{npa-A4YSCQ5Q.js → npa-LVYMN7GE.js} +1 -1
  367. package/dist/os-6TNQTEUN.js +1 -0
  368. package/dist/output-LEOB5LAM.js +1 -0
  369. package/dist/{prettier-EGVCP5CY.js → prettier-VLTY4MIE.js} +1 -1
  370. package/dist/registry-auth-token-EDH77OOW.js +1 -0
  371. package/dist/registry-url-JMNV3LLX.js +1 -0
  372. package/dist/semver-HHZRKD6Y.js +1 -0
  373. package/dist/system-J4CTESP5.js +1 -0
  374. package/dist/tsconfig.tsbuildinfo +1 -1
  375. package/dist/ui-YDUI56E3.js +1 -0
  376. package/dist/upgrade-LBCZORG2.js +1 -0
  377. package/dist/version-2YL4YEQ2.js +1 -0
  378. package/dist/version-X2CPQVWQ.js +1 -0
  379. package/dist/workerd-5UPTEWNI.js +18 -0
  380. package/oclif.manifest.json +25622 -1132
  381. package/package.json +7 -7
  382. package/dist/analytics-RSUIYNLC.js +0 -1
  383. package/dist/analytics-V2SDYXQJ.js +0 -1
  384. package/dist/chunk-2AW3KBTP.js +0 -1
  385. package/dist/chunk-2M535QQJ.js +0 -6
  386. package/dist/chunk-2NZ7GDDR.js +0 -2
  387. package/dist/chunk-2RFCYZMG.js +0 -47
  388. package/dist/chunk-2S5NPJEJ.js +0 -5
  389. package/dist/chunk-2TPLPZA2.js +0 -3
  390. package/dist/chunk-32O27NE3.js +0 -1
  391. package/dist/chunk-335BUVBP.js +0 -1
  392. package/dist/chunk-46JYM3GH.js +0 -1
  393. package/dist/chunk-4GQEXVDT.js +0 -1
  394. package/dist/chunk-4IUXLUFD.js +0 -6
  395. package/dist/chunk-4QZ6OBXL.js +0 -4
  396. package/dist/chunk-4SDCXKYR.js +0 -31
  397. package/dist/chunk-5AQ5JT2V.js +0 -7
  398. package/dist/chunk-5D4FNAAD.js +0 -3
  399. package/dist/chunk-5TWYJQQO.js +0 -1
  400. package/dist/chunk-5YXYYQBX.js +0 -1
  401. package/dist/chunk-6JZC6UKY.js +0 -20
  402. package/dist/chunk-6Y6A2QGK.js +0 -3
  403. package/dist/chunk-7AWAOPLA.js +0 -1
  404. package/dist/chunk-7XAEI4XT.js +0 -3
  405. package/dist/chunk-A7LBGXWG.js +0 -1
  406. package/dist/chunk-ADVLRSSO.js +0 -1
  407. package/dist/chunk-AOBE6HN6.js +0 -31
  408. package/dist/chunk-B2VE7WOX.js +0 -1
  409. package/dist/chunk-BB7GAZP6.js +0 -1
  410. package/dist/chunk-BNTOGZLY.js +0 -1
  411. package/dist/chunk-BOAGJ6P5.js +0 -1
  412. package/dist/chunk-BU3JQM3W.js +0 -1
  413. package/dist/chunk-C3LL5CZA.js +0 -1
  414. package/dist/chunk-CFUZ6574.js +0 -15
  415. package/dist/chunk-CKVVJ4XO.js +0 -1
  416. package/dist/chunk-CNPBDSDL.js +0 -1
  417. package/dist/chunk-DTRENW4Q.js +0 -272
  418. package/dist/chunk-E3CTHNQS.js +0 -1
  419. package/dist/chunk-FFSDGRAN.js +0 -1
  420. package/dist/chunk-FNWXMCSD.js +0 -97
  421. package/dist/chunk-FS5PZCZ3.js +0 -1
  422. package/dist/chunk-FTHVOIK7.js +0 -4
  423. package/dist/chunk-FVRI7ZKE.js +0 -103
  424. package/dist/chunk-FZCGRIOM.js +0 -1
  425. package/dist/chunk-GCKGQFV7.js +0 -1
  426. package/dist/chunk-GGJUPL4W.js +0 -6
  427. package/dist/chunk-GHU6YEXH.js +0 -15
  428. package/dist/chunk-GNPIKPHB.js +0 -1
  429. package/dist/chunk-H57KYDEI.js +0 -16
  430. package/dist/chunk-HB3MJYBK.js +0 -1
  431. package/dist/chunk-HNU6R7RT.js +0 -7
  432. package/dist/chunk-HPT3UXZ5.js +0 -4
  433. package/dist/chunk-HXNGLDMU.js +0 -1
  434. package/dist/chunk-IAL6IQYW.js +0 -16
  435. package/dist/chunk-IULZYDCI.js +0 -9
  436. package/dist/chunk-IWTOC6DG.js +0 -1
  437. package/dist/chunk-J3JPJCWP.js +0 -1
  438. package/dist/chunk-J3UXIC23.js +0 -10
  439. package/dist/chunk-J7BTC45S.js +0 -1
  440. package/dist/chunk-JMVK2BIB.js +0 -3
  441. package/dist/chunk-JUTULEWW.js +0 -5
  442. package/dist/chunk-KT5QQOES.js +0 -3
  443. package/dist/chunk-KVF55INC.js +0 -5
  444. package/dist/chunk-L6VONMA2.js +0 -5
  445. package/dist/chunk-LWMKZJ4M.js +0 -1
  446. package/dist/chunk-M2KX3PXA.js +0 -1
  447. package/dist/chunk-M7NLCGCP.js +0 -6
  448. package/dist/chunk-MHWETFNT.js +0 -1
  449. package/dist/chunk-MNWT2SQO.js +0 -2265
  450. package/dist/chunk-MU2X7NGF.js +0 -11
  451. package/dist/chunk-MZWPIFAM.js +0 -70
  452. package/dist/chunk-NCPZVARH.js +0 -836
  453. package/dist/chunk-NMECLRGK.js +0 -11
  454. package/dist/chunk-NMLLRFZF.js +0 -1
  455. package/dist/chunk-NPB753M3.js +0 -1
  456. package/dist/chunk-OH7BQZQ7.js +0 -2
  457. package/dist/chunk-OLKLHVHA.js +0 -22
  458. package/dist/chunk-OPVXPDOQ.js +0 -1
  459. package/dist/chunk-OQUXGAF2.js +0 -1
  460. package/dist/chunk-OUMERKRE.js +0 -10
  461. package/dist/chunk-OYGIQDME.js +0 -1
  462. package/dist/chunk-PNZURX3S.js +0 -1
  463. package/dist/chunk-PRKJVU4Y.js +0 -1
  464. package/dist/chunk-PXFPVGWV.js +0 -1
  465. package/dist/chunk-Q2ORJEB2.js +0 -25
  466. package/dist/chunk-QFWWCZOI.js +0 -1
  467. package/dist/chunk-QFYLJVJW.js +0 -77
  468. package/dist/chunk-QX3T6G5X.js +0 -1
  469. package/dist/chunk-RDXLDCMI.js +0 -3
  470. package/dist/chunk-REDUS6EW.js +0 -1
  471. package/dist/chunk-RFZNFTVM.js +0 -1
  472. package/dist/chunk-RIG66DIQ.js +0 -18
  473. package/dist/chunk-RNUEPPVN.js +0 -1
  474. package/dist/chunk-RWTAPWLJ.js +0 -3
  475. package/dist/chunk-T5YVYVSW.js +0 -1
  476. package/dist/chunk-UDPYSL3M.js +0 -4
  477. package/dist/chunk-ULMNNGGX.js +0 -6
  478. package/dist/chunk-URCH4ITT.js +0 -1
  479. package/dist/chunk-UU2R56LN.js +0 -12
  480. package/dist/chunk-V75WUEFU.js +0 -1
  481. package/dist/chunk-VXD26GIG.js +0 -1
  482. package/dist/chunk-W7S6SYBM.js +0 -2
  483. package/dist/chunk-WAY723TL.js +0 -16
  484. package/dist/chunk-WFOU5M4H.js +0 -16
  485. package/dist/chunk-WGOSE3RL.js +0 -4
  486. package/dist/chunk-WQ6W725N.js +0 -1
  487. package/dist/chunk-X7DCL5LT.js +0 -1
  488. package/dist/chunk-XDXHSGDL.js +0 -1
  489. package/dist/chunk-XKKKMV46.js +0 -6
  490. package/dist/chunk-XRVJJG6W.js +0 -26
  491. package/dist/chunk-XV6XCOTG.js +0 -319
  492. package/dist/chunk-XYFYQWKW.js +0 -1
  493. package/dist/chunk-YCUEDZDA.js +0 -1
  494. package/dist/chunk-YQ63ZFYT.js +0 -1
  495. package/dist/chunk-YXIFSIRX.js +0 -1
  496. package/dist/chunk-ZDQO6CNY.js +0 -1
  497. package/dist/chunk-ZGASBRSQ.js +0 -5
  498. package/dist/command-json-schema-6EGXCM4B.js +0 -1
  499. package/dist/conf-store-E7ELDWBA.js +0 -1
  500. package/dist/custom-oclif-loader-FKFZJPHF.js +0 -1
  501. package/dist/deprecations-RNGBHZYB.js +0 -1
  502. package/dist/dist-VHIZZDYK.js +0 -1
  503. package/dist/dist-WXI5YQYP.js +0 -1
  504. package/dist/environment-O7ECODHU.js +0 -1
  505. package/dist/environments-WZJ6MRTH.js +0 -1
  506. package/dist/error-IFB626JA.js +0 -1
  507. package/dist/error-handler-OVJYVIOZ.js +0 -1
  508. package/dist/fs-7UOUHJDO.js +0 -1
  509. package/dist/http-proxy-node16-D3JUYA5D.js +0 -38
  510. package/dist/is-global-XW3CVHLK.js +0 -1
  511. package/dist/json-error-C2U7ZLCG.js +0 -1
  512. package/dist/latest-version-LDWU5F7A.js +0 -49
  513. package/dist/lib-PJHT4MKY.js +0 -1
  514. package/dist/lib-VKSQ65BQ.js +0 -1
  515. package/dist/lib-YEZOHXF3.js +0 -1
  516. package/dist/metadata-6JI7HF5B.js +0 -1
  517. package/dist/node-package-manager-X3QIEMMX.js +0 -1
  518. package/dist/notifications-system-OXGLT2R4.js +0 -1
  519. package/dist/os-NORIEVMI.js +0 -1
  520. package/dist/output-K3JTLRJD.js +0 -1
  521. package/dist/system-LTHR2T7L.js +0 -1
  522. package/dist/ui-MYUBVKCK.js +0 -1
  523. package/dist/upgrade-MFTWBXL3.js +0 -1
  524. package/dist/version-BNGPPAUU.js +0 -1
  525. package/dist/version-RCGFWSB4.js +0 -1
  526. package/dist/workerd-ISSXMKIH.js +0 -18
  527. /package/dist/{chunk-YLQ3LNNY.js → chunk-2S3FHQFS.js} +0 -0
  528. /package/dist/{chunk-YRHFPXC3.js → chunk-Z2AV4BWZ.js} +0 -0
@@ -1,16 +0,0 @@
1
- import{c as Xe}from"./chunk-QX3T6G5X.js";import{G as We,H as Ke,K as ue,O as _,P as Ge,a as Me,aa as Ye,ca as U,da as Je,e as $e,ia as y,j as He,ja as Z,k as le,ma as A,na as Qe,oa as T,q as h,r as je,s as me,u as E}from"./chunk-NCPZVARH.js";import{b as Ze}from"./chunk-ZDF5N422.js";import{w as ce}from"./chunk-2M535QQJ.js";import{b as Be}from"./chunk-J3UXIC23.js";import{a as Ce}from"./chunk-MHWETFNT.js";import{A as en,E as nn,F as an,G as tn,J as on,K as rn,U as sn}from"./chunk-V654BMS7.js";import{e as Le,k as J}from"./chunk-335BUVBP.js";import{a as Ee}from"./chunk-BN7ZXAZJ.js";import{h as c,k as D}from"./chunk-J7BTC45S.js";import{Bb as ke,N as C,Sa as qe,T as G,Va as Oe,fa as Y,la as Pe,qb as ln,sb as P,wb as mn}from"./chunk-RIG66DIQ.js";import{i as pe}from"./chunk-B4OMIONW.js";import{b as t}from"./chunk-FZCGRIOM.js";import{g as dn}from"./chunk-GSGCSBRN.js";import{c as Ue,i as K}from"./chunk-IWTNUJGY.js";import{e as W,g as s}from"./chunk-VKWPEFWQ.js";s();function q(e,{httpsOnly:n=!1,message:i="Invalid URL"}={}){return e.refine(a=>ve(a,n),{message:i}).refine(a=>!a.includes(`
2
- `),{message:i})}function mt(e,{message:n="URL must be HTTPS URL or start with /"}={}){return e.refine(i=>i.startsWith("/")||ve(i,!0),{message:n})}var un=/[\r\n\t]/;function cn(e){return ve(e,!0)}function ve(e,n){try{let i=new URL(e);return n?i.protocol==="https:":["http:","https:"].includes(i.protocol)}catch{return!1}}function ut(e){return typeof e=="string"&&!e.startsWith("/")?`/${e}`:e}var Ci=30;function ct(e){return e.length<=Ci}s();s();s();function pn(e){return $e`
3
- query OrganizationBetaFlags($organizationId: OrganizationID!) {
4
- organization(organizationId: $organizationId) {
5
- id
6
- ${e.map(n=>`flag_${n}: hasFeatureFlag(handle: "${n}")`).join(`
7
- `)}
8
- }
9
- }`}s();var kn={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"}}]}}]}}]};s();var fe=class extends c{},w=class extends c{constructor(n,i){let a="unknown",o=d=>`an ${d}`;Ke(n)?(a=n.orgName,o=d=>`the ${d} organization`):We(n)&&(a=n.email,o=d=>`the ${d} user`);let r=P`${ln.yellow(a)}`.value,m=[[`Your current active session is associated with ${o(r)} 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&&m.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,m)}};async function _t(){let e=vn(),n=await e.organizations();if(n.length===0){let i=await e.session();throw new w(i.accountInfo)}return n}async function Dt(e,n){let i=await n.orgFromId(e);if(!i)throw new w((await n.session()).accountInfo,e);return i}async function At(e,n,i,a=["APP_DEVELOPMENT"]){let o=await i.storeByDomain(e.id,n,a);if(!o){let m=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 fe(`Could not find store for domain ${n} in organization ${e.businessName}.`,m)}return o}s();var O=class extends c{versionTag;constructor(n){super(`Version ${n} could not be found.`),this.versionTag=n}};s();var fn={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"},Ei={app:"shopify.app.toml",web:"shopify.web.toml",appEnvironments:"shopify.environments.toml",lockFile:".shopify.lock",hiddenConfig:"project.json",hiddenFolder:".shopify"},Rt={production:".env"},zt={reactTypes:"17.0.30"},gn={extensions:{directoryName:"extensions",defaultRegistrationLimit:1},web:{directoryName:"web",configurationName:Ei.web}},Ct={graphiql:3457,localhost:3458},Et=/^([a-zA-Z_$])([a-zA-Z0-9_$])*$/;s();var Q;(function(e){e.Partners="Partners",e.BusinessPlatform="BusinessPlatform"})(Q||(Q={}));s();s();var Nn=50,Sn=250,Ui=t.object({namespace:t.string(),key:t.string(),owner_type:t.string().optional()}),Pi=t.object({sms_marketing:t.boolean().optional(),customer_privacy:t.boolean().optional()}),qi=t.object({sources:t.array(t.string()).optional()}),Oi=t.object({network_access:t.boolean().optional(),block_progress:t.boolean().optional(),api_access:t.boolean().optional(),collect_buyer_consent:Pi.optional(),iframe:qi.optional(),bundle_size_exception:t.boolean().optional()}),Li=t.object({runs_offline:t.boolean().optional()}),Mt=t.object({type:t.string().optional(),extensions:t.array(t.any()).optional()}),Mi=t.object({event:t.string(),blocking:t.boolean().default(!1),applies_to:t.array(t.string()).optional()}),$i=t.object({allow_direct_linking:t.boolean().optional(),intercepts:t.array(Mi).optional()}),Hi=t.object({module:t.string()}),Bi=t.object({target:t.string(),module:t.string(),should_render:Hi.optional(),tools:t.string().optional(),instructions:t.string().optional(),intents:t.array(t.object({type:t.string(),action:t.string(),schema:t.string(),name:t.string().optional(),description:t.string().optional()})).optional(),metafields:t.array(Ui).optional(),default_placement:t.string().optional(),urls:t.object({edit:t.string().optional()}).optional(),capabilities:$i.optional(),preloads:t.object({chat:t.string().optional()}).optional(),assets:t.string().optional()}),$t=t.array(Bi),hn=t.string(),ji=t.object({key:t.string().optional(),name:t.string().optional(),description:t.string().optional(),required:t.boolean().optional(),default_value:t.any().optional(),type:t.string(),validations:t.array(t.any()).optional(),marketingActivityCreateUrl:t.string().optional(),marketingActivityDeleteUrl:t.string().optional()}),yn=t.object({fields:t.array(ji).optional()}),bn=t.string().trim().nonempty("Handle can't be empty").max(Nn,`Handle can't exceed ${Nn} characters`).regex(/^[a-zA-Z0-9-]*$/,"Handle can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"Handle can't start or end with a hyphen"),Wi=t.string().trim().nonempty("UID can't be empty").max(Sn,`UID can't exceed ${Sn} characters`).regex(/^[a-zA-Z0-9-${}.()_`]*$/,"UID can only contain alphanumeric characters and hyphens").refine(e=>!e.startsWith("-")&&!e.endsWith("-"),"UID can't start or end with a hyphen"),X=t.object({name:t.string().optional(),type:t.string().optional(),handle:bn.optional(),uid:Wi.optional(),description:t.string().optional(),api_version:hn.optional(),extension_points:t.any().optional(),capabilities:Oi.optional(),supported_features:Li.optional(),settings:yn.optional()}),Ht=X.extend({handle:bn}),b=X.omit({handle:!0}),Bt=t.object({api_version:hn.optional(),description:t.string().optional(),extensions:t.array(t.any()),settings:yn.optional()});s();s();s();s();var Ki=/^(https:\/\/)/,Gi=/^pubsub:\/\/(?<gcp_project_id>[^:]+):(?<gcp_topic>.+)$/,Yi=/^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>.+)$/,Ji=/^kafka:\/\/(?<kafka_topic>[a-zA-Z0-9_.-]+)$/;function V(e){return typeof e=="string"&&e.endsWith("/")?e.replace(/\/+$/,""):e}var F=t.string({invalid_type_error:"Value must be string"}).refine(e=>e.startsWith("/")?!0:Ki.test(e)||Gi.test(e)||Yi.test(e)||Ji.test(e),{message:"URI format isn't correct. Valid formats include: relative path starting with a slash, HTTPS URL, pubsub://{project-id}:{topic-id}, kafka://{topic-id} or Eventbridge ARN"});function ee(e,n){return!n||!e.startsWith("/")?e:`${V(n)}${e}`}var Zi=(e,n,i,a)=>{if(i.startsWith("//"))throw new c(`${e} ${n} is invalid: a URL relative to the app URL must start with a single slash.`);if(un.test(i))throw new c(`${e} ${n} is invalid: a URL must not contain control characters such as newlines or tabs.`);let o=ee(i,a);if(o.startsWith("/"))throw new c(`${e} ${n} is a relative URL, but no application_url is configured. Set application_url in your app configuration or use an absolute HTTPS URL.`);if(!cn(o))throw new c(`${e} ${n} must resolve to an HTTPS URL. Set application_url to an HTTPS URL or use an absolute HTTPS URL.`);return o};function ge(e,n,i,a){let o=i;for(let r of n){let m=o[r];typeof m=="string"&&m.startsWith("/")&&(o[r]=Zi(e,r,m,a))}}s();import{isUtf8 as Qi}from"node:buffer";import Fn from"fs";async function _n(e,n){let i=await Oe(Ue(e,"locales/*.json"));if(!i||i.length===0)return{};let a=Xi(i);if(a.length===0)throw new c(`Missing default language in ${n} configuration`,"Make sure to have a {locale}.default.json file in your locales directory");if(a.length>1)throw new c(`Error loading ${n}`,'There must be one (and only one) locale identified as the default locale: e.g. "en.default.json"');for(let o of i)if(Fn.statSync(o).size===0)throw new c(`Error loading ${n}`,`Locale file ${o} can't be empty`);return{default_locale:a[0],translations:ea(i,n)}}function Xi(e){return e.filter(i=>K(i).endsWith(".default.json")).map(i=>K(i).split(".")[0])}function ea(e,n){let i={};for(let a of e){let o=na(K(a).split(".")[0],"Locale code is unset"),r=Fn.readFileSync(a);if(!Qi(r))throw new c(`Error loading ${n}`,`Locale file ${a} contains invalid UTF-8 byte sequences. Re-save the file using UTF-8 encoding.`);i[o]=r.toString("base64")}return i}function na(e,n){if(e===void 0)throw new D(n);return e}function ia(e){return e.experience==="configuration"}var Dn;(function(e){e.ShouldRender="should_render",e.Main="main",e.Tools="tools",e.Instructions="instructions",e.Intents="intents"})(Dn||(Dn={}));function An(e){let i={...{externalIdentifier:`${e.identifier}_external`,additionalIdentifiers:[],externalName:G(e.identifier.replace(/_/g," ")),surface:"test-surface",partnersWebIdentifier:e.identifier,schema:X,registrationLimit:gn.extensions.defaultRegistrationLimit,transform:e.transformLocalToRemote,reverseTransform:e.transformRemoteToLocal,experience:e.experience??"extension",uidStrategy:e.uidStrategy??(e.experience==="configuration"?"single":"uuid"),getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,clientSteps:e.clientSteps},...e};return{...i,contributeToAppConfigurationSchema:a=>{let o=ia(i),r=i.schema._def.shape!==void 0,m=i.uidStrategy==="single";return o&&r&&m?a.merge(i.schema):a},parseConfigurationObject:a=>{let o=i.schema.safeParse(a);return o.success?{state:"ok",data:o.data,errors:void 0}:{state:"error",data:void 0,errors:o.error.errors}}}}function S(e){let n=e.appModuleFeatures??(()=>[]);return An({identifier:e.identifier,schema:e.schema,appModuleFeatures:n,transformLocalToRemote:aa(e.transformConfig),transformRemoteToLocal:ta(e.schema,e.transformConfig),experience:"configuration",uidStrategy:e.uidStrategy??"single",expandConfig:e.expandConfig,getIdentity:e.getIdentity,getTarget:e.getTarget,clientSteps:e.clientSteps,getDevSessionUpdateMessages:e.getDevSessionUpdateMessages,patchWithAppDevURLs:e.patchWithAppDevURLs})}function So(e){let n=e.appRelativeUrlFields;return An({identifier:e.identifier,schema:t.any({}),appModuleFeatures:e.appModuleFeatures,experience:e.experience,clientSteps:e.clientSteps,uidStrategy:e.uidStrategy,transformRemoteToLocal:e.transformRemoteToLocal,devSessionWatchConfig:e.devSessionWatchConfig,appRelativeUrlFields:n,patchWithAppDevURLs:n?.length?(i,a)=>{ge(G(e.identifier.replace(/_/g," ")),n,i,a.applicationUrl)}:void 0,deployConfig:async(i,a,o,r,m)=>{let d=oa(i);if(n?.length){let l=m?.appConfiguration?.application_url,p=typeof l=="string"?l:void 0;ge(G(e.identifier.replace(/_/g," ")),n,d,p)}if(e.appModuleFeatures().includes("localization")){let l=await _n(a,e.identifier);d={...d,localization:l}}return d}})}function aa(e){return Object.keys(e).includes("forward")?e.forward:n=>L(n,e)}function ta(e,n){return n?Object.keys(n).includes("reverse")?n.reverse:i=>L(i,n,!0):i=>Tn(e,i)}function L(e,n,i=!1){let a={};for(let[o,r]of Object.entries(n)){let m=i?o:r,d=i?r:o,l=U(e,m);l!==void 0&&Je(a,d,l)}return a}function Tn(e,n){return Object.keys(e._def.shape()).reduce((i,a)=>{let o=e._def.shape()[a];return o instanceof t.ZodOptional&&(o=o._def.innerType),o instanceof t.ZodObject?i[a]=Tn(o,n):(n[a]!==void 0&&(i[a]=n[a]),delete n[a]),i},{})}function oa(e){let{type:n,handle:i,uid:a,path:o,extensions:r,...m}=e;return m}var ra=b.extend({application_url:q(t.string({required_error:"Valid URL is required"})),embedded:t.boolean({required_error:"Boolean is required",invalid_type_error:"Value must be Boolean"}),app_preferences:t.object({url:q(t.string().max(255,{message:"String must be less than 255 characters"}))}).optional()}),sa={app_url:"application_url",embedded:"embedded",preferences_url:"app_preferences.url"},Ne="app_home",da=S({identifier:Ne,schema:ra,transformConfig:sa,patchWithAppDevURLs:(e,n)=>{e.application_url=n.applicationUrl},getDevSessionUpdateMessages:async e=>[`Using URL: ${e.application_url}`]}),Ao=da;s();var la=b.extend({name:t.string({required_error:"String is required"}).max(30,{message:"String must be less than 30 characters"}),handle:t.string({required_error:"String is required"}).max(256,{message:"String must be less than 256 characters long"}).refine(e=>e&&/^\w*(?!-)[_a-z0-9-]+(?<!-)$/.test(e),{message:"String can't contain special characters"}).optional()}),ma={name:"name",app_handle:"handle"},Se="branding",ua=S({identifier:Se,schema:la,transformConfig:ma}),Ro=ua;s();var ca=t.object({scopes:t.string().transform(e=>Y(e)??"").optional(),required_scopes:t.array(t.string()).optional(),optional_scopes:t.array(t.string()).optional(),use_legacy_install_flow:t.boolean().optional()}),pa=t.object({redirect_urls:t.array(q(t.string()))}),ka=b.extend({access:t.object({admin:t.object({direct_api_mode:t.union([t.literal("online"),t.literal("offline")]).optional(),embedded_app_direct_api_access:t.boolean().optional()}).optional()}).optional(),access_scopes:ca.optional(),auth:pa}),he="app_access",wn={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"};function va(e){let{shop_scopes:n,...i}=e,a=typeof n=="string"?Y(n):void 0;if(!a)return i;let o=typeof i.scopes=="string"?i.scopes:"";return{...i,scopes:Y([o,a].join(","))}}var fa={forward:e=>L(e,wn),reverse:e=>L(va(e),wn,!0)},ga=S({identifier:he,schema:ka,transformConfig:fa,getDevSessionUpdateMessages:async e=>{let n=e.access_scopes!==void 0,i=e.access_scopes?.use_legacy_install_flow===!0,a=e.access_scopes?.scopes==null&&e.access_scopes?.required_scopes==null;if(i||n&&a)return["Using legacy install flow - access scopes are not auto-granted"];let o=e.access_scopes?.scopes?e.access_scopes.scopes.split(",").map(r=>r.trim()).join(", "):e.access_scopes?.required_scopes?.join(", ");return o?[`Access scopes auto-granted: ${o}`]:["App has been installed"]},patchWithAppDevURLs:(e,n)=>{n.redirectUrlWhitelist&&(e.auth={redirect_urls:n.redirectUrlWhitelist})}}),Lo=ga;s();var Vn={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"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],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"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],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"}}]}}]}}]};s();var In={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"}}}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}}],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"}}},{kind:"Argument",name:{kind:"Name",value:"isUnsafe"},value:{kind:"Variable",name:{kind:"Name",value:"unsafeValidation"}}}],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"}}]}}]}}]};s();var xn={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"}}]}}]}}]};s();var Rn={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"}}]}}]}}]};s();var zn={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"}}]}}]}}]};s();var Cn={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"DevStoreCapReached"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"organization"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"devStoreCapReached"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};s();var En={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"}}]}}]}}]};s();var Un={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"}}]}}]}}]}}]}}]};s();var ye={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"}}]}}]}}]};s();var Pn={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"}}]}}]}}]};s();var qn={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"}}]}}]}}]};s();var On={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"}}]}}]}}]};s();var Ln={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"}}]}}]}}]};s();var Mn={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"}}]}}]}}]};s();var $n={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"}}]}}]}}]};s();var Hn={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"}}]}}]}}]};s();var Bn={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"}}]}}]}}]};s();var jn={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"}}]}}]}}]};s();var Wn={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"}}}]}]}}]};s();var Kn={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"}}]}}]}}]};s();var Gn={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"}}]}}]}}]};s();var Yn={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"}}]}}]}}]};s();var Jn={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"}}]}}]}}]};s();s();s();var M;(function(e){e.CustomersRedact="customers/redact",e.CustomersDataRequest="customers/data_request",e.ShopRedact="shop/redact"})(M||(M={}));var Zn=t.object({topics:t.array(t.string({invalid_type_error:"Values within array must be a string"}),{invalid_type_error:"Value must be string[]"}).optional(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),uri:t.preprocess(e=>V(e),F,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional(),compliance_topics:t.array(t.enum([M.CustomersRedact,M.CustomersDataRequest,M.ShopRedact]),{invalid_type_error:"Value must be an array containing values: customers/redact, customers/data_request or shop/redact"}).optional()});s();function Qn(e,n){let i=Na(e);if(i)return n.addIssue(i),t.NEVER}function Na(e){let{subscriptions:n=[]}=e,i=new Set,a=[];if(!n.length)return;if(e.privacy_compliance&&e.subscriptions?.some(r=>r.compliance_topics))return{code:t.ZodIssueCode.custom,message:"The privacy_compliance section can't be used if there are subscriptions including compliance_topics"};let o=n.flatMap(r=>r.compliance_topics).filter(Boolean);if(C(o).length!==o.length)return{code:t.ZodIssueCode.custom,message:"You can\u2019t have multiple subscriptions with the same compliance topic",fatal:!0,path:["subscriptions"]};for(let[r,{uri:m,topics:d=[],compliance_topics:l=[],filter:p=""}]of n.entries()){let k=["subscriptions",r];if(!d.length&&!l.length)return{code:t.ZodIssueCode.custom,message:"Either topics or compliance_topics must be added to the webhook subscription",path:k};d.forEach(u=>{let v=`${u}::${m}::${p}`;if(i.has(v)){let N=p?pe.dim(`
10
-
11
- topic: ${u}
12
- uri: ${m}
13
- filter: ${p}`):pe.dim(`
14
-
15
- topic: ${u}
16
- uri: ${m}`);a.push(N)}i.add(v)})}if(a.length>0){let r=a.join("");return{code:t.ZodIssueCode.custom,message:`Multiple subscriptions with the exact same topic, uri, and filter. To resolve, remove or edit the duplicates ${r}`,path:["subscriptions"]}}}s();function ei(e){let n=U(e,"webhooks");if(!n)return e;let{api_version:i}=n;return{api_version:i}}function ni(e){let n={},i=U(e,"api_version");return n={...i?{webhooks:{api_version:i}}:{}},n}function ii(e){if(e.length===0)return;let n=e.filter(r=>r.topics!==void 0).flatMap(({compliance_topics:r,topics:m,...d})=>ai(m)?.map(p=>({topics:[p],...d}))??[]),i=e.filter(r=>r.topics===void 0||r.compliance_topics!==void 0).map(({compliance_topics:r,topics:m,...d})=>({compliance_topics:r,...d})),a=ya(i,"compliance_topics"),o=Sa(a);return[...Xn(o),...Xn(n)]}function ai(e){return e?.sort((n,i)=>n.localeCompare(i))}function Xn(e){return e.sort((n,i)=>n.uri.localeCompare(i.uri))}function Sa(e){return e.forEach(n=>n.compliance_topics=ai(n.compliance_topics)),e}function ha(e,n){return e.find(i=>i.uri===n.uri&&Ye(i.include_fields??[],n.include_fields??[])&&i.filter===n.filter)}function ya(e,n){return e.reduce((i,a)=>{let o=ha(i,a);return o?n&&a?.[n]?.length?o[n]?.push(...a[n]):(a.topics&&(o.topics??=[],o.topics.push(...a.topics)),a.compliance_topics&&(o.compliance_topics??=[],o.compliance_topics.push(...a.compliance_topics))):i.push(a),i},[])}var ba=t.object({api_version:t.string({required_error:"String is required"}),privacy_compliance:t.object({customer_deletion_url:F.optional(),customer_data_request_url:F.optional(),shop_deletion_url:F.optional()}).optional(),subscriptions:t.array(Zn).optional().transform(e=>ii(e??[]))}),ti=b.extend({webhooks:ba.superRefine(Qn)});var be="webhooks",Fa={forward:ei,reverse:e=>ni(e)},_a=S({identifier:be,schema:ti,transformConfig:Fa}),ts=_a;s();var oi={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"AppVersionByTag"},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:"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:"appId"},value:{kind:"Variable",name:{kind:"Name",value:"appId"}}},{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"}}]}}]}}]};s();var ri={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"}}]}}]}}]};s();var Fe="webhook_subscription",Da=t.object({topic:t.string(),actions:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),api_version:t.string(),uri:t.preprocess(V,F,{required_error:"Missing value at"}),include_fields:t.array(t.string({invalid_type_error:"Value must be a string"})).optional(),filter:t.string({invalid_type_error:"Value must be a string"}).optional(),payload_query:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).optional(),name:t.string({invalid_type_error:"Value must be a string"}).trim().min(1).max(50).optional()});function Aa(e){let{api_version:n,topic:i,...a}=e;return{webhooks:{subscriptions:[{topics:[i],...a}]}}}var Ta={forward:(e,n)=>{let i=e,a;return"application_url"in n&&(a=n?.application_url),{...i,uri:ee(i.uri,a)}},reverse:Aa},wa=S({identifier:Fe,schema:Da,transformConfig:Ta,uidStrategy:"dynamic"}),vs=wa;s();s();s();function I(e={}){return{type:"token_refresh",handler:async()=>({token:await _([],{noPrompt:e.noPrompt,allowAutomationToken:!0})})}}function Va(e){if(typeof e!="object"||e===null)return!1;let{statusCode:n,response:i}=e,a=n??i?.status;return a===401||a===403}var ne=class extends c{constructor(n){let i=n.businessName??`organization ${n.id}`,a="in the Shopify admin under Settings > Users > Security";Ge()?super(`This service account can't manage dev stores in ${i}.`,null,[`Give the service account Dev store management access ${a}.`,"Or use a token from a service account that has that access."]):J()?super(`This automation token can't manage dev stores in ${i}.`,null,[`Create a service account with Dev store management access ${a}.`,"Set its token in the SHOPIFY_SERVICE_ACCOUNT_TOKEN environment variable."]):super(`You don't have permission to manage dev stores in ${i}.`,null,["Check that you're logged in to the right account.","Or ask an organization admin for access."])}};async function ie(e,n){try{return await T({...n,organizationId:e.id})}catch(i){throw Va(i)?new ne(e):i}}s();var si={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindOrganization"},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"}}]}}]}}]};s();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:"status"}},{kind:"Field",name:{kind:"Name",value:"shopCount"}},{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"}}]}}]}}]};s();function x(e){let n=e.match(/\/(\d+)$/);return n?n[1]:void 0}function ae(e){return x(Buffer.from(e,"base64").toString("utf8"))}function $(e){return Buffer.from(e).toString("base64")}async function H(){return(await li()).organizations}async function Ia(e){return li(e)}async function _e(e,n,i){let a=n??await _([],{allowAutomationToken:!0}),r=(await A({query:si,token:a,variables:{organizationId:xa(e)},unauthorizedHandler:i??I(),cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:Le(a)}})).currentUserAccount?.organization;if(r)return{id:e,businessName:r.name}}function xa(e){let n=e.startsWith("gid://")?x(e):e;if(n===void 0||!/^\d+$/.test(n))throw new c(`Invalid organization ID: ${e}`);return $(`gid://organization/Organization/${n}`)}async function li(e){let n=e??await _([],{allowAutomationToken:!0}),i=await A({query:di,token:n,unauthorizedHandler:I()});return i.currentUserAccount?{organizations:i.currentUserAccount.organizationsWithAccessToDestination.nodes.map(o=>{let r=ae(o.id);if(r===void 0)throw new c(`Failed to decode organization ID from: ${o.id}`);return{id:r,businessName:o.name,status:o.status,shopCount:o.shopCount??null,url:o.url}}),currentUserResolved:!0}:{organizations:[],currentUserResolved:!1}}s();s();async function De(e){if(e.length===1)return e[0];let i=new Set(e.map(o=>o.businessName)).size<e.length,a=await tn({message:"Which organization do you want to use?",choices:e.map(o=>({label:i?`${o.businessName} (${o.id})`:o.businessName,value:o.id}))});return e.find(o=>o.id===a)}async function Ra(e){let n=await H();if(n.length===0)throw new c("No organizations found.","Make sure you have access to a Shopify organization.");if(e){let i=n.find(a=>a.id===e);if(!i)throw new c(`Organization with ID ${e} not found.`,`Available organizations: ${n.map(a=>`${a.businessName} (${a.id})`).join(", ")}`);return i}return De(n)}s();var za=["ACTIVE","LOCKED"];s();s();var Ae={basic:"BASIC_APP_DEVELOPMENT",grow:"PROFESSIONAL_APP_DEVELOPMENT",advanced:"UNLIMITED_APP_DEVELOPMENT",plus:"SHOPIFY_PLUS_APP_DEVELOPMENT"},R=Object.keys(Ae);s();s();var B=t.object({id:t.string(),name:t.string(),subdomain:t.string(),country:t.string().optional(),type:t.string().optional(),authScopes:t.array(t.string()).optional(),plan:t.string().optional(),organizationId:t.string(),organizationName:t.string()}),te=t.object({id:t.string(),name:t.string()});var mi=B.pick({name:!0}).extend({domain:B.shape.subdomain,adminUrl:t.string().nullish(),plan:t.enum(R),featurePreview:t.string().optional(),country:B.shape.country,demoData:t.boolean()}),Te=Ee({name:"CreateDevStoreResult",schema:t.object({store:mi,organization:te}),definitions:{CreatedDevStore:mi,StoreOrganization:te}});s();var ui={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateAppDevelopmentStore"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"country"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createAppDevelopmentStore"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopName"},value:{kind:"Variable",name:{kind:"Name",value:"shopName"}}},{kind:"Argument",name:{kind:"Name",value:"priceLookupKey"},value:{kind:"Variable",name:{kind:"Name",value:"priceLookupKey"}}},{kind:"Argument",name:{kind:"Name",value:"prepopulateTestData"},value:{kind:"Variable",name:{kind:"Name",value:"prepopulateTestData"}}},{kind:"Argument",name:{kind:"Name",value:"developerPreviewHandle"},value:{kind:"Variable",name:{kind:"Name",value:"developerPreviewHandle"}}},{kind:"Argument",name:{kind:"Name",value:"country"},value:{kind:"Variable",name:{kind:"Name",value:"country"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"shopAdminUrl"}},{kind:"Field",name:{kind:"Name",value:"shopDomain"}},{kind:"Field",name:{kind:"Name",value:"userErrors"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"}},{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"}}]}}]}}]};s();var ci={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PollStoreCreation"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}},type:{kind:"NonNullType",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:"storeCreation"},arguments:[{kind:"Argument",name:{kind:"Name",value:"shopDomain"},value:{kind:"Variable",name:{kind:"Name",value:"shopDomain"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}},{kind:"Field",name:{kind:"Name",value:"__typename"}}]}}]}}]};var Ca=2,Ea=300*1e3;function Ua(e){switch(e){case"CALLING_CORE":return"Initiating store creation";case"AWAITING_CORE_STORE_READY":return"Waiting for store to be ready";case"FINALIZING":return"Finalizing store setup";case"COMPLETE":return"Store creation complete!";case"FAILED":return"Store creation failed.";case"TIMED_OUT":return"Store creation timed out.";case"USER_ERROR":return"Store creation encountered a user error.";default:return`Store creation status: ${e}`}}async function Pa(e){let{organization:n,name:i,plan:a}=e,o=await _([],{allowAutomationToken:!0}),r=I(),d=(await ie(n,{query:ui,token:o,variables:{shopName:i,priceLookupKey:Ae[a],prepopulateTestData:e.withDemoData??!1,developerPreviewHandle:e.featurePreview,country:e.country},unauthorizedHandler:r})).createAppDevelopmentStore;if(!d)throw new c("Store creation failed: unexpected empty response.");let l=d.userErrors;if(l&&l.length>0){let u=l.map(v=>v.message).join(", ");throw new c(`Failed to create dev store: ${u}`)}let{shopDomain:p,shopAdminUrl:k}=d;if(!p)throw new c("Store creation succeeded but no shop domain was returned.");if(await on({title:P`Waiting for store to be ready`,task:async u=>{let v=Date.now(),N=!1;for(;;){if(Date.now()-v>Ea)throw N?new c("Store creation timed out after 5 minutes."):new c("Store creation timed out after 5 minutes without reporting a status.",null,[`Check whether ${p} was created with \`shopify store list\` before trying again.`]);let f=(await ie(n,{query:ci,token:o,variables:{shopDomain:p},unauthorizedHandler:r})).organization?.storeCreation?.status;if(f){if(N=!0,f==="COMPLETE")return;if(f==="FAILED"||f==="TIMED_OUT"||f==="USER_ERROR")throw new c(`Store creation failed with status: ${f}`)}u(P`${f?Ua(f):"Waiting for store creation to start"}`),await sn(Ca)}},renderOptions:{stdout:process.stderr}}),e.json)mn(Te.encode({store:{name:i,domain:p,adminUrl:k,plan:a,...e.featurePreview?{featurePreview:e.featurePreview}:{},...e.country?{country:e.country}:{},demoData:e.withDemoData??!1},organization:{id:n.id,name:n.businessName}}));else if(e.summary!==!1){let u=[];j(u,"Domain",p),u.push(["Admin",k?{link:{label:k,url:k}}:"N/A"]),j(u,"Plan",a),j(u,"Feature preview",e.featurePreview),j(u,"Country",e.country),j(u,"Demo data",e.withDemoData?"enabled":"disabled"),en({headline:`Dev store "${i}" created successfully.`,customSections:[{body:{tabularData:u,firstColumnSubdued:!0}}]})}return p}function j(e,n,i){i!=null&&i!==""&&e.push([n,i])}s();var qa={basic:"Basic",grow:"Grow",advanced:"Advanced",plus:"Plus"};function Oa(){return rn({message:"Name for the new dev store"})}function La(){return nn({message:"Which Shopify plan do you want to use?",choices:R.map(e=>({label:qa[e],value:e}))})}function Ma(){return an({message:"Populate the store with demo data?",confirmationMessage:"Yes, add demo data",cancellationMessage:"No, start with an empty store",defaultValue:!0})}s();s();var pi=(e,n,i)=>{let a=new URL(e);return n&&a.searchParams.append("cursor",n),i?.status&&a.searchParams.append("status",i.status),i?.source&&a.searchParams.append("source",i.source),a.toString()};var ki=W(Z()),$a=new ki.default({minTime:150,maxConcurrent:10});async function Ha(e){let n="App Management",a=`https://${await h()}/app_management/unstable/graphql.json`;return{token:e,api:n,url:a,responseOptions:{onResponse:Ve}}}var we=e=>Me(e),vi=async(e,n,i)=>{let o=`https://${await h()}/app_management/unstable/organizations/${e}/app_logs/poll`;return pi(o,n,i)},fi=async(e,n)=>`https://${await h()}/app_management/unstable/organizations/${encodeURIComponent(e)}/apps/${encodeURIComponent(n)}/channel_spec_export.json`;async function gi(e){let n=e.cacheOptions?.cacheExtraKey??"",i=e.cacheOptions?{...e.cacheOptions,cacheExtraKey:n}:void 0;return $a.schedule(async()=>y({...await Ha(e.token),query:e.query,variables:e.variables,cacheOptions:i,preferredBehaviour:e.requestOptions?.requestMode,unauthorizedHandler:e.unauthorizedHandler}))}function Ve(e){if(!e.extensions)return;let n=[];for(let i of e.extensions.deprecations)i.supportedUntilDate&&n.push(new Date(i.supportedUntilDate));Ze(n)}s();var Ni=W(Z()),Ba=new Ni.default({minTime:150,maxConcurrent:10});async function Si(e){let n="App Dev",i=E(e.shopFqdn),o=`https://${await je(i)}/app_dev/unstable/graphql.json`,r=Be()==="local"?{"x-forwarded-host":i}:void 0;return Ba.schedule(()=>y({query:e.query,api:n,url:o,token:e.token,addedHeaders:r,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler,preferredBehaviour:e.requestOptions?.requestMode}))}s();var hi=W(Z()),ja=new hi.default({minTime:150,maxConcurrent:10});async function Wa(e,n,i){let a="Functions",r=`https://${await h()}/functions/unstable/organizations/${e}/${i}/graphql`;return{token:n,api:a,url:r,responseOptions:{onResponse:Ve}}}async function yi(e){return await ja.schedule(async()=>y({...await Wa(e.organizationId,e.token,e.appId),query:e.query,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}s();var bi=W(Z()),Ka=new bi.default({minTime:150,maxConcurrent:10});async function Fi(e){let n="Webhooks",a=`https://${await h()}/webhooks/unstable/organizations/${e.organizationId}/graphql.json`;return Ka.schedule(()=>y({query:e.query,api:n,url:a,token:e.token,variables:e.variables,unauthorizedHandler:e.unauthorizedHandler}))}import{randomUUID as Ga}from"crypto";var _i="https://cdn.shopify.com/static/cli/extensions/templates.json",Ya=Ga(),Ja=t.object({statusCode:t.literal(200),errors:t.array(t.object({path:t.tuple([t.literal("versionByTag")]),extensions:t.object({app_errors:t.object({errors:t.array(t.object({category:t.literal("not_found")})).nonempty()})})})).nonempty()}),re=class e{static instance;static getInstance(n){return e.instance??=new e(n),e.instance}static resetInstance(){e.instance=void 0}clientName=se.AppManagement;webUiName="Developer Dashboard";organizationSource=Q.BusinessPlatform;bundleFormat="br";_session;constructor(n){this._session=n}async subscribeToAppLogs(n,i){return this.appManagementRequest({query:ri,variables:{shopIds:n.shopIds,apiKey:n.apiKey}})}async appLogs(n,i){let a=await st({organizationId:i,jwtToken:n.jwtToken,cursor:n.cursor,filters:n.filters});try{let o=await a.json();return a.ok?{app_logs:o.app_logs??[],cursor:o.cursor,status:a.status}:{errors:o.errors??[`Request failed with status ${a.status}`],status:a.status}}catch(o){return{errors:[`Failed to parse response: ${o}`],status:a.status}}}async channelSpecExport(n){let i=x(n.id)??n.id,a=await fi(n.organizationId,i),o=await le(a,{method:"GET",headers:we(await this.token())}),r;try{r=await o.json()}catch{r=void 0}let m=typeof r=="object"&&r!==null&&!Array.isArray(r)?r:void 0;return o.ok&&m?{ok:!0,status:o.status,body:m}:{ok:!1,status:o.status,body:m}}async session(){if(!this._session){if(dn())throw new Error("AppManagementClient.session() should not be invoked dynamically in a unit test");let n=await ue(),{appManagementToken:i,businessPlatformToken:a,userId:o}=n,r=await A({query:jn,cacheOptions:{cacheTTL:{hours:6},cacheExtraKey:o},token:a,unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")});if(J()&&r.currentUserAccount){let m=r.currentUserAccount.organizations.nodes.map(d=>({name:d.name}));if(m.length>1)throw new D("Multiple organizations found for the CLI token");this._session={token:i,businessPlatformToken:a,accountInfo:{type:"ServiceAccount",orgName:m[0]?.name??"Unknown organization"},userId:o}}else r.currentUserAccount?this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UserAccount",email:r.currentUserAccount.email},userId:o}:this._session={token:i,businessPlatformToken:a,accountInfo:{type:"UnknownAccount"},userId:o}}return this._session}async token(){return(await this.session()).token}async businessPlatformToken(){return(await this.session()).businessPlatformToken}async unsafeRefreshToken(){let n=await ue({noPrompt:!0,forceRefresh:!0}),i=await this.session();return i.token=n.appManagementToken,i.businessPlatformToken=n.businessPlatformToken,i.token}async accountInfo(){return(await this.session()).accountInfo}async appFromIdentifiers(n){let{app:i}=await this.activeAppVersionRawResult(n);if(!i)return;let{name:a,appModules:o}=i.activeRelease.version,r=o.find(d=>d.specification.externalIdentifier==="app_home"),m=i.activeRoot.clientCredentials.secrets.map(d=>({secret:d.key}));return{id:i.id,title:a,apiKey:i.key,apiSecretKeys:m,organizationId:String(g(i.organizationId)),grantedScopes:i.activeRoot.grantedShopifyApprovalScopes,applicationUrl:r?.config?.app_url,embedded:r?.config?.embedded,flags:[],developerPlatformClient:this}}async organizations(){return(await H()).map(i=>({...i,source:this.organizationSource}))}async orgFromId(n){let i=await _e(n,await this.businessPlatformToken(),this.createUnauthorizedHandler("businessPlatform"));if(i)return{...i,source:this.organizationSource}}async orgAndApps(n){let[i,{apps:a,hasMorePages:o}]=await Promise.all([this.orgFromId(n),this.appsForOrg(n)]);if(!i){let{accountInfo:r}=await this.session();throw new w(r,n)}return{organization:i,apps:a,hasMorePages:o}}async appsForOrg(n,i=""){let a=Bn,o={query:i.split(" ").filter(d=>d).map(d=>`title:${d}`).join(" "),organizationId:n},r=await this.appManagementRequest({query:a,variables:o});if(!r.appsConnection)throw new D("Server failed to retrieve apps");return{apps:r.appsConnection.edges.map(d=>{let l=d.node;return{id:l.id,apiKey:l.key,title:l.activeRelease.version.name,organizationId:n}}),hasMorePages:r.appsConnection.pageInfo.hasNextPage}}async specifications({organizationId:n}){let i=Hn,a={organizationId:Ie(n)};return(await this.appManagementRequest({query:i,variables:a})).specifications.map(r=>({name:r.name,externalName:r.name,identifier:r.identifier,externalIdentifier:r.externalIdentifier,gated:!1,managementExperience:"cli",registrationLimit:r.uidStrategy.appModuleLimit,uidStrategy:rt(r.uidStrategy.__typename),experience:xe(r.experience,r.identifier),validationSchema:r.validationSchema}))}async templateSpecifications({organizationId:n},i={}){let a,{templatesJsonPath:o}=fn,r=process.env[o];if(r){if(!await qe(r))throw new c("There is no file at the path specified for template specifications");let u=await Pe(r);a=JSON.parse(u)}else try{a=await(await He(_i)).json()}catch{throw new c(["Failed to fetch extension templates from",{link:{url:_i}},{char:"."},"This likely means a problem with your internet connection."])}let m=0,d=i.requestedTemplate?a.filter(u=>u.identifier===i.requestedTemplate):void 0,l=d&&d.length>0?d:a,p=(await ot(l,async u=>this.organizationBetaFlags(n,u),async u=>this.organizationExpFlags(n,u))).map(u=>({...u,sortPriority:m++})),k=[];for(let u of a)u.group&&!k.includes(u.group)&&k.push(u.group);return{templates:p,groupOrder:k}}async createApp(n,i){let o=(await this.apiVersions(n.id)).publicApiVersions.filter(u=>u!=="unstable").sort().at(-1)??"unstable",r=Xa(i,n.id,o),m=$n,d=await this.appManagementRequest({query:m,variables:r});if(!d.appCreate.app||d.appCreate.userErrors?.length>0){let u=d.appCreate.userErrors.map(v=>v.message).join(", ");throw new c(u)}let l=Ii([]),p=d.appCreate.app,k=p.activeRoot.clientCredentials.secrets.map(u=>({secret:u.key}));return{...p,title:i.name,apiKey:p.key,apiSecretKeys:k,grantedScopes:i?.scopesArray??[],organizationId:n.id,newApp:!0,flags:l,developerPlatformClient:this}}async devStoresForOrg(n,i){let a=await this.businessPlatformOrganizationsRequest({query:zn,organizationId:String(g(n)),variables:{searchTerm:i}}),o=a.organization;if(!o)throw new c("No organization found");let r=o.accessibleShops?.edges.map(d=>d.node)??[],m=Vi(o.currentUser?.organizationPermissions??[]);return{stores:Ai(r,m),hasMorePages:a.organization?.accessibleShops?.pageInfo.hasNextPage??!1}}async devStoreCapReached(n){return(await this.businessPlatformOrganizationsRequest({query:Cn,organizationId:String(g(n)),variables:{}})).organization?.devStoreCapReached??!1}async appExtensionRegistrations(n,i){let a=i??await this.activeAppVersion(n),o=[],r=[],m=[];return a.appModuleVersions.forEach(d=>{let l={id:d.registrationId,uuid:d.registrationUuid,title:d.handle,type:d.type,activeVersion:d.config?{config:JSON.stringify(d.config),...d.target&&{context:d.target}}:void 0};d.specification?.experience==="configuration"?o.push(l):d.specification?.options?.managementExperience==="dashboard"?m.push(l):r.push(l)}),{app:{dashboardManagedExtensionRegistrations:m,configurationRegistrations:o,extensionRegistrations:r}}}async appVersions({id:n,organizationId:i,title:a}){let o=Ln,r={appId:n},m=await this.appManagementRequest({query:o,variables:r});return m.app?{app:{id:m.app.id,organizationId:i,title:a,appVersions:{nodes:m.app.versions?.edges.map(d=>{let l=d.node;return{createdAt:l.createdAt,createdBy:{displayName:l.createdBy},versionTag:l.metadata.versionTag,status:l.id===m.app.activeRelease.version.id?"active":"inactive",versionId:l.id,message:l.metadata.message}})??[],pageInfo:{totalResults:m.app.versionsCount}}}}:{app:null}}async appInstallCount({id:n}){let i=Mn,a={appId:n};return(await this.appManagementRequest({query:i,variables:a})).app.installCount??0}async appVersionByTag({id:n,organizationId:i},a){let o=oi,r={appId:n,versionTag:a},d=(await this.appManagementRequest({query:o,variables:r}).catch(l=>{throw Ja.safeParse(l).success?new O(a):l})).versionByTag;if(!d)throw new O(a);return{id:parseInt(d.id,10),uuid:d.id,versionTag:d.metadata.versionTag,location:[await oe({organizationId:i,id:n}),"versions",g(d.id)].join("/"),message:d.metadata.message??"",appModuleVersions:d.appModules.map(Ti)}}async appVersionsDiff(n,{versionId:i}){let a={versionId:i},[o,r]=await Promise.all([this.activeAppVersionRawResult(n.apiKey),this.appManagementRequest({query:On,variables:a})]),m=o.app.activeRelease.version.appModules,d=r.version.appModules,{added:l,removed:p,updated:k}=tt({currentModules:m,selectedVersionModules:d});function u(v){return{uuid:v.uuid,handle:v.handle,specification:{identifier:v.specification.identifier,experience:xe(v.specification.experience,v.specification.identifier),options:{managementExperience:"cli"}}}}return{app:{versionsDiff:{added:l.map(u),updated:k.map(u),removed:p.map(u)}}}}async activeAppVersion(n){let i=await this.activeAppVersionRawResult(n.apiKey);return{appModuleVersions:i.app.activeRelease.version.appModules.map(Ti),...i.app.activeRelease}}async generateSignedUploadUrl({apiKey:n,organizationId:i}){let a={sourceExtension:"BR",organizationId:Ie(i)},o=await this.appManagementRequest({query:qn,variables:a,cacheOptions:{cacheTTL:{minutes:59},cacheExtraKey:`${n}-${Ya}`}});return{assetUrl:o.appRequestSourceUploadUrl.sourceUploadUrl,userErrors:o.appRequestSourceUploadUrl.userErrors}}async deploy({appManifest:n,appId:i,organizationId:a,versionTag:o,message:r,commitReference:m,bundleUrl:d,skipPublish:l}){let u={appId:i,version:d?{sourceUrl:d}:{source:n},metadata:{versionTag:o,message:r,sourceControlUrl:m}},v=await this.appManagementRequest({query:Pn,variables:u,requestOptions:{requestMode:"slow-request"}}),{version:N}=v.appVersionCreate,z=v.appVersionCreate.userErrors.map(wi)??[];if(!N)return{appDeploy:{userErrors:z}};let f={appDeploy:{appVersion:{uuid:N.id,id:parseInt(N.id,10),versionTag:N.metadata.versionTag,location:await at(a,i,N.id),appModuleVersions:N.appModules.map(ze=>({uuid:ze.uuid,registrationUuid:ze.uuid,validationErrors:[]})),message:N.metadata.message},userErrors:z}};if(l)return f;let zi={appId:i,versionId:N.id},de=await this.appManagementRequest({query:ye,variables:zi});return de.appReleaseCreate.userErrors&&(f.appDeploy.userErrors=(f.appDeploy.userErrors??[]).concat(de.appReleaseCreate.userErrors.map(wi))),!de.appReleaseCreate.release&&f.appDeploy.userErrors.length===0&&f.appDeploy.userErrors.push({message:"The API did not return a release for the created app version.",category:"",details:[]}),f}async release({app:{id:n,organizationId:i},version:{versionId:a}}){let o={appId:n,versionId:a},r=await this.appManagementRequest({query:ye,variables:o});if(r.appReleaseCreate.release&&!r.appReleaseCreate.userErrors?.length)return{appRelease:{appVersion:{versionTag:r.appReleaseCreate.release.version.metadata.versionTag,message:r.appReleaseCreate.release.version.metadata.message,location:[await oe({organizationId:i,id:n}),"versions",g(r.appReleaseCreate.release.version.id).toString()].join("/")}}};if(!r.appReleaseCreate.userErrors?.length)throw new c("The Developer Dashboard did not confirm the app version release.");return{appRelease:{userErrors:r.appReleaseCreate.userErrors?.map(m=>({field:m.field,message:m.message,category:m.category,details:[],on:m.on}))??[]}}}async storeByDomain(n,i,a){let r=(await Promise.all(a.map(l=>this.businessPlatformOrganizationsRequest({query:Rn,organizationId:String(g(n)),variables:{domain:i,filters:dt(l)}})))).map(l=>l.organization).filter(l=>l!=null);if(r.length===0)throw new c("No organization found");let m=r.flatMap(l=>{let p=l.accessibleShops?.edges.map(u=>u.node)??[],k=Vi(l.currentUser?.organizationPermissions??[]);return Ai(p,k)}),d=E(i);return m.find(l=>l.shopDomain===d)}async ensureUserAccessToStore(n,i){if(!i.provisionable)return;let o={input:{shopifyShopId:nt(i.shopId)}},m=(await T({query:En,token:await this.businessPlatformToken(),organizationId:String(g(n)),variables:o,unauthorizedHandler:this.createUnauthorizedHandler()})).organizationUserProvisionShopAccess;if(!m.success){let d=m.userErrors?.map(l=>l.message).join(", ")??"";throw new D(`Failed to provision user access to store: ${d}`)}}async sendSampleWebhook(n,i){let a=Kn,o={address:n.address,apiKey:n.api_key,apiVersion:n.api_version,deliveryMethod:n.delivery_method,sharedSecret:n.shared_secret,topic:n.topic},r=await this.webhooksRequest({organizationId:i,query:a,variables:o}),m={samplePayload:"{}",headers:"{}",success:!1,userErrors:[]},d=r.cliTesting;return d&&(m={samplePayload:d.samplePayload??"{}",headers:d.headers??"{}",success:d.success,userErrors:d.errors.map(l=>({message:l,fields:[]}))}),{sendSampleWebhook:m}}async apiVersions(n){return{publicApiVersions:(await this.webhooksRequest({organizationId:n,query:Gn,variables:{}})).publicApiVersions.map(a=>a.handle)}}async topics({api_version:n},i){let a=Wn,o={apiVersion:n};return{webhookTopics:(await this.webhooksRequest({organizationId:i,query:a,variables:o})).availableTopics??[]}}async updateURLs(n){return ke("\u26A0\uFE0F updateURLs is not implemented"),{appUpdate:{userErrors:[]}}}async targetSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),r=String(g(o.id));return(await this.functionsRequest({organizationId:a,query:Yn,appId:r,variables:{handle:n.handle,version:n.version}}))?.target?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}async apiSchemaDefinition(n,i,a){try{let{app:o}=await this.activeAppVersionRawResult(i),r=String(g(o.id));return(await this.functionsRequest({organizationId:a,query:Jn,appId:r,variables:n}))?.api?.schema?.definition??null}catch(o){throw new c(`Failed to fetch schema definition: ${o}`)}}toExtensionGraphQLType(n){return n.toLowerCase()}async appDeepLink({id:n,organizationId:i}){return oe({id:n,organizationId:i})}async devSessionCreate({appId:n,assetsUrl:i,shopFqdn:a,websocketUrl:o,unsafeValidation:r}){let m=String(g(n));return this.appDevRequest({query:Vn,shopFqdn:a,variables:{appId:m,assetsUrl:i??"",websocketUrl:o,unsafeValidation:r??!1},requestOptions:{requestMode:"slow-request"}})}async devSessionUpdate({appId:n,assetsUrl:i,shopFqdn:a,manifest:o,inheritedModuleUids:r,unsafeValidation:m}){let l={appId:String(g(n)),assetsUrl:i,manifest:JSON.stringify(o),inheritedModuleUids:r,unsafeValidation:m??!1};return this.appDevRequest({query:In,shopFqdn:a,variables:l})}async devSessionDelete({appId:n,shopFqdn:i}){let a=String(g(n));return this.appDevRequest({query:xn,shopFqdn:i,variables:{appId:a}})}async getCreateDevStoreLink(n){let i=`https://${await me()}/dashboard/${n.id}/stores`;return[`Looks like you don't have any dev stores associated with ${n.businessName}'s Dev Dashboard.`,{link:{url:i,label:"Create a store in Dev Dashboard"}}]}async activeAppVersionRawResult(n){return this.appManagementRequest({query:Un,variables:{apiKey:n}})}async organizationBetaFlags(n,i){let a={organizationId:Di(n)},o=await Qe({query:pn(i),token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={};return i.forEach(m=>{r[m]=!!o.organization[`flag_${m}`]}),r}async organizationExpFlags(n,i){let a={organizationId:Di(n),flagHandles:i},o=await T({query:kn,token:await this.businessPlatformToken(),organizationId:n,variables:a,unauthorizedHandler:this.createUnauthorizedHandler()}),r={},m=o.organization?.enabledFlags??[];return i.forEach((d,l)=>{r[d]=!!m[l]}),r}async appManagementRequest(n){return gi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async appDevRequest(n){return Si({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async businessPlatformRequest(n){return A({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async businessPlatformOrganizationsRequest(n){return T({...n,token:await this.businessPlatformToken(),unauthorizedHandler:this.createUnauthorizedHandler("businessPlatform")})}async functionsRequest(n){return yi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}async webhooksRequest(n){return Fi({...n,token:await this.token(),unauthorizedHandler:this.createUnauthorizedHandler()})}createUnauthorizedHandler(n="default"){return xi(this,n)}},Za="https://shopify.dev/apps/default-app-home",Qa="https://shopify.dev/apps/default-app-home/api/auth";function Xa(e,n,i){let{isLaunchable:a,scopesArray:o,name:r}=e;return{initialVersion:{source:{source:{name:r,modules:[{type:Ne,config:{app_url:a?"https://example.com":Za,embedded:!0}},{type:Se,config:{name:r}},{type:be,config:{api_version:i}},{type:he,config:{redirect_url_allowlist:[a?"https://example.com/api/auth":Qa],...o&&{scopes:o.map(p=>p.trim()).join(",")}}}]}}.source},organizationId:Ie(n)}}function et(e){let n=e.startsWith("gid://")?g(e):Number(e);if(Number.isNaN(n))throw new Error(`Invalid organization ID: ${e}`);return`gid://organization/Organization/${n}`}function Di(e){return $(et(e))}function Ie(e){return`gid://shopify/Organization/${e.startsWith("gid://")?g(e):Number(e)}`}function nt(e){return $(`gid://organization/ShopifyShop/${e}`)}function it(e){let n=ae(e);if(n===void 0)throw new Error(`Invalid encoded GID: ${e}`);return n}function g(e){if(e.startsWith("gid://")){let n=x(e);if(n===void 0)throw new Error(`Invalid GID: ${e}`);return Number(n)}return Number(e)}async function oe({id:e,organizationId:n}){let i=g(n).toString();return`https://${await me()}/dashboard/${i}/apps/${g(e)}`}async function at(e,n,i){return`${await oe({organizationId:e,id:n})}/versions/${g(i)}`}function tt({currentModules:e,selectedVersionModules:n}){let i=e.map(l=>l.userIdentifier),a=n.map(l=>l.userIdentifier),o=n.filter(l=>!i.includes(l.userIdentifier)),r=e.filter(l=>!a.includes(l.userIdentifier)),m=r.map(l=>l.userIdentifier),d=e.filter(l=>!m.includes(l.userIdentifier));return{added:o,removed:r,updated:d}}async function ot(e,n,i,a=Ce){let o=C(e.flatMap(l=>l.organizationBetaFlags??[])),r=C(e.flatMap(l=>l.organizationExpFlags??[])),[m,d]=await Promise.all([o.length>0?n(o):Promise.resolve({}),r.length>0?i(r):Promise.resolve({})]);return e.filter(l=>{let p=!l.organizationBetaFlags||l.organizationBetaFlags.every(f=>m[f]),k=!l.organizationExpFlags||l.organizationExpFlags.every(f=>d[f]),u=!l.minimumCliVersion||ce(a,`>=${l.minimumCliVersion}`),v=!l.deprecatedFromCliVersion||ce(a,`<${l.deprecatedFromCliVersion}`),N=u&&v,z=Xe(a)&&l.deprecatedFromCliVersion===void 0;return p&&k&&(N||z)})}function xe(e,n){if(n===Fe)return"configuration";switch(e){case"extension":case"configuration":case"deprecated":return e;default:return ke(`Unknown specification experience value "${e}", defaulting to "extension"`),"extension"}}function rt(e){switch(e){case"UidStrategiesDynamic":return"dynamic";case"UidStrategiesStatic":return"single";case"UidStrategiesClientProvided":return"uuid";default:return"uuid"}}function Ai(e,n){return e.map(i=>{let{externalId:a,primaryDomain:o,name:r,url:m,storeType:d}=i,l=m??o;if(!l)throw new D("The selected store does not have a valid URL");return{shopId:a?it(a):void 0,link:o,shopDomain:E(l),shopName:r,transferDisabled:!0,convertableToPartnerTest:!0,provisionable:n,storeType:d}})}function Ti(e){return{registrationId:e.userIdentifier===e.uuid?"":e.userIdentifier,registrationUuid:e.uuid,handle:e.handle,type:e.specification.externalIdentifier,config:e.config,target:e.target??"",specification:{...e.specification,identifier:e.specification.identifier,options:{managementExperience:e.specification.managementExperience},experience:xe(e.specification.experience,e.specification.externalIdentifier)}}}var st=async({organizationId:e,jwtToken:n,cursor:i,filters:a})=>{let o=await vi(e,i,a),r=we(n);return le(o,{method:"GET",headers:r})};function wi(e){let n=[],i=e.on[0]?.user_identifier;return i&&n.push({extension_id:i}),{...e,details:n}}function dt(e){return[{field:"STORE_TYPE",operator:"EQUALS",value:e.toLowerCase()},{field:"STORE_STATUS",operator:"EQUALS",value:"ACTIVE"}]}function Vi(e){return e.includes("ondemand_access_to_stores")}var se;(function(e){e.AppManagement="app-management",e.Partners="partners"})(se||(se={}));function vn(){return re.getInstance()}var Ri;Ri||(Ri={});var lt={};function Ii(e=[]){let n=[],i=e.map(a=>lt[a]);return n.filter(a=>!i.includes(a))}var Re=new WeakMap;function xi(e,n="default"){return{type:"token_refresh",handler:async()=>{let i=Re.get(e);if(i)await i;else try{i=e.unsafeRefreshToken(),Re.set(e,i),await i}finally{Re.delete(e)}let a=await e.session();return{token:n==="businessPlatform"?a.businessPlatformToken:a.token}}}}export{I as a,ie as b,x as c,ae as d,H as e,Ia as f,_e as g,De as h,Ra as i,za as j,R as k,B as l,te as m,Te as n,Pa as o,Oa as p,La as q,Ma as r,fn as s,Ei as t,Rt as u,zt as v,gn as w,Ct as x,Et as y,mt as z,un as A,ut as B,Ci as C,ct as D,Nn as E,Sn as F,Ui as G,Mt as H,$t as I,ji as J,X as K,Ht as L,b as M,Bt as N,V as O,ee as P,Zi as Q,_n as R,ia as S,Dn as T,An as U,S as V,So as W,Fe as X,vs as Y,M as Z,Zn as _,ii as $,ya as aa,ti as ba,O as ca,Q as da,Ne as ea,Ao as fa,Se as ga,Ro as ha,ca as ia,pa as ja,he as ka,Lo as la,be as ma,ts as na,et as oa,se as pa,vn as qa,xi as ra,fe as sa,w as ta,_t as ua,Dt as va,At as wa};
@@ -1,4 +0,0 @@
1
- import{a as B,b as H}from"./chunk-VXD26GIG.js";import{b as N,c as k}from"./chunk-QX3T6G5X.js";import{c as Y,e as q}from"./chunk-MZCIRMZJ.js";import{B as I,m as J,t as M,u as _,v,z as F}from"./chunk-2M535QQJ.js";import{q as P,s as b}from"./chunk-J3UXIC23.js";import{a as c}from"./chunk-MHWETFNT.js";import{A as T,X as V}from"./chunk-V654BMS7.js";import{a as A}from"./chunk-BN7ZXAZJ.js";import{h as S}from"./chunk-J7BTC45S.js";import{Bb as l,Cb as W,ib as E,lb as C,mb as O,qb as p,sb as u,wb as G,yb as h}from"./chunk-RIG66DIQ.js";import{b as n}from"./chunk-FZCGRIOM.js";import{d as j}from"./chunk-GSGCSBRN.js";import{g as L,o as R,p as D,q as x}from"./chunk-IWTNUJGY.js";import{a as oe}from"./chunk-CX5CC6P5.js";import{e as ne,g as d}from"./chunk-VKWPEFWQ.js";d();d();d();import{resolve as te}from"node:path";var z=A({name:"UpgradeResult",schema:n.union([n.object({status:n.literal("success"),changed:n.boolean().describe("Whether the verified installed version differs from previousVersion."),scope:n.literal("global"),previousVersion:n.string().min(1),version:n.string().min(1),packageManager:n.enum(["npm","pnpm","yarn","bun","homebrew"])}).strict(),n.object({status:n.literal("success"),changed:n.null().describe("Null because local dependency changes and installed versions are not verified."),scope:n.literal("local"),directory:n.string().refine(L,"Must be an absolute filesystem path.").transform(e=>te(e)),previousVersion:n.string().min(1),availableVersion:n.string().min(1).nullable().describe("The available registry version, or null when unknown."),packages:n.array(n.string().min(1))}).strict(),n.object({status:n.literal("skipped"),reason:n.enum(["development","local-autoupgrade","dependency-not-found"]),scope:n.enum(["global","local"])}).strict()])});function K(e,o){o==="json"?G(z.encode(e)):e.status==="success"&&e.scope==="global"&&T({headline:"Shopify CLI upgraded.",body:`You're now on version ${e.version}.`})}var X=ne(oe(),1);function Z(){let e=C();if(!(!e||e==="unknown"))return e==="homebrew"?"brew upgrade shopify-cli":e==="yarn"?`${e} global add @shopify/cli@latest`:`${e} ${e==="pnpm"?"add":"install"} -g @shopify/cli@latest`}async function Ee(e={}){K(await re(e),"text")}async function re(e={}){let o=x()??D(),r=O(o),i=E();if(j())return h("Skipping upgrade in development mode."),{status:"skipped",reason:"development",scope:i?"global":"local"};if(e.autoupgrade&&!i)return{status:"skipped",reason:"local-autoupgrade",scope:"local"};if(i){let s=C(),a=Z();if(!a||s==="unknown")throw new Error("Could not determine the package manager");let[t,...g]=a.split(" ");if(!t)throw new Error("Could not determine the command to run");let f=v("@shopify/cli",c),y=f?`\u2728 New version of Shopify CLI available! (${c} \u2192 ${f})`:"\u2728 New version of Shopify CLI available!";h(u`${y}
2
- Now upgrading by running: ${p.genericShellCommand(a)}...`),await H(t,g);let m=await N();if(!m)throw new S("Couldn't verify the Shopify CLI version after upgrading.",u`Check the installed version by running ${p.genericShellCommand("shopify version")}.`);let $=f??c;if((0,X.lt)(m,$))throw new S(`Failed to upgrade Shopify CLI. Expected to be on version ${$}, but version ${m} is now installed.`,"Your package manager may be resolving @shopify/cli from a registry with outdated versions. Check your npm registry configuration and try again.");return{status:"success",changed:m!==c,scope:"global",previousVersion:c,version:m,packageManager:s}}else{if(r)return ie(r,c);throw new Error("Could not determine the local project directory")}}function Oe(){let e=c,o=v("@shopify/cli",e);if(!o){l("Auto-upgrade: No newer version available.");return}if(process.env.SHOPIFY_CLI_FORCE_AUTO_UPGRADE==="1")return l("Auto-upgrade: Forcing auto-upgrade because of SHOPIFY_CLI_FORCE_AUTO_UPGRADE."),o;if(!b()){l("Auto-upgrade: Skipping because auto-upgrade is not enabled.");return}if(V()){l("Auto-upgrade: Skipping auto-upgrade in CI.");return}if(k(e)){l("Auto-upgrade: Skipping auto-upgrade for pre-release version.");return}return o}async function Je(){try{let{notifications:e}=await Y();return q(e,"",["autoupgrade"]).some(r=>r.type==="error")}catch{return!1}}async function Me(){if(V()||k(c)||b())return;let e=v("@shopify/cli",c);e&&await P("warn-on-available-upgrade",{days:1},async()=>{W(ae(e))})}function ae(e,o=!1){let r=Z(),i=r?u`💡 Version ${e} available! Run ${p.genericShellCommand(r)}`.value:u`💡 Version ${e} available!`.value;if(o){let s=`https://github.com/Shopify/cli/releases/tag/${e}`,a=u`⚠️ This is a major version — review breaking changes before upgrading:\n ${p.link(s,s)}`.value;return`${i}
3
-
4
- ${a}`}return i}async function ie(e,o){let r=(await I(e)).content,i=r.dependencies??{},s=r.devDependencies??{},t={...i,...s}[await U()];if(!t)return l("Auto-upgrade: CLI dependency not found in project dependencies, skipping local upgrade."),{status:"skipped",reason:"dependency-not-found",scope:"local"};t.slice(0,1).match(/[\^~]/)&&(t=o);let g=await _(await U(),t);g?pe(t,g):ce(t);let f=await Q("prod",i,e),y=await Q("dev",s,e);return{status:"success",changed:null,scope:"local",directory:e,previousVersion:t,availableVersion:g??null,packages:[...new Set([...f,...y])]}}async function Q(e,o,r){let i=[await U(),...await se()].filter(a=>!!o[a]).map(a=>({name:a,version:"latest"})),s=await M(r);if(i.length>0){let a=await J(r),t=B();try{await F(i,{packageManager:a,type:e,directory:r,...t,addToRootDirectory:s})}finally{t.stdout!==process.stdout&&t.stdout.end(),t.stderr!==process.stderr&&t.stderr.end()}}return i.map(({name:a})=>a)}async function U(){return(await ee()).name}async function se(){return(await ee())?.oclif?.plugins??[]}var w;async function ee(){if(!w){let e=await I(R(import.meta.url));w=w??e.content}return w}function ce(e){h(u`You're on the latest version, ${p.yellow(e)}, no need to upgrade!`)}function pe(e,o){h(u`Upgrading CLI from ${p.yellow(e)} to ${p.yellow(o)}...`)}export{z as a,K as b,Z as c,Ee as d,re as e,Oe as f,Je as g,Me as h,ae as i};
@@ -1 +0,0 @@
1
- import{a as K,b as _,c as z,d as N,e as f,f as d,g as W,h as G,j as H}from"./chunk-DM7BTMFP.js";import{a as x}from"./chunk-EA5XVQJT.js";import{b as S,c as j}from"./chunk-ACA2BGAD.js";import{a as R}from"./chunk-NPB753M3.js";import{a as P}from"./chunk-D4LFWIFE.js";import{Ma as J,da as L}from"./chunk-XV6XCOTG.js";import{Ea as A,ta as U}from"./chunk-NCPZVARH.js";import{b as D,c as v}from"./chunk-5AWELO3D.js";import{A as F}from"./chunk-V654BMS7.js";import{a as C}from"./chunk-BN7ZXAZJ.js";import{j as O,m as k,n as M}from"./chunk-J7BTC45S.js";import{wb as s,xb as g}from"./chunk-RIG66DIQ.js";import{b as t}from"./chunk-FZCGRIOM.js";import{b as $}from"./chunk-YTUUU33R.js";import{g as T}from"./chunk-IWTNUJGY.js";import{e as Z,g as m}from"./chunk-VKWPEFWQ.js";m();m();var B=t.string().refine(T,"Expected an absolute native filesystem path"),Y=t.object({id:t.string().uuid().describe("The dashboard extension registration UUID, not a Shopify GID."),name:t.string(),type:t.string().min(1).describe("The upstream dashboard extension type."),directory:B.describe("The absolute local extension directory."),configurationPath:B.nullable().describe("The absolute local TOML path, or null when no TOML file exists in a kept directory."),changed:t.boolean().describe("Whether this import wrote the local extension TOML.")}).strict(),q=t.object({extensionId:t.string().uuid().nullable().describe("The registration UUID, or null for identifier persistence."),error:S}).strict(),n=C({name:"ImportDashboardExtensionsResult",schema:t.object({status:t.enum(["success","partial","skipped","cancelled"]),reason:t.enum(["no-extensions","directory-selection-cancelled"]).nullable(),extensions:t.array(Y).describe("Completed extension imports and kept local directories, in selection order."),errors:t.array(q).describe("Failed selected imports or identifier persistence."),identifiersUpdated:t.boolean().describe("Whether the extension identifier persistence step completed.")}).strict(),definitions:{ImportedDashboardExtension:Y,ExtensionImportFailure:q,...j.definitions}});var Q=Z($(),1);var E=class u extends R{static descriptionWithMarkdown="Import dashboard-managed extensions into your app.";static get jsonOutputSchema(){return n}static description=this.descriptionForHelp();static flags={...D,...P,...v,"client-id":Q.Flags.string({hidden:!1,description:"The Client ID of your app.",env:"SHOPIFY_FLAG_CLIENT_ID",exclusive:["config"]})};async run(){let{flags:o}=await this.parse(u),r=await J({directory:o.path,clientId:o["client-id"],forceRelink:o.reset,userProvidedConfigName:o.config}),a=await H({developerPlatformClient:r.developerPlatformClient,apiKey:r.remoteApp.apiKey,organizationId:r.remoteApp.organizationId,extensionTypes:N}),l=_(o.json?G(r.app,a):a);if(l.length===0)o.json?s(n.encode({status:"skipped",reason:"no-extensions",extensions:[],errors:[],identifiersUpdated:!1})):F({headline:["No extensions to migrate."]});else{let y=await z(l),i;try{if(i=await W({...r,extensions:a,extensionTypes:y.extensionTypes,buildExtensionConfig:y.buildExtensionConfig}),o.json&&i.status==="skipped")return s(n.encode({status:i.status,reason:i.reason,extensions:[],errors:[],identifiersUpdated:!1})),{app:r.app};o.json||K(i),await L({app:r.app,appApiKey:r.remoteApp.apiKey,extensionUuids:i.extensionUuids,command:"import-extensions"})}catch(e){if(!o.json)throw e instanceof d?e.originalError:e;let I=e instanceof d?e.originalError:e;if(e instanceof f||e instanceof d){let p=await e.completedImports();if(e instanceof d&&p.extensions.length===0)throw e.originalError;let h=e instanceof f&&p.failures.length===0;if(s(n.encode({status:h?"cancelled":"partial",reason:h?"directory-selection-cancelled":null,extensions:b(p.extensions),errors:p.failures.map(({extension:V,error:X})=>({extensionId:V.uuid,error:x(X)})),identifiersUpdated:!1})),h)throw await g(),e;e instanceof f&&(I=p.failures[0].error)}else if(i)s(n.encode({status:"partial",reason:null,extensions:b(i.extensions),errors:[{extensionId:null,error:x(e)}],identifiersUpdated:!1}));else throw e;let c=await k(I),w=M(c)?"unexpected_error":"expected_error";throw await U({config:this.config,errorMessage:c instanceof Error?c.message:void 0,exitMode:w}),await A(c,w),await g(),new O}o.json&&s(n.encode({status:"success",reason:null,extensions:b(i.extensions),errors:[],identifiersUpdated:!0}))}return{app:r.app}}};function b(u){return u.map(({extension:o,directory:r,configurationPath:a,changed:l})=>({id:o.uuid,name:o.title,type:o.type,directory:r,configurationPath:a,changed:l}))}export{E as a};
@@ -1 +0,0 @@
1
- import{c as b}from"./chunk-LENSEW2F.js";import{e as f,g as h,h as g,s as y}from"./chunk-FNWXMCSD.js";import{a as m}from"./chunk-NPB753M3.js";import{Ma as u}from"./chunk-XV6XCOTG.js";import{c as l}from"./chunk-5AWELO3D.js";import{h as d}from"./chunk-J7BTC45S.js";import{g as n}from"./chunk-VKWPEFWQ.js";n();n();var s=class extends Error{operationId;constructor(t){super(`Migration cancellation for ${t} returned neither an operation nor user errors`),this.name="MigrationCancellationProtocolError",this.operationId=t}};async function w({clientId:o,operationIds:t,cancelOperation:a=y}){let r=t.filter(e=>!h.safeParse(e).success);if(r.length>0)throw new d(`Invalid subscription migration operation IDs: ${r.join(", ")}.`,"Use Shopify AppSubscriptionMigrationOperation GIDs returned by a migration submission.");return{outcomes:await Promise.all(t.map(async e=>{try{let i=await a({clientId:o,operationId:e});if(i.userErrors.length>0)return{status:"failed",operationId:e,operation:i.operation,userErrors:i.userErrors};if(!i.operation)throw new s(e);return{status:"success",operationId:e,operation:i.operation}}catch(i){if(t.length===1)throw i;return{status:"failed",operationId:e,operation:null,error:i}}}))}}var p=class o extends m{static summary="Cancels app subscription migration operations.";static descriptionWithMarkdown="Cancels app subscription migration operations.\n\nCanceling stops additional unprocessed shops, but does not undo shops that have already been scheduled or migrated. Use `unschedule` for reversible schedules.\n\nRepeat `--id` to cancel every operation GID returned by a multi-batch submission. Use `--json` to output the resulting operation states and per-shop results as structured JSON.\n\nRun the command from an app project. By default, it uses the Client ID from the active app configuration. Use `--path` to select an app directory or `--config` to select a configuration. Pass `--client-id` to select a different app within the project. Use `--reset` to relink the app.";static description=this.descriptionForHelp();static examples=["<%= config.bin %> <%= command.id %> --id <operation-id>","<%= config.bin %> <%= command.id %> --path ../my-app --config staging --id <operation-id-1> --id <operation-id-2>","<%= config.bin %> <%= command.id %> --client-id <client-id> --id <operation-id> --json"];static flags={...f,...l};static get jsonOutputSchema(){return g}async run(){let{flags:t}=await this.parse(o),{app:a,remoteApp:r}=await u({directory:t.path,clientId:t["client-id"],forceRelink:t.reset,userProvidedConfigName:t.config}),c=await w({clientId:r.apiKey,operationIds:t.id}),e=b(c,{json:t.json});return e!==0&&(process.exitCode=e),{app:a}}};export{p as a};
@@ -1 +0,0 @@
1
- import{e as c}from"./chunk-5XOEMYEQ.js";import{S as s}from"./chunk-NCPZVARH.js";import{h as p,k as a}from"./chunk-J7BTC45S.js";import{g as i}from"./chunk-VKWPEFWQ.js";i();async function v(e,t){let o=e.apiSecretKeys[0]?.secret;if(!o)throw new a("No API secret keys found for app");return s(t,e.apiKey,o)}function y(e){let{organization:t,remoteApp:o,storeFqdn:u,version:r}=e,n=[`Organization: ${t.businessName}`,`App: ${o.title}`,`Store: ${u}`];return r&&n.push(`API version: ${r}`),n}function S(e,t){if(c(e)&&t.storeType!=="APP_DEVELOPMENT")throw new p("Mutations can only be executed on dev stores.")}export{v as a,y as b,S as c};
@@ -1,6 +0,0 @@
1
- import{b as R,c as p}from"./chunk-BAHIL37I.js";import{b as v}from"./chunk-OLKLHVHA.js";import{k as y}from"./chunk-NCPZVARH.js";import{b as g,c as w}from"./chunk-5AWELO3D.js";import{h as i}from"./chunk-J7BTC45S.js";import{wb as m}from"./chunk-RIG66DIQ.js";import{b as d}from"./chunk-FZCGRIOM.js";import{b as I}from"./chunk-YTUUU33R.js";import{e as P,g as s}from"./chunk-VKWPEFWQ.js";s();s();var O="https://shopify.dev/assistant/search",_="X-Shopify-Surface",j="cli",D=d.array(R.strip().extend({domain:d.string().nullish()}));async function x(t,e,c){let h=new URLSearchParams({query:t});e&&h.append("api_name",e),c&&h.append("api_version",c);let a;try{a=await y(`${O}?${h.toString()}`,{headers:{Accept:"application/json",[_]:j}})}catch{throw new i("Could not reach shopify.dev to run the search.","Check your network connection and try again.")}let n=await a.text();if(!a.ok){let r=`${a.status} ${a.statusText}`;try{let o=JSON.parse(n);o?.error&&(r=o.error)}catch(o){if(!(o instanceof SyntaxError))throw o}throw new i(`Search failed: ${r}`)}let l;try{l=JSON.parse(n)}catch(r){if(!(r instanceof SyntaxError))throw r;return{status:"invalid-response",body:n}}let S=D.safeParse(l);return S.success?{status:"success",results:S.data.map(({score:r,content:o,url:b,title:E,domain:F})=>({score:r,content:o,url:b,title:E,domain:F??null})),pageInfo:{hasNextPage:null},body:n}:{status:"invalid-response",body:n}}s();function A(t,e){if(e==="text"){m(t.body);return}if(t.status==="invalid-response")throw new i("Search returned an invalid documentation response.");m(p.encode({results:t.results,pageInfo:t.pageInfo}))}var u=P(I(),1),f=class t extends v{static descriptionWithMarkdown="Query the shopify.dev vector store and print the most relevant documentation chunks as JSON. Best for programmatic discovery \u2014 surfacing the relevant pieces of documentation for a topic, rather than retrieving a whole document. To download a full document verbatim, use `doc fetch`.";static description=this.descriptionForHelp();static examples=[`# search shopify.dev for a topic
2
- shopify doc search --query "subscribe to webhooks"
3
-
4
- # narrow the search to a specific API and version
5
- shopify doc search --query "create a product" --api-name admin --api-version latest`,`# return typed documentation results as a JSON object
6
- shopify doc search --query "subscribe to webhooks" --json`];static flags={...g,...w,query:u.Flags.string({description:"The search query.",env:"SHOPIFY_FLAG_QUERY",required:!0}),"api-name":u.Flags.string({description:"Limit results to a specific API (for example: admin, storefront, hydrogen, functions). Unrecognized values are ignored.",env:"SHOPIFY_FLAG_API_NAME"}),"api-version":u.Flags.string({description:"Limit results to a specific API version (for example: 2025-10, latest, current).",env:"SHOPIFY_FLAG_API_VERSION"})};static get jsonOutputSchema(){return p}async run(){let{flags:e}=await this.parse(t),c=await x(e.query,e["api-name"],e["api-version"]);A(c,e.json?"json":"text")}};export{f as a};