@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
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PhotoSessionGroupSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const common_1 = require("../../common");
6
+ const enums_1 = require("../enums");
7
+ const photo_session_job_schema_1 = require("./photo-session-job.schema");
8
+ exports.PhotoSessionGroupSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string(),
10
+ title: zod_1.z.string(),
11
+ prompt: zod_1.z.string(),
12
+ status: zod_1.z.nativeEnum(enums_1.PHOTO_SESSION_GROUP_STATUS),
13
+ error: zod_1.z.string().nullable(),
14
+ modelId: zod_1.z.string(),
15
+ price: zod_1.z.number(),
16
+ tokenReservationId: zod_1.z.string().nullable(),
17
+ params: zod_1.z.unknown(),
18
+ attempts: zod_1.z.array(zod_1.z.unknown()),
19
+ scope: zod_1.z.nativeEnum(common_1.JOB_SCOPE),
20
+ userId: zod_1.z.string().nullable(),
21
+ unregisteredUserId: zod_1.z.string().nullable(),
22
+ isDeleted: zod_1.z.boolean(),
23
+ subJobs: zod_1.z.array(photo_session_job_schema_1.PhotoSessionJobSchema),
24
+ createdAt: zod_1.z.date(),
25
+ completedAt: zod_1.z.date().nullable(),
26
+ updatedAt: zod_1.z.date(),
27
+ });
@@ -14,18 +14,65 @@ export declare const PhotoSessionJobParamsSchema: z.ZodObject<{
14
14
  contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
15
15
  }, z.core.$strip>>>;
16
16
  imageUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
17
+ referenceFile: z.ZodOptional<z.ZodObject<{
18
+ uuid: z.ZodString;
19
+ url: z.ZodString;
20
+ name: z.ZodString;
21
+ mimeType: z.ZodString;
22
+ type: z.ZodString;
23
+ size: z.ZodNumber;
24
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
25
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
26
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
27
+ }, z.core.$strip>>;
17
28
  styleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
18
29
  referenceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
30
  referenceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
- customStylePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
21
- customStylePhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
- clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
- hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
- accessoriesPhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
32
+ uuid: z.ZodString;
33
+ url: z.ZodString;
34
+ name: z.ZodString;
35
+ mimeType: z.ZodString;
36
+ type: z.ZodString;
37
+ size: z.ZodNumber;
38
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
39
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
40
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
41
+ }, z.core.$strip>>>;
42
+ hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
+ uuid: z.ZodString;
44
+ url: z.ZodString;
45
+ name: z.ZodString;
46
+ mimeType: z.ZodString;
47
+ type: z.ZodString;
48
+ size: z.ZodNumber;
49
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
50
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
51
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
52
+ }, z.core.$strip>>>;
53
+ accessoriesPhotos: z.ZodOptional<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>>>;
25
64
  aspectRatio: z.ZodOptional<z.ZodString>;
26
65
  userHasActiveSubscriptionOrProduct: z.ZodOptional<z.ZodBoolean>;
27
66
  }, z.core.$strip>;
28
67
  export type PhotoSessionJobParams = z.infer<typeof PhotoSessionJobParamsSchema>;
