liqpay-nestjs 0.2.1

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 (136) hide show
  1. package/README.md +15 -0
  2. package/dist/core/constants.d.ts +3 -0
  3. package/dist/core/constants.js +7 -0
  4. package/dist/core/index.d.ts +1 -0
  5. package/dist/core/index.js +17 -0
  6. package/dist/core/liqpay.client.d.ts +65 -0
  7. package/dist/core/liqpay.client.js +156 -0
  8. package/dist/core/schemas/base/envelope.schema.d.ts +6 -0
  9. package/dist/core/schemas/base/envelope.schema.js +11 -0
  10. package/dist/core/schemas/base/index.d.ts +3 -0
  11. package/dist/core/schemas/base/index.js +19 -0
  12. package/dist/core/schemas/base/request.type.d.ts +4 -0
  13. package/dist/core/schemas/base/request.type.js +2 -0
  14. package/dist/core/schemas/base/response.type.d.ts +15 -0
  15. package/dist/core/schemas/base/response.type.js +2 -0
  16. package/dist/core/schemas/checkout/checkout-callback.schema.d.ts +241 -0
  17. package/dist/core/schemas/checkout/checkout-callback.schema.js +91 -0
  18. package/dist/core/schemas/checkout/checkout-request.schema.d.ts +421 -0
  19. package/dist/core/schemas/checkout/checkout-request.schema.js +70 -0
  20. package/dist/core/schemas/checkout/index.d.ts +2 -0
  21. package/dist/core/schemas/checkout/index.js +18 -0
  22. package/dist/core/schemas/common/detail-addenda.schema.d.ts +11 -0
  23. package/dist/core/schemas/common/detail-addenda.schema.js +13 -0
  24. package/dist/core/schemas/common/enums/action.schema.d.ts +12 -0
  25. package/dist/core/schemas/common/enums/action.schema.js +17 -0
  26. package/dist/core/schemas/common/enums/bonus-type.schema.d.ts +8 -0
  27. package/dist/core/schemas/common/enums/bonus-type.schema.js +10 -0
  28. package/dist/core/schemas/common/enums/commission-payer.schema.d.ts +6 -0
  29. package/dist/core/schemas/common/enums/commission-payer.schema.js +5 -0
  30. package/dist/core/schemas/common/enums/currency.schema.d.ts +7 -0
  31. package/dist/core/schemas/common/enums/currency.schema.js +8 -0
  32. package/dist/core/schemas/common/enums/error-code.schema.d.ts +117 -0
  33. package/dist/core/schemas/common/enums/error-code.schema.js +122 -0
  34. package/dist/core/schemas/common/enums/index.d.ts +13 -0
  35. package/dist/core/schemas/common/enums/index.js +29 -0
  36. package/dist/core/schemas/common/enums/language.schema.d.ts +6 -0
  37. package/dist/core/schemas/common/enums/language.schema.js +5 -0
  38. package/dist/core/schemas/common/enums/mpi-eci.schema.d.ts +3 -0
  39. package/dist/core/schemas/common/enums/mpi-eci.schema.js +9 -0
  40. package/dist/core/schemas/common/enums/payment-status.schema.d.ts +81 -0
  41. package/dist/core/schemas/common/enums/payment-status.schema.js +48 -0
  42. package/dist/core/schemas/common/enums/paytype.schema.d.ts +14 -0
  43. package/dist/core/schemas/common/enums/paytype.schema.js +16 -0
  44. package/dist/core/schemas/common/enums/request-result.schema.d.ts +6 -0
  45. package/dist/core/schemas/common/enums/request-result.schema.js +5 -0
  46. package/dist/core/schemas/common/enums/subscribe-period.schema.d.ts +8 -0
  47. package/dist/core/schemas/common/enums/subscribe-period.schema.js +10 -0
  48. package/dist/core/schemas/common/enums/unit.schema.d.ts +55 -0
  49. package/dist/core/schemas/common/enums/unit.schema.js +58 -0
  50. package/dist/core/schemas/common/enums/version.schema.d.ts +2 -0
  51. package/dist/core/schemas/common/enums/version.schema.js +8 -0
  52. package/dist/core/schemas/common/fiscal-data.schema.d.ts +86 -0
  53. package/dist/core/schemas/common/fiscal-data.schema.js +41 -0
  54. package/dist/core/schemas/common/index.d.ts +3 -0
  55. package/dist/core/schemas/common/index.js +19 -0
  56. package/dist/core/schemas/common/split-rule.schema.d.ts +36 -0
  57. package/dist/core/schemas/common/split-rule.schema.js +13 -0
  58. package/dist/core/schemas/error/error-response.schema.d.ts +121 -0
  59. package/dist/core/schemas/error/error-response.schema.js +10 -0
  60. package/dist/core/schemas/error/error.type.d.ts +6 -0
  61. package/dist/core/schemas/error/error.type.js +2 -0
  62. package/dist/core/schemas/error/index.d.ts +3 -0
  63. package/dist/core/schemas/error/index.js +19 -0
  64. package/dist/core/schemas/payment-status/index.d.ts +2 -0
  65. package/dist/core/schemas/payment-status/index.js +18 -0
  66. package/dist/core/schemas/payment-status/payment-status-request.schema.d.ts +43 -0
  67. package/dist/core/schemas/payment-status/payment-status-request.schema.js +23 -0
  68. package/dist/core/schemas/payment-status/payment-status-response.schema.d.ts +213 -0
  69. package/dist/core/schemas/payment-status/payment-status-response.schema.js +85 -0
  70. package/dist/core/types/documented/checkout.callback.d.ts +250 -0
  71. package/dist/core/types/documented/checkout.callback.js +2 -0
  72. package/dist/core/types/documented/checkout.request.d.ts +236 -0
  73. package/dist/core/types/documented/checkout.request.js +2 -0
  74. package/dist/core/types/documented/detail-addenda.d.ts +33 -0
  75. package/dist/core/types/documented/detail-addenda.js +2 -0
  76. package/dist/core/types/documented/envelope.d.ts +15 -0
  77. package/dist/core/types/documented/envelope.js +2 -0
  78. package/dist/core/types/documented/fiscal-data.d.ts +80 -0
  79. package/dist/core/types/documented/fiscal-data.js +2 -0
  80. package/dist/core/types/documented/payment-status.request.d.ts +23 -0
  81. package/dist/core/types/documented/payment-status.request.js +2 -0
  82. package/dist/core/types/documented/payment-status.response.d.ts +225 -0
  83. package/dist/core/types/documented/payment-status.response.js +2 -0
  84. package/dist/core/types/documented/split-rule.d.ts +29 -0
  85. package/dist/core/types/documented/split-rule.js +2 -0
  86. package/dist/core/types/documented/types.d.ts +287 -0
  87. package/dist/core/types/documented/types.js +199 -0
  88. package/dist/core/types/payloads.d.ts +158 -0
  89. package/dist/core/types/payloads.js +2 -0
  90. package/dist/core/types/undocumented/checkout.callback.d.ts +61 -0
  91. package/dist/core/types/undocumented/checkout.callback.js +2 -0
  92. package/dist/core/types/undocumented/checkout.request.d.ts +39 -0
  93. package/dist/core/types/undocumented/checkout.request.js +2 -0
  94. package/dist/core/types/undocumented/detail-addenda.d.ts +9 -0
  95. package/dist/core/types/undocumented/detail-addenda.js +2 -0
  96. package/dist/core/types/undocumented/envelope.d.ts +4 -0
  97. package/dist/core/types/undocumented/envelope.js +2 -0
  98. package/dist/core/types/undocumented/fiscal-data.d.ts +23 -0
  99. package/dist/core/types/undocumented/fiscal-data.js +2 -0
  100. package/dist/core/types/undocumented/payment-status.request.d.ts +6 -0
  101. package/dist/core/types/undocumented/payment-status.request.js +2 -0
  102. package/dist/core/types/undocumented/payment-status.response.d.ts +54 -0
  103. package/dist/core/types/undocumented/payment-status.response.js +2 -0
  104. package/dist/core/types/undocumented/split-rule.d.ts +9 -0
  105. package/dist/core/types/undocumented/split-rule.js +2 -0
  106. package/dist/core/types/undocumented/types.d.ts +181 -0
  107. package/dist/core/types/undocumented/types.js +160 -0
  108. package/dist/core/utils/index.d.ts +2 -0
  109. package/dist/core/utils/index.js +18 -0
  110. package/dist/core/utils/is-success.util.d.ts +5 -0
  111. package/dist/core/utils/is-success.util.js +6 -0
  112. package/dist/core/utils/parse-boolean.d.ts +2 -0
  113. package/dist/core/utils/parse-boolean.js +7 -0
  114. package/dist/core/utils/parse-date.d.ts +1 -0
  115. package/dist/core/utils/parse-date.js +10 -0
  116. package/dist/index.d.ts +5 -0
  117. package/dist/index.js +21 -0
  118. package/dist/nest/constants/index.d.ts +1 -0
  119. package/dist/nest/constants/index.js +17 -0
  120. package/dist/nest/constants/liqpay.constants.d.ts +1 -0
  121. package/dist/nest/constants/liqpay.constants.js +4 -0
  122. package/dist/nest/index.d.ts +3 -0
  123. package/dist/nest/index.js +19 -0
  124. package/dist/nest/interfaces/index.d.ts +2 -0
  125. package/dist/nest/interfaces/index.js +18 -0
  126. package/dist/nest/interfaces/liqpay-async-options.interface.d.ts +7 -0
  127. package/dist/nest/interfaces/liqpay-async-options.interface.js +2 -0
  128. package/dist/nest/interfaces/liqpay-options.interface.d.ts +25 -0
  129. package/dist/nest/interfaces/liqpay-options.interface.js +2 -0
  130. package/dist/nest/liqpay.module.d.ts +6 -0
  131. package/dist/nest/liqpay.module.js +37 -0
  132. package/dist/nest/liqpay.providers.d.ts +4 -0
  133. package/dist/nest/liqpay.providers.js +32 -0
  134. package/dist/nest/liqpay.service.d.ts +66 -0
  135. package/dist/nest/liqpay.service.js +57 -0
  136. package/package.json +57 -0
