@fiddupay/fiddupay-node 2.5.0 → 2.5.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.
Files changed (160) hide show
  1. package/README.md +7 -5
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +4 -6
  4. package/dist/client.js.map +1 -1
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +8 -16
  8. package/dist/index.js.map +1 -1
  9. package/dist/resources/address_only.d.ts +42 -0
  10. package/dist/resources/address_only.d.ts.map +1 -0
  11. package/dist/resources/address_only.js +52 -0
  12. package/dist/resources/address_only.js.map +1 -0
  13. package/dist/resources/balances.d.ts +3 -3
  14. package/dist/resources/balances.d.ts.map +1 -1
  15. package/dist/resources/balances.js +14 -16
  16. package/dist/resources/balances.js.map +1 -1
  17. package/dist/resources/customers.d.ts +66 -10
  18. package/dist/resources/customers.d.ts.map +1 -1
  19. package/dist/resources/customers.js +63 -6
  20. package/dist/resources/customers.js.map +1 -1
  21. package/dist/resources/invoices.d.ts +16 -8
  22. package/dist/resources/invoices.d.ts.map +1 -1
  23. package/dist/resources/invoices.js +23 -4
  24. package/dist/resources/invoices.js.map +1 -1
  25. package/dist/resources/merchants.d.ts +48 -49
  26. package/dist/resources/merchants.d.ts.map +1 -1
  27. package/dist/resources/merchants.js +64 -31
  28. package/dist/resources/merchants.js.map +1 -1
  29. package/dist/resources/payments.d.ts +15 -6
  30. package/dist/resources/payments.d.ts.map +1 -1
  31. package/dist/resources/payments.js +33 -19
  32. package/dist/resources/payments.js.map +1 -1
  33. package/dist/resources/public.d.ts +22 -0
  34. package/dist/resources/public.d.ts.map +1 -0
  35. package/dist/resources/public.js +33 -0
  36. package/dist/resources/public.js.map +1 -0
  37. package/dist/resources/refunds.d.ts +2 -1
  38. package/dist/resources/refunds.d.ts.map +1 -1
  39. package/dist/resources/refunds.js +12 -6
  40. package/dist/resources/refunds.js.map +1 -1
  41. package/dist/resources/sandbox.d.ts +0 -6
  42. package/dist/resources/sandbox.d.ts.map +1 -1
  43. package/dist/resources/sandbox.js +0 -6
  44. package/dist/resources/sandbox.js.map +1 -1
  45. package/dist/resources/security.d.ts +14 -0
  46. package/dist/resources/security.d.ts.map +1 -1
  47. package/dist/resources/security.js +12 -0
  48. package/dist/resources/security.js.map +1 -1
  49. package/dist/resources/transactions.d.ts +4 -1
  50. package/dist/resources/transactions.d.ts.map +1 -1
  51. package/dist/resources/transactions.js +12 -2
  52. package/dist/resources/transactions.js.map +1 -1
  53. package/dist/resources/wallets.d.ts +12 -25
  54. package/dist/resources/wallets.d.ts.map +1 -1
  55. package/dist/resources/wallets.js +12 -28
  56. package/dist/resources/wallets.js.map +1 -1
  57. package/dist/resources/webhooks.d.ts.map +1 -1
  58. package/dist/resources/webhooks.js +1 -3
  59. package/dist/resources/webhooks.js.map +1 -1
  60. package/dist/resources/withdrawals.d.ts +16 -4
  61. package/dist/resources/withdrawals.d.ts.map +1 -1
  62. package/dist/resources/withdrawals.js +28 -11
  63. package/dist/resources/withdrawals.js.map +1 -1
  64. package/dist/types/index.d.ts +300 -65
  65. package/dist/types/index.d.ts.map +1 -1
  66. package/dist/types/index.js +4 -0
  67. package/dist/types/index.js.map +1 -1
  68. package/package.json +7 -6
  69. package/dist/src/client.d.ts +0 -19
  70. package/dist/src/client.d.ts.map +0 -1
  71. package/dist/src/client.js +0 -146
  72. package/dist/src/client.js.map +0 -1
  73. package/dist/src/errors/index.d.ts +0 -28
  74. package/dist/src/errors/index.d.ts.map +0 -1
  75. package/dist/src/errors/index.js +0 -59
  76. package/dist/src/errors/index.js.map +0 -1
  77. package/dist/src/index.d.ts +0 -41
  78. package/dist/src/index.d.ts.map +0 -1
  79. package/dist/src/index.js +0 -84
  80. package/dist/src/index.js.map +0 -1
  81. package/dist/src/resources/analytics.d.ts +0 -23
  82. package/dist/src/resources/analytics.d.ts.map +0 -1
  83. package/dist/src/resources/analytics.js +0 -36
  84. package/dist/src/resources/analytics.js.map +0 -1
  85. package/dist/src/resources/balances.d.ts +0 -23
  86. package/dist/src/resources/balances.d.ts.map +0 -1
  87. package/dist/src/resources/balances.js +0 -54
  88. package/dist/src/resources/balances.js.map +0 -1
  89. package/dist/src/resources/contact.d.ts +0 -19
  90. package/dist/src/resources/contact.d.ts.map +0 -1
  91. package/dist/src/resources/contact.js +0 -17
  92. package/dist/src/resources/contact.js.map +0 -1
  93. package/dist/src/resources/customers.d.ts +0 -113
  94. package/dist/src/resources/customers.d.ts.map +0 -1
  95. package/dist/src/resources/customers.js +0 -113
  96. package/dist/src/resources/customers.js.map +0 -1
  97. package/dist/src/resources/invoices.d.ts +0 -21
  98. package/dist/src/resources/invoices.d.ts.map +0 -1
  99. package/dist/src/resources/invoices.js +0 -33
  100. package/dist/src/resources/invoices.js.map +0 -1
  101. package/dist/src/resources/merchants.d.ts +0 -120
  102. package/dist/src/resources/merchants.d.ts.map +0 -1
  103. package/dist/src/resources/merchants.js +0 -139
  104. package/dist/src/resources/merchants.js.map +0 -1
  105. package/dist/src/resources/payments.d.ts +0 -60
  106. package/dist/src/resources/payments.d.ts.map +0 -1
  107. package/dist/src/resources/payments.js +0 -188
  108. package/dist/src/resources/payments.js.map +0 -1
  109. package/dist/src/resources/refunds.d.ts +0 -31
  110. package/dist/src/resources/refunds.d.ts.map +0 -1
  111. package/dist/src/resources/refunds.js +0 -66
  112. package/dist/src/resources/refunds.js.map +0 -1
  113. package/dist/src/resources/sandbox.d.ts +0 -11
  114. package/dist/src/resources/sandbox.d.ts.map +0 -1
  115. package/dist/src/resources/sandbox.js +0 -16
  116. package/dist/src/resources/sandbox.js.map +0 -1
  117. package/dist/src/resources/security.d.ts +0 -56
  118. package/dist/src/resources/security.d.ts.map +0 -1
  119. package/dist/src/resources/security.js +0 -70
  120. package/dist/src/resources/security.js.map +0 -1
  121. package/dist/src/resources/transactions.d.ts +0 -25
  122. package/dist/src/resources/transactions.d.ts.map +0 -1
  123. package/dist/src/resources/transactions.js +0 -21
  124. package/dist/src/resources/transactions.js.map +0 -1
  125. package/dist/src/resources/wallets.d.ts +0 -61
  126. package/dist/src/resources/wallets.d.ts.map +0 -1
  127. package/dist/src/resources/wallets.js +0 -69
  128. package/dist/src/resources/wallets.js.map +0 -1
  129. package/dist/src/resources/webhooks.d.ts +0 -17
  130. package/dist/src/resources/webhooks.d.ts.map +0 -1
  131. package/dist/src/resources/webhooks.js +0 -128
  132. package/dist/src/resources/webhooks.js.map +0 -1
  133. package/dist/src/resources/withdrawals.d.ts +0 -39
  134. package/dist/src/resources/withdrawals.d.ts.map +0 -1
  135. package/dist/src/resources/withdrawals.js +0 -68
  136. package/dist/src/resources/withdrawals.js.map +0 -1
  137. package/dist/src/types/index.d.ts +0 -581
  138. package/dist/src/types/index.d.ts.map +0 -1
  139. package/dist/src/types/index.js +0 -8
  140. package/dist/src/types/index.js.map +0 -1
  141. package/dist/tests/error-handling.test.d.ts +0 -2
  142. package/dist/tests/error-handling.test.d.ts.map +0 -1
  143. package/dist/tests/error-handling.test.js +0 -145
  144. package/dist/tests/error-handling.test.js.map +0 -1
  145. package/dist/tests/fiddupay.test.d.ts +0 -2
  146. package/dist/tests/fiddupay.test.d.ts.map +0 -1
  147. package/dist/tests/fiddupay.test.js +0 -440
  148. package/dist/tests/fiddupay.test.js.map +0 -1
  149. package/dist/tests/sdk-integration.test.d.ts +0 -2
  150. package/dist/tests/sdk-integration.test.d.ts.map +0 -1
  151. package/dist/tests/sdk-integration.test.js +0 -352
  152. package/dist/tests/sdk-integration.test.js.map +0 -1
  153. package/dist/tests/setup.d.ts +0 -2
  154. package/dist/tests/setup.d.ts.map +0 -1
  155. package/dist/tests/setup.js +0 -22
  156. package/dist/tests/setup.js.map +0 -1
  157. package/dist/tests/webhooks.test.d.ts +0 -2
  158. package/dist/tests/webhooks.test.d.ts.map +0 -1
  159. package/dist/tests/webhooks.test.js +0 -63
  160. package/dist/tests/webhooks.test.js.map +0 -1
