@ai-grator/api 0.1.37 → 0.1.38
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/admin/endpoints/admin.ts +18 -0
- package/admin/endpoints/commands/create-admin-model-family.command.ts +28 -0
- package/admin/endpoints/commands/create-admin-page.command.ts +56 -0
- package/admin/endpoints/commands/delete-admin-model-family.command.ts +29 -0
- package/admin/endpoints/commands/delete-admin-page.command.ts +28 -0
- package/admin/endpoints/commands/index.ts +8 -0
- package/admin/endpoints/commands/update-admin-model-family.command.ts +38 -0
- package/admin/endpoints/commands/update-admin-organization.command.ts +28 -0
- package/admin/endpoints/commands/update-admin-page-status.command.ts +37 -0
- package/admin/endpoints/commands/update-admin-page.command.ts +55 -0
- package/admin/endpoints/queries/get-admin-model-families.query.ts +22 -0
- package/admin/endpoints/queries/get-admin-organization.query.ts +21 -0
- package/admin/endpoints/queries/get-admin-page.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-pages.query.ts +38 -0
- package/admin/endpoints/queries/index.ts +4 -0
- package/admin/models/admin-page-list-item.schema.ts +19 -0
- package/admin/models/admin-page-response.schema.ts +33 -0
- package/admin/models/index.ts +2 -0
- package/build/admin/endpoints/admin.d.ts +12 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +15 -0
- package/build/admin/endpoints/commands/create-admin-model-family.command.d.ts +41 -0
- package/build/admin/endpoints/commands/create-admin-model-family.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-model-family.command.js +24 -0
- package/build/admin/endpoints/commands/create-admin-page.command.d.ts +753 -0
- package/build/admin/endpoints/commands/create-admin-page.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-page.command.js +44 -0
- package/build/admin/endpoints/commands/delete-admin-model-family.command.d.ts +27 -0
- package/build/admin/endpoints/commands/delete-admin-model-family.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-model-family.command.js +26 -0
- package/build/admin/endpoints/commands/delete-admin-page.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-page.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-page.command.js +25 -0
- package/build/admin/endpoints/commands/index.d.ts +8 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +8 -0
- package/build/admin/endpoints/commands/update-admin-model-family.command.d.ts +49 -0
- package/build/admin/endpoints/commands/update-admin-model-family.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-model-family.command.js +30 -0
- package/build/admin/endpoints/commands/update-admin-organization.command.d.ts +71 -0
- package/build/admin/endpoints/commands/update-admin-organization.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-organization.command.js +24 -0
- package/build/admin/endpoints/commands/update-admin-page-status.command.d.ts +409 -0
- package/build/admin/endpoints/commands/update-admin-page-status.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-page-status.command.js +32 -0
- package/build/admin/endpoints/commands/update-admin-page.command.d.ts +753 -0
- package/build/admin/endpoints/commands/update-admin-page.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-page.command.js +50 -0
- package/build/admin/endpoints/queries/get-admin-model-families.query.d.ts +30 -0
- package/build/admin/endpoints/queries/get-admin-model-families.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-model-families.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-organization.query.d.ts +41 -0
- package/build/admin/endpoints/queries/get-admin-organization.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-organization.query.js +19 -0
- package/build/admin/endpoints/queries/get-admin-page.query.d.ts +400 -0
- package/build/admin/endpoints/queries/get-admin-page.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-page.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-pages.query.d.ts +74 -0
- package/build/admin/endpoints/queries/get-admin-pages.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-pages.query.js +35 -0
- package/build/admin/endpoints/queries/index.d.ts +4 -0
- package/build/admin/endpoints/queries/index.d.ts.map +1 -1
- package/build/admin/endpoints/queries/index.js +4 -0
- package/build/admin/models/admin-page-list-item.schema.d.ts +18 -0
- package/build/admin/models/admin-page-list-item.schema.d.ts.map +1 -0
- package/build/admin/models/admin-page-list-item.schema.js +19 -0
- package/build/admin/models/admin-page-response.schema.d.ts +192 -0
- package/build/admin/models/admin-page-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-page-response.schema.js +24 -0
- package/build/admin/models/index.d.ts +2 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +2 -0
- package/build/errors/errors.d.ts +94 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +94 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts +60 -6
- package/build/model-page/endpoints/queries/get-public-model-by-slug.query.d.ts.map +1 -1
- package/build/model-page/enums/index.d.ts +6 -0
- package/build/model-page/enums/index.d.ts.map +1 -0
- package/build/model-page/enums/index.js +21 -0
- package/build/model-page/enums/page-locale.enum.d.ts +4 -0
- package/build/model-page/enums/page-locale.enum.d.ts.map +1 -0
- package/build/model-page/enums/page-locale.enum.js +7 -0
- package/build/model-page/enums/page-status.enum.d.ts +7 -0
- package/build/model-page/enums/page-status.enum.d.ts.map +1 -0
- package/build/model-page/enums/page-status.enum.js +10 -0
- package/build/model-page/enums/page-type.enum.d.ts +8 -0
- package/build/model-page/enums/page-type.enum.d.ts.map +1 -0
- package/build/model-page/enums/page-type.enum.js +11 -0
- package/build/model-page/enums/robots.enum.d.ts +9 -0
- package/build/model-page/enums/robots.enum.d.ts.map +1 -0
- package/build/model-page/enums/robots.enum.js +13 -0
- package/build/model-page/enums/twitter-card.enum.d.ts +5 -0
- package/build/model-page/enums/twitter-card.enum.d.ts.map +1 -0
- package/build/model-page/enums/twitter-card.enum.js +8 -0
- package/build/model-page/index.d.ts +1 -0
- package/build/model-page/index.d.ts.map +1 -1
- package/build/model-page/index.js +1 -0
- package/build/model-page/models/index.d.ts +3 -0
- package/build/model-page/models/index.d.ts.map +1 -1
- package/build/model-page/models/index.js +3 -0
- package/build/model-page/models/model-family.schema.d.ts +16 -0
- package/build/model-page/models/model-family.schema.d.ts.map +1 -0
- package/build/model-page/models/model-family.schema.js +16 -0
- package/build/model-page/models/public-model-detail.schema.d.ts +30 -3
- package/build/model-page/models/public-model-detail.schema.d.ts.map +1 -1
- package/build/model-page/models/public-model-detail.schema.js +7 -3
- package/build/model-page/models/schema-toggles.schema.d.ts +22 -0
- package/build/model-page/models/schema-toggles.schema.d.ts.map +1 -0
- package/build/model-page/models/schema-toggles.schema.js +22 -0
- package/build/model-page/models/seo-meta.schema.d.ts +84 -0
- package/build/model-page/models/seo-meta.schema.d.ts.map +1 -0
- package/build/model-page/models/seo-meta.schema.js +53 -0
- package/build/organization/endpoints/index.d.ts +3 -0
- package/build/organization/endpoints/index.d.ts.map +1 -0
- package/build/organization/endpoints/index.js +18 -0
- package/build/organization/endpoints/organization.d.ts +5 -0
- package/build/organization/endpoints/organization.d.ts.map +1 -0
- package/build/organization/endpoints/organization.js +7 -0
- package/build/organization/endpoints/queries/get-organization.query.d.ts +37 -0
- package/build/organization/endpoints/queries/get-organization.query.d.ts.map +1 -0
- package/build/organization/endpoints/queries/get-organization.query.js +17 -0
- package/build/organization/endpoints/queries/index.d.ts +2 -0
- package/build/organization/endpoints/queries/index.d.ts.map +1 -0
- package/build/organization/endpoints/queries/index.js +17 -0
- package/build/organization/index.d.ts +3 -0
- package/build/organization/index.d.ts.map +1 -0
- package/build/organization/index.js +18 -0
- package/build/organization/models/index.d.ts +2 -0
- package/build/organization/models/index.d.ts.map +1 -0
- package/build/organization/models/index.js +17 -0
- package/build/organization/models/organization.schema.d.ts +30 -0
- package/build/organization/models/organization.schema.d.ts.map +1 -0
- package/build/organization/models/organization.schema.js +20 -0
- package/build/scripts/generate-openapi.js +82 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +94 -0
- package/index.ts +1 -0
- package/model-page/enums/index.ts +5 -0
- package/model-page/enums/page-locale.enum.ts +3 -0
- package/model-page/enums/page-status.enum.ts +6 -0
- package/model-page/enums/page-type.enum.ts +7 -0
- package/model-page/enums/robots.enum.ts +9 -0
- package/model-page/enums/twitter-card.enum.ts +4 -0
- package/model-page/index.ts +1 -0
- package/model-page/models/index.ts +3 -0
- package/model-page/models/model-family.schema.ts +18 -0
- package/model-page/models/public-model-detail.schema.ts +7 -3
- package/model-page/models/schema-toggles.schema.ts +25 -0
- package/model-page/models/seo-meta.schema.ts +64 -0
- package/organization/endpoints/index.ts +2 -0
- package/organization/endpoints/organization.ts +5 -0
- package/organization/endpoints/queries/get-organization.query.ts +16 -0
- package/organization/endpoints/queries/index.ts +1 -0
- package/organization/index.ts +2 -0
- package/organization/models/index.ts +1 -0
- package/organization/models/organization.schema.ts +22 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +136 -0
|
@@ -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("./organization"), exports);
|
|
18
|
+
__exportStar(require("./queries"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../organization/endpoints/organization.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,cAAuB,CAAC;AAE/D,eAAO,MAAM,mBAAmB;;CAEtB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
2
|
+
export declare const GetOrganizationQueryResponse: import("zod").ZodObject<{
|
|
3
|
+
legalName: import("zod").ZodString;
|
|
4
|
+
inn: import("zod").ZodString;
|
|
5
|
+
ogrn: import("zod").ZodString;
|
|
6
|
+
legalAddress: import("zod").ZodString;
|
|
7
|
+
phone: import("zod").ZodString;
|
|
8
|
+
email: import("zod").ZodEmail;
|
|
9
|
+
paymentBadges: import("zod").ZodArray<import("zod").ZodString>;
|
|
10
|
+
supportChatUrl: import("zod").ZodURL;
|
|
11
|
+
offerUrl: import("zod").ZodURL;
|
|
12
|
+
privacyUrl: import("zod").ZodURL;
|
|
13
|
+
consentUrl: import("zod").ZodURL;
|
|
14
|
+
}, import("zod/v4/core").$strip>;
|
|
15
|
+
export declare const GetOrganizationQuery: {
|
|
16
|
+
method: HTTP_METHODS.GET;
|
|
17
|
+
path: "";
|
|
18
|
+
summary: string;
|
|
19
|
+
responses: {
|
|
20
|
+
200: import("zod").ZodObject<{
|
|
21
|
+
legalName: import("zod").ZodString;
|
|
22
|
+
inn: import("zod").ZodString;
|
|
23
|
+
ogrn: import("zod").ZodString;
|
|
24
|
+
legalAddress: import("zod").ZodString;
|
|
25
|
+
phone: import("zod").ZodString;
|
|
26
|
+
email: import("zod").ZodEmail;
|
|
27
|
+
paymentBadges: import("zod").ZodArray<import("zod").ZodString>;
|
|
28
|
+
supportChatUrl: import("zod").ZodURL;
|
|
29
|
+
offerUrl: import("zod").ZodURL;
|
|
30
|
+
privacyUrl: import("zod").ZodURL;
|
|
31
|
+
consentUrl: import("zod").ZodURL;
|
|
32
|
+
}, import("zod/v4/core").$strip>;
|
|
33
|
+
404: import("zod").ZodType<import("../../../_common").HttpErrorResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
34
|
+
500: import("zod").ZodType<import("../../../_common").HttpErrorResponse, unknown, import("zod/v4/core").$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=get-organization.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-organization.query.d.ts","sourceRoot":"","sources":["../../../../organization/endpoints/queries/get-organization.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;gCAAqB,CAAC;AAE/D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;CAS/B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetOrganizationQuery = exports.GetOrganizationQueryResponse = void 0;
|
|
4
|
+
const _common_1 = require("../../../_common");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
const organization_1 = require("../organization");
|
|
7
|
+
exports.GetOrganizationQueryResponse = models_1.OrganizationSchema;
|
|
8
|
+
exports.GetOrganizationQuery = (0, _common_1.defineContract)({
|
|
9
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
10
|
+
path: organization_1.ORGANIZATION_ROUTES.GET,
|
|
11
|
+
summary: 'Get organization details',
|
|
12
|
+
responses: {
|
|
13
|
+
200: exports.GetOrganizationQueryResponse,
|
|
14
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
15
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../organization/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
@@ -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("./get-organization.query"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../organization/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -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("./models"), exports);
|
|
18
|
+
__exportStar(require("./endpoints"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../organization/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
|
|
@@ -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("./organization.schema"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const OrganizationSchema: z.ZodObject<{
|
|
3
|
+
legalName: z.ZodString;
|
|
4
|
+
inn: z.ZodString;
|
|
5
|
+
ogrn: z.ZodString;
|
|
6
|
+
legalAddress: z.ZodString;
|
|
7
|
+
phone: z.ZodString;
|
|
8
|
+
email: z.ZodEmail;
|
|
9
|
+
paymentBadges: z.ZodArray<z.ZodString>;
|
|
10
|
+
supportChatUrl: z.ZodURL;
|
|
11
|
+
offerUrl: z.ZodURL;
|
|
12
|
+
privacyUrl: z.ZodURL;
|
|
13
|
+
consentUrl: z.ZodURL;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const OrganizationInputSchema: z.ZodObject<{
|
|
16
|
+
legalName: z.ZodOptional<z.ZodString>;
|
|
17
|
+
inn: z.ZodOptional<z.ZodString>;
|
|
18
|
+
ogrn: z.ZodOptional<z.ZodString>;
|
|
19
|
+
legalAddress: z.ZodOptional<z.ZodString>;
|
|
20
|
+
phone: z.ZodOptional<z.ZodString>;
|
|
21
|
+
email: z.ZodOptional<z.ZodEmail>;
|
|
22
|
+
paymentBadges: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
23
|
+
supportChatUrl: z.ZodOptional<z.ZodURL>;
|
|
24
|
+
offerUrl: z.ZodOptional<z.ZodURL>;
|
|
25
|
+
privacyUrl: z.ZodOptional<z.ZodURL>;
|
|
26
|
+
consentUrl: z.ZodOptional<z.ZodURL>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type OrganizationSchemaType = z.infer<typeof OrganizationSchema>;
|
|
29
|
+
export type OrganizationInputSchemaType = z.infer<typeof OrganizationInputSchema>;
|
|
30
|
+
//# sourceMappingURL=organization.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization.schema.d.ts","sourceRoot":"","sources":["../../../organization/models/organization.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;iBAY7B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAElC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AACxE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationInputSchema = exports.OrganizationSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.OrganizationSchema = zod_1.z.object({
|
|
6
|
+
legalName: zod_1.z.string().min(1),
|
|
7
|
+
inn: zod_1.z.string().min(1),
|
|
8
|
+
ogrn: zod_1.z.string().min(1),
|
|
9
|
+
legalAddress: zod_1.z.string().min(1),
|
|
10
|
+
phone: zod_1.z.string().min(1),
|
|
11
|
+
email: zod_1.z.email(),
|
|
12
|
+
paymentBadges: zod_1.z.array(zod_1.z.string().min(1)),
|
|
13
|
+
supportChatUrl: zod_1.z.url(),
|
|
14
|
+
offerUrl: zod_1.z.url(),
|
|
15
|
+
privacyUrl: zod_1.z.url(),
|
|
16
|
+
consentUrl: zod_1.z.url(),
|
|
17
|
+
});
|
|
18
|
+
exports.OrganizationInputSchema = exports.OrganizationSchema.partial().refine((value) => Object.keys(value).length > 0, {
|
|
19
|
+
message: 'At least one field is required',
|
|
20
|
+
});
|
|
@@ -59,6 +59,20 @@ const get_wallet_balance_query_1 = require("../wallet/endpoints/queries/get-wall
|
|
|
59
59
|
const get_wallet_transactions_query_1 = require("../wallet/endpoints/queries/get-wallet-transactions.query");
|
|
60
60
|
const payment_1 = require("../payment/endpoints/payment");
|
|
61
61
|
const create_payment_command_1 = require("../payment/endpoints/commands/create-payment.command");
|
|
62
|
+
const organization_1 = require("../organization/endpoints/organization");
|
|
63
|
+
const get_organization_query_1 = require("../organization/endpoints/queries/get-organization.query");
|
|
64
|
+
const create_admin_page_command_1 = require("../admin/endpoints/commands/create-admin-page.command");
|
|
65
|
+
const update_admin_page_command_1 = require("../admin/endpoints/commands/update-admin-page.command");
|
|
66
|
+
const update_admin_page_status_command_1 = require("../admin/endpoints/commands/update-admin-page-status.command");
|
|
67
|
+
const delete_admin_page_command_1 = require("../admin/endpoints/commands/delete-admin-page.command");
|
|
68
|
+
const create_admin_model_family_command_1 = require("../admin/endpoints/commands/create-admin-model-family.command");
|
|
69
|
+
const update_admin_model_family_command_1 = require("../admin/endpoints/commands/update-admin-model-family.command");
|
|
70
|
+
const delete_admin_model_family_command_1 = require("../admin/endpoints/commands/delete-admin-model-family.command");
|
|
71
|
+
const update_admin_organization_command_1 = require("../admin/endpoints/commands/update-admin-organization.command");
|
|
72
|
+
const get_admin_pages_query_1 = require("../admin/endpoints/queries/get-admin-pages.query");
|
|
73
|
+
const get_admin_page_query_1 = require("../admin/endpoints/queries/get-admin-page.query");
|
|
74
|
+
const get_admin_model_families_query_1 = require("../admin/endpoints/queries/get-admin-model-families.query");
|
|
75
|
+
const get_admin_organization_query_1 = require("../admin/endpoints/queries/get-admin-organization.query");
|
|
62
76
|
const ai_model_1 = require("../ai-model/endpoints/ai-model");
|
|
63
77
|
const model_page_1 = require("../model-page/endpoints/model-page");
|
|
64
78
|
const get_ai_model_by_uuid_query_1 = require("../ai-model/endpoints/queries/get-ai-model-by-uuid.query");
|
|
@@ -289,6 +303,32 @@ async function main() {
|
|
|
289
303
|
registerSchema('MarketplaceCardHistoryQuery', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryQuery);
|
|
290
304
|
registerSchema('MarketplaceCardHistoryResponse', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryResponse);
|
|
291
305
|
registerSchema('MarketplaceCardConfigResponse', get_marketplace_card_config_query_1.GetMarketplaceCardConfigResponse);
|
|
306
|
+
registerSchema('AdminGetPagesQuery', get_admin_pages_query_1.GetAdminPagesQueryQuery);
|
|
307
|
+
registerSchema('AdminGetPagesResponse', get_admin_pages_query_1.GetAdminPagesQueryResponse);
|
|
308
|
+
registerSchema('AdminGetPageParams', get_admin_page_query_1.GetAdminPageQueryParams);
|
|
309
|
+
registerSchema('AdminGetPageResponse', get_admin_page_query_1.GetAdminPageQueryResponse);
|
|
310
|
+
registerSchema('AdminCreatePageRequest', create_admin_page_command_1.CreateAdminPageCommandBody);
|
|
311
|
+
registerSchema('AdminCreatePageResponse', create_admin_page_command_1.CreateAdminPageCommandResponse);
|
|
312
|
+
registerSchema('AdminUpdatePageParams', update_admin_page_command_1.UpdateAdminPageCommandParams);
|
|
313
|
+
registerSchema('AdminUpdatePageRequest', update_admin_page_command_1.UpdateAdminPageCommandBody);
|
|
314
|
+
registerSchema('AdminUpdatePageResponse', update_admin_page_command_1.UpdateAdminPageCommandResponse);
|
|
315
|
+
registerSchema('AdminUpdatePageStatusParams', update_admin_page_status_command_1.UpdateAdminPageStatusCommandParams);
|
|
316
|
+
registerSchema('AdminUpdatePageStatusRequest', update_admin_page_status_command_1.UpdateAdminPageStatusCommandBody);
|
|
317
|
+
registerSchema('AdminUpdatePageStatusResponse', update_admin_page_status_command_1.UpdateAdminPageStatusCommandResponse);
|
|
318
|
+
registerSchema('AdminDeletePageParams', delete_admin_page_command_1.DeleteAdminPageCommandParams);
|
|
319
|
+
registerSchema('AdminDeletePageResponse', delete_admin_page_command_1.DeleteAdminPageCommandResponse);
|
|
320
|
+
registerSchema('AdminGetModelFamiliesResponse', get_admin_model_families_query_1.GetAdminModelFamiliesQueryResponse);
|
|
321
|
+
registerSchema('AdminCreateModelFamilyRequest', create_admin_model_family_command_1.CreateAdminModelFamilyCommandBody);
|
|
322
|
+
registerSchema('AdminCreateModelFamilyResponse', create_admin_model_family_command_1.CreateAdminModelFamilyCommandResponse);
|
|
323
|
+
registerSchema('AdminUpdateModelFamilyParams', update_admin_model_family_command_1.UpdateAdminModelFamilyCommandParams);
|
|
324
|
+
registerSchema('AdminUpdateModelFamilyRequest', update_admin_model_family_command_1.UpdateAdminModelFamilyCommandBody);
|
|
325
|
+
registerSchema('AdminUpdateModelFamilyResponse', update_admin_model_family_command_1.UpdateAdminModelFamilyCommandResponse);
|
|
326
|
+
registerSchema('AdminDeleteModelFamilyParams', delete_admin_model_family_command_1.DeleteAdminModelFamilyCommandParams);
|
|
327
|
+
registerSchema('AdminDeleteModelFamilyResponse', delete_admin_model_family_command_1.DeleteAdminModelFamilyCommandResponse);
|
|
328
|
+
registerSchema('AdminGetOrganizationResponse', get_admin_organization_query_1.GetAdminOrganizationQueryResponse);
|
|
329
|
+
registerSchema('AdminUpdateOrganizationRequest', update_admin_organization_command_1.UpdateAdminOrganizationCommandBody);
|
|
330
|
+
registerSchema('AdminUpdateOrganizationResponse', update_admin_organization_command_1.UpdateAdminOrganizationCommandResponse);
|
|
331
|
+
registerSchema('OrganizationGetResponse', get_organization_query_1.GetOrganizationQueryResponse);
|
|
292
332
|
registerSchema('UserContextGetResponse', get_user_context_query_1.GetUserContextQueryResponse);
|
|
293
333
|
registerSchema('UserContextUpsertRequest', upsert_user_context_command_1.UpsertUserContextCommandBody);
|
|
294
334
|
registerSchema('UserContextUpsertResponse', upsert_user_context_command_1.UpsertUserContextCommandResponse);
|
|
@@ -385,7 +425,20 @@ async function main() {
|
|
|
385
425
|
get_admin_support_chat_messages_query_1.GetAdminSupportChatMessagesQuery,
|
|
386
426
|
send_admin_support_reply_command_1.SendAdminSupportReplyCommand,
|
|
387
427
|
mark_admin_support_chat_read_command_1.MarkAdminSupportChatReadCommand,
|
|
428
|
+
get_admin_pages_query_1.GetAdminPagesQuery,
|
|
429
|
+
get_admin_page_query_1.GetAdminPageQuery,
|
|
430
|
+
create_admin_page_command_1.CreateAdminPageCommand,
|
|
431
|
+
update_admin_page_command_1.UpdateAdminPageCommand,
|
|
432
|
+
update_admin_page_status_command_1.UpdateAdminPageStatusCommand,
|
|
433
|
+
delete_admin_page_command_1.DeleteAdminPageCommand,
|
|
434
|
+
get_admin_model_families_query_1.GetAdminModelFamiliesQuery,
|
|
435
|
+
create_admin_model_family_command_1.CreateAdminModelFamilyCommand,
|
|
436
|
+
update_admin_model_family_command_1.UpdateAdminModelFamilyCommand,
|
|
437
|
+
delete_admin_model_family_command_1.DeleteAdminModelFamilyCommand,
|
|
438
|
+
get_admin_organization_query_1.GetAdminOrganizationQuery,
|
|
439
|
+
update_admin_organization_command_1.UpdateAdminOrganizationCommand,
|
|
388
440
|
];
|
|
441
|
+
const organizationContracts = [get_organization_query_1.GetOrganizationQuery];
|
|
389
442
|
for (const contract of authContracts) {
|
|
390
443
|
const method = contract.method.toLowerCase();
|
|
391
444
|
if (!supportedHttpMethods.has(method)) {
|
|
@@ -823,6 +876,35 @@ async function main() {
|
|
|
823
876
|
responses: buildResponses(contract.responses, resolveSchema),
|
|
824
877
|
});
|
|
825
878
|
}
|
|
879
|
+
for (const contract of organizationContracts) {
|
|
880
|
+
const method = contract.method.toLowerCase();
|
|
881
|
+
if (!supportedHttpMethods.has(method)) {
|
|
882
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
883
|
+
}
|
|
884
|
+
registry.registerPath({
|
|
885
|
+
method: method,
|
|
886
|
+
path: toOpenApiPath(organization_1.ORGANIZATION_CONTROLLER, contract.path),
|
|
887
|
+
summary: contract.summary,
|
|
888
|
+
tags: ['Organization'],
|
|
889
|
+
request: {
|
|
890
|
+
...(contract.request?.body
|
|
891
|
+
? {
|
|
892
|
+
body: {
|
|
893
|
+
required: true,
|
|
894
|
+
content: {
|
|
895
|
+
'application/json': {
|
|
896
|
+
schema: resolveSchema(contract.request.body),
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
}
|
|
901
|
+
: {}),
|
|
902
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
903
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
904
|
+
},
|
|
905
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
906
|
+
});
|
|
907
|
+
}
|
|
826
908
|
for (const contract of userContextContracts) {
|
|
827
909
|
const method = contract.method.toLowerCase();
|
|
828
910
|
if (!supportedHttpMethods.has(method)) {
|