@miradorlabs/web-grpc 2.15.0 → 2.16.0

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.
@@ -2,15 +2,14 @@
2
2
  // versions:
3
3
  // protoc-gen-ts_proto v2.12.0
4
4
  // protoc v3.21.12
5
- // source: proto/gateway/web/v1/automation_gateway.proto
5
+ // source: proto/gateway/web/v1/integration_gateway.proto
6
6
 
7
7
  /* eslint-disable */
8
8
  import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
9
9
  import type { Metadata } from "@grpc/grpc-js";
10
- import { Observable } from "rxjs";
11
- import { map } from "rxjs/operators";
12
10
  import { Timestamp } from "../../../../google/protobuf/timestamp";
13
11
  import { ResponseStatus } from "../../common/v1/status";
12
+ import { EnabledStatus, enabledStatusFromJSON, enabledStatusToJSON } from "./common";
14
13
 
15
14
  export const protobufPackage = "gateway.web.v1";
16
15
 
@@ -65,45 +64,6 @@ export function integrationTypeToJSON(object: IntegrationType): string {
65
64
  }
66
65
  }
67
66
 
68
- export enum EnabledStatus {
69
- ENABLED_STATUS_UNSPECIFIED = 0,
70
- ENABLED_STATUS_ENABLED = 1,
71
- ENABLED_STATUS_DISABLED = 2,
72
- UNRECOGNIZED = -1,
73
- }
74
-
75
- export function enabledStatusFromJSON(object: any): EnabledStatus {
76
- switch (object) {
77
- case 0:
78
- case "ENABLED_STATUS_UNSPECIFIED":
79
- return EnabledStatus.ENABLED_STATUS_UNSPECIFIED;
80
- case 1:
81
- case "ENABLED_STATUS_ENABLED":
82
- return EnabledStatus.ENABLED_STATUS_ENABLED;
83
- case 2:
84
- case "ENABLED_STATUS_DISABLED":
85
- return EnabledStatus.ENABLED_STATUS_DISABLED;
86
- case -1:
87
- case "UNRECOGNIZED":
88
- default:
89
- return EnabledStatus.UNRECOGNIZED;
90
- }
91
- }
92
-
93
- export function enabledStatusToJSON(object: EnabledStatus): string {
94
- switch (object) {
95
- case EnabledStatus.ENABLED_STATUS_UNSPECIFIED:
96
- return "ENABLED_STATUS_UNSPECIFIED";
97
- case EnabledStatus.ENABLED_STATUS_ENABLED:
98
- return "ENABLED_STATUS_ENABLED";
99
- case EnabledStatus.ENABLED_STATUS_DISABLED:
100
- return "ENABLED_STATUS_DISABLED";
101
- case EnabledStatus.UNRECOGNIZED:
102
- default:
103
- return "UNRECOGNIZED";
104
- }
105
- }
106
-
107
67
  export enum DeliveryStatus {
108
68
  DELIVERY_STATUS_UNSPECIFIED = 0,
109
69
  DELIVERY_STATUS_PENDING = 1,
@@ -189,18 +149,6 @@ export interface PagerDutyConfig {
189
149
  serviceName: string;
190
150
  }
191
151
 
192
- export interface Rule {
193
- id: string;
194
- projectId: string;
195
- name: string;
196
- description: string;
197
- enabled: EnabledStatus;
198
- integrationIds: string[];
199
- celExpression: string;
200
- createdAt: Date | undefined;
201
- updatedAt: Date | undefined;
202
- }
203
-
204
152
  export interface CreateIntegrationRequest {
205
153
  organizationId: string;
206
154
  name: string;
@@ -265,152 +213,13 @@ export interface DeleteIntegrationResponse {
265
213
  status: ResponseStatus | undefined;
266
214
  }
267
215
 
268
- export interface CreateRuleRequest {
269
- projectId: string;
270
- name: string;
271
- description: string;
272
- integrationIds: string[];
273
- celExpression: string;
274
- organizationId: string;
275
- }
276
-
277
- export interface CreateRuleResponse {
278
- status: ResponseStatus | undefined;
279
- rule: Rule | undefined;
280
- }
281
-
282
- export interface GetRuleRequest {
283
- projectId: string;
284
- ruleId: string;
285
- organizationId: string;
286
- }
287
-
288
- export interface GetRuleResponse {
289
- status: ResponseStatus | undefined;
290
- rule: Rule | undefined;
291
- }
292
-
293
- export interface ListRulesRequest {
294
- organizationId: string;
295
- organizationIdFilter?: string | undefined;
296
- projectIdFilter?: string | undefined;
297
- }
298
-
299
- export interface ListRulesResponse {
300
- status: ResponseStatus | undefined;
301
- rules: Rule[];
302
- }
303
-
304
- export interface UpdateRuleRequest {
305
- projectId: string;
306
- ruleId: string;
307
- updates: UpdateRuleRequest_RuleUpdates | undefined;
308
- organizationId: string;
309
- }
310
-
311
- export interface UpdateRuleRequest_IntegrationIds {
312
- ids: string[];
313
- }
314
-
315
- export interface UpdateRuleRequest_CelExpression {
316
- celExpression: string;
317
- }
318
-
319
- export interface UpdateRuleRequest_RuleUpdates {
320
- name?: string | undefined;
321
- description?: string | undefined;
322
- enabled?: EnabledStatus | undefined;
323
- integrationIds: UpdateRuleRequest_IntegrationIds | undefined;
324
- celExpression: UpdateRuleRequest_CelExpression | undefined;
325
- }
326
-
327
- export interface UpdateRuleResponse {
328
- status: ResponseStatus | undefined;
329
- rule: Rule | undefined;
330
- }
331
-
332
- export interface DeleteRuleRequest {
333
- projectId: string;
334
- ruleId: string;
335
- organizationId: string;
336
- }
337
-
338
- export interface DeleteRuleResponse {
339
- status: ResponseStatus | undefined;
340
- }
341
-
342
- export interface StreamRuleSimulationRequest {
343
- projectId: string;
344
- celExpression: string;
345
- limit: number;
346
- organizationId: string;
347
- }
348
-
349
- export interface RuleSimulationMatch {
350
- traceId: string;
351
- traceName: string;
352
- matchReason: string;
353
- createdAt: Date | undefined;
354
- }
355
-
356
- export interface ListRuleSchemasRequest {
357
- organizationId: string;
358
- }
359
-
360
- export interface ListRuleSchemasResponse {
361
- status: ResponseStatus | undefined;
362
- schemas: RuleSchema[];
363
- }
364
-
365
- export interface RuleSchema {
366
- id: string;
367
- label: string;
368
- rootVariable: string;
369
- jsonSchema: string;
370
- }
371
-
372
- export interface StreamRuleMatchesRequest {
373
- projectId: string;
374
- organizationId: string;
375
- limit: number;
376
- }
377
-
378
- export interface RuleMatchEnvelope {
379
- snapshot?: RuleMatchSnapshot | undefined;
380
- update?: RuleMatchEvent | undefined;
381
- }
382
-
383
- export interface RuleMatchSnapshot {
384
- matches: RuleMatchEvent[];
385
- }
386
-
387
- export interface RuleMatchEvent {
388
- matchId: string;
389
- projectId: string;
390
- ruleId: string;
391
- ruleName: string;
392
- integrationIds: string[];
393
- matchReason: string;
394
- createdAt: Date | undefined;
395
- entityContexts: RuleMatchEvent_EntityContext[];
396
- }
397
-
398
- /** EntityContext carries contextual data about a matched entity. */
399
- export interface RuleMatchEvent_EntityContext {
400
- traceContext?: RuleMatchEvent_EntityContext_TraceContext | undefined;
401
- }
402
-
403
- export interface RuleMatchEvent_EntityContext_TraceContext {
404
- traceId: string;
405
- }
406
-
407
- export interface ListRuleMatchDeliveriesRequest {
216
+ export interface ListTraceRuleMatchDeliveriesRequest {
408
217
  projectId: string;
409
218
  matchEventId: string;
410
219
  organizationId: string;
411
220
  }
412
221
 
413
- export interface ListRuleMatchDeliveriesResponse {
222
+ export interface ListTraceRuleMatchDeliveriesResponse {
414
223
  status: ResponseStatus | undefined;
415
224
  deliveries: IntegrationDelivery[];
416
225
  }
@@ -1167,56 +976,48 @@ export const PagerDutyConfig: MessageFns<PagerDutyConfig> = {
1167
976
  },
1168
977
  };
1169
978
 
1170
- function createBaseRule(): Rule {
979
+ function createBaseCreateIntegrationRequest(): CreateIntegrationRequest {
1171
980
  return {
1172
- id: "",
1173
- projectId: "",
981
+ organizationId: "",
1174
982
  name: "",
1175
- description: "",
1176
- enabled: 0,
1177
- integrationIds: [],
1178
- celExpression: "",
1179
- createdAt: undefined,
1180
- updatedAt: undefined,
983
+ type: 0,
984
+ webhookConfig: undefined,
985
+ slackConfig: undefined,
986
+ emailConfig: undefined,
987
+ pagerdutyConfig: undefined,
1181
988
  };
1182
989
  }
1183
990
 
1184
- export const Rule: MessageFns<Rule> = {
1185
- encode(message: Rule, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1186
- if (message.id !== "") {
1187
- writer.uint32(10).string(message.id);
1188
- }
1189
- if (message.projectId !== "") {
1190
- writer.uint32(18).string(message.projectId);
991
+ export const CreateIntegrationRequest: MessageFns<CreateIntegrationRequest> = {
992
+ encode(message: CreateIntegrationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
993
+ if (message.organizationId !== "") {
994
+ writer.uint32(10).string(message.organizationId);
1191
995
  }
1192
996
  if (message.name !== "") {
1193
- writer.uint32(26).string(message.name);
1194
- }
1195
- if (message.description !== "") {
1196
- writer.uint32(34).string(message.description);
997
+ writer.uint32(18).string(message.name);
1197
998
  }
1198
- if (message.enabled !== 0) {
1199
- writer.uint32(40).int32(message.enabled);
999
+ if (message.type !== 0) {
1000
+ writer.uint32(24).int32(message.type);
1200
1001
  }
1201
- for (const v of message.integrationIds) {
1202
- writer.uint32(50).string(v!);
1002
+ if (message.webhookConfig !== undefined) {
1003
+ WebhookConfig.encode(message.webhookConfig, writer.uint32(34).fork()).join();
1203
1004
  }
1204
- if (message.celExpression !== "") {
1205
- writer.uint32(58).string(message.celExpression);
1005
+ if (message.slackConfig !== undefined) {
1006
+ SlackConfig.encode(message.slackConfig, writer.uint32(42).fork()).join();
1206
1007
  }
1207
- if (message.createdAt !== undefined) {
1208
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(66).fork()).join();
1008
+ if (message.emailConfig !== undefined) {
1009
+ EmailConfig.encode(message.emailConfig, writer.uint32(50).fork()).join();
1209
1010
  }
1210
- if (message.updatedAt !== undefined) {
1211
- Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(74).fork()).join();
1011
+ if (message.pagerdutyConfig !== undefined) {
1012
+ PagerDutyConfig.encode(message.pagerdutyConfig, writer.uint32(58).fork()).join();
1212
1013
  }
1213
1014
  return writer;
1214
1015
  },
1215
1016
 
1216
- decode(input: BinaryReader | Uint8Array, length?: number): Rule {
1017
+ decode(input: BinaryReader | Uint8Array, length?: number): CreateIntegrationRequest {
1217
1018
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1218
1019
  const end = length === undefined ? reader.len : reader.pos + length;
1219
- const message = createBaseRule();
1020
+ const message = createBaseCreateIntegrationRequest();
1220
1021
  while (reader.pos < end) {
1221
1022
  const tag = reader.uint32();
1222
1023
  switch (tag >>> 3) {
@@ -1225,7 +1026,7 @@ export const Rule: MessageFns<Rule> = {
1225
1026
  break;
1226
1027
  }
1227
1028
 
1228
- message.id = reader.string();
1029
+ message.organizationId = reader.string();
1229
1030
  continue;
1230
1031
  }
1231
1032
  case 2: {
@@ -1233,15 +1034,15 @@ export const Rule: MessageFns<Rule> = {
1233
1034
  break;
1234
1035
  }
1235
1036
 
1236
- message.projectId = reader.string();
1037
+ message.name = reader.string();
1237
1038
  continue;
1238
1039
  }
1239
1040
  case 3: {
1240
- if (tag !== 26) {
1041
+ if (tag !== 24) {
1241
1042
  break;
1242
1043
  }
1243
1044
 
1244
- message.name = reader.string();
1045
+ message.type = reader.int32() as any;
1245
1046
  continue;
1246
1047
  }
1247
1048
  case 4: {
@@ -1249,15 +1050,15 @@ export const Rule: MessageFns<Rule> = {
1249
1050
  break;
1250
1051
  }
1251
1052
 
1252
- message.description = reader.string();
1053
+ message.webhookConfig = WebhookConfig.decode(reader, reader.uint32());
1253
1054
  continue;
1254
1055
  }
1255
1056
  case 5: {
1256
- if (tag !== 40) {
1057
+ if (tag !== 42) {
1257
1058
  break;
1258
1059
  }
1259
1060
 
1260
- message.enabled = reader.int32() as any;
1061
+ message.slackConfig = SlackConfig.decode(reader, reader.uint32());
1261
1062
  continue;
1262
1063
  }
1263
1064
  case 6: {
@@ -1265,7 +1066,7 @@ export const Rule: MessageFns<Rule> = {
1265
1066
  break;
1266
1067
  }
1267
1068
 
1268
- message.integrationIds.push(reader.string());
1069
+ message.emailConfig = EmailConfig.decode(reader, reader.uint32());
1269
1070
  continue;
1270
1071
  }
1271
1072
  case 7: {
@@ -1273,23 +1074,7 @@ export const Rule: MessageFns<Rule> = {
1273
1074
  break;
1274
1075
  }
1275
1076
 
1276
- message.celExpression = reader.string();
1277
- continue;
1278
- }
1279
- case 8: {
1280
- if (tag !== 66) {
1281
- break;
1282
- }
1283
-
1284
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1285
- continue;
1286
- }
1287
- case 9: {
1288
- if (tag !== 74) {
1289
- break;
1290
- }
1291
-
1292
- message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
1077
+ message.pagerdutyConfig = PagerDutyConfig.decode(reader, reader.uint32());
1293
1078
  continue;
1294
1079
  }
1295
1080
  }
@@ -1301,264 +1086,70 @@ export const Rule: MessageFns<Rule> = {
1301
1086
  return message;
1302
1087
  },
1303
1088
 
1304
- fromJSON(object: any): Rule {
1089
+ fromJSON(object: any): CreateIntegrationRequest {
1305
1090
  return {
1306
- id: isSet(object.id) ? globalThis.String(object.id) : "",
1307
- projectId: isSet(object.projectId)
1308
- ? globalThis.String(object.projectId)
1309
- : isSet(object.project_id)
1310
- ? globalThis.String(object.project_id)
1091
+ organizationId: isSet(object.organizationId)
1092
+ ? globalThis.String(object.organizationId)
1093
+ : isSet(object.organization_id)
1094
+ ? globalThis.String(object.organization_id)
1311
1095
  : "",
1312
1096
  name: isSet(object.name) ? globalThis.String(object.name) : "",
1313
- description: isSet(object.description) ? globalThis.String(object.description) : "",
1314
- enabled: isSet(object.enabled) ? enabledStatusFromJSON(object.enabled) : 0,
1315
- integrationIds: globalThis.Array.isArray(object?.integrationIds)
1316
- ? object.integrationIds.map((e: any) => globalThis.String(e))
1317
- : globalThis.Array.isArray(object?.integration_ids)
1318
- ? object.integration_ids.map((e: any) => globalThis.String(e))
1319
- : [],
1320
- celExpression: isSet(object.celExpression)
1321
- ? globalThis.String(object.celExpression)
1322
- : isSet(object.cel_expression)
1323
- ? globalThis.String(object.cel_expression)
1324
- : "",
1325
- createdAt: isSet(object.createdAt)
1326
- ? fromJsonTimestamp(object.createdAt)
1327
- : isSet(object.created_at)
1328
- ? fromJsonTimestamp(object.created_at)
1097
+ type: isSet(object.type) ? integrationTypeFromJSON(object.type) : 0,
1098
+ webhookConfig: isSet(object.webhookConfig)
1099
+ ? WebhookConfig.fromJSON(object.webhookConfig)
1100
+ : isSet(object.webhook_config)
1101
+ ? WebhookConfig.fromJSON(object.webhook_config)
1329
1102
  : undefined,
1330
- updatedAt: isSet(object.updatedAt)
1331
- ? fromJsonTimestamp(object.updatedAt)
1332
- : isSet(object.updated_at)
1333
- ? fromJsonTimestamp(object.updated_at)
1103
+ slackConfig: isSet(object.slackConfig)
1104
+ ? SlackConfig.fromJSON(object.slackConfig)
1105
+ : isSet(object.slack_config)
1106
+ ? SlackConfig.fromJSON(object.slack_config)
1107
+ : undefined,
1108
+ emailConfig: isSet(object.emailConfig)
1109
+ ? EmailConfig.fromJSON(object.emailConfig)
1110
+ : isSet(object.email_config)
1111
+ ? EmailConfig.fromJSON(object.email_config)
1112
+ : undefined,
1113
+ pagerdutyConfig: isSet(object.pagerdutyConfig)
1114
+ ? PagerDutyConfig.fromJSON(object.pagerdutyConfig)
1115
+ : isSet(object.pagerduty_config)
1116
+ ? PagerDutyConfig.fromJSON(object.pagerduty_config)
1334
1117
  : undefined,
1335
1118
  };
1336
1119
  },
1337
1120
 
1338
- toJSON(message: Rule): unknown {
1121
+ toJSON(message: CreateIntegrationRequest): unknown {
1339
1122
  const obj: any = {};
1340
- if (message.id !== "") {
1341
- obj.id = message.id;
1342
- }
1343
- if (message.projectId !== "") {
1344
- obj.projectId = message.projectId;
1123
+ if (message.organizationId !== "") {
1124
+ obj.organizationId = message.organizationId;
1345
1125
  }
1346
1126
  if (message.name !== "") {
1347
1127
  obj.name = message.name;
1348
1128
  }
1349
- if (message.description !== "") {
1350
- obj.description = message.description;
1351
- }
1352
- if (message.enabled !== 0) {
1353
- obj.enabled = enabledStatusToJSON(message.enabled);
1129
+ if (message.type !== 0) {
1130
+ obj.type = integrationTypeToJSON(message.type);
1354
1131
  }
1355
- if (message.integrationIds?.length) {
1356
- obj.integrationIds = message.integrationIds;
1132
+ if (message.webhookConfig !== undefined) {
1133
+ obj.webhookConfig = WebhookConfig.toJSON(message.webhookConfig);
1357
1134
  }
1358
- if (message.celExpression !== "") {
1359
- obj.celExpression = message.celExpression;
1135
+ if (message.slackConfig !== undefined) {
1136
+ obj.slackConfig = SlackConfig.toJSON(message.slackConfig);
1360
1137
  }
1361
- if (message.createdAt !== undefined) {
1362
- obj.createdAt = message.createdAt.toISOString();
1138
+ if (message.emailConfig !== undefined) {
1139
+ obj.emailConfig = EmailConfig.toJSON(message.emailConfig);
1363
1140
  }
1364
- if (message.updatedAt !== undefined) {
1365
- obj.updatedAt = message.updatedAt.toISOString();
1141
+ if (message.pagerdutyConfig !== undefined) {
1142
+ obj.pagerdutyConfig = PagerDutyConfig.toJSON(message.pagerdutyConfig);
1366
1143
  }
1367
1144
  return obj;
1368
1145
  },
1369
1146
 
1370
- create<I extends Exact<DeepPartial<Rule>, I>>(base?: I): Rule {
1371
- return Rule.fromPartial(base ?? ({} as any));
1147
+ create<I extends Exact<DeepPartial<CreateIntegrationRequest>, I>>(base?: I): CreateIntegrationRequest {
1148
+ return CreateIntegrationRequest.fromPartial(base ?? ({} as any));
1372
1149
  },
1373
- fromPartial<I extends Exact<DeepPartial<Rule>, I>>(object: I): Rule {
1374
- const message = createBaseRule();
1375
- message.id = object.id ?? "";
1376
- message.projectId = object.projectId ?? "";
1377
- message.name = object.name ?? "";
1378
- message.description = object.description ?? "";
1379
- message.enabled = object.enabled ?? 0;
1380
- message.integrationIds = object.integrationIds?.map((e) => e) || [];
1381
- message.celExpression = object.celExpression ?? "";
1382
- message.createdAt = object.createdAt ?? undefined;
1383
- message.updatedAt = object.updatedAt ?? undefined;
1384
- return message;
1385
- },
1386
- };
1387
-
1388
- function createBaseCreateIntegrationRequest(): CreateIntegrationRequest {
1389
- return {
1390
- organizationId: "",
1391
- name: "",
1392
- type: 0,
1393
- webhookConfig: undefined,
1394
- slackConfig: undefined,
1395
- emailConfig: undefined,
1396
- pagerdutyConfig: undefined,
1397
- };
1398
- }
1399
-
1400
- export const CreateIntegrationRequest: MessageFns<CreateIntegrationRequest> = {
1401
- encode(message: CreateIntegrationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1402
- if (message.organizationId !== "") {
1403
- writer.uint32(10).string(message.organizationId);
1404
- }
1405
- if (message.name !== "") {
1406
- writer.uint32(18).string(message.name);
1407
- }
1408
- if (message.type !== 0) {
1409
- writer.uint32(24).int32(message.type);
1410
- }
1411
- if (message.webhookConfig !== undefined) {
1412
- WebhookConfig.encode(message.webhookConfig, writer.uint32(34).fork()).join();
1413
- }
1414
- if (message.slackConfig !== undefined) {
1415
- SlackConfig.encode(message.slackConfig, writer.uint32(42).fork()).join();
1416
- }
1417
- if (message.emailConfig !== undefined) {
1418
- EmailConfig.encode(message.emailConfig, writer.uint32(50).fork()).join();
1419
- }
1420
- if (message.pagerdutyConfig !== undefined) {
1421
- PagerDutyConfig.encode(message.pagerdutyConfig, writer.uint32(58).fork()).join();
1422
- }
1423
- return writer;
1424
- },
1425
-
1426
- decode(input: BinaryReader | Uint8Array, length?: number): CreateIntegrationRequest {
1427
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
1428
- const end = length === undefined ? reader.len : reader.pos + length;
1429
- const message = createBaseCreateIntegrationRequest();
1430
- while (reader.pos < end) {
1431
- const tag = reader.uint32();
1432
- switch (tag >>> 3) {
1433
- case 1: {
1434
- if (tag !== 10) {
1435
- break;
1436
- }
1437
-
1438
- message.organizationId = reader.string();
1439
- continue;
1440
- }
1441
- case 2: {
1442
- if (tag !== 18) {
1443
- break;
1444
- }
1445
-
1446
- message.name = reader.string();
1447
- continue;
1448
- }
1449
- case 3: {
1450
- if (tag !== 24) {
1451
- break;
1452
- }
1453
-
1454
- message.type = reader.int32() as any;
1455
- continue;
1456
- }
1457
- case 4: {
1458
- if (tag !== 34) {
1459
- break;
1460
- }
1461
-
1462
- message.webhookConfig = WebhookConfig.decode(reader, reader.uint32());
1463
- continue;
1464
- }
1465
- case 5: {
1466
- if (tag !== 42) {
1467
- break;
1468
- }
1469
-
1470
- message.slackConfig = SlackConfig.decode(reader, reader.uint32());
1471
- continue;
1472
- }
1473
- case 6: {
1474
- if (tag !== 50) {
1475
- break;
1476
- }
1477
-
1478
- message.emailConfig = EmailConfig.decode(reader, reader.uint32());
1479
- continue;
1480
- }
1481
- case 7: {
1482
- if (tag !== 58) {
1483
- break;
1484
- }
1485
-
1486
- message.pagerdutyConfig = PagerDutyConfig.decode(reader, reader.uint32());
1487
- continue;
1488
- }
1489
- }
1490
- if ((tag & 7) === 4 || tag === 0) {
1491
- break;
1492
- }
1493
- reader.skip(tag & 7);
1494
- }
1495
- return message;
1496
- },
1497
-
1498
- fromJSON(object: any): CreateIntegrationRequest {
1499
- return {
1500
- organizationId: isSet(object.organizationId)
1501
- ? globalThis.String(object.organizationId)
1502
- : isSet(object.organization_id)
1503
- ? globalThis.String(object.organization_id)
1504
- : "",
1505
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1506
- type: isSet(object.type) ? integrationTypeFromJSON(object.type) : 0,
1507
- webhookConfig: isSet(object.webhookConfig)
1508
- ? WebhookConfig.fromJSON(object.webhookConfig)
1509
- : isSet(object.webhook_config)
1510
- ? WebhookConfig.fromJSON(object.webhook_config)
1511
- : undefined,
1512
- slackConfig: isSet(object.slackConfig)
1513
- ? SlackConfig.fromJSON(object.slackConfig)
1514
- : isSet(object.slack_config)
1515
- ? SlackConfig.fromJSON(object.slack_config)
1516
- : undefined,
1517
- emailConfig: isSet(object.emailConfig)
1518
- ? EmailConfig.fromJSON(object.emailConfig)
1519
- : isSet(object.email_config)
1520
- ? EmailConfig.fromJSON(object.email_config)
1521
- : undefined,
1522
- pagerdutyConfig: isSet(object.pagerdutyConfig)
1523
- ? PagerDutyConfig.fromJSON(object.pagerdutyConfig)
1524
- : isSet(object.pagerduty_config)
1525
- ? PagerDutyConfig.fromJSON(object.pagerduty_config)
1526
- : undefined,
1527
- };
1528
- },
1529
-
1530
- toJSON(message: CreateIntegrationRequest): unknown {
1531
- const obj: any = {};
1532
- if (message.organizationId !== "") {
1533
- obj.organizationId = message.organizationId;
1534
- }
1535
- if (message.name !== "") {
1536
- obj.name = message.name;
1537
- }
1538
- if (message.type !== 0) {
1539
- obj.type = integrationTypeToJSON(message.type);
1540
- }
1541
- if (message.webhookConfig !== undefined) {
1542
- obj.webhookConfig = WebhookConfig.toJSON(message.webhookConfig);
1543
- }
1544
- if (message.slackConfig !== undefined) {
1545
- obj.slackConfig = SlackConfig.toJSON(message.slackConfig);
1546
- }
1547
- if (message.emailConfig !== undefined) {
1548
- obj.emailConfig = EmailConfig.toJSON(message.emailConfig);
1549
- }
1550
- if (message.pagerdutyConfig !== undefined) {
1551
- obj.pagerdutyConfig = PagerDutyConfig.toJSON(message.pagerdutyConfig);
1552
- }
1553
- return obj;
1554
- },
1555
-
1556
- create<I extends Exact<DeepPartial<CreateIntegrationRequest>, I>>(base?: I): CreateIntegrationRequest {
1557
- return CreateIntegrationRequest.fromPartial(base ?? ({} as any));
1558
- },
1559
- fromPartial<I extends Exact<DeepPartial<CreateIntegrationRequest>, I>>(object: I): CreateIntegrationRequest {
1560
- const message = createBaseCreateIntegrationRequest();
1561
- message.organizationId = object.organizationId ?? "";
1150
+ fromPartial<I extends Exact<DeepPartial<CreateIntegrationRequest>, I>>(object: I): CreateIntegrationRequest {
1151
+ const message = createBaseCreateIntegrationRequest();
1152
+ message.organizationId = object.organizationId ?? "";
1562
1153
  message.name = object.name ?? "";
1563
1154
  message.type = object.type ?? 0;
1564
1155
  message.webhookConfig = (object.webhookConfig !== undefined && object.webhookConfig !== null)
@@ -2203,2316 +1794,87 @@ export const UpdateIntegrationRequest_IntegrationUpdates: MessageFns<UpdateInteg
2203
1794
  ? SlackConfig.fromJSON(object.slack_config)
2204
1795
  : undefined,
2205
1796
  emailConfig: isSet(object.emailConfig)
2206
- ? EmailConfig.fromJSON(object.emailConfig)
2207
- : isSet(object.email_config)
2208
- ? EmailConfig.fromJSON(object.email_config)
2209
- : undefined,
2210
- pagerdutyConfig: isSet(object.pagerdutyConfig)
2211
- ? PagerDutyConfig.fromJSON(object.pagerdutyConfig)
2212
- : isSet(object.pagerduty_config)
2213
- ? PagerDutyConfig.fromJSON(object.pagerduty_config)
2214
- : undefined,
2215
- };
2216
- },
2217
-
2218
- toJSON(message: UpdateIntegrationRequest_IntegrationUpdates): unknown {
2219
- const obj: any = {};
2220
- if (message.name !== undefined) {
2221
- obj.name = message.name;
2222
- }
2223
- if (message.enabled !== undefined) {
2224
- obj.enabled = enabledStatusToJSON(message.enabled);
2225
- }
2226
- if (message.webhookConfig !== undefined) {
2227
- obj.webhookConfig = WebhookConfig.toJSON(message.webhookConfig);
2228
- }
2229
- if (message.slackConfig !== undefined) {
2230
- obj.slackConfig = SlackConfig.toJSON(message.slackConfig);
2231
- }
2232
- if (message.emailConfig !== undefined) {
2233
- obj.emailConfig = EmailConfig.toJSON(message.emailConfig);
2234
- }
2235
- if (message.pagerdutyConfig !== undefined) {
2236
- obj.pagerdutyConfig = PagerDutyConfig.toJSON(message.pagerdutyConfig);
2237
- }
2238
- return obj;
2239
- },
2240
-
2241
- create<I extends Exact<DeepPartial<UpdateIntegrationRequest_IntegrationUpdates>, I>>(
2242
- base?: I,
2243
- ): UpdateIntegrationRequest_IntegrationUpdates {
2244
- return UpdateIntegrationRequest_IntegrationUpdates.fromPartial(base ?? ({} as any));
2245
- },
2246
- fromPartial<I extends Exact<DeepPartial<UpdateIntegrationRequest_IntegrationUpdates>, I>>(
2247
- object: I,
2248
- ): UpdateIntegrationRequest_IntegrationUpdates {
2249
- const message = createBaseUpdateIntegrationRequest_IntegrationUpdates();
2250
- message.name = object.name ?? undefined;
2251
- message.enabled = object.enabled ?? undefined;
2252
- message.webhookConfig = (object.webhookConfig !== undefined && object.webhookConfig !== null)
2253
- ? WebhookConfig.fromPartial(object.webhookConfig)
2254
- : undefined;
2255
- message.slackConfig = (object.slackConfig !== undefined && object.slackConfig !== null)
2256
- ? SlackConfig.fromPartial(object.slackConfig)
2257
- : undefined;
2258
- message.emailConfig = (object.emailConfig !== undefined && object.emailConfig !== null)
2259
- ? EmailConfig.fromPartial(object.emailConfig)
2260
- : undefined;
2261
- message.pagerdutyConfig = (object.pagerdutyConfig !== undefined && object.pagerdutyConfig !== null)
2262
- ? PagerDutyConfig.fromPartial(object.pagerdutyConfig)
2263
- : undefined;
2264
- return message;
2265
- },
2266
- };
2267
-
2268
- function createBaseUpdateIntegrationResponse(): UpdateIntegrationResponse {
2269
- return { status: undefined, integration: undefined };
2270
- }
2271
-
2272
- export const UpdateIntegrationResponse: MessageFns<UpdateIntegrationResponse> = {
2273
- encode(message: UpdateIntegrationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2274
- if (message.status !== undefined) {
2275
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2276
- }
2277
- if (message.integration !== undefined) {
2278
- Integration.encode(message.integration, writer.uint32(18).fork()).join();
2279
- }
2280
- return writer;
2281
- },
2282
-
2283
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateIntegrationResponse {
2284
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2285
- const end = length === undefined ? reader.len : reader.pos + length;
2286
- const message = createBaseUpdateIntegrationResponse();
2287
- while (reader.pos < end) {
2288
- const tag = reader.uint32();
2289
- switch (tag >>> 3) {
2290
- case 1: {
2291
- if (tag !== 10) {
2292
- break;
2293
- }
2294
-
2295
- message.status = ResponseStatus.decode(reader, reader.uint32());
2296
- continue;
2297
- }
2298
- case 2: {
2299
- if (tag !== 18) {
2300
- break;
2301
- }
2302
-
2303
- message.integration = Integration.decode(reader, reader.uint32());
2304
- continue;
2305
- }
2306
- }
2307
- if ((tag & 7) === 4 || tag === 0) {
2308
- break;
2309
- }
2310
- reader.skip(tag & 7);
2311
- }
2312
- return message;
2313
- },
2314
-
2315
- fromJSON(object: any): UpdateIntegrationResponse {
2316
- return {
2317
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
2318
- integration: isSet(object.integration) ? Integration.fromJSON(object.integration) : undefined,
2319
- };
2320
- },
2321
-
2322
- toJSON(message: UpdateIntegrationResponse): unknown {
2323
- const obj: any = {};
2324
- if (message.status !== undefined) {
2325
- obj.status = ResponseStatus.toJSON(message.status);
2326
- }
2327
- if (message.integration !== undefined) {
2328
- obj.integration = Integration.toJSON(message.integration);
2329
- }
2330
- return obj;
2331
- },
2332
-
2333
- create<I extends Exact<DeepPartial<UpdateIntegrationResponse>, I>>(base?: I): UpdateIntegrationResponse {
2334
- return UpdateIntegrationResponse.fromPartial(base ?? ({} as any));
2335
- },
2336
- fromPartial<I extends Exact<DeepPartial<UpdateIntegrationResponse>, I>>(object: I): UpdateIntegrationResponse {
2337
- const message = createBaseUpdateIntegrationResponse();
2338
- message.status = (object.status !== undefined && object.status !== null)
2339
- ? ResponseStatus.fromPartial(object.status)
2340
- : undefined;
2341
- message.integration = (object.integration !== undefined && object.integration !== null)
2342
- ? Integration.fromPartial(object.integration)
2343
- : undefined;
2344
- return message;
2345
- },
2346
- };
2347
-
2348
- function createBaseDeleteIntegrationRequest(): DeleteIntegrationRequest {
2349
- return { organizationId: "", integrationId: "" };
2350
- }
2351
-
2352
- export const DeleteIntegrationRequest: MessageFns<DeleteIntegrationRequest> = {
2353
- encode(message: DeleteIntegrationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2354
- if (message.organizationId !== "") {
2355
- writer.uint32(10).string(message.organizationId);
2356
- }
2357
- if (message.integrationId !== "") {
2358
- writer.uint32(18).string(message.integrationId);
2359
- }
2360
- return writer;
2361
- },
2362
-
2363
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteIntegrationRequest {
2364
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2365
- const end = length === undefined ? reader.len : reader.pos + length;
2366
- const message = createBaseDeleteIntegrationRequest();
2367
- while (reader.pos < end) {
2368
- const tag = reader.uint32();
2369
- switch (tag >>> 3) {
2370
- case 1: {
2371
- if (tag !== 10) {
2372
- break;
2373
- }
2374
-
2375
- message.organizationId = reader.string();
2376
- continue;
2377
- }
2378
- case 2: {
2379
- if (tag !== 18) {
2380
- break;
2381
- }
2382
-
2383
- message.integrationId = reader.string();
2384
- continue;
2385
- }
2386
- }
2387
- if ((tag & 7) === 4 || tag === 0) {
2388
- break;
2389
- }
2390
- reader.skip(tag & 7);
2391
- }
2392
- return message;
2393
- },
2394
-
2395
- fromJSON(object: any): DeleteIntegrationRequest {
2396
- return {
2397
- organizationId: isSet(object.organizationId)
2398
- ? globalThis.String(object.organizationId)
2399
- : isSet(object.organization_id)
2400
- ? globalThis.String(object.organization_id)
2401
- : "",
2402
- integrationId: isSet(object.integrationId)
2403
- ? globalThis.String(object.integrationId)
2404
- : isSet(object.integration_id)
2405
- ? globalThis.String(object.integration_id)
2406
- : "",
2407
- };
2408
- },
2409
-
2410
- toJSON(message: DeleteIntegrationRequest): unknown {
2411
- const obj: any = {};
2412
- if (message.organizationId !== "") {
2413
- obj.organizationId = message.organizationId;
2414
- }
2415
- if (message.integrationId !== "") {
2416
- obj.integrationId = message.integrationId;
2417
- }
2418
- return obj;
2419
- },
2420
-
2421
- create<I extends Exact<DeepPartial<DeleteIntegrationRequest>, I>>(base?: I): DeleteIntegrationRequest {
2422
- return DeleteIntegrationRequest.fromPartial(base ?? ({} as any));
2423
- },
2424
- fromPartial<I extends Exact<DeepPartial<DeleteIntegrationRequest>, I>>(object: I): DeleteIntegrationRequest {
2425
- const message = createBaseDeleteIntegrationRequest();
2426
- message.organizationId = object.organizationId ?? "";
2427
- message.integrationId = object.integrationId ?? "";
2428
- return message;
2429
- },
2430
- };
2431
-
2432
- function createBaseDeleteIntegrationResponse(): DeleteIntegrationResponse {
2433
- return { status: undefined };
2434
- }
2435
-
2436
- export const DeleteIntegrationResponse: MessageFns<DeleteIntegrationResponse> = {
2437
- encode(message: DeleteIntegrationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2438
- if (message.status !== undefined) {
2439
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2440
- }
2441
- return writer;
2442
- },
2443
-
2444
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteIntegrationResponse {
2445
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2446
- const end = length === undefined ? reader.len : reader.pos + length;
2447
- const message = createBaseDeleteIntegrationResponse();
2448
- while (reader.pos < end) {
2449
- const tag = reader.uint32();
2450
- switch (tag >>> 3) {
2451
- case 1: {
2452
- if (tag !== 10) {
2453
- break;
2454
- }
2455
-
2456
- message.status = ResponseStatus.decode(reader, reader.uint32());
2457
- continue;
2458
- }
2459
- }
2460
- if ((tag & 7) === 4 || tag === 0) {
2461
- break;
2462
- }
2463
- reader.skip(tag & 7);
2464
- }
2465
- return message;
2466
- },
2467
-
2468
- fromJSON(object: any): DeleteIntegrationResponse {
2469
- return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
2470
- },
2471
-
2472
- toJSON(message: DeleteIntegrationResponse): unknown {
2473
- const obj: any = {};
2474
- if (message.status !== undefined) {
2475
- obj.status = ResponseStatus.toJSON(message.status);
2476
- }
2477
- return obj;
2478
- },
2479
-
2480
- create<I extends Exact<DeepPartial<DeleteIntegrationResponse>, I>>(base?: I): DeleteIntegrationResponse {
2481
- return DeleteIntegrationResponse.fromPartial(base ?? ({} as any));
2482
- },
2483
- fromPartial<I extends Exact<DeepPartial<DeleteIntegrationResponse>, I>>(object: I): DeleteIntegrationResponse {
2484
- const message = createBaseDeleteIntegrationResponse();
2485
- message.status = (object.status !== undefined && object.status !== null)
2486
- ? ResponseStatus.fromPartial(object.status)
2487
- : undefined;
2488
- return message;
2489
- },
2490
- };
2491
-
2492
- function createBaseCreateRuleRequest(): CreateRuleRequest {
2493
- return { projectId: "", name: "", description: "", integrationIds: [], celExpression: "", organizationId: "" };
2494
- }
2495
-
2496
- export const CreateRuleRequest: MessageFns<CreateRuleRequest> = {
2497
- encode(message: CreateRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2498
- if (message.projectId !== "") {
2499
- writer.uint32(10).string(message.projectId);
2500
- }
2501
- if (message.name !== "") {
2502
- writer.uint32(18).string(message.name);
2503
- }
2504
- if (message.description !== "") {
2505
- writer.uint32(26).string(message.description);
2506
- }
2507
- for (const v of message.integrationIds) {
2508
- writer.uint32(34).string(v!);
2509
- }
2510
- if (message.celExpression !== "") {
2511
- writer.uint32(42).string(message.celExpression);
2512
- }
2513
- if (message.organizationId !== "") {
2514
- writer.uint32(50).string(message.organizationId);
2515
- }
2516
- return writer;
2517
- },
2518
-
2519
- decode(input: BinaryReader | Uint8Array, length?: number): CreateRuleRequest {
2520
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2521
- const end = length === undefined ? reader.len : reader.pos + length;
2522
- const message = createBaseCreateRuleRequest();
2523
- while (reader.pos < end) {
2524
- const tag = reader.uint32();
2525
- switch (tag >>> 3) {
2526
- case 1: {
2527
- if (tag !== 10) {
2528
- break;
2529
- }
2530
-
2531
- message.projectId = reader.string();
2532
- continue;
2533
- }
2534
- case 2: {
2535
- if (tag !== 18) {
2536
- break;
2537
- }
2538
-
2539
- message.name = reader.string();
2540
- continue;
2541
- }
2542
- case 3: {
2543
- if (tag !== 26) {
2544
- break;
2545
- }
2546
-
2547
- message.description = reader.string();
2548
- continue;
2549
- }
2550
- case 4: {
2551
- if (tag !== 34) {
2552
- break;
2553
- }
2554
-
2555
- message.integrationIds.push(reader.string());
2556
- continue;
2557
- }
2558
- case 5: {
2559
- if (tag !== 42) {
2560
- break;
2561
- }
2562
-
2563
- message.celExpression = reader.string();
2564
- continue;
2565
- }
2566
- case 6: {
2567
- if (tag !== 50) {
2568
- break;
2569
- }
2570
-
2571
- message.organizationId = reader.string();
2572
- continue;
2573
- }
2574
- }
2575
- if ((tag & 7) === 4 || tag === 0) {
2576
- break;
2577
- }
2578
- reader.skip(tag & 7);
2579
- }
2580
- return message;
2581
- },
2582
-
2583
- fromJSON(object: any): CreateRuleRequest {
2584
- return {
2585
- projectId: isSet(object.projectId)
2586
- ? globalThis.String(object.projectId)
2587
- : isSet(object.project_id)
2588
- ? globalThis.String(object.project_id)
2589
- : "",
2590
- name: isSet(object.name) ? globalThis.String(object.name) : "",
2591
- description: isSet(object.description) ? globalThis.String(object.description) : "",
2592
- integrationIds: globalThis.Array.isArray(object?.integrationIds)
2593
- ? object.integrationIds.map((e: any) => globalThis.String(e))
2594
- : globalThis.Array.isArray(object?.integration_ids)
2595
- ? object.integration_ids.map((e: any) => globalThis.String(e))
2596
- : [],
2597
- celExpression: isSet(object.celExpression)
2598
- ? globalThis.String(object.celExpression)
2599
- : isSet(object.cel_expression)
2600
- ? globalThis.String(object.cel_expression)
2601
- : "",
2602
- organizationId: isSet(object.organizationId)
2603
- ? globalThis.String(object.organizationId)
2604
- : isSet(object.organization_id)
2605
- ? globalThis.String(object.organization_id)
2606
- : "",
2607
- };
2608
- },
2609
-
2610
- toJSON(message: CreateRuleRequest): unknown {
2611
- const obj: any = {};
2612
- if (message.projectId !== "") {
2613
- obj.projectId = message.projectId;
2614
- }
2615
- if (message.name !== "") {
2616
- obj.name = message.name;
2617
- }
2618
- if (message.description !== "") {
2619
- obj.description = message.description;
2620
- }
2621
- if (message.integrationIds?.length) {
2622
- obj.integrationIds = message.integrationIds;
2623
- }
2624
- if (message.celExpression !== "") {
2625
- obj.celExpression = message.celExpression;
2626
- }
2627
- if (message.organizationId !== "") {
2628
- obj.organizationId = message.organizationId;
2629
- }
2630
- return obj;
2631
- },
2632
-
2633
- create<I extends Exact<DeepPartial<CreateRuleRequest>, I>>(base?: I): CreateRuleRequest {
2634
- return CreateRuleRequest.fromPartial(base ?? ({} as any));
2635
- },
2636
- fromPartial<I extends Exact<DeepPartial<CreateRuleRequest>, I>>(object: I): CreateRuleRequest {
2637
- const message = createBaseCreateRuleRequest();
2638
- message.projectId = object.projectId ?? "";
2639
- message.name = object.name ?? "";
2640
- message.description = object.description ?? "";
2641
- message.integrationIds = object.integrationIds?.map((e) => e) || [];
2642
- message.celExpression = object.celExpression ?? "";
2643
- message.organizationId = object.organizationId ?? "";
2644
- return message;
2645
- },
2646
- };
2647
-
2648
- function createBaseCreateRuleResponse(): CreateRuleResponse {
2649
- return { status: undefined, rule: undefined };
2650
- }
2651
-
2652
- export const CreateRuleResponse: MessageFns<CreateRuleResponse> = {
2653
- encode(message: CreateRuleResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2654
- if (message.status !== undefined) {
2655
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2656
- }
2657
- if (message.rule !== undefined) {
2658
- Rule.encode(message.rule, writer.uint32(18).fork()).join();
2659
- }
2660
- return writer;
2661
- },
2662
-
2663
- decode(input: BinaryReader | Uint8Array, length?: number): CreateRuleResponse {
2664
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2665
- const end = length === undefined ? reader.len : reader.pos + length;
2666
- const message = createBaseCreateRuleResponse();
2667
- while (reader.pos < end) {
2668
- const tag = reader.uint32();
2669
- switch (tag >>> 3) {
2670
- case 1: {
2671
- if (tag !== 10) {
2672
- break;
2673
- }
2674
-
2675
- message.status = ResponseStatus.decode(reader, reader.uint32());
2676
- continue;
2677
- }
2678
- case 2: {
2679
- if (tag !== 18) {
2680
- break;
2681
- }
2682
-
2683
- message.rule = Rule.decode(reader, reader.uint32());
2684
- continue;
2685
- }
2686
- }
2687
- if ((tag & 7) === 4 || tag === 0) {
2688
- break;
2689
- }
2690
- reader.skip(tag & 7);
2691
- }
2692
- return message;
2693
- },
2694
-
2695
- fromJSON(object: any): CreateRuleResponse {
2696
- return {
2697
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
2698
- rule: isSet(object.rule) ? Rule.fromJSON(object.rule) : undefined,
2699
- };
2700
- },
2701
-
2702
- toJSON(message: CreateRuleResponse): unknown {
2703
- const obj: any = {};
2704
- if (message.status !== undefined) {
2705
- obj.status = ResponseStatus.toJSON(message.status);
2706
- }
2707
- if (message.rule !== undefined) {
2708
- obj.rule = Rule.toJSON(message.rule);
2709
- }
2710
- return obj;
2711
- },
2712
-
2713
- create<I extends Exact<DeepPartial<CreateRuleResponse>, I>>(base?: I): CreateRuleResponse {
2714
- return CreateRuleResponse.fromPartial(base ?? ({} as any));
2715
- },
2716
- fromPartial<I extends Exact<DeepPartial<CreateRuleResponse>, I>>(object: I): CreateRuleResponse {
2717
- const message = createBaseCreateRuleResponse();
2718
- message.status = (object.status !== undefined && object.status !== null)
2719
- ? ResponseStatus.fromPartial(object.status)
2720
- : undefined;
2721
- message.rule = (object.rule !== undefined && object.rule !== null) ? Rule.fromPartial(object.rule) : undefined;
2722
- return message;
2723
- },
2724
- };
2725
-
2726
- function createBaseGetRuleRequest(): GetRuleRequest {
2727
- return { projectId: "", ruleId: "", organizationId: "" };
2728
- }
2729
-
2730
- export const GetRuleRequest: MessageFns<GetRuleRequest> = {
2731
- encode(message: GetRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2732
- if (message.projectId !== "") {
2733
- writer.uint32(10).string(message.projectId);
2734
- }
2735
- if (message.ruleId !== "") {
2736
- writer.uint32(18).string(message.ruleId);
2737
- }
2738
- if (message.organizationId !== "") {
2739
- writer.uint32(26).string(message.organizationId);
2740
- }
2741
- return writer;
2742
- },
2743
-
2744
- decode(input: BinaryReader | Uint8Array, length?: number): GetRuleRequest {
2745
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2746
- const end = length === undefined ? reader.len : reader.pos + length;
2747
- const message = createBaseGetRuleRequest();
2748
- while (reader.pos < end) {
2749
- const tag = reader.uint32();
2750
- switch (tag >>> 3) {
2751
- case 1: {
2752
- if (tag !== 10) {
2753
- break;
2754
- }
2755
-
2756
- message.projectId = reader.string();
2757
- continue;
2758
- }
2759
- case 2: {
2760
- if (tag !== 18) {
2761
- break;
2762
- }
2763
-
2764
- message.ruleId = reader.string();
2765
- continue;
2766
- }
2767
- case 3: {
2768
- if (tag !== 26) {
2769
- break;
2770
- }
2771
-
2772
- message.organizationId = reader.string();
2773
- continue;
2774
- }
2775
- }
2776
- if ((tag & 7) === 4 || tag === 0) {
2777
- break;
2778
- }
2779
- reader.skip(tag & 7);
2780
- }
2781
- return message;
2782
- },
2783
-
2784
- fromJSON(object: any): GetRuleRequest {
2785
- return {
2786
- projectId: isSet(object.projectId)
2787
- ? globalThis.String(object.projectId)
2788
- : isSet(object.project_id)
2789
- ? globalThis.String(object.project_id)
2790
- : "",
2791
- ruleId: isSet(object.ruleId)
2792
- ? globalThis.String(object.ruleId)
2793
- : isSet(object.rule_id)
2794
- ? globalThis.String(object.rule_id)
2795
- : "",
2796
- organizationId: isSet(object.organizationId)
2797
- ? globalThis.String(object.organizationId)
2798
- : isSet(object.organization_id)
2799
- ? globalThis.String(object.organization_id)
2800
- : "",
2801
- };
2802
- },
2803
-
2804
- toJSON(message: GetRuleRequest): unknown {
2805
- const obj: any = {};
2806
- if (message.projectId !== "") {
2807
- obj.projectId = message.projectId;
2808
- }
2809
- if (message.ruleId !== "") {
2810
- obj.ruleId = message.ruleId;
2811
- }
2812
- if (message.organizationId !== "") {
2813
- obj.organizationId = message.organizationId;
2814
- }
2815
- return obj;
2816
- },
2817
-
2818
- create<I extends Exact<DeepPartial<GetRuleRequest>, I>>(base?: I): GetRuleRequest {
2819
- return GetRuleRequest.fromPartial(base ?? ({} as any));
2820
- },
2821
- fromPartial<I extends Exact<DeepPartial<GetRuleRequest>, I>>(object: I): GetRuleRequest {
2822
- const message = createBaseGetRuleRequest();
2823
- message.projectId = object.projectId ?? "";
2824
- message.ruleId = object.ruleId ?? "";
2825
- message.organizationId = object.organizationId ?? "";
2826
- return message;
2827
- },
2828
- };
2829
-
2830
- function createBaseGetRuleResponse(): GetRuleResponse {
2831
- return { status: undefined, rule: undefined };
2832
- }
2833
-
2834
- export const GetRuleResponse: MessageFns<GetRuleResponse> = {
2835
- encode(message: GetRuleResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2836
- if (message.status !== undefined) {
2837
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
2838
- }
2839
- if (message.rule !== undefined) {
2840
- Rule.encode(message.rule, writer.uint32(18).fork()).join();
2841
- }
2842
- return writer;
2843
- },
2844
-
2845
- decode(input: BinaryReader | Uint8Array, length?: number): GetRuleResponse {
2846
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2847
- const end = length === undefined ? reader.len : reader.pos + length;
2848
- const message = createBaseGetRuleResponse();
2849
- while (reader.pos < end) {
2850
- const tag = reader.uint32();
2851
- switch (tag >>> 3) {
2852
- case 1: {
2853
- if (tag !== 10) {
2854
- break;
2855
- }
2856
-
2857
- message.status = ResponseStatus.decode(reader, reader.uint32());
2858
- continue;
2859
- }
2860
- case 2: {
2861
- if (tag !== 18) {
2862
- break;
2863
- }
2864
-
2865
- message.rule = Rule.decode(reader, reader.uint32());
2866
- continue;
2867
- }
2868
- }
2869
- if ((tag & 7) === 4 || tag === 0) {
2870
- break;
2871
- }
2872
- reader.skip(tag & 7);
2873
- }
2874
- return message;
2875
- },
2876
-
2877
- fromJSON(object: any): GetRuleResponse {
2878
- return {
2879
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
2880
- rule: isSet(object.rule) ? Rule.fromJSON(object.rule) : undefined,
2881
- };
2882
- },
2883
-
2884
- toJSON(message: GetRuleResponse): unknown {
2885
- const obj: any = {};
2886
- if (message.status !== undefined) {
2887
- obj.status = ResponseStatus.toJSON(message.status);
2888
- }
2889
- if (message.rule !== undefined) {
2890
- obj.rule = Rule.toJSON(message.rule);
2891
- }
2892
- return obj;
2893
- },
2894
-
2895
- create<I extends Exact<DeepPartial<GetRuleResponse>, I>>(base?: I): GetRuleResponse {
2896
- return GetRuleResponse.fromPartial(base ?? ({} as any));
2897
- },
2898
- fromPartial<I extends Exact<DeepPartial<GetRuleResponse>, I>>(object: I): GetRuleResponse {
2899
- const message = createBaseGetRuleResponse();
2900
- message.status = (object.status !== undefined && object.status !== null)
2901
- ? ResponseStatus.fromPartial(object.status)
2902
- : undefined;
2903
- message.rule = (object.rule !== undefined && object.rule !== null) ? Rule.fromPartial(object.rule) : undefined;
2904
- return message;
2905
- },
2906
- };
2907
-
2908
- function createBaseListRulesRequest(): ListRulesRequest {
2909
- return { organizationId: "", organizationIdFilter: undefined, projectIdFilter: undefined };
2910
- }
2911
-
2912
- export const ListRulesRequest: MessageFns<ListRulesRequest> = {
2913
- encode(message: ListRulesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2914
- if (message.organizationId !== "") {
2915
- writer.uint32(10).string(message.organizationId);
2916
- }
2917
- if (message.organizationIdFilter !== undefined) {
2918
- writer.uint32(18).string(message.organizationIdFilter);
2919
- }
2920
- if (message.projectIdFilter !== undefined) {
2921
- writer.uint32(26).string(message.projectIdFilter);
2922
- }
2923
- return writer;
2924
- },
2925
-
2926
- decode(input: BinaryReader | Uint8Array, length?: number): ListRulesRequest {
2927
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
2928
- const end = length === undefined ? reader.len : reader.pos + length;
2929
- const message = createBaseListRulesRequest();
2930
- while (reader.pos < end) {
2931
- const tag = reader.uint32();
2932
- switch (tag >>> 3) {
2933
- case 1: {
2934
- if (tag !== 10) {
2935
- break;
2936
- }
2937
-
2938
- message.organizationId = reader.string();
2939
- continue;
2940
- }
2941
- case 2: {
2942
- if (tag !== 18) {
2943
- break;
2944
- }
2945
-
2946
- message.organizationIdFilter = reader.string();
2947
- continue;
2948
- }
2949
- case 3: {
2950
- if (tag !== 26) {
2951
- break;
2952
- }
2953
-
2954
- message.projectIdFilter = reader.string();
2955
- continue;
2956
- }
2957
- }
2958
- if ((tag & 7) === 4 || tag === 0) {
2959
- break;
2960
- }
2961
- reader.skip(tag & 7);
2962
- }
2963
- return message;
2964
- },
2965
-
2966
- fromJSON(object: any): ListRulesRequest {
2967
- return {
2968
- organizationId: isSet(object.organizationId)
2969
- ? globalThis.String(object.organizationId)
2970
- : isSet(object.organization_id)
2971
- ? globalThis.String(object.organization_id)
2972
- : "",
2973
- organizationIdFilter: isSet(object.organizationIdFilter)
2974
- ? globalThis.String(object.organizationIdFilter)
2975
- : isSet(object.organization_id_filter)
2976
- ? globalThis.String(object.organization_id_filter)
2977
- : undefined,
2978
- projectIdFilter: isSet(object.projectIdFilter)
2979
- ? globalThis.String(object.projectIdFilter)
2980
- : isSet(object.project_id_filter)
2981
- ? globalThis.String(object.project_id_filter)
2982
- : undefined,
2983
- };
2984
- },
2985
-
2986
- toJSON(message: ListRulesRequest): unknown {
2987
- const obj: any = {};
2988
- if (message.organizationId !== "") {
2989
- obj.organizationId = message.organizationId;
2990
- }
2991
- if (message.organizationIdFilter !== undefined) {
2992
- obj.organizationIdFilter = message.organizationIdFilter;
2993
- }
2994
- if (message.projectIdFilter !== undefined) {
2995
- obj.projectIdFilter = message.projectIdFilter;
2996
- }
2997
- return obj;
2998
- },
2999
-
3000
- create<I extends Exact<DeepPartial<ListRulesRequest>, I>>(base?: I): ListRulesRequest {
3001
- return ListRulesRequest.fromPartial(base ?? ({} as any));
3002
- },
3003
- fromPartial<I extends Exact<DeepPartial<ListRulesRequest>, I>>(object: I): ListRulesRequest {
3004
- const message = createBaseListRulesRequest();
3005
- message.organizationId = object.organizationId ?? "";
3006
- message.organizationIdFilter = object.organizationIdFilter ?? undefined;
3007
- message.projectIdFilter = object.projectIdFilter ?? undefined;
3008
- return message;
3009
- },
3010
- };
3011
-
3012
- function createBaseListRulesResponse(): ListRulesResponse {
3013
- return { status: undefined, rules: [] };
3014
- }
3015
-
3016
- export const ListRulesResponse: MessageFns<ListRulesResponse> = {
3017
- encode(message: ListRulesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3018
- if (message.status !== undefined) {
3019
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
3020
- }
3021
- for (const v of message.rules) {
3022
- Rule.encode(v!, writer.uint32(18).fork()).join();
3023
- }
3024
- return writer;
3025
- },
3026
-
3027
- decode(input: BinaryReader | Uint8Array, length?: number): ListRulesResponse {
3028
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3029
- const end = length === undefined ? reader.len : reader.pos + length;
3030
- const message = createBaseListRulesResponse();
3031
- while (reader.pos < end) {
3032
- const tag = reader.uint32();
3033
- switch (tag >>> 3) {
3034
- case 1: {
3035
- if (tag !== 10) {
3036
- break;
3037
- }
3038
-
3039
- message.status = ResponseStatus.decode(reader, reader.uint32());
3040
- continue;
3041
- }
3042
- case 2: {
3043
- if (tag !== 18) {
3044
- break;
3045
- }
3046
-
3047
- message.rules.push(Rule.decode(reader, reader.uint32()));
3048
- continue;
3049
- }
3050
- }
3051
- if ((tag & 7) === 4 || tag === 0) {
3052
- break;
3053
- }
3054
- reader.skip(tag & 7);
3055
- }
3056
- return message;
3057
- },
3058
-
3059
- fromJSON(object: any): ListRulesResponse {
3060
- return {
3061
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
3062
- rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e: any) => Rule.fromJSON(e)) : [],
3063
- };
3064
- },
3065
-
3066
- toJSON(message: ListRulesResponse): unknown {
3067
- const obj: any = {};
3068
- if (message.status !== undefined) {
3069
- obj.status = ResponseStatus.toJSON(message.status);
3070
- }
3071
- if (message.rules?.length) {
3072
- obj.rules = message.rules.map((e) => Rule.toJSON(e));
3073
- }
3074
- return obj;
3075
- },
3076
-
3077
- create<I extends Exact<DeepPartial<ListRulesResponse>, I>>(base?: I): ListRulesResponse {
3078
- return ListRulesResponse.fromPartial(base ?? ({} as any));
3079
- },
3080
- fromPartial<I extends Exact<DeepPartial<ListRulesResponse>, I>>(object: I): ListRulesResponse {
3081
- const message = createBaseListRulesResponse();
3082
- message.status = (object.status !== undefined && object.status !== null)
3083
- ? ResponseStatus.fromPartial(object.status)
3084
- : undefined;
3085
- message.rules = object.rules?.map((e) => Rule.fromPartial(e)) || [];
3086
- return message;
3087
- },
3088
- };
3089
-
3090
- function createBaseUpdateRuleRequest(): UpdateRuleRequest {
3091
- return { projectId: "", ruleId: "", updates: undefined, organizationId: "" };
3092
- }
3093
-
3094
- export const UpdateRuleRequest: MessageFns<UpdateRuleRequest> = {
3095
- encode(message: UpdateRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3096
- if (message.projectId !== "") {
3097
- writer.uint32(10).string(message.projectId);
3098
- }
3099
- if (message.ruleId !== "") {
3100
- writer.uint32(18).string(message.ruleId);
3101
- }
3102
- if (message.updates !== undefined) {
3103
- UpdateRuleRequest_RuleUpdates.encode(message.updates, writer.uint32(26).fork()).join();
3104
- }
3105
- if (message.organizationId !== "") {
3106
- writer.uint32(34).string(message.organizationId);
3107
- }
3108
- return writer;
3109
- },
3110
-
3111
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateRuleRequest {
3112
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3113
- const end = length === undefined ? reader.len : reader.pos + length;
3114
- const message = createBaseUpdateRuleRequest();
3115
- while (reader.pos < end) {
3116
- const tag = reader.uint32();
3117
- switch (tag >>> 3) {
3118
- case 1: {
3119
- if (tag !== 10) {
3120
- break;
3121
- }
3122
-
3123
- message.projectId = reader.string();
3124
- continue;
3125
- }
3126
- case 2: {
3127
- if (tag !== 18) {
3128
- break;
3129
- }
3130
-
3131
- message.ruleId = reader.string();
3132
- continue;
3133
- }
3134
- case 3: {
3135
- if (tag !== 26) {
3136
- break;
3137
- }
3138
-
3139
- message.updates = UpdateRuleRequest_RuleUpdates.decode(reader, reader.uint32());
3140
- continue;
3141
- }
3142
- case 4: {
3143
- if (tag !== 34) {
3144
- break;
3145
- }
3146
-
3147
- message.organizationId = reader.string();
3148
- continue;
3149
- }
3150
- }
3151
- if ((tag & 7) === 4 || tag === 0) {
3152
- break;
3153
- }
3154
- reader.skip(tag & 7);
3155
- }
3156
- return message;
3157
- },
3158
-
3159
- fromJSON(object: any): UpdateRuleRequest {
3160
- return {
3161
- projectId: isSet(object.projectId)
3162
- ? globalThis.String(object.projectId)
3163
- : isSet(object.project_id)
3164
- ? globalThis.String(object.project_id)
3165
- : "",
3166
- ruleId: isSet(object.ruleId)
3167
- ? globalThis.String(object.ruleId)
3168
- : isSet(object.rule_id)
3169
- ? globalThis.String(object.rule_id)
3170
- : "",
3171
- updates: isSet(object.updates) ? UpdateRuleRequest_RuleUpdates.fromJSON(object.updates) : undefined,
3172
- organizationId: isSet(object.organizationId)
3173
- ? globalThis.String(object.organizationId)
3174
- : isSet(object.organization_id)
3175
- ? globalThis.String(object.organization_id)
3176
- : "",
3177
- };
3178
- },
3179
-
3180
- toJSON(message: UpdateRuleRequest): unknown {
3181
- const obj: any = {};
3182
- if (message.projectId !== "") {
3183
- obj.projectId = message.projectId;
3184
- }
3185
- if (message.ruleId !== "") {
3186
- obj.ruleId = message.ruleId;
3187
- }
3188
- if (message.updates !== undefined) {
3189
- obj.updates = UpdateRuleRequest_RuleUpdates.toJSON(message.updates);
3190
- }
3191
- if (message.organizationId !== "") {
3192
- obj.organizationId = message.organizationId;
3193
- }
3194
- return obj;
3195
- },
3196
-
3197
- create<I extends Exact<DeepPartial<UpdateRuleRequest>, I>>(base?: I): UpdateRuleRequest {
3198
- return UpdateRuleRequest.fromPartial(base ?? ({} as any));
3199
- },
3200
- fromPartial<I extends Exact<DeepPartial<UpdateRuleRequest>, I>>(object: I): UpdateRuleRequest {
3201
- const message = createBaseUpdateRuleRequest();
3202
- message.projectId = object.projectId ?? "";
3203
- message.ruleId = object.ruleId ?? "";
3204
- message.updates = (object.updates !== undefined && object.updates !== null)
3205
- ? UpdateRuleRequest_RuleUpdates.fromPartial(object.updates)
3206
- : undefined;
3207
- message.organizationId = object.organizationId ?? "";
3208
- return message;
3209
- },
3210
- };
3211
-
3212
- function createBaseUpdateRuleRequest_IntegrationIds(): UpdateRuleRequest_IntegrationIds {
3213
- return { ids: [] };
3214
- }
3215
-
3216
- export const UpdateRuleRequest_IntegrationIds: MessageFns<UpdateRuleRequest_IntegrationIds> = {
3217
- encode(message: UpdateRuleRequest_IntegrationIds, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3218
- for (const v of message.ids) {
3219
- writer.uint32(10).string(v!);
3220
- }
3221
- return writer;
3222
- },
3223
-
3224
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateRuleRequest_IntegrationIds {
3225
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3226
- const end = length === undefined ? reader.len : reader.pos + length;
3227
- const message = createBaseUpdateRuleRequest_IntegrationIds();
3228
- while (reader.pos < end) {
3229
- const tag = reader.uint32();
3230
- switch (tag >>> 3) {
3231
- case 1: {
3232
- if (tag !== 10) {
3233
- break;
3234
- }
3235
-
3236
- message.ids.push(reader.string());
3237
- continue;
3238
- }
3239
- }
3240
- if ((tag & 7) === 4 || tag === 0) {
3241
- break;
3242
- }
3243
- reader.skip(tag & 7);
3244
- }
3245
- return message;
3246
- },
3247
-
3248
- fromJSON(object: any): UpdateRuleRequest_IntegrationIds {
3249
- return { ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.String(e)) : [] };
3250
- },
3251
-
3252
- toJSON(message: UpdateRuleRequest_IntegrationIds): unknown {
3253
- const obj: any = {};
3254
- if (message.ids?.length) {
3255
- obj.ids = message.ids;
3256
- }
3257
- return obj;
3258
- },
3259
-
3260
- create<I extends Exact<DeepPartial<UpdateRuleRequest_IntegrationIds>, I>>(
3261
- base?: I,
3262
- ): UpdateRuleRequest_IntegrationIds {
3263
- return UpdateRuleRequest_IntegrationIds.fromPartial(base ?? ({} as any));
3264
- },
3265
- fromPartial<I extends Exact<DeepPartial<UpdateRuleRequest_IntegrationIds>, I>>(
3266
- object: I,
3267
- ): UpdateRuleRequest_IntegrationIds {
3268
- const message = createBaseUpdateRuleRequest_IntegrationIds();
3269
- message.ids = object.ids?.map((e) => e) || [];
3270
- return message;
3271
- },
3272
- };
3273
-
3274
- function createBaseUpdateRuleRequest_CelExpression(): UpdateRuleRequest_CelExpression {
3275
- return { celExpression: "" };
3276
- }
3277
-
3278
- export const UpdateRuleRequest_CelExpression: MessageFns<UpdateRuleRequest_CelExpression> = {
3279
- encode(message: UpdateRuleRequest_CelExpression, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3280
- if (message.celExpression !== "") {
3281
- writer.uint32(10).string(message.celExpression);
3282
- }
3283
- return writer;
3284
- },
3285
-
3286
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateRuleRequest_CelExpression {
3287
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3288
- const end = length === undefined ? reader.len : reader.pos + length;
3289
- const message = createBaseUpdateRuleRequest_CelExpression();
3290
- while (reader.pos < end) {
3291
- const tag = reader.uint32();
3292
- switch (tag >>> 3) {
3293
- case 1: {
3294
- if (tag !== 10) {
3295
- break;
3296
- }
3297
-
3298
- message.celExpression = reader.string();
3299
- continue;
3300
- }
3301
- }
3302
- if ((tag & 7) === 4 || tag === 0) {
3303
- break;
3304
- }
3305
- reader.skip(tag & 7);
3306
- }
3307
- return message;
3308
- },
3309
-
3310
- fromJSON(object: any): UpdateRuleRequest_CelExpression {
3311
- return {
3312
- celExpression: isSet(object.celExpression)
3313
- ? globalThis.String(object.celExpression)
3314
- : isSet(object.cel_expression)
3315
- ? globalThis.String(object.cel_expression)
3316
- : "",
3317
- };
3318
- },
3319
-
3320
- toJSON(message: UpdateRuleRequest_CelExpression): unknown {
3321
- const obj: any = {};
3322
- if (message.celExpression !== "") {
3323
- obj.celExpression = message.celExpression;
3324
- }
3325
- return obj;
3326
- },
3327
-
3328
- create<I extends Exact<DeepPartial<UpdateRuleRequest_CelExpression>, I>>(base?: I): UpdateRuleRequest_CelExpression {
3329
- return UpdateRuleRequest_CelExpression.fromPartial(base ?? ({} as any));
3330
- },
3331
- fromPartial<I extends Exact<DeepPartial<UpdateRuleRequest_CelExpression>, I>>(
3332
- object: I,
3333
- ): UpdateRuleRequest_CelExpression {
3334
- const message = createBaseUpdateRuleRequest_CelExpression();
3335
- message.celExpression = object.celExpression ?? "";
3336
- return message;
3337
- },
3338
- };
3339
-
3340
- function createBaseUpdateRuleRequest_RuleUpdates(): UpdateRuleRequest_RuleUpdates {
3341
- return {
3342
- name: undefined,
3343
- description: undefined,
3344
- enabled: undefined,
3345
- integrationIds: undefined,
3346
- celExpression: undefined,
3347
- };
3348
- }
3349
-
3350
- export const UpdateRuleRequest_RuleUpdates: MessageFns<UpdateRuleRequest_RuleUpdates> = {
3351
- encode(message: UpdateRuleRequest_RuleUpdates, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3352
- if (message.name !== undefined) {
3353
- writer.uint32(10).string(message.name);
3354
- }
3355
- if (message.description !== undefined) {
3356
- writer.uint32(18).string(message.description);
3357
- }
3358
- if (message.enabled !== undefined) {
3359
- writer.uint32(24).int32(message.enabled);
3360
- }
3361
- if (message.integrationIds !== undefined) {
3362
- UpdateRuleRequest_IntegrationIds.encode(message.integrationIds, writer.uint32(34).fork()).join();
3363
- }
3364
- if (message.celExpression !== undefined) {
3365
- UpdateRuleRequest_CelExpression.encode(message.celExpression, writer.uint32(42).fork()).join();
3366
- }
3367
- return writer;
3368
- },
3369
-
3370
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateRuleRequest_RuleUpdates {
3371
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3372
- const end = length === undefined ? reader.len : reader.pos + length;
3373
- const message = createBaseUpdateRuleRequest_RuleUpdates();
3374
- while (reader.pos < end) {
3375
- const tag = reader.uint32();
3376
- switch (tag >>> 3) {
3377
- case 1: {
3378
- if (tag !== 10) {
3379
- break;
3380
- }
3381
-
3382
- message.name = reader.string();
3383
- continue;
3384
- }
3385
- case 2: {
3386
- if (tag !== 18) {
3387
- break;
3388
- }
3389
-
3390
- message.description = reader.string();
3391
- continue;
3392
- }
3393
- case 3: {
3394
- if (tag !== 24) {
3395
- break;
3396
- }
3397
-
3398
- message.enabled = reader.int32() as any;
3399
- continue;
3400
- }
3401
- case 4: {
3402
- if (tag !== 34) {
3403
- break;
3404
- }
3405
-
3406
- message.integrationIds = UpdateRuleRequest_IntegrationIds.decode(reader, reader.uint32());
3407
- continue;
3408
- }
3409
- case 5: {
3410
- if (tag !== 42) {
3411
- break;
3412
- }
3413
-
3414
- message.celExpression = UpdateRuleRequest_CelExpression.decode(reader, reader.uint32());
3415
- continue;
3416
- }
3417
- }
3418
- if ((tag & 7) === 4 || tag === 0) {
3419
- break;
3420
- }
3421
- reader.skip(tag & 7);
3422
- }
3423
- return message;
3424
- },
3425
-
3426
- fromJSON(object: any): UpdateRuleRequest_RuleUpdates {
3427
- return {
3428
- name: isSet(object.name) ? globalThis.String(object.name) : undefined,
3429
- description: isSet(object.description) ? globalThis.String(object.description) : undefined,
3430
- enabled: isSet(object.enabled) ? enabledStatusFromJSON(object.enabled) : undefined,
3431
- integrationIds: isSet(object.integrationIds)
3432
- ? UpdateRuleRequest_IntegrationIds.fromJSON(object.integrationIds)
3433
- : isSet(object.integration_ids)
3434
- ? UpdateRuleRequest_IntegrationIds.fromJSON(object.integration_ids)
3435
- : undefined,
3436
- celExpression: isSet(object.celExpression)
3437
- ? UpdateRuleRequest_CelExpression.fromJSON(object.celExpression)
3438
- : isSet(object.cel_expression)
3439
- ? UpdateRuleRequest_CelExpression.fromJSON(object.cel_expression)
3440
- : undefined,
3441
- };
3442
- },
3443
-
3444
- toJSON(message: UpdateRuleRequest_RuleUpdates): unknown {
3445
- const obj: any = {};
3446
- if (message.name !== undefined) {
3447
- obj.name = message.name;
3448
- }
3449
- if (message.description !== undefined) {
3450
- obj.description = message.description;
3451
- }
3452
- if (message.enabled !== undefined) {
3453
- obj.enabled = enabledStatusToJSON(message.enabled);
3454
- }
3455
- if (message.integrationIds !== undefined) {
3456
- obj.integrationIds = UpdateRuleRequest_IntegrationIds.toJSON(message.integrationIds);
3457
- }
3458
- if (message.celExpression !== undefined) {
3459
- obj.celExpression = UpdateRuleRequest_CelExpression.toJSON(message.celExpression);
3460
- }
3461
- return obj;
3462
- },
3463
-
3464
- create<I extends Exact<DeepPartial<UpdateRuleRequest_RuleUpdates>, I>>(base?: I): UpdateRuleRequest_RuleUpdates {
3465
- return UpdateRuleRequest_RuleUpdates.fromPartial(base ?? ({} as any));
3466
- },
3467
- fromPartial<I extends Exact<DeepPartial<UpdateRuleRequest_RuleUpdates>, I>>(
3468
- object: I,
3469
- ): UpdateRuleRequest_RuleUpdates {
3470
- const message = createBaseUpdateRuleRequest_RuleUpdates();
3471
- message.name = object.name ?? undefined;
3472
- message.description = object.description ?? undefined;
3473
- message.enabled = object.enabled ?? undefined;
3474
- message.integrationIds = (object.integrationIds !== undefined && object.integrationIds !== null)
3475
- ? UpdateRuleRequest_IntegrationIds.fromPartial(object.integrationIds)
3476
- : undefined;
3477
- message.celExpression = (object.celExpression !== undefined && object.celExpression !== null)
3478
- ? UpdateRuleRequest_CelExpression.fromPartial(object.celExpression)
3479
- : undefined;
3480
- return message;
3481
- },
3482
- };
3483
-
3484
- function createBaseUpdateRuleResponse(): UpdateRuleResponse {
3485
- return { status: undefined, rule: undefined };
3486
- }
3487
-
3488
- export const UpdateRuleResponse: MessageFns<UpdateRuleResponse> = {
3489
- encode(message: UpdateRuleResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3490
- if (message.status !== undefined) {
3491
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
3492
- }
3493
- if (message.rule !== undefined) {
3494
- Rule.encode(message.rule, writer.uint32(18).fork()).join();
3495
- }
3496
- return writer;
3497
- },
3498
-
3499
- decode(input: BinaryReader | Uint8Array, length?: number): UpdateRuleResponse {
3500
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3501
- const end = length === undefined ? reader.len : reader.pos + length;
3502
- const message = createBaseUpdateRuleResponse();
3503
- while (reader.pos < end) {
3504
- const tag = reader.uint32();
3505
- switch (tag >>> 3) {
3506
- case 1: {
3507
- if (tag !== 10) {
3508
- break;
3509
- }
3510
-
3511
- message.status = ResponseStatus.decode(reader, reader.uint32());
3512
- continue;
3513
- }
3514
- case 2: {
3515
- if (tag !== 18) {
3516
- break;
3517
- }
3518
-
3519
- message.rule = Rule.decode(reader, reader.uint32());
3520
- continue;
3521
- }
3522
- }
3523
- if ((tag & 7) === 4 || tag === 0) {
3524
- break;
3525
- }
3526
- reader.skip(tag & 7);
3527
- }
3528
- return message;
3529
- },
3530
-
3531
- fromJSON(object: any): UpdateRuleResponse {
3532
- return {
3533
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
3534
- rule: isSet(object.rule) ? Rule.fromJSON(object.rule) : undefined,
3535
- };
3536
- },
3537
-
3538
- toJSON(message: UpdateRuleResponse): unknown {
3539
- const obj: any = {};
3540
- if (message.status !== undefined) {
3541
- obj.status = ResponseStatus.toJSON(message.status);
3542
- }
3543
- if (message.rule !== undefined) {
3544
- obj.rule = Rule.toJSON(message.rule);
3545
- }
3546
- return obj;
3547
- },
3548
-
3549
- create<I extends Exact<DeepPartial<UpdateRuleResponse>, I>>(base?: I): UpdateRuleResponse {
3550
- return UpdateRuleResponse.fromPartial(base ?? ({} as any));
3551
- },
3552
- fromPartial<I extends Exact<DeepPartial<UpdateRuleResponse>, I>>(object: I): UpdateRuleResponse {
3553
- const message = createBaseUpdateRuleResponse();
3554
- message.status = (object.status !== undefined && object.status !== null)
3555
- ? ResponseStatus.fromPartial(object.status)
3556
- : undefined;
3557
- message.rule = (object.rule !== undefined && object.rule !== null) ? Rule.fromPartial(object.rule) : undefined;
3558
- return message;
3559
- },
3560
- };
3561
-
3562
- function createBaseDeleteRuleRequest(): DeleteRuleRequest {
3563
- return { projectId: "", ruleId: "", organizationId: "" };
3564
- }
3565
-
3566
- export const DeleteRuleRequest: MessageFns<DeleteRuleRequest> = {
3567
- encode(message: DeleteRuleRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3568
- if (message.projectId !== "") {
3569
- writer.uint32(10).string(message.projectId);
3570
- }
3571
- if (message.ruleId !== "") {
3572
- writer.uint32(18).string(message.ruleId);
3573
- }
3574
- if (message.organizationId !== "") {
3575
- writer.uint32(26).string(message.organizationId);
3576
- }
3577
- return writer;
3578
- },
3579
-
3580
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteRuleRequest {
3581
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3582
- const end = length === undefined ? reader.len : reader.pos + length;
3583
- const message = createBaseDeleteRuleRequest();
3584
- while (reader.pos < end) {
3585
- const tag = reader.uint32();
3586
- switch (tag >>> 3) {
3587
- case 1: {
3588
- if (tag !== 10) {
3589
- break;
3590
- }
3591
-
3592
- message.projectId = reader.string();
3593
- continue;
3594
- }
3595
- case 2: {
3596
- if (tag !== 18) {
3597
- break;
3598
- }
3599
-
3600
- message.ruleId = reader.string();
3601
- continue;
3602
- }
3603
- case 3: {
3604
- if (tag !== 26) {
3605
- break;
3606
- }
3607
-
3608
- message.organizationId = reader.string();
3609
- continue;
3610
- }
3611
- }
3612
- if ((tag & 7) === 4 || tag === 0) {
3613
- break;
3614
- }
3615
- reader.skip(tag & 7);
3616
- }
3617
- return message;
3618
- },
3619
-
3620
- fromJSON(object: any): DeleteRuleRequest {
3621
- return {
3622
- projectId: isSet(object.projectId)
3623
- ? globalThis.String(object.projectId)
3624
- : isSet(object.project_id)
3625
- ? globalThis.String(object.project_id)
3626
- : "",
3627
- ruleId: isSet(object.ruleId)
3628
- ? globalThis.String(object.ruleId)
3629
- : isSet(object.rule_id)
3630
- ? globalThis.String(object.rule_id)
3631
- : "",
3632
- organizationId: isSet(object.organizationId)
3633
- ? globalThis.String(object.organizationId)
3634
- : isSet(object.organization_id)
3635
- ? globalThis.String(object.organization_id)
3636
- : "",
3637
- };
3638
- },
3639
-
3640
- toJSON(message: DeleteRuleRequest): unknown {
3641
- const obj: any = {};
3642
- if (message.projectId !== "") {
3643
- obj.projectId = message.projectId;
3644
- }
3645
- if (message.ruleId !== "") {
3646
- obj.ruleId = message.ruleId;
3647
- }
3648
- if (message.organizationId !== "") {
3649
- obj.organizationId = message.organizationId;
3650
- }
3651
- return obj;
3652
- },
3653
-
3654
- create<I extends Exact<DeepPartial<DeleteRuleRequest>, I>>(base?: I): DeleteRuleRequest {
3655
- return DeleteRuleRequest.fromPartial(base ?? ({} as any));
3656
- },
3657
- fromPartial<I extends Exact<DeepPartial<DeleteRuleRequest>, I>>(object: I): DeleteRuleRequest {
3658
- const message = createBaseDeleteRuleRequest();
3659
- message.projectId = object.projectId ?? "";
3660
- message.ruleId = object.ruleId ?? "";
3661
- message.organizationId = object.organizationId ?? "";
3662
- return message;
3663
- },
3664
- };
3665
-
3666
- function createBaseDeleteRuleResponse(): DeleteRuleResponse {
3667
- return { status: undefined };
3668
- }
3669
-
3670
- export const DeleteRuleResponse: MessageFns<DeleteRuleResponse> = {
3671
- encode(message: DeleteRuleResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3672
- if (message.status !== undefined) {
3673
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
3674
- }
3675
- return writer;
3676
- },
3677
-
3678
- decode(input: BinaryReader | Uint8Array, length?: number): DeleteRuleResponse {
3679
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3680
- const end = length === undefined ? reader.len : reader.pos + length;
3681
- const message = createBaseDeleteRuleResponse();
3682
- while (reader.pos < end) {
3683
- const tag = reader.uint32();
3684
- switch (tag >>> 3) {
3685
- case 1: {
3686
- if (tag !== 10) {
3687
- break;
3688
- }
3689
-
3690
- message.status = ResponseStatus.decode(reader, reader.uint32());
3691
- continue;
3692
- }
3693
- }
3694
- if ((tag & 7) === 4 || tag === 0) {
3695
- break;
3696
- }
3697
- reader.skip(tag & 7);
3698
- }
3699
- return message;
3700
- },
3701
-
3702
- fromJSON(object: any): DeleteRuleResponse {
3703
- return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
3704
- },
3705
-
3706
- toJSON(message: DeleteRuleResponse): unknown {
3707
- const obj: any = {};
3708
- if (message.status !== undefined) {
3709
- obj.status = ResponseStatus.toJSON(message.status);
3710
- }
3711
- return obj;
3712
- },
3713
-
3714
- create<I extends Exact<DeepPartial<DeleteRuleResponse>, I>>(base?: I): DeleteRuleResponse {
3715
- return DeleteRuleResponse.fromPartial(base ?? ({} as any));
3716
- },
3717
- fromPartial<I extends Exact<DeepPartial<DeleteRuleResponse>, I>>(object: I): DeleteRuleResponse {
3718
- const message = createBaseDeleteRuleResponse();
3719
- message.status = (object.status !== undefined && object.status !== null)
3720
- ? ResponseStatus.fromPartial(object.status)
3721
- : undefined;
3722
- return message;
3723
- },
3724
- };
3725
-
3726
- function createBaseStreamRuleSimulationRequest(): StreamRuleSimulationRequest {
3727
- return { projectId: "", celExpression: "", limit: 0, organizationId: "" };
3728
- }
3729
-
3730
- export const StreamRuleSimulationRequest: MessageFns<StreamRuleSimulationRequest> = {
3731
- encode(message: StreamRuleSimulationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3732
- if (message.projectId !== "") {
3733
- writer.uint32(10).string(message.projectId);
3734
- }
3735
- if (message.celExpression !== "") {
3736
- writer.uint32(18).string(message.celExpression);
3737
- }
3738
- if (message.limit !== 0) {
3739
- writer.uint32(24).int32(message.limit);
3740
- }
3741
- if (message.organizationId !== "") {
3742
- writer.uint32(34).string(message.organizationId);
3743
- }
3744
- return writer;
3745
- },
3746
-
3747
- decode(input: BinaryReader | Uint8Array, length?: number): StreamRuleSimulationRequest {
3748
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3749
- const end = length === undefined ? reader.len : reader.pos + length;
3750
- const message = createBaseStreamRuleSimulationRequest();
3751
- while (reader.pos < end) {
3752
- const tag = reader.uint32();
3753
- switch (tag >>> 3) {
3754
- case 1: {
3755
- if (tag !== 10) {
3756
- break;
3757
- }
3758
-
3759
- message.projectId = reader.string();
3760
- continue;
3761
- }
3762
- case 2: {
3763
- if (tag !== 18) {
3764
- break;
3765
- }
3766
-
3767
- message.celExpression = reader.string();
3768
- continue;
3769
- }
3770
- case 3: {
3771
- if (tag !== 24) {
3772
- break;
3773
- }
3774
-
3775
- message.limit = reader.int32();
3776
- continue;
3777
- }
3778
- case 4: {
3779
- if (tag !== 34) {
3780
- break;
3781
- }
3782
-
3783
- message.organizationId = reader.string();
3784
- continue;
3785
- }
3786
- }
3787
- if ((tag & 7) === 4 || tag === 0) {
3788
- break;
3789
- }
3790
- reader.skip(tag & 7);
3791
- }
3792
- return message;
3793
- },
3794
-
3795
- fromJSON(object: any): StreamRuleSimulationRequest {
3796
- return {
3797
- projectId: isSet(object.projectId)
3798
- ? globalThis.String(object.projectId)
3799
- : isSet(object.project_id)
3800
- ? globalThis.String(object.project_id)
3801
- : "",
3802
- celExpression: isSet(object.celExpression)
3803
- ? globalThis.String(object.celExpression)
3804
- : isSet(object.cel_expression)
3805
- ? globalThis.String(object.cel_expression)
3806
- : "",
3807
- limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
3808
- organizationId: isSet(object.organizationId)
3809
- ? globalThis.String(object.organizationId)
3810
- : isSet(object.organization_id)
3811
- ? globalThis.String(object.organization_id)
3812
- : "",
3813
- };
3814
- },
3815
-
3816
- toJSON(message: StreamRuleSimulationRequest): unknown {
3817
- const obj: any = {};
3818
- if (message.projectId !== "") {
3819
- obj.projectId = message.projectId;
3820
- }
3821
- if (message.celExpression !== "") {
3822
- obj.celExpression = message.celExpression;
3823
- }
3824
- if (message.limit !== 0) {
3825
- obj.limit = Math.round(message.limit);
3826
- }
3827
- if (message.organizationId !== "") {
3828
- obj.organizationId = message.organizationId;
3829
- }
3830
- return obj;
3831
- },
3832
-
3833
- create<I extends Exact<DeepPartial<StreamRuleSimulationRequest>, I>>(base?: I): StreamRuleSimulationRequest {
3834
- return StreamRuleSimulationRequest.fromPartial(base ?? ({} as any));
3835
- },
3836
- fromPartial<I extends Exact<DeepPartial<StreamRuleSimulationRequest>, I>>(object: I): StreamRuleSimulationRequest {
3837
- const message = createBaseStreamRuleSimulationRequest();
3838
- message.projectId = object.projectId ?? "";
3839
- message.celExpression = object.celExpression ?? "";
3840
- message.limit = object.limit ?? 0;
3841
- message.organizationId = object.organizationId ?? "";
3842
- return message;
3843
- },
3844
- };
3845
-
3846
- function createBaseRuleSimulationMatch(): RuleSimulationMatch {
3847
- return { traceId: "", traceName: "", matchReason: "", createdAt: undefined };
3848
- }
3849
-
3850
- export const RuleSimulationMatch: MessageFns<RuleSimulationMatch> = {
3851
- encode(message: RuleSimulationMatch, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3852
- if (message.traceId !== "") {
3853
- writer.uint32(10).string(message.traceId);
3854
- }
3855
- if (message.traceName !== "") {
3856
- writer.uint32(18).string(message.traceName);
3857
- }
3858
- if (message.matchReason !== "") {
3859
- writer.uint32(26).string(message.matchReason);
3860
- }
3861
- if (message.createdAt !== undefined) {
3862
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(34).fork()).join();
3863
- }
3864
- return writer;
3865
- },
3866
-
3867
- decode(input: BinaryReader | Uint8Array, length?: number): RuleSimulationMatch {
3868
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3869
- const end = length === undefined ? reader.len : reader.pos + length;
3870
- const message = createBaseRuleSimulationMatch();
3871
- while (reader.pos < end) {
3872
- const tag = reader.uint32();
3873
- switch (tag >>> 3) {
3874
- case 1: {
3875
- if (tag !== 10) {
3876
- break;
3877
- }
3878
-
3879
- message.traceId = reader.string();
3880
- continue;
3881
- }
3882
- case 2: {
3883
- if (tag !== 18) {
3884
- break;
3885
- }
3886
-
3887
- message.traceName = reader.string();
3888
- continue;
3889
- }
3890
- case 3: {
3891
- if (tag !== 26) {
3892
- break;
3893
- }
3894
-
3895
- message.matchReason = reader.string();
3896
- continue;
3897
- }
3898
- case 4: {
3899
- if (tag !== 34) {
3900
- break;
3901
- }
3902
-
3903
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3904
- continue;
3905
- }
3906
- }
3907
- if ((tag & 7) === 4 || tag === 0) {
3908
- break;
3909
- }
3910
- reader.skip(tag & 7);
3911
- }
3912
- return message;
3913
- },
3914
-
3915
- fromJSON(object: any): RuleSimulationMatch {
3916
- return {
3917
- traceId: isSet(object.traceId)
3918
- ? globalThis.String(object.traceId)
3919
- : isSet(object.trace_id)
3920
- ? globalThis.String(object.trace_id)
3921
- : "",
3922
- traceName: isSet(object.traceName)
3923
- ? globalThis.String(object.traceName)
3924
- : isSet(object.trace_name)
3925
- ? globalThis.String(object.trace_name)
3926
- : "",
3927
- matchReason: isSet(object.matchReason)
3928
- ? globalThis.String(object.matchReason)
3929
- : isSet(object.match_reason)
3930
- ? globalThis.String(object.match_reason)
3931
- : "",
3932
- createdAt: isSet(object.createdAt)
3933
- ? fromJsonTimestamp(object.createdAt)
3934
- : isSet(object.created_at)
3935
- ? fromJsonTimestamp(object.created_at)
3936
- : undefined,
3937
- };
3938
- },
3939
-
3940
- toJSON(message: RuleSimulationMatch): unknown {
3941
- const obj: any = {};
3942
- if (message.traceId !== "") {
3943
- obj.traceId = message.traceId;
3944
- }
3945
- if (message.traceName !== "") {
3946
- obj.traceName = message.traceName;
3947
- }
3948
- if (message.matchReason !== "") {
3949
- obj.matchReason = message.matchReason;
3950
- }
3951
- if (message.createdAt !== undefined) {
3952
- obj.createdAt = message.createdAt.toISOString();
3953
- }
3954
- return obj;
3955
- },
3956
-
3957
- create<I extends Exact<DeepPartial<RuleSimulationMatch>, I>>(base?: I): RuleSimulationMatch {
3958
- return RuleSimulationMatch.fromPartial(base ?? ({} as any));
3959
- },
3960
- fromPartial<I extends Exact<DeepPartial<RuleSimulationMatch>, I>>(object: I): RuleSimulationMatch {
3961
- const message = createBaseRuleSimulationMatch();
3962
- message.traceId = object.traceId ?? "";
3963
- message.traceName = object.traceName ?? "";
3964
- message.matchReason = object.matchReason ?? "";
3965
- message.createdAt = object.createdAt ?? undefined;
3966
- return message;
3967
- },
3968
- };
3969
-
3970
- function createBaseListRuleSchemasRequest(): ListRuleSchemasRequest {
3971
- return { organizationId: "" };
3972
- }
3973
-
3974
- export const ListRuleSchemasRequest: MessageFns<ListRuleSchemasRequest> = {
3975
- encode(message: ListRuleSchemasRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
3976
- if (message.organizationId !== "") {
3977
- writer.uint32(10).string(message.organizationId);
3978
- }
3979
- return writer;
3980
- },
3981
-
3982
- decode(input: BinaryReader | Uint8Array, length?: number): ListRuleSchemasRequest {
3983
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
3984
- const end = length === undefined ? reader.len : reader.pos + length;
3985
- const message = createBaseListRuleSchemasRequest();
3986
- while (reader.pos < end) {
3987
- const tag = reader.uint32();
3988
- switch (tag >>> 3) {
3989
- case 1: {
3990
- if (tag !== 10) {
3991
- break;
3992
- }
3993
-
3994
- message.organizationId = reader.string();
3995
- continue;
3996
- }
3997
- }
3998
- if ((tag & 7) === 4 || tag === 0) {
3999
- break;
4000
- }
4001
- reader.skip(tag & 7);
4002
- }
4003
- return message;
4004
- },
4005
-
4006
- fromJSON(object: any): ListRuleSchemasRequest {
4007
- return {
4008
- organizationId: isSet(object.organizationId)
4009
- ? globalThis.String(object.organizationId)
4010
- : isSet(object.organization_id)
4011
- ? globalThis.String(object.organization_id)
4012
- : "",
4013
- };
4014
- },
4015
-
4016
- toJSON(message: ListRuleSchemasRequest): unknown {
4017
- const obj: any = {};
4018
- if (message.organizationId !== "") {
4019
- obj.organizationId = message.organizationId;
4020
- }
4021
- return obj;
4022
- },
4023
-
4024
- create<I extends Exact<DeepPartial<ListRuleSchemasRequest>, I>>(base?: I): ListRuleSchemasRequest {
4025
- return ListRuleSchemasRequest.fromPartial(base ?? ({} as any));
4026
- },
4027
- fromPartial<I extends Exact<DeepPartial<ListRuleSchemasRequest>, I>>(object: I): ListRuleSchemasRequest {
4028
- const message = createBaseListRuleSchemasRequest();
4029
- message.organizationId = object.organizationId ?? "";
4030
- return message;
4031
- },
4032
- };
4033
-
4034
- function createBaseListRuleSchemasResponse(): ListRuleSchemasResponse {
4035
- return { status: undefined, schemas: [] };
4036
- }
4037
-
4038
- export const ListRuleSchemasResponse: MessageFns<ListRuleSchemasResponse> = {
4039
- encode(message: ListRuleSchemasResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4040
- if (message.status !== undefined) {
4041
- ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
4042
- }
4043
- for (const v of message.schemas) {
4044
- RuleSchema.encode(v!, writer.uint32(18).fork()).join();
4045
- }
4046
- return writer;
4047
- },
4048
-
4049
- decode(input: BinaryReader | Uint8Array, length?: number): ListRuleSchemasResponse {
4050
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4051
- const end = length === undefined ? reader.len : reader.pos + length;
4052
- const message = createBaseListRuleSchemasResponse();
4053
- while (reader.pos < end) {
4054
- const tag = reader.uint32();
4055
- switch (tag >>> 3) {
4056
- case 1: {
4057
- if (tag !== 10) {
4058
- break;
4059
- }
4060
-
4061
- message.status = ResponseStatus.decode(reader, reader.uint32());
4062
- continue;
4063
- }
4064
- case 2: {
4065
- if (tag !== 18) {
4066
- break;
4067
- }
4068
-
4069
- message.schemas.push(RuleSchema.decode(reader, reader.uint32()));
4070
- continue;
4071
- }
4072
- }
4073
- if ((tag & 7) === 4 || tag === 0) {
4074
- break;
4075
- }
4076
- reader.skip(tag & 7);
4077
- }
4078
- return message;
4079
- },
4080
-
4081
- fromJSON(object: any): ListRuleSchemasResponse {
4082
- return {
4083
- status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
4084
- schemas: globalThis.Array.isArray(object?.schemas) ? object.schemas.map((e: any) => RuleSchema.fromJSON(e)) : [],
4085
- };
4086
- },
4087
-
4088
- toJSON(message: ListRuleSchemasResponse): unknown {
4089
- const obj: any = {};
4090
- if (message.status !== undefined) {
4091
- obj.status = ResponseStatus.toJSON(message.status);
4092
- }
4093
- if (message.schemas?.length) {
4094
- obj.schemas = message.schemas.map((e) => RuleSchema.toJSON(e));
4095
- }
4096
- return obj;
4097
- },
4098
-
4099
- create<I extends Exact<DeepPartial<ListRuleSchemasResponse>, I>>(base?: I): ListRuleSchemasResponse {
4100
- return ListRuleSchemasResponse.fromPartial(base ?? ({} as any));
4101
- },
4102
- fromPartial<I extends Exact<DeepPartial<ListRuleSchemasResponse>, I>>(object: I): ListRuleSchemasResponse {
4103
- const message = createBaseListRuleSchemasResponse();
4104
- message.status = (object.status !== undefined && object.status !== null)
4105
- ? ResponseStatus.fromPartial(object.status)
4106
- : undefined;
4107
- message.schemas = object.schemas?.map((e) => RuleSchema.fromPartial(e)) || [];
4108
- return message;
4109
- },
4110
- };
4111
-
4112
- function createBaseRuleSchema(): RuleSchema {
4113
- return { id: "", label: "", rootVariable: "", jsonSchema: "" };
4114
- }
4115
-
4116
- export const RuleSchema: MessageFns<RuleSchema> = {
4117
- encode(message: RuleSchema, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4118
- if (message.id !== "") {
4119
- writer.uint32(10).string(message.id);
4120
- }
4121
- if (message.label !== "") {
4122
- writer.uint32(18).string(message.label);
4123
- }
4124
- if (message.rootVariable !== "") {
4125
- writer.uint32(26).string(message.rootVariable);
4126
- }
4127
- if (message.jsonSchema !== "") {
4128
- writer.uint32(34).string(message.jsonSchema);
4129
- }
4130
- return writer;
4131
- },
4132
-
4133
- decode(input: BinaryReader | Uint8Array, length?: number): RuleSchema {
4134
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4135
- const end = length === undefined ? reader.len : reader.pos + length;
4136
- const message = createBaseRuleSchema();
4137
- while (reader.pos < end) {
4138
- const tag = reader.uint32();
4139
- switch (tag >>> 3) {
4140
- case 1: {
4141
- if (tag !== 10) {
4142
- break;
4143
- }
4144
-
4145
- message.id = reader.string();
4146
- continue;
4147
- }
4148
- case 2: {
4149
- if (tag !== 18) {
4150
- break;
4151
- }
4152
-
4153
- message.label = reader.string();
4154
- continue;
4155
- }
4156
- case 3: {
4157
- if (tag !== 26) {
4158
- break;
4159
- }
4160
-
4161
- message.rootVariable = reader.string();
4162
- continue;
4163
- }
4164
- case 4: {
4165
- if (tag !== 34) {
4166
- break;
4167
- }
4168
-
4169
- message.jsonSchema = reader.string();
4170
- continue;
4171
- }
4172
- }
4173
- if ((tag & 7) === 4 || tag === 0) {
4174
- break;
4175
- }
4176
- reader.skip(tag & 7);
4177
- }
4178
- return message;
4179
- },
4180
-
4181
- fromJSON(object: any): RuleSchema {
4182
- return {
4183
- id: isSet(object.id) ? globalThis.String(object.id) : "",
4184
- label: isSet(object.label) ? globalThis.String(object.label) : "",
4185
- rootVariable: isSet(object.rootVariable)
4186
- ? globalThis.String(object.rootVariable)
4187
- : isSet(object.root_variable)
4188
- ? globalThis.String(object.root_variable)
4189
- : "",
4190
- jsonSchema: isSet(object.jsonSchema)
4191
- ? globalThis.String(object.jsonSchema)
4192
- : isSet(object.json_schema)
4193
- ? globalThis.String(object.json_schema)
4194
- : "",
4195
- };
4196
- },
4197
-
4198
- toJSON(message: RuleSchema): unknown {
4199
- const obj: any = {};
4200
- if (message.id !== "") {
4201
- obj.id = message.id;
4202
- }
4203
- if (message.label !== "") {
4204
- obj.label = message.label;
4205
- }
4206
- if (message.rootVariable !== "") {
4207
- obj.rootVariable = message.rootVariable;
4208
- }
4209
- if (message.jsonSchema !== "") {
4210
- obj.jsonSchema = message.jsonSchema;
4211
- }
4212
- return obj;
4213
- },
4214
-
4215
- create<I extends Exact<DeepPartial<RuleSchema>, I>>(base?: I): RuleSchema {
4216
- return RuleSchema.fromPartial(base ?? ({} as any));
4217
- },
4218
- fromPartial<I extends Exact<DeepPartial<RuleSchema>, I>>(object: I): RuleSchema {
4219
- const message = createBaseRuleSchema();
4220
- message.id = object.id ?? "";
4221
- message.label = object.label ?? "";
4222
- message.rootVariable = object.rootVariable ?? "";
4223
- message.jsonSchema = object.jsonSchema ?? "";
4224
- return message;
4225
- },
4226
- };
4227
-
4228
- function createBaseStreamRuleMatchesRequest(): StreamRuleMatchesRequest {
4229
- return { projectId: "", organizationId: "", limit: 0 };
4230
- }
4231
-
4232
- export const StreamRuleMatchesRequest: MessageFns<StreamRuleMatchesRequest> = {
4233
- encode(message: StreamRuleMatchesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4234
- if (message.projectId !== "") {
4235
- writer.uint32(10).string(message.projectId);
4236
- }
4237
- if (message.organizationId !== "") {
4238
- writer.uint32(18).string(message.organizationId);
4239
- }
4240
- if (message.limit !== 0) {
4241
- writer.uint32(24).int32(message.limit);
4242
- }
4243
- return writer;
4244
- },
4245
-
4246
- decode(input: BinaryReader | Uint8Array, length?: number): StreamRuleMatchesRequest {
4247
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4248
- const end = length === undefined ? reader.len : reader.pos + length;
4249
- const message = createBaseStreamRuleMatchesRequest();
4250
- while (reader.pos < end) {
4251
- const tag = reader.uint32();
4252
- switch (tag >>> 3) {
4253
- case 1: {
4254
- if (tag !== 10) {
4255
- break;
4256
- }
4257
-
4258
- message.projectId = reader.string();
4259
- continue;
4260
- }
4261
- case 2: {
4262
- if (tag !== 18) {
4263
- break;
4264
- }
4265
-
4266
- message.organizationId = reader.string();
4267
- continue;
4268
- }
4269
- case 3: {
4270
- if (tag !== 24) {
4271
- break;
4272
- }
4273
-
4274
- message.limit = reader.int32();
4275
- continue;
4276
- }
4277
- }
4278
- if ((tag & 7) === 4 || tag === 0) {
4279
- break;
4280
- }
4281
- reader.skip(tag & 7);
4282
- }
4283
- return message;
4284
- },
4285
-
4286
- fromJSON(object: any): StreamRuleMatchesRequest {
4287
- return {
4288
- projectId: isSet(object.projectId)
4289
- ? globalThis.String(object.projectId)
4290
- : isSet(object.project_id)
4291
- ? globalThis.String(object.project_id)
4292
- : "",
4293
- organizationId: isSet(object.organizationId)
4294
- ? globalThis.String(object.organizationId)
4295
- : isSet(object.organization_id)
4296
- ? globalThis.String(object.organization_id)
4297
- : "",
4298
- limit: isSet(object.limit) ? globalThis.Number(object.limit) : 0,
4299
- };
4300
- },
4301
-
4302
- toJSON(message: StreamRuleMatchesRequest): unknown {
4303
- const obj: any = {};
4304
- if (message.projectId !== "") {
4305
- obj.projectId = message.projectId;
4306
- }
4307
- if (message.organizationId !== "") {
4308
- obj.organizationId = message.organizationId;
4309
- }
4310
- if (message.limit !== 0) {
4311
- obj.limit = Math.round(message.limit);
4312
- }
4313
- return obj;
4314
- },
4315
-
4316
- create<I extends Exact<DeepPartial<StreamRuleMatchesRequest>, I>>(base?: I): StreamRuleMatchesRequest {
4317
- return StreamRuleMatchesRequest.fromPartial(base ?? ({} as any));
4318
- },
4319
- fromPartial<I extends Exact<DeepPartial<StreamRuleMatchesRequest>, I>>(object: I): StreamRuleMatchesRequest {
4320
- const message = createBaseStreamRuleMatchesRequest();
4321
- message.projectId = object.projectId ?? "";
4322
- message.organizationId = object.organizationId ?? "";
4323
- message.limit = object.limit ?? 0;
4324
- return message;
4325
- },
4326
- };
4327
-
4328
- function createBaseRuleMatchEnvelope(): RuleMatchEnvelope {
4329
- return { snapshot: undefined, update: undefined };
4330
- }
4331
-
4332
- export const RuleMatchEnvelope: MessageFns<RuleMatchEnvelope> = {
4333
- encode(message: RuleMatchEnvelope, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4334
- if (message.snapshot !== undefined) {
4335
- RuleMatchSnapshot.encode(message.snapshot, writer.uint32(10).fork()).join();
4336
- }
4337
- if (message.update !== undefined) {
4338
- RuleMatchEvent.encode(message.update, writer.uint32(18).fork()).join();
4339
- }
4340
- return writer;
4341
- },
4342
-
4343
- decode(input: BinaryReader | Uint8Array, length?: number): RuleMatchEnvelope {
4344
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4345
- const end = length === undefined ? reader.len : reader.pos + length;
4346
- const message = createBaseRuleMatchEnvelope();
4347
- while (reader.pos < end) {
4348
- const tag = reader.uint32();
4349
- switch (tag >>> 3) {
4350
- case 1: {
4351
- if (tag !== 10) {
4352
- break;
4353
- }
4354
-
4355
- message.snapshot = RuleMatchSnapshot.decode(reader, reader.uint32());
4356
- continue;
4357
- }
4358
- case 2: {
4359
- if (tag !== 18) {
4360
- break;
4361
- }
4362
-
4363
- message.update = RuleMatchEvent.decode(reader, reader.uint32());
4364
- continue;
4365
- }
4366
- }
4367
- if ((tag & 7) === 4 || tag === 0) {
4368
- break;
4369
- }
4370
- reader.skip(tag & 7);
4371
- }
4372
- return message;
4373
- },
4374
-
4375
- fromJSON(object: any): RuleMatchEnvelope {
4376
- return {
4377
- snapshot: isSet(object.snapshot) ? RuleMatchSnapshot.fromJSON(object.snapshot) : undefined,
4378
- update: isSet(object.update) ? RuleMatchEvent.fromJSON(object.update) : undefined,
4379
- };
4380
- },
4381
-
4382
- toJSON(message: RuleMatchEnvelope): unknown {
4383
- const obj: any = {};
4384
- if (message.snapshot !== undefined) {
4385
- obj.snapshot = RuleMatchSnapshot.toJSON(message.snapshot);
4386
- }
4387
- if (message.update !== undefined) {
4388
- obj.update = RuleMatchEvent.toJSON(message.update);
4389
- }
4390
- return obj;
4391
- },
4392
-
4393
- create<I extends Exact<DeepPartial<RuleMatchEnvelope>, I>>(base?: I): RuleMatchEnvelope {
4394
- return RuleMatchEnvelope.fromPartial(base ?? ({} as any));
4395
- },
4396
- fromPartial<I extends Exact<DeepPartial<RuleMatchEnvelope>, I>>(object: I): RuleMatchEnvelope {
4397
- const message = createBaseRuleMatchEnvelope();
4398
- message.snapshot = (object.snapshot !== undefined && object.snapshot !== null)
4399
- ? RuleMatchSnapshot.fromPartial(object.snapshot)
4400
- : undefined;
4401
- message.update = (object.update !== undefined && object.update !== null)
4402
- ? RuleMatchEvent.fromPartial(object.update)
4403
- : undefined;
4404
- return message;
4405
- },
4406
- };
4407
-
4408
- function createBaseRuleMatchSnapshot(): RuleMatchSnapshot {
4409
- return { matches: [] };
4410
- }
4411
-
4412
- export const RuleMatchSnapshot: MessageFns<RuleMatchSnapshot> = {
4413
- encode(message: RuleMatchSnapshot, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4414
- for (const v of message.matches) {
4415
- RuleMatchEvent.encode(v!, writer.uint32(10).fork()).join();
4416
- }
4417
- return writer;
4418
- },
4419
-
4420
- decode(input: BinaryReader | Uint8Array, length?: number): RuleMatchSnapshot {
4421
- const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4422
- const end = length === undefined ? reader.len : reader.pos + length;
4423
- const message = createBaseRuleMatchSnapshot();
4424
- while (reader.pos < end) {
4425
- const tag = reader.uint32();
4426
- switch (tag >>> 3) {
4427
- case 1: {
4428
- if (tag !== 10) {
4429
- break;
4430
- }
4431
-
4432
- message.matches.push(RuleMatchEvent.decode(reader, reader.uint32()));
4433
- continue;
4434
- }
4435
- }
4436
- if ((tag & 7) === 4 || tag === 0) {
4437
- break;
4438
- }
4439
- reader.skip(tag & 7);
4440
- }
4441
- return message;
4442
- },
4443
-
4444
- fromJSON(object: any): RuleMatchSnapshot {
4445
- return {
4446
- matches: globalThis.Array.isArray(object?.matches)
4447
- ? object.matches.map((e: any) => RuleMatchEvent.fromJSON(e))
4448
- : [],
1797
+ ? EmailConfig.fromJSON(object.emailConfig)
1798
+ : isSet(object.email_config)
1799
+ ? EmailConfig.fromJSON(object.email_config)
1800
+ : undefined,
1801
+ pagerdutyConfig: isSet(object.pagerdutyConfig)
1802
+ ? PagerDutyConfig.fromJSON(object.pagerdutyConfig)
1803
+ : isSet(object.pagerduty_config)
1804
+ ? PagerDutyConfig.fromJSON(object.pagerduty_config)
1805
+ : undefined,
4449
1806
  };
4450
1807
  },
4451
1808
 
4452
- toJSON(message: RuleMatchSnapshot): unknown {
1809
+ toJSON(message: UpdateIntegrationRequest_IntegrationUpdates): unknown {
4453
1810
  const obj: any = {};
4454
- if (message.matches?.length) {
4455
- obj.matches = message.matches.map((e) => RuleMatchEvent.toJSON(e));
1811
+ if (message.name !== undefined) {
1812
+ obj.name = message.name;
1813
+ }
1814
+ if (message.enabled !== undefined) {
1815
+ obj.enabled = enabledStatusToJSON(message.enabled);
1816
+ }
1817
+ if (message.webhookConfig !== undefined) {
1818
+ obj.webhookConfig = WebhookConfig.toJSON(message.webhookConfig);
1819
+ }
1820
+ if (message.slackConfig !== undefined) {
1821
+ obj.slackConfig = SlackConfig.toJSON(message.slackConfig);
1822
+ }
1823
+ if (message.emailConfig !== undefined) {
1824
+ obj.emailConfig = EmailConfig.toJSON(message.emailConfig);
1825
+ }
1826
+ if (message.pagerdutyConfig !== undefined) {
1827
+ obj.pagerdutyConfig = PagerDutyConfig.toJSON(message.pagerdutyConfig);
4456
1828
  }
4457
1829
  return obj;
4458
1830
  },
4459
1831
 
4460
- create<I extends Exact<DeepPartial<RuleMatchSnapshot>, I>>(base?: I): RuleMatchSnapshot {
4461
- return RuleMatchSnapshot.fromPartial(base ?? ({} as any));
1832
+ create<I extends Exact<DeepPartial<UpdateIntegrationRequest_IntegrationUpdates>, I>>(
1833
+ base?: I,
1834
+ ): UpdateIntegrationRequest_IntegrationUpdates {
1835
+ return UpdateIntegrationRequest_IntegrationUpdates.fromPartial(base ?? ({} as any));
4462
1836
  },
4463
- fromPartial<I extends Exact<DeepPartial<RuleMatchSnapshot>, I>>(object: I): RuleMatchSnapshot {
4464
- const message = createBaseRuleMatchSnapshot();
4465
- message.matches = object.matches?.map((e) => RuleMatchEvent.fromPartial(e)) || [];
1837
+ fromPartial<I extends Exact<DeepPartial<UpdateIntegrationRequest_IntegrationUpdates>, I>>(
1838
+ object: I,
1839
+ ): UpdateIntegrationRequest_IntegrationUpdates {
1840
+ const message = createBaseUpdateIntegrationRequest_IntegrationUpdates();
1841
+ message.name = object.name ?? undefined;
1842
+ message.enabled = object.enabled ?? undefined;
1843
+ message.webhookConfig = (object.webhookConfig !== undefined && object.webhookConfig !== null)
1844
+ ? WebhookConfig.fromPartial(object.webhookConfig)
1845
+ : undefined;
1846
+ message.slackConfig = (object.slackConfig !== undefined && object.slackConfig !== null)
1847
+ ? SlackConfig.fromPartial(object.slackConfig)
1848
+ : undefined;
1849
+ message.emailConfig = (object.emailConfig !== undefined && object.emailConfig !== null)
1850
+ ? EmailConfig.fromPartial(object.emailConfig)
1851
+ : undefined;
1852
+ message.pagerdutyConfig = (object.pagerdutyConfig !== undefined && object.pagerdutyConfig !== null)
1853
+ ? PagerDutyConfig.fromPartial(object.pagerdutyConfig)
1854
+ : undefined;
4466
1855
  return message;
4467
1856
  },
4468
1857
  };
4469
1858
 
4470
- function createBaseRuleMatchEvent(): RuleMatchEvent {
4471
- return {
4472
- matchId: "",
4473
- projectId: "",
4474
- ruleId: "",
4475
- ruleName: "",
4476
- integrationIds: [],
4477
- matchReason: "",
4478
- createdAt: undefined,
4479
- entityContexts: [],
4480
- };
1859
+ function createBaseUpdateIntegrationResponse(): UpdateIntegrationResponse {
1860
+ return { status: undefined, integration: undefined };
4481
1861
  }
4482
1862
 
4483
- export const RuleMatchEvent: MessageFns<RuleMatchEvent> = {
4484
- encode(message: RuleMatchEvent, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4485
- if (message.matchId !== "") {
4486
- writer.uint32(10).string(message.matchId);
4487
- }
4488
- if (message.projectId !== "") {
4489
- writer.uint32(18).string(message.projectId);
4490
- }
4491
- if (message.ruleId !== "") {
4492
- writer.uint32(26).string(message.ruleId);
4493
- }
4494
- if (message.ruleName !== "") {
4495
- writer.uint32(34).string(message.ruleName);
4496
- }
4497
- for (const v of message.integrationIds) {
4498
- writer.uint32(42).string(v!);
4499
- }
4500
- if (message.matchReason !== "") {
4501
- writer.uint32(50).string(message.matchReason);
4502
- }
4503
- if (message.createdAt !== undefined) {
4504
- Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(58).fork()).join();
1863
+ export const UpdateIntegrationResponse: MessageFns<UpdateIntegrationResponse> = {
1864
+ encode(message: UpdateIntegrationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1865
+ if (message.status !== undefined) {
1866
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
4505
1867
  }
4506
- for (const v of message.entityContexts) {
4507
- RuleMatchEvent_EntityContext.encode(v!, writer.uint32(66).fork()).join();
1868
+ if (message.integration !== undefined) {
1869
+ Integration.encode(message.integration, writer.uint32(18).fork()).join();
4508
1870
  }
4509
1871
  return writer;
4510
1872
  },
4511
1873
 
4512
- decode(input: BinaryReader | Uint8Array, length?: number): RuleMatchEvent {
1874
+ decode(input: BinaryReader | Uint8Array, length?: number): UpdateIntegrationResponse {
4513
1875
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4514
1876
  const end = length === undefined ? reader.len : reader.pos + length;
4515
- const message = createBaseRuleMatchEvent();
1877
+ const message = createBaseUpdateIntegrationResponse();
4516
1878
  while (reader.pos < end) {
4517
1879
  const tag = reader.uint32();
4518
1880
  switch (tag >>> 3) {
@@ -4521,7 +1883,7 @@ export const RuleMatchEvent: MessageFns<RuleMatchEvent> = {
4521
1883
  break;
4522
1884
  }
4523
1885
 
4524
- message.matchId = reader.string();
1886
+ message.status = ResponseStatus.decode(reader, reader.uint32());
4525
1887
  continue;
4526
1888
  }
4527
1889
  case 2: {
@@ -4529,55 +1891,7 @@ export const RuleMatchEvent: MessageFns<RuleMatchEvent> = {
4529
1891
  break;
4530
1892
  }
4531
1893
 
4532
- message.projectId = reader.string();
4533
- continue;
4534
- }
4535
- case 3: {
4536
- if (tag !== 26) {
4537
- break;
4538
- }
4539
-
4540
- message.ruleId = reader.string();
4541
- continue;
4542
- }
4543
- case 4: {
4544
- if (tag !== 34) {
4545
- break;
4546
- }
4547
-
4548
- message.ruleName = reader.string();
4549
- continue;
4550
- }
4551
- case 5: {
4552
- if (tag !== 42) {
4553
- break;
4554
- }
4555
-
4556
- message.integrationIds.push(reader.string());
4557
- continue;
4558
- }
4559
- case 6: {
4560
- if (tag !== 50) {
4561
- break;
4562
- }
4563
-
4564
- message.matchReason = reader.string();
4565
- continue;
4566
- }
4567
- case 7: {
4568
- if (tag !== 58) {
4569
- break;
4570
- }
4571
-
4572
- message.createdAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
4573
- continue;
4574
- }
4575
- case 8: {
4576
- if (tag !== 66) {
4577
- break;
4578
- }
4579
-
4580
- message.entityContexts.push(RuleMatchEvent_EntityContext.decode(reader, reader.uint32()));
1894
+ message.integration = Integration.decode(reader, reader.uint32());
4581
1895
  continue;
4582
1896
  }
4583
1897
  }
@@ -4589,113 +1903,58 @@ export const RuleMatchEvent: MessageFns<RuleMatchEvent> = {
4589
1903
  return message;
4590
1904
  },
4591
1905
 
4592
- fromJSON(object: any): RuleMatchEvent {
1906
+ fromJSON(object: any): UpdateIntegrationResponse {
4593
1907
  return {
4594
- matchId: isSet(object.matchId)
4595
- ? globalThis.String(object.matchId)
4596
- : isSet(object.match_id)
4597
- ? globalThis.String(object.match_id)
4598
- : "",
4599
- projectId: isSet(object.projectId)
4600
- ? globalThis.String(object.projectId)
4601
- : isSet(object.project_id)
4602
- ? globalThis.String(object.project_id)
4603
- : "",
4604
- ruleId: isSet(object.ruleId)
4605
- ? globalThis.String(object.ruleId)
4606
- : isSet(object.rule_id)
4607
- ? globalThis.String(object.rule_id)
4608
- : "",
4609
- ruleName: isSet(object.ruleName)
4610
- ? globalThis.String(object.ruleName)
4611
- : isSet(object.rule_name)
4612
- ? globalThis.String(object.rule_name)
4613
- : "",
4614
- integrationIds: globalThis.Array.isArray(object?.integrationIds)
4615
- ? object.integrationIds.map((e: any) => globalThis.String(e))
4616
- : globalThis.Array.isArray(object?.integration_ids)
4617
- ? object.integration_ids.map((e: any) => globalThis.String(e))
4618
- : [],
4619
- matchReason: isSet(object.matchReason)
4620
- ? globalThis.String(object.matchReason)
4621
- : isSet(object.match_reason)
4622
- ? globalThis.String(object.match_reason)
4623
- : "",
4624
- createdAt: isSet(object.createdAt)
4625
- ? fromJsonTimestamp(object.createdAt)
4626
- : isSet(object.created_at)
4627
- ? fromJsonTimestamp(object.created_at)
4628
- : undefined,
4629
- entityContexts: globalThis.Array.isArray(object?.entityContexts)
4630
- ? object.entityContexts.map((e: any) => RuleMatchEvent_EntityContext.fromJSON(e))
4631
- : globalThis.Array.isArray(object?.entity_contexts)
4632
- ? object.entity_contexts.map((e: any) => RuleMatchEvent_EntityContext.fromJSON(e))
4633
- : [],
1908
+ status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
1909
+ integration: isSet(object.integration) ? Integration.fromJSON(object.integration) : undefined,
4634
1910
  };
4635
1911
  },
4636
1912
 
4637
- toJSON(message: RuleMatchEvent): unknown {
1913
+ toJSON(message: UpdateIntegrationResponse): unknown {
4638
1914
  const obj: any = {};
4639
- if (message.matchId !== "") {
4640
- obj.matchId = message.matchId;
4641
- }
4642
- if (message.projectId !== "") {
4643
- obj.projectId = message.projectId;
4644
- }
4645
- if (message.ruleId !== "") {
4646
- obj.ruleId = message.ruleId;
4647
- }
4648
- if (message.ruleName !== "") {
4649
- obj.ruleName = message.ruleName;
4650
- }
4651
- if (message.integrationIds?.length) {
4652
- obj.integrationIds = message.integrationIds;
4653
- }
4654
- if (message.matchReason !== "") {
4655
- obj.matchReason = message.matchReason;
4656
- }
4657
- if (message.createdAt !== undefined) {
4658
- obj.createdAt = message.createdAt.toISOString();
1915
+ if (message.status !== undefined) {
1916
+ obj.status = ResponseStatus.toJSON(message.status);
4659
1917
  }
4660
- if (message.entityContexts?.length) {
4661
- obj.entityContexts = message.entityContexts.map((e) => RuleMatchEvent_EntityContext.toJSON(e));
1918
+ if (message.integration !== undefined) {
1919
+ obj.integration = Integration.toJSON(message.integration);
4662
1920
  }
4663
1921
  return obj;
4664
1922
  },
4665
1923
 
4666
- create<I extends Exact<DeepPartial<RuleMatchEvent>, I>>(base?: I): RuleMatchEvent {
4667
- return RuleMatchEvent.fromPartial(base ?? ({} as any));
1924
+ create<I extends Exact<DeepPartial<UpdateIntegrationResponse>, I>>(base?: I): UpdateIntegrationResponse {
1925
+ return UpdateIntegrationResponse.fromPartial(base ?? ({} as any));
4668
1926
  },
4669
- fromPartial<I extends Exact<DeepPartial<RuleMatchEvent>, I>>(object: I): RuleMatchEvent {
4670
- const message = createBaseRuleMatchEvent();
4671
- message.matchId = object.matchId ?? "";
4672
- message.projectId = object.projectId ?? "";
4673
- message.ruleId = object.ruleId ?? "";
4674
- message.ruleName = object.ruleName ?? "";
4675
- message.integrationIds = object.integrationIds?.map((e) => e) || [];
4676
- message.matchReason = object.matchReason ?? "";
4677
- message.createdAt = object.createdAt ?? undefined;
4678
- message.entityContexts = object.entityContexts?.map((e) => RuleMatchEvent_EntityContext.fromPartial(e)) || [];
1927
+ fromPartial<I extends Exact<DeepPartial<UpdateIntegrationResponse>, I>>(object: I): UpdateIntegrationResponse {
1928
+ const message = createBaseUpdateIntegrationResponse();
1929
+ message.status = (object.status !== undefined && object.status !== null)
1930
+ ? ResponseStatus.fromPartial(object.status)
1931
+ : undefined;
1932
+ message.integration = (object.integration !== undefined && object.integration !== null)
1933
+ ? Integration.fromPartial(object.integration)
1934
+ : undefined;
4679
1935
  return message;
4680
1936
  },
4681
1937
  };
4682
1938
 
4683
- function createBaseRuleMatchEvent_EntityContext(): RuleMatchEvent_EntityContext {
4684
- return { traceContext: undefined };
1939
+ function createBaseDeleteIntegrationRequest(): DeleteIntegrationRequest {
1940
+ return { organizationId: "", integrationId: "" };
4685
1941
  }
4686
1942
 
4687
- export const RuleMatchEvent_EntityContext: MessageFns<RuleMatchEvent_EntityContext> = {
4688
- encode(message: RuleMatchEvent_EntityContext, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4689
- if (message.traceContext !== undefined) {
4690
- RuleMatchEvent_EntityContext_TraceContext.encode(message.traceContext, writer.uint32(10).fork()).join();
1943
+ export const DeleteIntegrationRequest: MessageFns<DeleteIntegrationRequest> = {
1944
+ encode(message: DeleteIntegrationRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
1945
+ if (message.organizationId !== "") {
1946
+ writer.uint32(10).string(message.organizationId);
1947
+ }
1948
+ if (message.integrationId !== "") {
1949
+ writer.uint32(18).string(message.integrationId);
4691
1950
  }
4692
1951
  return writer;
4693
1952
  },
4694
1953
 
4695
- decode(input: BinaryReader | Uint8Array, length?: number): RuleMatchEvent_EntityContext {
1954
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteIntegrationRequest {
4696
1955
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4697
1956
  const end = length === undefined ? reader.len : reader.pos + length;
4698
- const message = createBaseRuleMatchEvent_EntityContext();
1957
+ const message = createBaseDeleteIntegrationRequest();
4699
1958
  while (reader.pos < end) {
4700
1959
  const tag = reader.uint32();
4701
1960
  switch (tag >>> 3) {
@@ -4704,7 +1963,15 @@ export const RuleMatchEvent_EntityContext: MessageFns<RuleMatchEvent_EntityConte
4704
1963
  break;
4705
1964
  }
4706
1965
 
4707
- message.traceContext = RuleMatchEvent_EntityContext_TraceContext.decode(reader, reader.uint32());
1966
+ message.organizationId = reader.string();
1967
+ continue;
1968
+ }
1969
+ case 2: {
1970
+ if (tag !== 18) {
1971
+ break;
1972
+ }
1973
+
1974
+ message.integrationId = reader.string();
4708
1975
  continue;
4709
1976
  }
4710
1977
  }
@@ -4716,52 +1983,59 @@ export const RuleMatchEvent_EntityContext: MessageFns<RuleMatchEvent_EntityConte
4716
1983
  return message;
4717
1984
  },
4718
1985
 
4719
- fromJSON(object: any): RuleMatchEvent_EntityContext {
1986
+ fromJSON(object: any): DeleteIntegrationRequest {
4720
1987
  return {
4721
- traceContext: isSet(object.traceContext)
4722
- ? RuleMatchEvent_EntityContext_TraceContext.fromJSON(object.traceContext)
4723
- : isSet(object.trace_context)
4724
- ? RuleMatchEvent_EntityContext_TraceContext.fromJSON(object.trace_context)
4725
- : undefined,
1988
+ organizationId: isSet(object.organizationId)
1989
+ ? globalThis.String(object.organizationId)
1990
+ : isSet(object.organization_id)
1991
+ ? globalThis.String(object.organization_id)
1992
+ : "",
1993
+ integrationId: isSet(object.integrationId)
1994
+ ? globalThis.String(object.integrationId)
1995
+ : isSet(object.integration_id)
1996
+ ? globalThis.String(object.integration_id)
1997
+ : "",
4726
1998
  };
4727
1999
  },
4728
2000
 
4729
- toJSON(message: RuleMatchEvent_EntityContext): unknown {
2001
+ toJSON(message: DeleteIntegrationRequest): unknown {
4730
2002
  const obj: any = {};
4731
- if (message.traceContext !== undefined) {
4732
- obj.traceContext = RuleMatchEvent_EntityContext_TraceContext.toJSON(message.traceContext);
2003
+ if (message.organizationId !== "") {
2004
+ obj.organizationId = message.organizationId;
2005
+ }
2006
+ if (message.integrationId !== "") {
2007
+ obj.integrationId = message.integrationId;
4733
2008
  }
4734
2009
  return obj;
4735
2010
  },
4736
2011
 
4737
- create<I extends Exact<DeepPartial<RuleMatchEvent_EntityContext>, I>>(base?: I): RuleMatchEvent_EntityContext {
4738
- return RuleMatchEvent_EntityContext.fromPartial(base ?? ({} as any));
2012
+ create<I extends Exact<DeepPartial<DeleteIntegrationRequest>, I>>(base?: I): DeleteIntegrationRequest {
2013
+ return DeleteIntegrationRequest.fromPartial(base ?? ({} as any));
4739
2014
  },
4740
- fromPartial<I extends Exact<DeepPartial<RuleMatchEvent_EntityContext>, I>>(object: I): RuleMatchEvent_EntityContext {
4741
- const message = createBaseRuleMatchEvent_EntityContext();
4742
- message.traceContext = (object.traceContext !== undefined && object.traceContext !== null)
4743
- ? RuleMatchEvent_EntityContext_TraceContext.fromPartial(object.traceContext)
4744
- : undefined;
2015
+ fromPartial<I extends Exact<DeepPartial<DeleteIntegrationRequest>, I>>(object: I): DeleteIntegrationRequest {
2016
+ const message = createBaseDeleteIntegrationRequest();
2017
+ message.organizationId = object.organizationId ?? "";
2018
+ message.integrationId = object.integrationId ?? "";
4745
2019
  return message;
4746
2020
  },
4747
2021
  };
4748
2022
 
4749
- function createBaseRuleMatchEvent_EntityContext_TraceContext(): RuleMatchEvent_EntityContext_TraceContext {
4750
- return { traceId: "" };
2023
+ function createBaseDeleteIntegrationResponse(): DeleteIntegrationResponse {
2024
+ return { status: undefined };
4751
2025
  }
4752
2026
 
4753
- export const RuleMatchEvent_EntityContext_TraceContext: MessageFns<RuleMatchEvent_EntityContext_TraceContext> = {
4754
- encode(message: RuleMatchEvent_EntityContext_TraceContext, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4755
- if (message.traceId !== "") {
4756
- writer.uint32(10).string(message.traceId);
2027
+ export const DeleteIntegrationResponse: MessageFns<DeleteIntegrationResponse> = {
2028
+ encode(message: DeleteIntegrationResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2029
+ if (message.status !== undefined) {
2030
+ ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
4757
2031
  }
4758
2032
  return writer;
4759
2033
  },
4760
2034
 
4761
- decode(input: BinaryReader | Uint8Array, length?: number): RuleMatchEvent_EntityContext_TraceContext {
2035
+ decode(input: BinaryReader | Uint8Array, length?: number): DeleteIntegrationResponse {
4762
2036
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4763
2037
  const end = length === undefined ? reader.len : reader.pos + length;
4764
- const message = createBaseRuleMatchEvent_EntityContext_TraceContext();
2038
+ const message = createBaseDeleteIntegrationResponse();
4765
2039
  while (reader.pos < end) {
4766
2040
  const tag = reader.uint32();
4767
2041
  switch (tag >>> 3) {
@@ -4770,7 +2044,7 @@ export const RuleMatchEvent_EntityContext_TraceContext: MessageFns<RuleMatchEven
4770
2044
  break;
4771
2045
  }
4772
2046
 
4773
- message.traceId = reader.string();
2047
+ message.status = ResponseStatus.decode(reader, reader.uint32());
4774
2048
  continue;
4775
2049
  }
4776
2050
  }
@@ -4782,44 +2056,36 @@ export const RuleMatchEvent_EntityContext_TraceContext: MessageFns<RuleMatchEven
4782
2056
  return message;
4783
2057
  },
4784
2058
 
4785
- fromJSON(object: any): RuleMatchEvent_EntityContext_TraceContext {
4786
- return {
4787
- traceId: isSet(object.traceId)
4788
- ? globalThis.String(object.traceId)
4789
- : isSet(object.trace_id)
4790
- ? globalThis.String(object.trace_id)
4791
- : "",
4792
- };
2059
+ fromJSON(object: any): DeleteIntegrationResponse {
2060
+ return { status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined };
4793
2061
  },
4794
2062
 
4795
- toJSON(message: RuleMatchEvent_EntityContext_TraceContext): unknown {
2063
+ toJSON(message: DeleteIntegrationResponse): unknown {
4796
2064
  const obj: any = {};
4797
- if (message.traceId !== "") {
4798
- obj.traceId = message.traceId;
2065
+ if (message.status !== undefined) {
2066
+ obj.status = ResponseStatus.toJSON(message.status);
4799
2067
  }
4800
2068
  return obj;
4801
2069
  },
4802
2070
 
4803
- create<I extends Exact<DeepPartial<RuleMatchEvent_EntityContext_TraceContext>, I>>(
4804
- base?: I,
4805
- ): RuleMatchEvent_EntityContext_TraceContext {
4806
- return RuleMatchEvent_EntityContext_TraceContext.fromPartial(base ?? ({} as any));
2071
+ create<I extends Exact<DeepPartial<DeleteIntegrationResponse>, I>>(base?: I): DeleteIntegrationResponse {
2072
+ return DeleteIntegrationResponse.fromPartial(base ?? ({} as any));
4807
2073
  },
4808
- fromPartial<I extends Exact<DeepPartial<RuleMatchEvent_EntityContext_TraceContext>, I>>(
4809
- object: I,
4810
- ): RuleMatchEvent_EntityContext_TraceContext {
4811
- const message = createBaseRuleMatchEvent_EntityContext_TraceContext();
4812
- message.traceId = object.traceId ?? "";
2074
+ fromPartial<I extends Exact<DeepPartial<DeleteIntegrationResponse>, I>>(object: I): DeleteIntegrationResponse {
2075
+ const message = createBaseDeleteIntegrationResponse();
2076
+ message.status = (object.status !== undefined && object.status !== null)
2077
+ ? ResponseStatus.fromPartial(object.status)
2078
+ : undefined;
4813
2079
  return message;
4814
2080
  },
4815
2081
  };
4816
2082
 
4817
- function createBaseListRuleMatchDeliveriesRequest(): ListRuleMatchDeliveriesRequest {
2083
+ function createBaseListTraceRuleMatchDeliveriesRequest(): ListTraceRuleMatchDeliveriesRequest {
4818
2084
  return { projectId: "", matchEventId: "", organizationId: "" };
4819
2085
  }
4820
2086
 
4821
- export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesRequest> = {
4822
- encode(message: ListRuleMatchDeliveriesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2087
+ export const ListTraceRuleMatchDeliveriesRequest: MessageFns<ListTraceRuleMatchDeliveriesRequest> = {
2088
+ encode(message: ListTraceRuleMatchDeliveriesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4823
2089
  if (message.projectId !== "") {
4824
2090
  writer.uint32(10).string(message.projectId);
4825
2091
  }
@@ -4832,10 +2098,10 @@ export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesR
4832
2098
  return writer;
4833
2099
  },
4834
2100
 
4835
- decode(input: BinaryReader | Uint8Array, length?: number): ListRuleMatchDeliveriesRequest {
2101
+ decode(input: BinaryReader | Uint8Array, length?: number): ListTraceRuleMatchDeliveriesRequest {
4836
2102
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4837
2103
  const end = length === undefined ? reader.len : reader.pos + length;
4838
- const message = createBaseListRuleMatchDeliveriesRequest();
2104
+ const message = createBaseListTraceRuleMatchDeliveriesRequest();
4839
2105
  while (reader.pos < end) {
4840
2106
  const tag = reader.uint32();
4841
2107
  switch (tag >>> 3) {
@@ -4872,7 +2138,7 @@ export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesR
4872
2138
  return message;
4873
2139
  },
4874
2140
 
4875
- fromJSON(object: any): ListRuleMatchDeliveriesRequest {
2141
+ fromJSON(object: any): ListTraceRuleMatchDeliveriesRequest {
4876
2142
  return {
4877
2143
  projectId: isSet(object.projectId)
4878
2144
  ? globalThis.String(object.projectId)
@@ -4892,7 +2158,7 @@ export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesR
4892
2158
  };
4893
2159
  },
4894
2160
 
4895
- toJSON(message: ListRuleMatchDeliveriesRequest): unknown {
2161
+ toJSON(message: ListTraceRuleMatchDeliveriesRequest): unknown {
4896
2162
  const obj: any = {};
4897
2163
  if (message.projectId !== "") {
4898
2164
  obj.projectId = message.projectId;
@@ -4906,13 +2172,15 @@ export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesR
4906
2172
  return obj;
4907
2173
  },
4908
2174
 
4909
- create<I extends Exact<DeepPartial<ListRuleMatchDeliveriesRequest>, I>>(base?: I): ListRuleMatchDeliveriesRequest {
4910
- return ListRuleMatchDeliveriesRequest.fromPartial(base ?? ({} as any));
2175
+ create<I extends Exact<DeepPartial<ListTraceRuleMatchDeliveriesRequest>, I>>(
2176
+ base?: I,
2177
+ ): ListTraceRuleMatchDeliveriesRequest {
2178
+ return ListTraceRuleMatchDeliveriesRequest.fromPartial(base ?? ({} as any));
4911
2179
  },
4912
- fromPartial<I extends Exact<DeepPartial<ListRuleMatchDeliveriesRequest>, I>>(
2180
+ fromPartial<I extends Exact<DeepPartial<ListTraceRuleMatchDeliveriesRequest>, I>>(
4913
2181
  object: I,
4914
- ): ListRuleMatchDeliveriesRequest {
4915
- const message = createBaseListRuleMatchDeliveriesRequest();
2182
+ ): ListTraceRuleMatchDeliveriesRequest {
2183
+ const message = createBaseListTraceRuleMatchDeliveriesRequest();
4916
2184
  message.projectId = object.projectId ?? "";
4917
2185
  message.matchEventId = object.matchEventId ?? "";
4918
2186
  message.organizationId = object.organizationId ?? "";
@@ -4920,12 +2188,12 @@ export const ListRuleMatchDeliveriesRequest: MessageFns<ListRuleMatchDeliveriesR
4920
2188
  },
4921
2189
  };
4922
2190
 
4923
- function createBaseListRuleMatchDeliveriesResponse(): ListRuleMatchDeliveriesResponse {
2191
+ function createBaseListTraceRuleMatchDeliveriesResponse(): ListTraceRuleMatchDeliveriesResponse {
4924
2192
  return { status: undefined, deliveries: [] };
4925
2193
  }
4926
2194
 
4927
- export const ListRuleMatchDeliveriesResponse: MessageFns<ListRuleMatchDeliveriesResponse> = {
4928
- encode(message: ListRuleMatchDeliveriesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
2195
+ export const ListTraceRuleMatchDeliveriesResponse: MessageFns<ListTraceRuleMatchDeliveriesResponse> = {
2196
+ encode(message: ListTraceRuleMatchDeliveriesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
4929
2197
  if (message.status !== undefined) {
4930
2198
  ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
4931
2199
  }
@@ -4935,10 +2203,10 @@ export const ListRuleMatchDeliveriesResponse: MessageFns<ListRuleMatchDeliveries
4935
2203
  return writer;
4936
2204
  },
4937
2205
 
4938
- decode(input: BinaryReader | Uint8Array, length?: number): ListRuleMatchDeliveriesResponse {
2206
+ decode(input: BinaryReader | Uint8Array, length?: number): ListTraceRuleMatchDeliveriesResponse {
4939
2207
  const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
4940
2208
  const end = length === undefined ? reader.len : reader.pos + length;
4941
- const message = createBaseListRuleMatchDeliveriesResponse();
2209
+ const message = createBaseListTraceRuleMatchDeliveriesResponse();
4942
2210
  while (reader.pos < end) {
4943
2211
  const tag = reader.uint32();
4944
2212
  switch (tag >>> 3) {
@@ -4967,7 +2235,7 @@ export const ListRuleMatchDeliveriesResponse: MessageFns<ListRuleMatchDeliveries
4967
2235
  return message;
4968
2236
  },
4969
2237
 
4970
- fromJSON(object: any): ListRuleMatchDeliveriesResponse {
2238
+ fromJSON(object: any): ListTraceRuleMatchDeliveriesResponse {
4971
2239
  return {
4972
2240
  status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
4973
2241
  deliveries: globalThis.Array.isArray(object?.deliveries)
@@ -4976,7 +2244,7 @@ export const ListRuleMatchDeliveriesResponse: MessageFns<ListRuleMatchDeliveries
4976
2244
  };
4977
2245
  },
4978
2246
 
4979
- toJSON(message: ListRuleMatchDeliveriesResponse): unknown {
2247
+ toJSON(message: ListTraceRuleMatchDeliveriesResponse): unknown {
4980
2248
  const obj: any = {};
4981
2249
  if (message.status !== undefined) {
4982
2250
  obj.status = ResponseStatus.toJSON(message.status);
@@ -4987,13 +2255,15 @@ export const ListRuleMatchDeliveriesResponse: MessageFns<ListRuleMatchDeliveries
4987
2255
  return obj;
4988
2256
  },
4989
2257
 
4990
- create<I extends Exact<DeepPartial<ListRuleMatchDeliveriesResponse>, I>>(base?: I): ListRuleMatchDeliveriesResponse {
4991
- return ListRuleMatchDeliveriesResponse.fromPartial(base ?? ({} as any));
2258
+ create<I extends Exact<DeepPartial<ListTraceRuleMatchDeliveriesResponse>, I>>(
2259
+ base?: I,
2260
+ ): ListTraceRuleMatchDeliveriesResponse {
2261
+ return ListTraceRuleMatchDeliveriesResponse.fromPartial(base ?? ({} as any));
4992
2262
  },
4993
- fromPartial<I extends Exact<DeepPartial<ListRuleMatchDeliveriesResponse>, I>>(
2263
+ fromPartial<I extends Exact<DeepPartial<ListTraceRuleMatchDeliveriesResponse>, I>>(
4994
2264
  object: I,
4995
- ): ListRuleMatchDeliveriesResponse {
4996
- const message = createBaseListRuleMatchDeliveriesResponse();
2265
+ ): ListTraceRuleMatchDeliveriesResponse {
2266
+ const message = createBaseListTraceRuleMatchDeliveriesResponse();
4997
2267
  message.status = (object.status !== undefined && object.status !== null)
4998
2268
  ? ResponseStatus.fromPartial(object.status)
4999
2269
  : undefined;
@@ -5652,61 +2922,40 @@ export const PagerDutyDestination: MessageFns<PagerDutyDestination> = {
5652
2922
  },
5653
2923
  };
5654
2924
 
5655
- /** AutomationGatewayService provides web client access to automation management */
5656
- export interface AutomationGatewayService {
5657
- /** Integration operations */
2925
+ /**
2926
+ * IntegrationGatewayService provides web client access to integration
2927
+ * management and the notification delivery ledger.
2928
+ */
2929
+ export interface IntegrationGatewayService {
5658
2930
  CreateIntegration(request: CreateIntegrationRequest, metadata?: Metadata): Promise<CreateIntegrationResponse>;
5659
2931
  GetIntegration(request: GetIntegrationRequest, metadata?: Metadata): Promise<GetIntegrationResponse>;
5660
2932
  ListIntegrations(request: ListIntegrationsRequest, metadata?: Metadata): Promise<ListIntegrationsResponse>;
5661
2933
  UpdateIntegration(request: UpdateIntegrationRequest, metadata?: Metadata): Promise<UpdateIntegrationResponse>;
5662
2934
  DeleteIntegration(request: DeleteIntegrationRequest, metadata?: Metadata): Promise<DeleteIntegrationResponse>;
5663
- /** Rule operations */
5664
- CreateRule(request: CreateRuleRequest, metadata?: Metadata): Promise<CreateRuleResponse>;
5665
- GetRule(request: GetRuleRequest, metadata?: Metadata): Promise<GetRuleResponse>;
5666
- ListRules(request: ListRulesRequest, metadata?: Metadata): Promise<ListRulesResponse>;
5667
- UpdateRule(request: UpdateRuleRequest, metadata?: Metadata): Promise<UpdateRuleResponse>;
5668
- DeleteRule(request: DeleteRuleRequest, metadata?: Metadata): Promise<DeleteRuleResponse>;
5669
- /** Simulation */
5670
- StreamRuleSimulation(request: StreamRuleSimulationRequest, metadata?: Metadata): Observable<RuleSimulationMatch>;
5671
- /** Schema discovery */
5672
- ListRuleSchemas(request: ListRuleSchemasRequest, metadata?: Metadata): Promise<ListRuleSchemasResponse>;
5673
- /**
5674
- * StreamRuleMatches sends an initial snapshot of recent rule matches followed by
5675
- * live updates as new matches occur.
5676
- */
5677
- StreamRuleMatches(request: StreamRuleMatchesRequest, metadata?: Metadata): Observable<RuleMatchEnvelope>;
5678
2935
  /**
5679
- * ListRuleMatchDeliveries returns the per-integration delivery records for
5680
- * a single rule match (the FE calls this on-demand when expanding a rule
5681
- * match row on a trace).
2936
+ * ListTraceRuleMatchDeliveries returns the per-integration delivery records
2937
+ * for a single trace-rule match (the FE calls this on-demand when expanding a
2938
+ * rule-match row on a trace). The delivery ledger is integration-owned.
5682
2939
  */
5683
- ListRuleMatchDeliveries(
5684
- request: ListRuleMatchDeliveriesRequest,
2940
+ ListTraceRuleMatchDeliveries(
2941
+ request: ListTraceRuleMatchDeliveriesRequest,
5685
2942
  metadata?: Metadata,
5686
- ): Promise<ListRuleMatchDeliveriesResponse>;
2943
+ ): Promise<ListTraceRuleMatchDeliveriesResponse>;
5687
2944
  }
5688
2945
 
5689
- export const AutomationGatewayServiceServiceName = "gateway.web.v1.AutomationGatewayService";
5690
- export class AutomationGatewayServiceClientImpl implements AutomationGatewayService {
2946
+ export const IntegrationGatewayServiceServiceName = "gateway.web.v1.IntegrationGatewayService";
2947
+ export class IntegrationGatewayServiceClientImpl implements IntegrationGatewayService {
5691
2948
  private readonly rpc: Rpc;
5692
2949
  private readonly service: string;
5693
2950
  constructor(rpc: Rpc, opts?: { service?: string }) {
5694
- this.service = opts?.service || AutomationGatewayServiceServiceName;
2951
+ this.service = opts?.service || IntegrationGatewayServiceServiceName;
5695
2952
  this.rpc = rpc;
5696
2953
  this.CreateIntegration = this.CreateIntegration.bind(this);
5697
2954
  this.GetIntegration = this.GetIntegration.bind(this);
5698
2955
  this.ListIntegrations = this.ListIntegrations.bind(this);
5699
2956
  this.UpdateIntegration = this.UpdateIntegration.bind(this);
5700
2957
  this.DeleteIntegration = this.DeleteIntegration.bind(this);
5701
- this.CreateRule = this.CreateRule.bind(this);
5702
- this.GetRule = this.GetRule.bind(this);
5703
- this.ListRules = this.ListRules.bind(this);
5704
- this.UpdateRule = this.UpdateRule.bind(this);
5705
- this.DeleteRule = this.DeleteRule.bind(this);
5706
- this.StreamRuleSimulation = this.StreamRuleSimulation.bind(this);
5707
- this.ListRuleSchemas = this.ListRuleSchemas.bind(this);
5708
- this.StreamRuleMatches = this.StreamRuleMatches.bind(this);
5709
- this.ListRuleMatchDeliveries = this.ListRuleMatchDeliveries.bind(this);
2958
+ this.ListTraceRuleMatchDeliveries = this.ListTraceRuleMatchDeliveries.bind(this);
5710
2959
  }
5711
2960
  CreateIntegration(request: CreateIntegrationRequest, metadata?: Metadata): Promise<CreateIntegrationResponse> {
5712
2961
  const data = CreateIntegrationRequest.encode(request).finish();
@@ -5738,84 +2987,18 @@ export class AutomationGatewayServiceClientImpl implements AutomationGatewayServ
5738
2987
  return promise.then((data) => DeleteIntegrationResponse.decode(new BinaryReader(data)));
5739
2988
  }
5740
2989
 
5741
- CreateRule(request: CreateRuleRequest, metadata?: Metadata): Promise<CreateRuleResponse> {
5742
- const data = CreateRuleRequest.encode(request).finish();
5743
- const promise = this.rpc.request(this.service, "CreateRule", data, metadata);
5744
- return promise.then((data) => CreateRuleResponse.decode(new BinaryReader(data)));
5745
- }
5746
-
5747
- GetRule(request: GetRuleRequest, metadata?: Metadata): Promise<GetRuleResponse> {
5748
- const data = GetRuleRequest.encode(request).finish();
5749
- const promise = this.rpc.request(this.service, "GetRule", data, metadata);
5750
- return promise.then((data) => GetRuleResponse.decode(new BinaryReader(data)));
5751
- }
5752
-
5753
- ListRules(request: ListRulesRequest, metadata?: Metadata): Promise<ListRulesResponse> {
5754
- const data = ListRulesRequest.encode(request).finish();
5755
- const promise = this.rpc.request(this.service, "ListRules", data, metadata);
5756
- return promise.then((data) => ListRulesResponse.decode(new BinaryReader(data)));
5757
- }
5758
-
5759
- UpdateRule(request: UpdateRuleRequest, metadata?: Metadata): Promise<UpdateRuleResponse> {
5760
- const data = UpdateRuleRequest.encode(request).finish();
5761
- const promise = this.rpc.request(this.service, "UpdateRule", data, metadata);
5762
- return promise.then((data) => UpdateRuleResponse.decode(new BinaryReader(data)));
5763
- }
5764
-
5765
- DeleteRule(request: DeleteRuleRequest, metadata?: Metadata): Promise<DeleteRuleResponse> {
5766
- const data = DeleteRuleRequest.encode(request).finish();
5767
- const promise = this.rpc.request(this.service, "DeleteRule", data, metadata);
5768
- return promise.then((data) => DeleteRuleResponse.decode(new BinaryReader(data)));
5769
- }
5770
-
5771
- StreamRuleSimulation(request: StreamRuleSimulationRequest, metadata?: Metadata): Observable<RuleSimulationMatch> {
5772
- const data = StreamRuleSimulationRequest.encode(request).finish();
5773
- const result = this.rpc.serverStreamingRequest(this.service, "StreamRuleSimulation", data, metadata);
5774
- return result.pipe(map((data) => RuleSimulationMatch.decode(new BinaryReader(data))));
5775
- }
5776
-
5777
- ListRuleSchemas(request: ListRuleSchemasRequest, metadata?: Metadata): Promise<ListRuleSchemasResponse> {
5778
- const data = ListRuleSchemasRequest.encode(request).finish();
5779
- const promise = this.rpc.request(this.service, "ListRuleSchemas", data, metadata);
5780
- return promise.then((data) => ListRuleSchemasResponse.decode(new BinaryReader(data)));
5781
- }
5782
-
5783
- StreamRuleMatches(request: StreamRuleMatchesRequest, metadata?: Metadata): Observable<RuleMatchEnvelope> {
5784
- const data = StreamRuleMatchesRequest.encode(request).finish();
5785
- const result = this.rpc.serverStreamingRequest(this.service, "StreamRuleMatches", data, metadata);
5786
- return result.pipe(map((data) => RuleMatchEnvelope.decode(new BinaryReader(data))));
5787
- }
5788
-
5789
- ListRuleMatchDeliveries(
5790
- request: ListRuleMatchDeliveriesRequest,
2990
+ ListTraceRuleMatchDeliveries(
2991
+ request: ListTraceRuleMatchDeliveriesRequest,
5791
2992
  metadata?: Metadata,
5792
- ): Promise<ListRuleMatchDeliveriesResponse> {
5793
- const data = ListRuleMatchDeliveriesRequest.encode(request).finish();
5794
- const promise = this.rpc.request(this.service, "ListRuleMatchDeliveries", data, metadata);
5795
- return promise.then((data) => ListRuleMatchDeliveriesResponse.decode(new BinaryReader(data)));
2993
+ ): Promise<ListTraceRuleMatchDeliveriesResponse> {
2994
+ const data = ListTraceRuleMatchDeliveriesRequest.encode(request).finish();
2995
+ const promise = this.rpc.request(this.service, "ListTraceRuleMatchDeliveries", data, metadata);
2996
+ return promise.then((data) => ListTraceRuleMatchDeliveriesResponse.decode(new BinaryReader(data)));
5796
2997
  }
5797
2998
  }
5798
2999
 
5799
3000
  interface Rpc {
5800
3001
  request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
5801
- clientStreamingRequest(
5802
- service: string,
5803
- method: string,
5804
- data: Observable<Uint8Array>,
5805
- metadata?: Metadata,
5806
- ): Promise<Uint8Array>;
5807
- serverStreamingRequest(
5808
- service: string,
5809
- method: string,
5810
- data: Uint8Array,
5811
- metadata?: Metadata,
5812
- ): Observable<Uint8Array>;
5813
- bidirectionalStreamingRequest(
5814
- service: string,
5815
- method: string,
5816
- data: Observable<Uint8Array>,
5817
- metadata?: Metadata,
5818
- ): Observable<Uint8Array>;
5819
3002
  }
5820
3003
 
5821
3004
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;