@veruna/api-contracts 1.0.88 → 1.0.90
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/controllers/attribution.controllers.d.ts +1 -0
- package/build/controllers/attribution.controllers.js +5 -0
- package/build/controllers/attribution.controllers.js.map +1 -0
- package/build/controllers/index.d.ts +3 -0
- package/build/controllers/index.js +7 -1
- package/build/controllers/index.js.map +1 -1
- package/build/controllers/notifications.controllers.d.ts +1 -0
- package/build/controllers/notifications.controllers.js +5 -0
- package/build/controllers/notifications.controllers.js.map +1 -0
- package/build/controllers/web-notifications.controllers.d.ts +1 -0
- package/build/controllers/web-notifications.controllers.js +5 -0
- package/build/controllers/web-notifications.controllers.js.map +1 -0
- package/build/locales/validation.d.ts +138 -8
- package/build/locales/validation.js +138 -8
- package/build/locales/validation.js.map +1 -1
- package/build/rest-api.d.ts +11 -1
- package/build/rest-api.js +11 -1
- package/build/rest-api.js.map +1 -1
- package/build/routes/attribution.routes.d.ts +3 -0
- package/build/routes/attribution.routes.js +7 -0
- package/build/routes/attribution.routes.js.map +1 -0
- package/build/routes/index.d.ts +3 -0
- package/build/routes/index.js +7 -1
- package/build/routes/index.js.map +1 -1
- package/build/routes/notifications.routes.d.ts +3 -0
- package/build/routes/notifications.routes.js +7 -0
- package/build/routes/notifications.routes.js.map +1 -0
- package/build/routes/users.routes.d.ts +0 -1
- package/build/routes/users.routes.js +0 -1
- package/build/routes/users.routes.js.map +1 -1
- package/build/routes/web-notifications.routes.d.ts +5 -0
- package/build/routes/web-notifications.routes.js +9 -0
- package/build/routes/web-notifications.routes.js.map +1 -0
- package/build/shared/constants.d.ts +1 -0
- package/build/shared/constants.js +6 -5
- package/build/shared/constants.js.map +1 -1
- package/build/shared/regex.d.ts +3 -0
- package/build/shared/regex.js +4 -1
- package/build/shared/regex.js.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/v1/ai-model/schemas/create-model-request.schema.js +9 -9
- package/build/v1/ai-model/schemas/create-model-request.schema.js.map +1 -1
- package/build/v1/ai-model/schemas/update-model-request.schema.js +12 -12
- package/build/v1/ai-model/schemas/update-model-request.schema.js.map +1 -1
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js +1 -1
- package/build/v1/ai-provider/schemas/create-provider-request.schema.js.map +1 -1
- package/build/v1/attribution/attribution.errors.d.ts +8 -0
- package/build/v1/attribution/attribution.errors.js +29 -0
- package/build/v1/attribution/attribution.errors.js.map +1 -0
- package/build/v1/attribution/index.d.ts +2 -0
- package/build/v1/attribution/index.js +19 -0
- package/build/v1/attribution/index.js.map +1 -0
- package/build/v1/attribution/schemas/attribution-event-type.enum.d.ts +8 -0
- package/build/v1/attribution/schemas/attribution-event-type.enum.js +13 -0
- package/build/v1/attribution/schemas/attribution-event-type.enum.js.map +1 -0
- package/build/v1/attribution/schemas/attribution-method.enum.d.ts +4 -0
- package/build/v1/attribution/schemas/attribution-method.enum.js +9 -0
- package/build/v1/attribution/schemas/attribution-method.enum.js.map +1 -0
- package/build/v1/attribution/schemas/attribution-source-module.enum.d.ts +3 -0
- package/build/v1/attribution/schemas/attribution-source-module.enum.js +8 -0
- package/build/v1/attribution/schemas/attribution-source-module.enum.js.map +1 -0
- package/build/v1/attribution/schemas/click-redirect-params.schema.d.ts +5 -0
- package/build/v1/attribution/schemas/click-redirect-params.schema.js +13 -0
- package/build/v1/attribution/schemas/click-redirect-params.schema.js.map +1 -0
- package/build/v1/attribution/schemas/conversion-type.enum.d.ts +4 -0
- package/build/v1/attribution/schemas/conversion-type.enum.js +9 -0
- package/build/v1/attribution/schemas/conversion-type.enum.js.map +1 -0
- package/build/v1/attribution/schemas/index.d.ts +5 -0
- package/build/v1/attribution/schemas/index.js +22 -0
- package/build/v1/attribution/schemas/index.js.map +1 -0
- package/build/v1/auth/auth.errors.d.ts +2 -1
- package/build/v1/auth/auth.errors.js +5 -0
- package/build/v1/auth/auth.errors.js.map +1 -1
- package/build/v1/auth/commands/signin.command.d.ts +0 -1
- package/build/v1/auth/commands/signup.command.d.ts +0 -2
- package/build/v1/auth/schemas/auth-response.schema.d.ts +0 -1
- package/build/v1/auth/schemas/signup-request.schema.d.ts +0 -1
- package/build/v1/auth/schemas/signup-request.schema.js +2 -2
- package/build/v1/auth/schemas/signup-request.schema.js.map +1 -1
- package/build/v1/forms/schemas/cooperation-form.schema.js +4 -2
- package/build/v1/forms/schemas/cooperation-form.schema.js.map +1 -1
- package/build/v1/index.d.ts +2 -0
- package/build/v1/index.js +2 -0
- package/build/v1/index.js.map +1 -1
- package/build/v1/notifications/commands/index.d.ts +1 -0
- package/build/v1/notifications/commands/index.js +18 -0
- package/build/v1/notifications/commands/index.js.map +1 -0
- package/build/v1/notifications/commands/update-notification-settings.command.d.ts +31 -0
- package/build/v1/notifications/commands/update-notification-settings.command.js +14 -0
- package/build/v1/notifications/commands/update-notification-settings.command.js.map +1 -0
- package/build/v1/notifications/index.d.ts +2 -0
- package/build/v1/notifications/index.js +2 -0
- package/build/v1/notifications/index.js.map +1 -1
- package/build/v1/notifications/queries/get-notification-settings.query.d.ts +25 -0
- package/build/v1/notifications/queries/get-notification-settings.query.js +15 -0
- package/build/v1/notifications/queries/get-notification-settings.query.js.map +1 -0
- package/build/v1/notifications/queries/index.d.ts +1 -0
- package/build/v1/notifications/queries/index.js +18 -0
- package/build/v1/notifications/queries/index.js.map +1 -0
- package/build/v1/notifications/schemas/channel-skip-reason.enum.d.ts +4 -0
- package/build/v1/notifications/schemas/channel-skip-reason.enum.js +9 -0
- package/build/v1/notifications/schemas/channel-skip-reason.enum.js.map +1 -0
- package/build/v1/notifications/schemas/index.d.ts +11 -0
- package/build/v1/notifications/schemas/index.js +11 -0
- package/build/v1/notifications/schemas/index.js.map +1 -1
- package/build/v1/notifications/schemas/notification-channel.enum.d.ts +5 -0
- package/build/v1/notifications/schemas/notification-channel.enum.js +10 -0
- package/build/v1/notifications/schemas/notification-channel.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-group.enum.d.ts +6 -0
- package/build/v1/notifications/schemas/notification-group.enum.js +11 -0
- package/build/v1/notifications/schemas/notification-group.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-job-action.enum.d.ts +7 -0
- package/build/v1/notifications/schemas/notification-job-action.enum.js +12 -0
- package/build/v1/notifications/schemas/notification-job-action.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-job-status.enum.d.ts +6 -0
- package/build/v1/notifications/schemas/notification-job-status.enum.js +11 -0
- package/build/v1/notifications/schemas/notification-job-status.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-provider.enum.d.ts +4 -0
- package/build/v1/notifications/schemas/notification-provider.enum.js +9 -0
- package/build/v1/notifications/schemas/notification-provider.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-setting-status.enum.d.ts +7 -0
- package/build/v1/notifications/schemas/notification-setting-status.enum.js +12 -0
- package/build/v1/notifications/schemas/notification-setting-status.enum.js.map +1 -0
- package/build/v1/notifications/schemas/notification-setting.schema.d.ts +10 -0
- package/build/v1/notifications/schemas/notification-setting.schema.js +13 -0
- package/build/v1/notifications/schemas/notification-setting.schema.js.map +1 -0
- package/build/v1/notifications/schemas/notification-settings-response.schema.d.ts +19 -0
- package/build/v1/notifications/schemas/notification-settings-response.schema.js +19 -0
- package/build/v1/notifications/schemas/notification-settings-response.schema.js.map +1 -0
- package/build/v1/notifications/schemas/telegram-delivery-status.enum.d.ts +5 -0
- package/build/v1/notifications/schemas/telegram-delivery-status.enum.js +10 -0
- package/build/v1/notifications/schemas/telegram-delivery-status.enum.js.map +1 -0
- package/build/v1/notifications/schemas/update-notification-settings-request.schema.d.ts +11 -0
- package/build/v1/notifications/schemas/update-notification-settings-request.schema.js +22 -0
- package/build/v1/notifications/schemas/update-notification-settings-request.schema.js.map +1 -0
- package/build/v1/s2s/schemas/s2s-upload-ai-image-request.schema.js +9 -9
- package/build/v1/s2s/schemas/s2s-upload-ai-image-request.schema.js.map +1 -1
- package/build/v1/users/commands/index.d.ts +0 -1
- package/build/v1/users/commands/index.js +0 -1
- package/build/v1/users/commands/index.js.map +1 -1
- package/build/v1/users/commands/password-reset-confirm.command.d.ts +1 -0
- package/build/v1/users/commands/update-profile.command.d.ts +0 -1
- package/build/v1/users/queries/confirm-email-verification.query.d.ts +1 -0
- package/build/v1/users/queries/confirm-email-verification.query.js +6 -0
- package/build/v1/users/queries/confirm-email-verification.query.js.map +1 -1
- package/build/v1/users/queries/get-current-user.query.d.ts +0 -1
- package/build/v1/users/schemas/change-password-request.schema.js +1 -1
- package/build/v1/users/schemas/change-password-request.schema.js.map +1 -1
- package/build/v1/users/schemas/index.d.ts +0 -1
- package/build/v1/users/schemas/index.js +0 -1
- package/build/v1/users/schemas/index.js.map +1 -1
- package/build/v1/users/schemas/password-change-complete-request.schema.js +1 -1
- package/build/v1/users/schemas/password-change-complete-request.schema.js.map +1 -1
- package/build/v1/users/schemas/password-reset-confirm-request.schema.d.ts +1 -0
- package/build/v1/users/schemas/password-reset-confirm-request.schema.js +6 -0
- package/build/v1/users/schemas/password-reset-confirm-request.schema.js.map +1 -1
- package/build/v1/users/schemas/response-unions.schema.d.ts +0 -12
- package/build/v1/users/schemas/response-unions.schema.js +1 -2
- package/build/v1/users/schemas/response-unions.schema.js.map +1 -1
- package/build/v1/users/schemas/user-response.schema.d.ts +0 -1
- package/build/v1/users/schemas/user-response.schema.js +0 -1
- package/build/v1/users/schemas/user-response.schema.js.map +1 -1
- package/build/v1/vk-auth/vk-auth.errors.d.ts +4 -1
- package/build/v1/vk-auth/vk-auth.errors.js +6 -0
- package/build/v1/vk-auth/vk-auth.errors.js.map +1 -1
- package/build/v1/web-notifications/commands/index.d.ts +1 -0
- package/build/v1/web-notifications/commands/index.js +18 -0
- package/build/v1/web-notifications/commands/index.js.map +1 -0
- package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.d.ts +15 -0
- package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.js +14 -0
- package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.js.map +1 -0
- package/build/v1/web-notifications/index.d.ts +3 -0
- package/build/v1/web-notifications/index.js +20 -0
- package/build/v1/web-notifications/index.js.map +1 -0
- package/build/v1/web-notifications/queries/get-web-notifications.query.d.ts +30 -0
- package/build/v1/web-notifications/queries/get-web-notifications.query.js +14 -0
- package/build/v1/web-notifications/queries/get-web-notifications.query.js.map +1 -0
- package/build/v1/web-notifications/queries/get-web-unread-count.query.d.ts +12 -0
- package/build/v1/web-notifications/queries/get-web-unread-count.query.js +15 -0
- package/build/v1/web-notifications/queries/get-web-unread-count.query.js.map +1 -0
- package/build/v1/web-notifications/queries/index.d.ts +2 -0
- package/build/v1/web-notifications/queries/index.js +19 -0
- package/build/v1/web-notifications/queries/index.js.map +1 -0
- package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.d.ts +8 -0
- package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.js +22 -0
- package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.js.map +1 -0
- package/build/v1/web-notifications/schemas/index.d.ts +7 -0
- package/build/v1/web-notifications/schemas/index.js +24 -0
- package/build/v1/web-notifications/schemas/index.js.map +1 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.d.ts +5 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.js +11 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.js.map +1 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.d.ts +6 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.js +9 -0
- package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.js.map +1 -0
- package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.d.ts +5 -0
- package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.js +10 -0
- package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.js.map +1 -0
- package/build/v1/web-notifications/schemas/web-notification.schema.d.ts +15 -0
- package/build/v1/web-notifications/schemas/web-notification.schema.js +19 -0
- package/build/v1/web-notifications/schemas/web-notification.schema.js.map +1 -0
- package/build/v1/web-notifications/schemas/web-notifications-response.schema.d.ts +19 -0
- package/build/v1/web-notifications/schemas/web-notifications-response.schema.js +12 -0
- package/build/v1/web-notifications/schemas/web-notifications-response.schema.js.map +1 -0
- package/build/v1/web-notifications/schemas/web-unread-count-response.schema.d.ts +5 -0
- package/build/v1/web-notifications/schemas/web-unread-count-response.schema.js +8 -0
- package/build/v1/web-notifications/schemas/web-unread-count-response.schema.js.map +1 -0
- package/build/v1/yandex-auth/yandex-auth.errors.d.ts +3 -1
- package/build/v1/yandex-auth/yandex-auth.errors.js +10 -0
- package/build/v1/yandex-auth/yandex-auth.errors.js.map +1 -1
- package/package.json +3 -3
- package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +0 -21
- package/build/v1/users/commands/toggle-marketing-consent.command.js +0 -15
- package/build/v1/users/commands/toggle-marketing-consent.command.js.map +0 -1
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +0 -4
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +0 -10
- package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js.map +0 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebNotificationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const regex_1 = require("../../../shared/regex");
|
|
6
|
+
const notification_group_enum_1 = require("../../notifications/schemas/notification-group.enum");
|
|
7
|
+
exports.WebNotificationSchema = zod_1.z.object({
|
|
8
|
+
uuid: zod_1.z.string().regex(regex_1.UUID_REGEX),
|
|
9
|
+
messageId: zod_1.z.string().regex(regex_1.UUID_REGEX),
|
|
10
|
+
groupKey: zod_1.z.nativeEnum(notification_group_enum_1.NotificationGroup),
|
|
11
|
+
title: zod_1.z.string(),
|
|
12
|
+
bodyMd: zod_1.z.string(),
|
|
13
|
+
ctaLabel: zod_1.z.string().nullable(),
|
|
14
|
+
ctaUrl: zod_1.z.string().nullable(),
|
|
15
|
+
imageUrl: zod_1.z.string().nullable(),
|
|
16
|
+
readAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX).nullable(),
|
|
17
|
+
createdAt: zod_1.z.string().regex(regex_1.DATETIME_REGEX),
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=web-notification.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-notification.schema.js","sourceRoot":"","sources":["../../../../v1/web-notifications/schemas/web-notification.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,iDAAmE;AACnE,iGAAwF;AAE3E,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC;IAClC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAU,CAAC;IACvC,QAAQ,EAAE,OAAC,CAAC,UAAU,CAAC,2CAAiB,CAAC;IACzC,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC,CAAC,QAAQ,EAAE;IACnD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,sBAAc,CAAC;CAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const WebNotificationsResponseSchema: z.ZodObject<{
|
|
3
|
+
items: z.ZodArray<z.ZodObject<{
|
|
4
|
+
uuid: z.ZodString;
|
|
5
|
+
messageId: z.ZodString;
|
|
6
|
+
groupKey: z.ZodEnum<typeof import("../..").NotificationGroup>;
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
bodyMd: z.ZodString;
|
|
9
|
+
ctaLabel: z.ZodNullable<z.ZodString>;
|
|
10
|
+
ctaUrl: z.ZodNullable<z.ZodString>;
|
|
11
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
12
|
+
readAt: z.ZodNullable<z.ZodString>;
|
|
13
|
+
createdAt: z.ZodString;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
16
|
+
hasMore: z.ZodBoolean;
|
|
17
|
+
unreadCount: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
export type WebNotificationsResponseDto = z.infer<typeof WebNotificationsResponseSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebNotificationsResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const web_notification_schema_1 = require("./web-notification.schema");
|
|
6
|
+
exports.WebNotificationsResponseSchema = zod_1.z.object({
|
|
7
|
+
items: zod_1.z.array(web_notification_schema_1.WebNotificationSchema),
|
|
8
|
+
nextCursor: zod_1.z.string().nullable(),
|
|
9
|
+
hasMore: zod_1.z.boolean(),
|
|
10
|
+
unreadCount: zod_1.z.number().int().nonnegative(),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=web-notifications-response.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-notifications-response.schema.js","sourceRoot":"","sources":["../../../../v1/web-notifications/schemas/web-notifications-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,uEAAkE;AAErD,QAAA,8BAA8B,GAAG,OAAC,CAAC,MAAM,CAAC;IACnD,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,+CAAqB,CAAC;IACrC,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC9C,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebUnreadCountResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.WebUnreadCountResponseSchema = zod_1.z.object({
|
|
6
|
+
unreadCount: zod_1.z.number().int().nonnegative(),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=web-unread-count-response.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-unread-count-response.schema.js","sourceRoot":"","sources":["../../../../v1/web-notifications/schemas/web-unread-count-response.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAEX,QAAA,4BAA4B,GAAG,OAAC,CAAC,MAAM,CAAC;IACjD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE;CAC9C,CAAC,CAAC"}
|
|
@@ -7,8 +7,10 @@ export declare enum YandexAuthErrorCode {
|
|
|
7
7
|
AUTH_REQUEST_NOT_CONFIRMED = "YANDEX_AUTH_NOT_CONFIRMED",
|
|
8
8
|
TOO_MANY_PENDING_REQUESTS = "YANDEX_TOO_MANY_PENDING_REQUESTS",
|
|
9
9
|
STATE_ERROR = "YANDEX_STATE_ERROR",
|
|
10
|
+
CODE_ERROR = "YANDEX_CODE_ERROR",
|
|
10
11
|
GET_ACCESS_TOKEN_ERROR = "YANDEX_GET_ACCESS_TOKEN_ERROR",
|
|
11
12
|
GET_USER_INFO_ERROR = "YANDEX_GET_USER_INFO_ERROR",
|
|
12
|
-
REGISTER_CONFLICT = "YANDEX_REGISTER_CONFLICT"
|
|
13
|
+
REGISTER_CONFLICT = "YANDEX_REGISTER_CONFLICT",
|
|
14
|
+
IP_MISMATCH = "YANDEX_IP_MISMATCH"
|
|
13
15
|
}
|
|
14
16
|
export declare const YANDEX_AUTH_ERRORS: Record<YandexAuthErrorCode, ErrorMetadata>;
|
|
@@ -10,9 +10,11 @@ var YandexAuthErrorCode;
|
|
|
10
10
|
YandexAuthErrorCode["AUTH_REQUEST_NOT_CONFIRMED"] = "YANDEX_AUTH_NOT_CONFIRMED";
|
|
11
11
|
YandexAuthErrorCode["TOO_MANY_PENDING_REQUESTS"] = "YANDEX_TOO_MANY_PENDING_REQUESTS";
|
|
12
12
|
YandexAuthErrorCode["STATE_ERROR"] = "YANDEX_STATE_ERROR";
|
|
13
|
+
YandexAuthErrorCode["CODE_ERROR"] = "YANDEX_CODE_ERROR";
|
|
13
14
|
YandexAuthErrorCode["GET_ACCESS_TOKEN_ERROR"] = "YANDEX_GET_ACCESS_TOKEN_ERROR";
|
|
14
15
|
YandexAuthErrorCode["GET_USER_INFO_ERROR"] = "YANDEX_GET_USER_INFO_ERROR";
|
|
15
16
|
YandexAuthErrorCode["REGISTER_CONFLICT"] = "YANDEX_REGISTER_CONFLICT";
|
|
17
|
+
YandexAuthErrorCode["IP_MISMATCH"] = "YANDEX_IP_MISMATCH";
|
|
16
18
|
})(YandexAuthErrorCode || (exports.YandexAuthErrorCode = YandexAuthErrorCode = {}));
|
|
17
19
|
exports.YANDEX_AUTH_ERRORS = {
|
|
18
20
|
[YandexAuthErrorCode.AUTH_REQUEST_NOT_FOUND]: {
|
|
@@ -43,6 +45,10 @@ exports.YANDEX_AUTH_ERRORS = {
|
|
|
43
45
|
code: YandexAuthErrorCode.STATE_ERROR,
|
|
44
46
|
statusCode: 400,
|
|
45
47
|
},
|
|
48
|
+
[YandexAuthErrorCode.CODE_ERROR]: {
|
|
49
|
+
code: YandexAuthErrorCode.CODE_ERROR,
|
|
50
|
+
statusCode: 400,
|
|
51
|
+
},
|
|
46
52
|
[YandexAuthErrorCode.GET_ACCESS_TOKEN_ERROR]: {
|
|
47
53
|
code: YandexAuthErrorCode.GET_ACCESS_TOKEN_ERROR,
|
|
48
54
|
statusCode: 500,
|
|
@@ -55,5 +61,9 @@ exports.YANDEX_AUTH_ERRORS = {
|
|
|
55
61
|
code: YandexAuthErrorCode.REGISTER_CONFLICT,
|
|
56
62
|
statusCode: 409,
|
|
57
63
|
},
|
|
64
|
+
[YandexAuthErrorCode.IP_MISMATCH]: {
|
|
65
|
+
code: YandexAuthErrorCode.IP_MISMATCH,
|
|
66
|
+
statusCode: 403,
|
|
67
|
+
},
|
|
58
68
|
};
|
|
59
69
|
//# sourceMappingURL=yandex-auth.errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yandex-auth.errors.js","sourceRoot":"","sources":["../../../v1/yandex-auth/yandex-auth.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,
|
|
1
|
+
{"version":3,"file":"yandex-auth.errors.js","sourceRoot":"","sources":["../../../v1/yandex-auth/yandex-auth.errors.ts"],"names":[],"mappings":";;;AAEA,IAAY,mBAaX;AAbD,WAAY,mBAAmB;IAC3B,+EAAwD,CAAA;IACxD,2EAAoD,CAAA;IACpD,uFAAgE,CAAA;IAChE,uFAAgE,CAAA;IAChE,+EAAwD,CAAA;IACxD,qFAA8D,CAAA;IAC9D,yDAAkC,CAAA;IAClC,uDAAgC,CAAA;IAChC,+EAAwD,CAAA;IACxD,yEAAkD,CAAA;IAClD,qEAA8C,CAAA;IAC9C,yDAAkC,CAAA;AACtC,CAAC,EAbW,mBAAmB,mCAAnB,mBAAmB,QAa9B;AAEY,QAAA,kBAAkB,GAA+C;IAC1E,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,EAAE;QAC1C,IAAI,EAAE,mBAAmB,CAAC,sBAAsB;QAChD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,EAAE;QACxC,IAAI,EAAE,mBAAmB,CAAC,oBAAoB;QAC9C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,8BAA8B,CAAC,EAAE;QAClD,IAAI,EAAE,mBAAmB,CAAC,8BAA8B;QACxD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,8BAA8B,CAAC,EAAE;QAClD,IAAI,EAAE,mBAAmB,CAAC,8BAA8B;QACxD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,0BAA0B,CAAC,EAAE;QAC9C,IAAI,EAAE,mBAAmB,CAAC,0BAA0B;QACpD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,yBAAyB,CAAC,EAAE;QAC7C,IAAI,EAAE,mBAAmB,CAAC,yBAAyB;QACnD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE;QAC/B,IAAI,EAAE,mBAAmB,CAAC,WAAW;QACrC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE;QAC9B,IAAI,EAAE,mBAAmB,CAAC,UAAU;QACpC,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,sBAAsB,CAAC,EAAE;QAC1C,IAAI,EAAE,mBAAmB,CAAC,sBAAsB;QAChD,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,mBAAmB,CAAC,EAAE;QACvC,IAAI,EAAE,mBAAmB,CAAC,mBAAmB;QAC7C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,iBAAiB,CAAC,EAAE;QACrC,IAAI,EAAE,mBAAmB,CAAC,iBAAiB;QAC3C,UAAU,EAAE,GAAG;KAClB;IACD,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE;QAC/B,IAAI,EAAE,mBAAmB,CAAC,WAAW;QACrC,UAAU,EAAE,GAAG;KAClB;CACK,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veruna/api-contracts",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.90",
|
|
4
4
|
"description": "API contracts for Veruna project - Zod schemas, types, and paths",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"author": "Veruna",
|
|
15
15
|
"license": "ISC",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"zod": "^4.
|
|
17
|
+
"zod": "^4.3.6"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"typescript": "^5.
|
|
20
|
+
"typescript": "^5.9.3"
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"build"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
-
export declare namespace UserToggleMarketingConsentCommand {
|
|
4
|
-
const Request: z.ZodObject<{
|
|
5
|
-
marketingConsent: z.ZodBoolean;
|
|
6
|
-
}, z.core.$strip>;
|
|
7
|
-
const Response: z.ZodObject<{
|
|
8
|
-
uuid: z.ZodString;
|
|
9
|
-
email: z.ZodNullable<z.ZodString>;
|
|
10
|
-
name: z.ZodString;
|
|
11
|
-
role: z.ZodString;
|
|
12
|
-
registerType: z.ZodEnum<typeof import("..").RegisterType>;
|
|
13
|
-
status: z.ZodEnum<typeof import("..").UserStatus>;
|
|
14
|
-
marketingConsent: z.ZodBoolean;
|
|
15
|
-
createdAt: z.ZodString;
|
|
16
|
-
}, z.core.$strip>;
|
|
17
|
-
const URL: "/api/v1/users/me/marketing-consent";
|
|
18
|
-
const METHOD = HttpMethod.PUT;
|
|
19
|
-
type RequestType = z.infer<typeof Request>;
|
|
20
|
-
type ResponseType = z.infer<typeof Response>;
|
|
21
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserToggleMarketingConsentCommand = void 0;
|
|
4
|
-
const toggle_marketing_consent_request_schema_1 = require("../schemas/toggle-marketing-consent-request.schema");
|
|
5
|
-
const user_response_schema_1 = require("../schemas/user-response.schema");
|
|
6
|
-
const rest_api_1 = require("../../../rest-api");
|
|
7
|
-
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
-
var UserToggleMarketingConsentCommand;
|
|
9
|
-
(function (UserToggleMarketingConsentCommand) {
|
|
10
|
-
UserToggleMarketingConsentCommand.Request = toggle_marketing_consent_request_schema_1.ToggleMarketingConsentRequestSchema;
|
|
11
|
-
UserToggleMarketingConsentCommand.Response = user_response_schema_1.UserResponseSchema;
|
|
12
|
-
UserToggleMarketingConsentCommand.URL = rest_api_1.REST_API.V1.USERS.ME_MARKETING_CONSENT;
|
|
13
|
-
UserToggleMarketingConsentCommand.METHOD = http_method_1.HttpMethod.PUT;
|
|
14
|
-
})(UserToggleMarketingConsentCommand || (exports.UserToggleMarketingConsentCommand = UserToggleMarketingConsentCommand = {}));
|
|
15
|
-
//# sourceMappingURL=toggle-marketing-consent.command.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-marketing-consent.command.js","sourceRoot":"","sources":["../../../../v1/users/commands/toggle-marketing-consent.command.ts"],"names":[],"mappings":";;;AACA,gHAAyG;AACzG,0EAAqE;AACrE,gDAA6C;AAC7C,6DAAyD;AAEzD,IAAiB,iCAAiC,CAOjD;AAPD,WAAiB,iCAAiC;IACnC,yCAAO,GAAG,6EAAmC,CAAC;IAC9C,0CAAQ,GAAG,yCAAkB,CAAC;IAC9B,qCAAG,GAAG,mBAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,oBAAoB,CAAC;IAC7C,wCAAM,GAAG,wBAAU,CAAC,GAAG,CAAC;AAGvC,CAAC,EAPgB,iCAAiC,iDAAjC,iCAAiC,QAOjD"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToggleMarketingConsentRequestSchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
exports.ToggleMarketingConsentRequestSchema = zod_1.z.object({
|
|
6
|
-
marketingConsent: zod_1.z.boolean({
|
|
7
|
-
error: 'ToggleMarketingConsentRequest.marketingConsent.required',
|
|
8
|
-
}),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=toggle-marketing-consent-request.schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-marketing-consent-request.schema.js","sourceRoot":"","sources":["../../../../v1/users/schemas/toggle-marketing-consent-request.schema.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAMX,QAAA,mCAAmC,GAAG,OAAC,CAAC,MAAM,CAAC;IACxD,gBAAgB,EAAE,OAAC,CAAC,OAAO,CAAC;QACxB,KAAK,EAAE,yDAAyD;KACnE,CAAC;CACL,CAAC,CAAC"}
|