@purpleschool/gptbot-tools 0.0.115 → 0.0.116

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.
@@ -1,19 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FindVideoJobByIdQuery = void 0;
4
- const zod_1 = require("zod");
5
4
  const command_response_schema_1 = require("../../common/models/command-response.schema");
6
5
  const video_job_schema_1 = require("../models/video-job.schema");
7
6
  var FindVideoJobByIdQuery;
8
7
  (function (FindVideoJobByIdQuery) {
9
- FindVideoJobByIdQuery.RequestSchema = zod_1.z
10
- .object({
11
- uuid: zod_1.z.string(),
12
- userId: zod_1.z.string().uuid().nullable().optional(),
13
- unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
- })
15
- .refine((data) => data.userId || data.unregisteredUserId, {
16
- message: 'Either userId or unregisteredUserId must be provided',
17
- });
8
+ FindVideoJobByIdQuery.RequestSchema = video_job_schema_1.VideoJobSchema.pick({ uuid: true });
18
9
  FindVideoJobByIdQuery.ResponseSchema = (0, command_response_schema_1.ICommandResponseSchema)(video_job_schema_1.VideoJobSchema);
19
10
  })(FindVideoJobByIdQuery || (exports.FindVideoJobByIdQuery = FindVideoJobByIdQuery = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.115",
3
+ "version": "0.0.116",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -3,15 +3,7 @@ import { ICommandResponseSchema } from '../../common/models/command-response.sch
3
3
  import { VideoJobSchema } from '../models/video-job.schema';
4
4
 
5
5
  export namespace FindVideoJobByIdQuery {
6
- export const RequestSchema = z
7
- .object({
8
- uuid: z.string(),
9
- userId: z.string().uuid().nullable().optional(),
10
- unregisteredUserId: z.string().uuid().nullable().optional(),
11
- })
12
- .refine((data) => data.userId || data.unregisteredUserId, {
13
- message: 'Either userId or unregisteredUserId must be provided',
14
- });
6
+ export const RequestSchema = VideoJobSchema.pick({ uuid: true });
15
7
  export type Request = z.infer<typeof RequestSchema>;
16
8
 
17
9
  export const ResponseSchema = ICommandResponseSchema(VideoJobSchema);