@purpleschool/gptbot 0.8.66 → 0.8.68
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/api/controllers/http/b2b.ts +10 -0
- package/api/controllers/http/chat-private.ts +0 -1
- package/api/controllers/http/index.ts +1 -1
- package/api/routes.ts +12 -5
- package/build/api/controllers/http/b2b.js +12 -0
- package/build/api/controllers/http/chat-private.js +0 -1
- package/build/api/controllers/http/index.js +1 -1
- package/build/api/routes.js +10 -4
- package/build/commands/b2b/get-api-key.command.js +12 -0
- package/build/commands/b2b/index.js +21 -0
- package/build/commands/b2b/refresh-api-key.command.js +12 -0
- package/build/commands/{message/create-image-message.command.js → b2b/send-image-request.command.js} +11 -12
- package/build/commands/b2b/send-text-request.command.js +22 -0
- package/build/commands/b2b/submit-balance-top-up-form.command.js +21 -0
- package/build/commands/index.js +1 -0
- package/build/commands/message/index.js +0 -1
- package/build/constants/errors/errors.js +29 -4
- package/build/constants/form-submission/enums/form-type.enum.js +1 -0
- package/build/models/api-key.schema.js +15 -0
- package/build/models/community/community-post-media-data.schema.js +1 -1
- package/build/models/community/community-post.schema.js +3 -2
- package/build/models/index.js +1 -0
- package/commands/b2b/get-api-key.command.ts +11 -0
- package/commands/b2b/index.ts +5 -0
- package/commands/b2b/refresh-api-key.command.ts +11 -0
- package/commands/{message/create-image-message.command.ts → b2b/send-image-request.command.ts} +6 -8
- package/commands/b2b/send-text-request.command.ts +26 -0
- package/commands/b2b/submit-balance-top-up-form.command.ts +22 -0
- package/commands/index.ts +1 -0
- package/commands/message/index.ts +0 -1
- package/constants/errors/errors.ts +29 -4
- package/constants/form-submission/enums/form-type.enum.ts +1 -0
- package/models/api-key.schema.ts +10 -0
- package/models/community/community-post-media-data.schema.ts +2 -2
- package/models/community/community-post.schema.ts +3 -2
- package/models/index.ts +1 -0
- package/package.json +1 -1
- package/api/controllers/http/kie.ts +0 -5
- package/build/api/controllers/http/kie.js +0 -7
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const B2B_CONTROLLER = 'private/b2b' as const;
|
|
2
|
+
|
|
3
|
+
export const B2B_ROUTES = {
|
|
4
|
+
GET_API_TOKEN: 'token',
|
|
5
|
+
REFRESH_API_TOKEN: 'token/refresh',
|
|
6
|
+
SEND_TEXT_REQUEST: 'completions',
|
|
7
|
+
SEND_IMAGE_REQUEST: 'image/generation',
|
|
8
|
+
FILE_UPLOAD: 'file/upload',
|
|
9
|
+
BALANCE_TOP_UP: 'balance/top-up',
|
|
10
|
+
} as const;
|
|
@@ -9,7 +9,6 @@ export const CHAT_PRIVATE_ROUTES = {
|
|
|
9
9
|
FIND_MANY: '',
|
|
10
10
|
FIND_BY_UUID: (uuid: string) => `${uuid}`,
|
|
11
11
|
SEND_TEXT_MESSAGE: (uuid: string) => `${uuid}/messages/text`,
|
|
12
|
-
SEND_IMAGE_MESSAGE: (uuid: string) => `${uuid}/messages/image`,
|
|
13
12
|
ARCHIVE: 'archive',
|
|
14
13
|
DELETE: (uuid: string) => `${uuid}`,
|
|
15
14
|
UPDATE: (uuid: string) => `${uuid}`,
|
|
@@ -14,7 +14,6 @@ export * from './form-submission';
|
|
|
14
14
|
export * from './key-value';
|
|
15
15
|
export * from './referral';
|
|
16
16
|
export * from './message';
|
|
17
|
-
export * from './kie';
|
|
18
17
|
export * from './page';
|
|
19
18
|
export * from './payment';
|
|
20
19
|
export * from './presentation';
|
|
@@ -53,6 +52,7 @@ export * from './cabinet';
|
|
|
53
52
|
export * from './webmaster';
|
|
54
53
|
export * from './music';
|
|
55
54
|
export * from './webmaster-click';
|
|
55
|
+
export * from './b2b';
|
|
56
56
|
export * from './community';
|
|
57
57
|
export * from './user-profile';
|
|
58
58
|
export * from './image-generation';
|
package/api/routes.ts
CHANGED
|
@@ -104,8 +104,6 @@ export const REST_API = {
|
|
|
104
104
|
`${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.SEND_TEXT_MESSAGE(uuid)}`,
|
|
105
105
|
CREATE_SUGGESTIONS: (uuid: string) =>
|
|
106
106
|
`${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.CREATE_SUGGESTIONS(uuid)}`,
|
|
107
|
-
SEND_IMAGE_MESSAGE: (uuid: string) =>
|
|
108
|
-
`${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.SEND_IMAGE_MESSAGE(uuid)}`,
|
|
109
107
|
ARCHIVE: `${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.ARCHIVE}`,
|
|
110
108
|
DELETE: (uuid: string) =>
|
|
111
109
|
`${ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.DELETE(uuid)}`,
|
|
@@ -628,6 +626,8 @@ export const REST_API = {
|
|
|
628
626
|
EXPORT_AS_PPTX: (uuid: string) =>
|
|
629
627
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
630
628
|
DELETE_ALL: `${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_ALL}`,
|
|
629
|
+
SET_REACTION: (uuid: string) =>
|
|
630
|
+
`${ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.SET_REACTION(uuid)}`,
|
|
631
631
|
},
|
|
632
632
|
PRESENTATION_PRIVATE: {
|
|
633
633
|
CONFIG: `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CONFIG}`,
|
|
@@ -674,6 +674,8 @@ export const REST_API = {
|
|
|
674
674
|
EXPORT_AS_PPTX: (uuid: string) =>
|
|
675
675
|
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
676
676
|
DELETE_ALL: `${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_ALL}`,
|
|
677
|
+
SET_REACTION: (uuid: string) =>
|
|
678
|
+
`${ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.SET_REACTION(uuid)}`,
|
|
677
679
|
},
|
|
678
680
|
IMAGE_EDITOR_PUBLIC: {
|
|
679
681
|
CONFIG: `${ROOT}/${CONTROLLERS.IMAGE_EDITOR_CONTROLLER_PUBLIC}/${CONTROLLERS.IMAGE_EDITOR_ROUTES.CONFIG}`,
|
|
@@ -846,12 +848,17 @@ export const REST_API = {
|
|
|
846
848
|
DELETE_BY_KEY: (namespace: string, key: string) =>
|
|
847
849
|
`${ROOT}/${CONTROLLERS.KEY_VALUE_NAMESPACE_CONTROLLER}/${CONTROLLERS.KEY_VALUE_NAMESPACE_ROUTES.DELETE_BY_KEY(namespace, key)}`,
|
|
848
850
|
},
|
|
849
|
-
KIE: {
|
|
850
|
-
CALLBACK: `${ROOT}/${CONTROLLERS.KIE_CONTROLLER}/${CONTROLLERS.KIE_ROUTES.CALLBACK}`,
|
|
851
|
-
},
|
|
852
851
|
CLOUD_PAYMENTS: {
|
|
853
852
|
CALLBACK: `${ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}`,
|
|
854
853
|
},
|
|
854
|
+
B2B: {
|
|
855
|
+
GET_API_TOKEN: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.GET_API_TOKEN}`,
|
|
856
|
+
REFRESH_API_TOKEN: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.REFRESH_API_TOKEN}`,
|
|
857
|
+
SEND_TEXT_REQUEST: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_TEXT_REQUEST}`,
|
|
858
|
+
SEND_IMAGE_REQUEST: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_IMAGE_REQUEST}`,
|
|
859
|
+
FILE_UPLOAD: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.FILE_UPLOAD}`,
|
|
860
|
+
BALANCE_TOP_UP: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.BALANCE_TOP_UP}`,
|
|
861
|
+
},
|
|
855
862
|
COMMUNITY_PRIVATE: {
|
|
856
863
|
GET_ALL: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_ALL}`,
|
|
857
864
|
GET_MY: `${ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY}`,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.B2B_ROUTES = exports.B2B_CONTROLLER = void 0;
|
|
4
|
+
exports.B2B_CONTROLLER = 'private/b2b';
|
|
5
|
+
exports.B2B_ROUTES = {
|
|
6
|
+
GET_API_TOKEN: 'token',
|
|
7
|
+
REFRESH_API_TOKEN: 'token/refresh',
|
|
8
|
+
SEND_TEXT_REQUEST: 'completions',
|
|
9
|
+
SEND_IMAGE_REQUEST: 'image/generation',
|
|
10
|
+
FILE_UPLOAD: 'file/upload',
|
|
11
|
+
BALANCE_TOP_UP: 'balance/top-up',
|
|
12
|
+
};
|
|
@@ -11,7 +11,6 @@ exports.CHAT_PRIVATE_ROUTES = {
|
|
|
11
11
|
FIND_MANY: '',
|
|
12
12
|
FIND_BY_UUID: (uuid) => `${uuid}`,
|
|
13
13
|
SEND_TEXT_MESSAGE: (uuid) => `${uuid}/messages/text`,
|
|
14
|
-
SEND_IMAGE_MESSAGE: (uuid) => `${uuid}/messages/image`,
|
|
15
14
|
ARCHIVE: 'archive',
|
|
16
15
|
DELETE: (uuid) => `${uuid}`,
|
|
17
16
|
UPDATE: (uuid) => `${uuid}`,
|
|
@@ -30,7 +30,6 @@ __exportStar(require("./form-submission"), exports);
|
|
|
30
30
|
__exportStar(require("./key-value"), exports);
|
|
31
31
|
__exportStar(require("./referral"), exports);
|
|
32
32
|
__exportStar(require("./message"), exports);
|
|
33
|
-
__exportStar(require("./kie"), exports);
|
|
34
33
|
__exportStar(require("./page"), exports);
|
|
35
34
|
__exportStar(require("./payment"), exports);
|
|
36
35
|
__exportStar(require("./presentation"), exports);
|
|
@@ -69,6 +68,7 @@ __exportStar(require("./cabinet"), exports);
|
|
|
69
68
|
__exportStar(require("./webmaster"), exports);
|
|
70
69
|
__exportStar(require("./music"), exports);
|
|
71
70
|
__exportStar(require("./webmaster-click"), exports);
|
|
71
|
+
__exportStar(require("./b2b"), exports);
|
|
72
72
|
__exportStar(require("./community"), exports);
|
|
73
73
|
__exportStar(require("./user-profile"), exports);
|
|
74
74
|
__exportStar(require("./image-generation"), exports);
|
package/build/api/routes.js
CHANGED
|
@@ -123,7 +123,6 @@ exports.REST_API = {
|
|
|
123
123
|
FIND_BY_UUID: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.FIND_BY_UUID(uuid)}`,
|
|
124
124
|
SEND_TEXT_MESSAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.SEND_TEXT_MESSAGE(uuid)}`,
|
|
125
125
|
CREATE_SUGGESTIONS: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.CREATE_SUGGESTIONS(uuid)}`,
|
|
126
|
-
SEND_IMAGE_MESSAGE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.SEND_IMAGE_MESSAGE(uuid)}`,
|
|
127
126
|
ARCHIVE: `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.ARCHIVE}`,
|
|
128
127
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.DELETE(uuid)}`,
|
|
129
128
|
UPDATE: (uuid) => `${exports.ROOT}/${CONTROLLERS.CHAT_PRIVATE_CONTROLLER}/${CONTROLLERS.CHAT_PRIVATE_ROUTES.UPDATE(uuid)}`,
|
|
@@ -495,6 +494,7 @@ exports.REST_API = {
|
|
|
495
494
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
|
|
496
495
|
EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
497
496
|
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_ALL}`,
|
|
497
|
+
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PUBLIC_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.SET_REACTION(uuid)}`,
|
|
498
498
|
},
|
|
499
499
|
PRESENTATION_PRIVATE: {
|
|
500
500
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CONFIG}`,
|
|
@@ -522,6 +522,7 @@ exports.REST_API = {
|
|
|
522
522
|
CREATE_SLIDE_OUTLINE: (presentationId) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.CREATE_SLIDE_OUTLINE(presentationId)}`,
|
|
523
523
|
EXPORT_AS_PPTX: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.EXPORT_AS_PPTX(uuid)}`,
|
|
524
524
|
DELETE_ALL: `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.DELETE_ALL}`,
|
|
525
|
+
SET_REACTION: (uuid) => `${exports.ROOT}/${CONTROLLERS.PRESENTATION_PRIVATE_CONTROLLER}/${CONTROLLERS.PRESENTATION_ROUTES.SET_REACTION(uuid)}`,
|
|
525
526
|
},
|
|
526
527
|
IMAGE_EDITOR_PUBLIC: {
|
|
527
528
|
CONFIG: `${exports.ROOT}/${CONTROLLERS.IMAGE_EDITOR_CONTROLLER_PUBLIC}/${CONTROLLERS.IMAGE_EDITOR_ROUTES.CONFIG}`,
|
|
@@ -653,12 +654,17 @@ exports.REST_API = {
|
|
|
653
654
|
CREATE: (namespace) => `${exports.ROOT}/${CONTROLLERS.KEY_VALUE_NAMESPACE_CONTROLLER}/${CONTROLLERS.KEY_VALUE_NAMESPACE_ROUTES.CREATE(namespace)}`,
|
|
654
655
|
DELETE_BY_KEY: (namespace, key) => `${exports.ROOT}/${CONTROLLERS.KEY_VALUE_NAMESPACE_CONTROLLER}/${CONTROLLERS.KEY_VALUE_NAMESPACE_ROUTES.DELETE_BY_KEY(namespace, key)}`,
|
|
655
656
|
},
|
|
656
|
-
KIE: {
|
|
657
|
-
CALLBACK: `${exports.ROOT}/${CONTROLLERS.KIE_CONTROLLER}/${CONTROLLERS.KIE_ROUTES.CALLBACK}`,
|
|
658
|
-
},
|
|
659
657
|
CLOUD_PAYMENTS: {
|
|
660
658
|
CALLBACK: `${exports.ROOT}/${CONTROLLERS.CLOUD_PAYMENTS_CONTROLLER}/${CONTROLLERS.CLOUD_PAYMENTS_ROUTES.CALLBACK}`,
|
|
661
659
|
},
|
|
660
|
+
B2B: {
|
|
661
|
+
GET_API_TOKEN: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.GET_API_TOKEN}`,
|
|
662
|
+
REFRESH_API_TOKEN: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.REFRESH_API_TOKEN}`,
|
|
663
|
+
SEND_TEXT_REQUEST: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_TEXT_REQUEST}`,
|
|
664
|
+
SEND_IMAGE_REQUEST: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_IMAGE_REQUEST}`,
|
|
665
|
+
FILE_UPLOAD: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.FILE_UPLOAD}`,
|
|
666
|
+
BALANCE_TOP_UP: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.BALANCE_TOP_UP}`,
|
|
667
|
+
},
|
|
662
668
|
COMMUNITY_PRIVATE: {
|
|
663
669
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_ALL}`,
|
|
664
670
|
GET_MY: `${exports.ROOT}/${CONTROLLERS.COMMUNITY_CONTROLLER_PRIVATE}/${CONTROLLERS.COMMUNITY_ROUTES_PRIVATE.GET_MY}`,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetApiKeyCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var GetApiKeyCommand;
|
|
6
|
+
(function (GetApiKeyCommand) {
|
|
7
|
+
GetApiKeyCommand.ResponseSchema = zod_1.z.object({
|
|
8
|
+
data: zod_1.z.object({
|
|
9
|
+
apiKey: zod_1.z.string(),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
})(GetApiKeyCommand || (exports.GetApiKeyCommand = GetApiKeyCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-api-key.command"), exports);
|
|
18
|
+
__exportStar(require("./refresh-api-key.command"), exports);
|
|
19
|
+
__exportStar(require("./send-text-request.command"), exports);
|
|
20
|
+
__exportStar(require("./send-image-request.command"), exports);
|
|
21
|
+
__exportStar(require("./submit-balance-top-up-form.command"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RefreshApiKeyCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RefreshApiKeyCommand;
|
|
6
|
+
(function (RefreshApiKeyCommand) {
|
|
7
|
+
RefreshApiKeyCommand.ResponseSchema = zod_1.z.object({
|
|
8
|
+
data: zod_1.z.object({
|
|
9
|
+
apiKey: zod_1.z.string(),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
})(RefreshApiKeyCommand || (exports.RefreshApiKeyCommand = RefreshApiKeyCommand = {}));
|
package/build/commands/{message/create-image-message.command.js → b2b/send-image-request.command.js}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const models_1 = require("../../models");
|
|
3
|
+
exports.SendImageRequestCommand = void 0;
|
|
5
4
|
const zod_1 = require("zod");
|
|
6
5
|
const constants_1 = require("../../constants");
|
|
7
|
-
var
|
|
8
|
-
(function (
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
var SendImageRequestCommand;
|
|
7
|
+
(function (SendImageRequestCommand) {
|
|
8
|
+
SendImageRequestCommand.RequestSchema = zod_1.z.object({
|
|
9
|
+
model: zod_1.z.string(),
|
|
10
|
+
prompt: zod_1.z.string(),
|
|
11
11
|
params: zod_1.z.array(zod_1.z.object({
|
|
12
12
|
type: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONFIG_PARAM),
|
|
13
13
|
option: zod_1.z.string().uuid(),
|
|
@@ -16,10 +16,9 @@ var CreateImageMessageCommand;
|
|
|
16
16
|
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)).optional().default([]),
|
|
17
17
|
files: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
SendImageRequestCommand.ResponseSchema = zod_1.z.object({
|
|
20
|
+
data: zod_1.z.object({
|
|
21
|
+
urls: zod_1.z.array(zod_1.z.string()),
|
|
22
|
+
}),
|
|
21
23
|
});
|
|
22
|
-
|
|
23
|
-
data: models_1.MessageSchema,
|
|
24
|
-
});
|
|
25
|
-
})(CreateImageMessageCommand || (exports.CreateImageMessageCommand = CreateImageMessageCommand = {}));
|
|
24
|
+
})(SendImageRequestCommand || (exports.SendImageRequestCommand = SendImageRequestCommand = {}));
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SendTextRequestCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var SendTextRequestCommand;
|
|
7
|
+
(function (SendTextRequestCommand) {
|
|
8
|
+
SendTextRequestCommand.BodySchema = zod_1.z.object({
|
|
9
|
+
model: zod_1.z.string(),
|
|
10
|
+
prompt: zod_1.z.string(),
|
|
11
|
+
files: zod_1.z.array(zod_1.z.string().uuid()),
|
|
12
|
+
features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
|
|
13
|
+
});
|
|
14
|
+
SendTextRequestCommand.HeadersSchema = zod_1.z.object({
|
|
15
|
+
'x-rugpt-key': zod_1.z.string(),
|
|
16
|
+
});
|
|
17
|
+
SendTextRequestCommand.ResponseSchema = zod_1.z.object({
|
|
18
|
+
data: zod_1.z.object({
|
|
19
|
+
text: zod_1.z.string(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
})(SendTextRequestCommand || (exports.SendTextRequestCommand = SendTextRequestCommand = {}));
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubmitBalanceTopUpFormCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../constants");
|
|
6
|
+
var SubmitBalanceTopUpFormCommand;
|
|
7
|
+
(function (SubmitBalanceTopUpFormCommand) {
|
|
8
|
+
SubmitBalanceTopUpFormCommand.BodySchema = zod_1.z.object({
|
|
9
|
+
organizationType: zod_1.z.nativeEnum(constants_1.ORGANIZATION_TYPE),
|
|
10
|
+
tin: zod_1.z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
|
|
11
|
+
telegram: zod_1.z.string(),
|
|
12
|
+
amount: zod_1.z.number().int().min(10000, {
|
|
13
|
+
message: 'Minimum top-up amount is 10000',
|
|
14
|
+
}),
|
|
15
|
+
});
|
|
16
|
+
SubmitBalanceTopUpFormCommand.ResponseSchema = zod_1.z.object({
|
|
17
|
+
data: zod_1.z.object({
|
|
18
|
+
isSuccess: zod_1.z.boolean(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
})(SubmitBalanceTopUpFormCommand || (exports.SubmitBalanceTopUpFormCommand = SubmitBalanceTopUpFormCommand = {}));
|
package/build/commands/index.js
CHANGED
|
@@ -55,5 +55,6 @@ __exportStar(require("./daily-streak"), exports);
|
|
|
55
55
|
__exportStar(require("./cabinet"), exports);
|
|
56
56
|
__exportStar(require("./webmaster"), exports);
|
|
57
57
|
__exportStar(require("./webmaster-click"), exports);
|
|
58
|
+
__exportStar(require("./b2b"), exports);
|
|
58
59
|
__exportStar(require("./community"), exports);
|
|
59
60
|
__exportStar(require("./user-profile"), exports);
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./create-image-message.command"), exports);
|
|
18
17
|
__exportStar(require("./create-text-message.command"), exports);
|
|
19
18
|
__exportStar(require("./find-message-by-uuid.command"), exports);
|
|
20
19
|
__exportStar(require("./rate-message.command"), exports);
|
|
@@ -2607,23 +2607,48 @@ exports.ERRORS = {
|
|
|
2607
2607
|
message: 'Произошла ошибка при установке оценки презентации',
|
|
2608
2608
|
httpCode: 500,
|
|
2609
2609
|
},
|
|
2610
|
-
|
|
2610
|
+
FAILED_TO_GENERATE_API_KEY: {
|
|
2611
2611
|
code: 'A532',
|
|
2612
|
+
message: 'Не удалось сгенерировать ключ API',
|
|
2613
|
+
httpCode: 500,
|
|
2614
|
+
},
|
|
2615
|
+
FAILED_TO_REFRESH_API_KEY: {
|
|
2616
|
+
code: 'A533',
|
|
2617
|
+
message: 'Не удалось обновить ключ API',
|
|
2618
|
+
httpCode: 500,
|
|
2619
|
+
},
|
|
2620
|
+
API_KEY_NOT_FOUND: {
|
|
2621
|
+
code: 'A534',
|
|
2622
|
+
message: 'Ключ API не найден',
|
|
2623
|
+
httpCode: 404,
|
|
2624
|
+
},
|
|
2625
|
+
API_KEY_IS_INACTIVE: {
|
|
2626
|
+
code: 'A535',
|
|
2627
|
+
message: 'Ключ API не активен',
|
|
2628
|
+
httpCode: 403,
|
|
2629
|
+
},
|
|
2630
|
+
API_KEY_ALREADY_EXISTS: {
|
|
2631
|
+
code: 'A536',
|
|
2632
|
+
message: 'Ключ API уже существует, если потеряли ключ воспользуйтесь GET token/refresh',
|
|
2633
|
+
httpCode: 409,
|
|
2634
|
+
},
|
|
2635
|
+
USER_NOT_FOUND_AGGREGATE_ERROR: {
|
|
2636
|
+
code: 'A537',
|
|
2612
2637
|
message: 'Произошла ошибка при получении пользователя',
|
|
2613
2638
|
httpCode: 500,
|
|
2614
2639
|
},
|
|
2615
2640
|
IMAGE_GENERATION_MODEL_FIND_ERROR: {
|
|
2616
|
-
code: '
|
|
2641
|
+
code: 'A538',
|
|
2617
2642
|
message: 'Произошла ошибка при получении модели для генерации изображений',
|
|
2618
2643
|
httpCode: 500,
|
|
2619
2644
|
},
|
|
2620
2645
|
COMMUNITY_POST_TRACK_INDEX_REQUIRED: {
|
|
2621
|
-
code: '
|
|
2646
|
+
code: 'A539',
|
|
2622
2647
|
message: 'Индекс трека обязателен для музыкального поста',
|
|
2623
2648
|
httpCode: 400,
|
|
2624
2649
|
},
|
|
2625
2650
|
COMMUNITY_POST_TRACK_INDEX_OUT_OF_RANGE: {
|
|
2626
|
-
code: '
|
|
2651
|
+
code: 'A560',
|
|
2627
2652
|
message: 'Индекс трека выходит за пределы допустимого диапазона',
|
|
2628
2653
|
httpCode: 400,
|
|
2629
2654
|
},
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ApiKeySchema = void 0;
|
|
7
|
+
const zod_1 = __importDefault(require("zod"));
|
|
8
|
+
exports.ApiKeySchema = zod_1.default.object({
|
|
9
|
+
uuid: zod_1.default.string().uuid(),
|
|
10
|
+
userId: zod_1.default.string().uuid(),
|
|
11
|
+
key: zod_1.default.string(),
|
|
12
|
+
isActive: zod_1.default.boolean(),
|
|
13
|
+
createdAt: zod_1.default.date(),
|
|
14
|
+
updatedAt: zod_1.default.date(),
|
|
15
|
+
});
|
|
@@ -11,7 +11,7 @@ exports.ImageCommunityMediaSchema = zod_1.z.object({
|
|
|
11
11
|
type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE),
|
|
12
12
|
text: zod_1.z.string().max(10000),
|
|
13
13
|
files: zod_1.z.array(file_schema_1.FileSchema.pick({ url: true })),
|
|
14
|
-
|
|
14
|
+
aspectRatio: zod_1.z.string().nullable().optional().default(null),
|
|
15
15
|
});
|
|
16
16
|
exports.ImageEditorCommunityMediaSchema = zod_1.z.object({
|
|
17
17
|
type: zod_1.z.literal(constants_1.COMMUNITY_POST_TYPE.IMAGE_EDITOR),
|
|
@@ -17,8 +17,7 @@ exports.CommunityPostSchema = zod_1.z.object({
|
|
|
17
17
|
aiModelId: zod_1.z.string().uuid(),
|
|
18
18
|
aiModelTitle: zod_1.z.string(),
|
|
19
19
|
aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
|
|
20
|
-
|
|
21
|
-
toolJobId: zod_1.z.string().nullable(),
|
|
20
|
+
toolJobId: zod_1.z.string(),
|
|
22
21
|
toolType: zod_1.z.nativeEnum(constants_1.COMMUNITY_TOOL_TYPE).nullable(),
|
|
23
22
|
views: zod_1.z.number(),
|
|
24
23
|
likesCount: zod_1.z.number(),
|
|
@@ -39,6 +38,7 @@ exports.ResponseCommunityPostSchema = zod_1.z.object({
|
|
|
39
38
|
aiModelId: zod_1.z.string().uuid(),
|
|
40
39
|
aiModelTitle: zod_1.z.string(),
|
|
41
40
|
aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
|
|
41
|
+
toolJobId: zod_1.z.string(),
|
|
42
42
|
views: zod_1.z.number(),
|
|
43
43
|
likesCount: zod_1.z.number(),
|
|
44
44
|
publishedAt: zod_1.z.date().nullable(),
|
|
@@ -51,6 +51,7 @@ exports.ResponseCommunityPostWithRelationsSchema = zod_1.z.object({
|
|
|
51
51
|
visibility: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_VISIBILITY),
|
|
52
52
|
type: zod_1.z.nativeEnum(constants_1.COMMUNITY_POST_TYPE),
|
|
53
53
|
mediaData: community_post_media_data_schema_1.CommunityPostMediaDataSchema,
|
|
54
|
+
toolJobId: zod_1.z.string(),
|
|
54
55
|
aiModelId: zod_1.z.string().uuid(),
|
|
55
56
|
aiModelTitle: zod_1.z.string(),
|
|
56
57
|
aiModelIcons: icon_variants_schema_1.IconVariantsSchema,
|
package/build/models/index.js
CHANGED
|
@@ -70,5 +70,6 @@ __exportStar(require("./webmaster.schema"), exports);
|
|
|
70
70
|
__exportStar(require("./webmaster-balance.schema"), exports);
|
|
71
71
|
__exportStar(require("./user-referrals.schema"), exports);
|
|
72
72
|
__exportStar(require("./webmaster-click.schema"), exports);
|
|
73
|
+
__exportStar(require("./api-key.schema"), exports);
|
|
73
74
|
__exportStar(require("./community"), exports);
|
|
74
75
|
__exportStar(require("./user-profile.schema"), exports);
|
package/commands/{message/create-image-message.command.ts → b2b/send-image-request.command.ts}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChatSchema, MessageSchema } from '../../models';
|
|
2
1
|
import { z } from 'zod';
|
|
3
2
|
import { AI_MODEL_CONFIG_PARAM, AI_MODEL_FEATURE } from '../../constants';
|
|
4
3
|
|
|
5
|
-
export namespace
|
|
4
|
+
export namespace SendImageRequestCommand {
|
|
6
5
|
export const RequestSchema = z.object({
|
|
7
|
-
|
|
6
|
+
model: z.string(),
|
|
7
|
+
prompt: z.string(),
|
|
8
8
|
params: z.array(
|
|
9
9
|
z.object({
|
|
10
10
|
type: z.nativeEnum(AI_MODEL_CONFIG_PARAM),
|
|
@@ -16,14 +16,12 @@ export namespace CreateImageMessageCommand {
|
|
|
16
16
|
files: z.array(z.string().uuid()).optional().default([]),
|
|
17
17
|
});
|
|
18
18
|
|
|
19
|
-
export const RequestParamSchema = ChatSchema.pick({
|
|
20
|
-
uuid: true,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
19
|
export type Request = z.infer<typeof RequestSchema>;
|
|
24
20
|
|
|
25
21
|
export const ResponseSchema = z.object({
|
|
26
|
-
data:
|
|
22
|
+
data: z.object({
|
|
23
|
+
urls: z.array(z.string()),
|
|
24
|
+
}),
|
|
27
25
|
});
|
|
28
26
|
|
|
29
27
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AI_MODEL_FEATURE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SendTextRequestCommand {
|
|
5
|
+
export const BodySchema = z.object({
|
|
6
|
+
model: z.string(),
|
|
7
|
+
prompt: z.string(),
|
|
8
|
+
files: z.array(z.string().uuid()),
|
|
9
|
+
features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const HeadersSchema = z.object({
|
|
13
|
+
'x-rugpt-key': z.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const ResponseSchema = z.object({
|
|
17
|
+
data: z.object({
|
|
18
|
+
text: z.string(),
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// ✅ Types
|
|
23
|
+
export type Body = z.infer<typeof BodySchema>;
|
|
24
|
+
export type Headers = z.infer<typeof HeadersSchema>;
|
|
25
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ORGANIZATION_TYPE } from '../../constants';
|
|
3
|
+
|
|
4
|
+
export namespace SubmitBalanceTopUpFormCommand {
|
|
5
|
+
export const BodySchema = z.object({
|
|
6
|
+
organizationType: z.nativeEnum(ORGANIZATION_TYPE),
|
|
7
|
+
tin: z.string().regex(/^\d{10}$|^\d{12}$/, 'ИНН должен быть длинной в 10 или 12 цифр'),
|
|
8
|
+
telegram: z.string(),
|
|
9
|
+
amount: z.number().int().min(10000, {
|
|
10
|
+
message: 'Minimum top-up amount is 10000',
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export const ResponseSchema = z.object({
|
|
15
|
+
data: z.object({
|
|
16
|
+
isSuccess: z.boolean(),
|
|
17
|
+
}),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export type Body = z.infer<typeof BodySchema>;
|
|
21
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
22
|
+
}
|
package/commands/index.ts
CHANGED
|
@@ -2615,23 +2615,48 @@ export const ERRORS = {
|
|
|
2615
2615
|
message: 'Произошла ошибка при установке оценки презентации',
|
|
2616
2616
|
httpCode: 500,
|
|
2617
2617
|
},
|
|
2618
|
-
|
|
2618
|
+
FAILED_TO_GENERATE_API_KEY: {
|
|
2619
2619
|
code: 'A532',
|
|
2620
|
+
message: 'Не удалось сгенерировать ключ API',
|
|
2621
|
+
httpCode: 500,
|
|
2622
|
+
},
|
|
2623
|
+
FAILED_TO_REFRESH_API_KEY: {
|
|
2624
|
+
code: 'A533',
|
|
2625
|
+
message: 'Не удалось обновить ключ API',
|
|
2626
|
+
httpCode: 500,
|
|
2627
|
+
},
|
|
2628
|
+
API_KEY_NOT_FOUND: {
|
|
2629
|
+
code: 'A534',
|
|
2630
|
+
message: 'Ключ API не найден',
|
|
2631
|
+
httpCode: 404,
|
|
2632
|
+
},
|
|
2633
|
+
API_KEY_IS_INACTIVE: {
|
|
2634
|
+
code: 'A535',
|
|
2635
|
+
message: 'Ключ API не активен',
|
|
2636
|
+
httpCode: 403,
|
|
2637
|
+
},
|
|
2638
|
+
API_KEY_ALREADY_EXISTS: {
|
|
2639
|
+
code: 'A536',
|
|
2640
|
+
message: 'Ключ API уже существует, если потеряли ключ воспользуйтесь GET token/refresh',
|
|
2641
|
+
httpCode: 409,
|
|
2642
|
+
},
|
|
2643
|
+
USER_NOT_FOUND_AGGREGATE_ERROR: {
|
|
2644
|
+
code: 'A537',
|
|
2620
2645
|
message: 'Произошла ошибка при получении пользователя',
|
|
2621
2646
|
httpCode: 500,
|
|
2622
2647
|
},
|
|
2623
2648
|
IMAGE_GENERATION_MODEL_FIND_ERROR: {
|
|
2624
|
-
code: '
|
|
2649
|
+
code: 'A538',
|
|
2625
2650
|
message: 'Произошла ошибка при получении модели для генерации изображений',
|
|
2626
2651
|
httpCode: 500,
|
|
2627
2652
|
},
|
|
2628
2653
|
COMMUNITY_POST_TRACK_INDEX_REQUIRED: {
|
|
2629
|
-
code: '
|
|
2654
|
+
code: 'A539',
|
|
2630
2655
|
message: 'Индекс трека обязателен для музыкального поста',
|
|
2631
2656
|
httpCode: 400,
|
|
2632
2657
|
},
|
|
2633
2658
|
COMMUNITY_POST_TRACK_INDEX_OUT_OF_RANGE: {
|
|
2634
|
-
code: '
|
|
2659
|
+
code: 'A560',
|
|
2635
2660
|
message: 'Индекс трека выходит за пределы допустимого диапазона',
|
|
2636
2661
|
httpCode: 400,
|
|
2637
2662
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { COMMUNITY_POST_TYPE
|
|
2
|
+
import { COMMUNITY_POST_TYPE } from '../../constants';
|
|
3
3
|
import { MusicTrackSchema } from '../tools/music/music-track.schema';
|
|
4
4
|
import { VideoJobParamsSchema } from '../tools/video/video-job.schema';
|
|
5
5
|
import { FileSchema } from '../file.schema';
|
|
@@ -9,7 +9,7 @@ export const ImageCommunityMediaSchema = z.object({
|
|
|
9
9
|
type: z.literal(COMMUNITY_POST_TYPE.IMAGE),
|
|
10
10
|
text: z.string().max(10000),
|
|
11
11
|
files: z.array(FileSchema.pick({ url: true })),
|
|
12
|
-
|
|
12
|
+
aspectRatio: z.string().nullable().optional().default(null),
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export const ImageEditorCommunityMediaSchema = z.object({
|
|
@@ -20,8 +20,7 @@ export const CommunityPostSchema = z.object({
|
|
|
20
20
|
aiModelId: z.string().uuid(),
|
|
21
21
|
aiModelTitle: z.string(),
|
|
22
22
|
aiModelIcons: IconVariantsSchema,
|
|
23
|
-
|
|
24
|
-
toolJobId: z.string().nullable(),
|
|
23
|
+
toolJobId: z.string(),
|
|
25
24
|
toolType: z.nativeEnum(COMMUNITY_TOOL_TYPE).nullable(),
|
|
26
25
|
views: z.number(),
|
|
27
26
|
likesCount: z.number(),
|
|
@@ -43,6 +42,7 @@ export const ResponseCommunityPostSchema = z.object({
|
|
|
43
42
|
aiModelId: z.string().uuid(),
|
|
44
43
|
aiModelTitle: z.string(),
|
|
45
44
|
aiModelIcons: IconVariantsSchema,
|
|
45
|
+
toolJobId: z.string(),
|
|
46
46
|
views: z.number(),
|
|
47
47
|
likesCount: z.number(),
|
|
48
48
|
publishedAt: z.date().nullable(),
|
|
@@ -56,6 +56,7 @@ export const ResponseCommunityPostWithRelationsSchema = z.object({
|
|
|
56
56
|
visibility: z.nativeEnum(COMMUNITY_POST_VISIBILITY),
|
|
57
57
|
type: z.nativeEnum(COMMUNITY_POST_TYPE),
|
|
58
58
|
mediaData: CommunityPostMediaDataSchema,
|
|
59
|
+
toolJobId: z.string(),
|
|
59
60
|
aiModelId: z.string().uuid(),
|
|
60
61
|
aiModelTitle: z.string(),
|
|
61
62
|
aiModelIcons: IconVariantsSchema,
|
package/models/index.ts
CHANGED
|
@@ -54,5 +54,6 @@ export * from './webmaster.schema';
|
|
|
54
54
|
export * from './webmaster-balance.schema';
|
|
55
55
|
export * from './user-referrals.schema';
|
|
56
56
|
export * from './webmaster-click.schema';
|
|
57
|
+
export * from './api-key.schema';
|
|
57
58
|
export * from './community';
|
|
58
59
|
export * from './user-profile.schema';
|
package/package.json
CHANGED