@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.
- package/README.md +191 -0
- package/dist/api/common.d.ts +215 -0
- package/dist/api/common.js +3 -0
- package/dist/api/common.js.map +1 -0
- package/dist/api/enums/common.d.ts +121 -0
- package/dist/api/enums/common.js +145 -0
- package/dist/api/enums/common.js.map +1 -0
- package/dist/api/enums/currency.enum.d.ts +121 -0
- package/dist/api/enums/currency.enum.js +126 -0
- package/dist/api/enums/currency.enum.js.map +1 -0
- package/dist/api/enums/index.d.ts +2 -0
- package/dist/api/enums/index.js +19 -0
- package/dist/api/enums/index.js.map +1 -0
- package/dist/api/index.d.ts +5 -0
- package/dist/api/index.js +22 -0
- package/dist/api/index.js.map +1 -0
- package/dist/api/notifications.d.ts +10 -0
- package/dist/api/notifications.js +3 -0
- package/dist/api/notifications.js.map +1 -0
- package/dist/api/requests/deal.d.ts +21 -0
- package/dist/api/requests/deal.js +3 -0
- package/dist/api/requests/deal.js.map +1 -0
- package/dist/api/requests/index.d.ts +10 -0
- package/dist/api/requests/index.js +27 -0
- package/dist/api/requests/index.js.map +1 -0
- package/dist/api/requests/invoice.d.ts +33 -0
- package/dist/api/requests/invoice.js +3 -0
- package/dist/api/requests/invoice.js.map +1 -0
- package/dist/api/requests/me.d.ts +3 -0
- package/dist/api/requests/me.js +3 -0
- package/dist/api/requests/me.js.map +1 -0
- package/dist/api/requests/payment-method.d.ts +9 -0
- package/dist/api/requests/payment-method.js +3 -0
- package/dist/api/requests/payment-method.js.map +1 -0
- package/dist/api/requests/payment.d.ts +199 -0
- package/dist/api/requests/payment.js +3 -0
- package/dist/api/requests/payment.js.map +1 -0
- package/dist/api/requests/payout.d.ts +54 -0
- package/dist/api/requests/payout.js +3 -0
- package/dist/api/requests/payout.js.map +1 -0
- package/dist/api/requests/personal-data.d.ts +16 -0
- package/dist/api/requests/personal-data.js +3 -0
- package/dist/api/requests/personal-data.js.map +1 -0
- package/dist/api/requests/receipt.d.ts +59 -0
- package/dist/api/requests/receipt.js +3 -0
- package/dist/api/requests/receipt.js.map +1 -0
- package/dist/api/requests/refund.d.ts +35 -0
- package/dist/api/requests/refund.js +3 -0
- package/dist/api/requests/refund.js.map +1 -0
- package/dist/api/requests/webhook.d.ts +5 -0
- package/dist/api/requests/webhook.js +3 -0
- package/dist/api/requests/webhook.js.map +1 -0
- package/dist/api/responses/deal.d.ts +23 -0
- package/dist/api/responses/deal.js +3 -0
- package/dist/api/responses/deal.js.map +1 -0
- package/dist/api/responses/index.d.ts +11 -0
- package/dist/api/responses/index.js +28 -0
- package/dist/api/responses/index.js.map +1 -0
- package/dist/api/responses/invoice.d.ts +35 -0
- package/dist/api/responses/invoice.js +3 -0
- package/dist/api/responses/invoice.js.map +1 -0
- package/dist/api/responses/me.d.ts +19 -0
- package/dist/api/responses/me.js +3 -0
- package/dist/api/responses/me.js.map +1 -0
- package/dist/api/responses/payment-method.d.ts +15 -0
- package/dist/api/responses/payment-method.js +3 -0
- package/dist/api/responses/payment-method.js.map +1 -0
- package/dist/api/responses/payment.d.ts +268 -0
- package/dist/api/responses/payment.js +3 -0
- package/dist/api/responses/payment.js.map +1 -0
- package/dist/api/responses/payout.d.ts +65 -0
- package/dist/api/responses/payout.js +3 -0
- package/dist/api/responses/payout.js.map +1 -0
- package/dist/api/responses/personal-data.d.ts +16 -0
- package/dist/api/responses/personal-data.js +3 -0
- package/dist/api/responses/personal-data.js.map +1 -0
- package/dist/api/responses/receipt.d.ts +54 -0
- package/dist/api/responses/receipt.js +3 -0
- package/dist/api/responses/receipt.js.map +1 -0
- package/dist/api/responses/refund.d.ts +49 -0
- package/dist/api/responses/refund.js +3 -0
- package/dist/api/responses/refund.js.map +1 -0
- package/dist/api/responses/sbp-banks.d.ts +9 -0
- package/dist/api/responses/sbp-banks.js +3 -0
- package/dist/api/responses/sbp-banks.js.map +1 -0
- package/dist/api/responses/webhook.d.ts +11 -0
- package/dist/api/responses/webhook.js +3 -0
- package/dist/api/responses/webhook.js.map +1 -0
- package/dist/http/yookassa.constants.d.ts +1 -0
- package/dist/http/yookassa.constants.js +5 -0
- package/dist/http/yookassa.constants.js.map +1 -0
- package/dist/http/yookassa.error.d.ts +6 -0
- package/dist/http/yookassa.error.js +14 -0
- package/dist/http/yookassa.error.js.map +1 -0
- package/dist/http/yookassa.http-client.d.ts +17 -0
- package/dist/http/yookassa.http-client.js +87 -0
- package/dist/http/yookassa.http-client.js.map +1 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/modules/deal/deal.module.d.ts +2 -0
- package/dist/modules/deal/deal.module.js +21 -0
- package/dist/modules/deal/deal.module.js.map +1 -0
- package/dist/modules/deal/deal.service.d.ts +9 -0
- package/dist/modules/deal/deal.service.js +34 -0
- package/dist/modules/deal/deal.service.js.map +1 -0
- package/dist/modules/invoice/invoice.module.d.ts +2 -0
- package/dist/modules/invoice/invoice.module.js +21 -0
- package/dist/modules/invoice/invoice.module.js.map +1 -0
- package/dist/modules/invoice/invoice.service.d.ts +8 -0
- package/dist/modules/invoice/invoice.service.js +31 -0
- package/dist/modules/invoice/invoice.service.js.map +1 -0
- package/dist/modules/me/me.module.d.ts +2 -0
- package/dist/modules/me/me.module.js +21 -0
- package/dist/modules/me/me.module.js.map +1 -0
- package/dist/modules/me/me.service.d.ts +7 -0
- package/dist/modules/me/me.service.js +28 -0
- package/dist/modules/me/me.service.js.map +1 -0
- package/dist/modules/payment/payment.module.d.ts +2 -0
- package/dist/modules/payment/payment.module.js +21 -0
- package/dist/modules/payment/payment.module.js.map +1 -0
- package/dist/modules/payment/payment.service.d.ts +11 -0
- package/dist/modules/payment/payment.service.js +40 -0
- package/dist/modules/payment/payment.service.js.map +1 -0
- package/dist/modules/payment-method/payment-method.module.d.ts +2 -0
- package/dist/modules/payment-method/payment-method.module.js +21 -0
- package/dist/modules/payment-method/payment-method.module.js.map +1 -0
- package/dist/modules/payment-method/payment-method.service.d.ts +8 -0
- package/dist/modules/payment-method/payment-method.service.js +31 -0
- package/dist/modules/payment-method/payment-method.service.js.map +1 -0
- package/dist/modules/payout/payout.module.d.ts +2 -0
- package/dist/modules/payout/payout.module.js +21 -0
- package/dist/modules/payout/payout.module.js.map +1 -0
- package/dist/modules/payout/payout.service.d.ts +10 -0
- package/dist/modules/payout/payout.service.js +37 -0
- package/dist/modules/payout/payout.service.js.map +1 -0
- package/dist/modules/personal-data/personal-data.module.d.ts +2 -0
- package/dist/modules/personal-data/personal-data.module.js +21 -0
- package/dist/modules/personal-data/personal-data.module.js.map +1 -0
- package/dist/modules/personal-data/personal-data.service.d.ts +8 -0
- package/dist/modules/personal-data/personal-data.service.js +31 -0
- package/dist/modules/personal-data/personal-data.service.js.map +1 -0
- package/dist/modules/receipt/receipt.module.d.ts +2 -0
- package/dist/modules/receipt/receipt.module.js +21 -0
- package/dist/modules/receipt/receipt.module.js.map +1 -0
- package/dist/modules/receipt/receipt.service.d.ts +9 -0
- package/dist/modules/receipt/receipt.service.js +34 -0
- package/dist/modules/receipt/receipt.service.js.map +1 -0
- package/dist/modules/refund/refund.module.d.ts +2 -0
- package/dist/modules/refund/refund.module.js +21 -0
- package/dist/modules/refund/refund.module.js.map +1 -0
- package/dist/modules/refund/refund.service.d.ts +9 -0
- package/dist/modules/refund/refund.service.js +34 -0
- package/dist/modules/refund/refund.service.js.map +1 -0
- package/dist/modules/sbp-banks/sbp-banks.module.d.ts +2 -0
- package/dist/modules/sbp-banks/sbp-banks.module.js +21 -0
- package/dist/modules/sbp-banks/sbp-banks.module.js.map +1 -0
- package/dist/modules/sbp-banks/sbp-banks.service.d.ts +7 -0
- package/dist/modules/sbp-banks/sbp-banks.service.js +28 -0
- package/dist/modules/sbp-banks/sbp-banks.service.js.map +1 -0
- package/dist/modules/webhook/constants/yookassa-ip-whitelist.d.ts +1 -0
- package/dist/modules/webhook/constants/yookassa-ip-whitelist.js +13 -0
- package/dist/modules/webhook/constants/yookassa-ip-whitelist.js.map +1 -0
- package/dist/modules/webhook/decorators/index.d.ts +1 -0
- package/dist/modules/webhook/decorators/index.js +18 -0
- package/dist/modules/webhook/decorators/index.js.map +1 -0
- package/dist/modules/webhook/decorators/yookassa-webhook.decorator.d.ts +1 -0
- package/dist/modules/webhook/decorators/yookassa-webhook.decorator.js +9 -0
- package/dist/modules/webhook/decorators/yookassa-webhook.decorator.js.map +1 -0
- package/dist/modules/webhook/guards/yookassa-webhook.guard.d.ts +6 -0
- package/dist/modules/webhook/guards/yookassa-webhook.guard.js +38 -0
- package/dist/modules/webhook/guards/yookassa-webhook.guard.js.map +1 -0
- package/dist/modules/webhook/index.d.ts +4 -0
- package/dist/modules/webhook/index.js +21 -0
- package/dist/modules/webhook/index.js.map +1 -0
- package/dist/modules/webhook/utils/ip-matcher.util.d.ts +1 -0
- package/dist/modules/webhook/utils/ip-matcher.util.js +55 -0
- package/dist/modules/webhook/utils/ip-matcher.util.js.map +1 -0
- package/dist/modules/webhook/webhook.module.d.ts +2 -0
- package/dist/modules/webhook/webhook.module.js +21 -0
- package/dist/modules/webhook/webhook.module.js.map +1 -0
- package/dist/modules/webhook/webhook.service.d.ts +9 -0
- package/dist/modules/webhook/webhook.service.js +34 -0
- package/dist/modules/webhook/webhook.service.js.map +1 -0
- package/dist/yookassa.interface.d.ts +9 -0
- package/dist/yookassa.interface.js +5 -0
- package/dist/yookassa.interface.js.map +1 -0
- package/dist/yookassa.module.d.ts +6 -0
- package/dist/yookassa.module.js +85 -0
- package/dist/yookassa.module.js.map +1 -0
- package/dist/yookassa.service.d.ts +25 -0
- package/dist/yookassa.service.js +55 -0
- package/dist/yookassa.service.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import type { CommonAmount, CommonCard2, CommonCard3, CommonDeal, CommonVatData } from '../common';
|
|
2
|
+
import { BasicStatusEnum, PaymentMethodStatusEnum, PaymentStatusEnum } from '../enums';
|
|
3
|
+
export interface Payment {
|
|
4
|
+
id: string;
|
|
5
|
+
status: PaymentStatusEnum;
|
|
6
|
+
amount: CommonAmount;
|
|
7
|
+
income_amount?: CommonAmount;
|
|
8
|
+
description?: string;
|
|
9
|
+
recipient: PaymentRecipient;
|
|
10
|
+
payment_method?: PaymentPaymentMethod;
|
|
11
|
+
captured_at?: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
expires_at?: string;
|
|
14
|
+
confirmation?: PaymentConfirmation;
|
|
15
|
+
test: boolean;
|
|
16
|
+
refunded_amount?: CommonAmount;
|
|
17
|
+
paid: boolean;
|
|
18
|
+
refundable: boolean;
|
|
19
|
+
receipt_registration?: BasicStatusEnum;
|
|
20
|
+
metadata?: Record<string, unknown>;
|
|
21
|
+
cancellation_details?: PaymentCancellationDetails;
|
|
22
|
+
authorization_details?: PaymentAuthorizationDetails;
|
|
23
|
+
transfers?: PaymentTransfersItem[];
|
|
24
|
+
deal?: CommonDeal;
|
|
25
|
+
merchant_customer_id?: string;
|
|
26
|
+
invoice_details?: PaymentInvoiceDetails;
|
|
27
|
+
}
|
|
28
|
+
export interface PaymentRecipient {
|
|
29
|
+
account_id: string;
|
|
30
|
+
gateway_id: string;
|
|
31
|
+
}
|
|
32
|
+
export interface PaymentPaymentMethodBankCard {
|
|
33
|
+
"type": "bank_card";
|
|
34
|
+
id: string;
|
|
35
|
+
saved: boolean;
|
|
36
|
+
status: PaymentMethodStatusEnum;
|
|
37
|
+
title?: string;
|
|
38
|
+
card?: CommonCard2;
|
|
39
|
+
}
|
|
40
|
+
export interface PaymentPaymentMethodCash {
|
|
41
|
+
"type": "cash";
|
|
42
|
+
id: string;
|
|
43
|
+
saved: boolean;
|
|
44
|
+
status: PaymentMethodStatusEnum;
|
|
45
|
+
title?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface PaymentPaymentMethodQiwi {
|
|
48
|
+
"type": "qiwi";
|
|
49
|
+
id: string;
|
|
50
|
+
saved: boolean;
|
|
51
|
+
status: PaymentMethodStatusEnum;
|
|
52
|
+
title?: string;
|
|
53
|
+
}
|
|
54
|
+
export interface PaymentPaymentMethodAlfabank {
|
|
55
|
+
"type": "alfabank";
|
|
56
|
+
id: string;
|
|
57
|
+
saved: boolean;
|
|
58
|
+
status: PaymentMethodStatusEnum;
|
|
59
|
+
title?: string;
|
|
60
|
+
login?: string;
|
|
61
|
+
}
|
|
62
|
+
export interface PaymentPaymentMethodWebmoney {
|
|
63
|
+
"type": "webmoney";
|
|
64
|
+
id: string;
|
|
65
|
+
saved: boolean;
|
|
66
|
+
status: PaymentMethodStatusEnum;
|
|
67
|
+
title?: string;
|
|
68
|
+
}
|
|
69
|
+
export interface PaymentPaymentMethodApplePay {
|
|
70
|
+
"type": "apple_pay";
|
|
71
|
+
id: string;
|
|
72
|
+
saved: boolean;
|
|
73
|
+
status: PaymentMethodStatusEnum;
|
|
74
|
+
title?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface PaymentPaymentMethodGooglePay {
|
|
77
|
+
"type": "google_pay";
|
|
78
|
+
id: string;
|
|
79
|
+
saved: boolean;
|
|
80
|
+
status: PaymentMethodStatusEnum;
|
|
81
|
+
title?: string;
|
|
82
|
+
}
|
|
83
|
+
export interface PaymentPaymentMethodYooMoney {
|
|
84
|
+
"type": "yoo_money";
|
|
85
|
+
id: string;
|
|
86
|
+
saved: boolean;
|
|
87
|
+
status: PaymentMethodStatusEnum;
|
|
88
|
+
title?: string;
|
|
89
|
+
account_number?: string;
|
|
90
|
+
}
|
|
91
|
+
export interface PaymentPaymentMethodSberbank {
|
|
92
|
+
"type": "sberbank";
|
|
93
|
+
id: string;
|
|
94
|
+
saved: boolean;
|
|
95
|
+
status: PaymentMethodStatusEnum;
|
|
96
|
+
title?: string;
|
|
97
|
+
phone?: string;
|
|
98
|
+
card?: CommonCard3;
|
|
99
|
+
}
|
|
100
|
+
export interface PaymentPaymentMethodMobileBalance {
|
|
101
|
+
"type": "mobile_balance";
|
|
102
|
+
id: string;
|
|
103
|
+
saved: boolean;
|
|
104
|
+
status: PaymentMethodStatusEnum;
|
|
105
|
+
title?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface PaymentPaymentMethodInstallments {
|
|
108
|
+
"type": "installments";
|
|
109
|
+
id: string;
|
|
110
|
+
saved: boolean;
|
|
111
|
+
status: PaymentMethodStatusEnum;
|
|
112
|
+
title?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface PaymentPaymentMethodB2bSberbank {
|
|
115
|
+
"type": "b2b_sberbank";
|
|
116
|
+
id: string;
|
|
117
|
+
saved: boolean;
|
|
118
|
+
status: PaymentMethodStatusEnum;
|
|
119
|
+
title?: string;
|
|
120
|
+
payment_purpose: string;
|
|
121
|
+
vat_data: CommonVatData;
|
|
122
|
+
payer_bank_details?: PaymentPaymentMethodB2bSberbankPayerBankDetails;
|
|
123
|
+
}
|
|
124
|
+
export interface PaymentPaymentMethodTinkoffBank {
|
|
125
|
+
"type": "tinkoff_bank";
|
|
126
|
+
id: string;
|
|
127
|
+
saved: boolean;
|
|
128
|
+
status: PaymentMethodStatusEnum;
|
|
129
|
+
title?: string;
|
|
130
|
+
card?: CommonCard3;
|
|
131
|
+
}
|
|
132
|
+
export interface PaymentPaymentMethodWechat {
|
|
133
|
+
"type": "wechat";
|
|
134
|
+
id: string;
|
|
135
|
+
saved: boolean;
|
|
136
|
+
status: PaymentMethodStatusEnum;
|
|
137
|
+
title?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface PaymentPaymentMethodSbp {
|
|
140
|
+
"type": "sbp";
|
|
141
|
+
id: string;
|
|
142
|
+
saved: boolean;
|
|
143
|
+
status: PaymentMethodStatusEnum;
|
|
144
|
+
title?: string;
|
|
145
|
+
sbp_operation_id?: string;
|
|
146
|
+
payer_bank_details?: PaymentPaymentMethodSbpPayerBankDetails;
|
|
147
|
+
}
|
|
148
|
+
export interface PaymentPaymentMethodSberLoan {
|
|
149
|
+
"type": "sber_loan";
|
|
150
|
+
id: string;
|
|
151
|
+
saved: boolean;
|
|
152
|
+
status: PaymentMethodStatusEnum;
|
|
153
|
+
title?: string;
|
|
154
|
+
loan_option?: string;
|
|
155
|
+
discount_amount?: CommonAmount;
|
|
156
|
+
suspended_until?: string;
|
|
157
|
+
}
|
|
158
|
+
export interface PaymentPaymentMethodElectronicCertificate {
|
|
159
|
+
"type": "electronic_certificate";
|
|
160
|
+
id: string;
|
|
161
|
+
saved: boolean;
|
|
162
|
+
status: PaymentMethodStatusEnum;
|
|
163
|
+
title?: string;
|
|
164
|
+
card?: CommonCard2;
|
|
165
|
+
electronic_certificate?: PaymentPaymentMethodElectronicCertificateElectronicCertificate;
|
|
166
|
+
articles?: PaymentPaymentMethodElectronicCertificateArticlesItem[];
|
|
167
|
+
}
|
|
168
|
+
export interface PaymentPaymentMethodSberBnpl {
|
|
169
|
+
"type": "sber_bnpl";
|
|
170
|
+
id: string;
|
|
171
|
+
saved: boolean;
|
|
172
|
+
status: PaymentMethodStatusEnum;
|
|
173
|
+
title?: string;
|
|
174
|
+
}
|
|
175
|
+
export interface PaymentPaymentMethodAlfaPay {
|
|
176
|
+
"type": "alfa_pay";
|
|
177
|
+
id: string;
|
|
178
|
+
saved: boolean;
|
|
179
|
+
status: PaymentMethodStatusEnum;
|
|
180
|
+
title?: string;
|
|
181
|
+
card?: CommonCard3;
|
|
182
|
+
}
|
|
183
|
+
export type PaymentPaymentMethod = PaymentPaymentMethodBankCard | PaymentPaymentMethodCash | PaymentPaymentMethodQiwi | PaymentPaymentMethodAlfabank | PaymentPaymentMethodWebmoney | PaymentPaymentMethodApplePay | PaymentPaymentMethodGooglePay | PaymentPaymentMethodYooMoney | PaymentPaymentMethodSberbank | PaymentPaymentMethodMobileBalance | PaymentPaymentMethodInstallments | PaymentPaymentMethodB2bSberbank | PaymentPaymentMethodTinkoffBank | PaymentPaymentMethodWechat | PaymentPaymentMethodSbp | PaymentPaymentMethodSberLoan | PaymentPaymentMethodElectronicCertificate | PaymentPaymentMethodSberBnpl | PaymentPaymentMethodAlfaPay;
|
|
184
|
+
export interface PaymentConfirmationRedirect {
|
|
185
|
+
"type": "redirect";
|
|
186
|
+
enforce?: boolean;
|
|
187
|
+
return_url?: string;
|
|
188
|
+
confirmation_url: string;
|
|
189
|
+
}
|
|
190
|
+
export interface PaymentConfirmationExternal {
|
|
191
|
+
"type": "external";
|
|
192
|
+
}
|
|
193
|
+
export interface PaymentConfirmationQr {
|
|
194
|
+
"type": "qr";
|
|
195
|
+
confirmation_data: string;
|
|
196
|
+
}
|
|
197
|
+
export interface PaymentConfirmationEmbedded {
|
|
198
|
+
"type": "embedded";
|
|
199
|
+
confirmation_token: string;
|
|
200
|
+
}
|
|
201
|
+
export interface PaymentConfirmationMobileApplication {
|
|
202
|
+
"type": "mobile_application";
|
|
203
|
+
confirmation_url: string;
|
|
204
|
+
}
|
|
205
|
+
export type PaymentConfirmation = PaymentConfirmationRedirect | PaymentConfirmationExternal | PaymentConfirmationQr | PaymentConfirmationEmbedded | PaymentConfirmationMobileApplication;
|
|
206
|
+
export interface PaymentCancellationDetails {
|
|
207
|
+
party: string;
|
|
208
|
+
reason: string;
|
|
209
|
+
}
|
|
210
|
+
export interface PaymentAuthorizationDetails {
|
|
211
|
+
rrn?: string;
|
|
212
|
+
auth_code?: string;
|
|
213
|
+
three_d_secure: PaymentAuthorizationDetailsThreeDSecure;
|
|
214
|
+
}
|
|
215
|
+
export interface PaymentTransfersItem {
|
|
216
|
+
account_id: string;
|
|
217
|
+
amount: CommonAmount;
|
|
218
|
+
status: PaymentStatusEnum;
|
|
219
|
+
platform_fee_amount?: CommonAmount;
|
|
220
|
+
description?: string;
|
|
221
|
+
metadata?: Record<string, unknown>;
|
|
222
|
+
}
|
|
223
|
+
export interface PaymentInvoiceDetails {
|
|
224
|
+
id?: string;
|
|
225
|
+
}
|
|
226
|
+
export interface PaymentPaymentMethodB2bSberbankPayerBankDetails {
|
|
227
|
+
full_name: string;
|
|
228
|
+
short_name: string;
|
|
229
|
+
address: string;
|
|
230
|
+
inn: string;
|
|
231
|
+
bank_name: string;
|
|
232
|
+
bank_branch: string;
|
|
233
|
+
bank_bik: string;
|
|
234
|
+
account: string;
|
|
235
|
+
kpp?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface PaymentPaymentMethodSbpPayerBankDetails {
|
|
238
|
+
bank_id: string;
|
|
239
|
+
bic: string;
|
|
240
|
+
}
|
|
241
|
+
export interface PaymentPaymentMethodElectronicCertificateElectronicCertificate {
|
|
242
|
+
amount: CommonAmount;
|
|
243
|
+
basket_id: string;
|
|
244
|
+
}
|
|
245
|
+
export interface PaymentPaymentMethodElectronicCertificateArticlesItem {
|
|
246
|
+
article_number: number;
|
|
247
|
+
tru_code: string;
|
|
248
|
+
article_code?: string;
|
|
249
|
+
certificates: PaymentPaymentMethodElectronicCertificateArticlesItemCertificatesItem[];
|
|
250
|
+
}
|
|
251
|
+
export interface PaymentAuthorizationDetailsThreeDSecure {
|
|
252
|
+
applied: boolean;
|
|
253
|
+
}
|
|
254
|
+
export interface PaymentPaymentMethodElectronicCertificateArticlesItemCertificatesItem {
|
|
255
|
+
certificate_id: string;
|
|
256
|
+
tru_quantity: number;
|
|
257
|
+
available_compensation: CommonAmount;
|
|
258
|
+
applied_compensation: CommonAmount;
|
|
259
|
+
}
|
|
260
|
+
export type CreatePaymentResponse = Payment;
|
|
261
|
+
export interface GetPaymentsListResponse {
|
|
262
|
+
type: "list";
|
|
263
|
+
items: Payment[];
|
|
264
|
+
next_cursor?: string;
|
|
265
|
+
}
|
|
266
|
+
export type GetPaymentResponse = Payment;
|
|
267
|
+
export type CapturePaymentResponse = Payment;
|
|
268
|
+
export type CancelPaymentResponse = Payment;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../src/api/responses/payment.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { CommonAmount, CommonDeal2 } from '../common';
|
|
2
|
+
import { BankCardTypeEnum, BasicStatusEnum } from '../enums';
|
|
3
|
+
export interface Payout {
|
|
4
|
+
id: string;
|
|
5
|
+
amount: CommonAmount;
|
|
6
|
+
status: BasicStatusEnum;
|
|
7
|
+
payout_destination: PayoutPayoutDestination;
|
|
8
|
+
description?: string;
|
|
9
|
+
created_at: string;
|
|
10
|
+
succeeded_at?: string;
|
|
11
|
+
deal?: CommonDeal2;
|
|
12
|
+
self_employed?: PayoutSelfEmployed;
|
|
13
|
+
receipt?: PayoutReceipt;
|
|
14
|
+
cancellation_details?: PayoutCancellationDetails;
|
|
15
|
+
metadata?: Record<string, unknown>;
|
|
16
|
+
test: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface PayoutPayoutDestinationBankCard {
|
|
19
|
+
"type": "bank_card";
|
|
20
|
+
card?: PayoutPayoutDestinationBankCardCard;
|
|
21
|
+
}
|
|
22
|
+
export interface PayoutPayoutDestinationYooMoney {
|
|
23
|
+
"type": "yoo_money";
|
|
24
|
+
account_number: string;
|
|
25
|
+
}
|
|
26
|
+
export interface PayoutPayoutDestinationSbp {
|
|
27
|
+
"type": "sbp";
|
|
28
|
+
phone: string;
|
|
29
|
+
bank_id: string;
|
|
30
|
+
sbp_operation_id?: string;
|
|
31
|
+
recipient_checked: boolean;
|
|
32
|
+
}
|
|
33
|
+
export type PayoutPayoutDestination = PayoutPayoutDestinationBankCard | PayoutPayoutDestinationYooMoney | PayoutPayoutDestinationSbp;
|
|
34
|
+
export interface PayoutSelfEmployed {
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
export interface PayoutReceipt {
|
|
38
|
+
service_name: string;
|
|
39
|
+
npd_receipt_id?: string;
|
|
40
|
+
url?: string;
|
|
41
|
+
amount?: CommonAmount;
|
|
42
|
+
}
|
|
43
|
+
export interface PayoutCancellationDetails {
|
|
44
|
+
party: string;
|
|
45
|
+
reason: string;
|
|
46
|
+
}
|
|
47
|
+
export interface PayoutPayoutDestinationBankCardCard {
|
|
48
|
+
first6: string;
|
|
49
|
+
last4: string;
|
|
50
|
+
card_type: BankCardTypeEnum;
|
|
51
|
+
issuer_country?: string;
|
|
52
|
+
issuer_name?: string;
|
|
53
|
+
}
|
|
54
|
+
export type CreatePayoutResponse = Payout;
|
|
55
|
+
export interface GetPayoutsListResponse {
|
|
56
|
+
type: "list";
|
|
57
|
+
items: Payout[];
|
|
58
|
+
next_cursor?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface GetPayoutsSearchResponse {
|
|
61
|
+
type: "list";
|
|
62
|
+
items: Payout[];
|
|
63
|
+
next_cursor?: string;
|
|
64
|
+
}
|
|
65
|
+
export type GetPayoutResponse = Payout;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payout.js","sourceRoot":"","sources":["../../../src/api/responses/payout.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PersonalDataStatusEnum, PersonalDataTypeEnum } from '../enums';
|
|
2
|
+
export interface PersonalData {
|
|
3
|
+
id: string;
|
|
4
|
+
"type": PersonalDataTypeEnum;
|
|
5
|
+
status: PersonalDataStatusEnum;
|
|
6
|
+
cancellation_details?: PersonalDataCancellationDetails;
|
|
7
|
+
created_at: string;
|
|
8
|
+
expires_at?: string;
|
|
9
|
+
metadata?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
export interface PersonalDataCancellationDetails {
|
|
12
|
+
party: string;
|
|
13
|
+
reason: string;
|
|
14
|
+
}
|
|
15
|
+
export type CreatePersonalDataResponse = PersonalData;
|
|
16
|
+
export type GetPersonalDataResponse = PersonalData;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personal-data.js","sourceRoot":"","sources":["../../../src/api/responses/personal-data.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CommonAmount, CommonMarkCodeInfo, CommonMarkQuantity, CommonPaymentSubjectIndustryDetails, CommonReceiptOperationalDetails, CommonSettlements2 } from '../common';
|
|
2
|
+
import { BasicStatusEnum } from '../enums';
|
|
3
|
+
export interface Receipt {
|
|
4
|
+
id: string;
|
|
5
|
+
"type": string;
|
|
6
|
+
payment_id?: string;
|
|
7
|
+
refund_id?: string;
|
|
8
|
+
status: BasicStatusEnum;
|
|
9
|
+
fiscal_document_number?: string;
|
|
10
|
+
fiscal_storage_number?: string;
|
|
11
|
+
fiscal_attribute?: string;
|
|
12
|
+
registered_at?: string;
|
|
13
|
+
fiscal_provider_id?: string;
|
|
14
|
+
items: ReceiptItemsItem[];
|
|
15
|
+
internet?: boolean;
|
|
16
|
+
settlements?: CommonSettlements2[];
|
|
17
|
+
on_behalf_of?: string;
|
|
18
|
+
tax_system_code?: number;
|
|
19
|
+
timezone?: number;
|
|
20
|
+
receipt_industry_details?: CommonPaymentSubjectIndustryDetails[];
|
|
21
|
+
receipt_operational_details?: CommonReceiptOperationalDetails;
|
|
22
|
+
}
|
|
23
|
+
export interface ReceiptItemsItem {
|
|
24
|
+
description: string;
|
|
25
|
+
quantity: number;
|
|
26
|
+
amount: CommonAmount;
|
|
27
|
+
vat_code: number;
|
|
28
|
+
payment_subject?: string;
|
|
29
|
+
payment_mode?: string;
|
|
30
|
+
country_of_origin_code?: string;
|
|
31
|
+
customs_declaration_number?: string;
|
|
32
|
+
excise?: string;
|
|
33
|
+
supplier?: ReceiptItemsItemSupplier;
|
|
34
|
+
agent_type?: string;
|
|
35
|
+
mark_code_info?: CommonMarkCodeInfo;
|
|
36
|
+
measure?: string;
|
|
37
|
+
payment_subject_industry_details?: CommonPaymentSubjectIndustryDetails[];
|
|
38
|
+
product_code?: string;
|
|
39
|
+
planned_status?: number;
|
|
40
|
+
mark_mode?: string;
|
|
41
|
+
mark_quantity?: CommonMarkQuantity;
|
|
42
|
+
}
|
|
43
|
+
export interface ReceiptItemsItemSupplier {
|
|
44
|
+
name?: string;
|
|
45
|
+
phone?: string;
|
|
46
|
+
inn?: string;
|
|
47
|
+
}
|
|
48
|
+
export type CreateReceiptResponse = Receipt;
|
|
49
|
+
export interface GetReceiptsListResponse {
|
|
50
|
+
type: "list";
|
|
51
|
+
items: Receipt[];
|
|
52
|
+
next_cursor?: string;
|
|
53
|
+
}
|
|
54
|
+
export type GetReceiptResponse = Receipt;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt.js","sourceRoot":"","sources":["../../../src/api/responses/receipt.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CommonAmount, CommonArticles, CommonRefundSettlements, CommonSources } from '../common';
|
|
2
|
+
import { BasicStatusEnum } from '../enums';
|
|
3
|
+
export interface Refund {
|
|
4
|
+
id: string;
|
|
5
|
+
payment_id: string;
|
|
6
|
+
status: BasicStatusEnum;
|
|
7
|
+
cancellation_details?: RefundCancellationDetails;
|
|
8
|
+
receipt_registration?: BasicStatusEnum;
|
|
9
|
+
created_at: string;
|
|
10
|
+
amount: CommonAmount;
|
|
11
|
+
description?: string;
|
|
12
|
+
sources?: CommonSources[];
|
|
13
|
+
deal?: RefundDeal;
|
|
14
|
+
refund_method?: RefundRefundMethod;
|
|
15
|
+
refund_authorization_details?: RefundRefundAuthorizationDetails;
|
|
16
|
+
metadata?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface RefundCancellationDetails {
|
|
19
|
+
party: string;
|
|
20
|
+
reason: string;
|
|
21
|
+
}
|
|
22
|
+
export interface RefundDeal {
|
|
23
|
+
id: string;
|
|
24
|
+
refund_settlements: CommonRefundSettlements[];
|
|
25
|
+
}
|
|
26
|
+
export interface RefundRefundMethodSbp {
|
|
27
|
+
"type": "sbp";
|
|
28
|
+
sbp_operation_id?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RefundRefundMethodElectronicCertificate {
|
|
31
|
+
"type": "electronic_certificate";
|
|
32
|
+
electronic_certificate?: RefundRefundMethodElectronicCertificateElectronicCertificate;
|
|
33
|
+
articles?: CommonArticles[];
|
|
34
|
+
}
|
|
35
|
+
export type RefundRefundMethod = RefundRefundMethodSbp | RefundRefundMethodElectronicCertificate;
|
|
36
|
+
export interface RefundRefundAuthorizationDetails {
|
|
37
|
+
rrn?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface RefundRefundMethodElectronicCertificateElectronicCertificate {
|
|
40
|
+
basket_id: string;
|
|
41
|
+
amount: CommonAmount;
|
|
42
|
+
}
|
|
43
|
+
export type CreateRefundResponse = Refund;
|
|
44
|
+
export interface GetRefundsListResponse {
|
|
45
|
+
type: "list";
|
|
46
|
+
items: Refund[];
|
|
47
|
+
next_cursor?: string;
|
|
48
|
+
}
|
|
49
|
+
export type GetRefundResponse = Refund;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refund.js","sourceRoot":"","sources":["../../../src/api/responses/refund.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sbp-banks.js","sourceRoot":"","sources":["../../../src/api/responses/sbp-banks.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NotificationEventEnum } from '../enums';
|
|
2
|
+
export interface Webhook {
|
|
3
|
+
id: string;
|
|
4
|
+
event: NotificationEventEnum;
|
|
5
|
+
url: string;
|
|
6
|
+
}
|
|
7
|
+
export type CreateWebhookResponse = Webhook;
|
|
8
|
+
export interface GetWebhookListResponse {
|
|
9
|
+
type: 'list';
|
|
10
|
+
items: Webhook[];
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../../src/api/responses/webhook.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const YOOKASSA_API_URL = "https://api.yookassa.ru/v3";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yookassa.constants.js","sourceRoot":"","sources":["../../src/http/yookassa.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG,4BAA4B,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.YookassaError = void 0;
|
|
4
|
+
class YookassaError extends Error {
|
|
5
|
+
constructor(code, description, data) {
|
|
6
|
+
super(description);
|
|
7
|
+
this.code = code;
|
|
8
|
+
this.description = description;
|
|
9
|
+
this.data = data;
|
|
10
|
+
this.name = 'YookassaError';
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.YookassaError = YookassaError;
|
|
14
|
+
//# sourceMappingURL=yookassa.error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yookassa.error.js","sourceRoot":"","sources":["../../src/http/yookassa.error.ts"],"names":[],"mappings":";;;AAAA,MAAa,aAAc,SAAQ,KAAK;IACtC,YAA0B,IAAY,EAAS,WAAmB,EAAS,IAAU;QACnF,KAAK,CAAC,WAAW,CAAC,CAAA;QADM,SAAI,GAAJ,IAAI,CAAQ;QAAS,gBAAW,GAAX,WAAW,CAAQ;QAAS,SAAI,GAAJ,IAAI,CAAM;QAEnF,IAAI,CAAC,IAAI,GAAG,eAAe,CAAA;IAC7B,CAAC;CACF;AALD,sCAKC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type YookassaModuleOptions } from '../yookassa.interface';
|
|
2
|
+
export declare class YookassaHttpClient {
|
|
3
|
+
private readonly config;
|
|
4
|
+
private readonly dispatcher;
|
|
5
|
+
constructor(config: YookassaModuleOptions);
|
|
6
|
+
request<T = any>(options: {
|
|
7
|
+
method: string;
|
|
8
|
+
url: string;
|
|
9
|
+
data?: any;
|
|
10
|
+
params?: any;
|
|
11
|
+
}): Promise<T>;
|
|
12
|
+
get<T>(url: string, params?: any): Promise<T>;
|
|
13
|
+
post<T>(url: string, data?: any): Promise<T>;
|
|
14
|
+
delete<T = void>(url: string): Promise<T>;
|
|
15
|
+
private buildAuthHeader;
|
|
16
|
+
private buildUrl;
|
|
17
|
+
}
|