@voyantjs/checkout 0.5.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,18 +20,21 @@ This package sits above `@voyantjs/finance` and `@voyantjs/notifications`. It do
20
20
 
21
21
  ## Routes
22
22
 
23
- - `POST /v1/checkout/bookings/:bookingId/collection-plan`
24
- - `POST /v1/checkout/bookings/:bookingId/initiate-collection`
23
+ - `POST /v1/public/checkout/bookings/:bookingId/collection-plan`
24
+ - `POST /v1/public/checkout/bookings/:bookingId/initiate-collection`
25
+ - `POST /v1/public/checkout/collections/bootstrap`
25
26
  - `GET /v1/admin/checkout/bookings/:bookingId/reminder-runs`
26
27
 
27
28
  ## Notes
28
29
 
29
- - payment-provider plugins like Netopia remain optional
30
+ - payment-provider adapters like Netopia remain optional
30
31
  - provider startup is injected through `paymentStarters` or
31
32
  `resolvePaymentStarters`
32
33
  - bank-transfer instructions are injected through `bankTransferDetails` or
33
34
  `resolveBankTransferDetails`
34
35
  - email-provider choice remains app-owned
35
36
  - projects can override the default collection policy when mounting checkout
36
- - `createCheckoutHonoModule()` now mounts checkout through Voyant's module
37
- system while preserving the legacy `/v1/checkout/*` public path
37
+ - `createCheckoutHonoModule()` mounts checkout under Voyant's shared
38
+ `/v1/public/*` surface instead of a separate legacy namespace
39
+ - third parties can still ship provider integrations as plugin bundles, but
40
+ checkout itself stays provider-agnostic
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { checkoutModule, createCheckoutAdminRoutes, createCheckoutHonoModule, createCheckoutRoutes, } from "./routes.js";
1
+ export type { CheckoutRouteRuntime, CheckoutRoutesOptions } from "./routes.js";
2
+ export { buildCheckoutRouteRuntime, CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY, checkoutModule, createCheckoutAdminRoutes, createCheckoutHonoModule, createCheckoutRoutes, } from "./routes.js";
2
3
  export type { BootstrappedCheckoutCollection, CheckoutBankTransferDetails, CheckoutCollectionPlan, CheckoutPaymentStarter, CheckoutPolicyOptions, CheckoutProviderStartResult, CheckoutReminderRunList, CheckoutReminderRunSummary, CheckoutRuntimeOptions, InitiatedCheckoutCollection, } from "./service.js";
3
4
  export { bootstrapCheckoutCollection, initiateCheckoutCollection, listBookingReminderRuns, previewCheckoutCollection, resolvePaymentSessionTarget, } from "./service.js";
4
5
  export type { BootstrapCheckoutCollectionInput, BootstrappedCheckoutCollectionRecord, CheckoutBankTransferInstructionsRecord, CheckoutCollectionPlanRecord, CheckoutProviderStartInput, CheckoutProviderStartResultRecord, CheckoutReminderRunListQuery, CheckoutReminderRunRecord, InitiateCheckoutCollectionInput, InitiatedCheckoutCollectionRecord, PreviewCheckoutCollectionInput, } from "./validation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,aAAa,CAAA;AACpB,YAAY,EACV,8BAA8B,EAC9B,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,cAAc,CAAA;AACrB,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,2BAA2B,GAC5B,MAAM,cAAc,CAAA;AACrB,YAAY,EACV,gCAAgC,EAChC,oCAAoC,EACpC,sCAAsC,EACtC,4BAA4B,EAC5B,0BAA0B,EAC1B,iCAAiC,EACjC,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,iCAAiC,EACjC,8BAA8B,GAC/B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,iCAAiC,EACjC,oCAAoC,EACpC,sCAAsC,EACtC,8BAA8B,EAC9B,+BAA+B,EAC/B,8B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qC,EACrC,yBAAyB,EACzB,gCAAgC,EAChC,iCAAiC,EACjC,+BAA+B,GAChC,MAAM,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { checkoutModule, createCheckoutAdminRoutes, createCheckoutHonoModule, createCheckoutRoutes, } from "./routes.js";
1
+ export { buildCheckoutRouteRuntime, CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY, checkoutModule, createCheckoutAdminRoutes, createCheckoutHonoModule, createCheckoutRoutes, } from "./routes.js";
2
2
  export { bootstrapCheckoutCollection, initiateCheckoutCollection, listBookingReminderRuns, previewCheckoutCollection, resolvePaymentSessionTarget, } from "./service.js";
