@tax1driver/ts-przelewy24 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.yarn/install-state.gz +0 -0
  2. package/.yarnrc.yml +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +330 -0
  5. package/dist/blik/Alias.d.ts +80 -0
  6. package/dist/blik/Alias.d.ts.map +1 -0
  7. package/dist/blik/Alias.js +3 -0
  8. package/dist/blik/Alias.js.map +1 -0
  9. package/dist/blik/ChargeBlik.d.ts +151 -0
  10. package/dist/blik/ChargeBlik.d.ts.map +1 -0
  11. package/dist/blik/ChargeBlik.js +4 -0
  12. package/dist/blik/ChargeBlik.js.map +1 -0
  13. package/dist/blik/RecurringParams.d.ts +37 -0
  14. package/dist/blik/RecurringParams.d.ts.map +1 -0
  15. package/dist/blik/RecurringParams.js +3 -0
  16. package/dist/blik/RecurringParams.js.map +1 -0
  17. package/dist/blik/index.d.ts +4 -0
  18. package/dist/blik/index.d.ts.map +1 -0
  19. package/dist/blik/index.js +20 -0
  20. package/dist/blik/index.js.map +1 -0
  21. package/dist/cards/CardInfo.d.ts +45 -0
  22. package/dist/cards/CardInfo.d.ts.map +1 -0
  23. package/dist/cards/CardInfo.js +3 -0
  24. package/dist/cards/CardInfo.js.map +1 -0
  25. package/dist/cards/CardNotification.d.ts +178 -0
  26. package/dist/cards/CardNotification.d.ts.map +1 -0
  27. package/dist/cards/CardNotification.js +3 -0
  28. package/dist/cards/CardNotification.js.map +1 -0
  29. package/dist/cards/ChargeCard.d.ts +81 -0
  30. package/dist/cards/ChargeCard.d.ts.map +1 -0
  31. package/dist/cards/ChargeCard.js +3 -0
  32. package/dist/cards/ChargeCard.js.map +1 -0
  33. package/dist/cards/index.d.ts +4 -0
  34. package/dist/cards/index.d.ts.map +1 -0
  35. package/dist/cards/index.js +20 -0
  36. package/dist/cards/index.js.map +1 -0
  37. package/dist/enums/Channel.d.ts +18 -0
  38. package/dist/enums/Channel.d.ts.map +1 -0
  39. package/dist/enums/Channel.js +22 -0
  40. package/dist/enums/Channel.js.map +1 -0
  41. package/dist/enums/Country.d.ts +67 -0
  42. package/dist/enums/Country.d.ts.map +1 -0
  43. package/dist/enums/Country.js +71 -0
  44. package/dist/enums/Country.js.map +1 -0
  45. package/dist/enums/Currency.d.ts +36 -0
  46. package/dist/enums/Currency.d.ts.map +1 -0
  47. package/dist/enums/Currency.js +40 -0
  48. package/dist/enums/Currency.js.map +1 -0
  49. package/dist/enums/Encoding.d.ts +35 -0
  50. package/dist/enums/Encoding.d.ts.map +1 -0
  51. package/dist/enums/Encoding.js +39 -0
  52. package/dist/enums/Encoding.js.map +1 -0
  53. package/dist/enums/Language.d.ts +37 -0
  54. package/dist/enums/Language.d.ts.map +1 -0
  55. package/dist/enums/Language.js +41 -0
  56. package/dist/enums/Language.js.map +1 -0
  57. package/dist/enums/ShippingType.d.ts +13 -0
  58. package/dist/enums/ShippingType.d.ts.map +1 -0
  59. package/dist/enums/ShippingType.js +17 -0
  60. package/dist/enums/ShippingType.js.map +1 -0
  61. package/dist/enums/index.d.ts +7 -0
  62. package/dist/enums/index.d.ts.map +1 -0
  63. package/dist/enums/index.js +23 -0
  64. package/dist/enums/index.js.map +1 -0
  65. package/dist/errors/P24Error.d.ts +38 -0
  66. package/dist/errors/P24Error.d.ts.map +1 -0
  67. package/dist/errors/P24Error.js +49 -0
  68. package/dist/errors/P24Error.js.map +1 -0
  69. package/dist/errors/index.d.ts +2 -0
  70. package/dist/errors/index.d.ts.map +1 -0
  71. package/dist/errors/index.js +18 -0
  72. package/dist/errors/index.js.map +1 -0
  73. package/dist/index.d.ts +11 -0
  74. package/dist/index.d.ts.map +1 -0
  75. package/dist/index.js +27 -0
  76. package/dist/index.js.map +1 -0
  77. package/dist/orders/Additional.d.ts +17 -0
  78. package/dist/orders/Additional.d.ts.map +1 -0
  79. package/dist/orders/Additional.js +3 -0
  80. package/dist/orders/Additional.js.map +1 -0
  81. package/dist/orders/CartItem.d.ts +58 -0
  82. package/dist/orders/CartItem.d.ts.map +1 -0
  83. package/dist/orders/CartItem.js +3 -0
  84. package/dist/orders/CartItem.js.map +1 -0
  85. package/dist/orders/OfflineTransaction.d.ts +51 -0
  86. package/dist/orders/OfflineTransaction.d.ts.map +1 -0
  87. package/dist/orders/OfflineTransaction.js +3 -0
  88. package/dist/orders/OfflineTransaction.js.map +1 -0
  89. package/dist/orders/Order.d.ts +211 -0
  90. package/dist/orders/Order.d.ts.map +1 -0
  91. package/dist/orders/Order.js +3 -0
  92. package/dist/orders/Order.js.map +1 -0
  93. package/dist/orders/OrderCreatedData.d.ts +16 -0
  94. package/dist/orders/OrderCreatedData.d.ts.map +1 -0
  95. package/dist/orders/OrderCreatedData.js +3 -0
  96. package/dist/orders/OrderCreatedData.js.map +1 -0
  97. package/dist/orders/Shipping.d.ts +39 -0
  98. package/dist/orders/Shipping.d.ts.map +1 -0
  99. package/dist/orders/Shipping.js +3 -0
  100. package/dist/orders/Shipping.js.map +1 -0
  101. package/dist/orders/SplitPayment.d.ts +54 -0
  102. package/dist/orders/SplitPayment.d.ts.map +1 -0
  103. package/dist/orders/SplitPayment.js +3 -0
  104. package/dist/orders/SplitPayment.js.map +1 -0
  105. package/dist/orders/Transaction.d.ts +23 -0
  106. package/dist/orders/Transaction.d.ts.map +1 -0
  107. package/dist/orders/Transaction.js +3 -0
  108. package/dist/orders/Transaction.js.map +1 -0
  109. package/dist/orders/TransactionDetails.d.ts +135 -0
  110. package/dist/orders/TransactionDetails.d.ts.map +1 -0
  111. package/dist/orders/TransactionDetails.js +3 -0
  112. package/dist/orders/TransactionDetails.js.map +1 -0
  113. package/dist/orders/index.d.ts +10 -0
  114. package/dist/orders/index.d.ts.map +1 -0
  115. package/dist/orders/index.js +26 -0
  116. package/dist/orders/index.js.map +1 -0
  117. package/dist/p24/BaseParameters.d.ts +46 -0
  118. package/dist/p24/BaseParameters.d.ts.map +1 -0
  119. package/dist/p24/BaseParameters.js +27 -0
  120. package/dist/p24/BaseParameters.js.map +1 -0
  121. package/dist/p24/P24.d.ts +241 -0
  122. package/dist/p24/P24.d.ts.map +1 -0
  123. package/dist/p24/P24.js +484 -0
  124. package/dist/p24/P24.js.map +1 -0
  125. package/dist/p24/P24Options.d.ts +16 -0
  126. package/dist/p24/P24Options.d.ts.map +1 -0
  127. package/dist/p24/P24Options.js +3 -0
  128. package/dist/p24/P24Options.js.map +1 -0
  129. package/dist/p24/endpoints.d.ts +13 -0
  130. package/dist/p24/endpoints.d.ts.map +1 -0
  131. package/dist/p24/endpoints.js +16 -0
  132. package/dist/p24/endpoints.js.map +1 -0
  133. package/dist/p24/index.d.ts +6 -0
  134. package/dist/p24/index.d.ts.map +1 -0
  135. package/dist/p24/index.js +22 -0
  136. package/dist/p24/index.js.map +1 -0
  137. package/dist/p24/ips.d.ts +2 -0
  138. package/dist/p24/ips.d.ts.map +1 -0
  139. package/dist/p24/ips.js +11 -0
  140. package/dist/p24/ips.js.map +1 -0
  141. package/dist/payment/PaymentMethod.d.ts +76 -0
  142. package/dist/payment/PaymentMethod.d.ts.map +1 -0
  143. package/dist/payment/PaymentMethod.js +3 -0
  144. package/dist/payment/PaymentMethod.js.map +1 -0
  145. package/dist/payment/index.d.ts +2 -0
  146. package/dist/payment/index.d.ts.map +1 -0
  147. package/dist/payment/index.js +18 -0
  148. package/dist/payment/index.js.map +1 -0
  149. package/dist/refund/Refund.d.ts +37 -0
  150. package/dist/refund/Refund.d.ts.map +1 -0
  151. package/dist/refund/Refund.js +3 -0
  152. package/dist/refund/Refund.js.map +1 -0
  153. package/dist/refund/RefundRequest.d.ts +38 -0
  154. package/dist/refund/RefundRequest.d.ts.map +1 -0
  155. package/dist/refund/RefundRequest.js +3 -0
  156. package/dist/refund/RefundRequest.js.map +1 -0
  157. package/dist/refund/RefundResult.d.ts +51 -0
  158. package/dist/refund/RefundResult.d.ts.map +1 -0
  159. package/dist/refund/RefundResult.js +3 -0
  160. package/dist/refund/RefundResult.js.map +1 -0
  161. package/dist/refund/TransactionWithRefunds.d.ts +101 -0
  162. package/dist/refund/TransactionWithRefunds.d.ts.map +1 -0
  163. package/dist/refund/TransactionWithRefunds.js +3 -0
  164. package/dist/refund/TransactionWithRefunds.js.map +1 -0
  165. package/dist/refund/index.d.ts +5 -0
  166. package/dist/refund/index.d.ts.map +1 -0
  167. package/dist/refund/index.js +21 -0
  168. package/dist/refund/index.js.map +1 -0
  169. package/dist/responses/ErrorResponse.d.ts +17 -0
  170. package/dist/responses/ErrorResponse.d.ts.map +1 -0
  171. package/dist/responses/ErrorResponse.js +3 -0
  172. package/dist/responses/ErrorResponse.js.map +1 -0
  173. package/dist/responses/SuccessResponse.d.ts +17 -0
  174. package/dist/responses/SuccessResponse.d.ts.map +1 -0
  175. package/dist/responses/SuccessResponse.js +3 -0
  176. package/dist/responses/SuccessResponse.js.map +1 -0
  177. package/dist/responses/index.d.ts +3 -0
  178. package/dist/responses/index.d.ts.map +1 -0
  179. package/dist/responses/index.js +19 -0
  180. package/dist/responses/index.js.map +1 -0
  181. package/dist/utils/hash.d.ts +2 -0
  182. package/dist/utils/hash.d.ts.map +1 -0
  183. package/dist/utils/hash.js +14 -0
  184. package/dist/utils/hash.js.map +1 -0
  185. package/dist/verify/NotificationRequest.d.ts +82 -0
  186. package/dist/verify/NotificationRequest.d.ts.map +1 -0
  187. package/dist/verify/NotificationRequest.js +3 -0
  188. package/dist/verify/NotificationRequest.js.map +1 -0
  189. package/dist/verify/Verification.d.ts +38 -0
  190. package/dist/verify/Verification.d.ts.map +1 -0
  191. package/dist/verify/Verification.js +3 -0
  192. package/dist/verify/Verification.js.map +1 -0
  193. package/dist/verify/VerificationData.d.ts +16 -0
  194. package/dist/verify/VerificationData.d.ts.map +1 -0
  195. package/dist/verify/VerificationData.js +3 -0
  196. package/dist/verify/VerificationData.js.map +1 -0
  197. package/dist/verify/index.d.ts +4 -0
  198. package/dist/verify/index.d.ts.map +1 -0
  199. package/dist/verify/index.js +20 -0
  200. package/dist/verify/index.js.map +1 -0
  201. package/package.json +45 -0
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Payment method information
3
+ *
4
+ * @export
5
+ * @interface PaymentMethod
6
+ */
7
+ export interface PaymentMethod {
8
+ /**
9
+ * Payment method name
10
+ *
11
+ * @type {string}
12
+ * @memberof PaymentMethod
13
+ */
14
+ name: string;
15
+ /**
16
+ * Payment method ID
17
+ *
18
+ * @type {number}
19
+ * @memberof PaymentMethod
20
+ */
21
+ id: number;
22
+ /**
23
+ * Payment method group
24
+ *
25
+ * @type {string}
26
+ * @memberof PaymentMethod
27
+ */
28
+ group: string;
29
+ /**
30
+ * Payment method subgroup
31
+ *
32
+ * @type {string}
33
+ * @memberof PaymentMethod
34
+ */
35
+ subgroup: string;
36
+ /**
37
+ * Whether payment method is active
38
+ *
39
+ * @type {boolean}
40
+ * @memberof PaymentMethod
41
+ */
42
+ status: boolean;
43
+ /**
44
+ * Image URL for desktop
45
+ *
46
+ * @type {string}
47
+ * @memberof PaymentMethod
48
+ */
49
+ imgUrl: string;
50
+ /**
51
+ * Image URL for mobile
52
+ *
53
+ * @type {string}
54
+ * @memberof PaymentMethod
55
+ */
56
+ mobileImgUrl: string;
57
+ /**
58
+ * Whether payment method is available on mobile
59
+ *
60
+ * @type {boolean}
61
+ * @memberof PaymentMethod
62
+ */
63
+ mobile: boolean;
64
+ /**
65
+ * Availability hours for the payment method
66
+ *
67
+ * @type {{ mondayToFriday: string; saturday: string; sunday: string }}
68
+ * @memberof PaymentMethod
69
+ */
70
+ availabilityHours: {
71
+ mondayToFriday: string;
72
+ saturday: string;
73
+ sunday: string;
74
+ };
75
+ }
76
+ //# sourceMappingURL=PaymentMethod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethod.d.ts","sourceRoot":"","sources":["../../src/payment/PaymentMethod.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,iBAAiB,EAAE;QACf,cAAc,EAAE,MAAM,CAAC;QACvB,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAClB,CAAC;CACL"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PaymentMethod.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaymentMethod.js","sourceRoot":"","sources":["../../src/payment/PaymentMethod.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './PaymentMethod';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./PaymentMethod"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/payment/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Refund
3
+ *
4
+ * @export
5
+ * @interface Refund
6
+ */
7
+ export interface Refund {
8
+ /**
9
+ * Transaction order ID from Przelewy24
10
+ *
11
+ * @type {number}
12
+ * @memberof Refund
13
+ */
14
+ orderId: number;
15
+ /**
16
+ * Transaction session ID from the Partner’s system
17
+ *
18
+ * @type {string}
19
+ * @memberof Refund
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * Amount of refund
24
+ *
25
+ * @type {number}
26
+ * @memberof Refund
27
+ */
28
+ amount: number;
29
+ /**
30
+ * Refund description visible in transfer details
31
+ *
32
+ * @type {string}
33
+ * @memberof Refund
34
+ */
35
+ description: string;
36
+ }
37
+ //# sourceMappingURL=Refund.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Refund.d.ts","sourceRoot":"","sources":["../../src/refund/Refund.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACnB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAA;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Refund.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Refund.js","sourceRoot":"","sources":["../../src/refund/Refund.ts"],"names":[],"mappings":""}
@@ -0,0 +1,38 @@
1
+ import { Refund } from "./Refund";
2
+ /**
3
+ * Refund request
4
+ *
5
+ * @export
6
+ * @interface RefundRequest
7
+ */
8
+ export interface RefundRequest {
9
+ /**
10
+ * Individual request ID
11
+ *
12
+ * @type {string}
13
+ * @memberof RefundRequest
14
+ */
15
+ requestId: string;
16
+ /**
17
+ * Refunds
18
+ *
19
+ * @type {Refund[]}
20
+ * @memberof RefundRequest
21
+ */
22
+ refunds: Refund[];
23
+ /**
24
+ * Individual ID for a correct refund request in the merchant’s system
25
+ *
26
+ * @type {string}
27
+ * @memberof RefundRequest
28
+ */
29
+ refundsUuid: string;
30
+ /**
31
+ * Notification address for the refund batch transferred
32
+ *
33
+ * @type {string}
34
+ * @memberof RefundRequest
35
+ */
36
+ urlStatus?: string;
37
+ }
38
+ //# sourceMappingURL=RefundRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundRequest.d.ts","sourceRoot":"","sources":["../../src/refund/RefundRequest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC1B;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RefundRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundRequest.js","sourceRoot":"","sources":["../../src/refund/RefundRequest.ts"],"names":[],"mappings":""}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Refund result
3
+ *
4
+ * @export
5
+ * @interface RefundResult
6
+ */
7
+ export interface RefundResult {
8
+ /**
9
+ * Transaction order ID from Przelewy24
10
+ *
11
+ * @type {string}
12
+ * @memberof RefundResult
13
+ */
14
+ orderId: string;
15
+ /**
16
+ * Transaction session ID from the Partner’s system
17
+ *
18
+ * @type {string}
19
+ * @memberof RefundResult
20
+ */
21
+ sessionId: string;
22
+ /**
23
+ * Amount of refund
24
+ *
25
+ * @type {string}
26
+ * @memberof RefundResult
27
+ */
28
+ amount: string;
29
+ /**
30
+ * Transaction description
31
+ *
32
+ * @type {string}
33
+ * @memberof RefundResult
34
+ */
35
+ description: string;
36
+ /**
37
+ * Was refund attempt successful?
38
+ *
39
+ * @type {boolean}
40
+ * @memberof RefundResult
41
+ */
42
+ status: boolean;
43
+ /**
44
+ * Text description of successful refund
45
+ *
46
+ * @type {string}
47
+ * @memberof RefundResult
48
+ */
49
+ message: string;
50
+ }
51
+ //# sourceMappingURL=RefundResult.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundResult.d.ts","sourceRoot":"","sources":["../../src/refund/RefundResult.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RefundResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RefundResult.js","sourceRoot":"","sources":["../../src/refund/RefundResult.ts"],"names":[],"mappings":""}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Individual refund in a collection
3
+ *
4
+ * @export
5
+ * @interface RefundsCollection
6
+ */
7
+ export interface RefundsCollection {
8
+ /**
9
+ * Batch ID for the refund
10
+ *
11
+ * @type {number}
12
+ * @memberof RefundsCollection
13
+ */
14
+ batchId: number;
15
+ /**
16
+ * Refund request ID
17
+ *
18
+ * @type {string}
19
+ * @memberof RefundsCollection
20
+ */
21
+ requestId: string;
22
+ /**
23
+ * Refund date
24
+ *
25
+ * @type {string}
26
+ * @memberof RefundsCollection
27
+ */
28
+ date: string;
29
+ /**
30
+ * Login of user who initiated the refund
31
+ *
32
+ * @type {string}
33
+ * @memberof RefundsCollection
34
+ */
35
+ login: string;
36
+ /**
37
+ * Refund description
38
+ *
39
+ * @type {string}
40
+ * @memberof RefundsCollection
41
+ */
42
+ description: string;
43
+ /**
44
+ * Refund status code
45
+ *
46
+ * @type {number}
47
+ * @memberof RefundsCollection
48
+ */
49
+ status: number;
50
+ /**
51
+ * Refunded amount
52
+ *
53
+ * @type {number}
54
+ * @memberof RefundsCollection
55
+ */
56
+ amount: number;
57
+ }
58
+ /**
59
+ * Transaction with all associated refunds
60
+ *
61
+ * @export
62
+ * @interface TransactionWithRefunds
63
+ */
64
+ export interface TransactionWithRefunds {
65
+ /**
66
+ * Order ID from Przelewy24
67
+ *
68
+ * @type {number}
69
+ * @memberof TransactionWithRefunds
70
+ */
71
+ orderId: number;
72
+ /**
73
+ * Transaction session ID from the Partner's system
74
+ *
75
+ * @type {string}
76
+ * @memberof TransactionWithRefunds
77
+ */
78
+ sessionId: string;
79
+ /**
80
+ * Original transaction amount
81
+ *
82
+ * @type {number}
83
+ * @memberof TransactionWithRefunds
84
+ */
85
+ amount: number;
86
+ /**
87
+ * Transaction currency
88
+ *
89
+ * @type {string}
90
+ * @memberof TransactionWithRefunds
91
+ */
92
+ currency: string;
93
+ /**
94
+ * Array of refunds associated with this transaction
95
+ *
96
+ * @type {Array<RefundsCollection>}
97
+ * @memberof TransactionWithRefunds
98
+ */
99
+ refunds: Array<RefundsCollection>;
100
+ }
101
+ //# sourceMappingURL=TransactionWithRefunds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionWithRefunds.d.ts","sourceRoot":"","sources":["../../src/refund/TransactionWithRefunds.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACnC;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;CACrC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TransactionWithRefunds.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TransactionWithRefunds.js","sourceRoot":"","sources":["../../src/refund/TransactionWithRefunds.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from './Refund';
2
+ export * from './RefundRequest';
3
+ export * from './RefundResult';
4
+ export * from './TransactionWithRefunds';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/refund/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Refund"), exports);
18
+ __exportStar(require("./RefundRequest"), exports);
19
+ __exportStar(require("./RefundResult"), exports);
20
+ __exportStar(require("./TransactionWithRefunds"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/refund/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,kDAAgC;AAChC,iDAA+B;AAC/B,2DAAyC"}
@@ -0,0 +1,17 @@
1
+ export interface ErrorResponse<T> {
2
+ /**
3
+ * Error
4
+ *
5
+ * @type {T}
6
+ * @memberof ErrorResponse
7
+ */
8
+ error: T;
9
+ /**
10
+ * Error code
11
+ *
12
+ * @type {number}
13
+ * @memberof ErrorResponse
14
+ */
15
+ code: number;
16
+ }
17
+ //# sourceMappingURL=ErrorResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorResponse.d.ts","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa,CAAC,CAAC;IAC5B;;;;;OAKG;IACH,KAAK,EAAE,CAAC,CAAC;IAET;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAA;CACf"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ErrorResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ErrorResponse.js","sourceRoot":"","sources":["../../src/responses/ErrorResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export interface SuccessResponse<T> {
2
+ /**
3
+ * Response code
4
+ *
5
+ * @type {string}
6
+ * @memberof SuccessResponse
7
+ */
8
+ responseCode: string;
9
+ /**
10
+ * Response data
11
+ *
12
+ * @type {T}
13
+ * @memberof SuccessResponse
14
+ */
15
+ data: T;
16
+ }
17
+ //# sourceMappingURL=SuccessResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuccessResponse.d.ts","sourceRoot":"","sources":["../../src/responses/SuccessResponse.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,CAAC;IAC9B;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,IAAI,EAAE,CAAC,CAAA;CACV"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SuccessResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SuccessResponse.js","sourceRoot":"","sources":["../../src/responses/SuccessResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export * from './ErrorResponse';
2
+ export * from './SuccessResponse';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ErrorResponse"), exports);
18
+ __exportStar(require("./SuccessResponse"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,oDAAkC"}
@@ -0,0 +1,2 @@
1
+ export declare function calculateSHA384(data: string): string;
2
+ //# sourceMappingURL=hash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.d.ts","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKpD"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.calculateSHA384 = calculateSHA384;
7
+ const crypto_1 = __importDefault(require("crypto"));
8
+ function calculateSHA384(data) {
9
+ return crypto_1.default
10
+ .createHash('sha384')
11
+ .update(data, 'utf8')
12
+ .digest('hex');
13
+ }
14
+ //# sourceMappingURL=hash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hash.js","sourceRoot":"","sources":["../../src/utils/hash.ts"],"names":[],"mappings":";;;;;AAEA,0CAKC;AAPD,oDAA4B;AAE5B,SAAgB,eAAe,CAAC,IAAY;IACxC,OAAO,gBAAM;SACR,UAAU,CAAC,QAAQ,CAAC;SACpB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC;SACpB,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Notification request
3
+ *
4
+ * @export
5
+ * @interface NotificationRequest
6
+ */
7
+ export interface NotificationRequest {
8
+ /**
9
+ * Merchant identification number
10
+ *
11
+ * @type {number}
12
+ * @memberof NotificationRequest
13
+ */
14
+ merchantId: number;
15
+ /**
16
+ * Shop identification number (defaults to merchant ID)
17
+ *
18
+ * @type {number}
19
+ * @memberof NotificationRequest
20
+ */
21
+ posId: number;
22
+ /**
23
+ * Unique identifier from merchant's system
24
+ *
25
+ * @type {string}
26
+ * @memberof NotificationRequest
27
+ */
28
+ sessionId: string;
29
+ /**
30
+ * Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
31
+ *
32
+ * @type {number}
33
+ * @memberof NotificationRequest
34
+ */
35
+ amount: number;
36
+ /**
37
+ * Transaction amount expressed in lowest currency unit, e.g. 1.23 PLN = 123
38
+ *
39
+ * @type {number}
40
+ * @memberof NotificationRequest
41
+ */
42
+ originAmount: number;
43
+ /**
44
+ * Currency compatible with ISO, e.g. PLN
45
+ *
46
+ * @type {string}
47
+ * @memberof NotificationRequest
48
+ */
49
+ currency: string;
50
+ /**
51
+ * Transaction number assigned by P24
52
+ *
53
+ * @type {number}
54
+ * @memberof NotificationRequest
55
+ */
56
+ orderId: number;
57
+ /**
58
+ * Payment method used by customer
59
+ *
60
+ * @type {number}
61
+ * @memberof NotificationRequest
62
+ */
63
+ methodId: number;
64
+ /**
65
+ * Payment title
66
+ *
67
+ * @type {string}
68
+ * @memberof NotificationRequest
69
+ */
70
+ statement: string;
71
+ /**
72
+ * Checksum of parameters:
73
+ * ( {"merchantId": int, "posId": int, "sessionId": "string", "amount": int, "originAmount": int, "currency": "string", "orderId": int, "methodId": int, "statement": string, "crc": "string"} )
74
+ *
75
+ * calculated with the use of sha384
76
+ *
77
+ * @type {string}
78
+ * @memberof NotificationRequest
79
+ */
80
+ sign: string;
81
+ }
82
+ //# sourceMappingURL=NotificationRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationRequest.d.ts","sourceRoot":"","sources":["../../src/verify/NotificationRequest.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;OAKG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,IAAI,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=NotificationRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotificationRequest.js","sourceRoot":"","sources":["../../src/verify/NotificationRequest.ts"],"names":[],"mappings":""}