@brimble/models 3.8.44 → 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 (273) hide show
  1. package/package.json +1 -1
  2. package/types/volume.ts +1 -0
  3. package/volume.ts +4 -0
  4. package/dist/activity-log.d.ts +0 -9
  5. package/dist/activity-log.js +0 -61
  6. package/dist/app-message.d.ts +0 -9
  7. package/dist/app-message.js +0 -14
  8. package/dist/auto-scaling.d.ts +0 -9
  9. package/dist/auto-scaling.js +0 -63
  10. package/dist/card.d.ts +0 -9
  11. package/dist/card.js +0 -41
  12. package/dist/cashier_subscription.d.ts +0 -9
  13. package/dist/cashier_subscription.js +0 -27
  14. package/dist/cashier_subscription_item.d.ts +0 -9
  15. package/dist/cashier_subscription_item.js +0 -17
  16. package/dist/collab-annotation.d.ts +0 -9
  17. package/dist/collab-annotation.js +0 -31
  18. package/dist/collab-comment.d.ts +0 -9
  19. package/dist/collab-comment.js +0 -19
  20. package/dist/collab-integration.d.ts +0 -9
  21. package/dist/collab-integration.js +0 -17
  22. package/dist/collab-push-subscription.d.ts +0 -9
  23. package/dist/collab-push-subscription.js +0 -14
  24. package/dist/collab-settings.d.ts +0 -9
  25. package/dist/collab-settings.js +0 -24
  26. package/dist/collab-share-token.d.ts +0 -9
  27. package/dist/collab-share-token.js +0 -11
  28. package/dist/compute.d.ts +0 -9
  29. package/dist/compute.js +0 -82
  30. package/dist/db-image.d.ts +0 -9
  31. package/dist/db-image.js +0 -67
  32. package/dist/domain/dns.d.ts +0 -9
  33. package/dist/domain/dns.js +0 -33
  34. package/dist/domain/index.d.ts +0 -9
  35. package/dist/domain/index.js +0 -109
  36. package/dist/domain/renewal.d.ts +0 -9
  37. package/dist/domain/renewal.js +0 -21
  38. package/dist/domain/transfer.d.ts +0 -9
  39. package/dist/domain/transfer.js +0 -99
  40. package/dist/enum/index.d.ts +0 -271
  41. package/dist/enum/index.js +0 -319
  42. package/dist/env.d.ts +0 -9
  43. package/dist/env.js +0 -34
  44. package/dist/environment-variable.d.ts +0 -9
  45. package/dist/environment-variable.js +0 -16
  46. package/dist/follower.d.ts +0 -9
  47. package/dist/follower.js +0 -15
  48. package/dist/following.d.ts +0 -9
  49. package/dist/following.js +0 -15
  50. package/dist/framework.d.ts +0 -9
  51. package/dist/framework.js +0 -84
  52. package/dist/idempotency.d.ts +0 -9
  53. package/dist/idempotency.js +0 -17
  54. package/dist/index.d.ts +0 -72
  55. package/dist/index.js +0 -232
  56. package/dist/integration.d.ts +0 -9
  57. package/dist/integration.js +0 -35
  58. package/dist/intention.d.ts +0 -9
  59. package/dist/intention.js +0 -36
  60. package/dist/invoice.d.ts +0 -9
  61. package/dist/invoice.js +0 -28
  62. package/dist/job.d.ts +0 -10
  63. package/dist/job.js +0 -62
  64. package/dist/license.d.ts +0 -9
  65. package/dist/license.js +0 -75
  66. package/dist/load-balancer-port.d.ts +0 -9
  67. package/dist/load-balancer-port.js +0 -27
  68. package/dist/logs.d.ts +0 -9
  69. package/dist/logs.js +0 -40
  70. package/dist/member-permission.d.ts +0 -9
  71. package/dist/member-permission.js +0 -9
  72. package/dist/member.d.ts +0 -9
  73. package/dist/member.js +0 -40
  74. package/dist/object-storage-usage-segment.d.ts +0 -9
  75. package/dist/object-storage-usage-segment.js +0 -46
  76. package/dist/ownership-transfer.d.ts +0 -9
  77. package/dist/ownership-transfer.js +0 -35
  78. package/dist/permission.d.ts +0 -9
  79. package/dist/permission.js +0 -12
  80. package/dist/plan_configuration.d.ts +0 -10
  81. package/dist/plan_configuration.js +0 -61
  82. package/dist/project/connection.d.ts +0 -9
  83. package/dist/project/connection.js +0 -14
  84. package/dist/project/index.d.ts +0 -16
  85. package/dist/project/index.js +0 -256
  86. package/dist/project/preview.d.ts +0 -9
  87. package/dist/project/preview.js +0 -37
  88. package/dist/project-environment.d.ts +0 -9
  89. package/dist/project-environment.js +0 -13
  90. package/dist/project-tag-assignment.d.ts +0 -9
  91. package/dist/project-tag-assignment.js +0 -32
  92. package/dist/project_analytics.d.ts +0 -9
  93. package/dist/project_analytics.js +0 -18
  94. package/dist/provider.d.ts +0 -9
  95. package/dist/provider.js +0 -10
  96. package/dist/region.d.ts +0 -10
  97. package/dist/region.js +0 -17
  98. package/dist/role.d.ts +0 -9
  99. package/dist/role.js +0 -11
  100. package/dist/sandbox-activity.d.ts +0 -9
  101. package/dist/sandbox-activity.js +0 -49
  102. package/dist/sandbox-image.d.ts +0 -9
  103. package/dist/sandbox-image.js +0 -31
  104. package/dist/sandbox-snapshot-usage-segment.d.ts +0 -9
  105. package/dist/sandbox-snapshot-usage-segment.js +0 -49
  106. package/dist/sandbox-snapshot.d.ts +0 -9
  107. package/dist/sandbox-snapshot.js +0 -51
  108. package/dist/sandbox-usage-segment.d.ts +0 -9
  109. package/dist/sandbox-usage-segment.js +0 -57
  110. package/dist/sandbox.d.ts +0 -9
  111. package/dist/sandbox.js +0 -132
  112. package/dist/server.d.ts +0 -9
  113. package/dist/server.js +0 -101
  114. package/dist/settings.d.ts +0 -9
  115. package/dist/settings.js +0 -49
  116. package/dist/storage.d.ts +0 -36
  117. package/dist/storage.js +0 -82
  118. package/dist/subscription.d.ts +0 -9
  119. package/dist/subscription.js +0 -82
  120. package/dist/tag.d.ts +0 -9
  121. package/dist/tag.js +0 -29
  122. package/dist/team.d.ts +0 -9
  123. package/dist/team.js +0 -82
  124. package/dist/token.d.ts +0 -9
  125. package/dist/token.js +0 -36
  126. package/dist/types/activity-log.d.ts +0 -18
  127. package/dist/types/activity-log.js +0 -2
  128. package/dist/types/app-message.d.ts +0 -15
  129. package/dist/types/app-message.js +0 -2
  130. package/dist/types/auto-scaling-group.d.ts +0 -20
  131. package/dist/types/auto-scaling-group.js +0 -2
  132. package/dist/types/card.d.ts +0 -12
  133. package/dist/types/card.js +0 -2
  134. package/dist/types/cashier_subscription.d.ts +0 -27
  135. package/dist/types/cashier_subscription.js +0 -2
  136. package/dist/types/collab-annotation.d.ts +0 -27
  137. package/dist/types/collab-annotation.js +0 -2
  138. package/dist/types/collab-comment.d.ts +0 -20
  139. package/dist/types/collab-comment.js +0 -2
  140. package/dist/types/collab-integration.d.ts +0 -13
  141. package/dist/types/collab-integration.js +0 -2
  142. package/dist/types/collab-push-subscription.d.ts +0 -12
  143. package/dist/types/collab-push-subscription.js +0 -2
  144. package/dist/types/collab-settings.d.ts +0 -16
  145. package/dist/types/collab-settings.js +0 -2
  146. package/dist/types/collab-share-token.d.ts +0 -12
  147. package/dist/types/collab-share-token.js +0 -2
  148. package/dist/types/compute.d.ts +0 -48
  149. package/dist/types/compute.js +0 -2
  150. package/dist/types/db-image.d.ts +0 -25
  151. package/dist/types/db-image.js +0 -2
  152. package/dist/types/domain/dns.d.ts +0 -12
  153. package/dist/types/domain/dns.js +0 -2
  154. package/dist/types/domain/index.d.ts +0 -35
  155. package/dist/types/domain/index.js +0 -2
  156. package/dist/types/domain/renewal.d.ts +0 -10
  157. package/dist/types/domain/renewal.js +0 -2
  158. package/dist/types/domain/transfer.d.ts +0 -27
  159. package/dist/types/domain/transfer.js +0 -2
  160. package/dist/types/env.d.ts +0 -13
  161. package/dist/types/env.js +0 -2
  162. package/dist/types/environment-variable.d.ts +0 -12
  163. package/dist/types/environment-variable.js +0 -2
  164. package/dist/types/following.d.ts +0 -5
  165. package/dist/types/following.js +0 -2
  166. package/dist/types/framework.d.ts +0 -39
  167. package/dist/types/framework.js +0 -2
  168. package/dist/types/git.d.ts +0 -14
  169. package/dist/types/git.js +0 -2
  170. package/dist/types/idempotency.d.ts +0 -10
  171. package/dist/types/idempotency.js +0 -2
  172. package/dist/types/index.d.ts +0 -66
  173. package/dist/types/index.js +0 -2
  174. package/dist/types/installed_integration.d.ts +0 -6
  175. package/dist/types/installed_integration.js +0 -2
  176. package/dist/types/integration.d.ts +0 -14
  177. package/dist/types/integration.js +0 -2
  178. package/dist/types/intention.d.ts +0 -13
  179. package/dist/types/intention.js +0 -2
  180. package/dist/types/invoice.d.ts +0 -15
  181. package/dist/types/invoice.js +0 -2
  182. package/dist/types/job.d.ts +0 -19
  183. package/dist/types/job.js +0 -2
  184. package/dist/types/license.d.ts +0 -18
  185. package/dist/types/license.js +0 -2
  186. package/dist/types/load-balancer-port.d.ts +0 -12
  187. package/dist/types/load-balancer-port.js +0 -2
  188. package/dist/types/logs.d.ts +0 -35
  189. package/dist/types/logs.js +0 -2
  190. package/dist/types/member-permission.d.ts +0 -8
  191. package/dist/types/member-permission.js +0 -2
  192. package/dist/types/member.d.ts +0 -18
  193. package/dist/types/member.js +0 -2
  194. package/dist/types/object-storage-usage-segment.d.ts +0 -23
  195. package/dist/types/object-storage-usage-segment.js +0 -2
  196. package/dist/types/ownership-transfer.d.ts +0 -12
  197. package/dist/types/ownership-transfer.js +0 -2
  198. package/dist/types/permission.d.ts +0 -13
  199. package/dist/types/permission.js +0 -2
  200. package/dist/types/plan_configuration.d.ts +0 -55
  201. package/dist/types/plan_configuration.js +0 -2
  202. package/dist/types/project/connection.d.ts +0 -6
  203. package/dist/types/project/connection.js +0 -2
  204. package/dist/types/project/index.d.ts +0 -100
  205. package/dist/types/project/index.js +0 -2
  206. package/dist/types/project/preview.d.ts +0 -21
  207. package/dist/types/project/preview.js +0 -2
  208. package/dist/types/project-environment.d.ts +0 -13
  209. package/dist/types/project-environment.js +0 -2
  210. package/dist/types/project-tag-assignment.d.ts +0 -13
  211. package/dist/types/project-tag-assignment.js +0 -2
  212. package/dist/types/project_analytics.d.ts +0 -11
  213. package/dist/types/project_analytics.js +0 -2
  214. package/dist/types/provider.d.ts +0 -7
  215. package/dist/types/provider.js +0 -2
  216. package/dist/types/region.d.ts +0 -15
  217. package/dist/types/region.js +0 -2
  218. package/dist/types/role.d.ts +0 -9
  219. package/dist/types/role.js +0 -2
  220. package/dist/types/sandbox-activity.d.ts +0 -14
  221. package/dist/types/sandbox-activity.js +0 -2
  222. package/dist/types/sandbox-image.d.ts +0 -9
  223. package/dist/types/sandbox-image.js +0 -2
  224. package/dist/types/sandbox-snapshot-usage-segment.d.ts +0 -16
  225. package/dist/types/sandbox-snapshot-usage-segment.js +0 -2
  226. package/dist/types/sandbox-snapshot.d.ts +0 -16
  227. package/dist/types/sandbox-snapshot.js +0 -2
  228. package/dist/types/sandbox-usage-segment.d.ts +0 -25
  229. package/dist/types/sandbox-usage-segment.js +0 -2
  230. package/dist/types/sandbox.d.ts +0 -41
  231. package/dist/types/sandbox.js +0 -2
  232. package/dist/types/server.d.ts +0 -32
  233. package/dist/types/server.js +0 -2
  234. package/dist/types/settings.d.ts +0 -11
  235. package/dist/types/settings.js +0 -2
  236. package/dist/types/storage.d.ts +0 -79
  237. package/dist/types/storage.js +0 -2
  238. package/dist/types/subscription.d.ts +0 -33
  239. package/dist/types/subscription.js +0 -2
  240. package/dist/types/tag.d.ts +0 -11
  241. package/dist/types/tag.js +0 -2
  242. package/dist/types/team.d.ts +0 -24
  243. package/dist/types/team.js +0 -2
  244. package/dist/types/token.d.ts +0 -11
  245. package/dist/types/token.js +0 -2
  246. package/dist/types/user.d.ts +0 -44
  247. package/dist/types/user.js +0 -2
  248. package/dist/types/volume-usage-segment.d.ts +0 -16
  249. package/dist/types/volume-usage-segment.js +0 -2
  250. package/dist/types/volume.d.ts +0 -19
  251. package/dist/types/volume.js +0 -2
  252. package/dist/types/wallet.d.ts +0 -8
  253. package/dist/types/wallet.js +0 -2
  254. package/dist/types/webhook-category.d.ts +0 -4
  255. package/dist/types/webhook-category.js +0 -2
  256. package/dist/types/webhook-event.d.ts +0 -7
  257. package/dist/types/webhook-event.js +0 -2
  258. package/dist/types/webhook-setting.d.ts +0 -16
  259. package/dist/types/webhook-setting.js +0 -2
  260. package/dist/user.d.ts +0 -9
  261. package/dist/user.js +0 -70
  262. package/dist/volume-usage-segment.d.ts +0 -9
  263. package/dist/volume-usage-segment.js +0 -46
  264. package/dist/volume.d.ts +0 -9
  265. package/dist/volume.js +0 -44
  266. package/dist/wallet.d.ts +0 -9
  267. package/dist/wallet.js +0 -26
  268. package/dist/webhook-category.d.ts +0 -9
  269. package/dist/webhook-category.js +0 -10
  270. package/dist/webhook-event.d.ts +0 -9
  271. package/dist/webhook-event.js +0 -19
  272. package/dist/webhook-setting.d.ts +0 -9
  273. package/dist/webhook-setting.js +0 -50
