dh-remixer-sdk 0.0.43 → 0.0.44-6ddbb9f
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/package.json
CHANGED
|
@@ -37,6 +37,16 @@ export type RemixerCheckoutSession = {
|
|
|
37
37
|
url: string;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
export type RemixerVerifiedCheckout = {
|
|
41
|
+
paid: boolean;
|
|
42
|
+
mode: 'payment' | 'subscription' | 'setup';
|
|
43
|
+
items: RemixerCheckoutItem[];
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type RuntimeVerifiedCheckout = Omit<RemixerVerifiedCheckout, 'items'> & {
|
|
47
|
+
items: Array<{ price_id: string; quantity: number }>;
|
|
48
|
+
};
|
|
49
|
+
|
|
40
50
|
export type RemixerStripeOrderStatus = 'pending' | 'completed' | 'canceled';
|
|
41
51
|
|
|
42
52
|
export type RemixerStripeOrder = {
|
|
@@ -54,6 +64,7 @@ export type RemixerStripeOrder = {
|
|
|
54
64
|
tracking_url: string | null;
|
|
55
65
|
carrier: string | null;
|
|
56
66
|
tracking_status: string | null;
|
|
67
|
+
price_ids: string[] | null;
|
|
57
68
|
created_at: string;
|
|
58
69
|
updated_at: string | null;
|
|
59
70
|
deleted_at: string | null;
|
|
@@ -197,6 +208,16 @@ export const ecommerce = {
|
|
|
197
208
|
});
|
|
198
209
|
},
|
|
199
210
|
|
|
211
|
+
async verifyCheckoutSession(sessionId: string): Promise<RemixerVerifiedCheckout> {
|
|
212
|
+
const verified = await runtimeDataFetch<RuntimeVerifiedCheckout>('remixer-runtime/ecommerce/verify-session', {
|
|
213
|
+
session_id: sessionId,
|
|
214
|
+
});
|
|
215
|
+
return {
|
|
216
|
+
...verified,
|
|
217
|
+
items: verified.items.map(item => ({ priceId: item.price_id, quantity: item.quantity })),
|
|
218
|
+
};
|
|
219
|
+
},
|
|
220
|
+
|
|
200
221
|
listOrders() {
|
|
201
222
|
return runtimeDataFetch<RemixerStripeOrder[]>('remixer-runtime/ecommerce/orders', {});
|
|
202
223
|
},
|
|
@@ -55,6 +55,7 @@ type StorageObject = {
|
|
|
55
55
|
sha256: string;
|
|
56
56
|
visibility: 'public' | 'private';
|
|
57
57
|
source: string;
|
|
58
|
+
publicUrl?: string | null;
|
|
58
59
|
createdAt: string;
|
|
59
60
|
updatedAt: string;
|
|
60
61
|
};
|
|
@@ -66,7 +67,7 @@ type StorageObjectPage = {
|
|
|
66
67
|
|
|
67
68
|
type StorageReadUrlResponse = {
|
|
68
69
|
url: string;
|
|
69
|
-
expiresInSeconds: number;
|
|
70
|
+
expiresInSeconds: number | null;
|
|
70
71
|
object: StorageObject;
|
|
71
72
|
};
|
|
72
73
|
|