@adonis-agora/payments 0.2.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 (222) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/commands/main.d.ts +16 -0
  3. package/dist/commands/main.d.ts.map +1 -0
  4. package/dist/commands/main.js +17 -0
  5. package/dist/commands/main.js.map +1 -0
  6. package/dist/commands/make_billable.d.ts +16 -0
  7. package/dist/commands/make_billable.d.ts.map +1 -0
  8. package/dist/commands/make_billable.js +30 -0
  9. package/dist/commands/make_billable.js.map +1 -0
  10. package/dist/commands/make_webhook_handler.d.ts +20 -0
  11. package/dist/commands/make_webhook_handler.d.ts.map +1 -0
  12. package/dist/commands/make_webhook_handler.js +34 -0
  13. package/dist/commands/make_webhook_handler.js.map +1 -0
  14. package/dist/commands/payments_sync.d.ts +20 -0
  15. package/dist/commands/payments_sync.d.ts.map +1 -0
  16. package/dist/commands/payments_sync.js +95 -0
  17. package/dist/commands/payments_sync.js.map +1 -0
  18. package/dist/commands/payments_webhook.d.ts +19 -0
  19. package/dist/commands/payments_webhook.d.ts.map +1 -0
  20. package/dist/commands/payments_webhook.js +123 -0
  21. package/dist/commands/payments_webhook.js.map +1 -0
  22. package/dist/configure.d.ts +12 -0
  23. package/dist/configure.d.ts.map +1 -0
  24. package/dist/configure.js +34 -0
  25. package/dist/configure.js.map +1 -0
  26. package/dist/providers/payments_provider.d.ts +15 -0
  27. package/dist/providers/payments_provider.d.ts.map +1 -0
  28. package/dist/providers/payments_provider.js +155 -0
  29. package/dist/providers/payments_provider.js.map +1 -0
  30. package/dist/src/billing/billing_overview.d.ts +26 -0
  31. package/dist/src/billing/billing_overview.d.ts.map +1 -0
  32. package/dist/src/billing/billing_overview.js +27 -0
  33. package/dist/src/billing/billing_overview.js.map +1 -0
  34. package/dist/src/billing/billing_store.d.ts +73 -0
  35. package/dist/src/billing/billing_store.d.ts.map +1 -0
  36. package/dist/src/billing/billing_store.js +2 -0
  37. package/dist/src/billing/billing_store.js.map +1 -0
  38. package/dist/src/billing/index.d.ts +8 -0
  39. package/dist/src/billing/index.d.ts.map +1 -0
  40. package/dist/src/billing/index.js +6 -0
  41. package/dist/src/billing/index.js.map +1 -0
  42. package/dist/src/billing/lucid_billing_store.d.ts +84 -0
  43. package/dist/src/billing/lucid_billing_store.d.ts.map +1 -0
  44. package/dist/src/billing/lucid_billing_store.js +143 -0
  45. package/dist/src/billing/lucid_billing_store.js.map +1 -0
  46. package/dist/src/billing/metered_bill.d.ts +60 -0
  47. package/dist/src/billing/metered_bill.d.ts.map +1 -0
  48. package/dist/src/billing/metered_bill.js +46 -0
  49. package/dist/src/billing/metered_bill.js.map +1 -0
  50. package/dist/src/billing/mixins/index.d.ts +6 -0
  51. package/dist/src/billing/mixins/index.d.ts.map +1 -0
  52. package/dist/src/billing/mixins/index.js +6 -0
  53. package/dist/src/billing/mixins/index.js.map +1 -0
  54. package/dist/src/billing/mixins/with_billable.d.ts +23 -0
  55. package/dist/src/billing/mixins/with_billable.d.ts.map +1 -0
  56. package/dist/src/billing/mixins/with_billable.js +33 -0
  57. package/dist/src/billing/mixins/with_billable.js.map +1 -0
  58. package/dist/src/billing/mixins/with_payment.d.ts +45 -0
  59. package/dist/src/billing/mixins/with_payment.d.ts.map +1 -0
  60. package/dist/src/billing/mixins/with_payment.js +94 -0
  61. package/dist/src/billing/mixins/with_payment.js.map +1 -0
  62. package/dist/src/billing/mixins/with_subscription.d.ts +50 -0
  63. package/dist/src/billing/mixins/with_subscription.d.ts.map +1 -0
  64. package/dist/src/billing/mixins/with_subscription.js +95 -0
  65. package/dist/src/billing/mixins/with_subscription.js.map +1 -0
  66. package/dist/src/billing/mixins/with_usage_event.d.ts +22 -0
  67. package/dist/src/billing/mixins/with_usage_event.d.ts.map +1 -0
  68. package/dist/src/billing/mixins/with_usage_event.js +39 -0
  69. package/dist/src/billing/mixins/with_usage_event.js.map +1 -0
  70. package/dist/src/billing/mixins/with_webhook_event.d.ts +21 -0
  71. package/dist/src/billing/mixins/with_webhook_event.d.ts.map +1 -0
  72. package/dist/src/billing/mixins/with_webhook_event.js +42 -0
  73. package/dist/src/billing/mixins/with_webhook_event.js.map +1 -0
  74. package/dist/src/billing/webhook_dispatcher.d.ts +79 -0
  75. package/dist/src/billing/webhook_dispatcher.d.ts.map +1 -0
  76. package/dist/src/billing/webhook_dispatcher.js +125 -0
  77. package/dist/src/billing/webhook_dispatcher.js.map +1 -0
  78. package/dist/src/billing/webhook_events.d.ts +49 -0
  79. package/dist/src/billing/webhook_events.d.ts.map +1 -0
  80. package/dist/src/billing/webhook_events.js +44 -0
  81. package/dist/src/billing/webhook_events.js.map +1 -0
  82. package/dist/src/billing/webhook_processor.d.ts +39 -0
  83. package/dist/src/billing/webhook_processor.d.ts.map +1 -0
  84. package/dist/src/billing/webhook_processor.js +209 -0
  85. package/dist/src/billing/webhook_processor.js.map +1 -0
  86. package/dist/src/define_config.d.ts +251 -0
  87. package/dist/src/define_config.d.ts.map +1 -0
  88. package/dist/src/define_config.js +67 -0
  89. package/dist/src/define_config.js.map +1 -0
  90. package/dist/src/diagnostics.d.ts +155 -0
  91. package/dist/src/diagnostics.d.ts.map +1 -0
  92. package/dist/src/diagnostics.js +153 -0
  93. package/dist/src/diagnostics.js.map +1 -0
  94. package/dist/src/driver.d.ts +222 -0
  95. package/dist/src/driver.d.ts.map +1 -0
  96. package/dist/src/driver.js +2 -0
  97. package/dist/src/driver.js.map +1 -0
  98. package/dist/src/drivers/abacate.d.ts +35 -0
  99. package/dist/src/drivers/abacate.d.ts.map +1 -0
  100. package/dist/src/drivers/abacate.js +381 -0
  101. package/dist/src/drivers/abacate.js.map +1 -0
  102. package/dist/src/drivers/asaas.d.ts +36 -0
  103. package/dist/src/drivers/asaas.d.ts.map +1 -0
  104. package/dist/src/drivers/asaas.js +455 -0
  105. package/dist/src/drivers/asaas.js.map +1 -0
  106. package/dist/src/drivers/stripe.d.ts +36 -0
  107. package/dist/src/drivers/stripe.d.ts.map +1 -0
  108. package/dist/src/drivers/stripe.js +392 -0
  109. package/dist/src/drivers/stripe.js.map +1 -0
  110. package/dist/src/drivers/woovi.d.ts +49 -0
  111. package/dist/src/drivers/woovi.d.ts.map +1 -0
  112. package/dist/src/drivers/woovi.js +339 -0
  113. package/dist/src/drivers/woovi.js.map +1 -0
  114. package/dist/src/ensure_customer.d.ts +23 -0
  115. package/dist/src/ensure_customer.d.ts.map +1 -0
  116. package/dist/src/ensure_customer.js +25 -0
  117. package/dist/src/ensure_customer.js.map +1 -0
  118. package/dist/src/hooks/webhook_handlers.d.ts +50 -0
  119. package/dist/src/hooks/webhook_handlers.d.ts.map +1 -0
  120. package/dist/src/hooks/webhook_handlers.js +53 -0
  121. package/dist/src/hooks/webhook_handlers.js.map +1 -0
  122. package/dist/src/http.d.ts +24 -0
  123. package/dist/src/http.d.ts.map +1 -0
  124. package/dist/src/http.js +52 -0
  125. package/dist/src/http.js.map +1 -0
  126. package/dist/src/index.d.ts +29 -0
  127. package/dist/src/index.d.ts.map +1 -0
  128. package/dist/src/index.js +15 -0
  129. package/dist/src/index.js.map +1 -0
  130. package/dist/src/invoice/drivers/asaas.d.ts +23 -0
  131. package/dist/src/invoice/drivers/asaas.d.ts.map +1 -0
  132. package/dist/src/invoice/drivers/asaas.js +85 -0
  133. package/dist/src/invoice/drivers/asaas.js.map +1 -0
  134. package/dist/src/invoice/drivers/enotas.d.ts +23 -0
  135. package/dist/src/invoice/drivers/enotas.d.ts.map +1 -0
  136. package/dist/src/invoice/drivers/enotas.js +83 -0
  137. package/dist/src/invoice/drivers/enotas.js.map +1 -0
  138. package/dist/src/invoice/drivers/focus.d.ts +23 -0
  139. package/dist/src/invoice/drivers/focus.d.ts.map +1 -0
  140. package/dist/src/invoice/drivers/focus.js +90 -0
  141. package/dist/src/invoice/drivers/focus.js.map +1 -0
  142. package/dist/src/invoice/drivers/plugnotas.d.ts +22 -0
  143. package/dist/src/invoice/drivers/plugnotas.d.ts.map +1 -0
  144. package/dist/src/invoice/drivers/plugnotas.js +81 -0
  145. package/dist/src/invoice/drivers/plugnotas.js.map +1 -0
  146. package/dist/src/invoice/drivers/tecnospeed.d.ts +29 -0
  147. package/dist/src/invoice/drivers/tecnospeed.d.ts.map +1 -0
  148. package/dist/src/invoice/drivers/tecnospeed.js +87 -0
  149. package/dist/src/invoice/drivers/tecnospeed.js.map +1 -0
  150. package/dist/src/invoice/emit_invoice.d.ts +45 -0
  151. package/dist/src/invoice/emit_invoice.d.ts.map +1 -0
  152. package/dist/src/invoice/emit_invoice.js +72 -0
  153. package/dist/src/invoice/emit_invoice.js.map +1 -0
  154. package/dist/src/invoice/invoice_manager.d.ts +12 -0
  155. package/dist/src/invoice/invoice_manager.d.ts.map +1 -0
  156. package/dist/src/invoice/invoice_manager.js +35 -0
  157. package/dist/src/invoice/invoice_manager.js.map +1 -0
  158. package/dist/src/invoice/invoice_provider.d.ts +48 -0
  159. package/dist/src/invoice/invoice_provider.d.ts.map +1 -0
  160. package/dist/src/invoice/invoice_provider.js +2 -0
  161. package/dist/src/invoice/invoice_provider.js.map +1 -0
  162. package/dist/src/money.d.ts +11 -0
  163. package/dist/src/money.d.ts.map +1 -0
  164. package/dist/src/money.js +14 -0
  165. package/dist/src/money.js.map +1 -0
  166. package/dist/src/payments_manager.d.ts +40 -0
  167. package/dist/src/payments_manager.d.ts.map +1 -0
  168. package/dist/src/payments_manager.js +94 -0
  169. package/dist/src/payments_manager.js.map +1 -0
  170. package/dist/src/services/main.d.ts +6 -0
  171. package/dist/src/services/main.d.ts.map +1 -0
  172. package/dist/src/services/main.js +17 -0
  173. package/dist/src/services/main.js.map +1 -0
  174. package/dist/src/telescope/index.d.ts +3 -0
  175. package/dist/src/telescope/index.d.ts.map +1 -0
  176. package/dist/src/telescope/index.js +2 -0
  177. package/dist/src/telescope/index.js.map +1 -0
  178. package/dist/src/telescope/payments_watcher.d.ts +27 -0
  179. package/dist/src/telescope/payments_watcher.d.ts.map +1 -0
  180. package/dist/src/telescope/payments_watcher.js +58 -0
  181. package/dist/src/telescope/payments_watcher.js.map +1 -0
  182. package/dist/src/telescope/telescope-sdk.d.ts +21 -0
  183. package/dist/src/telescope/telescope-sdk.d.ts.map +1 -0
  184. package/dist/src/telescope/telescope-sdk.js +11 -0
  185. package/dist/src/telescope/telescope-sdk.js.map +1 -0
  186. package/dist/src/testing/fake_payments_driver.d.ts +64 -0
  187. package/dist/src/testing/fake_payments_driver.d.ts.map +1 -0
  188. package/dist/src/testing/fake_payments_driver.js +171 -0
  189. package/dist/src/testing/fake_payments_driver.js.map +1 -0
  190. package/dist/src/testing/in_memory_billing_store.d.ts +110 -0
  191. package/dist/src/testing/in_memory_billing_store.d.ts.map +1 -0
  192. package/dist/src/testing/in_memory_billing_store.js +136 -0
  193. package/dist/src/testing/in_memory_billing_store.js.map +1 -0
  194. package/dist/src/testing/index.d.ts +6 -0
  195. package/dist/src/testing/index.d.ts.map +1 -0
  196. package/dist/src/testing/index.js +4 -0
  197. package/dist/src/testing/index.js.map +1 -0
  198. package/dist/src/testing/mutable_clock.d.ts +12 -0
  199. package/dist/src/testing/mutable_clock.d.ts.map +1 -0
  200. package/dist/src/testing/mutable_clock.js +20 -0
  201. package/dist/src/testing/mutable_clock.js.map +1 -0
  202. package/dist/src/types.d.ts +178 -0
  203. package/dist/src/types.d.ts.map +1 -0
  204. package/dist/src/types.js +9 -0
  205. package/dist/src/types.js.map +1 -0
  206. package/dist/src/webhook_handlers.d.ts +76 -0
  207. package/dist/src/webhook_handlers.d.ts.map +1 -0
  208. package/dist/src/webhook_handlers.js +128 -0
  209. package/dist/src/webhook_handlers.js.map +1 -0
  210. package/dist/src/webhook_security.d.ts +29 -0
  211. package/dist/src/webhook_security.d.ts.map +1 -0
  212. package/dist/src/webhook_security.js +53 -0
  213. package/dist/src/webhook_security.js.map +1 -0
  214. package/dist/stubs/config/payments.stub +101 -0
  215. package/dist/stubs/database/migrations/create_billing_tables.stub +90 -0
  216. package/dist/stubs/main.d.ts +9 -0
  217. package/dist/stubs/main.d.ts.map +1 -0
  218. package/dist/stubs/main.js +16 -0
  219. package/dist/stubs/main.js.map +1 -0
  220. package/dist/stubs/make/billable/main.stub +28 -0
  221. package/dist/stubs/make/webhook_handler/main.stub +29 -0
  222. package/package.json +150 -0