@@ -0,0 +1,2 @@
1
+ import z from 'zod';
2
+ export declare const LiqPayVersionSchema: z.ZodLiteral<7>;
@@ -0,0 +1,8 @@
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.LiqPayVersionSchema = void 0;
7
+ const zod_1 = __importDefault(require("zod"));
8
+ exports.LiqPayVersionSchema = zod_1.default.literal(7);
@@ -0,0 +1,86 @@
1
+ import { z } from 'zod';
2
+ export declare const LiqPayTaxRates: {
3
+ readonly NO_VAT: {
4
+ readonly letter: "А";
5
+ readonly name: "Без ПДВ 0%";
6
+ readonly type: 0;
7
+ readonly prc: 0;
8
+ };
9
+ readonly VAT20: {
10
+ readonly letter: "Б";
11
+ readonly name: "ПДВ 20%";
12
+ readonly type: 0;
13
+ readonly prc: 20;
14
+ };
15
+ readonly VAT7: {
16
+ readonly letter: "В";
17
+ readonly name: "ПДВ 7%";
18
+ readonly type: 0;
19
+ readonly prc: 7;
20
+ };
21
+ readonly EXCISE5: {
22
+ readonly letter: "Г";
23
+ readonly name: "АКЦИЗ 5%";
24
+ readonly type: 1;
25
+ readonly prc: 5;
26
+ };
27
+ };
28
+ export type LiqPayTaxRateKey = keyof typeof LiqPayTaxRates;
29
+ export type LiqPayFiscalTax = (typeof LiqPayTaxRates)[LiqPayTaxRateKey];
30
+ export declare const LiqPayFiscalTaxSchema: z.ZodObject<{
31
+ letter: z.ZodString;
32
+ name: z.ZodString;
33
+ type: z.ZodNumber;
34
+ prc: z.ZodNumber;
35
+ }, z.core.$strip>;
36
+ export declare const LiqPayFiscalProductByIdSchema: z.ZodObject<{
37
+ amount: z.ZodNumber;
38
+ cost: z.ZodNumber;
39
+ id: z.ZodNumber;
40
+ price: z.ZodNumber;
41
+ }, z.core.$strip>;
42
+ export type LiqPayFiscalProductById = z.infer<typeof LiqPayFiscalProductByIdSchema>;
43
+ export declare const LiqPayFiscalProductByApiSchema: z.ZodObject<{
44
+ amount: z.ZodNumber;
45
+ cost: z.ZodNumber;
46
+ price: z.ZodNumber;
47
+ categoryname: z.ZodString;
48
+ name: z.ZodString;
49
+ unitcode: z.ZodEnum<typeof import("./enums").LiqPayUnitEnum>;
50
+ barcode: z.ZodOptional<z.ZodString>;
51
+ codifier: z.ZodOptional<z.ZodString>;
52
+ vndcode: z.ZodOptional<z.ZodString>;
53
+ taxs: z.ZodOptional<z.ZodArray<z.ZodObject<{
54
+ letter: z.ZodString;
55
+ name: z.ZodString;
56
+ type: z.ZodNumber;
57
+ prc: z.ZodNumber;
58
+ }, z.core.$strip>>>;
59
+ }, z.core.$strip>;
60
+ export type LiqPayFiscalProductByApi = z.infer<typeof LiqPayFiscalProductByApiSchema>;
61
+ export declare const LiqPayFiscalDataSchema: z.ZodObject<{
62
+ items: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
63
+ amount: z.ZodNumber;
64
+ cost: z.ZodNumber;
65
+ id: z.ZodNumber;
66
+ price: z.ZodNumber;
67
+ }, z.core.$strip>, z.ZodObject<{
68
+ amount: z.ZodNumber;
69
+ cost: z.ZodNumber;
70
+ price: z.ZodNumber;
71
+ categoryname: z.ZodString;
72
+ name: z.ZodString;
73
+ unitcode: z.ZodEnum<typeof import("./enums").LiqPayUnitEnum>;
74
+ barcode: z.ZodOptional<z.ZodString>;
75
+ codifier: z.ZodOptional<z.ZodString>;
76
+ vndcode: z.ZodOptional<z.ZodString>;
77
+ taxs: z.ZodOptional<z.ZodArray<z.ZodObject<{
78
+ letter: z.ZodString;
79
+ name: z.ZodString;
80
+ type: z.ZodNumber;
81
+ prc: z.ZodNumber;
82
+ }, z.core.$strip>>>;
83
+ }, z.core.$strip>]>>>;
84
+ delivery_emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
85
+ }, z.core.$strip>;
86
+ export type LiqPayFiscalData = z.infer<typeof LiqPayFiscalDataSchema>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiqPayFiscalDataSchema = exports.LiqPayFiscalProductByApiSchema = exports.LiqPayFiscalProductByIdSchema = exports.LiqPayFiscalTaxSchema = exports.LiqPayTaxRates = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("./enums");
6
+ exports.LiqPayTaxRates = {
7
+ NO_VAT: { letter: 'А', name: 'Без ПДВ 0%', type: 0, prc: 0 },
8
+ VAT20: { letter: 'Б', name: 'ПДВ 20%', type: 0, prc: 20 },
9
+ VAT7: { letter: 'В', name: 'ПДВ 7%', type: 0, prc: 7 },
10
+ EXCISE5: { letter: 'Г', name: 'АКЦИЗ 5%', type: 1, prc: 5 },
11
+ };
12
+ exports.LiqPayFiscalTaxSchema = zod_1.z.object({
13
+ letter: zod_1.z.string(),
14
+ name: zod_1.z.string(),
15
+ type: zod_1.z.number(),
16
+ prc: zod_1.z.number(),
17
+ });
18
+ exports.LiqPayFiscalProductByIdSchema = zod_1.z.object({
19
+ amount: zod_1.z.number(),
20
+ cost: zod_1.z.number(),
21
+ id: zod_1.z.number(),
22
+ price: zod_1.z.number(),
23
+ });
24
+ exports.LiqPayFiscalProductByApiSchema = zod_1.z.object({
25
+ amount: zod_1.z.number(),
26
+ cost: zod_1.z.number(),
27
+ price: zod_1.z.number(),
28
+ categoryname: zod_1.z.string(),
29
+ name: zod_1.z.string(),
30
+ unitcode: enums_1.LiqPayUnitSchema,
31
+ barcode: zod_1.z.string().optional(),
32
+ codifier: zod_1.z.string().optional(),
33
+ vndcode: zod_1.z.string().optional(),
34
+ taxs: zod_1.z.array(exports.LiqPayFiscalTaxSchema).optional(),
35
+ });
36
+ exports.LiqPayFiscalDataSchema = zod_1.z.object({
37
+ items: zod_1.z
38
+ .array(zod_1.z.union([exports.LiqPayFiscalProductByIdSchema, exports.LiqPayFiscalProductByApiSchema]))
39
+ .optional(),
40
+ delivery_emails: zod_1.z.array(zod_1.z.string()).optional(),
41
+ });
@@ -0,0 +1,3 @@
1
+ export * from './detail-addenda.schema';
2
+ export * from './fiscal-data.schema';
3
+ export * from './split-rule.schema';
@@ -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("./detail-addenda.schema"), exports);
18
+ __exportStar(require("./fiscal-data.schema"), exports);
19
+ __exportStar(require("./split-rule.schema"), exports);
@@ -0,0 +1,36 @@
1
+ import { z } from 'zod';
2
+ export declare const LiqPaySplitRuleSchema: z.ZodObject<{
3
+ public_key: z.ZodString;
4
+ amount: z.ZodNumber;
5
+ commission_payer: z.ZodEnum<{
6
+ sender: "sender";
7
+ receiver: "receiver";
8
+ }>;
9
+ server_url: z.ZodString;
10
+ rro_info: z.ZodOptional<z.ZodObject<{
11
+ items: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
12
+ amount: z.ZodNumber;
13
+ cost: z.ZodNumber;
14
+ id: z.ZodNumber;
15
+ price: z.ZodNumber;
16
+ }, z.core.$strip>, z.ZodObject<{
17
+ amount: z.ZodNumber;
18
+ cost: z.ZodNumber;
19
+ price: z.ZodNumber;
20
+ categoryname: z.ZodString;
21
+ name: z.ZodString;
22
+ unitcode: z.ZodEnum<typeof import("./enums").LiqPayUnitEnum>;
23
+ barcode: z.ZodOptional<z.ZodString>;
24
+ codifier: z.ZodOptional<z.ZodString>;
25
+ vndcode: z.ZodOptional<z.ZodString>;
26
+ taxs: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
+ letter: z.ZodString;
28
+ name: z.ZodString;
29
+ type: z.ZodNumber;
30
+ prc: z.ZodNumber;
31
+ }, z.core.$strip>>>;
32
+ }, z.core.$strip>]>>>;
33
+ delivery_emails: z.ZodOptional<z.ZodArray<z.ZodString>>;
34
+ }, z.core.$strip>>;
35
+ }, z.core.$strip>;
36
+ export type LiqPaySplitRule = z.infer<typeof LiqPaySplitRuleSchema>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiqPaySplitRuleSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("./enums");
6
+ const fiscal_data_schema_1 = require("./fiscal-data.schema");
7
+ exports.LiqPaySplitRuleSchema = zod_1.z.object({
8
+ public_key: zod_1.z.string(),
9
+ amount: zod_1.z.number(),
10
+ commission_payer: enums_1.LiqPayCommisionPayerSchema,
11
+ server_url: zod_1.z.string(),
12
+ rro_info: fiscal_data_schema_1.LiqPayFiscalDataSchema.optional(),
13
+ });
@@ -0,0 +1,121 @@
1
+ import { z } from 'zod';
2
+ export declare const LiqPayErrorResponseSchema: z.ZodObject<{
3
+ status: z.ZodLiteral<"error">;
4
+ err_code: z.ZodEnum<{
5
+ 5: "5";
6
+ limit: "limit";
7
+ frod: "frod";
8
+ decline: "decline";
9
+ err_auth: "err_auth";
10
+ err_cache: "err_cache";
11
+ user_not_found: "user_not_found";
12
+ err_sms_send: "err_sms_send";
13
+ err_sms_otp: "err_sms_otp";
14
+ shop_blocked: "shop_blocked";
15
+ shop_not_active: "shop_not_active";
16
+ invalid_signature: "invalid_signature";
17
+ order_id_empty: "order_id_empty";
18
+ err_shop_not_agent: "err_shop_not_agent";
19
+ err_card_def_notfound: "err_card_def_notfound";
20
+ err_no_card_token: "err_no_card_token";
21
+ err_card_liqpay_def: "err_card_liqpay_def";
22
+ err_card_type: "err_card_type";
23
+ err_card_country: "err_card_country";
24
+ err_limit_amount: "err_limit_amount";
25
+ err_payment_amount_limit: "err_payment_amount_limit";
26
+ amount_limit: "amount_limit";
27
+ payment_err_sender_card: "payment_err_sender_card";
28
+ payment_processing: "payment_processing";
29
+ err_payment_discount: "err_payment_discount";
30
+ err_wallet: "err_wallet";
31
+ err_get_verify_code: "err_get_verify_code";
32
+ err_verify_code: "err_verify_code";
33
+ wait_info: "wait_info";
34
+ err_path: "err_path";
35
+ err_payment_cash_acq: "err_payment_cash_acq";
36
+ err_split_amount: "err_split_amount";
37
+ err_card_receiver_def: "err_card_receiver_def";
38
+ payment_err_status: "payment_err_status";
39
+ public_key_not_found: "public_key_not_found";
40
+ payment_not_found: "payment_not_found";
41
+ payment_not_subscribed: "payment_not_subscribed";
42
+ wrong_amount_currency: "wrong_amount_currency";
43
+ err_amount_hold: "err_amount_hold";
44
+ err_access: "err_access";
45
+ order_id_duplicate: "order_id_duplicate";
46
+ err_blocked: "err_blocked";
47
+ err_empty: "err_empty";
48
+ err_empty_phone: "err_empty_phone";
49
+ err_missing: "err_missing";
50
+ err_wrong: "err_wrong";
51
+ err_wrong_currency: "err_wrong_currency";
52
+ err_phone: "err_phone";
53
+ err_card: "err_card";
54
+ err_card_bin: "err_card_bin";
55
+ err_terminal_notfound: "err_terminal_notfound";
56
+ err_commission_notfound: "err_commission_notfound";
57
+ err_payment_create: "err_payment_create";
58
+ err_mpi: "err_mpi";
59
+ err_currency_is_not_allowed: "err_currency_is_not_allowed";
60
+ err_look: "err_look";
61
+ err_mods_empty: "err_mods_empty";
62
+ payment_err_type: "payment_err_type";
63
+ err_payment_currency: "err_payment_currency";
64
+ err_payment_exchangerates: "err_payment_exchangerates";
65
+ err_signature: "err_signature";
66
+ err_api_action: "err_api_action";
67
+ err_api_callback: "err_api_callback";
68
+ err_api_ip: "err_api_ip";
69
+ expired_phone: "expired_phone";
70
+ expired_3ds: "expired_3ds";
71
+ expired_otp: "expired_otp";
72
+ expired_cvv: "expired_cvv";
73
+ expired_p24: "expired_p24";
74
+ expired_sender: "expired_sender";
75
+ expired_pin: "expired_pin";
76
+ expired_ivr: "expired_ivr";
77
+ expired_captcha: "expired_captcha";
78
+ expired_password: "expired_password";
79
+ expired_senderapp: "expired_senderapp";
80
+ expired_prepared: "expired_prepared";
81
+ expired_mp: "expired_mp";
82
+ expired_qr: "expired_qr";
83
+ 90: "90";
84
+ 101: "101";
85
+ 102: "102";
86
+ 103: "103";
87
+ 104: "104";
88
+ 105: "105";
89
+ 106: "106";
90
+ 107: "107";
91
+ 108: "108";
92
+ 109: "109";
93
+ 110: "110";
94
+ 111: "111";
95
+ 112: "112";
96
+ 113: "113";
97
+ 114: "114";
98
+ 115: "115";
99
+ 2903: "2903";
100
+ 2915: "2915";
101
+ 3914: "3914";
102
+ 9851: "9851";
103
+ 9852: "9852";
104
+ 9854: "9854";
105
+ 9855: "9855";
106
+ 9857: "9857";
107
+ 9859: "9859";
108
+ 9860: "9860";
109
+ 9861: "9861";
110
+ 9863: "9863";
111
+ 9867: "9867";
112
+ 9868: "9868";
113
+ 9872: "9872";
114
+ 9882: "9882";
115
+ 9886: "9886";
116
+ 9961: "9961";
117
+ 9989: "9989";
118
+ }>;
119
+ err_description: z.ZodString;
120
+ }, z.core.$strip>;
121
+ export type LiqPayErrorResponse = z.infer<typeof LiqPayErrorResponseSchema>;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LiqPayErrorResponseSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const enums_1 = require("../common/enums");
6
+ exports.LiqPayErrorResponseSchema = zod_1.z.object({
7
+ status: zod_1.z.literal('error'),
8
+ err_code: enums_1.LiqPayErrorCodeSchema,
9
+ err_description: zod_1.z.string(),
10
+ });
@@ -0,0 +1,6 @@
1
+ import { LiqPayErrorCode } from '../common/enums';
2
+ export type InternalErrorCode = LiqPayErrorCode | 'decode_error' | 'validation_error' | 'invalid_response' | 'http_error';
3
+ export type LiqPayError = {
4
+ code: LiqPayErrorCode | InternalErrorCode;
5
+ description: string;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export * from '../common/enums/error-code.schema';
2
+ export * from './error-response.schema';
3
+ export * from './error.type';
@@ -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("../common/enums/error-code.schema"), exports);
18
+ __exportStar(require("./error-response.schema"), exports);
19
+ __exportStar(require("./error.type"), exports);
@@ -0,0 +1,2 @@
1
+ export * from './payment-status-request.schema';
2
+ export * from './payment-status-response.schema';
@@ -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("./payment-status-request.schema"), exports);
18
+ __exportStar(require("./payment-status-response.schema"), exports);
@@ -0,0 +1,43 @@
1
+ import z from 'zod';
2
+ export declare const LiqPayPaymentStatusRequestSchema: z.ZodObject<{
3
+ version: z.ZodLiteral<7>;
4
+ publicKey: z.ZodOptional<z.ZodString>;
5
+ action: z.ZodEnum<{
6
+ pay: "pay";
7
+ hold: "hold";
8
+ paysplit: "paysplit";
9
+ subscribe: "subscribe";
10
+ paydonate: "paydonate";
11
+ auth: "auth";
12
+ regular: "regular";
13
+ status: "status";
14
+ }>;
15
+ orderId: z.ZodString;
16
+ }, z.core.$strip>;
17
+ export type LiqPayPaymentStatusRequest = z.infer<typeof LiqPayPaymentStatusRequestSchema>;
18
+ export declare const LiqPayRawPaymentStatusRequestSchema: z.ZodPipe<z.ZodObject<{
19
+ version: z.ZodLiteral<7>;
20
+ publicKey: z.ZodOptional<z.ZodString>;
21
+ action: z.ZodEnum<{
22
+ pay: "pay";
23
+ hold: "hold";
24
+ paysplit: "paysplit";
25
+ subscribe: "subscribe";
26
+ paydonate: "paydonate";
27
+ auth: "auth";
28
+ regular: "regular";
29
+ status: "status";
30
+ }>;
31
+ orderId: z.ZodString;
32
+ }, z.core.$strip>, z.ZodTransform<{
33
+ version: number;
34
+ action: string;
35
+ order_id: string;
36
+ public_key?: string | undefined;
37
+ }, {
38
+ version: 7;
39
+ action: "pay" | "hold" | "paysplit" | "subscribe" | "paydonate" | "auth" | "regular" | "status";
40
+ orderId: string;
41
+ publicKey?: string | undefined;
42
+ }>>;
43
+ export type LiqPayRawPaymentStatusRequest = z.infer<typeof LiqPayRawPaymentStatusRequestSchema>;
@@ -0,0 +1,23 @@
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.LiqPayRawPaymentStatusRequestSchema = exports.LiqPayPaymentStatusRequestSchema = void 0;
7
+ const ts_case_convert_1 = require("ts-case-convert");
8
+ const zod_1 = __importDefault(require("zod"));
9
+ const enums_1 = require("../common/enums");
10
+ exports.LiqPayPaymentStatusRequestSchema = zod_1.default.object({
11
+ version: enums_1.LiqPayVersionSchema,
12
+ publicKey: zod_1.default.string().optional(),
13
+ action: enums_1.LiqPayActionSchema,
14
+ orderId: zod_1.default.string().max(255),
15
+ });
16
+ exports.LiqPayRawPaymentStatusRequestSchema = exports.LiqPayPaymentStatusRequestSchema.transform(typed => {
17
+ const snakelized = (0, ts_case_convert_1.objectToSnake)(typed);
18
+ return {
19
+ ...snakelized,
20
+ version: Number(snakelized.version),
21
+ action: String(snakelized.action),
22
+ };
23
+ });