@purpleschool/gptbot 0.9.30 → 0.9.31-stage-2

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.
@@ -2,11 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ArchiveAllCommand = void 0;
4
4
  const zod_1 = require("zod");
5
- const constants_1 = require("../../constants");
6
5
  var ArchiveAllCommand;
7
6
  (function (ArchiveAllCommand) {
8
- ArchiveAllCommand.RequestSchema = zod_1.z.object({
9
- type: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONTENT_TYPE),
10
- });
7
+ ArchiveAllCommand.RequestSchema = zod_1.z.void();
11
8
  ArchiveAllCommand.ResponseSchema = zod_1.z.void();
12
9
  })(ArchiveAllCommand || (exports.ArchiveAllCommand = ArchiveAllCommand = {}));
@@ -10,7 +10,7 @@ var FindChatsCommand;
10
10
  offset: zod_1.z.coerce.number().min(0).default(0),
11
11
  title: zod_1.z.string().optional(),
12
12
  });
13
- const QuerySchema = zod_1.z.intersection(models_1.ChatSchema.pick({ categoryId: true, aIModelId: true }).partial(), models_1.AiModelSchema.pick({ contentType: true }).partial());
13
+ const QuerySchema = models_1.ChatSchema.pick({ categoryId: true, lastUsedAiModelId: true }).partial();
14
14
  FindChatsCommand.RequestQuerySchema = zod_1.z.intersection(QuerySchema, PaginationQuerySchema);