@@ -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;
@@ -1,46 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const volumeUsageSegmentSchema = new mongoose_1.Schema({
5
- volume_id: {
6
- type: mongoose_1.Schema.Types.ObjectId,
7
- ref: "Volume",
8
- required: true,
9
- },
10
- user_id: {
11
- type: mongoose_1.Schema.Types.ObjectId,
12
- ref: "User",
13
- required: true,
14
- index: true,
15
- },
16
- team_id: {
17
- type: mongoose_1.Schema.Types.ObjectId,
18
- ref: "Team",
19
- default: null,
20
- index: true,
21
- },
22
- size_gb: {
23
- type: Number,
24
- default: 0,
25
- },
26
- costs: {
27
- startDate: { type: Date, required: true },
28
- endDate: { type: Date, default: null },
29
- },
30
- billed: {
31
- type: Boolean,
32
- default: false,
33
- index: true,
34
- },
35
- }, {
36
- timestamps: true,
37
- });
38
- volumeUsageSegmentSchema.index({ user_id: 1, billed: 1, "costs.endDate": 1 });
39
- volumeUsageSegmentSchema.index({ team_id: 1, billed: 1, "costs.endDate": 1 });
40
- volumeUsageSegmentSchema.index({ volume_id: 1, "costs.endDate": 1 });
41
- volumeUsageSegmentSchema.index({ volume_id: 1 }, {
42
- unique: true,
43
- partialFilterExpression: { "costs.endDate": null },
44
- name: "unique_open_segment_per_volume",
45
- });
46
- exports.default = (0, mongoose_1.model)("VolumeUsageSegment", volumeUsageSegmentSchema, "volume_usage_segments");
package/dist/volume.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { IVolume } from "./types";
2
- declare const _default: import("mongoose").Model<IVolume, {}, {}, {}, import("mongoose").Document<unknown, {}, IVolume, {}, import("mongoose").DefaultSchemaOptions> & IVolume & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IVolume>;
9
- export default _default;
package/dist/volume.js DELETED
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const volumeSchema = new mongoose_1.Schema({
5
- name: String,
6
- user: {
7
- type: mongoose_1.Schema.Types.ObjectId,
8
- required: false,
9
- ref: "User",
10
- default: null,
11
- },
12
- team: {
13
- type: mongoose_1.Schema.Types.ObjectId,
14
- required: false,
15
- ref: "Team",
16
- default: null,
17
- },
18
- type: {
19
- type: String,
20
- required: false,
21
- default: "project"
22
- },
23
- size: { type: Number, required: true },
24
- mount_path: { type: String },
25
- csi_volume_id: { type: String, default: null },
26
- region: { type: mongoose_1.Schema.Types.ObjectId, ref: "Region", default: null },
27
- attached_sandbox_id: {
28
- type: mongoose_1.Schema.Types.ObjectId,
29
- ref: "Sandbox",
30
- default: null,
31
- },
32
- attached_project_id: {
33
- type: mongoose_1.Schema.Types.ObjectId,
34
- ref: "Project",
35
- default: null,
36
- },
37
- last_attached_at: { type: Date, default: null },
38
- }, {
39
- timestamps: {
40
- createdAt: "created_at",
41
- updatedAt: "updated_at",
42
- },
43
- });
44
- exports.default = (0, mongoose_1.model)("Volume", volumeSchema);
package/dist/wallet.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import { IWallet } from "./types/wallet";
2
- declare const _default: import("mongoose").Model<IWallet, {}, {}, {}, import("mongoose").Document<unknown, {}, IWallet, {}, import("mongoose").DefaultSchemaOptions> & IWallet & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IWallet>;
9
- export default _default;
package/dist/wallet.js DELETED
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const walletSchema = new mongoose_1.Schema({
5
- balance: {
6
- type: Number,
7
- required: true,
8
- },
9
- enabled: {
10
- type: Boolean,
11
- default: true,
12
- },
13
- slug: {
14
- type: String,
15
- required: true,
16
- },
17
- provider: {
18
- type: String,
19
- required: true,
20
- },
21
- discounted: {
22
- type: Boolean,
23
- default: false
24
- }
25
- });
26
- exports.default = (0, mongoose_1.model)("Wallet", walletSchema);
@@ -1,9 +0,0 @@
1
- import { IWebhookCategory } from "./types/webhook-category";
2
- declare const _default: import("mongoose").Model<IWebhookCategory, {}, {}, {}, import("mongoose").Document<unknown, {}, IWebhookCategory, {}, import("mongoose").DefaultSchemaOptions> & IWebhookCategory & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IWebhookCategory>;
9
- export default _default;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const webhookCategorySchema = new mongoose_1.Schema({
5
- category: {
6
- type: String,
7
- required: true,
8
- }
9
- });
10
- exports.default = (0, mongoose_1.model)("WebhookCategory", webhookCategorySchema, "webhook_category");
@@ -1,9 +0,0 @@
1
- import { IWebhookEvent } from "./types/webhook-event";
2
- declare const _default: import("mongoose").Model<IWebhookEvent, {}, {}, {}, import("mongoose").Document<unknown, {}, IWebhookEvent, {}, import("mongoose").DefaultSchemaOptions> & IWebhookEvent & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IWebhookEvent>;
9
- export default _default;
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const mongoose_1 = require("mongoose");
4
- const webhookEventSchema = new mongoose_1.Schema({
5
- name: {
6
- type: String,
7
- required: true,
8
- },
9
- category: {
10
- ref: "WebhookCategory",
11
- type: mongoose_1.Schema.Types.ObjectId,
12
- required: true,
13
- },
14
- description: {
15
- type: String,
16
- required: true,
17
- },
18
- });
19
- exports.default = (0, mongoose_1.model)("WebhookEvent", webhookEventSchema, "webhook_event");
@@ -1,9 +0,0 @@
1
- import { IWebhookSetting } from "./types/webhook-setting";
2
- declare const _default: import("mongoose").Model<IWebhookSetting, {}, {}, {}, import("mongoose").Document<unknown, {}, IWebhookSetting, {}, import("mongoose").DefaultSchemaOptions> & IWebhookSetting & Required<{
3
- _id: import("mongoose").Types.ObjectId;
4
- }> & {
5
- __v: number;
6
- } & {
7
- id: string;
8
- }, any, IWebhookSetting>;
9
- export default _default;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- const mongoose_1 = require("mongoose");
7
- const webhook_event_1 = __importDefault(require("./webhook-event"));
8
- const webhookSettingSchema = new mongoose_1.Schema({
9
- webhook_id: {
10
- type: String,
11
- required: false,
12
- },
13
- user_id: {
14
- type: mongoose_1.Schema.Types.ObjectId,
15
- ref: "User",
16
- required: true,
17
- },
18
- team_id: {
19
- type: mongoose_1.Schema.Types.ObjectId,
20
- ref: "Team",
21
- required: false,
22
- },
23
- subscription_id: {
24
- type: mongoose_1.Schema.Types.ObjectId,
25
- ref: "Subscription",
26
- required: true,
27
- },
28
- external_webhook_url: {
29
- type: String,
30
- required: false,
31
- },
32
- webhookUrl: {
33
- type: String,
34
- required: false,
35
- },
36
- discordUrl: {
37
- type: String,
38
- default: false,
39
- },
40
- slackUrl: {
41
- type: String,
42
- default: false,
43
- },
44
- events: {
45
- type: [mongoose_1.Schema.Types.ObjectId],
46
- ref: webhook_event_1.default,
47
- default: [],
48
- }
49
- });
50
- exports.default = (0, mongoose_1.model)("WebhookSetting", webhookSettingSchema, "webhook_settings");