@payloadcms/plugin-ecommerce 0.0.1-beta.0 → 3.57.0-internal.36ffe2b

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 (284) hide show
  1. package/dist/collections/addresses/createAddressesCollection.d.ts +21 -0
  2. package/dist/collections/addresses/createAddressesCollection.d.ts.map +1 -0
  3. package/dist/collections/addresses/createAddressesCollection.js +71 -0
  4. package/dist/collections/addresses/createAddressesCollection.js.map +1 -0
  5. package/dist/collections/addresses/defaultAddressFields.d.ts +3 -0
  6. package/dist/collections/addresses/defaultAddressFields.d.ts.map +1 -0
  7. package/dist/collections/addresses/defaultAddressFields.js +72 -0
  8. package/dist/collections/addresses/defaultAddressFields.js.map +1 -0
  9. package/dist/collections/addresses/defaultCountries.d.ts +9 -0
  10. package/dist/collections/addresses/defaultCountries.d.ts.map +1 -0
  11. package/dist/collections/addresses/defaultCountries.js +169 -0
  12. package/dist/collections/addresses/defaultCountries.js.map +1 -0
  13. package/dist/collections/addresses/hooks/beforeChange.d.ts +8 -0
  14. package/dist/collections/addresses/hooks/beforeChange.d.ts.map +1 -0
  15. package/dist/collections/addresses/hooks/beforeChange.js +12 -0
  16. package/dist/collections/addresses/hooks/beforeChange.js.map +1 -0
  17. package/dist/collections/carts/beforeChange.d.ts +8 -0
  18. package/dist/collections/carts/beforeChange.d.ts.map +1 -0
  19. package/dist/collections/carts/beforeChange.js +37 -0
  20. package/dist/collections/carts/beforeChange.js.map +1 -0
  21. package/dist/collections/carts/createCartsCollection.d.ts +29 -0
  22. package/dist/collections/carts/createCartsCollection.d.ts.map +1 -0
  23. package/dist/collections/carts/createCartsCollection.js +138 -0
  24. package/dist/collections/carts/createCartsCollection.js.map +1 -0
  25. package/dist/collections/carts/statusBeforeRead.d.ts +3 -0
  26. package/dist/collections/carts/statusBeforeRead.d.ts.map +1 -0
  27. package/dist/collections/carts/statusBeforeRead.js +18 -0
  28. package/dist/collections/carts/statusBeforeRead.js.map +1 -0
  29. package/dist/collections/orders/createOrdersCollection.d.ts +34 -0
  30. package/dist/collections/orders/createOrdersCollection.d.ts.map +1 -0
  31. package/dist/collections/orders/createOrdersCollection.js +162 -0
  32. package/dist/collections/orders/createOrdersCollection.js.map +1 -0
  33. package/dist/collections/products/createProductsCollection.d.ts +26 -0
  34. package/dist/collections/products/createProductsCollection.d.ts.map +1 -0
  35. package/dist/collections/products/createProductsCollection.js +62 -0
  36. package/dist/collections/products/createProductsCollection.js.map +1 -0
  37. package/dist/collections/transactions/createTransactionsCollection.d.ts +40 -0
  38. package/dist/collections/transactions/createTransactionsCollection.d.ts.map +1 -0
  39. package/dist/collections/transactions/createTransactionsCollection.js +157 -0
  40. package/dist/collections/transactions/createTransactionsCollection.js.map +1 -0
  41. package/dist/collections/variants/createVariantOptionsCollection.d.ts +15 -0
  42. package/dist/collections/variants/createVariantOptionsCollection.d.ts.map +1 -0
  43. package/dist/collections/variants/createVariantOptionsCollection.js +53 -0
  44. package/dist/collections/variants/createVariantOptionsCollection.js.map +1 -0
  45. package/dist/collections/variants/createVariantTypesCollection.d.ts +15 -0
  46. package/dist/collections/variants/createVariantTypesCollection.d.ts.map +1 -0
  47. package/dist/collections/variants/createVariantTypesCollection.js +49 -0
  48. package/dist/collections/variants/createVariantTypesCollection.js.map +1 -0
  49. package/dist/collections/variants/createVariantsCollection/hooks/beforeChange.d.ts +8 -0
  50. package/dist/collections/variants/createVariantsCollection/hooks/beforeChange.d.ts.map +1 -0
  51. package/dist/collections/variants/createVariantsCollection/hooks/beforeChange.js +38 -0
  52. package/dist/collections/variants/createVariantsCollection/hooks/beforeChange.js.map +1 -0
  53. package/dist/collections/variants/createVariantsCollection/hooks/validateOptions.d.ts +7 -0
  54. package/dist/collections/variants/createVariantsCollection/hooks/validateOptions.d.ts.map +1 -0
  55. package/dist/collections/variants/createVariantsCollection/hooks/validateOptions.js +53 -0
  56. package/dist/collections/variants/createVariantsCollection/hooks/validateOptions.js.map +1 -0
  57. package/dist/collections/variants/createVariantsCollection/index.d.ts +24 -0
  58. package/dist/collections/variants/createVariantsCollection/index.d.ts.map +1 -0
  59. package/dist/collections/variants/createVariantsCollection/index.js +101 -0
  60. package/dist/collections/variants/createVariantsCollection/index.js.map +1 -0
  61. package/dist/currencies/index.d.ts +5 -0
  62. package/dist/currencies/index.d.ts.map +1 -0
  63. package/dist/currencies/index.js +20 -0
  64. package/dist/currencies/index.js.map +1 -0
  65. package/dist/endpoints/confirmOrder.d.ts +42 -0
  66. package/dist/endpoints/confirmOrder.d.ts.map +1 -0
  67. package/dist/endpoints/confirmOrder.js +143 -0
  68. package/dist/endpoints/confirmOrder.js.map +1 -0
  69. package/dist/endpoints/initiatePayment.d.ts +43 -0
  70. package/dist/endpoints/initiatePayment.d.ts.map +1 -0
  71. package/dist/endpoints/initiatePayment.js +220 -0
  72. package/dist/endpoints/initiatePayment.js.map +1 -0
  73. package/dist/exports/client/index.d.ts +3 -0
  74. package/dist/exports/client/index.d.ts.map +1 -0
  75. package/dist/exports/client/index.js +4 -0
  76. package/dist/exports/client/index.js.map +1 -0
  77. package/dist/exports/client/react.d.ts +4 -0
  78. package/dist/exports/client/react.d.ts.map +1 -0
  79. package/dist/exports/client/react.js +5 -0
  80. package/dist/exports/client/react.js.map +1 -0
  81. package/dist/exports/payments/stripe.d.ts +2 -0
  82. package/dist/exports/payments/stripe.d.ts.map +1 -0
  83. package/dist/exports/payments/stripe.js +3 -0
  84. package/dist/exports/payments/stripe.js.map +1 -0
  85. package/dist/exports/rsc.d.ts +3 -0
  86. package/dist/exports/rsc.d.ts.map +1 -0
  87. package/dist/exports/rsc.js +4 -0
  88. package/dist/exports/rsc.js.map +1 -0
  89. package/dist/exports/translations.d.ts +2 -0
  90. package/dist/exports/translations.d.ts.map +1 -0
  91. package/dist/exports/translations.js +3 -0
  92. package/dist/exports/translations.js.map +1 -0
  93. package/dist/exports/types.d.ts +2 -0
  94. package/dist/exports/types.d.ts.map +1 -0
  95. package/dist/exports/types.js +3 -0
  96. package/dist/exports/types.js.map +1 -0
  97. package/dist/fields/amountField.d.ts +13 -0
  98. package/dist/fields/amountField.d.ts.map +1 -0
  99. package/dist/fields/amountField.js +33 -0
  100. package/dist/fields/amountField.js.map +1 -0
  101. package/dist/fields/cartItemsField.d.ts +26 -0
  102. package/dist/fields/cartItemsField.d.ts.map +1 -0
  103. package/dist/fields/cartItemsField.js +55 -0
  104. package/dist/fields/cartItemsField.js.map +1 -0
  105. package/dist/fields/currencyField.d.ts +9 -0
  106. package/dist/fields/currencyField.d.ts.map +1 -0
  107. package/dist/fields/currencyField.js +29 -0
  108. package/dist/fields/currencyField.js.map +1 -0
  109. package/dist/fields/inventoryField.d.ts +7 -0
  110. package/dist/fields/inventoryField.d.ts.map +1 -0
  111. package/dist/fields/inventoryField.js +16 -0
  112. package/dist/fields/inventoryField.js.map +1 -0
  113. package/dist/fields/pricesField.d.ts +12 -0
  114. package/dist/fields/pricesField.d.ts.map +1 -0
  115. package/dist/fields/pricesField.js +54 -0
  116. package/dist/fields/pricesField.js.map +1 -0
  117. package/dist/fields/statusField.d.ts +8 -0
  118. package/dist/fields/statusField.d.ts.map +1 -0
  119. package/dist/fields/statusField.js +49 -0
  120. package/dist/fields/statusField.js.map +1 -0
  121. package/dist/fields/variantsFields.d.ts +14 -0
  122. package/dist/fields/variantsFields.d.ts.map +1 -0
  123. package/dist/fields/variantsFields.js +48 -0
  124. package/dist/fields/variantsFields.js.map +1 -0
  125. package/dist/index.d.ts +19 -0
  126. package/dist/index.d.ts.map +1 -0
  127. package/dist/index.js +238 -0
  128. package/dist/index.js.map +1 -0
  129. package/dist/payments/adapters/stripe/confirmOrder.d.ts +11 -0
  130. package/dist/payments/adapters/stripe/confirmOrder.d.ts.map +1 -0
  131. package/dist/payments/adapters/stripe/confirmOrder.js +101 -0
  132. package/dist/payments/adapters/stripe/confirmOrder.js.map +1 -0
  133. package/dist/payments/adapters/stripe/endpoints/webhooks.d.ts +13 -0
  134. package/dist/payments/adapters/stripe/endpoints/webhooks.d.ts.map +1 -0
  135. package/dist/payments/adapters/stripe/endpoints/webhooks.js +53 -0
  136. package/dist/payments/adapters/stripe/endpoints/webhooks.js.map +1 -0
  137. package/dist/payments/adapters/stripe/index.d.ts +60 -0
  138. package/dist/payments/adapters/stripe/index.d.ts.map +1 -0
  139. package/dist/payments/adapters/stripe/index.js +68 -0
  140. package/dist/payments/adapters/stripe/index.js.map +1 -0
  141. package/dist/payments/adapters/stripe/initiatePayment.d.ts +11 -0
  142. package/dist/payments/adapters/stripe/initiatePayment.d.ts.map +1 -0
  143. package/dist/payments/adapters/stripe/initiatePayment.js +102 -0
  144. package/dist/payments/adapters/stripe/initiatePayment.js.map +1 -0
  145. package/dist/react/provider/index.d.ts +41 -0
  146. package/dist/react/provider/index.d.ts.map +1 -0
  147. package/dist/react/provider/index.js +790 -0
  148. package/dist/react/provider/index.js.map +1 -0
  149. package/dist/react/provider/types.d.ts +171 -0
  150. package/dist/react/provider/types.d.ts.map +1 -0
  151. package/dist/react/provider/types.js +3 -0
  152. package/dist/react/provider/types.js.map +1 -0
  153. package/dist/react/provider/utilities.d.ts +9 -0
  154. package/dist/react/provider/utilities.d.ts.map +1 -0
  155. package/dist/react/provider/utilities.js +13 -0
  156. package/dist/react/provider/utilities.js.map +1 -0
  157. package/dist/translations/en.d.ts +3 -0
  158. package/dist/translations/en.d.ts.map +1 -0
  159. package/dist/translations/en.js +86 -0
  160. package/dist/translations/en.js.map +1 -0
  161. package/dist/translations/index.d.ts +7 -0
  162. package/dist/translations/index.d.ts.map +1 -0
  163. package/dist/translations/index.js +6 -0
  164. package/dist/translations/index.js.map +1 -0
  165. package/dist/types.d.ts +658 -0
  166. package/dist/types.d.ts.map +1 -0
  167. package/dist/types.js +3 -0
  168. package/dist/types.js.map +1 -0
  169. package/dist/ui/PriceCell/index.d.ts +12 -0
  170. package/dist/ui/PriceCell/index.d.ts.map +1 -0
  171. package/dist/ui/PriceCell/index.js +38 -0
  172. package/dist/ui/PriceCell/index.js.map +1 -0
  173. package/dist/ui/PriceInput/FormattedInput.d.ts +17 -0
  174. package/dist/ui/PriceInput/FormattedInput.d.ts.map +1 -0
  175. package/dist/ui/PriceInput/FormattedInput.js +146 -0
  176. package/dist/ui/PriceInput/FormattedInput.js.map +1 -0
  177. package/{src/ui/PriceInput/index.scss → dist/ui/PriceInput/index.css} +7 -0
  178. package/dist/ui/PriceInput/index.d.ts +11 -0
  179. package/dist/ui/PriceInput/index.d.ts.map +1 -0
  180. package/dist/ui/PriceInput/index.js +20 -0
  181. package/dist/ui/PriceInput/index.js.map +1 -0
  182. package/dist/ui/PriceRowLabel/index.d.ts +8 -0
  183. package/dist/ui/PriceRowLabel/index.d.ts.map +1 -0
  184. package/dist/ui/PriceRowLabel/index.js +66 -0
  185. package/dist/ui/PriceRowLabel/index.js.map +1 -0
  186. package/dist/ui/VariantOptionsSelector/ErrorBox.d.ts +8 -0
  187. package/dist/ui/VariantOptionsSelector/ErrorBox.d.ts.map +1 -0
  188. package/dist/ui/VariantOptionsSelector/ErrorBox.js +28 -0
  189. package/dist/ui/VariantOptionsSelector/ErrorBox.js.map +1 -0
  190. package/dist/ui/VariantOptionsSelector/OptionsSelect.d.ts +13 -0
  191. package/dist/ui/VariantOptionsSelector/OptionsSelect.d.ts.map +1 -0
  192. package/dist/ui/VariantOptionsSelector/OptionsSelect.js +71 -0
  193. package/dist/ui/VariantOptionsSelector/OptionsSelect.js.map +1 -0
  194. package/dist/ui/VariantOptionsSelector/index.d.ts +6 -0
  195. package/dist/ui/VariantOptionsSelector/index.d.ts.map +1 -0
  196. package/dist/ui/VariantOptionsSelector/index.js +78 -0
  197. package/dist/ui/VariantOptionsSelector/index.js.map +1 -0
  198. package/dist/ui/utilities.d.ts +16 -0
  199. package/dist/ui/utilities.d.ts.map +1 -0
  200. package/dist/ui/utilities.js +26 -0
  201. package/dist/ui/utilities.js.map +1 -0
  202. package/dist/utilities/defaultProductsValidation.d.ts +3 -0
  203. package/dist/utilities/defaultProductsValidation.d.ts.map +1 -0
  204. package/dist/utilities/defaultProductsValidation.js +40 -0
  205. package/dist/utilities/defaultProductsValidation.js.map +1 -0
  206. package/dist/utilities/errorCodes.d.ts +3 -0
  207. package/dist/utilities/errorCodes.d.ts.map +1 -0
  208. package/dist/utilities/errorCodes.js +4 -0
  209. package/dist/utilities/errorCodes.js.map +1 -0
  210. package/dist/utilities/getCollectionSlugMap.d.ts +11 -0
  211. package/dist/utilities/getCollectionSlugMap.d.ts.map +1 -0
  212. package/dist/utilities/getCollectionSlugMap.js +25 -0
  213. package/dist/utilities/getCollectionSlugMap.js.map +1 -0
  214. package/dist/utilities/sanitizePluginConfig.d.ts +7 -0
  215. package/dist/utilities/sanitizePluginConfig.d.ts.map +1 -0
  216. package/dist/utilities/sanitizePluginConfig.js +67 -0
  217. package/dist/utilities/sanitizePluginConfig.js.map +1 -0
  218. package/package.json +98 -1
  219. package/.prettierignore +0 -12
  220. package/.swcrc +0 -24
  221. package/eslint.config.js +0 -18
  222. package/src/addresses/addressesCollection.ts +0 -76
  223. package/src/addresses/defaultAddressFields.ts +0 -83
  224. package/src/addresses/defaultCountries.ts +0 -50
  225. package/src/carts/beforeChange.ts +0 -51
  226. package/src/carts/cartsCollection.ts +0 -146
  227. package/src/currencies/index.ts +0 -29
  228. package/src/endpoints/confirmOrder.ts +0 -312
  229. package/src/endpoints/initiatePayment.ts +0 -322
  230. package/src/exports/addresses.ts +0 -2
  231. package/src/exports/currencies.ts +0 -1
  232. package/src/exports/fields.ts +0 -5
  233. package/src/exports/orders.ts +0 -1
  234. package/src/exports/payments/stripe.ts +0 -1
  235. package/src/exports/plugin.ts +0 -1
  236. package/src/exports/products.ts +0 -1
  237. package/src/exports/react.ts +0 -8
  238. package/src/exports/transactions.ts +0 -1
  239. package/src/exports/translations.ts +0 -1
  240. package/src/exports/types.ts +0 -7
  241. package/src/exports/ui.ts +0 -3
  242. package/src/exports/variants.ts +0 -5
  243. package/src/fields/amountField.ts +0 -43
  244. package/src/fields/cartItemsField.ts +0 -84
  245. package/src/fields/currencyField.ts +0 -39
  246. package/src/fields/inventoryField.ts +0 -22
  247. package/src/fields/pricesField.ts +0 -65
  248. package/src/fields/statusField.ts +0 -57
  249. package/src/fields/variantsFields.ts +0 -56
  250. package/src/index.ts +0 -275
  251. package/src/orders/ordersCollection.ts +0 -157
  252. package/src/payments/adapters/stripe/confirmOrder.ts +0 -123
  253. package/src/payments/adapters/stripe/endpoints/webhooks.ts +0 -69
  254. package/src/payments/adapters/stripe/index.ts +0 -135
  255. package/src/payments/adapters/stripe/initiatePayment.ts +0 -131
  256. package/src/products/productsCollection.ts +0 -78
  257. package/src/react/provider/index.tsx +0 -893
  258. package/src/react/provider/types.ts +0 -184
  259. package/src/react/provider/utilities.ts +0 -22
  260. package/src/transactions/transactionsCollection.ts +0 -166
  261. package/src/translations/en.ts +0 -64
  262. package/src/translations/index.ts +0 -11
  263. package/src/types.ts +0 -403
  264. package/src/ui/PriceInput/FormattedInput.tsx +0 -134
  265. package/src/ui/PriceInput/index.tsx +0 -43
  266. package/src/ui/PriceInput/utilities.ts +0 -46
  267. package/src/ui/PriceRowLabel/index.tsx +0 -56
  268. package/src/ui/VariantOptionsSelector/ErrorBox.tsx +0 -27
  269. package/src/ui/VariantOptionsSelector/OptionsSelect.tsx +0 -78
  270. package/src/ui/VariantOptionsSelector/index.tsx +0 -83
  271. package/src/utilities/defaultProductsValidation.ts +0 -42
  272. package/src/utilities/errorCodes.ts +0 -14
  273. package/src/utilities/getCollectionSlugMap.ts +0 -84
  274. package/src/utilities/sanitizePluginConfig.ts +0 -80
  275. package/src/variants/variantOptionsCollection.ts +0 -59
  276. package/src/variants/variantTypesCollection.ts +0 -55
  277. package/src/variants/variantsCollection/hooks/beforeChange.ts +0 -47
  278. package/src/variants/variantsCollection/hooks/validateOptions.ts +0 -72
  279. package/src/variants/variantsCollection/index.ts +0 -119
  280. package/tsconfig.json +0 -7
  281. package/tsconfig.tsbuildinfo +0 -1
  282. /package/{src → dist}/translations/translation-schema.json +0 -0
  283. /package/{src → dist}/ui/PriceRowLabel/index.css +0 -0
  284. /package/{src → dist}/ui/VariantOptionsSelector/index.css +0 -0
