@brimble/models 4.0.1 → 4.0.2

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 (62) hide show
  1. package/dist/types/activity-log.d.ts +8 -8
  2. package/dist/types/agent-design-skill-revision.d.ts +1 -1
  3. package/dist/types/alert-rule.d.ts +1 -1
  4. package/dist/types/app-message.d.ts +4 -4
  5. package/dist/types/auto-scaling-group.d.ts +2 -2
  6. package/dist/types/cashier_subscription.d.ts +1 -1
  7. package/dist/types/collab-annotation.d.ts +13 -13
  8. package/dist/types/collab-comment.d.ts +6 -6
  9. package/dist/types/collab-integration.d.ts +1 -1
  10. package/dist/types/collab-settings.d.ts +2 -2
  11. package/dist/types/collab-share-token.d.ts +1 -1
  12. package/dist/types/compute.d.ts +11 -11
  13. package/dist/types/coupon-redemption.d.ts +9 -9
  14. package/dist/types/coupon.d.ts +11 -11
  15. package/dist/types/db-image.d.ts +3 -3
  16. package/dist/types/domain/dns-changelog.d.ts +8 -8
  17. package/dist/types/domain/dns.d.ts +1 -1
  18. package/dist/types/domain/index.d.ts +6 -6
  19. package/dist/types/domain/transfer.d.ts +13 -13
  20. package/dist/types/drain.d.ts +13 -13
  21. package/dist/types/email-dead-letter.d.ts +3 -3
  22. package/dist/types/env.d.ts +1 -1
  23. package/dist/types/environment-variable.d.ts +1 -1
  24. package/dist/types/following.d.ts +2 -2
  25. package/dist/types/framework.d.ts +9 -9
  26. package/dist/types/git.d.ts +12 -12
  27. package/dist/types/integration.d.ts +7 -7
  28. package/dist/types/intention.d.ts +1 -1
  29. package/dist/types/job.d.ts +9 -9
  30. package/dist/types/logs.d.ts +3 -3
  31. package/dist/types/member.d.ts +2 -2
  32. package/dist/types/plan_configuration.d.ts +1 -1
  33. package/dist/types/platform-api-key.d.ts +4 -4
  34. package/dist/types/project/index.d.ts +31 -31
  35. package/dist/types/project/preview.d.ts +1 -1
  36. package/dist/types/project-drain-subscription.d.ts +1 -1
  37. package/dist/types/project-environment.d.ts +2 -2
  38. package/dist/types/project-network-settings.d.ts +2 -2
  39. package/dist/types/project_analytics.d.ts +1 -1
  40. package/dist/types/quest-campaign.d.ts +2 -2
  41. package/dist/types/quest-participation.d.ts +2 -2
  42. package/dist/types/quest-reward-issuance.d.ts +2 -2
  43. package/dist/types/ratelimit.d.ts +16 -16
  44. package/dist/types/ref.d.ts +3 -2
  45. package/dist/types/region.d.ts +15 -15
  46. package/dist/types/role.d.ts +2 -2
  47. package/dist/types/sandbox-activity.d.ts +2 -2
  48. package/dist/types/sandbox-usage-segment.d.ts +2 -2
  49. package/dist/types/sandbox.d.ts +1 -1
  50. package/dist/types/server.d.ts +11 -11
  51. package/dist/types/storage.d.ts +50 -50
  52. package/dist/types/streak-day.d.ts +2 -2
  53. package/dist/types/streak-event.d.ts +2 -2
  54. package/dist/types/streak-milestone.d.ts +2 -2
  55. package/dist/types/streak.d.ts +2 -2
  56. package/dist/types/subscription.d.ts +1 -1
  57. package/dist/types/ticket.d.ts +5 -5
  58. package/dist/types/user.d.ts +4 -4
  59. package/dist/types/volume-usage-segment.d.ts +3 -3
  60. package/dist/types/volume.d.ts +6 -6
  61. package/dist/types/webhook-setting.d.ts +2 -2
  62. package/package.json +1 -1
@@ -16,14 +16,14 @@ export interface ILog extends Document {
16
16
  name: string;
17
17
  email: string;
18
18
  username: string;
19
- avatar_url?: string;
19
+ avatar_url: string;
20
20
  };
21
21
  };
22
22
  source: string;
