@fragno-dev/stripe 0.0.2 → 0.1.1

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,23 +1,31 @@
1
+ import * as _fragno_dev_core9 from "@fragno-dev/core";
1
2
  import * as _fragno_dev_core0 from "@fragno-dev/core";
2
- import { FragnoPublicClientConfig } from "@fragno-dev/core";
3
- import * as _fragno_dev_db_fragment0 from "@fragno-dev/db/fragment";
4
- import { FragnoPublicConfigWithDatabase } from "@fragno-dev/db/fragment";
5
- import * as zod0 from "zod";
3
+ import { FragnoRouteConfig } from "@fragno-dev/core";
4
+ import * as zod199 from "zod";
6
5
  import { z } from "zod";
7
- import * as zod_v4_core0 from "zod/v4/core";
8
- import * as _fragno_dev_core_api0 from "@fragno-dev/core/api";
9
- import { FragnoRouteConfig } from "@fragno-dev/core/api";
10
- import * as _fragno_dev_db_schema67 from "@fragno-dev/db/schema";
11
- import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema";
6
+ import * as zod_v4_core14 from "zod/v4/core";
7
+ import * as _fragno_dev_core_api2 from "@fragno-dev/core/api";
12
8
  import * as _fragno_dev_core_client0 from "@fragno-dev/core/client";
9
+ import { FragnoPublicClientConfig } from "@fragno-dev/core/client";
10
+ import * as _standard_schema_spec0 from "@standard-schema/spec";
11
+ import * as _fragno_dev_db9 from "@fragno-dev/db";
12
+ import * as _fragno_dev_db0 from "@fragno-dev/db";
13
+ import { FragnoPublicConfigWithDatabase } from "@fragno-dev/db";
14
+ import * as stripe0 from "stripe";
13
15
  import Stripe from "stripe";
16
+ import * as _fragno_dev_db_query0 from "@fragno-dev/db/query";
14
17
  import { TableToInsertValues } from "@fragno-dev/db/query";
18
+ import * as _fragno_dev_db_schema125 from "@fragno-dev/db/schema";
19
+ import * as _fragno_dev_db_schema93 from "@fragno-dev/db/schema";
20
+ import * as _fragno_dev_db_schema0 from "@fragno-dev/db/schema";
21
+ import * as _fragno_dev_db_fragment_definition_builder1 from "@fragno-dev/db/fragment-definition-builder";
22
+ import * as _fragno_dev_db_fragment_definition_builder0 from "@fragno-dev/db/fragment-definition-builder";
15
23
 
16
24
  //#region src/database/schema.d.ts
17
25
  /**
18
26
  * Database schema for subscriptions that are linked to external stripe subscriptions.
19
27
  */
20
- declare const stripeSchema: _fragno_dev_db_schema67.Schema<Record<"subscription", _fragno_dev_db_schema67.Table<Record<string, _fragno_dev_db_schema67.AnyColumn> & Record<"id", _fragno_dev_db_schema67.IdColumn<"varchar(30)", string | _fragno_dev_db_schema67.FragnoId | null, _fragno_dev_db_schema67.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema67.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema67.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema67.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema67.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema67.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema67.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema67.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema67.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema67.AnyRelation>, Record<string, _fragno_dev_db_schema67.Index<_fragno_dev_db_schema67.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema67.Index<readonly [_fragno_dev_db_schema67.Column<"string", string, string>] & _fragno_dev_db_schema67.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema67.Index<readonly [_fragno_dev_db_schema67.Column<"string", string, string>] & _fragno_dev_db_schema67.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema67.Index<readonly [_fragno_dev_db_schema67.Column<"string", string | null, string | null>] & _fragno_dev_db_schema67.AnyColumn[], readonly ["referenceId"]>>>>>;
28
+ declare const stripeSchema: _fragno_dev_db_schema125.Schema<Record<"subscription", _fragno_dev_db_schema125.Table<Record<string, _fragno_dev_db_schema125.AnyColumn> & Record<"id", _fragno_dev_db_schema125.IdColumn<"varchar(30)", string | _fragno_dev_db_schema125.FragnoId | null, _fragno_dev_db_schema125.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema125.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema125.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema125.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema125.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema125.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema125.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema125.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema125.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema125.AnyRelation>, Record<string, _fragno_dev_db_schema125.Index<_fragno_dev_db_schema125.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema125.Index<readonly [_fragno_dev_db_schema125.Column<"string", string, string>] & _fragno_dev_db_schema125.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema125.Index<readonly [_fragno_dev_db_schema125.Column<"string", string, string>] & _fragno_dev_db_schema125.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema125.Index<readonly [_fragno_dev_db_schema125.Column<"string", string | null, string | null>] & _fragno_dev_db_schema125.AnyColumn[], readonly ["referenceId"]>>>>>;
21
29
  //# sourceMappingURL=schema.d.ts.map
22
30
  //#endregion
23
31
  //#region src/models/subscriptions.d.ts
