@purpleschool/gptbot 0.20.2-stage-2 → 0.20.3-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/ui-notification/find-active-ui-notifications-by-page-and-user.command.d.ts +17 -0
- package/build/commands/ui-notification/find-ui-notifications.command.d.ts +17 -0
- package/build/constants/ui-notification/enums/ui-notification-type.enum.d.ts +2 -1
- package/build/constants/ui-notification/enums/ui-notification-type.enum.js +1 -0
- package/build/models/ui-notification.schema.d.ts +25 -1
- package/build/models/ui-notification.schema.js +11 -1
- package/package.json +1 -1
package/build/commands/ui-notification/find-active-ui-notifications-by-page-and-user.command.d.ts
CHANGED
|
@@ -118,6 +118,23 @@ export declare namespace FindActiveUiNotificationsByPageAndUserCommand {
|
|
|
118
118
|
url: z.ZodString;
|
|
119
119
|
}, z.core.$strip>;
|
|
120
120
|
}, z.core.$strip>;
|
|
121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
122
|
+
uuid: z.ZodUUID;
|
|
123
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
124
|
+
priority: z.ZodNumber;
|
|
125
|
+
isRead: z.ZodBoolean;
|
|
126
|
+
readAt: z.ZodNullable<z.ZodDate>;
|
|
127
|
+
status: z.ZodEnum<typeof import("../..").UI_NOTIFICATION_STATUS>;
|
|
128
|
+
conditionOfExecution: z.ZodEnum<typeof import("../..").UI_NOTIFICATION_CONDITION_OF_EXECUTION>;
|
|
129
|
+
endDate: z.ZodNullable<z.ZodDate>;
|
|
130
|
+
serverTime: z.ZodOptional<z.ZodDate>;
|
|
131
|
+
type: z.ZodLiteral<import("../..").UI_NOTIFICATION_TYPE.LOYALTY_LEVEL_UP>;
|
|
132
|
+
dynamicUiContent: z.ZodObject<{
|
|
133
|
+
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
134
|
+
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
135
|
+
level: z.ZodEnum<typeof import("../..").LOYALTY_LEVEL>;
|
|
136
|
+
bonusPercent: z.ZodNumber;
|
|
137
|
+
}, z.core.$strip>;
|
|
121
138
|
}, z.core.$strip>], "type">>;
|
|
122
139
|
}, z.core.$strip>;
|
|
123
140
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -119,6 +119,23 @@ export declare namespace FindUiNotificationsCommand {
|
|
|
119
119
|
url: z.ZodString;
|
|
120
120
|
}, z.core.$strip>;
|
|
121
121
|
}, z.core.$strip>;
|
|
122
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
123
|
+
uuid: z.ZodUUID;
|
|
124
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
125
|
+
priority: z.ZodNumber;
|
|
126
|
+
isRead: z.ZodBoolean;
|
|
127
|
+
readAt: z.ZodNullable<z.ZodDate>;
|
|
128
|
+
status: z.ZodEnum<typeof import("../..").UI_NOTIFICATION_STATUS>;
|
|
129
|
+
conditionOfExecution: z.ZodEnum<typeof import("../..").UI_NOTIFICATION_CONDITION_OF_EXECUTION>;
|
|
130
|
+
endDate: z.ZodNullable<z.ZodDate>;
|
|
131
|
+
serverTime: z.ZodOptional<z.ZodDate>;
|
|
132
|
+
type: z.ZodLiteral<import("../..").UI_NOTIFICATION_TYPE.LOYALTY_LEVEL_UP>;
|
|
133
|
+
dynamicUiContent: z.ZodObject<{
|
|
134
|
+
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
135
|
+
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
136
|
+
level: z.ZodEnum<typeof import("../..").LOYALTY_LEVEL>;
|
|
137
|
+
bonusPercent: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>;
|
|
122
139
|
}, z.core.$strip>], "type">>;
|
|
123
140
|
}, z.core.$strip>;
|
|
124
141
|
type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -10,4 +10,5 @@ var UI_NOTIFICATION_TYPE;
|
|
|
10
10
|
UI_NOTIFICATION_TYPE["EMAIL_NOT_VERIFIED"] = "EMAIL_NOT_VERIFIED";
|
|
11
11
|
UI_NOTIFICATION_TYPE["GENERIC"] = "GENERIC";
|
|
12
12
|
UI_NOTIFICATION_TYPE["BLOG_UPDATE"] = "BLOG_UPDATE";
|
|
13
|
+
UI_NOTIFICATION_TYPE["LOYALTY_LEVEL_UP"] = "LOYALTY_LEVEL_UP";
|
|
13
14
|
})(UI_NOTIFICATION_TYPE || (exports.UI_NOTIFICATION_TYPE = UI_NOTIFICATION_TYPE = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { UI_NOTIFICATION_CONDITION_OF_EXECUTION, UI_NOTIFICATION_STATUS, UI_NOTIFICATION_TYPE } from '../constants';
|
|
2
|
+
import { LOYALTY_LEVEL, UI_NOTIFICATION_CONDITION_OF_EXECUTION, UI_NOTIFICATION_STATUS, UI_NOTIFICATION_TYPE } from '../constants';
|
|
3
3
|
export declare const UiNotificationBaseSchema: z.ZodObject<{
|
|
4
4
|
uuid: z.ZodUUID;
|
|
5
5
|
userId: z.ZodNullable<z.ZodString>;
|
|
@@ -57,6 +57,13 @@ export declare const BlogUpdateUiContentSchema: z.ZodObject<{
|
|
|
57
57
|
}, z.core.$strip>;
|
|
58
58
|
}, z.core.$strip>;
|
|
59
59
|
export type BlogUpdateUiContent = z.infer<typeof BlogUpdateUiContentSchema>;
|
|
60
|
+
export declare const LoyaltyLevelUpUiContentSchema: z.ZodObject<{
|
|
61
|
+
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
62
|
+
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
63
|
+
level: z.ZodEnum<typeof LOYALTY_LEVEL>;
|
|
64
|
+
bonusPercent: z.ZodNumber;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
export type LoyaltyLevelUpUiContent = z.infer<typeof LoyaltyLevelUpUiContentSchema>;
|
|
60
67
|
export declare const UiNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
61
68
|
uuid: z.ZodUUID;
|
|
62
69
|
userId: z.ZodNullable<z.ZodString>;
|
|
@@ -170,5 +177,22 @@ export declare const UiNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
|
|
|
170
177
|
url: z.ZodString;
|
|
171
178
|
}, z.core.$strip>;
|
|
172
179
|
}, z.core.$strip>;
|
|
180
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
181
|
+
uuid: z.ZodUUID;
|
|
182
|
+
userId: z.ZodNullable<z.ZodString>;
|
|
183
|
+
priority: z.ZodNumber;
|
|
184
|
+
isRead: z.ZodBoolean;
|
|
185
|
+
readAt: z.ZodNullable<z.ZodDate>;
|
|
186
|
+
status: z.ZodEnum<typeof UI_NOTIFICATION_STATUS>;
|
|
187
|
+
conditionOfExecution: z.ZodEnum<typeof UI_NOTIFICATION_CONDITION_OF_EXECUTION>;
|
|
188
|
+
endDate: z.ZodNullable<z.ZodDate>;
|
|
189
|
+
serverTime: z.ZodOptional<z.ZodDate>;
|
|
190
|
+
type: z.ZodLiteral<UI_NOTIFICATION_TYPE.LOYALTY_LEVEL_UP>;
|
|
191
|
+
dynamicUiContent: z.ZodObject<{
|
|
192
|
+
title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
193
|
+
message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
|
|
194
|
+
level: z.ZodEnum<typeof LOYALTY_LEVEL>;
|
|
195
|
+
bonusPercent: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>;
|
|
173
197
|
}, z.core.$strip>], "type">;
|
|
174
198
|
export type UiNotification = z.infer<typeof UiNotificationSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UiNotificationSchema = 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.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");
|
|
@@ -52,6 +52,12 @@ exports.BlogUpdateUiContentSchema = zod_1.z.object({
|
|
|
52
52
|
url: zod_1.z.string(),
|
|
53
53
|
}),
|
|
54
54
|
});
|
|
55
|
+
exports.LoyaltyLevelUpUiContentSchema = zod_1.z.object({
|
|
56
|
+
title: exports.LocalizedUiNotificationTextSchema,
|
|
57
|
+
message: exports.LocalizedUiNotificationTextSchema,
|
|
58
|
+
level: zod_1.z.enum(constants_1.LOYALTY_LEVEL),
|
|
59
|
+
bonusPercent: zod_1.z.number(),
|
|
60
|
+
});
|
|
55
61
|
exports.UiNotificationSchema = zod_1.z.discriminatedUnion('type', [
|
|
56
62
|
exports.UiNotificationBaseSchema.extend({
|
|
57
63
|
type: zod_1.z.literal(constants_1.UI_NOTIFICATION_TYPE.CONNECT_TELEGRAM_BONUS),
|
|
@@ -81,4 +87,8 @@ exports.UiNotificationSchema = zod_1.z.discriminatedUnion('type', [
|
|
|
81
87
|
type: zod_1.z.literal(constants_1.UI_NOTIFICATION_TYPE.BLOG_UPDATE),
|
|
82
88
|
dynamicUiContent: exports.BlogUpdateUiContentSchema,
|
|
83
89
|
}),
|
|
90
|
+
exports.UiNotificationBaseSchema.extend({
|
|
91
|
+
type: zod_1.z.literal(constants_1.UI_NOTIFICATION_TYPE.LOYALTY_LEVEL_UP),
|
|
92
|
+
dynamicUiContent: exports.LoyaltyLevelUpUiContentSchema,
|
|
93
|
+
}),
|
|
84
94
|
]);
|