@common_ch/common 1.0.332 → 1.0.336
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/build/events/app/feedback/feedback-create-event.d.ts +3 -2
- package/build/events/app/message/message-summary-messageId-event.d.ts +2 -1
- package/build/events/app/message/message-summary-new-chat-event.d.ts +2 -1
- package/build/events/app/message/use-message-by-user-event.d.ts +3 -2
- package/build/events/app/rate/rate-created-event.d.ts +4 -3
- package/build/events/app/ticket/ticket-created-event.d.ts +3 -2
- package/build/events/app/ticket/ticket-done-by-user.d.ts +2 -1
- package/build/events/app/ticket/ticket-response-by-user.d.ts +2 -1
- package/build/events/app/transaction/create-transaction.d.ts +4 -3
- package/build/events/app/transaction/transaction-successful.d.ts +3 -2
- package/build/events/app/user/user-update-all-version-event.d.ts +3 -2
- package/build/events/app/user/user-update-wallet-event.d.ts +2 -1
- package/build/events/auth/admin/admin-created-event.d.ts +2 -1
- package/build/events/auth/user/log-user-login-event.d.ts +3 -2
- package/build/events/auth/user/user-created-event.d.ts +2 -1
- package/build/events/auth/user/user-update-in-auth.d.ts +2 -1
- package/build/events/auth/user/user-updated-password-event.d.ts +2 -1
- package/build/events/portal/admin/admin-change-status-event.d.ts +2 -1
- package/build/events/portal/admin/admin-updated-event.d.ts +2 -1
- package/build/events/portal/admin/admin-updated-password-event.d.ts +2 -1
- package/build/events/portal/ai/ai-changeStatus-event.d.ts +2 -1
- package/build/events/portal/ai/ai-created-event.d.ts +2 -1
- package/build/events/portal/ai/ai-set-default-show-event.d.ts +2 -1
- package/build/events/portal/ai/ai-unset-defaultShow-event.d.ts +2 -1
- package/build/events/portal/ai/ai-update-event.d.ts +2 -1
- package/build/events/portal/ai-option/ai-option-changeStatus-event.d.ts +2 -1
- package/build/events/portal/ai-option/ai-option-created-event.d.ts +3 -2
- package/build/events/portal/ai-option/ai-option-set-default-show-event.d.ts +2 -1
- package/build/events/portal/ai-option/ai-option-unset-defaultShow-event.d.ts +2 -1
- package/build/events/portal/ai-option/ai-option-updated-event.d.ts +3 -2
- package/build/events/portal/blog/blog-change-status-event.d.ts +2 -1
- package/build/events/portal/blog/blog-create-event.d.ts +2 -1
- package/build/events/portal/blog/blog-update-event.d.ts +2 -1
- package/build/events/portal/blog-category/blog-category-change-status-event.d.ts +2 -1
- package/build/events/portal/blog-category/blog-category-create-event.d.ts +2 -1
- package/build/events/portal/blog-category/blog-category-update-event.d.ts +2 -1
- package/build/events/portal/discount/discount-change-code-event.d.ts +2 -1
- package/build/events/portal/discount/discount-change-status-event.d.ts +2 -1
- package/build/events/portal/discount/discount-create-event.d.ts +2 -1
- package/build/events/portal/discount/discount-update-event.d.ts +4 -3
- package/build/events/portal/org/org-change-status-event.d.ts +2 -1
- package/build/events/portal/org/org-created-event.d.ts +2 -1
- package/build/events/portal/org/org-updated-event.d.ts +2 -1
- package/build/events/portal/plan/plan-change-status-event.d.ts +2 -1
- package/build/events/portal/plan/plan-create-event.d.ts +3 -2
- package/build/events/portal/plan/plan-update-event.d.ts +2 -1
- package/build/events/portal/plan/set-plan-by-user-in-portal.d.ts +3 -2
- package/build/events/portal/plan-org/plan-org-change-status-event.d.ts +3 -2
- package/build/events/portal/plan-org/plan-org-create-event.d.ts +3 -2
- package/build/events/portal/plan-org/plan-org-update-event.d.ts +3 -2
- package/build/events/portal/prompt/prompt-create-event.d.ts +4 -3
- package/build/events/portal/prompt/prompt-update-event.d.ts +4 -3
- package/build/events/portal/ticket/ticket-answered-event.d.ts +2 -1
- package/build/events/portal/transaction/increaseOrDecreaseBalance-event.d.ts +3 -2
- package/build/events/portal/user/setPlanForUserEvent.d.ts +3 -2
- package/build/events/portal/user/user-change-limit-event.d.ts +2 -1
- package/build/events/portal/user/user-change-status-event.d.ts +2 -1
- package/build/events/portal/user/user-update-version-event.d.ts +2 -1
- package/build/events/portal/user/user-updated-event.d.ts +2 -1
- package/build/events/portal/user/user-updated-password-event.d.ts +2 -1
- package/build/events/portal/user/user-updated-wallet-event.d.ts +2 -1
- package/build/middlewares/current-admin-org.d.ts +2 -1
- package/build/middlewares/current-admin.d.ts +3 -1
- package/build/middlewares/current-user.d.ts +2 -1
- package/build/models/app/ai-option.d.ts +5 -5
- package/build/models/app/ai.d.ts +4 -4
- package/build/models/app/archiveMessage.d.ts +6 -6
- package/build/models/app/blog-category.d.ts +3 -3
- package/build/models/app/blog.d.ts +5 -5
- package/build/models/app/defaults-user.d.ts +9 -9
- package/build/models/app/discount.d.ts +3 -3
- package/build/models/app/feedback.d.ts +4 -4
- package/build/models/app/fileReferenceGemini.d.ts +4 -4
- package/build/models/app/image.d.ts +4 -4
- package/build/models/app/message.d.ts +6 -6
- package/build/models/app/messageShared.d.ts +6 -6
- package/build/models/app/plan.d.ts +2 -2
- package/build/models/app/prompt.d.ts +2 -2
- package/build/models/app/rate.d.ts +6 -6
- package/build/models/app/ticket.d.ts +4 -4
- package/build/models/app/transaction.d.ts +4 -4
- package/build/models/app/usage.d.ts +4 -4
- package/build/models/app/user.d.ts +3 -3
- package/build/models/app/voice.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export declare enum FeedbackTypeEnum {
|
|
3
4
|
suggestion = "suggestion",
|
|
@@ -7,8 +8,8 @@ export declare enum FeedbackTypeEnum {
|
|
|
7
8
|
export interface FeedbackCreatedEvent {
|
|
8
9
|
subject: Subjects.FeedbackCreatedEvent;
|
|
9
10
|
data: {
|
|
10
|
-
id:
|
|
11
|
-
userId:
|
|
11
|
+
id: Types.ObjectId;
|
|
12
|
+
userId: Types.ObjectId;
|
|
12
13
|
aiId?: string;
|
|
13
14
|
comment?: string;
|
|
14
15
|
type: FeedbackTypeEnum;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface UserMessageByUserEvent {
|
|
3
4
|
subject: Subjects.UseMessageByUser;
|
|
4
5
|
data: {
|
|
5
|
-
userId:
|
|
6
|
-
planId?:
|
|
6
|
+
userId: Types.ObjectId;
|
|
7
|
+
planId?: Types.ObjectId;
|
|
7
8
|
apiUsed: number;
|
|
8
9
|
amountApiExistPlan: number;
|
|
9
10
|
amountUploadExistPlan: number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface RateCreatedEvent {
|
|
3
4
|
subject: Subjects.RateCreated;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
-
userId:
|
|
7
|
-
aiId:
|
|
6
|
+
id: Types.ObjectId;
|
|
7
|
+
userId: Types.ObjectId;
|
|
8
|
+
aiId: Types.ObjectId;
|
|
8
9
|
comment?: string;
|
|
9
10
|
rating: number;
|
|
10
11
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { MessageTypeTicketEnum, TicketTypeEnum } from "../../../enums/ticket";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface TicketCreatedEvent {
|
|
4
5
|
subject: Subjects.TicketCreated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
-
userId:
|
|
7
|
+
id: Types.ObjectId;
|
|
8
|
+
userId: Types.ObjectId;
|
|
8
9
|
title: string;
|
|
9
10
|
type: TicketTypeEnum;
|
|
10
11
|
messages: {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { TicketStatusEnum } from "../../../enums/ticket";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface TicketDoneByUserEvent {
|
|
4
5
|
subject: Subjects.TicketDoneByUser;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
version: number;
|
|
8
9
|
status: TicketStatusEnum;
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { MessageTypeTicketEnum, TicketStatusEnum } from "../../../enums/ticket";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface TicketAnsweredByUserEvent {
|
|
4
5
|
subject: Subjects.TicketAnsweredByUser;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
version: number;
|
|
8
9
|
messages: {
|
|
9
10
|
message: string;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { TransactionStatusEnum } from "../../../enums/transaction";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface TransactionCreatedEvent {
|
|
4
5
|
subject: Subjects.TransactionCreated;
|
|
5
6
|
data: {
|
|
6
|
-
_id:
|
|
7
|
+
_id: Types.ObjectId;
|
|
7
8
|
amount: number;
|
|
8
9
|
description: string;
|
|
9
10
|
status: TransactionStatusEnum;
|
|
10
|
-
userId:
|
|
11
|
-
planId?:
|
|
11
|
+
userId: Types.ObjectId;
|
|
12
|
+
planId?: Types.ObjectId;
|
|
12
13
|
authority: string;
|
|
13
14
|
useWallet?: number;
|
|
14
15
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface TransactionSuccessfulEvent {
|
|
3
4
|
subject: Subjects.TransactionSuccessful;
|
|
4
5
|
data: {
|
|
5
|
-
userId:
|
|
6
|
-
planId?:
|
|
6
|
+
userId: Types.ObjectId;
|
|
7
|
+
planId?: Types.ObjectId;
|
|
7
8
|
apiUsed?: number;
|
|
8
9
|
amountApiExistPlan?: number;
|
|
9
10
|
amountUploadExistPlan?: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface UserUpdateAllVersionEvent {
|
|
3
4
|
subject: Subjects.UserUpdateAllVersion;
|
|
4
5
|
data: {
|
|
5
|
-
userId:
|
|
6
|
-
planId?:
|
|
6
|
+
userId: Types.ObjectId;
|
|
7
|
+
planId?: Types.ObjectId;
|
|
7
8
|
apiUsed?: number;
|
|
8
9
|
amountApiExistPlan?: number;
|
|
9
10
|
amountUploadExistPlan?: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface UserUpdateWalletEvent {
|
|
3
4
|
subject: Subjects.UserUpdateWalletInApp;
|
|
4
5
|
data: {
|
|
5
|
-
userId:
|
|
6
|
+
userId: Types.ObjectId;
|
|
6
7
|
walletBalance: string;
|
|
7
8
|
versionUserPlanMessage: number;
|
|
8
9
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface UserLoginEvent {
|
|
3
4
|
subject: Subjects.UserLogIn;
|
|
@@ -6,8 +7,8 @@ export interface UserLoginEvent {
|
|
|
6
7
|
ipAddress?: string;
|
|
7
8
|
deviceInfo: string;
|
|
8
9
|
versionLimit: number;
|
|
9
|
-
userId:
|
|
10
|
+
userId: Types.ObjectId;
|
|
10
11
|
createdAt: string;
|
|
11
|
-
id:
|
|
12
|
+
id: Types.ObjectId;
|
|
12
13
|
};
|
|
13
14
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface UserUpdatedPasswordInAuthEvent {
|
|
3
4
|
subject: Subjects.UserUpdatedPasswordInAuth;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
version: number;
|
|
7
8
|
password: string;
|
|
8
9
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AdminStatusEnum } from "../../../enums/admin";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface AdminChangedStatusInPortalEvent {
|
|
4
5
|
subject: Subjects.AdminChangedStatusInPortal;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: AdminStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface AdminUpdatedInPortalEvent {
|
|
3
4
|
subject: Subjects.AdminUpdatedInPortal;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
version: number;
|
|
7
8
|
adminName: string;
|
|
8
9
|
family: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface AdminUpdatedPasswordInPortalEvent {
|
|
3
4
|
subject: Subjects.AdminUpdatedPasswordInPortal;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
version: number;
|
|
7
8
|
password: string;
|
|
8
9
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
import { AiStatusEnum } from "../../types_/ai";
|
|
3
4
|
export interface AiChangeStatusEvent {
|
|
4
5
|
subject: Subjects.AiChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
version: number;
|
|
8
9
|
status: AiStatusEnum;
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AiOptionStatusEnum } from "../../../enums/ai";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface AiOptionChangeStatusEvent {
|
|
4
5
|
subject: Subjects.AiOptionChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
version: number;
|
|
8
9
|
status: AiOptionStatusEnum;
|
|
9
10
|
};
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AiOptionFieldEnum, AiOptionNamesEnum } from "../../../enums/ai";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface AiOptionCreatedEvent {
|
|
4
5
|
subject: Subjects.AiOptionCreated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
name: AiOptionNamesEnum;
|
|
8
9
|
field: AiOptionFieldEnum;
|
|
9
10
|
image?: string;
|
|
10
11
|
description?: string;
|
|
11
|
-
aiId:
|
|
12
|
+
aiId: Types.ObjectId;
|
|
12
13
|
inputPrice: number;
|
|
13
14
|
outputPrice: number;
|
|
14
15
|
cachePrice: number;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AiOptionFieldEnum, AiOptionNamesEnum } from "../../../enums/ai";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface AiOptionUpdatedEvent {
|
|
4
5
|
subject: Subjects.AiOptionUpdated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
name: AiOptionNamesEnum;
|
|
8
9
|
field: AiOptionFieldEnum;
|
|
9
10
|
image: string;
|
|
10
11
|
description: string;
|
|
11
|
-
aiId:
|
|
12
|
+
aiId: Types.ObjectId;
|
|
12
13
|
inputPrice: number;
|
|
13
14
|
outputPrice: number;
|
|
14
15
|
cachePrice: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { BlogStatusEnum } from "../../../enums/blog";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface BlogChangeStatusEvent {
|
|
4
5
|
subject: Subjects.BlogChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: BlogStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { BlogStatusEnum } from "../../../enums/blog";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface BlogCreatedEvent {
|
|
4
5
|
subject: Subjects.BlogCreated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
title: string;
|
|
8
9
|
shortDescription: string;
|
|
9
10
|
description: string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface BlogUpdateEvent {
|
|
3
4
|
subject: Subjects.BlogUpdated;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
title: string;
|
|
7
8
|
shortDescription: string;
|
|
8
9
|
description: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { BlogCategoryStatusEnum } from "../../../enums/category";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface BlogCategoryChangeStatusEvent {
|
|
4
5
|
subject: Subjects.BlogCategoryChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: BlogCategoryStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface BlogCategoryUpdateEvent {
|
|
3
4
|
subject: Subjects.BlogCategoryUpdated;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
title: string;
|
|
7
8
|
description?: string;
|
|
8
9
|
version: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { DiscountStatusEnum } from "../../../enums/discount";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface DiscountChangeStatusEvent {
|
|
4
5
|
subject: Subjects.DiscountChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: DiscountStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { DiscountStatusEnum, DiscountType } from "../../../enums/discount";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface DiscountCreatedEvent {
|
|
4
5
|
subject: Subjects.DiscountCreated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
title: string;
|
|
8
9
|
type: DiscountType;
|
|
9
10
|
amount: string;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { DiscountStatusEnum, DiscountType } from "../../../enums/discount";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface DiscountUpdateEvent {
|
|
4
5
|
subject: Subjects.DiscountUpdated;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
title: string;
|
|
8
9
|
type: DiscountType;
|
|
9
10
|
amount: string;
|
|
10
11
|
startDate: Date;
|
|
11
12
|
endDate: string;
|
|
12
|
-
users:
|
|
13
|
-
plan?:
|
|
13
|
+
users: Types.ObjectId[];
|
|
14
|
+
plan?: Types.ObjectId;
|
|
14
15
|
status: DiscountStatusEnum;
|
|
15
16
|
version: number;
|
|
16
17
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { OrgStatusEnum } from "../../../enums/org";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface OrgChangedStatusInPortalEvent {
|
|
4
5
|
subject: Subjects.OrgChangedStatusInPortal;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: OrgStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface OrgUpdatedInPortalEvent {
|
|
3
4
|
subject: Subjects.OrgUpdatedInPortal;
|
|
4
5
|
data: {
|
|
5
|
-
id:
|
|
6
|
+
id: Types.ObjectId;
|
|
6
7
|
version: number;
|
|
7
8
|
name: string;
|
|
8
9
|
family: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { PlanStatusEnum } from "../../../enums/plan";
|
|
2
3
|
import { Subjects } from "../../subjects";
|
|
3
4
|
export interface PlanChangeStatusEvent {
|
|
4
5
|
subject: Subjects.PlanChangeStatus;
|
|
5
6
|
data: {
|
|
6
|
-
id:
|
|
7
|
+
id: Types.ObjectId;
|
|
7
8
|
status: PlanStatusEnum;
|
|
8
9
|
version: number;
|
|
9
10
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AiOptionNamesEnum } from "../../../enums/ai";
|
|
2
3
|
import { ToolsChatgpt, TypePayEnum } from "../../../enums/plan";
|
|
3
4
|
import { AiDoc } from "../../../models/app/ai";
|
|
@@ -6,7 +7,7 @@ import { PlanTypeEnum } from "../../types_/plan";
|
|
|
6
7
|
export interface PlanCreateEvent {
|
|
7
8
|
subject: Subjects.PlanCreated;
|
|
8
9
|
data: {
|
|
9
|
-
id:
|
|
10
|
+
id: Types.ObjectId;
|
|
10
11
|
name: string;
|
|
11
12
|
price: string;
|
|
12
13
|
points: number;
|
|
@@ -24,6 +25,6 @@ export interface PlanCreateEvent {
|
|
|
24
25
|
chatgpt?: ToolsChatgpt[];
|
|
25
26
|
};
|
|
26
27
|
models: AiOptionNamesEnum[];
|
|
27
|
-
userOwn?:
|
|
28
|
+
userOwn?: Types.ObjectId;
|
|
28
29
|
};
|
|
29
30
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { AiOptionNamesEnum } from "../../../enums/ai";
|
|
2
3
|
import { ToolsChatgpt, TypePayEnum } from "../../../enums/plan";
|
|
3
4
|
import { AiDoc } from "../../../models/app/ai";
|
|
@@ -6,7 +7,7 @@ import { PlanTypeEnum } from "../../types_/plan";
|
|
|
6
7
|
export interface PlanUpdateEvent {
|
|
7
8
|
subject: Subjects.PlanUpdated;
|
|
8
9
|
data: {
|
|
9
|
-
id:
|
|
10
|
+
id: Types.ObjectId;
|
|
10
11
|
version: number;
|
|
11
12
|
name: string;
|
|
12
13
|
points: number;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Types } from "mongoose";
|
|
1
2
|
import { Subjects } from "../../subjects";
|
|
2
3
|
export interface SetPlanOrgForUserInPortalEvent {
|
|
3
4
|
subject: Subjects.SetPlanOrgForUserInPortal;
|
|
4
5
|
data: {
|
|
5
|
-
userId:
|
|
6
|
-
planId:
|
|
6
|
+
userId: Types.ObjectId;
|
|
7
|
+
planId: Types.ObjectId;
|
|
7
8
|
userVersion: number;
|
|
8
9
|
planVersion: number;
|
|
9
10
|
};
|