@brimble/models 3.8.156 → 4.0.1
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/dist/index.d.ts +1 -1
- package/dist/types/activity-log.d.ts +3 -2
- package/dist/types/agent-chat-file.d.ts +5 -4
- package/dist/types/agent-chat-message.d.ts +4 -3
- package/dist/types/agent-chat.d.ts +4 -3
- package/dist/types/agent-design-skill-revision.d.ts +3 -2
- package/dist/types/agent-design-skill.d.ts +3 -2
- package/dist/types/agent-website-file-overlay.d.ts +3 -2
- package/dist/types/agent-website-snapshot.d.ts +4 -3
- package/dist/types/agent-website.d.ts +5 -4
- package/dist/types/alert-event.d.ts +4 -3
- package/dist/types/alert-rule-state.d.ts +3 -2
- package/dist/types/alert-rule.d.ts +4 -3
- package/dist/types/app-message.d.ts +3 -2
- package/dist/types/auto-scaling-group.d.ts +4 -3
- package/dist/types/cashier_subscription.d.ts +3 -2
- package/dist/types/collab-annotation.d.ts +5 -4
- package/dist/types/collab-comment.d.ts +3 -2
- package/dist/types/collab-integration.d.ts +3 -2
- package/dist/types/collab-push-subscription.d.ts +2 -1
- package/dist/types/collab-settings.d.ts +3 -2
- package/dist/types/collab-share-token.d.ts +3 -2
- package/dist/types/compute.d.ts +7 -6
- package/dist/types/domain/dns.d.ts +2 -1
- package/dist/types/domain/index.d.ts +8 -7
- package/dist/types/domain/renewal.d.ts +2 -1
- package/dist/types/domain/transfer.d.ts +5 -4
- package/dist/types/env.d.ts +3 -2
- package/dist/types/environment-variable.d.ts +4 -3
- package/dist/types/index.d.ts +1 -0
- package/dist/types/intention.d.ts +2 -1
- package/dist/types/load-balancer-port.d.ts +4 -3
- package/dist/types/logs.d.ts +6 -4
- package/dist/types/member-permission.d.ts +3 -2
- package/dist/types/member.d.ts +9 -7
- package/dist/types/ownership-transfer.d.ts +4 -3
- package/dist/types/permission.d.ts +2 -1
- package/dist/types/plan_configuration.d.ts +2 -1
- package/dist/types/platform-api-key.d.ts +3 -2
- package/dist/types/project/connection.d.ts +3 -2
- package/dist/types/project/index.d.ts +14 -13
- package/dist/types/project/preview.d.ts +4 -3
- package/dist/types/project-config-file.d.ts +3 -2
- package/dist/types/project-environment.d.ts +4 -3
- package/dist/types/project-network-settings.d.ts +2 -1
- package/dist/types/project-tag-assignment.d.ts +5 -4
- package/dist/types/ref.d.ts +16 -0
- package/dist/types/ref.js +2 -0
- package/dist/types/role.d.ts +2 -1
- package/dist/types/sandbox-usage-segment.d.ts +5 -4
- package/dist/types/sandbox.d.ts +5 -4
- package/dist/types/server.d.ts +2 -1
- package/dist/types/storage.d.ts +6 -5
- package/dist/types/subscription.d.ts +5 -4
- package/dist/types/tag.d.ts +3 -2
- package/dist/types/team.d.ts +8 -5
- package/dist/types/ticket.d.ts +3 -2
- package/dist/types/token.d.ts +3 -2
- package/dist/types/user.d.ts +4 -3
- package/dist/types/volume.d.ts +4 -3
- package/dist/types/webhook-event.d.ts +2 -1
- package/dist/types/webhook-setting.d.ts +4 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ export { default as AgentWebsiteSnapshot } from "./agent-website-snapshot";
|
|
|
101
101
|
export { default as AgentWebsiteFileOverlay } from "./agent-website-file-overlay";
|
|
102
102
|
export { default as AgentDesignSkill } from "./agent-design-skill";
|
|
103
103
|
export { default as AgentDesignSkillRevision } from "./agent-design-skill-revision";
|
|
104
|
-
export { IUser, IGit, IOrigin, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IPlatformApiKey, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IPaymentMethod, IDns, IDnsChangeLog, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IProjectConfigFile, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IDrain, IProjectDrainSubscription, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSize, ISandboxSnapshot, IBackupHistory, IRestoreHistory, IWorkerRun, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IPgBouncerUsageSegment, IPgBouncerUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, IStreak, IStreakMilestoneRef, IStreakEvent, IStreakDay, IStreakMilestone, IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, IQuestParticipation, IQuestCriterionProgress, IQuestRewardIssuance, IQuestIssuedReward, ICoupon, ICouponRedemption, ITicket, IAgentChat, IAgentChatMessage, IAgentChatFile, IAgentChatModel, IAgentWebsite, IAgentWebsiteSnapshot, IAgentWebsiteFileOverlay, IAgentDesignSkill, IAgentDesignSkillRevision, IAgentDesignSkillFile, IAgentDesignSkillInspection, IAgentDesignSkillLicense, } from "./types";
|
|
104
|
+
export { Populated, Ref, IUser, IGit, IOrigin, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IPlatformApiKey, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IPaymentMethod, IDns, IDnsChangeLog, IRole, IPermission, IMemberPermission, IWallet, IDbImage, IJob, ILicense, IPlanConfiguration, IAutoScalingGroup, IComputeChange, IRegion, IVolume, IFramework, BrimbleFrameworkType, ISettings, ILoadBalancerPort, IDomainRenewal, IDomainTransfer, IWebhookCategory, IWebhookEvent, IWebhookSetting, IIntention, IProvider, ICollabAnnotation, ICollabComment, ICollabAttachment, ICollabIntegration, ICollabSettings, ICollabShareToken, ICollabPushSubscription, IAppMessage, IInvoice, ITag, IProjectTagAssignment, ICashierSubscription, ICashierSubscriptionItem, IProjectEnvironment, IEnvironmentVariable, IProjectConfigFile, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IDrain, IProjectDrainSubscription, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSize, ISandboxSnapshot, IBackupHistory, IRestoreHistory, IWorkerRun, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IPgBouncerUsageSegment, IPgBouncerUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition, IStreak, IStreakMilestoneRef, IStreakEvent, IStreakDay, IStreakMilestone, IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, IQuestParticipation, IQuestCriterionProgress, IQuestRewardIssuance, IQuestIssuedReward, ICoupon, ICouponRedemption, ITicket, IAgentChat, IAgentChatMessage, IAgentChatFile, IAgentChatModel, IAgentWebsite, IAgentWebsiteSnapshot, IAgentWebsiteFileOverlay, IAgentDesignSkill, IAgentDesignSkillRevision, IAgentDesignSkillFile, IAgentDesignSkillInspection, IAgentDesignSkillLicense, } from "./types";
|
|
105
105
|
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, AlertMetric, AlertCondition, AlertRuleState, AlertChannelMode, AlertEventStatus, DrainType, DrainStatus, LogSource, DrainEventType, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, DNS_CHANGE_TYPE, DNS_CHANGE_SOURCE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, SCALING_SOURCE, DatabaseEngine, EmailDeadLetterStatus, JobStatus, LicenseStatus, REGION_CONTINENT, VOLUME_BACKEND, BUILD_DISABLED_BY, PROJECT_DISABLED_BY, SPENDING_LIMIT_ACTION, SERVER_PROTOCOL, FrameworkApplicationType, DomainRenewalStatus, DomainTransferProvider, DomainTransferDirection, DomainTransferStatus, NomadDeploymentStatus, COLLAB_ANNOTATION_STATUS, COLLAB_INTEGRATION_TYPE, COLLAB_THEME, COLLAB_TOOLBAR_POSITION, INVOICE_STATUS, INVOICE_PAYMENT_STATUS, INVOICE_TYPE, SANDBOX_TEMPLATE, SANDBOX_STATUS, SANDBOX_DESTROY_REASON, SANDBOX_EGRESS_MODE, SANDBOX_SNAPSHOT_STATUS, BACKUP_STATUS, WorkerRunStatus, WorkerRunTrigger, RESTORE_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, PlatformApiKeyStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, XFrameOptions, XContentTypeOptions, XRobotsTag, QualifyingActionType, MilestoneType, QUEST_COUNTABLE_MILESTONES, ACTION_TO_MILESTONE, EligibilityType, RewardType, QuestRewardStatus, QuestCriterionType, QuestEntity, QuestRequirementType, QUEST_CLAIM_REQUIREMENTS, QUEST_TARGETLESS_REQUIREMENTS, WorkbenchMode, CouponDiscountType, CouponScope, CouponRedemptionStatus, CONFIG_FILE_VISIBILITY, AGENT_CHAT_STATUS, AGENT_CHAT_MESSAGE_ROLE, AGENT_WEBSITE_STATUS, AGENT_WEBSITE_SNAPSHOT_STATUS, AGENT_DESIGN_SKILL_STATUS, AGENT_DESIGN_SKILL_TRUST_LEVEL, AGENT_DESIGN_SKILL_VERDICT, } from "./enum";
|
|
106
106
|
import mongoose from "mongoose";
|
|
107
107
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Document, Types } from "mongoose";
|
|
2
2
|
import { ITeam } from "./team";
|
|
3
3
|
import { IUser } from "./user";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IActivityLog extends Document {
|
|
5
|
-
user_id: IUser
|
|
6
|
-
team_id?: ITeam
|
|
6
|
+
user_id: Ref<IUser>;
|
|
7
|
+
team_id?: Ref<ITeam>;
|
|
7
8
|
action: string;
|
|
8
9
|
description?: string;
|
|
9
10
|
context?: string;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { IAgentChat } from "./agent-chat";
|
|
3
3
|
import { IAgentChatMessage } from "./agent-chat-message";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface IAgentChatFile extends Document {
|
|
6
|
-
chat_id: IAgentChat
|
|
7
|
-
message_id: IAgentChatMessage |
|
|
8
|
-
user_id: IUser
|
|
7
|
+
chat_id: Ref<IAgentChat>;
|
|
8
|
+
message_id: Ref<IAgentChatMessage> | null;
|
|
9
|
+
user_id: Ref<IUser>;
|
|
9
10
|
filename: string;
|
|
10
11
|
content_type: string;
|
|
11
12
|
size: number;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_CHAT_MESSAGE_ROLE } from "../enum";
|
|
3
3
|
import { IAgentChat } from "./agent-chat";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface IAgentChatMessage extends Document {
|
|
6
|
-
chat_id: IAgentChat
|
|
7
|
-
user_id: IUser
|
|
7
|
+
chat_id: Ref<IAgentChat>;
|
|
8
|
+
user_id: Ref<IUser>;
|
|
8
9
|
role: AGENT_CHAT_MESSAGE_ROLE;
|
|
9
10
|
content: string;
|
|
10
11
|
model_id: string | null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_CHAT_STATUS } from "../enum";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface IAgentChat extends Document {
|
|
6
|
-
user_id: IUser
|
|
7
|
-
team_id: ITeam |
|
|
7
|
+
user_id: Ref<IUser>;
|
|
8
|
+
team_id: Ref<ITeam> | null;
|
|
8
9
|
title: string;
|
|
9
10
|
tokens_used: number;
|
|
10
11
|
status: AGENT_CHAT_STATUS;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_DESIGN_SKILL_STATUS, AGENT_DESIGN_SKILL_TRUST_LEVEL, AGENT_DESIGN_SKILL_VERDICT } from "../enum";
|
|
3
3
|
import { IAgentDesignSkill } from "./agent-design-skill";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IAgentDesignSkillFile {
|
|
5
6
|
path: string;
|
|
6
7
|
content?: string;
|
|
@@ -23,7 +24,7 @@ export interface IAgentDesignSkillLicense {
|
|
|
23
24
|
text_hash: string | null;
|
|
24
25
|
}
|
|
25
26
|
export interface IAgentDesignSkillRevision extends Document {
|
|
26
|
-
skill_id: IAgentDesignSkill
|
|
27
|
+
skill_id: Ref<IAgentDesignSkill>;
|
|
27
28
|
commit: string;
|
|
28
29
|
content_hash: string;
|
|
29
30
|
trust_level: AGENT_DESIGN_SKILL_TRUST_LEVEL;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_DESIGN_SKILL_STATUS } from "../enum";
|
|
3
3
|
import { IAgentDesignSkillRevision } from "./agent-design-skill-revision";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IAgentDesignSkill extends Document {
|
|
5
6
|
name: string;
|
|
6
7
|
repository: string;
|
|
7
8
|
skill_path: string;
|
|
8
9
|
source_id: string;
|
|
9
10
|
status: AGENT_DESIGN_SKILL_STATUS;
|
|
10
|
-
latest_revision_id: IAgentDesignSkillRevision |
|
|
11
|
+
latest_revision_id: Ref<IAgentDesignSkillRevision> | null;
|
|
11
12
|
created_at: Date;
|
|
12
13
|
updated_at: Date;
|
|
13
14
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { IAgentWebsite } from "./agent-website";
|
|
3
|
+
import { Ref } from "./ref";
|
|
3
4
|
export interface IAgentWebsiteFileOverlay extends Document {
|
|
4
|
-
website_id: IAgentWebsite
|
|
5
|
+
website_id: Ref<IAgentWebsite>;
|
|
5
6
|
path: string;
|
|
6
7
|
content: string;
|
|
7
8
|
size: number;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_WEBSITE_SNAPSHOT_STATUS } from "../enum";
|
|
3
3
|
import { IAgentWebsite } from "./agent-website";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export type IAgentWebsiteSnapshotFile = {
|
|
6
7
|
path: string;
|
|
7
8
|
size: number;
|
|
8
9
|
};
|
|
9
10
|
export interface IAgentWebsiteSnapshot extends Document {
|
|
10
|
-
website_id: IAgentWebsite
|
|
11
|
-
user_id: IUser
|
|
11
|
+
website_id: Ref<IAgentWebsite>;
|
|
12
|
+
user_id: Ref<IUser>;
|
|
12
13
|
s3_key: string;
|
|
13
14
|
size: number;
|
|
14
15
|
digest: string | null;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AGENT_WEBSITE_STATUS } from "../enum";
|
|
3
3
|
import { IAgentChat } from "./agent-chat";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
6
7
|
export interface IAgentWebsite extends Document {
|
|
7
|
-
chat_id: IAgentChat
|
|
8
|
-
user_id: IUser
|
|
9
|
-
team_id: ITeam |
|
|
8
|
+
chat_id: Ref<IAgentChat>;
|
|
9
|
+
user_id: Ref<IUser>;
|
|
10
|
+
team_id: Ref<ITeam> | null;
|
|
10
11
|
status: AGENT_WEBSITE_STATUS;
|
|
11
12
|
runner_sandbox_id: string | null;
|
|
12
13
|
runner_port: number | null;
|
|
@@ -3,6 +3,7 @@ import { AlertEventStatus, AlertMetric } from "../enum";
|
|
|
3
3
|
import { IAlertRule } from "./alert-rule";
|
|
4
4
|
import { IProject } from "./project";
|
|
5
5
|
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
6
7
|
export interface IAlertNotificationResult {
|
|
7
8
|
channel_id: Types.ObjectId;
|
|
8
9
|
channel_type: string;
|
|
@@ -10,9 +11,9 @@ export interface IAlertNotificationResult {
|
|
|
10
11
|
error: string | null;
|
|
11
12
|
}
|
|
12
13
|
export interface IAlertEvent extends Document {
|
|
13
|
-
rule_id: IAlertRule
|
|
14
|
-
user_id: IUser
|
|
15
|
-
project_id: IProject
|
|
14
|
+
rule_id: Ref<IAlertRule>;
|
|
15
|
+
user_id: Ref<IUser>;
|
|
16
|
+
project_id: Ref<IProject>;
|
|
16
17
|
status: AlertEventStatus;
|
|
17
18
|
value: number;
|
|
18
19
|
threshold: number;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { AlertRuleState } from "../enum";
|
|
3
3
|
import { IAlertRule } from "./alert-rule";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IAlertRuleState extends Document {
|
|
5
|
-
rule_id: IAlertRule
|
|
6
|
+
rule_id: Ref<IAlertRule>;
|
|
6
7
|
state: AlertRuleState;
|
|
7
8
|
pending_since: Date | null;
|
|
8
9
|
last_evaluated_at: Date;
|
|
@@ -3,10 +3,11 @@ import { AlertChannelMode, AlertCondition, AlertMetric } from "../enum";
|
|
|
3
3
|
import { IProject } from "./project";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
6
7
|
export interface IAlertRule extends Document {
|
|
7
|
-
user_id: IUser
|
|
8
|
-
team_id?: ITeam |
|
|
9
|
-
project_id: IProject
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team_id?: Ref<ITeam> | null;
|
|
10
|
+
project_id: Ref<IProject>;
|
|
10
11
|
name: string;
|
|
11
12
|
metric: AlertMetric;
|
|
12
13
|
condition: AlertCondition;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IAppMessage extends Document {
|
|
5
|
-
userId?: IUser
|
|
6
|
-
teamId?: ITeam
|
|
6
|
+
userId?: Ref<IUser>;
|
|
7
|
+
teamId?: Ref<ITeam>;
|
|
7
8
|
level: string;
|
|
8
9
|
message: string;
|
|
9
10
|
seen: boolean;
|
|
@@ -2,13 +2,14 @@ import { Types, Document } from "mongoose";
|
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ISubscription } from "./subscription";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface IAutoScalingGroup extends Document {
|
|
6
7
|
_id: Types.ObjectId;
|
|
7
8
|
name: string;
|
|
8
9
|
replicas: number;
|
|
9
|
-
user_id?: IUser
|
|
10
|
-
team_id?: ITeam
|
|
11
|
-
subscription_id: ISubscription
|
|
10
|
+
user_id?: Ref<IUser>;
|
|
11
|
+
team_id?: Ref<ITeam>;
|
|
12
|
+
subscription_id: Ref<ISubscription>;
|
|
12
13
|
min_containers: number;
|
|
13
14
|
max_containers: number;
|
|
14
15
|
active: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface ICashierSubscription extends Document {
|
|
5
|
-
user_id: IUser
|
|
6
|
-
team_id?: ITeam | null;
|
|
6
|
+
user_id: Ref<IUser>;
|
|
7
|
+
team_id?: Ref<ITeam> | null;
|
|
7
8
|
type: string;
|
|
8
9
|
stripe_id: string;
|
|
9
10
|
stripe_status: string;
|
|
@@ -2,9 +2,10 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { COLLAB_ANNOTATION_STATUS } from "../enum";
|
|
3
3
|
import { IUser } from "./user";
|
|
4
4
|
import { IProject } from "./project";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface ICollabAnnotation extends Document {
|
|
6
|
-
projectId: IProject
|
|
7
|
-
userId?: IUser
|
|
7
|
+
projectId: Ref<IProject>;
|
|
8
|
+
userId?: Ref<IUser>;
|
|
8
9
|
pageUrl: string;
|
|
9
10
|
pagePath: string;
|
|
10
11
|
xPercent: number;
|
|
@@ -14,14 +15,14 @@ export interface ICollabAnnotation extends Document {
|
|
|
14
15
|
elementOffsetY?: number;
|
|
15
16
|
status: COLLAB_ANNOTATION_STATUS;
|
|
16
17
|
resolvedAt?: Date;
|
|
17
|
-
resolvedBy?: IUser
|
|
18
|
+
resolvedBy?: Ref<IUser>;
|
|
18
19
|
guestName?: string;
|
|
19
20
|
guestEmail?: string;
|
|
20
21
|
githubPrCommentId?: number;
|
|
21
22
|
githubPrCommentUrl?: string;
|
|
22
23
|
githubIssueUrl?: string;
|
|
23
24
|
githubIssueNumber?: number;
|
|
24
|
-
subscribedUserIds?: IUser[];
|
|
25
|
+
subscribedUserIds?: Ref<IUser>[];
|
|
25
26
|
createdAt: Date;
|
|
26
27
|
updatedAt: Date;
|
|
27
28
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ICollabAnnotation } from "./collab-annotation";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface ICollabAttachment {
|
|
5
6
|
url: string;
|
|
6
7
|
fileName: string;
|
|
@@ -8,8 +9,8 @@ export interface ICollabAttachment {
|
|
|
8
9
|
fileSize: number;
|
|
9
10
|
}
|
|
10
11
|
export interface ICollabComment extends Document {
|
|
11
|
-
annotationId: ICollabAnnotation
|
|
12
|
-
userId?: IUser
|
|
12
|
+
annotationId: Ref<ICollabAnnotation>;
|
|
13
|
+
userId?: Ref<IUser>;
|
|
13
14
|
body?: string;
|
|
14
15
|
screenshot?: string;
|
|
15
16
|
attachments?: ICollabAttachment[];
|
|
@@ -2,9 +2,10 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { COLLAB_INTEGRATION_TYPE } from "../enum";
|
|
3
3
|
import { IProject } from "./project";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface ICollabIntegration extends Document {
|
|
6
|
-
projectId: IProject
|
|
7
|
-
userId: IUser
|
|
7
|
+
projectId: Ref<IProject>;
|
|
8
|
+
userId: Ref<IUser>;
|
|
8
9
|
type: COLLAB_INTEGRATION_TYPE;
|
|
9
10
|
webhookUrl: string;
|
|
10
11
|
channelName?: string;
|
|
@@ -2,9 +2,10 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { COLLAB_THEME, COLLAB_TOOLBAR_POSITION } from "../enum";
|
|
3
3
|
import { IUser } from "./user";
|
|
4
4
|
import { IProject } from "./project";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface ICollabSettings extends Document {
|
|
6
|
-
userId: IUser
|
|
7
|
-
projectId: IProject
|
|
7
|
+
userId: Ref<IUser>;
|
|
8
|
+
projectId: Ref<IProject>;
|
|
8
9
|
pushNotifications: boolean;
|
|
9
10
|
slackUrl?: string;
|
|
10
11
|
discordUrl?: string;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { IProject } from "./project";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface ICollabShareToken extends Document {
|
|
5
|
-
projectId: IProject
|
|
6
|
-
createdBy: IUser
|
|
6
|
+
projectId: Ref<IProject>;
|
|
7
|
+
createdBy: Ref<IUser>;
|
|
7
8
|
token: string;
|
|
8
9
|
expiresAt?: Date;
|
|
9
10
|
isActive: boolean;
|
package/dist/types/compute.d.ts
CHANGED
|
@@ -3,35 +3,36 @@ import { IProject } from "./project";
|
|
|
3
3
|
import { IRegion } from "./region";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
6
7
|
export interface IComputeChange {
|
|
7
8
|
_id?: string;
|
|
8
9
|
project_name: string;
|
|
9
10
|
project_type?: ServiceType;
|
|
10
11
|
deleted: boolean;
|
|
11
|
-
project_id: IProject
|
|
12
|
-
user_id: IUser
|
|
13
|
-
team_id?: ITeam
|
|
12
|
+
project_id: Ref<IProject>;
|
|
13
|
+
user_id: Ref<IUser>;
|
|
14
|
+
team_id?: Ref<ITeam>;
|
|
14
15
|
timestamp: Date;
|
|
15
16
|
previous: {
|
|
16
17
|
cpu: number;
|
|
17
18
|
memory: number;
|
|
18
19
|
storage: number;
|
|
19
20
|
persistentStorage: number;
|
|
20
|
-
region?: IRegion
|
|
21
|
+
region?: Ref<IRegion>;
|
|
21
22
|
};
|
|
22
23
|
current: {
|
|
23
24
|
cpu: number;
|
|
24
25
|
memory: number;
|
|
25
26
|
storage: number;
|
|
26
27
|
persistentStorage: number;
|
|
27
|
-
region?: IRegion
|
|
28
|
+
region?: Ref<IRegion>;
|
|
28
29
|
};
|
|
29
30
|
default_resources?: {
|
|
30
31
|
cpu: number;
|
|
31
32
|
memory: number;
|
|
32
33
|
storage: number;
|
|
33
34
|
persistentStorage: number;
|
|
34
|
-
region?: IRegion
|
|
35
|
+
region?: Ref<IRegion>;
|
|
35
36
|
};
|
|
36
37
|
costs: {
|
|
37
38
|
startDate: Date;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IDomain } from ".";
|
|
3
|
+
import { Ref } from "../ref";
|
|
3
4
|
export interface IDns extends Document {
|
|
4
5
|
name: string;
|
|
5
6
|
ttl: number;
|
|
6
7
|
type: string;
|
|
7
8
|
value: string;
|
|
8
|
-
domain: IDomain
|
|
9
|
+
domain: Ref<IDomain>;
|
|
9
10
|
isProxied?: boolean;
|
|
10
11
|
createdAt: Date;
|
|
11
12
|
updatedAt: Date;
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IPreview, IProject, IProjectEnvironment, ISubscription, ITeam, IUser } from "../";
|
|
3
3
|
import { IDns } from "./dns";
|
|
4
|
+
import { Ref } from "../ref";
|
|
4
5
|
export interface IDomain extends Document {
|
|
5
6
|
name: string;
|
|
6
|
-
project: IProject
|
|
7
|
-
user_id: IUser
|
|
8
|
-
team_id?: ITeam
|
|
7
|
+
project: Ref<IProject>;
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team_id?: Ref<ITeam>;
|
|
9
10
|
primary: boolean;
|
|
10
|
-
preview: IPreview
|
|
11
|
+
preview: Ref<IPreview>;
|
|
11
12
|
provider: string;
|
|
12
|
-
subscription: ISubscription
|
|
13
|
+
subscription: Ref<ISubscription>;
|
|
13
14
|
cashier_subscription_id: string | null;
|
|
14
15
|
auto_renewal: boolean;
|
|
15
16
|
renewal_duration: number;
|
|
@@ -23,8 +24,8 @@ export interface IDomain extends Document {
|
|
|
23
24
|
trigger_created: boolean;
|
|
24
25
|
trigger_created_at: string;
|
|
25
26
|
nameservers: string[];
|
|
26
|
-
dns: IDns[];
|
|
27
|
-
project_environment?: IProjectEnvironment
|
|
27
|
+
dns: Ref<IDns>[];
|
|
28
|
+
project_environment?: Ref<IProjectEnvironment>;
|
|
28
29
|
is_pending_verification: boolean;
|
|
29
30
|
last_expiry_notification_at?: Date | null;
|
|
30
31
|
wildcard_enabled: boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IDomain } from "../";
|
|
3
3
|
import { DomainRenewalStatus } from "../../enum";
|
|
4
|
+
import { Ref } from "../ref";
|
|
4
5
|
export interface IDomainRenewal extends Document {
|
|
5
|
-
domain_id: IDomain
|
|
6
|
+
domain_id: Ref<IDomain>;
|
|
6
7
|
status: DomainRenewalStatus;
|
|
7
8
|
attempts: number;
|
|
8
9
|
createdAt: Date;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IDomain, IProject, ITeam, IUser } from "../";
|
|
3
|
+
import { Ref } from "../ref";
|
|
3
4
|
import { DomainTransferDirection, DomainTransferProvider, DomainTransferStatus } from "../../enum";
|
|
4
5
|
export interface IDomainTransfer extends Document {
|
|
5
|
-
domain_id: IDomain
|
|
6
|
+
domain_id: Ref<IDomain>;
|
|
6
7
|
domain_name: string;
|
|
7
|
-
user_id: IUser
|
|
8
|
-
team_id?: ITeam
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team_id?: Ref<ITeam>;
|
|
9
10
|
provider: DomainTransferProvider;
|
|
10
11
|
direction: DomainTransferDirection;
|
|
11
12
|
status: DomainTransferStatus;
|
|
@@ -17,7 +18,7 @@ export interface IDomainTransfer extends Document {
|
|
|
17
18
|
auto_renewal?: boolean;
|
|
18
19
|
privacy_enabled?: boolean;
|
|
19
20
|
renewal_duration?: number;
|
|
20
|
-
project_id?: IProject
|
|
21
|
+
project_id?: Ref<IProject>;
|
|
21
22
|
last_polled_at?: Date;
|
|
22
23
|
poll_count: number;
|
|
23
24
|
last_provider_status?: string;
|
package/dist/types/env.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { ENVIRONMENT } from "../enum";
|
|
3
3
|
import { IProject, IUser } from "./";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IEnv extends Document {
|
|
5
6
|
name: string;
|
|
6
7
|
value: string;
|
|
7
|
-
project: IProject
|
|
8
|
-
user: IUser
|
|
8
|
+
project: Ref<IProject>;
|
|
9
|
+
user: Ref<IUser>;
|
|
9
10
|
environment: ENVIRONMENT | string;
|
|
10
11
|
is_system?: boolean;
|
|
11
12
|
createdAt: Date;
|
|
@@ -2,12 +2,13 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { IProjectEnvironment } from "./project-environment";
|
|
3
3
|
import { IProject } from "./project";
|
|
4
4
|
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface IEnvironmentVariable extends Document {
|
|
6
7
|
name: string;
|
|
7
8
|
value: string;
|
|
8
|
-
project_environment: IProjectEnvironment
|
|
9
|
-
source_project?: IProject | null;
|
|
10
|
-
user: IUser
|
|
9
|
+
project_environment: Ref<IProjectEnvironment>;
|
|
10
|
+
source_project?: Ref<IProject> | null;
|
|
11
|
+
user: Ref<IUser>;
|
|
11
12
|
inheritable: boolean;
|
|
12
13
|
createdAt: Date;
|
|
13
14
|
updatedAt: Date;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IProject } from "./";
|
|
3
|
+
import { Ref } from "./ref";
|
|
3
4
|
export interface IIntention extends Document {
|
|
4
|
-
project: IProject
|
|
5
|
+
project: Ref<IProject>;
|
|
5
6
|
sourceName: string;
|
|
6
7
|
destinationName: string;
|
|
7
8
|
sourceNamespace: string;
|
|
@@ -2,11 +2,12 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { IProject } from "./project";
|
|
3
3
|
import { IRegion } from "./region";
|
|
4
4
|
import { IServer } from "./server";
|
|
5
|
+
import { Ref } from "./ref";
|
|
5
6
|
export interface ILoadBalancerPort extends Document {
|
|
6
7
|
port: number;
|
|
7
|
-
server_id: IServer
|
|
8
|
-
project_id: IProject
|
|
9
|
-
region_id: IRegion
|
|
8
|
+
server_id: Ref<IServer>;
|
|
9
|
+
project_id: Ref<IProject>;
|
|
10
|
+
region_id: Ref<IRegion>;
|
|
10
11
|
createdAt: Date;
|
|
11
12
|
updatedAt: Date;
|
|
12
13
|
}
|
package/dist/types/logs.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { IProject } from "./project";
|
|
|
4
4
|
import { IUser } from "./user";
|
|
5
5
|
import { IPreview } from "./project/preview";
|
|
6
6
|
import { ITeam } from "./team";
|
|
7
|
+
import { Ref } from "./ref";
|
|
7
8
|
export interface ILog extends Document {
|
|
8
9
|
name: string;
|
|
9
10
|
key: string;
|
|
@@ -15,19 +16,20 @@ export interface ILog extends Document {
|
|
|
15
16
|
name: string;
|
|
16
17
|
email: string;
|
|
17
18
|
username: string;
|
|
19
|
+
avatar_url?: string;
|
|
18
20
|
};
|
|
19
21
|
};
|
|
20
22
|
source: string;
|
|
21
23
|
status: PROJECT_STATUS;
|
|
22
|
-
project: IProject
|
|
23
|
-
user?: IUser
|
|
24
|
-
team?: ITeam
|
|
24
|
+
project: Ref<IProject>;
|
|
25
|
+
user?: Ref<IUser>;
|
|
26
|
+
team?: Ref<ITeam>;
|
|
25
27
|
jobs: {
|
|
26
28
|
id: number;
|
|
27
29
|
name: string;
|
|
28
30
|
}[];
|
|
29
31
|
environment: ENVIRONMENT;
|
|
30
|
-
preview: IPreview
|
|
32
|
+
preview: Ref<IPreview>;
|
|
31
33
|
startTime: Date | string;
|
|
32
34
|
endTime: Date | string;
|
|
33
35
|
createdAt: Date | string;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Document } from "mongoose";
|
|
2
2
|
import { IPermission } from "./permission";
|
|
3
3
|
import { IMember } from "./member";
|
|
4
|
+
import { Ref } from "./ref";
|
|
4
5
|
export interface IMemberPermission extends Document {
|
|
5
|
-
permission: IPermission
|
|
6
|
-
member: IMember
|
|
6
|
+
permission: Ref<IPermission>;
|
|
7
|
+
member: Ref<IMember>;
|
|
7
8
|
enabled: boolean;
|
|
8
9
|
}
|
package/dist/types/member.d.ts
CHANGED
|
@@ -3,16 +3,18 @@ import { ROLES } from "../enum";
|
|
|
3
3
|
import { ITeam, IUser } from "./";
|
|
4
4
|
import { IMemberPermission } from "./member-permission";
|
|
5
5
|
import { IProjectEnvironment } from "./project-environment";
|
|
6
|
+
import { Ref } from "./ref";
|
|
6
7
|
export interface IMember extends Document {
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
/** Absent until an invited member registers; `email` identifies them until then. */
|
|
9
|
+
user?: Ref<IUser>;
|
|
10
|
+
team: Ref<ITeam>;
|
|
9
11
|
role: ROLES;
|
|
10
12
|
accepted: boolean;
|
|
11
|
-
invitedBy
|
|
13
|
+
invitedBy?: Ref<IUser>;
|
|
12
14
|
email: string;
|
|
13
15
|
featureOnboarded: boolean;
|
|
14
|
-
permissions: IMemberPermission[];
|
|
15
|
-
project_environments: IProjectEnvironment[];
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
permissions: Ref<IMemberPermission>[];
|
|
17
|
+
project_environments: Ref<IProjectEnvironment>[];
|
|
18
|
+
created_at: Date;
|
|
19
|
+
updated_at: Date;
|
|
18
20
|
}
|