@purpleschool/gptbot 0.10.0 → 0.10.2

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.
@@ -17,5 +17,5 @@ export const TEAM_ACCOUNT_ROUTES = {
17
17
  GET_BALANCE: 'balance',
18
18
  CREATE_MANUAL_SUBSCRIPTION: 'manual/subscription',
19
19
  CREATE_MANUAL_PRODUCT: 'manual/product',
20
- ADMIN_FIND_BY_NAME: 'admin',
20
+ ADMIN_FIND_BY_NAME: 'admin/find',
21
21
  } as const;
@@ -19,5 +19,5 @@ exports.TEAM_ACCOUNT_ROUTES = {
19
19
  GET_BALANCE: 'balance',
20
20
  CREATE_MANUAL_SUBSCRIPTION: 'manual/subscription',
21
21
  CREATE_MANUAL_PRODUCT: 'manual/product',
22
- ADMIN_FIND_BY_NAME: 'admin',
22
+ ADMIN_FIND_BY_NAME: 'admin/find',
23
23
  };
@@ -6,6 +6,6 @@ const models_1 = require("../../models");
6
6
  var FindTeamAccountMembersCommand;
7
7
  (function (FindTeamAccountMembersCommand) {
8
8
  FindTeamAccountMembersCommand.ResponseSchema = zod_1.z.object({
9
- data: zod_1.z.array(models_1.TeamAccountMemberSchema),
9
+ data: zod_1.z.array(models_1.TeamAccountMemberListItemSchema),
10
10
  });
11
11
  })(FindTeamAccountMembersCommand || (exports.FindTeamAccountMembersCommand = FindTeamAccountMembersCommand = {}));
@@ -4,6 +4,7 @@ exports.EMAIL_SUBJECTS = void 0;
4
4
  exports.EMAIL_SUBJECTS = {
5
5
  WELCOME: 'Добро пожаловать на сервис ruGPT!',
6
6
  EMAIL_VERIFICATION: 'Подтверждение почты',
7
+ TEAM_ACCOUNT_INVITE: 'Приглашение в команду',
7
8
  SUBSCRIPTION_PURCHASE: 'Спасибо за покупку подписки',
8
9
  SUBSCRIPTION_CANCEL: 'Нам жаль, что вы от нас уходите(',
9
10
  PRODUCT_PURCHASE: 'Спасибо за покупку тарифа',
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./team-account.schema"), exports);
18
18
  __exportStar(require("./team-account-member.schema"), exports);
19
+ __exportStar(require("./team-account-member-list-item.schema"), exports);
19
20
  __exportStar(require("./team-account-invite.schema"), exports);
20
21
  __exportStar(require("./team-account-operation.schema"), exports);
21
22
  __exportStar(require("./team-to-subscription.schema"), exports);
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TeamAccountMemberListItemSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const constants_1 = require("../../constants");
6
+ exports.TeamAccountMemberListItemSchema = zod_1.z.object({
7
+ uuid: zod_1.z.string().uuid(),
8
+ userId: zod_1.z.string().uuid().nullable(),
9
+ name: zod_1.z.string().nullable(),
10
+ email: zod_1.z.string().email(),
11
+ role: zod_1.z.nativeEnum(constants_1.TEAM_ACCOUNT_MEMBER_ROLE),
12
+ inviteStatus: zod_1.z.nativeEnum(constants_1.TEAM_ACCOUNT_INVITE_STATUS).nullable(),
13
+ balance: zod_1.z.object({
14
+ remaining: zod_1.z.number().int().nullable(),
15
+ limit: zod_1.z.number().int().nullable(),
16
+ }),
17
+ });
@@ -1,9 +1,9 @@
1
1
  import { z } from 'zod';
2
- import { TeamAccountMemberSchema } from '../../models';
2
+ import { TeamAccountMemberListItemSchema } from '../../models';
3
3
 
4
4
  export namespace FindTeamAccountMembersCommand {
5
5
  export const ResponseSchema = z.object({
6
- data: z.array(TeamAccountMemberSchema),
6
+ data: z.array(TeamAccountMemberListItemSchema),
7
7
  });
8
8
 
9
9
  export type Response = z.infer<typeof ResponseSchema>;
@@ -1,6 +1,7 @@
1
1
  export const EMAIL_SUBJECTS = {
2
2
  WELCOME: 'Добро пожаловать на сервис ruGPT!',
3
3
  EMAIL_VERIFICATION: 'Подтверждение почты',
4
+ TEAM_ACCOUNT_INVITE: 'Приглашение в команду',
4
5
  SUBSCRIPTION_PURCHASE: 'Спасибо за покупку подписки',
5
6
  SUBSCRIPTION_CANCEL: 'Нам жаль, что вы от нас уходите(',
6
7
  PRODUCT_PURCHASE: 'Спасибо за покупку тарифа',
@@ -1,5 +1,6 @@
1
1
  export * from './team-account.schema';
2
2
  export * from './team-account-member.schema';
3
+ export * from './team-account-member-list-item.schema';
3
4
  export * from './team-account-invite.schema';
4
5
  export * from './team-account-operation.schema';
5
6
  export * from './team-to-subscription.schema';
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ import { TEAM_ACCOUNT_INVITE_STATUS, TEAM_ACCOUNT_MEMBER_ROLE } from '../../constants';
3
+
4
+ export const TeamAccountMemberListItemSchema = z.object({
5
+ uuid: z.string().uuid(),
6
+ userId: z.string().uuid().nullable(),
7
+ name: z.string().nullable(),
8
+ email: z.string().email(),
9
+ role: z.nativeEnum(TEAM_ACCOUNT_MEMBER_ROLE),
10
+ inviteStatus: z.nativeEnum(TEAM_ACCOUNT_INVITE_STATUS).nullable(),
11
+ balance: z.object({
12
+ remaining: z.number().int().nullable(),
13
+ limit: z.number().int().nullable(),
14
+ }),
15
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.10.0",
3
+ "version": "0.10.2",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",