@@ -1,188 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Payments = void 0;
4
- const errors_1 = require("../errors");
5
- class Payments {
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- /**
10
- * Create a new payment
11
- */
12
- async create(data, options) {
13
- this.validateCreatePayment(data);
14
- return this.client.request('POST', '/api/v1/merchants/payments', data);
15
- }
16
- /**
17
- * Finalize currency selection for a multi-currency payment
18
- */
19
- async finalizeSelection(paymentId, data, options) {
20
- if (!paymentId) {
21
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
22
- }
23
- if (!data.crypto_type) {
24
- throw new errors_1.FidduPayValidationError('Crypto type is required', 'crypto_type');
25
- }
26
- return this.client.post(`/api/v1/merchants/payments/${paymentId}/select`, data, options);
27
- }
28
- /**
29
- * Retrieve a payment by ID
30
- */
31
- async retrieve(paymentId, options) {
32
- if (!paymentId) {
33
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
34
- }
35
- return this.client.get(`/api/v1/merchants/payments/${paymentId}`, options);
36
- }
37
- /**
38
- * Verify a payment with transaction hash
39
- */
40
- async verify(paymentId, data, options) {
41
- if (!paymentId) {
42
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
43
- }
44
- return this.client.request('POST', `/api/v1/merchants/payments/${paymentId}/verify`, data);
45
- }
46
- /**
47
- * List payments with optional filters
48
- */
49
- async list(params, options) {
50
- const queryParams = new URLSearchParams();
51
- if (params?.limit)
52
- queryParams.append('limit', params.limit.toString());
53
- if (params?.offset)
54
- queryParams.append('offset', params.offset.toString());
55
- if (params?.status)
56
- queryParams.append('status', params.status);
57
- if (params?.crypto_type)
58
- queryParams.append('crypto_type', params.crypto_type);
59
- const query = queryParams.toString();
60
- const path = query ? `/api/v1/merchants/payments?${query}` : '/api/v1/merchants/payments';
61
- return this.client.request('GET', path);
62
- }
63
- /**
64
- * Cancel a pending payment
65
- */
66
- async cancel(paymentId, options) {
67
- if (!paymentId) {
68
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
69
- }
70
- return this.client.post(`/api/v1/merchants/payments/${paymentId}/cancel`, {}, options);
71
- }
72
- /**
73
- * Create an address-only payment (WORK IN PROGRESS)
74
- */
75
- async createAddressOnly(data, options) {
76
- this.validateCreateAddressOnlyPayment(data);
77
- return this.client.post('/api/v1/merchants/address-only/create', data, options);
78
- }
79
- /**
80
- * Retrieve an address-only payment status by ID (WORK IN PROGRESS)
81
- */
82
- async retrieveAddressOnly(paymentId, options) {
83
- if (!paymentId) {
84
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
85
- }
86
- return this.client.get(`/api/v1/merchants/address-only/status?payment_id=${paymentId}`, options);
87
- }
88
- /**
89
- * List supported native currencies for address-only mode (EXPERIMENTAL)
90
- */
91
- async listAddressOnlyCurrencies(options) {
92
- return this.client.get('/api/v1/merchants/address-only/currencies', options);
93
- }
94
- /**
95
- * Get address-only mode statistics (EXPERIMENTAL)
96
- */
97
- async getAddressOnlyStats(options) {
98
- return this.client.get('/api/v1/merchants/address-only/stats', options);
99
- }
100
- /**
101
- * Get address-only mode health status (EXPERIMENTAL)
102
- */
103
- async getAddressOnlyHealth(options) {
104
- return this.client.get('/api/v1/merchants/address-only/health', options);
105
- }
106
- /**
107
- * Update fee setting (customer pays fee vs merchant pays fee)
108
- */
109
- async updateFeeSetting(data, options) {
110
- if (typeof data.customer_pays_fee !== 'boolean') {
111
- throw new errors_1.FidduPayValidationError('customer_pays_fee must be a boolean', 'customer_pays_fee');
112
- }
113
- return this.client.put('/api/v1/merchants/address-only/fee-setting', data, options);
114
- }
115
- async getFeeSetting(options) {
116
- return this.client.get('/api/v1/merchants/address-only/fee-setting', options);
117
- }
118
- validateCreatePayment(data) {
119
- // Validate that either amount or amount_usd is provided, but not both
120
- if (data.amount && data.amount_usd) {
121
- throw new errors_1.FidduPayValidationError('Provide either amount or amount_usd, not both', 'amount');
122
- }
123
- if (!data.amount && !data.amount_usd) {
124
- throw new errors_1.FidduPayValidationError('Either amount or amount_usd must be provided', 'amount');
125
- }
126
- // Validate the provided amount (either amount or amount_usd)
127
- const amountValue = data.amount || data.amount_usd;
128
- const amount = parseFloat(amountValue);
129
- if (isNaN(amount) || amount <= 0) {
130
- throw new errors_1.FidduPayValidationError('Amount must be a positive number', data.amount ? 'amount' : 'amount_usd');
131
- }
132
- if (amount < 0.01) {
133
- throw new errors_1.FidduPayValidationError('Minimum amount is $0.01', data.amount ? 'amount' : 'amount_usd');
134
- }
135
- // crypto_type is optional for multi-currency checkout
136
- if (data.crypto_type) {
137
- const validCryptoTypes = ['SOL', 'ETH', 'BNB', 'MATIC', 'ARB', 'USDT_ETH', 'USDT_BEP20', 'USDT_POLYGON', 'USDT_ARBITRUM', 'USDT_SPL', 'BTC'];
138
- if (!validCryptoTypes.includes(data.crypto_type)) {
139
- throw new errors_1.FidduPayValidationError(`Invalid crypto type. Must be one of: ${validCryptoTypes.join(', ')}`, 'crypto_type');
140
- }
141
- }
142
- if (data.expiration_minutes !== undefined) {
143
- if (data.expiration_minutes < 5 || data.expiration_minutes > 1440) {
144
- throw new errors_1.FidduPayValidationError('Expiration must be between 5 and 1440 minutes', 'expiration_minutes');
145
- }
146
- }
147
- if (data.description && data.description.length > 500) {
148
- throw new errors_1.FidduPayValidationError('Description must be 500 characters or less', 'description');
149
- }
150
- }
151
- validateCreateAddressOnlyPayment(data) {
152
- if (!data.requested_amount) {
153
- throw new errors_1.FidduPayValidationError('Requested amount is required', 'requested_amount');
154
- }
155
- if (!data.crypto_type) {
156
- throw new errors_1.FidduPayValidationError('Crypto type is required', 'crypto_type');
157
- }
158
- if (!data.merchant_address) {
159
- throw new errors_1.FidduPayValidationError('Merchant address is required', 'merchant_address');
160
- }
161
- const amount = parseFloat(data.requested_amount);
162
- if (isNaN(amount) || amount <= 0) {
163
- throw new errors_1.FidduPayValidationError('Requested amount must be a positive number', 'requested_amount');
164
- }
165
- if (amount < 0.01) {
166
- throw new errors_1.FidduPayValidationError('Minimum amount is $0.01', 'requested_amount');
167
- }
168
- // Note: No maximum amount limit - server enforces daily volume limits based on KYC status
169
- const validCryptoTypes = ['SOL', 'ETH', 'BNB', 'MATIC', 'ARB', 'USDT_ETH', 'USDT_BEP20', 'USDT_POLYGON', 'USDT_ARBITRUM', 'USDT_SPL', 'BTC'];
170
- if (!validCryptoTypes.includes(data.crypto_type)) {
171
- throw new errors_1.FidduPayValidationError(`Invalid crypto type. Must be one of: ${validCryptoTypes.join(', ')}`, 'crypto_type');
172
- }
173
- if (data.expiration_minutes !== undefined) {
174
- if (data.expiration_minutes < 5 || data.expiration_minutes > 1440) {
175
- throw new errors_1.FidduPayValidationError('Expiration must be between 5 and 1440 minutes', 'expiration_minutes');
176
- }
177
- }
178
- if (data.description && data.description.length > 500) {
179
- throw new errors_1.FidduPayValidationError('Description must be 500 characters or less', 'description');
180
- }
181
- // Basic address validation
182
- if (data.merchant_address.length < 10) {
183
- throw new errors_1.FidduPayValidationError('Invalid merchant address format', 'merchant_address');
184
- }
185
- }
186
- }
187
- exports.Payments = Payments;
188
- //# sourceMappingURL=payments.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payments.js","sourceRoot":"","sources":["../../../src/resources/payments.ts"],"names":[],"mappings":";;;AAgBA,sCAAoD;AAEpD,MAAa,QAAQ;IACnB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,IAA0B,EAAE,OAAwB;QAC/D,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAU,MAAM,EAAE,4BAA4B,EAAE,IAAI,CAAC,CAAC;IAClF,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CAAC,SAAiB,EAAE,IAAsB,EAAE,OAAwB;QACzF,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,gCAAuB,CAAC,w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AAgB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EACrE,aAAa,CACd,CAAC;QACJ,CAAC;QAED,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,kBAAkB,GAAG,CAAC,IAAI,IAAI,CAAC,kBAAkB,GAAG,IAAI,EAAE,CAAC;gBAClE,MAAM,IAAI,gCAAuB,CAC/B,+CAA+C,EAC/C,oBAAoB,CACrB,CAAC;YACJ,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YACtD,MAAM,IAAI,gCAAuB,CAC/B,4CAA4C,EAC5C,aAAa,CACd,CAAC;QACJ,CAAC;QAED,2BAA2B;QAC3B,IAAI,IAAI,CAAC,gBAAgB,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;YACtC,MAAM,IAAI,gCAAuB,CAC/B,iCAAiC,EACjC,kBAAkB,CACnB,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAvOD,4BAuOC"}
@@ -1,31 +0,0 @@
1
- import { HttpClient } from '../client';
2
- import { CreateRefundRequest, Refund, RequestOptions } from '../types';
3
- export declare class Refunds {
4
- private client;
5
- constructor(client: HttpClient);
6
- /**
7
- * Create a refund for a confirmed payment
8
- */
9
- create(data: CreateRefundRequest, options?: RequestOptions): Promise<Refund>;
10
- /**
11
- * Retrieve a refund by ID
12
- */
13
- retrieve(refundId: string, options?: RequestOptions): Promise<Refund>;
14
- /**
15
- * Complete a refund
16
- */
17
- complete(refundId: string, transactionHash: string, options?: RequestOptions): Promise<any>;
18
- /**
19
- * List refunds
20
- */
21
- list(params?: {
22
- limit?: number;
23
- offset?: number;
24
- }, options?: RequestOptions): Promise<{
25
- refunds: Refund[];
26
- total: number;
27
- has_more: boolean;
28
- }>;
29
- private validateCreateRefund;
30
- }
31
- //# sourceMappingURL=refunds.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refunds.d.ts","sourceRoot":"","sources":["../../../src/resources/refunds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGvE,qBAAa,OAAO;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAKlF;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC;IAO3E;;OAEG;IACG,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAUjG;;OAEG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAC1F,OAAO,EAAE,MAAM,EAAE,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,OAAO,CAAC;KACnB,CAAC;IAYF,OAAO,CAAC,oBAAoB;CAmB7B"}
@@ -1,66 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Refunds = void 0;
4
- const errors_1 = require("../errors");
5
- class Refunds {
6
- constructor(client) {
7
- this.client = client;
8
- }
9
- /**
10
- * Create a refund for a confirmed payment
11
- */
12
- async create(data, options) {
13
- this.validateCreateRefund(data);
14
- return this.client.post('/api/v1/merchants/refunds', data, options);
15
- }
16
- /**
17
- * Retrieve a refund by ID
18
- */
19
- async retrieve(refundId, options) {
20
- if (!refundId) {
21
- throw new errors_1.FidduPayValidationError('Refund ID is required', 'refund_id');
22
- }
23
- return this.client.get(`/api/v1/merchants/refunds/${refundId}`, options);
24
- }
25
- /**
26
- * Complete a refund
27
- */
28
- async complete(refundId, transactionHash, options) {
29
- if (!refundId) {
30
- throw new errors_1.FidduPayValidationError('Refund ID is required', 'refund_id');
31
- }
32
- if (!transactionHash) {
33
- throw new errors_1.FidduPayValidationError('Transaction hash is required', 'transaction_hash');
34
- }
35
- return this.client.request('POST', `/api/v1/merchants/refunds/${refundId}/complete`, { transaction_hash: transactionHash });
36
- }
37
- /**
38
- * List refunds
39
- */
40
- async list(params, options) {
41
- const queryParams = new URLSearchParams();
42
- if (params?.limit)
43
- queryParams.append('limit', params.limit.toString());
44
- if (params?.offset)
45
- queryParams.append('offset', params.offset.toString());
46
- const query = queryParams.toString();
47
- const path = query ? `/api/v1/merchants/refunds?${query}` : '/api/v1/merchants/refunds';
48
- return this.client.get(path, options);
49
- }
50
- validateCreateRefund(data) {
51
- if (!data.payment_id) {
52
- throw new errors_1.FidduPayValidationError('Payment ID is required', 'payment_id');
53
- }
54
- if (data.amount !== undefined) {
55
- const amount = parseFloat(data.amount);
56
- if (isNaN(amount) || amount <= 0) {
57
- throw new errors_1.FidduPayValidationError('Refund amount must be a positive number', 'amount');
58
- }
59
- }
60
- if (data.reason && data.reason.length > 500) {
61
- throw new errors_1.FidduPayValidationError('Refund reason must be 500 characters or less', 'reason');
62
- }
63
- }
64
- }
65
- exports.Refunds = Refunds;
66
- //# sourceMappingURL=refunds.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"refunds.js","sourceRoot":"","sources":["../../../src/resources/refunds.ts"],"names":[],"mappings":";;;AAEA,sCAAoD;AAEpD,MAAa,OAAO;IAClB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,I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CAAC,QAAQ,EAAE,CAAC,CAAC;QAE3E,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,6BAA6B,KAAK,EAAE,CAAC,CAAC,CAAC,2BAA2B,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACxC,CAAC;IAEO,oBAAoB,CAAC,IAAyB;QACpD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,IAAI,gCAAuB,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAC;QAC5E,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,MAAM,GAAG,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACvC,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;gBACjC,MAAM,IAAI,gCAAuB,CAAC,yCAAyC,EAAE,QAAQ,CAAC,CAAC;YACzF,CAAC;QACH,CAAC;QAED,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,CAAC;YAC5C,MAAM,IAAI,gCAAuB,CAC/B,8CAA8C,EAC9C,QAAQ,CACT,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAxED,0BAwEC"}
@@ -1,11 +0,0 @@
1
- import { HttpClient } from '../client';
2
- import { SandboxPaymentSimulation, SimulatePaymentRequest } from '../types';
3
- export declare class Sandbox {
4
- private client;
5
- constructor(client: HttpClient);
6
- /**
7
- * Simulate payment status
8
- */
9
- simulatePayment(paymentId: string, data: SimulatePaymentRequest): Promise<SandboxPaymentSimulation>;
10
- }
11
- //# sourceMappingURL=sandbox.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../../src/resources/sandbox.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,UAAU,CAAC;AAElB,qBAAa,OAAO;IACN,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAGtC;;OAEG;IACG,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,wBAAwB,CAAC;CAG1G"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Sandbox = void 0;
4
- class Sandbox {
5
- constructor(client) {
6
- this.client = client;
7
- }
8
- /**
9
- * Simulate payment status
10
- */
11
- async simulatePayment(paymentId, data) {
12
- return this.client.request('POST', `/api/v1/merchants/sandbox/payments/${paymentId}/simulate`, data);
13
- }
14
- }
15
- exports.Sandbox = Sandbox;
16
- //# sourceMappingURL=sandbox.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../../../src/resources/sandbox.ts"],"names":[],"mappings":";;;AAMA,MAAa,OAAO;IAClB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAG3C;;OAEG;IACH,KAAK,CAAC,eAAe,CAAC,SAAiB,EAAE,IAA4B;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAA2B,MAAM,EAAE,sCAAsC,SAAS,WAAW,EAAE,IAAI,CAAC,CAAC;IACjI,CAAC;CACF;AAVD,0BAUC"}
@@ -1,56 +0,0 @@
1
- import { HttpClient } from '../client';
2
- import { RequestOptions } from '../types';
3
- export declare class Security {
4
- private client;
5
- constructor(client: HttpClient);
6
- /**
7
- * Get security events
8
- */
9
- getEvents(options?: RequestOptions): Promise<any>;
10
- /**
11
- * Get security alerts
12
- */
13
- getAlerts(options?: RequestOptions): Promise<any>;
14
- /**
15
- * Get security settings
16
- */
17
- getSettings(options?: RequestOptions): Promise<any>;
18
- /**
19
- * Update security settings
20
- */
21
- updateSettings(data: {
22
- max_daily_withdrawal?: number;
23
- require_2fa_for_withdrawals?: boolean;
24
- }, options?: RequestOptions): Promise<any>;
25
- /**
26
- * Check gas balances
27
- */
28
- checkGasBalances(options?: RequestOptions): Promise<any>;
29
- /**
30
- * Get balance alerts
31
- */
32
- getBalanceAlerts(options?: RequestOptions): Promise<any>;
33
- /**
34
- * Acknowledge security alert
35
- */
36
- acknowledgeAlert(alertId: string, options?: RequestOptions): Promise<any>;
37
- /**
38
- * Resolve balance alert
39
- */
40
- resolveBalanceAlert(alertId: string, options?: RequestOptions): Promise<any>;
41
- /**
42
- * Toggle master wallet withdrawal lock
43
- */
44
- toggleWalletLock(locked: boolean, password: string, options?: RequestOptions): Promise<{
45
- status: string;
46
- locked: boolean;
47
- }>;
48
- /**
49
- * Toggle customer designated wallet withdrawal lock
50
- */
51
- toggleCustomerWalletLock(locked: boolean, password: string, options?: RequestOptions): Promise<{
52
- status: string;
53
- locked: boolean;
54
- }>;
55
- }
56
- //# sourceMappingURL=security.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../../src/resources/security.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,qBAAa,QAAQ;IACP,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD;;OAEG;IACG,SAAS,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIvD;;OAEG;IACG,WAAW,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzD;;OAEG;IACG,cAAc,CAAC,IAAI,EAAE;QACzB,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,2BAA2B,CAAC,EAAE,OAAO,CAAC;KACvC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI1C;;OAEG;IACG,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9D;;OAEG;IACG,gBAAgB,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAI/E;;OAEG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC;IAIlF;;OAEG;IACG,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;IAIjI;;OAEG;IACG,wBAAwB,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;CAG1I"}
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Security = void 0;
4
- class Security {
5
- constructor(client) {
6
- this.client = client;
7
- }
8
- /**
9
- * Get security events
10
- */
11
- async getEvents(options) {
12
- return this.client.request('GET', '/api/v1/merchants/security/events');
13
- }
14
- /**
15
- * Get security alerts
16
- */
17
- async getAlerts(options) {
18
- return this.client.request('GET', '/api/v1/merchants/security/alerts');
19
- }
20
- /**
21
- * Get security settings
22
- */
23
- async getSettings(options) {
24
- return this.client.request('GET', '/api/v1/merchants/security/settings');
25
- }
26
- /**
27
- * Update security settings
28
- */
29
- async updateSettings(data, options) {
30
- return this.client.request('PUT', '/api/v1/merchants/security/settings', data);
31
- }
32
- /**
33
- * Check gas balances
34
- */
35
- async checkGasBalances(options) {
36
- return this.client.request('GET', '/api/v1/merchants/security/gas-check');
37
- }
38
- /**
39
- * Get balance alerts
40
- */
41
- async getBalanceAlerts(options) {
42
- return this.client.request('GET', '/api/v1/merchants/security/balance-alerts');
43
- }
44
- /**
45
- * Acknowledge security alert
46
- */
47
- async acknowledgeAlert(alertId, options) {
48
- return this.client.request('POST', `/api/v1/merchants/security/alerts/${alertId}/acknowledge`);
49
- }
50
- /**
51
- * Resolve balance alert
52
- */
53
- async resolveBalanceAlert(alertId, options) {
54
- return this.client.request('POST', `/api/v1/merchants/security/balance-alerts/${alertId}/resolve`);
55
- }
56
- /**
57
- * Toggle master wallet withdrawal lock
58
- */
59
- async toggleWalletLock(locked, password, options) {
60
- return this.client.post('/api/v1/merchants/security/wallets/lock', { locked, password }, options);
61
- }
62
- /**
63
- * Toggle customer designated wallet withdrawal lock
64
- */
65
- async toggleCustomerWalletLock(locked, password, options) {
66
- return this.client.post('/api/v1/merchants/security/customers/wallets/lock', { locked, password }, options);
67
- }
68
- }
69
- exports.Security = Security;
70
- //# sourceMappingURL=security.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"security.js","sourceRoot":"","sources":["../../../src/resources/security.ts"],"names":[],"mappings":";;;AAGA,MAAa,QAAQ;IACnB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,SAAS,CAAC,OAAwB;QACtC,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,mCAAmC,CAAC,CAAC;IACzE,CAAC;I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AQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACpG,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,wBAAwB,CAAC,MAAe,EAAE,QAAgB,EAAE,OAAwB;QACxF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,mDAAmD,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9G,CAAC;CACF;AA3ED,4BA2EC"}
@@ -1,25 +0,0 @@
1
- import { HttpClient } from '../client';
2
- import { RequestOptions } from '../types';
3
- export interface UnifiedTransaction {
4
- type: 'payment' | 'refund' | 'withdrawal';
5
- id: string;
6
- crypto_amount: string;
7
- usd_amount: string;
8
- crypto_type: string;
9
- status: string;
10
- transaction_hash?: string;
11
- created_at: string;
12
- }
13
- export declare class Transactions {
14
- private client;
15
- constructor(client: HttpClient);
16
- /**
17
- * List unified transactions (payments, refunds, withdrawals)
18
- */
19
- list(params?: {
20
- limit?: number;
21
- }, options?: RequestOptions): Promise<{
22
- transactions: UnifiedTransaction[];
23
- }>;
24
- }
25
- //# sourceMappingURL=transactions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,YAAY;IACT,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,UAAU;IAEtC;;OAEG;IACG,IAAI,CAAC,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,kBAAkB,EAAE,CAAA;KAAE,CAAC;CAQrH"}
@@ -1,21 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Transactions = void 0;
4
- class Transactions {
5
- constructor(client) {
6
- this.client = client;
7
- }
8
- /**
9
- * List unified transactions (payments, refunds, withdrawals)
10
- */
11
- async list(params, options) {
12
- const queryParams = new URLSearchParams();
13
- if (params?.limit)
14
- queryParams.append('limit', params.limit.toString());
15
- const query = queryParams.toString();
16
- const path = query ? `/api/v1/merchants/transactions?${query}` : '/api/v1/merchants/transactions';
17
- return this.client.request('GET', path);
18
- }
19
- }
20
- exports.Transactions = Transactions;
21
- //# sourceMappingURL=transactions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/resources/transactions.ts"],"names":[],"mappings":";;;AAcA,MAAa,YAAY;IACrB,YAAoB,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAI,CAAC;IAE3C;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,MAA2B,EAAE,OAAwB;QAC5D,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;QAC1C,IAAI,MAAM,EAAE,KAAK;YAAE,WAAW,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;QAExE,MAAM,KAAK,GAAG,WAAW,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,kCAAkC,KAAK,EAAE,CAAC,CAAC,CAAC,gCAAgC,CAAC;QAClG,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAC5C,CAAC;CACJ;AAdD,oCAcC"}
@@ -1,61 +0,0 @@
1
- import { HttpClient } from '../client';
2
- import { RequestOptions } from '../types';
3
- export declare class Wallets {
4
- private client;
5
- constructor(client: HttpClient);
6
- /**
7
- * Get wallet configurations
8
- */
9
- getConfigurations(options?: RequestOptions): Promise<any>;
10
- /**
11
- * Get actual wallet balances and volume statistics
12
- */
13
- getBalances(options?: RequestOptions): Promise<{
14
- wallets: any[];
15
- }>;
16
- /**
17
- * Unified wallet setup (address or generate)
18
- */
19
- setup(data: {
20
- crypto_type: string;
21
- mode: 'address' | 'generate';
22
- address?: string;
23
- is_active?: boolean;
24
- }, options?: RequestOptions): Promise<any>;
25
- /**
26
- * Generate a new wallet for a cryptocurrency
27
- * @deprecated Use setup with mode 'generate' instead
28
- */
29
- generate(data: {
30
- crypto_type: string;
31
- }, options?: RequestOptions): Promise<any>;
32
- /**
33
- * Configure a wallet with just an address (no private key)
34
- * @deprecated Use setup with mode 'address' instead
35
- */
36
- configureAddress(data: {
37
- crypto_type: string;
38
- address: string;
39
- is_active?: boolean;
40
- }, options?: RequestOptions): Promise<any>;
41
- /**
42
- * Get gas estimates
43
- */
44
- getGasEstimates(options?: RequestOptions): Promise<any>;
45
- /**
46
- * Check gas requirements (alias for gasCheck with parameters)
47
- */
48
- checkGasRequirements(params: {
49
- crypto_type: string;
50
- amount: number;
51
- }, options?: RequestOptions): Promise<any>;
52
- /**
53
- * Check withdrawal capability for crypto type
54
- */
55
- checkWithdrawalCapability(cryptoType: string, options?: RequestOptions): Promise<any>;
56
- /**
57
- * Revoke/Remove wallet configuration
58
- */
59
- revoke(cryptoType: string, options?: RequestOptions): Promise<any>;
60
- }
61
- //# sourceMappingURL=wallets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../../src/resources/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM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