@brimble/models 3.8.107 → 3.8.109
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/enum/index.d.ts +9 -0
- package/dist/enum/index.js +13 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +8 -4
- package/dist/platform-api-key.d.ts +9 -0
- package/dist/platform-api-key.js +23 -0
- package/dist/region.js +5 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/platform-api-key.d.ts +18 -0
- package/dist/types/platform-api-key.js +2 -0
- package/dist/types/region.d.ts +2 -1
- package/package.json +1 -1
package/dist/enum/index.d.ts
CHANGED
|
@@ -182,6 +182,11 @@ export declare enum REGION_CONTINENT {
|
|
|
182
182
|
AMERICA = "America",
|
|
183
183
|
ASIA = "Asia"
|
|
184
184
|
}
|
|
185
|
+
export declare enum VOLUME_BACKEND {
|
|
186
|
+
Ceph = "ceph",
|
|
187
|
+
Cloud = "cloud",
|
|
188
|
+
S3 = "s3"
|
|
189
|
+
}
|
|
185
190
|
export declare enum ServiceType {
|
|
186
191
|
Database = "database",
|
|
187
192
|
WebService = "web-service",
|
|
@@ -354,6 +359,10 @@ export declare enum StorageTokenStatus {
|
|
|
354
359
|
Active = "active",
|
|
355
360
|
Revoked = "revoked"
|
|
356
361
|
}
|
|
362
|
+
export declare enum PlatformApiKeyStatus {
|
|
363
|
+
Active = "active",
|
|
364
|
+
Revoked = "revoked"
|
|
365
|
+
}
|
|
357
366
|
export declare enum StorageCredentialRole {
|
|
358
367
|
ReadOnly = "ReadOnly",
|
|
359
368
|
Editor = "Editor"
|
package/dist/enum/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.WorkbenchMode = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.RESTORE_STATUS = exports.BACKUP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_EGRESS_MODE = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = void 0;
|
|
3
|
+
exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = 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.SCALING_SOURCE = exports.SCALING_METRIC = exports.SCALING_STRATEGY = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.ServiceType = exports.VOLUME_BACKEND = exports.REGION_CONTINENT = exports.PERMISSION_TYPE = exports.ROLES = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.SERVER_STATUS = exports.OAUTH_PERMISSIONS = exports.SUBSCRIPTION_PLAN_TYPE = exports.SUBSCRIPTION_STATUS = exports.DrainEventType = exports.LogSource = exports.DrainStatus = exports.DrainType = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.CARD_TYPES = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.CONFIG_FILE_VISIBILITY = exports.ENVIRONMENT = exports.REQUEST_TYPE = exports.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.SERVER_PROTOCOL = exports.GIT_TYPE = void 0;
|
|
4
|
+
exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.WorkbenchMode = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = exports.RESTORE_STATUS = exports.BACKUP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_EGRESS_MODE = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = void 0;
|
|
5
5
|
var GIT_TYPE;
|
|
6
6
|
(function (GIT_TYPE) {
|
|
7
7
|
GIT_TYPE["GITHUB"] = "GITHUB";
|
|
@@ -216,6 +216,12 @@ var REGION_CONTINENT;
|
|
|
216
216
|
REGION_CONTINENT["AMERICA"] = "America";
|
|
217
217
|
REGION_CONTINENT["ASIA"] = "Asia";
|
|
218
218
|
})(REGION_CONTINENT || (exports.REGION_CONTINENT = REGION_CONTINENT = {}));
|
|
219
|
+
var VOLUME_BACKEND;
|
|
220
|
+
(function (VOLUME_BACKEND) {
|
|
221
|
+
VOLUME_BACKEND["Ceph"] = "ceph";
|
|
222
|
+
VOLUME_BACKEND["Cloud"] = "cloud";
|
|
223
|
+
VOLUME_BACKEND["S3"] = "s3";
|
|
224
|
+
})(VOLUME_BACKEND || (exports.VOLUME_BACKEND = VOLUME_BACKEND = {}));
|
|
219
225
|
var ServiceType;
|
|
220
226
|
(function (ServiceType) {
|
|
221
227
|
ServiceType["Database"] = "database";
|
|
@@ -418,6 +424,11 @@ var StorageTokenStatus;
|
|
|
418
424
|
StorageTokenStatus["Active"] = "active";
|
|
419
425
|
StorageTokenStatus["Revoked"] = "revoked";
|
|
420
426
|
})(StorageTokenStatus || (exports.StorageTokenStatus = StorageTokenStatus = {}));
|
|
427
|
+
var PlatformApiKeyStatus;
|
|
428
|
+
(function (PlatformApiKeyStatus) {
|
|
429
|
+
PlatformApiKeyStatus["Active"] = "active";
|
|
430
|
+
PlatformApiKeyStatus["Revoked"] = "revoked";
|
|
431
|
+
})(PlatformApiKeyStatus || (exports.PlatformApiKeyStatus = PlatformApiKeyStatus = {}));
|
|
421
432
|
var StorageCredentialRole;
|
|
422
433
|
(function (StorageCredentialRole) {
|
|
423
434
|
StorageCredentialRole["ReadOnly"] = "ReadOnly";
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { default as Dns } from "./domain/dns";
|
|
|
12
12
|
export { default as DnsChangeLog } from "./domain/dns-changelog";
|
|
13
13
|
export { default as Env } from "./env";
|
|
14
14
|
export { default as Token } from "./token";
|
|
15
|
+
export { default as PlatformApiKey } from "./platform-api-key";
|
|
15
16
|
export { default as Team } from "./team";
|
|
16
17
|
export { default as Member } from "./member";
|
|
17
18
|
export { default as Permission } from "./permission";
|
|
@@ -85,8 +86,8 @@ export { default as QuestParticipation } from "./quest-participation";
|
|
|
85
86
|
export { default as QuestRewardIssuance } from "./quest-reward-issuance";
|
|
86
87
|
export { default as Coupon } from "./coupon";
|
|
87
88
|
export { default as CouponRedemption } from "./coupon-redemption";
|
|
88
|
-
export { IUser, IGit, IProject, IProjectAnalytics, IPreview, IProjectConnection, IProjectNetworkSettings, IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, IFollowing, IIntegration, IEnv, IServer, IDomain, IToken, 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, ISandboxSnapshot, IBackupHistory, IRestoreHistory, 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, } from "./types";
|
|
89
|
-
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, JobStatus, LicenseStatus, REGION_CONTINENT, BUILD_DISABLED_BY, PROJECT_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_EGRESS_MODE, SANDBOX_SNAPSHOT_STATUS, BACKUP_STATUS, RESTORE_STATUS, StorageBucketStatus, StorageUploadStatus, StorageTokenStatus, 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, } from "./enum";
|
|
89
|
+
export { IUser, IGit, 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, ISandboxSnapshot, IBackupHistory, IRestoreHistory, 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, } from "./types";
|
|
90
|
+
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, JobStatus, LicenseStatus, REGION_CONTINENT, VOLUME_BACKEND, BUILD_DISABLED_BY, PROJECT_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_EGRESS_MODE, SANDBOX_SNAPSHOT_STATUS, BACKUP_STATUS, 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, } from "./enum";
|
|
90
91
|
import mongoose from "mongoose";
|
|
91
92
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
|
92
93
|
export declare const db: mongoose.Connection;
|
package/dist/index.js
CHANGED
|
@@ -12,10 +12,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.CONFIG_FILE_VISIBILITY = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = void 0;
|
|
15
|
+
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.PaymentMethod = exports.Permission = exports.Member = exports.Team = exports.PlatformApiKey = exports.Token = exports.Env = exports.DnsChangeLog = exports.Dns = exports.Domain = exports.Integration = exports.Following = exports.Ratelimit = exports.ProjectNetworkSettings = exports.ProjectConnection = exports.Preview = exports.ProjectAnalytics = exports.DeletedProject = exports.Project = exports.User = void 0;
|
|
16
|
+
exports.SERVER_STATUS = exports.ENVIRONMENT = exports.OAUTH_PERMISSIONS = exports.INTEGRATION_PROVIDERS = exports.INTEGRATION_TYPES = exports.GIT_TYPE = exports.CouponRedemption = exports.Coupon = exports.QuestRewardIssuance = exports.QuestParticipation = exports.QuestCampaign = exports.StreakMilestone = exports.StreakDay = exports.StreakEvent = exports.Streak = exports.StorageMigration = exports.StorageCredential = exports.StorageToken = exports.StorageUpload = exports.StorageObject = exports.StorageBucket = exports.IdempotencyRecord = exports.ObjectStorageUsageSegment = exports.PgBouncerUsageSegment = exports.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.RestoreHistory = exports.BackupHistory = exports.SandboxSnapshot = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.ProjectDrainSubscription = exports.Drain = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.ProjectConfigFile = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = exports.CollabPushSubscription = void 0;
|
|
17
|
+
exports.StorageBucketStatus = exports.RESTORE_STATUS = exports.BACKUP_STATUS = exports.SANDBOX_SNAPSHOT_STATUS = exports.SANDBOX_EGRESS_MODE = exports.SANDBOX_DESTROY_REASON = exports.SANDBOX_STATUS = exports.SANDBOX_TEMPLATE = exports.INVOICE_TYPE = exports.INVOICE_PAYMENT_STATUS = exports.INVOICE_STATUS = 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.PROJECT_DISABLED_BY = exports.BUILD_DISABLED_BY = exports.VOLUME_BACKEND = exports.REGION_CONTINENT = exports.LicenseStatus = exports.JobStatus = exports.DatabaseEngine = exports.SCALING_SOURCE = exports.ServiceType = exports.REQUEST_TYPE = exports.PERMISSION_TYPE = exports.DNS_CHANGE_SOURCE = exports.DNS_CHANGE_TYPE = exports.DNS_TYPE = exports.CARD_TYPES = exports.SUBSCRIPTION_STATUS = exports.DrainEventType = exports.LogSource = exports.DrainStatus = exports.DrainType = exports.AlertEventStatus = exports.AlertChannelMode = exports.AlertRuleState = exports.AlertCondition = exports.AlertMetric = exports.PROJECT_STATUS = exports.SUBSCRIPTION_PLAN_TYPE = exports.ROLES = void 0;
|
|
18
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = exports.CONFIG_FILE_VISIBILITY = exports.CouponRedemptionStatus = exports.CouponScope = exports.CouponDiscountType = exports.WorkbenchMode = exports.QUEST_TARGETLESS_REQUIREMENTS = exports.QUEST_CLAIM_REQUIREMENTS = exports.QuestRequirementType = exports.QuestEntity = exports.QuestCriterionType = exports.QuestRewardStatus = exports.RewardType = exports.EligibilityType = exports.ACTION_TO_MILESTONE = exports.QUEST_COUNTABLE_MILESTONES = exports.MilestoneType = exports.QualifyingActionType = exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.PlatformApiKeyStatus = exports.StorageTokenStatus = exports.StorageUploadStatus = void 0;
|
|
19
19
|
var user_1 = require("./user");
|
|
20
20
|
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return __importDefault(user_1).default; } });
|
|
21
21
|
var project_1 = require("./project");
|
|
@@ -45,6 +45,8 @@ var env_1 = require("./env");
|
|
|
45
45
|
Object.defineProperty(exports, "Env", { enumerable: true, get: function () { return __importDefault(env_1).default; } });
|
|
46
46
|
var token_1 = require("./token");
|
|
47
47
|
Object.defineProperty(exports, "Token", { enumerable: true, get: function () { return __importDefault(token_1).default; } });
|
|
48
|
+
var platform_api_key_1 = require("./platform-api-key");
|
|
49
|
+
Object.defineProperty(exports, "PlatformApiKey", { enumerable: true, get: function () { return __importDefault(platform_api_key_1).default; } });
|
|
48
50
|
var team_1 = require("./team");
|
|
49
51
|
Object.defineProperty(exports, "Team", { enumerable: true, get: function () { return __importDefault(team_1).default; } });
|
|
50
52
|
var member_1 = require("./member");
|
|
@@ -228,6 +230,7 @@ Object.defineProperty(exports, "DatabaseEngine", { enumerable: true, get: functi
|
|
|
228
230
|
Object.defineProperty(exports, "JobStatus", { enumerable: true, get: function () { return enum_1.JobStatus; } });
|
|
229
231
|
Object.defineProperty(exports, "LicenseStatus", { enumerable: true, get: function () { return enum_1.LicenseStatus; } });
|
|
230
232
|
Object.defineProperty(exports, "REGION_CONTINENT", { enumerable: true, get: function () { return enum_1.REGION_CONTINENT; } });
|
|
233
|
+
Object.defineProperty(exports, "VOLUME_BACKEND", { enumerable: true, get: function () { return enum_1.VOLUME_BACKEND; } });
|
|
231
234
|
Object.defineProperty(exports, "BUILD_DISABLED_BY", { enumerable: true, get: function () { return enum_1.BUILD_DISABLED_BY; } });
|
|
232
235
|
Object.defineProperty(exports, "PROJECT_DISABLED_BY", { enumerable: true, get: function () { return enum_1.PROJECT_DISABLED_BY; } });
|
|
233
236
|
Object.defineProperty(exports, "SERVER_PROTOCOL", { enumerable: true, get: function () { return enum_1.SERVER_PROTOCOL; } });
|
|
@@ -254,6 +257,7 @@ Object.defineProperty(exports, "RESTORE_STATUS", { enumerable: true, get: functi
|
|
|
254
257
|
Object.defineProperty(exports, "StorageBucketStatus", { enumerable: true, get: function () { return enum_1.StorageBucketStatus; } });
|
|
255
258
|
Object.defineProperty(exports, "StorageUploadStatus", { enumerable: true, get: function () { return enum_1.StorageUploadStatus; } });
|
|
256
259
|
Object.defineProperty(exports, "StorageTokenStatus", { enumerable: true, get: function () { return enum_1.StorageTokenStatus; } });
|
|
260
|
+
Object.defineProperty(exports, "PlatformApiKeyStatus", { enumerable: true, get: function () { return enum_1.PlatformApiKeyStatus; } });
|
|
257
261
|
Object.defineProperty(exports, "StorageCredentialRole", { enumerable: true, get: function () { return enum_1.StorageCredentialRole; } });
|
|
258
262
|
Object.defineProperty(exports, "StorageCredentialStatus", { enumerable: true, get: function () { return enum_1.StorageCredentialStatus; } });
|
|
259
263
|
Object.defineProperty(exports, "StorageMigrationStatus", { enumerable: true, get: function () { return enum_1.StorageMigrationStatus; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPlatformApiKey } from "./types/platform-api-key";
|
|
2
|
+
declare const _default: import("mongoose").Model<IPlatformApiKey, {}, {}, {}, import("mongoose").Document<unknown, {}, IPlatformApiKey, {}, import("mongoose").DefaultSchemaOptions> & IPlatformApiKey & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IPlatformApiKey>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const enum_1 = require("./enum");
|
|
5
|
+
const platformApiKeySchema = new mongoose_1.Schema({
|
|
6
|
+
name: { type: String, required: true, trim: true, maxlength: 100 },
|
|
7
|
+
key_id: { type: String, required: true, unique: true, index: true },
|
|
8
|
+
key_prefix: { type: String, required: true },
|
|
9
|
+
owner_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "User", required: true, index: true },
|
|
10
|
+
team_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Team", default: null, index: true },
|
|
11
|
+
subscription_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Subscription", default: null },
|
|
12
|
+
permissions: { type: [String], required: true },
|
|
13
|
+
status: {
|
|
14
|
+
type: String,
|
|
15
|
+
enum: Object.values(enum_1.PlatformApiKeyStatus),
|
|
16
|
+
default: enum_1.PlatformApiKeyStatus.Active,
|
|
17
|
+
index: true,
|
|
18
|
+
},
|
|
19
|
+
expires_at: { type: Date, default: null },
|
|
20
|
+
last_used_at: { type: Date, default: null },
|
|
21
|
+
}, { timestamps: true, collection: "platform_api_keys" });
|
|
22
|
+
platformApiKeySchema.index({ owner_id: 1, team_id: 1, status: 1 });
|
|
23
|
+
exports.default = (0, mongoose_1.model)("PlatformApiKey", platformApiKeySchema);
|
package/dist/region.js
CHANGED
|
@@ -16,5 +16,10 @@ const regionSchema = new mongoose_1.Schema({
|
|
|
16
16
|
floating_ip: { type: String },
|
|
17
17
|
type: { type: String, enum: ["web", "database", "sandbox"], required: false },
|
|
18
18
|
ceph_cluster_id: { type: String, required: false },
|
|
19
|
+
volume_backend: {
|
|
20
|
+
type: String,
|
|
21
|
+
enum: Object.values(enum_1.VOLUME_BACKEND),
|
|
22
|
+
required: false,
|
|
23
|
+
},
|
|
19
24
|
});
|
|
20
25
|
exports.default = (0, mongoose_1.model)("Region", regionSchema, "regions");
|
package/dist/types/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export type { ISettings } from "./settings";
|
|
|
37
37
|
export type { ISubscription } from "./subscription";
|
|
38
38
|
export type { ITeam } from "./team";
|
|
39
39
|
export type { IToken } from "./token";
|
|
40
|
+
export type { IPlatformApiKey } from "./platform-api-key";
|
|
40
41
|
export type { IUser } from "./user";
|
|
41
42
|
export type { IVolume } from "./volume";
|
|
42
43
|
export type { IWallet } from "./wallet";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Document, Types } from "mongoose";
|
|
2
|
+
import { PlatformApiKeyStatus } from "../enum";
|
|
3
|
+
import { ITeam } from "./team";
|
|
4
|
+
import { IUser } from "./user";
|
|
5
|
+
export interface IPlatformApiKey extends Document {
|
|
6
|
+
name: string;
|
|
7
|
+
key_id: string;
|
|
8
|
+
key_prefix: string;
|
|
9
|
+
owner_id: Types.ObjectId | IUser;
|
|
10
|
+
team_id?: Types.ObjectId | ITeam | null;
|
|
11
|
+
subscription_id?: Types.ObjectId | null;
|
|
12
|
+
permissions: string[];
|
|
13
|
+
status: PlatformApiKeyStatus;
|
|
14
|
+
expires_at?: Date | null;
|
|
15
|
+
last_used_at?: Date | null;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
}
|
package/dist/types/region.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Types, Document } from "mongoose";
|
|
2
|
-
import { REGION_CONTINENT } from "../enum";
|
|
2
|
+
import { REGION_CONTINENT, VOLUME_BACKEND } from "../enum";
|
|
3
3
|
export type RegionType = "web" | "database" | "sandbox";
|
|
4
4
|
export interface IRegion extends Document {
|
|
5
5
|
_id: Types.ObjectId;
|
|
@@ -16,4 +16,5 @@ export interface IRegion extends Document {
|
|
|
16
16
|
floating_ip?: string;
|
|
17
17
|
type?: RegionType;
|
|
18
18
|
ceph_cluster_id?: string;
|
|
19
|
+
volume_backend?: VOLUME_BACKEND;
|
|
19
20
|
}
|