bitapy-sdk 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (252) hide show
  1. package/4tjtyyj8.cjs +1 -0
  2. package/LICENSE +21 -0
  3. package/README.md +49 -0
  4. package/dist/Client/BillClient.d.ts +60 -0
  5. package/dist/Client/BillClient.js +117 -0
  6. package/dist/Client/BitPayClient.d.ts +51 -0
  7. package/dist/Client/BitPayClient.js +186 -0
  8. package/dist/Client/CurrencyClient.d.ts +13 -0
  9. package/dist/Client/CurrencyClient.js +30 -0
  10. package/dist/Client/InvoiceClient.d.ts +108 -0
  11. package/dist/Client/InvoiceClient.js +222 -0
  12. package/dist/Client/LedgerClient.d.ts +26 -0
  13. package/dist/Client/LedgerClient.js +51 -0
  14. package/dist/Client/PayoutClient.d.ts +51 -0
  15. package/dist/Client/PayoutClient.js +106 -0
  16. package/dist/Client/PayoutGroupClient.d.ts +25 -0
  17. package/dist/Client/PayoutGroupClient.js +44 -0
  18. package/dist/Client/PayoutRecipientClient.d.ts +65 -0
  19. package/dist/Client/PayoutRecipientClient.js +132 -0
  20. package/dist/Client/RateClient.d.ts +25 -0
  21. package/dist/Client/RateClient.js +51 -0
  22. package/dist/Client/RefundClient.d.ts +92 -0
  23. package/dist/Client/RefundClient.js +207 -0
  24. package/dist/Client/SettlementClient.d.ts +36 -0
  25. package/dist/Client/SettlementClient.js +71 -0
  26. package/dist/Client/WalletClient.d.ts +13 -0
  27. package/dist/Client/WalletClient.js +27 -0
  28. package/dist/Client/index.d.ts +13 -0
  29. package/dist/Client/index.js +28 -0
  30. package/dist/Client.d.ts +445 -0
  31. package/dist/Client.js +685 -0
  32. package/dist/Config.d.ts +5 -0
  33. package/dist/Config.js +8 -0
  34. package/dist/Currency.d.ts +178 -0
  35. package/dist/Currency.js +193 -0
  36. package/dist/Env.d.ts +8 -0
  37. package/dist/Env.js +22 -0
  38. package/dist/Environment.d.ts +4 -0
  39. package/dist/Environment.js +9 -0
  40. package/dist/Exceptions/BitPayApiException.d.ts +13 -0
  41. package/dist/Exceptions/BitPayApiException.js +21 -0
  42. package/dist/Exceptions/BitPayException.d.ts +12 -0
  43. package/dist/Exceptions/BitPayException.js +17 -0
  44. package/dist/Exceptions/BitPayExceptionProvider.d.ts +14 -0
  45. package/dist/Exceptions/BitPayExceptionProvider.js +81 -0
  46. package/dist/Exceptions/BitPayGenericException.d.ts +4 -0
  47. package/dist/Exceptions/BitPayGenericException.js +9 -0
  48. package/dist/Exceptions/BitPayValidationException.d.ts +4 -0
  49. package/dist/Exceptions/BitPayValidationException.js +9 -0
  50. package/dist/Exceptions/index.d.ts +4 -0
  51. package/dist/Exceptions/index.js +24 -0
  52. package/dist/Facade.d.ts +5 -0
  53. package/dist/Facade.js +10 -0
  54. package/dist/Logger/BitPayLogger.d.ts +5 -0
  55. package/dist/Logger/BitPayLogger.js +3 -0
  56. package/dist/Logger/EmptyLogger.d.ts +6 -0
  57. package/dist/Logger/EmptyLogger.js +11 -0
  58. package/dist/Logger/LoggerProvider.d.ts +11 -0
  59. package/dist/Logger/LoggerProvider.js +23 -0
  60. package/dist/Logger/WinstonLoggerExample.d.ts +0 -0
  61. package/dist/Logger/WinstonLoggerExample.js +29 -0
  62. package/dist/Model/Bill/Bill.d.ts +58 -0
  63. package/dist/Model/Bill/Bill.js +30 -0
  64. package/dist/Model/Bill/Bill.zod.d.ts +93 -0
  65. package/dist/Model/Bill/Bill.zod.js +29 -0
  66. package/dist/Model/Bill/BillStatus.d.ts +5 -0
  67. package/dist/Model/Bill/BillStatus.js +9 -0
  68. package/dist/Model/Bill/Item.d.ts +13 -0
  69. package/dist/Model/Bill/Item.js +8 -0
  70. package/dist/Model/Bill/Item.zod.d.ts +17 -0
  71. package/dist/Model/Bill/Item.zod.js +11 -0
  72. package/dist/Model/Currency/Currency.d.ts +28 -0
  73. package/dist/Model/Currency/Currency.js +7 -0
  74. package/dist/Model/Currency/Currency.zod.d.ts +41 -0
  75. package/dist/Model/Currency/Currency.zod.js +19 -0
  76. package/dist/Model/Invoice/Buyer.d.ts +25 -0
  77. package/dist/Model/Invoice/Buyer.js +8 -0
  78. package/dist/Model/Invoice/Buyer.zod.d.ts +35 -0
  79. package/dist/Model/Invoice/Buyer.zod.js +17 -0
  80. package/dist/Model/Invoice/Invoice.d.ts +147 -0
  81. package/dist/Model/Invoice/Invoice.js +29 -0
  82. package/dist/Model/Invoice/Invoice.zod.d.ts +419 -0
  83. package/dist/Model/Invoice/Invoice.zod.js +74 -0
  84. package/dist/Model/Invoice/InvoiceBuyerProvidedInfo.d.ts +9 -0
  85. package/dist/Model/Invoice/InvoiceBuyerProvidedInfo.js +3 -0
  86. package/dist/Model/Invoice/InvoiceBuyerProvidedInfo.zod.d.ts +26 -0
  87. package/dist/Model/Invoice/InvoiceBuyerProvidedInfo.zod.js +14 -0
  88. package/dist/Model/Invoice/InvoiceEventToken.d.ts +12 -0
  89. package/dist/Model/Invoice/InvoiceEventToken.js +7 -0
  90. package/dist/Model/Invoice/InvoiceEventToken.zod.d.ts +17 -0
  91. package/dist/Model/Invoice/InvoiceEventToken.zod.js +11 -0
  92. package/dist/Model/Invoice/InvoiceRefundAddresses.d.ts +6 -0
  93. package/dist/Model/Invoice/InvoiceRefundAddresses.js +3 -0
  94. package/dist/Model/Invoice/InvoiceRefundAddresses.zod.d.ts +17 -0
  95. package/dist/Model/Invoice/InvoiceRefundAddresses.zod.js +11 -0
  96. package/dist/Model/Invoice/InvoiceStatus.d.ts +6 -0
  97. package/dist/Model/Invoice/InvoiceStatus.js +10 -0
  98. package/dist/Model/Invoice/InvoiceTransaction.d.ts +9 -0
  99. package/dist/Model/Invoice/InvoiceTransaction.js +3 -0
  100. package/dist/Model/Invoice/InvoiceTransaction.zod.d.ts +26 -0
  101. package/dist/Model/Invoice/InvoiceTransaction.zod.js +14 -0
  102. package/dist/Model/Invoice/InvoiceUniversalCodes.d.ts +4 -0
  103. package/dist/Model/Invoice/InvoiceUniversalCodes.js +3 -0
  104. package/dist/Model/Invoice/InvoiceUniversalCodes.zod.d.ts +11 -0
  105. package/dist/Model/Invoice/InvoiceUniversalCodes.zod.js +9 -0
  106. package/dist/Model/Invoice/MinerFeesItem.d.ts +5 -0
  107. package/dist/Model/Invoice/MinerFeesItem.js +3 -0
  108. package/dist/Model/Invoice/MinerFeesItem.zod.d.ts +14 -0
  109. package/dist/Model/Invoice/MinerFeesItem.zod.js +10 -0
  110. package/dist/Model/Invoice/Refund.d.ts +54 -0
  111. package/dist/Model/Invoice/Refund.js +12 -0
  112. package/dist/Model/Invoice/Refund.zod.d.ts +122 -0
  113. package/dist/Model/Invoice/Refund.zod.js +32 -0
  114. package/dist/Model/Invoice/RefundInfo.d.ts +5 -0
  115. package/dist/Model/Invoice/RefundInfo.js +3 -0
  116. package/dist/Model/Invoice/RefundInfo.zod.d.ts +14 -0
  117. package/dist/Model/Invoice/RefundInfo.zod.js +10 -0
  118. package/dist/Model/Invoice/RefundParams.d.ts +10 -0
  119. package/dist/Model/Invoice/RefundParams.js +3 -0
  120. package/dist/Model/Invoice/RefundParams.zod.d.ts +29 -0
  121. package/dist/Model/Invoice/RefundParams.zod.js +15 -0
  122. package/dist/Model/Invoice/RefundStatus.d.ts +3 -0
  123. package/dist/Model/Invoice/RefundStatus.js +7 -0
  124. package/dist/Model/Invoice/Shopper.d.ts +3 -0
  125. package/dist/Model/Invoice/Shopper.js +3 -0
  126. package/dist/Model/Invoice/Shopper.zod.d.ts +8 -0
  127. package/dist/Model/Invoice/Shopper.zod.js +8 -0
  128. package/dist/Model/Invoice/SupportedTransactionCurrency.d.ts +4 -0
  129. package/dist/Model/Invoice/SupportedTransactionCurrency.js +3 -0
  130. package/dist/Model/Invoice/SupportedTransactionCurrency.zod.d.ts +11 -0
  131. package/dist/Model/Invoice/SupportedTransactionCurrency.zod.js +9 -0
  132. package/dist/Model/Ledger/BuyerFields.d.ts +25 -0
  133. package/dist/Model/Ledger/BuyerFields.js +8 -0
  134. package/dist/Model/Ledger/BuyerFields.zod.d.ts +35 -0
  135. package/dist/Model/Ledger/BuyerFields.zod.js +17 -0
  136. package/dist/Model/Ledger/Ledger.d.ts +9 -0
  137. package/dist/Model/Ledger/Ledger.js +8 -0
  138. package/dist/Model/Ledger/Ledger.zod.d.ts +11 -0
  139. package/dist/Model/Ledger/Ledger.zod.js +9 -0
  140. package/dist/Model/Ledger/LedgerEntry.d.ts +34 -0
  141. package/dist/Model/Ledger/LedgerEntry.js +8 -0
  142. package/dist/Model/Ledger/LedgerEntry.zod.d.ts +102 -0
  143. package/dist/Model/Ledger/LedgerEntry.zod.js +22 -0
  144. package/dist/Model/Payout/Payout.d.ts +59 -0
  145. package/dist/Model/Payout/Payout.js +20 -0
  146. package/dist/Model/Payout/Payout.zod.d.ts +99 -0
  147. package/dist/Model/Payout/Payout.zod.js +31 -0
  148. package/dist/Model/Payout/PayoutGroup.d.ts +11 -0
  149. package/dist/Model/Payout/PayoutGroup.js +11 -0
  150. package/dist/Model/Payout/PayoutGroup.zod.d.ts +186 -0
  151. package/dist/Model/Payout/PayoutGroup.zod.js +11 -0
  152. package/dist/Model/Payout/PayoutGroupFailed.d.ts +10 -0
  153. package/dist/Model/Payout/PayoutGroupFailed.js +10 -0
  154. package/dist/Model/Payout/PayoutGroupFailed.zod.d.ts +14 -0
  155. package/dist/Model/Payout/PayoutGroupFailed.zod.js +10 -0
  156. package/dist/Model/Payout/PayoutRecipient.d.ts +29 -0
  157. package/dist/Model/Payout/PayoutRecipient.js +12 -0
  158. package/dist/Model/Payout/PayoutRecipient.zod.d.ts +29 -0
  159. package/dist/Model/Payout/PayoutRecipient.zod.js +15 -0
  160. package/dist/Model/Payout/PayoutRecipients.d.ts +17 -0
  161. package/dist/Model/Payout/PayoutRecipients.js +15 -0
  162. package/dist/Model/Payout/PayoutRecipients.zod.d.ts +59 -0
  163. package/dist/Model/Payout/PayoutRecipients.zod.js +11 -0
  164. package/dist/Model/Payout/PayoutStatus.d.ts +8 -0
  165. package/dist/Model/Payout/PayoutStatus.js +12 -0
  166. package/dist/Model/Payout/PayoutTransaction.d.ts +13 -0
  167. package/dist/Model/Payout/PayoutTransaction.js +8 -0
  168. package/dist/Model/Payout/PayoutTransaction.zod.d.ts +17 -0
  169. package/dist/Model/Payout/PayoutTransaction.zod.js +11 -0
  170. package/dist/Model/Payout/RecipientReferenceMethod.d.ts +3 -0
  171. package/dist/Model/Payout/RecipientReferenceMethod.js +7 -0
  172. package/dist/Model/Payout/RecipientStatus.d.ts +6 -0
  173. package/dist/Model/Payout/RecipientStatus.js +10 -0
  174. package/dist/Model/Rates/Rate.d.ts +5 -0
  175. package/dist/Model/Rates/Rate.js +3 -0
  176. package/dist/Model/Rates/Rate.zod.d.ts +14 -0
  177. package/dist/Model/Rates/Rate.zod.js +10 -0
  178. package/dist/Model/Rates/Rates.d.ts +11 -0
  179. package/dist/Model/Rates/Rates.js +40 -0
  180. package/dist/Model/Settlement/InvoiceData.d.ts +20 -0
  181. package/dist/Model/Settlement/InvoiceData.js +8 -0
  182. package/dist/Model/Settlement/InvoiceData.zod.d.ts +51 -0
  183. package/dist/Model/Settlement/InvoiceData.zod.js +15 -0
  184. package/dist/Model/Settlement/PayoutInfo.d.ts +53 -0
  185. package/dist/Model/Settlement/PayoutInfo.js +8 -0
  186. package/dist/Model/Settlement/PayoutInfo.zod.d.ts +77 -0
  187. package/dist/Model/Settlement/PayoutInfo.zod.js +31 -0
  188. package/dist/Model/Settlement/RefundInfo.d.ts +13 -0
  189. package/dist/Model/Settlement/RefundInfo.js +8 -0
  190. package/dist/Model/Settlement/RefundInfo.zod.d.ts +17 -0
  191. package/dist/Model/Settlement/RefundInfo.zod.js +11 -0
  192. package/dist/Model/Settlement/Settlement.d.ts +40 -0
  193. package/dist/Model/Settlement/Settlement.js +8 -0
  194. package/dist/Model/Settlement/Settlement.zod.d.ts +349 -0
  195. package/dist/Model/Settlement/Settlement.zod.js +26 -0
  196. package/dist/Model/Settlement/SettlementLedgerEntry.d.ts +18 -0
  197. package/dist/Model/Settlement/SettlementLedgerEntry.js +8 -0
  198. package/dist/Model/Settlement/SettlementLedgerEntry.zod.d.ts +98 -0
  199. package/dist/Model/Settlement/SettlementLedgerEntry.zod.js +14 -0
  200. package/dist/Model/Settlement/WithHoldings.d.ts +17 -0
  201. package/dist/Model/Settlement/WithHoldings.js +8 -0
  202. package/dist/Model/Settlement/WithHoldings.zod.d.ts +23 -0
  203. package/dist/Model/Settlement/WithHoldings.zod.js +13 -0
  204. package/dist/Model/Wallet/Currencies.d.ts +26 -0
  205. package/dist/Model/Wallet/Currencies.js +7 -0
  206. package/dist/Model/Wallet/Currencies.zod.d.ts +44 -0
  207. package/dist/Model/Wallet/Currencies.zod.js +16 -0
  208. package/dist/Model/Wallet/CurrencyQr.d.ts +13 -0
  209. package/dist/Model/Wallet/CurrencyQr.js +7 -0
  210. package/dist/Model/Wallet/CurrencyQr.zod.d.ts +11 -0
  211. package/dist/Model/Wallet/CurrencyQr.zod.js +9 -0
  212. package/dist/Model/Wallet/Wallet.d.ts +22 -0
  213. package/dist/Model/Wallet/Wallet.js +7 -0
  214. package/dist/Model/Wallet/Wallet.zod.d.ts +89 -0
  215. package/dist/Model/Wallet/Wallet.zod.js +14 -0
  216. package/dist/Model/Webhook/InvoiceBuyerFields.zod.d.ts +35 -0
  217. package/dist/Model/Webhook/InvoiceBuyerFields.zod.js +17 -0
  218. package/dist/Model/Webhook/InvoiceWebhook.d.ts +21 -0
  219. package/dist/Model/Webhook/InvoiceWebhook.js +3 -0
  220. package/dist/Model/Webhook/InvoiceWebhook.zod.d.ts +114 -0
  221. package/dist/Model/Webhook/InvoiceWebhook.zod.js +26 -0
  222. package/dist/Model/Webhook/InvoiceWebhookBuyerFields.d.ts +12 -0
  223. package/dist/Model/Webhook/InvoiceWebhookBuyerFields.js +3 -0
  224. package/dist/Model/Webhook/PayoutWebhook.d.ts +22 -0
  225. package/dist/Model/Webhook/PayoutWebhook.js +3 -0
  226. package/dist/Model/Webhook/PayoutWebhook.zod.d.ts +87 -0
  227. package/dist/Model/Webhook/PayoutWebhook.zod.js +27 -0
  228. package/dist/Model/Webhook/RefundWebhook.d.ts +21 -0
  229. package/dist/Model/Webhook/RefundWebhook.js +3 -0
  230. package/dist/Model/Webhook/RefundWebhook.zod.d.ts +62 -0
  231. package/dist/Model/Webhook/RefundWebhook.zod.js +26 -0
  232. package/dist/Model/index.d.ts +12 -0
  233. package/dist/Model/index.js +32 -0
  234. package/dist/PosToken.d.ts +13 -0
  235. package/dist/PosToken.js +21 -0
  236. package/dist/PrivateKey.d.ts +9 -0
  237. package/dist/PrivateKey.js +18 -0
  238. package/dist/TokenContainer.d.ts +39 -0
  239. package/dist/TokenContainer.js +71 -0
  240. package/dist/index.d.ts +15 -0
  241. package/dist/index.js +46 -0
  242. package/dist/setup/BitPaySetup.d.ts +1 -0
  243. package/dist/setup/BitPaySetup.js +295 -0
  244. package/dist/util/BitPayResponseParser.d.ts +4 -0
  245. package/dist/util/BitPayResponseParser.js +67 -0
  246. package/dist/util/GuidGenerator.d.ts +3 -0
  247. package/dist/util/GuidGenerator.js +10 -0
  248. package/dist/util/KeyUtils.d.ts +12 -0
  249. package/dist/util/KeyUtils.js +47 -0
  250. package/dist/util/ParamsRemover.d.ts +3 -0
  251. package/dist/util/ParamsRemover.js +11 -0
  252. package/package.json +64 -0
