@purpleschool/gptbot-tools 0.2.51 → 0.2.52

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 (93) hide show
  1. package/ai-proxy/routes/ai-proxy.routes.ts +0 -1
  2. package/build/ai-proxy/routes/ai-proxy.routes.js +0 -1
  3. package/build/diagrams/queries/find-diagrams-job-by-uuid.query.js +5 -2
  4. package/build/image-editor/queries/find-image-editor-job-by-id.query.js +6 -1
  5. package/build/index.js +0 -3
  6. package/build/interior-design/queries/find-interior-design-job-by-id.query.js +6 -1
  7. package/build/music/queries/find-music-job-by-id.query.js +6 -1
  8. package/build/paraphrase/queries/find-paraphrase-job-by-uuid.query.js +6 -1
  9. package/build/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.js +6 -1
  10. package/build/stt/queries/find-stt-job-by-uuid.query.js +6 -1
  11. package/build/tools/enums/tool-content-type.enum.js +0 -1
  12. package/build/tools/enums/tool-type.enum.js +0 -1
  13. package/build/tools/models/global-tools-config.schema.js +0 -2
  14. package/build/tts/queries/find-tts-job-by-id.query.js +6 -1
  15. package/build/video/queries/find-video-job-by-id.query.js +6 -1
  16. package/diagrams/queries/find-diagrams-job-by-uuid.query.ts +4 -2
  17. package/image-editor/queries/find-image-editor-job-by-id.query.ts +5 -1
  18. package/index.ts +0 -3
  19. package/interior-design/queries/find-interior-design-job-by-id.query.ts +5 -1
  20. package/music/queries/find-music-job-by-id.query.ts +5 -1
  21. package/package.json +1 -1
  22. package/paraphrase/queries/find-paraphrase-job-by-uuid.query.ts +5 -1
  23. package/spell-corrector/queries/find-spell-corrector-job-by-uuid.query.ts +5 -1
  24. package/stt/queries/find-stt-job-by-uuid.query.ts +5 -1
  25. package/tools/enums/tool-content-type.enum.ts +0 -1
  26. package/tools/enums/tool-type.enum.ts +0 -1
  27. package/tools/models/global-tools-config.schema.ts +0 -2
  28. package/tts/queries/find-tts-job-by-id.query.ts +5 -1
  29. package/video/queries/find-video-job-by-id.query.ts +5 -1
  30. package/build/photo-sessions/commands/admin/create-photo-session-style.command.js +0 -21
  31. package/build/photo-sessions/commands/admin/delete-photo-session-style.command.js +0 -12
  32. package/build/photo-sessions/commands/admin/index.js +0 -19
  33. package/build/photo-sessions/commands/admin/update-photo-session-style.command.js +0 -28
  34. package/build/photo-sessions/commands/delete-all-photo-sessions-jobs.command.js +0 -15
  35. package/build/photo-sessions/commands/delete-photo-sessions-job-by-uuid.command.js +0 -14
  36. package/build/photo-sessions/commands/get-photo-sessions-price.command.js +0 -30
  37. package/build/photo-sessions/commands/index.js +0 -26
  38. package/build/photo-sessions/commands/photo-sessions.command.js +0 -41
  39. package/build/photo-sessions/commands/retry-photo-sessions-job.command.js +0 -23
  40. package/build/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.js +0 -27
  41. package/build/photo-sessions/commands/update-photo-sessions-job-favorite.command.js +0 -16
  42. package/build/photo-sessions/commands/update-photo-sessions-job-title.command.js +0 -16
  43. package/build/photo-sessions/commands/update-published-status-photo-sessions-jobs.command.js +0 -26
  44. package/build/photo-sessions/enums/index.js +0 -18
  45. package/build/photo-sessions/enums/photo-session-look-type.enum.js +0 -9
  46. package/build/photo-sessions/enums/photo-session-strategy.enum.js +0 -8
  47. package/build/photo-sessions/index.js +0 -21
  48. package/build/photo-sessions/models/index.js +0 -20
  49. package/build/photo-sessions/models/photo-session-config.schema.js +0 -16
  50. package/build/photo-sessions/models/photo-session-job.schema.js +0 -46
  51. package/build/photo-sessions/models/photo-session-model.schema.js +0 -42
  52. package/build/photo-sessions/models/photo-session-style.schema.js +0 -22
  53. package/build/photo-sessions/queries/find-photo-session-style-by-id.query.js +0 -10
  54. package/build/photo-sessions/queries/find-photo-session-styles.query.js +0 -19
  55. package/build/photo-sessions/queries/find-photo-sessions-job-by-id.query.js +0 -10
  56. package/build/photo-sessions/queries/find-photo-sessions-jobs.query.js +0 -28
  57. package/build/photo-sessions/queries/get-photo-sessions-config.query.js +0 -10
  58. package/build/photo-sessions/queries/index.js +0 -21
  59. package/build/photo-sessions/routes/index.js +0 -18
  60. package/build/photo-sessions/routes/photo-sessions.amqp.routes.js +0 -22
  61. package/build/photo-sessions/routes/photo-sessions.http.routes.js +0 -4
  62. package/photo-sessions/commands/admin/create-photo-session-style.command.ts +0 -22
  63. package/photo-sessions/commands/admin/delete-photo-session-style.command.ts +0 -12
  64. package/photo-sessions/commands/admin/index.ts +0 -3
  65. package/photo-sessions/commands/admin/update-photo-session-style.command.ts +0 -34
  66. package/photo-sessions/commands/delete-all-photo-sessions-jobs.command.ts +0 -15
  67. package/photo-sessions/commands/delete-photo-sessions-job-by-uuid.command.ts +0 -14
  68. package/photo-sessions/commands/get-photo-sessions-price.command.ts +0 -32
  69. package/photo-sessions/commands/index.ts +0 -10
  70. package/photo-sessions/commands/photo-sessions.command.ts +0 -41
  71. package/photo-sessions/commands/retry-photo-sessions-job.command.ts +0 -23
  72. package/photo-sessions/commands/set-reaction-to-photo-sessions-job.command.ts +0 -30
  73. package/photo-sessions/commands/update-photo-sessions-job-favorite.command.ts +0 -16
  74. package/photo-sessions/commands/update-photo-sessions-job-title.command.ts +0 -16
  75. package/photo-sessions/commands/update-published-status-photo-sessions-jobs.command.ts +0 -26
  76. package/photo-sessions/enums/index.ts +0 -2
  77. package/photo-sessions/enums/photo-session-look-type.enum.ts +0 -5
  78. package/photo-sessions/enums/photo-session-strategy.enum.ts +0 -4
  79. package/photo-sessions/index.ts +0 -5
  80. package/photo-sessions/models/index.ts +0 -4
  81. package/photo-sessions/models/photo-session-config.schema.ts +0 -17
  82. package/photo-sessions/models/photo-session-job.schema.ts +0 -49
  83. package/photo-sessions/models/photo-session-model.schema.ts +0 -56
  84. package/photo-sessions/models/photo-session-style.schema.ts +0 -25
  85. package/photo-sessions/queries/find-photo-session-style-by-id.query.ts +0 -11
  86. package/photo-sessions/queries/find-photo-session-styles.query.ts +0 -21
  87. package/photo-sessions/queries/find-photo-sessions-job-by-id.query.ts +0 -11
  88. package/photo-sessions/queries/find-photo-sessions-jobs.query.ts +0 -30
  89. package/photo-sessions/queries/get-photo-sessions-config.query.ts +0 -11
  90. package/photo-sessions/queries/index.ts +0 -5
  91. package/photo-sessions/routes/index.ts +0 -2
  92. package/photo-sessions/routes/photo-sessions.amqp.routes.ts +0 -19
  93. package/photo-sessions/routes/photo-sessions.http.routes.ts +0 -1
