@nextblock-cms/ecom 0.10.1 → 0.10.3
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.
- package/lib/components/CustomerProfileForm.cjs.js +1 -1
- package/lib/components/CustomerProfileForm.es.js +162 -159
- package/lib/freemius-coupons.cjs.js +1 -1
- package/lib/freemius-coupons.es.js +51 -49
- package/lib/pages/cms/payments/PaymentsClient.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsClient.d.ts +4 -1
- package/lib/pages/cms/payments/PaymentsClient.es.js +255 -127
- package/lib/pages/cms/payments/PaymentsPage.cjs.js +1 -1
- package/lib/pages/cms/payments/PaymentsPage.es.js +20 -16
- package/lib/pages/cms/payments/actions.cjs.js +1 -1
- package/lib/pages/cms/payments/actions.d.ts +1 -0
- package/lib/pages/cms/payments/actions.es.js +41 -13
- package/lib/pages/cms/payments/queries.cjs.js +1 -1
- package/lib/pages/cms/payments/queries.es.js +13 -24
- package/lib/payment-config.cjs.js +1 -0
- package/lib/payment-config.d.ts +57 -0
- package/lib/payment-config.es.js +137 -0
- package/lib/providers/freemius.cjs.js +2 -2
- package/lib/providers/freemius.es.js +108 -107
- package/lib/providers/stripe.cjs.js +1 -1
- package/lib/providers/stripe.es.js +167 -167
- package/lib/stripe/checkout.cjs.js +1 -1
- package/lib/stripe/checkout.es.js +14 -14
- package/lib/stripe/client.cjs.js +1 -1
- package/lib/stripe/client.d.ts +1 -1
- package/lib/stripe/client.es.js +8 -5
- package/lib/stripe/order-sync.cjs.js +1 -1
- package/lib/stripe/order-sync.es.js +50 -50
- package/lib/stripe/webhooks.cjs.js +1 -1
- package/lib/stripe/webhooks.es.js +12 -10
- package/package.json +4 -4
- package/server.cjs.js +1 -1
- package/server.d.ts +1 -0
- package/server.es.js +188 -178
package/server.es.js
CHANGED
|
@@ -1,180 +1,190 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
1
|
+
import { clearPaymentConfigCache as t, getPaymentConfigStatus as o, getPaymentCredentialsView as a, hydrateFreemiusEnvFromDb as n, resolveStripePublishableKey as i, resolveStripeSecretKey as s, resolveStripeWebhookSecret as u, savePaymentCredentials as c } from "./lib/payment-config.es.js";
|
|
2
|
+
import { getStripeClient as m } from "./lib/stripe/client.es.js";
|
|
3
|
+
import { createCheckoutSession as g } from "./lib/stripe/checkout.es.js";
|
|
4
|
+
import { syncStripeOrderFromSession as C } from "./lib/stripe/order-sync.es.js";
|
|
5
|
+
import { handleStripeWebhook as f } from "./lib/stripe/webhooks.es.js";
|
|
6
|
+
import { applyOrderInventoryDeduction as y } from "./lib/order-inventory.es.js";
|
|
7
|
+
import { aggregateOrderTaxLines as v, buildOrderTaxDetailsFromCalculation as F, buildOrderTaxDetailsFromStripeSession as h, getOrderTaxRateJurisdiction as O, getOrderTaxRateLabel as R, getOrderTaxRatePercentage as A, normalizeOrderTaxDetails as T } from "./lib/order-tax-details.es.js";
|
|
8
|
+
import { DEFAULT_INVOICE_SETTINGS as E, INVOICE_SETTINGS_KEY as I, formatInvoiceCurrency as b, formatInvoiceDate as k, getInvoiceAddressLines as M, normalizeInvoiceSettings as N, serializeInvoiceSettings as z } from "./lib/invoice.es.js";
|
|
9
|
+
import { assignInvoiceMetadata as U, getInvoiceBrandingData as W, getInvoiceOrder as _, getInvoicePresentationData as G } from "./lib/invoice-server.es.js";
|
|
10
|
+
import { getCurrentCustomerOrder as V, getCurrentCustomerOrderInvoice as w, getCurrentCustomerOrders as B } from "./lib/customer-orders.es.js";
|
|
11
|
+
import { getCouponQuote as Z, getQuoteLineDiscountMap as Q, recordCouponRedemption as J } from "./lib/coupon-server.es.js";
|
|
12
|
+
import { deleteCouponFromFreemius as q, syncCouponToFreemius as H, syncProductSaleCouponToFreemius as X } from "./lib/freemius-coupons.es.js";
|
|
13
|
+
import { addressesMatch as ee, emptyCustomerAddress as re, isCustomerAddressComplete as te, normalizeCustomerAddress as oe, normalizeOrderCustomerDetails as ae } from "./lib/customer.es.js";
|
|
14
|
+
import { fillMissingUserProfileCheckoutDetails as ie, getDefaultUserAddresses as se, upsertDefaultUserAddresses as ue } from "./lib/customer-addresses.es.js";
|
|
15
|
+
import { CURRENCY_ROUNDING_MODES as de, applyCurrencyRounding as me, convertMinorUnitAmount as pe, describeCurrencyRoundingRule as ge, getCurrencyLookup as le, getDefaultCurrency as Ce, getExchangeRateForCurrency as Pe, inferCurrencyCodeFromLocale as fe, isSaleWindowActive as xe, isScheduledPriceDue as ye, normalizeCurrencyRecord as Se, normalizeCurrencyRoundingMode as ve, normalizePriceMap as Fe, normalizeSalePriceMap as he, resolveEffectivePriceForCurrency as Oe, resolvePriceForCurrency as Re, resolvePriceRangeForCurrency as Ae, sortCurrencies as Te } from "./lib/currency.es.js";
|
|
16
|
+
import { CURRENCY_COOKIE_NAME as Ee } from "./lib/currency-constants.es.js";
|
|
17
|
+
import { clearAutoSyncedCurrencyPriceOverrides as be, rebaseStoreCurrencyExchangeRates as ke, syncStoreCurrencyRates as Me } from "./lib/currency-sync.es.js";
|
|
18
|
+
import { productSchema as ze } from "./lib/product-schema.es.js";
|
|
19
|
+
import { copyProductFromLanguage as Ue, createProduct as We, deleteProduct as _e, fetchTranslatedProductsForCartInternal as Ge, getProduct as Ke, getProductBySlug as Ve, getProducts as we, syncCategoriesForTranslationGroup as Be, updateProduct as Ye } from "./lib/product-actions.es.js";
|
|
20
|
+
import { getPaymentProvider as Qe } from "./lib/factory.es.js";
|
|
21
|
+
import { StripeProvider as je } from "./lib/providers/stripe.es.js";
|
|
22
|
+
import { FreemiusProvider as He, parseFreemiusCheckoutCredentialsMap as Xe, readFreemiusEnvValue as $e, resolveFreemiusCheckoutCredentials as er, syncFreemiusProductsToSupabase as rr, syncSingleFreemiusProduct as tr } from "./lib/providers/freemius.es.js";
|
|
23
|
+
import { extractFreemiusCheckoutMetadata as ar, getFreemiusWebhookSecretCandidates as nr, resolveFreemiusStatusFromCheckoutResponse as ir, resolveFreemiusStatusFromWebhookEvent as sr, syncFreemiusCheckoutOrder as ur, syncFreemiusOrderFromWebhookEvent as cr, verifyFreemiusWebhookSignature as dr } from "./lib/freemius-order-sync.es.js";
|
|
24
|
+
import { getCategoriesWithCount as pr, getCategoryBySlug as gr, getProduct as lr, getProducts as Cr, getGlobalProductAttributes as Pr, getProductCategories as fr, getProductTranslations as xr } from "./lib/pages/cms/products/actions.es.js";
|
|
25
|
+
import { createCategoryAction as Sr, createProductAction as vr, deleteCategoryAction as Fr, deleteProductAction as hr, syncProductCategoriesAction as Or, updateCategoryAction as Rr, updateProductAction as Ar } from "./lib/pages/cms/products/server-actions.es.js";
|
|
26
|
+
import { getEnabledPaymentProviders as Dr, getPaymentSettings as Er, getStoreConfigStatus as Ir } from "./lib/pages/cms/payments/queries.es.js";
|
|
27
|
+
import { OrdersPage as kr } from "./lib/pages/cms/orders/OrdersPage.es.js";
|
|
28
|
+
import { OrderDetailPage as Nr } from "./lib/pages/cms/orders/OrderDetailPage.es.js";
|
|
29
|
+
import { ExportReportsDialog as Lr } from "./lib/pages/cms/orders/ExportReportsDialog.es.js";
|
|
30
|
+
import { fetchOrderReportData as Wr } from "./lib/pages/cms/orders/export-actions.es.js";
|
|
31
|
+
import { getOrderDetails as Gr, getOrders as Kr } from "./lib/pages/cms/orders/actions.es.js";
|
|
32
|
+
import { ProductsPage as wr } from "./lib/pages/cms/products/ProductsPage.es.js";
|
|
33
|
+
import { InventoryPage as Yr } from "./lib/pages/cms/products/inventory/InventoryPage.es.js";
|
|
34
|
+
import { AttributeManagementPage as Qr } from "./lib/pages/cms/products/attributes/AttributeManagementPage.es.js";
|
|
35
|
+
import { NewProductPage as jr } from "./lib/pages/cms/products/new/NewProductPage.es.js";
|
|
36
|
+
import { EditProductPage as Hr } from "./lib/pages/cms/products/_id_/edit/EditProductPage.es.js";
|
|
37
|
+
import { CopyProductFromLanguage as $r } from "./lib/pages/cms/products/components/CopyProductFromLanguage.es.js";
|
|
38
|
+
import { CategoryManagementPage as rt } from "./lib/pages/cms/products/categories/CategoryManagementPage.es.js";
|
|
39
|
+
import { PaymentsPage as ot } from "./lib/pages/cms/payments/PaymentsPage.es.js";
|
|
40
|
+
import { savePaymentProviderCredentials as nt, updatePaymentSettings as it } from "./lib/pages/cms/payments/actions.es.js";
|
|
41
|
+
import { ShippingPage as ut } from "./lib/pages/cms/shipping/ShippingPage.es.js";
|
|
42
|
+
import { createShippingRate as dt, createShippingZone as mt, deleteShippingRate as pt, deleteShippingZone as gt, updateInventoryTrackingAction as lt, updateShippingRate as Ct, updateShippingZone as Pt } from "./lib/pages/cms/shipping/server-actions.es.js";
|
|
43
|
+
import { TaxesPage as xt } from "./lib/pages/cms/taxes/TaxesPage.es.js";
|
|
44
|
+
import { deleteTaxRateAction as St, saveTaxRateAction as vt, updateTaxSettingsAction as Ft } from "./lib/pages/cms/taxes/actions.es.js";
|
|
45
|
+
import { CouponsPage as Ot } from "./lib/pages/cms/coupons/CouponsPage.es.js";
|
|
46
|
+
import { EditCouponPage as At } from "./lib/pages/cms/coupons/EditCouponPage.es.js";
|
|
46
47
|
export {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
48
|
+
Qr as AttributeManagementPage,
|
|
49
|
+
Ee as CURRENCY_COOKIE_NAME,
|
|
50
|
+
de as CURRENCY_ROUNDING_MODES,
|
|
51
|
+
rt as CategoryManagementPage,
|
|
52
|
+
$r as CopyProductFromLanguage,
|
|
53
|
+
Ot as CouponsPage,
|
|
54
|
+
E as DEFAULT_INVOICE_SETTINGS,
|
|
55
|
+
At as EditCouponPage,
|
|
56
|
+
Hr as EditProductPage,
|
|
57
|
+
Lr as ExportReportsDialog,
|
|
58
|
+
He as FreemiusProvider,
|
|
59
|
+
I as INVOICE_SETTINGS_KEY,
|
|
60
|
+
Yr as InventoryPage,
|
|
61
|
+
jr as NewProductPage,
|
|
62
|
+
Nr as OrderDetailPage,
|
|
63
|
+
kr as OrdersPage,
|
|
64
|
+
ot as PaymentsPage,
|
|
65
|
+
wr as ProductsPage,
|
|
66
|
+
ut as ShippingPage,
|
|
67
|
+
je as StripeProvider,
|
|
68
|
+
xt as TaxesPage,
|
|
69
|
+
ee as addressesMatch,
|
|
70
|
+
v as aggregateOrderTaxLines,
|
|
71
|
+
me as applyCurrencyRounding,
|
|
72
|
+
y as applyOrderInventoryDeduction,
|
|
73
|
+
U as assignInvoiceMetadata,
|
|
74
|
+
F as buildOrderTaxDetailsFromCalculation,
|
|
75
|
+
h as buildOrderTaxDetailsFromStripeSession,
|
|
76
|
+
be as clearAutoSyncedCurrencyPriceOverrides,
|
|
77
|
+
t as clearPaymentConfigCache,
|
|
78
|
+
pe as convertMinorUnitAmount,
|
|
79
|
+
Ue as copyProductFromLanguage,
|
|
80
|
+
Sr as createCategoryAction,
|
|
81
|
+
g as createCheckoutSession,
|
|
82
|
+
We as createProduct,
|
|
83
|
+
vr as createProductAction,
|
|
84
|
+
dt as createShippingRate,
|
|
85
|
+
mt as createShippingZone,
|
|
86
|
+
Fr as deleteCategoryAction,
|
|
87
|
+
q as deleteCouponFromFreemius,
|
|
88
|
+
_e as deleteProduct,
|
|
89
|
+
hr as deleteProductAction,
|
|
90
|
+
pt as deleteShippingRate,
|
|
91
|
+
gt as deleteShippingZone,
|
|
92
|
+
St as deleteTaxRateAction,
|
|
93
|
+
ge as describeCurrencyRoundingRule,
|
|
94
|
+
re as emptyCustomerAddress,
|
|
95
|
+
ar as extractFreemiusCheckoutMetadata,
|
|
96
|
+
Wr as fetchOrderReportData,
|
|
97
|
+
Ge as fetchTranslatedProductsForCartInternal,
|
|
98
|
+
ie as fillMissingUserProfileCheckoutDetails,
|
|
99
|
+
b as formatInvoiceCurrency,
|
|
100
|
+
k as formatInvoiceDate,
|
|
101
|
+
pr as getCategoriesWithCount,
|
|
102
|
+
gr as getCategoryBySlug,
|
|
103
|
+
lr as getCmsProduct,
|
|
104
|
+
Cr as getCmsProducts,
|
|
105
|
+
Z as getCouponQuote,
|
|
106
|
+
le as getCurrencyLookup,
|
|
107
|
+
V as getCurrentCustomerOrder,
|
|
108
|
+
w as getCurrentCustomerOrderInvoice,
|
|
109
|
+
B as getCurrentCustomerOrders,
|
|
110
|
+
Ce as getDefaultCurrency,
|
|
111
|
+
se as getDefaultUserAddresses,
|
|
112
|
+
Dr as getEnabledPaymentProviders,
|
|
113
|
+
Pe as getExchangeRateForCurrency,
|
|
114
|
+
nr as getFreemiusWebhookSecretCandidates,
|
|
115
|
+
Pr as getGlobalProductAttributes,
|
|
116
|
+
M as getInvoiceAddressLines,
|
|
117
|
+
W as getInvoiceBrandingData,
|
|
118
|
+
_ as getInvoiceOrder,
|
|
119
|
+
G as getInvoicePresentationData,
|
|
120
|
+
Gr as getOrderDetails,
|
|
121
|
+
O as getOrderTaxRateJurisdiction,
|
|
122
|
+
R as getOrderTaxRateLabel,
|
|
123
|
+
A as getOrderTaxRatePercentage,
|
|
124
|
+
Kr as getOrders,
|
|
125
|
+
o as getPaymentConfigStatus,
|
|
126
|
+
a as getPaymentCredentialsView,
|
|
127
|
+
Qe as getPaymentProvider,
|
|
128
|
+
Er as getPaymentSettings,
|
|
129
|
+
Ke as getProduct,
|
|
130
|
+
Ve as getProductBySlug,
|
|
131
|
+
fr as getProductCategories,
|
|
132
|
+
xr as getProductTranslations,
|
|
133
|
+
we as getProducts,
|
|
134
|
+
Q as getQuoteLineDiscountMap,
|
|
135
|
+
Ir as getStoreConfigStatus,
|
|
136
|
+
m as getStripeClient,
|
|
137
|
+
f as handleStripeWebhook,
|
|
138
|
+
n as hydrateFreemiusEnvFromDb,
|
|
139
|
+
fe as inferCurrencyCodeFromLocale,
|
|
140
|
+
te as isCustomerAddressComplete,
|
|
141
|
+
xe as isSaleWindowActive,
|
|
142
|
+
ye as isScheduledPriceDue,
|
|
143
|
+
Se as normalizeCurrencyRecord,
|
|
144
|
+
ve as normalizeCurrencyRoundingMode,
|
|
145
|
+
oe as normalizeCustomerAddress,
|
|
146
|
+
N as normalizeInvoiceSettings,
|
|
147
|
+
ae as normalizeOrderCustomerDetails,
|
|
148
|
+
T as normalizeOrderTaxDetails,
|
|
149
|
+
Fe as normalizePriceMap,
|
|
150
|
+
he as normalizeSalePriceMap,
|
|
151
|
+
Xe as parseFreemiusCheckoutCredentialsMap,
|
|
152
|
+
ze as productSchema,
|
|
153
|
+
$e as readFreemiusEnvValue,
|
|
154
|
+
ke as rebaseStoreCurrencyExchangeRates,
|
|
155
|
+
J as recordCouponRedemption,
|
|
156
|
+
Oe as resolveEffectivePriceForCurrency,
|
|
157
|
+
er as resolveFreemiusCheckoutCredentials,
|
|
158
|
+
ir as resolveFreemiusStatusFromCheckoutResponse,
|
|
159
|
+
sr as resolveFreemiusStatusFromWebhookEvent,
|
|
160
|
+
Re as resolvePriceForCurrency,
|
|
161
|
+
Ae as resolvePriceRangeForCurrency,
|
|
162
|
+
i as resolveStripePublishableKey,
|
|
163
|
+
s as resolveStripeSecretKey,
|
|
164
|
+
u as resolveStripeWebhookSecret,
|
|
165
|
+
c as savePaymentCredentials,
|
|
166
|
+
nt as savePaymentProviderCredentials,
|
|
167
|
+
vt as saveTaxRateAction,
|
|
168
|
+
z as serializeInvoiceSettings,
|
|
169
|
+
Te as sortCurrencies,
|
|
170
|
+
Be as syncCategoriesForTranslationGroup,
|
|
171
|
+
H as syncCouponToFreemius,
|
|
172
|
+
ur as syncFreemiusCheckoutOrder,
|
|
173
|
+
cr as syncFreemiusOrderFromWebhookEvent,
|
|
174
|
+
rr as syncFreemiusProductsToSupabase,
|
|
175
|
+
Or as syncProductCategoriesAction,
|
|
176
|
+
X as syncProductSaleCouponToFreemius,
|
|
177
|
+
tr as syncSingleFreemiusProduct,
|
|
178
|
+
Me as syncStoreCurrencyRates,
|
|
179
|
+
C as syncStripeOrderFromSession,
|
|
180
|
+
Rr as updateCategoryAction,
|
|
181
|
+
lt as updateInventoryTrackingAction,
|
|
182
|
+
it as updatePaymentSettings,
|
|
183
|
+
Ye as updateProduct,
|
|
184
|
+
Ar as updateProductAction,
|
|
185
|
+
Ct as updateShippingRate,
|
|
186
|
+
Pt as updateShippingZone,
|
|
187
|
+
Ft as updateTaxSettingsAction,
|
|
188
|
+
ue as upsertDefaultUserAddresses,
|
|
189
|
+
dr as verifyFreemiusWebhookSignature
|
|
180
190
|
};
|