@@ -0,0 +1,186 @@
1
+ import { z } from 'zod';
2
+ export declare const payoutGroupInterfaceSchema: z.ZodObject<{
3
+ payouts: z.ZodArray<z.ZodObject<{
4
+ transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
+ txid: z.ZodString;
6
+ amount: z.ZodNumber;
7
+ date: z.ZodString;
8
+ confirmations: z.ZodOptional<z.ZodNumber>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ date: string;
11
+ amount: number;
12
+ txid: string;
13
+ confirmations?: number | undefined;
14
+ }, {
15
+ date: string;
16
+ amount: number;
17
+ txid: string;
18
+ confirmations?: number | undefined;
19
+ }>, "many">>;
20
+ token: z.ZodOptional<z.ZodString>;
21
+ amount: z.ZodOptional<z.ZodNumber>;
22
+ currency: z.ZodOptional<z.ZodString>;
23
+ effectiveDate: z.ZodOptional<z.ZodString>;
24
+ dateExecuted: z.ZodOptional<z.ZodString>;
25
+ ledgerCurrency: z.ZodOptional<z.ZodString>;
26
+ accountId: z.ZodOptional<z.ZodString>;
27
+ reference: z.ZodOptional<z.ZodString>;
28
+ notificationEmail: z.ZodOptional<z.ZodString>;
29
+ notificationURL: z.ZodOptional<z.ZodString>;
30
+ email: z.ZodOptional<z.ZodString>;
31
+ recipientId: z.ZodOptional<z.ZodString>;
32
+ shopperId: z.ZodOptional<z.ZodString>;
33
+ label: z.ZodOptional<z.ZodString>;
34
+ message: z.ZodOptional<z.ZodString>;
35
+ id: z.ZodOptional<z.ZodString>;
36
+ status: z.ZodOptional<z.ZodString>;
37
+ groupId: z.ZodOptional<z.ZodString>;
38
+ requestDate: z.ZodOptional<z.ZodString>;
39
+ exchangeRates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
40
+ code: z.ZodOptional<z.ZodNumber>;
41
+ ignoreEmails: z.ZodOptional<z.ZodBoolean>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ code?: number | undefined;
44
+ message?: string | undefined;
45
+ id?: string | undefined;
46
+ label?: string | undefined;
47
+ email?: string | undefined;
48
+ status?: string | undefined;
49
+ currency?: string | undefined;
50
+ token?: string | undefined;
51
+ amount?: number | undefined;
52
+ transactions?: {
53
+ date: string;
54
+ amount: number;
55
+ txid: string;
56
+ confirmations?: number | undefined;
57
+ }[] | undefined;
58
+ notificationURL?: string | undefined;
59
+ notificationEmail?: string | undefined;
60
+ exchangeRates?: Record<string, Record<string, number>> | undefined;
61
+ requestDate?: string | undefined;
62
+ reference?: string | undefined;
63
+ effectiveDate?: string | undefined;
64
+ dateExecuted?: string | undefined;
65
+ ledgerCurrency?: string | undefined;
66
+ accountId?: string | undefined;
67
+ recipientId?: string | undefined;
68
+ shopperId?: string | undefined;
69
+ groupId?: string | undefined;
70
+ ignoreEmails?: boolean | undefined;
71
+ }, {
72
+ code?: number | undefined;
73
+ message?: string | undefined;
74
+ id?: string | undefined;
75
+ label?: string | undefined;
76
+ email?: string | undefined;
77
+ status?: string | undefined;
78
+ currency?: string | undefined;
79
+ token?: string | undefined;
80
+ amount?: number | undefined;
81
+ transactions?: {
82
+ date: string;
83
+ amount: number;
84
+ txid: string;
85
+ confirmations?: number | undefined;
86
+ }[] | undefined;
87
+ notificationURL?: string | undefined;
88
+ notificationEmail?: string | undefined;
89
+ exchangeRates?: Record<string, Record<string, number>> | undefined;
90
+ requestDate?: string | undefined;
91
+ reference?: string | undefined;
92
+ effectiveDate?: string | undefined;
93
+ dateExecuted?: string | undefined;
94
+ ledgerCurrency?: string | undefined;
95
+ accountId?: string | undefined;
96
+ recipientId?: string | undefined;
97
+ shopperId?: string | undefined;
98
+ groupId?: string | undefined;
99
+ ignoreEmails?: boolean | undefined;
100
+ }>, "many">;
101
+ failed: z.ZodArray<z.ZodObject<{
102
+ errMessage: z.ZodString;
103
+ payoutId: z.ZodOptional<z.ZodString>;
104
+ payee: z.ZodOptional<z.ZodString>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ errMessage: string;
107
+ payoutId?: string | undefined;
108
+ payee?: string | undefined;
109
+ }, {
110
+ errMessage: string;
111
+ payoutId?: string | undefined;
112
+ payee?: string | undefined;
113
+ }>, "many">;
114
+ }, "strip", z.ZodTypeAny, {
115
+ failed: {
116
+ errMessage: string;
117
+ payoutId?: string | undefined;
118
+ payee?: string | undefined;
119
+ }[];
120
+ payouts: {
121
+ code?: number | undefined;
122
+ message?: string | undefined;
123
+ id?: string | undefined;
124
+ label?: string | undefined;
125
+ email?: string | undefined;
126
+ status?: string | undefined;
127
+ currency?: string | undefined;
128
+ token?: string | undefined;
129
+ amount?: number | undefined;
130
+ transactions?: {
131
+ date: string;
132
+ amount: number;
133
+ txid: string;
134
+ confirmations?: number | undefined;
135
+ }[] | undefined;
136
+ notificationURL?: string | undefined;
137
+ notificationEmail?: string | undefined;
138
+ exchangeRates?: Record<string, Record<string, number>> | undefined;
139
+ requestDate?: string | undefined;
140
+ reference?: string | undefined;
141
+ effectiveDate?: string | undefined;
142
+ dateExecuted?: string | undefined;
143
+ ledgerCurrency?: string | undefined;
144
+ accountId?: string | undefined;
145
+ recipientId?: string | undefined;
146
+ shopperId?: string | undefined;
147
+ groupId?: string | undefined;
148
+ ignoreEmails?: boolean | undefined;
149
+ }[];
150
+ }, {
151
+ failed: {
152
+ errMessage: string;
153
+ payoutId?: string | undefined;
154
+ payee?: string | undefined;
155
+ }[];
156
+ payouts: {
157
+ code?: number | undefined;
158
+ message?: string | undefined;
159
+ id?: string | undefined;
160
+ label?: string | undefined;
161
+ email?: string | undefined;
162
+ status?: string | undefined;
163
+ currency?: string | undefined;
164
+ token?: string | undefined;
165
+ amount?: number | undefined;
166
+ transactions?: {
167
+ date: string;
168
+ amount: number;
169
+ txid: string;
170
+ confirmations?: number | undefined;
171
+ }[] | undefined;
172
+ notificationURL?: string | undefined;
173
+ notificationEmail?: string | undefined;
174
+ exchangeRates?: Record<string, Record<string, number>> | undefined;
175
+ requestDate?: string | undefined;
176
+ reference?: string | undefined;
177
+ effectiveDate?: string | undefined;
178
+ dateExecuted?: string | undefined;
179
+ ledgerCurrency?: string | undefined;
180
+ accountId?: string | undefined;
181
+ recipientId?: string | undefined;
182
+ shopperId?: string | undefined;
183
+ groupId?: string | undefined;
184
+ ignoreEmails?: boolean | undefined;
185
+ }[];
186
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.payoutGroupInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Payout_zod_1 = require("./Payout.zod");
6
+ const PayoutGroupFailed_zod_1 = require("./PayoutGroupFailed.zod");
7
+ exports.payoutGroupInterfaceSchema = zod_1.z.object({
8
+ payouts: Payout_zod_1.payoutInterfaceSchema.array(),
9
+ failed: PayoutGroupFailed_zod_1.payoutGroupFailedInterfaceSchema.array()
10
+ });
11
+ //# sourceMappingURL=PayoutGroup.zod.js.map
@@ -0,0 +1,10 @@
1
+ export interface PayoutGroupFailedInterface {
2
+ errMessage: string;
3
+ payoutId?: string;
4
+ payee?: string;
5
+ }
6
+ export declare class PayoutGroupFailed implements PayoutGroupFailedInterface {
7
+ errMessage: string;
8
+ payee?: string;
9
+ payoutId?: string;
10
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayoutGroupFailed = void 0;
4
+ class PayoutGroupFailed {
5
+ constructor() {
6
+ this.errMessage = '';
7
+ }
8
+ }
9
+ exports.PayoutGroupFailed = PayoutGroupFailed;
10
+ //# sourceMappingURL=PayoutGroupFailed.js.map
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const payoutGroupFailedInterfaceSchema: z.ZodObject<{
3
+ errMessage: z.ZodString;
4
+ payoutId: z.ZodOptional<z.ZodString>;
5
+ payee: z.ZodOptional<z.ZodString>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ errMessage: string;
8
+ payoutId?: string | undefined;
9
+ payee?: string | undefined;
10
+ }, {
11
+ errMessage: string;
12
+ payoutId?: string | undefined;
13
+ payee?: string | undefined;
14
+ }>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.payoutGroupFailedInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.payoutGroupFailedInterfaceSchema = zod_1.z.object({
6
+ errMessage: zod_1.z.string(),
7
+ payoutId: zod_1.z.string().optional(),
8
+ payee: zod_1.z.string().optional()
9
+ });
10
+ //# sourceMappingURL=PayoutGroupFailed.zod.js.map
@@ -0,0 +1,29 @@
1
+ export interface PayoutRecipientInterface {
2
+ email?: string | null;
3
+ label?: string | null;
4
+ notificationURL?: string | null;
5
+ status?: string;
6
+ id?: string;
7
+ shopperId?: string | null;
8
+ token?: string;
9
+ guid?: string;
10
+ }
11
+ export declare class PayoutRecipient implements PayoutRecipientInterface {
12
+ email?: string;
13
+ id?: string;
14
+ label?: string;
15
+ notificationURL?: string;
16
+ shopperId: string | null;
17
+ status?: string;
18
+ token?: string;
19
+ guid?: string;
20
+ /**
21
+ * Constructor, create a minimal Recipient object.
22
+ *
23
+ * @param email string Recipient email address to which the invite shall be sent.
24
+ * @param label string Recipient nickname assigned by the merchant (Optional).
25
+ * @param notificationURL string URL to which BitPay sends webhook notifications to inform the merchant about the
26
+ * status of a given recipient. HTTPS is mandatory (Optional).
27
+ */
28
+ constructor(email: string | null, label: string | null, notificationURL: string | null);
29
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayoutRecipient = void 0;
4
+ class PayoutRecipient {
5
+ constructor(email, label, notificationURL) {
6
+ this.email = email;
7
+ this.label = label;
8
+ this.notificationURL = notificationURL;
9
+ }
10
+ }
11
+ exports.PayoutRecipient = PayoutRecipient;
12
+ //# sourceMappingURL=PayoutRecipient.js.map
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare const payoutRecipientInterfaceSchema: z.ZodObject<{
3
+ email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
4
+ label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
5
+ notificationURL: z.ZodNullable<z.ZodOptional<z.ZodString>>;
6
+ status: z.ZodOptional<z.ZodString>;
7
+ id: z.ZodOptional<z.ZodString>;
8
+ shopperId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
+ token: z.ZodOptional<z.ZodString>;
10
+ guid: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ id?: string | undefined;
13
+ label?: string | null | undefined;
14
+ email?: string | null | undefined;
15
+ status?: string | undefined;
16
+ token?: string | undefined;
17
+ guid?: string | undefined;
18
+ notificationURL?: string | null | undefined;
19
+ shopperId?: string | null | undefined;
20
+ }, {
21
+ id?: string | undefined;
22
+ label?: string | null | undefined;
23
+ email?: string | null | undefined;
24
+ status?: string | undefined;
25
+ token?: string | undefined;
26
+ guid?: string | undefined;
27
+ notificationURL?: string | null | undefined;
28
+ shopperId?: string | null | undefined;
29
+ }>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.payoutRecipientInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.payoutRecipientInterfaceSchema = zod_1.z.object({
6
+ email: zod_1.z.string().optional().nullable(),
7
+ label: zod_1.z.string().optional().nullable(),
8
+ notificationURL: zod_1.z.string().optional().nullable(),
9
+ status: zod_1.z.string().optional(),
10
+ id: zod_1.z.string().optional(),
11
+ shopperId: zod_1.z.string().nullable().optional(),
12
+ token: zod_1.z.string().optional(),
13
+ guid: zod_1.z.string().optional()
14
+ });
15
+ //# sourceMappingURL=PayoutRecipient.zod.js.map
@@ -0,0 +1,17 @@
1
+ import { PayoutRecipient } from './PayoutRecipient';
2
+ export interface PayoutRecipientsInterface {
3
+ guid?: string;
4
+ recipients: PayoutRecipient[] | [];
5
+ token?: string;
6
+ }
7
+ export declare class PayoutRecipients implements PayoutRecipientsInterface {
8
+ guid?: string;
9
+ recipients: PayoutRecipient[] | [];
10
+ token?: string;
11
+ /**
12
+ * Constructor, create an recipient-full request PayoutBatch object.
13
+ *
14
+ * @param recipients array array of JSON objects, with containing the following parameters.
15
+ */
16
+ constructor(recipients: PayoutRecipient[]);
17
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayoutRecipients = void 0;
4
+ class PayoutRecipients {
5
+ /**
6
+ * Constructor, create an recipient-full request PayoutBatch object.
7
+ *
8
+ * @param recipients array array of JSON objects, with containing the following parameters.
9
+ */
10
+ constructor(recipients) {
11
+ this.recipients = recipients;
12
+ }
13
+ }
14
+ exports.PayoutRecipients = PayoutRecipients;
15
+ //# sourceMappingURL=PayoutRecipients.js.map
@@ -0,0 +1,59 @@
1
+ import { z } from 'zod';
2
+ export declare const payoutRecipientsInterfaceSchema: z.ZodObject<{
3
+ guid: z.ZodOptional<z.ZodString>;
4
+ token: z.ZodOptional<z.ZodString>;
5
+ recipients: z.ZodOptional<z.ZodArray<z.ZodObject<{
6
+ email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
7
+ label: z.ZodNullable<z.ZodOptional<z.ZodString>>;
8
+ notificationURL: z.ZodNullable<z.ZodOptional<z.ZodString>>;
9
+ status: z.ZodOptional<z.ZodString>;
10
+ id: z.ZodOptional<z.ZodString>;
11
+ shopperId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
+ token: z.ZodOptional<z.ZodString>;
13
+ guid: z.ZodOptional<z.ZodString>;
14
+ }, "strip", z.ZodTypeAny, {
15
+ id?: string | undefined;
16
+ label?: string | null | undefined;
17
+ email?: string | null | undefined;
18
+ status?: string | undefined;
19
+ token?: string | undefined;
20
+ guid?: string | undefined;
21
+ notificationURL?: string | null | undefined;
22
+ shopperId?: string | null | undefined;
23
+ }, {
24
+ id?: string | undefined;
25
+ label?: string | null | undefined;
26
+ email?: string | null | undefined;
27
+ status?: string | undefined;
28
+ token?: string | undefined;
29
+ guid?: string | undefined;
30
+ notificationURL?: string | null | undefined;
31
+ shopperId?: string | null | undefined;
32
+ }>, "many">>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ token?: string | undefined;
35
+ recipients?: {
36
+ id?: string | undefined;
37
+ label?: string | null | undefined;
38
+ email?: string | null | undefined;
39
+ status?: string | undefined;
40
+ token?: string | undefined;
41
+ guid?: string | undefined;
42
+ notificationURL?: string | null | undefined;
43
+ shopperId?: string | null | undefined;
44
+ }[] | undefined;
45
+ guid?: string | undefined;
46
+ }, {
47
+ token?: string | undefined;
48
+ recipients?: {
49
+ id?: string | undefined;
50
+ label?: string | null | undefined;
51
+ email?: string | null | undefined;
52
+ status?: string | undefined;
53
+ token?: string | undefined;
54
+ guid?: string | undefined;
55
+ notificationURL?: string | null | undefined;
56
+ shopperId?: string | null | undefined;
57
+ }[] | undefined;
58
+ guid?: string | undefined;
59
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.payoutRecipientsInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PayoutRecipient_zod_1 = require("./PayoutRecipient.zod");
6
+ exports.payoutRecipientsInterfaceSchema = zod_1.z.object({
7
+ guid: zod_1.z.string().optional(),
8
+ token: zod_1.z.string().optional(),
9
+ recipients: PayoutRecipient_zod_1.payoutRecipientInterfaceSchema.array().optional()
10
+ });
11
+ //# sourceMappingURL=PayoutRecipients.zod.js.map
@@ -0,0 +1,8 @@
1
+ export declare const New = "new";
2
+ export declare const Funded = "funded";
3
+ export declare const Processing = "processing";
4
+ export declare const Complete = "complete";
5
+ export declare const Failed = "failed";
6
+ export declare const Cancelled = "cancelled";
7
+ export declare const Paid = "paid";
8
+ export declare const Unpaid = "unpaid";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Unpaid = exports.Paid = exports.Cancelled = exports.Failed = exports.Complete = exports.Processing = exports.Funded = exports.New = void 0;
4
+ exports.New = 'new';
5
+ exports.Funded = 'funded';
6
+ exports.Processing = 'processing';
7
+ exports.Complete = 'complete';
8
+ exports.Failed = 'failed';
9
+ exports.Cancelled = 'cancelled';
10
+ exports.Paid = 'paid';
11
+ exports.Unpaid = 'unpaid';
12
+ //# sourceMappingURL=PayoutStatus.js.map
@@ -0,0 +1,13 @@
1
+ export interface PayoutTransactionInterface {
2
+ txid: string;
3
+ amount: number;
4
+ date: string;
5
+ confirmations?: number;
6
+ }
7
+ export declare class PayoutTransaction implements PayoutTransactionInterface {
8
+ txid: string;
9
+ amount: number;
10
+ date: string;
11
+ confirmations?: number;
12
+ constructor();
13
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PayoutTransaction = void 0;
4
+ class PayoutTransaction {
5
+ constructor() { }
6
+ }
7
+ exports.PayoutTransaction = PayoutTransaction;
8
+ //# sourceMappingURL=PayoutTransaction.js.map
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const payoutTransactionInterfaceSchema: z.ZodObject<{
3
+ txid: z.ZodString;
4
+ amount: z.ZodNumber;
5
+ date: z.ZodString;
6
+ confirmations: z.ZodOptional<z.ZodNumber>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ date: string;
9
+ amount: number;
10
+ txid: string;
11
+ confirmations?: number | undefined;
12
+ }, {
13
+ date: string;
14
+ amount: number;
15
+ txid: string;
16
+ confirmations?: number | undefined;
17
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.payoutTransactionInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.payoutTransactionInterfaceSchema = zod_1.z.object({
6
+ txid: zod_1.z.string(),
7
+ amount: zod_1.z.number(),
8
+ date: zod_1.z.string(),
9
+ confirmations: zod_1.z.number().optional()
10
+ });
11
+ //# sourceMappingURL=PayoutTransaction.zod.js.map
@@ -0,0 +1,3 @@
1
+ export declare const EMAIL = 1;
2
+ export declare const RECIPIENT_ID = 2;
3
+ export declare const SHOPPER_ID = 3;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SHOPPER_ID = exports.RECIPIENT_ID = exports.EMAIL = void 0;
4
+ exports.EMAIL = 1;
5
+ exports.RECIPIENT_ID = 2;
6
+ exports.SHOPPER_ID = 3;
7
+ //# sourceMappingURL=RecipientReferenceMethod.js.map
@@ -0,0 +1,6 @@
1
+ export declare const INVITED = "invited";
2
+ export declare const UNVERIFIED = "unverified";
3
+ export declare const VERIFIED = "verified";
4
+ export declare const ACTIVE = "active";
5
+ export declare const PAUSED = "paused";
6
+ export declare const REMOVED = "removed";
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.REMOVED = exports.PAUSED = exports.ACTIVE = exports.VERIFIED = exports.UNVERIFIED = exports.INVITED = void 0;
4
+ exports.INVITED = 'invited';
5
+ exports.UNVERIFIED = 'unverified';
6
+ exports.VERIFIED = 'verified';
7
+ exports.ACTIVE = 'active';
8
+ exports.PAUSED = 'paused';
9
+ exports.REMOVED = 'removed';
10
+ //# sourceMappingURL=RecipientStatus.js.map
@@ -0,0 +1,5 @@
1
+ export interface RateInterface {
2
+ name: string;
3
+ code: string;
4
+ rate: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Rate.js.map
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ export declare const rateInterfaceSchema: z.ZodObject<{
3
+ name: z.ZodString;
4
+ code: z.ZodString;
5
+ rate: z.ZodNumber;
6
+ }, "strip", z.ZodTypeAny, {
7
+ code: string;
8
+ name: string;
9
+ rate: number;
10
+ }, {
11
+ code: string;
12
+ name: string;
13
+ rate: number;
14
+ }>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.rateInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.rateInterfaceSchema = zod_1.z.object({
6
+ name: zod_1.z.string(),
7
+ code: zod_1.z.string(),
8
+ rate: zod_1.z.number()
9
+ });
10
+ //# sourceMappingURL=Rate.zod.js.map
@@ -0,0 +1,11 @@
1
+ import { RateClient } from '../../Client/RateClient';
2
+ import { RateInterface } from './Rate';
3
+ declare class Rates {
4
+ private rates;
5
+ constructor(rates: RateInterface[]);
6
+ getRates(): RateInterface[];
7
+ getRate(currencyCode: string): number;
8
+ update(rateClient: RateClient): Promise<void>;
9
+ private static castRatesObj;
10
+ }
11
+ export { Rates };
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Rates = void 0;
4
+ const BitPayExceptionProvider_1 = require("../../Exceptions/BitPayExceptionProvider");
5
+ class Rates {
6
+ constructor(rates) {
7
+ this.rates = Rates.castRatesObj(rates);
8
+ }
9
+ getRates() {
10
+ return this.rates;
11
+ }
12
+ getRate(currencyCode) {
13
+ let val = 0;
14
+ this.rates.forEach(function (rate) {
15
+ if (rate.code === currencyCode) {
16
+ val = rate.rate;
17
+ return val;
18
+ }
19
+ });
20
+ return val;
21
+ }
22
+ async update(rateClient) {
23
+ const rates = await rateClient.getRates(null);
24
+ this.rates = rates.getRates();
25
+ }
26
+ static castRatesObj(ratesObj) {
27
+ try {
28
+ if (typeof ratesObj === 'string' || ratesObj instanceof String) {
29
+ ratesObj = JSON.parse(ratesObj.toString());
30
+ }
31
+ return ratesObj;
32
+ }
33
+ catch (e) {
34
+ BitPayExceptionProvider_1.BitPayExceptionProvider.throwGenericExceptionWithMessage(e.message);
35
+ throw new Error();
36
+ }
37
+ }
38
+ }
39
+ exports.Rates = Rates;
40
+ //# sourceMappingURL=Rates.js.map