@purpleschool/gptbot-tools 0.2.62-stage2 → 0.2.63-stage2

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/photo-sessions/commands/admin/update-photo-session-style.command.d.ts +0 -1
  2. package/build/photo-sessions/commands/admin/update-photo-session-style.command.js +1 -11
  3. package/build/photo-sessions/commands/delete-all-photo-sessions-jobs.command.d.ts +1 -1
  4. package/build/photo-sessions/commands/delete-all-photo-sessions-jobs.command.js +6 -2
  5. package/build/photo-sessions/commands/get-photo-sessions-price.command.d.ts +46 -7
  6. package/build/photo-sessions/commands/get-photo-sessions-price.command.js +6 -7
  7. package/build/photo-sessions/commands/photo-sessions.command.d.ts +253 -95
  8. package/build/photo-sessions/commands/photo-sessions.command.js +14 -17
  9. package/build/photo-sessions/commands/retry-photo-sessions-job.command.d.ts +148 -24
  10. package/build/photo-sessions/commands/retry-photo-sessions-job.command.js +0 -3
  11. package/build/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.d.ts +105 -17
  12. package/build/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.js +1 -1
  13. package/build/photo-sessions/commands/update-photo-sessions-job-favorite.command.d.ts +104 -16
  14. package/build/photo-sessions/commands/update-photo-sessions-job-title.command.d.ts +204 -78
  15. package/build/photo-sessions/commands/update-photo-sessions-job-title.command.js +1 -1
  16. package/build/photo-sessions/commands/update-published-status-photo-sessions-jobs.command.d.ts +104 -16
  17. package/build/photo-sessions/enums/index.d.ts +1 -0
  18. package/build/photo-sessions/enums/index.js +1 -0
  19. package/build/photo-sessions/enums/photo-session-group-status.enum.d.ts +7 -0
  20. package/build/photo-sessions/enums/photo-session-group-status.enum.js +11 -0
  21. package/build/photo-sessions/models/index.d.ts +1 -0
  22. package/build/photo-sessions/models/index.js +1 -0
  23. package/build/photo-sessions/models/photo-session-group.schema.d.ts +116 -0
  24. package/build/photo-sessions/models/photo-session-group.schema.js +27 -0
  25. package/build/photo-sessions/models/photo-session-job.schema.d.ts +104 -13
  26. package/build/photo-sessions/models/photo-session-job.schema.js +16 -11
  27. package/build/photo-sessions/queries/find-photo-session-styles.query.d.ts +2 -2
  28. package/build/photo-sessions/queries/find-photo-session-styles.query.js +2 -2
  29. package/build/photo-sessions/queries/find-photo-sessions-job-by-id.query.d.ts +206 -78
  30. package/build/photo-sessions/queries/find-photo-sessions-job-by-id.query.js +10 -2
  31. package/build/photo-sessions/queries/find-photo-sessions-jobs.query.d.ts +210 -83
  32. package/build/photo-sessions/queries/find-photo-sessions-jobs.query.js +11 -6
  33. package/build/tools/events/tool-job-complete.event.d.ts +1 -0
  34. package/build/tools/events/tool-job-failed.event.d.ts +1 -0
  35. package/build/tools/models/tool-job.schema.d.ts +1 -0
  36. package/build/tools/models/tool-job.schema.js +1 -0
  37. package/package.json +1 -1
@@ -9,7 +9,6 @@ export declare namespace UpdatePhotoSessionStyleCommand {
9
9
  photoUrl: z.ZodString;
10
10
  description: z.ZodOptional<z.ZodString>;
11
11
  order: z.ZodNumber;
12
- uuid: z.ZodOptional<z.ZodString>;
13
12
  }, z.core.$strip>>>;
14
13
  }, z.core.$strip>;
15
14
  type Request = z.infer<typeof RequestSchema>;
@@ -5,16 +5,6 @@ const zod_1 = require("zod");
5
5
  const command_response_schema_1 = require("../../../common/models/command-response.schema");
6
6
  const models_1 = require("../../models");
7
7
  const create_photo_session_style_command_1 = require("./create-photo-session-style.command");