@@ -0,0 +1,90 @@
1
+ {{{
2
+ exports({ to: app.migrationsPath(`${new Date().getTime()}_create_billing_tables.ts`) })
3
+ }}}
4
+ import { BaseSchema } from '@adonisjs/lucid/schema'
5
+
6
+ export default class extends BaseSchema {
7
+ protected tableName = 'billing_customers'
8
+
9
+ async up() {
10
+ this.schema.createTable('billing_customers', (table) => {
11
+ table.uuid('id').primary()
12
+ table.string('owner_type')
13
+ table.string('owner_id')
14
+ table.string('gateway_id').unique()
15
+ table.string('provider')
16
+ table.string('email').nullable()
17
+ table.string('name').nullable()
18
+ table.string('tax_id').nullable()
19
+ table.jsonb('metadata').nullable()
20
+ table.timestamp('created_at', { useTz: true }).notNullable()
21
+ table.timestamp('updated_at', { useTz: true }).notNullable()
22
+ table.index(['owner_type', 'owner_id'], 'billing_customers_owner_idx')
23
+ })
24
+
25
+ this.schema.createTable('billing_subscriptions', (table) => {
26
+ table.uuid('id').primary()
27
+ table.string('gateway_id').unique()
28
+ table.string('provider')
29
+ table.string('status')
30
+ table.string('plan_id')
31
+ table.string('customer_id').nullable()
32
+ table.timestamp('trial_ends_at', { useTz: true }).nullable()
33
+ table.timestamp('ends_at', { useTz: true }).nullable()
34
+ table.jsonb('payload').nullable()
35
+ table.timestamp('created_at', { useTz: true }).notNullable()
36
+ table.timestamp('updated_at', { useTz: true }).notNullable()
37
+ table.index(['customer_id'], 'billing_subscriptions_customer_idx')
38
+ })
39
+
40
+ this.schema.createTable('billing_payments', (table) => {
41
+ table.uuid('id').primary()
42
+ table.string('gateway_id').unique()
43
+ table.string('provider')
44
+ table.string('status')
45
+ table.bigInteger('amount')
46
+ table.string('currency', 3)
47
+ table.string('customer_id').nullable()
48
+ table.string('subscription_id').nullable()
49
+ table.jsonb('payload').nullable()
50
+ table.timestamp('paid_at', { useTz: true }).nullable()
51
+ table.timestamp('created_at', { useTz: true }).notNullable()
52
+ table.timestamp('updated_at', { useTz: true }).notNullable()
53
+ table.index(['customer_id'], 'billing_payments_customer_idx')
54
+ table.index(['subscription_id'], 'billing_payments_subscription_idx')
55
+ })
56
+
57
+ this.schema.createTable('billing_webhook_events', (table) => {
58
+ table.uuid('id').primary()
59
+ table.string('gateway_event_id').unique()
60
+ table.string('provider')
61
+ table.string('type')
62
+ table.string('status')
63
+ table.jsonb('payload').nullable()
64
+ table.text('error').nullable()
65
+ table.timestamp('created_at', { useTz: true }).notNullable()
66
+ table.timestamp('updated_at', { useTz: true }).notNullable()
67
+ })
68
+
69
+ this.schema.createTable('billing_usage_events', (table) => {
70
+ table.uuid('id').primary()
71
+ table.string('subscription_id').nullable()
72
+ table.string('customer_id').nullable()
73
+ table.string('meter')
74
+ table.integer('quantity').defaultTo(1)
75
+ table.jsonb('metadata').nullable()
76
+ table.timestamp('recorded_at', { useTz: true }).notNullable()
77
+ table.timestamp('updated_at', { useTz: true }).notNullable()
78
+ table.index(['subscription_id', 'meter'], 'billing_usage_subscription_meter_idx')
79
+ table.index(['customer_id', 'meter'], 'billing_usage_customer_meter_idx')
80
+ })
81
+ }
82
+
83
+ async down() {
84
+ this.schema.dropTable('billing_customers')
85
+ this.schema.dropTable('billing_subscriptions')
86
+ this.schema.dropTable('billing_payments')
87
+ this.schema.dropTable('billing_webhook_events')
88
+ this.schema.dropTable('billing_usage_events')
89
+ }
90
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Absolute path to the published stubs directory (`dist/stubs/`).
3
+ *
4
+ * Computed lazily on first call — NOT at module import — and memoized, so importing this
5
+ * package never evaluates `fileURLToPath(new URL('./', import.meta.url))` at load time
6
+ * (see the same hazard fix in `@adonis-agora/media`).
7
+ */
8
+ export declare function stubsRoot(): string;
9
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../stubs/main.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAKlC"}
@@ -0,0 +1,16 @@
1
+ import { fileURLToPath } from 'node:url';
2
+ let cached;
3
+ /**
4
+ * Absolute path to the published stubs directory (`dist/stubs/`).
5
+ *
6
+ * Computed lazily on first call — NOT at module import — and memoized, so importing this
7
+ * package never evaluates `fileURLToPath(new URL('./', import.meta.url))` at load time
8
+ * (see the same hazard fix in `@adonis-agora/media`).
9
+ */
10
+ export function stubsRoot() {
11
+ if (cached === undefined) {
12
+ cached = fileURLToPath(new URL('./', import.meta.url));
13
+ }
14
+ return cached;
15
+ }
16
+ //# sourceMappingURL=main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../../stubs/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,IAAI,MAA0B,CAAC;AAE/B;;;;;;GAMG;AACH,MAAM,UAAU,SAAS;IACvB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,GAAG,aAAa,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACzD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,28 @@
1
+ {{#var billableName = string(entity.name).pascalCase().toString()}}
2
+ {{#var billableFileName = string(entity.name).snakeCase().removeSuffix('model').toString() + '_model'}}
3
+ {{{
4
+ exports({
5
+ to: app.makePath('app/models', entity.path, billableFileName + '.ts')
6
+ })
7
+ }}}
8
+ import { BaseModel, compose } from '@adonisjs/lucid/orm'
9
+ import { column } from '@adonisjs/lucid/orm'
10
+ import { withBillable } from '@adonis-agora/payments'
11
+
12
+ /**
13
+ * {{ billableName }} — the billable model. Compose `withBillable()` to add the billing
14
+ * customer columns (billingCustomerId, billingProvider) and use the payments service
15
+ * to charge, subscribe and manage payment methods.
16
+ *
17
+ * ```ts
18
+ * const payments = await app.container.make(PaymentsManager)
19
+ * const driver = payments.driver('pix')
20
+ * const customer = await driver.createCustomer({ name: user.name, email: user.email })
21
+ * user.billingCustomerId = customer.id
22
+ * await user.save()
23
+ * ```
24
+ */
25
+ export default class {{ billableName }} extends compose(BaseModel, withBillable()) {
26
+ @column({ isPrimary: true })
27
+ declare id: string
28
+ }
@@ -0,0 +1,29 @@
1
+ {{#var handlerName = string(entity.name).pascalCase().toString()}}
2
+ {{#var fileName = string(entity.name).snakeCase().toString()}}
3
+ {{{
4
+ exports({
5
+ to: app.makePath('app/payment_handlers', entity.path, fileName + '.ts')
6
+ })
7
+ }}}
8
+ import { inject } from '@adonisjs/core'
9
+ import type { WebhookEvent } from '@adonis-agora/payments'
10
+
11
+ /**
12
+ * Webhook handler para `{{ entity.name }}` — rodado pela rota da própria lib
13
+ * (`/payments/webhook/:provider`) dentro do WebhookProcessor. Um throw marca o evento
14
+ * como failed no ledger e o dispatcher re-tenta (durable/in-process).
15
+ *
16
+ * Faça a lógica pesada rodar numa fila/workflow durable e dispatch aqui:
17
+ *
18
+ * const engine = await app.container.make(WorkflowEngine)
19
+ * await engine.start(MyWorkflow, { ... }, randomUUID())
20
+ */
21
+ @inject()
22
+ export default class {{ handlerName }}Handler {
23
+ static readonly eventType = '{{ entity.name }}'
24
+
25
+ async handle(event: WebhookEvent): Promise<void> {
26
+ // Sua lógica de negócio (ou dispatch pra um workflow durable / job da fila)...
27
+ void event
28
+ }
29
+ }
package/package.json ADDED
@@ -0,0 +1,150 @@
1
+ {
2
+ "name": "@adonis-agora/payments",
3
+ "version": "0.2.0",
4
+ "description": "Billing library for AdonisJS — multi-gateway payments (Stripe, AbacatePay, Asaas, Woovi) with a Cashier-style subscription billing layer: Billable mixin, Lucid stores, idempotent webhook processing and an optional Durable-backed dispatcher. Part of the Agora ecosystem.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/DavideCarvalho/adonis-agora-payments.git",
9
+ "directory": "packages/adonis"
10
+ },
11
+ "author": "Davi Carvalho <davi@goflip.ai>",
12
+ "type": "module",
13
+ "main": "./dist/src/index.js",
14
+ "types": "./dist/src/index.d.ts",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/src/index.d.ts",
18
+ "import": "./dist/src/index.js",
19
+ "default": "./dist/src/index.js"
20
+ },
21
+ "./services/main": {
22
+ "types": "./dist/src/services/main.d.ts",
23
+ "import": "./dist/src/services/main.js",
24
+ "default": "./dist/src/services/main.js"
25
+ },
26
+ "./payments_provider": {
27
+ "types": "./dist/providers/payments_provider.d.ts",
28
+ "import": "./dist/providers/payments_provider.js",
29
+ "default": "./dist/providers/payments_provider.js"
30
+ },
31
+ "./configure": {
32
+ "types": "./dist/configure.d.ts",
33
+ "import": "./dist/configure.js",
34
+ "default": "./dist/configure.js"
35
+ },
36
+ "./commands": {
37
+ "types": "./dist/commands/main.d.ts",
38
+ "import": "./dist/commands/main.js",
39
+ "default": "./dist/commands/main.js"
40
+ },
41
+ "./commands/*": {
42
+ "types": "./dist/commands/*.d.ts",
43
+ "import": "./dist/commands/*.js",
44
+ "default": "./dist/commands/*.js"
45
+ },
46
+ "./hooks/webhook_handlers": {
47
+ "types": "./dist/src/hooks/webhook_handlers.d.ts",
48
+ "import": "./dist/src/hooks/webhook_handlers.js",
49
+ "default": "./dist/src/hooks/webhook_handlers.js"
50
+ },
51
+ "./testing": {
52
+ "types": "./dist/src/testing/index.d.ts",
53
+ "import": "./dist/src/testing/index.js",
54
+ "default": "./dist/src/testing/index.js"
55
+ },
56
+ "./telescope": {
57
+ "types": "./dist/src/telescope/index.d.ts",
58
+ "import": "./dist/src/telescope/index.js",
59
+ "default": "./dist/src/telescope/index.js"
60
+ },
61
+ "./drivers/asaas": {
62
+ "types": "./dist/src/drivers/asaas.d.ts",
63
+ "import": "./dist/src/drivers/asaas.js",
64
+ "default": "./dist/src/drivers/asaas.js"
65
+ },
66
+ "./drivers/stripe": {
67
+ "types": "./dist/src/drivers/stripe.d.ts",
68
+ "import": "./dist/src/drivers/stripe.js",
69
+ "default": "./dist/src/drivers/stripe.js"
70
+ },
71
+ "./drivers/abacate": {
72
+ "types": "./dist/src/drivers/abacate.d.ts",
73
+ "import": "./dist/src/drivers/abacate.js",
74
+ "default": "./dist/src/drivers/abacate.js"
75
+ },
76
+ "./drivers/woovi": {
77
+ "types": "./dist/src/drivers/woovi.d.ts",
78
+ "import": "./dist/src/drivers/woovi.js",
79
+ "default": "./dist/src/drivers/woovi.js"
80
+ },
81
+ "./types": {
82
+ "types": "./dist/src/types.d.ts",
83
+ "import": "./dist/src/types.js",
84
+ "default": "./dist/src/types.js"
85
+ }
86
+ },
87
+ "files": [
88
+ "dist/",
89
+ "README.md",
90
+ "CHANGELOG.md"
91
+ ],
92
+ "sideEffects": false,
93
+ "peerDependencies": {
94
+ "@adonis-agora/durable": ">=0.1.0 <1.0.0",
95
+ "@adonisjs/core": "^7.3.0",
96
+ "@adonisjs/lucid": "^22.4.0",
97
+ "@woovi/node-sdk": "^1.0.0",
98
+ "stripe": "^17.0.0 || ^18.0.0"
99
+ },
100
+ "peerDependenciesMeta": {
101
+ "@adonis-agora/durable": {
102
+ "optional": true
103
+ },
104
+ "@adonisjs/lucid": {
105
+ "optional": true
106
+ },
107
+ "@woovi/node-sdk": {
108
+ "optional": true
109
+ },
110
+ "stripe": {
111
+ "optional": true
112
+ }
113
+ },
114
+ "devDependencies": {
115
+ "@adonisjs/assembler": "^8.5.0",
116
+ "@adonisjs/core": "7.4.0",
117
+ "@adonisjs/lucid": "^22.4.0",
118
+ "@types/luxon": "^3.7.5",
119
+ "@types/node": "^20.0.0",
120
+ "@woovi/node-sdk": "^1.0.0",
121
+ "luxon": "^3.7.2",
122
+ "stripe": "^18.0.0",
123
+ "typescript": "^5.4.0",
124
+ "vitest": "3.2.7"
125
+ },
126
+ "engines": {
127
+ "node": ">=20.6.0"
128
+ },
129
+ "keywords": [
130
+ "adonisjs",
131
+ "adonis",
132
+ "payments",
133
+ "billing",
134
+ "subscriptions",
135
+ "stripe",
136
+ "abacatepay",
137
+ "asaas",
138
+ "woovi",
139
+ "openpix",
140
+ "pix",
141
+ "agora"
142
+ ],
143
+ "scripts": {
144
+ "build": "tsc -p tsconfig.json && pnpm run copy:stubs",
145
+ "copy:stubs": "mkdir -p dist/stubs/config dist/stubs/database/migrations dist/stubs/make/billable dist/stubs/make/webhook_handler && cp -r stubs/config/. dist/stubs/config/ && cp -r stubs/database/migrations/. dist/stubs/database/migrations/ && cp -r stubs/make/billable/. dist/stubs/make/billable/ && cp -r stubs/make/webhook_handler/. dist/stubs/make/webhook_handler/",
146
+ "test": "vitest run --passWithNoTests",
147
+ "test:watch": "vitest",
148
+ "typecheck": "tsc -p tsconfig.json --noEmit"
149
+ }
150
+ }