@purpleschool/gptbot 0.12.15 → 0.12.17
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/team-account.ts +1 -0
- package/api/routes.ts +2 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/team-account/find-team-account-by-uuid.command.js +14 -0
- package/build/commands/team-account/index.js +1 -0
- package/build/commands/tools/image-editor/image-editor.command.js +6 -0
- package/commands/team-account/find-team-account-by-uuid.command.ts +16 -0
- package/commands/team-account/index.ts +1 -0
- package/commands/tools/image-editor/image-editor.command.ts +6 -0
- package/package.json +1 -1
|
@@ -26,4 +26,5 @@ export const TEAM_ACCOUNT_ROUTES = {
|
|
|
26
26
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
|
|
27
27
|
`admin/subscriptions/current/${teamAccountId}`,
|
|
28
28
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) => `admin/payments/history/${teamAccountId}`,
|
|
29
|
+
ADMIN_FIND_BY_UUID: (uuid: string) => `admin/find/${uuid}`,
|
|
29
30
|
} as const;
|
package/api/routes.ts
CHANGED
|
@@ -211,6 +211,8 @@ export const REST_API = {
|
|
|
211
211
|
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
212
212
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) =>
|
|
213
213
|
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
|
|
214
|
+
ADMIN_FIND_BY_UUID: (teamAccountId: string) =>
|
|
215
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
|
|
214
216
|
},
|
|
215
217
|
FILES: {
|
|
216
218
|
UPLOAD_FILE: `${ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
|
|
@@ -27,4 +27,5 @@ exports.TEAM_ACCOUNT_ROUTES = {
|
|
|
27
27
|
ADMIN_GET_INVOICES: 'admin/invoices',
|
|
28
28
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `admin/subscriptions/current/${teamAccountId}`,
|
|
29
29
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `admin/payments/history/${teamAccountId}`,
|
|
30
|
+
ADMIN_FIND_BY_UUID: (uuid) => `admin/find/${uuid}`,
|
|
30
31
|
};
|
package/build/api/routes.js
CHANGED
|
@@ -208,6 +208,7 @@ exports.REST_API = {
|
|
|
208
208
|
ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
|
|
209
209
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
210
210
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
|
|
211
|
+
ADMIN_FIND_BY_UUID: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
|
|
211
212
|
},
|
|
212
213
|
FILES: {
|
|
213
214
|
UPLOAD_FILE: `${exports.ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FindTeamAccountByUuidCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var FindTeamAccountByUuidCommand;
|
|
7
|
+
(function (FindTeamAccountByUuidCommand) {
|
|
8
|
+
FindTeamAccountByUuidCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
uuid: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
FindTeamAccountByUuidCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
data: models_1.TeamAccountWithBalanceSchema,
|
|
13
|
+
});
|
|
14
|
+
})(FindTeamAccountByUuidCommand || (exports.FindTeamAccountByUuidCommand = FindTeamAccountByUuidCommand = {}));
|
|
@@ -37,6 +37,7 @@ __exportStar(require("./get-team-account-balance.command"), exports);
|
|
|
37
37
|
__exportStar(require("./create-manual-team-subscription.command"), exports);
|
|
38
38
|
__exportStar(require("./create-manual-team-product.command"), exports);
|
|
39
39
|
__exportStar(require("./find-team-accounts-by-name.command"), exports);
|
|
40
|
+
__exportStar(require("./find-team-account-by-uuid.command"), exports);
|
|
40
41
|
__exportStar(require("./create-team-account-invoice-payment.command"), exports);
|
|
41
42
|
__exportStar(require("./get-invoice-for-payment.command"), exports);
|
|
42
43
|
__exportStar(require("./get-team-account-payment-history.command"), exports);
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ImageEditorCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const constants_1 = require("../../../constants");
|
|
5
6
|
const models_1 = require("../../../models");
|
|
6
7
|
var ImageEditorCommand;
|
|
7
8
|
(function (ImageEditorCommand) {
|
|
8
9
|
ImageEditorCommand.RequestSchema = zod_1.z.object({
|
|
10
|
+
workspaceId: zod_1.z.string().uuid().nullable().optional(),
|
|
11
|
+
workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
|
|
12
|
+
workspaceToolType: zod_1.z.nativeEnum(constants_1.TOOL_CONTENT_TYPE).nullable().optional(),
|
|
13
|
+
workspaceSlot: zod_1.z.nativeEnum(constants_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
14
|
+
workspaceOrder: zod_1.z.number().int().min(0).optional(),
|
|
9
15
|
modelId: zod_1.z.string().uuid(),
|
|
10
16
|
prompt: zod_1.z.string(),
|
|
11
17
|
params: zod_1.z.object({
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TeamAccountWithBalanceSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace FindTeamAccountByUuidCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
uuid: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
data: TeamAccountWithBalanceSchema,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -21,6 +21,7 @@ export * from './get-team-account-balance.command';
|
|
|
21
21
|
export * from './create-manual-team-subscription.command';
|
|
22
22
|
export * from './create-manual-team-product.command';
|
|
23
23
|
export * from './find-team-accounts-by-name.command';
|
|
24
|
+
export * from './find-team-account-by-uuid.command';
|
|
24
25
|
export * from './create-team-account-invoice-payment.command';
|
|
25
26
|
export * from './get-invoice-for-payment.command';
|
|
26
27
|
export * from './get-team-account-payment-history.command';
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { TOOL_CONTENT_TYPE, TOOL_WORKSPACE_ITEM_SLOT } from '../../../constants';
|
|
2
3
|
import { ToolJobSchema } from '../../../models';
|
|
3
4
|
|
|
4
5
|
export namespace ImageEditorCommand {
|
|
5
6
|
export const RequestSchema = z.object({
|
|
7
|
+
workspaceId: z.string().uuid().nullable().optional(),
|
|
8
|
+
workspaceItemId: z.string().uuid().nullable().optional(),
|
|
9
|
+
workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
|
|
10
|
+
workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
|
|
11
|
+
workspaceOrder: z.number().int().min(0).optional(),
|
|
6
12
|
modelId: z.string().uuid(),
|
|
7
13
|
prompt: z.string(),
|
|
8
14
|
params: z.object({
|