8
- const UpdatePhotoSessionStyleReferenceSchema = create_photo_session_style_command_1.CreatePhotoSessionStyleReferenceSchema.extend({
9
- uuid: zod_1.z.string().uuid().optional(),
10
- }).refine((ref) => {
11
- if (ref.photoUrl === undefined &&
12
- ref.description === undefined &&
13
- ref.order === undefined) {
14
- return false;
15
- }
16
- return true;
17
- }, { message: 'At least one field must be provided for reference update' });
18
8
  var UpdatePhotoSessionStyleCommand;
19
9
  (function (UpdatePhotoSessionStyleCommand) {
20
10
  UpdatePhotoSessionStyleCommand.RequestSchema = zod_1.z.object({
@@ -22,7 +12,7 @@ var UpdatePhotoSessionStyleCommand;
22
12
  code: zod_1.z.string().optional(),
23
13
  title: zod_1.z.string().optional(),
24
14
  description: zod_1.z.string().nullable().optional(),
25
- references: zod_1.z.array(UpdatePhotoSessionStyleReferenceSchema).max(6).optional(),
15
+ references: zod_1.z.array(create_photo_session_style_command_1.CreatePhotoSessionStyleReferenceSchema).max(6).optional(),
26
16
  });
27
17
  UpdatePhotoSessionStyleCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.PhotoSessionStyleSchema);
28
18
  })(UpdatePhotoSessionStyleCommand || (exports.UpdatePhotoSessionStyleCommand = UpdatePhotoSessionStyleCommand = {}));
@@ -4,7 +4,7 @@ export declare namespace DeleteAllPhotoSessionsJobsCommand {
4
4
  const RequestSchema: z.ZodObject<{
5
5
  userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
6
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
- scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
7
+ scope: z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>;
8
8
  }, z.core.$strip>;
9
9
  type Request = z.infer<typeof RequestSchema>;
10
10
  const ResponseSchema: z.ZodObject<{
@@ -6,10 +6,14 @@ const common_1 = require("../../common");
6
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
7
7
  var DeleteAllPhotoSessionsJobsCommand;
8
8
  (function (DeleteAllPhotoSessionsJobsCommand) {
9
- DeleteAllPhotoSessionsJobsCommand.RequestSchema = zod_1.z.object({
9
+ DeleteAllPhotoSessionsJobsCommand.RequestSchema = zod_1.z
10
+ .object({
10
11
  userId: zod_1.z.string().uuid().nullable().optional(),
11
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
12
- scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
13
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).optional(),
14
+ })
15
+ .refine((data) => Boolean(data.userId) !== Boolean(data.unregisteredUserId), {
16
+ message: 'Exactly one owner identity is required',
13
17
  });
14
18
  DeleteAllPhotoSessionsJobsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.boolean());
15
19
  })(DeleteAllPhotoSessionsJobsCommand || (exports.DeleteAllPhotoSessionsJobsCommand = DeleteAllPhotoSessionsJobsCommand = {}));
@@ -4,7 +4,7 @@ export declare namespace GetPhotoSessionsPriceCommand {
4
4
  modelId: z.ZodString;
5
5
  userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
6
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
- prompt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
7
+ prompt: z.ZodOptional<z.ZodString>;
8
8
  params: z.ZodObject<{
9
9
  attachedFiles: z.ZodArray<z.ZodObject<{
10
10
  uuid: z.ZodString;
@@ -18,12 +18,51 @@ export declare namespace GetPhotoSessionsPriceCommand {
18
18
  contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
19
19
  }, z.core.$strip>>;
20
20
  styleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- referenceIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
22
- customStylePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
- customStylePhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
24
- clothingPhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
25
- hairstylePhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
26
- accessoriesPhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
21
+ referenceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ customStylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
23
+ uuid: z.ZodString;
24
+ url: z.ZodString;
25
+ name: z.ZodString;
26
+ mimeType: z.ZodString;
27
+ type: z.ZodString;
28
+ size: z.ZodNumber;
29
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
30
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
31
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
32
+ }, z.core.$strip>>>;
33
+ clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
34
+ uuid: z.ZodString;
35
+ url: z.ZodString;
36
+ name: z.ZodString;
37
+ mimeType: z.ZodString;
38
+ type: z.ZodString;
39
+ size: z.ZodNumber;
40
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
41
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
42
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
43
+ }, z.core.$strip>>>;
44
+ hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
45
+ uuid: z.ZodString;
46
+ url: z.ZodString;
47
+ name: z.ZodString;
48
+ mimeType: z.ZodString;
49
+ type: z.ZodString;
50
+ size: z.ZodNumber;
51
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
52
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
53
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
54
+ }, z.core.$strip>>>;
55
+ accessoriesPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
56
+ uuid: z.ZodString;
57
+ url: z.ZodString;
58
+ name: z.ZodString;
59
+ mimeType: z.ZodString;
60
+ type: z.ZodString;
61
+ size: z.ZodNumber;
62
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
63
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
64
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
65
+ }, z.core.$strip>>>;
27
66
  }, z.core.$strip>;
