@vtex/faststore 0.0.7 → 0.0.10

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 (498) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/actions.json +194 -1
  3. package/dist/catalog.json +3449 -1612
  4. package/dist/cli/index.d.ts +512 -63
  5. package/dist/cli/index.js +2098 -686
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/cli/server-runtime.js +44 -24
  8. package/dist/cli/server-runtime.js.map +1 -1
  9. package/dist/client.d.ts +5 -1
  10. package/dist/client.js +5 -1
  11. package/dist/components.d.ts +42 -10
  12. package/dist/components.js +47 -15
  13. package/dist/content-types.json +823 -0
  14. package/dist/core/dist/define-component.d.ts +12 -2
  15. package/dist/docs/account-access-gate.md +4 -4
  16. package/dist/docs/account-address-book.md +519 -0
  17. package/dist/docs/account-entry-point.md +5 -5
  18. package/dist/docs/account-menu.md +7 -7
  19. package/dist/docs/account-saved-cards.md +301 -0
  20. package/dist/docs/alert-dialog.md +2 -2
  21. package/dist/docs/billing-address.md +17 -9
  22. package/dist/docs/binding-switcher.md +154 -0
  23. package/dist/docs/card-entry.md +38 -7
  24. package/dist/docs/card-summary.md +175 -0
  25. package/dist/docs/cardholder-document.md +16 -14
  26. package/dist/docs/cart-destination.md +238 -0
  27. package/dist/docs/cart-item.md +22 -4
  28. package/dist/docs/cart-totalizer.md +1 -1
  29. package/dist/docs/cart.md +126 -19
  30. package/dist/docs/client-profile-fieldset.md +7 -5
  31. package/dist/docs/copy-text.md +84 -0
  32. package/dist/docs/document-field.md +8 -8
  33. package/dist/docs/footer-link-group.md +2 -2
  34. package/dist/docs/footer-social.md +1 -1
  35. package/dist/docs/free-shipping-progress.md +13 -9
  36. package/dist/docs/header-root.md +1 -1
  37. package/dist/docs/incentives.md +4 -4
  38. package/dist/docs/logo.md +6 -6
  39. package/dist/docs/my-account-profile.md +4 -4
  40. package/dist/docs/navigation-link-list.md +2 -2
  41. package/dist/docs/navigation-link.md +3 -3
  42. package/dist/docs/order-cancel.md +52 -0
  43. package/dist/docs/order-delivery-address.md +63 -0
  44. package/dist/docs/order-delivery-group.md +83 -0
  45. package/dist/docs/order-details-back.md +41 -0
  46. package/dist/docs/order-details-header.md +48 -0
  47. package/dist/docs/order-list-row.md +46 -0
  48. package/dist/docs/order-list-search.md +101 -0
  49. package/dist/docs/order-list-views.md +97 -0
  50. package/dist/docs/order-list.md +94 -0
  51. package/dist/docs/order-payment.md +94 -0
  52. package/dist/docs/order-placed-date.md +49 -0
  53. package/dist/docs/order-placed-payment-summary.md +13 -15
  54. package/dist/docs/order-placed.md +225 -0
  55. package/dist/docs/order-progress.md +88 -0
  56. package/dist/docs/order-status-badge.md +91 -0
  57. package/dist/docs/order-summary.md +53 -0
  58. package/dist/docs/payment-method-badges.md +16 -5
  59. package/dist/docs/payment-methods.md +1 -1
  60. package/dist/docs/place-order.md +13 -9
  61. package/dist/docs/product-information.md +2 -2
  62. package/dist/docs/product-shelf.md +7 -0
  63. package/dist/docs/saved-cards.md +2 -2
  64. package/dist/docs/select.md +22 -10
  65. package/dist/docs/session.md +1 -1
  66. package/dist/docs/shipping-address.md +1 -1
  67. package/dist/docs/sign-in-redirect.md +7 -7
  68. package/dist/docs/toast.md +35 -13
  69. package/dist/index.d.ts +7 -2
  70. package/dist/index.js +2 -1
  71. package/dist/internal/client.d.ts +9 -1
  72. package/dist/internal/client.js +10 -2
  73. package/dist/internal/server.d.ts +8 -2
  74. package/dist/internal/server.js +8 -2
  75. package/dist/matter/account-access-gate/account-access-gate.d.ts +2 -1
  76. package/dist/matter/account-access-gate/account-access-gate.js +19 -16
  77. package/dist/matter/account-access-gate/account-access-gate.js.map +1 -1
  78. package/dist/matter/account-address-book/account-address-book-delete.d.ts +60 -0
  79. package/dist/matter/account-address-book/account-address-book-delete.js +184 -0
  80. package/dist/matter/account-address-book/account-address-book-delete.js.map +1 -0
  81. package/dist/matter/account-address-book/account-address-book-deliverability.d.ts +19 -0
  82. package/dist/matter/account-address-book/account-address-book-deliverability.js +50 -0
  83. package/dist/matter/account-address-book/account-address-book-deliverability.js.map +1 -0
  84. package/dist/matter/account-address-book/account-address-book-form-parts.d.ts +42 -0
  85. package/dist/matter/account-address-book/account-address-book-form-parts.js +146 -0
  86. package/dist/matter/account-address-book/account-address-book-form-parts.js.map +1 -0
  87. package/dist/matter/account-address-book/account-address-book-profile-notice.d.ts +25 -0
  88. package/dist/matter/account-address-book/account-address-book-profile-notice.js +72 -0
  89. package/dist/matter/account-address-book/account-address-book-profile-notice.js.map +1 -0
  90. package/dist/matter/account-address-book/account-address-book.d.ts +120 -0
  91. package/dist/matter/account-address-book/account-address-book.js +469 -0
  92. package/dist/matter/account-address-book/account-address-book.js.map +1 -0
  93. package/dist/matter/account-address-book/account-address-country-switch.js +59 -0
  94. package/dist/matter/account-address-book/account-address-country-switch.js.map +1 -0
  95. package/dist/matter/account-address-book/account-address-country.d.ts +36 -0
  96. package/dist/matter/account-address-book/account-address-country.js +151 -0
  97. package/dist/matter/account-address-book/account-address-country.js.map +1 -0
  98. package/dist/matter/account-address-book/account-address-first-line.js +11 -0
  99. package/dist/matter/account-address-book/account-address-first-line.js.map +1 -0
  100. package/dist/matter/account-address-book/account-address-form-context.d.ts +55 -0
  101. package/dist/matter/account-address-book/account-address-form-context.js +14 -0
  102. package/dist/matter/account-address-book/account-address-form-context.js.map +1 -0
  103. package/dist/matter/account-address-book/account-address-form.d.ts +85 -0
  104. package/dist/matter/account-address-book/account-address-form.js +946 -0
  105. package/dist/matter/account-address-book/account-address-form.js.map +1 -0
  106. package/dist/matter/account-address-book/account-address-postal-autofill.js +189 -0
  107. package/dist/matter/account-address-book/account-address-postal-autofill.js.map +1 -0
  108. package/dist/matter/account-address-book/account-address-record.d.ts +26 -0
  109. package/dist/matter/account-address-book/account-address-record.js +138 -0
  110. package/dist/matter/account-address-book/account-address-record.js.map +1 -0
  111. package/dist/matter/account-entry-point/account-entry-point.js +11 -11
  112. package/dist/matter/account-entry-point/account-entry-point.js.map +1 -1
  113. package/dist/matter/account-menu/account-menu.d.ts +7 -3
  114. package/dist/matter/account-menu/account-menu.js +69 -28
  115. package/dist/matter/account-menu/account-menu.js.map +1 -1
  116. package/dist/matter/account-saved-cards/account-saved-cards.d.ts +383 -0
  117. package/dist/matter/account-saved-cards/account-saved-cards.js +956 -0
  118. package/dist/matter/account-saved-cards/account-saved-cards.js.map +1 -0
  119. package/dist/matter/billing-address/billing-address.d.ts +30 -17
  120. package/dist/matter/billing-address/billing-address.js +128 -33
  121. package/dist/matter/billing-address/billing-address.js.map +1 -1
  122. package/dist/matter/breadcrumb/breadcrumb.js +2 -2
  123. package/dist/matter/breadcrumb/breadcrumb.js.map +1 -1
  124. package/dist/matter/card-entry/card-capture.js +4 -3
  125. package/dist/matter/card-entry/card-capture.js.map +1 -1
  126. package/dist/matter/card-entry/card-entry.d.ts +5 -3
  127. package/dist/matter/card-entry/card-entry.js +77 -27
  128. package/dist/matter/card-entry/card-entry.js.map +1 -1
  129. package/dist/matter/cardholder-document/cardholder-document.d.ts +10 -9
  130. package/dist/matter/cardholder-document/cardholder-document.js +36 -16
  131. package/dist/matter/cardholder-document/cardholder-document.js.map +1 -1
  132. package/dist/matter/cart/cart-namespace.d.ts +5 -1
  133. package/dist/matter/cart/cart-namespace.js +5 -1
  134. package/dist/matter/cart/cart-namespace.js.map +1 -1
  135. package/dist/matter/cart/cart.d.ts +41 -6
  136. package/dist/matter/cart/cart.js +267 -54
  137. package/dist/matter/cart/cart.js.map +1 -1
  138. package/dist/matter/cart-destination/cart-destination.d.ts +222 -0
  139. package/dist/matter/cart-destination/cart-destination.js +613 -0
  140. package/dist/matter/cart-destination/cart-destination.js.map +1 -0
  141. package/dist/matter/cart-item/cart-item.d.ts +4 -2
  142. package/dist/matter/cart-item/cart-item.js +76 -17
  143. package/dist/matter/cart-item/cart-item.js.map +1 -1
  144. package/dist/matter/cart-totalizer/cart-totalizer.js +3 -2
  145. package/dist/matter/cart-totalizer/cart-totalizer.js.map +1 -1
  146. package/dist/matter/client-preferences/client-preferences-fieldset.js +1 -1
  147. package/dist/matter/client-profile-form/client-profile-fieldset.js +8 -5
  148. package/dist/matter/client-profile-form/client-profile-fieldset.js.map +1 -1
  149. package/dist/matter/free-shipping-progress/free-shipping-progress.d.ts +6 -3
  150. package/dist/matter/free-shipping-progress/free-shipping-progress.js +76 -33
  151. package/dist/matter/free-shipping-progress/free-shipping-progress.js.map +1 -1
  152. package/dist/matter/identity-edit/identity-edit.js +3 -3
  153. package/dist/matter/identity-edit/identity-edit.js.map +1 -1
  154. package/dist/matter/identity-summary/identity-summary.js +2 -2
  155. package/dist/matter/identity-summary/identity-summary.js.map +1 -1
  156. package/dist/matter/my-account-profile/my-account-profile.d.ts +3 -3
  157. package/dist/matter/my-account-profile/my-account-profile.js +4 -4
  158. package/dist/matter/my-account-profile/my-account-profile.js.map +1 -1
  159. package/dist/matter/order-cancel/order-cancel.d.ts +110 -0
  160. package/dist/matter/order-cancel/order-cancel.js +344 -0
  161. package/dist/matter/order-cancel/order-cancel.js.map +1 -0
  162. package/dist/matter/order-delivery-address/order-delivery-address.d.ts +73 -0
  163. package/dist/matter/order-delivery-address/order-delivery-address.js +172 -0
  164. package/dist/matter/order-delivery-address/order-delivery-address.js.map +1 -0
  165. package/dist/matter/order-delivery-group/order-delivery-group.d.ts +128 -0
  166. package/dist/matter/order-delivery-group/order-delivery-group.js +408 -0
  167. package/dist/matter/order-delivery-group/order-delivery-group.js.map +1 -0
  168. package/dist/matter/order-details-header/order-details-header.d.ts +104 -0
  169. package/dist/matter/order-details-header/order-details-header.js +190 -0
  170. package/dist/matter/order-details-header/order-details-header.js.map +1 -0
  171. package/dist/matter/order-list/customer-orders-filter.d.ts +12 -0
  172. package/dist/matter/order-list/customer-orders-filter.js +30 -0
  173. package/dist/matter/order-list/customer-orders-filter.js.map +1 -0
  174. package/dist/matter/order-list/order-list.d.ts +121 -0
  175. package/dist/matter/order-list/order-list.js +395 -0
  176. package/dist/matter/order-list/order-list.js.map +1 -0
  177. package/dist/matter/order-list-row/order-list-row.d.ts +44 -0
  178. package/dist/matter/order-list-row/order-list-row.js +127 -0
  179. package/dist/matter/order-list-row/order-list-row.js.map +1 -0
  180. package/dist/matter/order-list-search/order-list-search.d.ts +72 -0
  181. package/dist/matter/order-list-search/order-list-search.js +296 -0
  182. package/dist/matter/order-list-search/order-list-search.js.map +1 -0
  183. package/dist/matter/order-list-views/order-list-views.d.ts +65 -0
  184. package/dist/matter/order-list-views/order-list-views.js +154 -0
  185. package/dist/matter/order-list-views/order-list-views.js.map +1 -0
  186. package/dist/matter/order-payment/order-payment.d.ts +83 -0
  187. package/dist/matter/order-payment/order-payment.js +258 -0
  188. package/dist/matter/order-payment/order-payment.js.map +1 -0
  189. package/dist/matter/order-placed/order-placed-deliveries.d.ts +145 -0
  190. package/dist/matter/order-placed/order-placed-deliveries.js +380 -0
  191. package/dist/matter/order-placed/order-placed-deliveries.js.map +1 -0
  192. package/dist/matter/order-placed/order-placed.d.ts +122 -0
  193. package/dist/matter/order-placed/order-placed.js +452 -0
  194. package/dist/matter/order-placed/order-placed.js.map +1 -0
  195. package/dist/matter/order-placed-date/order-placed-date.d.ts +45 -0
  196. package/dist/matter/order-placed-date/order-placed-date.js +92 -0
  197. package/dist/matter/order-placed-date/order-placed-date.js.map +1 -0
  198. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.d.ts +5 -8
  199. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js +29 -81
  200. package/dist/matter/order-placed-payment-summary/order-placed-payment-summary.js.map +1 -1
  201. package/dist/matter/order-progress/order-progress.d.ts +85 -0
  202. package/dist/matter/order-progress/order-progress.js +203 -0
  203. package/dist/matter/order-progress/order-progress.js.map +1 -0
  204. package/dist/matter/order-summary/order-summary.d.ts +81 -0
  205. package/dist/matter/order-summary/order-summary.js +192 -0
  206. package/dist/matter/order-summary/order-summary.js.map +1 -0
  207. package/dist/matter/payment/cardholder-document-rule.d.ts +35 -0
  208. package/dist/matter/payment/cardholder-document-rule.js +35 -0
  209. package/dist/matter/payment/cardholder-document-rule.js.map +1 -0
  210. package/dist/matter/payment/payment-card-capture.js +38 -23
  211. package/dist/matter/payment/payment-card-capture.js.map +1 -1
  212. package/dist/matter/payment/payment-controller.js +11 -0
  213. package/dist/matter/payment/payment-controller.js.map +1 -1
  214. package/dist/matter/payment/payment-method-badges.js +4 -2
  215. package/dist/matter/payment/payment-method-badges.js.map +1 -1
  216. package/dist/matter/payment/payment.js +11 -0
  217. package/dist/matter/payment/payment.js.map +1 -1
  218. package/dist/matter/payment/use-payment-method-selection.d.ts +39 -0
  219. package/dist/matter/payment/use-payment-method-selection.js +30 -2
  220. package/dist/matter/payment/use-payment-method-selection.js.map +1 -1
  221. package/dist/matter/payment/use-payment-submit-gate.d.ts +16 -2
  222. package/dist/matter/payment/use-payment-submit-gate.js +42 -14
  223. package/dist/matter/payment/use-payment-submit-gate.js.map +1 -1
  224. package/dist/matter/place-order/place-order.d.ts +12 -7
  225. package/dist/matter/place-order/place-order.js +126 -103
  226. package/dist/matter/place-order/place-order.js.map +1 -1
  227. package/dist/matter/pricing/pricing.js +5 -5
  228. package/dist/matter/pricing/pricing.js.map +1 -1
  229. package/dist/matter/product-shelf/product-shelf.d.ts +7 -0
  230. package/dist/matter/product-shelf/product-shelf.js +115 -1
  231. package/dist/matter/product-shelf/product-shelf.js.map +1 -1
  232. package/dist/matter/region/region.js +1 -1
  233. package/dist/matter/saved-cards/saved-cards.js +26 -15
  234. package/dist/matter/saved-cards/saved-cards.js.map +1 -1
  235. package/dist/matter/session/session.js +2 -2
  236. package/dist/matter/session/session.js.map +1 -1
  237. package/dist/matter/shipping-address/country-descriptors.d.ts +1 -0
  238. package/dist/matter/shipping-address/country-descriptors.js +23 -1
  239. package/dist/matter/shipping-address/country-descriptors.js.map +1 -1
  240. package/dist/matter/shipping-address/shipping-address.js +62 -14
  241. package/dist/matter/shipping-address/shipping-address.js.map +1 -1
  242. package/dist/matter/shipping-simulator/shipping-simulator.d.ts +2 -2
  243. package/dist/matter/shipping-simulator/shipping-simulator.js +6 -2
  244. package/dist/matter/shipping-simulator/shipping-simulator.js.map +1 -1
  245. package/dist/matter/sign-in-redirect/sign-in-redirect.js +48 -10
  246. package/dist/matter/sign-in-redirect/sign-in-redirect.js.map +1 -1
  247. package/dist/matter/variant-selector/variant-selector.js +2 -2
  248. package/dist/matter/variant-selector/variant-selector.js.map +1 -1
  249. package/dist/particles/address-summary/address-summary.js +2 -2
  250. package/dist/particles/address-summary/address-summary.js.map +1 -1
  251. package/dist/particles/alert-dialog/alert-dialog.d.ts +5 -1
  252. package/dist/particles/alert-dialog/alert-dialog.js +5 -2
  253. package/dist/particles/alert-dialog/alert-dialog.js.map +1 -1
  254. package/dist/particles/binding-switcher/binding-switcher.d.ts +38 -0
  255. package/dist/particles/binding-switcher/binding-switcher.js +183 -0
  256. package/dist/particles/binding-switcher/binding-switcher.js.map +1 -0
  257. package/dist/particles/card-summary/card-network.d.ts +17 -0
  258. package/dist/particles/card-summary/card-network.js +25 -0
  259. package/dist/particles/card-summary/card-network.js.map +1 -0
  260. package/dist/particles/card-summary/card-summary.d.ts +83 -0
  261. package/dist/particles/card-summary/card-summary.js +188 -0
  262. package/dist/particles/card-summary/card-summary.js.map +1 -0
  263. package/dist/particles/copy-text/copy-text.d.ts +28 -0
  264. package/dist/particles/copy-text/copy-text.js +140 -0
  265. package/dist/particles/copy-text/copy-text.js.map +1 -0
  266. package/dist/particles/document-field/document-field.d.ts +34 -5
  267. package/dist/particles/document-field/document-field.js +115 -19
  268. package/dist/particles/document-field/document-field.js.map +1 -1
  269. package/dist/particles/field/field.js +1 -1
  270. package/dist/particles/field/field.js.map +1 -1
  271. package/dist/particles/footer-link-group/footer-link-group.d.ts +6 -2
  272. package/dist/particles/footer-link-group/footer-link-group.js +18 -7
  273. package/dist/particles/footer-link-group/footer-link-group.js.map +1 -1
  274. package/dist/particles/footer-social/footer-social.d.ts +1 -1
  275. package/dist/particles/footer-social/footer-social.js +1 -1
  276. package/dist/particles/footer-social/footer-social.js.map +1 -1
  277. package/dist/particles/incentives/incentives.d.ts +7 -3
  278. package/dist/particles/incentives/incentives.js +8 -3
  279. package/dist/particles/incentives/incentives.js.map +1 -1
  280. package/dist/particles/logo/logo.d.ts +3 -2
  281. package/dist/particles/logo/logo.js +20 -8
  282. package/dist/particles/logo/logo.js.map +1 -1
  283. package/dist/particles/navigation-link/navigation-link.d.ts +2 -3
  284. package/dist/particles/navigation-link/navigation-link.js +4 -4
  285. package/dist/particles/navigation-link/navigation-link.js.map +1 -1
  286. package/dist/particles/navigation-link-list/navigation-link-list.d.ts +6 -2
  287. package/dist/particles/navigation-link-list/navigation-link-list.js +18 -7
  288. package/dist/particles/navigation-link-list/navigation-link-list.js.map +1 -1
  289. package/dist/particles/order-details-back/order-details-back.d.ts +28 -0
  290. package/dist/particles/order-details-back/order-details-back.js +52 -0
  291. package/dist/particles/order-details-back/order-details-back.js.map +1 -0
  292. package/dist/particles/order-status-badge/order-status-badge.d.ts +19 -0
  293. package/dist/particles/order-status-badge/order-status-badge.js +50 -0
  294. package/dist/particles/order-status-badge/order-status-badge.js.map +1 -0
  295. package/dist/particles/payment-methods/payment-methods.d.ts +1 -1
  296. package/dist/particles/payment-methods/payment-methods.js +1 -1
  297. package/dist/particles/payment-methods/payment-methods.js.map +1 -1
  298. package/dist/particles/phone-field/phone-field.js +2 -2
  299. package/dist/particles/phone-field/phone-field.js.map +1 -1
  300. package/dist/particles/select/select.js +6 -6
  301. package/dist/particles/select/select.js.map +1 -1
  302. package/dist/particles/toast/toast.d.ts +21 -7
  303. package/dist/particles/toast/toast.js +76 -8
  304. package/dist/particles/toast/toast.js.map +1 -1
  305. package/dist/schema.graphql +1376 -126
  306. package/dist/sdk/actions/address-action-provider.d.ts +16 -0
  307. package/dist/sdk/actions/address-action-provider.js +20 -0
  308. package/dist/sdk/actions/address-action-provider.js.map +1 -0
  309. package/dist/sdk/actions/analytics-action-provider.js +1 -1
  310. package/dist/sdk/actions/index.d.ts +5 -1
  311. package/dist/sdk/actions/index.js +5 -1
  312. package/dist/sdk/actions/locale-action-provider.d.ts +16 -0
  313. package/dist/sdk/actions/locale-action-provider.js +20 -0
  314. package/dist/sdk/actions/locale-action-provider.js.map +1 -0
  315. package/dist/sdk/actions/order-action-provider.d.ts +12 -0
  316. package/dist/sdk/actions/order-action-provider.js +16 -0
  317. package/dist/sdk/actions/order-action-provider.js.map +1 -0
  318. package/dist/sdk/actions/saved-card-action-provider.d.ts +12 -0
  319. package/dist/sdk/actions/saved-card-action-provider.js +16 -0
  320. package/dist/sdk/actions/saved-card-action-provider.js.map +1 -0
  321. package/dist/sdk/actions/types.d.ts +10 -2
  322. package/dist/sdk/address/address-fields.js +38 -0
  323. package/dist/sdk/address/address-fields.js.map +1 -0
  324. package/dist/sdk/address/checkout-readiness.js +17 -0
  325. package/dist/sdk/address/checkout-readiness.js.map +1 -0
  326. package/dist/sdk/address/constants.js +60 -0
  327. package/dist/sdk/address/constants.js.map +1 -0
  328. package/dist/sdk/address/country-display.js +19 -0
  329. package/dist/sdk/address/country-display.js.map +1 -0
  330. package/dist/sdk/address/country-rules.js +30 -0
  331. package/dist/sdk/address/country-rules.js.map +1 -0
  332. package/dist/sdk/address/format-address.js +18 -0
  333. package/dist/sdk/address/format-address.js.map +1 -0
  334. package/dist/sdk/address/iso-countries.js +262 -0
  335. package/dist/sdk/address/iso-countries.js.map +1 -0
  336. package/dist/sdk/address/layouts.js +56 -0
  337. package/dist/sdk/address/layouts.js.map +1 -0
  338. package/dist/sdk/address/messages.js +97 -0
  339. package/dist/sdk/address/messages.js.map +1 -0
  340. package/dist/sdk/address/operations.d.ts +54 -0
  341. package/dist/sdk/address/operations.js +83 -0
  342. package/dist/sdk/address/operations.js.map +1 -0
  343. package/dist/sdk/address/postal-code-lookup-operations.js +23 -0
  344. package/dist/sdk/address/postal-code-lookup-operations.js.map +1 -0
  345. package/dist/sdk/address/postal-code.js +11 -0
  346. package/dist/sdk/address/postal-code.js.map +1 -0
  347. package/dist/sdk/address/schema.js +14 -0
  348. package/dist/sdk/address/schema.js.map +1 -0
  349. package/dist/sdk/address/server-fields.js +25 -0
  350. package/dist/sdk/address/server-fields.js.map +1 -0
  351. package/dist/sdk/address/switch-country.js +57 -0
  352. package/dist/sdk/address/switch-country.js.map +1 -0
  353. package/dist/sdk/address/types.d.ts +26 -0
  354. package/dist/sdk/address/use-address-actions.d.ts +29 -0
  355. package/dist/sdk/address/use-address-actions.js +247 -0
  356. package/dist/sdk/address/use-address-actions.js.map +1 -0
  357. package/dist/sdk/address/use-address-by-postal-code.js +57 -0
  358. package/dist/sdk/address/use-address-by-postal-code.js.map +1 -0
  359. package/dist/sdk/address/validate-address.js +62 -0
  360. package/dist/sdk/address/validate-address.js.map +1 -0
  361. package/dist/sdk/cache/storefront-cache.js +30 -4
  362. package/dist/sdk/cache/storefront-cache.js.map +1 -1
  363. package/dist/sdk/cart/operations.d.ts +2 -1
  364. package/dist/sdk/cart/operations.js +55 -1
  365. package/dist/sdk/cart/operations.js.map +1 -1
  366. package/dist/sdk/cart/optimistic.d.ts +30 -7
  367. package/dist/sdk/cart/optimistic.js +78 -41
  368. package/dist/sdk/cart/optimistic.js.map +1 -1
  369. package/dist/sdk/cart/use-cart-actions.d.ts +7 -0
  370. package/dist/sdk/cart/use-cart-actions.js +61 -15
  371. package/dist/sdk/cart/use-cart-actions.js.map +1 -1
  372. package/dist/sdk/cart/use-cart-sync-sales-channel.js +70 -0
  373. package/dist/sdk/cart/use-cart-sync-sales-channel.js.map +1 -0
  374. package/dist/sdk/client/fetch-page-data.d.ts +11 -0
  375. package/dist/sdk/client/fetch-page-data.js +12 -1
  376. package/dist/sdk/client/fetch-page-data.js.map +1 -1
  377. package/dist/sdk/content/create-content-runtime.js +1 -8
  378. package/dist/sdk/content/create-content-runtime.js.map +1 -1
  379. package/dist/sdk/data/failed-fields.js +23 -0
  380. package/dist/sdk/data/failed-fields.js.map +1 -0
  381. package/dist/sdk/data/index.js +2 -2
  382. package/dist/sdk/data/page-reactive-data-root.d.ts +45 -7
  383. package/dist/sdk/data/page-reactive-data-root.js +88 -12
  384. package/dist/sdk/data/page-reactive-data-root.js.map +1 -1
  385. package/dist/sdk/data/reactive-list-item-data-provider.js +2 -2
  386. package/dist/sdk/generated/fragment-types.js +2 -0
  387. package/dist/sdk/generated/fragment-types.js.map +1 -1
  388. package/dist/sdk/generated/gql.js +17 -11
  389. package/dist/sdk/generated/gql.js.map +1 -1
  390. package/dist/sdk/generated/graphql.d.ts +185 -46
  391. package/dist/sdk/generated/graphql.js +2587 -155
  392. package/dist/sdk/generated/graphql.js.map +1 -1
  393. package/dist/sdk/i18n/messages/en-US.js +157 -1
  394. package/dist/sdk/i18n/messages/en-US.json +157 -1
  395. package/dist/sdk/i18n/messages/en-US.json.d.ts +156 -0
  396. package/dist/sdk/i18n/messages/es-ES.js +157 -1
  397. package/dist/sdk/i18n/messages/es-ES.json +157 -1
  398. package/dist/sdk/i18n/messages/pt-BR.js +157 -1
  399. package/dist/sdk/i18n/messages/pt-BR.json +157 -1
  400. package/dist/sdk/i18n/provider.js +1 -1
  401. package/dist/sdk/i18n/provider.js.map +1 -1
  402. package/dist/sdk/locale/binding-switch-provider.d.ts +13 -0
  403. package/dist/sdk/locale/binding-switch-provider.js +20 -0
  404. package/dist/sdk/locale/binding-switch-provider.js.map +1 -0
  405. package/dist/sdk/locale/use-locale-actions.d.ts +16 -0
  406. package/dist/sdk/locale/use-locale-actions.js +70 -0
  407. package/dist/sdk/locale/use-locale-actions.js.map +1 -0
  408. package/dist/sdk/navigation/binding-switch.d.ts +39 -0
  409. package/dist/sdk/navigation/binding-switch.js +129 -0
  410. package/dist/sdk/navigation/binding-switch.js.map +1 -0
  411. package/dist/sdk/navigation/current-page.js +30 -0
  412. package/dist/sdk/navigation/current-page.js.map +1 -0
  413. package/dist/sdk/navigation/decode-route-params.d.ts +11 -0
  414. package/dist/sdk/navigation/decode-route-params.js +32 -0
  415. package/dist/sdk/navigation/decode-route-params.js.map +1 -0
  416. package/dist/sdk/navigation/not-found-log.d.ts +28 -0
  417. package/dist/sdk/navigation/not-found-log.js +133 -0
  418. package/dist/sdk/navigation/not-found-log.js.map +1 -0
  419. package/dist/sdk/navigation/path.js +25 -0
  420. package/dist/sdk/navigation/path.js.map +1 -0
  421. package/dist/sdk/navigation/redirect.d.ts +11 -0
  422. package/dist/sdk/navigation/redirect.js +22 -0
  423. package/dist/sdk/navigation/redirect.js.map +1 -0
  424. package/dist/sdk/navigation/report.js +70 -0
  425. package/dist/sdk/navigation/report.js.map +1 -0
  426. package/dist/sdk/navigation/resolve-storefront-href.d.ts +12 -0
  427. package/dist/sdk/navigation/resolve-storefront-href.js +214 -0
  428. package/dist/sdk/navigation/resolve-storefront-href.js.map +1 -0
  429. package/dist/sdk/navigation/route-identity-provider.d.ts +11 -0
  430. package/dist/sdk/navigation/route-identity-provider.js +20 -0
  431. package/dist/sdk/navigation/route-identity-provider.js.map +1 -0
  432. package/dist/sdk/navigation/route-map-provider.d.ts +19 -0
  433. package/dist/sdk/navigation/route-map-provider.js +29 -0
  434. package/dist/sdk/navigation/route-map-provider.js.map +1 -0
  435. package/dist/sdk/navigation/storefront-link.d.ts +16 -0
  436. package/dist/sdk/navigation/storefront-link.js +66 -0
  437. package/dist/sdk/navigation/storefront-link.js.map +1 -0
  438. package/dist/sdk/navigation/types.d.ts +45 -0
  439. package/dist/sdk/navigation/use-storefront-navigation.d.ts +26 -0
  440. package/dist/sdk/navigation/use-storefront-navigation.js +73 -0
  441. package/dist/sdk/navigation/use-storefront-navigation.js.map +1 -0
  442. package/dist/sdk/navigation/use-storefront-route.d.ts +26 -0
  443. package/dist/sdk/navigation/use-storefront-route.js +87 -0
  444. package/dist/sdk/navigation/use-storefront-route.js.map +1 -0
  445. package/dist/sdk/navigation/use-storefront-search-params.d.ts +11 -0
  446. package/dist/sdk/navigation/use-storefront-search-params.js +16 -0
  447. package/dist/sdk/navigation/use-storefront-search-params.js.map +1 -0
  448. package/dist/sdk/orders/completion-badge.d.ts +8 -0
  449. package/dist/sdk/orders/completion-badge.js +47 -0
  450. package/dist/sdk/orders/completion-badge.js.map +1 -0
  451. package/dist/sdk/orders/order-operations.d.ts +19 -0
  452. package/dist/sdk/orders/order-operations.js +21 -0
  453. package/dist/sdk/orders/order-operations.js.map +1 -0
  454. package/dist/sdk/orders/use-order-actions.d.ts +23 -0
  455. package/dist/sdk/orders/use-order-actions.js +62 -0
  456. package/dist/sdk/orders/use-order-actions.js.map +1 -0
  457. package/dist/sdk/payment/gateway-origin.js +26 -13
  458. package/dist/sdk/payment/gateway-origin.js.map +1 -1
  459. package/dist/sdk/payment/gateway.d.ts +14 -2
  460. package/dist/sdk/payment/gateway.js +32 -14
  461. package/dist/sdk/payment/gateway.js.map +1 -1
  462. package/dist/sdk/payment/operations.js +11 -0
  463. package/dist/sdk/payment/operations.js.map +1 -1
  464. package/dist/sdk/payment/submission-registry.d.ts +2 -1
  465. package/dist/sdk/payment/submission-registry.js +12 -8
  466. package/dist/sdk/payment/submission-registry.js.map +1 -1
  467. package/dist/sdk/payment/use-payment-actions.d.ts +5 -3
  468. package/dist/sdk/payment/use-payment-actions.js +5 -2
  469. package/dist/sdk/payment/use-payment-actions.js.map +1 -1
  470. package/dist/sdk/payment/use-place-order.d.ts +6 -3
  471. package/dist/sdk/payment/use-place-order.js +333 -143
  472. package/dist/sdk/payment/use-place-order.js.map +1 -1
  473. package/dist/sdk/saved-cards/operations.d.ts +16 -0
  474. package/dist/sdk/saved-cards/operations.js +41 -0
  475. package/dist/sdk/saved-cards/operations.js.map +1 -0
  476. package/dist/sdk/saved-cards/use-saved-card-actions.d.ts +26 -0
  477. package/dist/sdk/saved-cards/use-saved-card-actions.js +86 -0
  478. package/dist/sdk/saved-cards/use-saved-card-actions.js.map +1 -0
  479. package/dist/sdk/seo/page-alternates.d.ts +57 -0
  480. package/dist/sdk/seo/page-alternates.js +127 -0
  481. package/dist/sdk/seo/page-alternates.js.map +1 -0
  482. package/dist/sdk/shipping/shipping-operations.d.ts +1 -1
  483. package/dist/sdk/shipping/shipping-operations.js +13 -0
  484. package/dist/sdk/shipping/shipping-operations.js.map +1 -1
  485. package/dist/sdk/state/cart.d.ts +9 -2
  486. package/dist/sdk/state/cart.js +9 -2
  487. package/dist/sdk/state/cart.js.map +1 -1
  488. package/dist/utils/own-value.js +19 -0
  489. package/dist/utils/own-value.js.map +1 -0
  490. package/dist/utils/safe-href.d.ts +4 -4
  491. package/dist/utils/safe-href.js +31 -22
  492. package/dist/utils/safe-href.js.map +1 -1
  493. package/package.json +5 -1
  494. package/skills/storefront-asset/SKILL.md +111 -0
  495. package/skills/storefront-asset/references/api-side.md +153 -0
  496. package/skills/storefront-asset/references/findings.md +40 -0
  497. package/skills/storefront-asset/references/ui-side.md +94 -0
  498. package/src/styles/tailwind.css +28 -2
