@purpleschool/gptbot-tools 0.0.2 → 0.0.4

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.
@@ -9,8 +9,8 @@ var ParaphraseCommand;
9
9
  (function (ParaphraseCommand) {
10
10
  ParaphraseCommand.RequestSchema = zod_1.z.object({
11
11
  jobId: zod_1.z.string().uuid(),
12
- userId: zod_1.z.string().uuid().nullable(),
13
- unregisteredUserId: zod_1.z.string().uuid().nullable(),
12
+ userId: zod_1.z.string().uuid().nullable().optional(),
13
+ unregisteredUserId: zod_1.z.string().uuid().nullable().optional(),
14
14
  prompt: zod_1.z.string(),
15
15
  modelId: zod_1.z.string().uuid(),
16
16
  styleId: zod_1.z.string().uuid(),
@@ -9,7 +9,7 @@ exports.ParaphraseJobSchema = zod_1.z.object({
9
9
  userInput: zod_1.z.string(),
10
10
  aiOutput: zod_1.z.string().nullable(),
11
11
  aiTokenUsage: zod_1.z.number().nullable(),
12
- cost: zod_1.z.number().nullable(),
12
+ price: zod_1.z.number().nullable(),
13
13
  status: zod_1.z.string(),
14
14
  modelId: zod_1.z.string().nullable(),
15
15
  styleId: zod_1.z.string().nullable(),
@@ -6,6 +6,7 @@ exports.ParaphraseModelSchema = zod_1.z.object({
6
6
  uuid: zod_1.z.string(),
7
7
  name: zod_1.z.string(),
8
8
  icon: zod_1.z.string(),
9
+ price: zod_1.z.number(),
9
10
  aiModel: zod_1.z.string(),
10
11
  createdAt: zod_1.z.date(),
11
12
  updatedAt: zod_1.z.date(),
@@ -4,6 +4,7 @@ exports.JOB_STATUS = void 0;
4
4
  var JOB_STATUS;
5
5
  (function (JOB_STATUS) {
6
6
  JOB_STATUS["PEDNING"] = "pending";
7
+ JOB_STATUS["PROCESSING"] = "processing";
7
8
  JOB_STATUS["COMPLETED"] = "completed";
8
9
  JOB_STATUS["FAILED"] = "failed";
9
10
  })(JOB_STATUS || (exports.JOB_STATUS = JOB_STATUS = {}));
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./enums"), exports);
18
+ __exportStar(require("./interfaces"), exports);
18
19
  __exportStar(require("./routes"), exports);
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./tool-job-complete-payload.interface"), exports);
18
+ __exportStar(require("./tool-job-failed-payload.interface"), exports);
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot-tools",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "main": "build/index.js",
5
5
  "types": "build/index.d.ts",
6
6
  "scripts": {
@@ -6,8 +6,8 @@ import { PARAPHRASING_INTENSITY } from '../enums';
6
6
  export namespace ParaphraseCommand {
7
7
  export const RequestSchema = z.object({
8
8
  jobId: z.string().uuid(),
9
- userId: z.string().uuid().nullable(),
10
- unregisteredUserId: z.string().uuid().nullable(),
9
+ userId: z.string().uuid().nullable().optional(),
10
+ unregisteredUserId: z.string().uuid().nullable().optional(),
11
11
  prompt: z.string(),
12
12
  modelId: z.string().uuid(),
13
13
  styleId: z.string().uuid(),
@@ -7,7 +7,7 @@ export const ParaphraseJobSchema = z.object({
7
7
  userInput: z.string(),
8
8
  aiOutput: z.string().nullable(),
9
9
  aiTokenUsage: z.number().nullable(),
10
- cost: z.number().nullable(),
10
+ price: z.number().nullable(),
11
11
  status: z.string(),
12
12
  modelId: z.string().nullable(),
13
13
  styleId: z.string().nullable(),
@@ -4,6 +4,7 @@ export const ParaphraseModelSchema = z.object({
4
4
  uuid: z.string(),
5
5
  name: z.string(),
6
6
  icon: z.string(),
7
+ price: z.number(),
7
8
  aiModel: z.string(),
8
9
  createdAt: z.date(),
9
10
  updatedAt: z.date(),
@@ -1,5 +1,6 @@
1
1
  export enum JOB_STATUS {
2
2
  PEDNING = 'pending',
3
+ PROCESSING = 'processing',
3
4
  COMPLETED = 'completed',
4
5
  FAILED = 'failed',
5
6
  }
package/tools/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from './enums';
2
+ export * from './interfaces';
2
3
  export * from './routes';
@@ -0,0 +1,2 @@
1
+ export * from './tool-job-complete-payload.interface';
2
+ export * from './tool-job-failed-payload.interface';
@@ -0,0 +1,4 @@
1
+ export interface IToolJobCompletePayload {
2
+ jobId: string;
3
+ price: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface IToolJobFailedPayload {
2
+ jobId: string;
3
+ error: string;
4
+ }