@companix/yookassa 0.0.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 (194) hide show
  1. package/README.md +191 -0
  2. package/dist/api/common.d.ts +215 -0
  3. package/dist/api/common.js +3 -0
  4. package/dist/api/common.js.map +1 -0
  5. package/dist/api/enums/common.d.ts +121 -0
  6. package/dist/api/enums/common.js +145 -0
  7. package/dist/api/enums/common.js.map +1 -0
  8. package/dist/api/enums/currency.enum.d.ts +121 -0
  9. package/dist/api/enums/currency.enum.js +126 -0
  10. package/dist/api/enums/currency.enum.js.map +1 -0
  11. package/dist/api/enums/index.d.ts +2 -0
  12. package/dist/api/enums/index.js +19 -0
  13. package/dist/api/enums/index.js.map +1 -0
  14. package/dist/api/index.d.ts +5 -0
  15. package/dist/api/index.js +22 -0
  16. package/dist/api/index.js.map +1 -0
  17. package/dist/api/notifications.d.ts +10 -0
  18. package/dist/api/notifications.js +3 -0
  19. package/dist/api/notifications.js.map +1 -0
  20. package/dist/api/requests/deal.d.ts +21 -0
  21. package/dist/api/requests/deal.js +3 -0
  22. package/dist/api/requests/deal.js.map +1 -0
  23. package/dist/api/requests/index.d.ts +10 -0
  24. package/dist/api/requests/index.js +27 -0
  25. package/dist/api/requests/index.js.map +1 -0
  26. package/dist/api/requests/invoice.d.ts +33 -0
  27. package/dist/api/requests/invoice.js +3 -0
  28. package/dist/api/requests/invoice.js.map +1 -0
  29. package/dist/api/requests/me.d.ts +3 -0
  30. package/dist/api/requests/me.js +3 -0
  31. package/dist/api/requests/me.js.map +1 -0
  32. package/dist/api/requests/payment-method.d.ts +9 -0
  33. package/dist/api/requests/payment-method.js +3 -0
  34. package/dist/api/requests/payment-method.js.map +1 -0
  35. package/dist/api/requests/payment.d.ts +199 -0
  36. package/dist/api/requests/payment.js +3 -0
  37. package/dist/api/requests/payment.js.map +1 -0
  38. package/dist/api/requests/payout.d.ts +54 -0
  39. package/dist/api/requests/payout.js +3 -0
  40. package/dist/api/requests/payout.js.map +1 -0
  41. package/dist/api/requests/personal-data.d.ts +16 -0
  42. package/dist/api/requests/personal-data.js +3 -0
  43. package/dist/api/requests/personal-data.js.map +1 -0
  44. package/dist/api/requests/receipt.d.ts +59 -0
  45. package/dist/api/requests/receipt.js +3 -0
  46. package/dist/api/requests/receipt.js.map +1 -0
  47. package/dist/api/requests/refund.d.ts +35 -0
  48. package/dist/api/requests/refund.js +3 -0
  49. package/dist/api/requests/refund.js.map +1 -0
  50. package/dist/api/requests/webhook.d.ts +5 -0
  51. package/dist/api/requests/webhook.js +3 -0
  52. package/dist/api/requests/webhook.js.map +1 -0
  53. package/dist/api/responses/deal.d.ts +23 -0
  54. package/dist/api/responses/deal.js +3 -0
  55. package/dist/api/responses/deal.js.map +1 -0
  56. package/dist/api/responses/index.d.ts +11 -0
  57. package/dist/api/responses/index.js +28 -0
  58. package/dist/api/responses/index.js.map +1 -0
  59. package/dist/api/responses/invoice.d.ts +35 -0
  60. package/dist/api/responses/invoice.js +3 -0
  61. package/dist/api/responses/invoice.js.map +1 -0
  62. package/dist/api/responses/me.d.ts +19 -0
  63. package/dist/api/responses/me.js +3 -0
  64. package/dist/api/responses/me.js.map +1 -0
  65. package/dist/api/responses/payment-method.d.ts +15 -0
  66. package/dist/api/responses/payment-method.js +3 -0
  67. package/dist/api/responses/payment-method.js.map +1 -0
  68. package/dist/api/responses/payment.d.ts +268 -0
  69. package/dist/api/responses/payment.js +3 -0
  70. package/dist/api/responses/payment.js.map +1 -0
  71. package/dist/api/responses/payout.d.ts +65 -0
  72. package/dist/api/responses/payout.js +3 -0
  73. package/dist/api/responses/payout.js.map +1 -0
  74. package/dist/api/responses/personal-data.d.ts +16 -0
  75. package/dist/api/responses/personal-data.js +3 -0
  76. package/dist/api/responses/personal-data.js.map +1 -0
  77. package/dist/api/responses/receipt.d.ts +54 -0
  78. package/dist/api/responses/receipt.js +3 -0
  79. package/dist/api/responses/receipt.js.map +1 -0
  80. package/dist/api/responses/refund.d.ts +49 -0
  81. package/dist/api/responses/refund.js +3 -0
  82. package/dist/api/responses/refund.js.map +1 -0
  83. package/dist/api/responses/sbp-banks.d.ts +9 -0
  84. package/dist/api/responses/sbp-banks.js +3 -0
  85. package/dist/api/responses/sbp-banks.js.map +1 -0
  86. package/dist/api/responses/webhook.d.ts +11 -0
  87. package/dist/api/responses/webhook.js +3 -0
  88. package/dist/api/responses/webhook.js.map +1 -0
  89. package/dist/http/yookassa.constants.d.ts +1 -0
  90. package/dist/http/yookassa.constants.js +5 -0
  91. package/dist/http/yookassa.constants.js.map +1 -0
  92. package/dist/http/yookassa.error.d.ts +6 -0
  93. package/dist/http/yookassa.error.js +14 -0
  94. package/dist/http/yookassa.error.js.map +1 -0
  95. package/dist/http/yookassa.http-client.d.ts +17 -0
  96. package/dist/http/yookassa.http-client.js +87 -0
  97. package/dist/http/yookassa.http-client.js.map +1 -0
  98. package/dist/index.d.ts +29 -0
  99. package/dist/index.js +46 -0
  100. package/dist/index.js.map +1 -0
  101. package/dist/modules/deal/deal.module.d.ts +2 -0
  102. package/dist/modules/deal/deal.module.js +21 -0
  103. package/dist/modules/deal/deal.module.js.map +1 -0
  104. package/dist/modules/deal/deal.service.d.ts +9 -0
  105. package/dist/modules/deal/deal.service.js +34 -0
  106. package/dist/modules/deal/deal.service.js.map +1 -0
  107. package/dist/modules/invoice/invoice.module.d.ts +2 -0
  108. package/dist/modules/invoice/invoice.module.js +21 -0
  109. package/dist/modules/invoice/invoice.module.js.map +1 -0
  110. package/dist/modules/invoice/invoice.service.d.ts +8 -0
  111. package/dist/modules/invoice/invoice.service.js +31 -0
  112. package/dist/modules/invoice/invoice.service.js.map +1 -0
  113. package/dist/modules/me/me.module.d.ts +2 -0
  114. package/dist/modules/me/me.module.js +21 -0
  115. package/dist/modules/me/me.module.js.map +1 -0
  116. package/dist/modules/me/me.service.d.ts +7 -0
  117. package/dist/modules/me/me.service.js +28 -0
  118. package/dist/modules/me/me.service.js.map +1 -0
  119. package/dist/modules/payment/payment.module.d.ts +2 -0
  120. package/dist/modules/payment/payment.module.js +21 -0
  121. package/dist/modules/payment/payment.module.js.map +1 -0
  122. package/dist/modules/payment/payment.service.d.ts +11 -0
  123. package/dist/modules/payment/payment.service.js +40 -0
  124. package/dist/modules/payment/payment.service.js.map +1 -0
  125. package/dist/modules/payment-method/payment-method.module.d.ts +2 -0
  126. package/dist/modules/payment-method/payment-method.module.js +21 -0
  127. package/dist/modules/payment-method/payment-method.module.js.map +1 -0
  128. package/dist/modules/payment-method/payment-method.service.d.ts +8 -0
  129. package/dist/modules/payment-method/payment-method.service.js +31 -0
  130. package/dist/modules/payment-method/payment-method.service.js.map +1 -0
  131. package/dist/modules/payout/payout.module.d.ts +2 -0
  132. package/dist/modules/payout/payout.module.js +21 -0
  133. package/dist/modules/payout/payout.module.js.map +1 -0
  134. package/dist/modules/payout/payout.service.d.ts +10 -0
  135. package/dist/modules/payout/payout.service.js +37 -0
  136. package/dist/modules/payout/payout.service.js.map +1 -0
  137. package/dist/modules/personal-data/personal-data.module.d.ts +2 -0
  138. package/dist/modules/personal-data/personal-data.module.js +21 -0
  139. package/dist/modules/personal-data/personal-data.module.js.map +1 -0
  140. package/dist/modules/personal-data/personal-data.service.d.ts +8 -0
  141. package/dist/modules/personal-data/personal-data.service.js +31 -0
  142. package/dist/modules/personal-data/personal-data.service.js.map +1 -0
  143. package/dist/modules/receipt/receipt.module.d.ts +2 -0
  144. package/dist/modules/receipt/receipt.module.js +21 -0
  145. package/dist/modules/receipt/receipt.module.js.map +1 -0
  146. package/dist/modules/receipt/receipt.service.d.ts +9 -0
  147. package/dist/modules/receipt/receipt.service.js +34 -0
  148. package/dist/modules/receipt/receipt.service.js.map +1 -0
  149. package/dist/modules/refund/refund.module.d.ts +2 -0
  150. package/dist/modules/refund/refund.module.js +21 -0
  151. package/dist/modules/refund/refund.module.js.map +1 -0
  152. package/dist/modules/refund/refund.service.d.ts +9 -0
  153. package/dist/modules/refund/refund.service.js +34 -0
  154. package/dist/modules/refund/refund.service.js.map +1 -0
  155. package/dist/modules/sbp-banks/sbp-banks.module.d.ts +2 -0
  156. package/dist/modules/sbp-banks/sbp-banks.module.js +21 -0
  157. package/dist/modules/sbp-banks/sbp-banks.module.js.map +1 -0
  158. package/dist/modules/sbp-banks/sbp-banks.service.d.ts +7 -0
  159. package/dist/modules/sbp-banks/sbp-banks.service.js +28 -0
  160. package/dist/modules/sbp-banks/sbp-banks.service.js.map +1 -0
  161. package/dist/modules/webhook/constants/yookassa-ip-whitelist.d.ts +1 -0
  162. package/dist/modules/webhook/constants/yookassa-ip-whitelist.js +13 -0
  163. package/dist/modules/webhook/constants/yookassa-ip-whitelist.js.map +1 -0
  164. package/dist/modules/webhook/decorators/index.d.ts +1 -0
  165. package/dist/modules/webhook/decorators/index.js +18 -0
  166. package/dist/modules/webhook/decorators/index.js.map +1 -0
  167. package/dist/modules/webhook/decorators/yookassa-webhook.decorator.d.ts +1 -0
  168. package/dist/modules/webhook/decorators/yookassa-webhook.decorator.js +9 -0
  169. package/dist/modules/webhook/decorators/yookassa-webhook.decorator.js.map +1 -0
  170. package/dist/modules/webhook/guards/yookassa-webhook.guard.d.ts +6 -0
  171. package/dist/modules/webhook/guards/yookassa-webhook.guard.js +38 -0
  172. package/dist/modules/webhook/guards/yookassa-webhook.guard.js.map +1 -0
  173. package/dist/modules/webhook/index.d.ts +4 -0
  174. package/dist/modules/webhook/index.js +21 -0
  175. package/dist/modules/webhook/index.js.map +1 -0
  176. package/dist/modules/webhook/utils/ip-matcher.util.d.ts +1 -0
  177. package/dist/modules/webhook/utils/ip-matcher.util.js +55 -0
  178. package/dist/modules/webhook/utils/ip-matcher.util.js.map +1 -0
  179. package/dist/modules/webhook/webhook.module.d.ts +2 -0
  180. package/dist/modules/webhook/webhook.module.js +21 -0
  181. package/dist/modules/webhook/webhook.module.js.map +1 -0
  182. package/dist/modules/webhook/webhook.service.d.ts +9 -0
  183. package/dist/modules/webhook/webhook.service.js +34 -0
  184. package/dist/modules/webhook/webhook.service.js.map +1 -0
  185. package/dist/yookassa.interface.d.ts +9 -0
  186. package/dist/yookassa.interface.js +5 -0
  187. package/dist/yookassa.interface.js.map +1 -0
  188. package/dist/yookassa.module.d.ts +6 -0
  189. package/dist/yookassa.module.js +85 -0
  190. package/dist/yookassa.module.js.map +1 -0
  191. package/dist/yookassa.service.d.ts +25 -0
  192. package/dist/yookassa.service.js +55 -0
  193. package/dist/yookassa.service.js.map +1 -0
  194. package/package.json +34 -0
