@fabrika/operations-contract 0.9.0-dev.46 → 0.9.0-dev.48

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/operations-contract",
3
- "version": "0.9.0-dev.46",
3
+ "version": "0.9.0-dev.48",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -61,6 +61,6 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "zod": "^3.25.76",
64
- "@fabrika/app": "0.9.0-dev.46"
64
+ "@fabrika/app": "0.9.0-dev.48"
65
65
  }
66
66
  }
@@ -8,6 +8,7 @@ export type OperationsAlertKind =
8
8
  | 'failed_check'
9
9
  | 'recovery'
10
10
  | 'unhealthy_telemetry'
11
+ | 'security'
11
12
 
12
13
  export type OperationsHealthState = 'healthy' | 'degraded' | 'failed' | 'stale' | 'unavailable'
13
14
 
@@ -226,8 +227,16 @@ export interface OperationsNotificationDeliveryDto {
226
227
  attempts: OperationsNotificationAttemptDto[]
227
228
  }
228
229
 
230
+ /** Refused sign-ins within fifteen minutes that raise a `security` alert; only the installation source has them. */
231
+ export interface OperationsSecurityAlertDto {
232
+ accountThreshold: number
233
+ installationThreshold: number
234
+ }
235
+
229
236
  export interface OperationsAlertSettingsResponseDto {
230
237
  spike: { threshold: number; enabled: boolean } | null
238
+ /** The installation source's sign-in thresholds, defaults included; null on every application source. */
239
+ security: OperationsSecurityAlertDto | null
231
240
  rules: OperationsAlertRuleDto[]
232
241
  channels: OperationsNotificationChannelDto[]
233
242
  deliveries: OperationsNotificationDeliveryDto[]
@@ -238,6 +247,8 @@ export interface OperationsSpikeAlertRequestDto {
238
247
  enabled: boolean
239
248
  }
240
249
 
250
+ export type OperationsSecurityAlertRequestDto = OperationsSecurityAlertDto
251
+
241
252
  export interface OperationsAlertRuleRequestDto {
242
253
  enabled: boolean
243
254
  }
package/src/rpc.ts CHANGED
@@ -16,6 +16,7 @@ import type {
16
16
  OperationsNotificationChannelRequestDto,
17
17
  OperationsReleaseDetailResponseDto,
18
18
  OperationsReleaseListResponseDto,
19
+ OperationsSecurityAlertRequestDto,
19
20
  OperationsSourceDetailResponseDto,
20
21
  OperationsSourceHealthDto,
21
22
  OperationsSourceListResponseDto,
@@ -70,6 +71,10 @@ export interface OperationsRpcContract {
70
71
  { sourceId: string; input: OperationsSpikeAlertRequestDto },
71
72
  { threshold: number; enabled: boolean }
72
73
  >
74
+ updateSecurityAlert: RpcProcedureContract<
75
+ { sourceId: string; input: OperationsSecurityAlertRequestDto },
76
+ OperationsSecurityAlertRequestDto
77
+ >
73
78
  updateAlertRule: RpcProcedureContract<
74
79
  { sourceId: string; kind: OperationsAlertKind; input: OperationsAlertRuleRequestDto },
75
80
  { kind: OperationsAlertKind; enabled: boolean }
@@ -1,6 +1,6 @@
1
1
  import type { ActivityItem, EventDetail, IssueStatus } from './operator.js';
2
2
  import type { OperationsArtifactState } from './releases.js';
3
- export type OperationsAlertKind = 'new_issue' | 'regression' | 'spike' | 'failed_check' | 'recovery' | 'unhealthy_telemetry';
3
+ export type OperationsAlertKind = 'new_issue' | 'regression' | 'spike' | 'failed_check' | 'recovery' | 'unhealthy_telemetry' | 'security';
4
4
  export type OperationsHealthState = 'healthy' | 'degraded' | 'failed' | 'stale' | 'unavailable';
5
5
  export interface OperationsSourceSummaryDto {
6
6
  id: string;
@@ -210,11 +210,18 @@ export interface OperationsNotificationDeliveryDto {
210
210
  abandonedAt: number | null;
211
211
  attempts: OperationsNotificationAttemptDto[];
212
212
  }
213
+ /** Refused sign-ins within fifteen minutes that raise a `security` alert; only the installation source has them. */
214
+ export interface OperationsSecurityAlertDto {
215
+ accountThreshold: number;
216
+ installationThreshold: number;
217
+ }
213
218
  export interface OperationsAlertSettingsResponseDto {
214
219
  spike: {
215
220
  threshold: number;
216
221
  enabled: boolean;
217
222
  } | null;
223
+ /** The installation source's sign-in thresholds, defaults included; null on every application source. */
224
+ security: OperationsSecurityAlertDto | null;
218
225
  rules: OperationsAlertRuleDto[];
219
226
  channels: OperationsNotificationChannelDto[];
220
227
  deliveries: OperationsNotificationDeliveryDto[];
@@ -223,6 +230,7 @@ export interface OperationsSpikeAlertRequestDto {
223
230
  threshold: number;
224
231
  enabled: boolean;
225
232
  }
233
+ export type OperationsSecurityAlertRequestDto = OperationsSecurityAlertDto;
226
234
  export interface OperationsAlertRuleRequestDto {
227
235
  enabled: boolean;
228
236
  }
@@ -1,5 +1,5 @@
1
1
  import type { RpcProcedureContract } from '@fabrika/app';
2
- import type { OperationsAlertKind, OperationsAlertRuleRequestDto, OperationsAlertSettingsResponseDto, OperationsAssigneeListResponseDto, OperationsBulkIssueStatusRequestDto, OperationsBulkIssueStatusResponseDto, OperationsEventDetailResponseDto, OperationsHealthCheckUpsertRequestDto, OperationsHealthResponseDto, OperationsIssueDetailResponseDto, OperationsIssueListResponseDto, OperationsIssueMutationRequestDto, OperationsIssueOccurrenceListResponseDto, OperationsNotificationChannelRequestDto, OperationsReleaseDetailResponseDto, OperationsReleaseListResponseDto, OperationsSourceDetailResponseDto, OperationsSourceHealthDto, OperationsSourceListResponseDto, OperationsSpikeAlertRequestDto } from './operator-api.js';
2
+ import type { OperationsAlertKind, OperationsAlertRuleRequestDto, OperationsAlertSettingsResponseDto, OperationsAssigneeListResponseDto, OperationsBulkIssueStatusRequestDto, OperationsBulkIssueStatusResponseDto, OperationsEventDetailResponseDto, OperationsHealthCheckUpsertRequestDto, OperationsHealthResponseDto, OperationsIssueDetailResponseDto, OperationsIssueListResponseDto, OperationsIssueMutationRequestDto, OperationsIssueOccurrenceListResponseDto, OperationsNotificationChannelRequestDto, OperationsReleaseDetailResponseDto, OperationsReleaseListResponseDto, OperationsSecurityAlertRequestDto, OperationsSourceDetailResponseDto, OperationsSourceHealthDto, OperationsSourceListResponseDto, OperationsSpikeAlertRequestDto } from './operator-api.js';
3
3
  export interface OperationsIssueQuery {
4
4
  sourceId?: string;
5
5
  status?: 'open' | 'resolved' | 'ignored';
@@ -81,6 +81,10 @@ export interface OperationsRpcContract {
81
81
  threshold: number;
82
82
  enabled: boolean;
83
83
  }>;
84
+ updateSecurityAlert: RpcProcedureContract<{
85
+ sourceId: string;
86
+ input: OperationsSecurityAlertRequestDto;
87
+ }, OperationsSecurityAlertRequestDto>;
84
88
  updateAlertRule: RpcProcedureContract<{
85
89
  sourceId: string;
86
90
  kind: OperationsAlertKind;