@getivy/node-sdk 1.0.0 → 1.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 (119) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/index.d.mts +6 -6
  3. package/index.d.ts +6 -6
  4. package/index.d.ts.map +1 -1
  5. package/index.js +6 -6
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -6
  8. package/index.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/data/accounts.d.ts +83 -0
  11. package/resources/data/accounts.d.ts.map +1 -0
  12. package/resources/data/accounts.js +15 -0
  13. package/resources/data/accounts.js.map +1 -0
  14. package/resources/data/accounts.mjs +11 -0
  15. package/resources/data/accounts.mjs.map +1 -0
  16. package/resources/data/balances.d.ts +48 -0
  17. package/resources/data/balances.d.ts.map +1 -0
  18. package/resources/data/balances.js +15 -0
  19. package/resources/data/balances.js.map +1 -0
  20. package/resources/data/balances.mjs +11 -0
  21. package/resources/data/balances.mjs.map +1 -0
  22. package/resources/data/consent.d.ts +80 -0
  23. package/resources/data/consent.d.ts.map +1 -0
  24. package/resources/data/consent.js +21 -0
  25. package/resources/data/consent.js.map +1 -0
  26. package/resources/data/consent.mjs +17 -0
  27. package/resources/data/consent.mjs.map +1 -0
  28. package/resources/data/data.d.ts +26 -0
  29. package/resources/data/data.d.ts.map +1 -0
  30. package/resources/data/data.js +55 -0
  31. package/resources/data/data.js.map +1 -0
  32. package/resources/data/data.mjs +28 -0
  33. package/resources/data/data.mjs.map +1 -0
  34. package/resources/data/index.d.ts +7 -0
  35. package/resources/data/index.d.ts.map +1 -0
  36. package/resources/data/index.js +17 -0
  37. package/resources/data/index.js.map +1 -0
  38. package/resources/data/index.mjs +8 -0
  39. package/resources/data/index.mjs.map +1 -0
  40. package/resources/data/session.d.ts +258 -0
  41. package/resources/data/session.d.ts.map +1 -0
  42. package/resources/data/session.js +21 -0
  43. package/resources/data/session.js.map +1 -0
  44. package/resources/data/session.mjs +17 -0
  45. package/resources/data/session.mjs.map +1 -0
  46. package/resources/data/transactions.d.ts +175 -0
  47. package/resources/data/transactions.d.ts.map +1 -0
  48. package/resources/data/transactions.js +16 -0
  49. package/resources/data/transactions.js.map +1 -0
  50. package/resources/data/transactions.mjs +12 -0
  51. package/resources/data/transactions.mjs.map +1 -0
  52. package/resources/data.d.ts +2 -0
  53. package/resources/data.d.ts.map +1 -0
  54. package/resources/data.js +19 -0
  55. package/resources/data.js.map +1 -0
  56. package/resources/data.mjs +3 -0
  57. package/resources/data.mjs.map +1 -0
  58. package/resources/index.d.ts +2 -2
  59. package/resources/index.d.ts.map +1 -1
  60. package/resources/index.js +5 -5
  61. package/resources/index.js.map +1 -1
  62. package/resources/index.mjs +2 -2
  63. package/resources/index.mjs.map +1 -1
  64. package/resources/webhook/index.d.ts +3 -0
  65. package/resources/webhook/index.d.ts.map +1 -0
  66. package/resources/webhook/index.js +9 -0
  67. package/resources/webhook/index.js.map +1 -0
  68. package/resources/webhook/index.mjs +4 -0
  69. package/resources/webhook/index.mjs.map +1 -0
  70. package/resources/webhook/subscription.d.ts +152 -0
  71. package/resources/webhook/subscription.d.ts.map +1 -0
  72. package/resources/webhook/subscription.js +42 -0
  73. package/resources/webhook/subscription.js.map +1 -0
  74. package/resources/webhook/subscription.mjs +38 -0
  75. package/resources/webhook/subscription.mjs.map +1 -0
  76. package/resources/webhook/webhook.d.ts +28 -0
  77. package/resources/webhook/webhook.d.ts.map +1 -0
  78. package/resources/webhook/webhook.js +45 -0
  79. package/resources/webhook/webhook.js.map +1 -0
  80. package/resources/webhook/webhook.mjs +18 -0
  81. package/resources/webhook/webhook.mjs.map +1 -0
  82. package/resources/webhook.d.ts +2 -0
  83. package/resources/webhook.d.ts.map +1 -0
  84. package/resources/webhook.js +19 -0
  85. package/resources/webhook.js.map +1 -0
  86. package/resources/webhook.mjs +3 -0
  87. package/resources/webhook.mjs.map +1 -0
  88. package/src/index.ts +14 -26
  89. package/src/resources/data/accounts.ts +113 -0
  90. package/src/resources/data/balances.ts +60 -0
  91. package/src/resources/data/consent.ts +110 -0
  92. package/src/resources/data/data.ts +75 -0
  93. package/src/resources/data/index.ts +20 -0
  94. package/src/resources/data/session.ts +1317 -0
  95. package/src/resources/data/transactions.ts +235 -0
  96. package/src/resources/data.ts +3 -0
  97. package/src/resources/index.ts +2 -10
  98. package/src/resources/webhook/index.ts +16 -0
  99. package/src/resources/webhook/subscription.ts +405 -0
  100. package/src/resources/webhook/webhook.ts +69 -0
  101. package/src/resources/webhook.ts +3 -0
  102. package/src/version.ts +1 -1
  103. package/version.d.ts +1 -1
  104. package/version.js +1 -1
  105. package/version.mjs +1 -1
  106. package/resources/charges.d.ts +0 -82
  107. package/resources/charges.d.ts.map +0 -1
  108. package/resources/charges.js +0 -15
  109. package/resources/charges.js.map +0 -1
  110. package/resources/charges.mjs +0 -11
  111. package/resources/charges.mjs.map +0 -1
  112. package/resources/mandates.d.ts +0 -129
  113. package/resources/mandates.d.ts.map +0 -1
  114. package/resources/mandates.js +0 -27
  115. package/resources/mandates.js.map +0 -1
  116. package/resources/mandates.mjs +0 -23
  117. package/resources/mandates.mjs.map +0 -1
  118. package/src/resources/charges.ts +0 -104
  119. package/src/resources/mandates.ts +0 -197
