@brimble/models 3.8.43 → 3.8.45

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 (278) hide show
  1. package/enum/index.ts +10 -0
  2. package/index.ts +4 -1
  3. package/package.json +1 -1
  4. package/storage.ts +36 -2
  5. package/types/index.ts +1 -0
  6. package/types/storage.ts +25 -1
  7. package/types/volume.ts +1 -0
  8. package/volume.ts +4 -0
  9. package/dist/activity-log.d.ts +0 -9
  10. package/dist/activity-log.js +0 -61
  11. package/dist/app-message.d.ts +0 -9
  12. package/dist/app-message.js +0 -14
  13. package/dist/auto-scaling.d.ts +0 -9
  14. package/dist/auto-scaling.js +0 -63
  15. package/dist/card.d.ts +0 -9
  16. package/dist/card.js +0 -41
  17. package/dist/cashier_subscription.d.ts +0 -9
  18. package/dist/cashier_subscription.js +0 -27
  19. package/dist/cashier_subscription_item.d.ts +0 -9
  20. package/dist/cashier_subscription_item.js +0 -17
  21. package/dist/collab-annotation.d.ts +0 -9
  22. package/dist/collab-annotation.js +0 -31
  23. package/dist/collab-comment.d.ts +0 -9
  24. package/dist/collab-comment.js +0 -19
  25. package/dist/collab-integration.d.ts +0 -9
  26. package/dist/collab-integration.js +0 -17
  27. package/dist/collab-push-subscription.d.ts +0 -9
  28. package/dist/collab-push-subscription.js +0 -14
  29. package/dist/collab-settings.d.ts +0 -9
  30. package/dist/collab-settings.js +0 -24
  31. package/dist/collab-share-token.d.ts +0 -9
  32. package/dist/collab-share-token.js +0 -11
  33. package/dist/compute.d.ts +0 -9
  34. package/dist/compute.js +0 -82
  35. package/dist/db-image.d.ts +0 -9
  36. package/dist/db-image.js +0 -67
  37. package/dist/domain/dns.d.ts +0 -9
  38. package/dist/domain/dns.js +0 -33
  39. package/dist/domain/index.d.ts +0 -9
  40. package/dist/domain/index.js +0 -109
  41. package/dist/domain/renewal.d.ts +0 -9
  42. package/dist/domain/renewal.js +0 -21
  43. package/dist/domain/transfer.d.ts +0 -9
  44. package/dist/domain/transfer.js +0 -99
  45. package/dist/enum/index.d.ts +0 -263
  46. package/dist/enum/index.js +0 -309
  47. package/dist/env.d.ts +0 -9
  48. package/dist/env.js +0 -34
  49. package/dist/environment-variable.d.ts +0 -9
  50. package/dist/environment-variable.js +0 -16
  51. package/dist/follower.d.ts +0 -9
  52. package/dist/follower.js +0 -15
  53. package/dist/following.d.ts +0 -9
  54. package/dist/following.js +0 -15
  55. package/dist/framework.d.ts +0 -9
  56. package/dist/framework.js +0 -84
  57. package/dist/idempotency.d.ts +0 -9
  58. package/dist/idempotency.js +0 -17
  59. package/dist/index.d.ts +0 -72
  60. package/dist/index.js +0 -229
  61. package/dist/integration.d.ts +0 -9
  62. package/dist/integration.js +0 -35
  63. package/dist/intention.d.ts +0 -9
  64. package/dist/intention.js +0 -36
  65. package/dist/invoice.d.ts +0 -9
  66. package/dist/invoice.js +0 -28
  67. package/dist/job.d.ts +0 -10
  68. package/dist/job.js +0 -62
  69. package/dist/license.d.ts +0 -9
  70. package/dist/license.js +0 -75
  71. package/dist/load-balancer-port.d.ts +0 -9
  72. package/dist/load-balancer-port.js +0 -27
  73. package/dist/logs.d.ts +0 -9
  74. package/dist/logs.js +0 -40
  75. package/dist/member-permission.d.ts +0 -9
  76. package/dist/member-permission.js +0 -9
  77. package/dist/member.d.ts +0 -9
  78. package/dist/member.js +0 -40
  79. package/dist/object-storage-usage-segment.d.ts +0 -9
  80. package/dist/object-storage-usage-segment.js +0 -46
  81. package/dist/ownership-transfer.d.ts +0 -9
  82. package/dist/ownership-transfer.js +0 -35
  83. package/dist/permission.d.ts +0 -9
  84. package/dist/permission.js +0 -12
  85. package/dist/plan_configuration.d.ts +0 -10
  86. package/dist/plan_configuration.js +0 -61
  87. package/dist/project/connection.d.ts +0 -9
  88. package/dist/project/connection.js +0 -14
  89. package/dist/project/index.d.ts +0 -16
  90. package/dist/project/index.js +0 -256
  91. package/dist/project/preview.d.ts +0 -9
  92. package/dist/project/preview.js +0 -37
  93. package/dist/project-environment.d.ts +0 -9
  94. package/dist/project-environment.js +0 -13
  95. package/dist/project-tag-assignment.d.ts +0 -9
  96. package/dist/project-tag-assignment.js +0 -32
  97. package/dist/project_analytics.d.ts +0 -9
  98. package/dist/project_analytics.js +0 -18
  99. package/dist/provider.d.ts +0 -9
  100. package/dist/provider.js +0 -10
  101. package/dist/region.d.ts +0 -10
  102. package/dist/region.js +0 -17
  103. package/dist/role.d.ts +0 -9
  104. package/dist/role.js +0 -11
  105. package/dist/sandbox-activity.d.ts +0 -9
  106. package/dist/sandbox-activity.js +0 -49
  107. package/dist/sandbox-image.d.ts +0 -9
  108. package/dist/sandbox-image.js +0 -31
  109. package/dist/sandbox-snapshot-usage-segment.d.ts +0 -9
  110. package/dist/sandbox-snapshot-usage-segment.js +0 -49
  111. package/dist/sandbox-snapshot.d.ts +0 -9
  112. package/dist/sandbox-snapshot.js +0 -51
  113. package/dist/sandbox-usage-segment.d.ts +0 -9
  114. package/dist/sandbox-usage-segment.js +0 -57
  115. package/dist/sandbox.d.ts +0 -9
  116. package/dist/sandbox.js +0 -132
  117. package/dist/server.d.ts +0 -9
  118. package/dist/server.js +0 -101
  119. package/dist/settings.d.ts +0 -9
  120. package/dist/settings.js +0 -49
  121. package/dist/storage.d.ts +0 -29
  122. package/dist/storage.js +0 -65
  123. package/dist/subscription.d.ts +0 -9
  124. package/dist/subscription.js +0 -82
  125. package/dist/tag.d.ts +0 -9
  126. package/dist/tag.js +0 -29
  127. package/dist/team.d.ts +0 -9
  128. package/dist/team.js +0 -82
  129. package/dist/token.d.ts +0 -9
  130. package/dist/token.js +0 -36
  131. package/dist/types/activity-log.d.ts +0 -18
  132. package/dist/types/activity-log.js +0 -2
  133. package/dist/types/app-message.d.ts +0 -15
  134. package/dist/types/app-message.js +0 -2
  135. package/dist/types/auto-scaling-group.d.ts +0 -20
  136. package/dist/types/auto-scaling-group.js +0 -2
  137. package/dist/types/card.d.ts +0 -12
  138. package/dist/types/card.js +0 -2
  139. package/dist/types/cashier_subscription.d.ts +0 -27
  140. package/dist/types/cashier_subscription.js +0 -2
  141. package/dist/types/collab-annotation.d.ts +0 -27
  142. package/dist/types/collab-annotation.js +0 -2
  143. package/dist/types/collab-comment.d.ts +0 -20
  144. package/dist/types/collab-comment.js +0 -2
  145. package/dist/types/collab-integration.d.ts +0 -13
  146. package/dist/types/collab-integration.js +0 -2
  147. package/dist/types/collab-push-subscription.d.ts +0 -12
  148. package/dist/types/collab-push-subscription.js +0 -2
  149. package/dist/types/collab-settings.d.ts +0 -16
  150. package/dist/types/collab-settings.js +0 -2
  151. package/dist/types/collab-share-token.d.ts +0 -12
  152. package/dist/types/collab-share-token.js +0 -2
  153. package/dist/types/compute.d.ts +0 -48
  154. package/dist/types/compute.js +0 -2
  155. package/dist/types/db-image.d.ts +0 -25
  156. package/dist/types/db-image.js +0 -2
  157. package/dist/types/domain/dns.d.ts +0 -12
  158. package/dist/types/domain/dns.js +0 -2
  159. package/dist/types/domain/index.d.ts +0 -35
  160. package/dist/types/domain/index.js +0 -2
  161. package/dist/types/domain/renewal.d.ts +0 -10
  162. package/dist/types/domain/renewal.js +0 -2
  163. package/dist/types/domain/transfer.d.ts +0 -27
  164. package/dist/types/domain/transfer.js +0 -2
  165. package/dist/types/env.d.ts +0 -13
  166. package/dist/types/env.js +0 -2
  167. package/dist/types/environment-variable.d.ts +0 -12
  168. package/dist/types/environment-variable.js +0 -2
  169. package/dist/types/following.d.ts +0 -5
  170. package/dist/types/following.js +0 -2
  171. package/dist/types/framework.d.ts +0 -39
  172. package/dist/types/framework.js +0 -2
  173. package/dist/types/git.d.ts +0 -14
  174. package/dist/types/git.js +0 -2
  175. package/dist/types/idempotency.d.ts +0 -10
  176. package/dist/types/idempotency.js +0 -2
  177. package/dist/types/index.d.ts +0 -66
  178. package/dist/types/index.js +0 -2
  179. package/dist/types/installed_integration.d.ts +0 -6
  180. package/dist/types/installed_integration.js +0 -2
  181. package/dist/types/integration.d.ts +0 -14
  182. package/dist/types/integration.js +0 -2
  183. package/dist/types/intention.d.ts +0 -13
  184. package/dist/types/intention.js +0 -2
  185. package/dist/types/invoice.d.ts +0 -15
  186. package/dist/types/invoice.js +0 -2
  187. package/dist/types/job.d.ts +0 -19
  188. package/dist/types/job.js +0 -2
  189. package/dist/types/license.d.ts +0 -18
  190. package/dist/types/license.js +0 -2
  191. package/dist/types/load-balancer-port.d.ts +0 -12
  192. package/dist/types/load-balancer-port.js +0 -2
  193. package/dist/types/logs.d.ts +0 -35
  194. package/dist/types/logs.js +0 -2
  195. package/dist/types/member-permission.d.ts +0 -8
  196. package/dist/types/member-permission.js +0 -2
  197. package/dist/types/member.d.ts +0 -18
  198. package/dist/types/member.js +0 -2
  199. package/dist/types/object-storage-usage-segment.d.ts +0 -23
  200. package/dist/types/object-storage-usage-segment.js +0 -2
  201. package/dist/types/ownership-transfer.d.ts +0 -12
  202. package/dist/types/ownership-transfer.js +0 -2
  203. package/dist/types/permission.d.ts +0 -13
  204. package/dist/types/permission.js +0 -2
  205. package/dist/types/plan_configuration.d.ts +0 -55
  206. package/dist/types/plan_configuration.js +0 -2
  207. package/dist/types/project/connection.d.ts +0 -6
  208. package/dist/types/project/connection.js +0 -2
  209. package/dist/types/project/index.d.ts +0 -100
  210. package/dist/types/project/index.js +0 -2
  211. package/dist/types/project/preview.d.ts +0 -21
  212. package/dist/types/project/preview.js +0 -2
  213. package/dist/types/project-environment.d.ts +0 -13
  214. package/dist/types/project-environment.js +0 -2
  215. package/dist/types/project-tag-assignment.d.ts +0 -13
  216. package/dist/types/project-tag-assignment.js +0 -2
  217. package/dist/types/project_analytics.d.ts +0 -11
  218. package/dist/types/project_analytics.js +0 -2
  219. package/dist/types/provider.d.ts +0 -7
  220. package/dist/types/provider.js +0 -2
  221. package/dist/types/region.d.ts +0 -15
  222. package/dist/types/region.js +0 -2
  223. package/dist/types/role.d.ts +0 -9
  224. package/dist/types/role.js +0 -2
  225. package/dist/types/sandbox-activity.d.ts +0 -14
  226. package/dist/types/sandbox-activity.js +0 -2
  227. package/dist/types/sandbox-image.d.ts +0 -9
  228. package/dist/types/sandbox-image.js +0 -2
  229. package/dist/types/sandbox-snapshot-usage-segment.d.ts +0 -16
  230. package/dist/types/sandbox-snapshot-usage-segment.js +0 -2
  231. package/dist/types/sandbox-snapshot.d.ts +0 -16
  232. package/dist/types/sandbox-snapshot.js +0 -2
  233. package/dist/types/sandbox-usage-segment.d.ts +0 -25
  234. package/dist/types/sandbox-usage-segment.js +0 -2
  235. package/dist/types/sandbox.d.ts +0 -41
  236. package/dist/types/sandbox.js +0 -2
  237. package/dist/types/server.d.ts +0 -32
  238. package/dist/types/server.js +0 -2
  239. package/dist/types/settings.d.ts +0 -11
  240. package/dist/types/settings.js +0 -2
  241. package/dist/types/storage.d.ts +0 -62
  242. package/dist/types/storage.js +0 -2
  243. package/dist/types/subscription.d.ts +0 -33
  244. package/dist/types/subscription.js +0 -2
  245. package/dist/types/tag.d.ts +0 -11
  246. package/dist/types/tag.js +0 -2
  247. package/dist/types/team.d.ts +0 -24
  248. package/dist/types/team.js +0 -2
  249. package/dist/types/token.d.ts +0 -11
  250. package/dist/types/token.js +0 -2
  251. package/dist/types/user.d.ts +0 -44
  252. package/dist/types/user.js +0 -2
  253. package/dist/types/volume-usage-segment.d.ts +0 -16
  254. package/dist/types/volume-usage-segment.js +0 -2
  255. package/dist/types/volume.d.ts +0 -19
  256. package/dist/types/volume.js +0 -2
  257. package/dist/types/wallet.d.ts +0 -8
  258. package/dist/types/wallet.js +0 -2
  259. package/dist/types/webhook-category.d.ts +0 -4
  260. package/dist/types/webhook-category.js +0 -2
  261. package/dist/types/webhook-event.d.ts +0 -7
  262. package/dist/types/webhook-event.js +0 -2
  263. package/dist/types/webhook-setting.d.ts +0 -16
  264. package/dist/types/webhook-setting.js +0 -2
  265. package/dist/user.d.ts +0 -9
  266. package/dist/user.js +0 -70
  267. package/dist/volume-usage-segment.d.ts +0 -9
  268. package/dist/volume-usage-segment.js +0 -46
  269. package/dist/volume.d.ts +0 -9
  270. package/dist/volume.js +0 -44
  271. package/dist/wallet.d.ts +0 -9
  272. package/dist/wallet.js +0 -26
  273. package/dist/webhook-category.d.ts +0 -9
  274. package/dist/webhook-category.js +0 -10
  275. package/dist/webhook-event.d.ts +0 -9
  276. package/dist/webhook-event.js +0 -19
  277. package/dist/webhook-setting.d.ts +0 -9
  278. package/dist/webhook-setting.js +0 -50
