@purpleschool/multisite 0.0.5 → 0.0.7
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/controller/http/image-editor.ts +0 -1
- package/api/controller/http/image-generation.ts +0 -1
- package/api/routes.ts +0 -2
- package/build/api/controller/http/image-editor.d.ts +0 -1
- package/build/api/controller/http/image-editor.d.ts.map +1 -1
- package/build/api/controller/http/image-editor.js +0 -1
- package/build/api/controller/http/image-generation.d.ts +0 -1
- package/build/api/controller/http/image-generation.d.ts.map +1 -1
- package/build/api/controller/http/image-generation.js +0 -1
- package/build/api/routes.d.ts +0 -2
- package/build/api/routes.d.ts.map +1 -1
- package/build/api/routes.js +0 -2
- package/build/commands/product/buy-product.command.d.ts +10 -10
- package/build/commands/subscription/buy-subscription.command.d.ts +10 -10
- package/build/helpers/image-editor/calculate-image-editor-price.helper.d.ts +7 -0
- package/build/helpers/image-editor/calculate-image-editor-price.helper.d.ts.map +1 -0
- package/build/helpers/image-editor/calculate-image-editor-price.helper.js +13 -0
- package/build/helpers/image-editor/index.d.ts +2 -0
- package/build/helpers/image-editor/index.d.ts.map +1 -0
- package/build/helpers/image-editor/index.js +17 -0
- package/build/helpers/image-generation/calculate-image-generation-price.helper.d.ts +8 -0
- package/build/helpers/image-generation/calculate-image-generation-price.helper.d.ts.map +1 -0
- package/build/helpers/image-generation/calculate-image-generation-price.helper.js +16 -0
- package/build/helpers/image-generation/index.d.ts +2 -0
- package/build/helpers/image-generation/index.d.ts.map +1 -0
- package/build/helpers/image-generation/index.js +17 -0
- package/build/helpers/index.d.ts +3 -0
- package/build/helpers/index.d.ts.map +1 -0
- package/build/helpers/index.js +18 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +1 -0
- package/build/models/cloud-payments-widget-data.schema.d.ts +8 -8
- package/build/models/cloud-payments-widget.schema.d.ts +8 -8
- package/build/models/product.schema.d.ts +18 -0
- package/build/models/product.schema.d.ts.map +1 -1
- package/build/models/product.schema.js +4 -0
- package/build/models/subscription.schema.d.ts +24 -0
- package/build/models/subscription.schema.d.ts.map +1 -1
- package/build/models/subscription.schema.js +6 -0
- package/build/queries/image-editor/index.d.ts +0 -1
- package/build/queries/image-editor/index.d.ts.map +1 -1
- package/build/queries/image-editor/index.js +0 -1
- package/build/queries/image-generation/index.d.ts +0 -1
- package/build/queries/image-generation/index.d.ts.map +1 -1
- package/build/queries/image-generation/index.js +0 -1
- package/build/queries/product/find-products.command.d.ts +26 -0
- package/build/queries/product/find-products.command.d.ts.map +1 -1
- package/build/queries/subscription/find-subscriptions.command.d.ts +36 -0
- package/build/queries/subscription/find-subscriptions.command.d.ts.map +1 -1
- package/build/queries/user/get-my-products.command.d.ts +34 -0
- package/build/queries/user/get-my-products.command.d.ts.map +1 -1
- package/build/queries/user/get-my-subscriptions.command.d.ts +48 -0
- package/build/queries/user/get-my-subscriptions.command.d.ts.map +1 -1
- package/helpers/image-editor/calculate-image-editor-price.helper.ts +23 -0
- package/helpers/image-editor/index.ts +1 -0
- package/helpers/image-generation/calculate-image-generation-price.helper.ts +29 -0
- package/helpers/image-generation/index.ts +1 -0
- package/helpers/index.ts +2 -0
- package/index.ts +1 -0
- package/models/product.schema.ts +6 -0
- package/models/subscription.schema.ts +8 -0
- package/package.json +1 -1
- package/queries/image-editor/index.ts +0 -1
- package/queries/image-generation/index.ts +0 -1
- package/build/queries/image-editor/get-image-editor-price.command.d.ts +0 -53
- package/build/queries/image-editor/get-image-editor-price.command.d.ts.map +0 -1
- package/build/queries/image-editor/get-image-editor-price.command.js +0 -17
- package/build/queries/image-generation/get-image-generation-price.command.d.ts +0 -44
- package/build/queries/image-generation/get-image-generation-price.command.d.ts.map +0 -1
- package/build/queries/image-generation/get-image-generation-price.command.js +0 -19
- package/queries/image-editor/get-image-editor-price.command.ts +0 -17
- package/queries/image-generation/get-image-generation-price.command.ts +0 -19
|
@@ -6,7 +6,15 @@ export const SubscriptionSchema = z.object({
|
|
|
6
6
|
name: z.string().min(1).max(200),
|
|
7
7
|
description: z.string().min(1).max(2000),
|
|
8
8
|
price: z.number().int().min(0),
|
|
9
|
+
interval: z.string().max(20),
|
|
9
10
|
period: z.number().int().min(1).max(36),
|
|
10
11
|
tokens: z.number().int().min(0),
|
|
12
|
+
discount: z.number().int().min(0),
|
|
13
|
+
features: z.array(
|
|
14
|
+
z.object({
|
|
15
|
+
type: z.string(),
|
|
16
|
+
name: z.string(),
|
|
17
|
+
}),
|
|
18
|
+
),
|
|
11
19
|
carryoverPercent: z.number().int().min(0).max(100),
|
|
12
20
|
});
|
package/package.json
CHANGED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare namespace GetImageEditorPriceCommand {
|
|
3
|
-
const RequestSchema: z.ZodObject<{
|
|
4
|
-
modelId: z.ZodString;
|
|
5
|
-
params: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
6
|
-
imageUrls: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
7
|
-
systemPromptId: z.ZodOptional<z.ZodString>;
|
|
8
|
-
aspectRatio: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
imageUrls: string[];
|
|
11
|
-
aspectRatio?: string | undefined;
|
|
12
|
-
systemPromptId?: string | undefined;
|
|
13
|
-
}, {
|
|
14
|
-
aspectRatio?: string | undefined;
|
|
15
|
-
imageUrls?: string[] | undefined;
|
|
16
|
-
systemPromptId?: string | undefined;
|
|
17
|
-
}>>>;
|
|
18
|
-
}, "strip", z.ZodTypeAny, {
|
|
19
|
-
params: {
|
|
20
|
-
imageUrls: string[];
|
|
21
|
-
aspectRatio?: string | undefined;
|
|
22
|
-
systemPromptId?: string | undefined;
|
|
23
|
-
};
|
|
24
|
-
modelId: string;
|
|
25
|
-
}, {
|
|
26
|
-
modelId: string;
|
|
27
|
-
params?: {
|
|
28
|
-
aspectRatio?: string | undefined;
|
|
29
|
-
imageUrls?: string[] | undefined;
|
|
30
|
-
systemPromptId?: string | undefined;
|
|
31
|
-
} | undefined;
|
|
32
|
-
}>;
|
|
33
|
-
type Request = z.infer<typeof RequestSchema>;
|
|
34
|
-
const ResponseSchema: z.ZodObject<{
|
|
35
|
-
data: z.ZodObject<{
|
|
36
|
-
price: z.ZodNumber;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
price: number;
|
|
39
|
-
}, {
|
|
40
|
-
price: number;
|
|
41
|
-
}>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
data: {
|
|
44
|
-
price: number;
|
|
45
|
-
};
|
|
46
|
-
}, {
|
|
47
|
-
data: {
|
|
48
|
-
price: number;
|
|
49
|
-
};
|
|
50
|
-
}>;
|
|
51
|
-
type Response = z.infer<typeof ResponseSchema>;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=get-image-editor-price.command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-image-editor-price.command.d.ts","sourceRoot":"","sources":["../../../queries/image-editor/get-image-editor-price.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,yBAAiB,0BAA0B,CAAC;IACjC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAGxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetImageEditorPriceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const models_1 = require("../../models");
|
|
6
|
-
var GetImageEditorPriceCommand;
|
|
7
|
-
(function (GetImageEditorPriceCommand) {
|
|
8
|
-
GetImageEditorPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
modelId: zod_1.z.string().uuid(),
|
|
10
|
-
params: models_1.ImageEditorJobRequestParamsSchema.optional().default({ imageUrls: [] }),
|
|
11
|
-
});
|
|
12
|
-
GetImageEditorPriceCommand.ResponseSchema = zod_1.z.object({
|
|
13
|
-
data: zod_1.z.object({
|
|
14
|
-
price: zod_1.z.number().int().nonnegative(),
|
|
15
|
-
}),
|
|
16
|
-
});
|
|
17
|
-
})(GetImageEditorPriceCommand || (exports.GetImageEditorPriceCommand = GetImageEditorPriceCommand = {}));
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { IMAGE_GENERATION_RESOLUTION } from '../../constants';
|
|
3
|
-
export declare namespace GetImageGenerationPriceCommand {
|
|
4
|
-
const RequestSchema: z.ZodObject<{
|
|
5
|
-
modelId: z.ZodString;
|
|
6
|
-
params: z.ZodObject<{
|
|
7
|
-
resolution: z.ZodOptional<z.ZodNativeEnum<typeof IMAGE_GENERATION_RESOLUTION>>;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
resolution?: IMAGE_GENERATION_RESOLUTION | undefined;
|
|
10
|
-
}, {
|
|
11
|
-
resolution?: IMAGE_GENERATION_RESOLUTION | undefined;
|
|
12
|
-
}>;
|
|
13
|
-
}, "strip", z.ZodTypeAny, {
|
|
14
|
-
params: {
|
|
15
|
-
resolution?: IMAGE_GENERATION_RESOLUTION | undefined;
|
|
16
|
-
};
|
|
17
|
-
modelId: string;
|
|
18
|
-
}, {
|
|
19
|
-
params: {
|
|
20
|
-
resolution?: IMAGE_GENERATION_RESOLUTION | undefined;
|
|
21
|
-
};
|
|
22
|
-
modelId: string;
|
|
23
|
-
}>;
|
|
24
|
-
type Request = z.infer<typeof RequestSchema>;
|
|
25
|
-
const ResponseSchema: z.ZodObject<{
|
|
26
|
-
data: z.ZodObject<{
|
|
27
|
-
price: z.ZodNumber;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
price: number;
|
|
30
|
-
}, {
|
|
31
|
-
price: number;
|
|
32
|
-
}>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
data: {
|
|
35
|
-
price: number;
|
|
36
|
-
};
|
|
37
|
-
}, {
|
|
38
|
-
data: {
|
|
39
|
-
price: number;
|
|
40
|
-
};
|
|
41
|
-
}>;
|
|
42
|
-
type Response = z.infer<typeof ResponseSchema>;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=get-image-generation-price.command.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-image-generation-price.command.d.ts","sourceRoot":"","sources":["../../../queries/image-generation/get-image-generation-price.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAE9D,yBAAiB,8BAA8B,CAAC;IACrC,MAAM,aAAa;;;;;;;;;;;;;;;;;;;MAKxB,CAAC;IACH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;MAIzB,CAAC;IACH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GetImageGenerationPriceCommand = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const constants_1 = require("../../constants");
|
|
6
|
-
var GetImageGenerationPriceCommand;
|
|
7
|
-
(function (GetImageGenerationPriceCommand) {
|
|
8
|
-
GetImageGenerationPriceCommand.RequestSchema = zod_1.z.object({
|
|
9
|
-
modelId: zod_1.z.string().uuid(),
|
|
10
|
-
params: zod_1.z.object({
|
|
11
|
-
resolution: zod_1.z.nativeEnum(constants_1.IMAGE_GENERATION_RESOLUTION).optional(),
|
|
12
|
-
}),
|
|
13
|
-
});
|
|
14
|
-
GetImageGenerationPriceCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
-
data: zod_1.z.object({
|
|
16
|
-
price: zod_1.z.number().int().nonnegative(),
|
|
17
|
-
}),
|
|
18
|
-
});
|
|
19
|
-
})(GetImageGenerationPriceCommand || (exports.GetImageGenerationPriceCommand = GetImageGenerationPriceCommand = {}));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ImageEditorJobRequestParamsSchema } from '../../models';
|
|
3
|
-
|
|
4
|
-
export namespace GetImageEditorPriceCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
modelId: z.string().uuid(),
|
|
7
|
-
params: ImageEditorJobRequestParamsSchema.optional().default({ imageUrls: [] }),
|
|
8
|
-
});
|
|
9
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
10
|
-
|
|
11
|
-
export const ResponseSchema = z.object({
|
|
12
|
-
data: z.object({
|
|
13
|
-
price: z.number().int().nonnegative(),
|
|
14
|
-
}),
|
|
15
|
-
});
|
|
16
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { IMAGE_GENERATION_RESOLUTION } from '../../constants';
|
|
3
|
-
|
|
4
|
-
export namespace GetImageGenerationPriceCommand {
|
|
5
|
-
export const RequestSchema = z.object({
|
|
6
|
-
modelId: z.string().uuid(),
|
|
7
|
-
params: z.object({
|
|
8
|
-
resolution: z.nativeEnum(IMAGE_GENERATION_RESOLUTION).optional(),
|
|
9
|
-
}),
|
|
10
|
-
});
|
|
11
|
-
export type Request = z.infer<typeof RequestSchema>;
|
|
12
|
-
|
|
13
|
-
export const ResponseSchema = z.object({
|
|
14
|
-
data: z.object({
|
|
15
|
-
price: z.number().int().nonnegative(),
|
|
16
|
-
}),
|
|
17
|
-
});
|
|
18
|
-
export type Response = z.infer<typeof ResponseSchema>;
|
|
19
|
-
}
|