@purpleschool/gptbot 0.12.16 → 0.12.17

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.
@@ -26,4 +26,5 @@ export const TEAM_ACCOUNT_ROUTES = {
26
26
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
27
27
  `admin/subscriptions/current/${teamAccountId}`,
28
28
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) => `admin/payments/history/${teamAccountId}`,
29
+ ADMIN_FIND_BY_UUID: (uuid: string) => `admin/find/${uuid}`,
29
30
  } as const;
package/api/routes.ts CHANGED
@@ -211,6 +211,8 @@ export const REST_API = {
211
211
  `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
212
212
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) =>
213
213
  `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
214
+ ADMIN_FIND_BY_UUID: (teamAccountId: string) =>
215
+ `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
214
216
  },
215
217
  FILES: {
216
218
  UPLOAD_FILE: `${ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
@@ -27,4 +27,5 @@ exports.TEAM_ACCOUNT_ROUTES = {
27
27
  ADMIN_GET_INVOICES: 'admin/invoices',
28
28
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `admin/subscriptions/current/${teamAccountId}`,
29
29
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `admin/payments/history/${teamAccountId}`,
30
+ ADMIN_FIND_BY_UUID: (uuid) => `admin/find/${uuid}`,
30
31
  };
@@ -208,6 +208,7 @@ exports.REST_API = {
208
208
  ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
209
209
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
210
210
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
211
+ ADMIN_FIND_BY_UUID: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
211
212
  },
212
213
  FILES: {
213
214
  UPLOAD_FILE: `${exports.ROOT}/${CONTROLLERS.FILE_CONTROLLER}/${CONTROLLERS.FILE_ROUTES.UPLOAD_FILE}`,
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindTeamAccountByUuidCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var FindTeamAccountByUuidCommand;
7
+ (function (FindTeamAccountByUuidCommand) {
8
+ FindTeamAccountByUuidCommand.RequestParamSchema = zod_1.z.object({
9
+ uuid: zod_1.z.string().uuid(),
10
+ });
11
+ FindTeamAccountByUuidCommand.ResponseSchema = zod_1.z.object({
12
+ data: models_1.TeamAccountWithBalanceSchema,
13
+ });
14
+ })(FindTeamAccountByUuidCommand || (exports.FindTeamAccountByUuidCommand = FindTeamAccountByUuidCommand = {}));
@@ -37,6 +37,7 @@ __exportStar(require("./get-team-account-balance.command"), exports);
37
37
  __exportStar(require("./create-manual-team-subscription.command"), exports);
38
38
  __exportStar(require("./create-manual-team-product.command"), exports);
39
39
  __exportStar(require("./find-team-accounts-by-name.command"), exports);
40
+ __exportStar(require("./find-team-account-by-uuid.command"), exports);
40
41
  __exportStar(require("./create-team-account-invoice-payment.command"), exports);
41
42
  __exportStar(require("./get-invoice-for-payment.command"), exports);
42
43
  __exportStar(require("./get-team-account-payment-history.command"), exports);
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { TeamAccountWithBalanceSchema } from '../../models';
3
+
4
+ export namespace FindTeamAccountByUuidCommand {
5
+ export const RequestParamSchema = z.object({
6
+ uuid: z.string().uuid(),
7
+ });
8
+
9
+ export type RequestParam = z.infer<typeof RequestParamSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: TeamAccountWithBalanceSchema,
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -21,6 +21,7 @@ export * from './get-team-account-balance.command';
21
21
  export * from './create-manual-team-subscription.command';
22
22
  export * from './create-manual-team-product.command';
23
23
  export * from './find-team-accounts-by-name.command';
24
+ export * from './find-team-account-by-uuid.command';
24
25
  export * from './create-team-account-invoice-payment.command';
25
26
  export * from './get-invoice-for-payment.command';
26
27
  export * from './get-team-account-payment-history.command';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.16",
3
+ "version": "0.12.17",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",