68
+ export declare const PhotoSessionJobAttemptSchema: z.ZodObject<{
69
+ order: z.ZodNumber;
70
+ attemptId: z.ZodOptional<z.ZodString>;
71
+ status: z.ZodEnum<typeof JOB_STATUS>;
72
+ error: z.ZodNullable<z.ZodString>;
73
+ timestamp: z.ZodDate;
74
+ }, z.core.$strip>;
75
+ export type PhotoSessionJobAttempt = z.infer<typeof PhotoSessionJobAttemptSchema>;
29
76
  export declare const PhotoSessionJobSchema: z.ZodObject<{
30
77
  uuid: z.ZodString;
31
78
  prompt: z.ZodString;
@@ -36,7 +83,7 @@ export declare const PhotoSessionJobSchema: z.ZodObject<{
36
83
  status: z.ZodEnum<typeof JOB_STATUS>;
37
84
  error: z.ZodNullable<z.ZodString>;
38
85
  modelId: z.ZodString;
39
- price: z.ZodNumber;
86
+ groupId: z.ZodString;
40
87
  previewUrl: z.ZodNullable<z.ZodString>;
41
88
  params: z.ZodObject<{
42
89
  attachedFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -51,26 +98,70 @@ export declare const PhotoSessionJobSchema: z.ZodObject<{
51
98
  contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
52
99
  }, z.core.$strip>>>;
53
100
  imageUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
101
+ referenceFile: z.ZodOptional<z.ZodObject<{
102
+ uuid: z.ZodString;
103
+ url: z.ZodString;
104
+ name: z.ZodString;
105
+ mimeType: z.ZodString;
106
+ type: z.ZodString;
107
+ size: z.ZodNumber;
108
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
109
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
110
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
111
+ }, z.core.$strip>>;
54
112
  styleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
113
  referenceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
114
  referenceIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
- customStylePrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
58
- customStylePhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
- clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
60
- hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
61
- accessoriesPhotos: z.ZodOptional<z.ZodArray<z.ZodString>>;
115
+ clothingPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
116
+ uuid: z.ZodString;
117
+ url: z.ZodString;
118
+ name: z.ZodString;
119
+ mimeType: z.ZodString;
120
+ type: z.ZodString;
121
+ size: z.ZodNumber;
122
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
123
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
124
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
125
+ }, z.core.$strip>>>;
126
+ hairstylePhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
127
+ uuid: z.ZodString;
128
+ url: z.ZodString;
129
+ name: z.ZodString;
130
+ mimeType: z.ZodString;
131
+ type: z.ZodString;
132
+ size: z.ZodNumber;
133
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
134
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
135
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
136
+ }, z.core.$strip>>>;
137
+ accessoriesPhotos: z.ZodOptional<z.ZodArray<z.ZodObject<{
138
+ uuid: z.ZodString;
139
+ url: z.ZodString;
140
+ name: z.ZodString;
141
+ mimeType: z.ZodString;
142
+ type: z.ZodString;
143
+ size: z.ZodNumber;
144
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
145
+ content: z.ZodNullable<z.ZodOptional<z.ZodString>>;
146
+ contentLength: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
147
+ }, z.core.$strip>>>;
62
148
  aspectRatio: z.ZodOptional<z.ZodString>;
63
149
  userHasActiveSubscriptionOrProduct: z.ZodOptional<z.ZodBoolean>;
64
150
  }, z.core.$strip>;
65
151
  imageUrls: z.ZodNullable<z.ZodArray<z.ZodString>>;
66
- attempts: z.ZodArray<z.ZodAny>;
152
+ attempts: z.ZodArray<z.ZodObject<{
153
+ order: z.ZodNumber;
154
+ attemptId: z.ZodOptional<z.ZodString>;
155
+ status: z.ZodEnum<typeof JOB_STATUS>;
156
+ error: z.ZodNullable<z.ZodString>;
157
+ timestamp: z.ZodDate;
158
+ }, z.core.$strip>>;
67
159
  userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
68
160
  unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
161
  isPublished: z.ZodBoolean;
70
162
  postId: z.ZodNullable<z.ZodString>;
71
163
  isDeleted: z.ZodBoolean;
72
164
  isFavorite: z.ZodBoolean;
73
- tokenReservationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
165
  createdAt: z.ZodDate;
75
166
  completedAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
76
167
  updatedAt: z.ZodDate;
@@ -1,23 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PhotoSessionJobSchema = exports.PhotoSessionJobParamsSchema = void 0;
3
+ exports.PhotoSessionJobSchema = exports.PhotoSessionJobAttemptSchema = exports.PhotoSessionJobParamsSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const tools_1 = require("../../tools");
6
6
  const common_1 = require("../../common");
