@purpleschool/gptbot-tools 0.2.79-stage-2 → 0.2.80-stage-2

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 (37) hide show
  1. package/build/image-generation/commands/execute-image-generation.command.d.ts +131 -38
  2. package/build/image-generation/commands/execute-image-generation.command.js +2 -1
  3. package/build/image-generation/commands/forward-image-generation-job.command.d.ts +15 -2
  4. package/build/image-generation/commands/forward-image-generation-job.command.js +1 -0
  5. package/build/image-generation/commands/retry-image-generation-job.command.d.ts +14 -2
  6. package/build/image-generation/commands/save-image-generation-job.command.d.ts +14 -2
  7. package/build/image-generation/commands/set-reaction-to-image-generation-job.command.d.ts +14 -2
  8. package/build/image-generation/commands/update-image-generation-job-favorite.command.d.ts +14 -2
  9. package/build/image-generation/commands/update-image-generation-job-title.command.d.ts +14 -2
  10. package/build/image-generation/commands/update-published-status-image-generation-jobs.command.d.ts +14 -2
  11. package/build/image-generation/enums/image-generation-group-status.enum.d.ts +6 -0
  12. package/build/image-generation/enums/image-generation-group-status.enum.js +10 -0
  13. package/build/image-generation/enums/index.d.ts +1 -0
  14. package/build/image-generation/enums/index.js +1 -0
  15. package/build/image-generation/models/image-generation-group.schema.d.ts +95 -0
  16. package/build/image-generation/models/image-generation-group.schema.js +33 -0
  17. package/build/image-generation/models/image-generation-job.schema.d.ts +9 -3
  18. package/build/image-generation/models/image-generation-job.schema.js +9 -3
  19. package/build/image-generation/models/index.d.ts +1 -0
  20. package/build/image-generation/models/index.js +1 -0
  21. package/build/image-generation/queries/find-image-generation-job-by-id.query.d.ts +130 -38
  22. package/build/image-generation/queries/find-image-generation-job-by-id.query.js +1 -1
  23. package/build/image-generation/queries/find-image-generation-jobs.query.d.ts +133 -40
  24. package/build/image-generation/queries/find-image-generation-jobs.query.js +3 -2
  25. package/build/photo-sessions/commands/admin/create-photo-session-style.command.d.ts +4 -0
  26. package/build/photo-sessions/commands/admin/create-photo-session-style.command.js +1 -0
  27. package/build/photo-sessions/commands/admin/update-photo-session-style.command.d.ts +3 -0
  28. package/build/photo-sessions/models/photo-session-config.schema.d.ts +2 -2
  29. package/build/photo-sessions/models/photo-session-config.schema.js +1 -1
  30. package/build/photo-sessions/models/photo-session-style.schema.d.ts +30 -0
  31. package/build/photo-sessions/models/photo-session-style.schema.js +10 -1
  32. package/build/photo-sessions/queries/find-photo-session-style-by-id.query.d.ts +2 -0
  33. package/build/photo-sessions/queries/find-photo-session-styles.query.d.ts +2 -0
  34. package/build/photo-sessions/queries/get-photo-sessions-config.query.d.ts +4 -4
  35. package/build/tools/models/global-tools-config.schema.d.ts +2 -2
  36. package/build/tools/queries/get-global-tools-config.query.d.ts +4 -4
  37. package/package.json +1 -1
