@brimble/models 3.8.41 → 3.8.43
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 +2 -1
- package/dist/index.js +4 -2
- package/dist/object-storage-usage-segment.d.ts +9 -0
- package/dist/object-storage-usage-segment.js +46 -0
- package/dist/plan_configuration.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/object-storage-usage-segment.d.ts +23 -0
- package/dist/types/object-storage-usage-segment.js +2 -0
- package/dist/types/plan_configuration.d.ts +1 -0
- package/index.ts +4 -0
- package/object-storage-usage-segment.ts +59 -0
- package/package.json +1 -1
- package/plan_configuration.ts +1 -0
- package/types/index.ts +5 -0
- package/types/object-storage-usage-segment.ts +26 -0
- package/types/plan_configuration.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -60,9 +60,10 @@ export { default as SandboxSnapshot } from "./sandbox-snapshot";
|
|
|
60
60
|
export { default as SandboxSnapshotUsageSegment } from "./sandbox-snapshot-usage-segment";
|
|
61
61
|
export { default as SandboxUsageSegment } from "./sandbox-usage-segment";
|
|
62
62
|
export { default as VolumeUsageSegment } from "./volume-usage-segment";
|
|
63
|
+
export { default as ObjectStorageUsageSegment } from "./object-storage-usage-segment";
|
|
63
64
|
export { default as IdempotencyRecord } from "./idempotency";
|
|
64
65
|
export { StorageBucket, StorageObject, StorageUpload, StorageToken } from "./storage";
|
|
65
|
-
export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, 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, IActivityLog, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, StorageTokenPermission, } from "./types";
|
|
66
|
+
export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, IMember, ITeam, IInstalledIntegration, ILog, ISubscription, ICard, IDns, 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, IActivityLog, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, IIdempotencyRecord, IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, StorageTokenPermission, } from "./types";
|
|
66
67
|
export { GIT_TYPE, INTEGRATION_TYPES, INTEGRATION_PROVIDERS, OAUTH_PERMISSIONS, ENVIRONMENT, SERVER_STATUS, ROLES, SUBSCRIPTION_PLAN_TYPE, PROJECT_STATUS, SUBSCRIPTION_STATUS, CARD_TYPES, DNS_TYPE, PERMISSION_TYPE, REQUEST_TYPE, ServiceType, DatabaseEngine, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, 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_SNAPSHOT_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, } from "./enum";
|
|
67
68
|
import mongoose from "mongoose";
|
|
68
69
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = exports.CollabShareToken = exports.CollabSettings = exports.CollabIntegration = exports.CollabComment = exports.CollabAnnotation = exports.Provider = exports.Intention = exports.WebhookSetting = exports.WebhookEvent = exports.WebhookCategory = exports.DomainTransfer = exports.DomainRenewal = exports.LoadBalancerPort = exports.Settings = exports.Framework = exports.Volume = exports.Region = exports.ComputeChange = exports.AutoScalingGroup = exports.PlanConfiguration = exports.Liscense = exports.Job = exports.DbImage = exports.Wallet = exports.Server = exports.Card = exports.Subscription = exports.Log = exports.Role = exports.MemberPermission = exports.Permission = exports.Member = exports.Team = exports.Token = exports.Env = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
-
exports.
|
|
17
|
-
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = void 0;
|
|
16
|
+
exports.COLLAB_TOOLBAR_POSITION = exports.COLLAB_THEME = exports.COLLAB_INTEGRATION_TYPE = exports.COLLAB_ANNOTATION_STATUS = exports.NomadDeploymentStatus = exports.DomainTransferStatus = exports.DomainTransferDirection = exports.DomainTransferProvider = exports.DomainRenewalStatus = exports.FrameworkApplicationType = exports.SERVER_PROTOCOL = exports.BUILD_DISABLED_BY = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.StorageToken = exports.StorageUpload = exports.StorageObject = exports.StorageBucket = exports.IdempotencyRecord = exports.ObjectStorageUsageSegment = exports.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.SandboxSnapshot = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = void 0;
|
|
17
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = void 0;
|
|
18
18
|
var user_1 = require("./user");
|
|
19
19
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
20
20
|
var project_1 = require("./project");
|
|
@@ -140,6 +140,8 @@ var sandbox_usage_segment_1 = require("./sandbox-usage-segment");
|
|
|
140
140
|
Object.defineProperty(exports, "SandboxUsageSegment", { enumerable: true, get: function () { return __importDefault(sandbox_usage_segment_1).default; } });
|
|
141
141
|
var volume_usage_segment_1 = require("./volume-usage-segment");
|
|
142
142
|
Object.defineProperty(exports, "VolumeUsageSegment", { enumerable: true, get: function () { return __importDefault(volume_usage_segment_1).default; } });
|
|
143
|
+
var object_storage_usage_segment_1 = require("./object-storage-usage-segment");
|
|
144
|
+
Object.defineProperty(exports, "ObjectStorageUsageSegment", { enumerable: true, get: function () { return __importDefault(object_storage_usage_segment_1).default; } });
|
|
143
145
|
var idempotency_1 = require("./idempotency");
|
|
144
146
|
Object.defineProperty(exports, "IdempotencyRecord", { enumerable: true, get: function () { return __importDefault(idempotency_1).default; } });
|
|
145
147
|
var storage_1 = require("./storage");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IObjectStorageUsageSegment } from "./types/object-storage-usage-segment";
|
|
2
|
+
declare const _default: import("mongoose").Model<IObjectStorageUsageSegment, {}, {}, {}, import("mongoose").Document<unknown, {}, IObjectStorageUsageSegment, {}, import("mongoose").DefaultSchemaOptions> & IObjectStorageUsageSegment & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IObjectStorageUsageSegment>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const objectStorageUsageSegmentSchema = new mongoose_1.Schema({
|
|
5
|
+
bucket_id: {
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
7
|
+
ref: "StorageBucket",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
user_id: {
|
|
11
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
12
|
+
ref: "User",
|
|
13
|
+
required: true,
|
|
14
|
+
index: true,
|
|
15
|
+
},
|
|
16
|
+
team_id: {
|
|
17
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
18
|
+
ref: "Team",
|
|
19
|
+
default: null,
|
|
20
|
+
index: true,
|
|
21
|
+
},
|
|
22
|
+
size_gb: {
|
|
23
|
+
type: Number,
|
|
24
|
+
default: 0,
|
|
25
|
+
},
|
|
26
|
+
costs: {
|
|
27
|
+
startDate: { type: Date, required: true },
|
|
28
|
+
endDate: { type: Date, default: null },
|
|
29
|
+
},
|
|
30
|
+
billed: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
default: false,
|
|
33
|
+
index: true,
|
|
34
|
+
},
|
|
35
|
+
}, {
|
|
36
|
+
timestamps: true,
|
|
37
|
+
});
|
|
38
|
+
objectStorageUsageSegmentSchema.index({ user_id: 1, billed: 1, "costs.endDate": 1 });
|
|
39
|
+
objectStorageUsageSegmentSchema.index({ team_id: 1, billed: 1, "costs.endDate": 1 });
|
|
40
|
+
objectStorageUsageSegmentSchema.index({ bucket_id: 1, "costs.endDate": 1 });
|
|
41
|
+
objectStorageUsageSegmentSchema.index({ bucket_id: 1 }, {
|
|
42
|
+
unique: true,
|
|
43
|
+
partialFilterExpression: { "costs.endDate": null },
|
|
44
|
+
name: "unique_open_segment_per_object_storage_bucket",
|
|
45
|
+
});
|
|
46
|
+
exports.default = (0, mongoose_1.model)("ObjectStorageUsageSegment", objectStorageUsageSegmentSchema, "object_storage_usage_segments");
|
|
@@ -23,6 +23,7 @@ const PlanConfigurationSchema = new mongoose_1.Schema({
|
|
|
23
23
|
ai_debug_enabled: { type: Boolean, default: false, required: false },
|
|
24
24
|
ai_debug_limit: { type: Number, default: 0, required: false },
|
|
25
25
|
storage_bucket_enabled: { type: Boolean, default: false },
|
|
26
|
+
storage_bucket_quota_gb: { type: Number, default: 5 },
|
|
26
27
|
plan_type: {
|
|
27
28
|
type: String,
|
|
28
29
|
enum: Object.values(enum_1.SUBSCRIPTION_PLAN_TYPE),
|
package/dist/types/index.d.ts
CHANGED
|
@@ -61,5 +61,6 @@ export type { ISandboxSnapshot } from "./sandbox-snapshot";
|
|
|
61
61
|
export type { ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, } from "./sandbox-snapshot-usage-segment";
|
|
62
62
|
export type { ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, } from "./sandbox-usage-segment";
|
|
63
63
|
export type { IVolumeUsageSegment, IVolumeUsageSegmentCosts, } from "./volume-usage-segment";
|
|
64
|
+
export type { IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, } from "./object-storage-usage-segment";
|
|
64
65
|
export type { IIdempotencyRecord } from "./idempotency";
|
|
65
66
|
export type { IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, StorageTokenPermission, } from "./storage";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
export interface IObjectStorageUsageSegmentCosts {
|
|
3
|
+
startDate: Date;
|
|
4
|
+
endDate: Date | null;
|
|
5
|
+
}
|
|
6
|
+
export interface IObjectStorageUsageSegment extends Document {
|
|
7
|
+
bucket_id: Types.ObjectId;
|
|
8
|
+
user_id: Types.ObjectId;
|
|
9
|
+
team_id: Types.ObjectId | null;
|
|
10
|
+
size_gb: number;
|
|
11
|
+
costs: IObjectStorageUsageSegmentCosts;
|
|
12
|
+
billed: boolean;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
}
|
|
16
|
+
export interface IObjectStorageUsageUnitsSummary {
|
|
17
|
+
gbHours: number;
|
|
18
|
+
segmentIds: string[];
|
|
19
|
+
date: {
|
|
20
|
+
start: string;
|
|
21
|
+
end: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
@@ -36,6 +36,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
36
36
|
can_deploy_all_applications: boolean;
|
|
37
37
|
stripe_prices?: Record<string, string>;
|
|
38
38
|
storage_bucket_enabled: boolean;
|
|
39
|
+
storage_bucket_quota_gb: number;
|
|
39
40
|
sandbox_max_count: number;
|
|
40
41
|
sanxbox_hours_max: number;
|
|
41
42
|
sandbox_enabled: boolean;
|
package/index.ts
CHANGED
|
@@ -60,6 +60,7 @@ export { default as SandboxSnapshot } from "./sandbox-snapshot";
|
|
|
60
60
|
export { default as SandboxSnapshotUsageSegment } from "./sandbox-snapshot-usage-segment";
|
|
61
61
|
export { default as SandboxUsageSegment } from "./sandbox-usage-segment";
|
|
62
62
|
export { default as VolumeUsageSegment } from "./volume-usage-segment";
|
|
63
|
+
export { default as ObjectStorageUsageSegment } from "./object-storage-usage-segment";
|
|
63
64
|
export { default as IdempotencyRecord } from "./idempotency";
|
|
64
65
|
export { StorageBucket, StorageObject, StorageUpload, StorageToken } from "./storage";
|
|
65
66
|
|
|
@@ -135,6 +136,9 @@ export {
|
|
|
135
136
|
ISandboxUsageSegmentCosts,
|
|
136
137
|
IVolumeUsageSegment,
|
|
137
138
|
IVolumeUsageSegmentCosts,
|
|
139
|
+
IObjectStorageUsageSegment,
|
|
140
|
+
IObjectStorageUsageSegmentCosts,
|
|
141
|
+
IObjectStorageUsageUnitsSummary,
|
|
138
142
|
IIdempotencyRecord,
|
|
139
143
|
IStorageBucket,
|
|
140
144
|
IStorageObject,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { model, Schema } from "mongoose";
|
|
2
|
+
import { IObjectStorageUsageSegment } from "./types/object-storage-usage-segment";
|
|
3
|
+
|
|
4
|
+
const objectStorageUsageSegmentSchema = new Schema<IObjectStorageUsageSegment>(
|
|
5
|
+
{
|
|
6
|
+
bucket_id: {
|
|
7
|
+
type: Schema.Types.ObjectId,
|
|
8
|
+
ref: "StorageBucket",
|
|
9
|
+
required: true,
|
|
10
|
+
},
|
|
11
|
+
user_id: {
|
|
12
|
+
type: Schema.Types.ObjectId,
|
|
13
|
+
ref: "User",
|
|
14
|
+
required: true,
|
|
15
|
+
index: true,
|
|
16
|
+
},
|
|
17
|
+
team_id: {
|
|
18
|
+
type: Schema.Types.ObjectId,
|
|
19
|
+
ref: "Team",
|
|
20
|
+
default: null,
|
|
21
|
+
index: true,
|
|
22
|
+
},
|
|
23
|
+
size_gb: {
|
|
24
|
+
type: Number,
|
|
25
|
+
default: 0,
|
|
26
|
+
},
|
|
27
|
+
costs: {
|
|
28
|
+
startDate: { type: Date, required: true },
|
|
29
|
+
endDate: { type: Date, default: null },
|
|
30
|
+
},
|
|
31
|
+
billed: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false,
|
|
34
|
+
index: true,
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
timestamps: true,
|
|
39
|
+
},
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
objectStorageUsageSegmentSchema.index({ user_id: 1, billed: 1, "costs.endDate": 1 });
|
|
43
|
+
objectStorageUsageSegmentSchema.index({ team_id: 1, billed: 1, "costs.endDate": 1 });
|
|
44
|
+
objectStorageUsageSegmentSchema.index({ bucket_id: 1, "costs.endDate": 1 });
|
|
45
|
+
|
|
46
|
+
objectStorageUsageSegmentSchema.index(
|
|
47
|
+
{ bucket_id: 1 },
|
|
48
|
+
{
|
|
49
|
+
unique: true,
|
|
50
|
+
partialFilterExpression: { "costs.endDate": null },
|
|
51
|
+
name: "unique_open_segment_per_object_storage_bucket",
|
|
52
|
+
},
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
export default model<IObjectStorageUsageSegment>(
|
|
56
|
+
"ObjectStorageUsageSegment",
|
|
57
|
+
objectStorageUsageSegmentSchema,
|
|
58
|
+
"object_storage_usage_segments",
|
|
59
|
+
);
|
package/package.json
CHANGED
package/plan_configuration.ts
CHANGED
|
@@ -24,6 +24,7 @@ const PlanConfigurationSchema = new Schema<IPlanConfiguration>(
|
|
|
24
24
|
ai_debug_enabled: { type: Boolean, default: false, required: false },
|
|
25
25
|
ai_debug_limit: { type: Number, default: 0, required: false },
|
|
26
26
|
storage_bucket_enabled: { type: Boolean, default: false },
|
|
27
|
+
storage_bucket_quota_gb: { type: Number, default: 5 },
|
|
27
28
|
plan_type: {
|
|
28
29
|
type: String,
|
|
29
30
|
enum: Object.values(SUBSCRIPTION_PLAN_TYPE),
|
package/types/index.ts
CHANGED
|
@@ -71,6 +71,11 @@ export type {
|
|
|
71
71
|
IVolumeUsageSegment,
|
|
72
72
|
IVolumeUsageSegmentCosts,
|
|
73
73
|
} from "./volume-usage-segment";
|
|
74
|
+
export type {
|
|
75
|
+
IObjectStorageUsageSegment,
|
|
76
|
+
IObjectStorageUsageSegmentCosts,
|
|
77
|
+
IObjectStorageUsageUnitsSummary,
|
|
78
|
+
} from "./object-storage-usage-segment";
|
|
74
79
|
export type { IIdempotencyRecord } from "./idempotency";
|
|
75
80
|
export type {
|
|
76
81
|
IStorageBucket,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
|
|
3
|
+
export interface IObjectStorageUsageSegmentCosts {
|
|
4
|
+
startDate: Date;
|
|
5
|
+
endDate: Date | null;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface IObjectStorageUsageSegment extends Document {
|
|
9
|
+
bucket_id: Types.ObjectId;
|
|
10
|
+
user_id: Types.ObjectId;
|
|
11
|
+
team_id: Types.ObjectId | null;
|
|
12
|
+
size_gb: number;
|
|
13
|
+
costs: IObjectStorageUsageSegmentCosts;
|
|
14
|
+
billed: boolean;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface IObjectStorageUsageUnitsSummary {
|
|
20
|
+
gbHours: number;
|
|
21
|
+
segmentIds: string[];
|
|
22
|
+
date: {
|
|
23
|
+
start: string;
|
|
24
|
+
end: string;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
@@ -37,6 +37,7 @@ export interface IPlanConfiguration extends Document {
|
|
|
37
37
|
can_deploy_all_applications: boolean;
|
|
38
38
|
stripe_prices?: Record<string, string>;
|
|
39
39
|
storage_bucket_enabled: boolean;
|
|
40
|
+
storage_bucket_quota_gb: number;
|
|
40
41
|
sandbox_max_count: number;
|
|
41
42
|
sanxbox_hours_max: number;
|
|
42
43
|
sandbox_enabled: boolean;
|