@ai-grator/api 0.1.40 → 0.1.41
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/contact-form/endpoints/commands/index.d.ts +2 -0
- package/build/contact-form/endpoints/commands/index.d.ts.map +1 -0
- package/build/contact-form/endpoints/commands/index.js +17 -0
- package/build/contact-form/endpoints/commands/submit-contact-form.command.d.ts +25 -0
- package/build/contact-form/endpoints/commands/submit-contact-form.command.d.ts.map +1 -0
- package/build/contact-form/endpoints/commands/submit-contact-form.command.js +25 -0
- package/build/contact-form/endpoints/contact-form.d.ts +5 -0
- package/build/contact-form/endpoints/contact-form.d.ts.map +1 -0
- package/build/contact-form/endpoints/contact-form.js +7 -0
- package/build/contact-form/endpoints/index.d.ts +3 -0
- package/build/contact-form/endpoints/index.d.ts.map +1 -0
- package/build/contact-form/endpoints/index.js +18 -0
- package/build/contact-form/index.d.ts +2 -0
- package/build/contact-form/index.d.ts.map +1 -0
- package/build/contact-form/index.js +17 -0
- package/build/errors/errors.d.ts +7 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +7 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/scripts/generate-openapi.js +6 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/contact-form/endpoints/commands/index.ts +1 -0
- package/contact-form/endpoints/commands/submit-contact-form.command.ts +25 -0
- package/contact-form/endpoints/contact-form.ts +5 -0
- package/contact-form/endpoints/index.ts +2 -0
- package/contact-form/index.ts +1 -0
- package/errors/errors.ts +7 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +10 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../contact-form/endpoints/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,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("./submit-contact-form.command"), exports);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const SubmitContactFormCommandBody: z.ZodObject<{
|
|
4
|
+
email: z.ZodEmail;
|
|
5
|
+
message: z.ZodString;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const SubmitContactFormCommandResponse: z.ZodType<import("../../../_common").HttpSuccessResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
8
|
+
export declare const SubmitContactFormCommand: {
|
|
9
|
+
method: HTTP_METHODS.POST;
|
|
10
|
+
path: "";
|
|
11
|
+
summary: string;
|
|
12
|
+
request: {
|
|
13
|
+
body: z.ZodObject<{
|
|
14
|
+
email: z.ZodEmail;
|
|
15
|
+
message: z.ZodString;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
};
|
|
18
|
+
responses: {
|
|
19
|
+
200: z.ZodType<import("../../../_common").HttpSuccessResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpSuccessResponse, unknown>>;
|
|
20
|
+
400: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
21
|
+
429: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
22
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=submit-contact-form.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-contact-form.command.d.ts","sourceRoot":"","sources":["../../../../contact-form/endpoints/commands/submit-contact-form.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAAsD,MAAM,kBAAkB,CAAC;AAGpH,eAAO,MAAM,4BAA4B;;;iBAGvC,CAAC;AAEH,eAAO,MAAM,gCAAgC,uJAA4B,CAAC;AAE1E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;CAanC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubmitContactFormCommand = exports.SubmitContactFormCommandResponse = exports.SubmitContactFormCommandBody = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const contact_form_1 = require("../contact-form");
|
|
7
|
+
exports.SubmitContactFormCommandBody = zod_1.z.object({
|
|
8
|
+
email: zod_1.z.email(),
|
|
9
|
+
message: zod_1.z.string().trim().min(1).max(2000),
|
|
10
|
+
});
|
|
11
|
+
exports.SubmitContactFormCommandResponse = _common_1.HttpSuccessResponseSchema;
|
|
12
|
+
exports.SubmitContactFormCommand = (0, _common_1.defineContract)({
|
|
13
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
14
|
+
path: contact_form_1.CONTACT_FORM_ROUTES.SUBMIT,
|
|
15
|
+
summary: 'Submit the public contact form; forwards the message to support by email',
|
|
16
|
+
request: {
|
|
17
|
+
body: exports.SubmitContactFormCommandBody,
|
|
18
|
+
},
|
|
19
|
+
responses: {
|
|
20
|
+
200: exports.SubmitContactFormCommandResponse,
|
|
21
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
22
|
+
429: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-form.d.ts","sourceRoot":"","sources":["../../../contact-form/endpoints/contact-form.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,EAAG,cAAuB,CAAC;AAE/D,eAAO,MAAM,mBAAmB;;CAEtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../contact-form/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,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("./contact-form"), exports);
|
|
18
|
+
__exportStar(require("./commands"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../contact-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,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("./endpoints"), exports);
|
package/build/errors/errors.d.ts
CHANGED
|
@@ -915,6 +915,13 @@ export declare const ERRORS: {
|
|
|
915
915
|
readonly message: "Не удалось получить данные страницы цен";
|
|
916
916
|
};
|
|
917
917
|
};
|
|
918
|
+
readonly CONTACT_FORM: {
|
|
919
|
+
readonly SUBMIT_ERROR: {
|
|
920
|
+
readonly httpCode: 500;
|
|
921
|
+
readonly code: "CONTACT_FORM.SUBMIT_ERROR";
|
|
922
|
+
readonly message: "Не удалось отправить сообщение в поддержку";
|
|
923
|
+
};
|
|
924
|
+
};
|
|
918
925
|
readonly MODEL_FAMILY: {
|
|
919
926
|
readonly NOT_FOUND: {
|
|
920
927
|
readonly httpCode: 404;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAo+BT,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -918,6 +918,13 @@ exports.ERRORS = {
|
|
|
918
918
|
message: 'Не удалось получить данные страницы цен',
|
|
919
919
|
},
|
|
920
920
|
},
|
|
921
|
+
CONTACT_FORM: {
|
|
922
|
+
SUBMIT_ERROR: {
|
|
923
|
+
httpCode: 500,
|
|
924
|
+
code: 'CONTACT_FORM.SUBMIT_ERROR',
|
|
925
|
+
message: 'Не удалось отправить сообщение в поддержку',
|
|
926
|
+
},
|
|
927
|
+
},
|
|
921
928
|
MODEL_FAMILY: {
|
|
922
929
|
NOT_FOUND: {
|
|
923
930
|
httpCode: 404,
|
package/build/index.d.ts
CHANGED
package/build/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
|
package/build/index.js
CHANGED
|
@@ -20,6 +20,7 @@ __exportStar(require("./generation-model"), exports);
|
|
|
20
20
|
__exportStar(require("./model-catalog"), exports);
|
|
21
21
|
__exportStar(require("./model-page"), exports);
|
|
22
22
|
__exportStar(require("./pricing-page"), exports);
|
|
23
|
+
__exportStar(require("./contact-form"), exports);
|
|
23
24
|
__exportStar(require("./generation-job"), exports);
|
|
24
25
|
__exportStar(require("./article"), exports);
|
|
25
26
|
__exportStar(require("./auth"), exports);
|
|
@@ -84,6 +84,8 @@ const model_catalog_1 = require("../model-catalog/endpoints/model-catalog");
|
|
|
84
84
|
const get_model_catalog_query_1 = require("../model-catalog/endpoints/queries/get-model-catalog.query");
|
|
85
85
|
const pricing_page_1 = require("../pricing-page/endpoints/pricing-page");
|
|
86
86
|
const get_pricing_page_query_1 = require("../pricing-page/endpoints/queries/get-pricing-page.query");
|
|
87
|
+
const contact_form_1 = require("../contact-form/endpoints/contact-form");
|
|
88
|
+
const submit_contact_form_command_1 = require("../contact-form/endpoints/commands/submit-contact-form.command");
|
|
87
89
|
const generation_model_1 = require("../generation-model/endpoints/generation-model");
|
|
88
90
|
const get_generation_models_query_1 = require("../generation-model/endpoints/queries/get-generation-models.query");
|
|
89
91
|
const get_generation_models_by_type_query_1 = require("../generation-model/endpoints/queries/get-generation-models-by-type.query");
|
|
@@ -215,6 +217,8 @@ async function main() {
|
|
|
215
217
|
registerSchema('PublicModelsGetBySlugResponse', get_public_model_by_slug_query_1.GetPublicModelBySlugQueryResponse);
|
|
216
218
|
registerSchema('ModelCatalogGetAllResponse', get_model_catalog_query_1.GetModelCatalogQueryResponse);
|
|
217
219
|
registerSchema('PricingPageGetResponse', get_pricing_page_query_1.GetPricingPageQueryResponse);
|
|
220
|
+
registerSchema('ContactFormSubmitRequest', submit_contact_form_command_1.SubmitContactFormCommandBody);
|
|
221
|
+
registerSchema('ContactFormSubmitResponse', submit_contact_form_command_1.SubmitContactFormCommandResponse);
|
|
218
222
|
registerSchema('GenerationModelGetAllResponse', get_generation_models_query_1.GetGenerationModelsQueryResponse);
|
|
219
223
|
registerSchema('GenerationModelGetByTypeParams', get_generation_models_by_type_query_1.GetGenerationModelsByTypeQueryParams);
|
|
220
224
|
registerSchema('GenerationModelGetByTypeResponse', get_generation_models_by_type_query_1.GetGenerationModelsByTypeQueryResponse);
|
|
@@ -391,6 +395,7 @@ async function main() {
|
|
|
391
395
|
const publicPageContracts = [get_public_page_by_slug_query_1.GetPublicPageBySlugQuery];
|
|
392
396
|
const modelCatalogContracts = [get_model_catalog_query_1.GetModelCatalogQuery];
|
|
393
397
|
const pricingPageContracts = [get_pricing_page_query_1.GetPricingPageQuery];
|
|
398
|
+
const contactFormContracts = [submit_contact_form_command_1.SubmitContactFormCommand];
|
|
394
399
|
const generationModelContracts = [
|
|
395
400
|
get_generation_models_query_1.GetGenerationModelsQuery,
|
|
396
401
|
get_generation_models_by_type_query_1.GetGenerationModelsByTypeQuery,
|
|
@@ -495,6 +500,7 @@ async function main() {
|
|
|
495
500
|
{ controller: model_page_1.PUBLIC_PAGE_CONTROLLER, tag: 'Pages (public)', contracts: publicPageContracts },
|
|
496
501
|
{ controller: model_catalog_1.MODEL_CATALOG_CONTROLLER, tag: 'Model Catalog', contracts: modelCatalogContracts },
|
|
497
502
|
{ controller: pricing_page_1.PRICING_PAGE_CONTROLLER, tag: 'Pricing Page (public)', contracts: pricingPageContracts },
|
|
503
|
+
{ controller: contact_form_1.CONTACT_FORM_CONTROLLER, tag: 'Contact Form (public)', contracts: contactFormContracts },
|
|
498
504
|
{ controller: generation_model_1.GENERATION_MODEL_CONTROLLER, tag: 'Generation Models', contracts: generationModelContracts },
|
|
499
505
|
{ controller: generation_job_1.GENERATION_JOB_CONTROLLER, tag: 'Generation Jobs', contracts: generationJobContracts },
|
|
500
506
|
{
|