@brimble/models 3.8.77 → 3.8.79

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.
Files changed (300) hide show
  1. package/dist/activity-log.d.ts +6 -27
  2. package/dist/alert-event.d.ts +9 -0
  3. package/dist/alert-event.js +78 -0
  4. package/dist/alert-rule-state.d.ts +9 -0
  5. package/dist/alert-rule-state.js +49 -0
  6. package/dist/alert-rule.d.ts +9 -0
  7. package/dist/alert-rule.js +77 -0
  8. package/dist/app-message.d.ts +6 -27
  9. package/dist/app-message.js +2 -2
  10. package/dist/auto-scaling.d.ts +6 -27
  11. package/dist/card.d.ts +6 -27
  12. package/dist/cashier_subscription.d.ts +6 -27
  13. package/dist/cashier_subscription_item.d.ts +6 -27
  14. package/dist/collab-annotation.d.ts +6 -27
  15. package/dist/collab-comment.d.ts +6 -27
  16. package/dist/collab-integration.d.ts +6 -27
  17. package/dist/collab-push-subscription.d.ts +6 -27
  18. package/dist/collab-settings.d.ts +6 -27
  19. package/dist/collab-share-token.d.ts +6 -27
  20. package/dist/compute.d.ts +6 -27
  21. package/dist/compute.js +6 -0
  22. package/dist/db-image.d.ts +6 -27
  23. package/dist/db-image.js +19 -0
  24. package/dist/domain/dns-changelog.d.ts +9 -0
  25. package/dist/domain/dns-changelog.js +82 -0
  26. package/dist/domain/dns.d.ts +6 -27
  27. package/dist/domain/index.d.ts +6 -27
  28. package/dist/domain/index.js +4 -0
  29. package/dist/domain/renewal.d.ts +6 -27
  30. package/dist/domain/transfer.d.ts +6 -27
  31. package/dist/enum/index.d.ts +184 -0
  32. package/dist/enum/index.js +273 -37
  33. package/dist/env.d.ts +6 -27
  34. package/dist/environment-variable.d.ts +6 -27
  35. package/dist/environment-variable.js +8 -0
  36. package/dist/follower.d.ts +6 -27
  37. package/dist/following.d.ts +6 -27
  38. package/dist/framework.d.ts +6 -27
  39. package/dist/idempotency.d.ts +9 -0
  40. package/dist/idempotency.js +17 -0
  41. package/dist/index.d.ts +25 -2
  42. package/dist/index.js +92 -3
  43. package/dist/integration.d.ts +6 -27
  44. package/dist/intention.d.ts +6 -27
  45. package/dist/invoice.d.ts +6 -27
  46. package/dist/job.d.ts +6 -2
  47. package/dist/job.js +17 -7
  48. package/dist/license.d.ts +6 -27
  49. package/dist/load-balancer-port.d.ts +6 -27
  50. package/dist/logs.d.ts +6 -27
  51. package/dist/logs.js +0 -2
  52. package/dist/member-permission.d.ts +6 -27
  53. package/dist/member.d.ts +6 -27
  54. package/dist/object-storage-usage-segment.d.ts +9 -0
  55. package/dist/object-storage-usage-segment.js +46 -0
  56. package/dist/ownership-transfer.d.ts +6 -27
  57. package/dist/permission.d.ts +6 -27
  58. package/dist/plan_configuration.d.ts +6 -2
  59. package/dist/plan_configuration.js +22 -0
  60. package/dist/project/connection.d.ts +6 -27
  61. package/dist/project/index.d.ts +12 -29
  62. package/dist/project/index.js +29 -0
  63. package/dist/project/preview.d.ts +6 -27
  64. package/dist/project-environment.d.ts +6 -27
  65. package/dist/project-network-settings.d.ts +9 -0
  66. package/dist/project-network-settings.js +34 -0
  67. package/dist/project-tag-assignment.d.ts +6 -27
  68. package/dist/project_analytics.d.ts +6 -27
  69. package/dist/provider.d.ts +6 -27
  70. package/dist/provider.js +1 -0
  71. package/dist/quest-campaign.d.ts +9 -0
  72. package/dist/quest-campaign.js +39 -0
  73. package/dist/quest-participation.d.ts +9 -0
  74. package/dist/quest-participation.js +21 -0
  75. package/dist/quest-reward-issuance.d.ts +9 -0
  76. package/dist/quest-reward-issuance.js +19 -0
  77. package/dist/ratelimit.d.ts +9 -0
  78. package/dist/ratelimit.js +36 -0
  79. package/dist/region.d.ts +7 -28
  80. package/dist/role.d.ts +6 -27
  81. package/dist/sandbox-activity.d.ts +9 -0
  82. package/dist/sandbox-activity.js +49 -0
  83. package/dist/sandbox-image.d.ts +9 -0
  84. package/dist/sandbox-image.js +31 -0
  85. package/dist/sandbox-snapshot-usage-segment.d.ts +9 -0
  86. package/dist/sandbox-snapshot-usage-segment.js +49 -0
  87. package/dist/sandbox-snapshot.d.ts +9 -0
  88. package/dist/sandbox-snapshot.js +51 -0
  89. package/dist/sandbox-usage-segment.d.ts +9 -0
  90. package/dist/sandbox-usage-segment.js +57 -0
  91. package/dist/sandbox.d.ts +9 -0
  92. package/dist/sandbox.js +142 -0
  93. package/dist/server.d.ts +6 -27
  94. package/dist/settings.d.ts +6 -27
  95. package/dist/storage.d.ts +43 -0
  96. package/dist/storage.js +118 -0
  97. package/dist/streak-day.d.ts +9 -0
  98. package/dist/streak-day.js +11 -0
  99. package/dist/streak-event.d.ts +9 -0
  100. package/dist/streak-event.js +18 -0
  101. package/dist/streak-milestone.d.ts +9 -0
  102. package/dist/streak-milestone.js +11 -0
  103. package/dist/streak.d.ts +9 -0
  104. package/dist/streak.js +17 -0
  105. package/dist/subscription.d.ts +6 -27
  106. package/dist/tag.d.ts +6 -27
  107. package/dist/team.d.ts +6 -27
  108. package/dist/team.js +26 -0
  109. package/dist/token.d.ts +6 -27
  110. package/dist/types/alert-event.d.ts +23 -0
  111. package/dist/types/alert-event.js +2 -0
  112. package/dist/types/alert-rule-state.d.ts +13 -0
  113. package/dist/types/alert-rule-state.js +2 -0
  114. package/dist/types/alert-rule.d.ts +21 -0
  115. package/dist/types/alert-rule.js +2 -0
  116. package/dist/types/app-message.d.ts +2 -2
  117. package/dist/types/auto-scaling-group.d.ts +1 -1
  118. package/dist/types/compute.d.ts +3 -1
  119. package/dist/types/db-image.d.ts +5 -1
  120. package/dist/types/domain/dns-changelog.d.ts +20 -0
  121. package/dist/types/domain/dns-changelog.js +2 -0
  122. package/dist/types/domain/index.d.ts +1 -0
  123. package/dist/types/environment-variable.d.ts +2 -0
  124. package/dist/types/idempotency.d.ts +10 -0
  125. package/dist/types/idempotency.js +2 -0
  126. package/dist/types/index.d.ts +23 -0
  127. package/dist/types/object-storage-usage-segment.d.ts +23 -0
  128. package/dist/types/object-storage-usage-segment.js +2 -0
  129. package/dist/types/plan_configuration.d.ts +22 -0
  130. package/dist/types/project/index.d.ts +7 -0
  131. package/dist/types/project-network-settings.d.ts +28 -0
  132. package/dist/types/project-network-settings.js +2 -0
  133. package/dist/types/provider.d.ts +1 -0
  134. package/dist/types/quest-campaign.d.ts +38 -0
  135. package/dist/types/quest-campaign.js +2 -0
  136. package/dist/types/quest-participation.d.ts +19 -0
  137. package/dist/types/quest-participation.js +2 -0
  138. package/dist/types/quest-reward-issuance.d.ts +17 -0
  139. package/dist/types/quest-reward-issuance.js +2 -0
  140. package/dist/types/ratelimit.d.ts +41 -0
  141. package/dist/types/ratelimit.js +2 -0
  142. package/dist/types/region.d.ts +2 -2
  143. package/dist/types/sandbox-activity.d.ts +14 -0
  144. package/dist/types/sandbox-activity.js +2 -0
  145. package/dist/types/sandbox-image.d.ts +9 -0
  146. package/dist/types/sandbox-image.js +2 -0
  147. package/dist/types/sandbox-snapshot-usage-segment.d.ts +16 -0
  148. package/dist/types/sandbox-snapshot-usage-segment.js +2 -0
  149. package/dist/types/sandbox-snapshot.d.ts +16 -0
  150. package/dist/types/sandbox-snapshot.js +2 -0
  151. package/dist/types/sandbox-usage-segment.d.ts +25 -0
  152. package/dist/types/sandbox-usage-segment.js +2 -0
  153. package/dist/types/sandbox.d.ts +46 -0
  154. package/dist/types/sandbox.js +2 -0
  155. package/dist/types/storage.d.ts +131 -0
  156. package/dist/types/storage.js +2 -0
  157. package/dist/types/streak-day.d.ts +9 -0
  158. package/dist/types/streak-day.js +2 -0
  159. package/dist/types/streak-event.d.ts +13 -0
  160. package/dist/types/streak-event.js +2 -0
  161. package/dist/types/streak-milestone.d.ts +10 -0
  162. package/dist/types/streak-milestone.js +2 -0
  163. package/dist/types/streak.d.ts +17 -0
  164. package/dist/types/streak.js +2 -0
  165. package/dist/types/team.d.ts +8 -2
  166. package/dist/types/user.d.ts +4 -0
  167. package/dist/types/volume-usage-segment.d.ts +16 -0
  168. package/dist/types/volume-usage-segment.js +2 -0
  169. package/dist/types/volume.d.ts +9 -3
  170. package/dist/types/wallet.d.ts +1 -0
  171. package/dist/user.d.ts +6 -27
  172. package/dist/user.js +14 -0
  173. package/dist/volume-usage-segment.d.ts +9 -0
  174. package/dist/volume-usage-segment.js +46 -0
  175. package/dist/volume.d.ts +6 -27
  176. package/dist/volume.js +21 -4
  177. package/dist/wallet.d.ts +6 -27
  178. package/dist/wallet.js +4 -0
  179. package/dist/webhook-category.d.ts +6 -27
  180. package/dist/webhook-event.d.ts +6 -27
  181. package/dist/webhook-setting.d.ts +6 -27
  182. package/package.json +9 -5
  183. package/.claude/settings.local.json +0 -7
  184. package/.eslintrc.js +0 -26
  185. package/.prettierrc +0 -4
  186. package/activity-log.ts +0 -66
  187. package/app-message.ts +0 -18
  188. package/auto-scaling.ts +0 -72
  189. package/card.ts +0 -45
  190. package/cashier_subscription.ts +0 -35
  191. package/cashier_subscription_item.ts +0 -25
  192. package/collab-annotation.ts +0 -36
  193. package/collab-comment.ts +0 -27
  194. package/collab-integration.ts +0 -21
  195. package/collab-push-subscription.ts +0 -19
  196. package/collab-settings.ts +0 -29
  197. package/collab-share-token.ts +0 -15
  198. package/compute.ts +0 -88
  199. package/db-image.ts +0 -66
  200. package/domain/dns.ts +0 -34
  201. package/domain/index.ts +0 -109
  202. package/domain/renewal.ts +0 -25
  203. package/domain/transfer.ts +0 -112
  204. package/enum/index.ts +0 -257
  205. package/env.ts +0 -38
  206. package/environment-variable.ts +0 -21
  207. package/follower.ts +0 -19
  208. package/following.ts +0 -19
  209. package/framework.ts +0 -88
  210. package/index.ts +0 -199
  211. package/integration.ts +0 -39
  212. package/intention.ts +0 -40
  213. package/invoice.ts +0 -36
  214. package/job.ts +0 -30
  215. package/load-balancer-port.ts +0 -31
  216. package/logs.ts +0 -47
  217. package/member-permission.ts +0 -13
  218. package/member.ts +0 -44
  219. package/ownership-transfer.ts +0 -42
  220. package/permission.ts +0 -13
  221. package/plan_configuration.ts +0 -48
  222. package/project/connection.ts +0 -21
  223. package/project/index.ts +0 -238
  224. package/project/preview.ts +0 -41
  225. package/project-environment.ts +0 -18
  226. package/project-tag-assignment.ts +0 -40
  227. package/project_analytics.ts +0 -26
  228. package/provider.ts +0 -11
  229. package/region.ts +0 -18
  230. package/role.ts +0 -12
  231. package/server.ts +0 -105
  232. package/settings.ts +0 -53
  233. package/subscription.ts +0 -86
  234. package/tag.ts +0 -34
  235. package/team.ts +0 -60
  236. package/token.ts +0 -40
  237. package/tsconfig.json +0 -14
  238. package/types/activity-log.ts +0 -19
  239. package/types/app-message.ts +0 -16
  240. package/types/auto-scaling-group.ts +0 -21
  241. package/types/card.ts +0 -20
  242. package/types/cashier_subscription.ts +0 -29
  243. package/types/collab-annotation.ts +0 -28
  244. package/types/collab-comment.ts +0 -22
  245. package/types/collab-integration.ts +0 -14
  246. package/types/collab-push-subscription.ts +0 -10
  247. package/types/collab-settings.ts +0 -17
  248. package/types/collab-share-token.ts +0 -13
  249. package/types/compute.ts +0 -51
  250. package/types/db-image.ts +0 -18
  251. package/types/domain/dns.ts +0 -13
  252. package/types/domain/index.ts +0 -35
  253. package/types/domain/renewal.ts +0 -11
  254. package/types/domain/transfer.ts +0 -32
  255. package/types/env.ts +0 -14
  256. package/types/environment-variable.ts +0 -13
  257. package/types/following.ts +0 -6
  258. package/types/framework.ts +0 -41
  259. package/types/git.ts +0 -15
  260. package/types/index.ts +0 -56
  261. package/types/installed_integration.ts +0 -9
  262. package/types/integration.ts +0 -24
  263. package/types/intention.ts +0 -14
  264. package/types/invoice.ts +0 -16
  265. package/types/job.ts +0 -20
  266. package/types/license.ts +0 -19
  267. package/types/load-balancer-port.ts +0 -13
  268. package/types/logs.ts +0 -36
  269. package/types/member-permission.ts +0 -11
  270. package/types/member.ts +0 -19
  271. package/types/ownership-transfer.ts +0 -13
  272. package/types/permission.ts +0 -19
  273. package/types/plan_configuration.ts +0 -35
  274. package/types/project/connection.ts +0 -7
  275. package/types/project/index.ts +0 -96
  276. package/types/project/preview.ts +0 -22
  277. package/types/project-environment.ts +0 -14
  278. package/types/project-tag-assignment.ts +0 -14
  279. package/types/project_analytics.ts +0 -12
  280. package/types/provider.ts +0 -8
  281. package/types/region.ts +0 -16
  282. package/types/role.ts +0 -13
  283. package/types/server.ts +0 -59
  284. package/types/settings.ts +0 -19
  285. package/types/subscription.ts +0 -34
  286. package/types/tag.ts +0 -12
  287. package/types/team.ts +0 -19
  288. package/types/token.ts +0 -12
  289. package/types/user.ts +0 -41
  290. package/types/volume.ts +0 -15
  291. package/types/wallet.ts +0 -8
  292. package/types/webhook-category.ts +0 -5
  293. package/types/webhook-event.ts +0 -8
  294. package/types/webhook-setting.ts +0 -17
  295. package/user.ts +0 -61
  296. package/volume.ts +0 -36
  297. package/wallet.ts +0 -23
  298. package/webhook-category.ts +0 -11
  299. package/webhook-event.ts +0 -20
  300. package/webhook-setting.ts +0 -48
