@nextblock-cms/ecom 0.10.2 → 0.10.4
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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getStripeClient as q } from "./client.es.js";
|
|
2
2
|
import { createClient as L } from "@supabase/supabase-js";
|
|
3
3
|
import { verifyPackageOnline as N } from "@nextblock-cms/db/server";
|
|
4
4
|
import { resolveShippingOptions as k } from "../shipping/resolver.es.js";
|
|
@@ -12,14 +12,14 @@ const M = async (n, d, v, P) => {
|
|
|
12
12
|
return { error: "Cart is empty", url: null };
|
|
13
13
|
const { data: A } = await t.from("currencies").select(
|
|
14
14
|
"code, symbol, exchange_rate, is_default, is_active, auto_sync_product_prices, auto_update_exchange_rate, exchange_rate_source, exchange_rate_updated_at, rounding_mode, rounding_increment, rounding_charm_amount"
|
|
15
|
-
).eq("is_active", !0).order("code", { ascending: !0 }), u = A ?? [],
|
|
15
|
+
).eq("is_active", !0).order("code", { ascending: !0 }), u = A ?? [], w = B(u), o = u.find((e) => e.code === (P || "").toUpperCase()) ?? w;
|
|
16
16
|
if (!await N("ecommerce"))
|
|
17
17
|
return { error: "E-Commerce Package not active. Please purchase a license to accept payments.", url: null };
|
|
18
|
-
const
|
|
18
|
+
const U = n.map((e) => e.product_id), { data: g, error: E } = await t.from("products").select("id, title, price, prices, sale_price, sale_prices, sale_start_at, sale_end_at, scheduled_price, scheduled_prices, scheduled_price_at").in("id", U);
|
|
19
19
|
if (E || !g)
|
|
20
20
|
return console.error("Error fetching products for validation:", E), { error: "Failed to validate product prices", url: null };
|
|
21
21
|
const I = new Map(g.map((e) => [e.id, e])), l = [];
|
|
22
|
-
let
|
|
22
|
+
let s = 0;
|
|
23
23
|
const y = [];
|
|
24
24
|
for (const e of n) {
|
|
25
25
|
const r = I.get(e.product_id);
|
|
@@ -54,7 +54,7 @@ const M = async (n, d, v, P) => {
|
|
|
54
54
|
unit_amount: a
|
|
55
55
|
},
|
|
56
56
|
quantity: e.quantity
|
|
57
|
-
}),
|
|
57
|
+
}), s += a * e.quantity, y.push({
|
|
58
58
|
product_id: r.id,
|
|
59
59
|
quantity: e.quantity,
|
|
60
60
|
price_at_purchase: a
|
|
@@ -62,16 +62,16 @@ const M = async (n, d, v, P) => {
|
|
|
62
62
|
}
|
|
63
63
|
if (l.length === 0)
|
|
64
64
|
return { error: "No valid items in cart", url: null };
|
|
65
|
-
const { data:
|
|
66
|
-
total:
|
|
65
|
+
const { data: c, error: p } = await t.from("orders").insert({
|
|
66
|
+
total: s,
|
|
67
67
|
user_id: d,
|
|
68
68
|
currency: o.code,
|
|
69
69
|
exchange_rate_at_purchase: o.exchange_rate
|
|
70
70
|
}).select("id").single();
|
|
71
|
-
if (p || !
|
|
72
|
-
return console.error("Failed to create pending order:", p), console.error("Order Data attempted:", { status: "pending", total:
|
|
71
|
+
if (p || !c)
|
|
72
|
+
return console.error("Failed to create pending order:", p), console.error("Order Data attempted:", { status: "pending", total: s }), { error: `Failed to initiate order: ${p?.message || "Unknown error"}`, url: null };
|
|
73
73
|
const R = y.map((e) => ({
|
|
74
|
-
order_id:
|
|
74
|
+
order_id: c.id,
|
|
75
75
|
product_id: e.product_id,
|
|
76
76
|
quantity: e.quantity,
|
|
77
77
|
price_at_purchase: e.price_at_purchase
|
|
@@ -87,7 +87,7 @@ const M = async (n, d, v, P) => {
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
i && (_ = (await k(
|
|
90
|
-
|
|
90
|
+
s,
|
|
91
91
|
i,
|
|
92
92
|
null,
|
|
93
93
|
o.code
|
|
@@ -103,7 +103,7 @@ const M = async (n, d, v, P) => {
|
|
|
103
103
|
}
|
|
104
104
|
})));
|
|
105
105
|
try {
|
|
106
|
-
const
|
|
106
|
+
const r = await (await q()).checkout.sessions.create({
|
|
107
107
|
mode: "payment",
|
|
108
108
|
success_url: `${f}/checkout/success?session_id={CHECKOUT_SESSION_ID}`,
|
|
109
109
|
cancel_url: `${f}/`,
|
|
@@ -169,10 +169,10 @@ const M = async (n, d, v, P) => {
|
|
|
169
169
|
},
|
|
170
170
|
shipping_options: _.length > 0 ? _ : void 0,
|
|
171
171
|
metadata: {
|
|
172
|
-
orderId:
|
|
172
|
+
orderId: c.id
|
|
173
173
|
}
|
|
174
174
|
});
|
|
175
|
-
return await t.from("orders").update({ stripe_session_id:
|
|
175
|
+
return await t.from("orders").update({ stripe_session_id: r.id }).eq("id", c.id), { url: r.url };
|
|
176
176
|
} catch (e) {
|
|
177
177
|
return console.error("Stripe session creation failed:", e), { error: e.message, url: null };
|
|
178
178
|
}
|
package/lib/stripe/client.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("stripe"),i=require("../payment-config.cjs.js");let e=null,r=null;async function c(){const t=await i.resolveStripeSecretKey()||"sk_test_dummy";return e&&r===t||(e=new n(t,{typescript:!0}),r=t),e}exports.getStripeClient=c;
|
package/lib/stripe/client.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { default as Stripe } from 'stripe';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function getStripeClient(): Promise<Stripe>;
|
package/lib/stripe/client.es.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import i from "stripe";
|
|
2
|
+
import { resolveStripeSecretKey as n } from "../payment-config.es.js";
|
|
3
|
+
let e = null, r = null;
|
|
4
|
+
async function o() {
|
|
5
|
+
const t = await n() || "sk_test_dummy";
|
|
6
|
+
return e && r === t || (e = new i(t, { typescript: !0 }), r = t), e;
|
|
7
|
+
}
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
o as getStripeClient
|
|
7
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("@supabase/supabase-js"),d=require("../customer.cjs.js"),I=require("../customer-addresses.cjs.js"),w=require("../order-inventory.cjs.js"),E=require("../order-tax-details.cjs.js"),U=require("../invoice-server.cjs.js"),O=require("./client.cjs.js"),R=["total_details.breakdown"],P=["data.taxes.rate"];function q(){const r=process.env.NEXT_PUBLIC_SUPABASE_URL||process.env.SUPABASE_URL,t=process.env.SUPABASE_SERVICE_ROLE_KEY||process.env.SUPABASE_SECRET_KEY;if(!r||!t)throw new Error("Missing Supabase Service Role environment variables");return C.createClient(r,t,{auth:{autoRefreshToken:!1,persistSession:!1}})}function x(r,t){return r?d.normalizeCustomerAddress({recipient_name:t,line1:r.line1??null,line2:r.line2??null,city:r.city??null,state:r.state??null,postal_code:r.postal_code??null,country_code:r.country??null}):null}function z(r){const t=r??{};return d.normalizeOrderCustomerDetails({email:typeof t.email=="string"?t.email:null,name:typeof t.name=="string"?t.name:null,phone:typeof t.phone=="string"?t.phone:null,billing:t.billing??null,shipping:t.shipping??null})}async function k(r){const t=q(),u=await O.getStripeClient();let i=r;try{i=await u.checkout.sessions.retrieve(r.id,{expand:[...R]})}catch(c){console.error("[Stripe Sync] Failed to rehydrate session tax details:",c)}const p=i.metadata?.orderId;let m=t.from("orders").select("id, user_id, status, total, currency, subtotal, shipping_total, tax_total, tax_details, customer_details").eq("stripe_session_id",r.id).maybeSingle();p&&(m=t.from("orders").select("id, user_id, status, total, currency, subtotal, shipping_total, tax_total, tax_details, customer_details").eq("id",p).maybeSingle());const{data:e,error:_}=await m;if(_||!e)throw new Error(_?.message||"Order lookup failed");const s=z(e.customer_details),n=E.normalizeOrderTaxDetails(e.tax_details),v=x(i.customer_details?.address,i.customer_details?.name??s.name),y=i,A=x(y.shipping_details?.address,y.shipping_details?.name??s.name),o=d.normalizeOrderCustomerDetails({email:i.customer_details?.email??s.email,name:i.customer_details?.name??s.name,phone:i.customer_details?.phone??s.phone,billing:s.billing??v,shipping:s.shipping??A}),T=e.status==="paid",D=await u.checkout.sessions.listLineItems(i.id,{limit:100,expand:[...P]}),l=E.buildOrderTaxDetailsFromStripeSession({session:i,lineItems:D.data,subtotal:typeof e.subtotal=="number"?e.subtotal:n?.subtotal??0,shippingTotal:typeof e.shipping_total=="number"?e.shipping_total:n?.shipping_total??0,fallbackMode:n?.mode??"automatic",currency:(i.currency??e.currency??n?.currency??"USD").toUpperCase()}),a=l.tax_total>0||l.lines.length>0?l:n??l,S=a?.tax_total??(typeof e.tax_total=="number"?e.tax_total:0),g=(i.currency??e.currency??a?.currency??"USD").toUpperCase(),h={status:"paid",stripe_session_id:i.id,payment_intent_id:typeof i.payment_intent=="string"?i.payment_intent:null,provider:"stripe",customer_details:o,total:typeof i.amount_total=="number"?i.amount_total:e.total,currency:g,tax_total:S,tax_details:a},{error:b}=await t.from("orders").update(h).eq("id",e.id);if(b)throw new Error(b.message);if(e.user_id)try{await I.upsertDefaultUserAddresses({userId:e.user_id,billingAddress:o.billing,shippingAddress:o.shipping,client:t})}catch(c){console.error("[Stripe Sync] Failed to refresh saved customer addresses:",c)}const f=await U.assignInvoiceMetadata({orderId:e.id,client:t});return await w.applyOrderInventoryDeduction(t,e.id),{orderId:e.id,alreadyPaid:T,customerDetails:o,order:{id:e.id,invoice_number:f.invoiceNumber,paid_at:f.paidAt,total:h.total,currency:g,subtotal:typeof e.subtotal=="number"?e.subtotal:a?.subtotal??0,shipping_total:typeof e.shipping_total=="number"?e.shipping_total:a?.shipping_total??0,tax_total:S,tax_details:a}}}exports.syncStripeOrderFromSession=k;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createClient as
|
|
2
|
-
import { normalizeOrderCustomerDetails as E, normalizeCustomerAddress as
|
|
3
|
-
import { upsertDefaultUserAddresses as
|
|
1
|
+
import { createClient as C } from "@supabase/supabase-js";
|
|
2
|
+
import { normalizeOrderCustomerDetails as E, normalizeCustomerAddress as D } from "../customer.es.js";
|
|
3
|
+
import { upsertDefaultUserAddresses as I } from "../customer-addresses.es.js";
|
|
4
4
|
import { applyOrderInventoryDeduction as w } from "../order-inventory.es.js";
|
|
5
5
|
import { normalizeOrderTaxDetails as U, buildOrderTaxDetailsFromStripeSession as R } from "../order-tax-details.es.js";
|
|
6
6
|
import { assignInvoiceMetadata as P } from "../invoice-server.es.js";
|
|
7
|
-
import {
|
|
8
|
-
const
|
|
9
|
-
function
|
|
7
|
+
import { getStripeClient as O } from "./client.es.js";
|
|
8
|
+
const z = ["total_details.breakdown"], k = ["data.taxes.rate"];
|
|
9
|
+
function B() {
|
|
10
10
|
const r = process.env.NEXT_PUBLIC_SUPABASE_URL || process.env.SUPABASE_URL, t = process.env.SUPABASE_SERVICE_ROLE_KEY || process.env.SUPABASE_SECRET_KEY;
|
|
11
11
|
if (!r || !t)
|
|
12
12
|
throw new Error("Missing Supabase Service Role environment variables");
|
|
13
|
-
return
|
|
13
|
+
return C(r, t, {
|
|
14
14
|
auth: {
|
|
15
15
|
autoRefreshToken: !1,
|
|
16
16
|
persistSession: !1
|
|
@@ -18,7 +18,7 @@ function k() {
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
function b(r, t) {
|
|
21
|
-
return r ?
|
|
21
|
+
return r ? D({
|
|
22
22
|
recipient_name: t,
|
|
23
23
|
line1: r.line1 ?? null,
|
|
24
24
|
line2: r.line2 ?? null,
|
|
@@ -28,7 +28,7 @@ function b(r, t) {
|
|
|
28
28
|
country_code: r.country ?? null
|
|
29
29
|
}) : null;
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function L(r) {
|
|
32
32
|
const t = r ?? {};
|
|
33
33
|
return E({
|
|
34
34
|
email: typeof t.email == "string" ? t.email : null,
|
|
@@ -38,41 +38,41 @@ function B(r) {
|
|
|
38
38
|
shipping: t.shipping ?? null
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
async function
|
|
42
|
-
const t =
|
|
41
|
+
async function Y(r) {
|
|
42
|
+
const t = B(), p = await O();
|
|
43
43
|
let i = r;
|
|
44
44
|
try {
|
|
45
|
-
i = await
|
|
46
|
-
expand: [...
|
|
45
|
+
i = await p.checkout.sessions.retrieve(r.id, {
|
|
46
|
+
expand: [...z]
|
|
47
47
|
});
|
|
48
48
|
} catch (d) {
|
|
49
49
|
console.error("[Stripe Sync] Failed to rehydrate session tax details:", d);
|
|
50
50
|
}
|
|
51
|
-
const
|
|
52
|
-
let
|
|
51
|
+
const c = i.metadata?.orderId;
|
|
52
|
+
let u = t.from("orders").select(
|
|
53
53
|
"id, user_id, status, total, currency, subtotal, shipping_total, tax_total, tax_details, customer_details"
|
|
54
54
|
).eq("stripe_session_id", r.id).maybeSingle();
|
|
55
|
-
|
|
55
|
+
c && (u = t.from("orders").select(
|
|
56
56
|
"id, user_id, status, total, currency, subtotal, shipping_total, tax_total, tax_details, customer_details"
|
|
57
|
-
).eq("id",
|
|
58
|
-
const { data: e, error:
|
|
59
|
-
if (
|
|
60
|
-
throw new Error(
|
|
61
|
-
const
|
|
57
|
+
).eq("id", c).maybeSingle());
|
|
58
|
+
const { data: e, error: m } = await u;
|
|
59
|
+
if (m || !e)
|
|
60
|
+
throw new Error(m?.message || "Order lookup failed");
|
|
61
|
+
const a = L(e.customer_details), o = U(e.tax_details), x = b(
|
|
62
62
|
i.customer_details?.address,
|
|
63
|
-
i.customer_details?.name ??
|
|
64
|
-
),
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
i.customer_details?.name ?? a.name
|
|
64
|
+
), _ = i, A = b(
|
|
65
|
+
_.shipping_details?.address,
|
|
66
|
+
_.shipping_details?.name ?? a.name
|
|
67
67
|
), n = E({
|
|
68
|
-
email: i.customer_details?.email ??
|
|
69
|
-
name: i.customer_details?.name ??
|
|
70
|
-
phone: i.customer_details?.phone ??
|
|
71
|
-
billing:
|
|
72
|
-
shipping:
|
|
73
|
-
}), T = e.status === "paid", v = await
|
|
68
|
+
email: i.customer_details?.email ?? a.email,
|
|
69
|
+
name: i.customer_details?.name ?? a.name,
|
|
70
|
+
phone: i.customer_details?.phone ?? a.phone,
|
|
71
|
+
billing: a.billing ?? x,
|
|
72
|
+
shipping: a.shipping ?? A
|
|
73
|
+
}), T = e.status === "paid", v = await p.checkout.sessions.listLineItems(i.id, {
|
|
74
74
|
limit: 100,
|
|
75
|
-
expand: [...
|
|
75
|
+
expand: [...k]
|
|
76
76
|
}), l = R({
|
|
77
77
|
session: i,
|
|
78
78
|
lineItems: v.data,
|
|
@@ -80,22 +80,22 @@ async function H(r) {
|
|
|
80
80
|
shippingTotal: typeof e.shipping_total == "number" ? e.shipping_total : o?.shipping_total ?? 0,
|
|
81
81
|
fallbackMode: o?.mode ?? "automatic",
|
|
82
82
|
currency: (i.currency ?? e.currency ?? o?.currency ?? "USD").toUpperCase()
|
|
83
|
-
}),
|
|
83
|
+
}), s = l.tax_total > 0 || l.lines.length > 0 ? l : o ?? l, y = s?.tax_total ?? (typeof e.tax_total == "number" ? e.tax_total : 0), f = (i.currency ?? e.currency ?? s?.currency ?? "USD").toUpperCase(), g = {
|
|
84
84
|
status: "paid",
|
|
85
85
|
stripe_session_id: i.id,
|
|
86
86
|
payment_intent_id: typeof i.payment_intent == "string" ? i.payment_intent : null,
|
|
87
87
|
provider: "stripe",
|
|
88
88
|
customer_details: n,
|
|
89
89
|
total: typeof i.amount_total == "number" ? i.amount_total : e.total,
|
|
90
|
-
currency:
|
|
91
|
-
tax_total:
|
|
92
|
-
tax_details:
|
|
93
|
-
}, { error:
|
|
94
|
-
if (
|
|
95
|
-
throw new Error(
|
|
90
|
+
currency: f,
|
|
91
|
+
tax_total: y,
|
|
92
|
+
tax_details: s
|
|
93
|
+
}, { error: S } = await t.from("orders").update(g).eq("id", e.id);
|
|
94
|
+
if (S)
|
|
95
|
+
throw new Error(S.message);
|
|
96
96
|
if (e.user_id)
|
|
97
97
|
try {
|
|
98
|
-
await
|
|
98
|
+
await I({
|
|
99
99
|
userId: e.user_id,
|
|
100
100
|
billingAddress: n.billing,
|
|
101
101
|
shippingAddress: n.shipping,
|
|
@@ -104,7 +104,7 @@ async function H(r) {
|
|
|
104
104
|
} catch (d) {
|
|
105
105
|
console.error("[Stripe Sync] Failed to refresh saved customer addresses:", d);
|
|
106
106
|
}
|
|
107
|
-
const
|
|
107
|
+
const h = await P({
|
|
108
108
|
orderId: e.id,
|
|
109
109
|
client: t
|
|
110
110
|
});
|
|
@@ -114,17 +114,17 @@ async function H(r) {
|
|
|
114
114
|
customerDetails: n,
|
|
115
115
|
order: {
|
|
116
116
|
id: e.id,
|
|
117
|
-
invoice_number:
|
|
118
|
-
paid_at:
|
|
119
|
-
total:
|
|
120
|
-
currency:
|
|
121
|
-
subtotal: typeof e.subtotal == "number" ? e.subtotal :
|
|
122
|
-
shipping_total: typeof e.shipping_total == "number" ? e.shipping_total :
|
|
123
|
-
tax_total:
|
|
124
|
-
tax_details:
|
|
117
|
+
invoice_number: h.invoiceNumber,
|
|
118
|
+
paid_at: h.paidAt,
|
|
119
|
+
total: g.total,
|
|
120
|
+
currency: f,
|
|
121
|
+
subtotal: typeof e.subtotal == "number" ? e.subtotal : s?.subtotal ?? 0,
|
|
122
|
+
shipping_total: typeof e.shipping_total == "number" ? e.shipping_total : s?.shipping_total ?? 0,
|
|
123
|
+
tax_total: y,
|
|
124
|
+
tax_details: s
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
}
|
|
128
128
|
export {
|
|
129
|
-
|
|
129
|
+
Y as syncStripeOrderFromSession
|
|
130
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./client.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./client.cjs.js"),a=require("../payment-config.cjs.js"),l=require("./order-sync.cjs.js"),d=async(s,i)=>{const o=await a.resolveStripeWebhookSecret();if(!o)return console.error("Missing Stripe webhook secret (configure it in CMS or STRIPE_WEBHOOK_SECRET)"),{received:!1,error:"Server configuration error"};const n=await c.getStripeClient();let e;try{e=n.webhooks.constructEvent(i,s,o)}catch(r){return console.error(`Webhook signature verification failed: ${r.message}`),{received:!1,error:`Webhook Error: ${r.message}`}}switch(e.type){case"checkout.session.completed":{const r=e.data.object;try{await l.syncStripeOrderFromSession(r)}catch(t){return console.error("[Stripe Webhook Error] Failed to sync completed session:",t),{received:!1,error:t.message||"Failed to sync Stripe session"}}break}default:console.log(`Unhandled event type ${e.type}`)}return{received:!0}};exports.handleStripeWebhook=d;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { getStripeClient as c } from "./client.es.js";
|
|
2
|
+
import { resolveStripeWebhookSecret as a } from "../payment-config.es.js";
|
|
3
|
+
import { syncStripeOrderFromSession as l } from "./order-sync.es.js";
|
|
4
|
+
const S = async (s, i) => {
|
|
5
|
+
const o = await a();
|
|
5
6
|
if (!o)
|
|
6
|
-
return console.error("Missing STRIPE_WEBHOOK_SECRET"), { received: !1, error: "Server configuration error" };
|
|
7
|
+
return console.error("Missing Stripe webhook secret (configure it in CMS or STRIPE_WEBHOOK_SECRET)"), { received: !1, error: "Server configuration error" };
|
|
8
|
+
const n = await c();
|
|
7
9
|
let e;
|
|
8
10
|
try {
|
|
9
|
-
e =
|
|
11
|
+
e = n.webhooks.constructEvent(i, s, o);
|
|
10
12
|
} catch (r) {
|
|
11
13
|
return console.error(`Webhook signature verification failed: ${r.message}`), { received: !1, error: `Webhook Error: ${r.message}` };
|
|
12
14
|
}
|
|
@@ -14,9 +16,9 @@ const d = async (t, n) => {
|
|
|
14
16
|
case "checkout.session.completed": {
|
|
15
17
|
const r = e.data.object;
|
|
16
18
|
try {
|
|
17
|
-
await
|
|
18
|
-
} catch (
|
|
19
|
-
return console.error("[Stripe Webhook Error] Failed to sync completed session:",
|
|
19
|
+
await l(r);
|
|
20
|
+
} catch (t) {
|
|
21
|
+
return console.error("[Stripe Webhook Error] Failed to sync completed session:", t), { received: !1, error: t.message || "Failed to sync Stripe session" };
|
|
20
22
|
}
|
|
21
23
|
break;
|
|
22
24
|
}
|
|
@@ -26,5 +28,5 @@ const d = async (t, n) => {
|
|
|
26
28
|
return { received: !0 };
|
|
27
29
|
};
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
S as handleStripeWebhook
|
|
30
32
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextblock-cms/ecom",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
},
|
|
11
11
|
"type": "module",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@nextblock-cms/db": "^0.10.
|
|
14
|
-
"@nextblock-cms/ui": "^0.10.
|
|
15
|
-
"@nextblock-cms/utils": "^0.10.
|
|
13
|
+
"@nextblock-cms/db": "^0.10.4",
|
|
14
|
+
"@nextblock-cms/ui": "^0.10.4",
|
|
15
|
+
"@nextblock-cms/utils": "^0.10.4",
|
|
16
16
|
"@freemius/checkout": "^1.4.1",
|
|
17
17
|
"@freemius/sdk": "^0.3.0",
|
|
18
18
|
"@hookform/resolvers": "^5.2.2",
|
package/server.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./lib/stripe/client.cjs.js"),F=require("./lib/stripe/checkout.cjs.js"),O=require("./lib/stripe/order-sync.cjs.js"),h=require("./lib/stripe/webhooks.cjs.js"),A=require("./lib/order-inventory.cjs.js"),t=require("./lib/order-tax-details.cjs.js"),o=require("./lib/invoice.cjs.js"),d=require("./lib/invoice-server.cjs.js"),g=require("./lib/customer-orders.cjs.js"),C=require("./lib/coupon-server.cjs.js"),l=require("./lib/freemius-coupons.cjs.js"),c=require("./lib/customer.cjs.js"),P=require("./lib/customer-addresses.cjs.js"),e=require("./lib/currency.cjs.js"),R=require("./lib/currency-constants.cjs.js"),p=require("./lib/currency-sync.cjs.js"),T=require("./lib/product-schema.cjs.js"),r=require("./lib/product-actions.cjs.js"),q=require("./lib/factory.cjs.js"),I=require("./lib/providers/stripe.cjs.js"),u=require("./lib/providers/freemius.cjs.js"),n=require("./lib/freemius-order-sync.cjs.js"),i=require("./lib/pages/cms/products/actions.cjs.js"),a=require("./lib/pages/cms/products/server-actions.cjs.js"),m=require("./lib/pages/cms/payments/queries.cjs.js"),D=require("./lib/pages/cms/orders/OrdersPage.cjs.js"),E=require("./lib/pages/cms/orders/OrderDetailPage.cjs.js"),b=require("./lib/pages/cms/orders/ExportReportsDialog.cjs.js"),x=require("./lib/pages/cms/orders/export-actions.cjs.js"),S=require("./lib/pages/cms/orders/actions.cjs.js"),f=require("./lib/pages/cms/products/ProductsPage.cjs.js"),M=require("./lib/pages/cms/products/inventory/InventoryPage.cjs.js"),k=require("./lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js"),N=require("./lib/pages/cms/products/new/NewProductPage.cjs.js"),L=require("./lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js"),z=require("./lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js"),_=require("./lib/pages/cms/products/categories/CategoryManagementPage.cjs.js"),U=require("./lib/pages/cms/payments/PaymentsPage.cjs.js"),W=require("./lib/pages/cms/payments/actions.cjs.js"),G=require("./lib/pages/cms/shipping/ShippingPage.cjs.js"),s=require("./lib/pages/cms/shipping/server-actions.cjs.js"),w=require("./lib/pages/cms/taxes/TaxesPage.cjs.js"),y=require("./lib/pages/cms/taxes/actions.cjs.js"),B=require("./lib/pages/cms/coupons/CouponsPage.cjs.js"),V=require("./lib/pages/cms/coupons/EditCouponPage.cjs.js");exports.stripe=v.stripe;exports.createCheckoutSession=F.createCheckoutSession;exports.syncStripeOrderFromSession=O.syncStripeOrderFromSession;exports.handleStripeWebhook=h.handleStripeWebhook;exports.applyOrderInventoryDeduction=A.applyOrderInventoryDeduction;exports.aggregateOrderTaxLines=t.aggregateOrderTaxLines;exports.buildOrderTaxDetailsFromCalculation=t.buildOrderTaxDetailsFromCalculation;exports.buildOrderTaxDetailsFromStripeSession=t.buildOrderTaxDetailsFromStripeSession;exports.getOrderTaxRateJurisdiction=t.getOrderTaxRateJurisdiction;exports.getOrderTaxRateLabel=t.getOrderTaxRateLabel;exports.getOrderTaxRatePercentage=t.getOrderTaxRatePercentage;exports.normalizeOrderTaxDetails=t.normalizeOrderTaxDetails;exports.DEFAULT_INVOICE_SETTINGS=o.DEFAULT_INVOICE_SETTINGS;exports.INVOICE_SETTINGS_KEY=o.INVOICE_SETTINGS_KEY;exports.formatInvoiceCurrency=o.formatInvoiceCurrency;exports.formatInvoiceDate=o.formatInvoiceDate;exports.getInvoiceAddressLines=o.getInvoiceAddressLines;exports.normalizeInvoiceSettings=o.normalizeInvoiceSettings;exports.serializeInvoiceSettings=o.serializeInvoiceSettings;exports.assignInvoiceMetadata=d.assignInvoiceMetadata;exports.getInvoiceBrandingData=d.getInvoiceBrandingData;exports.getInvoiceOrder=d.getInvoiceOrder;exports.getInvoicePresentationData=d.getInvoicePresentationData;exports.getCurrentCustomerOrder=g.getCurrentCustomerOrder;exports.getCurrentCustomerOrderInvoice=g.getCurrentCustomerOrderInvoice;exports.getCurrentCustomerOrders=g.getCurrentCustomerOrders;exports.getCouponQuote=C.getCouponQuote;exports.getQuoteLineDiscountMap=C.getQuoteLineDiscountMap;exports.recordCouponRedemption=C.recordCouponRedemption;exports.deleteCouponFromFreemius=l.deleteCouponFromFreemius;exports.syncCouponToFreemius=l.syncCouponToFreemius;exports.syncProductSaleCouponToFreemius=l.syncProductSaleCouponToFreemius;exports.addressesMatch=c.addressesMatch;exports.emptyCustomerAddress=c.emptyCustomerAddress;exports.isCustomerAddressComplete=c.isCustomerAddressComplete;exports.normalizeCustomerAddress=c.normalizeCustomerAddress;exports.normalizeOrderCustomerDetails=c.normalizeOrderCustomerDetails;exports.fillMissingUserProfileCheckoutDetails=P.fillMissingUserProfileCheckoutDetails;exports.getDefaultUserAddresses=P.getDefaultUserAddresses;exports.upsertDefaultUserAddresses=P.upsertDefaultUserAddresses;exports.CURRENCY_ROUNDING_MODES=e.CURRENCY_ROUNDING_MODES;exports.applyCurrencyRounding=e.applyCurrencyRounding;exports.convertMinorUnitAmount=e.convertMinorUnitAmount;exports.describeCurrencyRoundingRule=e.describeCurrencyRoundingRule;exports.getCurrencyLookup=e.getCurrencyLookup;exports.getDefaultCurrency=e.getDefaultCurrency;exports.getExchangeRateForCurrency=e.getExchangeRateForCurrency;exports.inferCurrencyCodeFromLocale=e.inferCurrencyCodeFromLocale;exports.isSaleWindowActive=e.isSaleWindowActive;exports.isScheduledPriceDue=e.isScheduledPriceDue;exports.normalizeCurrencyRecord=e.normalizeCurrencyRecord;exports.normalizeCurrencyRoundingMode=e.normalizeCurrencyRoundingMode;exports.normalizePriceMap=e.normalizePriceMap;exports.normalizeSalePriceMap=e.normalizeSalePriceMap;exports.resolveEffectivePriceForCurrency=e.resolveEffectivePriceForCurrency;exports.resolvePriceForCurrency=e.resolvePriceForCurrency;exports.resolvePriceRangeForCurrency=e.resolvePriceRangeForCurrency;exports.sortCurrencies=e.sortCurrencies;exports.CURRENCY_COOKIE_NAME=R.CURRENCY_COOKIE_NAME;exports.clearAutoSyncedCurrencyPriceOverrides=p.clearAutoSyncedCurrencyPriceOverrides;exports.rebaseStoreCurrencyExchangeRates=p.rebaseStoreCurrencyExchangeRates;exports.syncStoreCurrencyRates=p.syncStoreCurrencyRates;exports.productSchema=T.productSchema;exports.copyProductFromLanguage=r.copyProductFromLanguage;exports.createProduct=r.createProduct;exports.deleteProduct=r.deleteProduct;exports.fetchTranslatedProductsForCartInternal=r.fetchTranslatedProductsForCartInternal;exports.getProduct=r.getProduct;exports.getProductBySlug=r.getProductBySlug;exports.getProducts=r.getProducts;exports.syncCategoriesForTranslationGroup=r.syncCategoriesForTranslationGroup;exports.updateProduct=r.updateProduct;exports.getPaymentProvider=q.getPaymentProvider;exports.StripeProvider=I.StripeProvider;exports.FreemiusProvider=u.FreemiusProvider;exports.parseFreemiusCheckoutCredentialsMap=u.parseFreemiusCheckoutCredentialsMap;exports.readFreemiusEnvValue=u.readFreemiusEnvValue;exports.resolveFreemiusCheckoutCredentials=u.resolveFreemiusCheckoutCredentials;exports.syncFreemiusProductsToSupabase=u.syncFreemiusProductsToSupabase;exports.syncSingleFreemiusProduct=u.syncSingleFreemiusProduct;exports.extractFreemiusCheckoutMetadata=n.extractFreemiusCheckoutMetadata;exports.getFreemiusWebhookSecretCandidates=n.getFreemiusWebhookSecretCandidates;exports.resolveFreemiusStatusFromCheckoutResponse=n.resolveFreemiusStatusFromCheckoutResponse;exports.resolveFreemiusStatusFromWebhookEvent=n.resolveFreemiusStatusFromWebhookEvent;exports.syncFreemiusCheckoutOrder=n.syncFreemiusCheckoutOrder;exports.syncFreemiusOrderFromWebhookEvent=n.syncFreemiusOrderFromWebhookEvent;exports.verifyFreemiusWebhookSignature=n.verifyFreemiusWebhookSignature;exports.getCategoriesWithCount=i.getCategoriesWithCount;exports.getCategoryBySlug=i.getCategoryBySlug;exports.getCmsProduct=i.getProduct;exports.getCmsProducts=i.getProducts;exports.getGlobalProductAttributes=i.getGlobalProductAttributes;exports.getProductCategories=i.getProductCategories;exports.getProductTranslations=i.getProductTranslations;exports.createCategoryAction=a.createCategoryAction;exports.createProductAction=a.createProductAction;exports.deleteCategoryAction=a.deleteCategoryAction;exports.deleteProductAction=a.deleteProductAction;exports.syncProductCategoriesAction=a.syncProductCategoriesAction;exports.updateCategoryAction=a.updateCategoryAction;exports.updateProductAction=a.updateProductAction;exports.getEnabledPaymentProviders=m.getEnabledPaymentProviders;exports.getPaymentSettings=m.getPaymentSettings;exports.getStoreConfigStatus=m.getStoreConfigStatus;exports.OrdersPage=D.OrdersPage;exports.OrderDetailPage=E.OrderDetailPage;exports.ExportReportsDialog=b.ExportReportsDialog;exports.fetchOrderReportData=x.fetchOrderReportData;exports.getOrderDetails=S.getOrderDetails;exports.getOrders=S.getOrders;exports.ProductsPage=f.ProductsPage;exports.InventoryPage=M.InventoryPage;exports.AttributeManagementPage=k.AttributeManagementPage;exports.NewProductPage=N.NewProductPage;exports.EditProductPage=L.EditProductPage;exports.CopyProductFromLanguage=z.CopyProductFromLanguage;exports.CategoryManagementPage=_.CategoryManagementPage;exports.PaymentsPage=U.PaymentsPage;exports.updatePaymentSettings=W.updatePaymentSettings;exports.ShippingPage=G.ShippingPage;exports.createShippingRate=s.createShippingRate;exports.createShippingZone=s.createShippingZone;exports.deleteShippingRate=s.deleteShippingRate;exports.deleteShippingZone=s.deleteShippingZone;exports.updateInventoryTrackingAction=s.updateInventoryTrackingAction;exports.updateShippingRate=s.updateShippingRate;exports.updateShippingZone=s.updateShippingZone;exports.TaxesPage=w.TaxesPage;exports.deleteTaxRateAction=y.deleteTaxRateAction;exports.saveTaxRateAction=y.saveTaxRateAction;exports.updateTaxSettingsAction=y.updateTaxSettingsAction;exports.CouponsPage=B.CouponsPage;exports.EditCouponPage=V.EditCouponPage;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./lib/payment-config.cjs.js"),h=require("./lib/stripe/client.cjs.js"),O=require("./lib/stripe/checkout.cjs.js"),A=require("./lib/stripe/order-sync.cjs.js"),R=require("./lib/stripe/webhooks.cjs.js"),T=require("./lib/order-inventory.cjs.js"),o=require("./lib/order-tax-details.cjs.js"),n=require("./lib/invoice.cjs.js"),g=require("./lib/invoice-server.cjs.js"),l=require("./lib/customer-orders.cjs.js"),C=require("./lib/coupon-server.cjs.js"),P=require("./lib/freemius-coupons.cjs.js"),d=require("./lib/customer.cjs.js"),m=require("./lib/customer-addresses.cjs.js"),e=require("./lib/currency.cjs.js"),q=require("./lib/currency-constants.cjs.js"),p=require("./lib/currency-sync.cjs.js"),D=require("./lib/product-schema.cjs.js"),r=require("./lib/product-actions.cjs.js"),E=require("./lib/factory.cjs.js"),I=require("./lib/providers/stripe.cjs.js"),c=require("./lib/providers/freemius.cjs.js"),i=require("./lib/freemius-order-sync.cjs.js"),a=require("./lib/pages/cms/products/actions.cjs.js"),s=require("./lib/pages/cms/products/server-actions.cjs.js"),y=require("./lib/pages/cms/payments/queries.cjs.js"),b=require("./lib/pages/cms/orders/OrdersPage.cjs.js"),f=require("./lib/pages/cms/orders/OrderDetailPage.cjs.js"),x=require("./lib/pages/cms/orders/ExportReportsDialog.cjs.js"),k=require("./lib/pages/cms/orders/export-actions.cjs.js"),v=require("./lib/pages/cms/orders/actions.cjs.js"),M=require("./lib/pages/cms/products/ProductsPage.cjs.js"),N=require("./lib/pages/cms/products/inventory/InventoryPage.cjs.js"),L=require("./lib/pages/cms/products/attributes/AttributeManagementPage.cjs.js"),z=require("./lib/pages/cms/products/new/NewProductPage.cjs.js"),_=require("./lib/pages/cms/products/_id_/edit/EditProductPage.cjs.js"),U=require("./lib/pages/cms/products/components/CopyProductFromLanguage.cjs.js"),W=require("./lib/pages/cms/products/categories/CategoryManagementPage.cjs.js"),G=require("./lib/pages/cms/payments/PaymentsPage.cjs.js"),F=require("./lib/pages/cms/payments/actions.cjs.js"),w=require("./lib/pages/cms/shipping/ShippingPage.cjs.js"),u=require("./lib/pages/cms/shipping/server-actions.cjs.js"),K=require("./lib/pages/cms/taxes/TaxesPage.cjs.js"),S=require("./lib/pages/cms/taxes/actions.cjs.js"),V=require("./lib/pages/cms/coupons/CouponsPage.cjs.js"),B=require("./lib/pages/cms/coupons/EditCouponPage.cjs.js");exports.clearPaymentConfigCache=t.clearPaymentConfigCache;exports.getPaymentConfigStatus=t.getPaymentConfigStatus;exports.getPaymentCredentialsView=t.getPaymentCredentialsView;exports.hydrateFreemiusEnvFromDb=t.hydrateFreemiusEnvFromDb;exports.resolveStripePublishableKey=t.resolveStripePublishableKey;exports.resolveStripeSecretKey=t.resolveStripeSecretKey;exports.resolveStripeWebhookSecret=t.resolveStripeWebhookSecret;exports.savePaymentCredentials=t.savePaymentCredentials;exports.getStripeClient=h.getStripeClient;exports.createCheckoutSession=O.createCheckoutSession;exports.syncStripeOrderFromSession=A.syncStripeOrderFromSession;exports.handleStripeWebhook=R.handleStripeWebhook;exports.applyOrderInventoryDeduction=T.applyOrderInventoryDeduction;exports.aggregateOrderTaxLines=o.aggregateOrderTaxLines;exports.buildOrderTaxDetailsFromCalculation=o.buildOrderTaxDetailsFromCalculation;exports.buildOrderTaxDetailsFromStripeSession=o.buildOrderTaxDetailsFromStripeSession;exports.getOrderTaxRateJurisdiction=o.getOrderTaxRateJurisdiction;exports.getOrderTaxRateLabel=o.getOrderTaxRateLabel;exports.getOrderTaxRatePercentage=o.getOrderTaxRatePercentage;exports.normalizeOrderTaxDetails=o.normalizeOrderTaxDetails;exports.DEFAULT_INVOICE_SETTINGS=n.DEFAULT_INVOICE_SETTINGS;exports.INVOICE_SETTINGS_KEY=n.INVOICE_SETTINGS_KEY;exports.formatInvoiceCurrency=n.formatInvoiceCurrency;exports.formatInvoiceDate=n.formatInvoiceDate;exports.getInvoiceAddressLines=n.getInvoiceAddressLines;exports.normalizeInvoiceSettings=n.normalizeInvoiceSettings;exports.serializeInvoiceSettings=n.serializeInvoiceSettings;exports.assignInvoiceMetadata=g.assignInvoiceMetadata;exports.getInvoiceBrandingData=g.getInvoiceBrandingData;exports.getInvoiceOrder=g.getInvoiceOrder;exports.getInvoicePresentationData=g.getInvoicePresentationData;exports.getCurrentCustomerOrder=l.getCurrentCustomerOrder;exports.getCurrentCustomerOrderInvoice=l.getCurrentCustomerOrderInvoice;exports.getCurrentCustomerOrders=l.getCurrentCustomerOrders;exports.getCouponQuote=C.getCouponQuote;exports.getQuoteLineDiscountMap=C.getQuoteLineDiscountMap;exports.recordCouponRedemption=C.recordCouponRedemption;exports.deleteCouponFromFreemius=P.deleteCouponFromFreemius;exports.syncCouponToFreemius=P.syncCouponToFreemius;exports.syncProductSaleCouponToFreemius=P.syncProductSaleCouponToFreemius;exports.addressesMatch=d.addressesMatch;exports.emptyCustomerAddress=d.emptyCustomerAddress;exports.isCustomerAddressComplete=d.isCustomerAddressComplete;exports.normalizeCustomerAddress=d.normalizeCustomerAddress;exports.normalizeOrderCustomerDetails=d.normalizeOrderCustomerDetails;exports.fillMissingUserProfileCheckoutDetails=m.fillMissingUserProfileCheckoutDetails;exports.getDefaultUserAddresses=m.getDefaultUserAddresses;exports.upsertDefaultUserAddresses=m.upsertDefaultUserAddresses;exports.CURRENCY_ROUNDING_MODES=e.CURRENCY_ROUNDING_MODES;exports.applyCurrencyRounding=e.applyCurrencyRounding;exports.convertMinorUnitAmount=e.convertMinorUnitAmount;exports.describeCurrencyRoundingRule=e.describeCurrencyRoundingRule;exports.getCurrencyLookup=e.getCurrencyLookup;exports.getDefaultCurrency=e.getDefaultCurrency;exports.getExchangeRateForCurrency=e.getExchangeRateForCurrency;exports.inferCurrencyCodeFromLocale=e.inferCurrencyCodeFromLocale;exports.isSaleWindowActive=e.isSaleWindowActive;exports.isScheduledPriceDue=e.isScheduledPriceDue;exports.normalizeCurrencyRecord=e.normalizeCurrencyRecord;exports.normalizeCurrencyRoundingMode=e.normalizeCurrencyRoundingMode;exports.normalizePriceMap=e.normalizePriceMap;exports.normalizeSalePriceMap=e.normalizeSalePriceMap;exports.resolveEffectivePriceForCurrency=e.resolveEffectivePriceForCurrency;exports.resolvePriceForCurrency=e.resolvePriceForCurrency;exports.resolvePriceRangeForCurrency=e.resolvePriceRangeForCurrency;exports.sortCurrencies=e.sortCurrencies;exports.CURRENCY_COOKIE_NAME=q.CURRENCY_COOKIE_NAME;exports.clearAutoSyncedCurrencyPriceOverrides=p.clearAutoSyncedCurrencyPriceOverrides;exports.rebaseStoreCurrencyExchangeRates=p.rebaseStoreCurrencyExchangeRates;exports.syncStoreCurrencyRates=p.syncStoreCurrencyRates;exports.productSchema=D.productSchema;exports.copyProductFromLanguage=r.copyProductFromLanguage;exports.createProduct=r.createProduct;exports.deleteProduct=r.deleteProduct;exports.fetchTranslatedProductsForCartInternal=r.fetchTranslatedProductsForCartInternal;exports.getProduct=r.getProduct;exports.getProductBySlug=r.getProductBySlug;exports.getProducts=r.getProducts;exports.syncCategoriesForTranslationGroup=r.syncCategoriesForTranslationGroup;exports.updateProduct=r.updateProduct;exports.getPaymentProvider=E.getPaymentProvider;exports.StripeProvider=I.StripeProvider;exports.FreemiusProvider=c.FreemiusProvider;exports.parseFreemiusCheckoutCredentialsMap=c.parseFreemiusCheckoutCredentialsMap;exports.readFreemiusEnvValue=c.readFreemiusEnvValue;exports.resolveFreemiusCheckoutCredentials=c.resolveFreemiusCheckoutCredentials;exports.syncFreemiusProductsToSupabase=c.syncFreemiusProductsToSupabase;exports.syncSingleFreemiusProduct=c.syncSingleFreemiusProduct;exports.extractFreemiusCheckoutMetadata=i.extractFreemiusCheckoutMetadata;exports.getFreemiusWebhookSecretCandidates=i.getFreemiusWebhookSecretCandidates;exports.resolveFreemiusStatusFromCheckoutResponse=i.resolveFreemiusStatusFromCheckoutResponse;exports.resolveFreemiusStatusFromWebhookEvent=i.resolveFreemiusStatusFromWebhookEvent;exports.syncFreemiusCheckoutOrder=i.syncFreemiusCheckoutOrder;exports.syncFreemiusOrderFromWebhookEvent=i.syncFreemiusOrderFromWebhookEvent;exports.verifyFreemiusWebhookSignature=i.verifyFreemiusWebhookSignature;exports.getCategoriesWithCount=a.getCategoriesWithCount;exports.getCategoryBySlug=a.getCategoryBySlug;exports.getCmsProduct=a.getProduct;exports.getCmsProducts=a.getProducts;exports.getGlobalProductAttributes=a.getGlobalProductAttributes;exports.getProductCategories=a.getProductCategories;exports.getProductTranslations=a.getProductTranslations;exports.createCategoryAction=s.createCategoryAction;exports.createProductAction=s.createProductAction;exports.deleteCategoryAction=s.deleteCategoryAction;exports.deleteProductAction=s.deleteProductAction;exports.syncProductCategoriesAction=s.syncProductCategoriesAction;exports.updateCategoryAction=s.updateCategoryAction;exports.updateProductAction=s.updateProductAction;exports.getEnabledPaymentProviders=y.getEnabledPaymentProviders;exports.getPaymentSettings=y.getPaymentSettings;exports.getStoreConfigStatus=y.getStoreConfigStatus;exports.OrdersPage=b.OrdersPage;exports.OrderDetailPage=f.OrderDetailPage;exports.ExportReportsDialog=x.ExportReportsDialog;exports.fetchOrderReportData=k.fetchOrderReportData;exports.getOrderDetails=v.getOrderDetails;exports.getOrders=v.getOrders;exports.ProductsPage=M.ProductsPage;exports.InventoryPage=N.InventoryPage;exports.AttributeManagementPage=L.AttributeManagementPage;exports.NewProductPage=z.NewProductPage;exports.EditProductPage=_.EditProductPage;exports.CopyProductFromLanguage=U.CopyProductFromLanguage;exports.CategoryManagementPage=W.CategoryManagementPage;exports.PaymentsPage=G.PaymentsPage;exports.savePaymentProviderCredentials=F.savePaymentProviderCredentials;exports.updatePaymentSettings=F.updatePaymentSettings;exports.ShippingPage=w.ShippingPage;exports.createShippingRate=u.createShippingRate;exports.createShippingZone=u.createShippingZone;exports.deleteShippingRate=u.deleteShippingRate;exports.deleteShippingZone=u.deleteShippingZone;exports.updateInventoryTrackingAction=u.updateInventoryTrackingAction;exports.updateShippingRate=u.updateShippingRate;exports.updateShippingZone=u.updateShippingZone;exports.TaxesPage=K.TaxesPage;exports.deleteTaxRateAction=S.deleteTaxRateAction;exports.saveTaxRateAction=S.saveTaxRateAction;exports.updateTaxSettingsAction=S.updateTaxSettingsAction;exports.CouponsPage=V.CouponsPage;exports.EditCouponPage=B.EditCouponPage;
|
package/server.d.ts
CHANGED