@better-auth/stripe 1.5.0-beta.13 → 1.5.0-beta.16

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.
@@ -1,22 +1,22 @@
1
1
 
2
- > @better-auth/stripe@1.5.0-beta.13 build /home/runner/work/better-auth/better-auth/packages/stripe
2
+ > @better-auth/stripe@1.5.0-beta.16 build /home/runner/work/better-auth/better-auth/packages/stripe
3
3
  > tsdown
4
4
 
5
- ℹ tsdown v0.20.1 powered by rolldown v1.0.0-rc.1
5
+ ℹ tsdown v0.20.3 powered by rolldown v1.0.0-rc.3
6
6
  ℹ config file: /home/runner/work/better-auth/better-auth/packages/stripe/tsdown.config.ts
7
7
  ℹ entry: src/index.ts, src/client.ts
8
8
  ℹ tsconfig: tsconfig.json
9
9
  ℹ Build start
10
- ℹ dist/index.mjs  57.13 kB │ gzip: 10.39 kB
10
+ ℹ dist/index.mjs  65.58 kB │ gzip: 12.29 kB
11
+ [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
11
12
  ℹ dist/client.mjs  0.43 kB │ gzip: 0.29 kB
12
- ℹ dist/index.mjs.map 122.17 kB │ gzip: 22.93 kB
13
+ ℹ dist/index.mjs.map 140.31 kB │ gzip: 26.79 kB
13
14
  ℹ dist/error-codes-CHMyMR5v.mjs.map  2.23 kB │ gzip: 1.01 kB
14
15
  ℹ dist/error-codes-CHMyMR5v.mjs  1.78 kB │ gzip: 0.82 kB
15
- ℹ dist/client.mjs.map  1.25 kB │ gzip: 0.59 kB
16
- ℹ dist/client.d.mts  4.61 kB │ gzip: 0.90 kB
17
- ℹ dist/index.d.mts  0.21 kB │ gzip: 0.14 kB
18
- ℹ dist/index-BELqjMd2.d.mts  30.82 kB │ gzip: 5.13 kB
19
- ℹ 9 files, total: 220.63 kB
20
- [PLUGIN_TIMINGS] Warning: Your build spent significant time in plugin `rolldown-plugin-dts:generate`. See https://rolldown.rs/options/checks#plugintimings for more details.
16
+ ℹ dist/client.mjs.map  1.26 kB │ gzip: 0.59 kB
17
+ ℹ dist/index.d.mts  19.89 kB │ gzip: 3.12 kB
18
+ ℹ dist/client.d.mts  4.62 kB │ gzip: 0.92 kB
19
+ ℹ dist/types-Bzc6yg83.d.mts  12.67 kB │ gzip: 2.91 kB
20
+ ℹ 9 files, total: 248.77 kB
21
+ ✔ Build complete in 41456ms
21
22
 
22
- ✔ Build complete in 35719ms
package/dist/client.d.mts CHANGED
@@ -1,30 +1,31 @@
1
- import { n as stripe } from "./index-BELqjMd2.mjs";
2
- import * as better_auth51 from "better-auth";
1
+ import { a as StripePlan } from "./types-Bzc6yg83.mjs";
2
+ import { stripe } from "./index.mjs";
3
+ import * as better_auth0 from "better-auth";
3
4
 
4
5
  //#region src/error-codes.d.ts
5
6
  declare const STRIPE_ERROR_CODES: {
6
- UNAUTHORIZED: better_auth51.RawError<"UNAUTHORIZED">;
7
- INVALID_REQUEST_BODY: better_auth51.RawError<"INVALID_REQUEST_BODY">;
8
- SUBSCRIPTION_NOT_FOUND: better_auth51.RawError<"SUBSCRIPTION_NOT_FOUND">;
9
- SUBSCRIPTION_PLAN_NOT_FOUND: better_auth51.RawError<"SUBSCRIPTION_PLAN_NOT_FOUND">;
10
- ALREADY_SUBSCRIBED_PLAN: better_auth51.RawError<"ALREADY_SUBSCRIBED_PLAN">;
11
- REFERENCE_ID_NOT_ALLOWED: better_auth51.RawError<"REFERENCE_ID_NOT_ALLOWED">;
12
- CUSTOMER_NOT_FOUND: better_auth51.RawError<"CUSTOMER_NOT_FOUND">;
13
- UNABLE_TO_CREATE_CUSTOMER: better_auth51.RawError<"UNABLE_TO_CREATE_CUSTOMER">;
14
- UNABLE_TO_CREATE_BILLING_PORTAL: better_auth51.RawError<"UNABLE_TO_CREATE_BILLING_PORTAL">;
15
- STRIPE_SIGNATURE_NOT_FOUND: better_auth51.RawError<"STRIPE_SIGNATURE_NOT_FOUND">;
16
- STRIPE_WEBHOOK_SECRET_NOT_FOUND: better_auth51.RawError<"STRIPE_WEBHOOK_SECRET_NOT_FOUND">;
17
- STRIPE_WEBHOOK_ERROR: better_auth51.RawError<"STRIPE_WEBHOOK_ERROR">;
18
- FAILED_TO_CONSTRUCT_STRIPE_EVENT: better_auth51.RawError<"FAILED_TO_CONSTRUCT_STRIPE_EVENT">;
19
- FAILED_TO_FETCH_PLANS: better_auth51.RawError<"FAILED_TO_FETCH_PLANS">;
20
- EMAIL_VERIFICATION_REQUIRED: better_auth51.RawError<"EMAIL_VERIFICATION_REQUIRED">;
21
- SUBSCRIPTION_NOT_ACTIVE: better_auth51.RawError<"SUBSCRIPTION_NOT_ACTIVE">;
22
- SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION: better_auth51.RawError<"SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION">;
23
- ORGANIZATION_NOT_FOUND: better_auth51.RawError<"ORGANIZATION_NOT_FOUND">;
24
- ORGANIZATION_SUBSCRIPTION_NOT_ENABLED: better_auth51.RawError<"ORGANIZATION_SUBSCRIPTION_NOT_ENABLED">;
25
- AUTHORIZE_REFERENCE_REQUIRED: better_auth51.RawError<"AUTHORIZE_REFERENCE_REQUIRED">;
26
- ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION: better_auth51.RawError<"ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION">;
27
- ORGANIZATION_REFERENCE_ID_REQUIRED: better_auth51.RawError<"ORGANIZATION_REFERENCE_ID_REQUIRED">;
7
+ UNAUTHORIZED: better_auth0.RawError<"UNAUTHORIZED">;
8
+ INVALID_REQUEST_BODY: better_auth0.RawError<"INVALID_REQUEST_BODY">;
9
+ SUBSCRIPTION_NOT_FOUND: better_auth0.RawError<"SUBSCRIPTION_NOT_FOUND">;
10
+ SUBSCRIPTION_PLAN_NOT_FOUND: better_auth0.RawError<"SUBSCRIPTION_PLAN_NOT_FOUND">;
11
+ ALREADY_SUBSCRIBED_PLAN: better_auth0.RawError<"ALREADY_SUBSCRIBED_PLAN">;
12
+ REFERENCE_ID_NOT_ALLOWED: better_auth0.RawError<"REFERENCE_ID_NOT_ALLOWED">;
13
+ CUSTOMER_NOT_FOUND: better_auth0.RawError<"CUSTOMER_NOT_FOUND">;
14
+ UNABLE_TO_CREATE_CUSTOMER: better_auth0.RawError<"UNABLE_TO_CREATE_CUSTOMER">;
15
+ UNABLE_TO_CREATE_BILLING_PORTAL: better_auth0.RawError<"UNABLE_TO_CREATE_BILLING_PORTAL">;
16
+ STRIPE_SIGNATURE_NOT_FOUND: better_auth0.RawError<"STRIPE_SIGNATURE_NOT_FOUND">;
17
+ STRIPE_WEBHOOK_SECRET_NOT_FOUND: better_auth0.RawError<"STRIPE_WEBHOOK_SECRET_NOT_FOUND">;
18
+ STRIPE_WEBHOOK_ERROR: better_auth0.RawError<"STRIPE_WEBHOOK_ERROR">;
19
+ FAILED_TO_CONSTRUCT_STRIPE_EVENT: better_auth0.RawError<"FAILED_TO_CONSTRUCT_STRIPE_EVENT">;
20
+ FAILED_TO_FETCH_PLANS: better_auth0.RawError<"FAILED_TO_FETCH_PLANS">;
21
+ EMAIL_VERIFICATION_REQUIRED: better_auth0.RawError<"EMAIL_VERIFICATION_REQUIRED">;
22
+ SUBSCRIPTION_NOT_ACTIVE: better_auth0.RawError<"SUBSCRIPTION_NOT_ACTIVE">;
23
+ SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION: better_auth0.RawError<"SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION">;
24
+ ORGANIZATION_NOT_FOUND: better_auth0.RawError<"ORGANIZATION_NOT_FOUND">;
25
+ ORGANIZATION_SUBSCRIPTION_NOT_ENABLED: better_auth0.RawError<"ORGANIZATION_SUBSCRIPTION_NOT_ENABLED">;
26
+ AUTHORIZE_REFERENCE_REQUIRED: better_auth0.RawError<"AUTHORIZE_REFERENCE_REQUIRED">;
27
+ ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION: better_auth0.RawError<"ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION">;
28
+ ORGANIZATION_REFERENCE_ID_REQUIRED: better_auth0.RawError<"ORGANIZATION_REFERENCE_ID_REQUIRED">;
28
29
  };
29
30
  //#endregion
30
31
  //#region src/client.d.ts
@@ -37,7 +38,7 @@ declare const stripeClient: <O extends {
37
38
  stripeWebhookSecret: string;
38
39
  subscription: {
39
40
  enabled: true;
40
- plans: [];
41
+ plans: StripePlan[];
41
42
  };
42
43
  } : {
43
44
  stripeClient: any;
@@ -48,28 +49,28 @@ declare const stripeClient: <O extends {
48
49
  "/subscription/restore": "POST";
49
50
  };
50
51
  $ERROR_CODES: {
51
- UNAUTHORIZED: better_auth51.RawError<"UNAUTHORIZED">;
52
- INVALID_REQUEST_BODY: better_auth51.RawError<"INVALID_REQUEST_BODY">;
53
- SUBSCRIPTION_NOT_FOUND: better_auth51.RawError<"SUBSCRIPTION_NOT_FOUND">;
54
- SUBSCRIPTION_PLAN_NOT_FOUND: better_auth51.RawError<"SUBSCRIPTION_PLAN_NOT_FOUND">;
55
- ALREADY_SUBSCRIBED_PLAN: better_auth51.RawError<"ALREADY_SUBSCRIBED_PLAN">;
56
- REFERENCE_ID_NOT_ALLOWED: better_auth51.RawError<"REFERENCE_ID_NOT_ALLOWED">;
57
- CUSTOMER_NOT_FOUND: better_auth51.RawError<"CUSTOMER_NOT_FOUND">;
58
- UNABLE_TO_CREATE_CUSTOMER: better_auth51.RawError<"UNABLE_TO_CREATE_CUSTOMER">;
59
- UNABLE_TO_CREATE_BILLING_PORTAL: better_auth51.RawError<"UNABLE_TO_CREATE_BILLING_PORTAL">;
60
- STRIPE_SIGNATURE_NOT_FOUND: better_auth51.RawError<"STRIPE_SIGNATURE_NOT_FOUND">;
61
- STRIPE_WEBHOOK_SECRET_NOT_FOUND: better_auth51.RawError<"STRIPE_WEBHOOK_SECRET_NOT_FOUND">;
62
- STRIPE_WEBHOOK_ERROR: better_auth51.RawError<"STRIPE_WEBHOOK_ERROR">;
63
- FAILED_TO_CONSTRUCT_STRIPE_EVENT: better_auth51.RawError<"FAILED_TO_CONSTRUCT_STRIPE_EVENT">;
64
- FAILED_TO_FETCH_PLANS: better_auth51.RawError<"FAILED_TO_FETCH_PLANS">;
65
- EMAIL_VERIFICATION_REQUIRED: better_auth51.RawError<"EMAIL_VERIFICATION_REQUIRED">;
66
- SUBSCRIPTION_NOT_ACTIVE: better_auth51.RawError<"SUBSCRIPTION_NOT_ACTIVE">;
67
- SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION: better_auth51.RawError<"SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION">;
68
- ORGANIZATION_NOT_FOUND: better_auth51.RawError<"ORGANIZATION_NOT_FOUND">;
69
- ORGANIZATION_SUBSCRIPTION_NOT_ENABLED: better_auth51.RawError<"ORGANIZATION_SUBSCRIPTION_NOT_ENABLED">;
70
- AUTHORIZE_REFERENCE_REQUIRED: better_auth51.RawError<"AUTHORIZE_REFERENCE_REQUIRED">;
71
- ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION: better_auth51.RawError<"ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION">;
72
- ORGANIZATION_REFERENCE_ID_REQUIRED: better_auth51.RawError<"ORGANIZATION_REFERENCE_ID_REQUIRED">;
52
+ UNAUTHORIZED: better_auth0.RawError<"UNAUTHORIZED">;
53
+ INVALID_REQUEST_BODY: better_auth0.RawError<"INVALID_REQUEST_BODY">;
54
+ SUBSCRIPTION_NOT_FOUND: better_auth0.RawError<"SUBSCRIPTION_NOT_FOUND">;
55
+ SUBSCRIPTION_PLAN_NOT_FOUND: better_auth0.RawError<"SUBSCRIPTION_PLAN_NOT_FOUND">;
56
+ ALREADY_SUBSCRIBED_PLAN: better_auth0.RawError<"ALREADY_SUBSCRIBED_PLAN">;
57
+ REFERENCE_ID_NOT_ALLOWED: better_auth0.RawError<"REFERENCE_ID_NOT_ALLOWED">;
58
+ CUSTOMER_NOT_FOUND: better_auth0.RawError<"CUSTOMER_NOT_FOUND">;
59
+ UNABLE_TO_CREATE_CUSTOMER: better_auth0.RawError<"UNABLE_TO_CREATE_CUSTOMER">;
60
+ UNABLE_TO_CREATE_BILLING_PORTAL: better_auth0.RawError<"UNABLE_TO_CREATE_BILLING_PORTAL">;
61
+ STRIPE_SIGNATURE_NOT_FOUND: better_auth0.RawError<"STRIPE_SIGNATURE_NOT_FOUND">;
62
+ STRIPE_WEBHOOK_SECRET_NOT_FOUND: better_auth0.RawError<"STRIPE_WEBHOOK_SECRET_NOT_FOUND">;
63
+ STRIPE_WEBHOOK_ERROR: better_auth0.RawError<"STRIPE_WEBHOOK_ERROR">;
64
+ FAILED_TO_CONSTRUCT_STRIPE_EVENT: better_auth0.RawError<"FAILED_TO_CONSTRUCT_STRIPE_EVENT">;
65
+ FAILED_TO_FETCH_PLANS: better_auth0.RawError<"FAILED_TO_FETCH_PLANS">;
66
+ EMAIL_VERIFICATION_REQUIRED: better_auth0.RawError<"EMAIL_VERIFICATION_REQUIRED">;
67
+ SUBSCRIPTION_NOT_ACTIVE: better_auth0.RawError<"SUBSCRIPTION_NOT_ACTIVE">;
68
+ SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION: better_auth0.RawError<"SUBSCRIPTION_NOT_SCHEDULED_FOR_CANCELLATION">;
69
+ ORGANIZATION_NOT_FOUND: better_auth0.RawError<"ORGANIZATION_NOT_FOUND">;
70
+ ORGANIZATION_SUBSCRIPTION_NOT_ENABLED: better_auth0.RawError<"ORGANIZATION_SUBSCRIPTION_NOT_ENABLED">;
71
+ AUTHORIZE_REFERENCE_REQUIRED: better_auth0.RawError<"AUTHORIZE_REFERENCE_REQUIRED">;
72
+ ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION: better_auth0.RawError<"ORGANIZATION_HAS_ACTIVE_SUBSCRIPTION">;
73
+ ORGANIZATION_REFERENCE_ID_REQUIRED: better_auth0.RawError<"ORGANIZATION_REFERENCE_ID_REQUIRED">;
73
74
  };
74
75
  };
75
76
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import type { BetterAuthClientPlugin } from \"better-auth/client\";\nimport { STRIPE_ERROR_CODES } from \"./error-codes\";\nimport type { stripe } from \"./index\";\n\nexport const stripeClient = <\n\tO extends {\n\t\tsubscription: boolean;\n\t},\n>(\n\toptions?: O | undefined,\n) => {\n\treturn {\n\t\tid: \"stripe-client\",\n\t\t$InferServerPlugin: {} as ReturnType<\n\t\t\ttypeof stripe<\n\t\t\t\tO[\"subscription\"] extends true\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tstripeClient: any;\n\t\t\t\t\t\t\tstripeWebhookSecret: string;\n\t\t\t\t\t\t\tsubscription: {\n\t\t\t\t\t\t\t\tenabled: true;\n\t\t\t\t\t\t\t\tplans: [];\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tstripeClient: any;\n\t\t\t\t\t\t\tstripeWebhookSecret: string;\n\t\t\t\t\t\t}\n\t\t\t>\n\t\t>,\n\t\tpathMethods: {\n\t\t\t\"/subscription/billing-portal\": \"POST\",\n\t\t\t\"/subscription/restore\": \"POST\",\n\t\t},\n\t\t$ERROR_CODES: STRIPE_ERROR_CODES,\n\t} satisfies BetterAuthClientPlugin;\n};\nexport * from \"./error-codes\";\n"],"mappings":";;;AAIA,MAAa,gBAKZ,YACI;AACJ,QAAO;EACN,IAAI;EACJ,oBAAoB,EAAE;EAiBtB,aAAa;GACZ,gCAAgC;GAChC,yBAAyB;GACzB;EACD,cAAc;EACd"}
1
+ {"version":3,"file":"client.mjs","names":[],"sources":["../src/client.ts"],"sourcesContent":["import type { BetterAuthClientPlugin } from \"better-auth/client\";\nimport { STRIPE_ERROR_CODES } from \"./error-codes\";\nimport type { StripePlan, stripe } from \"./index\";\nexport const stripeClient = <\n\tO extends {\n\t\tsubscription: boolean;\n\t},\n>(\n\toptions?: O | undefined,\n) => {\n\treturn {\n\t\tid: \"stripe-client\",\n\t\t$InferServerPlugin: {} as ReturnType<\n\t\t\ttypeof stripe<\n\t\t\t\tO[\"subscription\"] extends true\n\t\t\t\t\t? {\n\t\t\t\t\t\t\tstripeClient: any;\n\t\t\t\t\t\t\tstripeWebhookSecret: string;\n\t\t\t\t\t\t\tsubscription: {\n\t\t\t\t\t\t\t\tenabled: true;\n\t\t\t\t\t\t\t\tplans: StripePlan[];\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t: {\n\t\t\t\t\t\t\tstripeClient: any;\n\t\t\t\t\t\t\tstripeWebhookSecret: string;\n\t\t\t\t\t\t}\n\t\t\t>\n\t\t>,\n\t\tpathMethods: {\n\t\t\t\"/subscription/billing-portal\": \"POST\",\n\t\t\t\"/subscription/restore\": \"POST\",\n\t\t},\n\t\t$ERROR_CODES: STRIPE_ERROR_CODES,\n\t} satisfies BetterAuthClientPlugin;\n};\nexport * from \"./error-codes\";\n"],"mappings":";;;AAGA,MAAa,gBAKZ,YACI;AACJ,QAAO;EACN,IAAI;EACJ,oBAAoB,EAAE;EAiBtB,aAAa;GACZ,gCAAgC;GAChC,yBAAyB;GACzB;EACD,cAAc;EACd"}