@dodopayments/better-auth 1.3.3 → 1.3.5
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/dist/chunk-CRRND2EH.js +67 -0
- package/dist/chunk-CRRND2EH.js.map +1 -0
- package/dist/chunk-HHIXOUFD.js +80 -0
- package/dist/chunk-HHIXOUFD.js.map +1 -0
- package/dist/chunk-J55PDPLE.js +196 -0
- package/dist/chunk-J55PDPLE.js.map +1 -0
- package/dist/chunk-O3BTJOIO.js +177 -0
- package/dist/chunk-O3BTJOIO.js.map +1 -0
- package/dist/chunk-PXI4EHZC.js +12 -0
- package/dist/chunk-PXI4EHZC.js.map +1 -0
- package/dist/client.cjs +36 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +7 -0
- package/dist/client.d.ts +7 -5
- package/dist/client.js +6 -5
- package/dist/client.js.map +1 -0
- package/dist/hooks/customer.cjs +92 -0
- package/dist/hooks/customer.cjs.map +1 -0
- package/dist/hooks/customer.d.cts +11 -0
- package/dist/hooks/customer.d.ts +11 -4
- package/dist/hooks/customer.js +8 -62
- package/dist/hooks/customer.js.map +1 -0
- package/dist/index.cjs +573 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +909 -0
- package/dist/index.d.ts +321 -200
- package/dist/index.js +53 -34
- package/dist/index.js.map +1 -0
- package/dist/plugins/checkout.cjs +197 -0
- package/dist/plugins/checkout.cjs.map +1 -0
- package/dist/plugins/checkout.d.cts +6 -0
- package/dist/plugins/checkout.d.ts +6 -548
- package/dist/plugins/checkout.js +6 -170
- package/dist/plugins/checkout.js.map +1 -0
- package/dist/plugins/portal.cjs +220 -0
- package/dist/plugins/portal.cjs.map +1 -0
- package/dist/plugins/portal.d.cts +6 -0
- package/dist/plugins/portal.d.ts +6 -204
- package/dist/plugins/portal.js +6 -171
- package/dist/plugins/portal.js.map +1 -0
- package/dist/plugins/webhooks.cjs +102 -0
- package/dist/plugins/webhooks.cjs.map +1 -0
- package/dist/plugins/webhooks.d.cts +6 -0
- package/dist/plugins/webhooks.d.ts +6 -41
- package/dist/plugins/webhooks.js +6 -61
- package/dist/plugins/webhooks.js.map +1 -0
- package/dist/types-yAk7fHrK.d.cts +953 -0
- package/dist/types-yAk7fHrK.d.ts +953 -0
- package/dist/types.cjs +19 -0
- package/dist/types.cjs.map +1 -0
- package/dist/types.d.cts +6 -0
- package/dist/types.d.ts +6 -52
- package/dist/types.js +1 -1
- package/dist/types.js.map +1 -0
- package/package.json +5 -10
package/dist/types.cjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/types.ts
|
|
17
|
+
var types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(types_exports);
|
|
19
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { DodoPayments } from \"dodopayments\";\n\nimport type { UnionToIntersection } from \"better-auth\";\nimport type { checkout } from \"./plugins/checkout\";\nimport type { portal } from \"./plugins/portal\";\nimport type { webhooks } from \"./plugins/webhooks\";\n\nexport type Product = {\n /**\n * Product Id from DodoPayments Product\n */\n productId: string;\n /**\n * Easily identifiable slug for the product\n */\n slug: string;\n};\n\nexport type DodoPaymentsPlugin =\n | ReturnType<typeof checkout>\n | ReturnType<typeof portal>\n | ReturnType<typeof webhooks>;\n\nexport type DodoPaymentsPlugins = [DodoPaymentsPlugin, ...DodoPaymentsPlugin[]];\n\nexport type DodoPaymentsEndpoints = UnionToIntersection<\n ReturnType<DodoPaymentsPlugin>\n>;\n\nexport interface DodoPaymentsOptions {\n /**\n * DodoPayments Client\n */\n client: DodoPayments;\n /**\n * Enable customer creation when a user signs up\n */\n createCustomerOnSignUp?: boolean;\n /**\n * Use DodoPayments plugins\n */\n use: DodoPaymentsPlugins;\n}\n\ntype PaymentsList = Awaited<ReturnType<DodoPayments[\"payments\"][\"list\"]>>;\ntype SubscriptionsList = Awaited<\n ReturnType<DodoPayments[\"subscriptions\"][\"list\"]>\n>;\nexport type PaymentItems = { items: PaymentsList[\"items\"] };\nexport type SubscriptionItems = { items: SubscriptionsList[\"items\"] };\nexport type CustomerPortalResponse = { url: string; redirect: boolean };\nexport type CreateCheckoutResponse = { url: string; redirect: boolean };\nexport type WebhookResponse = { received: boolean };\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types.d.cts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import 'dodopayments';
|
|
2
|
+
import 'better-auth';
|
|
3
|
+
export { C as CreateCheckoutResponse, a as CustomerPortalResponse, e as DodoPaymentsEndpoints, D as DodoPaymentsOptions, c as DodoPaymentsPlugin, d as DodoPaymentsPlugins, P as PaymentItems, b as Product, S as SubscriptionItems, W as WebhookResponse } from './types-yAk7fHrK.cjs';
|
|
4
|
+
import 'better-call';
|
|
5
|
+
import 'zod/v3';
|
|
6
|
+
import '@dodopayments/core/webhook';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,52 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Product Id from DodoPayments Product
|
|
9
|
-
*/
|
|
10
|
-
productId: string;
|
|
11
|
-
/**
|
|
12
|
-
* Easily identifiable slug for the product
|
|
13
|
-
*/
|
|
14
|
-
slug: string;
|
|
15
|
-
};
|
|
16
|
-
export type DodoPaymentsPlugin = ReturnType<typeof checkout> | ReturnType<typeof portal> | ReturnType<typeof webhooks>;
|
|
17
|
-
export type DodoPaymentsPlugins = [DodoPaymentsPlugin, ...DodoPaymentsPlugin[]];
|
|
18
|
-
export type DodoPaymentsEndpoints = UnionToIntersection<ReturnType<DodoPaymentsPlugin>>;
|
|
19
|
-
export interface DodoPaymentsOptions {
|
|
20
|
-
/**
|
|
21
|
-
* DodoPayments Client
|
|
22
|
-
*/
|
|
23
|
-
client: DodoPayments;
|
|
24
|
-
/**
|
|
25
|
-
* Enable customer creation when a user signs up
|
|
26
|
-
*/
|
|
27
|
-
createCustomerOnSignUp?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Use DodoPayments plugins
|
|
30
|
-
*/
|
|
31
|
-
use: DodoPaymentsPlugins;
|
|
32
|
-
}
|
|
33
|
-
type PaymentsList = Awaited<ReturnType<DodoPayments["payments"]["list"]>>;
|
|
34
|
-
type SubscriptionsList = Awaited<ReturnType<DodoPayments["subscriptions"]["list"]>>;
|
|
35
|
-
export type PaymentItems = {
|
|
36
|
-
items: PaymentsList["items"];
|
|
37
|
-
};
|
|
38
|
-
export type SubscriptionItems = {
|
|
39
|
-
items: SubscriptionsList["items"];
|
|
40
|
-
};
|
|
41
|
-
export type CustomerPortalResponse = {
|
|
42
|
-
url: string;
|
|
43
|
-
redirect: boolean;
|
|
44
|
-
};
|
|
45
|
-
export type CreateCheckoutResponse = {
|
|
46
|
-
url: string;
|
|
47
|
-
redirect: boolean;
|
|
48
|
-
};
|
|
49
|
-
export type WebhookResponse = {
|
|
50
|
-
received: boolean;
|
|
51
|
-
};
|
|
52
|
-
export {};
|
|
1
|
+
import 'dodopayments';
|
|
2
|
+
import 'better-auth';
|
|
3
|
+
export { C as CreateCheckoutResponse, a as CustomerPortalResponse, e as DodoPaymentsEndpoints, D as DodoPaymentsOptions, c as DodoPaymentsPlugin, d as DodoPaymentsPlugins, P as PaymentItems, b as Product, S as SubscriptionItems, W as WebhookResponse } from './types-yAk7fHrK.js';
|
|
4
|
+
import 'better-call';
|
|
5
|
+
import 'zod/v3';
|
|
6
|
+
import '@dodopayments/core/webhook';
|
package/dist/types.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodopayments/better-auth",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"scripts": {
|
|
8
|
-
"build": "
|
|
9
|
-
"dev": "
|
|
8
|
+
"build": "tsup --config tsup.config.ts",
|
|
9
|
+
"dev": "npm run build -- --watch",
|
|
10
10
|
"check-types": "tsc --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@dodopayments/core": "^0.3.
|
|
21
|
+
"@dodopayments/core": "^0.3.4"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=16.0.0"
|
|
@@ -39,12 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@dodo/typescript-config": "*",
|
|
42
|
-
"
|
|
43
|
-
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
44
|
-
"@rollup/plugin-typescript": "^11.0.0",
|
|
45
|
-
"rimraf": "^5.0.0",
|
|
46
|
-
"rollup": "^4.0.0",
|
|
47
|
-
"rollup-plugin-dts": "^6.1.0"
|
|
42
|
+
"rimraf": "^5.0.0"
|
|
48
43
|
},
|
|
49
44
|
"peerDependencies": {
|
|
50
45
|
"zod": "^3.25.0 || ^4.0.0"
|