@veruna/api-contracts 1.0.89 → 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.
Files changed (217) hide show
  1. package/build/controllers/attribution.controllers.d.ts +1 -0
  2. package/build/controllers/attribution.controllers.js +5 -0
  3. package/build/controllers/attribution.controllers.js.map +1 -0
  4. package/build/controllers/index.d.ts +3 -0
  5. package/build/controllers/index.js +7 -1
  6. package/build/controllers/index.js.map +1 -1
  7. package/build/controllers/notifications.controllers.d.ts +1 -0
  8. package/build/controllers/notifications.controllers.js +5 -0
  9. package/build/controllers/notifications.controllers.js.map +1 -0
  10. package/build/controllers/web-notifications.controllers.d.ts +1 -0
  11. package/build/controllers/web-notifications.controllers.js +5 -0
  12. package/build/controllers/web-notifications.controllers.js.map +1 -0
  13. package/build/locales/validation.d.ts +138 -8
  14. package/build/locales/validation.js +138 -8
  15. package/build/locales/validation.js.map +1 -1
  16. package/build/rest-api.d.ts +11 -1
  17. package/build/rest-api.js +11 -1
  18. package/build/rest-api.js.map +1 -1
  19. package/build/routes/attribution.routes.d.ts +3 -0
  20. package/build/routes/attribution.routes.js +7 -0
  21. package/build/routes/attribution.routes.js.map +1 -0
  22. package/build/routes/index.d.ts +3 -0
  23. package/build/routes/index.js +7 -1
  24. package/build/routes/index.js.map +1 -1
  25. package/build/routes/notifications.routes.d.ts +3 -0
  26. package/build/routes/notifications.routes.js +7 -0
  27. package/build/routes/notifications.routes.js.map +1 -0
  28. package/build/routes/users.routes.d.ts +0 -1
  29. package/build/routes/users.routes.js +0 -1
  30. package/build/routes/users.routes.js.map +1 -1
  31. package/build/routes/web-notifications.routes.d.ts +5 -0
  32. package/build/routes/web-notifications.routes.js +9 -0
  33. package/build/routes/web-notifications.routes.js.map +1 -0
  34. package/build/shared/constants.d.ts +1 -0
  35. package/build/shared/constants.js +2 -1
  36. package/build/shared/constants.js.map +1 -1
  37. package/build/shared/regex.d.ts +3 -0
  38. package/build/shared/regex.js +4 -1
  39. package/build/shared/regex.js.map +1 -1
  40. package/build/tsconfig.tsbuildinfo +1 -1
  41. package/build/v1/ai-model/schemas/create-model-request.schema.js +9 -9
  42. package/build/v1/ai-model/schemas/create-model-request.schema.js.map +1 -1
  43. package/build/v1/ai-model/schemas/update-model-request.schema.js +12 -12
  44. package/build/v1/ai-model/schemas/update-model-request.schema.js.map +1 -1
  45. package/build/v1/ai-provider/schemas/create-provider-request.schema.js +1 -1
  46. package/build/v1/ai-provider/schemas/create-provider-request.schema.js.map +1 -1
  47. package/build/v1/attribution/attribution.errors.d.ts +8 -0
  48. package/build/v1/attribution/attribution.errors.js +29 -0
  49. package/build/v1/attribution/attribution.errors.js.map +1 -0
  50. package/build/v1/attribution/index.d.ts +2 -0
  51. package/build/v1/attribution/index.js +19 -0
  52. package/build/v1/attribution/index.js.map +1 -0
  53. package/build/v1/attribution/schemas/attribution-event-type.enum.d.ts +8 -0
  54. package/build/v1/attribution/schemas/attribution-event-type.enum.js +13 -0
  55. package/build/v1/attribution/schemas/attribution-event-type.enum.js.map +1 -0
  56. package/build/v1/attribution/schemas/attribution-method.enum.d.ts +4 -0
  57. package/build/v1/attribution/schemas/attribution-method.enum.js +9 -0
  58. package/build/v1/attribution/schemas/attribution-method.enum.js.map +1 -0
  59. package/build/v1/attribution/schemas/attribution-source-module.enum.d.ts +3 -0
  60. package/build/v1/attribution/schemas/attribution-source-module.enum.js +8 -0
  61. package/build/v1/attribution/schemas/attribution-source-module.enum.js.map +1 -0
  62. package/build/v1/attribution/schemas/click-redirect-params.schema.d.ts +5 -0
  63. package/build/v1/attribution/schemas/click-redirect-params.schema.js +13 -0
  64. package/build/v1/attribution/schemas/click-redirect-params.schema.js.map +1 -0
  65. package/build/v1/attribution/schemas/conversion-type.enum.d.ts +4 -0
  66. package/build/v1/attribution/schemas/conversion-type.enum.js +9 -0
  67. package/build/v1/attribution/schemas/conversion-type.enum.js.map +1 -0
  68. package/build/v1/attribution/schemas/index.d.ts +5 -0
  69. package/build/v1/attribution/schemas/index.js +22 -0
  70. package/build/v1/attribution/schemas/index.js.map +1 -0
  71. package/build/v1/auth/auth.errors.d.ts +2 -1
  72. package/build/v1/auth/auth.errors.js +5 -0
  73. package/build/v1/auth/auth.errors.js.map +1 -1
  74. package/build/v1/auth/commands/signin.command.d.ts +0 -1
  75. package/build/v1/auth/commands/signup.command.d.ts +0 -2
  76. package/build/v1/auth/schemas/auth-response.schema.d.ts +0 -1
  77. package/build/v1/auth/schemas/signup-request.schema.d.ts +0 -1
  78. package/build/v1/auth/schemas/signup-request.schema.js +2 -2
  79. package/build/v1/auth/schemas/signup-request.schema.js.map +1 -1
  80. package/build/v1/forms/schemas/cooperation-form.schema.js +4 -2
  81. package/build/v1/forms/schemas/cooperation-form.schema.js.map +1 -1
  82. package/build/v1/index.d.ts +2 -0
  83. package/build/v1/index.js +2 -0
  84. package/build/v1/index.js.map +1 -1
  85. package/build/v1/notifications/commands/index.d.ts +1 -0
  86. package/build/v1/notifications/commands/index.js +18 -0
  87. package/build/v1/notifications/commands/index.js.map +1 -0
  88. package/build/v1/notifications/commands/update-notification-settings.command.d.ts +31 -0
  89. package/build/v1/notifications/commands/update-notification-settings.command.js +14 -0
  90. package/build/v1/notifications/commands/update-notification-settings.command.js.map +1 -0
  91. package/build/v1/notifications/index.d.ts +2 -0
  92. package/build/v1/notifications/index.js +2 -0
  93. package/build/v1/notifications/index.js.map +1 -1
  94. package/build/v1/notifications/queries/get-notification-settings.query.d.ts +25 -0
  95. package/build/v1/notifications/queries/get-notification-settings.query.js +15 -0
  96. package/build/v1/notifications/queries/get-notification-settings.query.js.map +1 -0
  97. package/build/v1/notifications/queries/index.d.ts +1 -0
  98. package/build/v1/notifications/queries/index.js +18 -0
  99. package/build/v1/notifications/queries/index.js.map +1 -0
  100. package/build/v1/notifications/schemas/channel-skip-reason.enum.d.ts +4 -0
  101. package/build/v1/notifications/schemas/channel-skip-reason.enum.js +9 -0
  102. package/build/v1/notifications/schemas/channel-skip-reason.enum.js.map +1 -0
  103. package/build/v1/notifications/schemas/index.d.ts +11 -0
  104. package/build/v1/notifications/schemas/index.js +11 -0
  105. package/build/v1/notifications/schemas/index.js.map +1 -1
  106. package/build/v1/notifications/schemas/notification-channel.enum.d.ts +5 -0
  107. package/build/v1/notifications/schemas/notification-channel.enum.js +10 -0
  108. package/build/v1/notifications/schemas/notification-channel.enum.js.map +1 -0
  109. package/build/v1/notifications/schemas/notification-group.enum.d.ts +6 -0
  110. package/build/v1/notifications/schemas/notification-group.enum.js +11 -0
  111. package/build/v1/notifications/schemas/notification-group.enum.js.map +1 -0
  112. package/build/v1/notifications/schemas/notification-job-action.enum.d.ts +7 -0
  113. package/build/v1/notifications/schemas/notification-job-action.enum.js +12 -0
  114. package/build/v1/notifications/schemas/notification-job-action.enum.js.map +1 -0
  115. package/build/v1/notifications/schemas/notification-job-status.enum.d.ts +6 -0
  116. package/build/v1/notifications/schemas/notification-job-status.enum.js +11 -0
  117. package/build/v1/notifications/schemas/notification-job-status.enum.js.map +1 -0
  118. package/build/v1/notifications/schemas/notification-provider.enum.d.ts +4 -0
  119. package/build/v1/notifications/schemas/notification-provider.enum.js +9 -0
  120. package/build/v1/notifications/schemas/notification-provider.enum.js.map +1 -0
  121. package/build/v1/notifications/schemas/notification-setting-status.enum.d.ts +7 -0
  122. package/build/v1/notifications/schemas/notification-setting-status.enum.js +12 -0
  123. package/build/v1/notifications/schemas/notification-setting-status.enum.js.map +1 -0
  124. package/build/v1/notifications/schemas/notification-setting.schema.d.ts +10 -0
  125. package/build/v1/notifications/schemas/notification-setting.schema.js +13 -0
  126. package/build/v1/notifications/schemas/notification-setting.schema.js.map +1 -0
  127. package/build/v1/notifications/schemas/notification-settings-response.schema.d.ts +19 -0
  128. package/build/v1/notifications/schemas/notification-settings-response.schema.js +19 -0
  129. package/build/v1/notifications/schemas/notification-settings-response.schema.js.map +1 -0
  130. package/build/v1/notifications/schemas/telegram-delivery-status.enum.d.ts +5 -0
  131. package/build/v1/notifications/schemas/telegram-delivery-status.enum.js +10 -0
  132. package/build/v1/notifications/schemas/telegram-delivery-status.enum.js.map +1 -0
  133. package/build/v1/notifications/schemas/update-notification-settings-request.schema.d.ts +11 -0
  134. package/build/v1/notifications/schemas/update-notification-settings-request.schema.js +22 -0
  135. package/build/v1/notifications/schemas/update-notification-settings-request.schema.js.map +1 -0
  136. package/build/v1/s2s/schemas/s2s-upload-ai-image-request.schema.js +9 -9
  137. package/build/v1/s2s/schemas/s2s-upload-ai-image-request.schema.js.map +1 -1
  138. package/build/v1/users/commands/index.d.ts +0 -1
  139. package/build/v1/users/commands/index.js +0 -1
  140. package/build/v1/users/commands/index.js.map +1 -1
  141. package/build/v1/users/commands/password-reset-confirm.command.d.ts +1 -0
  142. package/build/v1/users/commands/update-profile.command.d.ts +0 -1
  143. package/build/v1/users/queries/confirm-email-verification.query.d.ts +1 -0
  144. package/build/v1/users/queries/confirm-email-verification.query.js +6 -0
  145. package/build/v1/users/queries/confirm-email-verification.query.js.map +1 -1
  146. package/build/v1/users/queries/get-current-user.query.d.ts +0 -1
  147. package/build/v1/users/schemas/change-password-request.schema.js +1 -1
  148. package/build/v1/users/schemas/change-password-request.schema.js.map +1 -1
  149. package/build/v1/users/schemas/index.d.ts +0 -1
  150. package/build/v1/users/schemas/index.js +0 -1
  151. package/build/v1/users/schemas/index.js.map +1 -1
  152. package/build/v1/users/schemas/password-change-complete-request.schema.js +1 -1
  153. package/build/v1/users/schemas/password-change-complete-request.schema.js.map +1 -1
  154. package/build/v1/users/schemas/password-reset-confirm-request.schema.d.ts +1 -0
  155. package/build/v1/users/schemas/password-reset-confirm-request.schema.js +6 -0
  156. package/build/v1/users/schemas/password-reset-confirm-request.schema.js.map +1 -1
  157. package/build/v1/users/schemas/response-unions.schema.d.ts +0 -12
  158. package/build/v1/users/schemas/response-unions.schema.js +1 -2
  159. package/build/v1/users/schemas/response-unions.schema.js.map +1 -1
  160. package/build/v1/users/schemas/user-response.schema.d.ts +0 -1
  161. package/build/v1/users/schemas/user-response.schema.js +0 -1
  162. package/build/v1/users/schemas/user-response.schema.js.map +1 -1
  163. package/build/v1/vk-auth/vk-auth.errors.d.ts +4 -1
  164. package/build/v1/vk-auth/vk-auth.errors.js +6 -0
  165. package/build/v1/vk-auth/vk-auth.errors.js.map +1 -1
  166. package/build/v1/web-notifications/commands/index.d.ts +1 -0
  167. package/build/v1/web-notifications/commands/index.js +18 -0
  168. package/build/v1/web-notifications/commands/index.js.map +1 -0
  169. package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.d.ts +15 -0
  170. package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.js +14 -0
  171. package/build/v1/web-notifications/commands/mark-web-notifications-read-up-to.command.js.map +1 -0
  172. package/build/v1/web-notifications/index.d.ts +3 -0
  173. package/build/v1/web-notifications/index.js +20 -0
  174. package/build/v1/web-notifications/index.js.map +1 -0
  175. package/build/v1/web-notifications/queries/get-web-notifications.query.d.ts +30 -0
  176. package/build/v1/web-notifications/queries/get-web-notifications.query.js +14 -0
  177. package/build/v1/web-notifications/queries/get-web-notifications.query.js.map +1 -0
  178. package/build/v1/web-notifications/queries/get-web-unread-count.query.d.ts +12 -0
  179. package/build/v1/web-notifications/queries/get-web-unread-count.query.js +15 -0
  180. package/build/v1/web-notifications/queries/get-web-unread-count.query.js.map +1 -0
  181. package/build/v1/web-notifications/queries/index.d.ts +2 -0
  182. package/build/v1/web-notifications/queries/index.js +19 -0
  183. package/build/v1/web-notifications/queries/index.js.map +1 -0
  184. package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.d.ts +8 -0
  185. package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.js +22 -0
  186. package/build/v1/web-notifications/schemas/get-web-notifications-query.schema.js.map +1 -0
  187. package/build/v1/web-notifications/schemas/index.d.ts +7 -0
  188. package/build/v1/web-notifications/schemas/index.js +24 -0
  189. package/build/v1/web-notifications/schemas/index.js.map +1 -0
  190. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.d.ts +5 -0
  191. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.js +11 -0
  192. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-request.schema.js.map +1 -0
  193. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.d.ts +6 -0
  194. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.js +9 -0
  195. package/build/v1/web-notifications/schemas/mark-web-notifications-read-up-to-response.schema.js.map +1 -0
  196. package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.d.ts +5 -0
  197. package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.js +10 -0
  198. package/build/v1/web-notifications/schemas/web-notification-status-filter.enum.js.map +1 -0
  199. package/build/v1/web-notifications/schemas/web-notification.schema.d.ts +15 -0
  200. package/build/v1/web-notifications/schemas/web-notification.schema.js +19 -0
  201. package/build/v1/web-notifications/schemas/web-notification.schema.js.map +1 -0
  202. package/build/v1/web-notifications/schemas/web-notifications-response.schema.d.ts +19 -0
  203. package/build/v1/web-notifications/schemas/web-notifications-response.schema.js +12 -0
  204. package/build/v1/web-notifications/schemas/web-notifications-response.schema.js.map +1 -0
  205. package/build/v1/web-notifications/schemas/web-unread-count-response.schema.d.ts +5 -0
  206. package/build/v1/web-notifications/schemas/web-unread-count-response.schema.js +8 -0
  207. package/build/v1/web-notifications/schemas/web-unread-count-response.schema.js.map +1 -0
  208. package/build/v1/yandex-auth/yandex-auth.errors.d.ts +3 -1
  209. package/build/v1/yandex-auth/yandex-auth.errors.js +10 -0
  210. package/build/v1/yandex-auth/yandex-auth.errors.js.map +1 -1
  211. package/package.json +1 -1
  212. package/build/v1/users/commands/toggle-marketing-consent.command.d.ts +0 -21
  213. package/build/v1/users/commands/toggle-marketing-consent.command.js +0 -15
  214. package/build/v1/users/commands/toggle-marketing-consent.command.js.map +0 -1
  215. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.d.ts +0 -4
  216. package/build/v1/users/schemas/toggle-marketing-consent-request.schema.js +0 -10
  217. 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,5 @@
1
+ import { z } from 'zod';
2
+ export declare const WebUnreadCountResponseSchema: z.ZodObject<{
3
+ unreadCount: z.ZodNumber;
4
+ }, z.core.$strip>;
5
+ export type WebUnreadCountResponseDto = z.infer<typeof WebUnreadCountResponseSchema>;
@@ -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,mBAWX;AAXD,WAAY,mBAAmB;IAC3B,+EAAwD,CAAA;IACxD,2EAAoD,CAAA;IACpD,uFAAgE,CAAA;IAChE,uFAAgE,CAAA;IAChE,+EAAwD,CAAA;IACxD,qFAA8D,CAAA;IAC9D,yDAAkC,CAAA;IAClC,+EAAwD,CAAA;IACxD,yEAAkD,CAAA;IAClD,qEAA8C,CAAA;AAClD,CAAC,EAXW,mBAAmB,mCAAnB,mBAAmB,QAW9B;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,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;CACK,CAAC"}
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.89",
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",
@@ -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,4 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const ToggleMarketingConsentRequestSchema: z.ZodObject<{
3
- marketingConsent: z.ZodBoolean;
4
- }, z.core.$strip>;
@@ -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"}