@crvouga/mockingbird-service-stripe 0.1.0

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.
Files changed (142) hide show
  1. package/README.md +254 -0
  2. package/dist/account.d.ts +8 -0
  3. package/dist/account.d.ts.map +1 -0
  4. package/dist/account.js +13 -0
  5. package/dist/account.js.map +1 -0
  6. package/dist/charges.d.ts +4 -0
  7. package/dist/charges.d.ts.map +1 -0
  8. package/dist/charges.js +89 -0
  9. package/dist/charges.js.map +1 -0
  10. package/dist/checkout-sessions.d.ts +5 -0
  11. package/dist/checkout-sessions.d.ts.map +1 -0
  12. package/dist/checkout-sessions.js +303 -0
  13. package/dist/checkout-sessions.js.map +1 -0
  14. package/dist/constants.d.ts +3 -0
  15. package/dist/constants.d.ts.map +1 -0
  16. package/dist/constants.js +3 -0
  17. package/dist/constants.js.map +1 -0
  18. package/dist/coupons.d.ts +4 -0
  19. package/dist/coupons.d.ts.map +1 -0
  20. package/dist/coupons.js +158 -0
  21. package/dist/coupons.js.map +1 -0
  22. package/dist/customers.d.ts +4 -0
  23. package/dist/customers.d.ts.map +1 -0
  24. package/dist/customers.js +218 -0
  25. package/dist/customers.js.map +1 -0
  26. package/dist/disputes.d.ts +4 -0
  27. package/dist/disputes.d.ts.map +1 -0
  28. package/dist/disputes.js +36 -0
  29. package/dist/disputes.js.map +1 -0
  30. package/dist/errors.d.ts +29 -0
  31. package/dist/errors.d.ts.map +1 -0
  32. package/dist/errors.js +74 -0
  33. package/dist/errors.js.map +1 -0
  34. package/dist/events.d.ts +4 -0
  35. package/dist/events.d.ts.map +1 -0
  36. package/dist/events.js +76 -0
  37. package/dist/events.js.map +1 -0
  38. package/dist/expand.d.ts +11 -0
  39. package/dist/expand.d.ts.map +1 -0
  40. package/dist/expand.js +45 -0
  41. package/dist/expand.js.map +1 -0
  42. package/dist/fields.d.ts +25 -0
  43. package/dist/fields.d.ts.map +1 -0
  44. package/dist/fields.js +117 -0
  45. package/dist/fields.js.map +1 -0
  46. package/dist/generated/openapi.d.ts +7 -0
  47. package/dist/generated/openapi.d.ts.map +1 -0
  48. package/dist/generated/openapi.js +5 -0
  49. package/dist/generated/openapi.js.map +1 -0
  50. package/dist/index.d.ts +43 -0
  51. package/dist/index.d.ts.map +1 -0
  52. package/dist/index.js +172 -0
  53. package/dist/index.js.map +1 -0
  54. package/dist/internal.d.ts +134 -0
  55. package/dist/internal.d.ts.map +1 -0
  56. package/dist/internal.js +460 -0
  57. package/dist/internal.js.map +1 -0
  58. package/dist/invoice-items.d.ts +4 -0
  59. package/dist/invoice-items.d.ts.map +1 -0
  60. package/dist/invoice-items.js +179 -0
  61. package/dist/invoice-items.js.map +1 -0
  62. package/dist/invoices.d.ts +4 -0
  63. package/dist/invoices.d.ts.map +1 -0
  64. package/dist/invoices.js +312 -0
  65. package/dist/invoices.js.map +1 -0
  66. package/dist/list.d.ts +24 -0
  67. package/dist/list.d.ts.map +1 -0
  68. package/dist/list.js +68 -0
  69. package/dist/list.js.map +1 -0
  70. package/dist/params.d.ts +29 -0
  71. package/dist/params.d.ts.map +1 -0
  72. package/dist/params.js +165 -0
  73. package/dist/params.js.map +1 -0
  74. package/dist/payment-intents.d.ts +4 -0
  75. package/dist/payment-intents.d.ts.map +1 -0
  76. package/dist/payment-intents.js +232 -0
  77. package/dist/payment-intents.js.map +1 -0
  78. package/dist/payment-methods.d.ts +4 -0
  79. package/dist/payment-methods.d.ts.map +1 -0
  80. package/dist/payment-methods.js +99 -0
  81. package/dist/payment-methods.js.map +1 -0
  82. package/dist/prices.d.ts +4 -0
  83. package/dist/prices.d.ts.map +1 -0
  84. package/dist/prices.js +176 -0
  85. package/dist/prices.js.map +1 -0
  86. package/dist/products.d.ts +6 -0
  87. package/dist/products.d.ts.map +1 -0
  88. package/dist/products.js +202 -0
  89. package/dist/products.js.map +1 -0
  90. package/dist/promotion-codes.d.ts +4 -0
  91. package/dist/promotion-codes.d.ts.map +1 -0
  92. package/dist/promotion-codes.js +193 -0
  93. package/dist/promotion-codes.js.map +1 -0
  94. package/dist/qa-corpus.d.ts +26 -0
  95. package/dist/qa-corpus.d.ts.map +1 -0
  96. package/dist/qa-corpus.js +42 -0
  97. package/dist/qa-corpus.js.map +1 -0
  98. package/dist/refunds.d.ts +4 -0
  99. package/dist/refunds.d.ts.map +1 -0
  100. package/dist/refunds.js +125 -0
  101. package/dist/refunds.js.map +1 -0
  102. package/dist/render.d.ts +60 -0
  103. package/dist/render.d.ts.map +1 -0
  104. package/dist/render.js +426 -0
  105. package/dist/render.js.map +1 -0
  106. package/dist/reshape-qa.d.ts +8 -0
  107. package/dist/reshape-qa.d.ts.map +1 -0
  108. package/dist/reshape-qa.js +102 -0
  109. package/dist/reshape-qa.js.map +1 -0
  110. package/dist/search.d.ts +32 -0
  111. package/dist/search.d.ts.map +1 -0
  112. package/dist/search.js +64 -0
  113. package/dist/search.js.map +1 -0
  114. package/dist/setup-intents.d.ts +4 -0
  115. package/dist/setup-intents.d.ts.map +1 -0
  116. package/dist/setup-intents.js +129 -0
  117. package/dist/setup-intents.js.map +1 -0
  118. package/dist/state.d.ts +485 -0
  119. package/dist/state.d.ts.map +1 -0
  120. package/dist/state.js +143 -0
  121. package/dist/state.js.map +1 -0
  122. package/dist/subscription-schedules.d.ts +4 -0
  123. package/dist/subscription-schedules.d.ts.map +1 -0
  124. package/dist/subscription-schedules.js +122 -0
  125. package/dist/subscription-schedules.js.map +1 -0
  126. package/dist/subscriptions.d.ts +23 -0
  127. package/dist/subscriptions.d.ts.map +1 -0
  128. package/dist/subscriptions.js +260 -0
  129. package/dist/subscriptions.js.map +1 -0
  130. package/dist/test-tokens.d.ts +27 -0
  131. package/dist/test-tokens.d.ts.map +1 -0
  132. package/dist/test-tokens.js +61 -0
  133. package/dist/test-tokens.js.map +1 -0
  134. package/dist/url.d.ts +6 -0
  135. package/dist/url.d.ts.map +1 -0
  136. package/dist/url.js +38 -0
  137. package/dist/url.js.map +1 -0
  138. package/dist/version.d.ts +3 -0
  139. package/dist/version.d.ts.map +1 -0
  140. package/dist/version.js +3 -0
  141. package/dist/version.js.map +1 -0
  142. package/package.json +72 -0