@@ -1,197 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
-
3
- import { APIResource } from '../resource';
4
- import * as Core from '../core';
5
-
6
- export class Mandates extends APIResource {
7
- /**
8
- * Retrieves a direct debit mandate with mandate id.
9
- */
10
- retrieve(body: MandateRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Mandate> {
11
- return this._client.post('/api/service/mandate/retrieve', { body, ...options });
12
- }
13
-
14
- /**
15
- * Returns a Direct Debit Mandate when a valid mandate referenceId is given.
16
- */
17
- lookup(body: MandateLookupParams, options?: Core.RequestOptions): Core.APIPromise<MandateLookupResponse> {
18
- return this._client.post('/api/service/mandate/lookup', { body, ...options });
19
- }
20
-
21
- /**
22
- * Revokes a Direct Debit Mandate with a valid mandate id.
23
- */
24
- revoke(body: MandateRevokeParams, options?: Core.RequestOptions): Core.APIPromise<MandateRevokeResponse> {
25
- return this._client.post('/api/service/mandate/revoke', { body, ...options });
26
- }
27
- }
28
-
29
- export interface Mandate {
30
- id: string;
31
-
32
- creditor: Mandate.Creditor;
33
-
34
- debtor: Mandate.Debtor;
35
-
36
- reference: string;
37
-
38
- referenceId: string;
39
-
40
- signature: Mandate.Signature;
41
-
42
- status: 'pending' | 'active' | 'inactive';
43
-
44
- revokedAt?: unknown;
45
-
46
- userNotificationEmail?: string;
47
- }
48
-
49
- export namespace Mandate {
50
- export interface Creditor {
51
- id: string;
52
-
53
- address: Creditor.Address;
54
-
55
- name: string;
56
- }
57
-
58
- export namespace Creditor {
59
- export interface Address {
60
- city: string;
61
-
62
- country: string;
63
-
64
- postalCode: string;
65
-
66
- street: string;
67
- }
68
- }
69
-
70
- export interface Debtor {
71
- account: Debtor.Account;
72
- }
73
-
74
- export namespace Debtor {
75
- export interface Account {
76
- accountHolderName: string;
77
-
78
- iban: string;
79
-
80
- bic?: string;
81
- }
82
- }
83
-
84
- export interface Signature {
85
- token: string;
86
-
87
- ip: string;
88
-
89
- signedAt: unknown;
90
- }
91
- }
92
-
93
- export interface MandateLookupResponse {
94
- id: string;
95
-
96
- creditor: MandateLookupResponse.Creditor;
97
-
98
- debtor: MandateLookupResponse.Debtor;
99
-
100
- reference: string;
101
-
102
- referenceId: string;
103
-
104
- signature: MandateLookupResponse.Signature;
105
-
106
- status: 'pending' | 'active' | 'inactive';
107
-
108
- revokedAt?: unknown;
109
-
110
- userNotificationEmail?: string;
111
- }
112
-
113
- export namespace MandateLookupResponse {
114
- export interface Creditor {
115
- id: string;
116
-
117
- address: Creditor.Address;
118
-
119
- name: string;
120
- }
121
-
122
- export namespace Creditor {
123
- export interface Address {
124
- city: string;
125
-
126
- country: string;
127
-
128
- postalCode: string;
129
-
130
- street: string;
131
- }
132
- }
133
-
134
- export interface Debtor {
135
- account: Debtor.Account;
136
- }
137
-
138
- export namespace Debtor {
139
- export interface Account {
140
- accountHolderName: string;
141
-
142
- iban: string;
143
-
144
- bic?: string;
145
- }
146
- }
147
-
148
- export interface Signature {
149
- token: string;
150
-
151
- ip: string;
152
-
153
- signedAt: unknown;
154
- }
155
- }
156
-
157
- export interface MandateRevokeResponse {
158
- /**
159
- * Indicates whether the mandate was successfully revoked
160
- */
161
- success: boolean;
162
- }
163
-
164
- export interface MandateRetrieveParams {
165
- /**
166
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
167
- * event.
168
- */
169
- id: string;
170
- }
171
-
172
- export interface MandateLookupParams {
173
- /**
174
- * A valid mandate reference id. This is set by the merchant during the checkout
175
- * session when the mandate setup is initiated.
176
- */
177
- referenceId: string;
178
- }
179
-
180
- export interface MandateRevokeParams {
181
- /**
182
- * A valid mandate id. This can be retrieved from the `mandate_setup_succeeded`
183
- * event.
184
- */
185
- id: string;
186
- }
187
-
188
- export declare namespace Mandates {
189
- export {
190
- type Mandate as Mandate,
191
- type MandateLookupResponse as MandateLookupResponse,
192
- type MandateRevokeResponse as MandateRevokeResponse,
193
- type MandateRetrieveParams as MandateRetrieveParams,
194
- type MandateLookupParams as MandateLookupParams,
195
- type MandateRevokeParams as MandateRevokeParams,
196
- };
197
- }