@@ -1,32 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { AttachedFileSchema } from '../../common';
4
-
5
- export namespace GetPhotoSessionsPriceCommand {
6
- export const RequestSchema = z.object({
7
- modelId: z.string().uuid(),
8
- userId: z.string().uuid().nullable().optional(),
9
- unregisteredUserId: z.string().uuid().nullable().optional(),
10
- prompt: z.string().optional().default(''),
11
- params: z.object({
12
- attachedFiles: z.array(AttachedFileSchema).min(1).max(3),
13
- styleId: z.string().uuid().nullable().optional(),
14
- referenceIds: z.array(z.string().uuid()).optional().default([]),
15
- customStylePrompt: z.string().nullable().optional(),
16
- customStylePhotos: z.array(z.string()).optional().default([]),
17
- clothingPhotos: z.array(z.string()).optional().default([]),
18
- hairstylePhotos: z.array(z.string()).optional().default([]),
19
- accessoriesPhotos: z.array(z.string()).optional().default([]),
20
- }),
21
- userHasActiveSubscriptionOrProduct: z.boolean(),
22
- });
23
- export type Request = z.infer<typeof RequestSchema>;
24
-
25
- export const ResponseDataSchema = z.object({
26
- price: z.number(),
27
- });
28
- export type ResponseData = z.infer<typeof ResponseDataSchema>;
29
-
30
- export const ResponseSchema = ICommandResponseSchema(ResponseDataSchema);
31
- export type Response = z.infer<typeof ResponseSchema>;
32
- }
@@ -1,10 +0,0 @@
1
- export * from './delete-photo-sessions-job-by-uuid.command';
2
- export * from './delete-all-photo-sessions-jobs.command';
3
- export * from './get-photo-sessions-price.command';
4
- export * from './retry-photo-sessions-job.command';
5
- export * from './set-reaction-to-photo-sessions-job.command';
6
- export * from './photo-sessions.command';
7
- export * from './update-photo-sessions-job-title.command';
8
- export * from './update-photo-sessions-job-favorite.command';
9
- export * from './update-published-status-photo-sessions-jobs.command';
10
- export * from './admin';
@@ -1,41 +0,0 @@
1
- import { z } from 'zod';
2
- import { AttachedFileSchema, JOB_SCOPE } from '../../common';
3
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
4
- import { LocaleSchema } from '../../common/models/locale.schema';
5
- import { PhotoSessionJobSchema } from '../models';
6
- import { TOOL_WORKSPACE_ITEM_SLOT } from '../../tool-workspace';
7
- import { TOOL_CONTENT_TYPE } from '../../tools';
8
-
9
- export namespace PhotoSessionsCommand {
10
- export const RequestSchema = z.object({
11
- locale: LocaleSchema,
12
- userId: z.string().uuid().nullable().optional(),
13
- unregisteredUserId: z.string().uuid().nullable().optional(),
14
- scope: z.nativeEnum(JOB_SCOPE).optional().default(JOB_SCOPE.TOOL),
15
- workspaceId: z.string().uuid().nullable().optional(),
16
- workspaceItemId: z.string().uuid().nullable().optional(),
17
- workspaceToolType: z.nativeEnum(TOOL_CONTENT_TYPE).nullable().optional(),
18
- workspaceSlot: z.nativeEnum(TOOL_WORKSPACE_ITEM_SLOT).optional(),
19
- workspaceOrder: z.number().int().min(0).optional(),
20
- prompt: z.string().optional().default(''),
21
- modelId: z.string(),
22
- params: z.object({
23
- attachedFiles: z.array(AttachedFileSchema).min(1).max(3),
24
- styleId: z.string().uuid().nullable().optional(),
25
- referenceIds: z.array(z.string().uuid()).optional().default([]),
26
- customStylePrompt: z.string().nullable().optional(),
27
- customStylePhotos: z.array(z.string()).optional().default([]),
28
- clothingPhotos: z.array(z.string()).max(6).optional().default([]),
29
- hairstylePhotos: z.array(z.string()).max(6).optional().default([]),
30
- accessoriesPhotos: z.array(z.string()).max(6).optional().default([]),
31
- aspectRatio: z.string().optional(),
32
- }),
33
- userHasActiveSubscriptionOrProduct: z.boolean(),
34
- tokenReservationId: z.string().uuid(),
35
- precalculatedPrice: z.number(),
36
- });
37
- export type Request = z.infer<typeof RequestSchema>;
38
-
39
- export const ResponseSchema = ICommandResponseSchema(z.array(PhotoSessionJobSchema));
40
- export type Response = z.infer<typeof ResponseSchema>;
41
- }
@@ -1,23 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobParamsSchema, PhotoSessionJobSchema } from '../models';
4
- import { LocaleSchema } from '../../common';
5
-
6
- export namespace RetryPhotoSessionsJobCommand {
7
- export const RequestSchema = z.object({
8
- locale: LocaleSchema,
9
- uuid: z.string().uuid(),
10
- userId: z.string().uuid().nullable().optional(),
11
- unregisteredUserId: z.string().uuid().nullable().optional(),
12
- userHasActiveSubscriptionOrProduct: z.boolean(),
13
- tokenReservationId: z.string().uuid(),
14
- precalculatedPrice: z.number(),
15
- modelId: z.string().optional(),
16
- prompt: z.string().optional(),
17
- params: PhotoSessionJobParamsSchema.optional(),
18
- });
19
- export type Request = z.infer<typeof RequestSchema>;
20
-
21
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
22
- export type Response = z.infer<typeof ResponseSchema>;
23
- }
@@ -1,30 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobSchema } from '../models';
4
- import { USER_REACTION } from '../../common';
5
-
6
- export namespace SetReactionToPhotoSessionsJobCommand {
7
- export const RequestSchema = z
8
- .object({
9
- userId: z.string().uuid().nullable().optional(),
10
- unregisteredUserId: z.string().uuid().nullable().optional(),
11
- uuid: z.string().uuid(),
12
- reaction: z.nativeEnum(USER_REACTION).nullable(),
13
- dislikeReason: z.string().nullable().default(null),
14
- })
15
- .refine(
16
- (data) => {
17
- if (data.reaction !== USER_REACTION.DISLIKED && data.dislikeReason) {
18
- return false;
19
- }
20
- return true;
21
- },
22
- {
23
- message: 'Dislike reason is not allowed when reaction is not disliked',
24
- },
25
- );
26
- export type Request = z.infer<typeof RequestSchema>;
27
-
28
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
29
- export type Response = z.infer<typeof ResponseSchema>;
30
- }
@@ -1,16 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobSchema } from '../models';
4
-
5
- export namespace UpdatePhotoSessionsJobFavoriteCommand {
6
- export const RequestSchema = z.object({
7
- uuid: z.string().uuid(),
8
- userId: z.string().uuid().nullable().optional(),
9
- unregisteredUserId: z.string().uuid().nullable().optional(),
10
- isFavorite: z.boolean(),
11
- });
12
- export type Request = z.infer<typeof RequestSchema>;
13
-
14
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
15
- export type Response = z.infer<typeof ResponseSchema>;
16
- }
@@ -1,16 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobSchema } from '../models';
4
-
5
- export namespace UpdatePhotoSessionsJobTitleCommand {
6
- export const RequestSchema = z.object({
7
- uuid: z.string().uuid(),
8
- userId: z.string().uuid().nullable().optional(),
9
- unregisteredUserId: z.string().uuid().nullable().optional(),
10
- title: z.string().min(1).max(40),
11
- });
12
- export type Request = z.infer<typeof RequestSchema>;
13
-
14
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
15
- export type Response = z.infer<typeof ResponseSchema>;
16
- }
@@ -1,26 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobSchema } from '../models';
4
-
5
- export namespace UpdatePublishedStatusPhotoSessionsJobsCommand {
6
- export const RequestSchema = z.object({
7
- criteria: z.object({
8
- uuid: z.string().uuid(),
9
- userId: z.string().uuid().nullable().optional(),
10
- unregisteredUserId: z.string().uuid().nullable().optional(),
11
- }),
12
- data: z
13
- .object({
14
- isPublished: z.boolean(),
15
- postId: z.string().nullable().optional(),
16
- })
17
- .refine((data) => (data.isPublished ? !!data.postId : true), {
18
- message: 'Post ID is required when job is published',
19
- path: ['postId'],
20
- }),
21
- });
22
- export type Request = z.infer<typeof RequestSchema>;
23
-
24
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
25
- export type Response = z.infer<typeof ResponseSchema>;
26
- }
@@ -1,2 +0,0 @@
1
- export * from './photo-session-strategy.enum';
2
- export * from './photo-session-look-type.enum';
@@ -1,5 +0,0 @@
1
- export enum PHOTO_SESSION_LOOK_TYPE {
2
- CLOTHING = 'clothing',
3
- HAIRSTYLE = 'hairstyle',
4
- ACCESSORIES = 'accessories',
5
- }
@@ -1,4 +0,0 @@
1
- export enum PHOTO_SESSION_STRATEGY {
2
- NANO_BANANA_PRO_CALLBACK = 'NANO_BANANA_PRO_CALLBACK',
3
- OPENAI_IMAGE_1_GENERATION = 'OPENAI_IMAGE_1_GENERATION',
4
- }
@@ -1,5 +0,0 @@
1
- export * from './commands';
2
- export * from './enums';
3
- export * from './models';
4
- export * from './queries';
5
- export * from './routes';
@@ -1,4 +0,0 @@
1
- export * from './photo-session-config.schema';
2
- export * from './photo-session-job.schema';
3
- export * from './photo-session-model.schema';
4
- export * from './photo-session-style.schema';
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- import { PhotoSessionModelSchema } from './photo-session-model.schema';
3
- import { PhotoSessionStyleSchema } from './photo-session-style.schema';
4
- import { PHOTO_SESSION_LOOK_TYPE } from '../enums';
5
-
6
- export const PhotoSessionLookCategorySchema = z.object({
7
- type: z.nativeEnum(PHOTO_SESSION_LOOK_TYPE),
8
- maxPhotos: z.number(),
9
- });
10
-
11
- export const PhotoSessionConfigSchema = z.object({
12
- models: z.array(PhotoSessionModelSchema),
13
- styles: z.array(PhotoSessionStyleSchema),
14
- looks: z.array(PhotoSessionLookCategorySchema),
15
- });
16
-
17
- export type PhotoSessionConfig = z.infer<typeof PhotoSessionConfigSchema>;
@@ -1,49 +0,0 @@
1
- import { z } from 'zod';
2
- import { JOB_STATUS } from '../../tools';
3
- import { AttachedFileSchema, USER_REACTION } from '../../common';
4
-
5
- export const PhotoSessionJobParamsSchema = z.object({
6
- attachedFiles: z.array(AttachedFileSchema).optional(),
7
- imageUrls: z.array(z.string()).optional(),
8
- styleId: z.string().uuid().nullable().optional(),
9
- referenceId: z.string().uuid().nullable().optional(),
10
- referenceIds: z.array(z.string().uuid()).optional(),
11
- customStylePrompt: z.string().nullable().optional(),
12
- customStylePhotos: z.array(z.string()).optional(),
13
- clothingPhotos: z.array(z.string()).optional(),
14
- hairstylePhotos: z.array(z.string()).optional(),
15
- accessoriesPhotos: z.array(z.string()).optional(),
16
- aspectRatio: z.string().optional(),
17
- userHasActiveSubscriptionOrProduct: z.boolean().optional(),
18
- });
19
-
20
- export type PhotoSessionJobParams = z.infer<typeof PhotoSessionJobParamsSchema>;
21
-
22
- export const PhotoSessionJobSchema = z.object({
23
- uuid: z.string(),
24
- prompt: z.string(),
25
- reaction: z.nativeEnum(USER_REACTION).nullable(),
26
- dislikeReason: z.string().nullable(),
27
- externalId: z.string().nullable(),
28
- title: z.string(),
29
- status: z.nativeEnum(JOB_STATUS),
30
- error: z.string().nullable(),
31
- modelId: z.string(),
32
- price: z.number(),
33
- previewUrl: z.string().nullable(),
34
- params: PhotoSessionJobParamsSchema,
35
- imageUrls: z.array(z.string()).nullable(),
36
- attempts: z.array(z.any()),
37
- userId: z.string().nullable().optional(),
38
- unregisteredUserId: z.string().nullable().optional(),
39
- isPublished: z.boolean(),
40
- postId: z.string().nullable(),
41
- isDeleted: z.boolean(),
42
- isFavorite: z.boolean(),
43
- tokenReservationId: z.string().nullable().optional(),
44
- createdAt: z.date(),
45
- completedAt: z.date().nullable().optional(),
46
- updatedAt: z.date(),
47
- });
48
-
49
- export type PhotoSessionJob = z.infer<typeof PhotoSessionJobSchema>;
@@ -1,56 +0,0 @@
1
- import { z } from 'zod';
2
- import { TOOL_MODEL_STATUS, IconVariantsSchema } from '../../common';
3
- import { PHOTO_SESSION_STRATEGY } from '../enums';
4
-
5
- export const PhotoSessionModelParamsSchema = z.object({
6
- imageAttachment: z.object({
7
- supported: z.boolean(),
8
- maxImages: z.number(),
9
- acceptedTypes: z.array(z.string()),
10
- }),
11
- aspectRatio: z.record(
12
- z.string(),
13
- z.object({
14
- width: z.number(),
15
- height: z.number(),
16
- }),
17
- ),
18
- });
19
-
20
- export type PhotoSessionModelParams = z.infer<typeof PhotoSessionModelParamsSchema>;
21
-
22
- export const PhotoSessionModelPricingRuleConditionSchema = z.object({
23
- withoutSub: z.boolean().optional(),
24
- });
25
- export type PhotoSessionModelPricingRuleCondition = z.infer<
26
- typeof PhotoSessionModelPricingRuleConditionSchema
27
- >;
28
-
29
- export const PhotoSessionModelPricingRulesSchema = z.array(
30
- z.object({
31
- condition: PhotoSessionModelPricingRuleConditionSchema,
32
- value: z.number(),
33
- }),
34
- );
35
- export type PhotoSessionModelPricingRules = z.infer<typeof PhotoSessionModelPricingRulesSchema>;
36
-
37
- export const PhotoSessionModelSchema = z.object({
38
- uuid: z.string(),
39
- title: z.string(),
40
- description: z.string(),
41
- aiModel: z.string(),
42
- isNew: z.boolean(),
43
- tierLabel: z.string(),
44
- pricePerImage: z.number(),
45
- order: z.number(),
46
- status: z.nativeEnum(TOOL_MODEL_STATUS),
47
- icons: IconVariantsSchema,
48
- strategy: z.nativeEnum(PHOTO_SESSION_STRATEGY),
49
- maxInputLength: z.number(),
50
- params: PhotoSessionModelParamsSchema,
51
- pricingRules: PhotoSessionModelPricingRulesSchema,
52
- createdAt: z.date(),
53
- updatedAt: z.date(),
54
- });
55
-
56
- export type PhotoSessionModel = z.infer<typeof PhotoSessionModelSchema>;
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- export const PhotoSessionStyleReferenceSchema = z.object({
4
- uuid: z.string().uuid(),
5
- styleId: z.string().uuid(),
6
- photoUrl: z.string(),
7
- description: z.string().nullable().optional(),
8
- order: z.number().int().min(0).max(5),
9
- createdAt: z.date(),
10
- updatedAt: z.date(),
11
- });
12
-
13
- export type PhotoSessionStyleReference = z.infer<typeof PhotoSessionStyleReferenceSchema>;
14
-
15
- export const PhotoSessionStyleSchema = z.object({
16
- uuid: z.string().uuid(),
17
- code: z.string(),
18
- title: z.string(),
19
- description: z.string().nullable().optional(),
20
- references: z.array(PhotoSessionStyleReferenceSchema),
21
- createdAt: z.date(),
22
- updatedAt: z.date(),
23
- });
24
-
25
- export type PhotoSessionStyle = z.infer<typeof PhotoSessionStyleSchema>;
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionStyleSchema } from '../models';
4
-
5
- export namespace FindPhotoSessionStyleByIdQuery {
6
- export const RequestSchema = PhotoSessionStyleSchema.pick({ uuid: true });
7
- export type Request = z.infer<typeof RequestSchema>;
8
-
9
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionStyleSchema);
10
- export type Response = z.infer<typeof ResponseSchema>;
11
- }
@@ -1,21 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionStyleSchema } from '../models';
4
-
5
- export namespace FindPhotoSessionStylesQuery {
6
- export const RequestSchema = z.object({
7
- limit: z.coerce.number().min(1).max(48).optional().default(24),
8
- offset: z.coerce.number().min(0).optional().default(0),
9
- });
10
- export type Request = z.infer<typeof RequestSchema>;
11
-
12
- export const ResponseSchema = ICommandResponseSchema(
13
- z.object({
14
- data: z.array(PhotoSessionStyleSchema),
15
- page: z.number(),
16
- totalPages: z.number(),
17
- total: z.number(),
18
- }),
19
- );
20
- export type Response = z.infer<typeof ResponseSchema>;
21
- }
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
3
- import { PhotoSessionJobSchema } from '../models';
4
-
5
- export namespace FindPhotoSessionsJobByIdQuery {
6
- export const RequestSchema = PhotoSessionJobSchema.pick({ uuid: true });
7
- export type Request = z.infer<typeof RequestSchema>;
8
-
9
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionJobSchema);
10
- export type Response = z.infer<typeof ResponseSchema>;
11
- }
@@ -1,30 +0,0 @@
1
- import { z } from 'zod';
2
- import { JOB_SCOPE } from '../../common';
3
- import { ICommandResponseSchema } from '../../common/models/command-response.schema';
4
- import { PhotoSessionJobSchema } from '../models';
5
- import { JOB_SORT, JOB_STATUS } from '../../tools';
6
-
7
- export namespace FindPhotoSessionsJobsQuery {
8
- export const RequestSchema = z.object({
9
- userId: z.string().uuid().optional(),
10
- unregisteredUserId: z.string().uuid().optional(),
11
- scope: z.nativeEnum(JOB_SCOPE).optional().default(JOB_SCOPE.TOOL),
12
- title: z.string().optional(),
13
- isFavorite: z.coerce.boolean().optional(),
14
- createdAtSortOrder: z.nativeEnum(JOB_SORT).optional().default(JOB_SORT.DESC),
15
- status: z.nativeEnum(JOB_STATUS).optional(),
16
- limit: z.coerce.number().min(1).optional(),
17
- offset: z.coerce.number().min(0).default(0).optional(),
18
- });
19
- export type Request = z.infer<typeof RequestSchema>;
20
-
21
- export const ResponseSchema = ICommandResponseSchema(
22
- z.object({
23
- data: z.array(PhotoSessionJobSchema),
24
- page: z.number(),
25
- totalPages: z.number(),
26
- total: z.number(),
27
- }),
28
- );
29
- export type Response = z.infer<typeof ResponseSchema>;
30
- }
@@ -1,11 +0,0 @@
1
- import { z } from 'zod';
2
- import { ICommandResponseSchema, LocaleRequestSchema } from '../../common';
3
- import { PhotoSessionConfigSchema } from '../models';
4
-
5
- export namespace GetPhotoSessionsConfigQuery {
6
- export const RequestSchema = LocaleRequestSchema;
7
- export type Request = z.infer<typeof RequestSchema>;
8
-
9
- export const ResponseSchema = ICommandResponseSchema(PhotoSessionConfigSchema);
10
- export type Response = z.infer<typeof ResponseSchema>;
11
- }
@@ -1,5 +0,0 @@
1
- export * from './find-photo-sessions-job-by-id.query';
2
- export * from './find-photo-sessions-jobs.query';
3
- export * from './get-photo-sessions-config.query';
4
- export * from './find-photo-session-styles.query';
5
- export * from './find-photo-session-style-by-id.query';
@@ -1,2 +0,0 @@
1
- export * from './photo-sessions.amqp.routes';
2
- export * from './photo-sessions.http.routes';
@@ -1,19 +0,0 @@
1
- export const PHOTO_SESSIONS_AMQP_ROUTES = {
2
- EXECUTE: 'tools.photo-sessions.execute.rpc',
3
- GET_PRICE: 'tools.photo-sessions.get-price.rpc',
4
- CONFIG: 'tools.photo-sessions.config.rpc',
5
- GET_JOB: 'tools.photo-sessions.jobs.get.rpc',
6
- LIST_JOBS: 'tools.photo-sessions.jobs.list.rpc',
7
- SET_REACTION: 'tools.photo-sessions.jobs.set-reaction.rpc',
8
- UPDATE_TITLE: 'tools.photo-sessions.jobs.update-title.rpc',
9
- UPDATE_FAVORITE: 'tools.photo-sessions.jobs.update-favorite.rpc',
10
- SOFT_DELETE: 'tools.photo-sessions.jobs.soft-delete.rpc',
11
- SOFT_DELETE_ALL: 'tools.photo-sessions.jobs.soft-delete-all.rpc',
12
- RETRY: 'tools.photo-sessions.jobs.retry.rpc',
13
- UPDATE_JOB: 'tools.photo-sessions.jobs.update.rpc',
14
- LIST_STYLES: 'tools.photo-sessions.styles.list.rpc',
15
- GET_STYLE: 'tools.photo-sessions.styles.get.rpc',
16
- CREATE_STYLE: 'tools.photo-sessions.styles.create.rpc',
17
- UPDATE_STYLE: 'tools.photo-sessions.styles.update.rpc',
18
- DELETE_STYLE: 'tools.photo-sessions.styles.delete.rpc',
19
- } as const;
@@ -1 +0,0 @@
1
- export const PHOTO_SESSIONS_CONTROLLER = 'photo-sessions';