@purpleschool/gptbot 0.20.17-stage-2 → 0.20.19-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.
@@ -5,6 +5,8 @@ export declare const AUTH_ROUTES: {
5
5
  readonly LOGIN: 'login';
6
6
  readonly VK_LOGIN: 'vk/login';
7
7
  readonly YANDEX_LOGIN: 'yandex/login';
8
+ readonly VK_LINK: 'vk/link';
9
+ readonly YANDEX_LINK: 'yandex/link';
8
10
  readonly CREATE_USER: 'create-user';
9
11
  readonly RESTORE_PASSWORD: 'restore-password';
10
12
  readonly RESET_PASSWORD: 'reset-password';
@@ -8,6 +8,8 @@ exports.AUTH_ROUTES = {
8
8
  LOGIN: 'login',
9
9
  VK_LOGIN: 'vk/login',
10
10
  YANDEX_LOGIN: 'yandex/login',
11
+ VK_LINK: 'vk/link',
12
+ YANDEX_LINK: 'yandex/link',
11
13
  CREATE_USER: 'create-user',
12
14
  RESTORE_PASSWORD: 'restore-password',
13
15
  RESET_PASSWORD: 'reset-password',
@@ -1,6 +1,8 @@
1
1
  export declare const USER_CONTROLLER: 'users';
2
2
  export declare const USER_ROUTES: {
3
3
  readonly GET: 'me';
4
+ readonly ATTACH_EMAIL: 'me/attach-email';
5
+ readonly CONFIRM_ATTACH_EMAIL: 'attach-email/confirm';
4
6
  readonly GET_CLIENT_COUNTRY_CODE: 'country-code';
5
7
  readonly PATCH_LOCALE: 'me/locale';
6
8
  readonly PATCH_DIGITAL_PROCESSING_CONSENT: 'me/digital-processing-consent';
@@ -4,6 +4,8 @@ exports.USER_ROUTES = exports.USER_CONTROLLER = void 0;
4
4
  exports.USER_CONTROLLER = 'users';
5
5
  exports.USER_ROUTES = {
6
6
  GET: 'me',
7
+ ATTACH_EMAIL: 'me/attach-email',
8
+ CONFIRM_ATTACH_EMAIL: 'attach-email/confirm',
7
9
  GET_CLIENT_COUNTRY_CODE: 'country-code',
8
10
  PATCH_LOCALE: 'me/locale',
9
11
  PATCH_DIGITAL_PROCESSING_CONSENT: 'me/digital-processing-consent',
@@ -37,6 +37,8 @@ export declare const REST_API: {
37
37
  readonly ADMIN_LOGIN: "/api/auth/admin/login";
38
38
  readonly VK_LOGIN: "/api/auth/vk/login";
39
39
  readonly YANDEX_LOGIN: "/api/auth/yandex/login";
40
+ readonly VK_LINK: "/api/auth/vk/link";
41
+ readonly YANDEX_LINK: "/api/auth/yandex/link";
40
42
  readonly CREATE_USER: "/api/auth/create-user";
41
43
  readonly RESTORE_PASSWORD: "/api/auth/restore-password";
42
44
  readonly RESET_PASSWORD: "/api/auth/reset-password";
@@ -46,6 +48,8 @@ export declare const REST_API: {
46
48
  };
47
49
  readonly USERS: {
48
50
  readonly GET: "/api/users/me";
51
+ readonly ATTACH_EMAIL: "/api/users/me/attach-email";
52
+ readonly CONFIRM_ATTACH_EMAIL: "/api/users/attach-email/confirm";
49
53
  readonly GET_CLIENT_COUNTRY_CODE: "/api/users/country-code";
50
54
  readonly PATCH_LOCALE: "/api/users/me/locale";
51
55
  readonly POST: "/api/users/up-balance";
@@ -76,6 +76,8 @@ exports.REST_API = {
76
76
  ADMIN_LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.ADMIN_LOGIN}`,
77
77
  VK_LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VK_LOGIN}`,
78
78
  YANDEX_LOGIN: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.YANDEX_LOGIN}`,
79
+ VK_LINK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.VK_LINK}`,
80
+ YANDEX_LINK: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.YANDEX_LINK}`,
79
81
  CREATE_USER: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.CREATE_USER}`,
80
82
  RESTORE_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESTORE_PASSWORD}`,
81
83
  RESET_PASSWORD: `${exports.ROOT}/${CONTROLLERS.AUTH_CONTROLLER}/${CONTROLLERS.AUTH_ROUTES.RESET_PASSWORD}`,
@@ -85,6 +87,8 @@ exports.REST_API = {
85
87
  },
86
88
  USERS: {
87
89
  GET: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET}`,
90
+ ATTACH_EMAIL: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.ATTACH_EMAIL}`,
91
+ CONFIRM_ATTACH_EMAIL: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.CONFIRM_ATTACH_EMAIL}`,
88
92
  GET_CLIENT_COUNTRY_CODE: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.GET_CLIENT_COUNTRY_CODE}`,
89
93
  PATCH_LOCALE: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.PATCH_LOCALE}`,
90
94
  POST: `${exports.ROOT}/${CONTROLLERS.USER_CONTROLLER}/${CONTROLLERS.USER_ROUTES.POST}`,
@@ -1,4 +1,5 @@
1
1
  export * from './create-user.command';
2
+ export * from './link-oauth.command';
2
3
  export * from './login.command';
3
4
  export * from './register-user.command';
4
5
  export * from './reset-password.command';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-user.command"), exports);
18
+ __exportStar(require("./link-oauth.command"), exports);
18
19
  __exportStar(require("./login.command"), exports);
19
20
  __exportStar(require("./register-user.command"), exports);
20
21
  __exportStar(require("./reset-password.command"), exports);
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ export declare namespace LinkVKCommand {
3
+ const RequestSchema: z.ZodObject<{
4
+ code: z.ZodString;
5
+ code_verifier: z.ZodString;
6
+ device_id: z.ZodString;
7
+ state: z.ZodString;
8
+ }, z.core.$strip>;
9
+ type Request = z.infer<typeof RequestSchema>;
10
+ const ResponseSchema: z.ZodObject<{
11
+ data: z.ZodObject<{
12
+ linked: z.ZodLiteral<true>;
13
+ }, z.core.$strip>;
14
+ }, z.core.$strip>;
15
+ type Response = z.infer<typeof ResponseSchema>;
16
+ }
17
+ export declare namespace LinkYandexCommand {
18
+ const RequestSchema: z.ZodObject<{
19
+ code: z.ZodString;
20
+ code_verifier: z.ZodString;
21
+ }, z.core.$strip>;
22
+ type Request = z.infer<typeof RequestSchema>;
23
+ const ResponseSchema: z.ZodObject<{
24
+ data: z.ZodObject<{
25
+ linked: z.ZodLiteral<true>;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ type Response = z.infer<typeof ResponseSchema>;
29
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinkYandexCommand = exports.LinkVKCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var LinkVKCommand;
6
+ (function (LinkVKCommand) {
7
+ LinkVKCommand.RequestSchema = zod_1.z.object({
8
+ code: zod_1.z.string().min(1),
9
+ code_verifier: zod_1.z.string().min(1),
10
+ device_id: zod_1.z.string().min(1),
11
+ state: zod_1.z.string().min(1),
12
+ });
13
+ LinkVKCommand.ResponseSchema = zod_1.z.object({ data: zod_1.z.object({ linked: zod_1.z.literal(true) }) });
14
+ })(LinkVKCommand || (exports.LinkVKCommand = LinkVKCommand = {}));
15
+ var LinkYandexCommand;
16
+ (function (LinkYandexCommand) {
17
+ LinkYandexCommand.RequestSchema = LinkVKCommand.RequestSchema.pick({
18
+ code: true,
19
+ code_verifier: true,
20
+ });
21
+ LinkYandexCommand.ResponseSchema = LinkVKCommand.ResponseSchema;
22
+ })(LinkYandexCommand || (exports.LinkYandexCommand = LinkYandexCommand = {}));
@@ -40,7 +40,7 @@ export declare namespace CreatePhotoSessionV2StyleCommand {
40
40
  participants: z.ZodArray<z.ZodObject<{
41
41
  participantId: z.ZodUUID;
42
42
  order: z.ZodNumber;
43
- displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
43
+ displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
44
44
  gender: z.ZodEnum<{
45
45
  female: "female";
46
46
  male: "male";
@@ -56,7 +56,7 @@ export declare namespace CreatePhotoSessionV2StyleCommand {
56
56
  shots: z.ZodArray<z.ZodObject<{
57
57
  shotId: z.ZodUUID;
58
58
  order: z.ZodNumber;
59
- title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
59
+ title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
60
60
  preview: z.ZodObject<{
61
61
  assetId: z.ZodUUID;
62
62
  url: z.ZodURL;
@@ -151,7 +151,7 @@ export declare namespace CreatePhotoSessionV2StyleCommand {
151
151
  participants: z.ZodArray<z.ZodObject<{
152
152
  participantId: z.ZodUUID;
153
153
  order: z.ZodNumber;
154
- displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
154
+ displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
155
155
  gender: z.ZodEnum<{
156
156
  female: "female";
157
157
  male: "male";
@@ -167,7 +167,7 @@ export declare namespace CreatePhotoSessionV2StyleCommand {
167
167
  shots: z.ZodArray<z.ZodObject<{
168
168
  shotId: z.ZodUUID;
169
169
  order: z.ZodNumber;
170
- title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
170
+ title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
171
171
  preview: z.ZodObject<{
172
172
  assetId: z.ZodUUID;
173
173
  url: z.ZodURL;
@@ -66,7 +66,7 @@ export declare namespace ListPhotoSessionV2StylesCommand {
66
66
  participants: z.ZodArray<z.ZodObject<{
67
67
  participantId: z.ZodUUID;
68
68
  order: z.ZodNumber;
69
- displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
69
+ displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
70
70
  gender: z.ZodEnum<{
71
71
  female: "female";
72
72
  male: "male";
@@ -82,7 +82,7 @@ export declare namespace ListPhotoSessionV2StylesCommand {
82
82
  shots: z.ZodArray<z.ZodObject<{
83
83
  shotId: z.ZodUUID;
84
84
  order: z.ZodNumber;
85
- title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
85
+ title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
86
86
  preview: z.ZodObject<{
87
87
  assetId: z.ZodUUID;
88
88
  url: z.ZodURL;
@@ -39,7 +39,7 @@ export declare namespace UpdatePhotoSessionV2StyleCommand {
39
39
  participants: z.ZodArray<z.ZodObject<{
40
40
  participantId: z.ZodUUID;
41
41
  order: z.ZodNumber;
42
- displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
42
+ displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
43
43
  gender: z.ZodEnum<{
44
44
  female: "female";
45
45
  male: "male";
@@ -55,7 +55,7 @@ export declare namespace UpdatePhotoSessionV2StyleCommand {
55
55
  shots: z.ZodArray<z.ZodObject<{
56
56
  shotId: z.ZodUUID;
57
57
  order: z.ZodNumber;
58
- title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
58
+ title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
59
59
  preview: z.ZodObject<{
60
60
  assetId: z.ZodUUID;
61
61
  url: z.ZodURL;
@@ -150,7 +150,7 @@ export declare namespace UpdatePhotoSessionV2StyleCommand {
150
150
  participants: z.ZodArray<z.ZodObject<{
151
151
  participantId: z.ZodUUID;
152
152
  order: z.ZodNumber;
153
- displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
153
+ displayName: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
154
154
  gender: z.ZodEnum<{
155
155
  female: "female";
156
156
  male: "male";
@@ -166,7 +166,7 @@ export declare namespace UpdatePhotoSessionV2StyleCommand {
166
166
  shots: z.ZodArray<z.ZodObject<{
167
167
  shotId: z.ZodUUID;
168
168
  order: z.ZodNumber;
169
- title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof LOCALE>, z.ZodString>]>;
169
+ title: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>, z.ZodString>]>;
170
170
  preview: z.ZodObject<{
171
171
  assetId: z.ZodUUID;
172
172
  url: z.ZodURL;
@@ -96,6 +96,11 @@ 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
+ currency: z.ZodOptional<z.ZodString>;
101
+ renewalDate: z.ZodISODateTime;
102
+ price: z.ZodNumber;
103
+ }, z.core.$strip>>;
99
104
  title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
100
105
  message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
101
106
  }, z.core.$strip>;
@@ -97,6 +97,11 @@ 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
+ currency: z.ZodOptional<z.ZodString>;
102
+ renewalDate: z.ZodISODateTime;
103
+ price: z.ZodNumber;
104
+ }, z.core.$strip>>;
100
105
  title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
101
106
  message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
102
107
  }, z.core.$strip>;
@@ -0,0 +1,29 @@
1
+ import { z } from 'zod';
2
+ import { LOCALE } from '@purpleschool/rugpt-lib-common';
3
+ export declare namespace AttachEmailCommand {
4
+ const EmailSchema: z.ZodPipe<z.ZodString, z.ZodEmail>;
5
+ const RequestSchema: z.ZodObject<{
6
+ email: z.ZodPipe<z.ZodString, z.ZodEmail>;
7
+ locale: z.ZodOptional<z.ZodEnum<typeof LOCALE>>;
8
+ }, z.core.$strip>;
9
+ type Request = z.infer<typeof RequestSchema>;
10
+ const ResponseSchema: z.ZodObject<{
11
+ data: z.ZodObject<{
12
+ retryAfterSeconds: z.ZodNumber;
13
+ }, z.core.$strip>;
14
+ }, z.core.$strip>;
15
+ type Response = z.infer<typeof ResponseSchema>;
16
+ }
17
+ export declare namespace ConfirmAttachEmailCommand {
18
+ const RequestSchema: z.ZodObject<{
19
+ token: z.ZodString;
20
+ password: z.ZodString;
21
+ }, z.core.$strip>;
22
+ type Request = z.infer<typeof RequestSchema>;
23
+ const ResponseSchema: z.ZodObject<{
24
+ data: z.ZodObject<{
25
+ accessToken: z.ZodString;
26
+ }, z.core.$strip>;
27
+ }, z.core.$strip>;
28
+ type Response = z.infer<typeof ResponseSchema>;
29
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConfirmAttachEmailCommand = exports.AttachEmailCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
6
+ var AttachEmailCommand;
7
+ (function (AttachEmailCommand) {
8
+ AttachEmailCommand.EmailSchema = zod_1.z
9
+ .string()
10
+ .trim()
11
+ .toLowerCase()
12
+ .pipe(zod_1.z.email())
13
+ .refine((email) => !email.endsWith('@t.me'));
14
+ AttachEmailCommand.RequestSchema = zod_1.z.object({
15
+ email: AttachEmailCommand.EmailSchema,
16
+ locale: zod_1.z.enum(rugpt_lib_common_1.LOCALE).optional(),
17
+ });
18
+ AttachEmailCommand.ResponseSchema = zod_1.z.object({
19
+ data: zod_1.z.object({ retryAfterSeconds: zod_1.z.number().int().nonnegative() }),
20
+ });
21
+ })(AttachEmailCommand || (exports.AttachEmailCommand = AttachEmailCommand = {}));
22
+ var ConfirmAttachEmailCommand;
23
+ (function (ConfirmAttachEmailCommand) {
24
+ ConfirmAttachEmailCommand.RequestSchema = zod_1.z.object({
25
+ token: zod_1.z.string().min(1).max(4096),
26
+ password: zod_1.z
27
+ .string()
28
+ .min(1)
29
+ .refine((password) => {
30
+ return new TextEncoder().encode(password).length <= 72;
31
+ }, 'Password must not exceed 72 UTF-8 bytes'),
32
+ });
33
+ ConfirmAttachEmailCommand.ResponseSchema = zod_1.z.object({ data: zod_1.z.object({ accessToken: zod_1.z.string() }) });
34
+ })(ConfirmAttachEmailCommand || (exports.ConfirmAttachEmailCommand = ConfirmAttachEmailCommand = {}));
@@ -22,6 +22,8 @@ export declare namespace GetMeCommand {
22
22
  readonly DEACTIVATED: 'deactivated';
23
23
  }>;
24
24
  signupMethod: z.ZodEnum<typeof SIGNUP_METHOD>;
25
+ hasVk: z.ZodBoolean;
26
+ hasYandex: z.ZodBoolean;
25
27
  telegramId: z.ZodNullable<z.ZodNumber>;
26
28
  telegramUserName: z.ZodNullable<z.ZodString>;
27
29
  webmasterId: z.ZodNullable<z.ZodUUID>;
@@ -19,6 +19,8 @@ var GetMeCommand;
19
19
  status: zod_1.z.enum(constants_1.USER_STATUS),
20
20
  role: zod_1.z.enum(constants_1.ROLE),
21
21
  signupMethod: zod_1.z.enum(constants_1.SIGNUP_METHOD),
22
+ hasVk: zod_1.z.boolean(),
23
+ hasYandex: zod_1.z.boolean(),
22
24
  telegramId: zod_1.z.number().nullable(),
23
25
  telegramUserName: zod_1.z.string().nullable(),
24
26
  webmasterId: zod_1.z.uuid().nullable(),
@@ -1,4 +1,5 @@
1
1
  export * from './check-email.command';
2
+ export * from './attach-email.command';
2
3
  export * from './find-user-by-uuid.command';
3
4
  export * from './get-client-country-code.command';
4
5
  export * from './get-me.command';
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./check-email.command"), exports);
18
+ __exportStar(require("./attach-email.command"), exports);
18
19
  __exportStar(require("./find-user-by-uuid.command"), exports);
19
20
  __exportStar(require("./get-client-country-code.command"), exports);
20
21
  __exportStar(require("./get-me.command"), exports);
@@ -38,7 +38,17 @@ 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
+ currency: z.ZodOptional<z.ZodString>;
43
+ renewalDate: z.ZodISODateTime;
44
+ price: z.ZodNumber;
45
+ }, z.core.$strip>;
41
46
  export declare const GenericUiContentSchema: z.ZodObject<{
47
+ renewalReminder: z.ZodOptional<z.ZodObject<{
48
+ currency: z.ZodOptional<z.ZodString>;
49
+ renewalDate: z.ZodISODateTime;
50
+ price: z.ZodNumber;
51
+ }, z.core.$strip>>;
42
52
  title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
43
53
  message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
44
54
  }, z.core.$strip>;
@@ -155,6 +165,11 @@ export declare const UiNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<
155
165
  serverTime: z.ZodOptional<z.ZodDate>;
156
166
  type: z.ZodLiteral<UI_NOTIFICATION_TYPE.GENERIC>;
157
167
  dynamicUiContent: z.ZodObject<{
168
+ renewalReminder: z.ZodOptional<z.ZodObject<{
169
+ currency: z.ZodOptional<z.ZodString>;
170
+ renewalDate: z.ZodISODateTime;
171
+ price: z.ZodNumber;
172
+ }, z.core.$strip>>;
158
173
  title: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
159
174
  message: z.ZodObject<Record<import("@purpleschool/rugpt-lib-common").LOCALE, z.ZodString>, z.core.$strip>;
160
175
  }, 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,16 @@ 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
+ currency: zod_1.z
41
+ .string()
42
+ .regex(/^[A-Z]{3}$/)
43
+ .optional(),
44
+ renewalDate: zod_1.z.iso.datetime(),
45
+ price: zod_1.z.number().finite().nonnegative(),
46
+ });
39
47
  exports.GenericUiContentSchema = zod_1.z.object({
48
+ renewalReminder: exports.SubscriptionRenewalReminderUiContentSchema.optional(),
40
49
  title: exports.LocalizedUiNotificationTextSchema,
41
50
  message: exports.LocalizedUiNotificationTextSchema,
42
51
  });
@@ -12,6 +12,7 @@ exports.UserLoyaltyStatusResponseSchema = zod_1.z.object({
12
12
  nextLevelRenewalBonusPercent: zod_1.z.number().int().nullable(),
13
13
  monthsToNextLevel: zod_1.z.number().int().nullable(),
14
14
  isLapsed: zod_1.z.boolean(),
15
+ /** Exclusive recovery boundary, identical to the UTC calendar tenure reset. */
15
16
  winBackDeadline: zod_1.z.date().nullable(),
16
17
  levels: zod_1.z.array(zod_1.z.object({
17
18
  level: zod_1.z.enum(constants_1.LOYALTY_LEVEL),
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
- "name": "@purpleschool/gptbot",
3
- "version": "0.20.17-stage-2",
4
- "description": "",
5
- "main": "build/index.js",
6
- "types": "build/index.d.ts",
7
- "files": [
8
- "build"
9
- ],
10
- "scripts": {
11
- "prepublish": "rm -rf build && tsc",
12
- "build": "tsc"
13
- },
14
- "keywords": [],
15
- "author": "",
16
- "license": "ISC",
17
- "dependencies": {
18
- "@purpleschool/gptbot-tools": "0.4.38-stage-2",
19
- "@purpleschool/rugpt-lib-common": "0.0.120",
20
- "zod": "4.6.5"
21
- }
22
- }
2
+ "name": "@purpleschool/gptbot",
3
+ "version": "0.20.19-stage-2",
4
+ "description": "",
5
+ "main": "build/index.js",
6
+ "types": "build/index.d.ts",
7
+ "files": [
8
+ "build"
9
+ ],
10
+ "scripts": {
11
+ "prepublish": "rm -rf build && tsc",
12
+ "build": "tsc"
13
+ },
14
+ "keywords": [],
15
+ "author": "",
16
+ "license": "ISC",
17
+ "dependencies": {
18
+ "@purpleschool/gptbot-tools": "0.4.39-stage-2",
19
+ "@purpleschool/rugpt-lib-common": "^0.0.123",
20
+ "zod": "4.6.5"
21
+ }
22
+ }