@ai-grator/api 0.3.76 → 0.3.78
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 +20 -0
- package/admin/endpoints/commands/ban-admin-antifraud-check-value.command.ts +37 -0
- package/admin/endpoints/commands/create-admin-preset-category.command.ts +29 -0
- package/admin/endpoints/commands/create-admin-preset.command.ts +30 -0
- package/admin/endpoints/commands/delete-admin-preset-category.command.ts +29 -0
- package/admin/endpoints/commands/delete-admin-preset.command.ts +28 -0
- package/admin/endpoints/commands/index.ts +10 -0
- package/admin/endpoints/commands/reorder-admin-preset-categories.command.ts +33 -0
- package/admin/endpoints/commands/reorder-admin-presets.command.ts +33 -0
- package/admin/endpoints/commands/update-admin-preset-category.command.ts +36 -0
- package/admin/endpoints/commands/update-admin-preset-status.command.ts +37 -0
- package/admin/endpoints/commands/update-admin-preset.command.ts +36 -0
- package/admin/endpoints/queries/get-admin-antifraud-checks.query.ts +35 -0
- package/admin/endpoints/queries/get-admin-preset-categories.query.ts +22 -0
- package/admin/endpoints/queries/get-admin-preset.query.ts +29 -0
- package/admin/endpoints/queries/get-admin-presets.query.ts +37 -0
- package/admin/endpoints/queries/index.ts +4 -0
- package/admin/enums/admin-antifraud-check-reason.enum.ts +5 -0
- package/admin/enums/index.ts +1 -0
- package/admin/models/admin-antifraud-check-response.schema.ts +27 -0
- package/admin/models/admin-preset-category-response.schema.ts +14 -0
- package/admin/models/admin-preset-response.schema.ts +67 -0
- package/admin/models/index.ts +3 -0
- package/build/admin/endpoints/admin.d.ts +14 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +17 -0
- package/build/admin/endpoints/commands/ban-admin-antifraud-check-value.command.d.ts +71 -0
- package/build/admin/endpoints/commands/ban-admin-antifraud-check-value.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/ban-admin-antifraud-check-value.command.js +32 -0
- package/build/admin/endpoints/commands/create-admin-preset-category.command.d.ts +51 -0
- package/build/admin/endpoints/commands/create-admin-preset-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-preset-category.command.js +25 -0
- package/build/admin/endpoints/commands/create-admin-preset.command.d.ts +490 -0
- package/build/admin/endpoints/commands/create-admin-preset.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/create-admin-preset.command.js +26 -0
- package/build/admin/endpoints/commands/delete-admin-preset-category.command.d.ts +27 -0
- package/build/admin/endpoints/commands/delete-admin-preset-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-preset-category.command.js +26 -0
- package/build/admin/endpoints/commands/delete-admin-preset.command.d.ts +26 -0
- package/build/admin/endpoints/commands/delete-admin-preset.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/delete-admin-preset.command.js +25 -0
- package/build/admin/endpoints/commands/index.d.ts +10 -0
- package/build/admin/endpoints/commands/index.d.ts.map +1 -1
- package/build/admin/endpoints/commands/index.js +10 -0
- package/build/admin/endpoints/commands/reorder-admin-preset-categories.command.d.ts +26 -0
- package/build/admin/endpoints/commands/reorder-admin-preset-categories.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/reorder-admin-preset-categories.command.js +28 -0
- package/build/admin/endpoints/commands/reorder-admin-presets.command.d.ts +29 -0
- package/build/admin/endpoints/commands/reorder-admin-presets.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/reorder-admin-presets.command.js +30 -0
- package/build/admin/endpoints/commands/update-admin-preset-category.command.d.ts +59 -0
- package/build/admin/endpoints/commands/update-admin-preset-category.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-preset-category.command.js +31 -0
- package/build/admin/endpoints/commands/update-admin-preset-status.command.d.ts +312 -0
- package/build/admin/endpoints/commands/update-admin-preset-status.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-preset-status.command.js +32 -0
- package/build/admin/endpoints/commands/update-admin-preset.command.d.ts +497 -0
- package/build/admin/endpoints/commands/update-admin-preset.command.d.ts.map +1 -0
- package/build/admin/endpoints/commands/update-admin-preset.command.js +31 -0
- package/build/admin/endpoints/queries/get-admin-antifraud-checks.query.d.ts +78 -0
- package/build/admin/endpoints/queries/get-admin-antifraud-checks.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-antifraud-checks.query.js +32 -0
- package/build/admin/endpoints/queries/get-admin-preset-categories.query.d.ts +38 -0
- package/build/admin/endpoints/queries/get-admin-preset-categories.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-preset-categories.query.js +21 -0
- package/build/admin/endpoints/queries/get-admin-preset.query.d.ts +304 -0
- package/build/admin/endpoints/queries/get-admin-preset.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-preset.query.js +26 -0
- package/build/admin/endpoints/queries/get-admin-presets.query.d.ts +141 -0
- package/build/admin/endpoints/queries/get-admin-presets.query.d.ts.map +1 -0
- package/build/admin/endpoints/queries/get-admin-presets.query.js +34 -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/enums/admin-antifraud-check-reason.enum.d.ts +6 -0
- package/build/admin/enums/admin-antifraud-check-reason.enum.d.ts.map +1 -0
- package/build/admin/enums/admin-antifraud-check-reason.enum.js +9 -0
- package/build/admin/enums/index.d.ts +1 -0
- package/build/admin/enums/index.d.ts.map +1 -1
- package/build/admin/enums/index.js +1 -0
- package/build/admin/models/admin-antifraud-check-response.schema.d.ts +34 -0
- package/build/admin/models/admin-antifraud-check-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-antifraud-check-response.schema.js +23 -0
- package/build/admin/models/admin-preset-category-response.schema.d.ts +13 -0
- package/build/admin/models/admin-preset-category-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-preset-category-response.schema.js +14 -0
- package/build/admin/models/admin-preset-response.schema.d.ts +205 -0
- package/build/admin/models/admin-preset-response.schema.d.ts.map +1 -0
- package/build/admin/models/admin-preset-response.schema.js +52 -0
- package/build/admin/models/index.d.ts +3 -0
- package/build/admin/models/index.d.ts.map +1 -1
- package/build/admin/models/index.js +3 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts +8 -0
- package/build/chat/endpoints/commands/create-chat.command.d.ts.map +1 -1
- package/build/chat/endpoints/commands/update-chat.command.d.ts +8 -0
- package/build/chat/endpoints/commands/update-chat.command.d.ts.map +1 -1
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts +8 -0
- package/build/chat/endpoints/queries/get-chat-by-uuid.query.d.ts.map +1 -1
- package/build/chat/endpoints/queries/get-chats.query.d.ts +10 -0
- package/build/chat/endpoints/queries/get-chats.query.d.ts.map +1 -1
- package/build/chat/endpoints/queries/get-chats.query.js +4 -1
- package/build/chat/models/chat-response.schema.d.ts +4 -0
- package/build/chat/models/chat-response.schema.d.ts.map +1 -1
- package/build/chat/models/chat-response.schema.js +2 -0
- package/build/errors/errors.d.ts +224 -5
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +224 -5
- package/build/generation-job/endpoints/commands/create-generation-job.command.d.ts +8 -0
- package/build/generation-job/endpoints/commands/create-generation-job.command.d.ts.map +1 -1
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts +8 -0
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts.map +1 -1
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.d.ts +8 -0
- package/build/generation-job/endpoints/queries/get-generation-job-by-uuid.query.d.ts.map +1 -1
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.d.ts +14 -0
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.d.ts.map +1 -1
- package/build/generation-job/endpoints/queries/get-generation-job-history.query.js +2 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts +10 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts.map +1 -1
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.js +2 -0
- package/build/generation-job/models/generation-job-response.schema.d.ts +4 -0
- package/build/generation-job/models/generation-job-response.schema.d.ts.map +1 -1
- package/build/generation-job/models/generation-job-response.schema.js +2 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts +8 -0
- package/build/generation-job-chat/endpoints/commands/create-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts +8 -0
- package/build/generation-job-chat/endpoints/commands/update-generation-job-chat.command.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts +8 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts +10 -0
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.d.ts.map +1 -1
- package/build/generation-job-chat/endpoints/queries/get-generation-job-chats.query.js +2 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts +4 -0
- package/build/generation-job-chat/models/generation-job-chat-response.schema.d.ts.map +1 -1
- package/build/generation-job-chat/models/generation-job-chat-response.schema.js +2 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/preset/endpoints/commands/add-preset-favorite.command.d.ts +25 -0
- package/build/preset/endpoints/commands/add-preset-favorite.command.d.ts.map +1 -0
- package/build/preset/endpoints/commands/add-preset-favorite.command.js +22 -0
- package/build/preset/endpoints/commands/index.d.ts +5 -0
- package/build/preset/endpoints/commands/index.d.ts.map +1 -0
- package/build/preset/endpoints/commands/index.js +20 -0
- package/build/preset/endpoints/commands/prepare-preset.command.d.ts +198 -0
- package/build/preset/endpoints/commands/prepare-preset.command.d.ts.map +1 -0
- package/build/preset/endpoints/commands/prepare-preset.command.js +41 -0
- package/build/preset/endpoints/commands/remove-preset-favorite.command.d.ts +25 -0
- package/build/preset/endpoints/commands/remove-preset-favorite.command.d.ts.map +1 -0
- package/build/preset/endpoints/commands/remove-preset-favorite.command.js +22 -0
- package/build/preset/endpoints/commands/run-preset.command.d.ts +387 -0
- package/build/preset/endpoints/commands/run-preset.command.d.ts.map +1 -0
- package/build/preset/endpoints/commands/run-preset.command.js +55 -0
- package/build/preset/endpoints/index.d.ts +4 -0
- package/build/preset/endpoints/index.d.ts.map +1 -0
- package/build/preset/endpoints/index.js +19 -0
- package/build/preset/endpoints/preset.d.ts +16 -0
- package/build/preset/endpoints/preset.d.ts.map +1 -0
- package/build/preset/endpoints/preset.js +18 -0
- package/build/preset/endpoints/queries/get-preset-price.query.d.ts +62 -0
- package/build/preset/endpoints/queries/get-preset-price.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/get-preset-price.query.js +30 -0
- package/build/preset/endpoints/queries/get-preset-results.query.d.ts +74 -0
- package/build/preset/endpoints/queries/get-preset-results.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/get-preset-results.query.js +32 -0
- package/build/preset/endpoints/queries/get-public-preset-by-slug.query.d.ts +334 -0
- package/build/preset/endpoints/queries/get-public-preset-by-slug.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/get-public-preset-by-slug.query.js +25 -0
- package/build/preset/endpoints/queries/index.d.ts +6 -0
- package/build/preset/endpoints/queries/index.d.ts.map +1 -0
- package/build/preset/endpoints/queries/index.js +21 -0
- package/build/preset/endpoints/queries/list-public-preset-categories.query.d.ts +28 -0
- package/build/preset/endpoints/queries/list-public-preset-categories.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/list-public-preset-categories.query.js +19 -0
- package/build/preset/endpoints/queries/list-public-presets.query.d.ts +122 -0
- package/build/preset/endpoints/queries/list-public-presets.query.d.ts.map +1 -0
- package/build/preset/endpoints/queries/list-public-presets.query.js +32 -0
- package/build/preset/enums/index.d.ts +10 -0
- package/build/preset/enums/index.d.ts.map +1 -0
- package/build/preset/enums/index.js +25 -0
- package/build/preset/enums/preset-card-media-type.enum.d.ts +6 -0
- package/build/preset/enums/preset-card-media-type.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-card-media-type.enum.js +9 -0
- package/build/preset/enums/preset-example-type.enum.d.ts +5 -0
- package/build/preset/enums/preset-example-type.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-example-type.enum.js +8 -0
- package/build/preset/enums/preset-field-type.enum.d.ts +6 -0
- package/build/preset/enums/preset-field-type.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-field-type.enum.js +9 -0
- package/build/preset/enums/preset-filter.enum.d.ts +6 -0
- package/build/preset/enums/preset-filter.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-filter.enum.js +9 -0
- package/build/preset/enums/preset-limits.d.ts +30 -0
- package/build/preset/enums/preset-limits.d.ts.map +1 -0
- package/build/preset/enums/preset-limits.js +32 -0
- package/build/preset/enums/preset-result-type.enum.d.ts +5 -0
- package/build/preset/enums/preset-result-type.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-result-type.enum.js +8 -0
- package/build/preset/enums/preset-select-display.enum.d.ts +7 -0
- package/build/preset/enums/preset-select-display.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-select-display.enum.js +10 -0
- package/build/preset/enums/preset-status.enum.d.ts +5 -0
- package/build/preset/enums/preset-status.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-status.enum.js +8 -0
- package/build/preset/enums/preset-tool.enum.d.ts +6 -0
- package/build/preset/enums/preset-tool.enum.d.ts.map +1 -0
- package/build/preset/enums/preset-tool.enum.js +9 -0
- package/build/preset/helpers/index.d.ts +3 -0
- package/build/preset/helpers/index.d.ts.map +1 -0
- package/build/preset/helpers/index.js +18 -0
- package/build/preset/helpers/preset-prompt-placeholder.helper.d.ts +4 -0
- package/build/preset/helpers/preset-prompt-placeholder.helper.d.ts.map +1 -0
- package/build/preset/helpers/preset-prompt-placeholder.helper.js +12 -0
- package/build/preset/helpers/preset-tag.helper.d.ts +3 -0
- package/build/preset/helpers/preset-tag.helper.d.ts.map +1 -0
- package/build/preset/helpers/preset-tag.helper.js +9 -0
- package/build/preset/index.d.ts +5 -0
- package/build/preset/index.d.ts.map +1 -0
- package/build/preset/index.js +20 -0
- package/build/preset/models/index.d.ts +9 -0
- package/build/preset/models/index.d.ts.map +1 -0
- package/build/preset/models/index.js +24 -0
- package/build/preset/models/preset-common.schema.d.ts +23 -0
- package/build/preset/models/preset-common.schema.d.ts.map +1 -0
- package/build/preset/models/preset-common.schema.js +26 -0
- package/build/preset/models/preset-field-value.schema.d.ts +51 -0
- package/build/preset/models/preset-field-value.schema.d.ts.map +1 -0
- package/build/preset/models/preset-field-value.schema.js +44 -0
- package/build/preset/models/preset-field.schema.d.ts +310 -0
- package/build/preset/models/preset-field.schema.d.ts.map +1 -0
- package/build/preset/models/preset-field.schema.js +186 -0
- package/build/preset/models/preset-input.schema.d.ts +106 -0
- package/build/preset/models/preset-input.schema.d.ts.map +1 -0
- package/build/preset/models/preset-input.schema.js +97 -0
- package/build/preset/models/preset-media.schema.d.ts +81 -0
- package/build/preset/models/preset-media.schema.d.ts.map +1 -0
- package/build/preset/models/preset-media.schema.js +75 -0
- package/build/preset/models/preset-result.schema.d.ts +23 -0
- package/build/preset/models/preset-result.schema.d.ts.map +1 -0
- package/build/preset/models/preset-result.schema.js +21 -0
- package/build/preset/models/preset-tag.schema.d.ts +10 -0
- package/build/preset/models/preset-tag.schema.d.ts.map +1 -0
- package/build/preset/models/preset-tag.schema.js +11 -0
- package/build/preset/models/public-preset.schema.d.ts +322 -0
- package/build/preset/models/public-preset.schema.d.ts.map +1 -0
- package/build/preset/models/public-preset.schema.js +50 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts +8 -0
- package/build/trend/endpoints/commands/generate-trend.command.d.ts.map +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/chat/endpoints/queries/get-chats.query.ts +4 -1
- package/chat/models/chat-response.schema.ts +2 -0
- package/errors/errors.ts +224 -5
- package/generation-job/endpoints/queries/get-generation-job-history.query.ts +2 -0
- package/generation-job/endpoints/queries/get-generation-jobs.query.ts +2 -0
- package/generation-job/models/generation-job-response.schema.ts +2 -0
- package/generation-job-chat/endpoints/queries/get-generation-job-chats.query.ts +2 -0
- package/generation-job-chat/models/generation-job-chat-response.schema.ts +2 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/preset/endpoints/commands/add-preset-favorite.command.ts +26 -0
- package/preset/endpoints/commands/index.ts +4 -0
- package/preset/endpoints/commands/prepare-preset.command.ts +47 -0
- package/preset/endpoints/commands/remove-preset-favorite.command.ts +26 -0
- package/preset/endpoints/commands/run-preset.command.ts +65 -0
- package/preset/endpoints/index.ts +3 -0
- package/preset/endpoints/preset.ts +18 -0
- package/preset/endpoints/queries/get-preset-price.query.ts +35 -0
- package/preset/endpoints/queries/get-preset-results.query.ts +37 -0
- package/preset/endpoints/queries/get-public-preset-by-slug.query.ts +30 -0
- package/preset/endpoints/queries/index.ts +5 -0
- package/preset/endpoints/queries/list-public-preset-categories.query.ts +20 -0
- package/preset/endpoints/queries/list-public-presets.query.ts +35 -0
- package/preset/enums/index.ts +9 -0
- package/preset/enums/preset-card-media-type.enum.ts +5 -0
- package/preset/enums/preset-example-type.enum.ts +4 -0
- package/preset/enums/preset-field-type.enum.ts +5 -0
- package/preset/enums/preset-filter.enum.ts +5 -0
- package/preset/enums/preset-limits.ts +33 -0
- package/preset/enums/preset-result-type.enum.ts +4 -0
- package/preset/enums/preset-select-display.enum.ts +6 -0
- package/preset/enums/preset-status.enum.ts +4 -0
- package/preset/enums/preset-tool.enum.ts +5 -0
- package/preset/helpers/index.ts +2 -0
- package/preset/helpers/preset-prompt-placeholder.helper.ts +9 -0
- package/preset/helpers/preset-tag.helper.ts +9 -0
- package/preset/index.ts +4 -0
- package/preset/models/index.ts +8 -0
- package/preset/models/preset-common.schema.ts +45 -0
- package/preset/models/preset-field-value.schema.ts +51 -0
- package/preset/models/preset-field.schema.ts +251 -0
- package/preset/models/preset-input.schema.ts +129 -0
- package/preset/models/preset-media.schema.ts +94 -0
- package/preset/models/preset-result.schema.ts +21 -0
- package/preset/models/preset-tag.schema.ts +13 -0
- package/preset/models/public-preset.schema.ts +68 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPresetPriceQuery = exports.GetPresetPriceQueryResponse = exports.GetPresetPriceQueryBody = exports.GetPresetPriceQueryParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const preset_1 = require("../preset");
|
|
8
|
+
const get_public_preset_by_slug_query_1 = require("./get-public-preset-by-slug.query");
|
|
9
|
+
exports.GetPresetPriceQueryParams = get_public_preset_by_slug_query_1.PresetSlugParams;
|
|
10
|
+
exports.GetPresetPriceQueryBody = zod_1.z.object({
|
|
11
|
+
values: models_1.PresetFieldValuesSchema.default([]),
|
|
12
|
+
});
|
|
13
|
+
exports.GetPresetPriceQueryResponse = zod_1.z.object({
|
|
14
|
+
totalCost: zod_1.z.number().nonnegative(),
|
|
15
|
+
});
|
|
16
|
+
exports.GetPresetPriceQuery = (0, _common_1.defineContract)({
|
|
17
|
+
method: _common_1.HTTP_METHODS.POST,
|
|
18
|
+
path: preset_1.PRESET_ROUTES.GET_PRICE(':slug'),
|
|
19
|
+
summary: 'Calculate preset price by model price with fixed params and params of selected options',
|
|
20
|
+
request: {
|
|
21
|
+
params: exports.GetPresetPriceQueryParams,
|
|
22
|
+
body: exports.GetPresetPriceQueryBody,
|
|
23
|
+
},
|
|
24
|
+
responses: {
|
|
25
|
+
200: exports.GetPresetPriceQueryResponse,
|
|
26
|
+
400: _common_1.HttpErrorResponseSchema,
|
|
27
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
28
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetPresetResultsQueryParams: z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const GetPresetResultsQueryQuery: z.ZodObject<{
|
|
7
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const GetPresetResultsQueryResponse: z.ZodObject<{
|
|
10
|
+
total: z.ZodNumber;
|
|
11
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
12
|
+
type: z.ZodLiteral<import("../../enums").PRESET_RESULT_TYPE.GENERATION>;
|
|
13
|
+
jobId: z.ZodUUID;
|
|
14
|
+
jobChatId: z.ZodNullable<z.ZodUUID>;
|
|
15
|
+
outputs: z.ZodArray<z.ZodObject<{
|
|
16
|
+
uuid: z.ZodUUID;
|
|
17
|
+
url: z.ZodURL;
|
|
18
|
+
title: z.ZodOptional<z.ZodString>;
|
|
19
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
20
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
createdAt: z.ZodISODateTime;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
type: z.ZodLiteral<import("../../enums").PRESET_RESULT_TYPE.CHAT>;
|
|
26
|
+
chatId: z.ZodUUID;
|
|
27
|
+
title: z.ZodString;
|
|
28
|
+
createdAt: z.ZodISODateTime;
|
|
29
|
+
}, z.core.$strip>], "type">>;
|
|
30
|
+
}, z.core.$strip>;
|
|
31
|
+
export declare const GetPresetResultsQuery: {
|
|
32
|
+
method: HTTP_METHODS.GET;
|
|
33
|
+
path: string;
|
|
34
|
+
summary: string;
|
|
35
|
+
request: {
|
|
36
|
+
params: z.ZodObject<{
|
|
37
|
+
slug: z.ZodString;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
query: z.ZodObject<{
|
|
40
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
};
|
|
43
|
+
responses: {
|
|
44
|
+
200: z.ZodObject<{
|
|
45
|
+
total: z.ZodNumber;
|
|
46
|
+
items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
47
|
+
type: z.ZodLiteral<import("../../enums").PRESET_RESULT_TYPE.GENERATION>;
|
|
48
|
+
jobId: z.ZodUUID;
|
|
49
|
+
jobChatId: z.ZodNullable<z.ZodUUID>;
|
|
50
|
+
outputs: z.ZodArray<z.ZodObject<{
|
|
51
|
+
uuid: z.ZodUUID;
|
|
52
|
+
url: z.ZodURL;
|
|
53
|
+
title: z.ZodOptional<z.ZodString>;
|
|
54
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
55
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
56
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strip>>;
|
|
58
|
+
createdAt: z.ZodISODateTime;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<import("../../enums").PRESET_RESULT_TYPE.CHAT>;
|
|
61
|
+
chatId: z.ZodUUID;
|
|
62
|
+
title: z.ZodString;
|
|
63
|
+
createdAt: z.ZodISODateTime;
|
|
64
|
+
}, z.core.$strip>], "type">>;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
67
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
68
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
export type GetPresetResultsQueryParamsType = z.infer<typeof GetPresetResultsQueryParams>;
|
|
72
|
+
export type GetPresetResultsQueryQueryType = z.infer<typeof GetPresetResultsQueryQuery>;
|
|
73
|
+
export type GetPresetResultsQueryResponseType = z.infer<typeof GetPresetResultsQueryResponse>;
|
|
74
|
+
//# sourceMappingURL=get-preset-results.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-preset-results.query.d.ts","sourceRoot":"","sources":["../../../../preset/endpoints/queries/get-preset-results.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAMzF,eAAO,MAAM,2BAA2B;;iBAAmB,CAAC;AAE5D,eAAO,MAAM,0BAA0B;;iBAErC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;iBAGxC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAchC,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAC1F,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AACxF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPresetResultsQuery = exports.GetPresetResultsQueryResponse = exports.GetPresetResultsQueryQuery = exports.GetPresetResultsQueryParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const enums_1 = require("../../enums");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const preset_1 = require("../preset");
|
|
9
|
+
const get_public_preset_by_slug_query_1 = require("./get-public-preset-by-slug.query");
|
|
10
|
+
exports.GetPresetResultsQueryParams = get_public_preset_by_slug_query_1.PresetSlugParams;
|
|
11
|
+
exports.GetPresetResultsQueryQuery = zod_1.z.object({
|
|
12
|
+
limit: zod_1.z.coerce.number().int().min(1).max(enums_1.PRESET_RESULTS_MAX_LIMIT).default(enums_1.PRESET_RESULTS_DEFAULT_LIMIT),
|
|
13
|
+
});
|
|
14
|
+
exports.GetPresetResultsQueryResponse = zod_1.z.object({
|
|
15
|
+
total: zod_1.z.number().int().nonnegative(),
|
|
16
|
+
items: zod_1.z.array(models_1.PresetResultItemSchema),
|
|
17
|
+
});
|
|
18
|
+
exports.GetPresetResultsQuery = (0, _common_1.defineContract)({
|
|
19
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
20
|
+
path: preset_1.PRESET_ROUTES.GET_RESULTS(':slug'),
|
|
21
|
+
summary: 'Count and latest results of the current user made through the preset',
|
|
22
|
+
request: {
|
|
23
|
+
params: exports.GetPresetResultsQueryParams,
|
|
24
|
+
query: exports.GetPresetResultsQueryQuery,
|
|
25
|
+
},
|
|
26
|
+
responses: {
|
|
27
|
+
200: exports.GetPresetResultsQueryResponse,
|
|
28
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
30
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const PresetSlugParams: z.ZodObject<{
|
|
4
|
+
slug: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const GetPublicPresetBySlugQueryParams: z.ZodObject<{
|
|
7
|
+
slug: z.ZodString;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const GetPublicPresetBySlugQueryResponse: z.ZodObject<{
|
|
10
|
+
uuid: z.ZodUUID;
|
|
11
|
+
slug: z.ZodString;
|
|
12
|
+
title: z.ZodString;
|
|
13
|
+
shortDescription: z.ZodString;
|
|
14
|
+
badge: z.ZodNullable<z.ZodString>;
|
|
15
|
+
tool: z.ZodEnum<typeof import("../..").PRESET_TOOL>;
|
|
16
|
+
cardMedia: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
17
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.IMAGE>;
|
|
18
|
+
image: z.ZodObject<{
|
|
19
|
+
uuid: z.ZodUUID;
|
|
20
|
+
url: z.ZodURL;
|
|
21
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
24
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.COMPARE>;
|
|
25
|
+
before: z.ZodObject<{
|
|
26
|
+
uuid: z.ZodUUID;
|
|
27
|
+
url: z.ZodURL;
|
|
28
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
29
|
+
}, z.core.$strip>;
|
|
30
|
+
after: z.ZodObject<{
|
|
31
|
+
uuid: z.ZodUUID;
|
|
32
|
+
url: z.ZodURL;
|
|
33
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.VIDEO>;
|
|
37
|
+
video: z.ZodObject<{
|
|
38
|
+
uuid: z.ZodUUID;
|
|
39
|
+
url: z.ZodURL;
|
|
40
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
cover: z.ZodObject<{
|
|
43
|
+
uuid: z.ZodUUID;
|
|
44
|
+
url: z.ZodURL;
|
|
45
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
}, z.core.$strip>], "type">;
|
|
48
|
+
isFavorite: z.ZodBoolean;
|
|
49
|
+
description: z.ZodString;
|
|
50
|
+
category: z.ZodObject<{
|
|
51
|
+
uuid: z.ZodUUID;
|
|
52
|
+
slug: z.ZodString;
|
|
53
|
+
name: z.ZodString;
|
|
54
|
+
icon: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
model: z.ZodObject<{
|
|
57
|
+
uuid: z.ZodUUID;
|
|
58
|
+
title: z.ZodString;
|
|
59
|
+
icons: z.ZodObject<{
|
|
60
|
+
light: z.ZodString;
|
|
61
|
+
dark: z.ZodString;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
}, z.core.$strip>;
|
|
64
|
+
promptTemplate: z.ZodString;
|
|
65
|
+
fixedParams: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
66
|
+
chatOptions: z.ZodNullable<z.ZodObject<{
|
|
67
|
+
reasoning: z.ZodDefault<z.ZodBoolean>;
|
|
68
|
+
webSearch: z.ZodDefault<z.ZodBoolean>;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
example: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<import("../..").PRESET_EXAMPLE_TYPE.MEDIA>;
|
|
72
|
+
items: z.ZodArray<z.ZodObject<{
|
|
73
|
+
file: z.ZodObject<{
|
|
74
|
+
uuid: z.ZodUUID;
|
|
75
|
+
url: z.ZodURL;
|
|
76
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
79
|
+
note: z.ZodNullable<z.ZodString>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
82
|
+
type: z.ZodLiteral<import("../..").PRESET_EXAMPLE_TYPE.TEXT>;
|
|
83
|
+
context: z.ZodNullable<z.ZodString>;
|
|
84
|
+
source: z.ZodNullable<z.ZodString>;
|
|
85
|
+
text: z.ZodString;
|
|
86
|
+
}, z.core.$strip>], "type">>;
|
|
87
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
88
|
+
key: z.ZodString;
|
|
89
|
+
label: z.ZodString;
|
|
90
|
+
required: z.ZodBoolean;
|
|
91
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
92
|
+
key: z.ZodString;
|
|
93
|
+
values: z.ZodArray<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.FILE>;
|
|
96
|
+
slot: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
97
|
+
minCount: z.ZodDefault<z.ZodInt>;
|
|
98
|
+
maxCount: z.ZodInt;
|
|
99
|
+
hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
100
|
+
promptValue: z.ZodString;
|
|
101
|
+
promptFallback: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
102
|
+
slotPolicy: z.ZodNullable<z.ZodObject<{
|
|
103
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
104
|
+
required: z.ZodBoolean;
|
|
105
|
+
maxCount: z.ZodInt;
|
|
106
|
+
allowedFormats: z.ZodObject<{
|
|
107
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
108
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
109
|
+
maxSize: z.ZodInt;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
112
|
+
minDurationSec: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
maxDurationSec: z.ZodOptional<z.ZodNumber>;
|
|
114
|
+
minSidePx: z.ZodOptional<z.ZodInt>;
|
|
115
|
+
maxSidePx: z.ZodOptional<z.ZodInt>;
|
|
116
|
+
minAspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
maxAspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
120
|
+
key: z.ZodString;
|
|
121
|
+
label: z.ZodString;
|
|
122
|
+
required: z.ZodBoolean;
|
|
123
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
124
|
+
key: z.ZodString;
|
|
125
|
+
values: z.ZodArray<z.ZodString>;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.SELECT>;
|
|
128
|
+
display: z.ZodDefault<z.ZodEnum<typeof import("../..").PRESET_SELECT_DISPLAY>>;
|
|
129
|
+
multiple: z.ZodDefault<z.ZodBoolean>;
|
|
130
|
+
defaultValues: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
131
|
+
allowCustom: z.ZodDefault<z.ZodBoolean>;
|
|
132
|
+
customMaxLength: z.ZodDefault<z.ZodInt>;
|
|
133
|
+
customPlaceholder: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
134
|
+
options: z.ZodArray<z.ZodObject<{
|
|
135
|
+
value: z.ZodString;
|
|
136
|
+
label: z.ZodString;
|
|
137
|
+
promptValue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
138
|
+
params: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
139
|
+
previewFile: z.ZodNullable<z.ZodObject<{
|
|
140
|
+
uuid: z.ZodUUID;
|
|
141
|
+
url: z.ZodURL;
|
|
142
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
146
|
+
key: z.ZodString;
|
|
147
|
+
label: z.ZodString;
|
|
148
|
+
required: z.ZodBoolean;
|
|
149
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
150
|
+
key: z.ZodString;
|
|
151
|
+
values: z.ZodArray<z.ZodString>;
|
|
152
|
+
}, z.core.$strip>>>;
|
|
153
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.TEXT>;
|
|
154
|
+
placeholder: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
155
|
+
multiline: z.ZodDefault<z.ZodBoolean>;
|
|
156
|
+
maxLength: z.ZodDefault<z.ZodInt>;
|
|
157
|
+
defaultValue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
158
|
+
promptFallback: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
159
|
+
}, z.core.$strip>], "type">>;
|
|
160
|
+
requireOneOf: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
161
|
+
startPrice: z.ZodNumber;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
export declare const GetPublicPresetBySlugQuery: {
|
|
164
|
+
method: HTTP_METHODS.GET;
|
|
165
|
+
path: string;
|
|
166
|
+
summary: string;
|
|
167
|
+
request: {
|
|
168
|
+
params: z.ZodObject<{
|
|
169
|
+
slug: z.ZodString;
|
|
170
|
+
}, z.core.$strip>;
|
|
171
|
+
};
|
|
172
|
+
responses: {
|
|
173
|
+
200: z.ZodObject<{
|
|
174
|
+
uuid: z.ZodUUID;
|
|
175
|
+
slug: z.ZodString;
|
|
176
|
+
title: z.ZodString;
|
|
177
|
+
shortDescription: z.ZodString;
|
|
178
|
+
badge: z.ZodNullable<z.ZodString>;
|
|
179
|
+
tool: z.ZodEnum<typeof import("../..").PRESET_TOOL>;
|
|
180
|
+
cardMedia: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
181
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.IMAGE>;
|
|
182
|
+
image: z.ZodObject<{
|
|
183
|
+
uuid: z.ZodUUID;
|
|
184
|
+
url: z.ZodURL;
|
|
185
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.COMPARE>;
|
|
189
|
+
before: z.ZodObject<{
|
|
190
|
+
uuid: z.ZodUUID;
|
|
191
|
+
url: z.ZodURL;
|
|
192
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
193
|
+
}, z.core.$strip>;
|
|
194
|
+
after: z.ZodObject<{
|
|
195
|
+
uuid: z.ZodUUID;
|
|
196
|
+
url: z.ZodURL;
|
|
197
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
198
|
+
}, z.core.$strip>;
|
|
199
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
200
|
+
type: z.ZodLiteral<import("../..").PRESET_CARD_MEDIA_TYPE.VIDEO>;
|
|
201
|
+
video: z.ZodObject<{
|
|
202
|
+
uuid: z.ZodUUID;
|
|
203
|
+
url: z.ZodURL;
|
|
204
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
205
|
+
}, z.core.$strip>;
|
|
206
|
+
cover: z.ZodObject<{
|
|
207
|
+
uuid: z.ZodUUID;
|
|
208
|
+
url: z.ZodURL;
|
|
209
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
210
|
+
}, z.core.$strip>;
|
|
211
|
+
}, z.core.$strip>], "type">;
|
|
212
|
+
isFavorite: z.ZodBoolean;
|
|
213
|
+
description: z.ZodString;
|
|
214
|
+
category: z.ZodObject<{
|
|
215
|
+
uuid: z.ZodUUID;
|
|
216
|
+
slug: z.ZodString;
|
|
217
|
+
name: z.ZodString;
|
|
218
|
+
icon: z.ZodString;
|
|
219
|
+
}, z.core.$strip>;
|
|
220
|
+
model: z.ZodObject<{
|
|
221
|
+
uuid: z.ZodUUID;
|
|
222
|
+
title: z.ZodString;
|
|
223
|
+
icons: z.ZodObject<{
|
|
224
|
+
light: z.ZodString;
|
|
225
|
+
dark: z.ZodString;
|
|
226
|
+
}, z.core.$strip>;
|
|
227
|
+
}, z.core.$strip>;
|
|
228
|
+
promptTemplate: z.ZodString;
|
|
229
|
+
fixedParams: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
230
|
+
chatOptions: z.ZodNullable<z.ZodObject<{
|
|
231
|
+
reasoning: z.ZodDefault<z.ZodBoolean>;
|
|
232
|
+
webSearch: z.ZodDefault<z.ZodBoolean>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
example: z.ZodNullable<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
235
|
+
type: z.ZodLiteral<import("../..").PRESET_EXAMPLE_TYPE.MEDIA>;
|
|
236
|
+
items: z.ZodArray<z.ZodObject<{
|
|
237
|
+
file: z.ZodObject<{
|
|
238
|
+
uuid: z.ZodUUID;
|
|
239
|
+
url: z.ZodURL;
|
|
240
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
241
|
+
}, z.core.$strip>;
|
|
242
|
+
caption: z.ZodNullable<z.ZodString>;
|
|
243
|
+
note: z.ZodNullable<z.ZodString>;
|
|
244
|
+
}, z.core.$strip>>;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
type: z.ZodLiteral<import("../..").PRESET_EXAMPLE_TYPE.TEXT>;
|
|
247
|
+
context: z.ZodNullable<z.ZodString>;
|
|
248
|
+
source: z.ZodNullable<z.ZodString>;
|
|
249
|
+
text: z.ZodString;
|
|
250
|
+
}, z.core.$strip>], "type">>;
|
|
251
|
+
fields: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
252
|
+
key: z.ZodString;
|
|
253
|
+
label: z.ZodString;
|
|
254
|
+
required: z.ZodBoolean;
|
|
255
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
256
|
+
key: z.ZodString;
|
|
257
|
+
values: z.ZodArray<z.ZodString>;
|
|
258
|
+
}, z.core.$strip>>>;
|
|
259
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.FILE>;
|
|
260
|
+
slot: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
261
|
+
minCount: z.ZodDefault<z.ZodInt>;
|
|
262
|
+
maxCount: z.ZodInt;
|
|
263
|
+
hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
264
|
+
promptValue: z.ZodString;
|
|
265
|
+
promptFallback: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
266
|
+
slotPolicy: z.ZodNullable<z.ZodObject<{
|
|
267
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
268
|
+
required: z.ZodBoolean;
|
|
269
|
+
maxCount: z.ZodInt;
|
|
270
|
+
allowedFormats: z.ZodObject<{
|
|
271
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
272
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
273
|
+
maxSize: z.ZodInt;
|
|
274
|
+
}, z.core.$strip>;
|
|
275
|
+
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
276
|
+
minDurationSec: z.ZodOptional<z.ZodNumber>;
|
|
277
|
+
maxDurationSec: z.ZodOptional<z.ZodNumber>;
|
|
278
|
+
minSidePx: z.ZodOptional<z.ZodInt>;
|
|
279
|
+
maxSidePx: z.ZodOptional<z.ZodInt>;
|
|
280
|
+
minAspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
maxAspectRatio: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
}, z.core.$strip>>;
|
|
283
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
284
|
+
key: z.ZodString;
|
|
285
|
+
label: z.ZodString;
|
|
286
|
+
required: z.ZodBoolean;
|
|
287
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
288
|
+
key: z.ZodString;
|
|
289
|
+
values: z.ZodArray<z.ZodString>;
|
|
290
|
+
}, z.core.$strip>>>;
|
|
291
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.SELECT>;
|
|
292
|
+
display: z.ZodDefault<z.ZodEnum<typeof import("../..").PRESET_SELECT_DISPLAY>>;
|
|
293
|
+
multiple: z.ZodDefault<z.ZodBoolean>;
|
|
294
|
+
defaultValues: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
295
|
+
allowCustom: z.ZodDefault<z.ZodBoolean>;
|
|
296
|
+
customMaxLength: z.ZodDefault<z.ZodInt>;
|
|
297
|
+
customPlaceholder: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
298
|
+
options: z.ZodArray<z.ZodObject<{
|
|
299
|
+
value: z.ZodString;
|
|
300
|
+
label: z.ZodString;
|
|
301
|
+
promptValue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
302
|
+
params: z.ZodDefault<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
303
|
+
previewFile: z.ZodNullable<z.ZodObject<{
|
|
304
|
+
uuid: z.ZodUUID;
|
|
305
|
+
url: z.ZodURL;
|
|
306
|
+
thumbnailUrl: z.ZodNullable<z.ZodURL>;
|
|
307
|
+
}, z.core.$strip>>;
|
|
308
|
+
}, z.core.$strip>>;
|
|
309
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
310
|
+
key: z.ZodString;
|
|
311
|
+
label: z.ZodString;
|
|
312
|
+
required: z.ZodBoolean;
|
|
313
|
+
showIf: z.ZodDefault<z.ZodNullable<z.ZodObject<{
|
|
314
|
+
key: z.ZodString;
|
|
315
|
+
values: z.ZodArray<z.ZodString>;
|
|
316
|
+
}, z.core.$strip>>>;
|
|
317
|
+
type: z.ZodLiteral<import("../..").PRESET_FIELD_TYPE.TEXT>;
|
|
318
|
+
placeholder: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
319
|
+
multiline: z.ZodDefault<z.ZodBoolean>;
|
|
320
|
+
maxLength: z.ZodDefault<z.ZodInt>;
|
|
321
|
+
defaultValue: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
322
|
+
promptFallback: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
323
|
+
}, z.core.$strip>], "type">>;
|
|
324
|
+
requireOneOf: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
325
|
+
startPrice: z.ZodNumber;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
328
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
export type PresetSlugParamsType = z.infer<typeof PresetSlugParams>;
|
|
332
|
+
export type GetPublicPresetBySlugQueryParamsType = z.infer<typeof GetPublicPresetBySlugQueryParams>;
|
|
333
|
+
export type GetPublicPresetBySlugQueryResponseType = z.infer<typeof GetPublicPresetBySlugQueryResponse>;
|
|
334
|
+
//# sourceMappingURL=get-public-preset-by-slug.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-public-preset-by-slug.query.d.ts","sourceRoot":"","sources":["../../../../preset/endpoints/queries/get-public-preset-by-slug.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC;AAEH,eAAO,MAAM,gCAAgC;;iBAAmB,CAAC;AAEjE,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAqB,CAAC;AAErE,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACpE,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AACpG,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetPublicPresetBySlugQuery = exports.GetPublicPresetBySlugQueryResponse = exports.GetPublicPresetBySlugQueryParams = exports.PresetSlugParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const preset_1 = require("../preset");
|
|
8
|
+
exports.PresetSlugParams = zod_1.z.object({
|
|
9
|
+
slug: models_1.PresetSlugSchema,
|
|
10
|
+
});
|
|
11
|
+
exports.GetPublicPresetBySlugQueryParams = exports.PresetSlugParams;
|
|
12
|
+
exports.GetPublicPresetBySlugQueryResponse = models_1.PublicPresetSchema;
|
|
13
|
+
exports.GetPublicPresetBySlugQuery = (0, _common_1.defineContract)({
|
|
14
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
15
|
+
path: preset_1.PRESET_ROUTES.GET_BY_SLUG(':slug'),
|
|
16
|
+
summary: 'Get published preset with fields, model attachment limits, example and start price',
|
|
17
|
+
request: {
|
|
18
|
+
params: exports.GetPublicPresetBySlugQueryParams,
|
|
19
|
+
},
|
|
20
|
+
responses: {
|
|
21
|
+
200: exports.GetPublicPresetBySlugQueryResponse,
|
|
22
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './list-public-preset-categories.query';
|
|
2
|
+
export * from './list-public-presets.query';
|
|
3
|
+
export * from './get-public-preset-by-slug.query';
|
|
4
|
+
export * from './get-preset-price.query';
|
|
5
|
+
export * from './get-preset-results.query';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../preset/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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("./list-public-preset-categories.query"), exports);
|
|
18
|
+
__exportStar(require("./list-public-presets.query"), exports);
|
|
19
|
+
__exportStar(require("./get-public-preset-by-slug.query"), exports);
|
|
20
|
+
__exportStar(require("./get-preset-price.query"), exports);
|
|
21
|
+
__exportStar(require("./get-preset-results.query"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const ListPublicPresetCategoriesQueryResponse: z.ZodObject<{
|
|
4
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
5
|
+
uuid: z.ZodUUID;
|
|
6
|
+
slug: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
icon: z.ZodString;
|
|
9
|
+
}, z.core.$strip>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const ListPublicPresetCategoriesQuery: {
|
|
12
|
+
method: HTTP_METHODS.GET;
|
|
13
|
+
path: "";
|
|
14
|
+
summary: string;
|
|
15
|
+
responses: {
|
|
16
|
+
200: z.ZodObject<{
|
|
17
|
+
categories: z.ZodArray<z.ZodObject<{
|
|
18
|
+
uuid: z.ZodUUID;
|
|
19
|
+
slug: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
icon: z.ZodString;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type ListPublicPresetCategoriesQueryResponseType = z.infer<typeof ListPublicPresetCategoriesQueryResponse>;
|
|
28
|
+
//# sourceMappingURL=list-public-preset-categories.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-public-preset-categories.query.d.ts","sourceRoot":"","sources":["../../../../preset/endpoints/queries/list-public-preset-categories.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,uCAAuC;;;;;;;iBAElD,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;CAQ1C,CAAC;AAEH,MAAM,MAAM,2CAA2C,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ListPublicPresetCategoriesQuery = exports.ListPublicPresetCategoriesQueryResponse = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const preset_1 = require("../preset");
|
|
8
|
+
exports.ListPublicPresetCategoriesQueryResponse = zod_1.z.object({
|
|
9
|
+
categories: zod_1.z.array(models_1.PublicPresetCategorySchema),
|
|
10
|
+
});
|
|
11
|
+
exports.ListPublicPresetCategoriesQuery = (0, _common_1.defineContract)({
|
|
12
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
13
|
+
path: preset_1.PRESET_CATEGORY_ROUTES.LIST,
|
|
14
|
+
summary: 'List active preset categories ordered by admin order',
|
|
15
|
+
responses: {
|
|
16
|
+
200: exports.ListPublicPresetCategoriesQueryResponse,
|
|
17
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
18
|
+
},
|
|
19
|
+
});
|