@purpleschool/gptbot 0.12.3-stage-2 → 0.12.4-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,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetUserStatisticsByMonthCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
6
  const constants_1 = require("../../constants");
6
7
  var GetUserStatisticsByMonthCommand;
7
8
  (function (GetUserStatisticsByMonthCommand) {
8
9
  GetUserStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
9
- origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
10
+ callOrigin: zod_1.z
11
+ .nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
12
+ .default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
13
+ .optional(),
10
14
  metric: zod_1.z
11
15
  .nativeEnum(constants_1.STATISTICS_METRIC_TYPE)
12
16
  .default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS)
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetUserStatisticsOverviewCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
6
  const constants_1 = require("../../constants");
6
7
  var GetUserStatisticsOverviewCommand;
7
8
  (function (GetUserStatisticsOverviewCommand) {
@@ -13,7 +14,10 @@ var GetUserStatisticsOverviewCommand;
13
14
  message: 'to must be a valid date string',
14
15
  }),
15
16
  groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
16
- origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
17
+ callOrigin: zod_1.z
18
+ .nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
19
+ .default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
20
+ .optional(),
17
21
  });
18
22
  GetUserStatisticsOverviewCommand.UserStatisticsOverviewResponseSchema = zod_1.z.object({
19
23
  startDate: zod_1.z.string(),
@@ -2,11 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetTeamAccountStatisticsByMonthCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
6
  const constants_1 = require("../../constants");
6
7
  var GetTeamAccountStatisticsByMonthCommand;
7
8
  (function (GetTeamAccountStatisticsByMonthCommand) {
8
9
  GetTeamAccountStatisticsByMonthCommand.RequestSchema = zod_1.z.object({
9
- origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
10
+ callOrigin: zod_1.z
11
+ .nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
12
+ .default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
13
+ .optional(),
10
14
  metric: zod_1.z
11
15
  .nativeEnum(constants_1.STATISTICS_METRIC_TYPE)
12
16
  .default(constants_1.STATISTICS_METRIC_TYPE.REQUESTS)
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GetTeamAccountStatisticsOverviewCommand = void 0;
4
4
  const zod_1 = require("zod");
5
+ const rugpt_lib_common_1 = require("@purpleschool/rugpt-lib-common");
5
6
  const constants_1 = require("../../constants");
6
7
  var GetTeamAccountStatisticsOverviewCommand;
7
8
  (function (GetTeamAccountStatisticsOverviewCommand) {
@@ -13,7 +14,10 @@ var GetTeamAccountStatisticsOverviewCommand;
13
14
  message: 'to must be a valid date string',
14
15
  }),
15
16
  groupBy: zod_1.z.nativeEnum(constants_1.GROUP_BY).default(constants_1.GROUP_BY.DAY),
16
- origin: zod_1.z.nativeEnum(constants_1.JOB_REQUEST_ORIGIN).default(constants_1.JOB_REQUEST_ORIGIN.API).optional(),
17
+ callOrigin: zod_1.z
18
+ .nativeEnum(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN)
19
+ .default(rugpt_lib_common_1.STATISTICS_CALL_ORIGIN.WEB)
20
+ .optional(),
17
21
  memberUserId: zod_1.z.string().uuid().optional(),
18
22
  });
19
23
  GetTeamAccountStatisticsOverviewCommand.TeamAccountStatisticsOverviewItemSchema = zod_1.z.object({
@@ -16,4 +16,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./tool-content-type.enum"), exports);
18
18
  __exportStar(require("./tool-job-status.enum"), exports);
19
- __exportStar(require("./job-request-origin.enum"), exports);
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod';
2
- import {
3
- JOB_REQUEST_ORIGIN,
4
- STATISTICS_METRIC_TYPE,
5
- STATISTICS_REQUEST_TYPE,
6
- } from '../../constants';
2
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
+ import { STATISTICS_METRIC_TYPE, STATISTICS_REQUEST_TYPE } from '../../constants';
7
4
 
8
5
  export namespace GetUserStatisticsByMonthCommand {
9
6
  export const RequestSchema = z.object({
10
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
7
+ callOrigin: z
8
+ .nativeEnum(STATISTICS_CALL_ORIGIN)
9
+ .default(STATISTICS_CALL_ORIGIN.WEB)
10
+ .optional(),
11
11
  metric: z
12
12
  .nativeEnum(STATISTICS_METRIC_TYPE)
13
13
  .default(STATISTICS_METRIC_TYPE.REQUESTS)
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { GROUP_BY, JOB_REQUEST_ORIGIN } from '../../constants';
2
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
+ import { GROUP_BY } from '../../constants';
3
4
 
4
5
  export namespace GetUserStatisticsOverviewCommand {
5
6
  export const RequestSchema = z.object({
@@ -10,7 +11,10 @@ export namespace GetUserStatisticsOverviewCommand {
10
11
  message: 'to must be a valid date string',
11
12
  }),
12
13
  groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
13
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
14
+ callOrigin: z
15
+ .nativeEnum(STATISTICS_CALL_ORIGIN)
16
+ .default(STATISTICS_CALL_ORIGIN.WEB)
17
+ .optional(),
14
18
  });
15
19
 
16
20
  export type Request = z.infer<typeof RequestSchema>;
@@ -1,13 +1,13 @@
1
1
  import { z } from 'zod';
2
- import {
3
- JOB_REQUEST_ORIGIN,
4
- STATISTICS_METRIC_TYPE,
5
- STATISTICS_REQUEST_TYPE,
6
- } from '../../constants';
2
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
+ import { STATISTICS_METRIC_TYPE, STATISTICS_REQUEST_TYPE } from '../../constants';
7
4
 
8
5
  export namespace GetTeamAccountStatisticsByMonthCommand {
9
6
  export const RequestSchema = z.object({
10
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
7
+ callOrigin: z
8
+ .nativeEnum(STATISTICS_CALL_ORIGIN)
9
+ .default(STATISTICS_CALL_ORIGIN.WEB)
10
+ .optional(),
11
11
  metric: z
12
12
  .nativeEnum(STATISTICS_METRIC_TYPE)
13
13
  .default(STATISTICS_METRIC_TYPE.REQUESTS)
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { GROUP_BY, JOB_REQUEST_ORIGIN } from '../../constants';
2
+ import { STATISTICS_CALL_ORIGIN } from '@purpleschool/rugpt-lib-common';
3
+ import { GROUP_BY } from '../../constants';
3
4
 
4
5
  export namespace GetTeamAccountStatisticsOverviewCommand {
5
6
  export const RequestSchema = z.object({
@@ -10,7 +11,10 @@ export namespace GetTeamAccountStatisticsOverviewCommand {
10
11
  message: 'to must be a valid date string',
11
12
  }),
12
13
  groupBy: z.nativeEnum(GROUP_BY).default(GROUP_BY.DAY),
13
- origin: z.nativeEnum(JOB_REQUEST_ORIGIN).default(JOB_REQUEST_ORIGIN.API).optional(),
14
+ callOrigin: z
15
+ .nativeEnum(STATISTICS_CALL_ORIGIN)
16
+ .default(STATISTICS_CALL_ORIGIN.WEB)
17
+ .optional(),
14
18
  memberUserId: z.string().uuid().optional(),
15
19
  });
16
20
 
@@ -1,3 +1,2 @@
1
1
  export * from './tool-content-type.enum';
2
2
  export * from './tool-job-status.enum';
3
- export * from './job-request-origin.enum';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.3-stage-2",
3
+ "version": "0.12.4-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.JOB_REQUEST_ORIGIN = void 0;
4
- var JOB_REQUEST_ORIGIN;
5
- (function (JOB_REQUEST_ORIGIN) {
6
- JOB_REQUEST_ORIGIN["API"] = "api";
7
- JOB_REQUEST_ORIGIN["B2B"] = "b2b";
8
- })(JOB_REQUEST_ORIGIN || (exports.JOB_REQUEST_ORIGIN = JOB_REQUEST_ORIGIN = {}));
@@ -1,4 +0,0 @@
1
- export enum JOB_REQUEST_ORIGIN {
2
- API = 'api',
3
- B2B = 'b2b',
4
- }