@brimble/models 4.0.1 → 4.0.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/dist/types/activity-log.d.ts +8 -8
- package/dist/types/agent-design-skill-revision.d.ts +1 -1
- package/dist/types/alert-rule.d.ts +1 -1
- package/dist/types/app-message.d.ts +4 -4
- package/dist/types/auto-scaling-group.d.ts +3 -4
- package/dist/types/backup-history.d.ts +8 -4
- package/dist/types/cashier_subscription.d.ts +1 -1
- package/dist/types/collab-annotation.d.ts +13 -13
- package/dist/types/collab-comment.d.ts +6 -6
- package/dist/types/collab-integration.d.ts +1 -1
- package/dist/types/collab-settings.d.ts +2 -2
- package/dist/types/collab-share-token.d.ts +1 -1
- package/dist/types/compute.d.ts +11 -11
- package/dist/types/coupon-redemption.d.ts +16 -12
- package/dist/types/coupon.d.ts +15 -13
- package/dist/types/db-image.d.ts +3 -3
- package/dist/types/domain/dns-changelog.d.ts +16 -10
- package/dist/types/domain/dns.d.ts +1 -1
- package/dist/types/domain/index.d.ts +6 -6
- package/dist/types/domain/transfer.d.ts +13 -13
- package/dist/types/drain.d.ts +18 -15
- package/dist/types/email-dead-letter.d.ts +3 -3
- package/dist/types/env.d.ts +1 -1
- package/dist/types/environment-variable.d.ts +1 -1
- package/dist/types/following.d.ts +2 -2
- package/dist/types/framework.d.ts +9 -9
- package/dist/types/git.d.ts +12 -12
- package/dist/types/integration.d.ts +7 -7
- package/dist/types/intention.d.ts +1 -1
- package/dist/types/job.d.ts +9 -9
- package/dist/types/license.d.ts +8 -4
- package/dist/types/logs.d.ts +3 -3
- package/dist/types/member.d.ts +2 -2
- package/dist/types/object-storage-usage-segment.d.ts +8 -4
- package/dist/types/pgbouncer-usage-segment.d.ts +8 -5
- package/dist/types/plan_configuration.d.ts +1 -1
- package/dist/types/platform-api-key.d.ts +6 -5
- package/dist/types/project/index.d.ts +31 -31
- package/dist/types/project/preview.d.ts +1 -1
- package/dist/types/project-drain-subscription.d.ts +7 -5
- package/dist/types/project-environment.d.ts +2 -2
- package/dist/types/project-network-settings.d.ts +2 -2
- package/dist/types/project_analytics.d.ts +5 -3
- package/dist/types/quest-campaign.d.ts +2 -2
- package/dist/types/quest-participation.d.ts +8 -5
- package/dist/types/quest-reward-issuance.d.ts +10 -6
- package/dist/types/ratelimit.d.ts +20 -18
- package/dist/types/ref.d.ts +3 -2
- package/dist/types/region.d.ts +15 -15
- package/dist/types/restore-history.d.ts +10 -5
- package/dist/types/role.d.ts +2 -2
- package/dist/types/sandbox-activity.d.ts +10 -6
- package/dist/types/sandbox-snapshot-usage-segment.d.ts +8 -5
- package/dist/types/sandbox-snapshot.d.ts +8 -4
- package/dist/types/sandbox-usage-segment.d.ts +2 -2
- package/dist/types/sandbox.d.ts +4 -3
- package/dist/types/server.d.ts +15 -13
- package/dist/types/storage.d.ts +59 -56
- package/dist/types/streak-day.d.ts +6 -4
- package/dist/types/streak-event.d.ts +7 -4
- package/dist/types/streak-milestone.d.ts +6 -4
- package/dist/types/streak.d.ts +6 -4
- package/dist/types/subscription.d.ts +1 -1
- package/dist/types/ticket.d.ts +5 -5
- package/dist/types/user.d.ts +4 -4
- package/dist/types/volume-usage-segment.d.ts +12 -8
- package/dist/types/volume.d.ts +13 -11
- package/dist/types/webhook-setting.d.ts +2 -2
- package/dist/types/worker-run.d.ts +8 -4
- package/package.json +1 -1
|
@@ -2,13 +2,13 @@ import { Document } from "mongoose";
|
|
|
2
2
|
import { INTEGRATION_PROVIDERS, INTEGRATION_TYPES } from "../enum";
|
|
3
3
|
export interface IIntegration extends Document {
|
|
4
4
|
user_id: string;
|
|
5
|
-
team_id
|
|
6
|
-
app_id
|
|
5
|
+
team_id: string;
|
|
6
|
+
app_id: string;
|
|
7
7
|
name: INTEGRATION_PROVIDERS;
|
|
8
|
-
scope_description
|
|
9
|
-
hook
|
|
10
|
-
reference
|
|
11
|
-
token
|
|
8
|
+
scope_description: string[];
|
|
9
|
+
hook: string;
|
|
10
|
+
reference: string;
|
|
11
|
+
token: string;
|
|
12
12
|
type: INTEGRATION_TYPES;
|
|
13
|
-
extra
|
|
13
|
+
extra: any;
|
|
14
14
|
}
|
package/dist/types/job.d.ts
CHANGED
|
@@ -6,14 +6,14 @@ export interface IJob extends Document {
|
|
|
6
6
|
url: string;
|
|
7
7
|
method: string;
|
|
8
8
|
schedule: string;
|
|
9
|
-
headers
|
|
10
|
-
maxAttempts
|
|
11
|
-
attempts
|
|
9
|
+
headers: Map<string, string>;
|
|
10
|
+
maxAttempts: number;
|
|
11
|
+
attempts: number;
|
|
12
12
|
isRecurring: boolean;
|
|
13
|
-
lastRun
|
|
14
|
-
nextRun
|
|
15
|
-
body
|
|
16
|
-
status
|
|
17
|
-
createdAt
|
|
18
|
-
updatedAt
|
|
13
|
+
lastRun: Date;
|
|
14
|
+
nextRun: Date;
|
|
15
|
+
body: any;
|
|
16
|
+
status: JobStatus;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
updatedAt: Date;
|
|
19
19
|
}
|
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/logs.d.ts
CHANGED
|
@@ -16,14 +16,14 @@ export interface ILog extends Document {
|
|
|
16
16
|
name: string;
|
|
17
17
|
email: string;
|
|
18
18
|
username: string;
|
|
19
|
-
avatar_url
|
|
19
|
+
avatar_url: string;
|
|
20
20
|
};
|
|
21
21
|
};
|
|
22
22
|
source: string;
|
|
23
23
|
status: PROJECT_STATUS;
|
|
24
24
|
project: Ref<IProject>;
|
|
25
|
-
user
|
|
26
|
-
team
|
|
25
|
+
user: Ref<IUser>;
|
|
26
|
+
team: Ref<ITeam>;
|
|
27
27
|
jobs: {
|
|
28
28
|
id: number;
|
|
29
29
|
name: string;
|
package/dist/types/member.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ import { IProjectEnvironment } from "./project-environment";
|
|
|
6
6
|
import { Ref } from "./ref";
|
|
7
7
|
export interface IMember extends Document {
|
|
8
8
|
/** Absent until an invited member registers; `email` identifies them until then. */
|
|
9
|
-
user
|
|
9
|
+
user: Ref<IUser>;
|
|
10
10
|
team: Ref<ITeam>;
|
|
11
11
|
role: ROLES;
|
|
12
12
|
accepted: boolean;
|
|
13
|
-
invitedBy
|
|
13
|
+
invitedBy: Ref<IUser>;
|
|
14
14
|
email: string;
|
|
15
15
|
featureOnboarded: boolean;
|
|
16
16
|
permissions: Ref<IMemberPermission>[];
|
|
@@ -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;
|
|
@@ -39,7 +39,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
39
39
|
unlimited_projects: boolean;
|
|
40
40
|
webhook_enabled: boolean;
|
|
41
41
|
can_deploy_all_applications: boolean;
|
|
42
|
-
stripe_prices
|
|
42
|
+
stripe_prices: Record<string, string>;
|
|
43
43
|
storage_bucket_enabled: boolean;
|
|
44
44
|
storage_bucket_quota_gb: number;
|
|
45
45
|
sandbox_max_count: number;
|
|
@@ -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";
|
|
@@ -8,12 +9,12 @@ export interface IPlatformApiKey extends Document {
|
|
|
8
9
|
key_id: string;
|
|
9
10
|
key_prefix: string;
|
|
10
11
|
owner_id: Ref<IUser>;
|
|
11
|
-
team_id
|
|
12
|
-
subscription_id
|
|
12
|
+
team_id: Ref<ITeam> | null;
|
|
13
|
+
subscription_id: Ref<ISubscription> | null;
|
|
13
14
|
permissions: string[];
|
|
14
15
|
status: PlatformApiKeyStatus;
|
|
15
|
-
expires_at
|
|
16
|
-
last_used_at
|
|
16
|
+
expires_at: Date | null;
|
|
17
|
+
last_used_at: Date | null;
|
|
17
18
|
createdAt: Date;
|
|
18
19
|
updatedAt: Date;
|
|
19
20
|
}
|
|
@@ -26,15 +26,15 @@ export interface IPgBouncerConfig {
|
|
|
26
26
|
}
|
|
27
27
|
export interface IProject extends Document {
|
|
28
28
|
name: string;
|
|
29
|
-
healthCheckPath
|
|
30
|
-
preStartCommand
|
|
29
|
+
healthCheckPath: string;
|
|
30
|
+
preStartCommand: string;
|
|
31
31
|
backupEnabled: boolean;
|
|
32
32
|
backup_mode: "automatic" | "manual";
|
|
33
33
|
backup_schedule: string;
|
|
34
34
|
http2: boolean;
|
|
35
|
-
free_tier_expires_at
|
|
36
|
-
free_tier_expiry_notified_at
|
|
37
|
-
buildCacheEnabled
|
|
35
|
+
free_tier_expires_at: Date | null;
|
|
36
|
+
free_tier_expiry_notified_at: Date | null;
|
|
37
|
+
buildCacheEnabled: boolean;
|
|
38
38
|
alerting_enabled: boolean;
|
|
39
39
|
logDrainsEnabled: boolean;
|
|
40
40
|
domains: Array<Ref<IDomain>>;
|
|
@@ -47,20 +47,20 @@ export interface IProject extends Document {
|
|
|
47
47
|
tlsEnabled: boolean;
|
|
48
48
|
sendReport: boolean;
|
|
49
49
|
pgbouncerEnabled: boolean;
|
|
50
|
-
pgbouncerConfig
|
|
51
|
-
tlsEnabledAt
|
|
52
|
-
tlsCaObjectKey
|
|
53
|
-
tlsServerCertExpiresAt
|
|
54
|
-
tlsHost
|
|
55
|
-
tlsPort
|
|
56
|
-
tlsSslModeHint
|
|
50
|
+
pgbouncerConfig: IPgBouncerConfig | null;
|
|
51
|
+
tlsEnabledAt: Date | null;
|
|
52
|
+
tlsCaObjectKey: string | null;
|
|
53
|
+
tlsServerCertExpiresAt: Date | null;
|
|
54
|
+
tlsHost: string | null;
|
|
55
|
+
tlsPort: number | null;
|
|
56
|
+
tlsSslModeHint: string | null;
|
|
57
57
|
dbImage: Ref<IDbImage>;
|
|
58
58
|
public: boolean;
|
|
59
59
|
installCommand: string;
|
|
60
60
|
buildCommand: string;
|
|
61
61
|
startCommand: string;
|
|
62
62
|
outputDirectory: string;
|
|
63
|
-
runtimeVersions
|
|
63
|
+
runtimeVersions: RuntimeVersions | null;
|
|
64
64
|
workBenchEnabled: boolean;
|
|
65
65
|
user_id: Ref<IUser>;
|
|
66
66
|
monitor_id: string;
|
|
@@ -74,8 +74,8 @@ export interface IProject extends Document {
|
|
|
74
74
|
installationId: string | number;
|
|
75
75
|
git: GIT_TYPE;
|
|
76
76
|
} | null;
|
|
77
|
-
rootDir
|
|
78
|
-
dockerfile
|
|
77
|
+
rootDir: string;
|
|
78
|
+
dockerfile: string;
|
|
79
79
|
team: Ref<ITeam>;
|
|
80
80
|
server: Ref<IServer>;
|
|
81
81
|
isPrivate: boolean;
|
|
@@ -88,10 +88,10 @@ export interface IProject extends Document {
|
|
|
88
88
|
starred: boolean;
|
|
89
89
|
passwordEnabled: boolean;
|
|
90
90
|
disabled: boolean;
|
|
91
|
-
disabled_at
|
|
92
|
-
disabled_by
|
|
91
|
+
disabled_at: Date | null;
|
|
92
|
+
disabled_by: PROJECT_DISABLED_BY | null;
|
|
93
93
|
isDeleted: boolean;
|
|
94
|
-
deletedAt
|
|
94
|
+
deletedAt: Date | null;
|
|
95
95
|
authEnabled: boolean;
|
|
96
96
|
password: string | null;
|
|
97
97
|
deployedInCluster: boolean;
|
|
@@ -106,7 +106,7 @@ export interface IProject extends Document {
|
|
|
106
106
|
tracking_token: string;
|
|
107
107
|
from: string;
|
|
108
108
|
previews: Ref<IPreview>[];
|
|
109
|
-
project_environment
|
|
109
|
+
project_environment: Ref<IProjectEnvironment>;
|
|
110
110
|
inherit_environment_vars: boolean;
|
|
111
111
|
replicas: number;
|
|
112
112
|
vaultPath: string | null;
|
|
@@ -121,20 +121,20 @@ export interface IProject extends Document {
|
|
|
121
121
|
isPaused: boolean;
|
|
122
122
|
paused_by: string | null;
|
|
123
123
|
billable: boolean;
|
|
124
|
-
serviceType
|
|
125
|
-
cronEnabled
|
|
126
|
-
cronExpression
|
|
127
|
-
cronTimezone
|
|
128
|
-
cronCommand
|
|
129
|
-
last_backup_url
|
|
130
|
-
last_backup_at
|
|
124
|
+
serviceType: ServiceType;
|
|
125
|
+
cronEnabled: boolean;
|
|
126
|
+
cronExpression: string | null;
|
|
127
|
+
cronTimezone: string | null;
|
|
128
|
+
cronCommand: string | null;
|
|
129
|
+
last_backup_url: string;
|
|
130
|
+
last_backup_at: Date;
|
|
131
131
|
replica_ready: boolean;
|
|
132
|
-
autoscaling_group
|
|
132
|
+
autoscaling_group: Ref<IAutoScalingGroup>;
|
|
133
133
|
isPaid: boolean;
|
|
134
|
-
hasUpdates
|
|
135
|
-
whiteListedIps
|
|
136
|
-
diskSize
|
|
137
|
-
persistent_mount_path
|
|
134
|
+
hasUpdates: boolean;
|
|
135
|
+
whiteListedIps: string[];
|
|
136
|
+
diskSize: number;
|
|
137
|
+
persistent_mount_path: string;
|
|
138
138
|
volumeMount: string;
|
|
139
139
|
volume: Ref<IVolume> | null;
|
|
140
140
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
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
|
-
disabledAt
|
|
9
|
+
disabledAt: Date | null;
|
|
8
10
|
createdAt: Date;
|
|
9
11
|
updatedAt: Date;
|
|
10
12
|
}
|
|
@@ -6,8 +6,8 @@ export interface IProjectEnvironment extends Document {
|
|
|
6
6
|
name: string;
|
|
7
7
|
slug: string;
|
|
8
8
|
owner: Ref<IUser>;
|
|
9
|
-
team
|
|
10
|
-
inherit_from
|
|
9
|
+
team: Ref<ITeam>;
|
|
10
|
+
inherit_from: Ref<IProjectEnvironment>;
|
|
11
11
|
isDefault: boolean;
|
|
12
12
|
createdAt: Date;
|
|
13
13
|
updatedAt: Date;
|
|
@@ -1,9 +1,11 @@
|
|
|
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
|
-
shareId
|
|
8
|
+
shareId: string | null;
|
|
7
9
|
domain: string;
|
|
8
10
|
enabled: boolean;
|
|
9
11
|
createdAt: Date;
|
|
@@ -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,14 +9,14 @@ 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;
|
|
14
17
|
criteria_progress: IQuestCriterionProgress[];
|
|
15
18
|
qualifier_met: boolean;
|
|
16
19
|
claimed_at: Date | null;
|
|
17
|
-
created_at
|
|
18
|
-
updated_at
|
|
20
|
+
created_at: Date;
|
|
21
|
+
updated_at: Date;
|
|
19
22
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
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;
|
|
14
18
|
fulfilled_at: Date | null;
|
|
15
|
-
created_at
|
|
16
|
-
updated_at
|
|
19
|
+
created_at: Date;
|
|
20
|
+
updated_at: Date;
|
|
17
21
|
}
|
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from "mongoose";
|
|
2
|
+
import { IProject } from "./project";
|
|
3
|
+
import { Ref } from "./ref";
|
|
2
4
|
export type RateLimitMatcher = {
|
|
3
|
-
methods
|
|
4
|
-
paths
|
|
5
|
+
methods: string[];
|
|
6
|
+
paths: string[];
|
|
5
7
|
};
|
|
6
8
|
export type RateLimitZone = {
|
|
7
9
|
name: string;
|
|
8
10
|
key: string;
|
|
9
11
|
window: string;
|
|
10
12
|
events: number;
|
|
11
|
-
matcher
|
|
12
|
-
ipv4Prefix
|
|
13
|
-
ipv6Prefix
|
|
13
|
+
matcher: RateLimitMatcher;
|
|
14
|
+
ipv4Prefix: number;
|
|
15
|
+
ipv6Prefix: number;
|
|
14
16
|
};
|
|
15
17
|
export type DistributedRateLimitConfig = {
|
|
16
18
|
enabled: boolean;
|
|
17
|
-
readInterval
|
|
18
|
-
writeInterval
|
|
19
|
-
purgeAge
|
|
19
|
+
readInterval: string;
|
|
20
|
+
writeInterval: string;
|
|
21
|
+
purgeAge: string;
|
|
20
22
|
};
|
|
21
23
|
export type RatelimitConfig = {
|
|
22
24
|
enabled: boolean;
|
|
23
25
|
zones: RateLimitZone[];
|
|
24
|
-
distributed
|
|
25
|
-
logKey
|
|
26
|
-
disableMetrics
|
|
27
|
-
jitter
|
|
28
|
-
sweepInterval
|
|
26
|
+
distributed: DistributedRateLimitConfig;
|
|
27
|
+
logKey: boolean;
|
|
28
|
+
disableMetrics: boolean;
|
|
29
|
+
jitter: number;
|
|
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
|
-
distributed
|
|
36
|
+
distributed: DistributedRateLimitConfig;
|
|
35
37
|
logKey: boolean;
|
|
36
38
|
disableMetrics: boolean;
|
|
37
|
-
jitter
|
|
38
|
-
sweepInterval
|
|
39
|
+
jitter: number;
|
|
40
|
+
sweepInterval: string;
|
|
39
41
|
createdAt: Date;
|
|
40
42
|
updatedAt: Date;
|
|
41
43
|
}
|
package/dist/types/ref.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Types } from "mongoose";
|
|
2
2
|
/**
|
|
3
|
-
* A Mongoose reference field. Holds an `ObjectId` unless the query
|
|
4
|
-
*
|
|
3
|
+
* A Mongoose reference field. Holds an `ObjectId` unless the query that loaded
|
|
4
|
+
* the document populated it. Type that query's result as `Populated<T, K>`
|
|
5
|
+
* (or a named alias of it) so callers already know which refs are documents.
|
|
5
6
|
*/
|
|
6
7
|
export type Ref<T> = T | Types.ObjectId;
|
|
7
8
|
type PopulatedField<V> = V extends (infer E)[] ? Exclude<E, Types.ObjectId>[] : Exclude<V, Types.ObjectId>;
|
package/dist/types/region.d.ts
CHANGED
|
@@ -2,31 +2,31 @@ import { Types, Document } from "mongoose";
|
|
|
2
2
|
import { REGION_CONTINENT, VOLUME_BACKEND } from "../enum";
|
|
3
3
|
export type RegionType = "web" | "database" | "sandbox";
|
|
4
4
|
export interface IRegionCsiConfig {
|
|
5
|
-
plugin_id
|
|
6
|
-
topology_path
|
|
7
|
-
require_topology
|
|
8
|
-
availability_zone
|
|
9
|
-
parameters
|
|
10
|
-
parameters_env
|
|
11
|
-
fs_type
|
|
12
|
-
attachment_modes
|
|
5
|
+
plugin_id: string;
|
|
6
|
+
topology_path: string;
|
|
7
|
+
require_topology: boolean;
|
|
8
|
+
availability_zone: string;
|
|
9
|
+
parameters: Record<string, string>;
|
|
10
|
+
parameters_env: Record<string, string>;
|
|
11
|
+
fs_type: string;
|
|
12
|
+
attachment_modes: string[];
|
|
13
13
|
}
|
|
14
14
|
export interface IRegion extends Document {
|
|
15
15
|
_id: Types.ObjectId;
|
|
16
16
|
name: string;
|
|
17
17
|
country: string;
|
|
18
18
|
cname: string;
|
|
19
|
-
continent
|
|
20
|
-
enabled
|
|
19
|
+
continent: REGION_CONTINENT;
|
|
20
|
+
enabled: boolean;
|
|
21
21
|
dbVolumePath: string;
|
|
22
22
|
is_paid: boolean;
|
|
23
23
|
logo: string;
|
|
24
24
|
provider: string;
|
|
25
25
|
provider_identifier: string;
|
|
26
26
|
storage_pricing_factor: number;
|
|
27
|
-
floating_ip
|
|
28
|
-
type
|
|
29
|
-
ceph_cluster_id
|
|
30
|
-
volume_backend
|
|
31
|
-
csi
|
|
27
|
+
floating_ip: string;
|
|
28
|
+
type: RegionType;
|
|
29
|
+
ceph_cluster_id: string;
|
|
30
|
+
volume_backend: VOLUME_BACKEND;
|
|
31
|
+
csi: IRegionCsiConfig;
|
|
32
32
|
}
|
|
@@ -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;
|
package/dist/types/role.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { IPermission } from "./permission";
|
|
|
4
4
|
import { Ref } from "./ref";
|
|
5
5
|
export interface IRole extends Document {
|
|
6
6
|
type: ROLES;
|
|
7
|
-
description
|
|
8
|
-
is_custom
|
|
7
|
+
description: string;
|
|
8
|
+
is_custom: boolean;
|
|
9
9
|
permissions: Ref<IPermission>[];
|
|
10
10
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
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;
|
|
9
13
|
exit_code: number | null;
|
|
10
14
|
duration_ms: number | null;
|
|
11
15
|
error: string | null;
|
|
12
|
-
created_at
|
|
13
|
-
updated_at
|
|
16
|
+
created_at: Date;
|
|
17
|
+
updated_at: Date;
|
|
14
18
|
}
|
|
@@ -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;
|