15
15
  FindChatsCommand.ResponseSchema = zod_1.z.object({
16
16
  data: zod_1.z.array(models_1.ChatSchema),
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ai-model-config-selector-type.enum"), exports);
18
- __exportStar(require("./ai-model-content-type.enum"), exports);
19
18
  __exportStar(require("./ai-model-feature.enum"), exports);
20
19
  __exportStar(require("./ai-model-status.enum"), exports);
21
20
  __exportStar(require("./ai-model-strategy.enum"), exports);
@@ -15,7 +15,6 @@ exports.AiModelSchema = zod_1.z.object({
15
15
  order: zod_1.z.number(),
16
16
  canUse: zod_1.z.optional(zod_1.z.boolean()),
17
17
  status: zod_1.z.nativeEnum(constants_1.AI_MODEL_STATUS),
18
- contentType: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONTENT_TYPE),
19
18
  features: zod_1.z.array(zod_1.z.nativeEnum(constants_1.AI_MODEL_FEATURE)),
20
19
  iconVariants: zod_1.z.object({
21
20
  light: zod_1.z.object({
@@ -8,7 +8,7 @@ exports.ChatSchema = zod_1.z.object({
8
8
  userId: zod_1.z.nullable(zod_1.z.string().uuid()),
9
9
  unregisteredUserId: zod_1.z.nullable(zod_1.z.string().uuid()),
10
10
  categoryId: zod_1.z.string().uuid(),
11
- aIModelId: zod_1.z.string().uuid().nullable(),
11
+ lastUsedAiModelId: zod_1.z.string().uuid().nullable(),
12
12
  title: zod_1.z.string(),
13
13
  chatStatus: zod_1.z.enum(Object.values(constants_1.CHAT_STATUS_ENUM)),
14
14
  folderId: zod_1.z.string().nullable(),
@@ -36,7 +36,6 @@ exports.AiModelAccessFeatureSchema = exports.SubscriptionFeatureBaseSchema.exten
36
36
  kind: zod_1.z.literal(constants_1.SUBSCRIPTION_FEATURE_KIND.AI_MODEL),
37
37
  order: zod_1.z.number(),
38
38
  modelId: zod_1.z.string(),
39
- contentType: zod_1.z.nativeEnum(constants_1.AI_MODEL_CONTENT_TYPE),
40
39
  isAvailable: zod_1.z.boolean(),
41
40
  maxInputLength: zod_1.z.number(),
42
41
  });
@@ -1,10 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { AI_MODEL_CONTENT_TYPE } from '../../constants';
3
2
 
4
3
  export namespace ArchiveAllCommand {
5
- export const RequestSchema = z.object({
6
- type: z.nativeEnum(AI_MODEL_CONTENT_TYPE),
7
- });
4
+ export const RequestSchema = z.void();
5
+ export type Request = z.infer<typeof ResponseSchema>;
8
6
 
9
7
  export const ResponseSchema = z.void();
10
8
  export type Response = z.infer<typeof ResponseSchema>;
@@ -1,4 +1,4 @@
1
- import { AiModelSchema, ChatSchema } from '../../models';
1
+ import { ChatSchema } from '../../models';
2
2
  import { z } from 'zod';
3
3
 
4
4
  export namespace FindChatsCommand {
@@ -8,10 +8,7 @@ export namespace FindChatsCommand {
8
8
  title: z.string().optional(),
9
9
  });
10
10
 
11
- const QuerySchema = z.intersection(
12
- ChatSchema.pick({ categoryId: true, aIModelId: true }).partial(),
13
- AiModelSchema.pick({ contentType: true }).partial(),
14
- );
11
+ const QuerySchema = ChatSchema.pick({ categoryId: true, lastUsedAiModelId: true }).partial();
15
12
 
16
13
  export const RequestQuerySchema = z.intersection(QuerySchema, PaginationQuerySchema);
17
14
 
@@ -1,5 +1,4 @@
1
1
  export * from './ai-model-config-selector-type.enum';
2
- export * from './ai-model-content-type.enum';
3
2
  export * from './ai-model-feature.enum';
4
3
  export * from './ai-model-status.enum';
5
4
  export * from './ai-model-strategy.enum';
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AI_MODEL_CONTENT_TYPE, AI_MODEL_FEATURE, AI_MODEL_STATUS } from '../constants';
2
+ import { AI_MODEL_FEATURE, AI_MODEL_STATUS } from '../constants';
3
3
  import { AiModelConfigSchema } from './ai-model-config.schema';
4
4
 
5
5
  export const AiModelSchema = z.object({
@@ -13,7 +13,6 @@ export const AiModelSchema = z.object({
13
13
  order: z.number(),
14
14
  canUse: z.optional(z.boolean()),
15
15
  status: z.nativeEnum(AI_MODEL_STATUS),
16
- contentType: z.nativeEnum(AI_MODEL_CONTENT_TYPE),
17
16
  features: z.array(z.nativeEnum(AI_MODEL_FEATURE)),
18
17
  iconVariants: z.object({
19
18
  light: z.object({
@@ -6,7 +6,7 @@ export const ChatSchema = z.object({
6
6
  userId: z.nullable(z.string().uuid()),
7
7
  unregisteredUserId: z.nullable(z.string().uuid()),
8
8
  categoryId: z.string().uuid(),
9
- aIModelId: z.string().uuid().nullable(),
9
+ lastUsedAiModelId: z.string().uuid().nullable(),
10
10
  title: z.string(),
11
11
  chatStatus: z.enum(Object.values(CHAT_STATUS_ENUM) as [TChatStatusEnum]),
12
12
  folderId: z.string().nullable(),
@@ -1,8 +1,4 @@
1
- import {
2
- AI_MODEL_CONTENT_TYPE,
3
- SUBSCRIPTION_FEATURE_KIND,
4
- SUBSCRIPTION_FEATURE_TYPE,
5
- } from '../constants';
1
+ import { SUBSCRIPTION_FEATURE_KIND, SUBSCRIPTION_FEATURE_TYPE } from '../constants';
6
2
  import { z } from 'zod';
7
3
 
8
4
  export const SubscriptionFeatureBaseSchema = z.object({
@@ -45,7 +41,6 @@ export const AiModelAccessFeatureSchema = SubscriptionFeatureBaseSchema.extend({
45
41
  kind: z.literal(SUBSCRIPTION_FEATURE_KIND.AI_MODEL),
46
42
  order: z.number(),
47
43
  modelId: z.string(),
48
- contentType: z.nativeEnum(AI_MODEL_CONTENT_TYPE),
49
44
  isAvailable: z.boolean(),
50
45
  maxInputLength: z.number(),
51
46
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.9.30",
3
+ "version": "0.9.31-stage-2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AI_MODEL_CONTENT_TYPE = void 0;
4
- var AI_MODEL_CONTENT_TYPE;
5
- (function (AI_MODEL_CONTENT_TYPE) {
6
- AI_MODEL_CONTENT_TYPE["TEXT"] = "TEXT";
7
- AI_MODEL_CONTENT_TYPE["IMAGE"] = "IMAGE";
8
- })(AI_MODEL_CONTENT_TYPE || (exports.AI_MODEL_CONTENT_TYPE = AI_MODEL_CONTENT_TYPE = {}));
@@ -1,4 +0,0 @@
1
- export enum AI_MODEL_CONTENT_TYPE {
2
- TEXT = 'TEXT',
3
- IMAGE = 'IMAGE',
4
- }