@purpleschool/gptbot 0.12.48 → 0.12.50
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 +2 -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/get-team-account-available-upgrades.command.js +14 -0
- package/build/commands/team-account/index.js +1 -0
- package/build/constants/tool-video/enums/video-generation-model-limitation.enum.js +1 -0
- package/build/models/team-account/team-to-product.schema.js +1 -0
- package/build/models/team-account/team-to-subscription.schema.js +1 -0
- package/build/models/tools/video/video-job.schema.js +2 -0
- package/build/models/tools/video/video-model.schema.js +8 -0
- package/commands/team-account/get-team-account-available-upgrades.command.ts +16 -0
- package/commands/team-account/index.ts +1 -0
- package/constants/tool-video/enums/video-generation-model-limitation.enum.ts +1 -0
- package/models/team-account/team-to-product.schema.ts +1 -0
- package/models/team-account/team-to-subscription.schema.ts +1 -0
- package/models/tools/video/video-job.schema.ts +2 -0
- package/models/tools/video/video-model.schema.ts +8 -0
- package/package.json +1 -1
|
@@ -25,6 +25,8 @@ export const TEAM_ACCOUNT_ROUTES = {
|
|
|
25
25
|
CREATE_INVOICE_PAYMENT: 'invoice-payment',
|
|
26
26
|
ADMIN_FIND_BY_NAME: 'admin/find',
|
|
27
27
|
ADMIN_GET_INVOICES: 'admin/invoices',
|
|
28
|
+
ADMIN_GET_AVAILABLE_UPGRADES: (teamAccountId: string) =>
|
|
29
|
+
`admin/subscriptions/upgrades/${teamAccountId}`,
|
|
28
30
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
|
|
29
31
|
`admin/subscriptions/current/${teamAccountId}`,
|
|
30
32
|
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId: string) =>
|
package/api/routes.ts
CHANGED
|
@@ -216,6 +216,8 @@ export const REST_API = {
|
|
|
216
216
|
CREATE_INVOICE_PAYMENT: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_INVOICE_PAYMENT}`,
|
|
217
217
|
ADMIN_FIND_BY_NAME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_NAME}`,
|
|
218
218
|
ADMIN_GET_INVOICES: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
|
|
219
|
+
ADMIN_GET_AVAILABLE_UPGRADES: (teamAccountId: string) =>
|
|
220
|
+
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_AVAILABLE_UPGRADES(teamAccountId)}`,
|
|
219
221
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
|
|
220
222
|
`${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
221
223
|
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId: string) =>
|
|
@@ -27,6 +27,7 @@ exports.TEAM_ACCOUNT_ROUTES = {
|
|
|
27
27
|
CREATE_INVOICE_PAYMENT: 'invoice-payment',
|
|
28
28
|
ADMIN_FIND_BY_NAME: 'admin/find',
|
|
29
29
|
ADMIN_GET_INVOICES: 'admin/invoices',
|
|
30
|
+
ADMIN_GET_AVAILABLE_UPGRADES: (teamAccountId) => `admin/subscriptions/upgrades/${teamAccountId}`,
|
|
30
31
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `admin/subscriptions/current/${teamAccountId}`,
|
|
31
32
|
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId) => `admin/products/current/${teamAccountId}`,
|
|
32
33
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `admin/payments/history/${teamAccountId}`,
|
package/build/api/routes.js
CHANGED
|
@@ -212,6 +212,7 @@ exports.REST_API = {
|
|
|
212
212
|
CREATE_INVOICE_PAYMENT: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.CREATE_INVOICE_PAYMENT}`,
|
|
213
213
|
ADMIN_FIND_BY_NAME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_NAME}`,
|
|
214
214
|
ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
|
|
215
|
+
ADMIN_GET_AVAILABLE_UPGRADES: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_AVAILABLE_UPGRADES(teamAccountId)}`,
|
|
215
216
|
ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
|
|
216
217
|
ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_PRODUCTS(teamAccountId)}`,
|
|
217
218
|
ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetTeamAccountAvailableUpgradesCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const models_1 = require("../../models");
|
|
6
|
+
var GetTeamAccountAvailableUpgradesCommand;
|
|
7
|
+
(function (GetTeamAccountAvailableUpgradesCommand) {
|
|
8
|
+
GetTeamAccountAvailableUpgradesCommand.RequestParamSchema = zod_1.z.object({
|
|
9
|
+
teamAccountId: zod_1.z.string().uuid(),
|
|
10
|
+
});
|
|
11
|
+
GetTeamAccountAvailableUpgradesCommand.ResponseSchema = zod_1.z.object({
|
|
12
|
+
subscriptions: zod_1.z.array(models_1.SubscriptionSchema),
|
|
13
|
+
});
|
|
14
|
+
})(GetTeamAccountAvailableUpgradesCommand || (exports.GetTeamAccountAvailableUpgradesCommand = GetTeamAccountAvailableUpgradesCommand = {}));
|
|
@@ -44,3 +44,4 @@ __exportStar(require("./create-team-account-invoice-payment.command"), exports);
|
|
|
44
44
|
__exportStar(require("./get-invoice-for-payment.command"), exports);
|
|
45
45
|
__exportStar(require("./get-team-account-payment-history.command"), exports);
|
|
46
46
|
__exportStar(require("./find-current-team-account-products-by-team-account-id.command"), exports);
|
|
47
|
+
__exportStar(require("./get-team-account-available-upgrades.command"), exports);
|
|
@@ -4,4 +4,5 @@ exports.VIDEO_GENERATION_MODEL_LIMITATION = void 0;
|
|
|
4
4
|
var VIDEO_GENERATION_MODEL_LIMITATION;
|
|
5
5
|
(function (VIDEO_GENERATION_MODEL_LIMITATION) {
|
|
6
6
|
VIDEO_GENERATION_MODEL_LIMITATION["ASPECT_RATIO_IGNORED_WITH_IMAGE_ATTACHED"] = "ASPECT_RATIO_IGNORED_WITH_IMAGE_ATTACHED";
|
|
7
|
+
VIDEO_GENERATION_MODEL_LIMITATION["IMAGE_INPUT_IGNORED_WITH_FRAMES_INPUT"] = "IMAGE_INPUT_IGNORED_WITH_FRAMES_INPUT";
|
|
7
8
|
})(VIDEO_GENERATION_MODEL_LIMITATION || (exports.VIDEO_GENERATION_MODEL_LIMITATION = VIDEO_GENERATION_MODEL_LIMITATION = {}));
|
|
@@ -13,6 +13,7 @@ exports.TeamToProductSchema = zod_1.z.object({
|
|
|
13
13
|
status: zod_1.z.nativeEnum(constants_1.PRODUCT_STATUS),
|
|
14
14
|
expiresAt: zod_1.z.date().nullable(),
|
|
15
15
|
orderId: zod_1.z.string().uuid().nullable(),
|
|
16
|
+
isManuallyGranted: zod_1.z.boolean(),
|
|
16
17
|
createdAt: zod_1.z.date(),
|
|
17
18
|
updatedAt: zod_1.z.date(),
|
|
18
19
|
});
|
|
@@ -18,6 +18,7 @@ exports.TeamToSubscriptionSchema = zod_1.z.object({
|
|
|
18
18
|
endDate: zod_1.z.date().nullable(),
|
|
19
19
|
status: zod_1.z.nativeEnum(constants_1.SUBSCRIPTION_STATUS),
|
|
20
20
|
active: zod_1.z.boolean(),
|
|
21
|
+
isManuallyGranted: zod_1.z.boolean(),
|
|
21
22
|
type: zod_1.z.nativeEnum(constants_1.USER_TO_SUBSCRIPTION_TYPE),
|
|
22
23
|
intervalEndDate: zod_1.z.date().nullable(),
|
|
23
24
|
marks: zod_1.z.array(zod_1.z.nativeEnum(constants_1.USER_TO_SUBSCRIPTION_MARKS)),
|
|
@@ -9,6 +9,8 @@ exports.VideoJobParamsSchema = zod_1.z.object({
|
|
|
9
9
|
duration: zod_1.z.number().optional(),
|
|
10
10
|
aspectRatio: zod_1.z.string().optional(),
|
|
11
11
|
imageIds: zod_1.z.array(zod_1.z.string()).optional(),
|
|
12
|
+
firstFrameImageId: zod_1.z.string().uuid().optional(),
|
|
13
|
+
lastFrameImageId: zod_1.z.string().uuid().optional(),
|
|
12
14
|
resolution: zod_1.z.string().optional(),
|
|
13
15
|
});
|
|
14
16
|
exports.VideoJobSchema = tool_job_schema_1.ToolJobSchema.extend({
|
|
@@ -35,9 +35,17 @@ exports.VideoModelParamsSchema = zod_1.z.object({
|
|
|
35
35
|
options: zod_1.z.array(zod_1.z.boolean()),
|
|
36
36
|
})
|
|
37
37
|
.optional(),
|
|
38
|
+
frameAttachment: zod_1.z
|
|
39
|
+
.object({
|
|
40
|
+
supported: zod_1.z.boolean(),
|
|
41
|
+
maxImages: zod_1.z.number(),
|
|
42
|
+
})
|
|
43
|
+
.optional(),
|
|
38
44
|
});
|
|
39
45
|
exports.VideoGenerationRequestParamsSchema = zod_1.z.object({
|
|
40
46
|
imageUrls: zod_1.z.string().array().optional(),
|
|
47
|
+
firstFrameImageId: zod_1.z.string().uuid().optional(),
|
|
48
|
+
lastFrameImageId: zod_1.z.string().uuid().optional(),
|
|
41
49
|
duration: zod_1.z.number(),
|
|
42
50
|
aspectRatio: zod_1.z.string().optional(),
|
|
43
51
|
quality: zod_1.z.string().optional(),
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { SubscriptionSchema } from '../../models';
|
|
3
|
+
|
|
4
|
+
export namespace GetTeamAccountAvailableUpgradesCommand {
|
|
5
|
+
export const RequestParamSchema = z.object({
|
|
6
|
+
teamAccountId: z.string().uuid(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
10
|
+
|
|
11
|
+
export const ResponseSchema = z.object({
|
|
12
|
+
subscriptions: z.array(SubscriptionSchema),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
@@ -28,3 +28,4 @@ export * from './create-team-account-invoice-payment.command';
|
|
|
28
28
|
export * from './get-invoice-for-payment.command';
|
|
29
29
|
export * from './get-team-account-payment-history.command';
|
|
30
30
|
export * from './find-current-team-account-products-by-team-account-id.command';
|
|
31
|
+
export * from './get-team-account-available-upgrades.command';
|
|
@@ -20,6 +20,7 @@ export const TeamToSubscriptionSchema = z.object({
|
|
|
20
20
|
endDate: z.date().nullable(),
|
|
21
21
|
status: z.nativeEnum(SUBSCRIPTION_STATUS),
|
|
22
22
|
active: z.boolean(),
|
|
23
|
+
isManuallyGranted: z.boolean(),
|
|
23
24
|
type: z.nativeEnum(USER_TO_SUBSCRIPTION_TYPE),
|
|
24
25
|
intervalEndDate: z.date().nullable(),
|
|
25
26
|
marks: z.array(z.nativeEnum(USER_TO_SUBSCRIPTION_MARKS)),
|
|
@@ -7,6 +7,8 @@ export const VideoJobParamsSchema = z.object({
|
|
|
7
7
|
duration: z.number().optional(),
|
|
8
8
|
aspectRatio: z.string().optional(),
|
|
9
9
|
imageIds: z.array(z.string()).optional(),
|
|
10
|
+
firstFrameImageId: z.string().uuid().optional(),
|
|
11
|
+
lastFrameImageId: z.string().uuid().optional(),
|
|
10
12
|
resolution: z.string().optional(),
|
|
11
13
|
});
|
|
12
14
|
|
|
@@ -33,10 +33,18 @@ export const VideoModelParamsSchema = z.object({
|
|
|
33
33
|
options: z.array(z.boolean()),
|
|
34
34
|
})
|
|
35
35
|
.optional(),
|
|
36
|
+
frameAttachment: z
|
|
37
|
+
.object({
|
|
38
|
+
supported: z.boolean(),
|
|
39
|
+
maxImages: z.number(),
|
|
40
|
+
})
|
|
41
|
+
.optional(),
|
|
36
42
|
});
|
|
37
43
|
|
|
38
44
|
export const VideoGenerationRequestParamsSchema = z.object({
|
|
39
45
|
imageUrls: z.string().array().optional(),
|
|
46
|
+
firstFrameImageId: z.string().uuid().optional(),
|
|
47
|
+
lastFrameImageId: z.string().uuid().optional(),
|
|
40
48
|
duration: z.number(),
|
|
41
49
|
aspectRatio: z.string().optional(),
|
|
42
50
|
quality: z.string().optional(),
|