shop-cli 0.1.1

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 (350) 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 +6443 -0
  23. package/dist/cli/help/render.d.ts +8 -0
  24. package/dist/cli/help/render.js +399 -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/parse-command.d.ts +18 -0
  42. package/dist/cli/parse-command.js +109 -0
  43. package/dist/cli/router.d.ts +29 -0
  44. package/dist/cli/router.js +480 -0
  45. package/dist/cli/selection/buildAllSelection.d.ts +13 -0
  46. package/dist/cli/selection/buildAllSelection.js +108 -0
  47. package/dist/cli/selection/graphqlSelection.d.ts +5 -0
  48. package/dist/cli/selection/graphqlSelection.js +301 -0
  49. package/dist/cli/selection/select.d.ts +13 -0
  50. package/dist/cli/selection/select.js +136 -0
  51. package/dist/cli/selection/stripDeprecated.d.ts +2 -0
  52. package/dist/cli/selection/stripDeprecated.js +63 -0
  53. package/dist/cli/suggest.d.ts +5 -0
  54. package/dist/cli/suggest.js +88 -0
  55. package/dist/cli/userErrors.d.ts +4 -0
  56. package/dist/cli/userErrors.js +41 -0
  57. package/dist/cli/verbs/_shared.d.ts +38 -0
  58. package/dist/cli/verbs/_shared.js +181 -0
  59. package/dist/cli/verbs/abandoned-checkouts.d.ts +6 -0
  60. package/dist/cli/verbs/abandoned-checkouts.js +259 -0
  61. package/dist/cli/verbs/app-billing.d.ts +6 -0
  62. package/dist/cli/verbs/app-billing.js +452 -0
  63. package/dist/cli/verbs/apps.d.ts +6 -0
  64. package/dist/cli/verbs/apps.js +296 -0
  65. package/dist/cli/verbs/articles.d.ts +6 -0
  66. package/dist/cli/verbs/articles.js +251 -0
  67. package/dist/cli/verbs/backup.d.ts +6 -0
  68. package/dist/cli/verbs/backup.js +94 -0
  69. package/dist/cli/verbs/blogs.d.ts +6 -0
  70. package/dist/cli/verbs/blogs.js +273 -0
  71. package/dist/cli/verbs/bulk-operations.d.ts +6 -0
  72. package/dist/cli/verbs/bulk-operations.js +272 -0
  73. package/dist/cli/verbs/business-entities.d.ts +6 -0
  74. package/dist/cli/verbs/business-entities.js +102 -0
  75. package/dist/cli/verbs/carrier-services.d.ts +6 -0
  76. package/dist/cli/verbs/carrier-services.js +195 -0
  77. package/dist/cli/verbs/cart-transforms.d.ts +6 -0
  78. package/dist/cli/verbs/cart-transforms.js +141 -0
  79. package/dist/cli/verbs/cash-tracking.d.ts +6 -0
  80. package/dist/cli/verbs/cash-tracking.js +118 -0
  81. package/dist/cli/verbs/catalogs.d.ts +6 -0
  82. package/dist/cli/verbs/catalogs.js +267 -0
  83. package/dist/cli/verbs/channels.d.ts +6 -0
  84. package/dist/cli/verbs/channels.js +120 -0
  85. package/dist/cli/verbs/checkout-branding.d.ts +6 -0
  86. package/dist/cli/verbs/checkout-branding.js +144 -0
  87. package/dist/cli/verbs/checkout-profiles.d.ts +6 -0
  88. package/dist/cli/verbs/checkout-profiles.js +124 -0
  89. package/dist/cli/verbs/collections.d.ts +6 -0
  90. package/dist/cli/verbs/collections.js +620 -0
  91. package/dist/cli/verbs/comments.d.ts +6 -0
  92. package/dist/cli/verbs/comments.js +160 -0
  93. package/dist/cli/verbs/companies.d.ts +6 -0
  94. package/dist/cli/verbs/companies.js +313 -0
  95. package/dist/cli/verbs/company-contacts.d.ts +6 -0
  96. package/dist/cli/verbs/company-contacts.js +318 -0
  97. package/dist/cli/verbs/company-locations.d.ts +6 -0
  98. package/dist/cli/verbs/company-locations.js +467 -0
  99. package/dist/cli/verbs/customer-account-pages.d.ts +6 -0
  100. package/dist/cli/verbs/customer-account-pages.js +97 -0
  101. package/dist/cli/verbs/customer-payment-methods.d.ts +6 -0
  102. package/dist/cli/verbs/customer-payment-methods.js +358 -0
  103. package/dist/cli/verbs/customer-privacy.d.ts +6 -0
  104. package/dist/cli/verbs/customer-privacy.js +167 -0
  105. package/dist/cli/verbs/customer-segments.d.ts +6 -0
  106. package/dist/cli/verbs/customer-segments.js +193 -0
  107. package/dist/cli/verbs/customers.d.ts +6 -0
  108. package/dist/cli/verbs/customers.js +793 -0
  109. package/dist/cli/verbs/delegate-tokens.d.ts +6 -0
  110. package/dist/cli/verbs/delegate-tokens.js +95 -0
  111. package/dist/cli/verbs/delivery-customizations.d.ts +6 -0
  112. package/dist/cli/verbs/delivery-customizations.js +205 -0
  113. package/dist/cli/verbs/delivery-profile-locations.d.ts +6 -0
  114. package/dist/cli/verbs/delivery-profile-locations.js +90 -0
  115. package/dist/cli/verbs/delivery-profiles.d.ts +6 -0
  116. package/dist/cli/verbs/delivery-profiles.js +207 -0
  117. package/dist/cli/verbs/delivery-promises.d.ts +6 -0
  118. package/dist/cli/verbs/delivery-promises.js +262 -0
  119. package/dist/cli/verbs/delivery-settings.d.ts +6 -0
  120. package/dist/cli/verbs/delivery-settings.js +85 -0
  121. package/dist/cli/verbs/discount-nodes.d.ts +6 -0
  122. package/dist/cli/verbs/discount-nodes.js +169 -0
  123. package/dist/cli/verbs/discount-redeem-codes.d.ts +6 -0
  124. package/dist/cli/verbs/discount-redeem-codes.js +102 -0
  125. package/dist/cli/verbs/discount-saved-searches.d.ts +6 -0
  126. package/dist/cli/verbs/discount-saved-searches.js +113 -0
  127. package/dist/cli/verbs/discounts-automatic.d.ts +6 -0
  128. package/dist/cli/verbs/discounts-automatic.js +501 -0
  129. package/dist/cli/verbs/discounts-code.d.ts +6 -0
  130. package/dist/cli/verbs/discounts-code.js +540 -0
  131. package/dist/cli/verbs/disputes.d.ts +6 -0
  132. package/dist/cli/verbs/disputes.js +154 -0
  133. package/dist/cli/verbs/draft-orders.d.ts +6 -0
  134. package/dist/cli/verbs/draft-orders.js +475 -0
  135. package/dist/cli/verbs/events.d.ts +6 -0
  136. package/dist/cli/verbs/events.js +182 -0
  137. package/dist/cli/verbs/file-saved-searches.d.ts +6 -0
  138. package/dist/cli/verbs/file-saved-searches.js +83 -0
  139. package/dist/cli/verbs/files.d.ts +6 -0
  140. package/dist/cli/verbs/files.js +329 -0
  141. package/dist/cli/verbs/finance.d.ts +6 -0
  142. package/dist/cli/verbs/finance.js +115 -0
  143. package/dist/cli/verbs/flow.d.ts +6 -0
  144. package/dist/cli/verbs/flow.js +94 -0
  145. package/dist/cli/verbs/fulfillment-constraint-rules.d.ts +6 -0
  146. package/dist/cli/verbs/fulfillment-constraint-rules.js +139 -0
  147. package/dist/cli/verbs/fulfillment-orders.d.ts +6 -0
  148. package/dist/cli/verbs/fulfillment-orders.js +689 -0
  149. package/dist/cli/verbs/fulfillment-services.d.ts +6 -0
  150. package/dist/cli/verbs/fulfillment-services.js +212 -0
  151. package/dist/cli/verbs/fulfillments.d.ts +6 -0
  152. package/dist/cli/verbs/fulfillments.js +279 -0
  153. package/dist/cli/verbs/gift-cards.d.ts +6 -0
  154. package/dist/cli/verbs/gift-cards.js +359 -0
  155. package/dist/cli/verbs/graphql.d.ts +14 -0
  156. package/dist/cli/verbs/graphql.js +285 -0
  157. package/dist/cli/verbs/inventory-items.d.ts +6 -0
  158. package/dist/cli/verbs/inventory-items.js +164 -0
  159. package/dist/cli/verbs/inventory-shipments.d.ts +6 -0
  160. package/dist/cli/verbs/inventory-shipments.js +276 -0
  161. package/dist/cli/verbs/inventory-transfers.d.ts +6 -0
  162. package/dist/cli/verbs/inventory-transfers.js +396 -0
  163. package/dist/cli/verbs/inventory.d.ts +6 -0
  164. package/dist/cli/verbs/inventory.js +557 -0
  165. package/dist/cli/verbs/locales.d.ts +6 -0
  166. package/dist/cli/verbs/locales.js +61 -0
  167. package/dist/cli/verbs/locations.d.ts +6 -0
  168. package/dist/cli/verbs/locations.js +385 -0
  169. package/dist/cli/verbs/market-localizations.d.ts +6 -0
  170. package/dist/cli/verbs/market-localizations.js +291 -0
  171. package/dist/cli/verbs/market-web-presences.d.ts +6 -0
  172. package/dist/cli/verbs/market-web-presences.js +139 -0
  173. package/dist/cli/verbs/marketing-activities.d.ts +6 -0
  174. package/dist/cli/verbs/marketing-activities.js +353 -0
  175. package/dist/cli/verbs/marketing-events.d.ts +6 -0
  176. package/dist/cli/verbs/marketing-events.js +132 -0
  177. package/dist/cli/verbs/markets.d.ts +6 -0
  178. package/dist/cli/verbs/markets.js +357 -0
  179. package/dist/cli/verbs/menus.d.ts +6 -0
  180. package/dist/cli/verbs/menus.js +251 -0
  181. package/dist/cli/verbs/metafield-definition-tools.d.ts +6 -0
  182. package/dist/cli/verbs/metafield-definition-tools.js +289 -0
  183. package/dist/cli/verbs/metafield-definitions.d.ts +6 -0
  184. package/dist/cli/verbs/metafield-definitions.js +240 -0
  185. package/dist/cli/verbs/metafields.d.ts +6 -0
  186. package/dist/cli/verbs/metafields.js +112 -0
  187. package/dist/cli/verbs/metaobject-definition-tools.d.ts +6 -0
  188. package/dist/cli/verbs/metaobject-definition-tools.js +83 -0
  189. package/dist/cli/verbs/metaobject-definitions.d.ts +6 -0
  190. package/dist/cli/verbs/metaobject-definitions.js +176 -0
  191. package/dist/cli/verbs/metaobjects.d.ts +6 -0
  192. package/dist/cli/verbs/metaobjects.js +306 -0
  193. package/dist/cli/verbs/mobile-platform-applications.d.ts +6 -0
  194. package/dist/cli/verbs/mobile-platform-applications.js +247 -0
  195. package/dist/cli/verbs/order-edit.d.ts +6 -0
  196. package/dist/cli/verbs/order-edit.js +596 -0
  197. package/dist/cli/verbs/orders.d.ts +6 -0
  198. package/dist/cli/verbs/orders.js +853 -0
  199. package/dist/cli/verbs/pages.d.ts +6 -0
  200. package/dist/cli/verbs/pages.js +234 -0
  201. package/dist/cli/verbs/payment-customizations.d.ts +6 -0
  202. package/dist/cli/verbs/payment-customizations.js +193 -0
  203. package/dist/cli/verbs/payment-terms.d.ts +6 -0
  204. package/dist/cli/verbs/payment-terms.js +228 -0
  205. package/dist/cli/verbs/point-of-sale.d.ts +6 -0
  206. package/dist/cli/verbs/point-of-sale.js +57 -0
  207. package/dist/cli/verbs/price-lists.d.ts +6 -0
  208. package/dist/cli/verbs/price-lists.js +426 -0
  209. package/dist/cli/verbs/product-feeds.d.ts +6 -0
  210. package/dist/cli/verbs/product-feeds.js +187 -0
  211. package/dist/cli/verbs/product-variants.d.ts +6 -0
  212. package/dist/cli/verbs/product-variants.js +439 -0
  213. package/dist/cli/verbs/products.d.ts +6 -0
  214. package/dist/cli/verbs/products.js +2309 -0
  215. package/dist/cli/verbs/publications.d.ts +6 -0
  216. package/dist/cli/verbs/publications.js +256 -0
  217. package/dist/cli/verbs/publishables.d.ts +6 -0
  218. package/dist/cli/verbs/publishables.js +73 -0
  219. package/dist/cli/verbs/refunds.d.ts +6 -0
  220. package/dist/cli/verbs/refunds.js +226 -0
  221. package/dist/cli/verbs/resource-feedback.d.ts +6 -0
  222. package/dist/cli/verbs/resource-feedback.js +119 -0
  223. package/dist/cli/verbs/returnable-fulfillments.d.ts +6 -0
  224. package/dist/cli/verbs/returnable-fulfillments.js +102 -0
  225. package/dist/cli/verbs/returns.d.ts +6 -0
  226. package/dist/cli/verbs/returns.js +506 -0
  227. package/dist/cli/verbs/reverse-deliveries.d.ts +6 -0
  228. package/dist/cli/verbs/reverse-deliveries.js +203 -0
  229. package/dist/cli/verbs/reverse-fulfillment-orders.d.ts +6 -0
  230. package/dist/cli/verbs/reverse-fulfillment-orders.js +157 -0
  231. package/dist/cli/verbs/saved-searches.d.ts +6 -0
  232. package/dist/cli/verbs/saved-searches.js +150 -0
  233. package/dist/cli/verbs/script-tags.d.ts +6 -0
  234. package/dist/cli/verbs/script-tags.js +179 -0
  235. package/dist/cli/verbs/segments.d.ts +6 -0
  236. package/dist/cli/verbs/segments.js +343 -0
  237. package/dist/cli/verbs/selling-plan-group-products.d.ts +6 -0
  238. package/dist/cli/verbs/selling-plan-group-products.js +115 -0
  239. package/dist/cli/verbs/selling-plan-groups.d.ts +6 -0
  240. package/dist/cli/verbs/selling-plan-groups.js +230 -0
  241. package/dist/cli/verbs/server-pixels.d.ts +6 -0
  242. package/dist/cli/verbs/server-pixels.js +172 -0
  243. package/dist/cli/verbs/shipping-packages.d.ts +6 -0
  244. package/dist/cli/verbs/shipping-packages.js +107 -0
  245. package/dist/cli/verbs/shop-policies.d.ts +6 -0
  246. package/dist/cli/verbs/shop-policies.js +91 -0
  247. package/dist/cli/verbs/shop-utils.d.ts +6 -0
  248. package/dist/cli/verbs/shop-utils.js +147 -0
  249. package/dist/cli/verbs/shop.d.ts +6 -0
  250. package/dist/cli/verbs/shop.js +177 -0
  251. package/dist/cli/verbs/shopify-functions.d.ts +6 -0
  252. package/dist/cli/verbs/shopify-functions.js +127 -0
  253. package/dist/cli/verbs/shopify-payments.d.ts +6 -0
  254. package/dist/cli/verbs/shopify-payments.js +111 -0
  255. package/dist/cli/verbs/staff.d.ts +6 -0
  256. package/dist/cli/verbs/staff.js +127 -0
  257. package/dist/cli/verbs/staged-uploads.d.ts +6 -0
  258. package/dist/cli/verbs/staged-uploads.js +128 -0
  259. package/dist/cli/verbs/store-credit.d.ts +6 -0
  260. package/dist/cli/verbs/store-credit.js +209 -0
  261. package/dist/cli/verbs/storefront-access-tokens.d.ts +6 -0
  262. package/dist/cli/verbs/storefront-access-tokens.js +183 -0
  263. package/dist/cli/verbs/subscription-billing-cycles.d.ts +6 -0
  264. package/dist/cli/verbs/subscription-billing-cycles.js +391 -0
  265. package/dist/cli/verbs/subscription-billing.d.ts +6 -0
  266. package/dist/cli/verbs/subscription-billing.js +391 -0
  267. package/dist/cli/verbs/subscription-contracts.d.ts +6 -0
  268. package/dist/cli/verbs/subscription-contracts.js +392 -0
  269. package/dist/cli/verbs/subscription-drafts.d.ts +6 -0
  270. package/dist/cli/verbs/subscription-drafts.js +315 -0
  271. package/dist/cli/verbs/tags.d.ts +6 -0
  272. package/dist/cli/verbs/tags.js +73 -0
  273. package/dist/cli/verbs/tax.d.ts +6 -0
  274. package/dist/cli/verbs/tax.js +114 -0
  275. package/dist/cli/verbs/taxonomy.d.ts +6 -0
  276. package/dist/cli/verbs/taxonomy.js +99 -0
  277. package/dist/cli/verbs/tender-transactions.d.ts +6 -0
  278. package/dist/cli/verbs/tender-transactions.js +105 -0
  279. package/dist/cli/verbs/themes.d.ts +6 -0
  280. package/dist/cli/verbs/themes.js +315 -0
  281. package/dist/cli/verbs/translations.d.ts +6 -0
  282. package/dist/cli/verbs/translations.js +221 -0
  283. package/dist/cli/verbs/types.d.ts +4 -0
  284. package/dist/cli/verbs/types.js +224 -0
  285. package/dist/cli/verbs/url-redirects.d.ts +6 -0
  286. package/dist/cli/verbs/url-redirects.js +465 -0
  287. package/dist/cli/verbs/validations.d.ts +6 -0
  288. package/dist/cli/verbs/validations.js +181 -0
  289. package/dist/cli/verbs/web-pixels.d.ts +6 -0
  290. package/dist/cli/verbs/web-pixels.js +145 -0
  291. package/dist/cli/verbs/web-presences.d.ts +6 -0
  292. package/dist/cli/verbs/web-presences.js +186 -0
  293. package/dist/cli/verbs/webhooks.d.ts +6 -0
  294. package/dist/cli/verbs/webhooks.js +336 -0
  295. package/dist/cli/workflows/files/stagedUploads.d.ts +28 -0
  296. package/dist/cli/workflows/files/stagedUploads.js +227 -0
  297. package/dist/cli/workflows/files/stdinFile.d.ts +7 -0
  298. package/dist/cli/workflows/files/stdinFile.js +65 -0
  299. package/dist/cli/workflows/files/urlDownloads.d.ts +14 -0
  300. package/dist/cli/workflows/files/urlDownloads.js +114 -0
  301. package/dist/cli/workflows/files/waitForReady.d.ts +20 -0
  302. package/dist/cli/workflows/files/waitForReady.js +114 -0
  303. package/dist/cli/workflows/inventory/resolveInventoryItemId.d.ts +6 -0
  304. package/dist/cli/workflows/inventory/resolveInventoryItemId.js +59 -0
  305. package/dist/cli/workflows/productVariants/upsert.d.ts +8 -0
  306. package/dist/cli/workflows/productVariants/upsert.js +110 -0
  307. package/dist/cli/workflows/products/metafieldsUpsert.d.ts +6 -0
  308. package/dist/cli/workflows/products/metafieldsUpsert.js +94 -0
  309. package/dist/cli/workflows/products/publishablePublish.d.ts +21 -0
  310. package/dist/cli/workflows/products/publishablePublish.js +131 -0
  311. package/dist/cli/workflows/publications/resolvePublicationId.d.ts +17 -0
  312. package/dist/cli/workflows/publications/resolvePublicationId.js +93 -0
  313. package/dist/cli.d.ts +1 -0
  314. package/dist/cli.js +238 -0
  315. package/dist/defaults.d.ts +2 -0
  316. package/dist/defaults.js +38 -0
  317. package/dist/generated/admin-2026-04/index.d.ts +25 -0
  318. package/dist/generated/admin-2026-04/index.js +70 -0
  319. package/dist/generated/admin-2026-04/runtime/batcher.d.ts +105 -0
  320. package/dist/generated/admin-2026-04/runtime/batcher.js +203 -0
  321. package/dist/generated/admin-2026-04/runtime/createClient.d.ts +17 -0
  322. package/dist/generated/admin-2026-04/runtime/createClient.js +59 -0
  323. package/dist/generated/admin-2026-04/runtime/error.d.ts +18 -0
  324. package/dist/generated/admin-2026-04/runtime/error.js +44 -0
  325. package/dist/generated/admin-2026-04/runtime/fetcher.d.ts +10 -0
  326. package/dist/generated/admin-2026-04/runtime/fetcher.js +104 -0
  327. package/dist/generated/admin-2026-04/runtime/generateGraphqlOperation.d.ts +30 -0
  328. package/dist/generated/admin-2026-04/runtime/generateGraphqlOperation.js +191 -0
  329. package/dist/generated/admin-2026-04/runtime/index.d.ts +11 -0
  330. package/dist/generated/admin-2026-04/runtime/index.js +46 -0
  331. package/dist/generated/admin-2026-04/runtime/linkTypeMap.d.ts +9 -0
  332. package/dist/generated/admin-2026-04/runtime/linkTypeMap.js +142 -0
  333. package/dist/generated/admin-2026-04/runtime/typeSelection.d.ts +28 -0
  334. package/dist/generated/admin-2026-04/runtime/typeSelection.js +17 -0
  335. package/dist/generated/admin-2026-04/runtime/types.d.ts +55 -0
  336. package/dist/generated/admin-2026-04/runtime/types.js +17 -0
  337. package/dist/generated/admin-2026-04/schema.d.ts +102240 -0
  338. package/dist/generated/admin-2026-04/schema.graphql +91596 -0
  339. package/dist/generated/admin-2026-04/schema.js +20322 -0
  340. package/dist/generated/admin-2026-04/types.d.ts +24224 -0
  341. package/dist/generated/admin-2026-04/types.js +62299 -0
  342. package/dist/generated/help/schema-help.d.ts +30 -0
  343. package/dist/generated/help/schema-help.js +61833 -0
  344. package/dist/graphqlValidator.d.ts +17 -0
  345. package/dist/graphqlValidator.js +84 -0
  346. package/dist/index.d.ts +1 -0
  347. package/dist/index.js +23 -0
  348. package/package.json +66 -0
  349. package/schema/2026-04.graphql +61256 -0
  350. package/schema/2026-04.introspection.json +1 -0
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runDelegateTokens: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,95 @@
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 delegate_tokens_exports = {};
20
+ __export(delegate_tokens_exports, {
21
+ runDelegateTokens: () => runDelegateTokens
22
+ });
23
+ module.exports = __toCommonJS(delegate_tokens_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_userErrors = require("../userErrors");
29
+ const delegateTokenSelection = {
30
+ accessToken: true,
31
+ createdAt: true,
32
+ accessScopes: true
33
+ };
34
+ const runDelegateTokens = async ({
35
+ ctx,
36
+ verb,
37
+ argv
38
+ }) => {
39
+ if (argv.includes("--help") || argv.includes("-h")) {
40
+ console.log(
41
+ [
42
+ "Usage:",
43
+ " shop delegate-tokens <verb> [flags]",
44
+ "",
45
+ "Verbs:",
46
+ " create|destroy"
47
+ ].join("\n")
48
+ );
49
+ return;
50
+ }
51
+ if (verb === "create") {
52
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
53
+ const built = (0, import_input.buildInput)({
54
+ inputArg: args.input,
55
+ setArgs: args.set,
56
+ setJsonArgs: args["set-json"]
57
+ });
58
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
59
+ const result = await (0, import_router.runMutation)(ctx, {
60
+ delegateAccessTokenCreate: {
61
+ __args: { input: built.input },
62
+ delegateAccessToken: delegateTokenSelection,
63
+ userErrors: { field: true, message: true }
64
+ }
65
+ });
66
+ if (result === void 0) return;
67
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.delegateAccessTokenCreate, failOnUserErrors: ctx.failOnUserErrors });
68
+ if (ctx.quiet) return console.log(result.delegateAccessTokenCreate?.delegateAccessToken?.accessToken ?? "");
69
+ (0, import_output.printJson)(result.delegateAccessTokenCreate, ctx.format !== "raw");
70
+ return;
71
+ }
72
+ if (verb === "destroy") {
73
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: { token: { type: "string" } } });
74
+ const token = args.token;
75
+ if (!token) throw new import_errors.CliError("Missing --token", 2);
76
+ const result = await (0, import_router.runMutation)(ctx, {
77
+ delegateAccessTokenDestroy: {
78
+ __args: { accessToken: token },
79
+ status: true,
80
+ userErrors: { field: true, message: true }
81
+ }
82
+ });
83
+ if (result === void 0) return;
84
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.delegateAccessTokenDestroy, failOnUserErrors: ctx.failOnUserErrors });
85
+ if (ctx.quiet) return console.log(result.delegateAccessTokenDestroy?.status ? "true" : "false");
86
+ (0, import_output.printJson)(result.delegateAccessTokenDestroy, ctx.format !== "raw");
87
+ return;
88
+ }
89
+ throw new import_errors.CliError(`Unknown verb for delegate-tokens: ${verb}`, 2);
90
+ };
91
+ // Annotate the CommonJS export names for ESM import in node:
92
+ 0 && (module.exports = {
93
+ runDelegateTokens
94
+ });
95
+ //# sourceMappingURL=delegate-tokens.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runDeliveryCustomizations: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,205 @@
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 delivery_customizations_exports = {};
20
+ __export(delivery_customizations_exports, {
21
+ runDeliveryCustomizations: () => runDeliveryCustomizations
22
+ });
23
+ module.exports = __toCommonJS(delivery_customizations_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 deliveryCustomizationSelection = {
32
+ id: true,
33
+ title: true,
34
+ enabled: true,
35
+ functionId: true,
36
+ shopifyFunction: { id: true, title: true, apiType: true },
37
+ metafields: {
38
+ __args: { first: 5 },
39
+ nodes: { namespace: true, key: true, value: true }
40
+ }
41
+ };
42
+ const getDeliveryCustomizationSelection = (view) => {
43
+ if (view === "ids") return { id: true };
44
+ if (view === "raw") return {};
45
+ return deliveryCustomizationSelection;
46
+ };
47
+ const runDeliveryCustomizations = async ({
48
+ ctx,
49
+ verb,
50
+ argv
51
+ }) => {
52
+ if (argv.includes("--help") || argv.includes("-h")) {
53
+ console.log(
54
+ [
55
+ "Usage:",
56
+ " shop delivery-customizations <verb> [flags]",
57
+ "",
58
+ "Verbs:",
59
+ " create|get|list|update|delete|activate",
60
+ "",
61
+ "Common output flags:",
62
+ " --view summary|ids|raw",
63
+ " --select <path> (repeatable; dot paths; adds to base view selection)",
64
+ " --selection <graphql> (selection override; can be @file.gql)"
65
+ ].join("\n")
66
+ );
67
+ return;
68
+ }
69
+ if (verb === "get") {
70
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
71
+ const id = (0, import_shared.requireId)(args.id, "DeliveryCustomization");
72
+ const selection = (0, import_select.resolveSelection)({
73
+ resource: "delivery-customizations",
74
+ view: ctx.view,
75
+ baseSelection: getDeliveryCustomizationSelection(ctx.view),
76
+ select: args.select,
77
+ selection: args.selection,
78
+ include: args.include,
79
+ ensureId: ctx.quiet
80
+ });
81
+ const result = await (0, import_router.runQuery)(ctx, { deliveryCustomization: { __args: { id }, ...selection } });
82
+ if (result === void 0) return;
83
+ (0, import_output.printNode)({ node: result.deliveryCustomization, format: ctx.format, quiet: ctx.quiet });
84
+ return;
85
+ }
86
+ if (verb === "list") {
87
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
88
+ const first = (0, import_shared.parseFirst)(args.first);
89
+ const after = args.after;
90
+ const reverse = args.reverse;
91
+ const nodeSelection = (0, import_select.resolveSelection)({
92
+ resource: "delivery-customizations",
93
+ view: ctx.view,
94
+ baseSelection: getDeliveryCustomizationSelection(ctx.view),
95
+ select: args.select,
96
+ selection: args.selection,
97
+ include: args.include,
98
+ ensureId: ctx.quiet
99
+ });
100
+ const result = await (0, import_router.runQuery)(ctx, {
101
+ deliveryCustomizations: {
102
+ __args: { first, after, reverse },
103
+ pageInfo: { hasNextPage: true, endCursor: true },
104
+ nodes: nodeSelection
105
+ }
106
+ });
107
+ if (result === void 0) return;
108
+ (0, import_output.printConnection)({
109
+ connection: result.deliveryCustomizations,
110
+ format: ctx.format,
111
+ quiet: ctx.quiet,
112
+ nextPageArgs: (0, import_shared.buildListNextPageArgs)("delivery-customizations", { first, reverse })
113
+ });
114
+ return;
115
+ }
116
+ if (verb === "create") {
117
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: { "function-id": { type: "string" } } });
118
+ const built = (0, import_input.buildInput)({
119
+ inputArg: args.input,
120
+ setArgs: args.set,
121
+ setJsonArgs: args["set-json"]
122
+ });
123
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
124
+ if (args["function-id"] && built.input && !built.input.functionId) {
125
+ built.input.functionId = args["function-id"];
126
+ }
127
+ const result = await (0, import_router.runMutation)(ctx, {
128
+ deliveryCustomizationCreate: {
129
+ __args: { deliveryCustomization: built.input },
130
+ deliveryCustomization: deliveryCustomizationSelection,
131
+ userErrors: { field: true, message: true }
132
+ }
133
+ });
134
+ if (result === void 0) return;
135
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryCustomizationCreate, failOnUserErrors: ctx.failOnUserErrors });
136
+ if (ctx.quiet) return console.log(result.deliveryCustomizationCreate?.deliveryCustomization?.id ?? "");
137
+ (0, import_output.printJson)(result.deliveryCustomizationCreate, ctx.format !== "raw");
138
+ return;
139
+ }
140
+ if (verb === "update") {
141
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
142
+ const id = (0, import_shared.requireId)(args.id, "DeliveryCustomization");
143
+ const built = (0, import_input.buildInput)({
144
+ inputArg: args.input,
145
+ setArgs: args.set,
146
+ setJsonArgs: args["set-json"]
147
+ });
148
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
149
+ const result = await (0, import_router.runMutation)(ctx, {
150
+ deliveryCustomizationUpdate: {
151
+ __args: { id, deliveryCustomization: built.input },
152
+ deliveryCustomization: deliveryCustomizationSelection,
153
+ userErrors: { field: true, message: true }
154
+ }
155
+ });
156
+ if (result === void 0) return;
157
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryCustomizationUpdate, failOnUserErrors: ctx.failOnUserErrors });
158
+ if (ctx.quiet) return console.log(result.deliveryCustomizationUpdate?.deliveryCustomization?.id ?? "");
159
+ (0, import_output.printJson)(result.deliveryCustomizationUpdate, ctx.format !== "raw");
160
+ return;
161
+ }
162
+ if (verb === "delete") {
163
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
164
+ const id = (0, import_shared.requireId)(args.id, "DeliveryCustomization");
165
+ if (!args.yes) throw new import_errors.CliError("Refusing to delete without --yes", 2);
166
+ const result = await (0, import_router.runMutation)(ctx, {
167
+ deliveryCustomizationDelete: {
168
+ __args: { id },
169
+ deletedId: true,
170
+ userErrors: { field: true, message: true }
171
+ }
172
+ });
173
+ if (result === void 0) return;
174
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryCustomizationDelete, failOnUserErrors: ctx.failOnUserErrors });
175
+ if (ctx.quiet) return console.log(result.deliveryCustomizationDelete?.deletedId ?? "");
176
+ (0, import_output.printJson)(result.deliveryCustomizationDelete, ctx.format !== "raw");
177
+ return;
178
+ }
179
+ if (verb === "activate") {
180
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: { enabled: { type: "boolean" } } });
181
+ const enabled = args.enabled;
182
+ if (enabled === void 0) throw new import_errors.CliError("Missing --enabled", 2);
183
+ const ids = (0, import_shared.parseStringList)(args.ids, "--ids");
184
+ const result = await (0, import_router.runMutation)(ctx, {
185
+ deliveryCustomizationActivation: {
186
+ __args: { enabled: Boolean(enabled), ids },
187
+ ids: true,
188
+ userErrors: { field: true, message: true }
189
+ }
190
+ });
191
+ if (result === void 0) return;
192
+ (0, import_userErrors.maybeFailOnUserErrors)({
193
+ payload: result.deliveryCustomizationActivation,
194
+ failOnUserErrors: ctx.failOnUserErrors
195
+ });
196
+ (0, import_output.printJson)(result.deliveryCustomizationActivation, ctx.format !== "raw");
197
+ return;
198
+ }
199
+ throw new import_errors.CliError(`Unknown verb for delivery-customizations: ${verb}`, 2);
200
+ };
201
+ // Annotate the CommonJS export names for ESM import in node:
202
+ 0 && (module.exports = {
203
+ runDeliveryCustomizations
204
+ });
205
+ //# sourceMappingURL=delivery-customizations.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runDeliveryProfileLocations: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,90 @@
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 delivery_profile_locations_exports = {};
20
+ __export(delivery_profile_locations_exports, {
21
+ runDeliveryProfileLocations: () => runDeliveryProfileLocations
22
+ });
23
+ module.exports = __toCommonJS(delivery_profile_locations_exports);
24
+ var import_errors = require("../errors");
25
+ var import_output = require("../output");
26
+ var import_router = require("../router");
27
+ var import_shared = require("./_shared");
28
+ const locationSelection = {
29
+ id: true,
30
+ name: true,
31
+ isActive: true
32
+ };
33
+ const runDeliveryProfileLocations = async ({
34
+ ctx,
35
+ verb,
36
+ argv
37
+ }) => {
38
+ if (argv.includes("--help") || argv.includes("-h")) {
39
+ console.log(
40
+ [
41
+ "Usage:",
42
+ " shop delivery-profile-locations <verb> [flags]",
43
+ "",
44
+ "Verbs:",
45
+ " available|available-connection",
46
+ "",
47
+ "Notes:",
48
+ " - 'available' uses the deprecated list field",
49
+ " - 'available-connection' is paginated (recommended)"
50
+ ].join("\n")
51
+ );
52
+ return;
53
+ }
54
+ if (verb === "available") {
55
+ const result = await (0, import_router.runQuery)(ctx, {
56
+ locationsAvailableForDeliveryProfiles: locationSelection
57
+ });
58
+ if (result === void 0) return;
59
+ const nodes = result.locationsAvailableForDeliveryProfiles ?? [];
60
+ (0, import_output.printConnection)({ connection: { nodes }, format: ctx.format, quiet: ctx.quiet });
61
+ return;
62
+ }
63
+ if (verb === "available-connection") {
64
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
65
+ const first = (0, import_shared.parseFirst)(args.first);
66
+ const after = args.after;
67
+ const reverse = args.reverse;
68
+ const result = await (0, import_router.runQuery)(ctx, {
69
+ locationsAvailableForDeliveryProfilesConnection: {
70
+ __args: { first, after, reverse },
71
+ pageInfo: { hasNextPage: true, endCursor: true },
72
+ nodes: locationSelection
73
+ }
74
+ });
75
+ if (result === void 0) return;
76
+ (0, import_output.printConnection)({
77
+ connection: result.locationsAvailableForDeliveryProfilesConnection,
78
+ format: ctx.format,
79
+ quiet: ctx.quiet,
80
+ nextPageArgs: (0, import_shared.buildListNextPageArgs)("delivery-profile-locations", { first, reverse })
81
+ });
82
+ return;
83
+ }
84
+ throw new import_errors.CliError(`Unknown verb for delivery-profile-locations: ${verb}`, 2);
85
+ };
86
+ // Annotate the CommonJS export names for ESM import in node:
87
+ 0 && (module.exports = {
88
+ runDeliveryProfileLocations
89
+ });
90
+ //# sourceMappingURL=delivery-profile-locations.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runDeliveryProfiles: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;
@@ -0,0 +1,207 @@
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 delivery_profiles_exports = {};
20
+ __export(delivery_profiles_exports, {
21
+ runDeliveryProfiles: () => runDeliveryProfiles
22
+ });
23
+ module.exports = __toCommonJS(delivery_profiles_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 deliveryProfileSummarySelection = {
32
+ id: true,
33
+ name: true,
34
+ default: true,
35
+ activeMethodDefinitionsCount: true,
36
+ originLocationCount: true,
37
+ productVariantsCount: { count: true, precision: true }
38
+ };
39
+ const deliveryProfileFullSelection = {
40
+ ...deliveryProfileSummarySelection,
41
+ profileLocationGroups: {
42
+ locationGroup: {
43
+ id: true,
44
+ locations: { __args: { first: 10 }, nodes: { id: true, name: true } }
45
+ },
46
+ locationGroupZones: {
47
+ __args: { first: 10 },
48
+ nodes: {
49
+ zone: { id: true, name: true, countries: { code: true, name: true } },
50
+ methodDefinitions: {
51
+ __args: { first: 10 },
52
+ nodes: {
53
+ id: true,
54
+ name: true,
55
+ active: true,
56
+ rateProvider: {
57
+ on_DeliveryRateDefinition: { price: { amount: true } },
58
+ on_DeliveryParticipant: { participantServices: { name: true } }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ };
66
+ const getDeliveryProfileSelection = (view) => {
67
+ if (view === "ids") return { id: true };
68
+ if (view === "full") return deliveryProfileFullSelection;
69
+ if (view === "raw") return {};
70
+ return deliveryProfileSummarySelection;
71
+ };
72
+ const runDeliveryProfiles = async ({
73
+ ctx,
74
+ verb,
75
+ argv
76
+ }) => {
77
+ if (argv.includes("--help") || argv.includes("-h")) {
78
+ console.log(
79
+ [
80
+ "Usage:",
81
+ " shop delivery-profiles <verb> [flags]",
82
+ "",
83
+ "Verbs:",
84
+ " create|get|list|update|delete",
85
+ "",
86
+ "Common output flags:",
87
+ " --view summary|ids|full|raw",
88
+ " --select <path> (repeatable; dot paths; adds to base view selection)",
89
+ " --selection <graphql> (selection override; can be @file.gql)"
90
+ ].join("\n")
91
+ );
92
+ return;
93
+ }
94
+ if (verb === "get") {
95
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
96
+ const id = (0, import_shared.requireId)(args.id, "DeliveryProfile");
97
+ const selection = (0, import_select.resolveSelection)({
98
+ resource: "delivery-profiles",
99
+ view: ctx.view,
100
+ baseSelection: getDeliveryProfileSelection(ctx.view),
101
+ select: args.select,
102
+ selection: args.selection,
103
+ include: args.include,
104
+ ensureId: ctx.quiet
105
+ });
106
+ const result = await (0, import_router.runQuery)(ctx, { deliveryProfile: { __args: { id }, ...selection } });
107
+ if (result === void 0) return;
108
+ (0, import_output.printNode)({ node: result.deliveryProfile, format: ctx.format, quiet: ctx.quiet });
109
+ return;
110
+ }
111
+ if (verb === "list") {
112
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
113
+ const first = (0, import_shared.parseFirst)(args.first);
114
+ const after = args.after;
115
+ const reverse = args.reverse;
116
+ const nodeSelection = (0, import_select.resolveSelection)({
117
+ resource: "delivery-profiles",
118
+ view: ctx.view,
119
+ baseSelection: getDeliveryProfileSelection(ctx.view),
120
+ select: args.select,
121
+ selection: args.selection,
122
+ include: args.include,
123
+ ensureId: ctx.quiet
124
+ });
125
+ const result = await (0, import_router.runQuery)(ctx, {
126
+ deliveryProfiles: {
127
+ __args: { first, after, reverse },
128
+ pageInfo: { hasNextPage: true, endCursor: true },
129
+ nodes: nodeSelection
130
+ }
131
+ });
132
+ if (result === void 0) return;
133
+ (0, import_output.printConnection)({
134
+ connection: result.deliveryProfiles,
135
+ format: ctx.format,
136
+ quiet: ctx.quiet,
137
+ nextPageArgs: (0, import_shared.buildListNextPageArgs)("delivery-profiles", { first, reverse })
138
+ });
139
+ return;
140
+ }
141
+ if (verb === "create") {
142
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
143
+ const built = (0, import_input.buildInput)({
144
+ inputArg: args.input,
145
+ setArgs: args.set,
146
+ setJsonArgs: args["set-json"]
147
+ });
148
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
149
+ const result = await (0, import_router.runMutation)(ctx, {
150
+ deliveryProfileCreate: {
151
+ __args: { profile: built.input },
152
+ profile: deliveryProfileSummarySelection,
153
+ userErrors: { field: true, message: true }
154
+ }
155
+ });
156
+ if (result === void 0) return;
157
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryProfileCreate, failOnUserErrors: ctx.failOnUserErrors });
158
+ if (ctx.quiet) return console.log(result.deliveryProfileCreate?.profile?.id ?? "");
159
+ (0, import_output.printJson)(result.deliveryProfileCreate, ctx.format !== "raw");
160
+ return;
161
+ }
162
+ if (verb === "update") {
163
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
164
+ const id = (0, import_shared.requireId)(args.id, "DeliveryProfile");
165
+ const built = (0, import_input.buildInput)({
166
+ inputArg: args.input,
167
+ setArgs: args.set,
168
+ setJsonArgs: args["set-json"]
169
+ });
170
+ if (!built.used) throw new import_errors.CliError("Missing --input or --set/--set-json", 2);
171
+ const result = await (0, import_router.runMutation)(ctx, {
172
+ deliveryProfileUpdate: {
173
+ __args: { id, profile: built.input },
174
+ profile: deliveryProfileSummarySelection,
175
+ userErrors: { field: true, message: true }
176
+ }
177
+ });
178
+ if (result === void 0) return;
179
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryProfileUpdate, failOnUserErrors: ctx.failOnUserErrors });
180
+ if (ctx.quiet) return console.log(result.deliveryProfileUpdate?.profile?.id ?? "");
181
+ (0, import_output.printJson)(result.deliveryProfileUpdate, ctx.format !== "raw");
182
+ return;
183
+ }
184
+ if (verb === "delete") {
185
+ const args = (0, import_router.parseStandardArgs)({ argv, extraOptions: {} });
186
+ const id = (0, import_shared.requireId)(args.id, "DeliveryProfile");
187
+ if (!args.yes) throw new import_errors.CliError("Refusing to delete without --yes", 2);
188
+ const result = await (0, import_router.runMutation)(ctx, {
189
+ deliveryProfileRemove: {
190
+ __args: { id },
191
+ job: { id: true, done: true },
192
+ userErrors: { field: true, message: true }
193
+ }
194
+ });
195
+ if (result === void 0) return;
196
+ (0, import_userErrors.maybeFailOnUserErrors)({ payload: result.deliveryProfileRemove, failOnUserErrors: ctx.failOnUserErrors });
197
+ if (ctx.quiet) return console.log(result.deliveryProfileRemove?.job?.id ?? "");
198
+ (0, import_output.printJson)(result.deliveryProfileRemove, ctx.format !== "raw");
199
+ return;
200
+ }
201
+ throw new import_errors.CliError(`Unknown verb for delivery-profiles: ${verb}`, 2);
202
+ };
203
+ // Annotate the CommonJS export names for ESM import in node:
204
+ 0 && (module.exports = {
205
+ runDeliveryProfiles
206
+ });
207
+ //# sourceMappingURL=delivery-profiles.js.map
@@ -0,0 +1,6 @@
1
+ import { type CommandContext } from '../router';
2
+ export declare const runDeliveryPromises: ({ ctx, verb, argv, }: {
3
+ ctx: CommandContext;
4
+ verb: string;
5
+ argv: string[];
6
+ }) => Promise<void>;