@ai-grator/api 0.0.6 → 0.0.8
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/admin/endpoints/admin.ts +3 -0
- package/admin/endpoints/commands/create-admin-partner-bonus-operation.command.ts +2 -1
- package/admin/enums/admin-bonus-operation-balance-type.enum.ts +4 -0
- package/admin/enums/index.ts +1 -0
- package/admin/models/admin-bonus-operation-response.schema.ts +3 -1
- package/admin/models/admin-partner-bonus-operation-response.schema.ts +2 -1
- package/billing/endpoints/index.ts +1 -0
- package/billing/endpoints/queries/get-admin-stats.query.ts +29 -0
- package/billing/endpoints/queries/index.ts +1 -0
- package/billing/enums/index.ts +1 -0
- package/billing/enums/model-type.enum.ts +5 -0
- package/billing/index.ts +3 -0
- package/billing/models/admin-stats-response.schema.ts +29 -0
- package/billing/models/index.ts +1 -0
- package/build/admin/endpoints/admin.d.ts +1 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +2 -0
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.d.ts +7 -1
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.d.ts.map +1 -1
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.js +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.d.ts +2 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.d.ts.map +1 -1
- package/build/admin/enums/admin-bonus-operation-balance-type.enum.d.ts +5 -0
- package/build/admin/enums/admin-bonus-operation-balance-type.enum.d.ts.map +1 -0
- package/build/admin/enums/admin-bonus-operation-balance-type.enum.js +8 -0
- package/build/admin/enums/index.d.ts +1 -0
- package/build/admin/enums/index.d.ts.map +1 -1
- package/build/admin/enums/index.js +1 -0
- package/build/admin/models/admin-bonus-operation-response.schema.d.ts +3 -1
- package/build/admin/models/admin-bonus-operation-response.schema.d.ts.map +1 -1
- package/build/admin/models/admin-bonus-operation-response.schema.js +2 -0
- package/build/admin/models/admin-partner-bonus-operation-response.schema.d.ts +2 -1
- package/build/admin/models/admin-partner-bonus-operation-response.schema.d.ts.map +1 -1
- package/build/admin/models/admin-partner-bonus-operation-response.schema.js +1 -0
- package/build/billing/endpoints/index.d.ts +2 -0
- package/build/billing/endpoints/index.d.ts.map +1 -0
- package/build/billing/endpoints/index.js +17 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.d.ts +61 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.d.ts.map +1 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.js +26 -0
- package/build/billing/endpoints/queries/index.d.ts +2 -0
- package/build/billing/endpoints/queries/index.d.ts.map +1 -0
- package/build/billing/endpoints/queries/index.js +17 -0
- package/build/billing/enums/index.d.ts +2 -0
- package/build/billing/enums/index.d.ts.map +1 -0
- package/build/billing/enums/index.js +17 -0
- package/build/billing/enums/model-type.enum.d.ts +6 -0
- package/build/billing/enums/model-type.enum.d.ts.map +1 -0
- package/build/billing/enums/model-type.enum.js +9 -0
- package/build/billing/index.d.ts +4 -0
- package/build/billing/index.d.ts.map +1 -0
- package/build/billing/index.js +19 -0
- package/build/billing/models/admin-stats-response.schema.d.ts +37 -0
- package/build/billing/models/admin-stats-response.schema.d.ts.map +1 -0
- package/build/billing/models/admin-stats-response.schema.js +25 -0
- package/build/billing/models/index.d.ts +2 -0
- package/build/billing/models/index.d.ts.map +1 -0
- package/build/billing/models/index.js +17 -0
- package/build/errors/errors.d.ts +5 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +5 -0
- package/build/scripts/generate-openapi.js +4 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +5 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +8 -0
package/errors/errors.ts
CHANGED
|
@@ -561,6 +561,11 @@ export const ERRORS = {
|
|
|
561
561
|
code: 'ADMIN.CANNOT_BAN_ADMIN',
|
|
562
562
|
message: 'Невозможно заблокировать администратора',
|
|
563
563
|
},
|
|
564
|
+
STATS_ERROR: {
|
|
565
|
+
httpCode: 500,
|
|
566
|
+
code: 'ADMIN.STATS_ERROR',
|
|
567
|
+
message: 'Не удалось получить статистику',
|
|
568
|
+
},
|
|
564
569
|
},
|
|
565
570
|
REFERRAL: {
|
|
566
571
|
SELF_REFERRAL: {
|
package/package.json
CHANGED
|
@@ -81,6 +81,11 @@ import {
|
|
|
81
81
|
GetAdminUserTransactionsQueryQuery,
|
|
82
82
|
GetAdminUserTransactionsQueryResponse,
|
|
83
83
|
} from '../admin/endpoints/queries/get-admin-user-transactions.query';
|
|
84
|
+
import {
|
|
85
|
+
GetAdminStatsQuery,
|
|
86
|
+
GetAdminStatsQueryQuery,
|
|
87
|
+
GetAdminStatsQueryResponse,
|
|
88
|
+
} from '../billing/endpoints/queries/get-admin-stats.query';
|
|
84
89
|
import { AUTH_CONTROLLER } from '../auth/endpoints/auth';
|
|
85
90
|
import { AuthChangePasswordSchema, ChangePasswordCommand } from '../auth/endpoints/commands/change-password.command';
|
|
86
91
|
import { AuthDeleteAccountSchema, DeleteAccountCommand } from '../auth/endpoints/commands/delete-account.command';
|
|
@@ -421,6 +426,8 @@ async function main() {
|
|
|
421
426
|
registerSchema('AdminGetUserResponse', GetAdminUserQueryResponse);
|
|
422
427
|
registerSchema('AdminGetUserTransactionsQuery', GetAdminUserTransactionsQueryQuery);
|
|
423
428
|
registerSchema('AdminGetUserTransactionsResponse', GetAdminUserTransactionsQueryResponse);
|
|
429
|
+
registerSchema('AdminGetStatsQuery', GetAdminStatsQueryQuery);
|
|
430
|
+
registerSchema('AdminGetStatsResponse', GetAdminStatsQueryResponse);
|
|
424
431
|
|
|
425
432
|
const authContracts: HttpContract[] = [
|
|
426
433
|
RegisterCommand,
|
|
@@ -485,6 +492,7 @@ async function main() {
|
|
|
485
492
|
GetAdminUsersQuery,
|
|
486
493
|
GetAdminUserQuery,
|
|
487
494
|
GetAdminUserTransactionsQuery,
|
|
495
|
+
GetAdminStatsQuery,
|
|
488
496
|
];
|
|
489
497
|
|
|
490
498
|
for (const contract of authContracts) {
|