@@ -1,5 +1,365 @@
1
1
  import { GraphQLFieldResolver, GraphQLScalarType, GraphQLSchema } from "graphql";
2
- import * as esbuild from "esbuild";
2
+ //#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/finding.d.ts
3
+ type Severity = 'error' | 'warning' | 'info';
4
+ /** A place in a file, 1-based, as editors show it. */
5
+ type Position = {
6
+ line: number;
7
+ column: number;
8
+ };
9
+ type Range = {
10
+ start: Position;
11
+ end: Position;
12
+ };
13
+ /**
14
+ * Every result of a check, from the core or from a kind provider (RFC-0003 §Conventions). It renders
15
+ * as text, as JSON and as an editor problem.
16
+ */
17
+ type Finding = {
18
+ /** Stable, kebab-case: what was found, not where. */
19
+ code: string;
20
+ severity: Severity;
21
+ message: string;
22
+ /** A JSON pointer inside `file`; `''` is the whole file. */
23
+ path: string;
24
+ /** Relative to the Account Repo root. */
25
+ file: string;
26
+ range?: Range;
27
+ /** One line that says what the available fix does. */
28
+ fix?: string;
29
+ /** A URL that explains the rule. */
30
+ docs: string;
31
+ };
32
+ //#endregion
33
+ //#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/command.d.ts
34
+ /**
35
+ * A flag a command declares. The core adds the global flags, gives every flag a
36
+ * `VTEX_EXTENSION_FLAG_*` variable, and applies `default`, `required` and `options`.
37
+ */
38
+ type FlagDefinition = {
39
+ type: 'boolean';
40
+ description: string;
41
+ default?: boolean;
42
+ } | {
43
+ type: 'string';
44
+ description: string;
45
+ default?: string;
46
+ required?: boolean;
47
+ options?: readonly string[];
48
+ };
49
+ /** Resolved flag values by flag name: from argv, then the variable, then `default`. */
50
+ type FlagValues = Record<string, string | boolean | undefined>;
51
+ /**
52
+ * What `run` returns: data, or the Findings of a check. `text` is the data as a terminal shows it;
53
+ * without it the core prints the data as JSON.
54
+ */
55
+ type CommandResult<T = unknown> = {
56
+ data: T;
57
+ text?: string;
58
+ } | {
59
+ findings: Finding[];
60
+ };
61
+ /**
62
+ * A command as plain data. The core parses its flags, renders its result and sets the exit code;
63
+ * `run` never prints.
64
+ */
65
+ type CommandDefinition<Input, Context> = {
66
+ /** A kebab-case verb. */
67
+ name: string;
68
+ /** One sentence, shown in every command list. */
69
+ summary: string;
70
+ description?: string;
71
+ /** Full command lines, starting with `vtex extension <name>`, without a `$`. */
72
+ examples: readonly string[];
73
+ flags: Record<string, FlagDefinition>;
74
+ run(input: Input, ctx: Context): Promise<CommandResult>;
75
+ };
76
+ //#endregion
77
+ //#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/kinds.d.ts
78
+ /** RFC-0001's closed set of kinds. A new kind arrives by its own RFC. */
79
+ export declare const kinds: readonly ['storefront', 'widget', 'instructions', 'workflow', 'agent', 'function'];
80
+ /** One of the six kinds an `asset.yaml` may declare. */
81
+ type Kind = (typeof kinds)[number];
82
+ //#endregion
83
+ //#region ../../node_modules/.pnpm/@vtex+extension-cli-kit@0.1.1/node_modules/@vtex/extension-cli-kit/dist/provider.d.ts
84
+ /**
85
+ * The kind provider contract version this kit describes. A provider declares the version it
86
+ * implements as `contract`; the CLI checks it against the range it supports.
87
+ */
88
+ export declare const providerContractVersion = 0;
89
+ /** A JSON Schema (draft 2020-12), as a plain value. */
90
+ type JsonSchema = boolean | Readonly<Record<string, unknown>>;
91
+ /** One Asset as a provider sees it: plain data, a copy. Its envelope is valid. */
92
+ type ProviderAsset = {
93
+ /** `<ext>/<asset>`, as targets name it. */
94
+ target: string;
95
+ /** Its extension; `path` is `extensions/<folder>`. */
96
+ extension: {
97
+ name: string;
98
+ vendor?: string;
99
+ version?: string;
100
+ path: string;
101
+ };
102
+ name: string;
103
+ kind: Kind;
104
+ apiVersion: string;
105
+ /** The Asset's folder, absolute. */
106
+ dir: string;
107
+ /** Its `asset.yaml`, relative to the Account Repo root: the `file` of a Finding about it. */
108
+ file: string;
109
+ /** Relative to the extension's folder. */
110
+ path: string;
111
+ /** On disk, not listed in the inventory. */
112
+ staged: boolean;
113
+ /** The whole `asset.yaml` value, envelope included. */
114
+ manifest: Readonly<Record<string, unknown>>;
115
+ /** The Asset folder's own `package.json`, when it has one. */
116
+ packageJson?: Readonly<Record<string, unknown>>;
117
+ /**
118
+ * In `dev`, `build` and kind commands, the Asset's environment: `.env` then `.env.local` in the
119
+ * repo root, the extension's folder and the Asset's folder (a later file wins), then the
120
+ * environment the CLI runs with, which wins. Absent in `validate`.
121
+ */
122
+ env?: Readonly<Record<string, string>>;
123
+ };
124
+ /** One Asset a provider build gets: a `ProviderAsset` with the folder to write into. */
125
+ type BuildAsset = ProviderAsset & {
126
+ /**
127
+ * Where to write the Asset's output, absolute: its staging folder,
128
+ * `<output root>/<ext>/<asset>.building/`. The core creates it empty before the call, renames it
129
+ * to the Asset's output folder, `<output root>/<ext>/<asset>/`, when the Asset is built, and
130
+ * removes it when the Asset fails. Do not record this path in the output: it is gone once the
131
+ * Asset is built.
132
+ */
133
+ outDir: string;
134
+ };
135
+ /** The whole Account Repo as plain data: inventory Assets only, no YAML objects. */
136
+ type ProviderRepo = {
137
+ /** Absolute. */
138
+ root: string;
139
+ accounts: readonly {
140
+ name?: string;
141
+ /** `stores/<store>`. */
142
+ store?: string;
143
+ /** The `installed:` entries as written, `vendor.name@<range>`. */
144
+ installed: readonly string[];
145
+ }[];
146
+ extensions: readonly {
147
+ name: string;
148
+ vendor?: string;
149
+ version?: string;
150
+ /** `extensions/<folder>`. */
151
+ path: string;
152
+ /** In inventory order. `path` is relative to the extension's folder. */
153
+ assets: readonly {
154
+ name?: string;
155
+ kind?: string;
156
+ path: string;
157
+ packageName?: string;
158
+ }[];
159
+ }[];
160
+ stores: readonly {
161
+ name: string;
162
+ /** `stores/<name>`. */
163
+ path: string;
164
+ packageName?: string;
165
+ /** The keys of its `package.json › dependencies`. */
166
+ dependencies: readonly string[];
167
+ }[];
168
+ };
169
+ /** Everything the core hands a provider. */
170
+ type ProviderContext = {
171
+ /** The Account Repo root, absolute. */
172
+ root: string;
173
+ repo: ProviderRepo;
174
+ /** `--account`, when given. */
175
+ account?: string;
176
+ /**
177
+ * Environment for code the provider runs. `{}` in `validate`. In `dev`, `build` and kind
178
+ * commands, the repo root's `.env` and `.env.local`, then the environment the CLI runs with. Each
179
+ * Asset's own is `ProviderAsset.env`.
180
+ */
181
+ env: Readonly<Record<string, string>>;
182
+ /** A progress message. The core labels it with the provider and routes it; a provider never prints. */
183
+ log(message: string): void;
184
+ };
185
+ /**
186
+ * One RFC 6902 operation on the `asset.yaml` a Finding names, by JSON pointer into its kind body.
187
+ * The core never applies one to an envelope field (`apiVersion`, `name`, `kind`, `policies`).
188
+ */
189
+ type PatchOperation = {
190
+ op: 'add' | 'replace';
191
+ path: string;
192
+ value: unknown;
193
+ } | {
194
+ op: 'remove';
195
+ path: string;
196
+ };
197
+ /**
198
+ * What `validate` and `build` return: a Finding that, with `fix`, may carry the edits that apply
199
+ * it. The core drops a `patch` from a `build` Finding.
200
+ */
201
+ type ProviderFinding = Finding & {
202
+ patch?: readonly PatchOperation[];
203
+ };
204
+ /** What a template is written for. */
205
+ type TemplateInput = {
206
+ vendor: string;
207
+ extension: string;
208
+ asset: string;
209
+ /**
210
+ * The new Asset's `package.json › name`, `@<vendor>/<extension>-<asset>`. A declarative Asset has
211
+ * no `package.json`: this is the name it would have.
212
+ */
213
+ packageName: string;
214
+ apiVersion: string;
215
+ };
216
+ /** The `package.json` fields a template's `packages` installs into. */
217
+ type TemplateDependencyField = 'dependencies' | 'devDependencies' | 'peerDependencies';
218
+ /** The packages a template installs, by dependency field: package name → spec, as `pnpm add` takes it. */
219
+ type TemplatePackages = Readonly<Partial<Record<TemplateDependencyField, Readonly<Record<string, string>>>>>;
220
+ /** What `vtex extension add --kind <kind> --template <name>` writes for a new Asset. */
221
+ type Template = {
222
+ /** Kebab-case. `default` is the one `add` uses without `--template`. */
223
+ name: string;
224
+ /** One sentence, shown in a list of templates. */
225
+ summary: string;
226
+ /**
227
+ * The kind body fields of the new `asset.yaml`, below the envelope: never `apiVersion`, `name`,
228
+ * `kind` or `policies`.
229
+ */
230
+ body(input: TemplateInput): Record<string, unknown>;
231
+ /**
232
+ * Files to write, by path relative to the Asset's folder (`/`-separated) → content. Never
233
+ * `asset.yaml` or `package.json`, which the core writes. The core never overwrites a file.
234
+ */
235
+ files?(input: TemplateInput): Record<string, string>;
236
+ /**
237
+ * For a runnable kind: the packages `add` installs into the new Asset's package once the body
238
+ * and files are written, by dependency field, each `<name>: <spec>`. One `pnpm add` per field,
239
+ * plain for `dependencies` and `-D` for the other two, so `package.json` records the range pnpm
240
+ * writes for a dependency or a devDependency. A peer is different: `add` writes its range to
241
+ * `peerDependencies` as given, since it declares what the host must have, and `pnpm add -D`
242
+ * installs its dev copy. Never the kind's SDK, which `add` installs before it loads the provider.
243
+ * A declarative kind's template has none: its Asset has no `package.json`.
244
+ */
245
+ packages?: TemplatePackages;
246
+ /**
247
+ * For a runnable kind: other `package.json` fields `add` sets in the new Asset's package, such as
248
+ * `type`, `exports` and `scripts`, merged at the top level as plain JSON. Never `name`, `version`
249
+ * or `private`, which the core writes, nor a dependency field (`dependencies`, `devDependencies`,
250
+ * `peerDependencies`, `optionalDependencies`), which `packages` and pnpm own. A declarative
251
+ * kind's template has none.
252
+ */
253
+ packageJson?: Readonly<Record<string, unknown>>;
254
+ };
255
+ /**
256
+ * A provider skill: an Agent Skills folder that teaches a coding agent working in the Account Repo
257
+ * how to write Assets of the kind. The folder ships in the provider's package and holds a
258
+ * `SKILL.md`, plus any file it points to. `vtex extension skills`, and `add` when you agree, copy it
259
+ * to `.agents/skills/<name>/` and link `.claude/skills/<name>` to that copy.
260
+ */
261
+ type ProviderSkill = {
262
+ /** Kebab-case, as `SKILL.md`'s `name`; the folder name in the repo. Prefix it with the kind. */
263
+ name: string;
264
+ /** The folder in the provider's package, absolute: `fileURLToPath(new URL(..., import.meta.url))`. */
265
+ dir: string;
266
+ };
267
+ /**
268
+ * How far an Asset of a dev session has come. The core sets `starting` right before it calls the
269
+ * provider instance's `dev`; the adapter reports `ready` or `failed`. Provisional, as the session
270
+ * file is.
271
+ */
272
+ type AssetState = 'starting' | 'ready' | 'failed';
273
+ /**
274
+ * What a dev adapter reports through, by Asset target (`<ext>/<asset>`), for the Assets its `dev`
275
+ * was handed. The core writes each status and Findings change to the session file and prints every
276
+ * call in the session's stream. A call for another Asset, a state outside `AssetState`, or
277
+ * `details` JSON cannot hold is ignored, with a line in the stream saying why; calls after the
278
+ * session stopped are ignored. Provisional.
279
+ */
280
+ type DevSession = {
281
+ /** One line, or several, in the stream under the Asset's target. */
282
+ log(target: string, message: string): void;
283
+ /** The Asset's state; `details` (a URL, the functions it serves) replaces the last ones. */
284
+ status(target: string, state: AssetState, details?: Readonly<Record<string, unknown>>): void;
285
+ /**
286
+ * Replaces the Asset's Findings. Each one is checked as `validate` checks a provider's; an
287
+ * invalid one becomes a `provider-invalid` Finding. A `patch` is dropped.
288
+ */
289
+ findings(target: string, findings: readonly Finding[]): void;
290
+ };
291
+ /**
292
+ * A running dev adapter. The core calls `stop` once, when the session ends (Ctrl-C), for every
293
+ * adapter at the same time, and waits for it. A rejection is reported, never retried. Provisional.
294
+ */
295
+ type AdapterHandle = {
296
+ stop(): Promise<void>;
297
+ };
298
+ /** What a kind command runs on: the provider instance's selected Assets and the parsed flags. */
299
+ type KindCommandInput = {
300
+ /** The selected Assets of the kind that load this provider instance, in repo order. */
301
+ assets: readonly ProviderAsset[];
302
+ /**
303
+ * The verb's own flags only, resolved: argv, then `VTEX_EXTENSION_FLAG_*`, then `default`.
304
+ * `--account` reaches the verb as `ctx.account`.
305
+ */
306
+ flags: FlagValues;
307
+ };
308
+ /**
309
+ * A verb a provider adds under `vtex extension <kind> <verb>`. Its `name` is kebab-case and unique
310
+ * among the provider's commands; it has a `summary` and at least one example, each starting with
311
+ * `vtex extension <kind> <name>`. Its `flags` are kebab-case, and none is `json`, `quiet`,
312
+ * `fields`, `dry-run`, `yes`, `account` or `help`, which the core owns. The core runs it once per
313
+ * provider instance, with that instance's selected Assets. `run` returns data, which the core
314
+ * prints as the command's output, or Findings, which it renders as `validate` does (a `patch` is
315
+ * ignored). With Assets on several SDK versions, the output is one item per provider instance.
316
+ */
317
+ type KindCommand = CommandDefinition<KindCommandInput, ProviderContext>;
318
+ /**
319
+ * The code that understands one kind (RFC-0003 §The kind provider contract). A runnable kind's
320
+ * provider is the default export of its SDK's `./cli` entry; a declarative kind's comes from the
321
+ * declarative package at the repo root, as the default export of its `./<kind>/cli` entry.
322
+ * The core calls `validate`, `dev`, `build` and kind commands once per provider instance, with all
323
+ * of that instance's selected Assets.
324
+ */
325
+ type KindProvider = {
326
+ /** The contract version it implements. */
327
+ contract: typeof providerContractVersion;
328
+ kind: Kind;
329
+ /** The `asset.yaml` apiVersions it understands. */
330
+ apiVersions: readonly string[];
331
+ /** Where the kind is documented; layer-3 Findings link here. */
332
+ docs: string;
333
+ /** The kind body's schema: `asset.yaml` without `apiVersion`, `name`, `kind` and `policies`. */
334
+ schema(apiVersion: string): JsonSchema;
335
+ templates: readonly Template[];
336
+ /** The provider skills it offers; none when absent. */
337
+ skills?: readonly ProviderSkill[];
338
+ /** Kind lints. Never prints and never writes; a Finding with `fix` may carry a `patch`. */
339
+ validate?(assets: readonly ProviderAsset[], ctx: ProviderContext): ProviderFinding[] | Promise<ProviderFinding[]>;
340
+ /**
341
+ * Starts one dev adapter for all of its Assets in a dev session (`vtex extension dev`), or says
342
+ * it has nothing to run (`'none'`). Called once per provider instance, with the instance's
343
+ * selected Assets that passed validation, in repo order, each with its `env`; the instances start
344
+ * side by side. It reports through `session` and never prints. A throw or a rejection is a
345
+ * `provider-failed` Finding on each of its Assets, which then do not start; the session goes on
346
+ * with the others. Provisional.
347
+ */
348
+ dev?(assets: readonly ProviderAsset[], session: DevSession, ctx: ProviderContext): Promise<AdapterHandle> | 'none';
349
+ /**
350
+ * Builds its Assets for `vtex extension build`. Called once per provider instance, with the
351
+ * instance's selected Assets that validation did not block, in repo order, each with its `env`
352
+ * and `outDir`, the staging folder the core renames to the Asset's output folder once the Asset
353
+ * is built; the instances build side by side. It writes each Asset's output into its `outDir`
354
+ * only, and never prints. It returns Findings, checked as `validate`'s; a `patch` is
355
+ * dropped. A throw or a rejection is `provider-failed`, and a return that is not a list of valid
356
+ * Findings is `provider-invalid`, on each of its Assets. Absent: its Assets have nothing to build.
357
+ */
358
+ build?(assets: readonly BuildAsset[], ctx: ProviderContext): ProviderFinding[] | Promise<ProviderFinding[]>;
359
+ /** Verbs only this kind has: `vtex extension <kind> <verb>` runs them. */
360
+ commands?: readonly KindCommand[];
361
+ };
362
+ //#endregion
3
363
  //#region ../graphql-compose/dist/subgraph-names.d.ts
