@purpleschool/gptbot 0.15.60 → 0.15.61
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/build/commands/ai-studio/canvas-node/find-canvas-node-definitions-with-configs.query.d.ts +1 -0
- package/build/commands/photo-studio/get-photo-studio-config.query.d.ts +2 -0
- package/build/commands/tools/image-editor/get-image-editor-tool-config.command.d.ts +1 -0
- package/build/helpers/image-editor/calculate-image-editor-price.helper.d.ts +2 -1
- package/build/helpers/image-editor/calculate-image-editor-price.helper.js +4 -1
- package/build/models/canvas-node-definition.schema.d.ts +3 -0
- package/build/models/tools/image-editor/image-editor-config.schema.d.ts +1 -0
- package/build/models/tools/image-editor/image-editor-model.schema.d.ts +3 -0
- package/build/models/tools/image-editor/image-editor-model.schema.js +1 -0
- package/package.json +1 -1
package/build/commands/ai-studio/canvas-node/find-canvas-node-definitions-with-configs.query.d.ts
CHANGED
|
@@ -232,6 +232,7 @@ export declare namespace FindCanvasNodeDefinitionsWithConfigsQuery {
|
|
|
232
232
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
233
233
|
condition: z.ZodObject<{
|
|
234
234
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
235
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
235
236
|
}, z.core.$strip>;
|
|
236
237
|
value: z.ZodNumber;
|
|
237
238
|
}, z.core.$strip>>;
|
|
@@ -98,6 +98,7 @@ export declare namespace GetPhotoStudioConfigQuery {
|
|
|
98
98
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
99
99
|
condition: z.ZodObject<{
|
|
100
100
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
101
102
|
}, z.core.$strip>;
|
|
102
103
|
value: z.ZodNumber;
|
|
103
104
|
}, z.core.$strip>>;
|
|
@@ -245,6 +246,7 @@ export declare namespace GetPhotoStudioConfigQuery {
|
|
|
245
246
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
246
247
|
condition: z.ZodObject<{
|
|
247
248
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
248
250
|
}, z.core.$strip>;
|
|
249
251
|
value: z.ZodNumber;
|
|
250
252
|
}, z.core.$strip>>;
|
|
@@ -38,6 +38,7 @@ export declare namespace GetImageEditorToolConfigCommand {
|
|
|
38
38
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
39
39
|
condition: z.ZodObject<{
|
|
40
40
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
41
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
41
42
|
}, z.core.$strip>;
|
|
42
43
|
value: z.ZodNumber;
|
|
43
44
|
}, z.core.$strip>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ImageEditorModelPricingRules } from '../../models';
|
|
2
|
-
export declare function calculateImageEditorPrice({ basePrice, userHasActiveSubscriptionOrProduct, rules, }: {
|
|
2
|
+
export declare function calculateImageEditorPrice({ basePrice, userHasActiveSubscriptionOrProduct, resolution, rules, }: {
|
|
3
3
|
basePrice: number;
|
|
4
4
|
userHasActiveSubscriptionOrProduct: boolean;
|
|
5
|
+
resolution?: string;
|
|
5
6
|
rules: ImageEditorModelPricingRules;
|
|
6
7
|
}): number;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.calculateImageEditorPrice = calculateImageEditorPrice;
|
|
4
|
-
function calculateImageEditorPrice({ basePrice, userHasActiveSubscriptionOrProduct, rules, }) {
|
|
4
|
+
function calculateImageEditorPrice({ basePrice, userHasActiveSubscriptionOrProduct, resolution, rules, }) {
|
|
5
5
|
let price = basePrice;
|
|
6
6
|
for (const rule of rules !== null && rules !== void 0 ? rules : []) {
|
|
7
7
|
const condition = rule.condition;
|
|
8
8
|
if (condition.withoutSub && userHasActiveSubscriptionOrProduct === false) {
|
|
9
9
|
price += rule.value;
|
|
10
10
|
}
|
|
11
|
+
if (condition.resolution && condition.resolution === resolution) {
|
|
12
|
+
price += rule.value;
|
|
13
|
+
}
|
|
11
14
|
}
|
|
12
15
|
return price;
|
|
13
16
|
}
|
|
@@ -282,6 +282,7 @@ export declare const CanvasNodeDefinitionToolConfigSchema: z.ZodDiscriminatedUni
|
|
|
282
282
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
283
283
|
condition: z.ZodObject<{
|
|
284
284
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
285
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
285
286
|
}, z.core.$strip>;
|
|
286
287
|
value: z.ZodNumber;
|
|
287
288
|
}, z.core.$strip>>;
|
|
@@ -1012,6 +1013,7 @@ export declare const CanvasNodeDefinitionWithConfigSchema: z.ZodObject<{
|
|
|
1012
1013
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
1013
1014
|
condition: z.ZodObject<{
|
|
1014
1015
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
1016
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
1015
1017
|
}, z.core.$strip>;
|
|
1016
1018
|
value: z.ZodNumber;
|
|
1017
1019
|
}, z.core.$strip>>;
|
|
@@ -1700,6 +1702,7 @@ export declare const CanvasNodeDefinitionsWithConfigsSchema: z.ZodRecord<z.ZodEn
|
|
|
1700
1702
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
1701
1703
|
condition: z.ZodObject<{
|
|
1702
1704
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
1705
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
1703
1706
|
}, z.core.$strip>;
|
|
1704
1707
|
value: z.ZodNumber;
|
|
1705
1708
|
}, z.core.$strip>>;
|
|
@@ -98,6 +98,7 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
|
|
|
98
98
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
99
99
|
condition: z.ZodObject<{
|
|
100
100
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
101
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
101
102
|
}, z.core.$strip>;
|
|
102
103
|
value: z.ZodNumber;
|
|
103
104
|
}, z.core.$strip>>;
|
|
@@ -16,11 +16,13 @@ export declare const ImageEditorModelParamsSchema: z.ZodObject<{
|
|
|
16
16
|
export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
|
|
17
17
|
export declare const ImageEditorModelPricingRuleConditionSchema: z.ZodObject<{
|
|
18
18
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
19
20
|
}, z.core.$strip>;
|
|
20
21
|
export type ImageEditorModelPricingRuleCondition = z.infer<typeof ImageEditorModelPricingRuleConditionSchema>;
|
|
21
22
|
export declare const ImageEditorModelPricingRulesSchema: z.ZodArray<z.ZodObject<{
|
|
22
23
|
condition: z.ZodObject<{
|
|
23
24
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
24
26
|
}, z.core.$strip>;
|
|
25
27
|
value: z.ZodNumber;
|
|
26
28
|
}, z.core.$strip>>;
|
|
@@ -61,6 +63,7 @@ export declare const ImageEditorModelSchema: z.ZodObject<{
|
|
|
61
63
|
pricingRules: z.ZodArray<z.ZodObject<{
|
|
62
64
|
condition: z.ZodObject<{
|
|
63
65
|
withoutSub: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
resolution: z.ZodOptional<z.ZodString>;
|
|
64
67
|
}, z.core.$strip>;
|
|
65
68
|
value: z.ZodNumber;
|
|
66
69
|
}, z.core.$strip>>;
|
|
@@ -27,6 +27,7 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
|
|
|
27
27
|
});
|
|
28
28
|
exports.ImageEditorModelPricingRuleConditionSchema = zod_1.z.object({
|
|
29
29
|
withoutSub: zod_1.z.boolean().optional(),
|
|
30
|
+
resolution: zod_1.z.string().optional(),
|
|
30
31
|
});
|
|
31
32
|
exports.ImageEditorModelPricingRulesSchema = zod_1.z.array(zod_1.z.object({
|
|
32
33
|
condition: exports.ImageEditorModelPricingRuleConditionSchema,
|