@ai-grator/api 0.0.2 → 0.0.3
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 +1 -0
- package/admin/endpoints/commands/ban-admin-user.command.ts +30 -0
- package/admin/endpoints/commands/index.ts +1 -0
- package/admin/models/admin-bonus-operation-response.schema.ts +2 -2
- package/admin/models/admin-partner-bonus-operation-response.schema.ts +1 -1
- package/admin/models/admin-partner-l2-bonus-response.schema.ts +1 -1
- package/admin/models/admin-partner-referral-response.schema.ts +1 -1
- package/admin/models/admin-user-response.schema.ts +10 -0
- package/admin/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 +1 -0
- package/build/admin/endpoints/commands/ban-admin-user.command.d.ts +35 -0
- package/build/admin/endpoints/commands/ban-admin-user.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/ban-admin-user.command.js +27 -0
- package/build/admin/endpoints/commands/create-admin-partner-bonus-operation.command.d.ts +4 -4
- package/build/admin/endpoints/commands/index.d.ts +1 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +1 -0
- package/build/admin/endpoints/queries/get-admin-partner-bonus-operations.query.d.ts +2 -2
- package/build/admin/endpoints/queries/get-admin-partner-l2-bonuses.query.d.ts +2 -2
- package/build/admin/endpoints/queries/get-admin-partner-referrals.query.d.ts +2 -2
- package/build/admin/models/admin-bonus-operation-response.schema.d.ts +2 -2
- package/build/admin/models/admin-bonus-operation-response.schema.js +2 -2
- package/build/admin/models/admin-partner-bonus-operation-response.schema.d.ts +1 -1
- package/build/admin/models/admin-partner-bonus-operation-response.schema.js +1 -1
- package/build/admin/models/admin-partner-l2-bonus-response.schema.d.ts +1 -1
- package/build/admin/models/admin-partner-l2-bonus-response.schema.js +1 -1
- package/build/admin/models/admin-partner-referral-response.schema.d.ts +1 -1
- package/build/admin/models/admin-partner-referral-response.schema.js +1 -1
- package/build/admin/models/admin-user-response.schema.d.ts +9 -0
- package/build/admin/models/admin-user-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-user-response.schema.js +10 -0
- package/build/admin/models/index.d.ts +1 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +1 -0
- package/build/errors/errors.d.ts +10 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +10 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/payment/endpoints/commands/create-payment.command.d.ts +6 -6
- package/build/payment/models/payment-response.schema.d.ts +3 -3
- package/build/payment/models/payment-response.schema.js +3 -3
- package/build/referral/models/bonus-history-response.schema.d.ts +2 -2
- package/build/referral/models/bonus-history-response.schema.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/users/endpoints/queries/get-profile.query.d.ts +1 -1
- package/build/users/endpoints/queries/get-profile.query.js +1 -1
- package/build/users/enums/user-status.enum.d.ts +2 -1
- package/build/users/enums/user-status.enum.d.ts.map +1 -1
- package/build/users/enums/user-status.enum.js +1 -0
- package/build/wallet/endpoints/queries/get-wallet-transactions.query.d.ts +2 -2
- package/build/wallet/models/wallet-transaction-response.schema.d.ts +1 -1
- package/build/wallet/models/wallet-transaction-response.schema.js +1 -1
- package/errors/errors.ts +10 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/payment/models/payment-response.schema.ts +3 -3
- package/referral/models/bonus-history-response.schema.ts +1 -1
- package/users/endpoints/queries/get-profile.query.ts +1 -1
- package/users/enums/user-status.enum.ts +1 -0
- package/wallet/models/wallet-transaction-response.schema.ts +1 -1
|
@@ -6,7 +6,7 @@ export declare const GetProfileQueryResponse: z.ZodObject<{
|
|
|
6
6
|
email: z.ZodEmail;
|
|
7
7
|
role: z.ZodEnum<typeof USER_ROLE>;
|
|
8
8
|
status: z.ZodEnum<typeof USER_STATUS>;
|
|
9
|
-
createdAt: z.
|
|
9
|
+
createdAt: z.ZodISODateTime;
|
|
10
10
|
refLink: z.ZodString;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type GetProfileQueryResponseType = z.infer<typeof GetProfileQueryResponse>;
|
|
@@ -9,6 +9,6 @@ exports.GetProfileQueryResponse = zod_1.z.object({
|
|
|
9
9
|
email: zod_1.z.email(),
|
|
10
10
|
role: zod_1.z.enum(user_roles_enum_1.USER_ROLE),
|
|
11
11
|
status: zod_1.z.enum(user_status_enum_1.USER_STATUS),
|
|
12
|
-
createdAt: zod_1.z.
|
|
12
|
+
createdAt: zod_1.z.iso.datetime(),
|
|
13
13
|
refLink: zod_1.z.string(),
|
|
14
14
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-status.enum.d.ts","sourceRoot":"","sources":["../../../users/enums/user-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACnB,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"user-status.enum.d.ts","sourceRoot":"","sources":["../../../users/enums/user-status.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW;IACnB,GAAG,QAAQ;IACX,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;CACpB"}
|
|
@@ -15,7 +15,7 @@ export declare const GetWalletTransactionsQueryResponse: z.ZodObject<{
|
|
|
15
15
|
cashAmount: z.ZodNumber;
|
|
16
16
|
bonusAmount: z.ZodNumber;
|
|
17
17
|
sourceModel: z.ZodNullable<z.ZodString>;
|
|
18
|
-
createdAt: z.
|
|
18
|
+
createdAt: z.ZodISODateTime;
|
|
19
19
|
}, z.core.$strip>>;
|
|
20
20
|
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
21
21
|
hasMore: z.ZodBoolean;
|
|
@@ -41,7 +41,7 @@ export declare const GetWalletTransactionsQuery: {
|
|
|
41
41
|
cashAmount: z.ZodNumber;
|
|
42
42
|
bonusAmount: z.ZodNumber;
|
|
43
43
|
sourceModel: z.ZodNullable<z.ZodString>;
|
|
44
|
-
createdAt: z.
|
|
44
|
+
createdAt: z.ZodISODateTime;
|
|
45
45
|
}, z.core.$strip>>;
|
|
46
46
|
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
47
47
|
hasMore: z.ZodBoolean;
|
|
@@ -7,7 +7,7 @@ export declare const WalletTransactionResponseSchema: z.ZodObject<{
|
|
|
7
7
|
cashAmount: z.ZodNumber;
|
|
8
8
|
bonusAmount: z.ZodNumber;
|
|
9
9
|
sourceModel: z.ZodNullable<z.ZodString>;
|
|
10
|
-
createdAt: z.
|
|
10
|
+
createdAt: z.ZodISODateTime;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export type WalletTransactionResponseSchemaType = z.infer<typeof WalletTransactionResponseSchema>;
|
|
13
13
|
//# sourceMappingURL=wallet-transaction-response.schema.d.ts.map
|
package/errors/errors.ts
CHANGED
|
@@ -440,6 +440,11 @@ export const ERRORS = {
|
|
|
440
440
|
code: 'USER.DELETE_ERROR',
|
|
441
441
|
message: 'Не удалось удалить пользователя',
|
|
442
442
|
},
|
|
443
|
+
BAN_ERROR: {
|
|
444
|
+
httpCode: 500,
|
|
445
|
+
code: 'USER.BAN_ERROR',
|
|
446
|
+
message: 'Не удалось заблокировать пользователя',
|
|
447
|
+
},
|
|
443
448
|
FIND_ERROR: {
|
|
444
449
|
httpCode: 500,
|
|
445
450
|
code: 'USER.FIND_ERROR',
|
|
@@ -551,6 +556,11 @@ export const ERRORS = {
|
|
|
551
556
|
code: 'ADMIN.BONUS_OPERATION_ERROR',
|
|
552
557
|
message: 'Не удалось создать операцию административного бонуса',
|
|
553
558
|
},
|
|
559
|
+
CANNOT_BAN_ADMIN: {
|
|
560
|
+
httpCode: 400,
|
|
561
|
+
code: 'ADMIN.CANNOT_BAN_ADMIN',
|
|
562
|
+
message: 'Невозможно заблокировать администратора',
|
|
563
|
+
},
|
|
554
564
|
},
|
|
555
565
|
REFERRAL: {
|
|
556
566
|
SELF_REFERRAL: {
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -45,9 +45,9 @@ export const PaymentResponseSchema = z.object({
|
|
|
45
45
|
amount: z.number().positive(),
|
|
46
46
|
status: z.enum(PAYMENT_STATUS),
|
|
47
47
|
confirmation: ConfirmationSchema.nullable(),
|
|
48
|
-
paidAt: z.
|
|
49
|
-
createdAt: z.
|
|
50
|
-
updatedAt: z.
|
|
48
|
+
paidAt: z.iso.datetime().nullable(),
|
|
49
|
+
createdAt: z.iso.datetime(),
|
|
50
|
+
updatedAt: z.iso.datetime(),
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
export type PaymentResponseSchemaType = z.infer<typeof PaymentResponseSchema>;
|
|
@@ -21,7 +21,7 @@ export const BonusHistorySourceSchema = z.discriminatedUnion('type', [
|
|
|
21
21
|
export type BonusHistorySourceSchemaType = z.infer<typeof BonusHistorySourceSchema>;
|
|
22
22
|
|
|
23
23
|
export const BonusHistoryItemSchema = z.object({
|
|
24
|
-
date: z.
|
|
24
|
+
date: z.iso.datetime(),
|
|
25
25
|
direction: z.enum(['earned', 'spent']),
|
|
26
26
|
source: BonusHistorySourceSchema,
|
|
27
27
|
bonusAmount: z.number().nonnegative(),
|
|
@@ -8,7 +8,7 @@ export const WalletTransactionResponseSchema = z.object({
|
|
|
8
8
|
cashAmount: z.number(),
|
|
9
9
|
bonusAmount: z.number(),
|
|
10
10
|
sourceModel: z.string().nullable(),
|
|
11
|
-
createdAt: z.
|
|
11
|
+
createdAt: z.iso.datetime(),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
export type WalletTransactionResponseSchemaType = z.infer<typeof WalletTransactionResponseSchema>;
|