@@ -0,0 +1,658 @@
1
+ import type { Access, CollectionConfig, DefaultDocumentIDType, Endpoint, Field, FieldAccess, GroupField, PayloadRequest, SelectType, TypedCollection, Where } from 'payload';
2
+ export type FieldsOverride = (args: {
3
+ defaultFields: Field[];
4
+ }) => Field[];
5
+ export type CollectionOverride = (args: {
6
+ defaultCollection: CollectionConfig;
7
+ }) => CollectionConfig | Promise<CollectionConfig>;
8
+ export type CartItem = {
9
+ id: DefaultDocumentIDType;
10
+ product: DefaultDocumentIDType | TypedCollection['products'];
11
+ quantity: number;
12
+ variant?: DefaultDocumentIDType | TypedCollection['variants'];
13
+ };
14
+ type DefaultCartType = {
15
+ currency?: string;
16
+ customer?: DefaultDocumentIDType | TypedCollection['customers'];
17
+ id: DefaultDocumentIDType;
18
+ items: CartItem[];
19
+ subtotal?: number;
20
+ };
21
+ export type Cart = DefaultCartType;
22
+ type InitiatePaymentReturnType = {
23
+ /**
24
+ * Allows for additional data to be returned, such as payment method specific data
25
+ */
26
+ [key: string]: any;
27
+ message: string;
28
+ };
29
+ type InitiatePayment = (args: {
30
+ /**
31
+ * The slug of the customers collection, defaults to 'users'.
32
+ */
33
+ customersSlug?: string;
34
+ data: {
35
+ /**
36
+ * Billing address for the payment.
37
+ */
38
+ billingAddress: TypedCollection['addresses'];
39
+ /**
40
+ * Cart items.
41
+ */
42
+ cart: Cart;
43
+ /**
44
+ * Currency code to use for the payment.
45
+ */
46
+ currency: string;
47
+ customerEmail: string;
48
+ /**
49
+ * Shipping address for the payment.
50
+ */
51
+ shippingAddress?: TypedCollection['addresses'];
52
+ };
53
+ req: PayloadRequest;
54
+ /**
55
+ * The slug of the transactions collection, defaults to 'transactions'.
56
+ * For example, this is used to create a record of the payment intent in the transactions collection.
57
+ */
58
+ transactionsSlug: string;
59
+ }) => InitiatePaymentReturnType | Promise<InitiatePaymentReturnType>;
60
+ type ConfirmOrderReturnType = {
61
+ /**
62
+ * Allows for additional data to be returned, such as payment method specific data
63
+ */
64
+ [key: string]: any;
65
+ message: string;
66
+ orderID: DefaultDocumentIDType;
67
+ transactionID: DefaultDocumentIDType;
68
+ };
69
+ type ConfirmOrder = (args: {
70
+ /**
71
+ * The slug of the carts collection, defaults to 'carts'.
72
+ * For example, this is used to retrieve the cart for the order.
73
+ */
74
+ cartsSlug?: string;
75
+ /**
76
+ * The slug of the customers collection, defaults to 'users'.
77
+ */
78
+ customersSlug?: string;
79
+ /**
80
+ * Data made available to the payment method when confirming an order. You should get the cart items from the transaction.
81
+ */
82
+ data: {
83
+ [key: string]: any;
84
+ customerEmail?: string;
85
+ };
86
+ /**
87
+ * The slug of the orders collection, defaults to 'orders'.
88
+ */
89
+ ordersSlug?: string;
90
+ req: PayloadRequest;
91
+ /**
92
+ * The slug of the transactions collection, defaults to 'transactions'.
93
+ * For example, this is used to create a record of the payment intent in the transactions collection.
94
+ */
95
+ transactionsSlug?: string;
96
+ }) => ConfirmOrderReturnType | Promise<ConfirmOrderReturnType>;
97
+ /**
98
+ * The full payment adapter config expected as part of the config for the Ecommerce plugin.
99
+ *
100
+ * You can insert this type directly or return it from a function constructing it.
101
+ */
102
+ export type PaymentAdapter = {
103
+ /**
104
+ * The function that is called via the `/api/payments/{provider_name}/confirm-order` endpoint to confirm an order after a payment has been made.
105
+ *
106
+ * You should handle the order confirmation logic here.
107
+ *
108
+ * @example
109
+ *
110
+ * ```ts
111
+ * const confirmOrder: ConfirmOrder = async ({ data: { customerEmail }, ordersSlug, req, transactionsSlug }) => {
112
+ // Confirm the payment with Stripe or another payment provider here
113
+ // Create an order in the orders collection here
114
+ // Update the record of the payment intent in the transactions collection here
115
+ return {
116
+ message: 'Order confirmed successfully',
117
+ orderID: 'order_123',
118
+ transactionID: 'txn_123',
119
+ // Include any additional data required for the payment method here
120
+ }
121
+ }
122
+ * ```
123
+ */
124
+ confirmOrder: ConfirmOrder;
125
+ /**
126
+ * An array of endpoints to be bootstrapped to Payload's API in order to support the payment method. All API paths are relative to `/api/payments/{provider_name}`.
127
+ *
128
+ * So for example, path `/webhooks` in the Stripe adapter becomes `/api/payments/stripe/webhooks`.
129
+ *
130
+ * @example '/webhooks'
131
+ */
132
+ endpoints?: Endpoint[];
133
+ /**
134
+ * A group configuration to be used in the admin interface to display the payment method.
135
+ *
136
+ * @example
137
+ *
138
+ * ```ts
139
+ * const groupField: GroupField = {
140
+ name: 'stripe',
141
+ type: 'group',
142
+ admin: {
143
+ condition: (data) => data?.paymentMethod === 'stripe',
144
+ },
145
+ fields: [
146
+ {
147
+ name: 'stripeCustomerID',
148
+ type: 'text',
149
+ label: 'Stripe Customer ID',
150
+ required: true,
151
+ },
152
+ {
153
+ name: 'stripePaymentIntentID',
154
+ type: 'text',
155
+ label: 'Stripe PaymentIntent ID',
156
+ required: true,
157
+ },
158
+ ],
159
+ }
160
+ * ```
161
+ */
162
+ group: GroupField;
163
+ /**
164
+ * The function that is called via the `/api/payments/{provider_name}/initiate` endpoint to initiate a payment for an order.
165
+ *
166
+ * You should handle the payment initiation logic here.
167
+ *
168
+ * @example
169
+ *
170
+ * ```ts
171
+ * const initiatePayment: InitiatePayment = async ({ data: { cart, currency, customerEmail, billingAddress, shippingAddress }, req, transactionsSlug }) => {
172
+ // Create a payment intent with Stripe or another payment provider here
173
+ // Create a record of the payment intent in the transactions collection here
174
+ return {
175
+ message: 'Payment initiated successfully',
176
+ // Include any additional data required for the payment method here
177
+ }
178
+ }
179
+ * ```
180
+ */
181
+ initiatePayment: InitiatePayment;
182
+ /**
183
+ * The label of the payment method
184
+ * @example
185
+ * 'Bank Transfer'
186
+ */
187
+ label?: string;
188
+ /**
189
+ * The name of the payment method
190
+ * @example 'stripe'
191
+ */
192
+ name: string;
193
+ };
194
+ export type PaymentAdapterClient = {
195
+ confirmOrder: boolean;
196
+ initiatePayment: boolean;
197
+ } & Pick<PaymentAdapter, 'label' | 'name'>;
198
+ export type Currency = {
199
+ /**
200
+ * The ISO 4217 currency code
201
+ * @example 'usd'
202
+ */
203
+ code: string;
204
+ /**
205
+ * The number of decimal places the currency uses
206
+ * @example 2
207
+ */
208
+ decimals: number;
209
+ /**
210
+ * A user friendly name for the currency.
211
+ *
212
+ * @example 'US Dollar'
213
+ */
214
+ label: string;
215
+ /**
216
+ * The symbol of the currency
217
+ * @example '$'
218
+ */
219
+ symbol: string;
220
+ };
221
+ /**
222
+ * Commonly used arguments for a Payment Adapter function, it's use is entirely optional.
223
+ */
224
+ export type PaymentAdapterArgs = {
225
+ /**
226
+ * Overrides the default fields of the collection. Affects the payment fields on collections such as transactions.
227
+ */
228
+ groupOverrides?: {
229
+ fields?: FieldsOverride;
230
+ } & Partial<Omit<GroupField, 'fields'>>;
231
+ /**
232
+ * The visually readable label for the payment method.
233
+ * @example 'Bank Transfer'
234
+ */
235
+ label?: string;
236
+ };
237
+ /**
238
+ * Commonly used arguments for a Payment Adapter function, it's use is entirely optional.
239
+ */
240
+ export type PaymentAdapterClientArgs = {
241
+ /**
242
+ * The visually readable label for the payment method.
243
+ * @example 'Bank Transfer'
244
+ */
245
+ label?: string;
246
+ };
247
+ export type VariantsConfig = {
248
+ /**
249
+ * Override the default variants collection. If you override the collection, you should ensure it has the required fields for variants or re-use the default fields.
250
+ *
251
+ * @example
252
+ *
253
+ * ```ts
254
+ * variants: {
255
+ variantOptionsCollectionOverride: ({ defaultCollection }) => ({
256
+ ...defaultCollection,
257
+ fields: [
258
+ ...defaultCollection.fields,
259
+ {
260
+ name: 'customField',
261
+ label: 'Custom Field',
262
+ type: 'text',
263
+ },
264
+ ],
265
+ })
266
+ }
267
+ ```
268
+ */
269
+ variantOptionsCollectionOverride?: CollectionOverride;
270
+ /**
271
+ * Override the default variants collection. If you override the collection, you should ensure it has the required fields for variants or re-use the default fields.
272
+ *
273
+ * @example
274
+ *
275
+ * ```ts
276
+ * variants: {
277
+ variantsCollectionOverride: ({ defaultCollection }) => ({
278
+ ...defaultCollection,
279
+ fields: [
280
+ ...defaultCollection.fields,
281
+ {
282
+ name: 'customField',
283
+ label: 'Custom Field',
284
+ type: 'text',
285
+ },
286
+ ],
287
+ })
288
+ }
289
+ ```
290
+ */
291
+ variantsCollectionOverride?: CollectionOverride;
292
+ /**
293
+ * Override the default variants collection. If you override the collection, you should ensure it has the required fields for variants or re-use the default fields.
294
+ *
295
+ * @example
296
+ *
297
+ * ```ts
298
+ * variants: {
299
+ variantTypesCollectionOverride: ({ defaultCollection }) => ({
300
+ ...defaultCollection,
301
+ fields: [
302
+ ...defaultCollection.fields,
303
+ {
304
+ name: 'customField',
305
+ label: 'Custom Field',
306
+ type: 'text',
307
+ },
308
+ ],
309
+ })
310
+ }
311
+ ```
312
+ */
313
+ variantTypesCollectionOverride?: CollectionOverride;
314
+ };
315
+ export type ProductsConfig = {
316
+ /**
317
+ * Override the default products collection. If you override the collection, you should ensure it has the required fields for products or re-use the default fields.
318
+ *
319
+ * @example
320
+ *
321
+ * ```ts
322
+ products: {
323
+ productsCollectionOverride: ({ defaultCollection }) => ({
324
+ ...defaultCollection,
325
+ fields: [
326
+ ...defaultCollection.fields,
327
+ {
328
+ name: 'notes',
329
+ label: 'Notes',
330
+ type: 'textarea',
331
+ },
332
+ ],
333
+ })
334
+ }
335
+ ```
336
+ */
337
+ productsCollectionOverride?: CollectionOverride;
338
+ /**
339
+ * Customise the validation used for checking products or variants before a transaction is created or a payment can be confirmed.
340
+ */
341
+ validation?: ProductsValidation;
342
+ /**
343
+ * Enable variants and provide configuration for the variant collections.
344
+ *
345
+ * Defaults to true.
346
+ */
347
+ variants?: boolean | VariantsConfig;
348
+ };
349
+ export type OrdersConfig = {
350
+ /**
351
+ * Override the default orders collection. If you override the collection, you should ensure it has the required fields for orders or re-use the default fields.
352
+ *
353
+ * @example
354
+ *
355
+ * ```ts
356
+ orders: {
357
+ ordersCollectionOverride: ({ defaultCollection }) => ({
358
+ ...defaultCollection,
359
+ fields: [
360
+ ...defaultCollection.fields,
361
+ {
362
+ name: 'notes',
363
+ label: 'Notes',
364
+ type: 'textarea',
365
+ },
366
+ ],
367
+ })
368
+ }
369
+ ```
370
+ */
371
+ ordersCollectionOverride?: CollectionOverride;
372
+ };
373
+ export type TransactionsConfig = {
374
+ /**
375
+ * Override the default transactions collection. If you override the collection, you should ensure it has the required fields for transactions or re-use the default fields.
376
+ *
377
+ * @example
378
+ *
379
+ * ```ts
380
+ transactions: {
381
+ transactionsCollectionOverride: ({ defaultCollection }) => ({
382
+ ...defaultCollection,
383
+ fields: [
384
+ ...defaultCollection.fields,
385
+ {
386
+ name: 'notes',
387
+ label: 'Notes',
388
+ type: 'textarea',
389
+ },
390
+ ],
391
+ })
392
+ }
393
+ ```
394
+ */
395
+ transactionsCollectionOverride?: CollectionOverride;
396
+ };
397
+ export type CustomQuery = {
398
+ depth?: number;
399
+ select?: SelectType;
400
+ where?: Where;
401
+ };
402
+ export type PaymentsConfig = {
403
+ paymentMethods?: PaymentAdapter[];
404
+ productsQuery?: CustomQuery;
405
+ variantsQuery?: CustomQuery;
406
+ };
407
+ export type CountryType = {
408
+ /**
409
+ * A user friendly name for the country.
410
+ */
411
+ label: string;
412
+ /**
413
+ * The ISO 3166-1 alpha-2 country code.
414
+ * @example 'US'
415
+ */
416
+ value: string;
417
+ };
418
+ /**
419
+ * Configuration for the addresses used by the Ecommerce plugin. Use this to override the default collection or fields used throughout
420
+ */
421
+ type AddressesConfig = {
422
+ /**
423
+ * Override the default addresses collection. If you override the collection, you should ensure it has the required fields for addresses or re-use the default fields.
424
+ *
425
+ * @example
426
+ * ```ts
427
+ * addressesCollectionOverride: (defaultCollection) => {
428
+ * return {
429
+ * ...defaultCollection,
430
+ * fields: [
431
+ * ...defaultCollection.fields,
432
+ * // add custom fields here
433
+ * ],
434
+ * }
435
+ * }
436
+ * ```
437
+ */
438
+ addressesCollectionOverride?: CollectionOverride;
439
+ /**
440
+ * These fields will be applied to all locations where addresses are used, such as Orders and Transactions. Preferred use over the collectionOverride config.
441
+ */
442
+ addressFields?: FieldsOverride;
443
+ /**
444
+ * Provide an array of countries to support for addresses. This will be used in the admin interface to provide a select field of countries.
445
+ *
446
+ * Defaults to a set of commonly used countries.
447
+ *
448
+ * @example
449
+ * ```
450
+ * [
451
+ { label: 'United States', value: 'US' },
452
+ { label: 'Canada', value: 'CA' },
453
+ ]
454
+ */
455
+ supportedCountries?: CountryType[];
456
+ };
457
+ export type CustomersConfig = {
458
+ /**
459
+ * Slug of the customers collection, defaults to 'users'.
460
+ * This is used to link carts and orders to customers.
461
+ */
462
+ slug: string;
463
+ };
464
+ export type CartsConfig = {
465
+ cartsCollectionOverride?: CollectionOverride;
466
+ };
467
+ export type InventoryConfig = {
468
+ /**
469
+ * Override the default field used to track inventory levels. Defaults to 'inventory'.
470
+ */
471
+ fieldName?: string;
472
+ };
473
+ export type CurrenciesConfig = {
474
+ /**
475
+ * Defaults to the first supported currency.
476
+ *
477
+ * @example 'USD'
478
+ */
479
+ defaultCurrency: string;
480
+ /**
481
+ *
482
+ */
483
+ supportedCurrencies: Currency[];
484
+ };
485
+ /**
486
+ * A function that validates a product or variant before a transaction is created or completed.
487
+ * This should throw an error if validation fails as it will be caught by the function calling it.
488
+ */
489
+ export type ProductsValidation = (args: {
490
+ /**
491
+ * The full currencies config, allowing you to check against supported currencies and their settings.
492
+ */
493
+ currenciesConfig?: CurrenciesConfig;
494
+ /**
495
+ * The ISO 4217 currency code being usen in this transaction.
496
+ */
497
+ currency?: string;
498
+ /**
499
+ * The full product data.
500
+ */
501
+ product: TypedCollection['products'];
502
+ /**
503
+ * Quantity to check the inventory amount against.
504
+ */
505
+ quantity: number;
506
+ /**
507
+ * The full variant data, if a variant was selected for the product otherwise it will be undefined.
508
+ */
509
+ variant?: TypedCollection['variants'];
510
+ }) => Promise<void> | void;
511
+ /**
512
+ * A map of collection slugs used by the Ecommerce plugin.
513
+ * Provides an easy way to track the slugs of collections even when they are overridden.
514
+ */
515
+ export type CollectionSlugMap = {
516
+ addresses: string;
517
+ carts: string;
518
+ customers: string;
519
+ orders: string;
520
+ products: string;
521
+ transactions: string;
522
+ variantOptions: string;
523
+ variants: string;
524
+ variantTypes: string;
525
+ };
526
+ /**
527
+ * Access control functions used throughout the Ecommerce plugin.
528
+ * You must provide these when configuring the plugin.
529
+ *
530
+ * @example
531
+ *
532
+ * ```ts
533
+ * access: {
534
+ adminOnly,
535
+ adminOnlyFieldAccess,
536
+ adminOrCustomerOwner,
537
+ adminOrPublishedStatus,
538
+ customerOnlyFieldAccess,
539
+ }
540
+ ```
541
+ */
542
+ export type AccessConfig = {
543
+ /**
544
+ * Limited to only admin users.
545
+ */
546
+ adminOnly: Access;
547
+ /**
548
+ * Limited to only admin users, specifically for Field level access control.
549
+ */
550
+ adminOnlyFieldAccess: FieldAccess;
551
+ /**
552
+ * Is the owner of the document via the `customer` field or is an admin.
553
+ */
554
+ adminOrCustomerOwner: Access;
555
+ /**
556
+ * The document status is published or user is admin.
557
+ */
558
+ adminOrPublishedStatus: Access;
559
+ /**
560
+ * Authenticated users only. Defaults to the example function.
561
+ *
562
+ * @example
563
+ * anyUser: ({ req }) => !!req?.user
564
+ */
565
+ authenticatedOnly?: Access;
566
+ /**
567
+ * Limited to customers only, specifically for Field level access control.
568
+ */
569
+ customerOnlyFieldAccess: FieldAccess;
570
+ /**
571
+ * Entirely public access. Defaults to the example function.
572
+ *
573
+ * @example
574
+ * publicAccess: () => true
575
+ */
576
+ publicAccess?: Access;
577
+ };
578
+ export type EcommercePluginConfig = {
579
+ /**
580
+ * Customise the access control for the plugin.
581
+ *
582
+ * @example
583
+ * ```ts
584
+ * ```
585
+ */
586
+ access: AccessConfig;
587
+ /**
588
+ * Enable the addresses collection to allow customers, transactions and orders to have multiple addresses for shipping and billing. Accepts an override to customise the addresses collection.
589
+ * Defaults to supporting a default set of countries.
590
+ */
591
+ addresses?: AddressesConfig | boolean;
592
+ /**
593
+ * Configure the target collection used for carts.
594
+ *
595
+ * Defaults to true.
596
+ */
597
+ carts?: boolean | CartsConfig;
598
+ /**
599
+ * Configure supported currencies and default settings.
600
+ *
601
+ * Defaults to supporting USD.
602
+ */
603
+ currencies?: CurrenciesConfig;
604
+ /**
605
+ * Configure the target collection used for customers.
606
+ *
607
+ * @example
608
+ * ```ts
609
+ * customers: {
610
+ * slug: 'users', // default
611
+ * }
612
+ *
613
+ */
614
+ customers: CustomersConfig;
615
+ /**
616
+ * Enable tracking of inventory for products and variants. Accepts a config object to override the default collection settings.
617
+ *
618
+ * Defaults to true.
619
+ */
620
+ inventory?: boolean | InventoryConfig;
621
+ /**
622
+ * Enables orders and accepts a config object to override the default collection settings.
623
+ *
624
+ * Defaults to true.
625
+ */
626
+ orders?: boolean | OrdersConfig;
627
+ /**
628
+ * Enable tracking of payments. Accepts a config object to override the default collection settings.
629
+ *
630
+ * Defaults to true when the paymentMethods array is provided.
631
+ */
632
+ payments?: PaymentsConfig;
633
+ /**
634
+ * Enables products and variants. Accepts a config object to override the product collection and each variant collection type.
635
+ *
636
+ * Defaults to true.
637
+ */
638
+ products?: boolean | ProductsConfig;
639
+ /**
640
+ * Enable tracking of transactions. Accepts a config object to override the default collection settings.
641
+ *
642
+ * Defaults to true when the paymentMethods array is provided.
643
+ */
644
+ transactions?: boolean | TransactionsConfig;
645
+ };
646
+ export type SanitizedEcommercePluginConfig = {
647
+ access: Required<AccessConfig>;
648
+ addresses: {
649
+ addressFields: Field[];
650
+ } & Omit<AddressesConfig, 'addressFields'>;
651
+ currencies: Required<CurrenciesConfig>;
652
+ inventory?: InventoryConfig;
653
+ payments: {
654
+ paymentMethods: [] | PaymentAdapter[];
655
+ };
656
+ } & Omit<Required<EcommercePluginConfig>, 'access' | 'addresses' | 'currencies' | 'inventory' | 'payments'>;
657
+ export {};
658
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM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