package/dist/token.d.ts CHANGED
@@ -1,30 +1,9 @@
1
- /// <reference types="mongoose/types/aggregate" />
2
- /// <reference types="mongoose/types/callback" />
3
- /// <reference types="mongoose/types/collection" />
4
- /// <reference types="mongoose/types/connection" />
5
- /// <reference types="mongoose/types/cursor" />
6
- /// <reference types="mongoose/types/document" />
7
- /// <reference types="mongoose/types/error" />
8
- /// <reference types="mongoose/types/expressions" />
9
- /// <reference types="mongoose/types/helpers" />
10
- /// <reference types="mongoose/types/middlewares" />
11
- /// <reference types="mongoose/types/indexes" />
12
- /// <reference types="mongoose/types/models" />
13
- /// <reference types="mongoose/types/mongooseoptions" />
14
- /// <reference types="mongoose/types/pipelinestage" />
15
- /// <reference types="mongoose/types/populate" />
16
- /// <reference types="mongoose/types/query" />
17
- /// <reference types="mongoose/types/schemaoptions" />
18
- /// <reference types="mongoose/types/schematypes" />
19
- /// <reference types="mongoose/types/session" />
20
- /// <reference types="mongoose/types/types" />
21
- /// <reference types="mongoose/types/utility" />
22
- /// <reference types="mongoose/types/validation" />
23
- /// <reference types="mongoose/types/virtuals" />
24
- /// <reference types="mongoose" />
25
- /// <reference types="mongoose/types/inferschematype" />
26
1
  import { IToken } from "./types";