@@ -9,6 +9,7 @@ export declare namespace ExecuteImageGenerationCommand {
9
9
  scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
10
10
  prompt: z.ZodString;
11
11
  modelId: z.ZodUUID;
12
+ groupId: z.ZodOptional<z.ZodUUID>;
12
13
  params: z.ZodObject<{
13
14
  aspectRatio: z.ZodString;
14
15
  attachedFiles: z.ZodArray<z.ZodObject<{
@@ -38,15 +39,13 @@ export declare namespace ExecuteImageGenerationCommand {
38
39
  isSuccess: z.ZodBoolean;
39
40
  data: z.ZodOptional<z.ZodType<{
40
41
  uuid: string;
41
- prompt: string;
42
42
  title: string;
43
- status: import("../..").JOB_STATUS;
43
+ prompt: string;
44
+ status: import("..").IMAGE_GENERATION_GROUP_STATUS;
44
45
  error: string | null;
46
+ modelId: string;
47
+ presetId: string | null;
45
48
  price: number;
46
- previewUrl: string | null;
47
- reaction: import("../..").USER_REACTION | null;
48
- dislikeReason: string | null;
49
- externalId: string | null;
50
49
  params: {
51
50
  aspectRatio: string;
52
51
  attachedFiles: {
@@ -64,33 +63,79 @@ export declare namespace ExecuteImageGenerationCommand {
64
63
  resolution?: import("..").IMAGE_GENERATION_RESOLUTION | undefined;
65
64
  batching?: number | undefined;
66
65
  };
67
- output: string[];
68
- presetId?: string | null | undefined;
69
- modelId: string;
70
- attempts: any[];
71
- userId?: string | null | undefined;
72
- unregisteredUserId?: string | null | undefined;
73
- isPublished: boolean;
74
- origin: string;
75
- callOrigin: STATISTICS_CALL_ORIGIN;
76
- postId: string | null;
66
+ attempts: {
67
+ order: number;
68
+ status: string;
69
+ error: string | null;
70
+ timestamp: Date;
71
+ }[];
72
+ scope: JOB_SCOPE;
73
+ userId: string | null;
74
+ unregisteredUserId: string | null;
77
75
  isDeleted: boolean;
78
- isFavorite: boolean;
79
- internalError: string | null;
80
- tokenReservationId?: string | null | undefined;
76
+ subJobs: {
77
+ uuid: string;
78
+ prompt: string;
79
+ title: string;
80
+ status: import("../..").JOB_STATUS;
81
+ error: string | null;
82
+ price: number;
83
+ previewUrl: string | null;
84
+ reaction: import("../..").USER_REACTION | null;
85
+ dislikeReason: string | null;
86
+ externalId: string | null;
87
+ params: {
88
+ aspectRatio: string;
89
+ attachedFiles: {
90
+ uuid: string;
91
+ url: string;
92
+ name: string;
93
+ mimeType: string;
94
+ type: string;
95
+ size: number;
96
+ duration?: number | null | undefined;
97
+ content?: string | null | undefined;
98
+ contentLength?: number | null | undefined;
99
+ }[];
100
+ enhancePrompt: boolean;
101
+ resolution?: import("..").IMAGE_GENERATION_RESOLUTION | undefined;
102
+ batching?: number | undefined;
103
+ };
104
+ output: string[];
105
+ presetId?: string | null | undefined;
106
+ modelId: string;
107
+ groupId: string | null;
108
+ attempts: {
109
+ order: number;
110
+ status: string;
111
+ error: string | null;
112
+ timestamp: Date;
113
+ }[];
114
+ userId?: string | null | undefined;
115
+ unregisteredUserId?: string | null | undefined;
116
+ isPublished: boolean;
117
+ origin: string;
118
+ callOrigin: STATISTICS_CALL_ORIGIN;
119
+ postId: string | null;
120
+ isDeleted: boolean;
121
+ isFavorite: boolean;
122
+ internalError: string | null;
123
+ tokenReservationId?: string | null | undefined;
124
+ createdAt: Date;
125
+ updatedAt: Date;
126
+ }[];
81
127
  createdAt: Date;
128
+ completedAt: Date | null;
82
129
  updatedAt: Date;
83
130
  }, unknown, z.core.$ZodTypeInternals<{
84
131
  uuid: string;
85
- prompt: string;
86
132
  title: string;
87
- status: import("../..").JOB_STATUS;
133
+ prompt: string;
134
+ status: import("..").IMAGE_GENERATION_GROUP_STATUS;
88
135
  error: string | null;
136
+ modelId: string;
137
+ presetId: string | null;
89
138
  price: number;
90
- previewUrl: string | null;
91
- reaction: import("../..").USER_REACTION | null;
92
- dislikeReason: string | null;
93
- externalId: string | null;
94
139
  params: {
95
140
  aspectRatio: string;
96
141
  attachedFiles: {
@@ -108,21 +153,69 @@ export declare namespace ExecuteImageGenerationCommand {
108
153
  resolution?: import("..").IMAGE_GENERATION_RESOLUTION | undefined;
109
154
  batching?: number | undefined;
110
155
  };
111
- output: string[];
112
- presetId?: string | null | undefined;
113
- modelId: string;
114
- attempts: any[];
115
- userId?: string | null | undefined;
116
- unregisteredUserId?: string | null | undefined;
117
- isPublished: boolean;
118
- origin: string;
119
- callOrigin: STATISTICS_CALL_ORIGIN;
120
- postId: string | null;
156
+ attempts: {
157
+ order: number;
158
+ status: string;
159
+ error: string | null;
160
+ timestamp: Date;
161
+ }[];
162
+ scope: JOB_SCOPE;
163
+ userId: string | null;
164
+ unregisteredUserId: string | null;
121
165
  isDeleted: boolean;
122
- isFavorite: boolean;
123
- internalError: string | null;
124
- tokenReservationId?: string | null | undefined;
166
+ subJobs: {
167
+ uuid: string;
168
+ prompt: string;
169
+ title: string;
170
+ status: import("../..").JOB_STATUS;
171
+ error: string | null;
172
+ price: number;
173
+ previewUrl: string | null;
174
+ reaction: import("../..").USER_REACTION | null;
175
+ dislikeReason: string | null;
176
+ externalId: string | null;
177
+ params: {
178
+ aspectRatio: string;
179
+ attachedFiles: {
180
+ uuid: string;
181
+ url: string;
182
+ name: string;
183
+ mimeType: string;
184
+ type: string;
185
+ size: number;
186
+ duration?: number | null | undefined;
187
+ content?: string | null | undefined;
188
+ contentLength?: number | null | undefined;
189
+ }[];
190
+ enhancePrompt: boolean;
191
+ resolution?: import("..").IMAGE_GENERATION_RESOLUTION | undefined;
192
+ batching?: number | undefined;
193
+ };
194
+ output: string[];
195
+ presetId?: string | null | undefined;
196
+ modelId: string;
197
+ groupId: string | null;
198
+ attempts: {
199
+ order: number;
200
+ status: string;
201
+ error: string | null;
202
+ timestamp: Date;
203
+ }[];
204
+ userId?: string | null | undefined;
205
+ unregisteredUserId?: string | null | undefined;
206
+ isPublished: boolean;
207
+ origin: string;
208
+ callOrigin: STATISTICS_CALL_ORIGIN;
209
+ postId: string | null;
210
+ isDeleted: boolean;
211
+ isFavorite: boolean;
212
+ internalError: string | null;
213
+ tokenReservationId?: string | null | undefined;
214
+ createdAt: Date;
215
+ updatedAt: Date;
216
+ }[];
125
217
  createdAt: Date;
218
+ completedAt: Date | null;
126
219
  updatedAt: Date;
127
220
  }, unknown>>>;
128
221
  code: z.ZodOptional<z.ZodString>;
@@ -16,6 +16,7 @@ var ExecuteImageGenerationCommand;
16
16
  scope: zod_1.z.enum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
17
17
  prompt: zod_1.z.string(),
18
18
  modelId: zod_1.z.uuid(),
19
+ groupId: zod_1.z.uuid().optional(),
19
20
  params: models_1.ImageGenerationRequestParamsSchema,
20
21
  presetId: zod_1.z.uuid().nullable().optional(),
21
22
  callOrigin: zod_1.z.enum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN).default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB),
@@ -24,5 +25,5 @@ var ExecuteImageGenerationCommand;
24
25
  precalculatedPrice: zod_1.z.number(),
25
26
  mock: zod_1.z.boolean().optional(),
26
27
  });
27
- ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationJobSchema);
28
+ ExecuteImageGenerationCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.ImageGenerationGroupSchema);
28
29
  })(ExecuteImageGenerationCommand || (exports.ExecuteImageGenerationCommand = ExecuteImageGenerationCommand = {}));