7
7
  exports.PhotoSessionJobParamsSchema = zod_1.z.object({
8
- attachedFiles: zod_1.z.array(common_1.AttachedFileSchema).optional(),
8
+ attachedFiles: zod_1.z.array(common_1.AttachedFileSchema).max(3).optional(),
9
9
  imageUrls: zod_1.z.array(zod_1.z.string()).optional(),
10
+ referenceFile: common_1.AttachedFileSchema.optional(),
10
11
  styleId: zod_1.z.string().uuid().nullable().optional(),
11
12
  referenceId: zod_1.z.string().uuid().nullable().optional(),
12
- referenceIds: zod_1.z.array(zod_1.z.string().uuid()).optional(),
13
- customStylePrompt: zod_1.z.string().nullable().optional(),
14
- customStylePhotos: zod_1.z.array(zod_1.z.string()).optional(),
15
- clothingPhotos: zod_1.z.array(zod_1.z.string()).optional(),
16
- hairstylePhotos: zod_1.z.array(zod_1.z.string()).optional(),
17
- accessoriesPhotos: zod_1.z.array(zod_1.z.string()).optional(),
13
+ referenceIds: zod_1.z.array(zod_1.z.string().uuid()).max(6).optional(),
14
+ clothingPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
15
+ hairstylePhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
16
+ accessoriesPhotos: zod_1.z.array(common_1.AttachedFileSchema).max(2).optional(),
18
17
  aspectRatio: zod_1.z.string().optional(),
19
18
  userHasActiveSubscriptionOrProduct: zod_1.z.boolean().optional(),
20
19
  });
