@purpleschool/gptbot 0.10.2 → 0.10.3
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 +1 -0
- package/api/routes.ts +1 -0
- package/build/api/controllers/http/team-account.js +1 -0
- package/build/api/routes.js +1 -0
- package/build/commands/team-account/index.js +1 -0
- package/build/commands/team-account/invite-team-account-member.command.js +7 -5
- package/build/commands/team-account/revoke-team-account-invite.command.js +15 -0
- package/commands/team-account/index.ts +1 -0
- package/commands/team-account/invite-team-account-member.command.ts +10 -5
- package/commands/team-account/revoke-team-account-invite.command.ts +17 -0
- package/package.json +1 -1
package/api/routes.ts
CHANGED
|
@@ -188,6 +188,7 @@ export const REST_API = {
|
|
|
188
188
|
UPDATE_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
189
189
|
UPDATE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
190
190
|
INVITE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
191
|
+
REVOKE_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
191
192
|
REMOVE_MEMBER: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
192
193
|
ACCEPT_INVITE: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
|
|
193
194
|
GET_ME: `${ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
|
package/build/api/routes.js
CHANGED
|
@@ -187,6 +187,7 @@ exports.REST_API = {
|
|
|
187
187
|
UPDATE_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_ME}`,
|
|
188
188
|
UPDATE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.UPDATE_MEMBER}`,
|
|
189
189
|
INVITE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.INVITE_MEMBER}`,
|
|
190
|
+
REVOKE_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REVOKE_INVITE}`,
|
|
190
191
|
REMOVE_MEMBER: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.REMOVE_MEMBER}`,
|
|
191
192
|
ACCEPT_INVITE: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.ACCEPT_INVITE}`,
|
|
192
193
|
GET_ME: `${exports.ROOT}/${CONTROLLERS.TEAM_ACCOUNT_CONTROLLER}/${CONTROLLERS.TEAM_ACCOUNT_ROUTES.GET_ME}`,
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./update-team-account.command"), exports);
|
|
|
19
19
|
__exportStar(require("./invite-team-account-member.command"), exports);
|
|
20
20
|
__exportStar(require("./accept-team-account-invite.command"), exports);
|
|
21
21
|
__exportStar(require("./remove-team-account-member.command"), exports);
|
|
22
|
+
__exportStar(require("./revoke-team-account-invite.command"), exports);
|
|
22
23
|
__exportStar(require("./update-team-account-member.command"), exports);
|
|
23
24
|
__exportStar(require("./get-my-team-account.command"), exports);
|
|
24
25
|
__exportStar(require("./find-team-account-members.command"), exports);
|
|
@@ -3,15 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.InviteTeamAccountMemberCommand = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const models_1 = require("../../models");
|
|
6
|
-
const constants_1 = require("../../constants");
|
|
7
6
|
var InviteTeamAccountMemberCommand;
|
|
8
7
|
(function (InviteTeamAccountMemberCommand) {
|
|
9
8
|
InviteTeamAccountMemberCommand.RequestSchema = zod_1.z.object({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
emails: zod_1.z
|
|
10
|
+
.array(zod_1.z.string().email())
|
|
11
|
+
.min(1)
|
|
12
|
+
.refine((emails) => new Set(emails.map((email) => email.toLowerCase())).size === emails.length, {
|
|
13
|
+
message: 'Emails must be unique (case-insensitive)',
|
|
14
|
+
}),
|
|
13
15
|
});
|
|
14
16
|
InviteTeamAccountMemberCommand.ResponseSchema = zod_1.z.object({
|
|
15
|
-
data: models_1.TeamAccountInviteSchema,
|
|
17
|
+
data: zod_1.z.array(models_1.TeamAccountInviteSchema),
|
|
16
18
|
});
|
|
17
19
|
})(InviteTeamAccountMemberCommand || (exports.InviteTeamAccountMemberCommand = InviteTeamAccountMemberCommand = {}));
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RevokeTeamAccountInviteCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
var RevokeTeamAccountInviteCommand;
|
|
6
|
+
(function (RevokeTeamAccountInviteCommand) {
|
|
7
|
+
RevokeTeamAccountInviteCommand.RequestSchema = zod_1.z.object({
|
|
8
|
+
email: zod_1.z.string().email(),
|
|
9
|
+
});
|
|
10
|
+
RevokeTeamAccountInviteCommand.ResponseSchema = zod_1.z.object({
|
|
11
|
+
data: zod_1.z.object({
|
|
12
|
+
revoked: zod_1.z.boolean(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
})(RevokeTeamAccountInviteCommand || (exports.RevokeTeamAccountInviteCommand = RevokeTeamAccountInviteCommand = {}));
|
|
@@ -3,6 +3,7 @@ export * from './update-team-account.command';
|
|
|
3
3
|
export * from './invite-team-account-member.command';
|
|
4
4
|
export * from './accept-team-account-invite.command';
|
|
5
5
|
export * from './remove-team-account-member.command';
|
|
6
|
+
export * from './revoke-team-account-invite.command';
|
|
6
7
|
export * from './update-team-account-member.command';
|
|
7
8
|
export * from './get-my-team-account.command';
|
|
8
9
|
export * from './find-team-account-members.command';
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TeamAccountInviteSchema } from '../../models';
|
|
3
|
-
import { TEAM_ACCOUNT_MEMBER_ROLE } from '../../constants';
|
|
4
3
|
|
|
5
4
|
export namespace InviteTeamAccountMemberCommand {
|
|
6
5
|
export const RequestSchema = z.object({
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
emails: z
|
|
7
|
+
.array(z.string().email())
|
|
8
|
+
.min(1)
|
|
9
|
+
.refine(
|
|
10
|
+
(emails) => new Set(emails.map((email) => email.toLowerCase())).size === emails.length,
|
|
11
|
+
{
|
|
12
|
+
message: 'Emails must be unique (case-insensitive)',
|
|
13
|
+
},
|
|
14
|
+
),
|
|
10
15
|
});
|
|
11
16
|
|
|
12
17
|
export type Request = z.infer<typeof RequestSchema>;
|
|
13
18
|
|
|
14
19
|
export const ResponseSchema = z.object({
|
|
15
|
-
data: TeamAccountInviteSchema,
|
|
20
|
+
data: z.array(TeamAccountInviteSchema),
|
|
16
21
|
});
|
|
17
22
|
|
|
18
23
|
export type Response = z.infer<typeof ResponseSchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
export namespace RevokeTeamAccountInviteCommand {
|
|
4
|
+
export const RequestSchema = z.object({
|
|
5
|
+
email: z.string().email(),
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
9
|
+
|
|
10
|
+
export const ResponseSchema = z.object({
|
|
11
|
+
data: z.object({
|
|
12
|
+
revoked: z.boolean(),
|
|
13
|
+
}),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
17
|
+
}
|