shop-cli 0.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 (340) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +392 -0
  3. package/bin/shop-cli.js +17 -0
  4. package/bin/shop.js +16 -0
  5. package/dist/adminClient.d.ts +34 -0
  6. package/dist/adminClient.js +144 -0
  7. package/dist/cli/client.d.ts +10 -0
  8. package/dist/cli/client.js +56 -0
  9. package/dist/cli/command.d.ts +5 -0
  10. package/dist/cli/command.js +62 -0
  11. package/dist/cli/errors.d.ts +4 -0
  12. package/dist/cli/errors.js +35 -0
  13. package/dist/cli/gid.d.ts +3 -0
  14. package/dist/cli/gid.js +42 -0
  15. package/dist/cli/globalFlags.d.ts +15 -0
  16. package/dist/cli/globalFlags.js +100 -0
  17. package/dist/cli/headers.d.ts +2 -0
  18. package/dist/cli/headers.js +79 -0
  19. package/dist/cli/help/format.d.ts +8 -0
  20. package/dist/cli/help/format.js +78 -0
  21. package/dist/cli/help/registry.d.ts +5 -0
  22. package/dist/cli/help/registry.js +5651 -0
  23. package/dist/cli/help/render.d.ts +7 -0
  24. package/dist/cli/help/render.js +352 -0
  25. package/dist/cli/help/spec.d.ts +39 -0
  26. package/dist/cli/help/spec.js +17 -0
  27. package/dist/cli/input.d.ts +9 -0
  28. package/dist/cli/input.js +104 -0
  29. package/dist/cli/introspection/deprecations.d.ts +1 -0
  30. package/dist/cli/introspection/deprecations.js +83 -0
  31. package/dist/cli/introspection/format.d.ts +6 -0
  32. package/dist/cli/introspection/format.js +63 -0
  33. package/dist/cli/introspection/index.d.ts +14 -0
  34. package/dist/cli/introspection/index.js +89 -0
  35. package/dist/cli/introspection/resources.d.ts +1 -0
  36. package/dist/cli/introspection/resources.js +127 -0
  37. package/dist/cli/output/computedFields.d.ts +39 -0
  38. package/dist/cli/output/computedFields.js +104 -0
  39. package/dist/cli/output.d.ts +37 -0
  40. package/dist/cli/output.js +332 -0
  41. package/dist/cli/router.d.ts +29 -0
  42. package/dist/cli/router.js +480 -0
  43. package/dist/cli/selection/buildAllSelection.d.ts +13 -0
  44. package/dist/cli/selection/buildAllSelection.js +108 -0
  45. package/dist/cli/selection/graphqlSelection.d.ts +5 -0
  46. package/dist/cli/selection/graphqlSelection.js +301 -0
  47. package/dist/cli/selection/select.d.ts +13 -0
  48. package/dist/cli/selection/select.js +136 -0
  49. package/dist/cli/selection/stripDeprecated.d.ts +2 -0
  50. package/dist/cli/selection/stripDeprecated.js +63 -0
  51. package/dist/cli/userErrors.d.ts +4 -0
  52. package/dist/cli/userErrors.js +41 -0
  53. package/dist/cli/verbs/_shared.d.ts +38 -0
  54. package/dist/cli/verbs/_shared.js +180 -0
  55. package/dist/cli/verbs/abandoned-checkouts.d.ts +6 -0
  56. package/dist/cli/verbs/abandoned-checkouts.js +259 -0
  57. package/dist/cli/verbs/app-billing.d.ts +6 -0
  58. package/dist/cli/verbs/app-billing.js +452 -0
  59. package/dist/cli/verbs/apps.d.ts +6 -0
  60. package/dist/cli/verbs/apps.js +296 -0
  61. package/dist/cli/verbs/articles.d.ts +6 -0
  62. package/dist/cli/verbs/articles.js +251 -0
  63. package/dist/cli/verbs/backup.d.ts +6 -0
  64. package/dist/cli/verbs/backup.js +94 -0
  65. package/dist/cli/verbs/blogs.d.ts +6 -0
  66. package/dist/cli/verbs/blogs.js +273 -0
  67. package/dist/cli/verbs/bulk-operations.d.ts +6 -0
  68. package/dist/cli/verbs/bulk-operations.js +272 -0
  69. package/dist/cli/verbs/business-entities.d.ts +6 -0
  70. package/dist/cli/verbs/business-entities.js +102 -0
  71. package/dist/cli/verbs/carrier-services.d.ts +6 -0
  72. package/dist/cli/verbs/carrier-services.js +195 -0
  73. package/dist/cli/verbs/cart-transforms.d.ts +6 -0
  74. package/dist/cli/verbs/cart-transforms.js +141 -0
  75. package/dist/cli/verbs/cash-tracking.d.ts +6 -0
  76. package/dist/cli/verbs/cash-tracking.js +118 -0
  77. package/dist/cli/verbs/catalogs.d.ts +6 -0
  78. package/dist/cli/verbs/catalogs.js +267 -0
  79. package/dist/cli/verbs/channels.d.ts +6 -0
  80. package/dist/cli/verbs/channels.js +120 -0
  81. package/dist/cli/verbs/checkout-branding.d.ts +6 -0
  82. package/dist/cli/verbs/checkout-branding.js +144 -0
  83. package/dist/cli/verbs/checkout-profiles.d.ts +6 -0
  84. package/dist/cli/verbs/checkout-profiles.js +124 -0
  85. package/dist/cli/verbs/collections.d.ts +6 -0
  86. package/dist/cli/verbs/collections.js +485 -0
  87. package/dist/cli/verbs/comments.d.ts +6 -0
  88. package/dist/cli/verbs/comments.js +160 -0
  89. package/dist/cli/verbs/companies.d.ts +6 -0
  90. package/dist/cli/verbs/companies.js +313 -0
  91. package/dist/cli/verbs/company-contacts.d.ts +6 -0
  92. package/dist/cli/verbs/company-contacts.js +314 -0
  93. package/dist/cli/verbs/company-locations.d.ts +6 -0
  94. package/dist/cli/verbs/company-locations.js +467 -0
  95. package/dist/cli/verbs/customer-account-pages.d.ts +6 -0
  96. package/dist/cli/verbs/customer-account-pages.js +97 -0
  97. package/dist/cli/verbs/customer-payment-methods.d.ts +6 -0
  98. package/dist/cli/verbs/customer-payment-methods.js +358 -0
  99. package/dist/cli/verbs/customer-privacy.d.ts +6 -0
  100. package/dist/cli/verbs/customer-privacy.js +167 -0
  101. package/dist/cli/verbs/customer-segments.d.ts +6 -0
  102. package/dist/cli/verbs/customer-segments.js +193 -0
  103. package/dist/cli/verbs/customers.d.ts +6 -0
  104. package/dist/cli/verbs/customers.js +656 -0
  105. package/dist/cli/verbs/delegate-tokens.d.ts +6 -0
  106. package/dist/cli/verbs/delegate-tokens.js +95 -0
  107. package/dist/cli/verbs/delivery-customizations.d.ts +6 -0
  108. package/dist/cli/verbs/delivery-customizations.js +205 -0
  109. package/dist/cli/verbs/delivery-profile-locations.d.ts +6 -0
  110. package/dist/cli/verbs/delivery-profile-locations.js +90 -0
  111. package/dist/cli/verbs/delivery-profiles.d.ts +6 -0
  112. package/dist/cli/verbs/delivery-profiles.js +207 -0
  113. package/dist/cli/verbs/delivery-promises.d.ts +6 -0
  114. package/dist/cli/verbs/delivery-promises.js +262 -0
  115. package/dist/cli/verbs/delivery-settings.d.ts +6 -0
  116. package/dist/cli/verbs/delivery-settings.js +85 -0
  117. package/dist/cli/verbs/discount-nodes.d.ts +6 -0
  118. package/dist/cli/verbs/discount-nodes.js +169 -0
  119. package/dist/cli/verbs/discount-redeem-codes.d.ts +6 -0
  120. package/dist/cli/verbs/discount-redeem-codes.js +102 -0
  121. package/dist/cli/verbs/discount-saved-searches.d.ts +6 -0
  122. package/dist/cli/verbs/discount-saved-searches.js +113 -0
  123. package/dist/cli/verbs/discounts-automatic.d.ts +6 -0
  124. package/dist/cli/verbs/discounts-automatic.js +475 -0
  125. package/dist/cli/verbs/discounts-code.d.ts +6 -0
  126. package/dist/cli/verbs/discounts-code.js +523 -0
  127. package/dist/cli/verbs/disputes.d.ts +6 -0
  128. package/dist/cli/verbs/disputes.js +154 -0
  129. package/dist/cli/verbs/draft-orders.d.ts +6 -0
  130. package/dist/cli/verbs/draft-orders.js +429 -0
  131. package/dist/cli/verbs/events.d.ts +6 -0
  132. package/dist/cli/verbs/events.js +182 -0
  133. package/dist/cli/verbs/file-saved-searches.d.ts +6 -0
  134. package/dist/cli/verbs/file-saved-searches.js +83 -0
  135. package/dist/cli/verbs/files.d.ts +6 -0
  136. package/dist/cli/verbs/files.js +213 -0
  137. package/dist/cli/verbs/finance.d.ts +6 -0
  138. package/dist/cli/verbs/finance.js +115 -0
  139. package/dist/cli/verbs/flow.d.ts +6 -0
  140. package/dist/cli/verbs/flow.js +94 -0
  141. package/dist/cli/verbs/fulfillment-constraint-rules.d.ts +6 -0
  142. package/dist/cli/verbs/fulfillment-constraint-rules.js +139 -0
  143. package/dist/cli/verbs/fulfillment-orders.d.ts +6 -0
  144. package/dist/cli/verbs/fulfillment-orders.js +674 -0
  145. package/dist/cli/verbs/fulfillment-services.d.ts +6 -0
  146. package/dist/cli/verbs/fulfillment-services.js +212 -0
  147. package/dist/cli/verbs/fulfillments.d.ts +6 -0
  148. package/dist/cli/verbs/fulfillments.js +273 -0
  149. package/dist/cli/verbs/gift-cards.d.ts +6 -0
  150. package/dist/cli/verbs/gift-cards.js +359 -0
  151. package/dist/cli/verbs/graphql.d.ts +14 -0
  152. package/dist/cli/verbs/graphql.js +285 -0
  153. package/dist/cli/verbs/inventory-items.d.ts +6 -0
  154. package/dist/cli/verbs/inventory-items.js +164 -0
  155. package/dist/cli/verbs/inventory-shipments.d.ts +6 -0
  156. package/dist/cli/verbs/inventory-shipments.js +276 -0
  157. package/dist/cli/verbs/inventory-transfers.d.ts +6 -0
  158. package/dist/cli/verbs/inventory-transfers.js +396 -0
  159. package/dist/cli/verbs/inventory.d.ts +6 -0
  160. package/dist/cli/verbs/inventory.js +551 -0
  161. package/dist/cli/verbs/locales.d.ts +6 -0
  162. package/dist/cli/verbs/locales.js +61 -0
  163. package/dist/cli/verbs/locations.d.ts +6 -0
  164. package/dist/cli/verbs/locations.js +385 -0
  165. package/dist/cli/verbs/market-localizations.d.ts +6 -0
  166. package/dist/cli/verbs/market-localizations.js +291 -0
  167. package/dist/cli/verbs/market-web-presences.d.ts +6 -0
  168. package/dist/cli/verbs/market-web-presences.js +139 -0
  169. package/dist/cli/verbs/marketing-activities.d.ts +6 -0
  170. package/dist/cli/verbs/marketing-activities.js +353 -0
  171. package/dist/cli/verbs/marketing-events.d.ts +6 -0
  172. package/dist/cli/verbs/marketing-events.js +132 -0
  173. package/dist/cli/verbs/markets.d.ts +6 -0
  174. package/dist/cli/verbs/markets.js +324 -0
  175. package/dist/cli/verbs/menus.d.ts +6 -0
  176. package/dist/cli/verbs/menus.js +251 -0
  177. package/dist/cli/verbs/metafield-definition-tools.d.ts +6 -0
  178. package/dist/cli/verbs/metafield-definition-tools.js +289 -0
  179. package/dist/cli/verbs/metafield-definitions.d.ts +6 -0
  180. package/dist/cli/verbs/metafield-definitions.js +240 -0
  181. package/dist/cli/verbs/metafields.d.ts +6 -0
  182. package/dist/cli/verbs/metafields.js +112 -0
  183. package/dist/cli/verbs/metaobject-definition-tools.d.ts +6 -0
  184. package/dist/cli/verbs/metaobject-definition-tools.js +83 -0
  185. package/dist/cli/verbs/metaobject-definitions.d.ts +6 -0
  186. package/dist/cli/verbs/metaobject-definitions.js +176 -0
  187. package/dist/cli/verbs/metaobjects.d.ts +6 -0
  188. package/dist/cli/verbs/metaobjects.js +297 -0
  189. package/dist/cli/verbs/mobile-platform-applications.d.ts +6 -0
  190. package/dist/cli/verbs/mobile-platform-applications.js +247 -0
  191. package/dist/cli/verbs/order-edit.d.ts +6 -0
  192. package/dist/cli/verbs/order-edit.js +596 -0
  193. package/dist/cli/verbs/orders.d.ts +6 -0
  194. package/dist/cli/verbs/orders.js +781 -0
  195. package/dist/cli/verbs/pages.d.ts +6 -0
  196. package/dist/cli/verbs/pages.js +234 -0
  197. package/dist/cli/verbs/payment-customizations.d.ts +6 -0
  198. package/dist/cli/verbs/payment-customizations.js +193 -0
  199. package/dist/cli/verbs/payment-terms.d.ts +6 -0
  200. package/dist/cli/verbs/payment-terms.js +228 -0
  201. package/dist/cli/verbs/point-of-sale.d.ts +6 -0
  202. package/dist/cli/verbs/point-of-sale.js +57 -0
  203. package/dist/cli/verbs/price-lists.d.ts +6 -0
  204. package/dist/cli/verbs/price-lists.js +426 -0
  205. package/dist/cli/verbs/product-feeds.d.ts +6 -0
  206. package/dist/cli/verbs/product-feeds.js +187 -0
  207. package/dist/cli/verbs/product-variants.d.ts +6 -0
  208. package/dist/cli/verbs/product-variants.js +388 -0
  209. package/dist/cli/verbs/products.d.ts +6 -0
  210. package/dist/cli/verbs/products.js +1257 -0
  211. package/dist/cli/verbs/publications.d.ts +6 -0
  212. package/dist/cli/verbs/publications.js +256 -0
  213. package/dist/cli/verbs/publishables.d.ts +6 -0
  214. package/dist/cli/verbs/publishables.js +73 -0
  215. package/dist/cli/verbs/refunds.d.ts +6 -0
  216. package/dist/cli/verbs/refunds.js +226 -0
  217. package/dist/cli/verbs/resource-feedback.d.ts +6 -0
  218. package/dist/cli/verbs/resource-feedback.js +119 -0
  219. package/dist/cli/verbs/returnable-fulfillments.d.ts +6 -0
  220. package/dist/cli/verbs/returnable-fulfillments.js +102 -0
  221. package/dist/cli/verbs/returns.d.ts +6 -0
  222. package/dist/cli/verbs/returns.js +506 -0
  223. package/dist/cli/verbs/reverse-deliveries.d.ts +6 -0
  224. package/dist/cli/verbs/reverse-deliveries.js +203 -0
  225. package/dist/cli/verbs/reverse-fulfillment-orders.d.ts +6 -0
  226. package/dist/cli/verbs/reverse-fulfillment-orders.js +157 -0
  227. package/dist/cli/verbs/saved-searches.d.ts +6 -0
  228. package/dist/cli/verbs/saved-searches.js +150 -0
  229. package/dist/cli/verbs/script-tags.d.ts +6 -0
  230. package/dist/cli/verbs/script-tags.js +179 -0
  231. package/dist/cli/verbs/segments.d.ts +6 -0
  232. package/dist/cli/verbs/segments.js +343 -0
  233. package/dist/cli/verbs/selling-plan-group-products.d.ts +6 -0
  234. package/dist/cli/verbs/selling-plan-group-products.js +115 -0
  235. package/dist/cli/verbs/selling-plan-groups.d.ts +6 -0
  236. package/dist/cli/verbs/selling-plan-groups.js +208 -0
  237. package/dist/cli/verbs/server-pixels.d.ts +6 -0
  238. package/dist/cli/verbs/server-pixels.js +172 -0
  239. package/dist/cli/verbs/shipping-packages.d.ts +6 -0
  240. package/dist/cli/verbs/shipping-packages.js +107 -0
  241. package/dist/cli/verbs/shop-policies.d.ts +6 -0
  242. package/dist/cli/verbs/shop-policies.js +91 -0
  243. package/dist/cli/verbs/shop-utils.d.ts +6 -0
  244. package/dist/cli/verbs/shop-utils.js +147 -0
  245. package/dist/cli/verbs/shop.d.ts +6 -0
  246. package/dist/cli/verbs/shop.js +177 -0
  247. package/dist/cli/verbs/shopify-functions.d.ts +6 -0
  248. package/dist/cli/verbs/shopify-functions.js +127 -0
  249. package/dist/cli/verbs/shopify-payments.d.ts +6 -0
  250. package/dist/cli/verbs/shopify-payments.js +111 -0
  251. package/dist/cli/verbs/staff.d.ts +6 -0
  252. package/dist/cli/verbs/staff.js +127 -0
  253. package/dist/cli/verbs/staged-uploads.d.ts +6 -0
  254. package/dist/cli/verbs/staged-uploads.js +128 -0
  255. package/dist/cli/verbs/store-credit.d.ts +6 -0
  256. package/dist/cli/verbs/store-credit.js +209 -0
  257. package/dist/cli/verbs/storefront-access-tokens.d.ts +6 -0
  258. package/dist/cli/verbs/storefront-access-tokens.js +183 -0
  259. package/dist/cli/verbs/subscription-billing-cycles.d.ts +6 -0
  260. package/dist/cli/verbs/subscription-billing-cycles.js +391 -0
  261. package/dist/cli/verbs/subscription-billing.d.ts +6 -0
  262. package/dist/cli/verbs/subscription-billing.js +391 -0
  263. package/dist/cli/verbs/subscription-contracts.d.ts +6 -0
  264. package/dist/cli/verbs/subscription-contracts.js +391 -0
  265. package/dist/cli/verbs/subscription-drafts.d.ts +6 -0
  266. package/dist/cli/verbs/subscription-drafts.js +315 -0
  267. package/dist/cli/verbs/tags.d.ts +6 -0
  268. package/dist/cli/verbs/tags.js +73 -0
  269. package/dist/cli/verbs/tax.d.ts +6 -0
  270. package/dist/cli/verbs/tax.js +114 -0
  271. package/dist/cli/verbs/taxonomy.d.ts +6 -0
  272. package/dist/cli/verbs/taxonomy.js +99 -0
  273. package/dist/cli/verbs/tender-transactions.d.ts +6 -0
  274. package/dist/cli/verbs/tender-transactions.js +105 -0
  275. package/dist/cli/verbs/themes.d.ts +6 -0
  276. package/dist/cli/verbs/themes.js +297 -0
  277. package/dist/cli/verbs/translations.d.ts +6 -0
  278. package/dist/cli/verbs/translations.js +221 -0
  279. package/dist/cli/verbs/types.d.ts +4 -0
  280. package/dist/cli/verbs/types.js +224 -0
  281. package/dist/cli/verbs/url-redirects.d.ts +6 -0
  282. package/dist/cli/verbs/url-redirects.js +407 -0
  283. package/dist/cli/verbs/validations.d.ts +6 -0
  284. package/dist/cli/verbs/validations.js +181 -0
  285. package/dist/cli/verbs/web-pixels.d.ts +6 -0
  286. package/dist/cli/verbs/web-pixels.js +145 -0
  287. package/dist/cli/verbs/web-presences.d.ts +6 -0
  288. package/dist/cli/verbs/web-presences.js +186 -0
  289. package/dist/cli/verbs/webhooks.d.ts +6 -0
  290. package/dist/cli/verbs/webhooks.js +336 -0
  291. package/dist/cli/workflows/files/stagedUploads.d.ts +28 -0
  292. package/dist/cli/workflows/files/stagedUploads.js +175 -0
  293. package/dist/cli/workflows/inventory/resolveInventoryItemId.d.ts +6 -0
  294. package/dist/cli/workflows/inventory/resolveInventoryItemId.js +59 -0
  295. package/dist/cli/workflows/productVariants/upsert.d.ts +8 -0
  296. package/dist/cli/workflows/productVariants/upsert.js +110 -0
  297. package/dist/cli/workflows/products/metafieldsUpsert.d.ts +6 -0
  298. package/dist/cli/workflows/products/metafieldsUpsert.js +94 -0
  299. package/dist/cli/workflows/products/publishablePublish.d.ts +21 -0
  300. package/dist/cli/workflows/products/publishablePublish.js +131 -0
  301. package/dist/cli/workflows/publications/resolvePublicationId.d.ts +17 -0
  302. package/dist/cli/workflows/publications/resolvePublicationId.js +93 -0
  303. package/dist/cli.d.ts +1 -0
  304. package/dist/cli.js +152 -0
  305. package/dist/defaults.d.ts +2 -0
  306. package/dist/defaults.js +38 -0
  307. package/dist/generated/admin-2026-04/index.d.ts +25 -0
  308. package/dist/generated/admin-2026-04/index.js +70 -0
  309. package/dist/generated/admin-2026-04/runtime/batcher.d.ts +105 -0
  310. package/dist/generated/admin-2026-04/runtime/batcher.js +203 -0
  311. package/dist/generated/admin-2026-04/runtime/createClient.d.ts +17 -0
  312. package/dist/generated/admin-2026-04/runtime/createClient.js +59 -0
  313. package/dist/generated/admin-2026-04/runtime/error.d.ts +18 -0
  314. package/dist/generated/admin-2026-04/runtime/error.js +44 -0
  315. package/dist/generated/admin-2026-04/runtime/fetcher.d.ts +10 -0
  316. package/dist/generated/admin-2026-04/runtime/fetcher.js +104 -0
  317. package/dist/generated/admin-2026-04/runtime/generateGraphqlOperation.d.ts +30 -0
  318. package/dist/generated/admin-2026-04/runtime/generateGraphqlOperation.js +191 -0
  319. package/dist/generated/admin-2026-04/runtime/index.d.ts +11 -0
  320. package/dist/generated/admin-2026-04/runtime/index.js +46 -0
  321. package/dist/generated/admin-2026-04/runtime/linkTypeMap.d.ts +9 -0
  322. package/dist/generated/admin-2026-04/runtime/linkTypeMap.js +142 -0
  323. package/dist/generated/admin-2026-04/runtime/typeSelection.d.ts +28 -0
  324. package/dist/generated/admin-2026-04/runtime/typeSelection.js +17 -0
  325. package/dist/generated/admin-2026-04/runtime/types.d.ts +55 -0
  326. package/dist/generated/admin-2026-04/runtime/types.js +17 -0
  327. package/dist/generated/admin-2026-04/schema.d.ts +102240 -0
  328. package/dist/generated/admin-2026-04/schema.graphql +91596 -0
  329. package/dist/generated/admin-2026-04/schema.js +20322 -0
  330. package/dist/generated/admin-2026-04/types.d.ts +24224 -0
  331. package/dist/generated/admin-2026-04/types.js +62299 -0
  332. package/dist/generated/help/schema-help.d.ts +30 -0
  333. package/dist/generated/help/schema-help.js +61833 -0
  334. package/dist/graphqlValidator.d.ts +17 -0
  335. package/dist/graphqlValidator.js +84 -0
  336. package/dist/index.d.ts +1 -0
  337. package/dist/index.js +23 -0
  338. package/package.json +65 -0
  339. package/schema/2026-04.graphql +61256 -0
  340. package/schema/2026-04.introspection.json +1 -0
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var validations_exports = {};
20
+ __export(validations_exports, {
21
+ runValidations: () => runValidations
22
+ });
23
+ module.exports = __toCommonJS(validations_exports);
24
+ var import_errors = require("../errors");
25
+ var import_input = require("../input");
26
+ var import_output = require("../output");
27
+ var import_router = require("../router");
28
+ var import_select = require("../selection/select");
29
+ var import_userErrors = require("../userErrors");
30
+ var import_shared = require("./_shared");
31
+ const validationSelection = {
32
+ id: true,
33
+ title: true,
34
+ enabled: true,
35
+ blockOnFailure: true,
36
+ shopifyFunction: { id: true, title: true, apiType: true }
37
+ };
38
+ const getValidationSelection = (view) => {
39
+ if (view === "ids") return { id: true };
40
+ if (view === "raw") return {};
41
+ return validationSelection;
42
+ };
43
+ const runValidations = async ({
44
+ ctx,
45
+ verb,
46
+ argv
47
+ }) => {
48
+ if (argv.includes("--help") || argv.includes("-h")) {
49
+ console.log(
50
+ [
51
+ "Usage:",
52
+ " shop validations <verb> [flags]",
53
+ "",
54
+ "Verbs:",
55
+ " create|get|list|update|delete",
56
+ "",
57
+ "Common output flags:",
58
+ " --view summary|ids|raw",
59
+ " --select <path> (repeatable; dot paths; adds to base view selection)",
60
+ " --selection <graphql> (selection override; can be @file.gql)"
61
+ ].join("\n")
62
+ );
63
+ return;
64
+ }
65
+ if (verb === "get") {
66
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
67
+ const id = (0, import_shared.requireId)(args.id, "Validation");
68
+ const selection = (0, import_select.resolveSelection)({
69
+ resource: "validations",
70
+ view: ctx.view,
71
+ baseSelection: getValidationSelection(ctx.view),
72
+ select: args.select,
73
+ selection: args.selection,
74
+ include: args.include,
75
+ ensureId: ctx.quiet
76
+ });
77
+ const result = await (0, import_router.runQuery)(ctx, { validation: { __args: { id }, ...selection } });
78
+ if (result === void 0) return;
79
+ (0, import_output.printNode)({ node: result.validation, format: ctx.format, quiet: ctx.quiet });
80
+ return;
81
+ }
82
+ if (verb === "list") {
83
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
84
+ const first = (0, import_shared.parseFirst)(args.first);
85
+ const after = args.after;
86
+ const reverse = args.reverse;
87
+ const nodeSelection = (0, import_select.resolveSelection)({
88
+ resource: "validations",
89
+ view: ctx.view,
90
+ baseSelection: getValidationSelection(ctx.view),
91
+ select: args.select,
92
+ selection: args.selection,
93
+ include: args.include,
94
+ ensureId: ctx.quiet
95
+ });
96
+ const result = await (0, import_router.runQuery)(ctx, {
97
+ validations: {
98
+ __args: { first, after, reverse },
99
+ pageInfo: { hasNextPage: true, endCursor: true },
100
+ nodes: nodeSelection
101
+ }
102
+ });
103
+ if (result === void 0) return;
104
+ (0, import_output.printConnection)({
105
+ connection: result.validations,
106
+ format: ctx.format,
107
+ quiet: ctx.quiet,
108
+ nextPageArgs: (0, import_shared.buildListNextPageArgs)("validations", { first, reverse })
109
+ });
110
+ return;
111
+ }
112
+ if (verb === "create") {
113
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: { "function-id": { type: "string" } } });
114
+ const built = (0, import_input.buildInput)({
115
+ inputArg: args.input,
116
+ setArgs: args.set,
117
+ setJsonArgs: args["set-json"]
118
+ });
119
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
120
+ if (args["function-id"] && built.input && !built.input.functionId) {
121
+ built.input.functionId = args["function-id"];
122
+ }
123
+ const result = await (0, import_router.runMutation)(ctx, {
124
+ validationCreate: {
125
+ __args: { validation: built.input },
126
+ validation: validationSelection,
127
+ userErrors: { field: true, message: true }
128
+ }
129
+ });
130
+ if (result === void 0) return;
131
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.validationCreate, failOnUserErrors: ctx.failOnUserErrors });
132
+ if (ctx.quiet) return console.log(result.validationCreate?.validation?.id ?? "");
133
+ (0, import_output.printJson)(result.validationCreate, ctx.format !== "raw");
134
+ return;
135
+ }
136
+ if (verb === "update") {
137
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
138
+ const id = (0, import_shared.requireId)(args.id, "Validation");
139
+ const built = (0, import_input.buildInput)({
140
+ inputArg: args.input,
141
+ setArgs: args.set,
142
+ setJsonArgs: args["set-json"]
143
+ });
144
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
145
+ const result = await (0, import_router.runMutation)(ctx, {
146
+ validationUpdate: {
147
+ __args: { id, validation: built.input },
148
+ validation: validationSelection,
149
+ userErrors: { field: true, message: true }
150
+ }
151
+ });
152
+ if (result === void 0) return;
153
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.validationUpdate, failOnUserErrors: ctx.failOnUserErrors });
154
+ if (ctx.quiet) return console.log(result.validationUpdate?.validation?.id ?? "");
155
+ (0, import_output.printJson)(result.validationUpdate, ctx.format !== "raw");
156
+ return;
157
+ }
158
+ if (verb === "delete") {
159
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
160
+ const id = (0, import_shared.requireId)(args.id, "Validation");
161
+ if (!args.yes) throw new import_errors.CliError("Refusing to delete without --yes", 2);
162
+ const result = await (0, import_router.runMutation)(ctx, {
163
+ validationDelete: {
164
+ __args: { id },
165
+ deletedId: true,
166
+ userErrors: { field: true, message: true }
167
+ }
168
+ });
169
+ if (result === void 0) return;
170
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.validationDelete, failOnUserErrors: ctx.failOnUserErrors });
171
+ if (ctx.quiet) return console.log(result.validationDelete?.deletedId ?? "");
172
+ (0, import_output.printJson)(result.validationDelete, ctx.format !== "raw");
173
+ return;
174
+ }
175
+ throw new import_errors.CliError(`Unknown verb for validations: ${verb}`, 2);
176
+ };
177
+ // Annotate the CommonJS export names for ESM import in node:
178
+ 0 && (module.exports = {
179
+ runValidations
180
+ });
181
+ //# sourceMappingURL=validations.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runWebPixels: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var web_pixels_exports = {};
20
+ __export(web_pixels_exports, {
21
+ runWebPixels: () => runWebPixels
22
+ });
23
+ module.exports = __toCommonJS(web_pixels_exports);
24
+ var import_errors = require("../errors");
25
+ var import_input = require("../input");
26
+ var import_output = require("../output");
27
+ var import_router = require("../router");
28
+ var import_select = require("../selection/select");
29
+ var import_userErrors = require("../userErrors");
30
+ var import_shared = require("./_shared");
31
+ const webPixelSelection = {
32
+ id: true,
33
+ settings: true
34
+ };
35
+ const getWebPixelSelection = (view) => {
36
+ if (view === "ids") return { id: true };
37
+ if (view === "raw") return {};
38
+ return webPixelSelection;
39
+ };
40
+ const runWebPixels = async ({
41
+ ctx,
42
+ verb,
43
+ argv
44
+ }) => {
45
+ if (argv.includes("--help") || argv.includes("-h")) {
46
+ console.log(
47
+ [
48
+ "Usage:",
49
+ " shop web-pixels <verb> [flags]",
50
+ "",
51
+ "Verbs:",
52
+ " create|get|update|delete",
53
+ "",
54
+ "Common output flags:",
55
+ " --view summary|ids|raw",
56
+ " --select <path> (repeatable; dot paths; adds to base view selection)",
57
+ " --selection <graphql> (selection override; can be @file.gql)"
58
+ ].join("\n")
59
+ );
60
+ return;
61
+ }
62
+ if (verb === "get") {
63
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
64
+ const id = (0, import_shared.requireId)(args.id, "WebPixel");
65
+ const selection = (0, import_select.resolveSelection)({
66
+ resource: "web-pixels",
67
+ view: ctx.view,
68
+ baseSelection: getWebPixelSelection(ctx.view),
69
+ select: args.select,
70
+ selection: args.selection,
71
+ include: args.include,
72
+ ensureId: ctx.quiet
73
+ });
74
+ const result = await (0, import_router.runQuery)(ctx, { webPixel: { __args: { id }, ...selection } });
75
+ if (result === void 0) return;
76
+ (0, import_output.printNode)({ node: result.webPixel, format: ctx.format, quiet: ctx.quiet });
77
+ return;
78
+ }
79
+ if (verb === "create") {
80
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
81
+ const built = (0, import_input.buildInput)({
82
+ inputArg: args.input,
83
+ setArgs: args.set,
84
+ setJsonArgs: args["set-json"]
85
+ });
86
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
87
+ const result = await (0, import_router.runMutation)(ctx, {
88
+ webPixelCreate: {
89
+ __args: { webPixel: built.input },
90
+ webPixel: webPixelSelection,
91
+ userErrors: { field: true, message: true }
92
+ }
93
+ });
94
+ if (result === void 0) return;
95
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPixelCreate, failOnUserErrors: ctx.failOnUserErrors });
96
+ if (ctx.quiet) return console.log(result.webPixelCreate?.webPixel?.id ?? "");
97
+ (0, import_output.printJson)(result.webPixelCreate, ctx.format !== "raw");
98
+ return;
99
+ }
100
+ if (verb === "update") {
101
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
102
+ const id = (0, import_shared.requireId)(args.id, "WebPixel");
103
+ const built = (0, import_input.buildInput)({
104
+ inputArg: args.input,
105
+ setArgs: args.set,
106
+ setJsonArgs: args["set-json"]
107
+ });
108
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
109
+ const result = await (0, import_router.runMutation)(ctx, {
110
+ webPixelUpdate: {
111
+ __args: { id, webPixel: built.input },
112
+ webPixel: webPixelSelection,
113
+ userErrors: { field: true, message: true }
114
+ }
115
+ });
116
+ if (result === void 0) return;
117
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPixelUpdate, failOnUserErrors: ctx.failOnUserErrors });
118
+ if (ctx.quiet) return console.log(result.webPixelUpdate?.webPixel?.id ?? "");
119
+ (0, import_output.printJson)(result.webPixelUpdate, ctx.format !== "raw");
120
+ return;
121
+ }
122
+ if (verb === "delete") {
123
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
124
+ const id = (0, import_shared.requireId)(args.id, "WebPixel");
125
+ if (!args.yes) throw new import_errors.CliError("Refusing to delete without --yes", 2);
126
+ const result = await (0, import_router.runMutation)(ctx, {
127
+ webPixelDelete: {
128
+ __args: { id },
129
+ deletedWebPixelId: true,
130
+ userErrors: { field: true, message: true }
131
+ }
132
+ });
133
+ if (result === void 0) return;
134
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPixelDelete, failOnUserErrors: ctx.failOnUserErrors });
135
+ if (ctx.quiet) return console.log(result.webPixelDelete?.deletedWebPixelId ?? "");
136
+ (0, import_output.printJson)(result.webPixelDelete, ctx.format !== "raw");
137
+ return;
138
+ }
139
+ throw new import_errors.CliError(`Unknown verb for web-pixels: ${verb}`, 2);
140
+ };
141
+ // Annotate the CommonJS export names for ESM import in node:
142
+ 0 && (module.exports = {
143
+ runWebPixels
144
+ });
145
+ //# sourceMappingURL=web-pixels.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runWebPresences: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,186 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var web_presences_exports = {};
20
+ __export(web_presences_exports, {
21
+ runWebPresences: () => runWebPresences
22
+ });
23
+ module.exports = __toCommonJS(web_presences_exports);
24
+ var import_errors = require("../errors");
25
+ var import_input = require("../input");
26
+ var import_output = require("../output");
27
+ var import_router = require("../router");
28
+ var import_select = require("../selection/select");
29
+ var import_userErrors = require("../userErrors");
30
+ var import_shared = require("./_shared");
31
+ const webPresenceSummarySelection = {
32
+ id: true,
33
+ defaultLocale: { locale: true, name: true, primary: true, published: true },
34
+ alternateLocales: { locale: true, name: true, primary: true, published: true },
35
+ subfolderSuffix: true,
36
+ domain: { id: true, host: true, url: true }
37
+ };
38
+ const webPresenceFullSelection = {
39
+ ...webPresenceSummarySelection,
40
+ rootUrls: { locale: true, url: true },
41
+ market: { id: true, name: true }
42
+ };
43
+ const getWebPresenceSelection = (view) => {
44
+ if (view === "ids") return { id: true };
45
+ if (view === "full") return webPresenceFullSelection;
46
+ if (view === "raw") return {};
47
+ return webPresenceSummarySelection;
48
+ };
49
+ const runWebPresences = async ({
50
+ ctx,
51
+ verb,
52
+ argv
53
+ }) => {
54
+ if (argv.includes("--help") || argv.includes("-h")) {
55
+ console.log(
56
+ [
57
+ "Usage:",
58
+ " shop web-presences <verb> [flags]",
59
+ "",
60
+ "Verbs:",
61
+ " list|create|update|delete",
62
+ "",
63
+ "Common output flags:",
64
+ " --view summary|ids|full|raw",
65
+ " --select <path> (repeatable; dot paths; adds to base view selection)",
66
+ " --selection <graphql> (selection override; can be @file.gql)"
67
+ ].join("\n")
68
+ );
69
+ return;
70
+ }
71
+ if (verb === "list") {
72
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
73
+ const first = (0, import_shared.parseFirst)(args.first);
74
+ const after = args.after;
75
+ const reverse = args.reverse;
76
+ const nodeSelection = (0, import_select.resolveSelection)({
77
+ resource: "web-presences",
78
+ typeName: "MarketWebPresence",
79
+ view: ctx.view,
80
+ baseSelection: getWebPresenceSelection(ctx.view),
81
+ select: args.select,
82
+ selection: args.selection,
83
+ include: args.include,
84
+ ensureId: ctx.quiet
85
+ });
86
+ const result = await (0, import_router.runQuery)(ctx, {
87
+ webPresences: {
88
+ __args: { first, after, reverse },
89
+ pageInfo: { hasNextPage: true, endCursor: true },
90
+ nodes: nodeSelection
91
+ }
92
+ });
93
+ if (result === void 0) return;
94
+ (0, import_output.printConnection)({
95
+ connection: result.webPresences,
96
+ format: ctx.format,
97
+ quiet: ctx.quiet,
98
+ nextPageArgs: (0, import_shared.buildListNextPageArgs)("web-presences", { first, reverse })
99
+ });
100
+ return;
101
+ }
102
+ if (verb === "create") {
103
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
104
+ const built = (0, import_input.buildInput)({
105
+ inputArg: args.input,
106
+ setArgs: args.set,
107
+ setJsonArgs: args["set-json"]
108
+ });
109
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
110
+ const selection = (0, import_select.resolveSelection)({
111
+ resource: "web-presences",
112
+ typeName: "MarketWebPresence",
113
+ view: ctx.view,
114
+ baseSelection: getWebPresenceSelection(ctx.view),
115
+ select: args.select,
116
+ selection: args.selection,
117
+ ensureId: ctx.quiet
118
+ });
119
+ const result = await (0, import_router.runMutation)(ctx, {
120
+ webPresenceCreate: {
121
+ __args: { input: built.input },
122
+ webPresence: selection,
123
+ userErrors: { field: true, message: true, code: true }
124
+ }
125
+ });
126
+ if (result === void 0) return;
127
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPresenceCreate, failOnUserErrors: ctx.failOnUserErrors });
128
+ if (ctx.quiet) return console.log(result.webPresenceCreate?.webPresence?.id ?? "");
129
+ (0, import_output.printJson)(result.webPresenceCreate, ctx.format !== "raw");
130
+ return;
131
+ }
132
+ if (verb === "update") {
133
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
134
+ const id = (0, import_shared.requireId)(args.id, "MarketWebPresence");
135
+ const built = (0, import_input.buildInput)({
136
+ inputArg: args.input,
137
+ setArgs: args.set,
138
+ setJsonArgs: args["set-json"]
139
+ });
140
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
141
+ const selection = (0, import_select.resolveSelection)({
142
+ resource: "web-presences",
143
+ typeName: "MarketWebPresence",
144
+ view: ctx.view,
145
+ baseSelection: getWebPresenceSelection(ctx.view),
146
+ select: args.select,
147
+ selection: args.selection,
148
+ ensureId: ctx.quiet
149
+ });
150
+ const result = await (0, import_router.runMutation)(ctx, {
151
+ webPresenceUpdate: {
152
+ __args: { id, input: built.input },
153
+ webPresence: selection,
154
+ userErrors: { field: true, message: true, code: true }
155
+ }
156
+ });
157
+ if (result === void 0) return;
158
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPresenceUpdate, failOnUserErrors: ctx.failOnUserErrors });
159
+ if (ctx.quiet) return console.log(result.webPresenceUpdate?.webPresence?.id ?? "");
160
+ (0, import_output.printJson)(result.webPresenceUpdate, ctx.format !== "raw");
161
+ return;
162
+ }
163
+ if (verb === "delete") {
164
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
165
+ const id = (0, import_shared.requireId)(args.id, "MarketWebPresence");
166
+ if (!args.yes) throw new import_errors.CliError("Refusing to delete without --yes", 2);
167
+ const result = await (0, import_router.runMutation)(ctx, {
168
+ webPresenceDelete: {
169
+ __args: { id },
170
+ deletedId: true,
171
+ userErrors: { field: true, message: true, code: true }
172
+ }
173
+ });
174
+ if (result === void 0) return;
175
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.webPresenceDelete, failOnUserErrors: ctx.failOnUserErrors });
176
+ if (ctx.quiet) return console.log(result.webPresenceDelete?.deletedId ?? "");
177
+ (0, import_output.printJson)(result.webPresenceDelete, ctx.format !== "raw");
178
+ return;
179
+ }
180
+ throw new import_errors.CliError(`Unknown verb for web-presences: ${verb}`, 2);
181
+ };
182
+ // Annotate the CommonJS export names for ESM import in node:
183
+ 0 && (module.exports = {
184
+ runWebPresences
185
+ });
186
+ //# sourceMappingURL=web-presences.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runWebhooks: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;