@brimble/models 3.8.94 → 3.8.96
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 +6 -4
- package/dist/payment-method.d.ts +9 -0
- package/dist/payment-method.js +31 -0
- package/dist/project/index.js +37 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/payment-method.d.ts +9 -0
- package/dist/types/payment-method.js +2 -0
- package/dist/types/project/index.d.ts +11 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export { default as Token } from "./token";
|
|
|
15
15
|
export { default as Team } from "./team";
|
|
16
16
|
export { default as Member } from "./member";
|
|
17
17
|
export { default as Permission } from "./permission";
|
|
18
|
+
export { default as PaymentMethod } from "./payment-method";
|
|
18
19
|
export { default as MemberPermission } from "./member-permission";
|
|
19
20
|
export { default as Role } from "./role";
|
|
20
21
|
export { default as Log } from "./logs";
|
|
@@ -80,7 +81,7 @@ export { default as QuestParticipation } from "./quest-participation";
|
|
|
80
81
|
export { default as QuestRewardIssuance } from "./quest-reward-issuance";
|
|
81
82
|
export { default as Coupon } from "./coupon";
|
|
82
83
|
export { default as CouponRedemption } from "./coupon-redemption";
|
|
83
|
-
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, 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, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IDrain, IProjectDrainSubscription, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, 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";
|
|
84
|
+
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, IActivityLog, IAlertRule, IAlertRuleState, IAlertEvent, IAlertNotificationResult, IDrain, IProjectDrainSubscription, IOwnershipTransfer, ISandbox, ISandboxSpecs, ISandboxActivity, ISandboxImage, ISandboxSnapshot, ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, IVolumeUsageSegment, IVolumeUsageSegmentCosts, 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";
|
|
84
85
|
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, 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 } from "./enum";
|
|
85
86
|
import mongoose from "mongoose";
|
|
86
87
|
export declare const connectToMongo: (mongoUrl: string, config?: mongoose.ConnectOptions) => Promise<void>;
|
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.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 = void 0;
|
|
15
|
+
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.PaymentMethod = exports.Permission = exports.Member = exports.Team = 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.AlertCondition = exports.AlertMetric = 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.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.VolumeUsageSegment = exports.SandboxUsageSegment = exports.SandboxSnapshotUsageSegment = exports.SandboxSnapshot = exports.SandboxImage = exports.SandboxActivity = exports.Sandbox = exports.OwnershipTransfer = exports.ProjectDrainSubscription = exports.Drain = exports.AlertEvent = exports.AlertRuleStateModel = exports.AlertRule = exports.ActivityLog = exports.EnvironmentVariable = exports.ProjectEnvironment = exports.CashierSubscriptionItem = exports.CashierSubscription = exports.ProjectTagAssignment = exports.Tag = exports.Invoice = exports.AppMessage = void 0;
|
|
17
|
+
exports.XRobotsTag = exports.XContentTypeOptions = exports.XFrameOptions = exports.StorageMigrationStatus = exports.StorageCredentialStatus = exports.StorageCredentialRole = exports.StorageTokenStatus = exports.StorageUploadStatus = exports.StorageBucketStatus = 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.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 = void 0;
|
|
18
|
+
exports.healthCheckMongo = exports.closeMongo = exports.db = exports.connectToMongo = 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 = 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");
|
|
@@ -51,6 +51,8 @@ var member_1 = require("./member");
|
|
|
51
51
|
Object.defineProperty(exports, "Member", { enumerable: true, get: function () { return __importDefault(member_1).default; } });
|
|
52
52
|
var permission_1 = require("./permission");
|
|
53
53
|
Object.defineProperty(exports, "Permission", { enumerable: true, get: function () { return __importDefault(permission_1).default; } });
|
|
54
|
+
var payment_method_1 = require("./payment-method");
|
|
55
|
+
Object.defineProperty(exports, "PaymentMethod", { enumerable: true, get: function () { return __importDefault(payment_method_1).default; } });
|
|
54
56
|
var member_permission_1 = require("./member-permission");
|
|
55
57
|
Object.defineProperty(exports, "MemberPermission", { enumerable: true, get: function () { return __importDefault(member_permission_1).default; } });
|
|
56
58
|
var role_1 = require("./role");
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IPaymentMethod } from "./types/payment-method";
|
|
2
|
+
declare const _default: import("mongoose").Model<IPaymentMethod, {}, {}, {}, import("mongoose").Document<unknown, {}, IPaymentMethod, {}, import("mongoose").DefaultSchemaOptions> & IPaymentMethod & Required<{
|
|
3
|
+
_id: import("mongoose").Types.ObjectId;
|
|
4
|
+
}> & {
|
|
5
|
+
__v: number;
|
|
6
|
+
} & {
|
|
7
|
+
id: string;
|
|
8
|
+
}, any, IPaymentMethod>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const paymentMethodSchema = new mongoose_1.Schema({
|
|
5
|
+
name: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true,
|
|
8
|
+
},
|
|
9
|
+
logo: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: "",
|
|
12
|
+
},
|
|
13
|
+
enum: {
|
|
14
|
+
type: String,
|
|
15
|
+
required: true,
|
|
16
|
+
unique: true,
|
|
17
|
+
},
|
|
18
|
+
supported: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: true,
|
|
21
|
+
},
|
|
22
|
+
subscription: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: false,
|
|
25
|
+
},
|
|
26
|
+
description: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
}, { collection: "payment_methods" });
|
|
31
|
+
exports.default = (0, mongoose_1.model)("PaymentMethod", paymentMethodSchema);
|
package/dist/project/index.js
CHANGED
|
@@ -100,6 +100,43 @@ const projectSchema = new mongoose_1.Schema({
|
|
|
100
100
|
type: Boolean,
|
|
101
101
|
default: false,
|
|
102
102
|
},
|
|
103
|
+
pgbouncerConfig: {
|
|
104
|
+
type: {
|
|
105
|
+
defaultPoolSize: {
|
|
106
|
+
type: Number,
|
|
107
|
+
default: 20,
|
|
108
|
+
},
|
|
109
|
+
maxDbConnections: {
|
|
110
|
+
type: Number,
|
|
111
|
+
default: 0,
|
|
112
|
+
},
|
|
113
|
+
maxDbClientConnections: {
|
|
114
|
+
type: Number,
|
|
115
|
+
default: 0,
|
|
116
|
+
},
|
|
117
|
+
maxUserConnections: {
|
|
118
|
+
type: Number,
|
|
119
|
+
default: 0,
|
|
120
|
+
},
|
|
121
|
+
maxClientConn: {
|
|
122
|
+
type: Number,
|
|
123
|
+
default: 1000,
|
|
124
|
+
},
|
|
125
|
+
maxPreparedStatements: {
|
|
126
|
+
type: Number,
|
|
127
|
+
default: 200,
|
|
128
|
+
},
|
|
129
|
+
serverLifetime: {
|
|
130
|
+
type: Number,
|
|
131
|
+
default: 3600,
|
|
132
|
+
},
|
|
133
|
+
serverIdleTimeout: {
|
|
134
|
+
type: Number,
|
|
135
|
+
default: 600,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
default: undefined,
|
|
139
|
+
},
|
|
103
140
|
tlsEnabledAt: {
|
|
104
141
|
type: Date,
|
|
105
142
|
default: null,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,9 +21,10 @@ export type { ILog } from "./logs";
|
|
|
21
21
|
export type { IMember } from "./member";
|
|
22
22
|
export type { IMemberPermission } from "./member-permission";
|
|
23
23
|
export type { IPermission } from "./permission";
|
|
24
|
+
export type { IPaymentMethod } from "./payment-method";
|
|
24
25
|
export type { IPlanConfiguration } from "./plan_configuration";
|
|
25
26
|
export type { IProvider } from "./provider";
|
|
26
|
-
export type { IProject } from "./project";
|
|
27
|
+
export type { IPgBouncerConfig, IProject } from "./project";
|
|
27
28
|
export type { IProjectAnalytics } from "./project_analytics";
|
|
28
29
|
export type { IProjectConnection } from "./project/connection";
|
|
29
30
|
export type { IProjectNetworkSettings } from "./project-network-settings";
|
|
@@ -13,6 +13,16 @@ import { IProjectEnvironment } from "../project-environment";
|
|
|
13
13
|
import { IRegion } from "../region";
|
|
14
14
|
import { IVolume } from "../volume";
|
|
15
15
|
export type RuntimeVersions = Record<string, string>;
|
|
16
|
+
export interface IPgBouncerConfig {
|
|
17
|
+
defaultPoolSize: number;
|
|
18
|
+
maxDbConnections: number;
|
|
19
|
+
maxDbClientConnections: number;
|
|
20
|
+
maxUserConnections: number;
|
|
21
|
+
maxClientConn: number;
|
|
22
|
+
maxPreparedStatements: number;
|
|
23
|
+
serverLifetime: number;
|
|
24
|
+
serverIdleTimeout: number;
|
|
25
|
+
}
|
|
16
26
|
export interface IProject extends Document {
|
|
17
27
|
name: string;
|
|
18
28
|
healthCheckPath?: string;
|
|
@@ -33,6 +43,7 @@ export interface IProject extends Document {
|
|
|
33
43
|
dir: string;
|
|
34
44
|
tlsEnabled: boolean;
|
|
35
45
|
pgbouncerEnabled: boolean;
|
|
46
|
+
pgbouncerConfig?: IPgBouncerConfig | null;
|
|
36
47
|
tlsEnabledAt?: Date | null;
|
|
37
48
|
tlsCaObjectKey?: string | null;
|
|
38
49
|
tlsServerCertExpiresAt?: Date | null;
|