@purpleschool/multisite 0.0.28 → 0.0.30

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.
Files changed (70) hide show
  1. package/build/commands/image-editor/execute-image-editor.command.d.ts +12 -0
  2. package/build/commands/image-editor/execute-image-editor.command.d.ts.map +1 -1
  3. package/build/commands/image-editor/proxy-image-editor-callback.command.js +1 -1
  4. package/build/commands/image-editor/retry-image-editor-job.command.d.ts +12 -0
  5. package/build/commands/image-editor/retry-image-editor-job.command.d.ts.map +1 -1
  6. package/build/commands/image-editor/set-reaction-to-image-editor-job.command.d.ts +7 -0
  7. package/build/commands/image-editor/set-reaction-to-image-editor-job.command.d.ts.map +1 -1
  8. package/build/commands/image-editor/update-image-editor-job-title.command.d.ts +7 -0
  9. package/build/commands/image-editor/update-image-editor-job-title.command.d.ts.map +1 -1
  10. package/build/commands/page/create-page.command.d.ts +8 -0
  11. package/build/commands/page/create-page.command.d.ts.map +1 -1
  12. package/build/commands/page/find-page-by-alias.command.d.ts +16 -0
  13. package/build/commands/page/find-page-by-alias.command.d.ts.map +1 -1
  14. package/build/commands/page/find-page-by-criteria.command.d.ts +9 -0
  15. package/build/commands/page/find-page-by-criteria.command.d.ts.map +1 -1
  16. package/build/commands/page/find-page-by-criteria.command.js +2 -0
  17. package/build/commands/page/find-page.command.d.ts +11 -0
  18. package/build/commands/page/find-page.command.d.ts.map +1 -1
  19. package/build/commands/page/update-page.command.d.ts +8 -0
  20. package/build/commands/page/update-page.command.d.ts.map +1 -1
  21. package/build/constants/image-editor/enums/image-editing-strategy.enum.d.ts +2 -1
  22. package/build/constants/image-editor/enums/image-editing-strategy.enum.d.ts.map +1 -1
  23. package/build/constants/image-editor/enums/image-editing-strategy.enum.js +1 -0
  24. package/build/helpers/image-generation/calculate-image-generation-price.helper.d.ts +4 -2
  25. package/build/helpers/image-generation/calculate-image-generation-price.helper.d.ts.map +1 -1
  26. package/build/helpers/index.d.ts +1 -0
  27. package/build/helpers/index.d.ts.map +1 -1
  28. package/build/helpers/index.js +1 -0
  29. package/build/helpers/openai-image-2/calculate-openai-image-2-price.helper.d.ts +20 -0
  30. package/build/helpers/openai-image-2/calculate-openai-image-2-price.helper.d.ts.map +1 -0
  31. package/build/helpers/openai-image-2/calculate-openai-image-2-price.helper.js +125 -0
  32. package/build/helpers/openai-image-2/index.d.ts +2 -0
  33. package/build/helpers/openai-image-2/index.d.ts.map +1 -0
  34. package/build/helpers/openai-image-2/index.js +17 -0
  35. package/build/models/image-editor/image-editor-config.schema.d.ts +25 -0
  36. package/build/models/image-editor/image-editor-config.schema.d.ts.map +1 -1
  37. package/build/models/image-editor/image-editor-job-params.schema.d.ts +3 -0
  38. package/build/models/image-editor/image-editor-job-params.schema.d.ts.map +1 -1
  39. package/build/models/image-editor/image-editor-job-params.schema.js +1 -0
  40. package/build/models/image-editor/image-editor-job-request-params.schema.d.ts +3 -0
  41. package/build/models/image-editor/image-editor-job-request-params.schema.d.ts.map +1 -1
  42. package/build/models/image-editor/image-editor-job-request-params.schema.js +1 -0
  43. package/build/models/image-editor/image-editor-job.schema.d.ts +5 -0
  44. package/build/models/image-editor/image-editor-job.schema.d.ts.map +1 -1
  45. package/build/models/image-editor/image-editor-model-params.schema.d.ts +13 -0
  46. package/build/models/image-editor/image-editor-model-params.schema.d.ts.map +1 -1
  47. package/build/models/image-editor/image-editor-model-params.schema.js +5 -0
  48. package/build/models/image-editor/image-editor-model.schema.d.ts +19 -0
  49. package/build/models/image-editor/image-editor-model.schema.d.ts.map +1 -1
  50. package/build/models/page.schema.d.ts +7 -0
  51. package/build/models/page.schema.d.ts.map +1 -1
  52. package/build/models/page.schema.js +2 -0
  53. package/build/queries/image-editor/find-image-editor-jobs.command.d.ts +7 -0
  54. package/build/queries/image-editor/find-image-editor-jobs.command.d.ts.map +1 -1
  55. package/build/queries/image-editor/get-image-editor-config.command.d.ts +31 -0
  56. package/build/queries/image-editor/get-image-editor-config.command.d.ts.map +1 -1
  57. package/build/queries/image-editor/get-image-editor-job.command.d.ts +7 -0
  58. package/build/queries/image-editor/get-image-editor-job.command.d.ts.map +1 -1
  59. package/commands/image-editor/proxy-image-editor-callback.command.ts +1 -1
  60. package/commands/page/find-page-by-criteria.command.ts +2 -0
  61. package/constants/image-editor/enums/image-editing-strategy.enum.ts +1 -0
  62. package/helpers/image-generation/calculate-image-generation-price.helper.ts +4 -2
  63. package/helpers/index.ts +1 -0
  64. package/helpers/openai-image-2/calculate-openai-image-2-price.helper.ts +160 -0
  65. package/helpers/openai-image-2/index.ts +1 -0
  66. package/models/image-editor/image-editor-job-params.schema.ts +1 -0
  67. package/models/image-editor/image-editor-job-request-params.schema.ts +1 -0
  68. package/models/image-editor/image-editor-model-params.schema.ts +5 -0
  69. package/models/page.schema.ts +2 -0
  70. package/package.json +1 -1
