@purpleschool/gptbot 0.12.36 → 0.12.37

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.
@@ -11,6 +11,7 @@ export const TEAM_ACCOUNT_ROUTES = {
11
11
  ACCEPT_INVITE: 'invite/accept',
12
12
  GET_ME: 'me',
13
13
  GET_MEMBERS: 'members',
14
+ ADMIN_GET_MEMBERS: (teamAccountId: string) => `admin/members/${teamAccountId}`,
14
15
  GET_OPERATIONS: 'operations',
15
16
  GET_CURRENT_PRODUCTS: 'products/current',
16
17
  GET_CURRENT_SUBSCRIPTIONS: 'subscriptions/current',
package/api/routes.ts CHANGED
@@ -201,6 +201,8 @@ export const REST_API = {
201
201
  ACCEPT_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
202
202
  GET_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
203
203
  GET_MEMBERS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_MEMBERS}`,
204
+ ADMIN_GET_MEMBERS: (teamAccountId: string) =>
205
+ `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_MEMBERS(teamAccountId)}`,
204
206
  GET_OPERATIONS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_OPERATIONS}`,
205
207
  GET_CURRENT_PRODUCTS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_PRODUCTS}`,
206
208
  GET_CURRENT_SUBSCRIPTIONS: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_SUBSCRIPTIONS}`,
@@ -13,6 +13,7 @@ exports.TEAM_ACCOUNT_ROUTES = {
13
13
  ACCEPT_INVITE: 'invite/accept',
14
14
  GET_ME: 'me',
15
15
  GET_MEMBERS: 'members',
16
+ ADMIN_GET_MEMBERS: (teamAccountId) => `admin/members/${teamAccountId}`,
16
17
  GET_OPERATIONS: 'operations',
17
18
  GET_CURRENT_PRODUCTS: 'products/current',
18
19
  GET_CURRENT_SUBSCRIPTIONS: 'subscriptions/current',
@@ -198,6 +198,7 @@ exports.REST_API = {
198
198
  ACCEPT_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
199
199
  GET_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
200
200
  GET_MEMBERS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_MEMBERS}`,
201
+ ADMIN_GET_MEMBERS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_MEMBERS(teamAccountId)}`,
201
202
  GET_OPERATIONS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_OPERATIONS}`,
202
203
  GET_CURRENT_PRODUCTS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_PRODUCTS}`,
203
204
  GET_CURRENT_SUBSCRIPTIONS: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_CURRENT_SUBSCRIPTIONS}`,
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindTeamAccountMembersByTeamAccountIdCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var FindTeamAccountMembersByTeamAccountIdCommand;
7
+ (function (FindTeamAccountMembersByTeamAccountIdCommand) {
8
+ FindTeamAccountMembersByTeamAccountIdCommand.RequestParamSchema = zod_1.z.object({
9
+ teamAccountId: zod_1.z.string().uuid(),
10
+ });
11
+ FindTeamAccountMembersByTeamAccountIdCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.array(models_1.TeamAccountMemberListItemSchema),
13
+ });
14
+ })(FindTeamAccountMembersByTeamAccountIdCommand || (exports.FindTeamAccountMembersByTeamAccountIdCommand = FindTeamAccountMembersByTeamAccountIdCommand = {}));
@@ -25,6 +25,7 @@ __exportStar(require("./revoke-team-account-invite.command"), exports);
25
25
  __exportStar(require("./update-team-account-member.command"), exports);
26
26
  __exportStar(require("./get-my-team-account.command"), exports);
27
27
  __exportStar(require("./find-team-account-members.command"), exports);
28
+ __exportStar(require("./find-team-account-members-by-team-account-id.command"), exports);
28
29
  __exportStar(require("./find-team-account-operations.command"), exports);
29
30
  __exportStar(require("./find-team-account-products.command"), exports);
30
31
  __exportStar(require("./find-team-account-subscriptions.command"), exports);
@@ -10,4 +10,7 @@ exports.TeamAccountWithBalanceSchema = team_account_schema_1.TeamAccountSchema.e
10
10
  productBalance: zod_1.z.number(),
11
11
  carriedOverBalance: zod_1.z.number(),
12
12
  }),
13
+ invoicesCount: zod_1.z.number(),
14
+ membersCount: zod_1.z.number(),
15
+ maxSeats: zod_1.z.number(),
13
16
  });
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { TeamAccountMemberListItemSchema } from '../../models';
3
+
4
+ export namespace FindTeamAccountMembersByTeamAccountIdCommand {
5
+ export const RequestParamSchema = z.object({
6
+ teamAccountId: z.string().uuid(),
7
+ });
8
+
9
+ export type RequestParam = z.infer<typeof RequestParamSchema>;
10
+
11
+ export const ResponseSchema = z.object({
12
+ data: z.array(TeamAccountMemberListItemSchema),
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -9,6 +9,7 @@ export * from './revoke-team-account-invite.command';
9
9
  export * from './update-team-account-member.command';
10
10
  export * from './get-my-team-account.command';
11
11
  export * from './find-team-account-members.command';
12
+ export * from './find-team-account-members-by-team-account-id.command';
12
13
  export * from './find-team-account-operations.command';
13
14
  export * from './find-team-account-products.command';
14
15
  export * from './find-team-account-subscriptions.command';
@@ -8,4 +8,7 @@ export const TeamAccountWithBalanceSchema = TeamAccountSchema.extend({
8
8
  productBalance: z.number(),
9
9
  carriedOverBalance: z.number(),
10
10
  }),
11
+ invoicesCount: z.number(),
12
+ membersCount: z.number(),
13
+ maxSeats: z.number(),
11
14
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.36",
3
+ "version": "0.12.37",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",