@purpleschool/gptbot 0.20.11-stage-2 → 0.20.13-stage-2
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/build/commands/payment/pay.command.d.ts +6 -0
- package/build/commands/payment/pay.command.js +4 -19
- package/build/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.d.ts +4 -0
- package/build/commands/ui-notification/find-ui-notifications.command.d.ts +4 -0
- package/build/models/ui-notification.schema.d.ts +12 -0
- package/build/models/ui-notification.schema.js +6 -1
- package/package.json +2 -2
|
@@ -18,6 +18,8 @@ export declare namespace PayCommand {
|
|
|
18
18
|
InvoiceId: z.ZodOptional<z.ZodString>;
|
|
19
19
|
AccountId: z.ZodString;
|
|
20
20
|
Token: z.ZodDefault<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
|
|
21
|
+
ReasonCode: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
|
|
22
|
+
Reason: z.ZodOptional<z.ZodString>;
|
|
21
23
|
}, z.core.$strip>, z.ZodTransform<{
|
|
22
24
|
transactionId: number;
|
|
23
25
|
amount: number;
|
|
@@ -36,6 +38,8 @@ export declare namespace PayCommand {
|
|
|
36
38
|
invoiceId: string | undefined;
|
|
37
39
|
accountId: string;
|
|
38
40
|
token: string | null;
|
|
41
|
+
reasonCode?: number | undefined;
|
|
42
|
+
reason?: string | undefined;
|
|
39
43
|
}, {
|
|
40
44
|
TransactionId: number;
|
|
41
45
|
Amount: number;
|
|
@@ -54,6 +58,8 @@ export declare namespace PayCommand {
|
|
|
54
58
|
InvoiceId?: string | undefined;
|
|
55
59
|
AccountId: string;
|
|
56
60
|
Token: string | null;
|
|
61
|
+
ReasonCode?: number | undefined;
|
|
62
|
+
Reason?: string | undefined;
|
|
57
63
|
}>>;
|
|
58
64
|
type Request = z.infer<typeof RequestSchema>;
|
|
59
65
|
const ResponseSchema: z.ZodObject<{
|
|
@@ -23,26 +23,11 @@ var PayCommand;
|
|
|
23
23
|
InvoiceId: zod_1.z.string().optional(),
|
|
24
24
|
AccountId: zod_1.z.string(),
|
|
25
25
|
Token: zod_1.z.string().nullable().optional().default(null),
|
|
26
|
+
// Только в уведомлении fail (RUGPT-1111).
|
|
27
|
+
ReasonCode: zod_1.z.coerce.number().int().optional(),
|
|
28
|
+
Reason: zod_1.z.string().optional(),
|
|
26
29
|
})
|
|
27
|
-
.transform((data) => ({
|
|
28
|
-
transactionId: data.TransactionId,
|
|
29
|
-
amount: data.Amount,
|
|
30
|
-
currency: data.Currency,
|
|
31
|
-
status: data.Status,
|
|
32
|
-
paymentAmount: data.PaymentAmount,
|
|
33
|
-
paymentCurrency: data.PaymentCurrency,
|
|
34
|
-
dateTime: data.DateTime,
|
|
35
|
-
cardFirstSix: data.CardFirstSix,
|
|
36
|
-
cardLastFour: data.CardLastFour,
|
|
37
|
-
subscriptionId: data.SubscriptionId,
|
|
38
|
-
cardType: data.CardType,
|
|
39
|
-
cardExpDate: data.CardExpDate,
|
|
40
|
-
testMode: data.TestMode,
|
|
41
|
-
operationType: data.OperationType,
|
|
42
|
-
invoiceId: data.InvoiceId,
|
|
43
|
-
accountId: data.AccountId,
|
|
44
|
-
token: data.Token,
|
|
45
|
-
}));
|
|
30
|
+
.transform((data) => (Object.assign(Object.assign({ transactionId: data.TransactionId, amount: data.Amount, currency: data.Currency, status: data.Status, paymentAmount: data.PaymentAmount, paymentCurrency: data.PaymentCurrency, dateTime: data.DateTime, cardFirstSix: data.CardFirstSix, cardLastFour: data.CardLastFour, subscriptionId: data.SubscriptionId, cardType: data.CardType, cardExpDate: data.CardExpDate, testMode: data.TestMode, operationType: data.OperationType, invoiceId: data.InvoiceId, accountId: data.AccountId, token: data.Token }, (data.ReasonCode !== undefined && { reasonCode: data.ReasonCode })), (data.Reason !== undefined && { reason: data.Reason }))));
|
|
46
31
|
PayCommand.ResponseSchema = zod_1.z.object({
|
|
47
32
|
code: zod_1.z.number(),
|
|
48
33
|
});
|
package/build/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.d.ts
CHANGED
|
@@ -96,6 +96,10 @@ export declare namespace FindActiveUiNotificationsByPageAndUserCommand {
|
|
|
96
96
|
serverTime: z.ZodOptional<z.ZodDate>;
|
|
97
97
|
type: z.ZodLiteral<import("../..").UI_NOTIFICATION_TYPE.GENERIC>;
|
|
98
98
|
dynamicUiContent: z.ZodObject<{
|
|
99
|
+
renewalReminder: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
renewalDate: z.ZodISODateTime;
|
|
101
|
+
price: z.ZodNumber;
|
|
102
|
+
}, z.core.$strip>>;
|
|
99
103
|
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
100
104
|
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
101
105
|
}, z.core.$strip>;
|
|
@@ -97,6 +97,10 @@ export declare namespace FindUiNotificationsCommand {
|
|
|
97
97
|
serverTime: z.ZodOptional<z.ZodDate>;
|
|
98
98
|
type: z.ZodLiteral<import("../..").UI_NOTIFICATION_TYPE.GENERIC>;
|
|
99
99
|
dynamicUiContent: z.ZodObject<{
|
|
100
|
+
renewalReminder: z.ZodOptional<z.ZodObject<{
|
|
101
|
+
renewalDate: z.ZodISODateTime;
|
|
102
|
+
price: z.ZodNumber;
|
|
103
|
+
}, z.core.$strip>>;
|
|
100
104
|
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
101
105
|
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
102
106
|
}, z.core.$strip>;
|
|
@@ -38,7 +38,15 @@ export declare const PromocodeOfferUiContentSchema: z.ZodObject<{
|
|
|
38
38
|
validTill: z.ZodNullable<z.ZodISODateTime>;
|
|
39
39
|
}, z.core.$strip>;
|
|
40
40
|
export type PromocodeOfferUiContent = z.infer<typeof PromocodeOfferUiContentSchema>;
|
|
41
|
+
export declare const SubscriptionRenewalReminderUiContentSchema: z.ZodObject<{
|
|
42
|
+
renewalDate: z.ZodISODateTime;
|
|
43
|
+
price: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>;
|
|
41
45
|
export declare const GenericUiContentSchema: z.ZodObject<{
|
|
46
|
+
renewalReminder: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
renewalDate: z.ZodISODateTime;
|
|
48
|
+
price: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>>;
|
|
42
50
|
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
43
51
|
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
44
52
|
}, z.core.$strip>;
|
|
@@ -155,6 +163,10 @@ export declare const UiNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
155
163
|
serverTime: z.ZodOptional<z.ZodDate>;
|
|
156
164
|
type: z.ZodLiteral<UI_NOTIFICATION_TYPE.GENERIC>;
|
|
157
165
|
dynamicUiContent: z.ZodObject<{
|
|
166
|
+
renewalReminder: z.ZodOptional<z.ZodObject<{
|
|
167
|
+
renewalDate: z.ZodISODateTime;
|
|
168
|
+
price: z.ZodNumber;
|
|
169
|
+
}, z.core.$strip>>;
|
|
158
170
|
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
159
171
|
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
160
172
|
}, z.core.$strip>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UiNotificationSchema = exports.LoyaltyLevelUpUiContentSchema = exports.BlogUpdateUiContentSchema = exports.EmailNotVerifiedUiContentSchema = exports.GenericUiContentSchema = exports.PromocodeOfferUiContentSchema = exports.FraudDetectedUiContentSchema = exports.SubscriptionPastDueUiContentSchema = exports.ConnectTelegramBonusUiContentSchema = exports.LocalizedUiNotificationTextSchema = exports.UiNotificationBaseSchema = void 0;
|
|
3
|
+
exports.UiNotificationSchema = exports.LoyaltyLevelUpUiContentSchema = exports.BlogUpdateUiContentSchema = exports.EmailNotVerifiedUiContentSchema = exports.GenericUiContentSchema = exports.SubscriptionRenewalReminderUiContentSchema = exports.PromocodeOfferUiContentSchema = exports.FraudDetectedUiContentSchema = exports.SubscriptionPastDueUiContentSchema = exports.ConnectTelegramBonusUiContentSchema = exports.LocalizedUiNotificationTextSchema = exports.UiNotificationBaseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const localized_text_schema_1 = require("../helpers/localized-text.schema");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
@@ -36,7 +36,12 @@ exports.PromocodeOfferUiContentSchema = zod_1.z.object({
|
|
|
36
36
|
bonusPercent: zod_1.z.number(),
|
|
37
37
|
validTill: zod_1.z.iso.datetime().nullable(),
|
|
38
38
|
});
|
|
39
|
+
exports.SubscriptionRenewalReminderUiContentSchema = zod_1.z.object({
|
|
40
|
+
renewalDate: zod_1.z.iso.datetime(),
|
|
41
|
+
price: zod_1.z.number().finite().nonnegative(),
|
|
42
|
+
});
|
|
39
43
|
exports.GenericUiContentSchema = zod_1.z.object({
|
|
44
|
+
renewalReminder: exports.SubscriptionRenewalReminderUiContentSchema.optional(),
|
|
40
45
|
title: exports.LocalizedUiNotificationTextSchema,
|
|
41
46
|
message: exports.LocalizedUiNotificationTextSchema,
|
|
42
47
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@purpleschool/gptbot",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.13-stage-2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@purpleschool/gptbot-tools": "0.4.
|
|
18
|
+
"@purpleschool/gptbot-tools": "0.4.35-stage-2",
|
|
19
19
|
"@purpleschool/rugpt-lib-common": "0.0.116",
|
|
20
20
|
"zod": "4.6.5"
|
|
21
21
|
}
|