@somewhatintelligent/guestlist 0.0.4 → 0.0.5-beta.1783714528.6f95113

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhatintelligent/guestlist",
3
- "version": "0.0.4",
3
+ "version": "0.0.5-beta.1783714528.6f95113",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "publishConfig": {
@@ -29,8 +29,8 @@
29
29
  "@better-auth/core": "^1.6.9",
30
30
  "@better-auth/oauth-provider": "^1.6.0",
31
31
  "@better-auth/passkey": "^1.6.0",
32
- "@somewhatintelligent/auth": "^0.0.2",
33
- "@somewhatintelligent/kit": "^0.0.2",
32
+ "@somewhatintelligent/auth": "^0.0.3-beta.1783714528.6f95113",
33
+ "@somewhatintelligent/kit": "^0.0.3-beta.1783714528.6f95113",
34
34
  "better-auth": "^1.6.0",
35
35
  "cookie-es": "^3.1.1",
36
36
  "drizzle-orm": "^0.45.2",
package/src/codegen.ts CHANGED
@@ -57,6 +57,8 @@ export function createCodegenAuth<TEnv extends GuestlistEnv>(config: GuestlistCo
57
57
  config.billing.plans.length > 0
58
58
  ? config.billing.plans
59
59
  : [{ name: "codegen-stub", priceId: "price_codegen" }],
60
+ // Schema-affecting (organization.stripeCustomerId) — thread as-is.
61
+ ...(config.billing.organization && { organization: config.billing.organization }),
60
62
  }
61
63
  : undefined,
62
64
  });
package/src/config.ts CHANGED
@@ -9,6 +9,7 @@
9
9
  * worker env, invoked once per isolate and cached.
10
10
  */
11
11
  import type {
12
+ OrganizationBillingOptions,
12
13
  PlatformAdminOptions,
13
14
  PlatformOrgOptions,
14
15
  PlatformRateLimitOptions,
@@ -62,8 +63,12 @@ export interface GuestlistConfig<TEnv extends GuestlistEnv = GuestlistEnv> {
62
63
  * `{ plans: [] }` is the supported "provision the billing schema now,
63
64
  * declare tiers later" state. Keep this set (or unset) in the codegen
64
65
  * config too.
66
+ *
67
+ * `organization` enables org-level Stripe customers and is ALSO
68
+ * schema-affecting (adds `organization.stripeCustomerId`) — one config
69
+ * object feeding both the worker and codegen keeps that consistent.
65
70
  */
66
- billing?: { plans: SubscriptionPlan[] };
71
+ billing?: { plans: SubscriptionPlan[]; organization?: OrganizationBillingOptions };
67
72
  /**
68
73
  * Organization plugin overrides — access control, custom roles, org
69
74
  * policy. Omit for the platform stock (`defaultOrgAccess`, operator-
package/src/instances.ts CHANGED
@@ -73,6 +73,7 @@ export function createInstanceStore<TEnv extends GuestlistEnv>(config: Guestlist
73
73
  secretKey: env.STRIPE_SECRET_KEY,
74
74
  webhookSecret: env.STRIPE_WEBHOOK_SIGNING_SECRET,
75
75
  plans: config.billing.plans,
76
+ ...(config.billing.organization && { organization: config.billing.organization }),
76
77
  }
77
78
  : undefined;
78
79
 
@@ -2,6 +2,6 @@
2
2
  // values are dev placeholders, identical to the runtime fallbacks.
3
3
  export const PKG = {
4
4
  name: "@somewhatintelligent/guestlist",
5
- version: "0.0.4",
6
- commit: "1347a5d7102ad8fb1702c414f117cff36fd08f6d",
5
+ version: "0.0.5-beta.1783714528.6f95113",
6
+ commit: "6f95113c5b404d3f046d97e1e51471dca322a469",
7
7
  } as const;