28
67
  userHasActiveSubscriptionOrProduct: z.ZodBoolean;
29
68
  }, z.core.$strip>;
@@ -10,16 +10,15 @@ var GetPhotoSessionsPriceCommand;
10
10
  modelId: zod_1.z.string().uuid(),
11
11
  userId: zod_1.z.string().uuid().nullable().optional(),
12
12
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
- prompt: zod_1.z.string().optional().default(''),
13
+ prompt: zod_1.z.string().optional(),
14
14
  params: zod_1.z.object({
15
15
  attachedFiles: zod_1.z.array(common_1.AttachedFileSchema).min(1).max(3),
16
16
  styleId: zod_1.z.string().uuid().nullable().optional(),
17
- referenceIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
18
- customStylePrompt: zod_1.z.string().nullable().optional(),
19
- customStylePhotos: zod_1.z.array(zod_1.z.string()).optional().default([]),
20
- clothingPhotos: zod_1.z.array(zod_1.z.string()).optional().default([]),
21
- hairstylePhotos: zod_1.z.array(zod_1.z.string()).optional().default([]),
22
- accessoriesPhotos: zod_1.z.array(zod_1.z.string()).optional().default([]),
17
+ referenceIds: zod_1.z.array(zod_1.z.string().uuid()).max(6).optional(),
18
+ customStylePhotos: zod_1.z.array(common_1.AttachedFileSchema).max(6).optional(),
19
+ clothingPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
20
+ hairstylePhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
21
+ accessoriesPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
23
22
  }),
24
23
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
25
24
  });
@@ -1,19 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  import { JOB_SCOPE } from '../../common';
3
- import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
4
- import { TOOL_CONTENT_TYPE } from '../../tools';
5
3
  export declare namespace PhotoSessionsCommand {
6
4
  const RequestSchema: z.ZodObject<{
7
5
  locale: z.ZodEnum<typeof import("@purpleschool/rugpt-lib-common").LOCALE>;
8
6
  userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
7
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
- scope: z.ZodDefault<z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>>;
11
- workspaceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
- workspaceItemId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- workspaceToolType: z.ZodOptional<z.ZodNullable<z.ZodEnum<typeof TOOL_CONTENT_TYPE>>>;
14
- workspaceSlot: z.ZodOptional<z.ZodEnum<typeof TOOL_WORKSPACE_ITEM_SLOT>>;
15
- workspaceOrder: z.ZodOptional<z.ZodNumber>;
16
- prompt: z.ZodDefault<z.ZodOptional<z.ZodString>>;
8
+ scope: z.ZodOptional<z.ZodEnum<typeof JOB_SCOPE>>;
9
+ prompt: z.ZodOptional<z.ZodString>;
17
10
  modelId: z.ZodString;
18
11
  params: z.ZodObject<{
19
12
  attachedFiles: z.ZodArray<z.ZodObject<{
@@ -28,12 +21,51 @@ export declare namespace PhotoSessionsCommand {
28
21
  contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
29
22
  }, z.core.$strip>>;
30
23
  styleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
- referenceIds: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
32
- customStylePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
- customStylePhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
34
- clothingPhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
35
- hairstylePhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
36
- accessoriesPhotos: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString>>>;
24
+ referenceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ customStylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
26
+ uuid: z.ZodString;
27
+ url: z.ZodString;
28
+ name: z.ZodString;
29
+ mimeType: z.ZodString;
30
+ type: z.ZodString;
31
+ size: z.ZodNumber;
32
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
33
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
34
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
35
+ }, z.core.$strip>>>;
36
+ clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
+ uuid: z.ZodString;
38
+ url: z.ZodString;
39
+ name: z.ZodString;
40
+ mimeType: z.ZodString;
41
+ type: z.ZodString;
42
+ size: z.ZodNumber;
43
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
44
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
45
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
46
+ }, z.core.$strip>>>;
47
+ hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ uuid: z.ZodString;
49
+ url: z.ZodString;
50
+ name: z.ZodString;
51
+ mimeType: z.ZodString;
52
+ type: z.ZodString;
53
+ size: z.ZodNumber;
54
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
55
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
56
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
57
+ }, z.core.$strip>>>;
58
+ accessoriesPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
59
+ uuid: z.ZodString;
60
+ url: z.ZodString;
61
+ name: z.ZodString;
62
+ mimeType: z.ZodString;
63
+ type: z.ZodString;
64
+ size: z.ZodNumber;
65
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
66
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
67
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
68
+ }, z.core.$strip>>>;
37
69
  aspectRatio: z.ZodOptional<z.ZodString>;