@@ -83,10 +91,6 @@ type StripeEntityData = {
83
91
  * The email address of the customer
84
92
  */
85
93
  customerEmail: string;
86
- /**
87
- * The Stripe subscription ID for this entity, if a subscription exists
88
- */
89
- subscriptionId: string | undefined;
90
94
  /**
91
95
  * Custom metadata to be attached to Stripe Customer for this entity
92
96
  */
@@ -153,12 +157,14 @@ interface StripeFragmentServices {
153
157
  /**
154
158
  * Find all subscriptions for a Stripe customer ID
155
159
  */
156
- getSubscriptionByStripeCustomerId(stripeCustomerId: string): Promise<SubscriptionResponse[]>;
160
+ getSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<SubscriptionResponse[]>;
157
161
  /**
158
162
  * Delete a subscription record
159
163
  */
160
164
  deleteSubscription(id: string): Promise<void>;
161
- deleteSubscriptionByReferenceId(referenceId: string): Promise<boolean>;
165
+ deleteSubscriptionsByReferenceId(referenceId: string): Promise<{
166
+ success: boolean;
167
+ }>;
162
168
  /**
163
169
  * Get all subscriptions
164
170
  */
@@ -167,173 +173,78 @@ interface StripeFragmentServices {
167
173
  * Get subscriptions by id (internal)
168
174
  */
169
175
  getSubscriptionById(id: string): Promise<SubscriptionResponse | null>;
170
- getSubscriptionByReferenceId(referenceId: string): Promise<SubscriptionResponse | null>;
171
- syncStripeSubscription(referenceId: string, customerId: string): Promise<void>;
176
+ getSubscriptionsByReferenceId(referenceId: string): Promise<SubscriptionResponse[]>;
177
+ syncStripeSubscriptions(referenceId: string, customerId: string): Promise<{
178
+ success: boolean;
179
+ }>;
172
180
  }
173
181
  //# sourceMappingURL=types.d.ts.map
174
182
  //#endregion
183
+ //#region src/definition.d.ts
184
+ declare const stripeFragmentDefinition: _fragno_dev_core9.FragmentDefinition<StripeFragmentConfig, _fragno_dev_db9.FragnoPublicConfigWithDatabase, {
185
+ stripe: Stripe;
186
+ log: Logger;
187
+ } & _fragno_dev_db9.ImplicitDatabaseDependencies<_fragno_dev_db_schema93.Schema<Record<"subscription", _fragno_dev_db_schema93.Table<Record<string, _fragno_dev_db_schema93.AnyColumn> & Record<"id", _fragno_dev_db_schema93.IdColumn<"varchar(30)", string | _fragno_dev_db_schema93.FragnoId | null, _fragno_dev_db_schema93.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema93.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema93.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema93.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema93.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema93.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema93.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema93.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema93.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema93.AnyRelation>, Record<string, _fragno_dev_db_schema93.Index<_fragno_dev_db_schema93.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema93.Index<readonly [_fragno_dev_db_schema93.Column<"string", string, string>] & _fragno_dev_db_schema93.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema93.Index<readonly [_fragno_dev_db_schema93.Column<"string", string, string>] & _fragno_dev_db_schema93.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema93.Index<readonly [_fragno_dev_db_schema93.Column<"string", string | null, string | null>] & _fragno_dev_db_schema93.AnyColumn[], readonly ["referenceId"]>>>>>>, {
188
+ getStripeClient(): Stripe;
189
+ createSubscription(data: Omit<TableToInsertValues<typeof stripeSchema.tables.subscription>, "id" | "createdAt" | "updatedAt">): Promise<string>;
190
+ updateSubscription(id: string, data: Partial<Omit<TableToInsertValues<typeof stripeSchema.tables.subscription>, "id">>): Promise<void>;
191
+ getSubscriptionByStripeId(stripeSubscriptionId: string): Promise<SubscriptionResponse | null>;
192
+ getSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<SubscriptionResponse[]>;
193
+ deleteSubscription(id: string): Promise<void>;
194
+ deleteSubscriptionsByReferenceId(referenceId: string): Promise<{
195
+ success: boolean;
196
+ }>;
197
+ getAllSubscriptions(): Promise<SubscriptionResponse[]>;
198
+ getSubscriptionById(id: string): Promise<SubscriptionResponse | null>;
199
+ getSubscriptionsByReferenceId(referenceId: string): Promise<SubscriptionResponse[]>;
200
+ syncStripeSubscriptions(referenceId: string, customerId: string): Promise<{
201
+ success: boolean;
202
+ }>;
203
+ }, {}, {}, {}, _fragno_dev_db_fragment_definition_builder1.DatabaseServiceContext, _fragno_dev_db9.DatabaseRequestContext, _fragno_dev_db_fragment_definition_builder1.DatabaseRequestStorage, {}>;
204
+ //# sourceMappingURL=definition.d.ts.map
205
+ //#endregion
175
206
  //#region src/index.d.ts
176
- declare const stripeFragmentDefinition: _fragno_dev_db_fragment0.DatabaseFragmentBuilder<_fragno_dev_db_schema0.Schema<Record<"subscription", _fragno_dev_db_schema0.Table<Record<string, _fragno_dev_db_schema0.AnyColumn> & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["referenceId"]>>>>>, StripeFragmentConfig, StripeFragmentDeps, {
177
- getStripeClient: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext) => Stripe;
178
- createSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, data: Omit<{
179
- id?: string | _fragno_dev_db_schema0.FragnoId | null | undefined;
180
- referenceId?: string | null | undefined;
181
- status?: string | null | undefined;
182
- periodStart?: Date | null | undefined;
183
- periodEnd?: Date | null | undefined;
184
- trialStart?: Date | null | undefined;
185
- trialEnd?: Date | null | undefined;
186
- cancelAtPeriodEnd?: boolean | null | undefined;
187
- cancelAt?: Date | null | undefined;
188
- seats?: number | null | undefined;
189
- createdAt?: Date | null | undefined;
190
- updatedAt?: Date | null | undefined;
191
- stripePriceId: string;
192
- stripeCustomerId: string;
193
- stripeSubscriptionId: string;
194
- }, "id" | "createdAt" | "updatedAt">) => Promise<string>;
195
- updateSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string, data: Partial<Omit<{
196
- id?: string | _fragno_dev_db_schema0.FragnoId | null | undefined;
197
- referenceId?: string | null | undefined;
198
- status?: string | null | undefined;
199
- periodStart?: Date | null | undefined;
200
- periodEnd?: Date | null | undefined;
201
- trialStart?: Date | null | undefined;
202
- trialEnd?: Date | null | undefined;
203
- cancelAtPeriodEnd?: boolean | null | undefined;
204
- cancelAt?: Date | null | undefined;
205
- seats?: number | null | undefined;
206
- createdAt?: Date | null | undefined;
207
- updatedAt?: Date | null | undefined;
208
- stripePriceId: string;
209
- stripeCustomerId: string;
210
- stripeSubscriptionId: string;
211
- }, "id">>) => Promise<void>;
212
- getSubscriptionByStripeId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, stripeSubscriptionId: string) => Promise<{
213
- id: string;
214
- stripeSubscriptionId: string;
215
- stripeCustomerId: string;
216
- stripePriceId: string;
217
- referenceId: string | null;
218
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
219
- periodStart: Date | null;
220
- periodEnd: Date | null;
221
- trialStart: Date | null;
222
- trialEnd: Date | null;
223
- cancelAtPeriodEnd: boolean | null;
224
- cancelAt: Date | null;
225
- seats: number | null;
226
- createdAt: Date;
227
- updatedAt: Date;
228
- } | null>;
229
- getSubscriptionByStripeCustomerId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, stripeCustomerId: string) => Promise<{
230
- id: string;
231
- stripeSubscriptionId: string;
232
- stripeCustomerId: string;
233
- stripePriceId: string;
234
- referenceId: string | null;
235
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
236
- periodStart: Date | null;
237
- periodEnd: Date | null;
238
- trialStart: Date | null;
239
- trialEnd: Date | null;
240
- cancelAtPeriodEnd: boolean | null;
241
- cancelAt: Date | null;
242
- seats: number | null;
243
- createdAt: Date;
244
- updatedAt: Date;
245
- }[]>;
246
- deleteSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string) => Promise<void>;
247
- deleteSubscriptionByReferenceId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string) => Promise<boolean>;
248
- getAllSubscriptions: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext) => Promise<{
249
- id: string;
250
- stripeSubscriptionId: string;
251
- stripeCustomerId: string;
252
- stripePriceId: string;
253
- referenceId: string | null;
254
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
255
- periodStart: Date | null;
256
- periodEnd: Date | null;
257
- trialStart: Date | null;
258
- trialEnd: Date | null;
259
- cancelAtPeriodEnd: boolean | null;
260
- cancelAt: Date | null;
261
- seats: number | null;
262
- createdAt: Date;
263
- updatedAt: Date;
264
- }[]>;
265
- getSubscriptionById: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string) => Promise<{
266
- id: string;
267
- stripeSubscriptionId: string;
268
- stripeCustomerId: string;
269
- stripePriceId: string;
270
- referenceId: string | null;
271
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
272
- periodStart: Date | null;
273
- periodEnd: Date | null;
274
- trialStart: Date | null;
275
- trialEnd: Date | null;
276
- cancelAtPeriodEnd: boolean | null;
277
- cancelAt: Date | null;
278
- seats: number | null;
279
- createdAt: Date;
280
- updatedAt: Date;
281
- } | null>;
282
- getSubscriptionByReferenceId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string) => Promise<{
283
- id: string;
284
- stripeSubscriptionId: string;
285
- stripeCustomerId: string;
286
- stripePriceId: string;
287
- referenceId: string | null;
288
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
289
- periodStart: Date | null;
290
- periodEnd: Date | null;
291
- trialStart: Date | null;
292
- trialEnd: Date | null;
293
- cancelAtPeriodEnd: boolean | null;
294
- cancelAt: Date | null;
295
- seats: number | null;
296
- createdAt: Date;
297
- updatedAt: Date;
298
- } | null>;
299
- syncStripeSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string, customerId: string) => Promise<void>;
300
- }, {}, {}>;
301
- declare function createStripeFragment(config: StripeFragmentConfig, fragnoConfig: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment<[_fragno_dev_core0.FragnoRouteConfig<"POST", "/webhook", undefined, zod0.ZodObject<{
302
- success: zod0.ZodBoolean;
303
- }, zod_v4_core0.$strip>, "MISSING_SIGNATURE" | "WEBHOOK_SIGNATURE_INVALID" | "WEBHOOK_ERROR", string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/customers", zod0.ZodObject<{
304
- limit: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
305
- startingAfter: zod0.ZodOptional<zod0.ZodString>;
306
- }, zod_v4_core0.$strip>, zod0.ZodObject<{
307
- customers: zod0.ZodArray<zod0.ZodObject<{
308
- id: zod0.ZodString;
309
- object: zod0.ZodLiteral<"customer">;
310
- balance: zod0.ZodNumber;
311
- business_name: zod0.ZodOptional<zod0.ZodString>;
312
- created: zod0.ZodNumber;
313
- currency: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
314
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
315
- delinquent: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodBoolean>>;
316
- description: zod0.ZodNullable<zod0.ZodString>;
317
- email: zod0.ZodNullable<zod0.ZodString>;
318
- individual_name: zod0.ZodOptional<zod0.ZodString>;
319
- invoice_credit_balance: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodNumber>>;
320
- invoice_prefix: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
321
- livemode: zod0.ZodBoolean;
322
- metadata: zod0.ZodRecord<zod0.ZodString, zod0.ZodString>;
323
- name: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
324
- next_invoice_sequence: zod0.ZodOptional<zod0.ZodNumber>;
325
- phone: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
326
- preferred_locales: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodArray<zod0.ZodString>>>;
327
- }, zod_v4_core0.$strip>>;
328
- hasMore: zod0.ZodBoolean;
329
- }, zod_v4_core0.$strip>, string, string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/subscriptions", undefined, zod0.ZodObject<{
330
- subscriptions: zod0.ZodArray<zod0.ZodObject<{
331
- id: zod0.ZodString;
332
- stripeSubscriptionId: zod0.ZodString;
333
- stripeCustomerId: zod0.ZodString;
334
- stripePriceId: zod0.ZodString;
335
- referenceId: zod0.ZodNullable<zod0.ZodString>;
336
- status: zod0.ZodEnum<{
207
+ declare function createStripeFragment(config: StripeFragmentConfig, fragnoConfig: FragnoPublicConfigWithDatabase): _fragno_dev_core0.FragnoInstantiatedFragment<[_fragno_dev_core0.FragnoRouteConfig<"POST", "/webhook", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, zod199.ZodObject<{
208
+ success: zod199.ZodBoolean;
209
+ }, zod_v4_core14.$strip>, "MISSING_SIGNATURE" | "WEBHOOK_SIGNATURE_INVALID" | "WEBHOOK_ERROR", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/customers", zod199.ZodObject<{
210
+ limit: zod199.ZodDefault<zod199.ZodOptional<zod199.ZodNumber>>;
211
+ startingAfter: zod199.ZodOptional<zod199.ZodString>;
212
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
213
+ customers: zod199.ZodArray<zod199.ZodObject<{
214
+ id: zod199.ZodString;
215
+ object: zod199.ZodLiteral<"customer">;
216
+ balance: zod199.ZodNumber;
217
+ business_name: zod199.ZodOptional<zod199.ZodString>;
218
+ created: zod199.ZodNumber;
219
+ currency: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
220
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
221
+ delinquent: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodBoolean>>;
222
+ description: zod199.ZodNullable<zod199.ZodString>;
223
+ email: zod199.ZodNullable<zod199.ZodString>;
224
+ individual_name: zod199.ZodOptional<zod199.ZodString>;
225
+ invoice_credit_balance: zod199.ZodOptional<zod199.ZodRecord<zod199.ZodString, zod199.ZodNumber>>;
226
+ invoice_prefix: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
227
+ livemode: zod199.ZodBoolean;
228
+ metadata: zod199.ZodRecord<zod199.ZodString, zod199.ZodString>;
229
+ name: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
230
+ next_invoice_sequence: zod199.ZodOptional<zod199.ZodNumber>;
231
+ phone: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
232
+ preferred_locales: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodArray<zod199.ZodString>>>;
233
+ }, zod_v4_core14.$strip>>;
234
+ hasMore: zod199.ZodBoolean;
235
+ }, zod_v4_core14.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/portal", zod199.ZodObject<{
236
+ returnUrl: zod199.ZodURL;
237
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
238
+ url: zod199.ZodURL;
239
+ redirect: zod199.ZodBoolean;
240
+ }, zod_v4_core14.$strip>, "NO_STRIPE_CUSTOMER_FOR_ENTITY", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/subscriptions", _standard_schema_spec0.StandardSchemaV1<unknown, unknown> | undefined, zod199.ZodObject<{
241
+ subscriptions: zod199.ZodArray<zod199.ZodObject<{
242
+ id: zod199.ZodString;
243
+ stripeSubscriptionId: zod199.ZodString;
244
+ stripeCustomerId: zod199.ZodString;
245
+ stripePriceId: zod199.ZodString;
246
+ referenceId: zod199.ZodNullable<zod199.ZodString>;
247
+ status: zod199.ZodEnum<{
337
248
  incomplete: "incomplete";
338
249
  active: "active";
339
250
  canceled: "canceled";
@@ -343,326 +254,221 @@ declare function createStripeFragment(config: StripeFragmentConfig, fragnoConfig
343
254
  trialing: "trialing";
344
255
  unpaid: "unpaid";
345
256
  }>;
346
- periodStart: zod0.ZodNullable<zod0.ZodDate>;
347
- periodEnd: zod0.ZodNullable<zod0.ZodDate>;
348
- trialStart: zod0.ZodNullable<zod0.ZodDate>;
349
- trialEnd: zod0.ZodNullable<zod0.ZodDate>;
350
- cancelAtPeriodEnd: zod0.ZodNullable<zod0.ZodBoolean>;
351
- cancelAt: zod0.ZodNullable<zod0.ZodDate>;
352
- seats: zod0.ZodNullable<zod0.ZodNumber>;
353
- createdAt: zod0.ZodDate;
354
- updatedAt: zod0.ZodDate;
355
- }, zod_v4_core0.$strip>>;
356
- }, zod_v4_core0.$strip>, string, string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/subscription/upgrade", zod0.ZodObject<{
357
- priceId: zod0.ZodString;
358
- quantity: zod0.ZodNumber;
359
- successUrl: zod0.ZodURL;
360
- cancelUrl: zod0.ZodURL;
361
- returnUrl: zod0.ZodOptional<zod0.ZodString>;
362
- }, zod_v4_core0.$strip>, zod0.ZodObject<{
363
- url: zod0.ZodString;
364
- redirect: zod0.ZodBoolean;
365
- sessionId: zod0.ZodOptional<zod0.ZodString>;
366
- }, zod_v4_core0.$strip>, "MISSING_CUSTOMER_INFO" | "SUBSCRIPTION_NOT_FOUND" | "CUSTOMER_SUBSCRIPTION_MISMATCH" | "UPGRADE_HAS_NO_EFFECT" | "SUBSCRIPTION_UPDATE_NOT_ALLOWED", string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/subscription/cancel", zod0.ZodObject<{
367
- returnUrl: zod0.ZodURL;
368
- }, zod_v4_core0.$strip>, zod0.ZodObject<{
369
- url: zod0.ZodURL;
370
- redirect: zod0.ZodBoolean;
371
- }, zod_v4_core0.$strip>, "SUBSCRIPTION_NOT_FOUND" | "NO_SUBSCRIPTION_TO_CANCEL" | "SUBSCRIPTION_ALREADY_CANCELED", string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/products", zod0.ZodObject<{
372
- limit: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
373
- startingAfter: zod0.ZodOptional<zod0.ZodString>;
374
- }, zod_v4_core0.$strip>, zod0.ZodObject<{
375
- products: zod0.ZodArray<zod0.ZodObject<{
376
- id: zod0.ZodString;
377
- object: zod0.ZodLiteral<"product">;
378
- active: zod0.ZodBoolean;
379
- created: zod0.ZodNumber;
380
- default_price: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>>>;
381
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
382
- description: zod0.ZodNullable<zod0.ZodString>;
383
- images: zod0.ZodArray<zod0.ZodString>;
384
- livemode: zod0.ZodBoolean;
385
- marketing_features: zod0.ZodArray<zod0.ZodAny>;
386
- metadata: zod0.ZodAny;
387
- name: zod0.ZodString;
388
- package_dimensions: zod0.ZodNullable<zod0.ZodAny>;
389
- shippable: zod0.ZodNullable<zod0.ZodBoolean>;
390
- statement_descriptor: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
391
- tax_code: zod0.ZodNullable<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>>;
392
- type: zod0.ZodString;
393
- unit_label: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
394
- updated: zod0.ZodNumber;
395
- url: zod0.ZodNullable<zod0.ZodString>;
396
- }, zod_v4_core0.$strip>>;
397
- hasMore: zod0.ZodBoolean;
398
- }, zod_v4_core0.$strip>, string, string, _fragno_dev_core_api0.RequestThisContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/products/:productId/prices", zod0.ZodObject<{
399
- limit: zod0.ZodDefault<zod0.ZodOptional<zod0.ZodNumber>>;
400
- startingAfter: zod0.ZodOptional<zod0.ZodString>;
401
- }, zod_v4_core0.$strip>, zod0.ZodObject<{
402
- prices: zod0.ZodArray<zod0.ZodObject<{
403
- id: zod0.ZodString;
404
- object: zod0.ZodLiteral<"price">;
405
- active: zod0.ZodBoolean;
406
- billing_scheme: zod0.ZodString;
407
- created: zod0.ZodNumber;
408
- currency: zod0.ZodString;
409
- custom_unit_amount: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodAny>>;
410
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
411
- livemode: zod0.ZodBoolean;
412
- lookup_key: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
413
- metadata: zod0.ZodAny;
414
- nickname: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
415
- product: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>;
416
- recurring: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodObject<{
417
- aggregate_usage: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
418
- interval: zod0.ZodEnum<{
257
+ periodStart: zod199.ZodNullable<zod199.ZodDate>;
258
+ periodEnd: zod199.ZodNullable<zod199.ZodDate>;
259
+ trialStart: zod199.ZodNullable<zod199.ZodDate>;
260
+ trialEnd: zod199.ZodNullable<zod199.ZodDate>;
261
+ cancelAtPeriodEnd: zod199.ZodNullable<zod199.ZodBoolean>;
262
+ cancelAt: zod199.ZodNullable<zod199.ZodDate>;
263
+ seats: zod199.ZodNullable<zod199.ZodNumber>;
264
+ createdAt: zod199.ZodDate;
265
+ updatedAt: zod199.ZodDate;
266
+ }, zod_v4_core14.$strip>>;
267
+ }, zod_v4_core14.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/subscription/upgrade", zod199.ZodObject<{
268
+ priceId: zod199.ZodString;
269
+ quantity: zod199.ZodNumber;
270
+ successUrl: zod199.ZodURL;
271
+ cancelUrl: zod199.ZodURL;
272
+ returnUrl: zod199.ZodOptional<zod199.ZodString>;
273
+ promotionCode: zod199.ZodOptional<zod199.ZodString>;
274
+ subscriptionId: zod199.ZodOptional<zod199.ZodString>;
275
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
276
+ url: zod199.ZodString;
277
+ redirect: zod199.ZodBoolean;
278
+ sessionId: zod199.ZodOptional<zod199.ZodString>;
279
+ }, zod_v4_core14.$strip>, "MISSING_CUSTOMER_INFO" | "SUBSCRIPTION_NOT_FOUND" | "CUSTOMER_SUBSCRIPTION_MISMATCH" | "UPGRADE_HAS_NO_EFFECT" | "SUBSCRIPTION_UPDATE_NOT_ALLOWED" | "SUBSCRIPTION_UPDATE_PROMO_CODE_NOT_ALLOWED" | "PROMOTION_CODE_CUSTOMER_NOT_FIRST_TIME" | "MULTIPLE_ACTIVE_SUBSCRIPTIONS" | "NO_ACTIVE_SUBSCRIPTIONS", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"POST", "/subscription/cancel", zod199.ZodObject<{
280
+ returnUrl: zod199.ZodURL;
281
+ subscriptionId: zod199.ZodOptional<zod199.ZodString>;
282
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
283
+ url: zod199.ZodURL;
284
+ redirect: zod199.ZodBoolean;
285
+ }, zod_v4_core14.$strip>, "SUBSCRIPTION_NOT_FOUND" | "NO_SUBSCRIPTION_TO_CANCEL" | "SUBSCRIPTION_ALREADY_CANCELED" | "NO_STRIPE_CUSTOMER_LINKED" | "MULTIPLE_SUBSCRIPTIONS_FOUND", string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/products", zod199.ZodObject<{
286
+ limit: zod199.ZodDefault<zod199.ZodOptional<zod199.ZodNumber>>;
287
+ startingAfter: zod199.ZodOptional<zod199.ZodString>;
288
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
289
+ products: zod199.ZodArray<zod199.ZodObject<{
290
+ id: zod199.ZodString;
291
+ object: zod199.ZodLiteral<"product">;
292
+ active: zod199.ZodBoolean;
293
+ created: zod199.ZodNumber;
294
+ default_price: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>>>;
295
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
296
+ description: zod199.ZodNullable<zod199.ZodString>;
297
+ images: zod199.ZodArray<zod199.ZodString>;
298
+ livemode: zod199.ZodBoolean;
299
+ marketing_features: zod199.ZodArray<zod199.ZodAny>;
300
+ metadata: zod199.ZodAny;
301
+ name: zod199.ZodString;
302
+ package_dimensions: zod199.ZodNullable<zod199.ZodAny>;
303
+ shippable: zod199.ZodNullable<zod199.ZodBoolean>;
304
+ statement_descriptor: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
305
+ tax_code: zod199.ZodNullable<zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>>;
306
+ type: zod199.ZodString;
307
+ unit_label: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
308
+ updated: zod199.ZodNumber;
309
+ url: zod199.ZodNullable<zod199.ZodString>;
310
+ }, zod_v4_core14.$strip>>;
311
+ hasMore: zod199.ZodBoolean;
312
+ }, zod_v4_core14.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>, _fragno_dev_core0.FragnoRouteConfig<"GET", "/admin/products/:productId/prices", zod199.ZodObject<{
313
+ limit: zod199.ZodDefault<zod199.ZodOptional<zod199.ZodNumber>>;
314
+ startingAfter: zod199.ZodOptional<zod199.ZodString>;
315
+ }, zod_v4_core14.$strip>, zod199.ZodObject<{
316
+ prices: zod199.ZodArray<zod199.ZodObject<{
317
+ id: zod199.ZodString;
318
+ object: zod199.ZodLiteral<"price">;
319
+ active: zod199.ZodBoolean;
320
+ billing_scheme: zod199.ZodString;
321
+ created: zod199.ZodNumber;
322
+ currency: zod199.ZodString;
323
+ custom_unit_amount: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodAny>>;
324
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
325
+ livemode: zod199.ZodBoolean;
326
+ lookup_key: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
327
+ metadata: zod199.ZodAny;
328
+ nickname: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
329
+ product: zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>;
330
+ recurring: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodObject<{
331
+ aggregate_usage: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
332
+ interval: zod199.ZodEnum<{
419
333
  day: "day";
420
334
  week: "week";
421
335
  month: "month";
422
336
  year: "year";
423
337
  }>;
424
- interval_count: zod0.ZodNumber;
425
- meter: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
426
- trial_period_days: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodNumber>>;
427
- usage_type: zod0.ZodString;
428
- }, zod_v4_core0.$strip>>>;
429
- tax_behavior: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
430
- tiers_mode: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
431
- transform_quantity: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodAny>>;
432
- type: zod0.ZodEnum<{
338
+ interval_count: zod199.ZodNumber;
339
+ meter: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
340
+ trial_period_days: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodNumber>>;
341
+ usage_type: zod199.ZodString;
342
+ }, zod_v4_core14.$strip>>>;
343
+ tax_behavior: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
344
+ tiers_mode: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
345
+ transform_quantity: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodAny>>;
346
+ type: zod199.ZodEnum<{
433
347
  recurring: "recurring";
434
348
  one_time: "one_time";
435
349
  }>;
436
- unit_amount: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodNumber>>;
437
- unit_amount_decimal: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
438
- }, zod_v4_core0.$strip>>;
439
- hasMore: zod0.ZodBoolean;
440
- }, zod_v4_core0.$strip>, string, string, _fragno_dev_core_api0.RequestThisContext>], StripeFragmentDeps & _fragno_dev_db_fragment0.BoundServices<{}>, _fragno_dev_db_fragment0.BoundServices<{
441
- getStripeClient: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext) => Stripe;
442
- createSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, data: Omit<{
443
- id?: string | _fragno_dev_db_schema0.FragnoId | null | undefined;
444
- referenceId?: string | null | undefined;
445
- status?: string | null | undefined;
446
- periodStart?: Date | null | undefined;
447
- periodEnd?: Date | null | undefined;
448
- trialStart?: Date | null | undefined;
449
- trialEnd?: Date | null | undefined;
450
- cancelAtPeriodEnd?: boolean | null | undefined;
451
- cancelAt?: Date | null | undefined;
452
- seats?: number | null | undefined;
453
- createdAt?: Date | null | undefined;
454
- updatedAt?: Date | null | undefined;
455
- stripePriceId: string;
456
- stripeCustomerId: string;
457
- stripeSubscriptionId: string;
458
- }, "id" | "createdAt" | "updatedAt">) => Promise<string>;
459
- updateSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string, data: Partial<Omit<{
460
- id?: string | _fragno_dev_db_schema0.FragnoId | null | undefined;
461
- referenceId?: string | null | undefined;
462
- status?: string | null | undefined;
463
- periodStart?: Date | null | undefined;
464
- periodEnd?: Date | null | undefined;
465
- trialStart?: Date | null | undefined;
466
- trialEnd?: Date | null | undefined;
467
- cancelAtPeriodEnd?: boolean | null | undefined;
468
- cancelAt?: Date | null | undefined;
469
- seats?: number | null | undefined;
470
- createdAt?: Date | null | undefined;
471
- updatedAt?: Date | null | undefined;
472
- stripePriceId: string;
473
- stripeCustomerId: string;
474
- stripeSubscriptionId: string;
475
- }, "id">>) => Promise<void>;
476
- getSubscriptionByStripeId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, stripeSubscriptionId: string) => Promise<{
477
- id: string;
478
- stripeSubscriptionId: string;
479
- stripeCustomerId: string;
480
- stripePriceId: string;
481
- referenceId: string | null;
482
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
483
- periodStart: Date | null;
484
- periodEnd: Date | null;
485
- trialStart: Date | null;
486
- trialEnd: Date | null;
487
- cancelAtPeriodEnd: boolean | null;
488
- cancelAt: Date | null;
489
- seats: number | null;
490
- createdAt: Date;
491
- updatedAt: Date;
492
- } | null>;
493
- getSubscriptionByStripeCustomerId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, stripeCustomerId: string) => Promise<{
494
- id: string;
495
- stripeSubscriptionId: string;
496
- stripeCustomerId: string;
497
- stripePriceId: string;
498
- referenceId: string | null;
499
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
500
- periodStart: Date | null;
501
- periodEnd: Date | null;
502
- trialStart: Date | null;
503
- trialEnd: Date | null;
504
- cancelAtPeriodEnd: boolean | null;
505
- cancelAt: Date | null;
506
- seats: number | null;
507
- createdAt: Date;
508
- updatedAt: Date;
509
- }[]>;
510
- deleteSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string) => Promise<void>;
511
- deleteSubscriptionByReferenceId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string) => Promise<boolean>;
512
- getAllSubscriptions: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext) => Promise<{
513
- id: string;
514
- stripeSubscriptionId: string;
515
- stripeCustomerId: string;
516
- stripePriceId: string;
517
- referenceId: string | null;
518
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
519
- periodStart: Date | null;
520
- periodEnd: Date | null;
521
- trialStart: Date | null;
522
- trialEnd: Date | null;
523
- cancelAtPeriodEnd: boolean | null;
524
- cancelAt: Date | null;
525
- seats: number | null;
526
- createdAt: Date;
527
- updatedAt: Date;
528
- }[]>;
529
- getSubscriptionById: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, id: string) => Promise<{
530
- id: string;
531
- stripeSubscriptionId: string;
532
- stripeCustomerId: string;
533
- stripePriceId: string;
534
- referenceId: string | null;
535
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
536
- periodStart: Date | null;
537
- periodEnd: Date | null;
538
- trialStart: Date | null;
539
- trialEnd: Date | null;
540
- cancelAtPeriodEnd: boolean | null;
541
- cancelAt: Date | null;
542
- seats: number | null;
543
- createdAt: Date;
544
- updatedAt: Date;
545
- } | null>;
546
- getSubscriptionByReferenceId: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string) => Promise<{
547
- id: string;
548
- stripeSubscriptionId: string;
549
- stripeCustomerId: string;
550
- stripePriceId: string;
551
- referenceId: string | null;
552
- status: "incomplete" | "active" | "canceled" | "incomplete_expired" | "past_due" | "paused" | "trialing" | "unpaid";
553
- periodStart: Date | null;
554
- periodEnd: Date | null;
555
- trialStart: Date | null;
556
- trialEnd: Date | null;
557
- cancelAtPeriodEnd: boolean | null;
558
- cancelAt: Date | null;
559
- seats: number | null;
560
- createdAt: Date;
561
- updatedAt: Date;
562
- } | null>;
563
- syncStripeSubscription: (this: _fragno_dev_db_fragment0.DatabaseRequestThisContext, referenceId: string, customerId: string) => Promise<void>;
564
- }> & _fragno_dev_db_fragment0.BoundServices<{}>, {
565
- databaseSchema?: _fragno_dev_db_schema0.Schema<Record<"subscription", _fragno_dev_db_schema0.Table<Record<string, _fragno_dev_db_schema0.AnyColumn> & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["referenceId"]>>>>> | undefined;
566
- databaseNamespace: string;
567
- }>;
350
+ unit_amount: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodNumber>>;
351
+ unit_amount_decimal: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
352
+ }, zod_v4_core14.$strip>>;
353
+ hasMore: zod199.ZodBoolean;
354
+ }, zod_v4_core14.$strip>, string, string, _fragno_dev_db0.DatabaseRequestContext>], {
355
+ stripe: stripe0.Stripe;
356
+ log: Logger;
357
+ } & _fragno_dev_db0.ImplicitDatabaseDependencies<_fragno_dev_db_schema0.Schema<Record<"subscription", _fragno_dev_db_schema0.Table<Record<string, _fragno_dev_db_schema0.AnyColumn> & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["referenceId"]>>>>>>, _fragno_dev_core0.BoundServices<{
358
+ getStripeClient(): stripe0.Stripe;
359
+ createSubscription(data: Omit<_fragno_dev_db_query0.TableToInsertValues<_fragno_dev_db_schema0.Table<Record<string, _fragno_dev_db_schema0.AnyColumn> & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["referenceId"]>>>>, "id" | "createdAt" | "updatedAt">): Promise<string>;
360
+ updateSubscription(id: string, data: Partial<Omit<_fragno_dev_db_query0.TableToInsertValues<_fragno_dev_db_schema0.Table<Record<string, _fragno_dev_db_schema0.AnyColumn> & Record<"id", _fragno_dev_db_schema0.IdColumn<"varchar(30)", string | _fragno_dev_db_schema0.FragnoId | null, _fragno_dev_db_schema0.FragnoId>> & Record<"referenceId", _fragno_dev_db_schema0.Column<"string", string | null, string | null>> & Record<"stripePriceId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeCustomerId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"stripeSubscriptionId", _fragno_dev_db_schema0.Column<"string", string, string>> & Record<"status", _fragno_dev_db_schema0.Column<"string", string | null, string>> & Record<"periodStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"periodEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialStart", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"trialEnd", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"cancelAtPeriodEnd", _fragno_dev_db_schema0.Column<"bool", boolean | null, boolean>> & Record<"cancelAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date | null>> & Record<"seats", _fragno_dev_db_schema0.Column<"integer", number | null, number | null>> & Record<"createdAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>> & Record<"updatedAt", _fragno_dev_db_schema0.Column<"timestamp", Date | null, Date>>, Record<string, _fragno_dev_db_schema0.AnyRelation>, Record<string, _fragno_dev_db_schema0.Index<_fragno_dev_db_schema0.AnyColumn[], readonly string[]>> & Record<"idx_stripe_customer_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeCustomerId"]>> & Record<"idx_stripe_subscription_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string, string>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["stripeSubscriptionId"]>> & Record<"idx_reference_id", _fragno_dev_db_schema0.Index<readonly [_fragno_dev_db_schema0.Column<"string", string | null, string | null>] & _fragno_dev_db_schema0.AnyColumn[], readonly ["referenceId"]>>>>, "id">>): Promise<void>;
361
+ getSubscriptionByStripeId(stripeSubscriptionId: string): Promise<SubscriptionResponse | null>;
362
+ getSubscriptionsByStripeCustomerId(stripeCustomerId: string): Promise<SubscriptionResponse[]>;
363
+ deleteSubscription(id: string): Promise<void>;
364
+ deleteSubscriptionsByReferenceId(referenceId: string): Promise<{
365
+ success: boolean;
366
+ }>;
367
+ getAllSubscriptions(): Promise<SubscriptionResponse[]>;
368
+ getSubscriptionById(id: string): Promise<SubscriptionResponse | null>;
369
+ getSubscriptionsByReferenceId(referenceId: string): Promise<SubscriptionResponse[]>;
370
+ syncStripeSubscriptions(referenceId: string, customerId: string): Promise<{
371
+ success: boolean;
372
+ }>;
373
+ }>, _fragno_dev_db_fragment_definition_builder0.DatabaseServiceContext, _fragno_dev_db0.DatabaseRequestContext, _fragno_dev_db_fragment_definition_builder0.DatabaseRequestStorage, FragnoPublicConfigWithDatabase, {}>;
568
374
  declare function createStripeFragmentClients(fragnoConfig?: FragnoPublicClientConfig): {
569
- useCustomers: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/customers", zod0.ZodObject<{
570
- customers: zod0.ZodArray<zod0.ZodObject<{
571
- id: zod0.ZodString;
572
- object: zod0.ZodLiteral<"customer">;
573
- balance: zod0.ZodNumber;
574
- business_name: zod0.ZodOptional<zod0.ZodString>;
575
- created: zod0.ZodNumber;
576
- currency: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
577
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
578
- delinquent: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodBoolean>>;
579
- description: zod0.ZodNullable<zod0.ZodString>;
580
- email: zod0.ZodNullable<zod0.ZodString>;
581
- individual_name: zod0.ZodOptional<zod0.ZodString>;
582
- invoice_credit_balance: zod0.ZodOptional<zod0.ZodRecord<zod0.ZodString, zod0.ZodNumber>>;
583
- invoice_prefix: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
584
- livemode: zod0.ZodBoolean;
585
- metadata: zod0.ZodRecord<zod0.ZodString, zod0.ZodString>;
586
- name: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
587
- next_invoice_sequence: zod0.ZodOptional<zod0.ZodNumber>;
588
- phone: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
589
- preferred_locales: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodArray<zod0.ZodString>>>;
590
- }, zod_v4_core0.$strip>>;
591
- hasMore: zod0.ZodBoolean;
592
- }, zod_v4_core0.$strip>, string, string>;
593
- useProducts: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/products", zod0.ZodObject<{
594
- products: zod0.ZodArray<zod0.ZodObject<{
595
- id: zod0.ZodString;
596
- object: zod0.ZodLiteral<"product">;
597
- active: zod0.ZodBoolean;
598
- created: zod0.ZodNumber;
599
- default_price: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>>>;
600
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
601
- description: zod0.ZodNullable<zod0.ZodString>;
602
- images: zod0.ZodArray<zod0.ZodString>;
603
- livemode: zod0.ZodBoolean;
604
- marketing_features: zod0.ZodArray<zod0.ZodAny>;
605
- metadata: zod0.ZodAny;
606
- name: zod0.ZodString;
607
- package_dimensions: zod0.ZodNullable<zod0.ZodAny>;
608
- shippable: zod0.ZodNullable<zod0.ZodBoolean>;
609
- statement_descriptor: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
610
- tax_code: zod0.ZodNullable<zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>>;
611
- type: zod0.ZodString;
612
- unit_label: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
613
- updated: zod0.ZodNumber;
614
- url: zod0.ZodNullable<zod0.ZodString>;
615
- }, zod_v4_core0.$strip>>;
616
- hasMore: zod0.ZodBoolean;
617
- }, zod_v4_core0.$strip>, string, string>;
618
- usePrices: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/products/:productId/prices", zod0.ZodObject<{
619
- prices: zod0.ZodArray<zod0.ZodObject<{
620
- id: zod0.ZodString;
621
- object: zod0.ZodLiteral<"price">;
622
- active: zod0.ZodBoolean;
623
- billing_scheme: zod0.ZodString;
624
- created: zod0.ZodNumber;
625
- currency: zod0.ZodString;
626
- custom_unit_amount: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodAny>>;
627
- deleted: zod0.ZodOptional<zod0.ZodVoid>;
628
- livemode: zod0.ZodBoolean;
629
- lookup_key: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
630
- metadata: zod0.ZodAny;
631
- nickname: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
632
- product: zod0.ZodUnion<readonly [zod0.ZodString, zod0.ZodAny]>;
633
- recurring: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodObject<{
634
- aggregate_usage: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
635
- interval: zod0.ZodEnum<{
375
+ useCustomers: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/customers", zod199.ZodObject<{
376
+ customers: zod199.ZodArray<zod199.ZodObject<{
377
+ id: zod199.ZodString;
378
+ object: zod199.ZodLiteral<"customer">;
379
+ balance: zod199.ZodNumber;
380
+ business_name: zod199.ZodOptional<zod199.ZodString>;
381
+ created: zod199.ZodNumber;
382
+ currency: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
383
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
384
+ delinquent: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodBoolean>>;
385
+ description: zod199.ZodNullable<zod199.ZodString>;
386
+ email: zod199.ZodNullable<zod199.ZodString>;
387
+ individual_name: zod199.ZodOptional<zod199.ZodString>;
388
+ invoice_credit_balance: zod199.ZodOptional<zod199.ZodRecord<zod199.ZodString, zod199.ZodNumber>>;
389
+ invoice_prefix: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
390
+ livemode: zod199.ZodBoolean;
391
+ metadata: zod199.ZodRecord<zod199.ZodString, zod199.ZodString>;
392
+ name: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
393
+ next_invoice_sequence: zod199.ZodOptional<zod199.ZodNumber>;
394
+ phone: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
395
+ preferred_locales: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodArray<zod199.ZodString>>>;
396
+ }, zod_v4_core14.$strip>>;
397
+ hasMore: zod199.ZodBoolean;
398
+ }, zod_v4_core14.$strip>, string, string>;
399
+ useProducts: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/products", zod199.ZodObject<{
400
+ products: zod199.ZodArray<zod199.ZodObject<{
401
+ id: zod199.ZodString;
402
+ object: zod199.ZodLiteral<"product">;
403
+ active: zod199.ZodBoolean;
404
+ created: zod199.ZodNumber;
405
+ default_price: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>>>;
406
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
407
+ description: zod199.ZodNullable<zod199.ZodString>;
408
+ images: zod199.ZodArray<zod199.ZodString>;
409
+ livemode: zod199.ZodBoolean;
410
+ marketing_features: zod199.ZodArray<zod199.ZodAny>;
411
+ metadata: zod199.ZodAny;
412
+ name: zod199.ZodString;
413
+ package_dimensions: zod199.ZodNullable<zod199.ZodAny>;
414
+ shippable: zod199.ZodNullable<zod199.ZodBoolean>;
415
+ statement_descriptor: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
416
+ tax_code: zod199.ZodNullable<zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>>;
417
+ type: zod199.ZodString;
418
+ unit_label: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
419
+ updated: zod199.ZodNumber;
420
+ url: zod199.ZodNullable<zod199.ZodString>;
421
+ }, zod_v4_core14.$strip>>;
422
+ hasMore: zod199.ZodBoolean;
423
+ }, zod_v4_core14.$strip>, string, string>;
424
+ usePrices: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/products/:productId/prices", zod199.ZodObject<{
425
+ prices: zod199.ZodArray<zod199.ZodObject<{
426
+ id: zod199.ZodString;
427
+ object: zod199.ZodLiteral<"price">;
428
+ active: zod199.ZodBoolean;
429
+ billing_scheme: zod199.ZodString;
430
+ created: zod199.ZodNumber;
431
+ currency: zod199.ZodString;
432
+ custom_unit_amount: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodAny>>;
433
+ deleted: zod199.ZodOptional<zod199.ZodVoid>;
434
+ livemode: zod199.ZodBoolean;
435
+ lookup_key: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
436
+ metadata: zod199.ZodAny;
437
+ nickname: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
438
+ product: zod199.ZodUnion<readonly [zod199.ZodString, zod199.ZodAny]>;
439
+ recurring: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodObject<{
440
+ aggregate_usage: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
441
+ interval: zod199.ZodEnum<{
636
442
  day: "day";
637
443
  week: "week";
638
444
  month: "month";
639
445
  year: "year";
640
446
  }>;
641
- interval_count: zod0.ZodNumber;
642
- meter: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
643
- trial_period_days: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodNumber>>;
644
- usage_type: zod0.ZodString;
645
- }, zod_v4_core0.$strip>>>;
646
- tax_behavior: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
647
- tiers_mode: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
648
- transform_quantity: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodAny>>;
649
- type: zod0.ZodEnum<{
447
+ interval_count: zod199.ZodNumber;
448
+ meter: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
449
+ trial_period_days: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodNumber>>;
450
+ usage_type: zod199.ZodString;
451
+ }, zod_v4_core14.$strip>>>;
452
+ tax_behavior: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
453
+ tiers_mode: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
454
+ transform_quantity: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodAny>>;
455
+ type: zod199.ZodEnum<{
650
456
  recurring: "recurring";
651
457
  one_time: "one_time";
652
458
  }>;
653
- unit_amount: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodNumber>>;
654
- unit_amount_decimal: zod0.ZodOptional<zod0.ZodNullable<zod0.ZodString>>;
655
- }, zod_v4_core0.$strip>>;
656
- hasMore: zod0.ZodBoolean;
657
- }, zod_v4_core0.$strip>, string, string>;
658
- useSubscription: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/subscriptions", zod0.ZodObject<{
659
- subscriptions: zod0.ZodArray<zod0.ZodObject<{
660
- id: zod0.ZodString;
661
- stripeSubscriptionId: zod0.ZodString;
662
- stripeCustomerId: zod0.ZodString;
663
- stripePriceId: zod0.ZodString;
664
- referenceId: zod0.ZodNullable<zod0.ZodString>;
665
- status: zod0.ZodEnum<{
459
+ unit_amount: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodNumber>>;
460
+ unit_amount_decimal: zod199.ZodOptional<zod199.ZodNullable<zod199.ZodString>>;
461
+ }, zod_v4_core14.$strip>>;
462
+ hasMore: zod199.ZodBoolean;
463
+ }, zod_v4_core14.$strip>, string, string>;
464
+ useSubscription: _fragno_dev_core_client0.FragnoClientHookData<"GET", "/admin/subscriptions", zod199.ZodObject<{
465
+ subscriptions: zod199.ZodArray<zod199.ZodObject<{
466
+ id: zod199.ZodString;
467
+ stripeSubscriptionId: zod199.ZodString;
468
+ stripeCustomerId: zod199.ZodString;
469
+ stripePriceId: zod199.ZodString;
470
+ referenceId: zod199.ZodNullable<zod199.ZodString>;
471
+ status: zod199.ZodEnum<{
666
472
  incomplete: "incomplete";
667
473
  active: "active";
668
474
  canceled: "canceled";
@@ -672,35 +478,44 @@ declare function createStripeFragmentClients(fragnoConfig?: FragnoPublicClientCo
672
478
  trialing: "trialing";
673
479
  unpaid: "unpaid";
674
480
  }>;
675
- periodStart: zod0.ZodNullable<zod0.ZodDate>;
676
- periodEnd: zod0.ZodNullable<zod0.ZodDate>;
677
- trialStart: zod0.ZodNullable<zod0.ZodDate>;
678
- trialEnd: zod0.ZodNullable<zod0.ZodDate>;
679
- cancelAtPeriodEnd: zod0.ZodNullable<zod0.ZodBoolean>;
680
- cancelAt: zod0.ZodNullable<zod0.ZodDate>;
681
- seats: zod0.ZodNullable<zod0.ZodNumber>;
682
- createdAt: zod0.ZodDate;
683
- updatedAt: zod0.ZodDate;
684
- }, zod_v4_core0.$strip>>;
685
- }, zod_v4_core0.$strip>, string, string>;
686
- upgradeSubscription: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/subscription/upgrade", zod0.ZodObject<{
687
- priceId: zod0.ZodString;
688
- quantity: zod0.ZodNumber;
689
- successUrl: zod0.ZodURL;
690
- cancelUrl: zod0.ZodURL;
691
- returnUrl: zod0.ZodOptional<zod0.ZodString>;
692
- }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
693
- url: zod0.ZodString;
694
- redirect: zod0.ZodBoolean;
695
- sessionId: zod0.ZodOptional<zod0.ZodString>;
696
- }, zod_v4_core0.$strip> | undefined, "MISSING_CUSTOMER_INFO" | "SUBSCRIPTION_NOT_FOUND" | "CUSTOMER_SUBSCRIPTION_MISMATCH" | "UPGRADE_HAS_NO_EFFECT" | "SUBSCRIPTION_UPDATE_NOT_ALLOWED", string>;
697
- cancelSubscription: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api0.NonGetHTTPMethod, "/subscription/cancel", zod0.ZodObject<{
698
- returnUrl: zod0.ZodURL;
699
- }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
700
- url: zod0.ZodURL;
701
- redirect: zod0.ZodBoolean;
702
- }, zod_v4_core0.$strip> | undefined, "SUBSCRIPTION_NOT_FOUND" | "NO_SUBSCRIPTION_TO_CANCEL" | "SUBSCRIPTION_ALREADY_CANCELED", string>;
481
+ periodStart: zod199.ZodNullable<zod199.ZodDate>;
482
+ periodEnd: zod199.ZodNullable<zod199.ZodDate>;
483
+ trialStart: zod199.ZodNullable<zod199.ZodDate>;
484
+ trialEnd: zod199.ZodNullable<zod199.ZodDate>;
485
+ cancelAtPeriodEnd: zod199.ZodNullable<zod199.ZodBoolean>;
486
+ cancelAt: zod199.ZodNullable<zod199.ZodDate>;
487
+ seats: zod199.ZodNullable<zod199.ZodNumber>;
488
+ createdAt: zod199.ZodDate;
489
+ updatedAt: zod199.ZodDate;
490
+ }, zod_v4_core14.$strip>>;
491
+ }, zod_v4_core14.$strip>, string, string>;
492
+ useBillingPortal: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api2.NonGetHTTPMethod, "/portal", zod199.ZodObject<{
493
+ returnUrl: zod199.ZodURL;
494
+ }, zod_v4_core14.$strip> | undefined, zod199.ZodObject<{
495
+ url: zod199.ZodURL;
496
+ redirect: zod199.ZodBoolean;
497
+ }, zod_v4_core14.$strip> | undefined, "NO_STRIPE_CUSTOMER_FOR_ENTITY", string>;
498
+ upgradeSubscription: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api2.NonGetHTTPMethod, "/subscription/upgrade", zod199.ZodObject<{
499
+ priceId: zod199.ZodString;
500
+ quantity: zod199.ZodNumber;
501
+ successUrl: zod199.ZodURL;
502
+ cancelUrl: zod199.ZodURL;
503
+ returnUrl: zod199.ZodOptional<zod199.ZodString>;
504
+ promotionCode: zod199.ZodOptional<zod199.ZodString>;
505
+ subscriptionId: zod199.ZodOptional<zod199.ZodString>;
506
+ }, zod_v4_core14.$strip> | undefined, zod199.ZodObject<{
507
+ url: zod199.ZodString;
508
+ redirect: zod199.ZodBoolean;
509
+ sessionId: zod199.ZodOptional<zod199.ZodString>;
510
+ }, zod_v4_core14.$strip> | undefined, "MISSING_CUSTOMER_INFO" | "SUBSCRIPTION_NOT_FOUND" | "CUSTOMER_SUBSCRIPTION_MISMATCH" | "UPGRADE_HAS_NO_EFFECT" | "SUBSCRIPTION_UPDATE_NOT_ALLOWED" | "SUBSCRIPTION_UPDATE_PROMO_CODE_NOT_ALLOWED" | "PROMOTION_CODE_CUSTOMER_NOT_FIRST_TIME" | "MULTIPLE_ACTIVE_SUBSCRIPTIONS" | "NO_ACTIVE_SUBSCRIPTIONS", string>;
511
+ cancelSubscription: _fragno_dev_core_client0.FragnoClientMutatorData<_fragno_dev_core_api2.NonGetHTTPMethod, "/subscription/cancel", zod199.ZodObject<{
512
+ returnUrl: zod199.ZodURL;
513
+ subscriptionId: zod199.ZodOptional<zod199.ZodString>;
514
+ }, zod_v4_core14.$strip> | undefined, zod199.ZodObject<{
515
+ url: zod199.ZodURL;
516
+ redirect: zod199.ZodBoolean;
517
+ }, zod_v4_core14.$strip> | undefined, "SUBSCRIPTION_NOT_FOUND" | "NO_SUBSCRIPTION_TO_CANCEL" | "SUBSCRIPTION_ALREADY_CANCELED" | "NO_STRIPE_CUSTOMER_LINKED" | "MULTIPLE_SUBSCRIPTIONS_FOUND", string>;
703
518
  };
704
519
  //#endregion
705
- export { type FragnoRouteConfig, type StripeFragmentConfig, type StripeFragmentDeps, type StripeFragmentServices, createStripeFragment, createStripeFragmentClients, stripeFragmentDefinition };
520
+ export { type FragnoRouteConfig, type Logger, type StripeFragmentConfig, type StripeFragmentDeps, type StripeFragmentServices, createStripeFragment, createStripeFragmentClients, stripeFragmentDefinition };
706
521
  //# sourceMappingURL=index.d.ts.map