23
23
  status: PROJECT_STATUS;
24
24
  project: Ref<IProject>;
25
- user?: Ref<IUser>;
26
- team?: Ref<ITeam>;
25
+ user: Ref<IUser>;
26
+ team: Ref<ITeam>;
27
27
  jobs: {
28
28
  id: number;
29
29
  name: string;
@@ -6,11 +6,11 @@ import { IProjectEnvironment } from "./project-environment";
6
6
  import { Ref } from "./ref";
7
7
  export interface IMember extends Document {
8
8
  /** Absent until an invited member registers; `email` identifies them until then. */
9
- user?: Ref<IUser>;
9
+ user: Ref<IUser>;
10
10
  team: Ref<ITeam>;
11
11
  role: ROLES;
12
12
  accepted: boolean;
13
- invitedBy?: Ref<IUser>;
13
+ invitedBy: Ref<IUser>;
14
14
  email: string;
15
15
  featureOnboarded: boolean;
16
16
  permissions: Ref<IMemberPermission>[];
@@ -39,7 +39,7 @@ export interface IPlanConfiguration extends Document {
39
39
  unlimited_projects: boolean;
40
40
  webhook_enabled: boolean;
41
41
  can_deploy_all_applications: boolean;
42
- stripe_prices?: Record<string, string>;
42
+ stripe_prices: Record<string, string>;
43
43
  storage_bucket_enabled: boolean;
44
44
  storage_bucket_quota_gb: number;
45
45
  sandbox_max_count: number;
@@ -8,12 +8,12 @@ export interface IPlatformApiKey extends Document {
8
8
  key_id: string;
9
9
  key_prefix: string;
10
10
  owner_id: Ref<IUser>;
11
- team_id?: Ref<ITeam> | null;
12
- subscription_id?: Types.ObjectId | null;
11
+ team_id: Ref<ITeam> | null;
12
+ subscription_id: Types.ObjectId | null;
13
13
  permissions: string[];
14
14
  status: PlatformApiKeyStatus;
15
- expires_at?: Date | null;
16
- last_used_at?: Date | null;
15
+ expires_at: Date | null;
16
+ last_used_at: Date | null;
17
17
  createdAt: Date;
18
18
  updatedAt: Date;
19
19
  }
@@ -26,15 +26,15 @@ export interface IPgBouncerConfig {
26
26
  }
27
27
  export interface IProject extends Document {
28
28
  name: string;
29
- healthCheckPath?: string;
30
- preStartCommand?: string;
29
+ healthCheckPath: string;
30
+ preStartCommand: string;
31
31
  backupEnabled: boolean;
32
32
  backup_mode: "automatic" | "manual";
33
33
  backup_schedule: string;
34
34
  http2: boolean;
35
- free_tier_expires_at?: Date | null;
36
- free_tier_expiry_notified_at?: Date | null;
37
- buildCacheEnabled?: boolean;
35
+ free_tier_expires_at: Date | null;
36
+ free_tier_expiry_notified_at: Date | null;
37
+ buildCacheEnabled: boolean;
38
38
  alerting_enabled: boolean;
39
39
  logDrainsEnabled: boolean;
40
40
  domains: Array<Ref<IDomain>>;
@@ -47,20 +47,20 @@ export interface IProject extends Document {
47
47
  tlsEnabled: boolean;
48
48
  sendReport: boolean;
49
49
  pgbouncerEnabled: boolean;
50
- pgbouncerConfig?: IPgBouncerConfig | null;
51
- tlsEnabledAt?: Date | null;
52
- tlsCaObjectKey?: string | null;
53
- tlsServerCertExpiresAt?: Date | null;
54
- tlsHost?: string | null;
55
- tlsPort?: number | null;
56
- tlsSslModeHint?: string | null;
50
+ pgbouncerConfig: IPgBouncerConfig | null;
51
+ tlsEnabledAt: Date | null;
52
+ tlsCaObjectKey: string | null;
53
+ tlsServerCertExpiresAt: Date | null;
54
+ tlsHost: string | null;
55
+ tlsPort: number | null;
56
+ tlsSslModeHint: string | null;
57
57
  dbImage: Ref<IDbImage>;
58
58
  public: boolean;
59
59
  installCommand: string;
60
60
  buildCommand: string;
61
61
  startCommand: string;
62
62
  outputDirectory: string;
63
- runtimeVersions?: RuntimeVersions | null;
63
+ runtimeVersions: RuntimeVersions | null;
64
64
  workBenchEnabled: boolean;
65
65
  user_id: Ref<IUser>;
66
66
  monitor_id: string;
@@ -74,8 +74,8 @@ export interface IProject extends Document {
74
74
  installationId: string | number;
75
75
  git: GIT_TYPE;
76
76
  } | null;
77
- rootDir?: string;
78
- dockerfile?: string;
77
+ rootDir: string;
78
+ dockerfile: string;
79
79
  team: Ref<ITeam>;
80
80
  server: Ref<IServer>;
81
81
  isPrivate: boolean;
@@ -88,10 +88,10 @@ export interface IProject extends Document {
88
88
  starred: boolean;
89
89
  passwordEnabled: boolean;
90
90
  disabled: boolean;
91
- disabled_at?: Date | null;
92
- disabled_by?: PROJECT_DISABLED_BY | null;
91
+ disabled_at: Date | null;
92
+ disabled_by: PROJECT_DISABLED_BY | null;
93
93
  isDeleted: boolean;
94
- deletedAt?: Date | null;
94
+ deletedAt: Date | null;
95
95
  authEnabled: boolean;
96
96
  password: string | null;
97
97
  deployedInCluster: boolean;
@@ -106,7 +106,7 @@ export interface IProject extends Document {
106
106
  tracking_token: string;
107
107
  from: string;
108
108
  previews: Ref<IPreview>[];
109
- project_environment?: Ref<IProjectEnvironment>;
109
+ project_environment: Ref<IProjectEnvironment>;
110
110
  inherit_environment_vars: boolean;
111
111
  replicas: number;
112
112
  vaultPath: string | null;
@@ -121,20 +121,20 @@ export interface IProject extends Document {
121
121
  isPaused: boolean;
122
122
  paused_by: string | null;
123
123
  billable: boolean;
124
- serviceType?: ServiceType;
125
- cronEnabled?: boolean;
126
- cronExpression?: string | null;
127
- cronTimezone?: string | null;
128
- cronCommand?: string | null;
129
- last_backup_url?: string;
130
- last_backup_at?: Date;
124
+ serviceType: ServiceType;
125
+ cronEnabled: boolean;
126
+ cronExpression: string | null;
127
+ cronTimezone: string | null;
128
+ cronCommand: string | null;
129
+ last_backup_url: string;
130
+ last_backup_at: Date;
131
131
  replica_ready: boolean;
132
- autoscaling_group?: Ref<IAutoScalingGroup>;
132
+ autoscaling_group: Ref<IAutoScalingGroup>;
133
133
  isPaid: boolean;
134
- hasUpdates?: boolean;
135
- whiteListedIps?: string[];
136
- diskSize?: number;
137
- persistent_mount_path?: string;
134
+ hasUpdates: boolean;
135
+ whiteListedIps: string[];
136
+ diskSize: number;
137
+ persistent_mount_path: string;
138
138
  volumeMount: string;
139
139
  volume: Ref<IVolume> | null;
140
140
  }
@@ -6,7 +6,7 @@ import { ILog } from "../logs";
6
6
  import { Ref } from "../ref";
7
7
  export interface IPreview extends Document {
8
8
  name: string;
9
- healthCheckPath?: string;
9
+ healthCheckPath: string;
10
10
  pid: number;
11
11
  port: number;
12
12
  ip: string;
@@ -4,7 +4,7 @@ export interface IProjectDrainSubscription extends Document {
4
4
  drain: Types.ObjectId;
5
5
  project: Types.ObjectId;
6
6
  enabled: boolean;
7
- disabledAt?: Date | null;
7
+ disabledAt: Date | null;
8
8
  createdAt: Date;
9
9
  updatedAt: Date;
10
10
  }
@@ -6,8 +6,8 @@ export interface IProjectEnvironment extends Document {
6
6
  name: string;
7
7
  slug: string;
8
8
  owner: Ref<IUser>;
9
- team?: Ref<ITeam>;
10
- inherit_from?: Ref<IProjectEnvironment>;
9
+ team: Ref<ITeam>;
10
+ inherit_from: Ref<IProjectEnvironment>;
11
11
  isDefault: boolean;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
@@ -22,8 +22,8 @@ export interface IProjectNetworkSettings extends Document {
22
22
  wordpressProtection: boolean;
23
23
  };
24
24
  cloudflare: {
25
- lastSyncedAt?: Date;
26
- syncError?: string;
25
+ lastSyncedAt: Date;
26
+ syncError: string;
27
27
  };
28
28
  createdAt: Date;
29
29
  updatedAt: Date;
@@ -3,7 +3,7 @@ export interface IProjectAnalytics extends Document {
3
3
  project: Types.ObjectId;
4
4
  provider: "umami";
5
5
  websiteId: string;
6
- shareId?: string | null;
6
+ shareId: string | null;
7
7
  domain: string;
8
8
  enabled: boolean;
9
9
  createdAt: Date;
@@ -33,6 +33,6 @@ export interface IQuestCampaign extends Document {
33
33
  rewards: IQuestReward[];
34
34
  active: boolean;
35
35
  auto_expire: boolean;
36
- created_at?: Date;
37
- updated_at?: Date;
36
+ created_at: Date;
37
+ updated_at: Date;
38
38
  }
@@ -14,6 +14,6 @@ export interface IQuestParticipation extends Document {
14
14
  criteria_progress: IQuestCriterionProgress[];
15
15
  qualifier_met: boolean;
16
16
  claimed_at: Date | null;
17
- created_at?: Date;
18
- updated_at?: Date;
17
+ created_at: Date;
18
+ updated_at: Date;
19
19
  }
@@ -12,6 +12,6 @@ export interface IQuestRewardIssuance extends Document {
12
12
  status: QuestRewardStatus;
13
13
  claimed_at: Date;
14
14
  fulfilled_at: Date | null;
15
- created_at?: Date;
16
- updated_at?: Date;
15
+ created_at: Date;
16
+ updated_at: Date;
17
17
  }
@@ -1,41 +1,41 @@
1
1
  import { Document, Types } from "mongoose";
2
2
  export type RateLimitMatcher = {
3
- methods?: string[];
4
- paths?: string[];
3
+ methods: string[];
4
+ paths: string[];
5
5
  };
6
6
  export type RateLimitZone = {
7
7
  name: string;
8
8
  key: string;
9
9
  window: string;
10
10
  events: number;
11
- matcher?: RateLimitMatcher;
12
- ipv4Prefix?: number;
13
- ipv6Prefix?: number;
11
+ matcher: RateLimitMatcher;
12
+ ipv4Prefix: number;
13
+ ipv6Prefix: number;
14
14
  };
15
15
  export type DistributedRateLimitConfig = {
16
16
  enabled: boolean;
17
- readInterval?: string;
18
- writeInterval?: string;
19
- purgeAge?: string;
17
+ readInterval: string;
18
+ writeInterval: string;
19
+ purgeAge: string;
20
20
  };
21
21
  export type RatelimitConfig = {
22
22
  enabled: boolean;
23
23
  zones: RateLimitZone[];
24
- distributed?: DistributedRateLimitConfig;
25
- logKey?: boolean;
26
- disableMetrics?: boolean;
27
- jitter?: number;
28
- sweepInterval?: string;
24
+ distributed: DistributedRateLimitConfig;
25
+ logKey: boolean;
26
+ disableMetrics: boolean;
27
+ jitter: number;
28
+ sweepInterval: string;
29
29
  };
30
30
  export interface IRatelimit extends Document {
31
31
  project: Types.ObjectId;
32
32
  enabled: boolean;
33
33
  zones: RateLimitZone[];
34
- distributed?: DistributedRateLimitConfig;
34
+ distributed: DistributedRateLimitConfig;
35
35
  logKey: boolean;
36
36
  disableMetrics: boolean;
37
- jitter?: number;
38
- sweepInterval?: string;
37
+ jitter: number;
38
+ sweepInterval: string;
39
39
  createdAt: Date;
40
40
  updatedAt: Date;
41
41
  }
@@ -1,7 +1,8 @@
1
1
  import { Types } from "mongoose";
2
2
  /**
3
- * A Mongoose reference field. Holds an `ObjectId` unless the query populated it,
4
- * so consumers must narrow before reading the referenced document.
3
+ * A Mongoose reference field. Holds an `ObjectId` unless the query that loaded
4
+ * the document populated it. Type that query's result as `Populated<T, K>`
5
+ * (or a named alias of it) so callers already know which refs are documents.
5
6
  */
6
7
  export type Ref<T> = T | Types.ObjectId;
7
8
  type PopulatedField<V> = V extends (infer E)[] ? Exclude<E, Types.ObjectId>[] : Exclude<V, Types.ObjectId>;
@@ -2,31 +2,31 @@ import { Types, Document } from "mongoose";
2
2
  import { REGION_CONTINENT, VOLUME_BACKEND } from "../enum";
3
3
  export type RegionType = "web" | "database" | "sandbox";
4
4
  export interface IRegionCsiConfig {
5
- plugin_id?: string;
6
- topology_path?: string;
7
- require_topology?: boolean;
8
- availability_zone?: string;
9
- parameters?: Record<string, string>;
10
- parameters_env?: Record<string, string>;
11
- fs_type?: string;
12
- attachment_modes?: string[];
5
+ plugin_id: string;
6
+ topology_path: string;
7
+ require_topology: boolean;
8
+ availability_zone: string;
9
+ parameters: Record<string, string>;
10
+ parameters_env: Record<string, string>;
11
+ fs_type: string;
12
+ attachment_modes: string[];
13
13
  }
14
14
  export interface IRegion extends Document {
15
15
  _id: Types.ObjectId;
16
16
  name: string;
17
17
  country: string;
18
18
  cname: string;
19
- continent?: REGION_CONTINENT;
20
- enabled?: boolean;
19
+ continent: REGION_CONTINENT;
20
+ enabled: boolean;
21
21
  dbVolumePath: string;
22
22
  is_paid: boolean;
23
23
  logo: string;
24
24
  provider: string;
25
25
  provider_identifier: string;
26
26
  storage_pricing_factor: number;
27
- floating_ip?: string;
28
- type?: RegionType;
29
- ceph_cluster_id?: string;
30
- volume_backend?: VOLUME_BACKEND;
31
- csi?: IRegionCsiConfig;
27
+ floating_ip: string;
28
+ type: RegionType;
29
+ ceph_cluster_id: string;
30
+ volume_backend: VOLUME_BACKEND;
31
+ csi: IRegionCsiConfig;
32
32
  }
@@ -4,7 +4,7 @@ import { IPermission } from "./permission";
4
4
  import { Ref } from "./ref";
5
5
  export interface IRole extends Document {
6
6
  type: ROLES;
7
- description?: string;
8
- is_custom?: boolean;
7
+ description: string;
8
+ is_custom: boolean;
9
9
  permissions: Ref<IPermission>[];
10
10
  }
@@ -9,6 +9,6 @@ export interface ISandboxActivity extends Document {
9
9
  exit_code: number | null;
10
10
  duration_ms: number | null;
11
11
  error: string | null;
12
- created_at?: Date;
13
- updated_at?: Date;
12
+ created_at: Date;
13
+ updated_at: Date;
14
14
  }
@@ -19,8 +19,8 @@ export interface ISandboxUsageSegment extends Document {
19
19
  current: ISandboxUsageSegmentCurrent;
20
20
  costs: ISandboxUsageSegmentCosts;
21
21
  billed: boolean;
22
- region?: string;
23
- template?: string;
22
+ region: string;
23
+ template: string;
24
24
  createdAt: Date;
25
25
  updatedAt: Date;
26
26
  }
@@ -35,7 +35,7 @@ export interface ISandbox extends Document {
35
35
  destroy_timeout: string | null;
36
36
  one_shot: boolean;
37
37
  block_outbound: boolean;
38
- egress?: ISandboxEgress | null;
38
+ egress: ISandboxEgress | null;
39
39
  persistent: boolean;
40
40
  persistent_disk_gb: number | null;
41
41
  csi_volume_id: string | null;
@@ -5,13 +5,13 @@ import { Ref } from "./ref";
5
5
  export interface IServer extends Document {
6
6
  name: string;
7
7
  url: string;
8
- grpc_address?: string;
9
- ipv6?: string;
10
- domain?: string;
8
+ grpc_address: string;
9
+ ipv6: string;
10
+ domain: string;
11
11
  node_id: string;
12
12
  force_deactivation: boolean;
13
13
  userId: mongoose.Types.ObjectId;
14
- teamId?: mongoose.Types.ObjectId;
14
+ teamId: mongoose.Types.ObjectId;
15
15
  ip_address: string;
16
16
  private_ip_address: string;
17
17
  tunnel_token: string;
@@ -21,15 +21,15 @@ export interface IServer extends Document {
21
21
  default: boolean;
22
22
  tag: string;
23
23
  region: Ref<IRegion>;
24
- webhook_url?: string;
24
+ webhook_url: string;
25
25
  is_custom_provision: boolean;
26
- firewall_id?: string;
26
+ firewall_id: string;
27
27
  specifications: Record<any, any>;
28
- plugin_id?: string;
28
+ plugin_id: string;
29
29
  provider: string;
30
- provider_location?: string;
31
- provider_identifier?: string;
32
- topology_path?: string;
33
- cert_storage_path?: string | null;
30
+ provider_location: string;
31
+ provider_identifier: string;
32
+ topology_path: string;
33
+ cert_storage_path: string | null;
34
34
  meta: Record<any, any>;
35
35
  }
@@ -4,29 +4,29 @@ import { Ref } from "./ref";
4
4
  import { StorageBucketStatus, StorageCredentialRole, StorageCredentialStatus, StorageMigrationStatus, StorageTokenStatus, StorageUploadStatus } from "../enum";
5
5
  export type StorageTokenPermission = "read" | "write" | "delete" | "list" | "admin";
6
6
  export type StorageCorsRule = {
7
- allowedHeaders?: string[];
8
- allowedMethods?: string[];
9
- allowedOrigins?: string[];
10
- exposeHeaders?: string[];
11
- maxAgeSeconds?: number;
7
+ allowedHeaders: string[];
8
+ allowedMethods: string[];
9
+ allowedOrigins: string[];
10
+ exposeHeaders: string[];
11
+ maxAgeSeconds: number;
12
12
  [key: string]: unknown;
13
13
  };
14
14
  export type StorageLifecycleRule = {
15
- id?: string;
16
- prefix?: string;
17
- expirationDays?: number;
18
- transitions?: StorageLifecycleRuleTransition[];
15
+ id: string;
16
+ prefix: string;
17
+ expirationDays: number;
18
+ transitions: StorageLifecycleRuleTransition[];
19
19
  };
20
20
  export type StorageLifecycleRuleTransition = {
21
- days?: number;
22
- storageClass?: string;
21
+ days: number;
22
+ storageClass: string;
23
23
  };
24
24
  export interface IStorageBucket extends Document {
25
25
  name: string;
26
- project?: Types.ObjectId;
27
- project_environment?: Ref<IProjectEnvironment>;
28
- user_id?: Types.ObjectId;
29
- team?: Types.ObjectId;
26
+ project: Types.ObjectId;
27
+ project_environment: Ref<IProjectEnvironment>;
28
+ user_id: Types.ObjectId;
29
+ team: Types.ObjectId;
30
30
  bucket_name: string;
31
31
  is_public: boolean;
32
32
  versioning: boolean;
@@ -46,30 +46,30 @@ export interface IStorageBucket extends Document {
46
46
  }
47
47
  export interface IStorageObject extends Document {
48
48
  bucket: Types.ObjectId;
49
- project?: Types.ObjectId;
50
- project_environment?: Ref<IProjectEnvironment>;
49
+ project: Types.ObjectId;
50
+ project_environment: Ref<IProjectEnvironment>;
51
51
  key: string;
52
52
  path: string;
53
- content_type?: string;
53
+ content_type: string;
54
54
  size: number;
55
- etag?: string;
56
- public_url?: string;
57
- last_modified?: Date;
55
+ etag: string;
56
+ public_url: string;
57
+ last_modified: Date;
58
58
  createdAt: Date;
59
59
  updatedAt: Date;
60
60
  }
61
61
  export interface IStorageUpload extends Document {
62
62
  bucket: Types.ObjectId;
63
- project?: Types.ObjectId;
64
- project_environment?: Ref<IProjectEnvironment>;
63
+ project: Types.ObjectId;
64
+ project_environment: Ref<IProjectEnvironment>;
65
65
  key: string;
66
66
  path: string;
67
- upload_id?: string;
68
- content_type?: string;
67
+ upload_id: string;
68
+ content_type: string;
69
69
  size: number;
70
70
  status: StorageUploadStatus;
71
71
  expires_at: Date;
72
- completed_at?: Date;
72
+ completed_at: Date;
73
73
  createdAt: Date;
74
74
  updatedAt: Date;
75
75
  }
@@ -77,46 +77,46 @@ export interface IStorageToken extends Document {
77
77
  name: string;
78
78
  token_hash: string;
79
79
  prefix: string;
80
- project?: Types.ObjectId;
80
+ project: Types.ObjectId;
81
81
  buckets: Types.ObjectId[];
82
- user_id?: Types.ObjectId;
83
- team?: Types.ObjectId;
82
+ user_id: Types.ObjectId;
83
+ team: Types.ObjectId;
84
84
  permissions: StorageTokenPermission[];
85
85
  status: StorageTokenStatus;
86
- last_used_at?: Date;
87
- expires_at?: Date;
86
+ last_used_at: Date;
87
+ expires_at: Date;
88
88
  createdAt: Date;
89
89
  updatedAt: Date;
90
90
  }
91
91
  export interface IStorageCredential extends Document {
92
92
  name: string;
93
93
  bucket: Types.ObjectId;
94
- project?: Types.ObjectId;
95
- project_environment?: Ref<IProjectEnvironment>;
96
- user_id?: Types.ObjectId;
97
- team?: Types.ObjectId;
94
+ project: Types.ObjectId;
95
+ project_environment: Ref<IProjectEnvironment>;
96
+ user_id: Types.ObjectId;
97
+ team: Types.ObjectId;
98
98
  provider: string;
99
99
  provider_org_id: string;
100
100
  access_key_id: string;
101
101
  policy_names: string[];
102
102
  role: StorageCredentialRole;
103
103
  status: StorageCredentialStatus;
104
- last_rotated_at?: Date;
105
- revoked_at?: Date;
104
+ last_rotated_at: Date;
105
+ revoked_at: Date;
106
106
  createdAt: Date;
107
107
  updatedAt: Date;
108
108
  }
109
109
  export interface IStorageMigration extends Document {
110
110
  bucket: Types.ObjectId;
111
- project?: Types.ObjectId;
112
- project_environment?: Ref<IProjectEnvironment>;
113
- user_id?: Types.ObjectId;
114
- team?: Types.ObjectId;
111
+ project: Types.ObjectId;
112
+ project_environment: Ref<IProjectEnvironment>;
113
+ user_id: Types.ObjectId;
114
+ team: Types.ObjectId;
115
115
  source_bucket: string;
116
116
  source_region: string;
117
- source_endpoint?: string;
118
- source_prefix?: string;
119
- destination_prefix?: string;
117
+ source_endpoint: string;
118
+ source_prefix: string;
119
+ destination_prefix: string;
120
120
  vault_path: string;
121
121
  status: StorageMigrationStatus;
122
122
  total_objects: number;
@@ -124,12 +124,12 @@ export interface IStorageMigration extends Document {
124
124
  failed_objects: number;
125
125
  total_bytes: number;
126
126
  copied_bytes: number;
127
- continuation_token?: string;
128
- last_source_key?: string;
129
- error_message?: string;
130
- started_at?: Date;
131
- completed_at?: Date;
132
- cancelled_at?: Date;
127
+ continuation_token: string;
128
+ last_source_key: string;
129
+ error_message: string;
130
+ started_at: Date;
131
+ completed_at: Date;
132
+ cancelled_at: Date;
133
133
  createdAt: Date;
134
134
  updatedAt: Date;
135
135
  }
@@ -4,6 +4,6 @@ export interface IStreakDay extends Document {
4
4
  day: Date;
5
5
  action_types: string[];
6
6
  is_milestone_day: boolean;
7
- created_at?: Date;
8
- updated_at?: Date;
7
+ created_at: Date;
8
+ updated_at: Date;
9
9
  }
@@ -8,6 +8,6 @@ export interface IStreakEvent extends Document {
8
8
  service_type: string | null;
9
9
  system_day: Date;
10
10
  dedupe_key: string;
11
- created_at?: Date;
12
- updated_at?: Date;
11
+ created_at: Date;
12
+ updated_at: Date;
13
13
  }