@purpleschool/gptbot 0.12.34 → 0.12.36

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.
@@ -25,6 +25,8 @@ export const TEAM_ACCOUNT_ROUTES = {
25
25
  ADMIN_GET_INVOICES: 'admin/invoices',
26
26
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
27
27
  `admin/subscriptions/current/${teamAccountId}`,
28
+ ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId: string) =>
29
+ `admin/products/current/${teamAccountId}`,
28
30
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) => `admin/payments/history/${teamAccountId}`,
29
31
  ADMIN_FIND_BY_UUID: (uuid: string) => `admin/find/${uuid}`,
30
32
  } as const;
package/api/routes.ts CHANGED
@@ -213,6 +213,8 @@ export const REST_API = {
213
213
  ADMIN_GET_INVOICES: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
214
214
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId: string) =>
215
215
  `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
216
+ ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId: string) =>
217
+ `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_PRODUCTS(teamAccountId)}`,
216
218
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId: string) =>
217
219
  `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
218
220
  ADMIN_FIND_BY_UUID: (teamAccountId: string) =>
@@ -26,6 +26,7 @@ exports.TEAM_ACCOUNT_ROUTES = {
26
26
  ADMIN_FIND_BY_NAME: 'admin/find',
27
27
  ADMIN_GET_INVOICES: 'admin/invoices',
28
28
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `admin/subscriptions/current/${teamAccountId}`,
29
+ ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId) => `admin/products/current/${teamAccountId}`,
29
30
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `admin/payments/history/${teamAccountId}`,
30
31
  ADMIN_FIND_BY_UUID: (uuid) => `admin/find/${uuid}`,
31
32
  };
@@ -209,6 +209,7 @@ exports.REST_API = {
209
209
  ADMIN_FIND_BY_NAME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_NAME}`,
210
210
  ADMIN_GET_INVOICES: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_INVOICES}`,
211
211
  ADMIN_GET_CURRENT_SUBSCRIPTIONS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_SUBSCRIPTIONS(teamAccountId)}`,
212
+ ADMIN_GET_CURRENT_PRODUCTS: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_CURRENT_PRODUCTS(teamAccountId)}`,
212
213
  ADMIN_GET_PAYMENT_HISTORY: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_GET_PAYMENT_HISTORY(teamAccountId)}`,
213
214
  ADMIN_FIND_BY_UUID: (teamAccountId) => `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ADMIN_FIND_BY_UUID(teamAccountId)}`,
214
215
  },
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FindCurrentTeamAccountProductsByTeamAccountIdCommand = void 0;
4
+ const zod_1 = require("zod");
5
+ const models_1 = require("../../models");
6
+ var FindCurrentTeamAccountProductsByTeamAccountIdCommand;
7
+ (function (FindCurrentTeamAccountProductsByTeamAccountIdCommand) {
8
+ FindCurrentTeamAccountProductsByTeamAccountIdCommand.RequestParamSchema = zod_1.z.object({
9
+ teamAccountId: zod_1.z.string().uuid(),
10
+ });
11
+ FindCurrentTeamAccountProductsByTeamAccountIdCommand.ResponseSchema = zod_1.z.object({
12
+ data: zod_1.z.array(models_1.TeamToProductWithProductSchema),
13
+ });
14
+ })(FindCurrentTeamAccountProductsByTeamAccountIdCommand || (exports.FindCurrentTeamAccountProductsByTeamAccountIdCommand = FindCurrentTeamAccountProductsByTeamAccountIdCommand = {}));
@@ -41,3 +41,4 @@ __exportStar(require("./find-team-account-by-uuid.command"), exports);
41
41
  __exportStar(require("./create-team-account-invoice-payment.command"), exports);
42
42
  __exportStar(require("./get-invoice-for-payment.command"), exports);
43
43
  __exportStar(require("./get-team-account-payment-history.command"), exports);
44
+ __exportStar(require("./find-current-team-account-products-by-team-account-id.command"), exports);
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ import { TeamToProductWithProductSchema } from '../../models';
3
+
4
+ export namespace FindCurrentTeamAccountProductsByTeamAccountIdCommand {
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(TeamToProductWithProductSchema),
13
+ });
14
+
15
+ export type Response = z.infer<typeof ResponseSchema>;
16
+ }
@@ -25,3 +25,4 @@ export * from './find-team-account-by-uuid.command';
25
25
  export * from './create-team-account-invoice-payment.command';
26
26
  export * from './get-invoice-for-payment.command';
27
27
  export * from './get-team-account-payment-history.command';
28
+ export * from './find-current-team-account-products-by-team-account-id.command';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.34",
3
+ "version": "0.12.36",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",