38
70
  }, z.core.$strip>;
39
71
  userHasActiveSubscriptionOrProduct: z.ZodBoolean;
@@ -45,101 +77,227 @@ export declare namespace PhotoSessionsCommand {
45
77
  isSuccess: z.ZodBoolean;
46
78
  data: z.ZodOptional<z.ZodType<{
47
79
  uuid: string;
48
- prompt: string;
49
- reaction: import("../..").USER_REACTION | null;
50
- dislikeReason: string | null;
51
- externalId: string | null;
52
80
  title: string;
53
- status: import("../..").JOB_STATUS;
81
+ prompt: string;
82
+ status: import("..").PHOTO_SESSION_GROUP_STATUS;
54
83
  error: string | null;
55
84
  modelId: string;
56
85
  price: number;
57
- previewUrl: string | null;
58
- params: {
59
- attachedFiles?: {
60
- uuid: string;
61
- url: string;
62
- name: string;
63
- mimeType: string;
64
- type: string;
65
- size: number;
66
- duration?: number | null | undefined;
67
- content?: string | null | undefined;
68
- contentLength?: number | null | undefined;
69
- }[] | undefined;
70
- imageUrls?: string[] | undefined;
71
- styleId?: string | null | undefined;
72
- referenceId?: string | null | undefined;
73
- referenceIds?: string[] | undefined;
74
- customStylePrompt?: string | null | undefined;
75
- customStylePhotos?: string[] | undefined;
76
- clothingPhotos?: string[] | undefined;
77
- hairstylePhotos?: string[] | undefined;
78
- accessoriesPhotos?: string[] | undefined;
79
- aspectRatio?: string | undefined;
80
- userHasActiveSubscriptionOrProduct?: boolean | undefined;
81
- };
82
- imageUrls: string[] | null;
83
- attempts: any[];
84
- userId?: string | null | undefined;
85
- unregisteredUserId?: string | null | undefined;
86
- isPublished: boolean;
87
- postId: string | null;
86
+ tokenReservationId: string | null;
87
+ params: unknown;
88
+ attempts: unknown[];
89
+ scope: JOB_SCOPE;
90
+ userId: string | null;
91
+ unregisteredUserId: string | null;
88
92
  isDeleted: boolean;
89
- isFavorite: boolean;
90
- tokenReservationId?: string | null | undefined;
93
+ subJobs: {
94
+ uuid: string;
95
+ prompt: string;
96
+ reaction: import("../..").USER_REACTION | null;
97
+ dislikeReason: string | null;
98
+ externalId: string | null;
99
+ title: string;
100
+ status: import("../..").JOB_STATUS;
101
+ error: string | null;
102
+ modelId: string;
103
+ groupId: string;
104
+ previewUrl: string | null;
105
+ params: {
106
+ attachedFiles?: {
107
+ uuid: string;
108
+ url: string;
109
+ name: string;
110
+ mimeType: string;
111
+ type: string;
112
+ size: number;
113
+ duration?: number | null | undefined;
114
+ content?: string | null | undefined;
115
+ contentLength?: number | null | undefined;
116
+ }[] | undefined;
117
+ imageUrls?: string[] | undefined;
118
+ referenceFile?: {
119
+ uuid: string;
120
+ url: string;
121
+ name: string;
122
+ mimeType: string;
123
+ type: string;
124
+ size: number;
125
+ duration?: number | null | undefined;
126
+ content?: string | null | undefined;
127
+ contentLength?: number | null | undefined;
128
+ } | undefined;
129
+ styleId?: string | null | undefined;
130
+ referenceId?: string | null | undefined;
131
+ referenceIds?: string[] | undefined;
132
+ clothingPhotos?: {
133
+ uuid: string;
134
+ url: string;
135
+ name: string;
136
+ mimeType: string;
137
+ type: string;
138
+ size: number;
139
+ duration?: number | null | undefined;
140
+ content?: string | null | undefined;
141
+ contentLength?: number | null | undefined;
142
+ }[] | undefined;
143
+ hairstylePhotos?: {
144
+ uuid: string;
145
+ url: string;
146
+ name: string;
147
+ mimeType: string;
148
+ type: string;
149
+ size: number;
150
+ duration?: number | null | undefined;
151
+ content?: string | null | undefined;
152
+ contentLength?: number | null | undefined;
153
+ }[] | undefined;
154
+ accessoriesPhotos?: {
155
+ uuid: string;
156
+ url: string;
157
+ name: string;
158
+ mimeType: string;
159
+ type: string;
160
+ size: number;
161
+ duration?: number | null | undefined;
162
+ content?: string | null | undefined;
163
+ contentLength?: number | null | undefined;
164
+ }[] | undefined;
165
+ aspectRatio?: string | undefined;
166
+ userHasActiveSubscriptionOrProduct?: boolean | undefined;
167
+ };
168
+ imageUrls: string[] | null;
169
+ attempts: {
170
+ order: number;
171
+ attemptId?: string | undefined;
172
+ status: import("../..").JOB_STATUS;
173
+ error: string | null;
174
+ timestamp: Date;
175
+ }[];
176
+ userId?: string | null | undefined;
177
+ unregisteredUserId?: string | null | undefined;
178
+ isPublished: boolean;
179
+ postId: string | null;
180
+ isDeleted: boolean;
181
+ isFavorite: boolean;
182
+ createdAt: Date;
183
+ completedAt?: Date | null | undefined;
184
+ updatedAt: Date;
185
+ }[];
91
186
  createdAt: Date;
92
- completedAt?: Date | null | undefined;
187
+ completedAt: Date | null;
93
188
  updatedAt: Date;
94
- }[], unknown, z.core.$ZodTypeInternals<{
189
+ }, unknown, z.core.$ZodTypeInternals<{
95
190
  uuid: string;
96
- prompt: string;
97
- reaction: import("../..").USER_REACTION | null;
98
- dislikeReason: string | null;
99
- externalId: string | null;
100
191
  title: string;
101
- status: import("../..").JOB_STATUS;
192
+ prompt: string;
193
+ status: import("..").PHOTO_SESSION_GROUP_STATUS;
102
194
  error: string | null;
103
195
  modelId: string;
104
196
  price: number;
105
- previewUrl: string | null;
106
- params: {
107
- attachedFiles?: {
108
- uuid: string;
109
- url: string;
110
- name: string;
111
- mimeType: string;
112
- type: string;
113
- size: number;
114
- duration?: number | null | undefined;
115
- content?: string | null | undefined;
116
- contentLength?: number | null | undefined;
117
- }[] | undefined;
118
- imageUrls?: string[] | undefined;
119
- styleId?: string | null | undefined;
120
- referenceId?: string | null | undefined;
121
- referenceIds?: string[] | undefined;
122
- customStylePrompt?: string | null | undefined;
123
- customStylePhotos?: string[] | undefined;
124
- clothingPhotos?: string[] | undefined;
125
- hairstylePhotos?: string[] | undefined;
126
- accessoriesPhotos?: string[] | undefined;
127
- aspectRatio?: string | undefined;
128
- userHasActiveSubscriptionOrProduct?: boolean | undefined;
129
- };
130
- imageUrls: string[] | null;
131
- attempts: any[];
132
- userId?: string | null | undefined;
133
- unregisteredUserId?: string | null | undefined;
134
- isPublished: boolean;
135
- postId: string | null;
197
+ tokenReservationId: string | null;
198
+ params: unknown;
199
+ attempts: unknown[];
200
+ scope: JOB_SCOPE;
201
+ userId: string | null;
202
+ unregisteredUserId: string | null;
136
203
  isDeleted: boolean;
137
- isFavorite: boolean;
138
- tokenReservationId?: string | null | undefined;
204
+ subJobs: {
205
+ uuid: string;
206
+ prompt: string;
207
+ reaction: import("../..").USER_REACTION | null;
208
+ dislikeReason: string | null;
209
+ externalId: string | null;
210
+ title: string;
211
+ status: import("../..").JOB_STATUS;
212
+ error: string | null;
213
+ modelId: string;
214
+ groupId: string;
215
+ previewUrl: string | null;
216
+ params: {
217
+ attachedFiles?: {
218
+ uuid: string;
219
+ url: string;
220
+ name: string;
221
+ mimeType: string;
222
+ type: string;
223
+ size: number;
224
+ duration?: number | null | undefined;
225
+ content?: string | null | undefined;
226
+ contentLength?: number | null | undefined;
227
+ }[] | undefined;
228
+ imageUrls?: string[] | undefined;
229
+ referenceFile?: {
230
+ uuid: string;
231
+ url: string;
232
+ name: string;
233
+ mimeType: string;
234
+ type: string;
235
+ size: number;
236
+ duration?: number | null | undefined;
237
+ content?: string | null | undefined;
238
+ contentLength?: number | null | undefined;
239
+ } | undefined;
240
+ styleId?: string | null | undefined;
241
+ referenceId?: string | null | undefined;
242
+ referenceIds?: string[] | undefined;
243
+ clothingPhotos?: {
244
+ uuid: string;
245
+ url: string;
246
+ name: string;
247
+ mimeType: string;
248
+ type: string;
249
+ size: number;
250
+ duration?: number | null | undefined;
251
+ content?: string | null | undefined;
252
+ contentLength?: number | null | undefined;
253
+ }[] | undefined;
254
+ hairstylePhotos?: {
255
+ uuid: string;
256
+ url: string;
257
+ name: string;
258
+ mimeType: string;
259
+ type: string;
260
+ size: number;
261
+ duration?: number | null | undefined;
262
+ content?: string | null | undefined;
263
+ contentLength?: number | null | undefined;
264
+ }[] | undefined;
265
+ accessoriesPhotos?: {
266
+ uuid: string;
267
+ url: string;
268
+ name: string;
269
+ mimeType: string;
270
+ type: string;
271
+ size: number;
272
+ duration?: number | null | undefined;
273
+ content?: string | null | undefined;
274
+ contentLength?: number | null | undefined;
275
+ }[] | undefined;
276
+ aspectRatio?: string | undefined;
277
+ userHasActiveSubscriptionOrProduct?: boolean | undefined;
278
+ };
279
+ imageUrls: string[] | null;
280
+ attempts: {
281
+ order: number;
282
+ attemptId?: string | undefined;
283
+ status: import("../..").JOB_STATUS;
284
+ error: string | null;
285
+ timestamp: Date;
286
+ }[];
287
+ userId?: string | null | undefined;
288
+ unregisteredUserId?: string | null | undefined;
289
+ isPublished: boolean;
290
+ postId: string | null;
291
+ isDeleted: boolean;
292
+ isFavorite: boolean;
293
+ createdAt: Date;
294
+ completedAt?: Date | null | undefined;
295
+ updatedAt: Date;
296
+ }[];
139
297
  createdAt: Date;
140
- completedAt?: Date | null | undefined;
298
+ completedAt: Date | null;
141
299
  updatedAt: Date;
142
- }[], unknown>>>;
300
+ }, unknown>>>;
143
301
  code: z.ZodOptional<z.ZodString>;
