@purpleschool/gptbot 0.5.0 → 0.5.1

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.
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DALLE_IMAGE_FORMAT_ARRAY = exports.DALLE_IMAGE_FORMAT_ENUM = void 0;
4
+ exports.DALLE_IMAGE_FORMAT_ENUM = {
5
+ SQUARE: 'SQUARE',
6
+ VERTICAL: 'VERTICAL',
7
+ HORIZONTAL: 'HORIZONTAL',
8
+ };
9
+ exports.DALLE_IMAGE_FORMAT_ARRAY = Object.values(exports.DALLE_IMAGE_FORMAT_ENUM);
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./chat-status.enum"), exports);
18
18
  __exportStar(require("./dalle-image-size.enum"), exports);
19
+ __exportStar(require("./dalle-image-format.enum"), exports);
@@ -10,6 +10,7 @@ exports.MessageSchema = zod_1.z.object({
10
10
  role: zod_1.z.string(),
11
11
  tokenUsage: zod_1.z.number(),
12
12
  userReaction: zod_1.z.nullable(zod_1.z.enum(Object.values(constants_1.USER_REACTION))),
13
+ imageFormat: zod_1.z.nullable(zod_1.z.enum(Object.values(constants_1.DALLE_IMAGE_FORMAT_ENUM))),
13
14
  createdAt: zod_1.z.date(),
14
15
  updatedAt: zod_1.z.date(),
15
16
  });
@@ -0,0 +1,10 @@
1
+ export const DALLE_IMAGE_FORMAT_ENUM = {
2
+ SQUARE: 'SQUARE',
3
+ VERTICAL: 'VERTICAL',
4
+ HORIZONTAL: 'HORIZONTAL',
5
+ } as const;
6
+
7
+ export type TDalleImageFormatEnum =
8
+ (typeof DALLE_IMAGE_FORMAT_ENUM)[keyof typeof DALLE_IMAGE_FORMAT_ENUM];
9
+ export const DALLE_IMAGE_FORMAT_ARRAY: TDalleImageFormatEnum[] =
10
+ Object.values(DALLE_IMAGE_FORMAT_ENUM);
@@ -1,2 +1,3 @@
1
1
  export * from './chat-status.enum';
2
2
  export * from './dalle-image-size.enum';
3
+ export * from './dalle-image-format.enum';
@@ -1,5 +1,10 @@
1
1
  import { z } from 'zod';
2
- import { TUserReactionEnum, USER_REACTION } from '../constants';
2
+ import {
3
+ DALLE_IMAGE_FORMAT_ENUM,
4
+ TDalleImageFormatEnum,
5
+ TUserReactionEnum,
6
+ USER_REACTION,
7
+ } from '../constants';
3
8
 
4
9
  export const MessageSchema = z.object({
5
10
  uuid: z.string().uuid(),
@@ -8,6 +13,9 @@ export const MessageSchema = z.object({
8
13
  role: z.string(),
9
14
  tokenUsage: z.number(),
10
15
  userReaction: z.nullable(z.enum(Object.values(USER_REACTION) as [TUserReactionEnum])),
16
+ imageFormat: z.nullable(
17
+ z.enum(Object.values(DALLE_IMAGE_FORMAT_ENUM) as [TDalleImageFormatEnum]),
18
+ ),
11
19
 
12
20
  createdAt: z.date(),
13
21
  updatedAt: z.date(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {