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,6 @@
1
+ import { BitPayLogger } from './BitPayLogger';
2
+ export declare class EmptyLogger implements BitPayLogger {
3
+ logError(message: string): void;
4
+ logRequest(method: string, endpoint: string, json: string | null): void;
5
+ logResponse(method: string, endpoint: string, json: string): void;
6
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EmptyLogger = void 0;
4
+ /* eslint @typescript-eslint/no-unused-vars: "off" */
5
+ class EmptyLogger {
6
+ logError(message) { }
7
+ logRequest(method, endpoint, json) { }
8
+ logResponse(method, endpoint, json) { }
9
+ }
10
+ exports.EmptyLogger = EmptyLogger;
11
+ //# sourceMappingURL=EmptyLogger.js.map
@@ -0,0 +1,11 @@
1
+ import { BitPayLogger } from './BitPayLogger';
2
+ export declare class LoggerProvider {
3
+ private static logger;
4
+ private constructor();
5
+ static getLogger(): BitPayLogger;
6
+ /**
7
+ * Set BitPayLogger.
8
+ * @param bitPayLogger BitPayLogger
9
+ */
10
+ static setLogger(bitPayLogger: BitPayLogger): void;
11
+ }
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LoggerProvider = void 0;
4
+ const EmptyLogger_1 = require("./EmptyLogger");
5
+ class LoggerProvider {
6
+ constructor() { }
7
+ static getLogger() {
8
+ if (LoggerProvider.logger === null) {
9
+ LoggerProvider.logger = new EmptyLogger_1.EmptyLogger();
10
+ }
11
+ return LoggerProvider.logger;
12
+ }
13
+ /**
14
+ * Set BitPayLogger.
15
+ * @param bitPayLogger BitPayLogger
16
+ */
17
+ static setLogger(bitPayLogger) {
18
+ LoggerProvider.logger = bitPayLogger;
19
+ }
20
+ }
21
+ exports.LoggerProvider = LoggerProvider;
22
+ LoggerProvider.logger = null;
23
+ //# sourceMappingURL=LoggerProvider.js.map
File without changes
@@ -0,0 +1,29 @@
1
+ // import { BitPayLogger } from './BitPayLogger';
2
+ // import * as winston from 'winston';
3
+ //
4
+ // export class WinstonLoggerExample implements BitPayLogger {
5
+ // private logger: winston.Logger;
6
+ //
7
+ // constructor() {
8
+ // this.logger = winston.createLogger({
9
+ // level: 'info',
10
+ // transports: [
11
+ // new winston.transports.File({ filename: 'error.log', level: 'error' }),
12
+ // new winston.transports.File({ filename: 'logs.log' })
13
+ // ]
14
+ // });
15
+ // }
16
+ //
17
+ // logRequest(method: string, endpoint: string, json: string) {
18
+ // this.logger.info('Request method:' + method + ' Endpoint: ' + endpoint + ' Json: ' + json);
19
+ // }
20
+ //
21
+ // logResponse(method: string, endpoint: string, json: string) {
22
+ // this.logger.info('Response method: ' + method + ' Endpoint: ' + endpoint + ' Json: ' + json);
23
+ // }
24
+ //
25
+ // logError(message: string) {
26
+ // this.logger.error(message);
27
+ // }
28
+ // }
29
+ //# sourceMappingURL=WinstonLoggerExample.js.map
@@ -0,0 +1,58 @@
1
+ import { Item } from './Item';
2
+ export interface BillInterface {
3
+ number: string;
4
+ currency: string;
5
+ email: string;
6
+ items: Item[];
7
+ token?: string;
8
+ name?: string;
9
+ address1?: string;
10
+ address2?: string;
11
+ city?: string;
12
+ state?: string;
13
+ zip?: string;
14
+ country?: string;
15
+ phone?: string;
16
+ dueDate?: string;
17
+ passProcessingFee?: boolean;
18
+ status?: string;
19
+ url?: string;
20
+ createdDate?: string;
21
+ id?: string;
22
+ merchant?: string;
23
+ cc?: string[];
24
+ }
25
+ export declare class Bill implements BillInterface {
26
+ number: string;
27
+ currency: string;
28
+ email: string;
29
+ items: Item[];
30
+ address1?: string;
31
+ address2?: string;
32
+ cc?: string[];
33
+ city?: string;
34
+ country?: string;
35
+ createdDate?: string;
36
+ dueDate?: string;
37
+ id?: string;
38
+ merchant?: string;
39
+ name?: string;
40
+ passProcessingFee?: boolean;
41
+ phone?: string;
42
+ state?: string;
43
+ status?: string;
44
+ token?: string;
45
+ url?: string;
46
+ zip?: string;
47
+ /**
48
+ * Constructor, create a minimal request Bill object.
49
+ *
50
+ * @param number A string for tracking purposes.
51
+ * @param currency The three digit currency type used to compute the bill's amount.
52
+ * @param email The email address of the receiver for this bill.
53
+ * @param items The list of itens to add to this bill.
54
+ */
55
+ constructor(number: string, currency: string, email: string, items: Item[]);
56
+ setCurrency(currency: string): void;
57
+ }
58
+ export default Item;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Bill = void 0;
4
+ const Currency_1 = require("../../Currency");
5
+ const Item_1 = require("./Item");
6
+ const BitPayExceptionProvider_1 = require("../../Exceptions/BitPayExceptionProvider");
7
+ class Bill {
8
+ /**
9
+ * Constructor, create a minimal request Bill object.
10
+ *
11
+ * @param number A string for tracking purposes.
12
+ * @param currency The three digit currency type used to compute the bill's amount.
13
+ * @param email The email address of the receiver for this bill.
14
+ * @param items The list of itens to add to this bill.
15
+ */
16
+ constructor(number, currency, email, items) {
17
+ this.number = number;
18
+ this.setCurrency(currency);
19
+ this.email = email;
20
+ this.items = items;
21
+ }
22
+ setCurrency(currency) {
23
+ if (!Currency_1.Currency.isValid(currency))
24
+ BitPayExceptionProvider_1.BitPayExceptionProvider.throwInvalidCurrencyException(currency);
25
+ this.currency = currency;
26
+ }
27
+ }
28
+ exports.Bill = Bill;
29
+ exports.default = Item_1.Item;
30
+ //# sourceMappingURL=Bill.js.map
@@ -0,0 +1,93 @@
1
+ import { z } from 'zod';
2
+ export declare const billInterfaceSchema: z.ZodObject<{
3
+ number: z.ZodString;
4
+ currency: z.ZodString;
5
+ email: z.ZodString;
6
+ token: z.ZodOptional<z.ZodString>;
7
+ name: z.ZodOptional<z.ZodString>;
8
+ items: z.ZodArray<z.ZodObject<{
9
+ id: z.ZodOptional<z.ZodString>;
10
+ description: z.ZodOptional<z.ZodString>;
11
+ price: z.ZodNumber;
12
+ quantity: z.ZodNumber;
13
+ }, "strip", z.ZodTypeAny, {
14
+ price: number;
15
+ quantity: number;
16
+ id?: string | undefined;
17
+ description?: string | undefined;
18
+ }, {
19
+ price: number;
20
+ quantity: number;
21
+ id?: string | undefined;
22
+ description?: string | undefined;
23
+ }>, "many">;
24
+ address1: z.ZodOptional<z.ZodString>;
25
+ address2: z.ZodOptional<z.ZodString>;
26
+ city: z.ZodOptional<z.ZodString>;
27
+ state: z.ZodOptional<z.ZodString>;
28
+ zip: z.ZodOptional<z.ZodString>;
29
+ country: z.ZodOptional<z.ZodString>;
30
+ phone: z.ZodOptional<z.ZodString>;
31
+ dueDate: z.ZodOptional<z.ZodString>;
32
+ passProcessingFee: z.ZodOptional<z.ZodBoolean>;
33
+ status: z.ZodOptional<z.ZodString>;
34
+ url: z.ZodOptional<z.ZodString>;
35
+ createdDate: z.ZodOptional<z.ZodString>;
36
+ id: z.ZodOptional<z.ZodString>;
37
+ merchant: z.ZodOptional<z.ZodString>;
38
+ cc: z.ZodUnion<[z.ZodArray<z.ZodString, "many">, z.ZodTuple<[], null>]>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ number: string;
41
+ email: string;
42
+ currency: string;
43
+ items: {
44
+ price: number;
45
+ quantity: number;
46
+ id?: string | undefined;
47
+ description?: string | undefined;
48
+ }[];
49
+ cc: string[] | [];
50
+ id?: string | undefined;
51
+ state?: string | undefined;
52
+ url?: string | undefined;
53
+ name?: string | undefined;
54
+ country?: string | undefined;
55
+ status?: string | undefined;
56
+ token?: string | undefined;
57
+ merchant?: string | undefined;
58
+ address1?: string | undefined;
59
+ address2?: string | undefined;
60
+ city?: string | undefined;
61
+ zip?: string | undefined;
62
+ phone?: string | undefined;
63
+ dueDate?: string | undefined;
64
+ passProcessingFee?: boolean | undefined;
65
+ createdDate?: string | undefined;
66
+ }, {
67
+ number: string;
68
+ email: string;
69
+ currency: string;
70
+ items: {
71
+ price: number;
72
+ quantity: number;
73
+ id?: string | undefined;
74
+ description?: string | undefined;
75
+ }[];
76
+ cc: string[] | [];
77
+ id?: string | undefined;
78
+ state?: string | undefined;
79
+ url?: string | undefined;
80
+ name?: string | undefined;
81
+ country?: string | undefined;
82
+ status?: string | undefined;
83
+ token?: string | undefined;
84
+ merchant?: string | undefined;
85
+ address1?: string | undefined;
86
+ address2?: string | undefined;
87
+ city?: string | undefined;
88
+ zip?: string | undefined;
89
+ phone?: string | undefined;
90
+ dueDate?: string | undefined;
91
+ passProcessingFee?: boolean | undefined;
92
+ createdDate?: string | undefined;
93
+ }>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.billInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const Item_zod_1 = require("./Item.zod");
6
+ exports.billInterfaceSchema = zod_1.z.object({
7
+ number: zod_1.z.string(),
8
+ currency: zod_1.z.string(),
9
+ email: zod_1.z.string(),
10
+ token: zod_1.z.string().optional(),
11
+ name: zod_1.z.string().optional(),
12
+ items: (0, zod_1.array)(Item_zod_1.itemInterfaceSchema),
13
+ address1: zod_1.z.string().optional(),
14
+ address2: zod_1.z.string().optional(),
15
+ city: zod_1.z.string().optional(),
16
+ state: zod_1.z.string().optional(),
17
+ zip: zod_1.z.string().optional(),
18
+ country: zod_1.z.string().optional(),
19
+ phone: zod_1.z.string().optional(),
20
+ dueDate: zod_1.z.string().optional(),
21
+ passProcessingFee: zod_1.z.boolean().optional(),
22
+ status: zod_1.z.string().optional(),
23
+ url: zod_1.z.string().optional(),
24
+ createdDate: zod_1.z.string().optional(),
25
+ id: zod_1.z.string().optional(),
26
+ merchant: zod_1.z.string().optional(),
27
+ cc: zod_1.z.union([zod_1.z.array(zod_1.z.string()), zod_1.z.tuple([])])
28
+ });
29
+ //# sourceMappingURL=Bill.zod.js.map
@@ -0,0 +1,5 @@
1
+ export declare const Draft = "draft";
2
+ export declare const Sent = "sent";
3
+ export declare const New = "new";
4
+ export declare const Paid = "paid";
5
+ export declare const Complete = "complete";
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Complete = exports.Paid = exports.New = exports.Sent = exports.Draft = void 0;
4
+ exports.Draft = 'draft';
5
+ exports.Sent = 'sent';
6
+ exports.New = 'new';
7
+ exports.Paid = 'paid';
8
+ exports.Complete = 'complete';
9
+ //# sourceMappingURL=BillStatus.js.map
@@ -0,0 +1,13 @@
1
+ export interface ItemInterface {
2
+ id?: string;
3
+ description?: string;
4
+ price: number;
5
+ quantity: number;
6
+ }
7
+ export declare class Item implements ItemInterface {
8
+ description?: string;
9
+ id?: string;
10
+ quantity: number;
11
+ price: number;
12
+ constructor();
13
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Item = void 0;
4
+ class Item {
5
+ constructor() { }
6
+ }
7
+ exports.Item = Item;
8
+ //# sourceMappingURL=Item.js.map
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ export declare const itemInterfaceSchema: z.ZodObject<{
3
+ id: z.ZodOptional<z.ZodString>;
4
+ description: z.ZodOptional<z.ZodString>;
5
+ price: z.ZodNumber;
6
+ quantity: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ price: number;
9
+ quantity: number;
10
+ id?: string | undefined;
11
+ description?: string | undefined;
12
+ }, {
13
+ price: number;
14
+ quantity: number;
15
+ id?: string | undefined;
16
+ description?: string | undefined;
17
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.itemInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.itemInterfaceSchema = zod_1.z.object({
6
+ id: zod_1.z.string().optional(),
7
+ description: zod_1.z.string().optional(),
8
+ price: zod_1.z.number(),
9
+ quantity: zod_1.z.number()
10
+ });
11
+ //# sourceMappingURL=Item.zod.js.map
@@ -0,0 +1,28 @@
1
+ export interface CurrencyInterface {
2
+ code: string;
3
+ name: string;
4
+ symbol: string;
5
+ precision: number;
6
+ decimals: number;
7
+ plural: string;
8
+ alts: string;
9
+ minimum: number;
10
+ sanctioned: boolean;
11
+ displayCode?: string;
12
+ chain?: string;
13
+ maxSupply?: string;
14
+ }
15
+ export declare class Currency implements CurrencyInterface {
16
+ code: string;
17
+ name: string;
18
+ symbol: string;
19
+ precision: number;
20
+ decimals: number;
21
+ plural: string;
22
+ alts: string;
23
+ minimum: number;
24
+ sanctioned: boolean;
25
+ displayCode?: string;
26
+ chain?: string;
27
+ maxSupply?: string;
28
+ }
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Currency = void 0;
4
+ class Currency {
5
+ }
6
+ exports.Currency = Currency;
7
+ //# sourceMappingURL=Currency.js.map
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ export declare const currencyInterfaceSchema: z.ZodObject<{
3
+ code: z.ZodString;
4
+ name: z.ZodString;
5
+ symbol: z.ZodString;
6
+ precision: z.ZodNumber;
7
+ decimals: z.ZodNumber;
8
+ plural: z.ZodString;
9
+ alts: z.ZodString;
10
+ minimum: z.ZodNumber;
11
+ sanctioned: z.ZodBoolean;
12
+ displayCode: z.ZodOptional<z.ZodString>;
13
+ chain: z.ZodOptional<z.ZodString>;
14
+ maxSupply: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ symbol: string;
17
+ code: string;
18
+ name: string;
19
+ minimum: number;
20
+ precision: number;
21
+ decimals: number;
22
+ plural: string;
23
+ alts: string;
24
+ sanctioned: boolean;
25
+ displayCode?: string | undefined;
26
+ chain?: string | undefined;
27
+ maxSupply?: string | undefined;
28
+ }, {
29
+ symbol: string;
30
+ code: string;
31
+ name: string;
32
+ minimum: number;
33
+ precision: number;
34
+ decimals: number;
35
+ plural: string;
36
+ alts: string;
37
+ sanctioned: boolean;
38
+ displayCode?: string | undefined;
39
+ chain?: string | undefined;
40
+ maxSupply?: string | undefined;
41
+ }>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.currencyInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.currencyInterfaceSchema = zod_1.z.object({
6
+ code: zod_1.z.string(),
7
+ name: zod_1.z.string(),
8
+ symbol: zod_1.z.string(),
9
+ precision: zod_1.z.number(),
10
+ decimals: zod_1.z.number(),
11
+ plural: zod_1.z.string(),
12
+ alts: zod_1.z.string(),
13
+ minimum: zod_1.z.number(),
14
+ sanctioned: zod_1.z.boolean(),
15
+ displayCode: zod_1.z.string().optional(),
16
+ chain: zod_1.z.string().optional(),
17
+ maxSupply: zod_1.z.string().optional()
18
+ });
19
+ //# sourceMappingURL=Currency.zod.js.map
@@ -0,0 +1,25 @@
1
+ export interface BuyerInterface {
2
+ email?: string;
3
+ name?: string;
4
+ address1?: string;
5
+ address2?: string;
6
+ locality?: string;
7
+ region?: string;
8
+ postalCode?: string;
9
+ country?: string;
10
+ phone?: string;
11
+ notify?: boolean;
12
+ }
13
+ export declare class Buyer implements BuyerInterface {
14
+ email?: string;
15
+ address1?: string;
16
+ address2?: string;
17
+ country?: string;
18
+ locality?: string;
19
+ name?: string;
20
+ notify?: boolean;
21
+ phone?: string;
22
+ postalCode?: string;
23
+ region?: string;
24
+ constructor();
25
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Buyer = void 0;
4
+ class Buyer {
5
+ constructor() { }
6
+ }
7
+ exports.Buyer = Buyer;
8
+ //# sourceMappingURL=Buyer.js.map
@@ -0,0 +1,35 @@
1
+ import { z } from 'zod';
2
+ export declare const buyerInterfaceSchema: z.ZodObject<{
3
+ email: z.ZodOptional<z.ZodString>;
4
+ name: z.ZodOptional<z.ZodString>;
5
+ address1: z.ZodOptional<z.ZodString>;
6
+ address2: z.ZodOptional<z.ZodString>;
7
+ locality: z.ZodOptional<z.ZodString>;
8
+ region: z.ZodOptional<z.ZodString>;
9
+ postalCode: z.ZodOptional<z.ZodString>;
10
+ country: z.ZodOptional<z.ZodString>;
11
+ phone: z.ZodOptional<z.ZodString>;
12
+ notify: z.ZodOptional<z.ZodBoolean>;
13
+ }, "strip", z.ZodTypeAny, {
14
+ name?: string | undefined;
15
+ country?: string | undefined;
16
+ email?: string | undefined;
17
+ region?: string | undefined;
18
+ address1?: string | undefined;
19
+ address2?: string | undefined;
20
+ phone?: string | undefined;
21
+ locality?: string | undefined;
22
+ postalCode?: string | undefined;
23
+ notify?: boolean | undefined;
24
+ }, {
25
+ name?: string | undefined;
26
+ country?: string | undefined;
27
+ email?: string | undefined;
28
+ region?: string | undefined;
29
+ address1?: string | undefined;
30
+ address2?: string | undefined;
31
+ phone?: string | undefined;
32
+ locality?: string | undefined;
33
+ postalCode?: string | undefined;
34
+ notify?: boolean | undefined;
35
+ }>;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buyerInterfaceSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.buyerInterfaceSchema = zod_1.z.object({
6
+ email: zod_1.z.string().optional(),
7
+ name: zod_1.z.string().optional(),
8
+ address1: zod_1.z.string().optional(),
9
+ address2: zod_1.z.string().optional(),
10
+ locality: zod_1.z.string().optional(),
11
+ region: zod_1.z.string().optional(),
12
+ postalCode: zod_1.z.string().optional(),
13
+ country: zod_1.z.string().optional(),
14
+ phone: zod_1.z.string().optional(),
15
+ notify: zod_1.z.boolean().optional()
16
+ });
17
+ //# sourceMappingURL=Buyer.zod.js.map