20
+ exports.PhotoSessionJobAttemptSchema = zod_1.z.object({
21
+ order: zod_1.z.number(),
22
+ attemptId: zod_1.z.string().optional(),
23
+ status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
24
+ error: zod_1.z.string().nullable(),
25
+ timestamp: zod_1.z.date(),
26
+ });
21
27
  exports.PhotoSessionJobSchema = zod_1.z.object({
22
28
  uuid: zod_1.z.string(),
23
29
  prompt: zod_1.z.string(),
@@ -28,18 +34,17 @@ exports.PhotoSessionJobSchema = zod_1.z.object({
28
34
  status: zod_1.z.nativeEnum(tools_1.JOB_STATUS),
29
35
  error: zod_1.z.string().nullable(),
30
36
  modelId: zod_1.z.string(),
31
- price: zod_1.z.number(),
37
+ groupId: zod_1.z.string(),
32
38
  previewUrl: zod_1.z.string().nullable(),
33
39
  params: exports.PhotoSessionJobParamsSchema,
34
40
  imageUrls: zod_1.z.array(zod_1.z.string()).nullable(),
35
- attempts: zod_1.z.array(zod_1.z.any()),
41
+ attempts: zod_1.z.array(exports.PhotoSessionJobAttemptSchema),
36
42
  userId: zod_1.z.string().nullable().optional(),
37
43
  unregisteredUserId: zod_1.z.string().nullable().optional(),
38
44
  isPublished: zod_1.z.boolean(),
39
45
  postId: zod_1.z.string().nullable(),
40
46
  isDeleted: zod_1.z.boolean(),
41
47
  isFavorite: zod_1.z.boolean(),
42
- tokenReservationId: zod_1.z.string().nullable().optional(),
43
48
  createdAt: zod_1.z.date(),
44
49
  completedAt: zod_1.z.date().nullable().optional(),
45
50
  updatedAt: zod_1.z.date(),
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare namespace FindPhotoSessionStylesQuery {
3
3
  const RequestSchema: z.ZodObject<{
4
- limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
5
- offset: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
4
+ limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
5
+ offset: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
6
6
  }, z.core.$strip>;
7
7
  type Request = z.infer<typeof RequestSchema>;
8
8
  const ResponseSchema: z.ZodObject<{
@@ -7,8 +7,8 @@ const models_1 = require("../models");
7
7
  var FindPhotoSessionStylesQuery;
8
8
  (function (FindPhotoSessionStylesQuery) {
9
9
  FindPhotoSessionStylesQuery.RequestSchema = zod_1.z.object({
10
- limit: zod_1.z.coerce.number().min(1).max(48).optional().default(24),
11
- offset: zod_1.z.coerce.number().min(0).optional().default(0),
10
+ limit: zod_1.z.coerce.number().min(1).max(48).optional(),
11
+ offset: zod_1.z.coerce.number().min(0).optional(),
12
12
  });
13
13
  FindPhotoSessionStylesQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(zod_1.z.object({
14
14
  data: zod_1.z.array(models_1.PhotoSessionStyleSchema),
@@ -2,105 +2,233 @@ import { z } from 'zod';
2
2
  export declare namespace FindPhotoSessionsJobByIdQuery {
3
3
  const RequestSchema: z.ZodObject<{
4
4
  uuid: z.ZodString;
5
+ userId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
6
+ unregisteredUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
5
7
  }, z.core.$strip>;
6
8
  type Request = z.infer<typeof RequestSchema>;
7
9
  const ResponseSchema: z.ZodObject<{
8
10
  isSuccess: z.ZodBoolean;
9
11
  data: z.ZodOptional<z.ZodType<{
10
12
  uuid: string;
11
- prompt: string;
12
- reaction: import("../..").USER_REACTION | null;
13
- dislikeReason: string | null;
14
- externalId: string | null;
15
13
  title: string;
16
- status: import("../..").JOB_STATUS;
14
+ prompt: string;
15
+ status: import("..").PHOTO_SESSION_GROUP_STATUS;
17
16
  error: string | null;
18
17
  modelId: string;
19
18
  price: number;
20
- previewUrl: string | null;
21
- params: {
22
- attachedFiles?: {
23
- uuid: string;
24
- url: string;
25
- name: string;
26
- mimeType: string;
27
- type: string;
28
- size: number;
29
- duration?: number | null | undefined;
30
- content?: string | null | undefined;
31
- contentLength?: number | null | undefined;
32
- }[] | undefined;
33
- imageUrls?: string[] | undefined;
34
- styleId?: string | null | undefined;
35
- referenceId?: string | null | undefined;
36
- referenceIds?: string[] | undefined;
37
- customStylePrompt?: string | null | undefined;
38
- customStylePhotos?: string[] | undefined;
39
- clothingPhotos?: string[] | undefined;
40
- hairstylePhotos?: string[] | undefined;
41
- accessoriesPhotos?: string[] | undefined;
42
- aspectRatio?: string | undefined;
43
- userHasActiveSubscriptionOrProduct?: boolean | undefined;
44
- };
45
- imageUrls: string[] | null;
46
- attempts: any[];
47
- userId?: string | null | undefined;
48
- unregisteredUserId?: string | null | undefined;
49
- isPublished: boolean;
50
- postId: string | null;
19
+ tokenReservationId: string | null;
20
+ params: unknown;
21
+ attempts: unknown[];
22
+ scope: import("../..").JOB_SCOPE;
23
+ userId: string | null;
24
+ unregisteredUserId: string | null;
51
25
  isDeleted: boolean;
52
- isFavorite: boolean;
53
- tokenReservationId?: string | null | undefined;
26
+ subJobs: {
27
+ uuid: string;
28
+ prompt: string;
29
+ reaction: import("../..").USER_REACTION | null;
30
+ dislikeReason: string | null;
31
+ externalId: string | null;
32
+ title: string;
33
+ status: import("../..").JOB_STATUS;
34
+ error: string | null;
35
+ modelId: string;
36
+ groupId: string;
37
+ previewUrl: string | null;
38
+ params: {
39
+ attachedFiles?: {
40
+ uuid: string;
41
+ url: string;
42
+ name: string;
43
+ mimeType: string;
44
+ type: string;
45
+ size: number;
46
+ duration?: number | null | undefined;
47
+ content?: string | null | undefined;
48
+ contentLength?: number | null | undefined;
49
+ }[] | undefined;
50
+ imageUrls?: string[] | undefined;
51
+ referenceFile?: {
52
+ uuid: string;
53
+ url: string;
54
+ name: string;
55
+ mimeType: string;
56
+ type: string;
57
+ size: number;
58
+ duration?: number | null | undefined;
59
+ content?: string | null | undefined;
60
+ contentLength?: number | null | undefined;
61
+ } | undefined;
62
+ styleId?: string | null | undefined;
63
+ referenceId?: string | null | undefined;
64
+ referenceIds?: string[] | undefined;
65
+ clothingPhotos?: {
66
+ uuid: string;
67
+ url: string;
68
+ name: string;
69
+ mimeType: string;
70
+ type: string;
71
+ size: number;
72
+ duration?: number | null | undefined;
73
+ content?: string | null | undefined;
74
+ contentLength?: number | null | undefined;
75
+ }[] | undefined;
76
+ hairstylePhotos?: {
77
+ uuid: string;
78
+ url: string;
79
+ name: string;
80
+ mimeType: string;
81
+ type: string;
82
+ size: number;
83
+ duration?: number | null | undefined;
84
+ content?: string | null | undefined;
85
+ contentLength?: number | null | undefined;
86
+ }[] | undefined;
87
+ accessoriesPhotos?: {
88
+ uuid: string;
89
+ url: string;
90
+ name: string;
91
+ mimeType: string;
92
+ type: string;
93
+ size: number;
94
+ duration?: number | null | undefined;
95
+ content?: string | null | undefined;
96
+ contentLength?: number | null | undefined;
97
+ }[] | undefined;
98
+ aspectRatio?: string | undefined;
99
+ userHasActiveSubscriptionOrProduct?: boolean | undefined;
100
+ };
101
+ imageUrls: string[] | null;
102
+ attempts: {
103
+ order: number;
104
+ attemptId?: string | undefined;
105
+ status: import("../..").JOB_STATUS;
106
+ error: string | null;
107
+ timestamp: Date;
108
+ }[];
109
+ userId?: string | null | undefined;
110
+ unregisteredUserId?: string | null | undefined;
111
+ isPublished: boolean;
112
+ postId: string | null;
113
+ isDeleted: boolean;
114
+ isFavorite: boolean;
115
+ createdAt: Date;
116
+ completedAt?: Date | null | undefined;
117
+ updatedAt: Date;
118
+ }[];
54
119
  createdAt: Date;
55
- completedAt?: Date | null | undefined;
120
+ completedAt: Date | null;
56
121
  updatedAt: Date;
57
122
  }, unknown, z.core.$ZodTypeInternals<{
58
123
  uuid: string;
59
- prompt: string;
60
- reaction: import("../..").USER_REACTION | null;
61
- dislikeReason: string | null;
62
- externalId: string | null;
63
124
  title: string;
64
- status: import("../..").JOB_STATUS;
125
+ prompt: string;
126
+ status: import("..").PHOTO_SESSION_GROUP_STATUS;
65
127
  error: string | null;
66
128
  modelId: string;
67
129
  price: number;
68
- previewUrl: string | null;
69
- params: {
70
- attachedFiles?: {
71
- uuid: string;
72
- url: string;
73
- name: string;
74
- mimeType: string;
75
- type: string;
76
- size: number;
77
- duration?: number | null | undefined;
78
- content?: string | null | undefined;
79
- contentLength?: number | null | undefined;
80
- }[] | undefined;
81
- imageUrls?: string[] | undefined;
82
- styleId?: string | null | undefined;
83
- referenceId?: string | null | undefined;
84
- referenceIds?: string[] | undefined;
85
- customStylePrompt?: string | null | undefined;
86
- customStylePhotos?: string[] | undefined;
87
- clothingPhotos?: string[] | undefined;
88
- hairstylePhotos?: string[] | undefined;
89
- accessoriesPhotos?: string[] | undefined;
90
- aspectRatio?: string | undefined;
91
- userHasActiveSubscriptionOrProduct?: boolean | undefined;
92
- };
93
- imageUrls: string[] | null;
94
- attempts: any[];
95
- userId?: string | null | undefined;
96
- unregisteredUserId?: string | null | undefined;
97
- isPublished: boolean;
98
- postId: string | null;
130
+ tokenReservationId: string | null;
131
+ params: unknown;
132
+ attempts: unknown[];
133
+ scope: import("../..").JOB_SCOPE;
134
+ userId: string | null;
135
+ unregisteredUserId: string | null;
99
136
  isDeleted: boolean;
100
- isFavorite: boolean;
101
- tokenReservationId?: string | null | undefined;
137
+ subJobs: {
138
+ uuid: string;
139
+ prompt: string;
140
+ reaction: import("../..").USER_REACTION | null;
141
+ dislikeReason: string | null;
142
+ externalId: string | null;
143
+ title: string;
144
+ status: import("../..").JOB_STATUS;
145
+ error: string | null;
146
+ modelId: string;
147
+ groupId: string;
148
+ previewUrl: string | null;
149
+ params: {
150
+ attachedFiles?: {
151
+ uuid: string;
152
+ url: string;
153
+ name: string;
154
+ mimeType: string;
155
+ type: string;
156
+ size: number;
157
+ duration?: number | null | undefined;
158
+ content?: string | null | undefined;
159
+ contentLength?: number | null | undefined;
160
+ }[] | undefined;
161
+ imageUrls?: string[] | undefined;
162
+ referenceFile?: {
163
+ uuid: string;
164
+ url: string;
165
+ name: string;
166
+ mimeType: string;
167
+ type: string;
168
+ size: number;
169
+ duration?: number | null | undefined;
170
+ content?: string | null | undefined;
171
+ contentLength?: number | null | undefined;
172
+ } | undefined;
173
+ styleId?: string | null | undefined;
174
+ referenceId?: string | null | undefined;
175
+ referenceIds?: string[] | undefined;
176
+ clothingPhotos?: {
177
+ uuid: string;
178
+ url: string;
179
+ name: string;
180
+ mimeType: string;
181
+ type: string;
182
+ size: number;
183
+ duration?: number | null | undefined;
184
+ content?: string | null | undefined;
185
+ contentLength?: number | null | undefined;
186
+ }[] | undefined;
187
+ hairstylePhotos?: {
188
+ uuid: string;
189
+ url: string;
190
+ name: string;
191
+ mimeType: string;
192
+ type: string;
193
+ size: number;
194
+ duration?: number | null | undefined;
195
+ content?: string | null | undefined;
196
+ contentLength?: number | null | undefined;
197
+ }[] | undefined;
198
+ accessoriesPhotos?: {
199
+ uuid: string;
200
+ url: string;
201
+ name: string;
202
+ mimeType: string;
203
+ type: string;
204
+ size: number;
205
+ duration?: number | null | undefined;
206
+ content?: string | null | undefined;
207
+ contentLength?: number | null | undefined;
208
+ }[] | undefined;
209
+ aspectRatio?: string | undefined;
210
+ userHasActiveSubscriptionOrProduct?: boolean | undefined;
211
+ };
212
+ imageUrls: string[] | null;
213
+ attempts: {
214
+ order: number;
215
+ attemptId?: string | undefined;
216
+ status: import("../..").JOB_STATUS;
217
+ error: string | null;
218
+ timestamp: Date;
219
+ }[];
220
+ userId?: string | null | undefined;
221
+ unregisteredUserId?: string | null | undefined;
222
+ isPublished: boolean;
223
+ postId: string | null;
224
+ isDeleted: boolean;
225
+ isFavorite: boolean;
226
+ createdAt: Date;
227
+ completedAt?: Date | null | undefined;
228
+ updatedAt: Date;
229
+ }[];
102
230
  createdAt: Date;
103
- completedAt?: Date | null | undefined;
231
+ completedAt: Date | null;
104
232
  updatedAt: Date;
105
233
  }, unknown>>>;
106
234
  code: z.ZodOptional<z.ZodString>;
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindPhotoSessionsJobByIdQuery = void 0;
4
+ const zod_1 = require("zod");
4
5
  const command_response_schema_1 = require("../../common/models/command-response.schema");
5
6
  const models_1 = require("../models");
6
7
  var FindPhotoSessionsJobByIdQuery;
7
8
  (function (FindPhotoSessionsJobByIdQuery) {
8
- FindPhotoSessionsJobByIdQuery.RequestSchema = models_1.PhotoSessionJobSchema.pick({ uuid: true });
9
- FindPhotoSessionsJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.PhotoSessionJobSchema);
9
+ FindPhotoSessionsJobByIdQuery.RequestSchema = models_1.PhotoSessionGroupSchema.pick({ uuid: true })
10
+ .extend({
11
+ userId: zod_1.z.string().uuid().nullable().optional(),
12
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
13
+ })
14
+ .refine((data) => Boolean(data.userId) !== Boolean(data.unregisteredUserId), {
15
+ message: 'Exactly one owner identity is required',
16
+ });
17
+ FindPhotoSessionsJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(models_1.PhotoSessionGroupSchema);
10
18
  })(FindPhotoSessionsJobByIdQuery || (exports.FindPhotoSessionsJobByIdQuery = FindPhotoSessionsJobByIdQuery = {}));