@@ -8,6 +8,7 @@ export declare namespace FindPageCommand {
8
8
  subTitle: z.ZodString;
9
9
  seoTextMd: z.ZodString;
10
10
  alias: z.ZodString;
11
+ toolType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TOOL_TYPE>>>;
11
12
  createdAt: z.ZodDate;
12
13
  updatedAt: z.ZodDate;
13
14
  }, "uuid">, "strip", z.ZodTypeAny, {
@@ -25,6 +26,7 @@ export declare namespace FindPageCommand {
25
26
  subTitle: z.ZodString;
26
27
  seoTextMd: z.ZodString;
27
28
  alias: z.ZodString;
29
+ toolType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TOOL_TYPE>>>;
28
30
  createdAt: z.ZodDate;
29
31
  updatedAt: z.ZodDate;
30
32
  } & {
@@ -58,6 +60,7 @@ export declare namespace FindPageCommand {
58
60
  subTitle: string;
59
61
  seoTextMd: string;
60
62
  alias: string;
63
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
61
64
  createdAt: Date;
62
65
  updatedAt: Date;
63
66
  questions: {
@@ -76,6 +79,7 @@ export declare namespace FindPageCommand {
76
79
  subTitle: string;
77
80
  seoTextMd: string;
78
81
  alias: string;
82
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
79
83
  createdAt: Date;
80
84
  updatedAt: Date;
81
85
  questions: {
@@ -96,6 +100,7 @@ export declare namespace FindPageCommand {
96
100
  subTitle: string;
97
101
  seoTextMd: string;
98
102
  alias: string;
103
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
99
104
  createdAt: Date;
100
105
  updatedAt: Date;
101
106
  questions: {
@@ -116,6 +121,7 @@ export declare namespace FindPageCommand {
116
121
  subTitle: string;
117
122
  seoTextMd: string;
118
123
  alias: string;
124
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
119
125
  createdAt: Date;
120
126
  updatedAt: Date;
121
127
  questions: {
@@ -138,6 +144,7 @@ export declare namespace FindPageCommand {
138
144
  subTitle: z.ZodString;
139
145
  seoTextMd: z.ZodString;
140
146
  alias: z.ZodString;
147
+ toolType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TOOL_TYPE>>>;
141
148
  createdAt: z.ZodDate;
142
149
  updatedAt: z.ZodDate;
143
150
  } & {
@@ -171,6 +178,7 @@ export declare namespace FindPageCommand {
171
178
  subTitle: string;
172
179
  seoTextMd: string;
173
180
  alias: string;
181
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
174
182
  createdAt: Date;
175
183
  updatedAt: Date;
176
184
  questions: {
@@ -189,6 +197,7 @@ export declare namespace FindPageCommand {
189
197
  subTitle: string;
190
198
  seoTextMd: string;
191
199
  alias: string;
200
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
192
201
  createdAt: Date;
193
202
  updatedAt: Date;
194
203
  questions: {
@@ -209,6 +218,7 @@ export declare namespace FindPageCommand {
209
218
  subTitle: string;
210
219
  seoTextMd: string;
211
220
  alias: string;
221
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
212
222
  createdAt: Date;
213
223
  updatedAt: Date;
214
224
  questions: {
@@ -229,6 +239,7 @@ export declare namespace FindPageCommand {
229
239
  subTitle: string;
230
240
  seoTextMd: string;
231
241
  alias: string;
242
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
232
243
  createdAt: Date;
233
244
  updatedAt: Date;
234
245
  questions: {
@@ -1 +1 @@
1
- {"version":3,"file":"find-page.command.d.ts","sourceRoot":"","sources":["../../../commands/page/find-page.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,eAAe,CAAC;IACtB,MAAM,aAAa;;;;;;;;;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;IAE/C,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAE/B,CAAC;IAEH,KAAY,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrE"}
1
+ {"version":3,"file":"find-page.command.d.ts","sourceRoot":"","sources":["../../../commands/page/find-page.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,eAAe,CAAC;IACtB,MAAM,aAAa;;;;;;;;;;;;;;;MAExB,CAAC;IAEH,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;IAE/C,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAE/B,CAAC;IAEH,KAAY,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;CACrE"}
@@ -7,6 +7,7 @@ export declare namespace UpdatePageCommand {
7
7
  subTitle: z.ZodOptional<z.ZodString>;
8
8
  seoTextMd: z.ZodOptional<z.ZodString>;
9
9
  alias: z.ZodOptional<z.ZodString>;
10
+ toolType: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TOOL_TYPE>>>>;
10
11
  }, "strip", z.ZodTypeAny, {
11
12
  metaTitle?: string | undefined;
12
13
  metaDescription?: string | undefined;
@@ -14,6 +15,7 @@ export declare namespace UpdatePageCommand {
14
15
  subTitle?: string | undefined;
15
16
  seoTextMd?: string | undefined;
16
17
  alias?: string | undefined;
18
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
17
19
  }, {
18
20
  metaTitle?: string | undefined;
19
21
  metaDescription?: string | undefined;
@@ -21,6 +23,7 @@ export declare namespace UpdatePageCommand {
21
23
  subTitle?: string | undefined;
22
24
  seoTextMd?: string | undefined;
23
25
  alias?: string | undefined;
26
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
24
27
  }>;
25
28
  type Request = z.infer<typeof RequestSchema>;
26
29
  const RequestParamSchema: z.ZodObject<{
@@ -40,6 +43,7 @@ export declare namespace UpdatePageCommand {
40
43
  subTitle: z.ZodString;
41
44
  seoTextMd: z.ZodString;
42
45
  alias: z.ZodString;
46
+ toolType: z.ZodOptional<z.ZodNullable<z.ZodNativeEnum<typeof import("../..").TOOL_TYPE>>>;
43
47
  createdAt: z.ZodDate;
44
48
  updatedAt: z.ZodDate;
45
49
  }, "strip", z.ZodTypeAny, {
@@ -50,6 +54,7 @@ export declare namespace UpdatePageCommand {
50
54
  subTitle: string;
51
55
  seoTextMd: string;
52
56
  alias: string;
57
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
53
58
  createdAt: Date;
54
59
  updatedAt: Date;
55
60
  }, {
@@ -60,6 +65,7 @@ export declare namespace UpdatePageCommand {
60
65
  subTitle: string;
61
66
  seoTextMd: string;
62
67
  alias: string;
68
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
63
69
  createdAt: Date;
64
70
  updatedAt: Date;
65
71
  }>;
@@ -72,6 +78,7 @@ export declare namespace UpdatePageCommand {
72
78
  subTitle: string;
73
79
  seoTextMd: string;
74
80
  alias: string;
81
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
75
82
  createdAt: Date;
76
83
  updatedAt: Date;
77
84
  };
@@ -84,6 +91,7 @@ export declare namespace UpdatePageCommand {
84
91
  subTitle: string;
85
92
  seoTextMd: string;
86
93
  alias: string;
94
+ toolType?: import("../..").TOOL_TYPE | null | undefined;
87
95
  createdAt: Date;
88
96
  updatedAt: Date;
89
97
  };
@@ -1 +1 @@
1
- {"version":3,"file":"update-page.command.d.ts","sourceRoot":"","sources":["../../../commands/page/update-page.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;MAId,CAAC;IAEb,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;MAE7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
1
+ {"version":3,"file":"update-page.command.d.ts","sourceRoot":"","sources":["../../../commands/page/update-page.command.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,yBAAiB,iBAAiB,CAAC;IACxB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;MAId,CAAC;IAEb,KAAY,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;IAE7C,MAAM,kBAAkB;;;;;;MAE7B,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEvD,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEzB,CAAC;IAEH,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
@@ -5,6 +5,7 @@ export declare enum IMAGE_EDITING_STRATEGY {
5
5
  RECRAFT_REMOVE_BACKGROUND_POLLING = "RECRAFT_REMOVE_BACKGROUND_POLLING",
6
6
  NANO_BANANA_PRO_CALLBACK = "NANO_BANANA_PRO_CALLBACK",
7
7
  NANO_BANANA_PRO_POLLING = "NANO_BANANA_PRO_POLLING",
8
- SEEDREAM_EDITING_CALLBACK = "SEEDREAM_EDITING_CALLBACK"
8
+ SEEDREAM_EDITING_CALLBACK = "SEEDREAM_EDITING_CALLBACK",
9
+ OPENAI_IMAGE_2_CALLBACK = "OPENAI_IMAGE_2_CALLBACK"
9
10
  }
10
11
  //# sourceMappingURL=image-editing-strategy.enum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-editing-strategy.enum.d.ts","sourceRoot":"","sources":["../../../../constants/image-editor/enums/image-editing-strategy.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAC9B,mBAAmB,wBAAwB;IAC3C,oBAAoB,yBAAyB;IAC7C,kCAAkC,uCAAuC;IACzE,iCAAiC,sCAAsC;IACvE,wBAAwB,6BAA6B;IACrD,uBAAuB,4BAA4B;IACnD,yBAAyB,8BAA8B;CAC1D"}
1
+ {"version":3,"file":"image-editing-strategy.enum.d.ts","sourceRoot":"","sources":["../../../../constants/image-editor/enums/image-editing-strategy.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,sBAAsB;IAC9B,mBAAmB,wBAAwB;IAC3C,oBAAoB,yBAAyB;IAC7C,kCAAkC,uCAAuC;IACzE,iCAAiC,sCAAsC;IACvE,wBAAwB,6BAA6B;IACrD,uBAAuB,4BAA4B;IACnD,yBAAyB,8BAA8B;IACvD,uBAAuB,4BAA4B;CACtD"}
@@ -10,4 +10,5 @@ var IMAGE_EDITING_STRATEGY;
10
10
  IMAGE_EDITING_STRATEGY["NANO_BANANA_PRO_CALLBACK"] = "NANO_BANANA_PRO_CALLBACK";
11
11
  IMAGE_EDITING_STRATEGY["NANO_BANANA_PRO_POLLING"] = "NANO_BANANA_PRO_POLLING";
12
12
  IMAGE_EDITING_STRATEGY["SEEDREAM_EDITING_CALLBACK"] = "SEEDREAM_EDITING_CALLBACK";
13
+ IMAGE_EDITING_STRATEGY["OPENAI_IMAGE_2_CALLBACK"] = "OPENAI_IMAGE_2_CALLBACK";
13
14
  })(IMAGE_EDITING_STRATEGY || (exports.IMAGE_EDITING_STRATEGY = IMAGE_EDITING_STRATEGY = {}));
@@ -1,7 +1,9 @@
1
- import { ImageGenerationJobParams, ImageGenerationPricingRules } from '../../models';
1
+ import { ImageGenerationPricingRules } from '../../models';
2
2
  export declare function calculateImageGenerationPrice({ basePrice, params, userHasActiveSubscriptionOrProduct, rules, }: {
3
3
  basePrice: number;
4
- params: Pick<ImageGenerationJobParams, 'resolution'>;
4
+ params: {
5
+ resolution?: string;
6
+ };
5
7
  userHasActiveSubscriptionOrProduct: boolean;
6
8
  rules: ImageGenerationPricingRules;
7
9
  }): number;
@@ -1 +1 @@
1
- {"version":3,"file":"calculate-image-generation-price.helper.d.ts","sourceRoot":"","sources":["../../../helpers/image-generation/calculate-image-generation-price.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAErF,wBAAgB,6BAA6B,CAAC,EAC1C,SAAS,EACT,MAAM,EACN,kCAAkC,EAClC,KAAK,GACR,EAAE;IACC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,IAAI,CAAC,wBAAwB,EAAE,YAAY,CAAC,CAAC;IACrD,kCAAkC,EAAE,OAAO,CAAC;IAC5C,KAAK,EAAE,2BAA2B,CAAC;CACtC,GAAG,MAAM,CAgBT"}
1
+ {"version":3,"file":"calculate-image-generation-price.helper.d.ts","sourceRoot":"","sources":["../../../helpers/image-generation/calculate-image-generation-price.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,wBAAgB,6BAA6B,CAAC,EAC1C,SAAS,EACT,MAAM,EACN,kCAAkC,EAClC,KAAK,GACR,EAAE;IACC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,kCAAkC,EAAE,OAAO,CAAC;IAC5C,KAAK,EAAE,2BAA2B,CAAC;CACtC,GAAG,MAAM,CAgBT"}
@@ -1,3 +1,4 @@
1
1
  export * from './image-generation';
2
2
  export * from './image-editor';
3
+ export * from './openai-image-2';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./image-generation"), exports);
18
18
  __exportStar(require("./image-editor"), exports);
19
+ __exportStar(require("./openai-image-2"), exports);
@@ -0,0 +1,20 @@
1
+ type Image2Size = {
2
+ width: number;
3
+ height: number;
4
+ };
5
+ export type OpenAIImage2PricedModel = {
6
+ aiModel: string;
7
+ params?: {
8
+ quality?: unknown;
9
+ aspectRatio?: Partial<Record<string, Image2Size | 'auto'>>;
10
+ };
11
+ };
12
+ export declare function isOpenAIImage2Model(model: Pick<OpenAIImage2PricedModel, 'aiModel'>): boolean;
13
+ export declare function calculateOpenAIImage2InternalPrice(params: {
14
+ model: OpenAIImage2PricedModel;
15
+ aspectRatio: string;
16
+ resolution?: string;
17
+ hasAttachedImage?: boolean;
18
+ }): number | null;
19
+ export {};
20
+ //# sourceMappingURL=calculate-openai-image-2-price.helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculate-openai-image-2-price.helper.d.ts","sourceRoot":"","sources":["../../../helpers/openai-image-2/calculate-openai-image-2-price.helper.ts"],"names":[],"mappings":"AAEA,KAAK,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpD,MAAM,MAAM,uBAAuB,GAAG;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,WAAW,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC;KAC9D,CAAC;CACL,CAAC;AAwBF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,CAAC,GAAG,OAAO,CAE5F;AAED,wBAAgB,kCAAkC,CAAC,MAAM,EAAE;IACvD,KAAK,EAAE,uBAAuB,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,MAAM,GAAG,IAAI,CAiChB"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isOpenAIImage2Model = isOpenAIImage2Model;
4
+ exports.calculateOpenAIImage2InternalPrice = calculateOpenAIImage2InternalPrice;
5
+ const LOW_QUALITY_SURCHARGE_STARS = 2;
6
+ const OPENAI_OUTPUT_PRICE_PER_1M_USD = 30;
7
+ const STAR_PRICE_USD = 0.018;
8
+ const TARGET_MARGIN = 0.6;
9
+ const IMAGE_2_INPUT_IMAGE_SURCHARGE_STARS = 2;
10
+ const IMAGE_2_QUALITY_BASE_TOKENS = {
11
+ low: 16,
12
+ medium: 48,
13
+ high: 96,
14
+ };
15
+ const IMAGE_2_RESOLUTION_MULTIPLIER = {
16
+ '1K': 1,
17
+ '2K': 2,
18
+ '4K': 4,
19
+ };
20
+ const IMAGE_2_MAX_EDGE = 3840;
21
+ const IMAGE_2_MAX_PIXEL_BUDGET = 8294400;
22
+ const IMAGE_2_SIZE_STEP = 16;
23
+ function isOpenAIImage2Model(model) {
24
+ return model.aiModel.toLowerCase().startsWith('gpt-image-2');
25
+ }
26
+ function calculateOpenAIImage2InternalPrice(params) {
27
+ var _a, _b, _c;
28
+ const { model, aspectRatio, resolution, hasAttachedImage = false } = params;
29
+ const quality = resolveQuality(model.aiModel, (_a = model.params) === null || _a === void 0 ? void 0 : _a.quality);
30
+ const normalizedResolution = normalizeResolution(resolution);
31
+ const baseSize = (_c = (_b = model.params) === null || _b === void 0 ? void 0 : _b.aspectRatio) === null || _c === void 0 ? void 0 : _c[aspectRatio];
32
+ if (!quality || !isImage2Size(baseSize) || !normalizedResolution) {
33
+ return null;
34
+ }
35
+ const multiplier = IMAGE_2_RESOLUTION_MULTIPLIER[normalizedResolution];
36
+ const normalizedSize = normalizeImage2SizeToOpenAILimits({
37
+ width: Math.round(baseSize.width * multiplier),
38
+ height: Math.round(baseSize.height * multiplier),
39
+ });
40
+ const outputTokens = calculateImage2OutputTokens(Object.assign({ quality }, normalizedSize));
41
+ const costUsd = (outputTokens / 1000000) * OPENAI_OUTPUT_PRICE_PER_1M_USD;
42
+ const sellUsd = costUsd / (1 - TARGET_MARGIN);
43
+ let finalStars = Math.max(1, Math.ceil(sellUsd / STAR_PRICE_USD));
44
+ if (hasAttachedImage) {
45
+ finalStars += IMAGE_2_INPUT_IMAGE_SURCHARGE_STARS;
46
+ }
47
+ if (quality === 'low') {
48
+ finalStars += LOW_QUALITY_SURCHARGE_STARS;
49
+ }
50
+ return finalStars;
51
+ }
52
+ function isImage2Size(value) {
53
+ if (!value || typeof value !== 'object')
54
+ return false;
55
+ const candidate = value;
56
+ return typeof candidate.width === 'number' && typeof candidate.height === 'number';
57
+ }
58
+ function resolveQuality(aiModel, rawQuality) {
59
+ const normalizedModel = aiModel.toLowerCase();
60
+ if (normalizedModel.endsWith('-low'))
61
+ return 'low';
62
+ if (normalizedModel.endsWith('-medium'))
63
+ return 'medium';
64
+ if (normalizedModel.endsWith('-high'))
65
+ return 'high';
66
+ if (typeof rawQuality === 'string') {
67
+ return normalizeQuality(rawQuality);
68
+ }
69
+ if (rawQuality && typeof rawQuality === 'object') {
70
+ const values = Object.values(rawQuality);
71
+ for (const value of values) {
72
+ if (typeof value !== 'string')
73
+ continue;
74
+ const normalized = normalizeQuality(value);
75
+ if (normalized)
76
+ return normalized;
77
+ }
78
+ }
79
+ return null;
80
+ }
81
+ function normalizeQuality(value) {
82
+ const normalized = value.trim().toLowerCase();
83
+ if (normalized === 'low')
84
+ return 'low';
85
+ if (normalized === 'medium')
86
+ return 'medium';
87
+ if (normalized === 'high')
88
+ return 'high';
89
+ return null;
90
+ }
91
+ function normalizeResolution(value) {
92
+ if (!value)
93
+ return '1K';
94
+ if (value === '1K' || value === '2K' || value === '4K') {
95
+ return value;
96
+ }
97
+ return null;
98
+ }
99
+ function normalizeImage2SizeToOpenAILimits(size) {
100
+ let scale = 1;
101
+ const longestEdge = Math.max(size.width, size.height);
102
+ if (longestEdge > IMAGE_2_MAX_EDGE) {
103
+ scale = Math.min(scale, IMAGE_2_MAX_EDGE / longestEdge);
104
+ }
105
+ const pixelCount = size.width * size.height;
106
+ if (pixelCount > IMAGE_2_MAX_PIXEL_BUDGET) {
107
+ scale = Math.min(scale, Math.sqrt(IMAGE_2_MAX_PIXEL_BUDGET / pixelCount));
108
+ }
109
+ const normalizedWidth = Math.floor((size.width * scale) / IMAGE_2_SIZE_STEP) * IMAGE_2_SIZE_STEP;
110
+ const normalizedHeight = Math.floor((size.height * scale) / IMAGE_2_SIZE_STEP) * IMAGE_2_SIZE_STEP;
111
+ return {
112
+ width: Math.max(IMAGE_2_SIZE_STEP, normalizedWidth),
113
+ height: Math.max(IMAGE_2_SIZE_STEP, normalizedHeight),
114
+ };
115
+ }
116
+ function calculateImage2OutputTokens(params) {
117
+ const { quality, width, height } = params;
118
+ const longestEdge = Math.max(width, height);
119
+ const shortestEdge = Math.min(width, height);
120
+ const qualityBaseTokens = IMAGE_2_QUALITY_BASE_TOKENS[quality];
121
+ const scaledShortEdgeTokens = Math.round((qualityBaseTokens * shortestEdge) / longestEdge);
122
+ const widthTokens = width >= height ? qualityBaseTokens : scaledShortEdgeTokens;
123
+ const heightTokens = width >= height ? scaledShortEdgeTokens : qualityBaseTokens;
124
+ return Math.ceil((widthTokens * heightTokens * (2000000 + width * height)) / 4000000);
125
+ }
@@ -0,0 +1,2 @@
1
+ export * from './calculate-openai-image-2-price.helper';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../helpers/openai-image-2/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC"}
@@ -0,0 +1,17 @@
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("./calculate-openai-image-2-price.helper"), exports);
@@ -76,6 +76,13 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
76
76
  width: number;
77
77
  height: number;
78
78
  }>>;
79
+ resolution: z.ZodOptional<z.ZodObject<{
80
+ options: z.ZodArray<z.ZodString, "many">;
81
+ }, "strip", z.ZodTypeAny, {
82
+ options: string[];
83
+ }, {
84
+ options: string[];
85
+ }>>;
79
86
  }, "strip", z.ZodTypeAny, {
80
87
  imageAttachment: {
81
88
  supported: boolean;
@@ -86,6 +93,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
86
93
  width: number;
87
94
  height: number;
88
95
  }>;
96
+ resolution?: {
97
+ options: string[];
98
+ } | undefined;
89
99
  }, {
90
100
  imageAttachment: {
91
101
  supported: boolean;
@@ -96,6 +106,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
96
106
  width: number;
97
107
  height: number;
98
108
  }>;
109
+ resolution?: {
110
+ options: string[];
111
+ } | undefined;
99
112
  }>;
100
113
  pricingRules: z.ZodArray<z.ZodObject<{
101
114
  condition: z.ZodObject<{
@@ -153,6 +166,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
153
166
  width: number;
154
167
  height: number;
155
168
  }>;
169
+ resolution?: {
170
+ options: string[];
171
+ } | undefined;
156
172
  };
157
173
  pricingRules: {
158
174
  condition: {
@@ -196,6 +212,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
196
212
  width: number;
197
213
  height: number;
198
214
  }>;
215
+ resolution?: {
216
+ options: string[];
217
+ } | undefined;
199
218
  };
200
219
  pricingRules: {
201
220
  condition: {
@@ -387,6 +406,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
387
406
  width: number;
388
407
  height: number;
389
408
  }>;
409
+ resolution?: {
410
+ options: string[];
411
+ } | undefined;
390
412
  };
391
413
  pricingRules: {
392
414
  condition: {
@@ -462,6 +484,9 @@ export declare const ImageEditorConfigSchema: z.ZodObject<{
462
484
  width: number;
463
485
  height: number;
464
486
  }>;
487
+ resolution?: {
488
+ options: string[];
489
+ } | undefined;
465
490
  };
466
491
  pricingRules: {
467
492
  condition: {
@@ -1 +1 @@
1
- {"version":3,"file":"image-editor-config.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
1
+ {"version":3,"file":"image-editor-config.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-config.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -28,6 +28,7 @@ export declare const ImageEditorJobParamsSchema: z.ZodObject<{
28
28
  imageUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
29
29
  systemPromptId: z.ZodOptional<z.ZodString>;
30
30
  aspectRatio: z.ZodOptional<z.ZodString>;
31
+ resolution: z.ZodOptional<z.ZodString>;
31
32
  userHasActiveSubscriptionOrProduct: z.ZodOptional<z.ZodBoolean>;
32
33
  }, "strip", z.ZodTypeAny, {
33
34
  attachedFiles?: {
@@ -42,6 +43,7 @@ export declare const ImageEditorJobParamsSchema: z.ZodObject<{
42
43
  imageUrls?: string[] | undefined;
43
44
  systemPromptId?: string | undefined;
44
45
  aspectRatio?: string | undefined;
46
+ resolution?: string | undefined;
45
47
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
46
48
  }, {
47
49
  attachedFiles?: {
@@ -56,6 +58,7 @@ export declare const ImageEditorJobParamsSchema: z.ZodObject<{
56
58
  imageUrls?: string[] | undefined;
57
59
  systemPromptId?: string | undefined;
58
60
  aspectRatio?: string | undefined;
61
+ resolution?: string | undefined;
59
62
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
60
63
  }>;
61
64
  export type ImageEditorJobParams = z.infer<typeof ImageEditorJobParamsSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"image-editor-job-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"image-editor-job-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAOrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
@@ -8,5 +8,6 @@ exports.ImageEditorJobParamsSchema = zod_1.z.object({
8
8
  imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
9
9
  systemPromptId: zod_1.z.string().uuid().optional(),
10
10
  aspectRatio: zod_1.z.string().optional(),
11
+ resolution: zod_1.z.string().optional(),
11
12
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean().optional(),
12
13
  });
@@ -3,14 +3,17 @@ export declare const ImageEditorJobRequestParamsSchema: z.ZodObject<{
3
3
  imageUrls: z.ZodArray<z.ZodString, "many">;
4
4
  systemPromptId: z.ZodOptional<z.ZodString>;
5
5
  aspectRatio: z.ZodOptional<z.ZodString>;
6
+ resolution: z.ZodOptional<z.ZodString>;
6
7
  }, "strip", z.ZodTypeAny, {
7
8
  imageUrls: string[];
8
9
  systemPromptId?: string | undefined;
9
10
  aspectRatio?: string | undefined;
11
+ resolution?: string | undefined;
10
12
  }, {
11
13
  imageUrls: string[];
12
14
  systemPromptId?: string | undefined;
13
15
  aspectRatio?: string | undefined;
16
+ resolution?: string | undefined;
14
17
  }>;
15
18
  export type ImageEditorJobRequestParams = z.infer<typeof ImageEditorJobRequestParamsSchema>;
16
19
  //# sourceMappingURL=image-editor-job-request-params.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-editor-job-request-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job-request-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iCAAiC;;;;;;;;;;;;EAI5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
1
+ {"version":3,"file":"image-editor-job-request-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job-request-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;EAK5C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
@@ -6,4 +6,5 @@ exports.ImageEditorJobRequestParamsSchema = zod_1.z.object({
6
6
  imageUrls: zod_1.z.array(zod_1.z.string().uuid()).min(1),
7
7
  systemPromptId: zod_1.z.string().uuid().optional(),
8
8
  aspectRatio: zod_1.z.string().optional(),
9
+ resolution: zod_1.z.string().optional(),
9
10
  });
@@ -41,6 +41,7 @@ export declare const ImageEditorJobSchema: z.ZodObject<{
41
41
  imageUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
42
42
  systemPromptId: z.ZodOptional<z.ZodString>;
43
43
  aspectRatio: z.ZodOptional<z.ZodString>;
44
+ resolution: z.ZodOptional<z.ZodString>;
44
45
  userHasActiveSubscriptionOrProduct: z.ZodOptional<z.ZodBoolean>;
45
46
  }, "strip", z.ZodTypeAny, {
46
47
  attachedFiles?: {
@@ -55,6 +56,7 @@ export declare const ImageEditorJobSchema: z.ZodObject<{
55
56
  imageUrls?: string[] | undefined;
56
57
  systemPromptId?: string | undefined;
57
58
  aspectRatio?: string | undefined;
59
+ resolution?: string | undefined;
58
60
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
59
61
  }, {
60
62
  attachedFiles?: {
@@ -69,6 +71,7 @@ export declare const ImageEditorJobSchema: z.ZodObject<{
69
71
  imageUrls?: string[] | undefined;
70
72
  systemPromptId?: string | undefined;
71
73
  aspectRatio?: string | undefined;
74
+ resolution?: string | undefined;
72
75
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
73
76
  }>;
74
77
  imageUrls: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
@@ -106,6 +109,7 @@ export declare const ImageEditorJobSchema: z.ZodObject<{
106
109
  imageUrls?: string[] | undefined;
107
110
  systemPromptId?: string | undefined;
108
111
  aspectRatio?: string | undefined;
112
+ resolution?: string | undefined;
109
113
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
110
114
  };
111
115
  imageUrls: string[];
@@ -143,6 +147,7 @@ export declare const ImageEditorJobSchema: z.ZodObject<{
143
147
  imageUrls?: string[] | undefined;
144
148
  systemPromptId?: string | undefined;
145
149
  aspectRatio?: string | undefined;
150
+ resolution?: string | undefined;
146
151
  userHasActiveSubscriptionOrProduct?: boolean | undefined;
147
152
  };
148
153
  imageUrls?: string[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"image-editor-job.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"image-editor-job.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-job.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAG5D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -23,6 +23,13 @@ export declare const ImageEditorModelParamsSchema: z.ZodObject<{
23
23
  width: number;
24
24
  height: number;
25
25
  }>>;
26
+ resolution: z.ZodOptional<z.ZodObject<{
27
+ options: z.ZodArray<z.ZodString, "many">;
28
+ }, "strip", z.ZodTypeAny, {
29
+ options: string[];
30
+ }, {
31
+ options: string[];
32
+ }>>;
26
33
  }, "strip", z.ZodTypeAny, {
27
34
  imageAttachment: {
28
35
  supported: boolean;
@@ -33,6 +40,9 @@ export declare const ImageEditorModelParamsSchema: z.ZodObject<{
33
40
  width: number;
34
41
  height: number;
35
42
  }>;
43
+ resolution?: {
44
+ options: string[];
45
+ } | undefined;
36
46
  }, {
37
47
  imageAttachment: {
38
48
  supported: boolean;
@@ -43,6 +53,9 @@ export declare const ImageEditorModelParamsSchema: z.ZodObject<{
43
53
  width: number;
44
54
  height: number;
45
55
  }>;
56
+ resolution?: {
57
+ options: string[];
58
+ } | undefined;
46
59
  }>;
47
60
  export type ImageEditorModelParams = z.infer<typeof ImageEditorModelParamsSchema>;
48
61
  //# sourceMappingURL=image-editor-model-params.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"image-editor-model-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-model-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAavC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
1
+ {"version":3,"file":"image-editor-model-params.schema.d.ts","sourceRoot":"","sources":["../../../models/image-editor/image-editor-model-params.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -12,4 +12,9 @@ exports.ImageEditorModelParamsSchema = zod_1.z.object({
12
12
  width: zod_1.z.number().int().positive(),
13
13
  height: zod_1.z.number().int().positive(),
14
14
  })),
15
+ resolution: zod_1.z
16
+ .object({
17
+ options: zod_1.z.array(zod_1.z.string()),
18
+ })
19
+ .optional(),
15
20
  });