@ai-grator/api 0.1.23 → 0.1.24
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/errors/errors.d.ts +6 -1
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +6 -1
- package/build/file/enums/file.enum.d.ts +1 -0
- package/build/file/enums/file.enum.d.ts.map +1 -1
- package/build/file/enums/file.enum.js +59 -59
- package/build/file/helpers/allowed-file-formats.helper.d.ts +4 -0
- package/build/file/helpers/allowed-file-formats.helper.d.ts.map +1 -0
- package/build/file/helpers/allowed-file-formats.helper.js +15 -0
- package/build/file/helpers/index.d.ts +2 -0
- package/build/file/helpers/index.d.ts.map +1 -0
- package/build/file/helpers/index.js +17 -0
- package/build/file/index.d.ts +1 -0
- package/build/file/index.d.ts.map +1 -1
- package/build/file/index.js +1 -0
- package/build/file/models/file-format-list.schema.d.ts +8 -0
- package/build/file/models/file-format-list.schema.d.ts.map +1 -0
- package/build/file/models/file-format-list.schema.js +9 -0
- package/build/file/models/index.d.ts +1 -0
- package/build/file/models/index.d.ts.map +1 -1
- package/build/file/models/index.js +1 -0
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts +20 -2
- package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map +1 -1
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts +20 -2
- package/build/generation-model/endpoints/queries/get-generation-models.query.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.d.ts +31 -1
- package/build/generation-model/models/generation-model-response.schema.d.ts.map +1 -1
- package/build/generation-model/models/generation-model-response.schema.js +10 -2
- package/build/marketplace-card/endpoints/marketplace-card.d.ts +1 -0
- package/build/marketplace-card/endpoints/marketplace-card.d.ts.map +1 -1
- package/build/marketplace-card/endpoints/marketplace-card.js +1 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts +27 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-config.query.js +20 -0
- package/build/marketplace-card/endpoints/queries/index.d.ts +1 -0
- package/build/marketplace-card/endpoints/queries/index.d.ts.map +1 -1
- package/build/marketplace-card/endpoints/queries/index.js +1 -0
- package/build/scripts/generate-openapi.js +3 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +6 -1
- package/file/enums/file.enum.ts +60 -59
- package/file/helpers/allowed-file-formats.helper.ts +16 -0
- package/file/helpers/index.ts +1 -0
- package/file/index.ts +1 -0
- package/file/models/file-format-list.schema.ts +9 -0
- package/file/models/index.ts +1 -0
- package/generation-model/models/generation-model-response.schema.ts +11 -1
- package/marketplace-card/endpoints/marketplace-card.ts +1 -0
- package/marketplace-card/endpoints/queries/get-marketplace-card-config.query.ts +21 -0
- package/marketplace-card/endpoints/queries/index.ts +1 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +6 -0
package/build/errors/errors.d.ts
CHANGED
|
@@ -328,10 +328,15 @@ export declare const ERRORS: {
|
|
|
328
328
|
readonly code: "GENERATION_JOB.INVALID_ATTACHMENT_FILE_TYPE";
|
|
329
329
|
readonly message: "Один или несколько прикреплённых файлов имеют тип файла, не принятый слотом";
|
|
330
330
|
};
|
|
331
|
+
readonly INVALID_ATTACHMENT_FILE_FORMAT: {
|
|
332
|
+
readonly httpCode: 400;
|
|
333
|
+
readonly code: "GENERATION_JOB.INVALID_ATTACHMENT_FILE_FORMAT";
|
|
334
|
+
readonly message: "Один или несколько прикреплённых файлов имеют формат, не поддерживаемый этой моделью";
|
|
335
|
+
};
|
|
331
336
|
readonly ATTACHMENT_SLOT_NOT_MULTIPLE: {
|
|
332
337
|
readonly httpCode: 400;
|
|
333
338
|
readonly code: "GENERATION_JOB.ATTACHMENT_SLOT_NOT_MULTIPLE";
|
|
334
|
-
readonly message: "
|
|
339
|
+
readonly message: "Превышено максимальное количество файлов для этого слота вложения";
|
|
335
340
|
};
|
|
336
341
|
readonly CHAT_MODEL_MISMATCH: {
|
|
337
342
|
readonly httpCode: 400;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmyBT,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -331,10 +331,15 @@ exports.ERRORS = {
|
|
|
331
331
|
code: 'GENERATION_JOB.INVALID_ATTACHMENT_FILE_TYPE',
|
|
332
332
|
message: 'Один или несколько прикреплённых файлов имеют тип файла, не принятый слотом',
|
|
333
333
|
},
|
|
334
|
+
INVALID_ATTACHMENT_FILE_FORMAT: {
|
|
335
|
+
httpCode: 400,
|
|
336
|
+
code: 'GENERATION_JOB.INVALID_ATTACHMENT_FILE_FORMAT',
|
|
337
|
+
message: 'Один или несколько прикреплённых файлов имеют формат, не поддерживаемый этой моделью',
|
|
338
|
+
},
|
|
334
339
|
ATTACHMENT_SLOT_NOT_MULTIPLE: {
|
|
335
340
|
httpCode: 400,
|
|
336
341
|
code: 'GENERATION_JOB.ATTACHMENT_SLOT_NOT_MULTIPLE',
|
|
337
|
-
message: '
|
|
342
|
+
message: 'Превышено максимальное количество файлов для этого слота вложения',
|
|
338
343
|
},
|
|
339
344
|
CHAT_MODEL_MISMATCH: {
|
|
340
345
|
httpCode: 400,
|
|
@@ -15,6 +15,7 @@ export declare const MAX_VIDEO_UPLOAD_SIZE: number;
|
|
|
15
15
|
export declare const SUPPORTED_FILES: Map<string, {
|
|
16
16
|
type: FILE_TYPE;
|
|
17
17
|
size: number;
|
|
18
|
+
extension: string;
|
|
18
19
|
}>;
|
|
19
20
|
export declare const DELETE_UNUSED_FILES_AFTER_HOURS = 12;
|
|
20
21
|
//# sourceMappingURL=file.enum.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.enum.d.ts","sourceRoot":"","sources":["../../../file/enums/file.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AACtD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAClD,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AACrD,eAAO,MAAM,wBAAwB,QAAmB,CAAC;AACzD,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AACtD,eAAO,MAAM,qBAAqB,QAAoB,CAAC;AAEvD,eAAO,MAAM,eAAe;UAGd,SAAS;UACT,MAAM;EA+
|
|
1
|
+
{"version":3,"file":"file.enum.d.ts","sourceRoot":"","sources":["../../../file/enums/file.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,SAAS;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AACtD,eAAO,MAAM,iBAAiB,QAAmB,CAAC;AAClD,eAAO,MAAM,oBAAoB,QAAmB,CAAC;AACrD,eAAO,MAAM,wBAAwB,QAAmB,CAAC;AACzD,eAAO,MAAM,qBAAqB,QAAmB,CAAC;AACtD,eAAO,MAAM,qBAAqB,QAAoB,CAAC;AAEvD,eAAO,MAAM,eAAe;UAGd,SAAS;UACT,MAAM;eACD,MAAM;EA+EvB,CAAC;AAEH,eAAO,MAAM,+BAA+B,KAAK,CAAC"}
|
|
@@ -17,73 +17,73 @@ exports.MAX_DOCUMENT_UPLOAD_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
|
17
17
|
exports.MAX_AUDIO_UPLOAD_SIZE = 50 * 1024 * 1024; // 50 MB
|
|
18
18
|
exports.MAX_VIDEO_UPLOAD_SIZE = 100 * 1024 * 1024; // 100 MB
|
|
19
19
|
exports.SUPPORTED_FILES = new Map([
|
|
20
|
-
['application/json', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
21
|
-
['application/x-ndjson', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
22
|
-
['application/x-yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
23
|
-
['application/toml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
24
|
-
['application/xml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
25
|
-
['application/graphql', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
26
|
-
['text/csv', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
27
|
-
['text/tab-separated-values', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
28
|
-
['text/markdown', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
29
|
-
['text/x-markdown', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
30
|
-
['text/yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
31
|
-
['text/x-yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
32
|
-
['text/xml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
33
|
-
['text/plain', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
34
|
-
['text/html', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
35
|
-
['text/css', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
36
|
-
['text/x-scss', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
37
|
-
['text/javascript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
38
|
-
['application/javascript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
39
|
-
['text/typescript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
40
|
-
['application/typescript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
41
|
-
['text/x-python', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
42
|
-
['text/x-go', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
43
|
-
['text/x-ruby', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
44
|
-
['text/x-php', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
45
|
-
['text/x-c', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
46
|
-
['text/x-c++', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
47
|
-
['text/x-java-source', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
48
|
-
['text/x-sql', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
49
|
-
['application/x-sh', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
50
|
-
['text/x-shellscript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
51
|
-
['text/x-ini', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
52
|
-
['text/x-properties', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
53
|
-
['text/x-config', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE }],
|
|
54
|
-
['image/png', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
55
|
-
['image/jpeg', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
56
|
-
['image/webp', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
57
|
-
['image/avif', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
58
|
-
['image/gif', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
59
|
-
['image/svg+xml', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE }],
|
|
60
|
-
['application/pdf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE }],
|
|
20
|
+
['application/json', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'json' }],
|
|
21
|
+
['application/x-ndjson', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'ndjson' }],
|
|
22
|
+
['application/x-yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'yaml' }],
|
|
23
|
+
['application/toml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'toml' }],
|
|
24
|
+
['application/xml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'xml' }],
|
|
25
|
+
['application/graphql', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'graphql' }],
|
|
26
|
+
['text/csv', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'csv' }],
|
|
27
|
+
['text/tab-separated-values', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'tsv' }],
|
|
28
|
+
['text/markdown', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'md' }],
|
|
29
|
+
['text/x-markdown', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'md' }],
|
|
30
|
+
['text/yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'yaml' }],
|
|
31
|
+
['text/x-yaml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'yaml' }],
|
|
32
|
+
['text/xml', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'xml' }],
|
|
33
|
+
['text/plain', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'txt' }],
|
|
34
|
+
['text/html', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'html' }],
|
|
35
|
+
['text/css', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'css' }],
|
|
36
|
+
['text/x-scss', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'scss' }],
|
|
37
|
+
['text/javascript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'js' }],
|
|
38
|
+
['application/javascript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'js' }],
|
|
39
|
+
['text/typescript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'ts' }],
|
|
40
|
+
['application/typescript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'ts' }],
|
|
41
|
+
['text/x-python', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'py' }],
|
|
42
|
+
['text/x-go', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'go' }],
|
|
43
|
+
['text/x-ruby', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'rb' }],
|
|
44
|
+
['text/x-php', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'php' }],
|
|
45
|
+
['text/x-c', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'c' }],
|
|
46
|
+
['text/x-c++', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'cpp' }],
|
|
47
|
+
['text/x-java-source', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'java' }],
|
|
48
|
+
['text/x-sql', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'sql' }],
|
|
49
|
+
['application/x-sh', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'sh' }],
|
|
50
|
+
['text/x-shellscript', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'sh' }],
|
|
51
|
+
['text/x-ini', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'ini' }],
|
|
52
|
+
['text/x-properties', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'properties' }],
|
|
53
|
+
['text/x-config', { type: FILE_TYPE.TEXT, size: exports.MAX_TEXT_UPLOAD_SIZE, extension: 'conf' }],
|
|
54
|
+
['image/png', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'png' }],
|
|
55
|
+
['image/jpeg', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'jpg' }],
|
|
56
|
+
['image/webp', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'webp' }],
|
|
57
|
+
['image/avif', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'avif' }],
|
|
58
|
+
['image/gif', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'gif' }],
|
|
59
|
+
['image/svg+xml', { type: FILE_TYPE.IMAGE, size: exports.MAX_IMAGE_UPLOAD_SIZE, extension: 'svg' }],
|
|
60
|
+
['application/pdf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'pdf' }],
|
|
61
61
|
[
|
|
62
62
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
63
|
-
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE },
|
|
63
|
+
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'docx' },
|
|
64
64
|
],
|
|
65
|
-
['application/vnd.ms-excel', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE }],
|
|
65
|
+
['application/vnd.ms-excel', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'xls' }],
|
|
66
66
|
[
|
|
67
67
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
68
|
-
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE },
|
|
68
|
+
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'xlsx' },
|
|
69
69
|
],
|
|
70
70
|
[
|
|
71
71
|
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
72
|
-
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE },
|
|
72
|
+
{ type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'pptx' },
|
|
73
73
|
],
|
|
74
|
-
['application/rtf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE }],
|
|
75
|
-
['text/rtf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE }],
|
|
76
|
-
['audio/mpeg', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
77
|
-
['audio/mp4', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
78
|
-
['audio/wav', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
79
|
-
['audio/x-wav', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
80
|
-
['audio/webm', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
81
|
-
['audio/ogg', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
82
|
-
['audio/aac', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE }],
|
|
83
|
-
['video/mp4', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE }],
|
|
84
|
-
['video/mpeg', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE }],
|
|
85
|
-
['video/webm', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE }],
|
|
86
|
-
['video/quicktime', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE }],
|
|
87
|
-
['video/ogg', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE }],
|
|
74
|
+
['application/rtf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'rtf' }],
|
|
75
|
+
['text/rtf', { type: FILE_TYPE.DOCUMENT, size: exports.MAX_DOCUMENT_UPLOAD_SIZE, extension: 'rtf' }],
|
|
76
|
+
['audio/mpeg', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'mp3' }],
|
|
77
|
+
['audio/mp4', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'm4a' }],
|
|
78
|
+
['audio/wav', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'wav' }],
|
|
79
|
+
['audio/x-wav', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'wav' }],
|
|
80
|
+
['audio/webm', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'weba' }],
|
|
81
|
+
['audio/ogg', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'ogg' }],
|
|
82
|
+
['audio/aac', { type: FILE_TYPE.AUDIO, size: exports.MAX_AUDIO_UPLOAD_SIZE, extension: 'aac' }],
|
|
83
|
+
['video/mp4', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE, extension: 'mp4' }],
|
|
84
|
+
['video/mpeg', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE, extension: 'mpeg' }],
|
|
85
|
+
['video/webm', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE, extension: 'webm' }],
|
|
86
|
+
['video/quicktime', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE, extension: 'mov' }],
|
|
87
|
+
['video/ogg', { type: FILE_TYPE.VIDEO, size: exports.MAX_VIDEO_UPLOAD_SIZE, extension: 'ogv' }],
|
|
88
88
|
]);
|
|
89
89
|
exports.DELETE_UNUSED_FILES_AFTER_HOURS = 12;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowed-file-formats.helper.d.ts","sourceRoot":"","sources":["../../../file/helpers/allowed-file-formats.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAmB,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAErD,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,GAAG,wBAAwB,CAYnF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAllowedFileFormats = getAllowedFileFormats;
|
|
4
|
+
const enums_1 = require("../enums");
|
|
5
|
+
function getAllowedFileFormats(fileType) {
|
|
6
|
+
const entries = [...enums_1.SUPPORTED_FILES.entries()].filter(([, value]) => value.type === fileType);
|
|
7
|
+
if (entries.length === 0) {
|
|
8
|
+
throw new Error(`No SUPPORTED_FILES entries registered for FILE_TYPE.${fileType}`);
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
mimeTypes: entries.map(([mimeType]) => mimeType),
|
|
12
|
+
extensions: [...new Set(entries.map(([, value]) => value.extension))],
|
|
13
|
+
maxSize: Math.min(...entries.map(([, value]) => value.size)),
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../file/helpers/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("./allowed-file-formats.helper"), exports);
|
package/build/file/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../file/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../file/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
package/build/file/index.js
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const FileFormatListSchema: z.ZodObject<{
|
|
3
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
4
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
5
|
+
maxSize: z.ZodInt;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export type FileFormatListSchemaType = z.infer<typeof FileFormatListSchema>;
|
|
8
|
+
//# sourceMappingURL=file-format-list.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-format-list.schema.d.ts","sourceRoot":"","sources":["../../../file/models/file-format-list.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FileFormatListSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.FileFormatListSchema = zod_1.z.object({
|
|
6
|
+
mimeTypes: zod_1.z.array(zod_1.z.string()),
|
|
7
|
+
extensions: zod_1.z.array(zod_1.z.string()),
|
|
8
|
+
maxSize: zod_1.z.int().positive(),
|
|
9
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../file/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../file/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,2BAA2B,CAAC"}
|
|
@@ -17,7 +17,16 @@ export declare const GetGenerationModelsByTypeQueryResponse: z.ZodObject<{
|
|
|
17
17
|
providerTitle: z.ZodString;
|
|
18
18
|
order: z.ZodInt;
|
|
19
19
|
isActive: z.ZodBoolean;
|
|
20
|
-
attachmentPolicy: z.ZodRecord<z.ZodString, z.
|
|
20
|
+
attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
21
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
22
|
+
required: z.ZodBoolean;
|
|
23
|
+
maxCount: z.ZodInt;
|
|
24
|
+
allowedFormats: z.ZodObject<{
|
|
25
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
26
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
27
|
+
maxSize: z.ZodInt;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
}, z.core.$strip>>;
|
|
21
30
|
paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
22
31
|
pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
23
32
|
type: z.ZodLiteral<"base">;
|
|
@@ -60,7 +69,16 @@ export declare const GetGenerationModelsByTypeQuery: {
|
|
|
60
69
|
providerTitle: z.ZodString;
|
|
61
70
|
order: z.ZodInt;
|
|
62
71
|
isActive: z.ZodBoolean;
|
|
63
|
-
attachmentPolicy: z.ZodRecord<z.ZodString, z.
|
|
72
|
+
attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
73
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
74
|
+
required: z.ZodBoolean;
|
|
75
|
+
maxCount: z.ZodInt;
|
|
76
|
+
allowedFormats: z.ZodObject<{
|
|
77
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
78
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
79
|
+
maxSize: z.ZodInt;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
64
82
|
paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
65
83
|
pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
66
84
|
type: z.ZodLiteral<"base">;
|
package/build/generation-model/endpoints/queries/get-generation-models-by-type.query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-generation-models-by-type.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models-by-type.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,oCAAoC;;iBAE/C,CAAC;AAEH,eAAO,MAAM,sCAAsC
|
|
1
|
+
{"version":3,"file":"get-generation-models-by-type.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models-by-type.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,oCAAoC;;iBAE/C,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEjD,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWzC,CAAC"}
|
|
@@ -14,7 +14,16 @@ export declare const GetGenerationModelsQueryResponse: z.ZodObject<{
|
|
|
14
14
|
providerTitle: z.ZodString;
|
|
15
15
|
order: z.ZodInt;
|
|
16
16
|
isActive: z.ZodBoolean;
|
|
17
|
-
attachmentPolicy: z.ZodRecord<z.ZodString, z.
|
|
17
|
+
attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
18
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
19
|
+
required: z.ZodBoolean;
|
|
20
|
+
maxCount: z.ZodInt;
|
|
21
|
+
allowedFormats: z.ZodObject<{
|
|
22
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
23
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
24
|
+
maxSize: z.ZodInt;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>>;
|
|
18
27
|
paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
19
28
|
pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
29
|
type: z.ZodLiteral<"base">;
|
|
@@ -52,7 +61,16 @@ export declare const GetGenerationModelsQuery: {
|
|
|
52
61
|
providerTitle: z.ZodString;
|
|
53
62
|
order: z.ZodInt;
|
|
54
63
|
isActive: z.ZodBoolean;
|
|
55
|
-
attachmentPolicy: z.ZodRecord<z.ZodString, z.
|
|
64
|
+
attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
65
|
+
fileType: z.ZodEnum<typeof import("../../..").FILE_TYPE>;
|
|
66
|
+
required: z.ZodBoolean;
|
|
67
|
+
maxCount: z.ZodInt;
|
|
68
|
+
allowedFormats: z.ZodObject<{
|
|
69
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
70
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
71
|
+
maxSize: z.ZodInt;
|
|
72
|
+
}, z.core.$strip>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
56
74
|
paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
57
75
|
pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
58
76
|
type: z.ZodLiteral<"base">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-generation-models.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,gCAAgC
|
|
1
|
+
{"version":3,"file":"get-generation-models.query.d.ts","sourceRoot":"","sources":["../../../../generation-model/endpoints/queries/get-generation-models.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE3C,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQnC,CAAC"}
|
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { FILE_TYPE } from '../../file';
|
|
2
3
|
import { GENERATION_TYPE } from '../enums';
|
|
3
4
|
export declare const GenerationTypeSchema: z.ZodEnum<typeof GENERATION_TYPE>;
|
|
5
|
+
export declare const AttachmentSlotSchema: z.ZodObject<{
|
|
6
|
+
fileType: z.ZodEnum<typeof FILE_TYPE>;
|
|
7
|
+
required: z.ZodBoolean;
|
|
8
|
+
maxCount: z.ZodInt;
|
|
9
|
+
allowedFormats: z.ZodObject<{
|
|
10
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
11
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
12
|
+
maxSize: z.ZodInt;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const AttachmentPolicySchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
fileType: z.ZodEnum<typeof FILE_TYPE>;
|
|
17
|
+
required: z.ZodBoolean;
|
|
18
|
+
maxCount: z.ZodInt;
|
|
19
|
+
allowedFormats: z.ZodObject<{
|
|
20
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
21
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
22
|
+
maxSize: z.ZodInt;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
4
25
|
export declare const GenerationModelResponseSchema: z.ZodObject<{
|
|
5
26
|
uuid: z.ZodUUID;
|
|
6
27
|
titleModel: z.ZodString;
|
|
@@ -14,7 +35,16 @@ export declare const GenerationModelResponseSchema: z.ZodObject<{
|
|
|
14
35
|
providerTitle: z.ZodString;
|
|
15
36
|
order: z.ZodInt;
|
|
16
37
|
isActive: z.ZodBoolean;
|
|
17
|
-
attachmentPolicy: z.ZodRecord<z.ZodString, z.
|
|
38
|
+
attachmentPolicy: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
39
|
+
fileType: z.ZodEnum<typeof FILE_TYPE>;
|
|
40
|
+
required: z.ZodBoolean;
|
|
41
|
+
maxCount: z.ZodInt;
|
|
42
|
+
allowedFormats: z.ZodObject<{
|
|
43
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
44
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
45
|
+
maxSize: z.ZodInt;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
18
48
|
paramsSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
19
49
|
pricingPolicy: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
20
50
|
type: z.ZodLiteral<"base">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generation-model-response.schema.d.ts","sourceRoot":"","sources":["../../../generation-model/models/generation-model-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"generation-model-response.schema.d.ts","sourceRoot":"","sources":["../../../generation-model/models/generation-model-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAwB,MAAM,YAAY,CAAC;AAE7D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAK3C,eAAO,MAAM,oBAAoB,mCAA0B,CAAC;AAE5D,eAAO,MAAM,oBAAoB;;;;;;;;;iBAK/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;kBAA6C,CAAC;AAEjF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAaxC,CAAC;AAEH,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GenerationModelResponseSchema = exports.GenerationTypeSchema = void 0;
|
|
3
|
+
exports.GenerationModelResponseSchema = exports.AttachmentPolicySchema = exports.AttachmentSlotSchema = exports.GenerationTypeSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const file_1 = require("../../file");
|
|
5
6
|
const _common_1 = require("../../_common");
|
|
6
7
|
const enums_1 = require("../enums");
|
|
7
8
|
const pricing_policy_schema_1 = require("./pricing-policy.schema");
|
|
8
9
|
const JsonObjectSchema = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
|
|
9
10
|
exports.GenerationTypeSchema = zod_1.z.enum(enums_1.GENERATION_TYPE);
|
|
11
|
+
exports.AttachmentSlotSchema = zod_1.z.object({
|
|
12
|
+
fileType: zod_1.z.enum(file_1.FILE_TYPE),
|
|
13
|
+
required: zod_1.z.boolean(),
|
|
14
|
+
maxCount: zod_1.z.int().positive(),
|
|
15
|
+
allowedFormats: file_1.FileFormatListSchema,
|
|
16
|
+
});
|
|
17
|
+
exports.AttachmentPolicySchema = zod_1.z.record(zod_1.z.string(), exports.AttachmentSlotSchema);
|
|
10
18
|
exports.GenerationModelResponseSchema = zod_1.z.object({
|
|
11
19
|
uuid: zod_1.z.uuid(),
|
|
12
20
|
titleModel: zod_1.z.string().min(1),
|
|
@@ -17,7 +25,7 @@ exports.GenerationModelResponseSchema = zod_1.z.object({
|
|
|
17
25
|
providerTitle: zod_1.z.string().min(1),
|
|
18
26
|
order: zod_1.z.int(),
|
|
19
27
|
isActive: zod_1.z.boolean(),
|
|
20
|
-
attachmentPolicy:
|
|
28
|
+
attachmentPolicy: exports.AttachmentPolicySchema,
|
|
21
29
|
paramsSchema: JsonObjectSchema,
|
|
22
30
|
pricingPolicy: pricing_policy_schema_1.PricingPolicySchema,
|
|
23
31
|
});
|
|
@@ -2,6 +2,7 @@ export declare const MARKETPLACE_CARD_CONTROLLER: "marketplace-cards";
|
|
|
2
2
|
export declare const MARKETPLACE_CARD_ROUTES: {
|
|
3
3
|
readonly CREATE: "";
|
|
4
4
|
readonly GET_ALL: "";
|
|
5
|
+
readonly GET_CONFIG: "config";
|
|
5
6
|
readonly GET_BY_UUID: (uuid: string) => string;
|
|
6
7
|
readonly DOWNLOAD: (uuid: string) => string;
|
|
7
8
|
readonly UPDATE: (uuid: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"marketplace-card.d.ts","sourceRoot":"","sources":["../../../marketplace-card/endpoints/marketplace-card.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAExE,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"marketplace-card.d.ts","sourceRoot":"","sources":["../../../marketplace-card/endpoints/marketplace-card.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAExE,eAAO,MAAM,uBAAuB;;;;iCAIZ,MAAM;8BACT,MAAM;4BACR,MAAM;4BACN,MAAM;CACf,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetMarketplaceCardConfigResponse: z.ZodObject<{
|
|
4
|
+
styleReferenceFile: z.ZodObject<{
|
|
5
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
6
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
7
|
+
maxSize: z.ZodInt;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type GetMarketplaceCardConfigResponseType = z.infer<typeof GetMarketplaceCardConfigResponse>;
|
|
11
|
+
export declare const GetMarketplaceCardConfigQuery: {
|
|
12
|
+
method: HTTP_METHODS.GET;
|
|
13
|
+
path: "config";
|
|
14
|
+
summary: string;
|
|
15
|
+
responses: {
|
|
16
|
+
200: z.ZodObject<{
|
|
17
|
+
styleReferenceFile: z.ZodObject<{
|
|
18
|
+
mimeTypes: z.ZodArray<z.ZodString>;
|
|
19
|
+
extensions: z.ZodArray<z.ZodString>;
|
|
20
|
+
maxSize: z.ZodInt;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
24
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=get-marketplace-card-config.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-marketplace-card-config.query.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/get-marketplace-card-config.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAGzF,eAAO,MAAM,gCAAgC;;;;;;iBAE3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;CASxC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMarketplaceCardConfigQuery = exports.GetMarketplaceCardConfigResponse = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const file_1 = require("../../../file");
|
|
6
|
+
const _common_1 = require("../../../_common");
|
|
7
|
+
const marketplace_card_1 = require("../marketplace-card");
|
|
8
|
+
exports.GetMarketplaceCardConfigResponse = zod_1.z.object({
|
|
9
|
+
styleReferenceFile: file_1.FileFormatListSchema,
|
|
10
|
+
});
|
|
11
|
+
exports.GetMarketplaceCardConfigQuery = (0, _common_1.defineContract)({
|
|
12
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
13
|
+
path: marketplace_card_1.MARKETPLACE_CARD_ROUTES.GET_CONFIG,
|
|
14
|
+
summary: 'Get marketplace card generation config (allowed file formats)',
|
|
15
|
+
responses: {
|
|
16
|
+
200: exports.GetMarketplaceCardConfigResponse,
|
|
17
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
18
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC"}
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./get-marketplace-card.query"), exports);
|
|
18
18
|
__exportStar(require("./get-marketplace-card-history.query"), exports);
|
|
19
|
+
__exportStar(require("./get-marketplace-card-config.query"), exports);
|
|
@@ -77,6 +77,7 @@ const delete_marketplace_card_command_1 = require("../marketplace-card/endpoints
|
|
|
77
77
|
const update_marketplace_card_command_1 = require("../marketplace-card/endpoints/commands/update-marketplace-card.command");
|
|
78
78
|
const get_marketplace_card_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card.query");
|
|
79
79
|
const get_marketplace_card_history_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card-history.query");
|
|
80
|
+
const get_marketplace_card_config_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card-config.query");
|
|
80
81
|
const supportedHttpMethods = new Set(['get', 'post', 'put', 'patch', 'delete']);
|
|
81
82
|
function toOpenApiPath(controller, routePath) {
|
|
82
83
|
const normalizedController = controller.replace(/^\/+|\/+$/g, '');
|
|
@@ -249,6 +250,7 @@ async function main() {
|
|
|
249
250
|
registerSchema('MarketplaceCardDeleteResponse', delete_marketplace_card_command_1.DeleteMarketplaceCardCommandResponse);
|
|
250
251
|
registerSchema('MarketplaceCardHistoryQuery', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryQuery);
|
|
251
252
|
registerSchema('MarketplaceCardHistoryResponse', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryResponse);
|
|
253
|
+
registerSchema('MarketplaceCardConfigResponse', get_marketplace_card_config_query_1.GetMarketplaceCardConfigResponse);
|
|
252
254
|
const authContracts = [
|
|
253
255
|
register_command_1.RegisterCommand,
|
|
254
256
|
login_command_1.LoginCommand,
|
|
@@ -279,6 +281,7 @@ async function main() {
|
|
|
279
281
|
const marketplaceCardContracts = [
|
|
280
282
|
create_marketplace_card_command_1.CreateMarketplaceCardCommand,
|
|
281
283
|
get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQuery,
|
|
284
|
+
get_marketplace_card_config_query_1.GetMarketplaceCardConfigQuery,
|
|
282
285
|
get_marketplace_card_query_1.GetMarketplaceCardQuery,
|
|
283
286
|
update_marketplace_card_command_1.UpdateMarketplaceCardCommand,
|
|
284
287
|
delete_marketplace_card_command_1.DeleteMarketplaceCardCommand,
|