@@ -32,6 +32,7 @@ export declare namespace ForwardImageGenerationJobCommand {
32
32
  batching: z.ZodOptional<z.ZodNumber>;
33
33
  }, z.core.$strip>;
34
34
  modelId: z.ZodUUID;
35
+ groupId: z.ZodOptional<z.ZodUUID>;
35
36
  presetId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
36
37
  userId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
37
38
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodUUID>>;
@@ -74,7 +75,13 @@ export declare namespace ForwardImageGenerationJobCommand {
74
75
  output: string[];
75
76
  presetId?: string | null | undefined;
76
77
  modelId: string;
77
- attempts: any[];
78
+ groupId: string | null;
79
+ attempts: {
80
+ order: number;
81
+ status: string;
82
+ error: string | null;
83
+ timestamp: Date;
84
+ }[];
78
85
  userId?: string | null | undefined;
79
86
  unregisteredUserId?: string | null | undefined;
80
87
  isPublished: boolean;
@@ -118,7 +125,13 @@ export declare namespace ForwardImageGenerationJobCommand {
118
125
  output: string[];
119
126
  presetId?: string | null | undefined;
120
127
  modelId: string;
121
- attempts: any[];
128
+ groupId: string | null;
129
+ attempts: {
130
+ order: number;
131
+ status: string;
132
+ error: string | null;
133
+ timestamp: Date;
134
+ }[];
122
135
  userId?: string | null | undefined;
123
136
  unregisteredUserId?: string | null | undefined;
124
137
  isPublished: boolean;
@@ -22,6 +22,7 @@ var ForwardImageGenerationJobCommand;
22
22
  output: zod_1.z.array(zod_1.z.string()),
23
23
  params: models_1.ImageGenerationJobParamsSchema,
24
24
  modelId: zod_1.z.uuid(),
25
+ groupId: zod_1.z.uuid().optional(),
25
26
  presetId: zod_1.z.uuid().nullable().optional(),
26
27
  userId: zod_1.z.uuid().nullable().optional(),
27
28
  unregisteredUserId: zod_1.z.uuid().nullable().optional(),
@@ -64,7 +64,13 @@ export declare namespace RetryImageGenerationJobCommand {
64
64
  output: string[];
65
65
  presetId?: string | null | undefined;
66
66
  modelId: string;
67
- attempts: any[];
67
+ groupId: string | null;
68
+ attempts: {
69
+ order: number;
70
+ status: string;
71
+ error: string | null;
72
+ timestamp: Date;
73
+ }[];
68
74
  userId?: string | null | undefined;
69
75
  unregisteredUserId?: string | null | undefined;
70
76
  isPublished: boolean;
@@ -108,7 +114,13 @@ export declare namespace RetryImageGenerationJobCommand {
108
114
  output: string[];
109
115
  presetId?: string | null | undefined;
110
116
  modelId: string;
111
- attempts: any[];
117
+ groupId: string | null;
118
+ attempts: {
119
+ order: number;
120
+ status: string;
121
+ error: string | null;
122
+ timestamp: Date;
123
+ }[];
112
124
  userId?: string | null | undefined;
113
125
  unregisteredUserId?: string | null | undefined;
114
126
  isPublished: boolean;
@@ -41,7 +41,13 @@ export declare namespace SaveImageGenerationJobCommand {
41
41
  output: string[];
42
42
  presetId?: string | null | undefined;
43
43
  modelId: string;
44
- attempts: any[];
44
+ groupId: string | null;
45
+ attempts: {
46
+ order: number;
47
+ status: string;
48
+ error: string | null;
49
+ timestamp: Date;
50
+ }[];
45
51
  userId?: string | null | undefined;
46
52
  unregisteredUserId?: string | null | undefined;
47
53
  isPublished: boolean;
@@ -85,7 +91,13 @@ export declare namespace SaveImageGenerationJobCommand {
85
91
  output: string[];
86
92
  presetId?: string | null | undefined;
87
93
  modelId: string;
88
- attempts: any[];
94
+ groupId: string | null;
95
+ attempts: {
96
+ order: number;
97
+ status: string;
98
+ error: string | null;
99
+ timestamp: Date;
100
+ }[];
89
101
  userId?: string | null | undefined;
90
102
  unregisteredUserId?: string | null | undefined;
91
103
  isPublished: boolean;
@@ -42,7 +42,13 @@ export declare namespace SetReactionToImageGenerationJobCommand {
42
42
  output: string[];
43
43
  presetId?: string | null | undefined;
44
44
  modelId: string;
45
- attempts: any[];
45
+ groupId: string | null;
46
+ attempts: {
47
+ order: number;
48
+ status: string;
49
+ error: string | null;
50
+ timestamp: Date;
51
+ }[];
46
52
  userId?: string | null | undefined;
47
53
  unregisteredUserId?: string | null | undefined;
48
54
  isPublished: boolean;
@@ -86,7 +92,13 @@ export declare namespace SetReactionToImageGenerationJobCommand {
86
92
  output: string[];
87
93
  presetId?: string | null | undefined;
88
94
  modelId: string;
89
- attempts: any[];
95
+ groupId: string | null;
96
+ attempts: {
97
+ order: number;
98
+ status: string;
99
+ error: string | null;
100
+ timestamp: Date;
101
+ }[];
90
102
  userId?: string | null | undefined;
91
103
  unregisteredUserId?: string | null | undefined;
92
104
  isPublished: boolean;
@@ -40,7 +40,13 @@ export declare namespace UpdateImageGenerationJobFavoriteCommand {
40
40
  output: string[];
41
41
  presetId?: string | null | undefined;
42
42
  modelId: string;
43
- attempts: any[];
43
+ groupId: string | null;
44
+ attempts: {
45
+ order: number;
46
+ status: string;
47
+ error: string | null;
48
+ timestamp: Date;
49
+ }[];
44
50
  userId?: string | null | undefined;
45
51
  unregisteredUserId?: string | null | undefined;
46
52
  isPublished: boolean;
@@ -84,7 +90,13 @@ export declare namespace UpdateImageGenerationJobFavoriteCommand {
84
90
  output: string[];
85
91
  presetId?: string | null | undefined;
86
92
  modelId: string;
87
- attempts: any[];
93
+ groupId: string | null;
94
+ attempts: {
95
+ order: number;
96
+ status: string;
97
+ error: string | null;
98
+ timestamp: Date;
99
+ }[];
88
100
  userId?: string | null | undefined;
89
101
  unregisteredUserId?: string | null | undefined;
90
102
  isPublished: boolean;
@@ -40,7 +40,13 @@ export declare namespace UpdateImageGenerationJobTitleCommand {
40
40
  output: string[];
41
41
  presetId?: string | null | undefined;
42
42
  modelId: string;
43
- attempts: any[];
43
+ groupId: string | null;
44
+ attempts: {
45
+ order: number;
46
+ status: string;
47
+ error: string | null;
48
+ timestamp: Date;
49
+ }[];
44
50
  userId?: string | null | undefined;
45
51
  unregisteredUserId?: string | null | undefined;
46
52
  isPublished: boolean;
@@ -84,7 +90,13 @@ export declare namespace UpdateImageGenerationJobTitleCommand {
84
90
  output: string[];
85
91
  presetId?: string | null | undefined;
86
92
  modelId: string;
87
- attempts: any[];
93
+ groupId: string | null;
94
+ attempts: {
95
+ order: number;
96
+ status: string;
97
+ error: string | null;
98
+ timestamp: Date;
99
+ }[];
88
100
  userId?: string | null | undefined;
89
101
  unregisteredUserId?: string | null | undefined;
90
102
  isPublished: boolean;
@@ -45,7 +45,13 @@ export declare namespace UpdatePublishedStatusImageGenerationJobsCommand {
45
45
  output: string[];
46
46
  presetId?: string | null | undefined;
47
47
  modelId: string;
48
- attempts: any[];
48
+ groupId: string | null;
49
+ attempts: {
50
+ order: number;
51
+ status: string;
52
+ error: string | null;
53
+ timestamp: Date;
54
+ }[];
49
55
  userId?: string | null | undefined;
50
56
  unregisteredUserId?: string | null | undefined;
51
57
  isPublished: boolean;
@@ -89,7 +95,13 @@ export declare namespace UpdatePublishedStatusImageGenerationJobsCommand {
89
95
  output: string[];
90
96
  presetId?: string | null | undefined;
91
97
  modelId: string;
92
- attempts: any[];
98
+ groupId: string | null;
99
+ attempts: {
100
+ order: number;
101
+ status: string;
102
+ error: string | null;
103
+ timestamp: Date;
104
+ }[];
93
105
  userId?: string | null | undefined;
94
106
  unregisteredUserId?: string | null | undefined;
95
107
  isPublished: boolean;
@@ -0,0 +1,6 @@
1
+ export declare enum IMAGE_GENERATION_GROUP_STATUS {
2
+ PENDING = "pending",
3
+ COMPLETED = "completed",
4
+ AWAITING_RETRY = "awaiting_retry",
5
+ FAILED = "failed"
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IMAGE_GENERATION_GROUP_STATUS = void 0;
4
+ var IMAGE_GENERATION_GROUP_STATUS;
5
+ (function (IMAGE_GENERATION_GROUP_STATUS) {
6
+ IMAGE_GENERATION_GROUP_STATUS["PENDING"] = "pending";
7
+ IMAGE_GENERATION_GROUP_STATUS["COMPLETED"] = "completed";
8
+ IMAGE_GENERATION_GROUP_STATUS["AWAITING_RETRY"] = "awaiting_retry";
9
+ IMAGE_GENERATION_GROUP_STATUS["FAILED"] = "failed";
10
+ })(IMAGE_GENERATION_GROUP_STATUS || (exports.IMAGE_GENERATION_GROUP_STATUS = IMAGE_GENERATION_GROUP_STATUS = {}));
@@ -1,3 +1,4 @@
1
1
  export * from './image-generation-model-strategy.enum';
2
2
  export * from './image-generation-resolution.enum';
3
3
  export * from './image-generation-models.enum';
4
+ export * from './image-generation-group-status.enum';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./image-generation-model-strategy.enum"), exports);
18
18
  __exportStar(require("./image-generation-resolution.enum"), exports);
19
19
  __exportStar(require("./image-generation-models.enum"), exports);
20
+ __exportStar(require("./image-generation-group-status.enum"), exports);
@@ -0,0 +1,95 @@
1
+ import { z } from 'zod';
2
+ import { JOB_SCOPE } from '../../common';
3
+ import { IMAGE_GENERATION_GROUP_STATUS } from '../enums';
4
+ export declare const ImageGenerationGroupSchema: z.ZodObject<{
5
+ uuid: z.ZodString;
6
+ title: z.ZodString;
7
+ prompt: z.ZodString;
8
+ status: z.ZodEnum<typeof IMAGE_GENERATION_GROUP_STATUS>;
9
+ error: z.ZodNullable<z.ZodString>;
10
+ modelId: z.ZodString;
11
+ presetId: z.ZodNullable<z.ZodString>;
12
+ price: z.ZodNumber;
13
+ params: z.ZodObject<{
14
+ aspectRatio: z.ZodString;
15
+ attachedFiles: z.ZodArray<z.ZodObject<{
16
+ uuid: z.ZodString;
17
+ url: z.ZodString;
18
+ name: z.ZodString;
19
+ mimeType: z.ZodString;
20
+ type: z.ZodString;
21
+ size: z.ZodNumber;
22
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
23
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
24
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
25
+ }, z.core.$strip>>;
26
+ enhancePrompt: z.ZodBoolean;
27
+ resolution: z.ZodOptional<z.ZodEnum<typeof import("..").IMAGE_GENERATION_RESOLUTION>>;
28
+ batching: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strip>;
30
+ attempts: z.ZodArray<z.ZodObject<{
31
+ order: z.ZodNumber;
32
+ status: z.ZodString;
33
+ error: z.ZodNullable<z.ZodString>;
34
+ timestamp: z.ZodCoercedDate<unknown>;
35
+ }, z.core.$strip>>;
36
+ scope: z.ZodEnum<typeof JOB_SCOPE>;
37
+ userId: z.ZodNullable<z.ZodString>;
38
+ unregisteredUserId: z.ZodNullable<z.ZodString>;
39
+ isDeleted: z.ZodBoolean;
40
+ subJobs: z.ZodArray<z.ZodObject<{
41
+ uuid: z.ZodString;
42
+ prompt: z.ZodString;
43
+ title: z.ZodString;
44
+ status: z.ZodEnum<typeof import("../..").JOB_STATUS>;
45
+ error: z.ZodNullable<z.ZodString>;
46
+ price: z.ZodNumber;
47
+ previewUrl: z.ZodNullable<z.ZodString>;
48
+ reaction: z.ZodNullable<z.ZodEnum<typeof import("../..").USER_REACTION>>;
49
+ dislikeReason: z.ZodNullable<z.ZodString>;
50
+ externalId: z.ZodNullable<z.ZodString>;
51
+ params: z.ZodObject<{
52
+ aspectRatio: z.ZodString;
53
+ attachedFiles: z.ZodArray<z.ZodObject<{
54
+ uuid: z.ZodString;
55
+ url: z.ZodString;
56
+ name: z.ZodString;
57
+ mimeType: z.ZodString;
58
+ type: z.ZodString;
59
+ size: z.ZodNumber;
60
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
61
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
62
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
63
+ }, z.core.$strip>>;
64
+ enhancePrompt: z.ZodBoolean;
65
+ resolution: z.ZodOptional<z.ZodEnum<typeof import("..").IMAGE_GENERATION_RESOLUTION>>;
66
+ batching: z.ZodOptional<z.ZodNumber>;
67
+ }, z.core.$strip>;
68
+ output: z.ZodArray<z.ZodString>;
69
+ presetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ modelId: z.ZodString;
71
+ groupId: z.ZodNullable<z.ZodString>;
72
+ attempts: z.ZodArray<z.ZodObject<{
73
+ order: z.ZodNumber;
74
+ status: z.ZodString;
75
+ error: z.ZodNullable<z.ZodString>;
76
+ timestamp: z.ZodCoercedDate<unknown>;
77
+ }, z.core.$strip>>;
78
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ isPublished: z.ZodBoolean;
81
+ origin: z.ZodString;
82
+ callOrigin: z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").STATISTICS_CALL_ORIGIN>;
83
+ postId: z.ZodNullable<z.ZodString>;
84
+ isDeleted: z.ZodBoolean;
85
+ isFavorite: z.ZodBoolean;
86
+ internalError: z.ZodNullable<z.ZodString>;
87
+ tokenReservationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
88
+ createdAt: z.ZodCoercedDate<unknown>;
89
+ updatedAt: z.ZodCoercedDate<unknown>;
90
+ }, z.core.$strip>>;
91
+ createdAt: z.ZodCoercedDate<unknown>;
92
+ completedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
93
+ updatedAt: z.ZodCoercedDate<unknown>;
94
+ }, z.core.$strip>;
95
+ export type ImageGenerationGroup = z.infer<typeof ImageGenerationGroupSchema>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ImageGenerationGroupSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const enums_1 = require("../enums");
7
+ const image_generation_job_schema_1 = require("./image-generation-job.schema");
8
+ const image_generation_job_schema_2 = require("./image-generation-job.schema");
9
+ exports.ImageGenerationGroupSchema = zod_1.z.object({
10
+ uuid: zod_1.z.string(),
11
+ title: zod_1.z.string(),
12
+ prompt: zod_1.z.string(),
13
+ status: zod_1.z.enum(enums_1.IMAGE_GENERATION_GROUP_STATUS),
14
+ error: zod_1.z.string().nullable(),
15
+ modelId: zod_1.z.string(),
16
+ presetId: zod_1.z.string().nullable(),
17
+ price: zod_1.z.number(),
18
+ params: image_generation_job_schema_2.ImageGenerationJobParamsSchema,
19
+ attempts: zod_1.z.array(zod_1.z.object({
20
+ order: zod_1.z.number(),
21
+ status: zod_1.z.string(),
22
+ error: zod_1.z.string().nullable(),
23
+ timestamp: zod_1.z.coerce.date(),
24
+ })),
25
+ scope: zod_1.z.enum(common_1.JOB_SCOPE),
26
+ userId: zod_1.z.string().nullable(),
27
+ unregisteredUserId: zod_1.z.string().nullable(),
28
+ isDeleted: zod_1.z.boolean(),
29
+ subJobs: zod_1.z.array(image_generation_job_schema_1.ImageGenerationJobSchema),
30
+ createdAt: zod_1.z.coerce.date(),
31
+ completedAt: zod_1.z.coerce.date().nullable(),
32
+ updatedAt: zod_1.z.coerce.date(),
33
+ });
@@ -52,7 +52,13 @@ export declare const ImageGenerationJobSchema: z.ZodObject<{
52
52
  output: z.ZodArray<z.ZodString>;
53
53
  presetId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
54
  modelId: z.ZodString;
55
- attempts: z.ZodArray<z.ZodAny>;
55
+ groupId: z.ZodNullable<z.ZodString>;
56
+ attempts: z.ZodArray<z.ZodObject<{
57
+ order: z.ZodNumber;
58
+ status: z.ZodString;
59
+ error: z.ZodNullable<z.ZodString>;
60
+ timestamp: z.ZodCoercedDate<unknown>;
61
+ }, z.core.$strip>>;
56
62
  userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
57
63
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
64
  isPublished: z.ZodBoolean;
@@ -63,7 +69,7 @@ export declare const ImageGenerationJobSchema: z.ZodObject<{
63
69
  isFavorite: z.ZodBoolean;
64
70
  internalError: z.ZodNullable<z.ZodString>;
65
71
  tokenReservationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
- createdAt: z.ZodDate;
67
- updatedAt: z.ZodDate;
72
+ createdAt: z.ZodCoercedDate<unknown>;
73
+ updatedAt: z.ZodCoercedDate<unknown>;
68
74
  }, z.core.$strip>;
69
75
  export type ImageGenerationJob = z.infer<typeof ImageGenerationJobSchema>;
@@ -28,7 +28,13 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
28
28
  output: zod_1.z.array(zod_1.z.string()),
29
29
  presetId: zod_1.z.string().nullable().optional(),
30
30
  modelId: zod_1.z.string(),
31
- attempts: zod_1.z.array(zod_1.z.any()),
31
+ groupId: zod_1.z.string().nullable(),
32
+ attempts: zod_1.z.array(zod_1.z.object({
33
+ order: zod_1.z.number(),
34
+ status: zod_1.z.string(),
35
+ error: zod_1.z.string().nullable(),
36
+ timestamp: zod_1.z.coerce.date(),
37
+ })),
32
38
  userId: zod_1.z.string().nullable().optional(),
33
39
  unregisteredUserId: zod_1.z.string().nullable().optional(),
34
40
  isPublished: zod_1.z.boolean(),
@@ -39,6 +45,6 @@ exports.ImageGenerationJobSchema = zod_1.z.object({
39
45
  isFavorite: zod_1.z.boolean(),
40
46
  internalError: zod_1.z.string().nullable(),
41
47
  tokenReservationId: zod_1.z.string().nullable().optional(),
42
- createdAt: zod_1.z.date(),
43
- updatedAt: zod_1.z.date(),
48
+ createdAt: zod_1.z.coerce.date(),
49
+ updatedAt: zod_1.z.coerce.date(),
44
50
  });