3
3
  export { bootstrapCheckoutCollectionSchema, bootstrappedCheckoutCollectionSchema, checkoutBankTransferInstructionsSchema, checkoutCollectionIntentSchema, checkoutCollectionInvoiceSchema, checkoutCollectionMethodSchema, checkoutCollectionPlanSchema, checkoutCollectionScheduleSchema, checkoutCollectionStageSchema, checkoutInvoiceDocumentTypeSchema, checkoutNotificationDeliverySchema, checkoutPaymentSessionTargetSchema, checkoutProviderStartInputSchema, checkoutProviderStartResultSchema, checkoutReminderRunListQuerySchema, checkoutReminderRunListResponseSchema, checkoutReminderRunSchema, initiateCheckoutCollectionSchema, initiatedCheckoutCollectionSchema, previewCheckoutCollectionSchema, } from "./validation.js";
package/dist/routes.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Module } from "@voyantjs/core";
1
+ import type { Module, ModuleContainer } from "@voyantjs/core";
2
2
  import type { HonoModule } from "@voyantjs/hono/module";
3
3
  import type { NotificationProvider } from "@voyantjs/notifications";
4
4
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
@@ -6,11 +6,12 @@ import { type CheckoutBankTransferDetails, type CheckoutPaymentStarter, type Che
6
6
  type Env = {
7
7
  Bindings: Record<string, unknown>;
8
8
  Variables: {
9
+ container: ModuleContainer;
9
10
  db: PostgresJsDatabase;
10
11
  userId?: string;
11
12
  };
12
13
  };
13
- export declare function createCheckoutRoutes(options?: {
14
+ export type CheckoutRoutesOptions = {
14
15
  policy?: CheckoutPolicyOptions;
15
16
  providers?: ReadonlyArray<NotificationProvider>;
16
17
  resolveProviders?: (bindings: Record<string, unknown>) => ReadonlyArray<NotificationProvider>;
@@ -18,8 +19,16 @@ export declare function createCheckoutRoutes(options?: {
18
19
  resolvePaymentStarters?: (bindings: Record<string, unknown>) => Record<string, CheckoutPaymentStarter>;
19
20
  bankTransferDetails?: CheckoutBankTransferDetails | null;
20
21
  resolveBankTransferDetails?: (bindings: Record<string, unknown>) => CheckoutBankTransferDetails | null;
21
- }): import("hono/hono-base").HonoBase<Env, {
22
- "/v1/checkout/bookings/:bookingId/collection-plan": {
22
+ };
23
+ export type CheckoutRouteRuntime = {
24
+ bindings: Record<string, unknown>;
25
+ providers: ReadonlyArray<NotificationProvider>;
26
+ paymentStarters: Record<string, CheckoutPaymentStarter>;
27
+ bankTransferDetails: CheckoutBankTransferDetails | null;
28
+ };
29
+ export declare const CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY = "providers.checkout.runtime";
30
+ export declare function createCheckoutRoutes(options?: CheckoutRoutesOptions): import("hono/hono-base").HonoBase<Env, {
31
+ "/bookings/:bookingId/collection-plan": {
23
32
  $post: {
24
33
  input: {
25
34
  param: {
@@ -47,27 +56,29 @@ export declare function createCheckoutRoutes(options?: {
47
56
  willCreateDefaultPaymentPlan: boolean;
48
57
  selectedSchedule: {
49
58
  id: string;
50
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
51
59
  createdAt: string;
52
60
  updatedAt: string;
53
- bookingId: string;
61
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
62
+ currency: string;
54
63
  notes: string | null;
64
+ bookingId: string;
55
65
  bookingItemId: string | null;
56
- currency: string;
57
66
  dueDate: string;
58
67
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
59
68
  amountCents: number;
60
69
  } | null;
61
70
  selectedInvoice: {
62
71
  id: string;
63
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
64
- personId: string | null;
65
- organizationId: string | null;
66
- baseCurrency: string | null;
67
72
  createdAt: string;
68
73
  updatedAt: string;
69
- bookingId: string;
74
+ organizationId: string | null;
75
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
76
+ issueDate: string;
77
+ currency: string;
70
78
  notes: string | null;
79
+ personId: string | null;
80
+ baseCurrency: string | null;
81
+ bookingId: string;
71
82
  invoiceNumber: string;
72
83
  invoiceType: "invoice" | "proforma" | "credit_note";
73
84
  seriesId: string | null;
@@ -75,7 +86,6 @@ export declare function createCheckoutRoutes(options?: {
75
86
  templateId: string | null;
76
87
  taxRegimeId: string | null;
77
88
  language: string | null;
78
- currency: string;
79
89
  fxRateSetId: string | null;
80
90
  subtotalCents: number;
81
91
  baseSubtotalCents: number | null;
@@ -89,7 +99,6 @@ export declare function createCheckoutRoutes(options?: {
89
99
  baseBalanceDueCents: number | null;
90
100
  commissionPercent: number | null;
91
101
  commissionAmountCents: number | null;
92
- issueDate: string;
93
102
  dueDate: string;
94
103
  } | null;
95
104
  amountCents: number;
@@ -113,7 +122,7 @@ export declare function createCheckoutRoutes(options?: {
113
122
  };
114
123
  };
115
124
  } & {
116
- "/v1/checkout/bookings/:bookingId/initiate-collection": {
125
+ "/bookings/:bookingId/initiate-collection": {
117
126
  $post: {
118
127
  input: {
119
128
  param: {
@@ -142,27 +151,29 @@ export declare function createCheckoutRoutes(options?: {
142
151
  willCreateDefaultPaymentPlan: boolean;
143
152
  selectedSchedule: {
144
153
  id: string;
145
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
146
154
  createdAt: string;
147
155
  updatedAt: string;
148
- bookingId: string;
156
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
157
+ currency: string;
149
158
  notes: string | null;
159
+ bookingId: string;
150
160
  bookingItemId: string | null;
151
- currency: string;
152
161
  dueDate: string;
153
162
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
154
163
  amountCents: number;
155
164
  } | null;
156
165
  selectedInvoice: {
157
166
  id: string;
158
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
159
- personId: string | null;
160
- organizationId: string | null;
161
- baseCurrency: string | null;
162
167
  createdAt: string;
163
168
  updatedAt: string;
164
- bookingId: string;
169
+ organizationId: string | null;
170
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
171
+ issueDate: string;
172
+ currency: string;
165
173
  notes: string | null;
174
+ personId: string | null;
175
+ baseCurrency: string | null;
176
+ bookingId: string;
166
177
  invoiceNumber: string;
167
178
  invoiceType: "invoice" | "proforma" | "credit_note";
168
179
  seriesId: string | null;
@@ -170,7 +181,6 @@ export declare function createCheckoutRoutes(options?: {
170
181
  templateId: string | null;
171
182
  taxRegimeId: string | null;
172
183
  language: string | null;
173
- currency: string;
174
184
  fxRateSetId: string | null;
175
185
  subtotalCents: number;
176
186
  baseSubtotalCents: number | null;
@@ -184,7 +194,6 @@ export declare function createCheckoutRoutes(options?: {
184
194
  baseBalanceDueCents: number | null;
185
195
  commissionPercent: number | null;
186
196
  commissionAmountCents: number | null;
187
- issueDate: string;
188
197
  dueDate: string;
189
198
  } | null;
190
199
  amountCents: number;
@@ -193,14 +202,16 @@ export declare function createCheckoutRoutes(options?: {
193
202
  };
194
203
  invoice: {
195
204
  id: string;
196
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
197
- personId: string | null;
198
- organizationId: string | null;
199
- baseCurrency: string | null;
200
205
  createdAt: string;
201
206
  updatedAt: string;
202
- bookingId: string;
207
+ organizationId: string | null;
208
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
209
+ issueDate: string;
210
+ currency: string;
203
211
  notes: string | null;
212
+ personId: string | null;
213
+ baseCurrency: string | null;
214
+ bookingId: string;
204
215
  invoiceNumber: string;
205
216
  invoiceType: "invoice" | "proforma" | "credit_note";
206
217
  seriesId: string | null;
@@ -208,7 +219,6 @@ export declare function createCheckoutRoutes(options?: {
208
219
  templateId: string | null;
209
220
  taxRegimeId: string | null;
210
221
  language: string | null;
211
- currency: string;
212
222
  fxRateSetId: string | null;
213
223
  subtotalCents: number;
214
224
  baseSubtotalCents: number | null;
@@ -222,28 +232,27 @@ export declare function createCheckoutRoutes(options?: {
222
232
  baseBalanceDueCents: number | null;
223
233
  commissionPercent: number | null;
224
234
  commissionAmountCents: number | null;
225
- issueDate: string;
226
235
  dueDate: string;
227
236
  } | null;
228
237
  paymentSession: {
238
+ metadata: {
239
+ [x: string]: import("hono/utils/types").JSONValue;
240
+ } | null;
229
241
  id: string;
230
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
242
+ createdAt: string;
243
+ updatedAt: string;
244
+ expiresAt: string | null;
245
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
246
+ currency: string;
247
+ notes: string | null;
231
248
  expiredAt: string | null;
232
249
  cancelledAt: string | null;
233
250
  completedAt: string | null;
234
- createdAt: string;
235
- updatedAt: string;
236
251
  bookingId: string | null;
237
- notes: string | null;
238
- metadata: {
239
- [x: string]: import("hono/utils/types").JSONValue;
240
- } | null;
241
- expiresAt: string | null;
242
252
  provider: string | null;
243
253
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
244
254
  targetId: string | null;
245
255
  orderId: string | null;
246
- currency: string;
247
256
  invoiceId: string | null;
248
257
  amountCents: number;
249
258
  bookingPaymentScheduleId: string | null;
@@ -274,19 +283,19 @@ export declare function createCheckoutRoutes(options?: {
274
283
  } | null;
275
284
  } | null;
276
285
  invoiceNotification: {
286
+ metadata: {
287
+ [x: string]: import("hono/utils/types").JSONValue;
288
+ } | null;
277
289
  id: string;
278
- status: "cancelled" | "pending" | "failed" | "sent";
279
- personId: string | null;
280
- organizationId: string | null;
281
290
  createdAt: string;
282
291
  updatedAt: string;
292
+ organizationId: string | null;
293
+ status: "pending" | "cancelled" | "failed" | "sent";
294
+ personId: string | null;
283
295
  bookingId: string | null;
284
- metadata: {
285
- [x: string]: import("hono/utils/types").JSONValue;
286
- } | null;
287
296
  channel: "email" | "sms";
288
297
  provider: string;
289
- targetType: "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "organization" | "person" | "payment_session";
298
+ targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
290
299
  targetId: string | null;
291
300
  templateId: string | null;
292
301
  invoiceId: string | null;
@@ -307,19 +316,19 @@ export declare function createCheckoutRoutes(options?: {
307
316
  scheduledFor: string | null;
308
317
  } | null;
309
318
  paymentSessionNotification: {
319
+ metadata: {
320
+ [x: string]: import("hono/utils/types").JSONValue;
321
+ } | null;
310
322
  id: string;
311
- status: "cancelled" | "pending" | "failed" | "sent";
312
- personId: string | null;
313
- organizationId: string | null;
314
323
  createdAt: string;
315
324
  updatedAt: string;
325
+ organizationId: string | null;
326
+ status: "pending" | "cancelled" | "failed" | "sent";
327
+ personId: string | null;
316
328
  bookingId: string | null;
317
- metadata: {
318
- [x: string]: import("hono/utils/types").JSONValue;
319
- } | null;
320
329
  channel: "email" | "sms";
321
330
  provider: string;
322
- targetType: "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "organization" | "person" | "payment_session";
331
+ targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
323
332
  targetId: string | null;
324
333
  templateId: string | null;
325
334
  invoiceId: string | null;
@@ -381,7 +390,7 @@ export declare function createCheckoutRoutes(options?: {
381
390
  };
382
391
  };
383
392
  } & {
384
- "/v1/checkout/collections/bootstrap": {
393
+ "/collections/bootstrap": {
385
394
  $post: {
386
395
  input: {};
387
396
  output: {
@@ -406,27 +415,29 @@ export declare function createCheckoutRoutes(options?: {
406
415
  willCreateDefaultPaymentPlan: boolean;
407
416
  selectedSchedule: {
408
417
  id: string;
409
- status: "expired" | "cancelled" | "pending" | "paid" | "due" | "waived";
410
418
  createdAt: string;
411
419
  updatedAt: string;
412
- bookingId: string;
420
+ status: "pending" | "expired" | "cancelled" | "paid" | "due" | "waived";
421
+ currency: string;
413
422
  notes: string | null;
423
+ bookingId: string;
414
424
  bookingItemId: string | null;
415
- currency: string;
416
425
  dueDate: string;
417
426
  scheduleType: "other" | "deposit" | "installment" | "balance" | "hold";
418
427
  amountCents: number;
419
428
  } | null;
420
429
  selectedInvoice: {
421
430
  id: string;
422
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
423
- personId: string | null;
424
- organizationId: string | null;
425
- baseCurrency: string | null;
426
431
  createdAt: string;
427
432
  updatedAt: string;
428
- bookingId: string;
433
+ organizationId: string | null;
434
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
435
+ issueDate: string;
436
+ currency: string;
429
437
  notes: string | null;
438
+ personId: string | null;
439
+ baseCurrency: string | null;
440
+ bookingId: string;
430
441
  invoiceNumber: string;
431
442
  invoiceType: "invoice" | "proforma" | "credit_note";
432
443
  seriesId: string | null;
@@ -434,7 +445,6 @@ export declare function createCheckoutRoutes(options?: {
434
445
  templateId: string | null;
435
446
  taxRegimeId: string | null;
436
447
  language: string | null;
437
- currency: string;
438
448
  fxRateSetId: string | null;
439
449
  subtotalCents: number;
440
450
  baseSubtotalCents: number | null;
@@ -448,7 +458,6 @@ export declare function createCheckoutRoutes(options?: {
448
458
  baseBalanceDueCents: number | null;
449
459
  commissionPercent: number | null;
450
460
  commissionAmountCents: number | null;
451
- issueDate: string;
452
461
  dueDate: string;
453
462
  } | null;
454
463
  amountCents: number;
@@ -457,14 +466,16 @@ export declare function createCheckoutRoutes(options?: {
457
466
  };
458
467
  invoice: {
459
468
  id: string;
460
- status: "draft" | "sent" | "partially_paid" | "paid" | "overdue" | "void";
461
- personId: string | null;
462
- organizationId: string | null;
463
- baseCurrency: string | null;
464
469
  createdAt: string;
465
470
  updatedAt: string;
466
- bookingId: string;
471
+ organizationId: string | null;
472
+ status: "void" | "draft" | "sent" | "partially_paid" | "paid" | "overdue";
473
+ issueDate: string;
474
+ currency: string;
467
475
  notes: string | null;
476
+ personId: string | null;
477
+ baseCurrency: string | null;
478
+ bookingId: string;
468
479
  invoiceNumber: string;
469
480
  invoiceType: "invoice" | "proforma" | "credit_note";
470
481
  seriesId: string | null;
@@ -472,7 +483,6 @@ export declare function createCheckoutRoutes(options?: {
472
483
  templateId: string | null;
473
484
  taxRegimeId: string | null;
474
485
  language: string | null;
475
- currency: string;
476
486
  fxRateSetId: string | null;
477
487
  subtotalCents: number;
478
488
  baseSubtotalCents: number | null;
@@ -486,28 +496,27 @@ export declare function createCheckoutRoutes(options?: {
486
496
  baseBalanceDueCents: number | null;
487
497
  commissionPercent: number | null;
488
498
  commissionAmountCents: number | null;
489
- issueDate: string;
490
499
  dueDate: string;
491
500
  } | null;
492
501
  paymentSession: {
502
+ metadata: {
503
+ [x: string]: import("hono/utils/types").JSONValue;
504
+ } | null;
493
505
  id: string;
494
- status: "expired" | "cancelled" | "pending" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
506
+ createdAt: string;
507
+ updatedAt: string;
508
+ expiresAt: string | null;
509
+ status: "pending" | "expired" | "cancelled" | "failed" | "paid" | "requires_redirect" | "processing" | "authorized";
510
+ currency: string;
511
+ notes: string | null;
495
512
  expiredAt: string | null;
496
513
  cancelledAt: string | null;
497
514
  completedAt: string | null;
498
- createdAt: string;
499
- updatedAt: string;
500
515
  bookingId: string | null;
501
- notes: string | null;
502
- metadata: {
503
- [x: string]: import("hono/utils/types").JSONValue;
504
- } | null;
505
- expiresAt: string | null;
506
516
  provider: string | null;
507
517
  targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee";
508
518
  targetId: string | null;
509
519
  orderId: string | null;
510
- currency: string;
511
520
  invoiceId: string | null;
512
521
  amountCents: number;
513
522
  bookingPaymentScheduleId: string | null;
@@ -538,19 +547,19 @@ export declare function createCheckoutRoutes(options?: {
538
547
  } | null;
539
548
  } | null;
540
549
  invoiceNotification: {
550
+ metadata: {
551
+ [x: string]: import("hono/utils/types").JSONValue;
552
+ } | null;
541
553
  id: string;
542
- status: "cancelled" | "pending" | "failed" | "sent";
543
- personId: string | null;
544
- organizationId: string | null;
545
554
  createdAt: string;
546
555
  updatedAt: string;
556
+ organizationId: string | null;
557
+ status: "pending" | "cancelled" | "failed" | "sent";
558
+ personId: string | null;
547
559
  bookingId: string | null;
548
- metadata: {
549
- [x: string]: import("hono/utils/types").JSONValue;
550
- } | null;
551
560
  channel: "email" | "sms";
552
561
  provider: string;
553
- targetType: "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "organization" | "person" | "payment_session";
562
+ targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
554
563
  targetId: string | null;
555
564
  templateId: string | null;
556
565
  invoiceId: string | null;
@@ -571,19 +580,19 @@ export declare function createCheckoutRoutes(options?: {
571
580
  scheduledFor: string | null;
572
581
  } | null;
573
582
  paymentSessionNotification: {
583
+ metadata: {
584
+ [x: string]: import("hono/utils/types").JSONValue;
585
+ } | null;
574
586
  id: string;
575
- status: "cancelled" | "pending" | "failed" | "sent";
576
- personId: string | null;
577
- organizationId: string | null;
578
587
  createdAt: string;
579
588
  updatedAt: string;
589
+ organizationId: string | null;
590
+ status: "pending" | "cancelled" | "failed" | "sent";
591
+ personId: string | null;
580
592
  bookingId: string | null;
581
- metadata: {
582
- [x: string]: import("hono/utils/types").JSONValue;
583
- } | null;
584
593
  channel: "email" | "sms";
585
594
  provider: string;
586
- targetType: "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "organization" | "person" | "payment_session";
595
+ targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
587
596
  targetId: string | null;
588
597
  templateId: string | null;
589
598
  invoiceId: string | null;
@@ -640,7 +649,7 @@ export declare function createCheckoutRoutes(options?: {
640
649
  status: 409;
641
650
  };
642
651
  };
643
- }, "/", "/v1/checkout/collections/bootstrap">;
652
+ }, "/", "/collections/bootstrap">;
644
653
  export declare function createCheckoutAdminRoutes(): import("hono/hono-base").HonoBase<Env, {
645
654
  "/bookings/:bookingId/reminder-runs": {
646
655
  $get: {
@@ -681,6 +690,7 @@ export declare function createCheckoutAdminRoutes(): import("hono/hono-base").Ho
681
690
  };
682
691
  }, "/", "/bookings/:bookingId/reminder-runs">;
683
692
  export declare const checkoutModule: Module;
684
- export declare function createCheckoutHonoModule(options?: Parameters<typeof createCheckoutRoutes>[0]): HonoModule;
693
+ export declare function createCheckoutHonoModule(options?: CheckoutRoutesOptions): HonoModule;
694
+ export declare function buildCheckoutRouteRuntime(bindings: Record<string, unknown>, options?: CheckoutRoutesOptions): CheckoutRouteRuntime;
685
695
  export {};
686
696
  //# sourceMappingURL=routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../src/routes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAGjE,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAI3B,MAAM,cAAc,CAAA;AAQrB,KAAK,GAAG,GAAG;IACT,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,SAAS,EAAE;QACT,EAAE,EAAE,kBAAkB,CAAA;QACtB,MAAM,CAAC,EAAE,MAAM,CAAA;KAChB,CAAA;CACF,CAAA;AAED,wBAAgB,oBAAoB,CAClC,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAqFvE;AAED,wBAAgB,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAMxC;AAED,eAAO,MAAM,cAAc,EAAE,MAE5B,CAAA;AAED,wBAAgB,wBAAwB,CAAC,OAAO,GAAE,qBAA0B,GAAG,UAAU,CAgBxF;AAED,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjC,OAAO,GAAE,qBAA0B,GAClC,oBAAoB,CAQtB"}
package/dist/routes.js CHANGED
@@ -1,19 +1,18 @@
1
+ import { parseJsonBody, parseOptionalJsonBody, parseQuery } from "@voyantjs/hono";
1
2
  import { createNotificationService } from "@voyantjs/notifications";
2
3
  import { Hono } from "hono";
3
4
  import { bootstrapCheckoutCollection, initiateCheckoutCollection, listBookingReminderRuns, previewCheckoutCollection, } from "./service.js";
4
5
  import { bootstrapCheckoutCollectionSchema, checkoutReminderRunListQuerySchema, initiateCheckoutCollectionSchema, previewCheckoutCollectionSchema, } from "./validation.js";
6
+ export const CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY = "providers.checkout.runtime";
5
7
  export function createCheckoutRoutes(options = {}) {
6
- function createCheckoutRuntime(bindings) {
7
- return {
8
- bindings,
9
- paymentStarters: options.resolvePaymentStarters?.(bindings) ?? options.paymentStarters ?? {},
10
- bankTransferDetails: options.resolveBankTransferDetails?.(bindings) ?? options.bankTransferDetails ?? null,
11
- };
8
+ function getRuntime(bindings, resolveFromContainer) {
9
+ return (resolveFromContainer?.(CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY) ??
10
+ buildCheckoutRouteRuntime(bindings, options));
12
11
  }
13
12
  return new Hono()
14
- .post("/v1/checkout/bookings/:bookingId/collection-plan", async (c) => {
13
+ .post("/bookings/:bookingId/collection-plan", async (c) => {
15
14
  try {
16
- const plan = await previewCheckoutCollection(c.get("db"), c.req.param("bookingId"), previewCheckoutCollectionSchema.parse(await c.req.json().catch(() => ({}))), options.policy);
15
+ const plan = await previewCheckoutCollection(c.get("db"), c.req.param("bookingId"), await parseOptionalJsonBody(c, previewCheckoutCollectionSchema), options.policy);
17
16
  if (!plan) {
18
17
  return c.json({ error: "Booking not found" }, 404);
19
18
  }
@@ -24,10 +23,11 @@ export function createCheckoutRoutes(options = {}) {
24
23
  return c.json({ error: message }, 400);
25
24
  }
26
25
  })
27
- .post("/v1/checkout/bookings/:bookingId/initiate-collection", async (c) => {
26
+ .post("/bookings/:bookingId/initiate-collection", async (c) => {
28
27
  try {
29
- const dispatcher = createNotificationService(options.resolveProviders?.(c.env) ?? options.providers ?? []);
30
- const result = await initiateCheckoutCollection(c.get("db"), c.req.param("bookingId"), initiateCheckoutCollectionSchema.parse(await c.req.json()), options.policy, dispatcher, createCheckoutRuntime(c.env));
28
+ const runtime = getRuntime(c.env, (key) => c.var.container?.resolve(key));
29
+ const dispatcher = createNotificationService(runtime.providers);
30
+ const result = await initiateCheckoutCollection(c.get("db"), c.req.param("bookingId"), await parseJsonBody(c, initiateCheckoutCollectionSchema), options.policy, dispatcher, runtime);
31
31
  if (!result) {
32
32
  return c.json({ error: "Booking not found" }, 404);
33
33
  }
@@ -41,10 +41,11 @@ export function createCheckoutRoutes(options = {}) {
41
41
  return c.json({ error: message }, 409);
42
42
  }
43
43
  })
44
- .post("/v1/checkout/collections/bootstrap", async (c) => {
44
+ .post("/collections/bootstrap", async (c) => {
45
45
  try {
46
- const dispatcher = createNotificationService(options.resolveProviders?.(c.env) ?? options.providers ?? []);
47
- const result = await bootstrapCheckoutCollection(c.get("db"), bootstrapCheckoutCollectionSchema.parse(await c.req.json()), options.policy, dispatcher, createCheckoutRuntime(c.env));
46
+ const runtime = getRuntime(c.env, (key) => c.var.container?.resolve(key));
47
+ const dispatcher = createNotificationService(runtime.providers);
48
+ const result = await bootstrapCheckoutCollection(c.get("db"), await parseJsonBody(c, bootstrapCheckoutCollectionSchema), options.policy, dispatcher, runtime);
48
49
  if (!result) {
49
50
  return c.json({ error: "Booking session not found" }, 404);
50
51
  }
@@ -61,17 +62,31 @@ export function createCheckoutRoutes(options = {}) {
61
62
  }
62
63
  export function createCheckoutAdminRoutes() {
63
64
  return new Hono().get("/bookings/:bookingId/reminder-runs", async (c) => {
64
- const query = checkoutReminderRunListQuerySchema.parse(Object.fromEntries(new URL(c.req.url).searchParams));
65
+ const query = parseQuery(c, checkoutReminderRunListQuerySchema);
65
66
  return c.json(await listBookingReminderRuns(c.get("db"), c.req.param("bookingId"), query));
66
67
  });
67
68
  }
68
69
  export const checkoutModule = {
69
70
  name: "checkout",
70
71
  };
71
- export function createCheckoutHonoModule(options) {
72
+ export function createCheckoutHonoModule(options = {}) {
73
+ const module = {
74
+ ...checkoutModule,
75
+ bootstrap: ({ bindings, container }) => {
76
+ container.register(CHECKOUT_ROUTE_RUNTIME_CONTAINER_KEY, buildCheckoutRouteRuntime(bindings, options));
77
+ },
78
+ };
72
79
  return {
73
- module: checkoutModule,
74
- routes: createCheckoutRoutes(options),
80
+ module,
81
+ publicRoutes: createCheckoutRoutes(options),
75
82
  adminRoutes: createCheckoutAdminRoutes(),
76
83
  };
77
84
  }
85
+ export function buildCheckoutRouteRuntime(bindings, options = {}) {
86
+ return {
87
+ bindings,
88
+ providers: options.resolveProviders?.(bindings) ?? options.providers ?? [],
89
+ paymentStarters: options.resolvePaymentStarters?.(bindings) ?? options.paymentStarters ?? {},
90
+ bankTransferDetails: options.resolveBankTransferDetails?.(bindings) ?? options.bankTransferDetails ?? null,
91
+ };
92
+ }
@@ -428,8 +428,8 @@ export declare const checkoutNotificationDeliverySchema: z.ZodObject<{
428
428
  }>;
429
429
  provider: z.ZodString;
430
430
  status: z.ZodEnum<{
431
- cancelled: "cancelled";
432
431
  pending: "pending";
432
+ cancelled: "cancelled";
433
433
  failed: "failed";
434
434
  sent: "sent";
435
435
  }>;
@@ -615,9 +615,9 @@ export declare const initiatedCheckoutCollectionSchema: z.ZodObject<{
615
615
  bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
616
616
  bookingGuaranteeId: z.ZodNullable<z.ZodString>;
617
617
  status: z.ZodEnum<{
618
+ pending: "pending";
618
619
  expired: "expired";
619
620
  cancelled: "cancelled";
620
- pending: "pending";
621
621
  failed: "failed";
622
622
  paid: "paid";
623
623
  requires_redirect: "requires_redirect";
@@ -661,8 +661,8 @@ export declare const initiatedCheckoutCollectionSchema: z.ZodObject<{
661
661
  }>;
662
662
  provider: z.ZodString;
663
663
  status: z.ZodEnum<{
664
- cancelled: "cancelled";
665
664
  pending: "pending";
665
+ cancelled: "cancelled";
666
666
  failed: "failed";
667
667
  sent: "sent";
668
668
  }>;
@@ -681,8 +681,8 @@ export declare const initiatedCheckoutCollectionSchema: z.ZodObject<{
681
681
  }>;
682
682
  provider: z.ZodString;
683
683
  status: z.ZodEnum<{
684
- cancelled: "cancelled";
685
684
  pending: "pending";
685
+ cancelled: "cancelled";
686
686
  failed: "failed";
687
687
  sent: "sent";
688
688
  }>;
@@ -811,9 +811,9 @@ export declare const bootstrappedCheckoutCollectionSchema: z.ZodObject<{
811
811
  bookingPaymentScheduleId: z.ZodNullable<z.ZodString>;
812
812
  bookingGuaranteeId: z.ZodNullable<z.ZodString>;
813
813
  status: z.ZodEnum<{
814
+ pending: "pending";
814
815
  expired: "expired";
815
816
  cancelled: "cancelled";
816
- pending: "pending";
817
817
  failed: "failed";
818
818
  paid: "paid";
819
819
  requires_redirect: "requires_redirect";
@@ -857,8 +857,8 @@ export declare const bootstrappedCheckoutCollectionSchema: z.ZodObject<{
857
857
  }>;
858
858
  provider: z.ZodString;
859
859
  status: z.ZodEnum<{
860
- cancelled: "cancelled";
861
860
  pending: "pending";
861
+ cancelled: "cancelled";
862
862
  failed: "failed";
863
863
  sent: "sent";
864
864
  }>;
@@ -877,8 +877,8 @@ export declare const bootstrappedCheckoutCollectionSchema: z.ZodObject<{
877
877
  }>;
878
878
  provider: z.ZodString;
879
879
  status: z.ZodEnum<{
880
- cancelled: "cancelled";
881
880
  pending: "pending";
881
+ cancelled: "cancelled";
882
882
  failed: "failed";
883
883
  sent: "sent";
884
884
  }>;
@@ -955,8 +955,8 @@ export declare const checkoutReminderRunSchema: z.ZodObject<{
955
955
  skipped: "skipped";
956
956
  }>;
957
957
  deliveryStatus: z.ZodNullable<z.ZodEnum<{
958
- cancelled: "cancelled";
959
958
  pending: "pending";
959
+ cancelled: "cancelled";
960
960
  failed: "failed";
961
961
  sent: "sent";
962
962
  }>>;
@@ -993,8 +993,8 @@ export declare const checkoutReminderRunListResponseSchema: z.ZodObject<{
993
993
  skipped: "skipped";
994
994
  }>;
995
995
  deliveryStatus: z.ZodNullable<z.ZodEnum<{
996
- cancelled: "cancelled";
997
996
  pending: "pending";
997
+ cancelled: "cancelled";
998
998
  failed: "failed";
999
999
  sent: "sent";
1000
1000
  }>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/checkout",
3
- "version": "0.5.0",
3
+ "version": "0.6.2",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -25,11 +25,11 @@
25
25
  "drizzle-orm": "^0.45.2",
26
26
  "hono": "^4.12.10",
27
27
  "zod": "^4.3.6",
28
- "@voyantjs/bookings": "0.5.0",
29
- "@voyantjs/core": "0.5.0",
30
- "@voyantjs/finance": "0.5.0",
31
- "@voyantjs/hono": "0.5.0",
32
- "@voyantjs/notifications": "0.5.0"
28
+ "@voyantjs/bookings": "0.6.2",
29
+ "@voyantjs/core": "0.6.2",
30
+ "@voyantjs/finance": "0.6.2",
31
+ "@voyantjs/hono": "0.6.2",
32
+ "@voyantjs/notifications": "0.6.2"
33
33
  },
34
34
  "devDependencies": {
35
35
  "typescript": "^6.0.2",