@@ -1,15 +0,0 @@
1
- import { Schema } from "mongoose";
2
- import { REGION_CONTINENT } from "../enum";
3
- export interface IRegion extends Document {
4
- _id: Schema.Types.ObjectId;
5
- name: string;
6
- country: string;
7
- continent?: REGION_CONTINENT;
8
- enabled?: boolean;
9
- dbVolumePath: string;
10
- is_paid: boolean;
11
- provider: string;
12
- provider_identifier: string;
13
- storage_pricing_factor: number;
14
- floating_ip?: string;
15
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { ROLES } from "../enum";
3
- import { IPermission } from "./permission";
4
- export interface IRole extends Document {
5
- type: ROLES;
6
- description?: string;
7
- is_custom?: boolean;
8
- permissions: IPermission[];
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,14 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,25 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- import { ISandbox } from "./sandbox";
3
- import { IUser } from "./user";
4
- import { ITeam } from "./team";
5
- export interface ISandboxUsageSegmentCurrent {
6
- cpu: number;
7
- memory: number;
8
- storage: number;
9
- }
10
- export interface ISandboxUsageSegmentCosts {
11
- startDate: Date;
12
- endDate: Date | null;
13
- }
14
- export interface ISandboxUsageSegment extends Document {
15
- sandbox_id: ISandbox | Types.ObjectId;
16
- user_id: IUser | Types.ObjectId;
17
- team_id: ITeam | Types.ObjectId | null;
18
- current: ISandboxUsageSegmentCurrent;
19
- costs: ISandboxUsageSegmentCosts;
20
- billed: boolean;
21
- region?: string;
22
- template?: string;
23
- createdAt: Date;
24
- updatedAt: Date;
25
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,41 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- import { IUser } from "./user";
3
- import { ITeam } from "./team";
4
- import { IProjectEnvironment } from "./project-environment";
5
- import { SANDBOX_STATUS, SANDBOX_DESTROY_REASON } from "../enum";
6
- import { IRegion } from "./region";
7
- export interface ISandboxSpecs {
8
- cpu: number;
9
- memory: number;
10
- disk: number;
11
- }
12
- export interface ISandbox extends Document {
13
- name: string;
14
- user_id: IUser | Types.ObjectId;
15
- team: ITeam | Types.ObjectId | null;
16
- project_environment: IProjectEnvironment | Types.ObjectId | null;
17
- template: string;
18
- status: SANDBOX_STATUS;
19
- nomad_job_id: string;
20
- nomad_alloc_id: string | null;
21
- region: IRegion;
22
- specs: ISandboxSpecs;
23
- created_at: Date;
24
- last_activity_at: Date;
25
- expires_at: Date;
26
- destroyed_at: Date | null;
27
- destroy_reason: SANDBOX_DESTROY_REASON | null;
28
- auto_destroy: boolean;
29
- destroy_timeout: string | null;
30
- one_shot: boolean;
31
- block_outbound: boolean;
32
- persistent: boolean;
33
- persistent_disk_gb: number | null;
34
- csi_volume_id: string | null;
35
- paused_at: Date | null;
36
- image_override: string | null;
37
- from_snapshot: Types.ObjectId | null;
38
- snapshot_mode: "automatic" | "manual";
39
- snapshot_frequency: string | null;
40
- isDeleted: boolean;
41
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,32 +0,0 @@
1
- import mongoose, { Document } from "mongoose";
2
- import { SERVER_STATUS, SERVER_PROTOCOL } from "../enum";
3
- import { IRegion } from "./region";
4
- export interface IServer extends Document {
5
- name: string;
6
- url: string;
7
- grpc_address?: string;
8
- ipv6?: string;
9
- domain?: string;
10
- userId: mongoose.Types.ObjectId;
11
- teamId?: mongoose.Types.ObjectId;
12
- ip_address: string;
13
- private_ip_address: string;
14
- tunnel_token: string;
15
- type: string;
16
- protocol: SERVER_PROTOCOL;
17
- status: SERVER_STATUS;
18
- default: boolean;
19
- tag: string;
20
- region: IRegion;
21
- webhook_url?: string;
22
- is_custom_provision: boolean;
23
- firewall_id?: string;
24
- specifications: Record<any, any>;
25
- plugin_id?: string;
26
- provider: string;
27
- provider_location?: string;
28
- provider_identifier?: string;
29
- topology_path?: string;
30
- cert_storage_path?: string | null;
31
- meta: Record<any, any>;
32
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { Document } from "mongoose";
2
- export interface ISettings extends Document {
3
- vaultEnabled: boolean;
4
- maintenanceMode: boolean;
5
- buildsEnabled: boolean;
6
- minimumBuildMinutes: number;
7
- enableSecretRotation: boolean;
8
- domainPromoEnabled: boolean;
9
- postHogEnabled: boolean;
10
- metaSettings: Record<string, any>;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,62 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- import { StorageBucketStatus, StorageTokenStatus, StorageUploadStatus } from "../enum";
3
- export type StorageTokenPermission = "read" | "write" | "delete" | "list" | "admin";
4
- export interface IStorageBucket extends Document {
5
- name: string;
6
- project?: Types.ObjectId;
7
- user_id?: Types.ObjectId;
8
- team?: Types.ObjectId;
9
- bucket_name: string;
10
- is_public: boolean;
11
- versioning: boolean;
12
- provider: string;
13
- region: string;
14
- storage_used: number;
15
- reserved_bytes: number;
16
- quota: number;
17
- status: StorageBucketStatus;
18
- createdAt: Date;
19
- updatedAt: Date;
20
- }
21
- export interface IStorageObject extends Document {
22
- bucket: Types.ObjectId;
23
- project?: Types.ObjectId;
24
- key: string;
25
- path: string;
26
- content_type?: string;
27
- size: number;
28
- etag?: string;
29
- public_url?: string;
30
- last_modified?: Date;
31
- createdAt: Date;
32
- updatedAt: Date;
33
- }
34
- export interface IStorageUpload extends Document {
35
- bucket: Types.ObjectId;
36
- project?: Types.ObjectId;
37
- key: string;
38
- path: string;
39
- upload_id?: string;
40
- content_type?: string;
41
- size: number;
42
- status: StorageUploadStatus;
43
- expires_at: Date;
44
- completed_at?: Date;
45
- createdAt: Date;
46
- updatedAt: Date;
47
- }
48
- export interface IStorageToken extends Document {
49
- name: string;
50
- token_hash: string;
51
- prefix: string;
52
- project?: Types.ObjectId;
53
- buckets: Types.ObjectId[];
54
- user_id?: Types.ObjectId;
55
- team?: Types.ObjectId;
56
- permissions: StorageTokenPermission[];
57
- status: StorageTokenStatus;
58
- last_used_at?: Date;
59
- expires_at?: Date;
60
- createdAt: Date;
61
- updatedAt: Date;
62
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,33 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { SUBSCRIPTION_PLAN_TYPE, SUBSCRIPTION_STATUS } from "../enum";
3
- import { IUser } from "./user";
4
- import { ITeam } from "./team";
5
- import { IProject } from "./project";
6
- export interface ISubscription extends Document {
7
- initial_start_date: string;
8
- team_id: ITeam;
9
- due_amount: number;
10
- admin_id: IUser;
11
- downgraded: boolean;
12
- billable_id: IUser;
13
- project_id?: IProject;
14
- plan_type: SUBSCRIPTION_PLAN_TYPE;
15
- status: SUBSCRIPTION_STATUS;
16
- amount: number;
17
- transaction_retries: number;
18
- debit_date: string;
19
- start_date: string;
20
- expiry_date: string;
21
- reminder_date: string;
22
- is_pending_downgrade: boolean;
23
- grafana_org_id: string;
24
- job_identifier: string;
25
- trigger_created: boolean;
26
- trigger_created_at: string;
27
- disabled_at: Date;
28
- specifications: {
29
- [key: string]: any;
30
- };
31
- created_at: Date;
32
- updated_at: Date;
33
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { ITeam } from "./team";
3
- import { IUser } from "./user";
4
- export interface ITag extends Document {
5
- name: string;
6
- color: string;
7
- teamId: ITeam;
8
- createdBy: IUser;
9
- createdAt: Date;
10
- updatedAt: Date;
11
- }
package/dist/types/tag.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,24 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- import { IMember, IProject, ISubscription, IUser } from "./";
3
- import { BUILD_DISABLED_BY } from "../enum";
4
- export interface ITeam extends Document {
5
- name: string;
6
- description: string;
7
- size: number;
8
- members: IMember[];
9
- projects: IProject[];
10
- ai_usage_count: number;
11
- image: string;
12
- isCreator: boolean;
13
- build_minutes: number;
14
- build_minutes_last_reset_at: Date | null;
15
- build_minutes_cycle_anchor: Date | null;
16
- build_disabled: boolean;
17
- build_disabled_by: BUILD_DISABLED_BY;
18
- sandbox_disabled: boolean;
19
- sandbox_disabled_by: "system" | "payment_failure" | null;
20
- subscription: ISubscription;
21
- enforce_2fa: boolean;
22
- enforce_2fa_at: Date | null;
23
- enforce_2fa_by: IUser | Types.ObjectId | null;
24
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { ISubscription } from "./subscription";
3
- import { IUser } from "./user";
4
- export interface IToken extends Document {
5
- subscription_id: ISubscription;
6
- owner_id: IUser;
7
- key_id: string;
8
- key: string;
9
- tokens_remaining: number;
10
- tokens_used: number;
11
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,44 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { IGit } from ".";
3
- import { IFollowing, IProject, ITeam } from "./";
4
- import { BUILD_DISABLED_BY } from "../enum";
5
- export interface IUser extends Document {
6
- first_name: string;
7
- last_name: string;
8
- email: string;
9
- username: string;
10
- password: string;
11
- email_verified_at: string;
12
- verification_token: number;
13
- token?: string;
14
- company?: string;
15
- ai_usage_count: number;
16
- github: IGit;
17
- gitlab: IGit;
18
- location: string;
19
- interests: Array<string>;
20
- bitbucket: IGit;
21
- following: IFollowing[];
22
- projects: IProject[];
23
- teams: ITeam[];
24
- avatar: string;
25
- freeTrialActive: boolean;
26
- activated: boolean;
27
- is_waitlist: boolean;
28
- build_disabled: boolean;
29
- build_disabled_by: BUILD_DISABLED_BY;
30
- sandbox_disabled: boolean;
31
- sandbox_disabled_by: "system" | "payment_failure" | null;
32
- spending_limit: number;
33
- build_minutes: number;
34
- disabled: boolean;
35
- disabled_at: Date;
36
- has_payment_method: boolean;
37
- notifications: {
38
- email: boolean;
39
- mute: boolean;
40
- };
41
- totp_enabled?: boolean;
42
- created_at: Date;
43
- updated_at: Date;
44
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- export interface IVolumeUsageSegmentCosts {
3
- startDate: Date;
4
- endDate: Date | null;
5
- }
6
- export interface IVolumeUsageSegment extends Document {
7
- _id: Types.ObjectId;
8
- volume_id: Types.ObjectId;
9
- user_id: Types.ObjectId;
10
- team_id: Types.ObjectId | null;
11
- size_gb: number;
12
- costs: IVolumeUsageSegmentCosts;
13
- billed: boolean;
14
- createdAt: Date;
15
- updatedAt: Date;
16
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,19 +0,0 @@
1
- import { Document, Types } from "mongoose";
2
- import { IUser } from "./user";
3
- import { ITeam } from "./team";
4
- import { IRegion } from "./region";
5
- export interface IVolume extends Document {
6
- name: string;
7
- user?: IUser;
8
- team?: ITeam;
9
- size: number;
10
- type: string;
11
- mount_path?: string;
12
- csi_volume_id: string | null;
13
- region: IRegion | null;
14
- attached_sandbox_id: Types.ObjectId | null;
15
- attached_project_id: Types.ObjectId | null;
16
- last_attached_at: Date | null;
17
- created_at?: Date;
18
- updated_at?: Date;
19
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import { Document } from "mongoose";
2
- export interface IWallet extends Document {
3
- balance: number;
4
- slug: string;
5
- enabled: boolean;
6
- provider: string;
7
- discounted: boolean;
8
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { Document } from "mongoose";
2
- export interface IWebhookCategory extends Document {
3
- category: string;
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { IWebhookCategory } from "./webhook-category";
3
- export interface IWebhookEvent extends Document {
4
- name: string;
5
- category: IWebhookCategory;
6
- description: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { Document } from "mongoose";
2
- import { IWebhookEvent } from "./webhook-event";
3
- import { ISubscription } from "./subscription";
4
- import { IUser } from "./user";
5
- import { ITeam } from "./team";
6
- export interface IWebhookSetting extends Document {
7
- user_id: IUser;
8
- team_id?: ITeam;
9
- subscription_id: ISubscription;
10
- webhook_id: string;
11
- external_webhook_url?: string;
12
- webhookUrl: string;
13
- discordUrl: string;
14
- slackUrl: string;
15
- events: IWebhookEvent[];
16
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/dist/user.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { IUser } from "./types";
2
- declare const _default: import("mongoose").Model<IUser, {}, {}, {}, import("mongoose").Document<unknown, {}, IUser, {}, import("mongoose").DefaultSchemaOptions> & IUser & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IUser>;
9
- export default _default;
package/dist/user.js DELETED
@@ -1,70 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const userSchema = new mongoose_1.Schema({
5
- first_name: String,
6
- last_name: String,
7
- username: String,
8
- email: { type: String, required: true },
9
- password: { type: String },
10
- email_verified_at: Date,
11
- following: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Following" }],
12
- verification_token: { ype: Number },
13
- location: { type: String },
14
- interests: { type: Array },
15
- github: Object,
16
- gitlab: Object,
17
- bitbucket: Object,
18
- access_code: { type: Number },
19
- company: String,
20
- projects: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Project" }],
21
- teams: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "Team" }],
22
- avatar: { type: String },
23
- freeTrialActive: {
24
- type: Boolean,
25
- default: true,
26
- required: false,
27
- },
28
- activated: {
29
- type: Boolean,
30
- default: false,
31
- required: false,
32
- },
33
- build_disabled: {
34
- type: Boolean,
35
- default: false,
36
- required: false,
37
- },
38
- build_disabled_by: {
39
- type: String,
40
- required: false,
41
- },
42
- sandbox_disabled: {
43
- type: Boolean,
44
- default: false,
45
- },
46
- sandbox_disabled_by: {
47
- type: String,
48
- default: null,
49
- },
50
- ai_usage_count: {
51
- type: Number,
52
- default: 0,
53
- required: false
54
- },
55
- tenant: { type: mongoose_1.Schema.Types.ObjectId, ref: "Tenancy", required: false },
56
- is_waitlist: { type: Boolean, default: true },
57
- spending_limit: { type: Number },
58
- build_minutes: { type: Number, default: 0 },
59
- notifications: Object,
60
- disabled: Boolean,
61
- disabled_at: Date,
62
- has_payment_method: Boolean,
63
- totp_enabled: { type: Boolean, default: false },
64
- }, {
65
- timestamps: {
66
- createdAt: "created_at",
67
- updatedAt: "updated_at",
68
- },
69
- });
70
- exports.default = (0, mongoose_1.model)("User", userSchema);
@@ -1,9 +0,0 @@
1
- import { IVolumeUsageSegment } from "./types/volume-usage-segment";
2
- declare const _default: import("mongoose").Model<IVolumeUsageSegment, {}, {}, {}, import("mongoose").Document<unknown, {}, IVolumeUsageSegment, {}, import("mongoose").DefaultSchemaOptions> & IVolumeUsageSegment & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IVolumeUsageSegment>;
9
- export default _default;