@@ -0,0 +1,199 @@
1
+ import type { CommonAirline, CommonAmount, CommonCard, CommonDeal, CommonReceipt, CommonRecipient, CommonSettlements, CommonVatData } from '../common';
2
+ import { LocaleEnum } from '../enums';
3
+ export interface CreatePaymentRequest {
4
+ amount: CommonAmount;
5
+ description?: string;
6
+ receipt?: CommonReceipt;
7
+ recipient?: CommonRecipient;
8
+ payment_token?: string;
9
+ payment_method_id?: string;
10
+ payment_method_data?: CreatePaymentRequestPaymentMethodData;
11
+ confirmation?: CreatePaymentRequestConfirmation;
12
+ save_payment_method?: boolean;
13
+ capture?: boolean;
14
+ client_ip?: string;
15
+ metadata?: Record<string, unknown>;
16
+ airline?: CommonAirline;
17
+ transfers?: CreatePaymentRequestTransfersItem[];
18
+ deal?: CommonDeal;
19
+ merchant_customer_id?: string;
20
+ payment_order?: CreatePaymentRequestPaymentOrder;
21
+ receiver?: CreatePaymentRequestReceiver;
22
+ statements?: CreatePaymentRequestStatementsItem[];
23
+ }
24
+ export interface GetPaymentsListRequest {
25
+ "created_at.gte"?: string;
26
+ "created_at.gt"?: string;
27
+ "created_at.lte"?: string;
28
+ "created_at.lt"?: string;
29
+ "captured_at.gte"?: string;
30
+ "captured_at.gt"?: string;
31
+ "captured_at.lte"?: string;
32
+ "captured_at.lt"?: string;
33
+ payment_method?: string;
34
+ status?: string;
35
+ limit?: number;
36
+ cursor?: string;
37
+ }
38
+ export interface CapturePaymentRequest {
39
+ amount?: CommonAmount;
40
+ receipt?: CommonReceipt;
41
+ airline?: CommonAirline;
42
+ transfers?: CapturePaymentRequestTransfersItem[];
43
+ deal?: CapturePaymentRequestDeal;
44
+ }
45
+ export interface CreatePaymentRequestPaymentMethodDataBankCard {
46
+ "type": "bank_card";
47
+ card?: CommonCard;
48
+ }
49
+ export interface CreatePaymentRequestPaymentMethodDataCash {
50
+ "type": "cash";
51
+ phone?: string;
52
+ }
53
+ export interface CreatePaymentRequestPaymentMethodDataSberbank {
54
+ "type": "sberbank";
55
+ phone?: string;
56
+ }
57
+ export interface CreatePaymentRequestPaymentMethodDataTinkoffBank {
58
+ "type": "tinkoff_bank";
59
+ }
60
+ export interface CreatePaymentRequestPaymentMethodDataYooMoney {
61
+ "type": "yoo_money";
62
+ }
63
+ export interface CreatePaymentRequestPaymentMethodDataMobileBalance {
64
+ "type": "mobile_balance";
65
+ phone: string;
66
+ }
67
+ export interface CreatePaymentRequestPaymentMethodDataB2bSberbank {
68
+ "type": "b2b_sberbank";
69
+ payment_purpose: string;
70
+ vat_data: CommonVatData;
71
+ }
72
+ export interface CreatePaymentRequestPaymentMethodDataSbp {
73
+ "type": "sbp";
74
+ }
75
+ export interface CreatePaymentRequestPaymentMethodDataSberLoan {
76
+ "type": "sber_loan";
77
+ }
78
+ export interface CreatePaymentRequestPaymentMethodDataElectronicCertificate {
79
+ "type": "electronic_certificate";
80
+ card?: CommonCard;
81
+ electronic_certificate?: CreatePaymentRequestPaymentMethodDataElectronicCertificateElectronicCertificate;
82
+ articles?: CreatePaymentRequestPaymentMethodDataElectronicCertificateArticlesItem[];
83
+ }
84
+ export interface CreatePaymentRequestPaymentMethodDataSberBnpl {
85
+ "type": "sber_bnpl";
86
+ phone?: string;
87
+ }
88
+ export interface CreatePaymentRequestPaymentMethodDataAlfaPay {
89
+ "type": "alfa_pay";
90
+ }
91
+ export type CreatePaymentRequestPaymentMethodData = CreatePaymentRequestPaymentMethodDataBankCard | CreatePaymentRequestPaymentMethodDataCash | CreatePaymentRequestPaymentMethodDataSberbank | CreatePaymentRequestPaymentMethodDataTinkoffBank | CreatePaymentRequestPaymentMethodDataYooMoney | CreatePaymentRequestPaymentMethodDataMobileBalance | CreatePaymentRequestPaymentMethodDataB2bSberbank | CreatePaymentRequestPaymentMethodDataSbp | CreatePaymentRequestPaymentMethodDataSberLoan | CreatePaymentRequestPaymentMethodDataElectronicCertificate | CreatePaymentRequestPaymentMethodDataSberBnpl | CreatePaymentRequestPaymentMethodDataAlfaPay;
92
+ export interface CreatePaymentRequestConfirmationRedirect {
93
+ "type": "redirect";
94
+ locale?: LocaleEnum;
95
+ enforce?: boolean;
96
+ return_url: string;
97
+ }
98
+ export interface CreatePaymentRequestConfirmationExternal {
99
+ "type": "external";
100
+ locale?: LocaleEnum;
101
+ }
102
+ export interface CreatePaymentRequestConfirmationQr {
103
+ "type": "qr";
104
+ locale?: LocaleEnum;
105
+ return_url?: string;
106
+ }
107
+ export interface CreatePaymentRequestConfirmationEmbedded {
108
+ "type": "embedded";
109
+ locale?: LocaleEnum;
110
+ }
111
+ export interface CreatePaymentRequestConfirmationMobileApplication {
112
+ "type": "mobile_application";
113
+ locale?: LocaleEnum;
114
+ return_url: string;
115
+ }
116
+ export type CreatePaymentRequestConfirmation = CreatePaymentRequestConfirmationRedirect | CreatePaymentRequestConfirmationExternal | CreatePaymentRequestConfirmationQr | CreatePaymentRequestConfirmationEmbedded | CreatePaymentRequestConfirmationMobileApplication;
117
+ export interface CreatePaymentRequestTransfersItem {
118
+ account_id: string;
119
+ amount: CommonAmount;
120
+ platform_fee_amount?: CommonAmount;
121
+ description?: string;
122
+ metadata?: Record<string, unknown>;
123
+ }
124
+ export interface CreatePaymentRequestPaymentOrderUtilities {
125
+ "type": "utilities";
126
+ amount: CommonAmount;
127
+ payment_purpose: string;
128
+ recipient: CreatePaymentRequestPaymentOrderUtilitiesRecipient;
129
+ kbk?: string;
130
+ oktmo?: string;
131
+ payment_period?: CreatePaymentRequestPaymentOrderUtilitiesPaymentPeriod;
132
+ payment_document_id?: string;
133
+ payment_document_number?: string;
134
+ account_number?: string;
135
+ unified_account_number?: string;
136
+ service_id?: string;
137
+ }
138
+ export type CreatePaymentRequestPaymentOrder = CreatePaymentRequestPaymentOrderUtilities;
139
+ export interface CreatePaymentRequestReceiverMobileBalance {
140
+ "type": "mobile_balance";
141
+ phone: string;
142
+ }
143
+ export interface CreatePaymentRequestReceiverDigitalWallet {
144
+ "type": "digital_wallet";
145
+ account_number: string;
146
+ }
147
+ export interface CreatePaymentRequestReceiverBankAccount {
148
+ "type": "bank_account";
149
+ account_number: string;
150
+ bic: string;
151
+ }
152
+ export type CreatePaymentRequestReceiver = CreatePaymentRequestReceiverMobileBalance | CreatePaymentRequestReceiverDigitalWallet | CreatePaymentRequestReceiverBankAccount;
153
+ export interface CreatePaymentRequestStatementsItemPaymentOverview {
154
+ "type": "payment_overview";
155
+ delivery_method: CreatePaymentRequestStatementsItemPaymentOverviewDeliveryMethod;
156
+ }
157
+ export type CreatePaymentRequestStatementsItem = CreatePaymentRequestStatementsItemPaymentOverview;
158
+ export interface CapturePaymentRequestTransfersItem {
159
+ account_id: string;
160
+ amount: CommonAmount;
161
+ platform_fee_amount?: CommonAmount;
162
+ }
163
+ export interface CapturePaymentRequestDeal {
164
+ settlements: CommonSettlements[];
165
+ }
166
+ export interface CreatePaymentRequestPaymentMethodDataElectronicCertificateElectronicCertificate {
167
+ amount: CommonAmount;
168
+ basket_id: string;
169
+ }
170
+ export interface CreatePaymentRequestPaymentMethodDataElectronicCertificateArticlesItem {
171
+ article_number: number;
172
+ tru_code: string;
173
+ article_code?: string;
174
+ article_name: string;
175
+ quantity: number;
176
+ price: CommonAmount;
177
+ metadata?: Record<string, unknown>;
178
+ }
179
+ export interface CreatePaymentRequestPaymentOrderUtilitiesRecipient {
180
+ name: string;
181
+ inn: string;
182
+ kpp: string;
183
+ bank: CreatePaymentRequestPaymentOrderUtilitiesRecipientBank;
184
+ }
185
+ export interface CreatePaymentRequestPaymentOrderUtilitiesPaymentPeriod {
186
+ month: number;
187
+ year: number;
188
+ }
189
+ export interface CreatePaymentRequestStatementsItemPaymentOverviewDeliveryMethodEmail {
190
+ "type": "email";
191
+ email: string;
192
+ }
193
+ export type CreatePaymentRequestStatementsItemPaymentOverviewDeliveryMethod = CreatePaymentRequestStatementsItemPaymentOverviewDeliveryMethodEmail;
194
+ export interface CreatePaymentRequestPaymentOrderUtilitiesRecipientBank {
195
+ name: string;
196
+ bic: string;
197
+ account: string;
198
+ correspondent_account: string;
199
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/api/requests/payment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,54 @@
1
+ import type { CommonAmount, CommonDeal2 } from '../common';
2
+ export interface CreatePayoutRequest {
3
+ amount: CommonAmount;
4
+ payout_destination_data?: CreatePayoutRequestPayoutDestinationData;
5
+ payout_token?: string;
6
+ payment_method_id?: string;
7
+ description?: string;
8
+ deal?: CommonDeal2;
9
+ personal_data?: CreatePayoutRequestPersonalDataItem[];
10
+ metadata?: Record<string, unknown>;
11
+ }
12
+ export interface GetPayoutsListRequest {
13
+ "created_at.gte"?: string;
14
+ "created_at.gt"?: string;
15
+ "created_at.lte"?: string;
16
+ "created_at.lt"?: string;
17
+ "succeeded_at.gte"?: string;
18
+ "succeeded_at.gt"?: string;
19
+ "succeeded_at.lte"?: string;
20
+ "succeeded_at.lt"?: string;
21
+ "payout_destination.type"?: string;
22
+ status?: string;
23
+ limit?: number;
24
+ cursor?: string;
25
+ }
26
+ export interface GetPayoutsSearchRequest {
27
+ "created_at.gte"?: string;
28
+ "created_at.gt"?: string;
29
+ "created_at.lte"?: string;
30
+ "created_at.lt"?: string;
31
+ metadata?: Record<string, unknown>;
32
+ limit?: number;
33
+ cursor?: string;
34
+ }
35
+ export interface CreatePayoutRequestPayoutDestinationDataYooMoney {
36
+ "type": "yoo_money";
37
+ account_number: string;
38
+ }
39
+ export interface CreatePayoutRequestPayoutDestinationDataBankCard {
40
+ "type": "bank_card";
41
+ card: CreatePayoutRequestPayoutDestinationDataBankCardCard;
42
+ }
43
+ export interface CreatePayoutRequestPayoutDestinationDataSbp {
44
+ "type": "sbp";
45
+ phone: string;
46
+ bank_id: string;
47
+ }
48
+ export type CreatePayoutRequestPayoutDestinationData = CreatePayoutRequestPayoutDestinationDataYooMoney | CreatePayoutRequestPayoutDestinationDataBankCard | CreatePayoutRequestPayoutDestinationDataSbp;
49
+ export interface CreatePayoutRequestPersonalDataItem {
50
+ id: string;
51
+ }
52
+ export interface CreatePayoutRequestPayoutDestinationDataBankCardCard {
53
+ "number": string;
54
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payout.js","sourceRoot":"","sources":["../../../src/api/requests/payout.ts"],"names":[],"mappings":""}
@@ -0,0 +1,16 @@
1
+ export interface CreatePersonalDataRequestPayoutStatementRecipient {
2
+ "type": "payout_statement_recipient";
3
+ metadata?: Record<string, unknown>;
4
+ last_name: string;
5
+ first_name: string;
6
+ middle_name?: string;
7
+ birthdate: string;
8
+ }
9
+ export interface CreatePersonalDataRequestSbpPayoutRecipient {
10
+ "type": "sbp_payout_recipient";
11
+ metadata?: Record<string, unknown>;
12
+ last_name: string;
13
+ first_name: string;
14
+ middle_name?: string;
15
+ }
16
+ export type CreatePersonalDataRequest = CreatePersonalDataRequestPayoutStatementRecipient | CreatePersonalDataRequestSbpPayoutRecipient;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=personal-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"personal-data.js","sourceRoot":"","sources":["../../../src/api/requests/personal-data.ts"],"names":[],"mappings":""}
@@ -0,0 +1,59 @@
1
+ import type { CommonAmount, CommonCustomer, CommonMarkCodeInfo, CommonMarkQuantity, CommonPaymentSubjectIndustryDetails, CommonReceiptOperationalDetails, CommonSettlements2 } from '../common';
2
+ import { BasicStatusEnum, CreateReceiptTypeEnum } from '../enums';
3
+ export interface CreateReceiptRequest {
4
+ "type": CreateReceiptTypeEnum;
5
+ payment_id?: string;
6
+ refund_id?: string;
7
+ customer: CommonCustomer;
8
+ items: CreateReceiptRequestItemsItem[];
9
+ internet?: boolean;
10
+ send: boolean;
11
+ tax_system_code?: number;
12
+ timezone?: number;
13
+ additional_user_props?: CreateReceiptRequestAdditionalUserProps;
14
+ receipt_industry_details?: CommonPaymentSubjectIndustryDetails[];
15
+ receipt_operational_details?: CommonReceiptOperationalDetails;
16
+ settlements: CommonSettlements2[];
17
+ on_behalf_of?: string;
18
+ }
19
+ export interface GetReceiptsListRequest {
20
+ "created_at.gte"?: string;
21
+ "created_at.gt"?: string;
22
+ "created_at.lte"?: string;
23
+ "created_at.lt"?: string;
24
+ status?: BasicStatusEnum;
25
+ payment_id?: string;
26
+ refund_id?: string;
27
+ limit?: number;
28
+ cursor?: string;
29
+ }
30
+ export interface CreateReceiptRequestItemsItem {
31
+ description: string;
32
+ amount: CommonAmount;
33
+ vat_code: number;
34
+ quantity: number;
35
+ measure?: string;
36
+ mark_quantity?: CommonMarkQuantity;
37
+ payment_subject?: string;
38
+ payment_mode?: string;
39
+ country_of_origin_code?: string;
40
+ customs_declaration_number?: string;
41
+ excise?: string;
42
+ product_code?: string;
43
+ planned_status?: number;
44
+ mark_code_info?: CommonMarkCodeInfo;
45
+ mark_mode?: string;
46
+ payment_subject_industry_details?: CommonPaymentSubjectIndustryDetails[];
47
+ additional_payment_subject_props?: string;
48
+ supplier?: CreateReceiptRequestItemsItemSupplier;
49
+ agent_type?: string;
50
+ }
51
+ export interface CreateReceiptRequestAdditionalUserProps {
52
+ name: string;
53
+ value: string;
54
+ }
55
+ export interface CreateReceiptRequestItemsItemSupplier {
56
+ name?: string;
57
+ phone?: string;
58
+ inn?: string;
59
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=receipt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../../src/api/requests/receipt.ts"],"names":[],"mappings":""}
@@ -0,0 +1,35 @@
1
+ import type { CommonAmount, CommonArticles, CommonReceipt, CommonRefundSettlements, CommonSources } from '../common';
2
+ import { BasicStatusEnum } from '../enums';
3
+ export interface CreateRefundRequest {
4
+ payment_id: string;
5
+ amount: CommonAmount;
6
+ description?: string;
7
+ receipt?: CommonReceipt;
8
+ sources?: CommonSources[];
9
+ deal?: CreateRefundRequestDeal;
10
+ refund_method_data?: CreateRefundRequestRefundMethodData;
11
+ metadata?: Record<string, unknown>;
12
+ }
13
+ export interface GetRefundsListRequest {
14
+ 'created_at.gte'?: string;
15
+ 'created_at.gt'?: string;
16
+ 'created_at.lte'?: string;
17
+ 'created_at.lt'?: string;
18
+ payment_id?: string;
19
+ status?: BasicStatusEnum;
20
+ limit?: number;
21
+ cursor?: string;
22
+ }
23
+ export interface CreateRefundRequestDeal {
24
+ refund_settlements: CommonRefundSettlements[];
25
+ }
26
+ export interface CreateRefundRequestRefundMethodDataElectronicCertificate {
27
+ type: 'electronic_certificate';
28
+ electronic_certificate?: CreateRefundRequestRefundMethodDataElectronicCertificateElectronicCertificate;
29
+ articles?: CommonArticles[];
30
+ }
31
+ export type CreateRefundRequestRefundMethodData = CreateRefundRequestRefundMethodDataElectronicCertificate;
32
+ export interface CreateRefundRequestRefundMethodDataElectronicCertificateElectronicCertificate {
33
+ amount: CommonAmount;
34
+ basket_id: string;
35
+ }
@@ -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/api/requests/refund.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import { NotificationEventEnum } from '../enums';
2
+ export interface CreateWebhookRequest {
3
+ event: NotificationEventEnum;
4
+ url: string;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=webhook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/api/requests/webhook.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import type { CommonAmount } from '../common';
2
+ import { DealFeeMomentEnum, DealStatusEnum } from '../enums';
3
+ export interface DealSafeDeal {
4
+ "type": string;
5
+ id: string;
6
+ fee_moment: DealFeeMomentEnum;
7
+ description?: string;
8
+ balance: CommonAmount;
9
+ payout_balance: CommonAmount;
10
+ status: DealStatusEnum;
11
+ created_at: string;
12
+ expires_at: string;
13
+ metadata?: Record<string, unknown>;
14
+ test: boolean;
15
+ }
16
+ export type Deal = DealSafeDeal;
17
+ export type CreateDealResponse = Deal;
18
+ export interface GetDealsListResponse {
19
+ type: "list";
20
+ items: Deal[];
21
+ next_cursor?: string;
22
+ }
23
+ export type GetDealResponse = Deal;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=deal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deal.js","sourceRoot":"","sources":["../../../src/api/responses/deal.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export * from './payment';
2
+ export * from './payment-method';
3
+ export * from './invoice';
4
+ export * from './refund';
5
+ export * from './receipt';
6
+ export * from './payout';
7
+ export * from './sbp-banks';
8
+ export * from './personal-data';
9
+ export * from './deal';
10
+ export * from './webhook';
11
+ export * from './me';
@@ -0,0 +1,28 @@
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"), exports);
18
+ __exportStar(require("./payment-method"), exports);
19
+ __exportStar(require("./invoice"), exports);
20
+ __exportStar(require("./refund"), exports);
21
+ __exportStar(require("./receipt"), exports);
22
+ __exportStar(require("./payout"), exports);
23
+ __exportStar(require("./sbp-banks"), exports);
24
+ __exportStar(require("./personal-data"), exports);
25
+ __exportStar(require("./deal"), exports);
26
+ __exportStar(require("./webhook"), exports);
27
+ __exportStar(require("./me"), exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,mDAAiC;AACjC,4CAA0B;AAC1B,2CAAyB;AACzB,4CAA0B;AAC1B,2CAAyB;AACzB,8CAA4B;AAC5B,kDAAgC;AAChC,yCAAuB;AACvB,4CAA0B;AAC1B,uCAAqB"}
@@ -0,0 +1,35 @@
1
+ import type { CommonCart } from '../common';
2
+ import { BasicStatusEnum, CancellationDetailsPartyEnum, CancellationDetailsReasonEnum, PaymentDetailsStatusEnum } from '../enums';
3
+ export interface Invoice {
4
+ id: string;
5
+ status: BasicStatusEnum;
6
+ cart: CommonCart[];
7
+ delivery_method?: InvoiceDeliveryMethod;
8
+ payment_details?: InvoicePaymentDetails;
9
+ created_at: string;
10
+ expires_at?: string;
11
+ description?: string;
12
+ cancellation_details?: InvoiceCancellationDetails;
13
+ metadata?: Record<string, unknown>;
14
+ }
15
+ export interface InvoiceDeliveryMethodSelf {
16
+ "type": "self";
17
+ url?: string;
18
+ }
19
+ export interface InvoiceDeliveryMethodSms {
20
+ "type": "sms";
21
+ }
22
+ export interface InvoiceDeliveryMethodEmail {
23
+ "type": "email";
24
+ }
25
+ export type InvoiceDeliveryMethod = InvoiceDeliveryMethodSelf | InvoiceDeliveryMethodSms | InvoiceDeliveryMethodEmail;
26
+ export interface InvoicePaymentDetails {
27
+ id: string;
28
+ status: PaymentDetailsStatusEnum;
29
+ }
30
+ export interface InvoiceCancellationDetails {
31
+ party: CancellationDetailsPartyEnum;
32
+ reason: CancellationDetailsReasonEnum;
33
+ }
34
+ export type CreateInvoiceResponse = Invoice;
35
+ export type GetInvoiceResponse = Invoice;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=invoice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"invoice.js","sourceRoot":"","sources":["../../../src/api/responses/invoice.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ import type { CommonAmount } from '../common';
2
+ import { FiscalizationProviderEnum, MeStatusEnum, PayoutMethodEnum } from '../enums';
3
+ export interface Me {
4
+ account_id: string;
5
+ status: MeStatusEnum;
6
+ test: boolean;
7
+ fiscalization?: MeFiscalization;
8
+ fiscalization_enabled?: boolean;
9
+ payment_methods?: unknown[];
10
+ itn?: string;
11
+ payout_methods?: PayoutMethodEnum[];
12
+ name?: string;
13
+ payout_balance?: CommonAmount;
14
+ }
15
+ export interface MeFiscalization {
16
+ enabled: boolean;
17
+ provider: FiscalizationProviderEnum;
18
+ }
19
+ export type GetMeResponse = Me;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=me.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"me.js","sourceRoot":"","sources":["../../../src/api/responses/me.ts"],"names":[],"mappings":""}
@@ -0,0 +1,15 @@
1
+ import type { CommonCard2, CommonConfirmation2, CommonHolder } from '../common';
2
+ import { PaymentMethodStatusEnum } from '../enums';
3
+ export interface PaymentMethodBankCard {
4
+ "type": string;
5
+ id: string;
6
+ saved: boolean;
7
+ status: PaymentMethodStatusEnum;
8
+ holder: CommonHolder;
9
+ title?: string;
10
+ confirmation?: CommonConfirmation2;
11
+ card?: CommonCard2;
12
+ }
13
+ export type PaymentMethod = PaymentMethodBankCard;
14
+ export type CreatePaymentMethodResponse = PaymentMethod;
15
+ export type GetPaymentMethodResponse = PaymentMethod;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payment-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payment-method.js","sourceRoot":"","sources":["../../../src/api/responses/payment-method.ts"],"names":[],"mappings":""}