@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
@@ -4,16 +4,16 @@ import { IUser } from "./user";
4
4
  import { Ref } from "./ref";
5
5
  export interface IActivityLog extends Document {
6
6
  user_id: Ref<IUser>;
7
- team_id?: Ref<ITeam>;
7
+ team_id: Ref<ITeam>;
8
8
  action: string;
9
- description?: string;
10
- context?: string;
11
- metadata?: Record<string, any>;
12
- ip_address?: string;
13
- user_agent?: string;
9
+ description: string;
10
+ context: string;
11
+ metadata: Record<string, any>;
12
+ ip_address: string;
13
+ user_agent: string;
14
14
  status: "success" | "failure";
15
- resource_type?: string;
16
- resource_id?: Types.ObjectId;
15
+ resource_type: string;
16
+ resource_id: Types.ObjectId;
17
17
  created_at: Date;
18
18
  updated_at: Date;
19
19
  }
@@ -4,7 +4,7 @@ import { IAgentDesignSkill } from "./agent-design-skill";
4
4
  import { Ref } from "./ref";
5
5
  export interface IAgentDesignSkillFile {
6
6
  path: string;
7
- content?: string;
7
+ content: string;
8
8
  bytes: number;
9
9
  }
10
10
  export interface IAgentDesignSkillInspection {
@@ -6,7 +6,7 @@ import { IUser } from "./user";
6
6
  import { Ref } from "./ref";
7
7
  export interface IAlertRule extends Document {
8
8
  user_id: Ref<IUser>;
9
- team_id?: Ref<ITeam> | null;
9
+ team_id: Ref<ITeam> | null;
10
10
  project_id: Ref<IProject>;
11
11
  name: string;
12
12
  metric: AlertMetric;
@@ -3,13 +3,13 @@ import { IUser } from "./user";
3
3
  import { ITeam } from "./team";
4
4
  import { Ref } from "./ref";
5
5
  export interface IAppMessage extends Document {
6
- userId?: Ref<IUser>;
7
- teamId?: Ref<ITeam>;
6
+ userId: Ref<IUser>;
7
+ teamId: Ref<ITeam>;
8
8
  level: string;
9
9
  message: string;
10
10
  seen: boolean;
11
- meta?: Record<string, any>;
12
- route?: string;
11
+ meta: Record<string, any>;
12
+ route: string;
13
13
  type: string;
14
14
  createdAt: Date;
15
15
  updatedAt: Date;
@@ -7,8 +7,8 @@ export interface IAutoScalingGroup extends Document {
7
7
  _id: Types.ObjectId;
8
8
  name: string;
9
9
  replicas: number;
10
- user_id?: Ref<IUser>;
11
- team_id?: Ref<ITeam>;
10
+ user_id: Ref<IUser>;
11
+ team_id: Ref<ITeam>;
12
12
  subscription_id: Ref<ISubscription>;
13
13
  min_containers: number;
14
14
  max_containers: number;
@@ -4,7 +4,7 @@ import { ITeam } from "./team";
4
4
  import { Ref } from "./ref";
5
5
  export interface ICashierSubscription extends Document {
6
6
  user_id: Ref<IUser>;
7
- team_id?: Ref<ITeam> | null;
7
+ team_id: Ref<ITeam> | null;
8
8
  type: string;
9
9
  stripe_id: string;
10
10
  stripe_status: string;
@@ -5,24 +5,24 @@ import { IProject } from "./project";
5
5
  import { Ref } from "./ref";
6
6
  export interface ICollabAnnotation extends Document {
7
7
  projectId: Ref<IProject>;
8
- userId?: Ref<IUser>;
8
+ userId: Ref<IUser>;
9
9
  pageUrl: string;
10
10
  pagePath: string;
11
11
  xPercent: number;
12
12
  yPercent: number;
13
- elementSelector?: string;
14
- elementOffsetX?: number;
15
- elementOffsetY?: number;
13
+ elementSelector: string;
14
+ elementOffsetX: number;
15
+ elementOffsetY: number;
16
16
  status: COLLAB_ANNOTATION_STATUS;
17
- resolvedAt?: Date;
18
- resolvedBy?: Ref<IUser>;
19
- guestName?: string;
20
- guestEmail?: string;
21
- githubPrCommentId?: number;
22
- githubPrCommentUrl?: string;
23
- githubIssueUrl?: string;
24
- githubIssueNumber?: number;
25
- subscribedUserIds?: Ref<IUser>[];
17
+ resolvedAt: Date;
18
+ resolvedBy: Ref<IUser>;
19
+ guestName: string;
20
+ guestEmail: string;
21
+ githubPrCommentId: number;
22
+ githubPrCommentUrl: string;
23
+ githubIssueUrl: string;
24
+ githubIssueNumber: number;
25
+ subscribedUserIds: Ref<IUser>[];
26
26
  createdAt: Date;
27
27
  updatedAt: Date;
28
28
  }
@@ -10,12 +10,12 @@ export interface ICollabAttachment {
10
10
  }
11
11
  export interface ICollabComment extends Document {
12
12
  annotationId: Ref<ICollabAnnotation>;
13
- userId?: Ref<IUser>;
14
- body?: string;
15
- screenshot?: string;
16
- attachments?: ICollabAttachment[];
17
- guestName?: string;
18
- guestEmail?: string;
13
+ userId: Ref<IUser>;
14
+ body: string;
15
+ screenshot: string;
16
+ attachments: ICollabAttachment[];
17
+ guestName: string;
18
+ guestEmail: string;
19
19
  createdAt: Date;
20
20
  updatedAt: Date;
21
21
  }
@@ -8,7 +8,7 @@ export interface ICollabIntegration extends Document {
8
8
  userId: Ref<IUser>;
9
9
  type: COLLAB_INTEGRATION_TYPE;
10
10
  webhookUrl: string;
11
- channelName?: string;
11
+ channelName: string;
12
12
  enabled: boolean;
13
13
  createdAt: Date;
14
14
  }
@@ -7,8 +7,8 @@ export interface ICollabSettings extends Document {
7
7
  userId: Ref<IUser>;
8
8
  projectId: Ref<IProject>;
9
9
  pushNotifications: boolean;
10
- slackUrl?: string;
11
- discordUrl?: string;
10
+ slackUrl: string;
11
+ discordUrl: string;
12
12
  theme: COLLAB_THEME;
13
13
  toolbarPosition: COLLAB_TOOLBAR_POSITION;
14
14
  hasOnboarded: boolean;
@@ -6,7 +6,7 @@ export interface ICollabShareToken extends Document {
6
6
  projectId: Ref<IProject>;
7
7
  createdBy: Ref<IUser>;
8
8
  token: string;
9
- expiresAt?: Date;
9
+ expiresAt: Date;
10
10
  isActive: boolean;
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
@@ -5,47 +5,47 @@ import { ITeam } from "./team";
5
5
  import { IUser } from "./user";
6
6
  import { Ref } from "./ref";
7
7
  export interface IComputeChange {
8
- _id?: string;
8
+ _id: string;
9
9
  project_name: string;
10
- project_type?: ServiceType;
10
+ project_type: ServiceType;
11
11
  deleted: boolean;
12
12
  project_id: Ref<IProject>;
13
13
  user_id: Ref<IUser>;
14
- team_id?: Ref<ITeam>;
14
+ team_id: Ref<ITeam>;
15
15
  timestamp: Date;
16
16
  previous: {
17
17
  cpu: number;
18
18
  memory: number;
19
19
  storage: number;
20
20
  persistentStorage: number;
21
- region?: Ref<IRegion>;
21
+ region: Ref<IRegion>;
22
22
  };
23
23
  current: {
24
24
  cpu: number;
25
25
  memory: number;
26
26
  storage: number;
27
27
  persistentStorage: number;
28
- region?: Ref<IRegion>;
28
+ region: Ref<IRegion>;
29
29
  };
30
- default_resources?: {
30
+ default_resources: {
31
31
  cpu: number;
32
32
  memory: number;
33
33
  storage: number;
34
34
  persistentStorage: number;
35
- region?: Ref<IRegion>;
35
+ region: Ref<IRegion>;
36
36
  };
37
37
  costs: {
38
38
  startDate: Date;
39
- endDate?: Date;
39
+ endDate: Date;
40
40
  cpuCost: number;
41
41
  memoryCost: number;
42
42
  storageCost: number;
43
43
  persistentStorageCost: number;
44
44
  totalCost: number;
45
45
  };
46
- project_deleted_at?: Date;
46
+ project_deleted_at: Date;
47
47
  billed: boolean;
48
48
  storage_pricing_factor: number;
49
- instance_count?: number;
50
- scaling_source?: SCALING_SOURCE;
49
+ instance_count: number;
50
+ scaling_source: SCALING_SOURCE;
51
51
  }
@@ -4,19 +4,19 @@ export interface ICouponRedemption extends Document {
4
4
  coupon_id: Types.ObjectId;
5
5
  code: string;
6
6
  user_id: Types.ObjectId;
7
- team_id?: Types.ObjectId | null;
7
+ team_id: Types.ObjectId | null;
8
8
  scope: CouponScope;
9
- domain_name?: string | null;
10
- duration_years?: number | null;
11
- idempotency_key?: string | null;
12
- transaction_reference?: string | null;
9
+ domain_name: string | null;
10
+ duration_years: number | null;
11
+ idempotency_key: string | null;
12
+ transaction_reference: string | null;
13
13
  original_amount: number;
14
14
  discount_amount: number;
15
15
  final_amount: number;
16
16
  status: CouponRedemptionStatus;
17
17
  reserved_at: Date;
18
- applied_at?: Date | null;
19
- reversed_at?: Date | null;
20
- created_at?: Date;
21
- updated_at?: Date;
18
+ applied_at: Date | null;
19
+ reversed_at: Date | null;
20
+ created_at: Date;
21
+ updated_at: Date;
22
22
  }
@@ -2,26 +2,26 @@ import { Document, Types } from "mongoose";
2
2
  import { CouponDiscountType, CouponScope } from "../enum";
3
3
  export interface ICoupon extends Document {
4
4
  code: string;
5
- description?: string | null;
5
+ description: string | null;
6
6
  scope: CouponScope;
7
7
  discount_type: CouponDiscountType;
8
8
  discount_value: number;
9
9
  currency: string;
10
- max_redemptions?: number | null;
10
+ max_redemptions: number | null;
11
11
  max_redemptions_per_user: number;
12
12
  redemption_count: number;
13
- min_purchase_amount?: number | null;
14
- max_purchase_amount?: number | null;
13
+ min_purchase_amount: number | null;
14
+ max_purchase_amount: number | null;
15
15
  allowed_tlds: string[];
16
16
  allowed_emails: string[];
17
17
  allowed_user_ids: Types.ObjectId[];
18
- max_duration_years?: number | null;
18
+ max_duration_years: number | null;
19
19
  allow_below_cost: boolean;
20
- starts_at?: Date | null;
21
- expires_at?: Date | null;
20
+ starts_at: Date | null;
21
+ expires_at: Date | null;
22
22
  enabled: boolean;
23
- created_by?: string | null;
24
- disabled_at?: Date | null;
25
- created_at?: Date;
26
- updated_at?: Date;
23
+ created_by: string | null;
24
+ disabled_at: Date | null;
25
+ created_at: Date;
26
+ updated_at: Date;
27
27
  }
@@ -11,7 +11,7 @@ export interface IDbImage extends Document {
11
11
  is_available: boolean;
12
12
  is_default: boolean;
13
13
  backup_supported: boolean;
14
- restore_supported?: boolean;
14
+ restore_supported: boolean;
15
15
  image: string;
16
16
  free: boolean;
17
17
  erd: boolean;
@@ -24,9 +24,9 @@ export interface IDbImage extends Document {
24
24
  ha: boolean;
25
25
  workbench: boolean;
26
26
  workbench_mode: WorkbenchMode;
27
- workbench_password?: boolean;
27
+ workbench_password: boolean;
28
28
  params: Record<any, any>;
29
- recommendations?: Array<{
29
+ recommendations: Array<{
30
30
  cpu: string;
31
31
  memory: string;
32
32
  storage: string;
@@ -3,18 +3,18 @@ import { DNS_CHANGE_SOURCE, DNS_CHANGE_TYPE } from "../../enum";
3
3
  export interface IDnsChangeLog extends Document {
4
4
  domain_id: Types.ObjectId;
5
5
  domain_name: string;
6
- user_id?: Types.ObjectId;
7
- team_id?: Types.ObjectId;
8
- project?: Types.ObjectId;
6
+ user_id: Types.ObjectId;
7
+ team_id: Types.ObjectId;
8
+ project: Types.ObjectId;
9
9
  change_type: DNS_CHANGE_TYPE;
10
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;
11
+ actor: string;
12
+ record_id: Types.ObjectId | null;
13
+ before: Record<string, any> | null;
14
+ after: Record<string, any> | null;
15
15
  records: Record<string, any>[];
16
16
  record_count: number;
17
- change_key?: string;
17
+ change_key: string;
18
18
  created_at: Date;
19
19
  updated_at: Date;
20
20
  }
@@ -7,7 +7,7 @@ export interface IDns extends Document {
7
7
  type: string;
8
8
  value: string;
9
9
  domain: Ref<IDomain>;
10
- isProxied?: boolean;
10
+ isProxied: boolean;
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  }
@@ -6,7 +6,7 @@ export interface IDomain extends Document {
6
6
  name: string;
7
7
  project: Ref<IProject>;
8
8
  user_id: Ref<IUser>;
9
- team_id?: Ref<ITeam>;
9
+ team_id: Ref<ITeam>;
10
10
  primary: boolean;
11
11
  preview: Ref<IPreview>;
12
12
  provider: string;
@@ -20,19 +20,19 @@ export interface IDomain extends Document {
20
20
  renewal_date: string;
21
21
  renewal_price: number;
22
22
  job_identifier: string;
23
- cloudflare_custom_hostname_id?: string;
23
+ cloudflare_custom_hostname_id: string;
24
24
  trigger_created: boolean;
25
25
  trigger_created_at: string;
26
26
  nameservers: string[];
27
27
  dns: Ref<IDns>[];
28
- project_environment?: Ref<IProjectEnvironment>;
28
+ project_environment: Ref<IProjectEnvironment>;
29
29
  is_pending_verification: boolean;
30
- last_expiry_notification_at?: Date | null;
30
+ last_expiry_notification_at: Date | null;
31
31
  wildcard_enabled: boolean;
32
32
  wildcard_verified: boolean;
33
- redirect?: {
33
+ redirect: {
34
34
  url: string;
35
- status?: 301 | 302 | 307 | 308;
35
+ status: 301 | 302 | 307 | 308;
36
36
  };
37
37
  createdAt: Date;
38
38
  updatedAt: Date;
@@ -6,23 +6,23 @@ export interface IDomainTransfer extends Document {
6
6
  domain_id: Ref<IDomain>;
7
7
  domain_name: string;
8
8
  user_id: Ref<IUser>;
9
- team_id?: Ref<ITeam>;
9
+ team_id: Ref<ITeam>;
10
10
  provider: DomainTransferProvider;
11
11
  direction: DomainTransferDirection;
12
12
  status: DomainTransferStatus;
13
- provider_transfer_id?: string;
14
- payment_reference?: string;
15
- payment_token?: string;
16
- payment_amount?: number;
17
- renewal_price?: number;
18
- auto_renewal?: boolean;
19
- privacy_enabled?: boolean;
20
- renewal_duration?: number;
21
- project_id?: Ref<IProject>;
22
- last_polled_at?: Date;
13
+ provider_transfer_id: string;
14
+ payment_reference: string;
15
+ payment_token: string;
16
+ payment_amount: number;
17
+ renewal_price: number;
18
+ auto_renewal: boolean;
19
+ privacy_enabled: boolean;
20
+ renewal_duration: number;
21
+ project_id: Ref<IProject>;
22
+ last_polled_at: Date;
23
23
  poll_count: number;
24
- last_provider_status?: string;
25
- failure_reason?: string;
24
+ last_provider_status: string;
25
+ failure_reason: string;
26
26
  createdAt: Date;
27
27
  updatedAt: Date;
28
28
  }
@@ -2,26 +2,26 @@ import { Document, Types } from "mongoose";
2
2
  import { DrainStatus, DrainType, LogSource } from "../enum";
3
3
  export interface IDrain extends Document {
4
4
  _id: Types.ObjectId;
5
- user_id?: Types.ObjectId;
6
- team?: Types.ObjectId | null;
5
+ user_id: Types.ObjectId;
6
+ team: Types.ObjectId | null;
7
7
  name: string;
8
8
  type: DrainType;
9
- url?: string | null;
9
+ url: string | null;
10
10
  headerKeys: string[];
11
- s3?: {
12
- bucket?: string;
13
- region?: string;
14
- endpoint?: string | null;
15
- keyPrefix?: string;
16
- storageBucketId?: Types.ObjectId | null;
17
- storageCredentialId?: Types.ObjectId | null;
11
+ s3: {
12
+ bucket: string;
13
+ region: string;
14
+ endpoint: string | null;
15
+ keyPrefix: string;
16
+ storageBucketId: Types.ObjectId | null;
17
+ storageCredentialId: Types.ObjectId | null;
18
18
  } | null;
19
19
  secretsRef: string;
20
20
  sources: LogSource[];
21
21
  status: DrainStatus;
22
- statusReason?: string | null;
23
- failingSince?: Date | null;
24
- disabledAt?: Date | null;
22
+ statusReason: string | null;
23
+ failingSince: Date | null;
24
+ disabledAt: Date | null;
25
25
  createdAt: Date;
26
26
  updatedAt: Date;
27
27
  }
@@ -5,10 +5,10 @@ export interface IEmailDeadLetter extends Document {
5
5
  status: EmailDeadLetterStatus;
6
6
  attempts: number;
7
7
  deadLetterAttempts: number;
8
- lastError?: string;
9
- bullJobId?: string;
8
+ lastError: string;
9
+ bullJobId: string;
10
10
  failedAt: Date;
11
- sentAt?: Date;
11
+ sentAt: Date;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  }
@@ -8,7 +8,7 @@ export interface IEnv extends Document {
8
8
  project: Ref<IProject>;
9
9
  user: Ref<IUser>;
10
10
  environment: ENVIRONMENT | string;
11
- is_system?: boolean;
11
+ is_system: boolean;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  }
@@ -7,7 +7,7 @@ export interface IEnvironmentVariable extends Document {
7
7
  name: string;
8
8
  value: string;
9
9
  project_environment: Ref<IProjectEnvironment>;
10
- source_project?: Ref<IProject> | null;
10
+ source_project: Ref<IProject> | null;
11
11
  user: Ref<IUser>;
12
12
  inheritable: boolean;
13
13
  createdAt: Date;
@@ -1,5 +1,5 @@
1
1
  import { Document } from "mongoose";
2
2
  export interface IFollowing extends Document {
3
- user_id?: string;
4
- followed_id?: string;
3
+ user_id: string;
4
+ followed_id: string;
5
5
  }
@@ -3,26 +3,26 @@ import { FrameworkApplicationType } from "../enum";
3
3
  export interface IFramework extends Document {
4
4
  name: string;
5
5
  slug: string;
6
- demo?: string;
6
+ demo: string;
7
7
  logo: string;
8
- tagline?: string;
8
+ tagline: string;
9
9
  supported: boolean;
10
- description?: string;
10
+ description: string;
11
11
  website: string;
12
12
  port: number;
13
- envPrefix?: string;
13
+ envPrefix: string;
14
14
  detector: string;
15
15
  file_detectors: string[];
16
16
  type: FrameworkApplicationType;
17
17
  settings: {
18
- installCommand?: string;
19
- startCommand?: string;
18
+ installCommand: string;
19
+ startCommand: string;
20
20
  buildCommand: string;
21
21
  outputDirectory: string;
22
- manager?: string;
22
+ manager: string;
23
23
  };
24
- createdAt?: Date;
25
- updatedAt?: Date;
24
+ createdAt: Date;
25
+ updatedAt: Date;
26
26
  }
27
27
  export type BrimbleFrameworkType = {
28
28
  name: string;
@@ -1,20 +1,20 @@
1
1
  import { Document } from "mongoose";
2
2
  export interface IGit extends Document {
3
- git_id?: number;
4
- installation_ids?: number[];
5
- installation_id?: string;
3
+ git_id: number;
4
+ installation_ids: number[];
5
+ installation_id: string;
6
6
  access_token: string;
7
7
  token_type: string;
8
- scope?: string;
9
- refresh_token?: string;
10
- created_at?: number;
11
- state?: string;
12
- expires_in?: number;
13
- expires_at?: number;
14
- scopes?: string;
8
+ scope: string;
9
+ refresh_token: string;
10
+ created_at: number;
11
+ state: string;
12
+ expires_in: number;
13
+ expires_at: number;
14
+ scopes: string;
15
15
  }
16
16
  export interface IOrigin {
17
17
  installation_id: string;
18
- namespace_id?: string;
19
- repository_selection?: "all" | "selected";
18
+ namespace_id: string;
19
+ repository_selection: "all" | "selected";
20
20
  }
@@ -2,13 +2,13 @@ import { Document } from "mongoose";
2
2
  import { INTEGRATION_PROVIDERS, INTEGRATION_TYPES } from "../enum";
3
3
  export interface IIntegration extends Document {
4
4
  user_id: string;
5
- team_id?: string;
6
- app_id?: string;
5
+ team_id: string;
6
+ app_id: string;
7
7
  name: INTEGRATION_PROVIDERS;
8
- scope_description?: string[];
9
- hook?: string;
10
- reference?: string;
11
- token?: string;
8
+ scope_description: string[];
9
+ hook: string;
10
+ reference: string;
11
+ token: string;
12
12
  type: INTEGRATION_TYPES;
13
- extra?: any;
13
+ extra: any;
14
14
  }
@@ -8,7 +8,7 @@ export interface IIntention extends Document {
8
8
  sourceNamespace: string;
9
9
  destinationNamespace: string;
10
10
  action: "allow" | "deny";
11
- description?: string;
11
+ description: string;
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  }
@@ -6,14 +6,14 @@ export interface IJob extends Document {
6
6
  url: string;
7
7
  method: string;
8
8
  schedule: string;
9
- headers?: Map<string, string>;
10
- maxAttempts?: number;
11
- attempts?: number;
9
+ headers: Map<string, string>;
10
+ maxAttempts: number;
11
+ attempts: number;
12
12
  isRecurring: boolean;
13
- lastRun?: Date;
14
- nextRun?: Date;
15
- body?: any;
16
- status?: JobStatus;
17
- createdAt?: Date;
18
- updatedAt?: Date;
13
+ lastRun: Date;
14
+ nextRun: Date;
15
+ body: any;
16
+ status: JobStatus;
17
+ createdAt: Date;
18
+ updatedAt: Date;
19
19
  }