4
364
  /**
5
365
  * Subgraph name the bundled core SDL is composed under. Shared by the composer
@@ -9,59 +369,102 @@ import * as esbuild from "esbuild";
9
369
  */
10
370
  export declare const CORE_SUBGRAPH_NAME = "storefront-api-core";
11
371
  //#endregion
12
- //#region src/cli/host.d.ts
372
+ //#region src/cli/log.d.ts
13
373
  /**
14
- * What a host hands the runner. The runner bundles with the host's esbuild twice: to load an
15
- * author's TypeScript declaration (`validate`, `build`, `dev`) and to emit `server.mjs` (`build`).
16
- * esbuild ships a native binary that cannot be bundled, so it is the host's dependency, not the
17
- * SDK's (ADR-00020).
374
+ * The sink the runner reports through. Nothing under `src/cli/` prints: a host
375
+ * passes one of these and decides where each line goes (ADR-0026). Three
376
+ * levels because the runner distinguishes them — progress, `⚠` warnings and
377
+ * failures — and the stand-in host keeps its stdout/stderr split; the kind
378
+ * provider collapses all three into the contract's single `log`.
18
379
  */
19
- type RunnerHost = {
20
- esbuild: typeof esbuild;
380
+ type RunnerLog = {
381
+ info(message: string): void;
382
+ warn(message: string): void;
383
+ error(message: string): void;
21
384
  };
22
385
  //#endregion
23
386
  //#region src/cli/build.d.ts
24
387
  /**
25
- * The result of a successful build: the emitted `dist/`, the server and the
26
- * SDL slice inside it, and the composed artifacts — which live in scratch,
27
- * never in `dist/`.
388
+ * The API side of a build: the server and the SDL slice inside `outDir`, and
389
+ * the composed artifacts — which live in scratch, never in `outDir`.
28
390
  */
29
- type BuildResult = {
30
- distDir: string;
391
+ type ApiBuildOutput = {
31
392
  serverFile: string;
32
393
  sdlPath: string;
33
394
  supergraphFile: string;
34
395
  publicSchemaFile: string;
35
396
  };
397
+ /**
398
+ * The UI side of a build: the catalog and, when the addon emitted one, the
399
+ * content types, both at the top of `outDir`; the flat `docs/` folder and how
400
+ * many component docs landed in it.
401
+ */
402
+ type UiBuildOutput = {
403
+ catalogPath: string;
404
+ contentTypesPath: string | null;
405
+ docsDir: string;
406
+ catalogEntries: number;
407
+ docs: number;
408
+ };
409
+ /** The result of a successful build: the folder it emitted into, and a side for each the Asset has. */
410
+ type BuildResult = {
411
+ outDir: string;
412
+ api?: ApiBuildOutput;
413
+ ui?: UiBuildOutput;
414
+ };
36
415
  /** Raised when `validate` fails as `build`'s fail-closed gate — carries the aggregated report lines. */
37
416
  export declare class ValidationGateError extends Error {
38
417
  readonly reportLines: string[];
39
418
  constructor(reportLines: string[]);
40
419
  }
420
+ type BuildOptions = {
421
+ /** Where the composed-artifact lines go. Silent when omitted: nothing in the runner prints (ADR-0026). */
422
+ log?: RunnerLog;
423
+ /** The output folder, absolute or relative to the Asset root; `dist` when omitted. `vtex extension build` passes `.vtex/build/<ext>/<asset>/`. */
424
+ outDir?: string;
425
+ };
41
426
  /** Raised when the TypeScript compiler reports diagnostics — carries them formatted for verbatim output. */
42
427
  export declare class CompileError extends Error {
43
428
  constructor(message: string);
44
429
  }
45
430
  /**
46
- * Produces the deployable artifact for an extension: runs `validate` first as a
47
- * fail-closed gate (any failure emits nothing and throws `ValidationGateError`),
48
- * type-checks the extension, loads the declaration through the host's esbuild,
49
- * writes `extension.graphql` from `printSubgraphSdl` of that declaration and
50
- * bundles `server.mjs` into a staging dir under the `.vtex/storefront/` scratch
51
- * dir, and only then swaps the assembled staging dir into `dist/`. `dist/` is
52
- * therefore only ever absent, the previous complete artifact, or the new
53
- * complete artifact — a failed build never leaves partial output or keeps
54
- * stale files from an earlier build. Output is `server.mjs` + the SDL slice
55
- * only — no `router.json`, and no composed artifact (Decision 1). Throws on
56
- * any failure so the caller can surface it and exit non-zero.
431
+ * Produces the deployable output for a storefront Asset, both sides into the
432
+ * folder the caller names: `server.mjs` and the SDL slice for the API side,
433
+ * `catalog.json` (and `content-types.json` when the addon emitted one) with
434
+ * the component docs flat under `docs/` for the UI side (ADR-0026). `outDir`
435
+ * is `dist` under the root unless passed; `vtex extension build` passes the
436
+ * folder it chose, `.vtex/build/<ext>/<asset>/` by default. An `outDir` equal
437
+ * to the root or containing it is refused before anything runs, since the swap
438
+ * below empties it. An Asset with neither side throws: there is nothing to
439
+ * build.
440
+ *
441
+ * The UI side's `catalog.json` (and `content-types.json`) also land in the
442
+ * folder the Asset's `exports["./catalog.json"]` names, `dist/` by the
443
+ * template: that export is how a store finds the Asset (ADR-0007), so a store
444
+ * builds against a built Asset with no `dev` loop having run. Nothing is
445
+ * copied when `outDir` already is that folder.
446
+ *
447
+ * Everything that can fail runs before a byte of output exists: the API side's
448
+ * `validate` gate, type-check, declaration load and compose; the UI side's
449
+ * addon load and docs plan (a basename collision throws here). Both sides then
450
+ * write into one staging dir under the `.vtex/storefront/` scratch dir — the
451
+ * SDL and the bundled server, the catalog built with `kind: 'extension'` (an
452
+ * Asset named `@vtex/faststore` fails as the Core package it is not) and the
453
+ * docs copy — and only then is the staging dir swapped into `outDir`. `outDir`
454
+ * is therefore only ever absent, the previous complete output, or the new
455
+ * complete output — a failed build never leaves partial output or keeps stale
456
+ * files from an earlier build. The UI side emits no JavaScript: the store
457
+ * compiles the components it imports. No `router.json`, and no composed
458
+ * artifact (Decision 1). Throws on any failure so the caller can surface it
459
+ * and exit non-zero.
57
460
  *
58
461
  * The composed artifacts go to `.vtex/storefront/` scratch instead, so a
59
462
  * store's CI compile has a fresh client schema without a running `dev` loop.
60
463
  * They are composed from the same slice `server.mjs` serves and written only
61
- * after `dist/` is in place, so an emitted artifact always describes emitted
62
- * output.
464
+ * after `outDir` is in place, so an emitted artifact always describes emitted
465
+ * output. A UI-only Asset composes nothing.
63
466
  */
64
- export declare function buildExtension(extensionRoot: string, host: RunnerHost): Promise<BuildResult>;
467
+ export declare function buildExtension(extensionRoot: string, { log, outDir: outDirOption }?: BuildOptions): Promise<BuildResult>;
65
468
  //#endregion
66
469
  //#region src/cli/capability-lint.d.ts
67
470
  /** The three forbidden reaches the capability lint enforces on first-party source. */
@@ -96,7 +499,25 @@ type RunnerEnv = {
96
499
  subgraphPort: number;
97
500
  routerPort: number;
98
501
  insecureSkipTlsVerify: boolean;
502
+ /** The Hive Router release `dev` runs: `VTEX_STOREFRONT_ROUTER_VERSION`, else the pin kramer runs. */
503
+ routerVersion: string;
504
+ /** `VTEX_STOREFRONT_ROUTER_BINARY`: a router binary to run verbatim instead of the cached or downloaded one. */
505
+ routerBinary?: string;
506
+ /**
507
+ * The boot snapshot of the map the host passed: `captureSecrets` reads the
508
+ * declared secrets from it on boot and on every reload, and the router child
509
+ * inherits it minus those secrets (`routerEnvironment`). Never the live
510
+ * `process.env`.
511
+ */
512
+ variables: Readonly<Record<string, string | undefined>>;
99
513
  };
514
+ /**
515
+ * Reads the runner's env contract from the map the host passes — the runner
516
+ * reads no `.env` and no `process.env` itself (ADR-0026). Throws when neither
517
+ * `VTEX_ACCOUNT` nor `STOREFRONT_CORE_URL` is set — the runner cannot derive a
518
+ * core routing URL without one of the two.
519
+ */
520
+ export declare function loadRunnerEnv(env: Readonly<Record<string, string | undefined>>): RunnerEnv;
100
521
  //#endregion
101
522
  //#region src/cli/dev.d.ts
102
523
  type DevRunHandle = {
@@ -112,12 +533,8 @@ type DevRunHandle = {
112
533
  reload: () => Promise<void>;
113
534
  };
114
535
  type RunDevOptions = {
115
- /**
116
- * Register process SIGINT/SIGTERM handlers that tear the run down and exit.
117
- * True for a standalone `dev`; watch mode passes false and owns a single
118
- * handler set across reloads (see `runDevWatch`).
119
- */
120
- registerSignals?: boolean;
536
+ /** Where progress, warnings and failures go. Silent when omitted: nothing in the runner prints (ADR-0026). */
537
+ log?: RunnerLog;
121
538
  /**
122
539
  * When set, generate the router config with a supergraph poll interval (in
123
540
  * seconds). Watch mode sets it so the router hot-swaps a recomposed
@@ -130,18 +547,23 @@ type RunDevOptions = {
130
547
  * the subgraph server, composes it offline with the embedded core SDL, resolves
131
548
  * the pinned Hive Router binary, and launches the router against the composed
132
549
  * supergraph. Returns a handle so callers (the host, or tests) can await
133
- * readiness and tear the loop down. `env` defaults to the extension's `.env` +
134
- * `process.env`; tests inject one directly to skip file I/O.
550
+ * readiness and tear the loop down. The host passes `env` (`loadRunnerEnv` over
551
+ * the map it assembled) and owns signals and exit: `stop()` is the only
552
+ * teardown (ADR-0026).
135
553
  *
136
554
  * `watchSupergraphSeconds` writes the router config with a supergraph poll
137
555
  * interval, so a subsequently recomposed `supergraph.graphql` is hot-swapped in
138
556
  * place (watch mode uses this instead of restarting the router).
139
557
  */
140
- export declare function runDev(extensionRoot: string, host: RunnerHost, env?: RunnerEnv, { registerSignals, watchSupergraphSeconds }?: RunDevOptions): Promise<DevRunHandle>;
558
+ export declare function runDev(extensionRoot: string, env: RunnerEnv, { log, watchSupergraphSeconds }?: RunDevOptions): Promise<DevRunHandle>;
141
559
  type DevWatchHandle = {
142
560
  routerUrl: string;
143
561
  stop: () => Promise<void>;
144
562
  };
563
+ type DevWatchOptions = {
564
+ /** Where progress, warnings and failures go. Silent when omitted: nothing in the runner prints (ADR-0026). */
565
+ log?: RunnerLog;
566
+ };
145
567
  /**
146
568
  * Runs the dev loop under a file watcher rooted at the declaration entry's
147
569
  * directory. On save it restarts the subgraph (new resolvers/schema) and
@@ -154,10 +576,9 @@ type DevWatchHandle = {
154
576
  * change callback — otherwise the run's own writes into `.vtex/storefront/`
155
577
  * would feed the loop back into itself.
156
578
  *
157
- * Owns a single SIGINT/SIGTERM handler set across reloads (`runDev` is started
158
- * with `registerSignals: false`).
579
+ * Like `runDev`, it installs no signal handler: the host calls `stop()`.
159
580
  */
160
- export declare function runDevWatch(extensionRoot: string, host: RunnerHost, env?: RunnerEnv): Promise<DevWatchHandle>;
581
+ export declare function runDevWatch(extensionRoot: string, env: RunnerEnv, { log }?: DevWatchOptions): Promise<DevWatchHandle>;
161
582
  //#endregion
162
583
  //#region src/graphql/types.d.ts
163
584
  /**
@@ -252,6 +673,29 @@ type SubgraphDefinition = {
252
673
  */
253
674
  export declare function resolveDeclarationEntry(extensionRoot: string): string;
254
675
  //#endregion
676
+ //#region src/cli/provider.d.ts
677
+ /**
678
+ * The storefront kind provider: the default export of `@vtex/faststore/cli`, written to contract
679
+ * version 0 (`@vtex/extension-cli-kit`), which `vtex extension` loads from each storefront Asset's
680
+ * own `@vtex/faststore` (ADR-0026). It wraps the runner's named exports.
681
+ *
682
+ * Like the rest of the runner, it prints nothing, reads no `process.env` and installs no signal
683
+ * handler: `process-isolation.test.ts` walks this file with the others.
684
+ */
685
+ declare const storefrontProvider: KindProvider;
686
+ //#endregion
687
+ //#region src/cli/skills.d.ts
688
+ /**
689
+ * The provider's skills, written to contract version 0 (`@vtex/extension-cli-kit`): the Agent Skills
690
+ * folders that teach a coding agent in an Account Repo to write storefront Assets. `vtex extension
691
+ * skills`, and `add` once you agree, copy each folder to `.agents/skills/<name>/` and link
692
+ * `.claude/skills/<name>` to it; nothing in a folder is code this package runs. `dir` is resolved
693
+ * against the built entry, `dist/cli/index.js`, which tsdown bundles this module into, so `../../`
694
+ * lands on the package root from source and from `dist/` alike.
695
+ */
696
+ /** The one skill: `skills/storefront-asset/`, a `SKILL.md` and the references it points to. */
697
+ export declare const skills: readonly ProviderSkill[];
698
+ //#endregion
255
699
  //#region src/cli/subgraph/build-subgraph.d.ts
256
700
  /**
257
701
  * Turns a `SubgraphDefinition` into an executable Federation v2 subgraph
@@ -285,38 +729,43 @@ export declare function printSubgraphSdl(definition: SubgraphDefinition): string
285
729
  //#endregion
286
730
  //#region src/cli/templates.d.ts
287
731
  /**
288
- * A scaffold for a storefront extension. `files` renders every file of the
289
- * scaffold, keyed by its path relative to the extension root; nothing here
290
- * writes to disk — the host (`vtex extensions add`) decides where the files go
291
- * and what to do when one already exists.
732
+ * The two templates: `default`, the API side `add` writes without `--template`, and `ui`. The
733
+ * storefront body is empty, so each `body` is `{}`. A `vendor` that violates the vendor grammar
734
+ * is rejected up front, so a template never renders a declaration that would fail `validate`.
735
+ *
736
+ * `typescript` is pinned to the SDK's optional peer range: `validate` and `dev` load the compiler
737
+ * from the Asset's devDependencies. `graphql` is pinned to the SDK's own range so the Asset holds
738
+ * one copy: graphql-js rejects a schema built by another copy of itself, which is exactly what
739
+ * the scaffolded test does. `react` is a peer because the store app renders the components.
292
740
  */
293
- type StorefrontTemplate = {
294
- name: string;
295
- description: string;
296
- files(options: {
297
- name: string;
298
- vendor: string;
299
- }): Record<string, string>;
300
- };
741
+ export declare const templates: readonly Template[];
742
+ //#endregion
743
+ //#region src/cli/typescript.d.ts
301
744
  /**
302
- * The scaffolds `@vtex/faststore/cli` ships. One today, `default`: the
303
- * `Product.reviews` sample every reference extension in this repository
304
- * started from. A `vendor` that violates the vendor grammar is rejected up
305
- * front, so a template never renders a declaration that would fail `validate`.
745
+ * Raised when the Asset's `typescript` cannot serve the capability lint or the
746
+ * type-check: it is not installed, or the module that loads has no compiler
747
+ * API (`typescript@7` exports `lib/version.cjs` and no `createSourceFile`).
748
+ * `validateExtension` turns it into `ValidationReport.typescript` instead of
749
+ * failing the whole run (ADR-0026, TypeScript 5 through the peer).
306
750
  */
307
- export declare const templates: StorefrontTemplate[];
751
+ export declare class TypeScriptUnavailableError extends Error {
752
+ constructor(message: string);
753
+ }
308
754
  //#endregion
309
755
  //#region src/cli/validate.d.ts
310
756
  /**
311
757
  * The aggregated "am I shippable?" report: every capability finding, every
312
758
  * composition error, and — when `buildSubgraph` itself rejects the
313
759
  * declaration (allow-list, `vendor`, malformed typeDefs) — the build error.
314
- * `ok` is true only when all three are clean.
760
+ * `typescript` is set when the Asset's `typescript` is missing or has no
761
+ * TypeScript 5 compiler API: the capability lint did not run, and
762
+ * `capability` is empty. `ok` is true only when all four are clean.
315
763
  */
316
764
  type ValidationReport = {
317
765
  capability: CapabilityFinding[];
318
766
  composition: Error[];
319
767
  buildError?: Error;
768
+ typescript?: Error;
320
769
  ok: boolean;
321
770
  };
322
771
  /**
@@ -324,7 +773,7 @@ type ValidationReport = {
324
773
  * report — the shared core behind the host's `validate` verb and `build`'s
325
774
  * fail-closed gate. It:
326
775
  *
327
- * 1. loads the declaration through the host's esbuild (the same
776
+ * 1. loads the declaration through the runner's esbuild (the same
328
777
  * `loadDeclaration` `dev` uses),
329
778
  * 2. builds the subgraph (allow-list rejection and `vendor` validation surface
330
779
  * here as a thrown error, captured into `buildError`),
@@ -337,14 +786,14 @@ type ValidationReport = {
337
786
  * composition check is `@theguild/federation-composition` in-process, the same
338
787
  * composer `dev` and the core SDL CI gate call (ADR-0004, D1).
339
788
  */
340
- export declare function validateExtension(extensionRoot: string, host: RunnerHost): Promise<ValidationReport>;
789
+ export declare function validateExtension(extensionRoot: string): Promise<ValidationReport>;
341
790
  /**
342
791
  * Renders a `ValidationReport`'s failures as human-readable lines, grouped by
343
- * category (build/allow-list, capability, composition) — every failure in one
344
- * pass, never short-circuited at the first. Returns an empty array for a clean
345
- * report so the caller prints its own success line.
792
+ * category (typescript, build/allow-list, capability, composition) — every
793
+ * failure in one pass, never short-circuited at the first. Returns an empty
794
+ * array for a clean report so the caller prints its own success line.
346
795
  */
347
796
  export declare function formatValidationReport(report: ValidationReport): string[];
348
797
  //#endregion
349
- export type { BuildResult, CapabilityFinding, CapabilityRule, DevRunHandle, DevWatchHandle, RunnerHost, StorefrontTemplate, ValidationReport };
798
+ export { type AdapterHandle, type ApiBuildOutput, type AssetState, type BuildAsset, type BuildOptions, type BuildResult, type CapabilityFinding, type CapabilityRule, type CommandDefinition, type CommandResult, type DevRunHandle, type DevSession, type DevWatchHandle, type DevWatchOptions, type Finding, type FlagDefinition, type FlagValues, type JsonSchema, type Kind, type KindCommand, type KindCommandInput, type KindProvider, type PatchOperation, type Position, type ProviderAsset, type ProviderContext, type ProviderFinding, type ProviderRepo, type ProviderSkill, type Range, type RunDevOptions, type RunnerEnv, type RunnerLog, type Severity, type Template, type TemplateDependencyField, type TemplateInput, type TemplatePackages, type UiBuildOutput, type ValidationReport, storefrontProvider as default };
350
799
  //# sourceMappingURL=index.d.ts.map