@djangocfg/api 1.0.3 → 1.0.5
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/dist/index.cjs +16105 -33860
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15267 -34486
- package/dist/index.d.ts +15267 -34486
- package/dist/index.mjs +15970 -33847
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cfg/contexts/payments/ApiKeysContext.tsx +21 -58
- package/src/cfg/contexts/payments/BalancesContext.tsx +19 -72
- package/src/cfg/contexts/payments/CurrenciesContext.tsx +5 -18
- package/src/cfg/contexts/payments/OverviewContext.tsx +78 -124
- package/src/cfg/contexts/payments/PaymentsContext.tsx +37 -36
- package/src/cfg/contexts/payments/RootPaymentsContext.tsx +7 -76
- package/src/cfg/contexts/payments/index.ts +5 -24
- package/src/cfg/generated/_utils/fetchers/cfg__payments.ts +38 -2380
- package/src/cfg/generated/_utils/fetchers/index.ts +0 -1
- package/src/cfg/generated/_utils/hooks/cfg__payments.ts +41 -2615
- package/src/cfg/generated/_utils/hooks/index.ts +0 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItem.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunk.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemDetail.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/ChatMessage.schema.ts +2 -2
- package/src/cfg/generated/_utils/schemas/ChatSession.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/ChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/Document.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/DocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemChunkRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedArchiveItemRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PatchedChatSessionRequest.schema.ts +3 -3
- package/src/cfg/generated/_utils/schemas/PatchedDocumentRequest.schema.ts +1 -1
- package/src/cfg/generated/_utils/schemas/PaymentDetail.schema.ts +44 -0
- package/src/cfg/generated/_utils/schemas/PaymentList.schema.ts +7 -11
- package/src/cfg/generated/_utils/schemas/index.ts +1 -81
- package/src/cfg/generated/cfg__payments/client.ts +40 -1732
- package/src/cfg/generated/cfg__payments/models.ts +50 -1823
- package/src/cfg/generated/client.ts +0 -3
- package/src/cfg/generated/enums.ts +5 -391
- package/src/cfg/generated/index.ts +3 -7
- package/src/cfg/generated/schema.ts +5918 -18389
- package/src/cfg/services/payments/ApiKeysService.ts +34 -116
- package/src/cfg/services/payments/DashboardService.ts +37 -122
- package/src/cfg/services/payments/PaymentsService.ts +36 -69
- package/src/cfg/services/payments/SubscriptionsService.ts +35 -136
- package/src/cfg/services/webhooks/WebhooksService.ts +24 -66
- package/src/index.ts +1 -6
- package/src/cfg/generated/_utils/fetchers/cfg__payments__webhooks.ts +0 -109
- package/src/cfg/generated/_utils/hooks/cfg__payments__webhooks.ts +0 -100
- package/src/cfg/generated/_utils/schemas/APIKeyCreate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyCreateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyDetail.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/APIKeyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/APIKeyUpdate.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/APIKeyValidationRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/APIKeyValidationResponse.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/APIKeysOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreate.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/AdminPaymentCreateRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/AdminPaymentDetail.schema.ts +0 -50
- package/src/cfg/generated/_utils/schemas/AdminPaymentList.schema.ts +0 -38
- package/src/cfg/generated/_utils/schemas/AdminPaymentStats.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/AdminUser.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/BalanceOverview.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/ChartDataPoint.schema.ts +0 -20
- package/src/cfg/generated/_utils/schemas/ChartSeries.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Currency.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/CurrencyAnalyticsItem.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/CurrencyList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/CurrencyRates.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/EndpointGroup.schema.ts +0 -28
- package/src/cfg/generated/_utils/schemas/Network.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/PaginatedAPIKeyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminPaymentStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedAdminUserList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedCurrencyListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedEndpointGroupList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedNetworkList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedProviderCurrencyList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentPaymentList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedRecentTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedSubscriptionListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTariffList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedTransactionList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedUserBalanceList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookEventListList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaginatedWebhookStatsList.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAPIKeyUpdateRequest.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PatchedAdminPaymentUpdateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/PatchedPaymentRequest.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/PatchedSubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/Payment.schema.ts +0 -49
- package/src/cfg/generated/_utils/schemas/PaymentAnalyticsResponse.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/PaymentCreate.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/PaymentCreateRequest.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/PaymentOverview.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/PaymentRequest.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/PaymentsChartResponse.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/PaymentsDashboardOverview.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/PaymentsMetrics.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/ProviderAnalyticsItem.schema.ts +0 -24
- package/src/cfg/generated/_utils/schemas/ProviderCurrency.schema.ts +0 -36
- package/src/cfg/generated/_utils/schemas/RecentPayment.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/RecentTransaction.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/Subscription.schema.ts +0 -41
- package/src/cfg/generated/_utils/schemas/SubscriptionCreate.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionCreateRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SubscriptionList.schema.ts +0 -32
- package/src/cfg/generated/_utils/schemas/SubscriptionOverview.schema.ts +0 -37
- package/src/cfg/generated/_utils/schemas/SubscriptionRequest.schema.ts +0 -26
- package/src/cfg/generated/_utils/schemas/SupportedCurrencies.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/SupportedProviders.schema.ts +0 -22
- package/src/cfg/generated/_utils/schemas/Tariff.schema.ts +0 -34
- package/src/cfg/generated/_utils/schemas/Transaction.schema.ts +0 -35
- package/src/cfg/generated/_utils/schemas/UserBalance.schema.ts +0 -29
- package/src/cfg/generated/_utils/schemas/WebhookEvent.schema.ts +0 -31
- package/src/cfg/generated/_utils/schemas/WebhookEventList.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventListRequest.schema.ts +0 -25
- package/src/cfg/generated/_utils/schemas/WebhookEventRequest.schema.ts +0 -30
- package/src/cfg/generated/_utils/schemas/WebhookHealth.schema.ts +0 -21
- package/src/cfg/generated/_utils/schemas/WebhookProviderStats.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookProviderStatsRequest.schema.ts +0 -23
- package/src/cfg/generated/_utils/schemas/WebhookResponse.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookResponseRequest.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStats.schema.ts +0 -27
- package/src/cfg/generated/_utils/schemas/WebhookStatsRequest.schema.ts +0 -27
- package/src/cfg/generated/cfg__payments__webhooks/client.ts +0 -75
- package/src/cfg/generated/cfg__payments__webhooks/index.ts +0 -2
- package/src/cfg/generated/cfg__payments__webhooks/models.ts +0 -87
|
@@ -4,1467 +4,7 @@ import * as Enums from "../enums";
|
|
|
4
4
|
*
|
|
5
5
|
* Response model (includes read-only fields).
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
8
|
-
/** Total number of items across all pages */
|
|
9
|
-
count: number;
|
|
10
|
-
/** Current page number (1-based) */
|
|
11
|
-
page: number;
|
|
12
|
-
/** Total number of pages */
|
|
13
|
-
pages: number;
|
|
14
|
-
/** Number of items per page */
|
|
15
|
-
page_size: number;
|
|
16
|
-
/** Whether there is a next page */
|
|
17
|
-
has_next: boolean;
|
|
18
|
-
/** Whether there is a previous page */
|
|
19
|
-
has_previous: boolean;
|
|
20
|
-
/** Next page number (null if no next page) */
|
|
21
|
-
next_page?: number | null;
|
|
22
|
-
/** Previous page number (null if no previous page) */
|
|
23
|
-
previous_page?: number | null;
|
|
24
|
-
/** Array of items for current page */
|
|
25
|
-
results: Array<AdminPaymentList>;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Serializer for creating payments in admin interface. Uses UniversalPayment
|
|
30
|
-
* only for data creation.
|
|
31
|
-
*
|
|
32
|
-
* Request model (no read-only fields).
|
|
33
|
-
*/
|
|
34
|
-
export interface AdminPaymentCreateRequest {
|
|
35
|
-
user: number;
|
|
36
|
-
amount_usd: number;
|
|
37
|
-
/** Provider currency code (e.g., BTC, ZROERC20) */
|
|
38
|
-
currency_code: string;
|
|
39
|
-
provider: string;
|
|
40
|
-
description?: string;
|
|
41
|
-
callback_url?: string;
|
|
42
|
-
cancel_url?: string;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Serializer for creating payments in admin interface. Uses UniversalPayment
|
|
47
|
-
* only for data creation.
|
|
48
|
-
*
|
|
49
|
-
* Response model (includes read-only fields).
|
|
50
|
-
*/
|
|
51
|
-
export interface AdminPaymentCreate {
|
|
52
|
-
user: number;
|
|
53
|
-
amount_usd: number;
|
|
54
|
-
provider: string;
|
|
55
|
-
description?: string;
|
|
56
|
-
callback_url?: string;
|
|
57
|
-
cancel_url?: string;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Detailed serializer for individual payment in admin interface. Uses
|
|
62
|
-
* UniversalPayment only for data extraction.
|
|
63
|
-
*
|
|
64
|
-
* Response model (includes read-only fields).
|
|
65
|
-
*/
|
|
66
|
-
export interface AdminPaymentDetail {
|
|
67
|
-
id: string;
|
|
68
|
-
user: Record<string, any>;
|
|
69
|
-
internal_payment_id: string;
|
|
70
|
-
amount_usd: number;
|
|
71
|
-
actual_amount_usd: number;
|
|
72
|
-
fee_amount_usd: number;
|
|
73
|
-
currency_code: string;
|
|
74
|
-
currency_name: string;
|
|
75
|
-
provider: string;
|
|
76
|
-
provider_display: string;
|
|
77
|
-
status: string;
|
|
78
|
-
status_display: string;
|
|
79
|
-
pay_amount: string;
|
|
80
|
-
pay_address: string;
|
|
81
|
-
payment_url: string;
|
|
82
|
-
transaction_hash: string;
|
|
83
|
-
confirmations_count: number;
|
|
84
|
-
security_nonce: string;
|
|
85
|
-
expires_at: string;
|
|
86
|
-
completed_at: string;
|
|
87
|
-
status_changed_at: string;
|
|
88
|
-
description: string;
|
|
89
|
-
callback_url: string;
|
|
90
|
-
cancel_url: string;
|
|
91
|
-
provider_data: string;
|
|
92
|
-
webhook_data: string;
|
|
93
|
-
created_at: string;
|
|
94
|
-
updated_at: string;
|
|
95
|
-
age: string;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Serializer for updating payments in admin interface.
|
|
100
|
-
*
|
|
101
|
-
* Request model (no read-only fields).
|
|
102
|
-
*/
|
|
103
|
-
export interface AdminPaymentUpdateRequest {
|
|
104
|
-
/** Current payment status
|
|
105
|
-
|
|
106
|
-
* `pending` - Pending
|
|
107
|
-
* `confirming` - Confirming
|
|
108
|
-
* `confirmed` - Confirmed
|
|
109
|
-
* `completed` - Completed
|
|
110
|
-
* `failed` - Failed
|
|
111
|
-
* `expired` - Expired
|
|
112
|
-
* `cancelled` - Cancelled
|
|
113
|
-
* `refunded` - Refunded */
|
|
114
|
-
status?: Enums.AdminPaymentUpdateRequestStatus;
|
|
115
|
-
/** Payment description */
|
|
116
|
-
description?: string;
|
|
117
|
-
/** Success callback URL */
|
|
118
|
-
callback_url?: string | null;
|
|
119
|
-
/** Cancellation URL */
|
|
120
|
-
cancel_url?: string | null;
|
|
121
|
-
/** Provider-specific data (validated by Pydantic) */
|
|
122
|
-
provider_data?: string;
|
|
123
|
-
/** Webhook data (validated by Pydantic) */
|
|
124
|
-
webhook_data?: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Serializer for updating payments in admin interface.
|
|
129
|
-
*
|
|
130
|
-
* Response model (includes read-only fields).
|
|
131
|
-
*/
|
|
132
|
-
export interface AdminPaymentUpdate {
|
|
133
|
-
/** Current payment status
|
|
134
|
-
|
|
135
|
-
* `pending` - Pending
|
|
136
|
-
* `confirming` - Confirming
|
|
137
|
-
* `confirmed` - Confirmed
|
|
138
|
-
* `completed` - Completed
|
|
139
|
-
* `failed` - Failed
|
|
140
|
-
* `expired` - Expired
|
|
141
|
-
* `cancelled` - Cancelled
|
|
142
|
-
* `refunded` - Refunded */
|
|
143
|
-
status?: Enums.AdminPaymentUpdateStatus;
|
|
144
|
-
/** Payment description */
|
|
145
|
-
description?: string;
|
|
146
|
-
/** Success callback URL */
|
|
147
|
-
callback_url?: string | null;
|
|
148
|
-
/** Cancellation URL */
|
|
149
|
-
cancel_url?: string | null;
|
|
150
|
-
/** Provider-specific data (validated by Pydantic) */
|
|
151
|
-
provider_data?: string;
|
|
152
|
-
/** Webhook data (validated by Pydantic) */
|
|
153
|
-
webhook_data?: string;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* Serializer for updating payments in admin interface.
|
|
158
|
-
*
|
|
159
|
-
* Request model (no read-only fields).
|
|
160
|
-
*/
|
|
161
|
-
export interface PatchedAdminPaymentUpdateRequest {
|
|
162
|
-
/** Current payment status
|
|
163
|
-
|
|
164
|
-
* `pending` - Pending
|
|
165
|
-
* `confirming` - Confirming
|
|
166
|
-
* `confirmed` - Confirmed
|
|
167
|
-
* `completed` - Completed
|
|
168
|
-
* `failed` - Failed
|
|
169
|
-
* `expired` - Expired
|
|
170
|
-
* `cancelled` - Cancelled
|
|
171
|
-
* `refunded` - Refunded */
|
|
172
|
-
status?: Enums.PatchedAdminPaymentUpdateRequestStatus;
|
|
173
|
-
/** Payment description */
|
|
174
|
-
description?: string;
|
|
175
|
-
/** Success callback URL */
|
|
176
|
-
callback_url?: string | null;
|
|
177
|
-
/** Cancellation URL */
|
|
178
|
-
cancel_url?: string | null;
|
|
179
|
-
/** Provider-specific data (validated by Pydantic) */
|
|
180
|
-
provider_data?: string;
|
|
181
|
-
/** Webhook data (validated by Pydantic) */
|
|
182
|
-
webhook_data?: string;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Serializer for payment statistics in admin interface.
|
|
187
|
-
*
|
|
188
|
-
* Response model (includes read-only fields).
|
|
189
|
-
*/
|
|
190
|
-
export interface AdminPaymentStats {
|
|
191
|
-
total_payments: number;
|
|
192
|
-
total_amount_usd: number;
|
|
193
|
-
successful_payments: number;
|
|
194
|
-
failed_payments: number;
|
|
195
|
-
pending_payments: number;
|
|
196
|
-
success_rate: number;
|
|
197
|
-
/** Statistics by provider */
|
|
198
|
-
by_provider: Record<string, any>;
|
|
199
|
-
/** Statistics by currency */
|
|
200
|
-
by_currency: Record<string, any>;
|
|
201
|
-
/** Payments in last 24 hours */
|
|
202
|
-
last_24h: Record<string, any>;
|
|
203
|
-
/** Payments in last 7 days */
|
|
204
|
-
last_7d: Record<string, any>;
|
|
205
|
-
/** Payments in last 30 days */
|
|
206
|
-
last_30d: Record<string, any>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
*
|
|
211
|
-
* Response model (includes read-only fields).
|
|
212
|
-
*/
|
|
213
|
-
export interface PaginatedAdminPaymentStatsList {
|
|
214
|
-
/** Total number of items across all pages */
|
|
215
|
-
count: number;
|
|
216
|
-
/** Current page number (1-based) */
|
|
217
|
-
page: number;
|
|
218
|
-
/** Total number of pages */
|
|
219
|
-
pages: number;
|
|
220
|
-
/** Number of items per page */
|
|
221
|
-
page_size: number;
|
|
222
|
-
/** Whether there is a next page */
|
|
223
|
-
has_next: boolean;
|
|
224
|
-
/** Whether there is a previous page */
|
|
225
|
-
has_previous: boolean;
|
|
226
|
-
/** Next page number (null if no next page) */
|
|
227
|
-
next_page?: number | null;
|
|
228
|
-
/** Previous page number (null if no previous page) */
|
|
229
|
-
previous_page?: number | null;
|
|
230
|
-
/** Array of items for current page */
|
|
231
|
-
results: Array<AdminPaymentStats>;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
/**
|
|
235
|
-
*
|
|
236
|
-
* Response model (includes read-only fields).
|
|
237
|
-
*/
|
|
238
|
-
export interface PaginatedAdminUserList {
|
|
239
|
-
/** Total number of items across all pages */
|
|
240
|
-
count: number;
|
|
241
|
-
/** Current page number (1-based) */
|
|
242
|
-
page: number;
|
|
243
|
-
/** Total number of pages */
|
|
244
|
-
pages: number;
|
|
245
|
-
/** Number of items per page */
|
|
246
|
-
page_size: number;
|
|
247
|
-
/** Whether there is a next page */
|
|
248
|
-
has_next: boolean;
|
|
249
|
-
/** Whether there is a previous page */
|
|
250
|
-
has_previous: boolean;
|
|
251
|
-
/** Next page number (null if no next page) */
|
|
252
|
-
next_page?: number | null;
|
|
253
|
-
/** Previous page number (null if no previous page) */
|
|
254
|
-
previous_page?: number | null;
|
|
255
|
-
/** Array of items for current page */
|
|
256
|
-
results: Array<AdminUser>;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Simplified user serializer for admin interface.
|
|
261
|
-
*
|
|
262
|
-
* Response model (includes read-only fields).
|
|
263
|
-
*/
|
|
264
|
-
export interface AdminUser {
|
|
265
|
-
id: number;
|
|
266
|
-
/** Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. */
|
|
267
|
-
username: string;
|
|
268
|
-
email: string;
|
|
269
|
-
first_name: string;
|
|
270
|
-
last_name: string;
|
|
271
|
-
/** Designates whether this user should be treated as active. Unselect this instead of deleting accounts. */
|
|
272
|
-
is_active: boolean;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* Serializer for comprehensive webhook statistics.
|
|
277
|
-
*
|
|
278
|
-
* Request model (no read-only fields).
|
|
279
|
-
*/
|
|
280
|
-
export interface WebhookStatsRequest {
|
|
281
|
-
total: number;
|
|
282
|
-
successful: number;
|
|
283
|
-
failed: number;
|
|
284
|
-
pending: number;
|
|
285
|
-
success_rate: number;
|
|
286
|
-
/** Statistics by provider */
|
|
287
|
-
providers: Record<string, any>;
|
|
288
|
-
/** Events in last 24 hours */
|
|
289
|
-
last_24h: Record<string, any>;
|
|
290
|
-
avg_response_time: number;
|
|
291
|
-
max_response_time: number;
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
/**
|
|
295
|
-
* Serializer for comprehensive webhook statistics.
|
|
296
|
-
*
|
|
297
|
-
* Response model (includes read-only fields).
|
|
298
|
-
*/
|
|
299
|
-
export interface WebhookStats {
|
|
300
|
-
total: number;
|
|
301
|
-
successful: number;
|
|
302
|
-
failed: number;
|
|
303
|
-
pending: number;
|
|
304
|
-
success_rate: number;
|
|
305
|
-
/** Statistics by provider */
|
|
306
|
-
providers: Record<string, any>;
|
|
307
|
-
/** Events in last 24 hours */
|
|
308
|
-
last_24h: Record<string, any>;
|
|
309
|
-
avg_response_time: number;
|
|
310
|
-
max_response_time: number;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/**
|
|
314
|
-
*
|
|
315
|
-
* Response model (includes read-only fields).
|
|
316
|
-
*/
|
|
317
|
-
export interface PaginatedWebhookStatsList {
|
|
318
|
-
/** Total number of items across all pages */
|
|
319
|
-
count: number;
|
|
320
|
-
/** Current page number (1-based) */
|
|
321
|
-
page: number;
|
|
322
|
-
/** Total number of pages */
|
|
323
|
-
pages: number;
|
|
324
|
-
/** Number of items per page */
|
|
325
|
-
page_size: number;
|
|
326
|
-
/** Whether there is a next page */
|
|
327
|
-
has_next: boolean;
|
|
328
|
-
/** Whether there is a previous page */
|
|
329
|
-
has_previous: boolean;
|
|
330
|
-
/** Next page number (null if no next page) */
|
|
331
|
-
next_page?: number | null;
|
|
332
|
-
/** Previous page number (null if no previous page) */
|
|
333
|
-
previous_page?: number | null;
|
|
334
|
-
/** Array of items for current page */
|
|
335
|
-
results: Array<WebhookStats>;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
*
|
|
340
|
-
* Response model (includes read-only fields).
|
|
341
|
-
*/
|
|
342
|
-
export interface PaginatedWebhookEventListList {
|
|
343
|
-
/** Total number of items across all pages */
|
|
344
|
-
count: number;
|
|
345
|
-
/** Current page number (1-based) */
|
|
346
|
-
page: number;
|
|
347
|
-
/** Total number of pages */
|
|
348
|
-
pages: number;
|
|
349
|
-
/** Number of items per page */
|
|
350
|
-
page_size: number;
|
|
351
|
-
/** Whether there is a next page */
|
|
352
|
-
has_next: boolean;
|
|
353
|
-
/** Whether there is a previous page */
|
|
354
|
-
has_previous: boolean;
|
|
355
|
-
/** Next page number (null if no next page) */
|
|
356
|
-
next_page?: number | null;
|
|
357
|
-
/** Previous page number (null if no previous page) */
|
|
358
|
-
previous_page?: number | null;
|
|
359
|
-
/** Array of items for current page */
|
|
360
|
-
results: Array<WebhookEventList>;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
/**
|
|
364
|
-
* Serializer for paginated webhook events list.
|
|
365
|
-
*
|
|
366
|
-
* Response model (includes read-only fields).
|
|
367
|
-
*/
|
|
368
|
-
export interface WebhookEventList {
|
|
369
|
-
events: Array<WebhookEvent>;
|
|
370
|
-
total: number;
|
|
371
|
-
page: number;
|
|
372
|
-
per_page: number;
|
|
373
|
-
has_next: boolean;
|
|
374
|
-
has_previous: boolean;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Serializer for paginated webhook events list.
|
|
379
|
-
*
|
|
380
|
-
* Request model (no read-only fields).
|
|
381
|
-
*/
|
|
382
|
-
export interface WebhookEventListRequest {
|
|
383
|
-
events: Array<WebhookEventRequest>;
|
|
384
|
-
total: number;
|
|
385
|
-
page: number;
|
|
386
|
-
per_page: number;
|
|
387
|
-
has_next: boolean;
|
|
388
|
-
has_previous: boolean;
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
*
|
|
393
|
-
* Response model (includes read-only fields).
|
|
394
|
-
*/
|
|
395
|
-
export interface PaginatedAPIKeyListList {
|
|
396
|
-
/** Total number of items across all pages */
|
|
397
|
-
count: number;
|
|
398
|
-
/** Current page number (1-based) */
|
|
399
|
-
page: number;
|
|
400
|
-
/** Total number of pages */
|
|
401
|
-
pages: number;
|
|
402
|
-
/** Number of items per page */
|
|
403
|
-
page_size: number;
|
|
404
|
-
/** Whether there is a next page */
|
|
405
|
-
has_next: boolean;
|
|
406
|
-
/** Whether there is a previous page */
|
|
407
|
-
has_previous: boolean;
|
|
408
|
-
/** Next page number (null if no next page) */
|
|
409
|
-
next_page?: number | null;
|
|
410
|
-
/** Previous page number (null if no previous page) */
|
|
411
|
-
previous_page?: number | null;
|
|
412
|
-
/** Array of items for current page */
|
|
413
|
-
results: Array<APIKeyList>;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* API key creation serializer with service integration. Creates new API keys
|
|
418
|
-
* and returns the full key value (only once).
|
|
419
|
-
*
|
|
420
|
-
* Request model (no read-only fields).
|
|
421
|
-
*/
|
|
422
|
-
export interface APIKeyCreateRequest {
|
|
423
|
-
/** Descriptive name for the API key */
|
|
424
|
-
name: string;
|
|
425
|
-
/** Expiration in days (optional, null for no expiration) */
|
|
426
|
-
expires_in_days?: number | null;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* API key creation serializer with service integration. Creates new API keys
|
|
431
|
-
* and returns the full key value (only once).
|
|
432
|
-
*
|
|
433
|
-
* Response model (includes read-only fields).
|
|
434
|
-
*/
|
|
435
|
-
export interface APIKeyCreate {
|
|
436
|
-
/** Descriptive name for the API key */
|
|
437
|
-
name: string;
|
|
438
|
-
/** Expiration in days (optional, null for no expiration) */
|
|
439
|
-
expires_in_days?: number | null;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
/**
|
|
443
|
-
* Complete API key serializer with full details. Used for API key detail views
|
|
444
|
-
* (no key value for security).
|
|
445
|
-
*
|
|
446
|
-
* Response model (includes read-only fields).
|
|
447
|
-
*/
|
|
448
|
-
export interface APIKeyDetail {
|
|
449
|
-
/** Unique identifier for this record */
|
|
450
|
-
id: string;
|
|
451
|
-
user: string;
|
|
452
|
-
/** Human-readable name for this API key */
|
|
453
|
-
name: string;
|
|
454
|
-
key_preview: string;
|
|
455
|
-
/** Whether this API key is active */
|
|
456
|
-
is_active: boolean;
|
|
457
|
-
is_expired: boolean;
|
|
458
|
-
is_valid: boolean;
|
|
459
|
-
days_until_expiry: number;
|
|
460
|
-
/** Total number of requests made with this key */
|
|
461
|
-
total_requests: number;
|
|
462
|
-
/** When this API key was last used */
|
|
463
|
-
last_used_at: string | null;
|
|
464
|
-
/** When this API key expires (null = never expires) */
|
|
465
|
-
expires_at: string | null;
|
|
466
|
-
/** When this record was created */
|
|
467
|
-
created_at: string;
|
|
468
|
-
/** When this record was last updated */
|
|
469
|
-
updated_at: string;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* API key update serializer for modifying API key properties. Allows updating
|
|
474
|
-
* name and active status only.
|
|
475
|
-
*
|
|
476
|
-
* Request model (no read-only fields).
|
|
477
|
-
*/
|
|
478
|
-
export interface APIKeyUpdateRequest {
|
|
479
|
-
/** Human-readable name for this API key */
|
|
480
|
-
name: string;
|
|
481
|
-
/** Whether this API key is active */
|
|
482
|
-
is_active?: boolean;
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
/**
|
|
486
|
-
* API key update serializer for modifying API key properties. Allows updating
|
|
487
|
-
* name and active status only.
|
|
488
|
-
*
|
|
489
|
-
* Response model (includes read-only fields).
|
|
490
|
-
*/
|
|
491
|
-
export interface APIKeyUpdate {
|
|
492
|
-
/** Human-readable name for this API key */
|
|
493
|
-
name: string;
|
|
494
|
-
/** Whether this API key is active */
|
|
495
|
-
is_active?: boolean;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* API key update serializer for modifying API key properties. Allows updating
|
|
500
|
-
* name and active status only.
|
|
501
|
-
*
|
|
502
|
-
* Request model (no read-only fields).
|
|
503
|
-
*/
|
|
504
|
-
export interface PatchedAPIKeyUpdateRequest {
|
|
505
|
-
/** Human-readable name for this API key */
|
|
506
|
-
name?: string;
|
|
507
|
-
/** Whether this API key is active */
|
|
508
|
-
is_active?: boolean;
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
/**
|
|
512
|
-
* API key validation serializer. Validates API key and returns key
|
|
513
|
-
* information.
|
|
514
|
-
*
|
|
515
|
-
* Request model (no read-only fields).
|
|
516
|
-
*/
|
|
517
|
-
export interface APIKeyValidationRequest {
|
|
518
|
-
/** API key to validate */
|
|
519
|
-
key: string;
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* API key validation response serializer. Defines the structure of API key
|
|
524
|
-
* validation response for OpenAPI schema.
|
|
525
|
-
*
|
|
526
|
-
* Response model (includes read-only fields).
|
|
527
|
-
*/
|
|
528
|
-
export interface APIKeyValidationResponse {
|
|
529
|
-
/** Whether the validation was successful */
|
|
530
|
-
success: boolean;
|
|
531
|
-
/** Whether the API key is valid */
|
|
532
|
-
valid: boolean;
|
|
533
|
-
api_key: Record<string, any> | null;
|
|
534
|
-
/** Validation message */
|
|
535
|
-
message: string;
|
|
536
|
-
/** Error message if validation failed */
|
|
537
|
-
error?: string;
|
|
538
|
-
/** Error code if validation failed */
|
|
539
|
-
error_code?: string;
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
*
|
|
544
|
-
* Response model (includes read-only fields).
|
|
545
|
-
*/
|
|
546
|
-
export interface PaginatedUserBalanceList {
|
|
547
|
-
/** Total number of items across all pages */
|
|
548
|
-
count: number;
|
|
549
|
-
/** Current page number (1-based) */
|
|
550
|
-
page: number;
|
|
551
|
-
/** Total number of pages */
|
|
552
|
-
pages: number;
|
|
553
|
-
/** Number of items per page */
|
|
554
|
-
page_size: number;
|
|
555
|
-
/** Whether there is a next page */
|
|
556
|
-
has_next: boolean;
|
|
557
|
-
/** Whether there is a previous page */
|
|
558
|
-
has_previous: boolean;
|
|
559
|
-
/** Next page number (null if no next page) */
|
|
560
|
-
next_page?: number | null;
|
|
561
|
-
/** Previous page number (null if no previous page) */
|
|
562
|
-
previous_page?: number | null;
|
|
563
|
-
/** Array of items for current page */
|
|
564
|
-
results: Array<UserBalance>;
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
/**
|
|
568
|
-
* User balance serializer with computed fields. Provides balance information
|
|
569
|
-
* with display helpers.
|
|
570
|
-
*
|
|
571
|
-
* Response model (includes read-only fields).
|
|
572
|
-
*/
|
|
573
|
-
export interface UserBalance {
|
|
574
|
-
user: string;
|
|
575
|
-
/** Current balance in USD (float for performance) */
|
|
576
|
-
balance_usd: number;
|
|
577
|
-
/** Formatted balance display. */
|
|
578
|
-
balance_display: string;
|
|
579
|
-
/** Check if balance is zero. */
|
|
580
|
-
is_empty: boolean;
|
|
581
|
-
/** Check if user has any transactions. */
|
|
582
|
-
has_transactions: boolean;
|
|
583
|
-
created_at: string;
|
|
584
|
-
updated_at: string;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
*
|
|
589
|
-
* Response model (includes read-only fields).
|
|
590
|
-
*/
|
|
591
|
-
export interface PaginatedCurrencyListList {
|
|
592
|
-
/** Total number of items across all pages */
|
|
593
|
-
count: number;
|
|
594
|
-
/** Current page number (1-based) */
|
|
595
|
-
page: number;
|
|
596
|
-
/** Total number of pages */
|
|
597
|
-
pages: number;
|
|
598
|
-
/** Number of items per page */
|
|
599
|
-
page_size: number;
|
|
600
|
-
/** Whether there is a next page */
|
|
601
|
-
has_next: boolean;
|
|
602
|
-
/** Whether there is a previous page */
|
|
603
|
-
has_previous: boolean;
|
|
604
|
-
/** Next page number (null if no next page) */
|
|
605
|
-
next_page?: number | null;
|
|
606
|
-
/** Previous page number (null if no previous page) */
|
|
607
|
-
previous_page?: number | null;
|
|
608
|
-
/** Array of items for current page */
|
|
609
|
-
results: Array<CurrencyList>;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
/**
|
|
613
|
-
* Complete currency serializer with full details. Used for currency
|
|
614
|
-
* information and management.
|
|
615
|
-
*
|
|
616
|
-
* Response model (includes read-only fields).
|
|
617
|
-
*/
|
|
618
|
-
export interface Currency {
|
|
619
|
-
id: number;
|
|
620
|
-
/** Currency code (e.g., BTC, USD, ETH) */
|
|
621
|
-
code: string;
|
|
622
|
-
/** Full currency name (e.g., Bitcoin, US Dollar) */
|
|
623
|
-
name: string;
|
|
624
|
-
/** Currency symbol (e.g., $, ₿, Ξ) */
|
|
625
|
-
symbol: string;
|
|
626
|
-
/** Type of currency
|
|
627
|
-
|
|
628
|
-
* `fiat` - Fiat Currency
|
|
629
|
-
* `crypto` - Cryptocurrency */
|
|
630
|
-
currency_type: Enums.CurrencyCurrencyType;
|
|
631
|
-
type_display: string;
|
|
632
|
-
/** Number of decimal places for this currency */
|
|
633
|
-
decimal_places: number;
|
|
634
|
-
/** Whether this currency is available for payments */
|
|
635
|
-
is_active: boolean;
|
|
636
|
-
/** Check if this is a cryptocurrency. */
|
|
637
|
-
is_crypto: boolean;
|
|
638
|
-
/** Check if this is a fiat currency. */
|
|
639
|
-
is_fiat: boolean;
|
|
640
|
-
/** When this record was created */
|
|
641
|
-
created_at: string;
|
|
642
|
-
/** When this record was last updated */
|
|
643
|
-
updated_at: string;
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
/**
|
|
647
|
-
* Currency rates serializer for getting exchange rates. Fetches current
|
|
648
|
-
* exchange rates through CurrencyService.
|
|
649
|
-
*
|
|
650
|
-
* Response model (includes read-only fields).
|
|
651
|
-
*/
|
|
652
|
-
export interface CurrencyRates {
|
|
653
|
-
/** Base currency for rates (default: USD) */
|
|
654
|
-
base_currency?: string;
|
|
655
|
-
/** Specific currencies to get rates for (optional) */
|
|
656
|
-
currencies?: Array<string>;
|
|
657
|
-
/** Provider for exchange rates
|
|
658
|
-
|
|
659
|
-
* `nowpayments` - NowPayments */
|
|
660
|
-
provider?: Enums.CurrencyRatesProvider;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
/**
|
|
664
|
-
* Supported currencies serializer for provider capabilities. Gets supported
|
|
665
|
-
* currencies from providers through CurrencyService.
|
|
666
|
-
*
|
|
667
|
-
* Response model (includes read-only fields).
|
|
668
|
-
*/
|
|
669
|
-
export interface SupportedCurrencies {
|
|
670
|
-
/** Provider to get supported currencies from
|
|
671
|
-
|
|
672
|
-
* `nowpayments` - NowPayments */
|
|
673
|
-
provider?: Enums.SupportedCurrenciesProvider;
|
|
674
|
-
/** Filter by currency type
|
|
675
|
-
|
|
676
|
-
* `all` - All
|
|
677
|
-
* `crypto` - Cryptocurrency
|
|
678
|
-
* `fiat` - Fiat Currency */
|
|
679
|
-
currency_type?: Enums.SupportedCurrenciesCurrencyType;
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
/**
|
|
683
|
-
*
|
|
684
|
-
* Response model (includes read-only fields).
|
|
685
|
-
*/
|
|
686
|
-
export interface PaginatedEndpointGroupList {
|
|
687
|
-
/** Total number of items across all pages */
|
|
688
|
-
count: number;
|
|
689
|
-
/** Current page number (1-based) */
|
|
690
|
-
page: number;
|
|
691
|
-
/** Total number of pages */
|
|
692
|
-
pages: number;
|
|
693
|
-
/** Number of items per page */
|
|
694
|
-
page_size: number;
|
|
695
|
-
/** Whether there is a next page */
|
|
696
|
-
has_next: boolean;
|
|
697
|
-
/** Whether there is a previous page */
|
|
698
|
-
has_previous: boolean;
|
|
699
|
-
/** Next page number (null if no next page) */
|
|
700
|
-
next_page?: number | null;
|
|
701
|
-
/** Previous page number (null if no previous page) */
|
|
702
|
-
previous_page?: number | null;
|
|
703
|
-
/** Array of items for current page */
|
|
704
|
-
results: Array<EndpointGroup>;
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
/**
|
|
708
|
-
* Endpoint group serializer for API access management. Used for subscription
|
|
709
|
-
* endpoint group configuration.
|
|
710
|
-
*
|
|
711
|
-
* Response model (includes read-only fields).
|
|
712
|
-
*/
|
|
713
|
-
export interface EndpointGroup {
|
|
714
|
-
id: number;
|
|
715
|
-
/** Endpoint group name (e.g., 'Payment API', 'Balance API') */
|
|
716
|
-
name: string;
|
|
717
|
-
/** Description of what this endpoint group provides */
|
|
718
|
-
description: string;
|
|
719
|
-
/** Whether this endpoint group is available */
|
|
720
|
-
is_enabled: boolean;
|
|
721
|
-
created_at: string;
|
|
722
|
-
updated_at: string;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
/**
|
|
726
|
-
* Complete payment serializer with full details. Used for detail views and
|
|
727
|
-
* updates.
|
|
728
|
-
*
|
|
729
|
-
* Response model (includes read-only fields).
|
|
730
|
-
*/
|
|
731
|
-
export interface Payment {
|
|
732
|
-
/** Unique identifier for this record */
|
|
733
|
-
id: string;
|
|
734
|
-
user: string;
|
|
735
|
-
/** Payment amount in USD (float for performance) */
|
|
736
|
-
amount_usd: number;
|
|
737
|
-
/** Calculate crypto amount from USD amount and currency rate. */
|
|
738
|
-
amount_crypto: number;
|
|
739
|
-
/** Payment currency */
|
|
740
|
-
currency: number;
|
|
741
|
-
/** Blockchain network (for crypto payments) */
|
|
742
|
-
network?: number | null;
|
|
743
|
-
/** Payment provider
|
|
744
|
-
|
|
745
|
-
* `nowpayments` - NowPayments */
|
|
746
|
-
provider?: Enums.PaymentProvider;
|
|
747
|
-
/** Current payment status
|
|
748
|
-
|
|
749
|
-
* `pending` - Pending
|
|
750
|
-
* `confirming` - Confirming
|
|
751
|
-
* `confirmed` - Confirmed
|
|
752
|
-
* `completed` - Completed
|
|
753
|
-
* `failed` - Failed
|
|
754
|
-
* `expired` - Expired
|
|
755
|
-
* `cancelled` - Cancelled
|
|
756
|
-
* `refunded` - Refunded */
|
|
757
|
-
status?: Enums.PaymentStatus;
|
|
758
|
-
status_display: string;
|
|
759
|
-
/** Get formatted amount display. */
|
|
760
|
-
amount_display: string;
|
|
761
|
-
/** Provider's payment ID */
|
|
762
|
-
provider_payment_id: string | null;
|
|
763
|
-
/** Payment page URL */
|
|
764
|
-
payment_url: string | null;
|
|
765
|
-
/** Cryptocurrency payment address */
|
|
766
|
-
pay_address: string | null;
|
|
767
|
-
/** Success callback URL */
|
|
768
|
-
callback_url?: string | null;
|
|
769
|
-
/** Cancellation URL */
|
|
770
|
-
cancel_url?: string | null;
|
|
771
|
-
/** Payment description */
|
|
772
|
-
description?: string;
|
|
773
|
-
/** Blockchain transaction hash */
|
|
774
|
-
transaction_hash: string | null;
|
|
775
|
-
/** Number of blockchain confirmations */
|
|
776
|
-
confirmations_count: number;
|
|
777
|
-
/** When this record was created */
|
|
778
|
-
created_at: string;
|
|
779
|
-
/** When this record was last updated */
|
|
780
|
-
updated_at: string;
|
|
781
|
-
/** When this payment expires */
|
|
782
|
-
expires_at?: string | null;
|
|
783
|
-
/** When this payment was completed */
|
|
784
|
-
completed_at: string | null;
|
|
785
|
-
/** Check if payment is pending. */
|
|
786
|
-
is_pending: boolean;
|
|
787
|
-
/** Check if payment is completed. */
|
|
788
|
-
is_completed: boolean;
|
|
789
|
-
/** Check if payment is failed. */
|
|
790
|
-
is_failed: boolean;
|
|
791
|
-
/** Check if payment is expired. */
|
|
792
|
-
is_expired: boolean;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
/**
|
|
796
|
-
*
|
|
797
|
-
* Response model (includes read-only fields).
|
|
798
|
-
*/
|
|
799
|
-
export interface PaginatedNetworkList {
|
|
800
|
-
/** Total number of items across all pages */
|
|
801
|
-
count: number;
|
|
802
|
-
/** Current page number (1-based) */
|
|
803
|
-
page: number;
|
|
804
|
-
/** Total number of pages */
|
|
805
|
-
pages: number;
|
|
806
|
-
/** Number of items per page */
|
|
807
|
-
page_size: number;
|
|
808
|
-
/** Whether there is a next page */
|
|
809
|
-
has_next: boolean;
|
|
810
|
-
/** Whether there is a previous page */
|
|
811
|
-
has_previous: boolean;
|
|
812
|
-
/** Next page number (null if no next page) */
|
|
813
|
-
next_page?: number | null;
|
|
814
|
-
/** Previous page number (null if no previous page) */
|
|
815
|
-
previous_page?: number | null;
|
|
816
|
-
/** Array of items for current page */
|
|
817
|
-
results: Array<Network>;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/**
|
|
821
|
-
* Network serializer for blockchain networks. Used for network information and
|
|
822
|
-
* selection.
|
|
823
|
-
*
|
|
824
|
-
* Response model (includes read-only fields).
|
|
825
|
-
*/
|
|
826
|
-
export interface Network {
|
|
827
|
-
id: number;
|
|
828
|
-
currency: Record<string, any> | null;
|
|
829
|
-
/** Network name (e.g., Ethereum, Bitcoin, Polygon) */
|
|
830
|
-
name: string;
|
|
831
|
-
/** Network code (e.g., ETH, BTC, MATIC) */
|
|
832
|
-
code: string;
|
|
833
|
-
/** Whether this network is available for payments */
|
|
834
|
-
is_active: boolean;
|
|
835
|
-
/** When this record was created */
|
|
836
|
-
created_at: string;
|
|
837
|
-
/** When this record was last updated */
|
|
838
|
-
updated_at: string;
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
/**
|
|
842
|
-
* API keys overview metrics
|
|
843
|
-
*
|
|
844
|
-
* Response model (includes read-only fields).
|
|
845
|
-
*/
|
|
846
|
-
export interface APIKeysOverview {
|
|
847
|
-
/** Total number of API keys */
|
|
848
|
-
total_keys: number;
|
|
849
|
-
/** Number of active API keys */
|
|
850
|
-
active_keys: number;
|
|
851
|
-
/** Number of expired API keys */
|
|
852
|
-
expired_keys: number;
|
|
853
|
-
/** Total requests across all keys */
|
|
854
|
-
total_requests: number;
|
|
855
|
-
/** When any key was last used */
|
|
856
|
-
last_used_at: string | null;
|
|
857
|
-
/** Name of most used API key */
|
|
858
|
-
most_used_key_name: string | null;
|
|
859
|
-
/** Requests count for most used key */
|
|
860
|
-
most_used_key_requests: number;
|
|
861
|
-
/** Number of keys expiring within 7 days */
|
|
862
|
-
expiring_soon_count: number;
|
|
863
|
-
}
|
|
864
|
-
|
|
865
|
-
/**
|
|
866
|
-
* User balance overview metrics
|
|
867
|
-
*
|
|
868
|
-
* Response model (includes read-only fields).
|
|
869
|
-
*/
|
|
870
|
-
export interface BalanceOverview {
|
|
871
|
-
/** Current balance in USD */
|
|
872
|
-
current_balance: number;
|
|
873
|
-
/** Formatted balance display */
|
|
874
|
-
balance_display: string;
|
|
875
|
-
/** Total amount deposited (lifetime) */
|
|
876
|
-
total_deposited: number;
|
|
877
|
-
/** Total amount spent (lifetime) */
|
|
878
|
-
total_spent: number;
|
|
879
|
-
/** Last transaction timestamp */
|
|
880
|
-
last_transaction_at: string | null;
|
|
881
|
-
/** Whether user has any transactions */
|
|
882
|
-
has_transactions: boolean;
|
|
883
|
-
/** Whether balance is zero */
|
|
884
|
-
is_empty: boolean;
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
/**
|
|
888
|
-
* Complete chart response for payments analytics
|
|
889
|
-
*
|
|
890
|
-
* Response model (includes read-only fields).
|
|
891
|
-
*/
|
|
892
|
-
export interface PaymentsChartResponse {
|
|
893
|
-
/** Chart series data */
|
|
894
|
-
series: Array<ChartSeries>;
|
|
895
|
-
/** Time period */
|
|
896
|
-
period: string;
|
|
897
|
-
/** Total amount for period */
|
|
898
|
-
total_amount: number;
|
|
899
|
-
/** Total payments for period */
|
|
900
|
-
total_payments: number;
|
|
901
|
-
/** Success rate for period */
|
|
902
|
-
success_rate: number;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Complete payments dashboard metrics
|
|
907
|
-
*
|
|
908
|
-
* Response model (includes read-only fields).
|
|
909
|
-
*/
|
|
910
|
-
export interface PaymentsMetrics {
|
|
911
|
-
balance: Record<string, any>;
|
|
912
|
-
subscription: Record<string, any> | null;
|
|
913
|
-
api_keys: Record<string, any>;
|
|
914
|
-
payments: Record<string, any>;
|
|
915
|
-
}
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* Complete payments dashboard overview response
|
|
919
|
-
*
|
|
920
|
-
* Response model (includes read-only fields).
|
|
921
|
-
*/
|
|
922
|
-
export interface PaymentsDashboardOverview {
|
|
923
|
-
metrics: Record<string, any>;
|
|
924
|
-
/** Recent payments */
|
|
925
|
-
recent_payments: Array<RecentPayment>;
|
|
926
|
-
/** Recent transactions */
|
|
927
|
-
recent_transactions: Array<RecentTransaction>;
|
|
928
|
-
chart_data: Record<string, any>;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
/**
|
|
932
|
-
* Payment analytics response with currency and provider breakdown
|
|
933
|
-
*
|
|
934
|
-
* Response model (includes read-only fields).
|
|
935
|
-
*/
|
|
936
|
-
export interface PaymentAnalyticsResponse {
|
|
937
|
-
/** Analytics by currency */
|
|
938
|
-
currency_analytics: Array<CurrencyAnalyticsItem>;
|
|
939
|
-
/** Analytics by provider */
|
|
940
|
-
provider_analytics: Array<ProviderAnalyticsItem>;
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
*
|
|
945
|
-
* Response model (includes read-only fields).
|
|
946
|
-
*/
|
|
947
|
-
export interface PaginatedRecentPaymentList {
|
|
948
|
-
/** Total number of items across all pages */
|
|
949
|
-
count: number;
|
|
950
|
-
/** Current page number (1-based) */
|
|
951
|
-
page: number;
|
|
952
|
-
/** Total number of pages */
|
|
953
|
-
pages: number;
|
|
954
|
-
/** Number of items per page */
|
|
955
|
-
page_size: number;
|
|
956
|
-
/** Whether there is a next page */
|
|
957
|
-
has_next: boolean;
|
|
958
|
-
/** Whether there is a previous page */
|
|
959
|
-
has_previous: boolean;
|
|
960
|
-
/** Next page number (null if no next page) */
|
|
961
|
-
next_page?: number | null;
|
|
962
|
-
/** Previous page number (null if no previous page) */
|
|
963
|
-
previous_page?: number | null;
|
|
964
|
-
/** Array of items for current page */
|
|
965
|
-
results: Array<RecentPayment>;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/**
|
|
969
|
-
*
|
|
970
|
-
* Response model (includes read-only fields).
|
|
971
|
-
*/
|
|
972
|
-
export interface PaginatedRecentTransactionList {
|
|
973
|
-
/** Total number of items across all pages */
|
|
974
|
-
count: number;
|
|
975
|
-
/** Current page number (1-based) */
|
|
976
|
-
page: number;
|
|
977
|
-
/** Total number of pages */
|
|
978
|
-
pages: number;
|
|
979
|
-
/** Number of items per page */
|
|
980
|
-
page_size: number;
|
|
981
|
-
/** Whether there is a next page */
|
|
982
|
-
has_next: boolean;
|
|
983
|
-
/** Whether there is a previous page */
|
|
984
|
-
has_previous: boolean;
|
|
985
|
-
/** Next page number (null if no next page) */
|
|
986
|
-
next_page?: number | null;
|
|
987
|
-
/** Previous page number (null if no previous page) */
|
|
988
|
-
previous_page?: number | null;
|
|
989
|
-
/** Array of items for current page */
|
|
990
|
-
results: Array<RecentTransaction>;
|
|
991
|
-
}
|
|
992
|
-
|
|
993
|
-
/**
|
|
994
|
-
* Current subscription overview
|
|
995
|
-
*
|
|
996
|
-
* Response model (includes read-only fields).
|
|
997
|
-
*/
|
|
998
|
-
export interface SubscriptionOverview {
|
|
999
|
-
/** Subscription tier */
|
|
1000
|
-
tier: string;
|
|
1001
|
-
/** Human-readable tier name */
|
|
1002
|
-
tier_display: string;
|
|
1003
|
-
/** Subscription status */
|
|
1004
|
-
status: string;
|
|
1005
|
-
/** Human-readable status */
|
|
1006
|
-
status_display: string;
|
|
1007
|
-
/** Color for status display */
|
|
1008
|
-
status_color: string;
|
|
1009
|
-
/** Whether subscription is active */
|
|
1010
|
-
is_active: boolean;
|
|
1011
|
-
/** Whether subscription is expired */
|
|
1012
|
-
is_expired: boolean;
|
|
1013
|
-
/** Days until expiration */
|
|
1014
|
-
days_remaining: number;
|
|
1015
|
-
/** Hourly request limit */
|
|
1016
|
-
requests_per_hour: number;
|
|
1017
|
-
/** Daily request limit */
|
|
1018
|
-
requests_per_day: number;
|
|
1019
|
-
/** Total requests made */
|
|
1020
|
-
total_requests: number;
|
|
1021
|
-
/** Usage percentage for current period */
|
|
1022
|
-
usage_percentage: number;
|
|
1023
|
-
/** Monthly cost in USD */
|
|
1024
|
-
monthly_cost_usd: number;
|
|
1025
|
-
/** Formatted cost display */
|
|
1026
|
-
cost_display: string;
|
|
1027
|
-
/** Subscription start date */
|
|
1028
|
-
starts_at: string;
|
|
1029
|
-
/** Subscription expiration date */
|
|
1030
|
-
expires_at: string;
|
|
1031
|
-
/** Last API request timestamp */
|
|
1032
|
-
last_request_at: string | null;
|
|
1033
|
-
/** Number of accessible endpoint groups */
|
|
1034
|
-
endpoint_groups_count: number;
|
|
1035
|
-
/** List of accessible endpoint group names */
|
|
1036
|
-
endpoint_groups: Array<string>;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
/**
|
|
1040
|
-
*
|
|
1041
|
-
* Response model (includes read-only fields).
|
|
1042
|
-
*/
|
|
1043
|
-
export interface PaginatedPaymentListList {
|
|
1044
|
-
/** Total number of items across all pages */
|
|
1045
|
-
count: number;
|
|
1046
|
-
/** Current page number (1-based) */
|
|
1047
|
-
page: number;
|
|
1048
|
-
/** Total number of pages */
|
|
1049
|
-
pages: number;
|
|
1050
|
-
/** Number of items per page */
|
|
1051
|
-
page_size: number;
|
|
1052
|
-
/** Whether there is a next page */
|
|
1053
|
-
has_next: boolean;
|
|
1054
|
-
/** Whether there is a previous page */
|
|
1055
|
-
has_previous: boolean;
|
|
1056
|
-
/** Next page number (null if no next page) */
|
|
1057
|
-
next_page?: number | null;
|
|
1058
|
-
/** Previous page number (null if no previous page) */
|
|
1059
|
-
previous_page?: number | null;
|
|
1060
|
-
/** Array of items for current page */
|
|
1061
|
-
results: Array<PaymentList>;
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1064
|
-
/**
|
|
1065
|
-
* Payment creation serializer with Pydantic integration. Validates input and
|
|
1066
|
-
* delegates to PaymentService.
|
|
1067
|
-
*
|
|
1068
|
-
* Request model (no read-only fields).
|
|
1069
|
-
*/
|
|
1070
|
-
export interface PaymentCreateRequest {
|
|
1071
|
-
/** Amount in USD (1.00 - 50,000.00) */
|
|
1072
|
-
amount_usd: number;
|
|
1073
|
-
/** Cryptocurrency to receive
|
|
1074
|
-
|
|
1075
|
-
* `BTC` - Bitcoin
|
|
1076
|
-
* `ETH` - Ethereum
|
|
1077
|
-
* `LTC` - Litecoin
|
|
1078
|
-
* `XMR` - Monero
|
|
1079
|
-
* `USDT` - Tether
|
|
1080
|
-
* `USDC` - USD Coin
|
|
1081
|
-
* `ADA` - Cardano
|
|
1082
|
-
* `DOT` - Polkadot */
|
|
1083
|
-
currency_code: Enums.PaymentCreateRequestCurrencyCode;
|
|
1084
|
-
/** Success callback URL */
|
|
1085
|
-
callback_url?: string;
|
|
1086
|
-
/** Cancellation URL */
|
|
1087
|
-
cancel_url?: string;
|
|
1088
|
-
/** Payment description */
|
|
1089
|
-
description?: string;
|
|
1090
|
-
/** Additional metadata */
|
|
1091
|
-
metadata?: string;
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
/**
|
|
1095
|
-
* Payment creation serializer with Pydantic integration. Validates input and
|
|
1096
|
-
* delegates to PaymentService.
|
|
1097
|
-
*
|
|
1098
|
-
* Response model (includes read-only fields).
|
|
1099
|
-
*/
|
|
1100
|
-
export interface PaymentCreate {
|
|
1101
|
-
/** Amount in USD (1.00 - 50,000.00) */
|
|
1102
|
-
amount_usd: number;
|
|
1103
|
-
/** Cryptocurrency to receive
|
|
1104
|
-
|
|
1105
|
-
* `BTC` - Bitcoin
|
|
1106
|
-
* `ETH` - Ethereum
|
|
1107
|
-
* `LTC` - Litecoin
|
|
1108
|
-
* `XMR` - Monero
|
|
1109
|
-
* `USDT` - Tether
|
|
1110
|
-
* `USDC` - USD Coin
|
|
1111
|
-
* `ADA` - Cardano
|
|
1112
|
-
* `DOT` - Polkadot */
|
|
1113
|
-
currency_code: Enums.PaymentCreateCurrencyCode;
|
|
1114
|
-
/** Success callback URL */
|
|
1115
|
-
callback_url?: string;
|
|
1116
|
-
/** Cancellation URL */
|
|
1117
|
-
cancel_url?: string;
|
|
1118
|
-
/** Payment description */
|
|
1119
|
-
description?: string;
|
|
1120
|
-
/** Additional metadata */
|
|
1121
|
-
metadata?: string;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
/**
|
|
1125
|
-
* Complete payment serializer with full details. Used for detail views and
|
|
1126
|
-
* updates.
|
|
1127
|
-
*
|
|
1128
|
-
* Request model (no read-only fields).
|
|
1129
|
-
*/
|
|
1130
|
-
export interface PaymentRequest {
|
|
1131
|
-
/** Payment amount in USD (float for performance) */
|
|
1132
|
-
amount_usd: number;
|
|
1133
|
-
/** Payment currency */
|
|
1134
|
-
currency: number;
|
|
1135
|
-
/** Blockchain network (for crypto payments) */
|
|
1136
|
-
network?: number | null;
|
|
1137
|
-
/** Payment provider
|
|
1138
|
-
|
|
1139
|
-
* `nowpayments` - NowPayments */
|
|
1140
|
-
provider?: Enums.PaymentRequestProvider;
|
|
1141
|
-
/** Current payment status
|
|
1142
|
-
|
|
1143
|
-
* `pending` - Pending
|
|
1144
|
-
* `confirming` - Confirming
|
|
1145
|
-
* `confirmed` - Confirmed
|
|
1146
|
-
* `completed` - Completed
|
|
1147
|
-
* `failed` - Failed
|
|
1148
|
-
* `expired` - Expired
|
|
1149
|
-
* `cancelled` - Cancelled
|
|
1150
|
-
* `refunded` - Refunded */
|
|
1151
|
-
status?: Enums.PaymentRequestStatus;
|
|
1152
|
-
/** Success callback URL */
|
|
1153
|
-
callback_url?: string | null;
|
|
1154
|
-
/** Cancellation URL */
|
|
1155
|
-
cancel_url?: string | null;
|
|
1156
|
-
/** Payment description */
|
|
1157
|
-
description?: string;
|
|
1158
|
-
/** When this payment expires */
|
|
1159
|
-
expires_at?: string | null;
|
|
1160
|
-
}
|
|
1161
|
-
|
|
1162
|
-
/**
|
|
1163
|
-
* Complete payment serializer with full details. Used for detail views and
|
|
1164
|
-
* updates.
|
|
1165
|
-
*
|
|
1166
|
-
* Request model (no read-only fields).
|
|
1167
|
-
*/
|
|
1168
|
-
export interface PatchedPaymentRequest {
|
|
1169
|
-
/** Payment amount in USD (float for performance) */
|
|
1170
|
-
amount_usd?: number;
|
|
1171
|
-
/** Payment currency */
|
|
1172
|
-
currency?: number;
|
|
1173
|
-
/** Blockchain network (for crypto payments) */
|
|
1174
|
-
network?: number | null;
|
|
1175
|
-
/** Payment provider
|
|
1176
|
-
|
|
1177
|
-
* `nowpayments` - NowPayments */
|
|
1178
|
-
provider?: Enums.PatchedPaymentRequestProvider;
|
|
1179
|
-
/** Current payment status
|
|
1180
|
-
|
|
1181
|
-
* `pending` - Pending
|
|
1182
|
-
* `confirming` - Confirming
|
|
1183
|
-
* `confirmed` - Confirmed
|
|
1184
|
-
* `completed` - Completed
|
|
1185
|
-
* `failed` - Failed
|
|
1186
|
-
* `expired` - Expired
|
|
1187
|
-
* `cancelled` - Cancelled
|
|
1188
|
-
* `refunded` - Refunded */
|
|
1189
|
-
status?: Enums.PatchedPaymentRequestStatus;
|
|
1190
|
-
/** Success callback URL */
|
|
1191
|
-
callback_url?: string | null;
|
|
1192
|
-
/** Cancellation URL */
|
|
1193
|
-
cancel_url?: string | null;
|
|
1194
|
-
/** Payment description */
|
|
1195
|
-
description?: string;
|
|
1196
|
-
/** When this payment expires */
|
|
1197
|
-
expires_at?: string | null;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
*
|
|
1202
|
-
* Response model (includes read-only fields).
|
|
1203
|
-
*/
|
|
1204
|
-
export interface PaginatedProviderCurrencyList {
|
|
1205
|
-
/** Total number of items across all pages */
|
|
1206
|
-
count: number;
|
|
1207
|
-
/** Current page number (1-based) */
|
|
1208
|
-
page: number;
|
|
1209
|
-
/** Total number of pages */
|
|
1210
|
-
pages: number;
|
|
1211
|
-
/** Number of items per page */
|
|
1212
|
-
page_size: number;
|
|
1213
|
-
/** Whether there is a next page */
|
|
1214
|
-
has_next: boolean;
|
|
1215
|
-
/** Whether there is a previous page */
|
|
1216
|
-
has_previous: boolean;
|
|
1217
|
-
/** Next page number (null if no next page) */
|
|
1218
|
-
next_page?: number | null;
|
|
1219
|
-
/** Previous page number (null if no previous page) */
|
|
1220
|
-
previous_page?: number | null;
|
|
1221
|
-
/** Array of items for current page */
|
|
1222
|
-
results: Array<ProviderCurrency>;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1225
|
-
/**
|
|
1226
|
-
* Provider currency serializer for provider-specific currency info. Used for
|
|
1227
|
-
* provider currency management and rates.
|
|
1228
|
-
*
|
|
1229
|
-
* Response model (includes read-only fields).
|
|
1230
|
-
*/
|
|
1231
|
-
export interface ProviderCurrency {
|
|
1232
|
-
id: number;
|
|
1233
|
-
currency: Record<string, any>;
|
|
1234
|
-
network: Record<string, any> | null;
|
|
1235
|
-
/** Payment provider name (e.g., nowpayments) */
|
|
1236
|
-
provider: string;
|
|
1237
|
-
/** Currency code as used by the provider */
|
|
1238
|
-
provider_currency_code: string;
|
|
1239
|
-
/** Get minimum amount from provider configuration. */
|
|
1240
|
-
provider_min_amount_usd: number;
|
|
1241
|
-
/** Get maximum amount from provider configuration. */
|
|
1242
|
-
provider_max_amount_usd: number;
|
|
1243
|
-
/** Get fee percentage from provider configuration. */
|
|
1244
|
-
provider_fee_percentage: number;
|
|
1245
|
-
/** Get fixed fee from provider configuration. */
|
|
1246
|
-
provider_fixed_fee_usd: number;
|
|
1247
|
-
/** Whether this currency is enabled for this provider */
|
|
1248
|
-
is_enabled: boolean;
|
|
1249
|
-
/** When this record was created */
|
|
1250
|
-
created_at: string;
|
|
1251
|
-
/** When this record was last updated */
|
|
1252
|
-
updated_at: string;
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
/**
|
|
1256
|
-
*
|
|
1257
|
-
* Response model (includes read-only fields).
|
|
1258
|
-
*/
|
|
1259
|
-
export interface PaginatedSubscriptionListList {
|
|
1260
|
-
/** Total number of items across all pages */
|
|
1261
|
-
count: number;
|
|
1262
|
-
/** Current page number (1-based) */
|
|
1263
|
-
page: number;
|
|
1264
|
-
/** Total number of pages */
|
|
1265
|
-
pages: number;
|
|
1266
|
-
/** Number of items per page */
|
|
1267
|
-
page_size: number;
|
|
1268
|
-
/** Whether there is a next page */
|
|
1269
|
-
has_next: boolean;
|
|
1270
|
-
/** Whether there is a previous page */
|
|
1271
|
-
has_previous: boolean;
|
|
1272
|
-
/** Next page number (null if no next page) */
|
|
1273
|
-
next_page?: number | null;
|
|
1274
|
-
/** Previous page number (null if no previous page) */
|
|
1275
|
-
previous_page?: number | null;
|
|
1276
|
-
/** Array of items for current page */
|
|
1277
|
-
results: Array<SubscriptionList>;
|
|
1278
|
-
}
|
|
1279
|
-
|
|
1280
|
-
/**
|
|
1281
|
-
* Subscription creation serializer with service integration. Validates input
|
|
1282
|
-
* and delegates to SubscriptionService.
|
|
1283
|
-
*
|
|
1284
|
-
* Request model (no read-only fields).
|
|
1285
|
-
*/
|
|
1286
|
-
export interface SubscriptionCreateRequest {
|
|
1287
|
-
/** Tariff ID for the subscription */
|
|
1288
|
-
tariff_id: number;
|
|
1289
|
-
/** Endpoint group ID (optional) */
|
|
1290
|
-
endpoint_group_id?: number | null;
|
|
1291
|
-
/** Subscription duration in days */
|
|
1292
|
-
duration_days?: number;
|
|
1293
|
-
}
|
|
1294
|
-
|
|
1295
|
-
/**
|
|
1296
|
-
* Subscription creation serializer with service integration. Validates input
|
|
1297
|
-
* and delegates to SubscriptionService.
|
|
1298
|
-
*
|
|
1299
|
-
* Response model (includes read-only fields).
|
|
1300
|
-
*/
|
|
1301
|
-
export interface SubscriptionCreate {
|
|
1302
|
-
/** Tariff ID for the subscription */
|
|
1303
|
-
tariff_id: number;
|
|
1304
|
-
/** Endpoint group ID (optional) */
|
|
1305
|
-
endpoint_group_id?: number | null;
|
|
1306
|
-
/** Subscription duration in days */
|
|
1307
|
-
duration_days?: number;
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
/**
|
|
1311
|
-
* Complete subscription serializer with full details. Used for subscription
|
|
1312
|
-
* detail views and updates.
|
|
1313
|
-
*
|
|
1314
|
-
* Response model (includes read-only fields).
|
|
1315
|
-
*/
|
|
1316
|
-
export interface Subscription {
|
|
1317
|
-
/** Unique identifier for this record */
|
|
1318
|
-
id: string;
|
|
1319
|
-
user: string;
|
|
1320
|
-
tariff: Record<string, any>;
|
|
1321
|
-
endpoint_group: Record<string, any>;
|
|
1322
|
-
/** Subscription status
|
|
1323
|
-
|
|
1324
|
-
* `active` - Active
|
|
1325
|
-
* `inactive` - Inactive
|
|
1326
|
-
* `suspended` - Suspended
|
|
1327
|
-
* `cancelled` - Cancelled
|
|
1328
|
-
* `expired` - Expired */
|
|
1329
|
-
status?: Enums.SubscriptionStatus;
|
|
1330
|
-
status_display: string;
|
|
1331
|
-
/** Get color for status display. */
|
|
1332
|
-
status_color: string;
|
|
1333
|
-
/** Subscription tier
|
|
1334
|
-
|
|
1335
|
-
* `free` - Free Tier
|
|
1336
|
-
* `basic` - Basic Tier
|
|
1337
|
-
* `pro` - Pro Tier
|
|
1338
|
-
* `enterprise` - Enterprise Tier */
|
|
1339
|
-
tier?: Enums.SubscriptionTier;
|
|
1340
|
-
/** Total API requests made with this subscription */
|
|
1341
|
-
total_requests: number;
|
|
1342
|
-
/** Get usage percentage for current period. */
|
|
1343
|
-
usage_percentage: number;
|
|
1344
|
-
/** When the last API request was made */
|
|
1345
|
-
last_request_at: string | null;
|
|
1346
|
-
/** When this subscription expires */
|
|
1347
|
-
expires_at: string;
|
|
1348
|
-
/** Check if subscription is active and not expired. */
|
|
1349
|
-
is_active: boolean;
|
|
1350
|
-
/** Check if subscription is expired. */
|
|
1351
|
-
is_expired: boolean;
|
|
1352
|
-
/** When this record was created */
|
|
1353
|
-
created_at: string;
|
|
1354
|
-
/** When this record was last updated */
|
|
1355
|
-
updated_at: string;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
/**
|
|
1359
|
-
* Complete subscription serializer with full details. Used for subscription
|
|
1360
|
-
* detail views and updates.
|
|
1361
|
-
*
|
|
1362
|
-
* Request model (no read-only fields).
|
|
1363
|
-
*/
|
|
1364
|
-
export interface SubscriptionRequest {
|
|
1365
|
-
/** Subscription status
|
|
1366
|
-
|
|
1367
|
-
* `active` - Active
|
|
1368
|
-
* `inactive` - Inactive
|
|
1369
|
-
* `suspended` - Suspended
|
|
1370
|
-
* `cancelled` - Cancelled
|
|
1371
|
-
* `expired` - Expired */
|
|
1372
|
-
status?: Enums.SubscriptionRequestStatus;
|
|
1373
|
-
/** Subscription tier
|
|
1374
|
-
|
|
1375
|
-
* `free` - Free Tier
|
|
1376
|
-
* `basic` - Basic Tier
|
|
1377
|
-
* `pro` - Pro Tier
|
|
1378
|
-
* `enterprise` - Enterprise Tier */
|
|
1379
|
-
tier?: Enums.SubscriptionRequestTier;
|
|
1380
|
-
/** When this subscription expires */
|
|
1381
|
-
expires_at: string;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
/**
|
|
1385
|
-
* Complete subscription serializer with full details. Used for subscription
|
|
1386
|
-
* detail views and updates.
|
|
1387
|
-
*
|
|
1388
|
-
* Request model (no read-only fields).
|
|
1389
|
-
*/
|
|
1390
|
-
export interface PatchedSubscriptionRequest {
|
|
1391
|
-
/** Subscription status
|
|
1392
|
-
|
|
1393
|
-
* `active` - Active
|
|
1394
|
-
* `inactive` - Inactive
|
|
1395
|
-
* `suspended` - Suspended
|
|
1396
|
-
* `cancelled` - Cancelled
|
|
1397
|
-
* `expired` - Expired */
|
|
1398
|
-
status?: Enums.PatchedSubscriptionRequestStatus;
|
|
1399
|
-
/** Subscription tier
|
|
1400
|
-
|
|
1401
|
-
* `free` - Free Tier
|
|
1402
|
-
* `basic` - Basic Tier
|
|
1403
|
-
* `pro` - Pro Tier
|
|
1404
|
-
* `enterprise` - Enterprise Tier */
|
|
1405
|
-
tier?: Enums.PatchedSubscriptionRequestTier;
|
|
1406
|
-
/** When this subscription expires */
|
|
1407
|
-
expires_at?: string;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
/**
|
|
1411
|
-
*
|
|
1412
|
-
* Response model (includes read-only fields).
|
|
1413
|
-
*/
|
|
1414
|
-
export interface PaginatedTariffList {
|
|
1415
|
-
/** Total number of items across all pages */
|
|
1416
|
-
count: number;
|
|
1417
|
-
/** Current page number (1-based) */
|
|
1418
|
-
page: number;
|
|
1419
|
-
/** Total number of pages */
|
|
1420
|
-
pages: number;
|
|
1421
|
-
/** Number of items per page */
|
|
1422
|
-
page_size: number;
|
|
1423
|
-
/** Whether there is a next page */
|
|
1424
|
-
has_next: boolean;
|
|
1425
|
-
/** Whether there is a previous page */
|
|
1426
|
-
has_previous: boolean;
|
|
1427
|
-
/** Next page number (null if no next page) */
|
|
1428
|
-
next_page?: number | null;
|
|
1429
|
-
/** Previous page number (null if no previous page) */
|
|
1430
|
-
previous_page?: number | null;
|
|
1431
|
-
/** Array of items for current page */
|
|
1432
|
-
results: Array<Tariff>;
|
|
1433
|
-
}
|
|
1434
|
-
|
|
1435
|
-
/**
|
|
1436
|
-
* Tariff serializer for subscription pricing. Used for tariff information and
|
|
1437
|
-
* selection.
|
|
1438
|
-
*
|
|
1439
|
-
* Response model (includes read-only fields).
|
|
1440
|
-
*/
|
|
1441
|
-
export interface Tariff {
|
|
1442
|
-
id: number;
|
|
1443
|
-
/** Tariff name (e.g., 'Free', 'Basic', 'Pro') */
|
|
1444
|
-
name: string;
|
|
1445
|
-
/** Detailed description of what this tariff includes */
|
|
1446
|
-
description: string;
|
|
1447
|
-
/** Monthly price in USD */
|
|
1448
|
-
monthly_price_usd: number;
|
|
1449
|
-
/** API requests allowed per month */
|
|
1450
|
-
requests_per_month: number;
|
|
1451
|
-
/** API requests allowed per hour */
|
|
1452
|
-
requests_per_hour: number;
|
|
1453
|
-
/** Whether this tariff is available for new subscriptions */
|
|
1454
|
-
is_active: boolean;
|
|
1455
|
-
endpoint_groups: Array<EndpointGroup>;
|
|
1456
|
-
endpoint_groups_count: number;
|
|
1457
|
-
/** When this record was created */
|
|
1458
|
-
created_at: string;
|
|
1459
|
-
/** When this record was last updated */
|
|
1460
|
-
updated_at: string;
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
/**
|
|
1464
|
-
*
|
|
1465
|
-
* Response model (includes read-only fields).
|
|
1466
|
-
*/
|
|
1467
|
-
export interface PaginatedTransactionList {
|
|
7
|
+
export interface PaginatedPaymentListList {
|
|
1468
8
|
/** Total number of items across all pages */
|
|
1469
9
|
count: number;
|
|
1470
10
|
/** Current page number (1-based) */
|
|
@@ -1482,408 +22,95 @@ export interface PaginatedTransactionList {
|
|
|
1482
22
|
/** Previous page number (null if no previous page) */
|
|
1483
23
|
previous_page?: number | null;
|
|
1484
24
|
/** Array of items for current page */
|
|
1485
|
-
results: Array<
|
|
25
|
+
results: Array<PaymentList>;
|
|
1486
26
|
}
|
|
1487
27
|
|
|
1488
28
|
/**
|
|
1489
|
-
*
|
|
1490
|
-
* details.
|
|
29
|
+
* Detailed payment information.
|
|
1491
30
|
*
|
|
1492
31
|
* Response model (includes read-only fields).
|
|
1493
32
|
*/
|
|
1494
|
-
export interface
|
|
33
|
+
export interface PaymentDetail {
|
|
1495
34
|
/** Unique identifier for this record */
|
|
1496
35
|
id: string;
|
|
1497
|
-
|
|
1498
|
-
/** Transaction amount in USD (positive=credit, negative=debit) */
|
|
1499
|
-
amount_usd: number;
|
|
1500
|
-
amount_display: string;
|
|
1501
|
-
/** Type of transaction
|
|
1502
|
-
|
|
1503
|
-
* `deposit` - Deposit
|
|
1504
|
-
* `withdrawal` - Withdrawal
|
|
1505
|
-
* `payment` - Payment
|
|
1506
|
-
* `refund` - Refund
|
|
1507
|
-
* `fee` - Fee
|
|
1508
|
-
* `bonus` - Bonus
|
|
1509
|
-
* `adjustment` - Adjustment */
|
|
1510
|
-
transaction_type: Enums.TransactionTransactionType;
|
|
1511
|
-
type_color: string;
|
|
1512
|
-
/** Transaction description */
|
|
1513
|
-
description: string;
|
|
1514
|
-
/** Related payment ID (if applicable) */
|
|
1515
|
-
payment_id: string | null;
|
|
1516
|
-
/** Additional transaction metadata */
|
|
1517
|
-
metadata: string;
|
|
1518
|
-
is_credit: boolean;
|
|
1519
|
-
is_debit: boolean;
|
|
1520
|
-
/** When this record was created */
|
|
1521
|
-
created_at: string;
|
|
1522
|
-
}
|
|
1523
|
-
|
|
1524
|
-
/**
|
|
1525
|
-
* Serializer for payment list in admin interface. Uses UniversalPayment only
|
|
1526
|
-
* for data extraction.
|
|
1527
|
-
*
|
|
1528
|
-
* Response model (includes read-only fields).
|
|
1529
|
-
*/
|
|
1530
|
-
export interface AdminPaymentList {
|
|
1531
|
-
id: string;
|
|
36
|
+
/** Internal payment identifier (PAY_YYYYMMDDHHMMSS_UUID) */
|
|
1532
37
|
internal_payment_id: string;
|
|
1533
|
-
|
|
1534
|
-
amount_usd:
|
|
38
|
+
/** Payment amount in USD */
|
|
39
|
+
amount_usd: string;
|
|
1535
40
|
currency_code: string;
|
|
1536
41
|
currency_name: string;
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
description: string;
|
|
1547
|
-
age: string;
|
|
1548
|
-
}
|
|
42
|
+
currency_token: string;
|
|
43
|
+
currency_network: string;
|
|
44
|
+
/** Amount to pay in cryptocurrency */
|
|
45
|
+
pay_amount: string | null;
|
|
46
|
+
/** Actual amount received in cryptocurrency */
|
|
47
|
+
actual_amount: string | null;
|
|
48
|
+
/** Actual amount received in USD */
|
|
49
|
+
actual_amount_usd: string | null;
|
|
50
|
+
/** Current payment status
|
|
1549
51
|
|
|
1550
|
-
/**
|
|
1551
|
-
* Serializer for individual webhook event.
|
|
1552
|
-
*
|
|
1553
|
-
* Response model (includes read-only fields).
|
|
1554
|
-
*/
|
|
1555
|
-
export interface WebhookEvent {
|
|
1556
|
-
id: number;
|
|
1557
|
-
provider: string;
|
|
1558
|
-
event_type: string;
|
|
1559
|
-
/** * `success` - Success
|
|
1560
|
-
* `failed` - Failed
|
|
1561
52
|
* `pending` - Pending
|
|
1562
|
-
* `
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
payload_size: number;
|
|
1567
|
-
/** Response time in ms */
|
|
1568
|
-
response_time: number;
|
|
1569
|
-
retry_count?: number;
|
|
1570
|
-
error_message?: string;
|
|
1571
|
-
payload_preview?: string;
|
|
1572
|
-
response_status_code?: number;
|
|
1573
|
-
webhook_url?: string;
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
/**
|
|
1577
|
-
* Serializer for individual webhook event.
|
|
1578
|
-
*
|
|
1579
|
-
* Request model (no read-only fields).
|
|
1580
|
-
*/
|
|
1581
|
-
export interface WebhookEventRequest {
|
|
1582
|
-
provider: string;
|
|
1583
|
-
event_type: string;
|
|
1584
|
-
/** * `success` - Success
|
|
53
|
+
* `confirming` - Confirming
|
|
54
|
+
* `confirmed` - Confirmed
|
|
55
|
+
* `completed` - Completed
|
|
56
|
+
* `partially_paid` - Partially Paid
|
|
1585
57
|
* `failed` - Failed
|
|
1586
|
-
* `
|
|
1587
|
-
* `
|
|
1588
|
-
status: Enums.
|
|
1589
|
-
|
|
1590
|
-
/**
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
/**
|
|
1602
|
-
* Lightweight API key serializer for lists. Optimized for API key lists with
|
|
1603
|
-
* minimal data (no key value).
|
|
1604
|
-
*
|
|
1605
|
-
* Response model (includes read-only fields).
|
|
1606
|
-
*/
|
|
1607
|
-
export interface APIKeyList {
|
|
1608
|
-
/** Unique identifier for this record */
|
|
1609
|
-
id: string;
|
|
1610
|
-
user: string;
|
|
1611
|
-
/** Human-readable name for this API key */
|
|
1612
|
-
name: string;
|
|
1613
|
-
/** Whether this API key is active */
|
|
1614
|
-
is_active: boolean;
|
|
1615
|
-
is_expired: boolean;
|
|
1616
|
-
is_valid: boolean;
|
|
1617
|
-
/** Total number of requests made with this key */
|
|
1618
|
-
total_requests: number;
|
|
1619
|
-
/** When this API key was last used */
|
|
1620
|
-
last_used_at: string | null;
|
|
1621
|
-
/** When this API key expires (null = never expires) */
|
|
58
|
+
* `expired` - Expired
|
|
59
|
+
* `cancelled` - Cancelled */
|
|
60
|
+
status: Enums.PaymentDetailStatus;
|
|
61
|
+
status_display: string;
|
|
62
|
+
/** Cryptocurrency payment address */
|
|
63
|
+
pay_address: string | null;
|
|
64
|
+
qr_code_url: string;
|
|
65
|
+
/** Payment page URL (if provided by provider) */
|
|
66
|
+
payment_url: string | null;
|
|
67
|
+
/** Blockchain transaction hash */
|
|
68
|
+
transaction_hash: string | null;
|
|
69
|
+
explorer_link: string;
|
|
70
|
+
/** Number of blockchain confirmations */
|
|
71
|
+
confirmations_count: number;
|
|
72
|
+
/** When this payment expires (typically 30 minutes) */
|
|
1622
73
|
expires_at: string | null;
|
|
74
|
+
/** When this payment was completed */
|
|
75
|
+
completed_at: string | null;
|
|
1623
76
|
/** When this record was created */
|
|
1624
77
|
created_at: string;
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
/**
|
|
1628
|
-
* Lightweight currency serializer for lists. Optimized for currency selection
|
|
1629
|
-
* and lists.
|
|
1630
|
-
*
|
|
1631
|
-
* Response model (includes read-only fields).
|
|
1632
|
-
*/
|
|
1633
|
-
export interface CurrencyList {
|
|
1634
|
-
id: number;
|
|
1635
|
-
/** Currency code (e.g., BTC, USD, ETH) */
|
|
1636
|
-
code: string;
|
|
1637
|
-
/** Full currency name (e.g., Bitcoin, US Dollar) */
|
|
1638
|
-
name: string;
|
|
1639
|
-
/** Currency symbol (e.g., $, ₿, Ξ) */
|
|
1640
|
-
symbol: string;
|
|
1641
|
-
/** Type of currency
|
|
1642
|
-
|
|
1643
|
-
* `fiat` - Fiat Currency
|
|
1644
|
-
* `crypto` - Cryptocurrency */
|
|
1645
|
-
currency_type: Enums.CurrencyListCurrencyType;
|
|
1646
|
-
type_display: string;
|
|
1647
|
-
/** Whether this currency is available for payments */
|
|
1648
|
-
is_active: boolean;
|
|
1649
|
-
/** Current USD exchange rate (1 unit = X USD) */
|
|
1650
|
-
usd_rate: number;
|
|
1651
|
-
/** When USD rate was last updated */
|
|
1652
|
-
usd_rate_updated_at: string | null;
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
/**
|
|
1656
|
-
* Chart series data for payments visualization
|
|
1657
|
-
*
|
|
1658
|
-
* Response model (includes read-only fields).
|
|
1659
|
-
*/
|
|
1660
|
-
export interface ChartSeries {
|
|
1661
|
-
/** Series name */
|
|
1662
|
-
name: string;
|
|
1663
|
-
/** Data points */
|
|
1664
|
-
data: Array<ChartDataPoint>;
|
|
1665
|
-
/** Series color */
|
|
1666
|
-
color: string;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
/**
|
|
1670
|
-
* Payments overview metrics
|
|
1671
|
-
*
|
|
1672
|
-
* Response model (includes read-only fields).
|
|
1673
|
-
*/
|
|
1674
|
-
export interface PaymentOverview {
|
|
1675
|
-
/** Total number of payments */
|
|
1676
|
-
total_payments: number;
|
|
1677
|
-
/** Number of completed payments */
|
|
1678
|
-
completed_payments: number;
|
|
1679
|
-
/** Number of pending payments */
|
|
1680
|
-
pending_payments: number;
|
|
1681
|
-
/** Number of failed payments */
|
|
1682
|
-
failed_payments: number;
|
|
1683
|
-
/** Total payment amount in USD */
|
|
1684
|
-
total_amount_usd: number;
|
|
1685
|
-
/** Total completed amount in USD */
|
|
1686
|
-
completed_amount_usd: number;
|
|
1687
|
-
/** Average payment amount in USD */
|
|
1688
|
-
average_payment_usd: number;
|
|
1689
|
-
/** Payment success rate percentage */
|
|
1690
|
-
success_rate: number;
|
|
1691
|
-
/** Last payment timestamp */
|
|
1692
|
-
last_payment_at: string | null;
|
|
1693
|
-
/** Number of payments this month */
|
|
1694
|
-
payments_this_month: number;
|
|
1695
|
-
/** Total amount this month */
|
|
1696
|
-
amount_this_month: number;
|
|
1697
|
-
/** Most used currency */
|
|
1698
|
-
top_currency: string | null;
|
|
1699
|
-
/** Usage count for top currency */
|
|
1700
|
-
top_currency_count: number;
|
|
1701
|
-
}
|
|
1702
|
-
|
|
1703
|
-
/**
|
|
1704
|
-
* Recent payment item
|
|
1705
|
-
*
|
|
1706
|
-
* Response model (includes read-only fields).
|
|
1707
|
-
*/
|
|
1708
|
-
export interface RecentPayment {
|
|
1709
|
-
/** Payment ID */
|
|
1710
|
-
id: string;
|
|
1711
|
-
/** Internal payment ID */
|
|
1712
|
-
internal_payment_id: string;
|
|
1713
|
-
/** Payment amount in USD */
|
|
1714
|
-
amount_usd: number;
|
|
1715
|
-
/** Formatted amount display */
|
|
1716
|
-
amount_display: string;
|
|
1717
|
-
/** Currency code */
|
|
1718
|
-
currency_code: string;
|
|
1719
|
-
/** Payment status */
|
|
1720
|
-
status: string;
|
|
1721
|
-
/** Human-readable status */
|
|
1722
|
-
status_display: string;
|
|
1723
|
-
/** Color for status display */
|
|
1724
|
-
status_color: string;
|
|
1725
|
-
/** Payment provider */
|
|
1726
|
-
provider: string;
|
|
1727
|
-
/** Payment creation timestamp */
|
|
1728
|
-
created_at: string;
|
|
1729
|
-
/** Payment completion timestamp */
|
|
1730
|
-
completed_at: string | null;
|
|
1731
|
-
/** Whether payment is pending */
|
|
1732
|
-
is_pending: boolean;
|
|
1733
|
-
/** Whether payment is completed */
|
|
1734
78
|
is_completed: boolean;
|
|
1735
|
-
/** Whether payment failed */
|
|
1736
79
|
is_failed: boolean;
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
/**
|
|
1740
|
-
* Recent transaction item
|
|
1741
|
-
*
|
|
1742
|
-
* Response model (includes read-only fields).
|
|
1743
|
-
*/
|
|
1744
|
-
export interface RecentTransaction {
|
|
1745
|
-
/** Transaction ID */
|
|
1746
|
-
id: string;
|
|
1747
|
-
/** Transaction type */
|
|
1748
|
-
transaction_type: string;
|
|
1749
|
-
/** Transaction amount in USD */
|
|
1750
|
-
amount_usd: number;
|
|
1751
|
-
/** Formatted amount display */
|
|
1752
|
-
amount_display: string;
|
|
1753
|
-
/** Balance after transaction */
|
|
1754
|
-
balance_after: number;
|
|
1755
|
-
/** Transaction description */
|
|
80
|
+
is_expired: boolean;
|
|
81
|
+
/** Payment description */
|
|
1756
82
|
description: string;
|
|
1757
|
-
/** Transaction timestamp */
|
|
1758
|
-
created_at: string;
|
|
1759
|
-
/** Related payment ID */
|
|
1760
|
-
payment_id: string | null;
|
|
1761
|
-
/** Whether this is a credit transaction */
|
|
1762
|
-
is_credit: boolean;
|
|
1763
|
-
/** Whether this is a debit transaction */
|
|
1764
|
-
is_debit: boolean;
|
|
1765
|
-
/** Color for transaction type display */
|
|
1766
|
-
type_color: string;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
/**
|
|
1770
|
-
* Analytics data for a single currency
|
|
1771
|
-
*
|
|
1772
|
-
* Response model (includes read-only fields).
|
|
1773
|
-
*/
|
|
1774
|
-
export interface CurrencyAnalyticsItem {
|
|
1775
|
-
/** Currency code (e.g., BTC) */
|
|
1776
|
-
currency_code: string;
|
|
1777
|
-
/** Currency name (e.g., Bitcoin) */
|
|
1778
|
-
currency_name: string;
|
|
1779
|
-
/** Total number of payments */
|
|
1780
|
-
total_payments: number;
|
|
1781
|
-
/** Total amount in USD */
|
|
1782
|
-
total_amount: number;
|
|
1783
|
-
/** Number of completed payments */
|
|
1784
|
-
completed_payments: number;
|
|
1785
|
-
/** Average payment amount in USD */
|
|
1786
|
-
average_amount: number;
|
|
1787
|
-
/** Success rate percentage */
|
|
1788
|
-
success_rate: number;
|
|
1789
83
|
}
|
|
1790
84
|
|
|
1791
85
|
/**
|
|
1792
|
-
*
|
|
1793
|
-
*
|
|
1794
|
-
* Response model (includes read-only fields).
|
|
1795
|
-
*/
|
|
1796
|
-
export interface ProviderAnalyticsItem {
|
|
1797
|
-
/** Provider code */
|
|
1798
|
-
provider: string;
|
|
1799
|
-
/** Provider display name */
|
|
1800
|
-
provider_display: string;
|
|
1801
|
-
/** Total number of payments */
|
|
1802
|
-
total_payments: number;
|
|
1803
|
-
/** Total amount in USD */
|
|
1804
|
-
total_amount: number;
|
|
1805
|
-
/** Number of completed payments */
|
|
1806
|
-
completed_payments: number;
|
|
1807
|
-
/** Success rate percentage */
|
|
1808
|
-
success_rate: number;
|
|
1809
|
-
}
|
|
1810
|
-
|
|
1811
|
-
/**
|
|
1812
|
-
* Lightweight serializer for payment lists. Optimized for list views with
|
|
1813
|
-
* minimal data.
|
|
86
|
+
* Payment list item (lighter than detail).
|
|
1814
87
|
*
|
|
1815
88
|
* Response model (includes read-only fields).
|
|
1816
89
|
*/
|
|
1817
90
|
export interface PaymentList {
|
|
1818
91
|
/** Unique identifier for this record */
|
|
1819
92
|
id: string;
|
|
1820
|
-
/**
|
|
1821
|
-
|
|
1822
|
-
/** Payment
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
* `nowpayments` - NowPayments */
|
|
1827
|
-
provider: Enums.PaymentListProvider;
|
|
93
|
+
/** Internal payment identifier (PAY_YYYYMMDDHHMMSS_UUID) */
|
|
94
|
+
internal_payment_id: string;
|
|
95
|
+
/** Payment amount in USD */
|
|
96
|
+
amount_usd: string;
|
|
97
|
+
currency_code: string;
|
|
98
|
+
currency_token: string;
|
|
1828
99
|
/** Current payment status
|
|
1829
100
|
|
|
1830
101
|
* `pending` - Pending
|
|
1831
102
|
* `confirming` - Confirming
|
|
1832
103
|
* `confirmed` - Confirmed
|
|
1833
104
|
* `completed` - Completed
|
|
105
|
+
* `partially_paid` - Partially Paid
|
|
1834
106
|
* `failed` - Failed
|
|
1835
107
|
* `expired` - Expired
|
|
1836
|
-
* `cancelled` - Cancelled
|
|
1837
|
-
* `refunded` - Refunded */
|
|
108
|
+
* `cancelled` - Cancelled */
|
|
1838
109
|
status: Enums.PaymentListStatus;
|
|
1839
110
|
status_display: string;
|
|
1840
|
-
/** Get formatted amount display. */
|
|
1841
|
-
amount_display: string;
|
|
1842
|
-
/** When this record was created */
|
|
1843
|
-
created_at: string;
|
|
1844
|
-
/** When this payment expires */
|
|
1845
|
-
expires_at: string | null;
|
|
1846
|
-
}
|
|
1847
|
-
|
|
1848
|
-
/**
|
|
1849
|
-
* Lightweight subscription serializer for lists. Optimized for subscription
|
|
1850
|
-
* lists with minimal data.
|
|
1851
|
-
*
|
|
1852
|
-
* Response model (includes read-only fields).
|
|
1853
|
-
*/
|
|
1854
|
-
export interface SubscriptionList {
|
|
1855
|
-
/** Unique identifier for this record */
|
|
1856
|
-
id: string;
|
|
1857
|
-
user: string;
|
|
1858
|
-
tariff_name: string;
|
|
1859
|
-
/** Subscription status
|
|
1860
|
-
|
|
1861
|
-
* `active` - Active
|
|
1862
|
-
* `inactive` - Inactive
|
|
1863
|
-
* `suspended` - Suspended
|
|
1864
|
-
* `cancelled` - Cancelled
|
|
1865
|
-
* `expired` - Expired */
|
|
1866
|
-
status: Enums.SubscriptionListStatus;
|
|
1867
|
-
status_display: string;
|
|
1868
|
-
/** Check if subscription is active and not expired. */
|
|
1869
|
-
is_active: boolean;
|
|
1870
|
-
/** Check if subscription is expired. */
|
|
1871
|
-
is_expired: boolean;
|
|
1872
|
-
/** When this subscription expires */
|
|
1873
|
-
expires_at: string;
|
|
1874
111
|
/** When this record was created */
|
|
1875
112
|
created_at: string;
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
/**
|
|
1879
|
-
* Chart data point for payments analytics
|
|
1880
|
-
*
|
|
1881
|
-
* Response model (includes read-only fields).
|
|
1882
|
-
*/
|
|
1883
|
-
export interface ChartDataPoint {
|
|
1884
|
-
/** X-axis value (date) */
|
|
1885
|
-
x: string;
|
|
1886
|
-
/** Y-axis value (amount or count) */
|
|
1887
|
-
y: number;
|
|
113
|
+
/** When this payment was completed */
|
|
114
|
+
completed_at: string | null;
|
|
1888
115
|
}
|
|
1889
116
|
|