@ai-grator/api 0.0.7 → 0.0.9
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 +3 -0
- package/billing/endpoints/index.ts +1 -0
- package/billing/endpoints/queries/get-admin-stats.query.ts +29 -0
- package/billing/endpoints/queries/index.ts +1 -0
- package/billing/enums/index.ts +1 -0
- package/billing/enums/model-type.enum.ts +5 -0
- package/billing/index.ts +3 -0
- package/billing/models/admin-stats-response.schema.ts +29 -0
- package/billing/models/index.ts +1 -0
- package/build/admin/endpoints/admin.d.ts +1 -0
- package/build/admin/endpoints/admin.d.ts.map +1 -1
- package/build/admin/endpoints/admin.js +2 -0
- package/build/billing/endpoints/index.d.ts +2 -0
- package/build/billing/endpoints/index.d.ts.map +1 -0
- package/build/billing/endpoints/index.js +17 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.d.ts +61 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.d.ts.map +1 -0
- package/build/billing/endpoints/queries/get-admin-stats.query.js +26 -0
- package/build/billing/endpoints/queries/index.d.ts +2 -0
- package/build/billing/endpoints/queries/index.d.ts.map +1 -0
- package/build/billing/endpoints/queries/index.js +17 -0
- package/build/billing/enums/index.d.ts +2 -0
- package/build/billing/enums/index.d.ts.map +1 -0
- package/build/billing/enums/index.js +17 -0
- package/build/billing/enums/model-type.enum.d.ts +6 -0
- package/build/billing/enums/model-type.enum.d.ts.map +1 -0
- package/build/billing/enums/model-type.enum.js +9 -0
- package/build/billing/index.d.ts +4 -0
- package/build/billing/index.d.ts.map +1 -0
- package/build/billing/index.js +19 -0
- package/build/billing/models/admin-stats-response.schema.d.ts +37 -0
- package/build/billing/models/admin-stats-response.schema.d.ts.map +1 -0
- package/build/billing/models/admin-stats-response.schema.js +25 -0
- package/build/billing/models/index.d.ts +2 -0
- package/build/billing/models/index.d.ts.map +1 -0
- package/build/billing/models/index.js +17 -0
- package/build/errors/errors.d.ts +10 -0
- package/build/errors/errors.d.ts.map +1 -1
- package/build/errors/errors.js +10 -0
- 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 +13 -20
- package/build/generation-job/endpoints/commands/update-generation-job.command.d.ts.map +1 -1
- package/build/generation-job/endpoints/commands/update-generation-job.command.js +3 -11
- 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 +12 -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-jobs.query.d.ts +8 -0
- package/build/generation-job/endpoints/queries/get-generation-jobs.query.d.ts.map +1 -1
- package/build/generation-job/models/generation-job-response.schema.d.ts +8 -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 +4 -0
- package/build/generation-job/models/index.d.ts +1 -0
- package/build/generation-job/models/index.d.ts.map +1 -1
- package/build/generation-job/models/index.js +1 -0
- package/build/generation-job/models/suno-params.schema.d.ts +55 -0
- package/build/generation-job/models/suno-params.schema.d.ts.map +1 -0
- package/build/generation-job/models/suno-params.schema.js +66 -0
- package/build/generation-model/endpoints/generation-model.d.ts +1 -0
- package/build/generation-model/endpoints/generation-model.d.ts.map +1 -1
- package/build/generation-model/endpoints/generation-model.js +1 -0
- package/build/generation-model/endpoints/queries/get-music-styles.query.d.ts +59 -0
- package/build/generation-model/endpoints/queries/get-music-styles.query.d.ts.map +1 -0
- package/build/generation-model/endpoints/queries/get-music-styles.query.js +19 -0
- package/build/generation-model/endpoints/queries/index.d.ts +1 -0
- package/build/generation-model/endpoints/queries/index.d.ts.map +1 -1
- package/build/generation-model/endpoints/queries/index.js +1 -0
- package/build/generation-model/enums/generation-type.enum.d.ts +2 -1
- package/build/generation-model/enums/generation-type.enum.d.ts.map +1 -1
- package/build/generation-model/enums/generation-type.enum.js +1 -0
- package/build/generation-model/enums/index.d.ts +1 -0
- package/build/generation-model/enums/index.d.ts.map +1 -1
- package/build/generation-model/enums/index.js +1 -0
- package/build/generation-model/enums/music-style.enum.d.ts +26 -0
- package/build/generation-model/enums/music-style.enum.d.ts.map +1 -0
- package/build/generation-model/enums/music-style.enum.js +27 -0
- package/build/scripts/generate-openapi.js +7 -0
- package/build/tsconfig.tsbuildinfo +1 -1
- package/build/wallet/enums/wallet-transaction-source-type.enum.d.ts +1 -0
- package/build/wallet/enums/wallet-transaction-source-type.enum.d.ts.map +1 -1
- package/build/wallet/enums/wallet-transaction-source-type.enum.js +1 -0
- package/errors/errors.ts +10 -0
- package/generation-job/endpoints/commands/update-generation-job.command.ts +5 -13
- package/generation-job/models/generation-job-response.schema.ts +4 -0
- package/generation-job/models/index.ts +1 -0
- package/generation-job/models/suno-params.schema.ts +73 -0
- package/generation-model/endpoints/generation-model.ts +1 -0
- package/generation-model/endpoints/queries/get-music-styles.query.ts +18 -0
- package/generation-model/endpoints/queries/index.ts +1 -0
- package/generation-model/enums/generation-type.enum.ts +1 -0
- package/generation-model/enums/index.ts +1 -0
- package/generation-model/enums/music-style.enum.ts +27 -0
- package/package.json +1 -1
- package/scripts/generate-openapi.ts +14 -0
- package/wallet/enums/wallet-transaction-source-type.enum.ts +1 -0
package/admin/endpoints/admin.ts
CHANGED
|
@@ -12,6 +12,9 @@ export const ADMIN_ROUTES = {
|
|
|
12
12
|
CREATE_PARTNER_BONUS_OPERATION: (partnerId: string) => `partners/${partnerId}/bonus-operations`,
|
|
13
13
|
REFERRAL_CONFIG: 'referral-config',
|
|
14
14
|
|
|
15
|
+
// STATS
|
|
16
|
+
STATS: 'stats',
|
|
17
|
+
|
|
15
18
|
// USERS
|
|
16
19
|
GET_USERS: 'users',
|
|
17
20
|
GET_USER: (userId: string) => `users/${userId}`,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './queries';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { defineContract, HTTP_METHODS, HttpErrorResponseSchema } from '../../../_common';
|
|
3
|
+
import { ADMIN_ROUTES } from '../../../admin/endpoints/admin';
|
|
4
|
+
import { AdminStatsResponseSchema } from '../../models';
|
|
5
|
+
|
|
6
|
+
export const GetAdminStatsQueryQuery = z.object({
|
|
7
|
+
from: z.coerce.date().optional(),
|
|
8
|
+
to: z.coerce.date().optional(),
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export const GetAdminStatsQueryResponse = AdminStatsResponseSchema;
|
|
12
|
+
|
|
13
|
+
export const GetAdminStatsQuery = defineContract({
|
|
14
|
+
method: HTTP_METHODS.GET,
|
|
15
|
+
path: ADMIN_ROUTES.STATS,
|
|
16
|
+
summary: 'Get transaction statistics (deposits and charges) for a date range',
|
|
17
|
+
request: {
|
|
18
|
+
query: GetAdminStatsQueryQuery,
|
|
19
|
+
},
|
|
20
|
+
responses: {
|
|
21
|
+
200: GetAdminStatsQueryResponse,
|
|
22
|
+
401: HttpErrorResponseSchema,
|
|
23
|
+
403: HttpErrorResponseSchema,
|
|
24
|
+
500: HttpErrorResponseSchema,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type GetAdminStatsQueryQueryType = z.infer<typeof GetAdminStatsQueryQuery>;
|
|
29
|
+
export type GetAdminStatsQueryResponseType = z.infer<typeof GetAdminStatsQueryResponse>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './get-admin-stats.query';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './model-type.enum';
|
package/billing/index.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MODEL_TYPE } from '../enums';
|
|
3
|
+
|
|
4
|
+
const ModelRevenueItemSchema = z.object({
|
|
5
|
+
modelName: z.string(),
|
|
6
|
+
modelType: z.enum(MODEL_TYPE),
|
|
7
|
+
requestCount: z.number().int().nonnegative(),
|
|
8
|
+
revenue: z.number(),
|
|
9
|
+
revenueShare: z.number(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const DailyDataPointSchema = z.object({
|
|
13
|
+
date: z.string(),
|
|
14
|
+
deposits: z.number(),
|
|
15
|
+
charges: z.number(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const AdminStatsResponseSchema = z.object({
|
|
19
|
+
totalDeposits: z.number(),
|
|
20
|
+
totalCharges: z.number(),
|
|
21
|
+
depositCount: z.number().int().nonnegative(),
|
|
22
|
+
chargeCount: z.number().int().nonnegative(),
|
|
23
|
+
modelRevenue: z.array(ModelRevenueItemSchema),
|
|
24
|
+
dailyBreakdown: z.array(DailyDataPointSchema),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type AdminStatsResponseSchemaType = z.infer<typeof AdminStatsResponseSchema>;
|
|
28
|
+
export type ModelRevenueItem = z.infer<typeof ModelRevenueItemSchema>;
|
|
29
|
+
export type DailyDataPoint = z.infer<typeof DailyDataPointSchema>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './admin-stats-response.schema';
|
|
@@ -9,6 +9,7 @@ export declare const ADMIN_ROUTES: {
|
|
|
9
9
|
readonly GET_PARTNER_BONUS_OPERATIONS: (partnerId: string) => string;
|
|
10
10
|
readonly CREATE_PARTNER_BONUS_OPERATION: (partnerId: string) => string;
|
|
11
11
|
readonly REFERRAL_CONFIG: "referral-config";
|
|
12
|
+
readonly STATS: "stats";
|
|
12
13
|
readonly GET_USERS: "users";
|
|
13
14
|
readonly GET_USER: (userId: string) => string;
|
|
14
15
|
readonly GET_USER_TRANSACTIONS: (userId: string) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;uDACR,MAAM;yDACJ,MAAM
|
|
1
|
+
{"version":3,"file":"admin.d.ts","sourceRoot":"","sources":["../../../admin/endpoints/admin.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,EAAG,OAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY;;sCAGI,MAAM;gDACI,MAAM;iDACL,MAAM;sDACD,MAAM;yDACH,MAAM;uDACR,MAAM;yDACJ,MAAM;;;;gCAQ/B,MAAM;6CACO,MAAM;gCACnB,MAAM;CACnB,CAAC"}
|
|
@@ -13,6 +13,8 @@ exports.ADMIN_ROUTES = {
|
|
|
13
13
|
GET_PARTNER_BONUS_OPERATIONS: (partnerId) => `partners/${partnerId}/bonus-operations`,
|
|
14
14
|
CREATE_PARTNER_BONUS_OPERATION: (partnerId) => `partners/${partnerId}/bonus-operations`,
|
|
15
15
|
REFERRAL_CONFIG: 'referral-config',
|
|
16
|
+
// STATS
|
|
17
|
+
STATS: 'stats',
|
|
16
18
|
// USERS
|
|
17
19
|
GET_USERS: 'users',
|
|
18
20
|
GET_USER: (userId) => `users/${userId}`,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../billing/endpoints/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,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("./queries"), exports);
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
export declare const GetAdminStatsQueryQuery: z.ZodObject<{
|
|
4
|
+
from: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
5
|
+
to: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
7
|
+
export declare const GetAdminStatsQueryResponse: z.ZodObject<{
|
|
8
|
+
totalDeposits: z.ZodNumber;
|
|
9
|
+
totalCharges: z.ZodNumber;
|
|
10
|
+
depositCount: z.ZodNumber;
|
|
11
|
+
chargeCount: z.ZodNumber;
|
|
12
|
+
modelRevenue: z.ZodArray<z.ZodObject<{
|
|
13
|
+
modelName: z.ZodString;
|
|
14
|
+
modelType: z.ZodEnum<typeof import("../..").MODEL_TYPE>;
|
|
15
|
+
requestCount: z.ZodNumber;
|
|
16
|
+
revenue: z.ZodNumber;
|
|
17
|
+
revenueShare: z.ZodNumber;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
dailyBreakdown: z.ZodArray<z.ZodObject<{
|
|
20
|
+
date: z.ZodString;
|
|
21
|
+
deposits: z.ZodNumber;
|
|
22
|
+
charges: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export declare const GetAdminStatsQuery: {
|
|
26
|
+
method: HTTP_METHODS.GET;
|
|
27
|
+
path: "stats";
|
|
28
|
+
summary: string;
|
|
29
|
+
request: {
|
|
30
|
+
query: z.ZodObject<{
|
|
31
|
+
from: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
32
|
+
to: z.ZodOptional<z.ZodCoercedDate<unknown>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
};
|
|
35
|
+
responses: {
|
|
36
|
+
200: z.ZodObject<{
|
|
37
|
+
totalDeposits: z.ZodNumber;
|
|
38
|
+
totalCharges: z.ZodNumber;
|
|
39
|
+
depositCount: z.ZodNumber;
|
|
40
|
+
chargeCount: z.ZodNumber;
|
|
41
|
+
modelRevenue: z.ZodArray<z.ZodObject<{
|
|
42
|
+
modelName: z.ZodString;
|
|
43
|
+
modelType: z.ZodEnum<typeof import("../..").MODEL_TYPE>;
|
|
44
|
+
requestCount: z.ZodNumber;
|
|
45
|
+
revenue: z.ZodNumber;
|
|
46
|
+
revenueShare: z.ZodNumber;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
dailyBreakdown: z.ZodArray<z.ZodObject<{
|
|
49
|
+
date: z.ZodString;
|
|
50
|
+
deposits: z.ZodNumber;
|
|
51
|
+
charges: z.ZodNumber;
|
|
52
|
+
}, z.core.$strip>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
401: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
55
|
+
403: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
56
|
+
500: z.ZodType<import("../../../_common").HttpErrorResponse, unknown, z.core.$ZodTypeInternals<import("../../../_common").HttpErrorResponse, unknown>>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type GetAdminStatsQueryQueryType = z.infer<typeof GetAdminStatsQueryQuery>;
|
|
60
|
+
export type GetAdminStatsQueryResponseType = z.infer<typeof GetAdminStatsQueryResponse>;
|
|
61
|
+
//# sourceMappingURL=get-admin-stats.query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-admin-stats.query.d.ts","sourceRoot":"","sources":["../../../../billing/endpoints/queries/get-admin-stats.query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAIzF,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;iBAA2B,CAAC;AAEnE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAa7B,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAClF,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetAdminStatsQuery = exports.GetAdminStatsQueryResponse = exports.GetAdminStatsQueryQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const _common_1 = require("../../../_common");
|
|
6
|
+
const admin_1 = require("../../../admin/endpoints/admin");
|
|
7
|
+
const models_1 = require("../../models");
|
|
8
|
+
exports.GetAdminStatsQueryQuery = zod_1.z.object({
|
|
9
|
+
from: zod_1.z.coerce.date().optional(),
|
|
10
|
+
to: zod_1.z.coerce.date().optional(),
|
|
11
|
+
});
|
|
12
|
+
exports.GetAdminStatsQueryResponse = models_1.AdminStatsResponseSchema;
|
|
13
|
+
exports.GetAdminStatsQuery = (0, _common_1.defineContract)({
|
|
14
|
+
method: _common_1.HTTP_METHODS.GET,
|
|
15
|
+
path: admin_1.ADMIN_ROUTES.STATS,
|
|
16
|
+
summary: 'Get transaction statistics (deposits and charges) for a date range',
|
|
17
|
+
request: {
|
|
18
|
+
query: exports.GetAdminStatsQueryQuery,
|
|
19
|
+
},
|
|
20
|
+
responses: {
|
|
21
|
+
200: exports.GetAdminStatsQueryResponse,
|
|
22
|
+
401: _common_1.HttpErrorResponseSchema,
|
|
23
|
+
403: _common_1.HttpErrorResponseSchema,
|
|
24
|
+
500: _common_1.HttpErrorResponseSchema,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../billing/endpoints/queries/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-admin-stats.query"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../billing/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,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("./model-type.enum"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-type.enum.d.ts","sourceRoot":"","sources":["../../../billing/enums/model-type.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;CAClB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MODEL_TYPE = void 0;
|
|
4
|
+
var MODEL_TYPE;
|
|
5
|
+
(function (MODEL_TYPE) {
|
|
6
|
+
MODEL_TYPE["TEXT"] = "text";
|
|
7
|
+
MODEL_TYPE["IMAGE"] = "image";
|
|
8
|
+
MODEL_TYPE["VIDEO"] = "video";
|
|
9
|
+
})(MODEL_TYPE || (exports.MODEL_TYPE = MODEL_TYPE = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../billing/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,37 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { MODEL_TYPE } from '../enums';
|
|
3
|
+
declare const ModelRevenueItemSchema: z.ZodObject<{
|
|
4
|
+
modelName: z.ZodString;
|
|
5
|
+
modelType: z.ZodEnum<typeof MODEL_TYPE>;
|
|
6
|
+
requestCount: z.ZodNumber;
|
|
7
|
+
revenue: z.ZodNumber;
|
|
8
|
+
revenueShare: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
declare const DailyDataPointSchema: z.ZodObject<{
|
|
11
|
+
date: z.ZodString;
|
|
12
|
+
deposits: z.ZodNumber;
|
|
13
|
+
charges: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const AdminStatsResponseSchema: z.ZodObject<{
|
|
16
|
+
totalDeposits: z.ZodNumber;
|
|
17
|
+
totalCharges: z.ZodNumber;
|
|
18
|
+
depositCount: z.ZodNumber;
|
|
19
|
+
chargeCount: z.ZodNumber;
|
|
20
|
+
modelRevenue: z.ZodArray<z.ZodObject<{
|
|
21
|
+
modelName: z.ZodString;
|
|
22
|
+
modelType: z.ZodEnum<typeof MODEL_TYPE>;
|
|
23
|
+
requestCount: z.ZodNumber;
|
|
24
|
+
revenue: z.ZodNumber;
|
|
25
|
+
revenueShare: z.ZodNumber;
|
|
26
|
+
}, z.core.$strip>>;
|
|
27
|
+
dailyBreakdown: z.ZodArray<z.ZodObject<{
|
|
28
|
+
date: z.ZodString;
|
|
29
|
+
deposits: z.ZodNumber;
|
|
30
|
+
charges: z.ZodNumber;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type AdminStatsResponseSchemaType = z.infer<typeof AdminStatsResponseSchema>;
|
|
34
|
+
export type ModelRevenueItem = z.infer<typeof ModelRevenueItemSchema>;
|
|
35
|
+
export type DailyDataPoint = z.infer<typeof DailyDataPointSchema>;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=admin-stats-response.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"admin-stats-response.schema.d.ts","sourceRoot":"","sources":["../../../billing/models/admin-stats-response.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,QAAA,MAAM,sBAAsB;;;;;;iBAM1B,CAAC;AAEH,QAAA,MAAM,oBAAoB;;;;iBAIxB,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;iBAOnC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdminStatsResponseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../enums");
|
|
6
|
+
const ModelRevenueItemSchema = zod_1.z.object({
|
|
7
|
+
modelName: zod_1.z.string(),
|
|
8
|
+
modelType: zod_1.z.enum(enums_1.MODEL_TYPE),
|
|
9
|
+
requestCount: zod_1.z.number().int().nonnegative(),
|
|
10
|
+
revenue: zod_1.z.number(),
|
|
11
|
+
revenueShare: zod_1.z.number(),
|
|
12
|
+
});
|
|
13
|
+
const DailyDataPointSchema = zod_1.z.object({
|
|
14
|
+
date: zod_1.z.string(),
|
|
15
|
+
deposits: zod_1.z.number(),
|
|
16
|
+
charges: zod_1.z.number(),
|
|
17
|
+
});
|
|
18
|
+
exports.AdminStatsResponseSchema = zod_1.z.object({
|
|
19
|
+
totalDeposits: zod_1.z.number(),
|
|
20
|
+
totalCharges: zod_1.z.number(),
|
|
21
|
+
depositCount: zod_1.z.number().int().nonnegative(),
|
|
22
|
+
chargeCount: zod_1.z.number().int().nonnegative(),
|
|
23
|
+
modelRevenue: zod_1.z.array(ModelRevenueItemSchema),
|
|
24
|
+
dailyBreakdown: zod_1.z.array(DailyDataPointSchema),
|
|
25
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../billing/models/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("./admin-stats-response.schema"), exports);
|
package/build/errors/errors.d.ts
CHANGED
|
@@ -316,6 +316,11 @@ export declare const ERRORS: {
|
|
|
316
316
|
readonly code: "GENERATION_JOB.CHAT_MODEL_MISMATCH";
|
|
317
317
|
readonly message: "Этот чат заблокирован для другой модели генерации";
|
|
318
318
|
};
|
|
319
|
+
readonly ALREADY_TERMINAL: {
|
|
320
|
+
readonly httpCode: 400;
|
|
321
|
+
readonly code: "GENERATION_JOB.ALREADY_TERMINAL";
|
|
322
|
+
readonly message: "Задача генерации уже завершена и не может быть отменена";
|
|
323
|
+
};
|
|
319
324
|
};
|
|
320
325
|
readonly BILLING: {
|
|
321
326
|
readonly QUOTE_ERROR: {
|
|
@@ -560,6 +565,11 @@ export declare const ERRORS: {
|
|
|
560
565
|
readonly code: "ADMIN.CANNOT_BAN_ADMIN";
|
|
561
566
|
readonly message: "Невозможно заблокировать администратора";
|
|
562
567
|
};
|
|
568
|
+
readonly STATS_ERROR: {
|
|
569
|
+
readonly httpCode: 500;
|
|
570
|
+
readonly code: "ADMIN.STATS_ERROR";
|
|
571
|
+
readonly message: "Не удалось получить статистику";
|
|
572
|
+
};
|
|
563
573
|
};
|
|
564
574
|
readonly REFERRAL: {
|
|
565
575
|
readonly SELF_REFERRAL: {
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2rBT,CAAC"}
|
package/build/errors/errors.js
CHANGED
|
@@ -319,6 +319,11 @@ exports.ERRORS = {
|
|
|
319
319
|
code: 'GENERATION_JOB.CHAT_MODEL_MISMATCH',
|
|
320
320
|
message: 'Этот чат заблокирован для другой модели генерации',
|
|
321
321
|
},
|
|
322
|
+
ALREADY_TERMINAL: {
|
|
323
|
+
httpCode: 400,
|
|
324
|
+
code: 'GENERATION_JOB.ALREADY_TERMINAL',
|
|
325
|
+
message: 'Задача генерации уже завершена и не может быть отменена',
|
|
326
|
+
},
|
|
322
327
|
},
|
|
323
328
|
BILLING: {
|
|
324
329
|
QUOTE_ERROR: {
|
|
@@ -563,6 +568,11 @@ exports.ERRORS = {
|
|
|
563
568
|
code: 'ADMIN.CANNOT_BAN_ADMIN',
|
|
564
569
|
message: 'Невозможно заблокировать администратора',
|
|
565
570
|
},
|
|
571
|
+
STATS_ERROR: {
|
|
572
|
+
httpCode: 500,
|
|
573
|
+
code: 'ADMIN.STATS_ERROR',
|
|
574
|
+
message: 'Не удалось получить статистику',
|
|
575
|
+
},
|
|
566
576
|
},
|
|
567
577
|
REFERRAL: {
|
|
568
578
|
SELF_REFERRAL: {
|
|
@@ -19,6 +19,10 @@ export declare const CreateGenerationJobCommandResponse: z.ZodObject<{
|
|
|
19
19
|
outputs: z.ZodArray<z.ZodObject<{
|
|
20
20
|
uuid: z.ZodUUID;
|
|
21
21
|
url: z.ZodURL;
|
|
22
|
+
title: z.ZodOptional<z.ZodString>;
|
|
23
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
24
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
22
26
|
}, z.core.$strip>>;
|
|
23
27
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
24
28
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -52,6 +56,10 @@ export declare const CreateGenerationJobCommand: {
|
|
|
52
56
|
outputs: z.ZodArray<z.ZodObject<{
|
|
53
57
|
uuid: z.ZodUUID;
|
|
54
58
|
url: z.ZodURL;
|
|
59
|
+
title: z.ZodOptional<z.ZodString>;
|
|
60
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
61
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
55
63
|
}, z.core.$strip>>;
|
|
56
64
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
57
65
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-generation-job.command.d.ts","sourceRoot":"","sources":["../../../../generation-job/endpoints/commands/create-generation-job.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAKzF,eAAO,MAAM,8BAA8B;;;;;;;;iBAQzC,CAAC;AAEH,eAAO,MAAM,kCAAkC
|
|
1
|
+
{"version":3,"file":"create-generation-job.command.d.ts","sourceRoot":"","sources":["../../../../generation-job/endpoints/commands/create-generation-job.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AAKzF,eAAO,MAAM,8BAA8B;;;;;;;;iBAQzC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAC;AAE9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAarC,CAAC"}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { HTTP_METHODS } from '../../../_common';
|
|
3
|
+
import { GENERATION_JOB_STATUS } from '../../enums';
|
|
3
4
|
export declare const UpdateGenerationJobCommandParams: z.ZodObject<{
|
|
4
5
|
uuid: z.ZodUUID;
|
|
5
6
|
}, z.core.$strip>;
|
|
6
7
|
export declare const UpdateGenerationJobCommandBody: z.ZodObject<{
|
|
7
|
-
status: z.
|
|
8
|
-
providerJobId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
|
-
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
11
|
-
finishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
12
|
-
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
13
|
-
uuid: z.ZodUUID;
|
|
14
|
-
url: z.ZodURL;
|
|
15
|
-
}, z.core.$strip>>>;
|
|
8
|
+
status: z.ZodLiteral<GENERATION_JOB_STATUS.CANCELED>;
|
|
16
9
|
}, z.core.$strip>;
|
|
17
10
|
export declare const UpdateGenerationJobCommandResponse: z.ZodObject<{
|
|
18
11
|
uuid: z.ZodUUID;
|
|
19
12
|
jobChatId: z.ZodUUID;
|
|
20
13
|
modelId: z.ZodUUID;
|
|
21
14
|
generationType: z.ZodEnum<typeof import("../../..").GENERATION_TYPE>;
|
|
22
|
-
status: z.ZodEnum<typeof
|
|
15
|
+
status: z.ZodEnum<typeof GENERATION_JOB_STATUS>;
|
|
23
16
|
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
24
17
|
outputs: z.ZodArray<z.ZodObject<{
|
|
25
18
|
uuid: z.ZodUUID;
|
|
26
19
|
url: z.ZodURL;
|
|
20
|
+
title: z.ZodOptional<z.ZodString>;
|
|
21
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
22
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
27
24
|
}, z.core.$strip>>;
|
|
28
25
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
29
26
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -40,15 +37,7 @@ export declare const UpdateGenerationJobCommand: {
|
|
|
40
37
|
uuid: z.ZodUUID;
|
|
41
38
|
}, z.core.$strip>;
|
|
42
39
|
body: z.ZodObject<{
|
|
43
|
-
status: z.
|
|
44
|
-
providerJobId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
-
errorMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
|
-
startedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
47
|
-
finishedAt: z.ZodOptional<z.ZodNullable<z.ZodISODateTime>>;
|
|
48
|
-
outputs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
49
|
-
uuid: z.ZodUUID;
|
|
50
|
-
url: z.ZodURL;
|
|
51
|
-
}, z.core.$strip>>>;
|
|
40
|
+
status: z.ZodLiteral<GENERATION_JOB_STATUS.CANCELED>;
|
|
52
41
|
}, z.core.$strip>;
|
|
53
42
|
};
|
|
54
43
|
responses: {
|
|
@@ -57,11 +46,15 @@ export declare const UpdateGenerationJobCommand: {
|
|
|
57
46
|
jobChatId: z.ZodUUID;
|
|
58
47
|
modelId: z.ZodUUID;
|
|
59
48
|
generationType: z.ZodEnum<typeof import("../../..").GENERATION_TYPE>;
|
|
60
|
-
status: z.ZodEnum<typeof
|
|
49
|
+
status: z.ZodEnum<typeof GENERATION_JOB_STATUS>;
|
|
61
50
|
params: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
62
51
|
outputs: z.ZodArray<z.ZodObject<{
|
|
63
52
|
uuid: z.ZodUUID;
|
|
64
53
|
url: z.ZodURL;
|
|
54
|
+
title: z.ZodOptional<z.ZodString>;
|
|
55
|
+
tags: z.ZodOptional<z.ZodString>;
|
|
56
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
57
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
65
58
|
}, z.core.$strip>>;
|
|
66
59
|
errorMessage: z.ZodNullable<z.ZodString>;
|
|
67
60
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-generation-job.command.d.ts","sourceRoot":"","sources":["../../../../generation-job/endpoints/commands/update-generation-job.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"update-generation-job.command.d.ts","sourceRoot":"","sources":["../../../../generation-job/endpoints/commands/update-generation-job.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,YAAY,EAA2B,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAIpD,eAAO,MAAM,gCAAgC;;iBAE3C,CAAC;AAEH,eAAO,MAAM,8BAA8B;;iBAEzC,CAAC;AAEH,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;iBAA8B,CAAC;AAE9E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAcrC,CAAC"}
|
|
@@ -3,22 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.UpdateGenerationJobCommand = exports.UpdateGenerationJobCommandResponse = exports.UpdateGenerationJobCommandBody = exports.UpdateGenerationJobCommandParams = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const _common_1 = require("../../../_common");
|
|
6
|
+
const enums_1 = require("../../enums");
|
|
6
7
|
const models_1 = require("../../models");
|
|
7
8
|
const generation_job_1 = require("../generation-job");
|
|
8
9
|
exports.UpdateGenerationJobCommandParams = zod_1.z.object({
|
|
9
10
|
uuid: zod_1.z.uuid(),
|
|
10
11
|
});
|
|
11
|
-
exports.UpdateGenerationJobCommandBody = zod_1.z
|
|
12
|
-
.
|
|
13
|
-
status: models_1.GenerationJobStatusSchema.optional(),
|
|
14
|
-
providerJobId: zod_1.z.string().min(1).nullable().optional(),
|
|
15
|
-
errorMessage: zod_1.z.string().min(1).nullable().optional(),
|
|
16
|
-
startedAt: zod_1.z.iso.datetime().nullable().optional(),
|
|
17
|
-
finishedAt: zod_1.z.iso.datetime().nullable().optional(),
|
|
18
|
-
outputs: zod_1.z.array(models_1.GenerationJobOutputSchema).optional(),
|
|
19
|
-
})
|
|
20
|
-
.refine((value) => Object.keys(value).length > 0, {
|
|
21
|
-
message: 'At least one field is required',
|
|
12
|
+
exports.UpdateGenerationJobCommandBody = zod_1.z.object({
|
|
13
|
+
status: zod_1.z.literal(enums_1.GENERATION_JOB_STATUS.CANCELED),
|
|
22
14
|
});
|
|
23
15
|
exports.UpdateGenerationJobCommandResponse = models_1.GenerationJobResponseSchema;
|
|
24
16
|
exports.UpdateGenerationJobCommand = (0, _common_1.defineContract)({
|