@ai-grator/api 0.0.13 → 0.1.14
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/billing/enums/model-type.enum.ts +1 -0
- package/build/billing/enums/model-type.enum.d.ts +2 -1
- package/build/billing/enums/model-type.enum.d.ts.map +1 -1
- package/build/billing/enums/model-type.enum.js +1 -0
- package/build/errors/errors.d.ts +42 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +42 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/marketplace-card/endpoints/commands/create-marketplace-card.command.d.ts +81 -0
- package/build/marketplace-card/endpoints/commands/create-marketplace-card.command.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/commands/create-marketplace-card.command.js +72 -0
- package/build/marketplace-card/endpoints/commands/delete-marketplace-card.command.d.ts +23 -0
- package/build/marketplace-card/endpoints/commands/delete-marketplace-card.command.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/commands/delete-marketplace-card.command.js +24 -0
- package/build/marketplace-card/endpoints/commands/index.d.ts +4 -0
- package/build/marketplace-card/endpoints/commands/index.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/commands/index.js +19 -0
- package/build/marketplace-card/endpoints/commands/update-marketplace-card.command.d.ts +73 -0
- package/build/marketplace-card/endpoints/commands/update-marketplace-card.command.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/commands/update-marketplace-card.command.js +31 -0
- package/build/marketplace-card/endpoints/index.d.ts +4 -0
- package/build/marketplace-card/endpoints/index.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/index.js +19 -0
- package/build/marketplace-card/endpoints/marketplace-card.d.ts +10 -0
- package/build/marketplace-card/endpoints/marketplace-card.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/marketplace-card.js +12 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-history.query.d.ts +79 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-history.query.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card-history.query.js +31 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card.query.d.ts +65 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card.query.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/queries/get-marketplace-card.query.js +25 -0
- package/build/marketplace-card/endpoints/queries/index.d.ts +3 -0
- package/build/marketplace-card/endpoints/queries/index.d.ts.map +1 -0
- package/build/marketplace-card/endpoints/queries/index.js +18 -0
- package/build/marketplace-card/enums/index.d.ts +3 -0
- package/build/marketplace-card/enums/index.d.ts.map +1 -0
- package/build/marketplace-card/enums/index.js +18 -0
- package/build/marketplace-card/enums/marketplace-card-style-mode.enum.d.ts +6 -0
- package/build/marketplace-card/enums/marketplace-card-style-mode.enum.d.ts.map +1 -0
- package/build/marketplace-card/enums/marketplace-card-style-mode.enum.js +9 -0
- package/build/marketplace-card/enums/marketplace-card-type.enum.d.ts +5 -0
- package/build/marketplace-card/enums/marketplace-card-type.enum.d.ts.map +1 -0
- package/build/marketplace-card/enums/marketplace-card-type.enum.js +8 -0
- package/build/marketplace-card/index.d.ts +4 -0
- package/build/marketplace-card/index.d.ts.map +1 -0
- package/build/marketplace-card/index.js +19 -0
- package/build/marketplace-card/models/index.d.ts +3 -0
- package/build/marketplace-card/models/index.d.ts.map +1 -0
- package/build/marketplace-card/models/index.js +18 -0
- package/build/marketplace-card/models/marketplace-card-job-response.schema.d.ts +29 -0
- package/build/marketplace-card/models/marketplace-card-job-response.schema.d.ts.map +1 -0
- package/build/marketplace-card/models/marketplace-card-job-response.schema.js +28 -0
- package/build/marketplace-card/models/marketplace-card-output.schema.d.ts +7 -0
- package/build/marketplace-card/models/marketplace-card-output.schema.d.ts.map +1 -0
- package/build/marketplace-card/models/marketplace-card-output.schema.js +8 -0
- package/build/scripts/generate-openapi.js +53 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/errors/errors.ts +42 -0
- package/index.ts +1 -0
- package/marketplace-card/endpoints/commands/create-marketplace-card.command.ts +76 -0
- package/marketplace-card/endpoints/commands/delete-marketplace-card.command.ts +24 -0
- package/marketplace-card/endpoints/commands/index.ts +3 -0
- package/marketplace-card/endpoints/commands/update-marketplace-card.command.ts +32 -0
- package/marketplace-card/endpoints/index.ts +3 -0
- package/marketplace-card/endpoints/marketplace-card.ts +10 -0
- package/marketplace-card/endpoints/queries/get-marketplace-card-history.query.ts +31 -0
- package/marketplace-card/endpoints/queries/get-marketplace-card.query.ts +25 -0
- package/marketplace-card/endpoints/queries/index.ts +2 -0
- package/marketplace-card/enums/index.ts +2 -0
- package/marketplace-card/enums/marketplace-card-style-mode.enum.ts +5 -0
- package/marketplace-card/enums/marketplace-card-type.enum.ts +4 -0
- package/marketplace-card/index.ts +3 -0
- package/marketplace-card/models/index.ts +2 -0
- package/marketplace-card/models/marketplace-card-job-response.schema.ts +29 -0
- package/marketplace-card/models/marketplace-card-output.schema.ts +8 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +76 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
import { GENERATION_JOB_STATUS } from '../../../generation-job';
|
|
4
|
+
export declare const GetMarketplaceCardHistoryQueryQuery: z.ZodObject<{
|
|
5
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
6
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
7
|
+
type: z.ZodOptional<z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>>;
|
|
8
|
+
status: z.ZodOptional<z.ZodEnum<typeof GENERATION_JOB_STATUS>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const GetMarketplaceCardHistoryQueryResponse: z.ZodObject<{
|
|
11
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
12
|
+
uuid: z.ZodUUID;
|
|
13
|
+
userId: z.ZodUUID;
|
|
14
|
+
type: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>;
|
|
15
|
+
description: z.ZodString;
|
|
16
|
+
advantages: z.ZodNullable<z.ZodString>;
|
|
17
|
+
styleMode: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_STYLE_MODE>;
|
|
18
|
+
styleText: z.ZodNullable<z.ZodString>;
|
|
19
|
+
stylePresetKey: z.ZodNullable<z.ZodString>;
|
|
20
|
+
styleReferenceFileId: z.ZodNullable<z.ZodUUID>;
|
|
21
|
+
variantCount: z.ZodNumber;
|
|
22
|
+
status: z.ZodEnum<typeof GENERATION_JOB_STATUS>;
|
|
23
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
24
|
+
uuid: z.ZodUUID;
|
|
25
|
+
url: z.ZodString;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
27
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
28
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
29
|
+
finishedAt: z.ZodNullable<z.ZodDate>;
|
|
30
|
+
createdAt: z.ZodDate;
|
|
31
|
+
updatedAt: z.ZodDate;
|
|
32
|
+
}, z.core.$strip>>;
|
|
33
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
34
|
+
hasMore: z.ZodBoolean;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
export declare const GetMarketplaceCardHistoryQuery: {
|
|
37
|
+
method: HTTP_METHODS.GET;
|
|
38
|
+
path: "";
|
|
39
|
+
summary: string;
|
|
40
|
+
request: {
|
|
41
|
+
query: z.ZodObject<{
|
|
42
|
+
cursor: z.ZodOptional<z.ZodUUID>;
|
|
43
|
+
limit: z.ZodOptional<z.ZodDefault<z.ZodCoercedNumber<unknown>>>;
|
|
44
|
+
type: z.ZodOptional<z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>>;
|
|
45
|
+
status: z.ZodOptional<z.ZodEnum<typeof GENERATION_JOB_STATUS>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
};
|
|
48
|
+
responses: {
|
|
49
|
+
200: z.ZodObject<{
|
|
50
|
+
jobs: z.ZodArray<z.ZodObject<{
|
|
51
|
+
uuid: z.ZodUUID;
|
|
52
|
+
userId: z.ZodUUID;
|
|
53
|
+
type: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>;
|
|
54
|
+
description: z.ZodString;
|
|
55
|
+
advantages: z.ZodNullable<z.ZodString>;
|
|
56
|
+
styleMode: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_STYLE_MODE>;
|
|
57
|
+
styleText: z.ZodNullable<z.ZodString>;
|
|
58
|
+
stylePresetKey: z.ZodNullable<z.ZodString>;
|
|
59
|
+
styleReferenceFileId: z.ZodNullable<z.ZodUUID>;
|
|
60
|
+
variantCount: z.ZodNumber;
|
|
61
|
+
status: z.ZodEnum<typeof GENERATION_JOB_STATUS>;
|
|
62
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
63
|
+
uuid: z.ZodUUID;
|
|
64
|
+
url: z.ZodString;
|
|
65
|
+
}, z.core.$strip>>>;
|
|
66
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
67
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
68
|
+
finishedAt: z.ZodNullable<z.ZodDate>;
|
|
69
|
+
createdAt: z.ZodDate;
|
|
70
|
+
updatedAt: z.ZodDate;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
nextCursor: z.ZodNullable<z.ZodUUID>;
|
|
73
|
+
hasMore: z.ZodBoolean;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
76
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=get-marketplace-card-history.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-marketplace-card-history.query.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/get-marketplace-card-history.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA+C,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAKhE,eAAO,MAAM,mCAAmC;;;;;iBAG9C,CAAC;AAEH,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;iBAIjD,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYzC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMarketplaceCardHistoryQuery = exports.GetMarketplaceCardHistoryQueryResponse = exports.GetMarketplaceCardHistoryQueryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const generation_job_1 = require("../../../generation-job");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
const marketplace_card_job_response_schema_1 = require("../../models/marketplace-card-job-response.schema");
|
|
9
|
+
const marketplace_card_1 = require("../marketplace-card");
|
|
10
|
+
exports.GetMarketplaceCardHistoryQueryQuery = (0, _common_1.defineCursorPaginationQuery)(zod_1.z.uuid()).extend({
|
|
11
|
+
type: models_1.MarketplaceCardTypeSchema.optional(),
|
|
12
|
+
status: zod_1.z.enum(generation_job_1.GENERATION_JOB_STATUS).optional(),
|
|
13
|
+
});
|
|
14
|
+
exports.GetMarketplaceCardHistoryQueryResponse = zod_1.z.object({
|
|
15
|
+
jobs: zod_1.z.array(marketplace_card_job_response_schema_1.MarketplaceCardJobResponseSchema),
|
|
16
|
+
nextCursor: zod_1.z.uuid().nullable(),
|
|
17
|
+
hasMore: zod_1.z.boolean(),
|
|
18
|
+
});
|
|
19
|
+
exports.GetMarketplaceCardHistoryQuery = (0, _common_1.defineContract)({
|
|
20
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
21
|
+
path: marketplace_card_1.MARKETPLACE_CARD_ROUTES.GET_ALL,
|
|
22
|
+
summary: 'Get marketplace card generation history with cursor pagination',
|
|
23
|
+
request: {
|
|
24
|
+
query: exports.GetMarketplaceCardHistoryQueryQuery,
|
|
25
|
+
},
|
|
26
|
+
responses: {
|
|
27
|
+
200: exports.GetMarketplaceCardHistoryQueryResponse,
|
|
28
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
29
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetMarketplaceCardQueryParams: z.ZodObject<{
|
|
4
|
+
uuid: z.ZodUUID;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export declare const GetMarketplaceCardQueryResponse: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodUUID;
|
|
8
|
+
userId: z.ZodUUID;
|
|
9
|
+
type: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>;
|
|
10
|
+
description: z.ZodString;
|
|
11
|
+
advantages: z.ZodNullable<z.ZodString>;
|
|
12
|
+
styleMode: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_STYLE_MODE>;
|
|
13
|
+
styleText: z.ZodNullable<z.ZodString>;
|
|
14
|
+
stylePresetKey: z.ZodNullable<z.ZodString>;
|
|
15
|
+
styleReferenceFileId: z.ZodNullable<z.ZodUUID>;
|
|
16
|
+
variantCount: z.ZodNumber;
|
|
17
|
+
status: z.ZodEnum<typeof import("../../..").GENERATION_JOB_STATUS>;
|
|
18
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
19
|
+
uuid: z.ZodUUID;
|
|
20
|
+
url: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
23
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
24
|
+
finishedAt: z.ZodNullable<z.ZodDate>;
|
|
25
|
+
createdAt: z.ZodDate;
|
|
26
|
+
updatedAt: z.ZodDate;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export declare const GetMarketplaceCardQuery: {
|
|
29
|
+
method: HTTP_METHODS.GET;
|
|
30
|
+
path: string;
|
|
31
|
+
summary: string;
|
|
32
|
+
request: {
|
|
33
|
+
params: z.ZodObject<{
|
|
34
|
+
uuid: z.ZodUUID;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
};
|
|
37
|
+
responses: {
|
|
38
|
+
200: z.ZodObject<{
|
|
39
|
+
uuid: z.ZodUUID;
|
|
40
|
+
userId: z.ZodUUID;
|
|
41
|
+
type: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_TYPE>;
|
|
42
|
+
description: z.ZodString;
|
|
43
|
+
advantages: z.ZodNullable<z.ZodString>;
|
|
44
|
+
styleMode: z.ZodEnum<typeof import("../..").MARKETPLACE_CARD_STYLE_MODE>;
|
|
45
|
+
styleText: z.ZodNullable<z.ZodString>;
|
|
46
|
+
stylePresetKey: z.ZodNullable<z.ZodString>;
|
|
47
|
+
styleReferenceFileId: z.ZodNullable<z.ZodUUID>;
|
|
48
|
+
variantCount: z.ZodNumber;
|
|
49
|
+
status: z.ZodEnum<typeof import("../../..").GENERATION_JOB_STATUS>;
|
|
50
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
51
|
+
uuid: z.ZodUUID;
|
|
52
|
+
url: z.ZodString;
|
|
53
|
+
}, z.core.$strip>>>;
|
|
54
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
55
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
56
|
+
finishedAt: z.ZodNullable<z.ZodDate>;
|
|
57
|
+
createdAt: z.ZodDate;
|
|
58
|
+
updatedAt: z.ZodDate;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
61
|
+
404: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
62
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=get-marketplace-card.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-marketplace-card.query.d.ts","sourceRoot":"","sources":["../../../../marketplace-card/endpoints/queries/get-marketplace-card.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;iBAAmC,CAAC;AAEhF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAalC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetMarketplaceCardQuery = exports.GetMarketplaceCardQueryResponse = exports.GetMarketplaceCardQueryParams = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const models_1 = require("../../models");
|
|
7
|
+
const marketplace_card_1 = require("../marketplace-card");
|
|
8
|
+
exports.GetMarketplaceCardQueryParams = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.uuid(),
|
|
10
|
+
});
|
|
11
|
+
exports.GetMarketplaceCardQueryResponse = models_1.MarketplaceCardJobResponseSchema;
|
|
12
|
+
exports.GetMarketplaceCardQuery = (0, _common_1.defineContract)({
|
|
13
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
14
|
+
path: marketplace_card_1.MARKETPLACE_CARD_ROUTES.GET_BY_UUID(':uuid'),
|
|
15
|
+
summary: 'Get marketplace card generation job by uuid',
|
|
16
|
+
request: {
|
|
17
|
+
params: exports.GetMarketplaceCardQueryParams,
|
|
18
|
+
},
|
|
19
|
+
responses: {
|
|
20
|
+
200: exports.GetMarketplaceCardQueryResponse,
|
|
21
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
22
|
+
404: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
},
|
|
25
|
+
});
|
|
@@ -0,0 +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"}
|
|
@@ -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("./get-marketplace-card.query"), exports);
|
|
18
|
+
__exportStar(require("./get-marketplace-card-history.query"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../marketplace-card/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oCAAoC,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("./marketplace-card-type.enum"), exports);
|
|
18
|
+
__exportStar(require("./marketplace-card-style-mode.enum"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-card-style-mode.enum.d.ts","sourceRoot":"","sources":["../../../marketplace-card/enums/marketplace-card-style-mode.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,2BAA2B;IACnC,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,SAAS,cAAc;CAC1B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MARKETPLACE_CARD_STYLE_MODE = void 0;
|
|
4
|
+
var MARKETPLACE_CARD_STYLE_MODE;
|
|
5
|
+
(function (MARKETPLACE_CARD_STYLE_MODE) {
|
|
6
|
+
MARKETPLACE_CARD_STYLE_MODE["TEXT"] = "TEXT";
|
|
7
|
+
MARKETPLACE_CARD_STYLE_MODE["PRESET"] = "PRESET";
|
|
8
|
+
MARKETPLACE_CARD_STYLE_MODE["REFERENCE"] = "REFERENCE";
|
|
9
|
+
})(MARKETPLACE_CARD_STYLE_MODE || (exports.MARKETPLACE_CARD_STYLE_MODE = MARKETPLACE_CARD_STYLE_MODE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-card-type.enum.d.ts","sourceRoot":"","sources":["../../../marketplace-card/enums/marketplace-card-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC7B,SAAS,cAAc;IACvB,iBAAiB,sBAAsB;CAC1C"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MARKETPLACE_CARD_TYPE = void 0;
|
|
4
|
+
var MARKETPLACE_CARD_TYPE;
|
|
5
|
+
(function (MARKETPLACE_CARD_TYPE) {
|
|
6
|
+
MARKETPLACE_CARD_TYPE["MAIN_CARD"] = "MAIN_CARD";
|
|
7
|
+
MARKETPLACE_CARD_TYPE["ADDITIONAL_IMAGES"] = "ADDITIONAL_IMAGES";
|
|
8
|
+
})(MARKETPLACE_CARD_TYPE || (exports.MARKETPLACE_CARD_TYPE = MARKETPLACE_CARD_TYPE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../marketplace-card/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enums"), exports);
|
|
18
|
+
__exportStar(require("./models"), exports);
|
|
19
|
+
__exportStar(require("./endpoints"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../marketplace-card/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,kCAAkC,CAAC;AACjD,cAAc,wCAAwC,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("./marketplace-card-output.schema"), exports);
|
|
18
|
+
__exportStar(require("./marketplace-card-job-response.schema"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { GENERATION_JOB_STATUS } from '../../generation-job';
|
|
3
|
+
import { MARKETPLACE_CARD_STYLE_MODE, MARKETPLACE_CARD_TYPE } from '../enums';
|
|
4
|
+
export declare const MarketplaceCardTypeSchema: z.ZodEnum<typeof MARKETPLACE_CARD_TYPE>;
|
|
5
|
+
export declare const MarketplaceCardStyleModeSchema: z.ZodEnum<typeof MARKETPLACE_CARD_STYLE_MODE>;
|
|
6
|
+
export declare const MarketplaceCardJobResponseSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodUUID;
|
|
8
|
+
userId: z.ZodUUID;
|
|
9
|
+
type: z.ZodEnum<typeof MARKETPLACE_CARD_TYPE>;
|
|
10
|
+
description: z.ZodString;
|
|
11
|
+
advantages: z.ZodNullable<z.ZodString>;
|
|
12
|
+
styleMode: z.ZodEnum<typeof MARKETPLACE_CARD_STYLE_MODE>;
|
|
13
|
+
styleText: z.ZodNullable<z.ZodString>;
|
|
14
|
+
stylePresetKey: z.ZodNullable<z.ZodString>;
|
|
15
|
+
styleReferenceFileId: z.ZodNullable<z.ZodUUID>;
|
|
16
|
+
variantCount: z.ZodNumber;
|
|
17
|
+
status: z.ZodEnum<typeof GENERATION_JOB_STATUS>;
|
|
18
|
+
outputs: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
19
|
+
uuid: z.ZodUUID;
|
|
20
|
+
url: z.ZodString;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
errorMessage: z.ZodNullable<z.ZodString>;
|
|
23
|
+
startedAt: z.ZodNullable<z.ZodDate>;
|
|
24
|
+
finishedAt: z.ZodNullable<z.ZodDate>;
|
|
25
|
+
createdAt: z.ZodDate;
|
|
26
|
+
updatedAt: z.ZodDate;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type MarketplaceCardJobResponseSchemaType = z.infer<typeof MarketplaceCardJobResponseSchema>;
|
|
29
|
+
//# sourceMappingURL=marketplace-card-job-response.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-card-job-response.schema.d.ts","sourceRoot":"","sources":["../../../marketplace-card/models/marketplace-card-job-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAG9E,eAAO,MAAM,yBAAyB,yCAAgC,CAAC;AACvE,eAAO,MAAM,8BAA8B,+CAAsC,CAAC;AAElF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;iBAkB3C,CAAC;AAEH,MAAM,MAAM,oCAAoC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketplaceCardJobResponseSchema = exports.MarketplaceCardStyleModeSchema = exports.MarketplaceCardTypeSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const generation_job_1 = require("../../generation-job");
|
|
6
|
+
const enums_1 = require("../enums");
|
|
7
|
+
const marketplace_card_output_schema_1 = require("./marketplace-card-output.schema");
|
|
8
|
+
exports.MarketplaceCardTypeSchema = zod_1.z.enum(enums_1.MARKETPLACE_CARD_TYPE);
|
|
9
|
+
exports.MarketplaceCardStyleModeSchema = zod_1.z.enum(enums_1.MARKETPLACE_CARD_STYLE_MODE);
|
|
10
|
+
exports.MarketplaceCardJobResponseSchema = zod_1.z.object({
|
|
11
|
+
uuid: zod_1.z.uuid(),
|
|
12
|
+
userId: zod_1.z.uuid(),
|
|
13
|
+
type: exports.MarketplaceCardTypeSchema,
|
|
14
|
+
description: zod_1.z.string(),
|
|
15
|
+
advantages: zod_1.z.string().nullable(),
|
|
16
|
+
styleMode: exports.MarketplaceCardStyleModeSchema,
|
|
17
|
+
styleText: zod_1.z.string().nullable(),
|
|
18
|
+
stylePresetKey: zod_1.z.string().nullable(),
|
|
19
|
+
styleReferenceFileId: zod_1.z.uuid().nullable(),
|
|
20
|
+
variantCount: zod_1.z.number().int().positive(),
|
|
21
|
+
status: zod_1.z.enum(generation_job_1.GENERATION_JOB_STATUS),
|
|
22
|
+
outputs: zod_1.z.array(marketplace_card_output_schema_1.MarketplaceCardOutputSchema).nullable(),
|
|
23
|
+
errorMessage: zod_1.z.string().nullable(),
|
|
24
|
+
startedAt: zod_1.z.date().nullable(),
|
|
25
|
+
finishedAt: zod_1.z.date().nullable(),
|
|
26
|
+
createdAt: zod_1.z.date(),
|
|
27
|
+
updatedAt: zod_1.z.date(),
|
|
28
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const MarketplaceCardOutputSchema: z.ZodObject<{
|
|
3
|
+
uuid: z.ZodUUID;
|
|
4
|
+
url: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
export type MarketplaceCardOutputSchemaType = z.infer<typeof MarketplaceCardOutputSchema>;
|
|
7
|
+
//# sourceMappingURL=marketplace-card-output.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marketplace-card-output.schema.d.ts","sourceRoot":"","sources":["../../../marketplace-card/models/marketplace-card-output.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;iBAGtC,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MarketplaceCardOutputSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.MarketplaceCardOutputSchema = zod_1.z.object({
|
|
6
|
+
uuid: zod_1.z.uuid(),
|
|
7
|
+
url: zod_1.z.string(),
|
|
8
|
+
});
|
|
@@ -70,6 +70,12 @@ const delete_generation_job_chat_command_1 = require("../generation-job-chat/end
|
|
|
70
70
|
const get_generation_job_chats_query_1 = require("../generation-job-chat/endpoints/queries/get-generation-job-chats.query");
|
|
71
71
|
const get_generation_job_chat_by_uuid_query_1 = require("../generation-job-chat/endpoints/queries/get-generation-job-chat-by-uuid.query");
|
|
72
72
|
const get_generation_price_query_1 = require("../generation-model/endpoints/queries/get-generation-price.query");
|
|
73
|
+
const marketplace_card_1 = require("../marketplace-card/endpoints/marketplace-card");
|
|
74
|
+
const create_marketplace_card_command_1 = require("../marketplace-card/endpoints/commands/create-marketplace-card.command");
|
|
75
|
+
const delete_marketplace_card_command_1 = require("../marketplace-card/endpoints/commands/delete-marketplace-card.command");
|
|
76
|
+
const update_marketplace_card_command_1 = require("../marketplace-card/endpoints/commands/update-marketplace-card.command");
|
|
77
|
+
const get_marketplace_card_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card.query");
|
|
78
|
+
const get_marketplace_card_history_query_1 = require("../marketplace-card/endpoints/queries/get-marketplace-card-history.query");
|
|
73
79
|
const supportedHttpMethods = new Set(['get', 'post', 'put', 'patch', 'delete']);
|
|
74
80
|
function toOpenApiPath(controller, routePath) {
|
|
75
81
|
const normalizedController = controller.replace(/^\/+|\/+$/g, '');
|
|
@@ -230,6 +236,17 @@ async function main() {
|
|
|
230
236
|
registerSchema('AdminGetUserTransactionsResponse', get_admin_user_transactions_query_1.GetAdminUserTransactionsQueryResponse);
|
|
231
237
|
registerSchema('AdminGetStatsQuery', get_admin_stats_query_1.GetAdminStatsQueryQuery);
|
|
232
238
|
registerSchema('AdminGetStatsResponse', get_admin_stats_query_1.GetAdminStatsQueryResponse);
|
|
239
|
+
registerSchema('MarketplaceCardCreateRequest', create_marketplace_card_command_1.CreateMarketplaceCardCommandBody);
|
|
240
|
+
registerSchema('MarketplaceCardCreateResponse', create_marketplace_card_command_1.CreateMarketplaceCardCommandResponse);
|
|
241
|
+
registerSchema('MarketplaceCardGetByUuidParams', get_marketplace_card_query_1.GetMarketplaceCardQueryParams);
|
|
242
|
+
registerSchema('MarketplaceCardGetByUuidResponse', get_marketplace_card_query_1.GetMarketplaceCardQueryResponse);
|
|
243
|
+
registerSchema('MarketplaceCardUpdateParams', update_marketplace_card_command_1.UpdateMarketplaceCardCommandParams);
|
|
244
|
+
registerSchema('MarketplaceCardUpdateRequest', update_marketplace_card_command_1.UpdateMarketplaceCardCommandBody);
|
|
245
|
+
registerSchema('MarketplaceCardUpdateResponse', update_marketplace_card_command_1.UpdateMarketplaceCardCommandResponse);
|
|
246
|
+
registerSchema('MarketplaceCardDeleteParams', delete_marketplace_card_command_1.DeleteMarketplaceCardCommandParams);
|
|
247
|
+
registerSchema('MarketplaceCardDeleteResponse', delete_marketplace_card_command_1.DeleteMarketplaceCardCommandResponse);
|
|
248
|
+
registerSchema('MarketplaceCardHistoryQuery', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryQuery);
|
|
249
|
+
registerSchema('MarketplaceCardHistoryResponse', get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQueryResponse);
|
|
233
250
|
const authContracts = [
|
|
234
251
|
register_command_1.RegisterCommand,
|
|
235
252
|
login_command_1.LoginCommand,
|
|
@@ -257,6 +274,13 @@ async function main() {
|
|
|
257
274
|
const fileContracts = [upload_file_command_1.UploadFileCommand];
|
|
258
275
|
const walletContracts = [get_wallet_balance_query_1.GetWalletBalanceQuery, get_wallet_transactions_query_1.GetWalletTransactionsQuery];
|
|
259
276
|
const paymentContracts = [create_payment_command_1.CreatePaymentCommand];
|
|
277
|
+
const marketplaceCardContracts = [
|
|
278
|
+
create_marketplace_card_command_1.CreateMarketplaceCardCommand,
|
|
279
|
+
get_marketplace_card_history_query_1.GetMarketplaceCardHistoryQuery,
|
|
280
|
+
get_marketplace_card_query_1.GetMarketplaceCardQuery,
|
|
281
|
+
update_marketplace_card_command_1.UpdateMarketplaceCardCommand,
|
|
282
|
+
delete_marketplace_card_command_1.DeleteMarketplaceCardCommand,
|
|
283
|
+
];
|
|
260
284
|
const aiModelContracts = [get_ai_models_query_1.GetAllAiModelsQuery, get_ai_model_by_uuid_query_1.GetAiModelByUuidQuery];
|
|
261
285
|
const generationModelContracts = [
|
|
262
286
|
get_generation_models_query_1.GetGenerationModelsQuery,
|
|
@@ -617,6 +641,35 @@ async function main() {
|
|
|
617
641
|
responses: buildResponses(contract.responses, resolveSchema),
|
|
618
642
|
});
|
|
619
643
|
}
|
|
644
|
+
for (const contract of marketplaceCardContracts) {
|
|
645
|
+
const method = contract.method.toLowerCase();
|
|
646
|
+
if (!supportedHttpMethods.has(method)) {
|
|
647
|
+
throw new Error(`Unsupported HTTP method: ${contract.method}`);
|
|
648
|
+
}
|
|
649
|
+
registry.registerPath({
|
|
650
|
+
method: method,
|
|
651
|
+
path: toOpenApiPath(marketplace_card_1.MARKETPLACE_CARD_CONTROLLER, contract.path),
|
|
652
|
+
summary: contract.summary,
|
|
653
|
+
tags: ['Marketplace Cards'],
|
|
654
|
+
request: {
|
|
655
|
+
...(contract.request?.body
|
|
656
|
+
? {
|
|
657
|
+
body: {
|
|
658
|
+
required: true,
|
|
659
|
+
content: {
|
|
660
|
+
'application/json': {
|
|
661
|
+
schema: resolveSchema(contract.request.body),
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
},
|
|
665
|
+
}
|
|
666
|
+
: {}),
|
|
667
|
+
...(contract.request?.query ? { query: resolveSchema(contract.request.query) } : {}),
|
|
668
|
+
...(contract.request?.params ? { params: resolveSchema(contract.request.params) } : {}),
|
|
669
|
+
},
|
|
670
|
+
responses: buildResponses(contract.responses, resolveSchema),
|
|
671
|
+
});
|
|
672
|
+
}
|
|
620
673
|
const generator = new zod_to_openapi_1.OpenApiGeneratorV3(registry.definitions);
|
|
621
674
|
const document = generator.generateDocument({
|
|
622
675
|
openapi: '3.0.0',
|