@@ -0,0 +1,485 @@
1
+ import type { OperationContext } from "@crvouga/mockingbird-service";
2
+ import { Collection, IdSequence } from "@crvouga/mockingbird-service";
3
+ import type { SqliteClient } from "@crvouga/mockingbird-sqlite";
4
+ export type Metadata = Record<string, string>;
5
+ export type Address = {
6
+ city: string | null;
7
+ country: string | null;
8
+ line1: string | null;
9
+ line2: string | null;
10
+ postal_code: string | null;
11
+ state: string | null;
12
+ };
13
+ export type CustomField = {
14
+ name: string;
15
+ value: string;
16
+ };
17
+ export type CustomerRecord = {
18
+ id: string;
19
+ address: Address | null;
20
+ balance: number;
21
+ created: number;
22
+ currency: string | null;
23
+ description: string | null;
24
+ email: string | null;
25
+ invoice_prefix: string;
26
+ invoice_settings: {
27
+ custom_fields: CustomField[] | null;
28
+ default_payment_method: string | null;
29
+ footer: string | null;
30
+ rendering_options: Record<string, unknown> | null;
31
+ };
32
+ metadata: Metadata;
33
+ name: string | null;
34
+ phone: string | null;
35
+ preferred_locales: string[];
36
+ shipping: {
37
+ address: Address;
38
+ name: string;
39
+ phone: string | null;
40
+ } | null;
41
+ tax_exempt: "none" | "exempt" | "reverse";
42
+ };
43
+ /** Deleted customers stay retrievable as tombstones. */
44
+ export type CustomerEntry = {
45
+ kind: "live";
46
+ customer: CustomerRecord;
47
+ } | {
48
+ kind: "deleted";
49
+ id: string;
50
+ };
51
+ export type PackageDimensions = {
52
+ height: number;
53
+ length: number;
54
+ weight: number;
55
+ width: number;
56
+ };
57
+ export type ProductRecord = {
58
+ id: string;
59
+ active: boolean;
60
+ created: number;
61
+ description: string | null;
62
+ images: string[];
63
+ marketing_features: Array<{
64
+ name: string;
65
+ }>;
66
+ metadata: Metadata;
67
+ name: string;
68
+ package_dimensions: PackageDimensions | null;
69
+ shippable: boolean | null;
70
+ statement_descriptor: string | null;
71
+ unit_label: string | null;
72
+ updated: number;
73
+ url: string | null;
74
+ };
75
+ export type Recurring = {
76
+ interval: "day" | "week" | "month" | "year";
77
+ interval_count: number;
78
+ usage_type: "licensed" | "metered";
79
+ };
80
+ export type PriceRecord = {
81
+ id: string;
82
+ active: boolean;
83
+ created: number;
84
+ currency: string;
85
+ lookup_key: string | null;
86
+ metadata: Metadata;
87
+ nickname: string | null;
88
+ product: string;
89
+ recurring: Recurring | null;
90
+ tax_behavior: "exclusive" | "inclusive" | "unspecified";
91
+ /** Canonical decimal string in cents (no trailing zeros), e.g. "100" or "100.5". */
92
+ unit_amount_decimal: string;
93
+ };
94
+ export type PaymentMethodRecord = {
95
+ id: string;
96
+ type: string;
97
+ created: number;
98
+ customer: string | null;
99
+ billing_details: Record<string, unknown>;
100
+ card: Record<string, unknown> | null;
101
+ metadata: Metadata;
102
+ /** Present while the object is a card the mock can charge from a test token. */
103
+ token: string | null;
104
+ };
105
+ export type PaymentIntentStatus = "requires_payment_method" | "requires_confirmation" | "requires_action" | "processing" | "requires_capture" | "canceled" | "succeeded";
106
+ export type PaymentIntentRecord = {
107
+ id: string;
108
+ amount: number;
109
+ amount_capturable: number;
110
+ amount_received: number;
111
+ capture_method: "automatic" | "automatic_async" | "manual";
112
+ client_secret: string;
113
+ confirmation_method: "automatic" | "manual";
114
+ created: number;
115
+ currency: string;
116
+ customer: string | null;
117
+ description: string | null;
118
+ invoice: string | null;
119
+ last_payment_error: Record<string, unknown> | null;
120
+ latest_charge: string | null;
121
+ metadata: Metadata;
122
+ payment_method: string | null;
123
+ payment_method_types: string[];
124
+ receipt_email: string | null;
125
+ setup_future_usage: string | null;
126
+ status: PaymentIntentStatus;
127
+ canceled_at: number | null;
128
+ cancellation_reason: string | null;
129
+ charge_ids: string[];
130
+ };
131
+ export type SetupIntentStatus = "requires_payment_method" | "requires_confirmation" | "requires_action" | "processing" | "canceled" | "succeeded";
132
+ export type SetupIntentRecord = {
133
+ id: string;
134
+ created: number;
135
+ customer: string | null;
136
+ description: string | null;
137
+ metadata: Metadata;
138
+ payment_method: string | null;
139
+ payment_method_types: string[];
140
+ status: SetupIntentStatus;
141
+ usage: string;
142
+ client_secret: string;
143
+ last_setup_error: Record<string, unknown> | null;
144
+ cancellation_reason: string | null;
145
+ canceled_at: number | null;
146
+ };
147
+ export type ChargeRecord = {
148
+ id: string;
149
+ amount: number;
150
+ amount_captured: number;
151
+ amount_refunded: number;
152
+ captured: boolean;
153
+ created: number;
154
+ currency: string;
155
+ customer: string | null;
156
+ description: string | null;
157
+ disputed: boolean;
158
+ invoice: string | null;
159
+ metadata: Metadata;
160
+ paid: boolean;
161
+ payment_intent: string | null;
162
+ payment_method: string | null;
163
+ refunded: boolean;
164
+ status: "succeeded" | "pending" | "failed";
165
+ refund_ids: string[];
166
+ };
167
+ export type RefundStatus = "pending" | "requires_action" | "succeeded" | "failed" | "canceled";
168
+ export type RefundRecord = {
169
+ id: string;
170
+ amount: number;
171
+ charge: string | null;
172
+ created: number;
173
+ currency: string;
174
+ metadata: Metadata;
175
+ payment_intent: string | null;
176
+ reason: string | null;
177
+ receipt_number: string | null;
178
+ status: RefundStatus;
179
+ };
180
+ export type DisputeRecord = {
181
+ id: string;
182
+ amount: number;
183
+ charge: string;
184
+ created: number;
185
+ currency: string;
186
+ metadata: Metadata;
187
+ payment_intent: string | null;
188
+ reason: string;
189
+ status: string;
190
+ };
191
+ export type CustomerBalanceTransactionRecord = {
192
+ id: string;
193
+ amount: number;
194
+ created: number;
195
+ credit_note: string | null;
196
+ currency: string;
197
+ customer: string;
198
+ description: string | null;
199
+ ending_balance: number;
200
+ invoice: string | null;
201
+ metadata: Metadata;
202
+ type: string;
203
+ };
204
+ export type DiscountRecord = {
205
+ id: string;
206
+ coupon: string;
207
+ promotion_code: string | null;
208
+ customer: string | null;
209
+ subscription: string | null;
210
+ start: number;
211
+ end: number | null;
212
+ };
213
+ export type InvoiceLineRecord = {
214
+ id: string;
215
+ amount: number;
216
+ currency: string;
217
+ description: string | null;
218
+ discount_amounts: Array<Record<string, unknown>>;
219
+ invoice_item: string | null;
220
+ metadata: Metadata;
221
+ period: {
222
+ start: number;
223
+ end: number;
224
+ };
225
+ price: string | null;
226
+ quantity: number | null;
227
+ proration: boolean;
228
+ subtotal: number;
229
+ type: "invoiceitem" | "subscription";
230
+ };
231
+ export type InvoiceStatus = "draft" | "open" | "paid" | "uncollectible" | "void";
232
+ export type InvoiceRecord = {
233
+ id: string;
234
+ amount_due: number;
235
+ amount_paid: number;
236
+ amount_remaining: number;
237
+ attempt_count: number;
238
+ attempted: boolean;
239
+ auto_advance: boolean;
240
+ billing_reason: string | null;
241
+ charge: string | null;
242
+ collection_method: "charge_automatically" | "send_invoice";
243
+ created: number;
244
+ currency: string;
245
+ customer: string | null;
246
+ customer_email: string | null;
247
+ customer_name: string | null;
248
+ description: string | null;
249
+ discount_ids: string[];
250
+ due_date: number | null;
251
+ ending_balance: number | null;
252
+ invoice_pdf: string | null;
253
+ hosted_invoice_url: string | null;
254
+ metadata: Metadata;
255
+ next_payment_attempt: number | null;
256
+ number: string | null;
257
+ paid: boolean;
258
+ payment_intent: string | null;
259
+ period_end: number;
260
+ period_start: number;
261
+ status: InvoiceStatus;
262
+ status_transitions: {
263
+ finalized_at: number | null;
264
+ marked_uncollectible_at: number | null;
265
+ paid_at: number | null;
266
+ voided_at: number | null;
267
+ };
268
+ subscription: string | null;
269
+ subtotal: number;
270
+ total: number;
271
+ lines: InvoiceLineRecord[];
272
+ };
273
+ export type InvoiceItemRecord = {
274
+ id: string;
275
+ amount: number;
276
+ created: number;
277
+ currency: string;
278
+ customer: string | null;
279
+ date: number;
280
+ description: string | null;
281
+ discountable: boolean;
282
+ invoice: string | null;
283
+ metadata: Metadata;
284
+ period: {
285
+ start: number;
286
+ end: number;
287
+ };
288
+ price: string | null;
289
+ proration: boolean;
290
+ quantity: number;
291
+ unit_amount: number | null;
292
+ };
293
+ export type SubscriptionItemRecord = {
294
+ id: string;
295
+ created: number;
296
+ metadata: Metadata;
297
+ price: string;
298
+ quantity: number | null;
299
+ subscription: string;
300
+ };
301
+ export type SubscriptionStatus = "incomplete" | "incomplete_expired" | "trialing" | "active" | "past_due" | "canceled" | "unpaid" | "paused";
302
+ export type SubscriptionRecord = {
303
+ id: string;
304
+ cancel_at: number | null;
305
+ cancel_at_period_end: boolean;
306
+ canceled_at: number | null;
307
+ collection_method: "charge_automatically" | "send_invoice";
308
+ created: number;
309
+ currency: string;
310
+ customer: string;
311
+ days_until_due: number | null;
312
+ default_payment_method: string | null;
313
+ discount_ids: string[];
314
+ ended_at: number | null;
315
+ item_ids: string[];
316
+ latest_invoice: string | null;
317
+ metadata: Metadata;
318
+ pause_collection: Record<string, unknown> | null;
319
+ schedule: string | null;
320
+ start_date: number;
321
+ status: SubscriptionStatus;
322
+ trial_end: number | null;
323
+ trial_start: number | null;
324
+ current_period_start: number;
325
+ current_period_end: number;
326
+ };
327
+ export type SubscriptionScheduleStatus = "not_started" | "active" | "completed" | "released" | "canceled";
328
+ export type SubscriptionScheduleRecord = {
329
+ id: string;
330
+ created: number;
331
+ customer: string;
332
+ end_behavior: string;
333
+ metadata: Metadata;
334
+ phases: Array<Record<string, unknown>>;
335
+ released_at: number | null;
336
+ released_subscription: string | null;
337
+ status: SubscriptionScheduleStatus;
338
+ subscription: string | null;
339
+ };
340
+ export type CouponRecord = {
341
+ id: string;
342
+ amount_off: number | null;
343
+ applies_to_products: string[];
344
+ created: number;
345
+ currency: string | null;
346
+ currency_options: Record<string, {
347
+ amount_off: number;
348
+ }>;
349
+ duration: "forever" | "once" | "repeating";
350
+ duration_in_months: number | null;
351
+ livemode: false;
352
+ max_redemptions: number | null;
353
+ metadata: Metadata;
354
+ name: string | null;
355
+ percent_off: number | null;
356
+ redeem_by: number | null;
357
+ times_redeemed: number;
358
+ valid: boolean;
359
+ };
360
+ export type PromotionCodeRecord = {
361
+ id: string;
362
+ active: boolean;
363
+ code: string;
364
+ coupon: string;
365
+ created: number;
366
+ customer: string | null;
367
+ expires_at: number | null;
368
+ max_redemptions: number | null;
369
+ metadata: Metadata;
370
+ restrictions: {
371
+ first_time_transaction: boolean;
372
+ minimum_amount: number | null;
373
+ minimum_amount_currency: string | null;
374
+ };
375
+ times_redeemed: number;
376
+ };
377
+ export type WebhookEventRecord = {
378
+ id: string;
379
+ type: string;
380
+ created: number;
381
+ /** Partition token of the account whose key produced the event; never rendered. */
382
+ account: string;
383
+ body: string;
384
+ data: {
385
+ object: Record<string, unknown>;
386
+ previous_attributes?: Record<string, unknown>;
387
+ };
388
+ };
389
+ export type WebhookDeliveryAttemptRecord = {
390
+ message_id: string;
391
+ account: string;
392
+ attempt: number;
393
+ scheduled_at: string;
394
+ timeout_ms: number;
395
+ acknowledged: boolean;
396
+ };
397
+ export type CheckoutSessionLineRecord = {
398
+ id: string;
399
+ amount_subtotal: number;
400
+ amount_total: number;
401
+ currency: string;
402
+ description: string | null;
403
+ price: string | null;
404
+ quantity: number | null;
405
+ unit_amount: number | null;
406
+ };
407
+ export type CheckoutSessionStatus = "open" | "complete" | "expired";
408
+ export type CheckoutSessionRecord = {
409
+ id: string;
410
+ amount_subtotal: number;
411
+ amount_total: number;
412
+ cancel_url: string | null;
413
+ created: number;
414
+ currency: string;
415
+ customer: string | null;
416
+ customer_creation: string | null;
417
+ expires_at: number;
418
+ line_items: CheckoutSessionLineRecord[];
419
+ livemode: false;
420
+ metadata: Metadata;
421
+ mode: "payment" | "setup" | "subscription";
422
+ payment_intent: string | null;
423
+ payment_status: "paid" | "unpaid" | "no_payment_required";
424
+ setup_intent: string | null;
425
+ status: CheckoutSessionStatus;
426
+ subscription: string | null;
427
+ success_url: string | null;
428
+ url: string;
429
+ };
430
+ /** Every record type the Stripe mock stores, addressed per account. */
431
+ export declare class AccountState {
432
+ readonly account: string;
433
+ readonly customers: Collection<CustomerEntry>;
434
+ readonly products: Collection<ProductRecord>;
435
+ readonly prices: Collection<PriceRecord>;
436
+ readonly paymentMethods: Collection<PaymentMethodRecord>;
437
+ readonly paymentIntents: Collection<PaymentIntentRecord>;
438
+ readonly setupIntents: Collection<SetupIntentRecord>;
439
+ readonly charges: Collection<ChargeRecord>;
440
+ readonly refunds: Collection<RefundRecord>;
441
+ readonly disputes: Collection<DisputeRecord>;
442
+ readonly balanceTransactions: Collection<CustomerBalanceTransactionRecord>;
443
+ readonly coupons: Collection<CouponRecord>;
444
+ readonly promotionCodes: Collection<PromotionCodeRecord>;
445
+ readonly discounts: Collection<DiscountRecord>;
446
+ readonly checkoutSessions: Collection<CheckoutSessionRecord>;
447
+ readonly invoices: Collection<InvoiceRecord>;
448
+ readonly invoiceItems: Collection<InvoiceItemRecord>;
449
+ readonly subscriptions: Collection<SubscriptionRecord>;
450
+ readonly subscriptionItems: Collection<SubscriptionItemRecord>;
451
+ readonly subscriptionSchedules: Collection<SubscriptionScheduleRecord>;
452
+ readonly events: Collection<WebhookEventRecord>;
453
+ readonly webhookDeliveryAttempts: Collection<WebhookDeliveryAttemptRecord>;
454
+ /** Every collection by name, so state can be copied between partitions generically. */
455
+ readonly collections: Record<string, Collection<unknown>>;
456
+ constructor(sqlite: SqliteClient, namespace: string, account: string);
457
+ /**
458
+ * Copy every record of another partition into this one.
459
+ *
460
+ * Used to seed an instance before a lockstep walk: a side that was warmed without this instance
461
+ * (the oracle in a mock↔mock run) hands over the state its walk produced, without replaying
462
+ * requests.
463
+ */
464
+ importFrom(source: AccountState): void;
465
+ }
466
+ export declare class StripeState {
467
+ private readonly sqlite;
468
+ private readonly namespace;
469
+ private readonly partitions;
470
+ readonly ids: IdSequence;
471
+ constructor(sqlite: SqliteClient, namespace: string);
472
+ /** Account-scoped collections; the same API key always resolves to the same partition. */
473
+ for(account: string): AccountState;
474
+ scope(context: OperationContext): AccountState;
475
+ /** Account partitions seen so far, optionally narrowed to one. */
476
+ accounts(account?: string): AccountState[];
477
+ /**
478
+ * Copy every partition and id counter of `source` into this instance (seeding a lockstep walk).
479
+ * Counters come along so freshly minted ids cannot collide with the seeded ones.
480
+ */
481
+ importFrom(source: StripeState): void;
482
+ requestLogUrl(): Promise<string>;
483
+ }
484
+ export declare const seconds: (now: () => number) => number;
485
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAG/D,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE7C,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzD,MAAM,MAAM,cAAc,GAAG;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,cAAc,EAAE,MAAM,CAAA;IACtB,gBAAgB,EAAE;QAChB,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAA;QACnC,sBAAsB,EAAE,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AAE,YAAY,EACpB,SAAS,EAAE,MAAM;IAKpC,0FAA0F;IAC1F,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY;IAQlC,KAAK,CAAC,OAAO,EAAE,gBAAgB,GAAG,YAAY;IAI9C,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE;IAK1C;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI;IAa/B,aAAa;CAIpB;AAED,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,MAAM,WAA6B,CAAA"}
package/dist/state.js ADDED
@@ -0,0 +1,143 @@
1
+ import { Collection, IdSequence } from "@crvouga/mockingbird-service";
2
+ import { accountOf } from "./account.js";
3
+ /** Every record type the Stripe mock stores, addressed per account. */
4
+ export class AccountState {
5
+ account;
6
+ customers;
7
+ products;
8
+ prices;
9
+ paymentMethods;
10
+ paymentIntents;
11
+ setupIntents;
12
+ charges;
13
+ refunds;
14
+ disputes;
15
+ balanceTransactions;
16
+ coupons;
17
+ promotionCodes;
18
+ discounts;
19
+ checkoutSessions;
20
+ invoices;
21
+ invoiceItems;
22
+ subscriptions;
23
+ subscriptionItems;
24
+ subscriptionSchedules;
25
+ events;
26
+ webhookDeliveryAttempts;
27
+ /** Every collection by name, so state can be copied between partitions generically. */
28
+ collections;
29
+ constructor(sqlite, namespace, account) {
30
+ this.account = account;
31
+ const collection = (base) => new Collection(sqlite, namespace, `${base}@${account}`);
32
+ this.customers = collection("customers");
33
+ this.products = collection("products");
34
+ this.prices = collection("prices");
35
+ this.paymentMethods = collection("payment_methods");
36
+ this.paymentIntents = collection("payment_intents");
37
+ this.setupIntents = collection("setup_intents");
38
+ this.charges = collection("charges");
39
+ this.refunds = collection("refunds");
40
+ this.disputes = collection("disputes");
41
+ this.balanceTransactions = collection("balance_transactions");
42
+ this.coupons = collection("coupons");
43
+ this.promotionCodes = collection("promotion_codes");
44
+ this.discounts = collection("discounts");
45
+ this.checkoutSessions = collection("checkout_sessions");
46
+ this.invoices = collection("invoices");
47
+ this.invoiceItems = collection("invoice_items");
48
+ this.subscriptions = collection("subscriptions");
49
+ this.subscriptionItems = collection("subscription_items");
50
+ this.subscriptionSchedules = collection("subscription_schedules");
51
+ this.events = collection("events");
52
+ this.webhookDeliveryAttempts = collection("webhook_delivery_attempts");
53
+ this.collections = {
54
+ balance_transactions: this.balanceTransactions,
55
+ charges: this.charges,
56
+ checkout_sessions: this.checkoutSessions,
57
+ coupons: this.coupons,
58
+ customers: this.customers,
59
+ discounts: this.discounts,
60
+ disputes: this.disputes,
61
+ events: this.events,
62
+ invoice_items: this.invoiceItems,
63
+ invoices: this.invoices,
64
+ payment_intents: this.paymentIntents,
65
+ payment_methods: this.paymentMethods,
66
+ prices: this.prices,
67
+ products: this.products,
68
+ promotion_codes: this.promotionCodes,
69
+ refunds: this.refunds,
70
+ setup_intents: this.setupIntents,
71
+ subscription_items: this.subscriptionItems,
72
+ subscription_schedules: this.subscriptionSchedules,
73
+ subscriptions: this.subscriptions,
74
+ webhook_delivery_attempts: this.webhookDeliveryAttempts,
75
+ };
76
+ }
77
+ /**
78
+ * Copy every record of another partition into this one.
79
+ *
80
+ * Used to seed an instance before a lockstep walk: a side that was warmed without this instance
81
+ * (the oracle in a mock↔mock run) hands over the state its walk produced, without replaying
82
+ * requests.
83
+ */
84
+ importFrom(source) {
85
+ for (const [name, target] of Object.entries(this.collections)) {
86
+ const origin = source.collections[name];
87
+ if (origin === undefined)
88
+ continue;
89
+ for (const entry of origin.list({ order: "oldest" }))
90
+ target.insert(entry.id, entry.value);
91
+ }
92
+ }
93
+ }
94
+ export class StripeState {
95
+ sqlite;
96
+ namespace;
97
+ partitions = new Map();
98
+ ids;
99
+ constructor(sqlite, namespace) {
100
+ this.sqlite = sqlite;
101
+ this.namespace = namespace;
102
+ this.ids = new IdSequence(sqlite, namespace, "stripe");
103
+ }
104
+ /** Account-scoped collections; the same API key always resolves to the same partition. */
105
+ for(account) {
106
+ const cached = this.partitions.get(account);
107
+ if (cached)
108
+ return cached;
109
+ const state = new AccountState(this.sqlite, this.namespace, account);
110
+ this.partitions.set(account, state);
111
+ return state;
112
+ }
113
+ scope(context) {
114
+ return this.for(accountOf(context.request));
115
+ }
116
+ /** Account partitions seen so far, optionally narrowed to one. */
117
+ accounts(account) {
118
+ if (account !== undefined)
119
+ return [this.for(account)];
120
+ return [...this.partitions.values()];
121
+ }
122
+ /**
123
+ * Copy every partition and id counter of `source` into this instance (seeding a lockstep walk).
124
+ * Counters come along so freshly minted ids cannot collide with the seeded ones.
125
+ */
126
+ importFrom(source) {
127
+ for (const partition of source.accounts())
128
+ this.for(partition.account).importFrom(partition);
129
+ const sequences = source.sqlite
130
+ .prepare("SELECT name, kind, value FROM mockingbird_sequences WHERE namespace = ?")
131
+ .all(source.namespace);
132
+ const upsert = this.sqlite.prepare(`INSERT INTO mockingbird_sequences (namespace, name, kind, value) VALUES (?, ?, ?, ?)
133
+ ON CONFLICT(namespace, name, kind) DO UPDATE SET value = excluded.value`);
134
+ for (const sequence of sequences)
135
+ upsert.run(this.namespace, sequence.name, sequence.kind, sequence.value);
136
+ }
137
+ async requestLogUrl() {
138
+ const id = this.ids.next("req_");
139
+ return `https://dashboard.stripe.com/acct_mockingbird/test/workbench/logs?object=${id}`;
140
+ }
141
+ }
142
+ export const seconds = (now) => Math.floor(now() / 1000);
143
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAErE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AA4cxC,uEAAuE;AACvE,MAAM,OAAO,YAAY;IACd,OAAO,CAAQ;IACf,SAAS,CAA2B;IACpC,QAAQ,CAA2B;IACnC,MAAM,CAAyB;IAC/B,cAAc,CAAiC;IAC/C,cAAc,CAAiC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C,OAAO,4EAA4E,EAAE,EAAE,CAAA;IACzF,CAAC;CACF;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAA"}
@@ -0,0 +1,4 @@
1
+ import { type OperationHandler } from "@crvouga/mockingbird-service";
2
+ import { type Services } from "./internal.js";
3
+ export declare const subscriptionScheduleHandlers: (services: Services) => Record<string, OperationHandler>;
4
+ //# sourceMappingURL=subscription-schedules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscription-schedules.d.ts","sourceRoot":"","sources":["../src/subscription-schedules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AAGlF,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,eAAe,CAAA;AAwCtB,eAAO,MAAM,4BAA4B,GACvC,UAAU,QAAQ,KACjB,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAwGhC,CAAA"}