@brimble/models 4.0.2 → 4.0.4
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/cashier_subscription.js +1 -0
- package/dist/types/auto-scaling-group.d.ts +1 -2
- package/dist/types/backup-history.d.ts +8 -4
- package/dist/types/cashier_subscription.d.ts +1 -0
- package/dist/types/coupon-redemption.d.ts +8 -4
- package/dist/types/coupon.d.ts +4 -2
- package/dist/types/domain/dns-changelog.d.ts +12 -6
- package/dist/types/drain.d.ts +9 -6
- package/dist/types/license.d.ts +8 -4
- package/dist/types/member.d.ts +0 -1
- package/dist/types/object-storage-usage-segment.d.ts +8 -4
- package/dist/types/pgbouncer-usage-segment.d.ts +8 -5
- package/dist/types/platform-api-key.d.ts +3 -2
- package/dist/types/project-drain-subscription.d.ts +6 -4
- package/dist/types/project_analytics.d.ts +4 -2
- package/dist/types/quest-participation.d.ts +6 -3
- package/dist/types/quest-reward-issuance.d.ts +8 -4
- package/dist/types/ratelimit.d.ts +4 -2
- package/dist/types/restore-history.d.ts +10 -5
- package/dist/types/sandbox-activity.d.ts +8 -4
- package/dist/types/sandbox-snapshot-usage-segment.d.ts +8 -5
- package/dist/types/sandbox-snapshot.d.ts +8 -4
- package/dist/types/sandbox.d.ts +3 -2
- package/dist/types/server.d.ts +5 -3
- package/dist/types/storage.d.ts +23 -20
- package/dist/types/streak-day.d.ts +4 -2
- package/dist/types/streak-event.d.ts +5 -2
- package/dist/types/streak-milestone.d.ts +4 -2
- package/dist/types/streak.d.ts +4 -2
- package/dist/types/volume-usage-segment.d.ts +10 -6
- package/dist/types/volume.d.ts +7 -5
- package/dist/types/worker-run.d.ts +8 -4
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ const cashierSubscriptionSchema = new mongoose_1.Schema({
|
|
|
17
17
|
team_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null },
|
|
18
18
|
plan_type: { type: String, default: null },
|
|
19
19
|
domain_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Domain", default: null },
|
|
20
|
+
extra_build_minutes: { type: Number, default: 0, required: false },
|
|
20
21
|
}, {
|
|
21
22
|
timestamps: {
|
|
22
23
|
createdAt: "created_at",
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ISubscription } from "./subscription";
|
|
4
4
|
import { ITeam } from "./team";
|
|
5
5
|
import { Ref } from "./ref";
|
|
6
6
|
export interface IAutoScalingGroup extends Document {
|
|
7
|
-
_id: Types.ObjectId;
|
|
8
7
|
name: string;
|
|
9
8
|
replicas: number;
|
|
10
9
|
user_id: Ref<IUser>;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { BACKUP_STATUS } from "../enum";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface IBackupHistory extends Document {
|
|
4
|
-
project_id:
|
|
5
|
-
user_id:
|
|
6
|
-
team:
|
|
8
|
+
project_id: Ref<IProject>;
|
|
9
|
+
user_id: Ref<IUser>;
|
|
10
|
+
team: Ref<ITeam> | null;
|
|
7
11
|
status: BACKUP_STATUS;
|
|
8
12
|
trigger: "scheduled" | "manual";
|
|
9
13
|
object_key: string | null;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { CouponRedemptionStatus, CouponScope } from "../enum";
|
|
3
|
+
import { ICoupon } from "./coupon";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface ICouponRedemption extends Document {
|
|
4
|
-
coupon_id:
|
|
8
|
+
coupon_id: Ref<ICoupon>;
|
|
5
9
|
code: string;
|
|
6
|
-
user_id:
|
|
7
|
-
team_id:
|
|
10
|
+
user_id: Ref<IUser>;
|
|
11
|
+
team_id: Ref<ITeam> | null;
|
|
8
12
|
scope: CouponScope;
|
|
9
13
|
domain_name: string | null;
|
|
10
14
|
duration_years: number | null;
|
package/dist/types/coupon.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { CouponDiscountType, CouponScope } from "../enum";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
import { Ref } from "./ref";
|
|
3
5
|
export interface ICoupon extends Document {
|
|
4
6
|
code: string;
|
|
5
7
|
description: string | null;
|
|
@@ -14,7 +16,7 @@ export interface ICoupon extends Document {
|
|
|
14
16
|
max_purchase_amount: number | null;
|
|
15
17
|
allowed_tlds: string[];
|
|
16
18
|
allowed_emails: string[];
|
|
17
|
-
allowed_user_ids:
|
|
19
|
+
allowed_user_ids: Ref<IUser>[];
|
|
18
20
|
max_duration_years: number | null;
|
|
19
21
|
allow_below_cost: boolean;
|
|
20
22
|
starts_at: Date | null;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { DNS_CHANGE_SOURCE, DNS_CHANGE_TYPE } from "../../enum";
|
|
3
|
+
import { IDomain } from ".";
|
|
4
|
+
import { IDns } from "./dns";
|
|
5
|
+
import { IProject } from "../project";
|
|
6
|
+
import { ITeam } from "../team";
|
|
7
|
+
import { IUser } from "../user";
|
|
8
|
+
import { Ref } from "../ref";
|
|
3
9
|
export interface IDnsChangeLog extends Document {
|
|
4
|
-
domain_id:
|
|
10
|
+
domain_id: Ref<IDomain>;
|
|
5
11
|
domain_name: string;
|
|
6
|
-
user_id:
|
|
7
|
-
team_id:
|
|
8
|
-
project:
|
|
12
|
+
user_id: Ref<IUser>;
|
|
13
|
+
team_id: Ref<ITeam>;
|
|
14
|
+
project: Ref<IProject>;
|
|
9
15
|
change_type: DNS_CHANGE_TYPE;
|
|
10
16
|
source: DNS_CHANGE_SOURCE;
|
|
11
17
|
actor: string;
|
|
12
|
-
record_id:
|
|
18
|
+
record_id: Ref<IDns> | null;
|
|
13
19
|
before: Record<string, any> | null;
|
|
14
20
|
after: Record<string, any> | null;
|
|
15
21
|
records: Record<string, any>[];
|
package/dist/types/drain.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { DrainStatus, DrainType, LogSource } from "../enum";
|
|
3
|
+
import { IStorageBucket, IStorageCredential } from "./storage";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface IDrain extends Document {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
team: Types.ObjectId | null;
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team: Ref<ITeam> | null;
|
|
7
10
|
name: string;
|
|
8
11
|
type: DrainType;
|
|
9
12
|
url: string | null;
|
|
@@ -13,8 +16,8 @@ export interface IDrain extends Document {
|
|
|
13
16
|
region: string;
|
|
14
17
|
endpoint: string | null;
|
|
15
18
|
keyPrefix: string;
|
|
16
|
-
storageBucketId:
|
|
17
|
-
storageCredentialId:
|
|
19
|
+
storageBucketId: Ref<IStorageBucket> | null;
|
|
20
|
+
storageCredentialId: Ref<IStorageCredential> | null;
|
|
18
21
|
} | null;
|
|
19
22
|
secretsRef: string;
|
|
20
23
|
sources: LogSource[];
|
package/dist/types/license.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { LicenseStatus } from "../enum";
|
|
3
|
+
import { ISubscription } from "./subscription";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface ILicense extends Document {
|
|
4
8
|
licenseKey: string;
|
|
5
9
|
infisicalIdentity: string;
|
|
6
|
-
userId:
|
|
7
|
-
teamId:
|
|
10
|
+
userId: Ref<IUser>;
|
|
11
|
+
teamId: Ref<ITeam>;
|
|
8
12
|
status: LicenseStatus;
|
|
9
13
|
tag: string;
|
|
10
|
-
subscriptionId:
|
|
14
|
+
subscriptionId: Ref<ISubscription>;
|
|
11
15
|
devices: Array<{
|
|
12
16
|
deviceId: string;
|
|
13
17
|
hostname: string;
|
package/dist/types/member.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ import { IMemberPermission } from "./member-permission";
|
|
|
5
5
|
import { IProjectEnvironment } from "./project-environment";
|
|
6
6
|
import { Ref } from "./ref";
|
|
7
7
|
export interface IMember extends Document {
|
|
8
|
-
/** Absent until an invited member registers; `email` identifies them until then. */
|
|
9
8
|
user: Ref<IUser>;
|
|
10
9
|
team: Ref<ITeam>;
|
|
11
10
|
role: ROLES;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IStorageBucket } from "./storage";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
2
6
|
export interface IObjectStorageUsageSegmentCosts {
|
|
3
7
|
startDate: Date;
|
|
4
8
|
endDate: Date | null;
|
|
5
9
|
}
|
|
6
10
|
export interface IObjectStorageUsageSegment extends Document {
|
|
7
|
-
bucket_id:
|
|
8
|
-
user_id:
|
|
9
|
-
team_id:
|
|
11
|
+
bucket_id: Ref<IStorageBucket>;
|
|
12
|
+
user_id: Ref<IUser>;
|
|
13
|
+
team_id: Ref<ITeam> | null;
|
|
10
14
|
size_gb: number;
|
|
11
15
|
costs: IObjectStorageUsageSegmentCosts;
|
|
12
16
|
billed: boolean;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
2
6
|
export interface IPgBouncerUsageSegmentCosts {
|
|
3
7
|
startDate: Date;
|
|
4
8
|
endDate: Date | null;
|
|
5
9
|
}
|
|
6
10
|
export interface IPgBouncerUsageSegment extends Document {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
team_id: Types.ObjectId | null;
|
|
11
|
+
project_id: Ref<IProject>;
|
|
12
|
+
user_id: Ref<IUser>;
|
|
13
|
+
team_id: Ref<ITeam> | null;
|
|
11
14
|
costs: IPgBouncerUsageSegmentCosts;
|
|
12
15
|
billed: boolean;
|
|
13
16
|
createdAt: Date;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { PlatformApiKeyStatus } from "../enum";
|
|
3
|
+
import { ISubscription } from "./subscription";
|
|
3
4
|
import { ITeam } from "./team";
|
|
4
5
|
import { IUser } from "./user";
|
|
5
6
|
import { Ref } from "./ref";
|
|
@@ -9,7 +10,7 @@ export interface IPlatformApiKey extends Document {
|
|
|
9
10
|
key_prefix: string;
|
|
10
11
|
owner_id: Ref<IUser>;
|
|
11
12
|
team_id: Ref<ITeam> | null;
|
|
12
|
-
subscription_id:
|
|
13
|
+
subscription_id: Ref<ISubscription> | null;
|
|
13
14
|
permissions: string[];
|
|
14
15
|
status: PlatformApiKeyStatus;
|
|
15
16
|
expires_at: Date | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IDrain } from "./drain";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { Ref } from "./ref";
|
|
2
5
|
export interface IProjectDrainSubscription extends Document {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
project: Types.ObjectId;
|
|
6
|
+
drain: Ref<IDrain>;
|
|
7
|
+
project: Ref<IProject>;
|
|
6
8
|
enabled: boolean;
|
|
7
9
|
disabledAt: Date | null;
|
|
8
10
|
createdAt: Date;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { Ref } from "./ref";
|
|
2
4
|
export interface IProjectAnalytics extends Document {
|
|
3
|
-
project:
|
|
5
|
+
project: Ref<IProject>;
|
|
4
6
|
provider: "umami";
|
|
5
7
|
websiteId: string;
|
|
6
8
|
shareId: string | null;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IQuestCampaign } from "./quest-campaign";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
import { Ref } from "./ref";
|
|
2
5
|
export interface IQuestCriterionProgress {
|
|
3
6
|
key: string;
|
|
4
7
|
current: number;
|
|
@@ -6,8 +9,8 @@ export interface IQuestCriterionProgress {
|
|
|
6
9
|
met: boolean;
|
|
7
10
|
}
|
|
8
11
|
export interface IQuestParticipation extends Document {
|
|
9
|
-
campaign_id:
|
|
10
|
-
user_id:
|
|
12
|
+
campaign_id: Ref<IQuestCampaign>;
|
|
13
|
+
user_id: Ref<IUser>;
|
|
11
14
|
joined_at: Date;
|
|
12
15
|
slot_number: number;
|
|
13
16
|
streak_deducted: number;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { QuestRewardStatus, RewardType } from "../enum";
|
|
3
|
+
import { IQuestCampaign } from "./quest-campaign";
|
|
4
|
+
import { IQuestParticipation } from "./quest-participation";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface IQuestIssuedReward {
|
|
4
8
|
type: RewardType;
|
|
5
9
|
metadata: Record<string, unknown>;
|
|
6
10
|
}
|
|
7
11
|
export interface IQuestRewardIssuance extends Document {
|
|
8
|
-
participation_id:
|
|
9
|
-
campaign_id:
|
|
10
|
-
user_id:
|
|
12
|
+
participation_id: Ref<IQuestParticipation>;
|
|
13
|
+
campaign_id: Ref<IQuestCampaign>;
|
|
14
|
+
user_id: Ref<IUser>;
|
|
11
15
|
rewards: IQuestIssuedReward[];
|
|
12
16
|
status: QuestRewardStatus;
|
|
13
17
|
claimed_at: Date;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { Ref } from "./ref";
|
|
2
4
|
export type RateLimitMatcher = {
|
|
3
5
|
methods: string[];
|
|
4
6
|
paths: string[];
|
|
@@ -28,7 +30,7 @@ export type RatelimitConfig = {
|
|
|
28
30
|
sweepInterval: string;
|
|
29
31
|
};
|
|
30
32
|
export interface IRatelimit extends Document {
|
|
31
|
-
project:
|
|
33
|
+
project: Ref<IProject>;
|
|
32
34
|
enabled: boolean;
|
|
33
35
|
zones: RateLimitZone[];
|
|
34
36
|
distributed: DistributedRateLimitConfig;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { RESTORE_STATUS } from "../enum";
|
|
3
|
+
import { IBackupHistory } from "./backup-history";
|
|
4
|
+
import { IProject } from "./project";
|
|
5
|
+
import { ITeam } from "./team";
|
|
6
|
+
import { IUser } from "./user";
|
|
7
|
+
import { Ref } from "./ref";
|
|
3
8
|
export interface IRestoreHistory extends Document {
|
|
4
|
-
project_id:
|
|
5
|
-
backup_history_id:
|
|
6
|
-
user_id:
|
|
7
|
-
team:
|
|
9
|
+
project_id: Ref<IProject>;
|
|
10
|
+
backup_history_id: Ref<IBackupHistory>;
|
|
11
|
+
user_id: Ref<IUser>;
|
|
12
|
+
team: Ref<ITeam> | null;
|
|
8
13
|
status: RESTORE_STATUS;
|
|
9
14
|
object_key: string;
|
|
10
15
|
engine: string | null;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ISandbox } from "./sandbox";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
2
6
|
export interface ISandboxActivity extends Document {
|
|
3
|
-
sandbox_id:
|
|
4
|
-
user_id:
|
|
5
|
-
team:
|
|
7
|
+
sandbox_id: Ref<ISandbox>;
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team: Ref<ITeam> | null;
|
|
6
10
|
command: string;
|
|
7
11
|
started_at: Date;
|
|
8
12
|
ended_at: Date | null;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { ISandboxSnapshot } from "./sandbox-snapshot";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
2
6
|
export interface ISandboxSnapshotUsageSegmentCosts {
|
|
3
7
|
startDate: Date;
|
|
4
8
|
endDate: Date | null;
|
|
5
9
|
}
|
|
6
10
|
export interface ISandboxSnapshotUsageSegment extends Document {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
team_id: Types.ObjectId | null;
|
|
11
|
+
snapshot_id: Ref<ISandboxSnapshot>;
|
|
12
|
+
user_id: Ref<IUser>;
|
|
13
|
+
team_id: Ref<ITeam> | null;
|
|
11
14
|
size_gb: number;
|
|
12
15
|
costs: ISandboxSnapshotUsageSegmentCosts;
|
|
13
16
|
billed: boolean;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { SANDBOX_SNAPSHOT_STATUS } from "../enum";
|
|
3
|
+
import { ISandbox } from "./sandbox";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface ISandboxSnapshot extends Document {
|
|
4
|
-
user_id:
|
|
5
|
-
team:
|
|
6
|
-
sandbox_id:
|
|
8
|
+
user_id: Ref<IUser>;
|
|
9
|
+
team: Ref<ITeam> | null;
|
|
10
|
+
sandbox_id: Ref<ISandbox>;
|
|
7
11
|
name: string;
|
|
8
12
|
image_tag: string;
|
|
9
13
|
source_template: string;
|
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { IUser } from "./user";
|
|
3
3
|
import { ITeam } from "./team";
|
|
4
4
|
import { IProjectEnvironment } from "./project-environment";
|
|
5
5
|
import { SANDBOX_STATUS, SANDBOX_DESTROY_REASON, SANDBOX_EGRESS_MODE } from "../enum";
|
|
6
6
|
import { IRegion } from "./region";
|
|
7
|
+
import { ISandboxSnapshot } from "./sandbox-snapshot";
|
|
7
8
|
import { Ref } from "./ref";
|
|
8
9
|
export interface ISandboxSpecs {
|
|
9
10
|
cpu: number;
|
|
@@ -42,7 +43,7 @@ export interface ISandbox extends Document {
|
|
|
42
43
|
paused_at: Date | null;
|
|
43
44
|
paused_by: string | null;
|
|
44
45
|
image_override: string | null;
|
|
45
|
-
from_snapshot:
|
|
46
|
+
from_snapshot: Ref<ISandboxSnapshot> | null;
|
|
46
47
|
snapshot_mode: "automatic" | "manual";
|
|
47
48
|
snapshot_frequency: string | null;
|
|
48
49
|
isDeleted: boolean;
|
package/dist/types/server.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { SERVER_STATUS, SERVER_PROTOCOL } from "../enum";
|
|
3
3
|
import { IRegion } from "./region";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
4
6
|
import { Ref } from "./ref";
|
|
5
7
|
export interface IServer extends Document {
|
|
6
8
|
name: string;
|
|
@@ -10,8 +12,8 @@ export interface IServer extends Document {
|
|
|
10
12
|
domain: string;
|
|
11
13
|
node_id: string;
|
|
12
14
|
force_deactivation: boolean;
|
|
13
|
-
userId:
|
|
14
|
-
teamId:
|
|
15
|
+
userId: Ref<IUser>;
|
|
16
|
+
teamId: Ref<ITeam>;
|
|
15
17
|
ip_address: string;
|
|
16
18
|
private_ip_address: string;
|
|
17
19
|
tunnel_token: string;
|
package/dist/types/storage.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
2
3
|
import { IProjectEnvironment } from "./project-environment";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
3
6
|
import { Ref } from "./ref";
|
|
4
7
|
import { StorageBucketStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, StorageTokenStatus, StorageUploadStatus } from "../enum";
|
|
5
8
|
export type StorageTokenPermission = "read" | "write" | "delete" | "list" | "admin";
|
|
@@ -23,10 +26,10 @@ export type StorageLifecycleRuleTransition = {
|
|
|
23
26
|
};
|
|
24
27
|
export interface IStorageBucket extends Document {
|
|
25
28
|
name: string;
|
|
26
|
-
project:
|
|
29
|
+
project: Ref<IProject>;
|
|
27
30
|
project_environment: Ref<IProjectEnvironment>;
|
|
28
|
-
user_id:
|
|
29
|
-
team:
|
|
31
|
+
user_id: Ref<IUser>;
|
|
32
|
+
team: Ref<ITeam>;
|
|
30
33
|
bucket_name: string;
|
|
31
34
|
is_public: boolean;
|
|
32
35
|
versioning: boolean;
|
|
@@ -45,8 +48,8 @@ export interface IStorageBucket extends Document {
|
|
|
45
48
|
updatedAt: Date;
|
|
46
49
|
}
|
|
47
50
|
export interface IStorageObject extends Document {
|
|
48
|
-
bucket:
|
|
49
|
-
project:
|
|
51
|
+
bucket: Ref<IStorageBucket>;
|
|
52
|
+
project: Ref<IProject>;
|
|
50
53
|
project_environment: Ref<IProjectEnvironment>;
|
|
51
54
|
key: string;
|
|
52
55
|
path: string;
|
|
@@ -59,8 +62,8 @@ export interface IStorageObject extends Document {
|
|
|
59
62
|
updatedAt: Date;
|
|
60
63
|
}
|
|
61
64
|
export interface IStorageUpload extends Document {
|
|
62
|
-
bucket:
|
|
63
|
-
project:
|
|
65
|
+
bucket: Ref<IStorageBucket>;
|
|
66
|
+
project: Ref<IProject>;
|
|
64
67
|
project_environment: Ref<IProjectEnvironment>;
|
|
65
68
|
key: string;
|
|
66
69
|
path: string;
|
|
@@ -77,10 +80,10 @@ export interface IStorageToken extends Document {
|
|
|
77
80
|
name: string;
|
|
78
81
|
token_hash: string;
|
|
79
82
|
prefix: string;
|
|
80
|
-
project:
|
|
81
|
-
buckets:
|
|
82
|
-
user_id:
|
|
83
|
-
team:
|
|
83
|
+
project: Ref<IProject>;
|
|
84
|
+
buckets: Ref<IStorageBucket>[];
|
|
85
|
+
user_id: Ref<IUser>;
|
|
86
|
+
team: Ref<ITeam>;
|
|
84
87
|
permissions: StorageTokenPermission[];
|
|
85
88
|
status: StorageTokenStatus;
|
|
86
89
|
last_used_at: Date;
|
|
@@ -90,11 +93,11 @@ export interface IStorageToken extends Document {
|
|
|
90
93
|
}
|
|
91
94
|
export interface IStorageCredential extends Document {
|
|
92
95
|
name: string;
|
|
93
|
-
bucket:
|
|
94
|
-
project:
|
|
96
|
+
bucket: Ref<IStorageBucket>;
|
|
97
|
+
project: Ref<IProject>;
|
|
95
98
|
project_environment: Ref<IProjectEnvironment>;
|
|
96
|
-
user_id:
|
|
97
|
-
team:
|
|
99
|
+
user_id: Ref<IUser>;
|
|
100
|
+
team: Ref<ITeam>;
|
|
98
101
|
provider: string;
|
|
99
102
|
provider_org_id: string;
|
|
100
103
|
access_key_id: string;
|
|
@@ -107,11 +110,11 @@ export interface IStorageCredential extends Document {
|
|
|
107
110
|
updatedAt: Date;
|
|
108
111
|
}
|
|
109
112
|
export interface IStorageMigration extends Document {
|
|
110
|
-
bucket:
|
|
111
|
-
project:
|
|
113
|
+
bucket: Ref<IStorageBucket>;
|
|
114
|
+
project: Ref<IProject>;
|
|
112
115
|
project_environment: Ref<IProjectEnvironment>;
|
|
113
|
-
user_id:
|
|
114
|
-
team:
|
|
116
|
+
user_id: Ref<IUser>;
|
|
117
|
+
team: Ref<ITeam>;
|
|
115
118
|
source_bucket: string;
|
|
116
119
|
source_region: string;
|
|
117
120
|
source_endpoint: string;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IUser } from "./user";
|
|
3
|
+
import { Ref } from "./ref";
|
|
2
4
|
export interface IStreakDay extends Document {
|
|
3
|
-
user_id:
|
|
5
|
+
user_id: Ref<IUser>;
|
|
4
6
|
day: Date;
|
|
5
7
|
action_types: string[];
|
|
6
8
|
is_milestone_day: boolean;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { Document, Types } from "mongoose";
|
|
2
2
|
import { QualifyingActionType } from "../enum";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { Ref } from "./ref";
|
|
3
6
|
export interface IStreakEvent extends Document {
|
|
4
|
-
user_id:
|
|
7
|
+
user_id: Ref<IUser>;
|
|
5
8
|
action_type: QualifyingActionType;
|
|
6
|
-
project_id:
|
|
9
|
+
project_id: Ref<IProject> | null;
|
|
7
10
|
resource_id: Types.ObjectId | null;
|
|
8
11
|
service_type: string | null;
|
|
9
12
|
system_day: Date;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { MilestoneType } from "../enum";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
import { Ref } from "./ref";
|
|
3
5
|
export interface IStreakMilestone extends Document {
|
|
4
|
-
user_id:
|
|
6
|
+
user_id: Ref<IUser>;
|
|
5
7
|
type: MilestoneType;
|
|
6
8
|
action: string;
|
|
7
9
|
date: Date;
|
package/dist/types/streak.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { MilestoneType } from "../enum";
|
|
3
|
+
import { IUser } from "./user";
|
|
4
|
+
import { Ref } from "./ref";
|
|
3
5
|
export interface IStreakMilestoneRef {
|
|
4
6
|
type: MilestoneType;
|
|
5
7
|
date: Date;
|
|
6
8
|
}
|
|
7
9
|
export interface IStreak extends Document {
|
|
8
|
-
user_id:
|
|
10
|
+
user_id: Ref<IUser>;
|
|
9
11
|
current_count: number;
|
|
10
12
|
longest_count: number;
|
|
11
13
|
last_active_day: Date | null;
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
import { IVolume } from "./volume";
|
|
6
|
+
import { Ref } from "./ref";
|
|
2
7
|
export interface IVolumeUsageSegmentCosts {
|
|
3
8
|
startDate: Date;
|
|
4
9
|
endDate: Date | null;
|
|
5
10
|
}
|
|
6
11
|
export interface IVolumeUsageSegment extends Document {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
team_id: Types.ObjectId | null;
|
|
12
|
+
volume_id: Ref<IVolume>;
|
|
13
|
+
user_id: Ref<IUser>;
|
|
14
|
+
team_id: Ref<ITeam> | null;
|
|
11
15
|
size_gb: number;
|
|
12
16
|
volume_name: string | null;
|
|
13
|
-
project_id:
|
|
17
|
+
project_id: Ref<IProject> | null;
|
|
14
18
|
project_name: string | null;
|
|
15
19
|
costs: IVolumeUsageSegmentCosts;
|
|
16
20
|
billed: boolean;
|
package/dist/types/volume.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { Document
|
|
2
|
-
import {
|
|
3
|
-
import { ITeam } from "./team";
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
4
3
|
import { IRegion } from "./region";
|
|
4
|
+
import { ISandbox } from "./sandbox";
|
|
5
|
+
import { ITeam } from "./team";
|
|
6
|
+
import { IUser } from "./user";
|
|
5
7
|
import { Ref } from "./ref";
|
|
6
8
|
export interface IVolume extends Document {
|
|
7
9
|
name: string;
|
|
@@ -13,8 +15,8 @@ export interface IVolume extends Document {
|
|
|
13
15
|
mount_path: string;
|
|
14
16
|
csi_volume_id: string | null;
|
|
15
17
|
region: Ref<IRegion> | null;
|
|
16
|
-
attached_sandbox_id:
|
|
17
|
-
attached_project_id:
|
|
18
|
+
attached_sandbox_id: Ref<ISandbox> | null;
|
|
19
|
+
attached_project_id: Ref<IProject> | null;
|
|
18
20
|
last_attached_at: Date | null;
|
|
19
21
|
deleted_at: Date | null;
|
|
20
22
|
created_at: Date;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
2
|
import { WorkerRunStatus, WorkerRunTrigger } from "../enum";
|
|
3
|
+
import { IProject } from "./project";
|
|
4
|
+
import { ITeam } from "./team";
|
|
5
|
+
import { IUser } from "./user";
|
|
6
|
+
import { Ref } from "./ref";
|
|
3
7
|
export interface IWorkerRun extends Document {
|
|
4
|
-
project:
|
|
5
|
-
user_id:
|
|
6
|
-
team:
|
|
8
|
+
project: Ref<IProject>;
|
|
9
|
+
user_id: Ref<IUser>;
|
|
10
|
+
team: Ref<ITeam> | null;
|
|
7
11
|
parentJobId: string | null;
|
|
8
12
|
childJobId: string | null;
|
|
9
13
|
namespace: string | null;
|