144
302
  message: z.ZodOptional<z.ZodString>;
145
303
  }, z.core.$strip>;
@@ -6,36 +6,33 @@ const common_1 = require("../../common");
6
6
  const command_response_schema_1 = require("../../common/models/command-response.schema");
7
7
  const locale_schema_1 = require("../../common/models/locale.schema");
8
8
  const models_1 = require("../models");
9
- const tool_workspace_1 = require("../../tool-workspace");
10
- const tools_1 = require("../../tools");
11
9
  var PhotoSessionsCommand;
12
10
  (function (PhotoSessionsCommand) {
13
- PhotoSessionsCommand.RequestSchema = zod_1.z.object({
11
+ PhotoSessionsCommand.RequestSchema = zod_1.z
12
+ .object({
14
13
  locale: locale_schema_1.LocaleSchema,
15
14
  userId: zod_1.z.string().uuid().nullable().optional(),
16
15
  unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
17
- scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE).optional().default(common_1.JOB_SCOPE.TOOL),
18
- workspaceId: zod_1.z.string().uuid().nullable().optional(),
19
- workspaceItemId: zod_1.z.string().uuid().nullable().optional(),
20
- workspaceToolType: zod_1.z.nativeEnum(tools_1.TOOL_CONTENT_TYPE).nullable().optional(),
21
- workspaceSlot: zod_1.z.nativeEnum(tool_workspace_1.TOOL_WORKSPACE_ITEM_SLOT).optional(),
22
- workspaceOrder: zod_1.z.number().int().min(0).optional(),
23
- prompt: zod_1.z.string().optional().default(''),
16
+ scope: zod_1.z.enum(common_1.JOB_SCOPE).optional(),
17
+ prompt: zod_1.z.string().optional(),
24
18
  modelId: zod_1.z.string(),
25
19
  params: zod_1.z.object({
26
20
  attachedFiles: zod_1.z.array(common_1.AttachedFileSchema).min(1).max(3),
27
21
  styleId: zod_1.z.string().uuid().nullable().optional(),
28
- referenceIds: zod_1.z.array(zod_1.z.string().uuid()).optional().default([]),
29
- customStylePrompt: zod_1.z.string().nullable().optional(),
30
- customStylePhotos: zod_1.z.array(zod_1.z.string()).optional().default([]),
31
- clothingPhotos: zod_1.z.array(zod_1.z.string()).max(6).optional().default([]),
32
- hairstylePhotos: zod_1.z.array(zod_1.z.string()).max(6).optional().default([]),
33
- accessoriesPhotos: zod_1.z.array(zod_1.z.string()).max(6).optional().default([]),
22
+ referenceIds: zod_1.z.array(zod_1.z.string().uuid()).max(6).optional(),
23
+ customStylePhotos: zod_1.z.array(common_1.AttachedFileSchema).max(6).optional(),
24
+ clothingPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
25
+ hairstylePhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
26
+ accessoriesPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
34
27
  aspectRatio: zod_1.z.string().optional(),
35
28
  }),
36
29
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean(),
37
30
  tokenReservationId: zod_1.z.string().uuid(),
38
31
  precalculatedPrice: zod_1.z.number(),
32
+ })
33
+ .refine((value) => Boolean(value.userId) !== Boolean(value.unregisteredUserId), {
34
+ message: 'Exactly one owner identity is required',
35
+ path: ['userId'],
39
36
  });
40
- PhotoSessionsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.array(models_1.PhotoSessionJobSchema));
37
+ PhotoSessionsCommand.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.PhotoSessionGroupSchema);
41
38
  })(PhotoSessionsCommand || (exports.PhotoSessionsCommand = PhotoSessionsCommand = {}));