@dodopayments/convex 0.2.2 → 0.2.6
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/README.md +85 -87
- package/dist/client/index.d.ts +14 -7
- package/dist/component/lib.d.ts +19 -3
- package/dist/component/lib.js +20 -4
- package/dist/component/lib.js.map +1 -1
- package/dist/index.cjs +384 -501
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +15 -8
- package/dist/index.js +384 -501
- package/dist/index.js.map +1 -1
- package/dist/node_modules/zod/v3/types.js +2 -2
- package/dist/node_modules/zod/v3/types.js.map +1 -1
- package/dist/packages/core/dist/chunk-7ICTY2GO.js +463 -0
- package/dist/packages/core/dist/chunk-7ICTY2GO.js.map +1 -0
- package/package.json +3 -3
- package/dist/packages/core/dist/checkout/checkout.js +0 -532
- package/dist/packages/core/dist/checkout/checkout.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as convex_server from 'convex/server';
|
|
2
|
-
import { GenericActionCtx } from 'convex/server';
|
|
2
|
+
import { FunctionReference, GenericActionCtx, GenericDataModel } from 'convex/server';
|
|
3
3
|
import { CheckoutSessionPayload } from '@dodopayments/core/checkout';
|
|
4
4
|
export { CheckoutHandlerConfig, CheckoutSessionBillingAddress, CheckoutSessionCustomer, CheckoutSessionPayload, CheckoutSessionProductCartItem, CheckoutSessionResponse, PaymentMethodType } from '@dodopayments/core/checkout';
|
|
5
5
|
export { Dispute, LicenseKey, Payment, Refund, Subscription, WebhookEventHandlers, WebhookPayload } from '@dodopayments/core/schemas';
|
|
@@ -9,10 +9,13 @@ export { WebhookHandlerConfig } from '@dodopayments/core/webhook';
|
|
|
9
9
|
type CustomerPortalArgs = {
|
|
10
10
|
send_email?: boolean;
|
|
11
11
|
};
|
|
12
|
+
type RunActionCtx = {
|
|
13
|
+
runAction: GenericActionCtx<GenericDataModel>["runAction"];
|
|
14
|
+
};
|
|
12
15
|
interface DodoPaymentsComponent {
|
|
13
16
|
lib: {
|
|
14
|
-
checkout:
|
|
15
|
-
customerPortal:
|
|
17
|
+
checkout: FunctionReference<"action", "internal">;
|
|
18
|
+
customerPortal: FunctionReference<"action", "internal">;
|
|
16
19
|
};
|
|
17
20
|
}
|
|
18
21
|
type DodoPaymentsClientConfig = {
|
|
@@ -34,14 +37,18 @@ declare class DodoPayments {
|
|
|
34
37
|
* Creates a Dodo Payments checkout session.
|
|
35
38
|
* Uses session checkout with full feature support.
|
|
36
39
|
*/
|
|
37
|
-
checkout: (ctx:
|
|
40
|
+
checkout: (ctx: RunActionCtx, args: {
|
|
38
41
|
payload: CheckoutSessionPayload;
|
|
39
|
-
}) => Promise<
|
|
42
|
+
}) => Promise<{
|
|
43
|
+
checkout_url: string;
|
|
44
|
+
}>;
|
|
40
45
|
/**
|
|
41
46
|
* Retrieves a URL for the customer portal.
|
|
42
|
-
*
|
|
47
|
+
* Requires the user to be identified via the identify function in the config.
|
|
43
48
|
*/
|
|
44
|
-
customerPortal: (ctx: any, args?: CustomerPortalArgs) => Promise<
|
|
49
|
+
customerPortal: (ctx: any, args?: CustomerPortalArgs) => Promise<{
|
|
50
|
+
portal_url: string;
|
|
51
|
+
}>;
|
|
45
52
|
};
|
|
46
53
|
}
|
|
47
54
|
|
|
@@ -54,7 +61,7 @@ type CustomerPortalResponse = {
|
|
|
54
61
|
portal_url: string;
|
|
55
62
|
};
|
|
56
63
|
|
|
57
|
-
type ConvexWebhookHandlerConfig = Omit<WebhookHandlerConfig<GenericActionCtx<
|
|
64
|
+
type ConvexWebhookHandlerConfig = Omit<WebhookHandlerConfig<GenericActionCtx<GenericDataModel>>, "webhookKey">;
|
|
58
65
|
/**
|
|
59
66
|
* Creates a Convex HTTP action to securely handle Dodo Payments webhooks.
|
|
60
67
|
*
|