@veruna/api-contracts 1.0.40 → 1.0.44
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/ai-model.controllers.d.ts +1 -0
- package/build/controllers/ai-model.controllers.js +2 -1
- package/build/controllers/index.d.ts +3 -1
- package/build/controllers/index.js +6 -1
- package/build/controllers/sitemap.controllers.d.ts +1 -0
- package/build/controllers/sitemap.controllers.js +4 -0
- package/build/controllers/wallet.controllers.d.ts +7 -0
- package/build/controllers/wallet.controllers.js +10 -0
- package/build/rest-api.d.ts +6 -0
- package/build/rest-api.js +7 -0
- package/build/routes/ai-model-unreg.routes.d.ts +3 -0
- package/build/routes/ai-model-unreg.routes.js +6 -0
- package/build/routes/index.d.ts +3 -0
- package/build/routes/index.js +7 -1
- package/build/routes/sitemap.routes.d.ts +3 -0
- package/build/routes/sitemap.routes.js +6 -0
- package/build/routes/wallet.routes.d.ts +11 -0
- package/build/routes/wallet.routes.js +14 -0
- package/build/shared/common-schemas.d.ts +5 -0
- package/build/shared/common-schemas.js +9 -4
- package/build/shared/regex.d.ts +1 -0
- package/build/shared/regex.js +3 -1
- package/build/v1/ai-model/admin/commands/create-model.command.d.ts +26 -2
- package/build/v1/ai-model/admin/commands/update-model.command.d.ts +25 -1
- package/build/v1/ai-model/admin/queries/get-model.query.d.ts +13 -1
- package/build/v1/ai-model/admin/queries/get-models.query.d.ts +13 -1
- package/build/v1/ai-model/ai-model.errors.d.ts +6 -1
- package/build/v1/ai-model/ai-model.errors.js +25 -0
- package/build/v1/ai-model/index.d.ts +1 -0
- package/build/v1/ai-model/index.js +1 -0
- package/build/v1/ai-model/public/queries/get-active-models.query.d.ts +10 -7
- package/build/v1/ai-model/public/queries/get-active-models.query.js +1 -1
- package/build/v1/ai-model/public/queries/get-models-list.query.d.ts +9 -2
- package/build/v1/ai-model/schemas/api-provider.enum.d.ts +6 -0
- package/build/v1/ai-model/schemas/api-provider.enum.js +10 -0
- package/build/v1/ai-model/schemas/create-model-request.schema.d.ts +17 -1
- package/build/v1/ai-model/schemas/create-model-request.schema.js +17 -1
- package/build/v1/ai-model/schemas/index.d.ts +5 -0
- package/build/v1/ai-model/schemas/index.js +5 -0
- package/build/v1/ai-model/schemas/modality.enum.d.ts +10 -0
- package/build/v1/ai-model/schemas/modality.enum.js +14 -0
- package/build/v1/ai-model/schemas/model-mark.enum.d.ts +8 -0
- package/build/v1/ai-model/schemas/model-mark.enum.js +12 -0
- package/build/v1/ai-model/schemas/model-response.schema.d.ts +56 -2
- package/build/v1/ai-model/schemas/model-response.schema.js +40 -3
- package/build/v1/ai-model/schemas/model-type.enum.d.ts +8 -0
- package/build/v1/ai-model/schemas/model-type.enum.js +12 -0
- package/build/v1/ai-model/schemas/models-list-response.schema.d.ts +29 -8
- package/build/v1/ai-model/schemas/models-list-response.schema.js +3 -10
- package/build/v1/ai-model/schemas/unreg-models-list-response.schema.d.ts +73 -0
- package/build/v1/ai-model/schemas/unreg-models-list-response.schema.js +28 -0
- package/build/v1/ai-model/schemas/update-model-request.schema.d.ts +16 -0
- package/build/v1/ai-model/schemas/update-model-request.schema.js +16 -0
- package/build/v1/ai-model/unreg/index.d.ts +1 -0
- package/build/v1/ai-model/unreg/index.js +17 -0
- package/build/v1/ai-model/unreg/queries/get-models-list.query.d.ts +33 -0
- package/build/v1/ai-model/unreg/queries/get-models-list.query.js +14 -0
- package/build/v1/ai-model/unreg/queries/index.d.ts +1 -0
- package/build/v1/ai-model/unreg/queries/index.js +5 -0
- package/build/v1/blog/admin/commands/create-post.command.d.ts +2 -0
- package/build/v1/blog/admin/commands/update-post.command.d.ts +2 -0
- package/build/v1/blog/admin/queries/get-post.query.d.ts +1 -0
- package/build/v1/blog/admin/queries/get-posts.query.d.ts +1 -0
- package/build/v1/blog/public/queries/get-post-by-alias.query.d.ts +1 -0
- package/build/v1/blog/public/queries/get-posts.query.d.ts +1 -0
- package/build/v1/blog/schemas/create-post-request.schema.d.ts +1 -0
- package/build/v1/blog/schemas/create-post-request.schema.js +1 -0
- package/build/v1/blog/schemas/post-response.schema.d.ts +1 -0
- package/build/v1/blog/schemas/post-response.schema.js +1 -0
- package/build/v1/blog/schemas/public-post-response.schema.d.ts +1 -0
- package/build/v1/blog/schemas/update-post-request.schema.d.ts +1 -0
- package/build/v1/blog/schemas/update-post-request.schema.js +2 -2
- package/build/v1/email-validation/email-validation.errors.d.ts +19 -0
- package/build/v1/email-validation/email-validation.errors.js +48 -0
- package/build/v1/email-validation/index.d.ts +1 -0
- package/build/v1/email-validation/index.js +17 -0
- package/build/v1/index.d.ts +4 -0
- package/build/v1/index.js +4 -0
- package/build/v1/message/message.errors.d.ts +1 -0
- package/build/v1/message/message.errors.js +5 -0
- package/build/v1/registration-antifraud/enums/fraud-check-result.enum.d.ts +4 -0
- package/build/v1/registration-antifraud/enums/fraud-check-result.enum.js +8 -0
- package/build/v1/registration-antifraud/enums/fraud-reason.enum.d.ts +5 -0
- package/build/v1/registration-antifraud/enums/fraud-reason.enum.js +9 -0
- package/build/v1/registration-antifraud/enums/index.d.ts +2 -0
- package/build/v1/registration-antifraud/enums/index.js +18 -0
- package/build/v1/registration-antifraud/index.d.ts +2 -0
- package/build/v1/registration-antifraud/index.js +18 -0
- package/build/v1/registration-antifraud/registration-antifraud.errors.d.ts +6 -0
- package/build/v1/registration-antifraud/registration-antifraud.errors.js +18 -0
- package/build/v1/sitemap/index.d.ts +1 -0
- package/build/v1/sitemap/index.js +5 -0
- package/build/v1/sitemap/sitemap-changefreq.enum.d.ts +9 -0
- package/build/v1/sitemap/sitemap-changefreq.enum.js +13 -0
- package/build/v1/wallet/index.d.ts +5 -0
- package/build/v1/wallet/index.js +25 -0
- package/build/v1/wallet/queries/get-balance-summary.query.d.ts +29 -0
- package/build/v1/wallet/queries/get-balance-summary.query.js +18 -0
- package/build/v1/wallet/queries/index.d.ts +1 -0
- package/build/v1/wallet/queries/index.js +5 -0
- package/build/v1/wallet/schemas/balance-response.schema.d.ts +40 -0
- package/build/v1/wallet/schemas/balance-response.schema.js +32 -0
- package/build/v1/wallet/schemas/balance-status.enum.d.ts +11 -0
- package/build/v1/wallet/schemas/balance-status.enum.js +15 -0
- package/build/v1/wallet/schemas/hold-status.enum.d.ts +10 -0
- package/build/v1/wallet/schemas/hold-status.enum.js +14 -0
- package/build/v1/wallet/schemas/index.d.ts +7 -0
- package/build/v1/wallet/schemas/index.js +25 -0
- package/build/v1/wallet/schemas/initiator-type.enum.d.ts +12 -0
- package/build/v1/wallet/schemas/initiator-type.enum.js +16 -0
- package/build/v1/wallet/schemas/metadata.schema.d.ts +29 -0
- package/build/v1/wallet/schemas/metadata.schema.js +104 -0
- package/build/v1/wallet/schemas/source-type.enum.d.ts +13 -0
- package/build/v1/wallet/schemas/source-type.enum.js +17 -0
- package/build/v1/wallet/schemas/transaction-type.enum.d.ts +17 -0
- package/build/v1/wallet/schemas/transaction-type.enum.js +21 -0
- package/build/v1/wallet/wallet.errors.d.ts +37 -0
- package/build/v1/wallet/wallet.errors.js +171 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ import { BlogPostMark } from './blog-post-mark.enum';
|
|
|
4
4
|
export declare const CreatePostRequestSchema: z.ZodObject<{
|
|
5
5
|
alias: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
6
6
|
title: z.ZodString;
|
|
7
|
+
description: z.ZodString;
|
|
7
8
|
metaTitle: z.ZodString;
|
|
8
9
|
metaDescription: z.ZodString;
|
|
9
10
|
content: z.ZodString;
|
|
@@ -14,6 +14,7 @@ exports.CreatePostRequestSchema = zod_1.z
|
|
|
14
14
|
.regex(shared_1.SLUG_REGEX)
|
|
15
15
|
.transform((val) => val.toLowerCase().trim()),
|
|
16
16
|
title: zod_1.z.string().min(1).max(300),
|
|
17
|
+
description: zod_1.z.string().max(1000),
|
|
17
18
|
metaTitle: zod_1.z.string().min(1).max(100),
|
|
18
19
|
metaDescription: zod_1.z.string().min(1).max(200),
|
|
19
20
|
content: zod_1.z.string().min(1).max(1000000),
|
|
@@ -13,6 +13,7 @@ exports.PostResponseSchema = zod_1.z.object({
|
|
|
13
13
|
uuid: zod_1.z.string().regex(regex_1.UUID_REGEX),
|
|
14
14
|
alias: zod_1.z.string(),
|
|
15
15
|
title: zod_1.z.string(),
|
|
16
|
+
description: zod_1.z.string(),
|
|
16
17
|
metaTitle: zod_1.z.string(),
|
|
17
18
|
metaDescription: zod_1.z.string(),
|
|
18
19
|
content: zod_1.z.string(),
|
|
@@ -4,6 +4,7 @@ import { BlogPostMark } from './blog-post-mark.enum';
|
|
|
4
4
|
export declare const UpdatePostRequestSchema: z.ZodObject<{
|
|
5
5
|
alias: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>;
|
|
6
6
|
title: z.ZodOptional<z.ZodString>;
|
|
7
|
+
description: z.ZodOptional<z.ZodString>;
|
|
7
8
|
metaTitle: z.ZodOptional<z.ZodString>;
|
|
8
9
|
metaDescription: z.ZodOptional<z.ZodString>;
|
|
9
10
|
content: z.ZodOptional<z.ZodString>;
|
|
@@ -15,6 +15,7 @@ exports.UpdatePostRequestSchema = zod_1.z
|
|
|
15
15
|
.transform((val) => val.toLowerCase().trim())
|
|
16
16
|
.optional(),
|
|
17
17
|
title: zod_1.z.string().min(1).max(300).optional(),
|
|
18
|
+
description: zod_1.z.string().max(1000).optional(),
|
|
18
19
|
metaTitle: zod_1.z.string().min(1).max(100).optional(),
|
|
19
20
|
metaDescription: zod_1.z.string().min(1).max(200).optional(),
|
|
20
21
|
content: zod_1.z.string().min(1).max(1000000).optional(),
|
|
@@ -28,8 +29,7 @@ exports.UpdatePostRequestSchema = zod_1.z
|
|
|
28
29
|
aiWidgetPrompt: zod_1.z.string().max(2000).nullable().optional(),
|
|
29
30
|
})
|
|
30
31
|
.refine((data) => {
|
|
31
|
-
|
|
32
|
-
if ((_a = data.marks) === null || _a === void 0 ? void 0 : _a.includes(blog_post_mark_enum_1.BlogPostMark.AI_WIDGET)) {
|
|
32
|
+
if (data.marks?.includes(blog_post_mark_enum_1.BlogPostMark.AI_WIDGET)) {
|
|
33
33
|
return data.pageId && data.aiWidgetPlaceholder && data.aiWidgetPrompt;
|
|
34
34
|
}
|
|
35
35
|
return true;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum EmailValidationErrorCode {
|
|
3
|
+
EMAIL_NOT_ALLOWED = "EMAIL_NOT_ALLOWED",
|
|
4
|
+
SYNTAX_INVALID = "SYNTAX_INVALID",
|
|
5
|
+
DOMAIN_NOT_FOUND = "DOMAIN_NOT_FOUND",
|
|
6
|
+
NO_MX_RECORDS = "NO_MX_RECORDS",
|
|
7
|
+
DISPOSABLE_EMAIL = "DISPOSABLE_EMAIL",
|
|
8
|
+
VALIDATION_FAILED = "VALIDATION_FAILED"
|
|
9
|
+
}
|
|
10
|
+
export declare const EMAIL_VALIDATION_ERRORS: Record<EmailValidationErrorCode, ErrorMetadata>;
|
|
11
|
+
/**
|
|
12
|
+
* Причины блокировки email
|
|
13
|
+
*/
|
|
14
|
+
export declare enum EmailBlockReason {
|
|
15
|
+
SYNTAX_INVALID = "SYNTAX_INVALID",
|
|
16
|
+
DOMAIN_NOT_FOUND = "DOMAIN_NOT_FOUND",
|
|
17
|
+
NO_MX_RECORDS = "NO_MX_RECORDS",
|
|
18
|
+
DISPOSABLE_EMAIL = "DISPOSABLE_EMAIL"
|
|
19
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EmailBlockReason = exports.EMAIL_VALIDATION_ERRORS = exports.EmailValidationErrorCode = void 0;
|
|
4
|
+
var EmailValidationErrorCode;
|
|
5
|
+
(function (EmailValidationErrorCode) {
|
|
6
|
+
EmailValidationErrorCode["EMAIL_NOT_ALLOWED"] = "EMAIL_NOT_ALLOWED";
|
|
7
|
+
EmailValidationErrorCode["SYNTAX_INVALID"] = "SYNTAX_INVALID";
|
|
8
|
+
EmailValidationErrorCode["DOMAIN_NOT_FOUND"] = "DOMAIN_NOT_FOUND";
|
|
9
|
+
EmailValidationErrorCode["NO_MX_RECORDS"] = "NO_MX_RECORDS";
|
|
10
|
+
EmailValidationErrorCode["DISPOSABLE_EMAIL"] = "DISPOSABLE_EMAIL";
|
|
11
|
+
EmailValidationErrorCode["VALIDATION_FAILED"] = "VALIDATION_FAILED";
|
|
12
|
+
})(EmailValidationErrorCode || (exports.EmailValidationErrorCode = EmailValidationErrorCode = {}));
|
|
13
|
+
exports.EMAIL_VALIDATION_ERRORS = {
|
|
14
|
+
[EmailValidationErrorCode.EMAIL_NOT_ALLOWED]: {
|
|
15
|
+
code: EmailValidationErrorCode.EMAIL_NOT_ALLOWED,
|
|
16
|
+
statusCode: 400,
|
|
17
|
+
},
|
|
18
|
+
[EmailValidationErrorCode.SYNTAX_INVALID]: {
|
|
19
|
+
code: EmailValidationErrorCode.SYNTAX_INVALID,
|
|
20
|
+
statusCode: 400,
|
|
21
|
+
},
|
|
22
|
+
[EmailValidationErrorCode.DOMAIN_NOT_FOUND]: {
|
|
23
|
+
code: EmailValidationErrorCode.DOMAIN_NOT_FOUND,
|
|
24
|
+
statusCode: 400,
|
|
25
|
+
},
|
|
26
|
+
[EmailValidationErrorCode.NO_MX_RECORDS]: {
|
|
27
|
+
code: EmailValidationErrorCode.NO_MX_RECORDS,
|
|
28
|
+
statusCode: 400,
|
|
29
|
+
},
|
|
30
|
+
[EmailValidationErrorCode.DISPOSABLE_EMAIL]: {
|
|
31
|
+
code: EmailValidationErrorCode.DISPOSABLE_EMAIL,
|
|
32
|
+
statusCode: 400,
|
|
33
|
+
},
|
|
34
|
+
[EmailValidationErrorCode.VALIDATION_FAILED]: {
|
|
35
|
+
code: EmailValidationErrorCode.VALIDATION_FAILED,
|
|
36
|
+
statusCode: 500,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Причины блокировки email
|
|
41
|
+
*/
|
|
42
|
+
var EmailBlockReason;
|
|
43
|
+
(function (EmailBlockReason) {
|
|
44
|
+
EmailBlockReason["SYNTAX_INVALID"] = "SYNTAX_INVALID";
|
|
45
|
+
EmailBlockReason["DOMAIN_NOT_FOUND"] = "DOMAIN_NOT_FOUND";
|
|
46
|
+
EmailBlockReason["NO_MX_RECORDS"] = "NO_MX_RECORDS";
|
|
47
|
+
EmailBlockReason["DISPOSABLE_EMAIL"] = "DISPOSABLE_EMAIL";
|
|
48
|
+
})(EmailBlockReason || (exports.EmailBlockReason = EmailBlockReason = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './email-validation.errors';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./email-validation.errors"), exports);
|
package/build/v1/index.d.ts
CHANGED
package/build/v1/index.js
CHANGED
|
@@ -28,3 +28,7 @@ __exportStar(require("./chat"), exports);
|
|
|
28
28
|
__exportStar(require("./message"), exports);
|
|
29
29
|
__exportStar(require("./ai"), exports);
|
|
30
30
|
__exportStar(require("./verification"), exports);
|
|
31
|
+
__exportStar(require("./sitemap"), exports);
|
|
32
|
+
__exportStar(require("./wallet"), exports);
|
|
33
|
+
__exportStar(require("./email-validation"), exports);
|
|
34
|
+
__exportStar(require("./registration-antifraud"), exports);
|
|
@@ -10,6 +10,7 @@ export declare enum MessageErrorCode {
|
|
|
10
10
|
MESSAGE_TEXT_TOO_LONG = "MESSAGE_TEXT_TOO_LONG",
|
|
11
11
|
AI_MODEL_NOT_FOUND = "AI_MODEL_NOT_FOUND",
|
|
12
12
|
AI_MODEL_INACTIVE = "AI_MODEL_INACTIVE",
|
|
13
|
+
AI_MODEL_NOT_AVAILABLE_FOR_UNREG = "AI_MODEL_NOT_AVAILABLE_FOR_UNREG",
|
|
13
14
|
CANNOT_RATE_USER_MESSAGE = "CANNOT_RATE_USER_MESSAGE"
|
|
14
15
|
}
|
|
15
16
|
export declare const MESSAGE_ERRORS: Record<MessageErrorCode, ErrorMetadata>;
|
|
@@ -13,6 +13,7 @@ var MessageErrorCode;
|
|
|
13
13
|
MessageErrorCode["MESSAGE_TEXT_TOO_LONG"] = "MESSAGE_TEXT_TOO_LONG";
|
|
14
14
|
MessageErrorCode["AI_MODEL_NOT_FOUND"] = "AI_MODEL_NOT_FOUND";
|
|
15
15
|
MessageErrorCode["AI_MODEL_INACTIVE"] = "AI_MODEL_INACTIVE";
|
|
16
|
+
MessageErrorCode["AI_MODEL_NOT_AVAILABLE_FOR_UNREG"] = "AI_MODEL_NOT_AVAILABLE_FOR_UNREG";
|
|
16
17
|
MessageErrorCode["CANNOT_RATE_USER_MESSAGE"] = "CANNOT_RATE_USER_MESSAGE";
|
|
17
18
|
})(MessageErrorCode || (exports.MessageErrorCode = MessageErrorCode = {}));
|
|
18
19
|
exports.MESSAGE_ERRORS = {
|
|
@@ -56,6 +57,10 @@ exports.MESSAGE_ERRORS = {
|
|
|
56
57
|
code: MessageErrorCode.AI_MODEL_INACTIVE,
|
|
57
58
|
statusCode: 400,
|
|
58
59
|
},
|
|
60
|
+
[MessageErrorCode.AI_MODEL_NOT_AVAILABLE_FOR_UNREG]: {
|
|
61
|
+
code: MessageErrorCode.AI_MODEL_NOT_AVAILABLE_FOR_UNREG,
|
|
62
|
+
statusCode: 403,
|
|
63
|
+
},
|
|
59
64
|
[MessageErrorCode.CANNOT_RATE_USER_MESSAGE]: {
|
|
60
65
|
code: MessageErrorCode.CANNOT_RATE_USER_MESSAGE,
|
|
61
66
|
statusCode: 400,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FraudCheckResult = void 0;
|
|
4
|
+
var FraudCheckResult;
|
|
5
|
+
(function (FraudCheckResult) {
|
|
6
|
+
FraudCheckResult["PASSED"] = "PASSED";
|
|
7
|
+
FraudCheckResult["FRAUD"] = "FRAUD";
|
|
8
|
+
})(FraudCheckResult || (exports.FraudCheckResult = FraudCheckResult = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FraudReason = void 0;
|
|
4
|
+
var FraudReason;
|
|
5
|
+
(function (FraudReason) {
|
|
6
|
+
FraudReason["NO_UNREG_TOKEN"] = "NO_UNREG_TOKEN";
|
|
7
|
+
FraudReason["IP_LIMIT_EXCEEDED"] = "IP_LIMIT_EXCEEDED";
|
|
8
|
+
FraudReason["EMAIL_DUPLICATE"] = "EMAIL_DUPLICATE";
|
|
9
|
+
})(FraudReason || (exports.FraudReason = FraudReason = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./fraud-check-result.enum"), exports);
|
|
18
|
+
__exportStar(require("./fraud-reason.enum"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./registration-antifraud.errors"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ErrorMetadata } from '../../shared';
|
|
2
|
+
export declare enum RegistrationAntifraudErrorCode {
|
|
3
|
+
CHECK_ALREADY_EXISTS = "CHECK_ALREADY_EXISTS",
|
|
4
|
+
CHECK_NOT_FOUND = "CHECK_NOT_FOUND"
|
|
5
|
+
}
|
|
6
|
+
export declare const REGISTRATION_ANTIFRAUD_ERRORS: Record<RegistrationAntifraudErrorCode, ErrorMetadata>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.REGISTRATION_ANTIFRAUD_ERRORS = exports.RegistrationAntifraudErrorCode = void 0;
|
|
4
|
+
var RegistrationAntifraudErrorCode;
|
|
5
|
+
(function (RegistrationAntifraudErrorCode) {
|
|
6
|
+
RegistrationAntifraudErrorCode["CHECK_ALREADY_EXISTS"] = "CHECK_ALREADY_EXISTS";
|
|
7
|
+
RegistrationAntifraudErrorCode["CHECK_NOT_FOUND"] = "CHECK_NOT_FOUND";
|
|
8
|
+
})(RegistrationAntifraudErrorCode || (exports.RegistrationAntifraudErrorCode = RegistrationAntifraudErrorCode = {}));
|
|
9
|
+
exports.REGISTRATION_ANTIFRAUD_ERRORS = {
|
|
10
|
+
[RegistrationAntifraudErrorCode.CHECK_ALREADY_EXISTS]: {
|
|
11
|
+
code: RegistrationAntifraudErrorCode.CHECK_ALREADY_EXISTS,
|
|
12
|
+
statusCode: 409,
|
|
13
|
+
},
|
|
14
|
+
[RegistrationAntifraudErrorCode.CHECK_NOT_FOUND]: {
|
|
15
|
+
code: RegistrationAntifraudErrorCode.CHECK_NOT_FOUND,
|
|
16
|
+
statusCode: 404,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SitemapChangefreq } from './sitemap-changefreq.enum';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SitemapChangefreq = void 0;
|
|
4
|
+
var sitemap_changefreq_enum_1 = require("./sitemap-changefreq.enum");
|
|
5
|
+
Object.defineProperty(exports, "SitemapChangefreq", { enumerable: true, get: function () { return sitemap_changefreq_enum_1.SitemapChangefreq; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SitemapChangefreq = void 0;
|
|
4
|
+
var SitemapChangefreq;
|
|
5
|
+
(function (SitemapChangefreq) {
|
|
6
|
+
SitemapChangefreq["ALWAYS"] = "always";
|
|
7
|
+
SitemapChangefreq["HOURLY"] = "hourly";
|
|
8
|
+
SitemapChangefreq["DAILY"] = "daily";
|
|
9
|
+
SitemapChangefreq["WEEKLY"] = "weekly";
|
|
10
|
+
SitemapChangefreq["MONTHLY"] = "monthly";
|
|
11
|
+
SitemapChangefreq["YEARLY"] = "yearly";
|
|
12
|
+
SitemapChangefreq["NEVER"] = "never";
|
|
13
|
+
})(SitemapChangefreq || (exports.SitemapChangefreq = SitemapChangefreq = {}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.WALLET_ROUTES = exports.WALLET_CONTROLLER = void 0;
|
|
18
|
+
__exportStar(require("./schemas"), exports);
|
|
19
|
+
__exportStar(require("./wallet.errors"), exports);
|
|
20
|
+
__exportStar(require("./queries"), exports);
|
|
21
|
+
// Re-export from centralized locations
|
|
22
|
+
var controllers_1 = require("../../controllers");
|
|
23
|
+
Object.defineProperty(exports, "WALLET_CONTROLLER", { enumerable: true, get: function () { return controllers_1.WALLET_CONTROLLER; } });
|
|
24
|
+
var routes_1 = require("../../routes");
|
|
25
|
+
Object.defineProperty(exports, "WALLET_ROUTES", { enumerable: true, get: function () { return routes_1.WALLET_ROUTES; } });
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HttpMethod } from '../../../shared/http-method';
|
|
3
|
+
/**
|
|
4
|
+
* Get Balance Summary Query
|
|
5
|
+
* Public API - returns user's balance summary
|
|
6
|
+
*/
|
|
7
|
+
export declare namespace GetBalanceSummaryQuery {
|
|
8
|
+
const Request: z.ZodObject<{}, z.core.$strip>;
|
|
9
|
+
const Response: z.ZodObject<{
|
|
10
|
+
userId: z.ZodString;
|
|
11
|
+
totalAvailable: z.ZodString;
|
|
12
|
+
totalHeld: z.ZodString;
|
|
13
|
+
balances: z.ZodArray<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
typeCode: z.ZodString;
|
|
16
|
+
typeName: z.ZodString;
|
|
17
|
+
amount: z.ZodString;
|
|
18
|
+
held: z.ZodString;
|
|
19
|
+
available: z.ZodString;
|
|
20
|
+
status: z.ZodEnum<typeof import("../schemas").BalanceStatus>;
|
|
21
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
22
|
+
createdAt: z.ZodString;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
const URL: "/api/v1/wallet/balance";
|
|
26
|
+
const METHOD = HttpMethod.GET;
|
|
27
|
+
type RequestType = z.infer<typeof Request>;
|
|
28
|
+
type ResponseType = z.infer<typeof Response>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetBalanceSummaryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../schemas");
|
|
6
|
+
const rest_api_1 = require("../../../rest-api");
|
|
7
|
+
const http_method_1 = require("../../../shared/http-method");
|
|
8
|
+
/**
|
|
9
|
+
* Get Balance Summary Query
|
|
10
|
+
* Public API - returns user's balance summary
|
|
11
|
+
*/
|
|
12
|
+
var GetBalanceSummaryQuery;
|
|
13
|
+
(function (GetBalanceSummaryQuery) {
|
|
14
|
+
GetBalanceSummaryQuery.Request = zod_1.z.object({});
|
|
15
|
+
GetBalanceSummaryQuery.Response = schemas_1.BalanceSummaryResponseSchema;
|
|
16
|
+
GetBalanceSummaryQuery.URL = rest_api_1.REST_API.V1.WALLET.BALANCE;
|
|
17
|
+
GetBalanceSummaryQuery.METHOD = http_method_1.HttpMethod.GET;
|
|
18
|
+
})(GetBalanceSummaryQuery || (exports.GetBalanceSummaryQuery = GetBalanceSummaryQuery = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GetBalanceSummaryQuery } from './get-balance-summary.query';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetBalanceSummaryQuery = void 0;
|
|
4
|
+
var get_balance_summary_query_1 = require("./get-balance-summary.query");
|
|
5
|
+
Object.defineProperty(exports, "GetBalanceSummaryQuery", { enumerable: true, get: function () { return get_balance_summary_query_1.GetBalanceSummaryQuery; } });
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BalanceStatus } from './balance-status.enum';
|
|
3
|
+
/**
|
|
4
|
+
* Single Balance Item Response Schema
|
|
5
|
+
* Note: amount, held, available are strings to preserve BigInt precision
|
|
6
|
+
*/
|
|
7
|
+
export declare const BalanceItemResponseSchema: z.ZodObject<{
|
|
8
|
+
id: z.ZodString;
|
|
9
|
+
typeCode: z.ZodString;
|
|
10
|
+
typeName: z.ZodString;
|
|
11
|
+
amount: z.ZodString;
|
|
12
|
+
held: z.ZodString;
|
|
13
|
+
available: z.ZodString;
|
|
14
|
+
status: z.ZodEnum<typeof BalanceStatus>;
|
|
15
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
16
|
+
createdAt: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
/**
|
|
19
|
+
* Balance Summary Response Schema
|
|
20
|
+
* See WALLET_API.md section 4.6
|
|
21
|
+
* Note: totalAvailable, totalHeld are strings to preserve BigInt precision
|
|
22
|
+
*/
|
|
23
|
+
export declare const BalanceSummaryResponseSchema: z.ZodObject<{
|
|
24
|
+
userId: z.ZodString;
|
|
25
|
+
totalAvailable: z.ZodString;
|
|
26
|
+
totalHeld: z.ZodString;
|
|
27
|
+
balances: z.ZodArray<z.ZodObject<{
|
|
28
|
+
id: z.ZodString;
|
|
29
|
+
typeCode: z.ZodString;
|
|
30
|
+
typeName: z.ZodString;
|
|
31
|
+
amount: z.ZodString;
|
|
32
|
+
held: z.ZodString;
|
|
33
|
+
available: z.ZodString;
|
|
34
|
+
status: z.ZodEnum<typeof BalanceStatus>;
|
|
35
|
+
expiresAt: z.ZodNullable<z.ZodString>;
|
|
36
|
+
createdAt: z.ZodString;
|
|
37
|
+
}, z.core.$strip>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type BalanceItemResponse = z.infer<typeof BalanceItemResponseSchema>;
|
|
40
|
+
export type BalanceSummaryResponse = z.infer<typeof BalanceSummaryResponseSchema>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BalanceSummaryResponseSchema = exports.BalanceItemResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const shared_1 = require("../../../shared");
|
|
6
|
+
const balance_status_enum_1 = require("./balance-status.enum");
|
|
7
|
+
/**
|
|
8
|
+
* Single Balance Item Response Schema
|
|
9
|
+
* Note: amount, held, available are strings to preserve BigInt precision
|
|
10
|
+
*/
|
|
11
|
+
exports.BalanceItemResponseSchema = zod_1.z.object({
|
|
12
|
+
id: zod_1.z.string().uuid(),
|
|
13
|
+
typeCode: zod_1.z.string(),
|
|
14
|
+
typeName: zod_1.z.string(),
|
|
15
|
+
amount: shared_1.BigIntStringSchema,
|
|
16
|
+
held: shared_1.BigIntStringSchema,
|
|
17
|
+
available: shared_1.BigIntStringSchema,
|
|
18
|
+
status: zod_1.z.nativeEnum(balance_status_enum_1.BalanceStatus),
|
|
19
|
+
expiresAt: zod_1.z.string().datetime().nullable(),
|
|
20
|
+
createdAt: zod_1.z.string().datetime(),
|
|
21
|
+
});
|
|
22
|
+
/**
|
|
23
|
+
* Balance Summary Response Schema
|
|
24
|
+
* See WALLET_API.md section 4.6
|
|
25
|
+
* Note: totalAvailable, totalHeld are strings to preserve BigInt precision
|
|
26
|
+
*/
|
|
27
|
+
exports.BalanceSummaryResponseSchema = zod_1.z.object({
|
|
28
|
+
userId: zod_1.z.string().uuid(),
|
|
29
|
+
totalAvailable: shared_1.BigIntStringSchema,
|
|
30
|
+
totalHeld: shared_1.BigIntStringSchema,
|
|
31
|
+
balances: zod_1.z.array(exports.BalanceItemResponseSchema),
|
|
32
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BalanceStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Balance Status Enum
|
|
6
|
+
* See WALLET_API.md section 2.2
|
|
7
|
+
*/
|
|
8
|
+
var BalanceStatus;
|
|
9
|
+
(function (BalanceStatus) {
|
|
10
|
+
BalanceStatus["ACTIVE"] = "ACTIVE";
|
|
11
|
+
BalanceStatus["DEPLETED"] = "DEPLETED";
|
|
12
|
+
BalanceStatus["EXPIRED"] = "EXPIRED";
|
|
13
|
+
BalanceStatus["CANCELLED"] = "CANCELLED";
|
|
14
|
+
BalanceStatus["SUSPENDED"] = "SUSPENDED";
|
|
15
|
+
})(BalanceStatus || (exports.BalanceStatus = BalanceStatus = {}));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HoldStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Hold Status Enum
|
|
6
|
+
* See WALLET_API.md section 2.3
|
|
7
|
+
*/
|
|
8
|
+
var HoldStatus;
|
|
9
|
+
(function (HoldStatus) {
|
|
10
|
+
HoldStatus["PENDING"] = "PENDING";
|
|
11
|
+
HoldStatus["CONFIRMED"] = "CONFIRMED";
|
|
12
|
+
HoldStatus["RELEASED"] = "RELEASED";
|
|
13
|
+
HoldStatus["EXPIRED"] = "EXPIRED";
|
|
14
|
+
})(HoldStatus || (exports.HoldStatus = HoldStatus = {}));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { BalanceStatus } from './balance-status.enum';
|
|
2
|
+
export { HoldStatus } from './hold-status.enum';
|
|
3
|
+
export { TransactionType } from './transaction-type.enum';
|
|
4
|
+
export { SourceType } from './source-type.enum';
|
|
5
|
+
export { InitiatorType } from './initiator-type.enum';
|
|
6
|
+
export { BalanceItemResponseSchema, BalanceSummaryResponseSchema, type BalanceItemResponse, type BalanceSummaryResponse, } from './balance-response.schema';
|
|
7
|
+
export { MetadataSchema, validateMetadata, MAX_METADATA_SIZE, MAX_NESTING_DEPTH, MAX_METADATA_KEYS, type Metadata, } from './metadata.schema';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAX_METADATA_KEYS = exports.MAX_NESTING_DEPTH = exports.MAX_METADATA_SIZE = exports.validateMetadata = exports.MetadataSchema = exports.BalanceSummaryResponseSchema = exports.BalanceItemResponseSchema = exports.InitiatorType = exports.SourceType = exports.TransactionType = exports.HoldStatus = exports.BalanceStatus = void 0;
|
|
4
|
+
// Enums
|
|
5
|
+
var balance_status_enum_1 = require("./balance-status.enum");
|
|
6
|
+
Object.defineProperty(exports, "BalanceStatus", { enumerable: true, get: function () { return balance_status_enum_1.BalanceStatus; } });
|
|
7
|
+
var hold_status_enum_1 = require("./hold-status.enum");
|
|
8
|
+
Object.defineProperty(exports, "HoldStatus", { enumerable: true, get: function () { return hold_status_enum_1.HoldStatus; } });
|
|
9
|
+
var transaction_type_enum_1 = require("./transaction-type.enum");
|
|
10
|
+
Object.defineProperty(exports, "TransactionType", { enumerable: true, get: function () { return transaction_type_enum_1.TransactionType; } });
|
|
11
|
+
var source_type_enum_1 = require("./source-type.enum");
|
|
12
|
+
Object.defineProperty(exports, "SourceType", { enumerable: true, get: function () { return source_type_enum_1.SourceType; } });
|
|
13
|
+
var initiator_type_enum_1 = require("./initiator-type.enum");
|
|
14
|
+
Object.defineProperty(exports, "InitiatorType", { enumerable: true, get: function () { return initiator_type_enum_1.InitiatorType; } });
|
|
15
|
+
// Response schemas
|
|
16
|
+
var balance_response_schema_1 = require("./balance-response.schema");
|
|
17
|
+
Object.defineProperty(exports, "BalanceItemResponseSchema", { enumerable: true, get: function () { return balance_response_schema_1.BalanceItemResponseSchema; } });
|
|
18
|
+
Object.defineProperty(exports, "BalanceSummaryResponseSchema", { enumerable: true, get: function () { return balance_response_schema_1.BalanceSummaryResponseSchema; } });
|
|
19
|
+
// Metadata validation
|
|
20
|
+
var metadata_schema_1 = require("./metadata.schema");
|
|
21
|
+
Object.defineProperty(exports, "MetadataSchema", { enumerable: true, get: function () { return metadata_schema_1.MetadataSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "validateMetadata", { enumerable: true, get: function () { return metadata_schema_1.validateMetadata; } });
|
|
23
|
+
Object.defineProperty(exports, "MAX_METADATA_SIZE", { enumerable: true, get: function () { return metadata_schema_1.MAX_METADATA_SIZE; } });
|
|
24
|
+
Object.defineProperty(exports, "MAX_NESTING_DEPTH", { enumerable: true, get: function () { return metadata_schema_1.MAX_NESTING_DEPTH; } });
|
|
25
|
+
Object.defineProperty(exports, "MAX_METADATA_KEYS", { enumerable: true, get: function () { return metadata_schema_1.MAX_METADATA_KEYS; } });
|