27
- declare const _default: import("mongoose").Model<IToken, {}, {}, {}, import("mongoose").Document<unknown, {}, IToken> & IToken & {
2
+ declare const _default: import("mongoose").Model<IToken, {}, {}, {}, import("mongoose").Document<unknown, {}, IToken, {}, import("mongoose").DefaultSchemaOptions> & IToken & Required<{
28
3
  _id: import("mongoose").Types.ObjectId;
29
- }, any>;
4
+ }> & {
5
+ __v: number;
6
+ } & {
7
+ id: string;
8
+ }, any, IToken>;
30
9
  export default _default;
@@ -0,0 +1,23 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { AlertEventStatus, AlertMetric } from "../enum";
3
+ import { IAlertRule } from "./alert-rule";
4
+ import { IProject } from "./project";
5
+ import { IUser } from "./user";
6
+ export interface IAlertNotificationResult {
7
+ channel_id: Types.ObjectId;
8
+ channel_type: string;
9
+ delivered: boolean;
10
+ error: string | null;
11
+ }
12
+ export interface IAlertEvent extends Document {
13
+ rule_id: IAlertRule | Types.ObjectId;
14
+ user_id: IUser | Types.ObjectId;
15
+ project_id: IProject | Types.ObjectId;
16
+ status: AlertEventStatus;
17
+ value: number;
18
+ threshold: number;
19
+ metric: AlertMetric;
20
+ fired_at: Date;
21
+ resolved_at: Date | null;
22
+ notification_results: IAlertNotificationResult[];
23
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { AlertRuleState } from "../enum";
3
+ import { IAlertRule } from "./alert-rule";
4
+ export interface IAlertRuleState extends Document {
5
+ rule_id: IAlertRule | Types.ObjectId;
6
+ state: AlertRuleState;
7
+ pending_since: Date | null;
8
+ last_evaluated_at: Date;
9
+ last_fired_at: Date | null;
10
+ last_resolved_at: Date | null;
11
+ last_value: number | null;
12
+ consecutive_errors: number;
13
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { AlertChannelMode, AlertCondition, AlertMetric } from "../enum";
3
+ import { IProject } from "./project";
4
+ import { ITeam } from "./team";
5
+ import { IUser } from "./user";
6
+ export interface IAlertRule extends Document {
7
+ user_id: IUser | Types.ObjectId;
8
+ team_id?: ITeam | Types.ObjectId | null;
9
+ project_id: IProject | Types.ObjectId;
10
+ name: string;
11
+ metric: AlertMetric;
12
+ condition: AlertCondition;
13
+ threshold: number;
14
+ duration_seconds: number;
15
+ cooldown_seconds: number;
16
+ channel_mode: AlertChannelMode;
17
+ channel_ids: Types.ObjectId[];
18
+ enabled: boolean;
19
+ created_at: Date;
20
+ updated_at: Date;
21
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,8 +2,8 @@ import { Document } from "mongoose";
2
2
  import { IUser } from "./user";
3
3
  import { ITeam } from "./team";
4
4
  export interface IAppMessage extends Document {
5
- userId: IUser;
6
- teamId: ITeam;
5
+ userId?: IUser;
6
+ teamId?: ITeam;
7
7
  level: string;
8
8
  message: string;
9
9
  seen: boolean;
@@ -1,4 +1,4 @@
1
- import { Types } from "mongoose";
1
+ import { Types, Document } from "mongoose";
2
2
  import { IUser } from "./user";
3
3
  import { ISubscription } from "./subscription";
4
4
  import { ITeam } from "./team";
@@ -1,4 +1,4 @@
1
- import { ServiceType } from "../enum";
1
+ import { SCALING_SOURCE, ServiceType } from "../enum";
2
2
  import { IProject } from "./project";
3
3
  import { IRegion } from "./region";
4
4
  import { ITeam } from "./team";
@@ -45,4 +45,6 @@ export interface IComputeChange {
45
45
  project_deleted_at?: Date;
46
46
  billed: boolean;
47
47
  storage_pricing_factor: number;
48
+ instance_count?: number;
49
+ scaling_source?: SCALING_SOURCE;
48
50
  }
@@ -1,5 +1,5 @@
1
1
  import { Document } from "mongoose";
2
- import { DatabaseEngine } from "../enum";
2
+ import { DatabaseEngine, WorkbenchMode } from "../enum";
3
3
  export interface IDbImage extends Document {
4
4
  name: DatabaseEngine;
5
5
  image_url: string;
@@ -11,10 +11,14 @@ export interface IDbImage extends Document {
11
11
  is_available: boolean;
12
12
  is_default: boolean;
13
13
  image: string;
14
+ free: boolean;
14
15
  has_port: boolean;
15
16
  port: number;
16
17
  volumePath: string;
17
18
  protocol: string;
19
+ ha: boolean;
20
+ workbench: boolean;
21
+ workbench_mode: WorkbenchMode;
18
22
  params: Record<any, any>;
19
23
  recommendations?: Array<{
20
24
  cpu: string;
@@ -0,0 +1,20 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { DNS_CHANGE_SOURCE, DNS_CHANGE_TYPE } from "../../enum";
3
+ export interface IDnsChangeLog extends Document {
4
+ domain_id: Types.ObjectId;
5
+ domain_name: string;
6
+ user_id?: Types.ObjectId;
7
+ team_id?: Types.ObjectId;
8
+ project?: Types.ObjectId;
9
+ change_type: DNS_CHANGE_TYPE;
10
+ source: DNS_CHANGE_SOURCE;
11
+ actor?: string;
12
+ record_id?: Types.ObjectId | null;
13
+ before?: Record<string, any> | null;
14
+ after?: Record<string, any> | null;
15
+ records: Record<string, any>[];
16
+ record_count: number;
17
+ change_key?: string;
18
+ created_at: Date;
19
+ updated_at: Date;
20
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -25,6 +25,7 @@ export interface IDomain extends Document {
25
25
  dns: IDns[];
26
26
  project_environment?: IProjectEnvironment;
27
27
  is_pending_verification: boolean;
28
+ last_expiry_notification_at?: Date | null;
28
29
  redirect?: {
29
30
  url: string;
30
31
  status?: 301 | 302 | 307 | 308;
@@ -1,10 +1,12 @@
1
1
  import { Document } from "mongoose";
2
2
  import { IProjectEnvironment } from "./project-environment";
3
+ import { IProject } from "./project";
3
4
  import { IUser } from "./user";
4
5
  export interface IEnvironmentVariable extends Document {
5
6
  name: string;
6
7
  value: string;
7
8
  project_environment: IProjectEnvironment;
9
+ source_project?: IProject | null;
8
10
  user: IUser;
9
11
  inheritable: boolean;
10
12
  createdAt: Date;
@@ -0,0 +1,10 @@
1
+ import { Document } from "mongoose";
2
+ export interface IIdempotencyRecord extends Document<string> {
3
+ _id: string;
4
+ endpoint: string;
5
+ requestHash: string;
6
+ responseStatus: number;
7
+ responseBody: unknown;
8
+ createdAt: Date;
9
+ expiresAt: Date;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,6 +4,7 @@ export type { IComputeChange } from "./compute";
4
4
  export type { IDbImage } from "./db-image";
5
5
  export type { IDomain } from "./domain";
6
6
  export type { IDns } from "./domain/dns";
7
+ export type { IDnsChangeLog } from "./domain/dns-changelog";
7
8
  export type { IDomainRenewal } from "./domain/renewal";
8
9
  export type { IDomainTransfer } from "./domain/transfer";
9
10
  export type { IEnv } from "./env";
@@ -25,6 +26,8 @@ export type { IProvider } from "./provider";
25
26
  export type { IProject } from "./project";
26
27
  export type { IProjectAnalytics } from "./project_analytics";
27
28
  export type { IProjectConnection } from "./project/connection";
29
+ export type { IProjectNetworkSettings } from "./project-network-settings";
30
+ export type { IRatelimit, RatelimitConfig, RateLimitZone, RateLimitMatcher, DistributedRateLimitConfig, } from "./ratelimit";
28
31
  export type { IPreview } from "./project/preview";
29
32
  export type { IRegion } from "./region";
30
33
  export type { IRole } from "./role";
@@ -53,4 +56,24 @@ export type { ICashierSubscription, ICashierSubscriptionItem } from "./cashier_s
53
56
  export type { IProjectEnvironment } from "./project-environment";
54
57
  export type { IEnvironmentVariable } from "./environment-variable";
55
58
  export type { IActivityLog } from "./activity-log";
59
+ export type { IAlertRule } from "./alert-rule";
60
+ export type { IAlertRuleState } from "./alert-rule-state";
61
+ export type { IAlertEvent, IAlertNotificationResult } from "./alert-event";
56
62
  export type { IOwnershipTransfer } from "./ownership-transfer";
63
+ export type { ISandbox, ISandboxSpecs, ISandboxEgress } from "./sandbox";
64
+ export type { ISandboxActivity } from "./sandbox-activity";
65
+ export type { ISandboxImage } from "./sandbox-image";
66
+ export type { ISandboxSnapshot } from "./sandbox-snapshot";
67
+ export type { ISandboxSnapshotUsageSegment, ISandboxSnapshotUsageSegmentCosts, } from "./sandbox-snapshot-usage-segment";
68
+ export type { ISandboxUsageSegment, ISandboxUsageSegmentCurrent, ISandboxUsageSegmentCosts, } from "./sandbox-usage-segment";
69
+ export type { IVolumeUsageSegment, IVolumeUsageSegmentCosts, } from "./volume-usage-segment";
70
+ export type { IObjectStorageUsageSegment, IObjectStorageUsageSegmentCosts, IObjectStorageUsageUnitsSummary, } from "./object-storage-usage-segment";
71
+ export type { IIdempotencyRecord } from "./idempotency";
72
+ export type { IStreak, IStreakMilestoneRef } from "./streak";
73
+ export type { IStreakEvent } from "./streak-event";
74
+ export type { IStreakDay } from "./streak-day";
75
+ export type { IStreakMilestone } from "./streak-milestone";
76
+ export type { IQuestCampaign, IQuestCriterion, IQuestRequirement, IQuestReward, } from "./quest-campaign";
77
+ export type { IQuestParticipation, IQuestCriterionProgress, } from "./quest-participation";
78
+ export type { IQuestRewardIssuance, IQuestIssuedReward, } from "./quest-reward-issuance";
79
+ export type { IStorageBucket, IStorageObject, IStorageUpload, IStorageToken, IStorageCredential, IStorageMigration, StorageTokenPermission, StorageLifecycleRule, StorageCorsRule, StorageLifecycleRuleTransition } 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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -8,16 +8,21 @@ export interface IPlanConfiguration extends Document {
8
8
  slack_support: boolean;
9
9
  autoscaling_enabled: boolean;
10
10
  concurrent_builds: number;
11
+ rate_limit_enabled: boolean;
11
12
  project_limit: number;
12
13
  deploy_private_organization: boolean;
13
14
  preview_comments: boolean;
15
+ password_enabled: boolean;
14
16
  analytics: boolean;
15
17
  build_minutes: number;
16
18
  log_retention: number;
17
19
  multi_region: boolean;
20
+ ai_debug_enabled: boolean;
21
+ ai_debug_limit: number;
18
22
  bandwidth: number;
19
23
  pull_request_preview: boolean;
20
24
  plan_type: SUBSCRIPTION_PLAN_TYPE;
25
+ volumes_enabled: boolean;
21
26
  memory: number;
22
27
  build_timeout: number;
23
28
  storage: number;
@@ -31,4 +36,21 @@ export interface IPlanConfiguration extends Document {
31
36
  webhook_enabled: boolean;
32
37
  can_deploy_all_applications: boolean;
33
38
  stripe_prices?: Record<string, string>;
39
+ storage_bucket_enabled: boolean;
40
+ storage_bucket_quota_gb: number;
41
+ sandbox_max_count: number;
42
+ sanxbox_hours_max: number;
43
+ sandbox_enabled: boolean;
44
+ sandbox_cpu_hours_included: number;
45
+ sandbox_memory_gb_hours_included: number;
46
+ sandbox_max_runtime_minutes: number;
47
+ sandbox_max_vcpu: number;
48
+ sandbox_max_memory_gb: number;
49
+ sandbox_creation_rate_per_minute: number;
50
+ sandbox_cpu_overage_price: number;
51
+ sandbox_memory_overage_price: number;
52
+ sandbox_snapshot_storage_price: number;
53
+ sandbox_snapshot_gb_months_included: number;
54
+ sandbox_max_volume_size_gb: number;
55
+ sandbox_max_volumes: number;
34
56
  }
@@ -11,12 +11,16 @@ import { IDbImage } from "../db-image";
11
11
  import { IAutoScalingGroup } from "../auto-scaling-group";
12
12
  import { IProjectEnvironment } from "../project-environment";
13
13
  import { IRegion } from "../region";
14
+ import { IVolume } from "../volume";
14
15
  export interface IProject extends Document {
15
16
  name: string;
16
17
  healthCheckPath?: string;
17
18
  preStartCommand?: string;
18
19
  backupEnabled: boolean;
20
+ free_tier_expires_at?: Date | null;
21
+ free_tier_expiry_notified_at?: Date | null;
19
22
  buildCacheEnabled?: boolean;
23
+ alerting_enabled: boolean;
20
24
  domains: Array<IDomain>;
21
25
  environments: Array<IEnv>;
22
26
  uuid: number;
@@ -30,6 +34,7 @@ export interface IProject extends Document {
30
34
  buildCommand: string;
31
35
  startCommand: string;
32
36
  outputDirectory: string;
37
+ workBenchEnabled: boolean;
33
38
  user_id: IUser;
34
39
  monitor_id: string;
35
40
  nomadJobId: string;
@@ -91,5 +96,7 @@ export interface IProject extends Document {
91
96
  hasUpdates?: boolean;
92
97
  whiteListedIps?: string[];
93
98
  diskSize?: number;
99
+ persistent_mount_path?: string;
94
100
  volumeMount: string;
101
+ volume: IVolume | null;
95
102
  }
@@ -0,0 +1,28 @@
1
+ import { Document } from "mongoose";
2
+ import { XContentTypeOptions, XFrameOptions, XRobotsTag } from "../enum";
3
+ import { IProject } from "./project";
4
+ export interface IProjectNetworkSettings extends Document {
5
+ project: IProject;
6
+ cache: {
7
+ purgeOnDeploy: boolean;
8
+ bypassCache: boolean;
9
+ };
10
+ responseRules: {
11
+ xFrameOptions: XFrameOptions;
12
+ xContentTypeOptions: XContentTypeOptions;
13
+ xRobotsTag: XRobotsTag;
14
+ hstsEnabled: boolean;
15
+ markdownForAgents: boolean;
16
+ };
17
+ firewall: {
18
+ pathBlocking: boolean;
19
+ browserIntegrityCheck: boolean;
20
+ underAttackMode: boolean;
21
+ };
22
+ cloudflare: {
23
+ lastSyncedAt?: Date;
24
+ syncError?: string;
25
+ };
26
+ createdAt: Date;
27
+ updatedAt: Date;
28
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -4,4 +4,5 @@ export interface IProvider extends Document {
4
4
  slug: string;
5
5
  logo: string;
6
6
  enabled: boolean;
7
+ suffix: string;
7
8
  }
@@ -0,0 +1,38 @@
1
+ import { Document } from "mongoose";
2
+ import { EligibilityType, MilestoneType, QualifyingActionType, QuestCriterionType, QuestEntity, QuestRequirementType, RewardType } from "../enum";
3
+ export interface IQuestCriterion {
4
+ type: QuestCriterionType;
5
+ label: string;
6
+ target: number;
7
+ entity: QuestEntity | null;
8
+ action: QualifyingActionType | null;
9
+ service_type: string | null;
10
+ distinct: boolean;
11
+ milestones: MilestoneType[];
12
+ }
13
+ export interface IQuestRequirement {
14
+ type: QuestRequirementType;
15
+ target: number;
16
+ message: string | null;
17
+ }
18
+ export interface IQuestReward {
19
+ type: RewardType;
20
+ metadata: Record<string, unknown>;
21
+ }
22
+ export interface IQuestCampaign extends Document {
23
+ name: string;
24
+ slug: string;
25
+ start_at: Date;
26
+ end_at: Date;
27
+ eligibility_type: EligibilityType;
28
+ min_streak_to_join: number;
29
+ slots_total: number;
30
+ slots_remaining: number;
31
+ criteria: IQuestCriterion[];
32
+ requirements: IQuestRequirement[];
33
+ rewards: IQuestReward[];
34
+ active: boolean;
35
+ auto_expire: boolean;
36
+ created_at?: Date;
37
+ updated_at?: Date;
38
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { Document, Types } from "mongoose";
2
+ export interface IQuestCriterionProgress {
3
+ key: string;
4
+ current: number;
5
+ target: number;
6
+ met: boolean;
7
+ }
8
+ export interface IQuestParticipation extends Document {
9
+ campaign_id: Types.ObjectId;
10
+ user_id: Types.ObjectId;
11
+ joined_at: Date;
12
+ slot_number: number;
13
+ streak_deducted: number;
14
+ criteria_progress: IQuestCriterionProgress[];
15
+ qualifier_met: boolean;
16
+ claimed_at: Date | null;
17
+ created_at?: Date;
18
+ updated_at?: Date;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { QuestRewardStatus, RewardType } from "../enum";
3
+ export interface IQuestIssuedReward {
4
+ type: RewardType;
5
+ metadata: Record<string, unknown>;
6
+ }
7
+ export interface IQuestRewardIssuance extends Document {
8
+ participation_id: Types.ObjectId;
9
+ campaign_id: Types.ObjectId;
10
+ user_id: Types.ObjectId;
11
+ rewards: IQuestIssuedReward[];
12
+ status: QuestRewardStatus;
13
+ claimed_at: Date;
14
+ fulfilled_at: Date | null;
15
+ created_at?: Date;
16
+ updated_at?: Date;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,41 @@
1
+ import { Document, Types } from "mongoose";
2
+ export type RateLimitMatcher = {
3
+ methods?: string[];
4
+ paths?: string[];
5
+ };
6
+ export type RateLimitZone = {
7
+ name: string;
8
+ key: string;
9
+ window: string;
10
+ events: number;
11
+ matcher?: RateLimitMatcher;
12
+ ipv4Prefix?: number;
13
+ ipv6Prefix?: number;
14
+ };
15
+ export type DistributedRateLimitConfig = {
16
+ enabled: boolean;
17
+ readInterval?: string;
18
+ writeInterval?: string;
19
+ purgeAge?: string;
20
+ };
21
+ export type RatelimitConfig = {
22
+ enabled: boolean;
23
+ zones: RateLimitZone[];
24
+ distributed?: DistributedRateLimitConfig;
25
+ logKey?: boolean;
26
+ disableMetrics?: boolean;
27
+ jitter?: number;
28
+ sweepInterval?: string;
29
+ };
30
+ export interface IRatelimit extends Document {
31
+ project: Types.ObjectId;
32
+ enabled: boolean;
33
+ zones: RateLimitZone[];
34
+ distributed?: DistributedRateLimitConfig;
35
+ logKey: boolean;
36
+ disableMetrics: boolean;
37
+ jitter?: number;
38
+ sweepInterval?: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,7 @@
1
- import { Schema } from "mongoose";
1
+ import { Types, Document } from "mongoose";
2
2
  import { REGION_CONTINENT } from "../enum";
3
3
  export interface IRegion extends Document {
4
- _id: Schema.Types.ObjectId;
4
+ _id: Types.ObjectId;
5
5
  name: string;
6
6
  country: string;
7
7
  continent?: REGION_CONTINENT;
@@ -0,0 +1,14 @@
1
+ import { Document, Types } from "mongoose";
2
+ export interface ISandboxActivity extends Document {
3
+ sandbox_id: Types.ObjectId;
4
+ user_id: Types.ObjectId;
5
+ team: Types.ObjectId | null;
6
+ command: string;
7
+ started_at: Date;
8
+ ended_at: Date | null;
9
+ exit_code: number | null;
10
+ duration_ms: number | null;
11
+ error: string | null;
12
+ created_at?: Date;
13
+ updated_at?: Date;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { Document } from "mongoose";
2
+ export interface ISandboxImage extends Document {
3
+ name: string;
4
+ display_name: string;
5
+ image: string;
6
+ description: string;
7
+ is_available: boolean;
8
+ is_default: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { Document, Types } from "mongoose";
2
+ export interface ISandboxSnapshotUsageSegmentCosts {
3
+ startDate: Date;
4
+ endDate: Date | null;
5
+ }
6
+ export interface ISandboxSnapshotUsageSegment extends Document {
7
+ _id: Types.ObjectId;
8
+ snapshot_id: Types.ObjectId;
9
+ user_id: Types.ObjectId;
10
+ team_id: Types.ObjectId | null;
11
+ size_gb: number;
12
+ costs: ISandboxSnapshotUsageSegmentCosts;
13
+ billed: boolean;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ import { Document, Types } from "mongoose";
2
+ import { SANDBOX_SNAPSHOT_STATUS } from "../enum";
3
+ export interface ISandboxSnapshot extends Document {
4
+ user_id: Types.ObjectId;
5
+ team: Types.ObjectId | null;
6
+ sandbox_id: Types.ObjectId;
7
+ name: string;
8
+ image_tag: string;
9
+ source_template: string;
10
+ status: SANDBOX_SNAPSHOT_STATUS;
11
+ failure_reason: string | null;
12
+ size_bytes: number | null;
13
+ created_at: Date;
14
+ updated_at: Date;
15
+ isDeleted: boolean;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });