@purpleschool/gptbot 0.13.9 → 0.13.10

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.
@@ -3,6 +3,7 @@ export const B2B_CONTROLLER = 'private/b2b' as const;
3
3
  export const B2B_ROUTES = {
4
4
  GET_API_TOKENS: 'tokens',
5
5
  UPDATE_API_TOKEN: (uuid: string) => `tokens/${uuid}`,
6
+ DELETE_API_TOKEN: (uuid: string) => `tokens/${uuid}`,
6
7
  CREATE_API_TOKEN: 'create/token',
7
8
  SEND_TEXT_REQUEST: 'completions',
8
9
  SEND_IMAGE_REQUEST: 'image/generation',
package/api/routes.ts CHANGED
@@ -1250,6 +1250,8 @@ export const REST_API = {
1250
1250
  GET_API_TOKENS: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.GET_API_TOKENS}`,
1251
1251
  UPDATE_API_TOKEN: (uuid: string) =>
1252
1252
  `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.UPDATE_API_TOKEN(uuid)}`,
1253
+ DELETE_API_TOKEN: (uuid: string) =>
1254
+ `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.DELETE_API_TOKEN(uuid)}`,
1253
1255
  SEND_TEXT_REQUEST: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_TEXT_REQUEST}`,
1254
1256
  SEND_IMAGE_REQUEST: `${ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_IMAGE_REQUEST}`,
1255
1257
  GET_B2B_IMAGE_JOB: (uuid: string) =>
@@ -5,6 +5,7 @@ exports.B2B_CONTROLLER = 'private/b2b';
5
5
  exports.B2B_ROUTES = {
6
6
  GET_API_TOKENS: 'tokens',
7
7
  UPDATE_API_TOKEN: (uuid) => `tokens/${uuid}`,
8
+ DELETE_API_TOKEN: (uuid) => `tokens/${uuid}`,
8
9
  CREATE_API_TOKEN: 'create/token',
9
10
  SEND_TEXT_REQUEST: 'completions',
10
11
  SEND_IMAGE_REQUEST: 'image/generation',
@@ -922,6 +922,7 @@ exports.REST_API = {
922
922
  CREATE_API_TOKEN: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.CREATE_API_TOKEN}`,
923
923
  GET_API_TOKENS: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.GET_API_TOKENS}`,
924
924
  UPDATE_API_TOKEN: (uuid) => `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.UPDATE_API_TOKEN(uuid)}`,
925
+ DELETE_API_TOKEN: (uuid) => `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.DELETE_API_TOKEN(uuid)}`,
925
926
  SEND_TEXT_REQUEST: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_TEXT_REQUEST}`,
926
927
  SEND_IMAGE_REQUEST: `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.SEND_IMAGE_REQUEST}`,
927
928
  GET_B2B_IMAGE_JOB: (uuid) => `${exports.ROOT}/${CONTROLLERS.B2B_CONTROLLER}/${CONTROLLERS.B2B_ROUTES.GET_B2B_IMAGE_JOB(uuid)}`,
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeleteApiKeyCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ var DeleteApiKeyCommand;
6
+ (function (DeleteApiKeyCommand) {
7
+ DeleteApiKeyCommand.RequestParamsSchema = zod_1.z.object({
8
+ uuid: zod_1.z.string().uuid(),
9
+ });
10
+ DeleteApiKeyCommand.ResponseSchema = zod_1.z.object({
11
+ data: zod_1.z.object({
12
+ isSuccess: zod_1.z.boolean(),
13
+ }),
14
+ });
15
+ })(DeleteApiKeyCommand || (exports.DeleteApiKeyCommand = DeleteApiKeyCommand = {}));
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./create-api-key.command"), exports);
18
+ __exportStar(require("./delete-api-key.command"), exports);
18
19
  __exportStar(require("./get-api-key.command"), exports);
19
20
  __exportStar(require("./update-api-key.command"), exports);
20
21
  __exportStar(require("./refresh-api-key.command"), exports);
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+
3
+ export namespace DeleteApiKeyCommand {
4
+ export const RequestParamsSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ });
7
+
8
+ export const ResponseSchema = z.object({
9
+ data: z.object({
10
+ isSuccess: z.boolean(),
11
+ }),
12
+ });
13
+
14
+ export type RequestParams = z.infer<typeof RequestParamsSchema>;
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -1,4 +1,5 @@
1
1
  export * from './create-api-key.command';
2
+ export * from './delete-api-key.command';
2
3
  export * from './get-api-key.command';
3
4
  export * from './update-api-key.command';
4
5
  export * from './refresh-api-key.command';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.13.9",
3
+ "version": "0.13.10",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",