@voyantjs/plugin-netopia 0.23.0 → 0.24.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.
package/dist/plugin.d.ts DELETED
@@ -1,714 +0,0 @@
1
- import type { ModuleContainer } from "@voyantjs/core";
2
- import { type HonoBundle } from "@voyantjs/hono";
3
- import type { HonoExtension } from "@voyantjs/hono/module";
4
- import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
5
- import type { NetopiaRuntimeOptions } from "./types.js";
6
- type Env = {
7
- Bindings: Record<string, unknown>;
8
- Variables: {
9
- container: ModuleContainer;
10
- db: PostgresJsDatabase;
11
- userId?: string;
12
- };
13
- };
14
- export declare const NETOPIA_RUNTIME_CONTAINER_KEY = "providers.netopia.runtime";
15
- export declare function createNetopiaFinanceRoutes(options?: NetopiaRuntimeOptions): import("hono/hono-base").HonoBase<Env, {
16
- "/providers/netopia/payment-sessions/:sessionId/start": {
17
- $post: {
18
- input: {
19
- param: {
20
- sessionId: string;
21
- };
22
- };
23
- output: {
24
- data: {
25
- session: {
26
- metadata: {
27
- [x: string]: import("hono/utils/types").JSONValue;
28
- } | null;
29
- id: string;
30
- createdAt: string;
31
- updatedAt: string;
32
- expiresAt: string | null;
33
- status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
34
- currency: string;
35
- notes: string | null;
36
- idempotencyKey: string | null;
37
- provider: string | null;
38
- bookingId: string | null;
39
- expiredAt: string | null;
40
- cancelledAt: string | null;
41
- completedAt: string | null;
42
- paymentId: string | null;
43
- amountCents: number;
44
- targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
45
- targetId: string | null;
46
- orderId: string | null;
47
- invoiceId: string | null;
48
- bookingPaymentScheduleId: string | null;
49
- paymentInstrumentId: string | null;
50
- bookingGuaranteeId: string | null;
51
- paymentAuthorizationId: string | null;
52
- paymentCaptureId: string | null;
53
- paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
54
- providerSessionId: string | null;
55
- providerPaymentId: string | null;
56
- externalReference: string | null;
57
- clientReference: string | null;
58
- payerPersonId: string | null;
59
- payerOrganizationId: string | null;
60
- payerEmail: string | null;
61
- payerName: string | null;
62
- redirectUrl: string | null;
63
- returnUrl: string | null;
64
- cancelUrl: string | null;
65
- callbackUrl: string | null;
66
- failedAt: string | null;
67
- failureCode: string | null;
68
- failureMessage: string | null;
69
- providerPayload: {
70
- [x: string]: import("hono/utils/types").JSONValue;
71
- } | null;
72
- };
73
- providerResponse: {
74
- code?: string | undefined;
75
- message?: string | undefined;
76
- error?: {
77
- code?: string | number | undefined;
78
- message?: string | undefined;
79
- } | undefined;
80
- payment?: {
81
- paymentURL?: string | undefined;
82
- ntpID?: string | undefined;
83
- status?: number | undefined;
84
- amount?: number | undefined;
85
- currency?: string | undefined;
86
- } | undefined;
87
- };
88
- orderId: string;
89
- };
90
- };
91
- outputFormat: "json";
92
- status: 201;
93
- } | {
94
- input: {
95
- param: {
96
- sessionId: string;
97
- };
98
- };
99
- output: {
100
- error: string;
101
- };
102
- outputFormat: "json";
103
- status: 404;
104
- } | {
105
- input: {
106
- param: {
107
- sessionId: string;
108
- };
109
- };
110
- output: {
111
- error: string;
112
- };
113
- outputFormat: "json";
114
- status: 409;
115
- } | {
116
- input: {
117
- param: {
118
- sessionId: string;
119
- };
120
- };
121
- output: {
122
- error: string;
123
- };
124
- outputFormat: "json";
125
- status: 500;
126
- } | {
127
- input: {
128
- param: {
129
- sessionId: string;
130
- };
131
- };
132
- output: {
133
- error: string;
134
- };
135
- outputFormat: "json";
136
- status: 502;
137
- };
138
- };
139
- } & {
140
- "/providers/netopia/bookings/:bookingId/payment-schedules/:scheduleId/collect": {
141
- $post: {
142
- input: {
143
- param: {
144
- bookingId: string;
145
- } & {
146
- scheduleId: string;
147
- };
148
- };
149
- output: {
150
- data: {
151
- paymentSessionNotification: {
152
- metadata: {
153
- [x: string]: import("hono/utils/types").JSONValue;
154
- } | null;
155
- id: string;
156
- createdAt: string;
157
- updatedAt: string;
158
- organizationId: string | null;
159
- status: "pending" | "failed" | "cancelled" | "sent";
160
- provider: string;
161
- scheduledFor: string | null;
162
- errorMessage: string | null;
163
- bookingId: string | null;
164
- personId: string | null;
165
- channel: "email" | "sms";
166
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
167
- targetId: string | null;
168
- templateId: string | null;
169
- invoiceId: string | null;
170
- failedAt: string | null;
171
- subject: string | null;
172
- sentAt: string | null;
173
- fromAddress: string | null;
174
- templateSlug: string | null;
175
- paymentSessionId: string | null;
176
- providerMessageId: string | null;
177
- toAddress: string;
178
- htmlBody: string | null;
179
- textBody: string | null;
180
- payloadData: {
181
- [x: string]: import("hono/utils/types").JSONValue;
182
- } | null;
183
- } | null;
184
- invoiceNotification: {
185
- metadata: {
186
- [x: string]: import("hono/utils/types").JSONValue;
187
- } | null;
188
- id: string;
189
- createdAt: string;
190
- updatedAt: string;
191
- organizationId: string | null;
192
- status: "pending" | "failed" | "cancelled" | "sent";
193
- provider: string;
194
- scheduledFor: string | null;
195
- errorMessage: string | null;
196
- bookingId: string | null;
197
- personId: string | null;
198
- channel: "email" | "sms";
199
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
200
- targetId: string | null;
201
- templateId: string | null;
202
- invoiceId: string | null;
203
- failedAt: string | null;
204
- subject: string | null;
205
- sentAt: string | null;
206
- fromAddress: string | null;
207
- templateSlug: string | null;
208
- paymentSessionId: string | null;
209
- providerMessageId: string | null;
210
- toAddress: string;
211
- htmlBody: string | null;
212
- textBody: string | null;
213
- payloadData: {
214
- [x: string]: import("hono/utils/types").JSONValue;
215
- } | null;
216
- } | null;
217
- session: {
218
- metadata: {
219
- [x: string]: import("hono/utils/types").JSONValue;
220
- } | null;
221
- id: string;
222
- createdAt: string;
223
- updatedAt: string;
224
- expiresAt: string | null;
225
- status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
226
- currency: string;
227
- notes: string | null;
228
- idempotencyKey: string | null;
229
- provider: string | null;
230
- bookingId: string | null;
231
- expiredAt: string | null;
232
- cancelledAt: string | null;
233
- completedAt: string | null;
234
- paymentId: string | null;
235
- amountCents: number;
236
- targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
237
- targetId: string | null;
238
- orderId: string | null;
239
- invoiceId: string | null;
240
- bookingPaymentScheduleId: string | null;
241
- paymentInstrumentId: string | null;
242
- bookingGuaranteeId: string | null;
243
- paymentAuthorizationId: string | null;
244
- paymentCaptureId: string | null;
245
- paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
246
- providerSessionId: string | null;
247
- providerPaymentId: string | null;
248
- externalReference: string | null;
249
- clientReference: string | null;
250
- payerPersonId: string | null;
251
- payerOrganizationId: string | null;
252
- payerEmail: string | null;
253
- payerName: string | null;
254
- redirectUrl: string | null;
255
- returnUrl: string | null;
256
- cancelUrl: string | null;
257
- callbackUrl: string | null;
258
- failedAt: string | null;
259
- failureCode: string | null;
260
- failureMessage: string | null;
261
- providerPayload: {
262
- [x: string]: import("hono/utils/types").JSONValue;
263
- } | null;
264
- };
265
- providerResponse: {
266
- code?: string | undefined;
267
- message?: string | undefined;
268
- error?: {
269
- code?: string | number | undefined;
270
- message?: string | undefined;
271
- } | undefined;
272
- payment?: {
273
- paymentURL?: string | undefined;
274
- ntpID?: string | undefined;
275
- status?: number | undefined;
276
- amount?: number | undefined;
277
- currency?: string | undefined;
278
- } | undefined;
279
- };
280
- orderId: string;
281
- };
282
- };
283
- outputFormat: "json";
284
- status: 201;
285
- } | {
286
- input: {
287
- param: {
288
- bookingId: string;
289
- } & {
290
- scheduleId: string;
291
- };
292
- };
293
- output: {
294
- error: string;
295
- };
296
- outputFormat: "json";
297
- status: 404 | 409 | 500 | 502;
298
- };
299
- };
300
- } & {
301
- "/providers/netopia/bookings/:bookingId/guarantees/:guaranteeId/collect": {
302
- $post: {
303
- input: {
304
- param: {
305
- bookingId: string;
306
- } & {
307
- guaranteeId: string;
308
- };
309
- };
310
- output: {
311
- data: {
312
- paymentSessionNotification: {
313
- metadata: {
314
- [x: string]: import("hono/utils/types").JSONValue;
315
- } | null;
316
- id: string;
317
- createdAt: string;
318
- updatedAt: string;
319
- organizationId: string | null;
320
- status: "pending" | "failed" | "cancelled" | "sent";
321
- provider: string;
322
- scheduledFor: string | null;
323
- errorMessage: string | null;
324
- bookingId: string | null;
325
- personId: string | null;
326
- channel: "email" | "sms";
327
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
328
- targetId: string | null;
329
- templateId: string | null;
330
- invoiceId: string | null;
331
- failedAt: string | null;
332
- subject: string | null;
333
- sentAt: string | null;
334
- fromAddress: string | null;
335
- templateSlug: string | null;
336
- paymentSessionId: string | null;
337
- providerMessageId: string | null;
338
- toAddress: string;
339
- htmlBody: string | null;
340
- textBody: string | null;
341
- payloadData: {
342
- [x: string]: import("hono/utils/types").JSONValue;
343
- } | null;
344
- } | null;
345
- invoiceNotification: {
346
- metadata: {
347
- [x: string]: import("hono/utils/types").JSONValue;
348
- } | null;
349
- id: string;
350
- createdAt: string;
351
- updatedAt: string;
352
- organizationId: string | null;
353
- status: "pending" | "failed" | "cancelled" | "sent";
354
- provider: string;
355
- scheduledFor: string | null;
356
- errorMessage: string | null;
357
- bookingId: string | null;
358
- personId: string | null;
359
- channel: "email" | "sms";
360
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
361
- targetId: string | null;
362
- templateId: string | null;
363
- invoiceId: string | null;
364
- failedAt: string | null;
365
- subject: string | null;
366
- sentAt: string | null;
367
- fromAddress: string | null;
368
- templateSlug: string | null;
369
- paymentSessionId: string | null;
370
- providerMessageId: string | null;
371
- toAddress: string;
372
- htmlBody: string | null;
373
- textBody: string | null;
374
- payloadData: {
375
- [x: string]: import("hono/utils/types").JSONValue;
376
- } | null;
377
- } | null;
378
- session: {
379
- metadata: {
380
- [x: string]: import("hono/utils/types").JSONValue;
381
- } | null;
382
- id: string;
383
- createdAt: string;
384
- updatedAt: string;
385
- expiresAt: string | null;
386
- status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
387
- currency: string;
388
- notes: string | null;
389
- idempotencyKey: string | null;
390
- provider: string | null;
391
- bookingId: string | null;
392
- expiredAt: string | null;
393
- cancelledAt: string | null;
394
- completedAt: string | null;
395
- paymentId: string | null;
396
- amountCents: number;
397
- targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
398
- targetId: string | null;
399
- orderId: string | null;
400
- invoiceId: string | null;
401
- bookingPaymentScheduleId: string | null;
402
- paymentInstrumentId: string | null;
403
- bookingGuaranteeId: string | null;
404
- paymentAuthorizationId: string | null;
405
- paymentCaptureId: string | null;
406
- paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
407
- providerSessionId: string | null;
408
- providerPaymentId: string | null;
409
- externalReference: string | null;
410
- clientReference: string | null;
411
- payerPersonId: string | null;
412
- payerOrganizationId: string | null;
413
- payerEmail: string | null;
414
- payerName: string | null;
415
- redirectUrl: string | null;
416
- returnUrl: string | null;
417
- cancelUrl: string | null;
418
- callbackUrl: string | null;
419
- failedAt: string | null;
420
- failureCode: string | null;
421
- failureMessage: string | null;
422
- providerPayload: {
423
- [x: string]: import("hono/utils/types").JSONValue;
424
- } | null;
425
- };
426
- providerResponse: {
427
- code?: string | undefined;
428
- message?: string | undefined;
429
- error?: {
430
- code?: string | number | undefined;
431
- message?: string | undefined;
432
- } | undefined;
433
- payment?: {
434
- paymentURL?: string | undefined;
435
- ntpID?: string | undefined;
436
- status?: number | undefined;
437
- amount?: number | undefined;
438
- currency?: string | undefined;
439
- } | undefined;
440
- };
441
- orderId: string;
442
- };
443
- };
444
- outputFormat: "json";
445
- status: 201;
446
- } | {
447
- input: {
448
- param: {
449
- bookingId: string;
450
- } & {
451
- guaranteeId: string;
452
- };
453
- };
454
- output: {
455
- error: string;
456
- };
457
- outputFormat: "json";
458
- status: 404 | 409 | 500 | 502;
459
- };
460
- };
461
- } & {
462
- "/providers/netopia/invoices/:invoiceId/collect": {
463
- $post: {
464
- input: {
465
- param: {
466
- invoiceId: string;
467
- };
468
- };
469
- output: {
470
- data: {
471
- paymentSessionNotification: {
472
- metadata: {
473
- [x: string]: import("hono/utils/types").JSONValue;
474
- } | null;
475
- id: string;
476
- createdAt: string;
477
- updatedAt: string;
478
- organizationId: string | null;
479
- status: "pending" | "failed" | "cancelled" | "sent";
480
- provider: string;
481
- scheduledFor: string | null;
482
- errorMessage: string | null;
483
- bookingId: string | null;
484
- personId: string | null;
485
- channel: "email" | "sms";
486
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
487
- targetId: string | null;
488
- templateId: string | null;
489
- invoiceId: string | null;
490
- failedAt: string | null;
491
- subject: string | null;
492
- sentAt: string | null;
493
- fromAddress: string | null;
494
- templateSlug: string | null;
495
- paymentSessionId: string | null;
496
- providerMessageId: string | null;
497
- toAddress: string;
498
- htmlBody: string | null;
499
- textBody: string | null;
500
- payloadData: {
501
- [x: string]: import("hono/utils/types").JSONValue;
502
- } | null;
503
- } | null;
504
- invoiceNotification: {
505
- metadata: {
506
- [x: string]: import("hono/utils/types").JSONValue;
507
- } | null;
508
- id: string;
509
- createdAt: string;
510
- updatedAt: string;
511
- organizationId: string | null;
512
- status: "pending" | "failed" | "cancelled" | "sent";
513
- provider: string;
514
- scheduledFor: string | null;
515
- errorMessage: string | null;
516
- bookingId: string | null;
517
- personId: string | null;
518
- channel: "email" | "sms";
519
- targetType: "organization" | "other" | "booking" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "person" | "payment_session";
520
- targetId: string | null;
521
- templateId: string | null;
522
- invoiceId: string | null;
523
- failedAt: string | null;
524
- subject: string | null;
525
- sentAt: string | null;
526
- fromAddress: string | null;
527
- templateSlug: string | null;
528
- paymentSessionId: string | null;
529
- providerMessageId: string | null;
530
- toAddress: string;
531
- htmlBody: string | null;
532
- textBody: string | null;
533
- payloadData: {
534
- [x: string]: import("hono/utils/types").JSONValue;
535
- } | null;
536
- } | null;
537
- session: {
538
- metadata: {
539
- [x: string]: import("hono/utils/types").JSONValue;
540
- } | null;
541
- id: string;
542
- createdAt: string;
543
- updatedAt: string;
544
- expiresAt: string | null;
545
- status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
546
- currency: string;
547
- notes: string | null;
548
- idempotencyKey: string | null;
549
- provider: string | null;
550
- bookingId: string | null;
551
- expiredAt: string | null;
552
- cancelledAt: string | null;
553
- completedAt: string | null;
554
- paymentId: string | null;
555
- amountCents: number;
556
- targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
557
- targetId: string | null;
558
- orderId: string | null;
559
- invoiceId: string | null;
560
- bookingPaymentScheduleId: string | null;
561
- paymentInstrumentId: string | null;
562
- bookingGuaranteeId: string | null;
563
- paymentAuthorizationId: string | null;
564
- paymentCaptureId: string | null;
565
- paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
566
- providerSessionId: string | null;
567
- providerPaymentId: string | null;
568
- externalReference: string | null;
569
- clientReference: string | null;
570
- payerPersonId: string | null;
571
- payerOrganizationId: string | null;
572
- payerEmail: string | null;
573
- payerName: string | null;
574
- redirectUrl: string | null;
575
- returnUrl: string | null;
576
- cancelUrl: string | null;
577
- callbackUrl: string | null;
578
- failedAt: string | null;
579
- failureCode: string | null;
580
- failureMessage: string | null;
581
- providerPayload: {
582
- [x: string]: import("hono/utils/types").JSONValue;
583
- } | null;
584
- };
585
- providerResponse: {
586
- code?: string | undefined;
587
- message?: string | undefined;
588
- error?: {
589
- code?: string | number | undefined;
590
- message?: string | undefined;
591
- } | undefined;
592
- payment?: {
593
- paymentURL?: string | undefined;
594
- ntpID?: string | undefined;
595
- status?: number | undefined;
596
- amount?: number | undefined;
597
- currency?: string | undefined;
598
- } | undefined;
599
- };
600
- orderId: string;
601
- };
602
- };
603
- outputFormat: "json";
604
- status: 201;
605
- } | {
606
- input: {
607
- param: {
608
- invoiceId: string;
609
- };
610
- };
611
- output: {
612
- error: string;
613
- };
614
- outputFormat: "json";
615
- status: 404 | 409 | 500 | 502;
616
- };
617
- };
618
- } & {
619
- "/providers/netopia/callback": {
620
- $post: {
621
- input: {};
622
- output: {
623
- data: {
624
- action: "processing" | "completed" | "failed" | "ignored";
625
- reason?: string | undefined;
626
- session: {
627
- metadata: {
628
- [x: string]: import("hono/utils/types").JSONValue;
629
- } | null;
630
- id: string;
631
- createdAt: string;
632
- updatedAt: string;
633
- expiresAt: string | null;
634
- status: "pending" | "failed" | "expired" | "cancelled" | "paid" | "requires_redirect" | "processing" | "authorized";
635
- currency: string;
636
- notes: string | null;
637
- idempotencyKey: string | null;
638
- provider: string | null;
639
- bookingId: string | null;
640
- expiredAt: string | null;
641
- cancelledAt: string | null;
642
- completedAt: string | null;
643
- paymentId: string | null;
644
- amountCents: number;
645
- targetType: "other" | "booking" | "order" | "invoice" | "booking_payment_schedule" | "booking_guarantee" | "flight_order";
646
- targetId: string | null;
647
- orderId: string | null;
648
- invoiceId: string | null;
649
- bookingPaymentScheduleId: string | null;
650
- paymentInstrumentId: string | null;
651
- bookingGuaranteeId: string | null;
652
- paymentAuthorizationId: string | null;
653
- paymentCaptureId: string | null;
654
- paymentMethod: "other" | "voucher" | "wallet" | "bank_transfer" | "credit_card" | "debit_card" | "cash" | "cheque" | "direct_bill" | null;
655
- providerSessionId: string | null;
656
- providerPaymentId: string | null;
657
- externalReference: string | null;
658
- clientReference: string | null;
659
- payerPersonId: string | null;
660
- payerOrganizationId: string | null;
661
- payerEmail: string | null;
662
- payerName: string | null;
663
- redirectUrl: string | null;
664
- returnUrl: string | null;
665
- cancelUrl: string | null;
666
- callbackUrl: string | null;
667
- failedAt: string | null;
668
- failureCode: string | null;
669
- failureMessage: string | null;
670
- providerPayload: {
671
- [x: string]: import("hono/utils/types").JSONValue;
672
- } | null;
673
- } | null;
674
- orderId: string;
675
- };
676
- };
677
- outputFormat: "json";
678
- status: import("hono/utils/http-status").ContentfulStatusCode;
679
- };
680
- };
681
- } & {
682
- "/providers/netopia/config": {
683
- $get: {
684
- input: {};
685
- output: {
686
- data: {
687
- apiUrl: string;
688
- notifyUrl: string;
689
- redirectUrl: string;
690
- emailTemplate: string;
691
- language: string;
692
- successStatuses: number[];
693
- processingStatuses: number[];
694
- };
695
- };
696
- outputFormat: "json";
697
- status: import("hono/utils/http-status").ContentfulStatusCode;
698
- } | {
699
- input: {};
700
- output: {
701
- error: string;
702
- };
703
- outputFormat: "json";
704
- status: 500;
705
- };
706
- };
707
- }, "/", "/providers/netopia/config">;
708
- export declare function createNetopiaFinanceExtension(options?: NetopiaRuntimeOptions): HonoExtension;
709
- export declare function netopiaHonoBundle(options?: NetopiaRuntimeOptions): HonoBundle;
710
- /** @deprecated Prefer {@link netopiaHonoBundle}. */
711
- export declare const netopiaHonoPlugin: typeof netopiaHonoBundle;
712
- export declare const netopiaFinanceExtension: HonoExtension;
713
- export {};
714
- //# sourceMappingURL=plugin.d.ts.map