@purpleschool/gptbot 0.12.34 → 0.12.35
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.
- package/api/controllers/http/team-account.ts +2 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/commands/team-account/find-current-team-account-products-by-team-account-id.command.js +14 -0
- package/build/commands/team-account/index.js +1 -0
- package/commands/team-account/find-current-team-account-products-by-team-account-id.command.ts +16 -0
- package/commands/team-account/index.ts +1 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -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
|
};
|
package/build/commands/team-account/find-current-team-account-products-by-team-account-id.command.js
ADDED
|
@@ -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);
|
package/commands/team-account/find-current-team-account-products-by-team-account-id.command.ts
ADDED
|
@@ -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';
|