weave-typescript 0.38.0 → 0.39.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.
@@ -5,8 +5,8 @@
5
5
  // protoc unknown
6
6
  // source: weaveapi/ingestion/v1/ingestion.proto
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.CreateDocumentThreadResponse = exports.CreateDocumentThreadRequest = exports.EditThreadRequest = exports.GetThreadRequest = exports.RetryIngestionResponse = exports.RetryIngestionRequest = exports.DeleteDocumentResponse = exports.DeleteDocumentRequest = exports.UpdateDocumentTagsResponse = exports.UpdateDocumentTagsRequest = exports.GetDocumentSourceResponse = exports.GetDocumentSourceRequest = exports.GetDocumentDetailResponse = exports.GetDocumentDetailRequest = exports.ListDocumentsResponse = exports.ListDocumentsRequest = exports.ListIngestionHistoryResponse = exports.ListIngestionHistoryRequest = exports.GetIngestionRunRequest = exports.StreamPipelineRequest = exports.UploadFileResponse = exports.UploadFileRequest = exports.IngestionHistoryEntry = exports.IngestionRun = exports.Thread = exports.DocumentSourceBlock = exports.DocumentDetail = exports.DocumentActionPermissions = exports.DocumentSummary = exports.DocumentThreadCounts = exports.Document = exports.Entity = exports.FacetConfig = exports.FacetFieldDefinition = exports.TemporalValidity = exports.SourceLocation = exports.UserSensitivityClearance = exports.SensitivityTagDefinition = exports.DocumentTag = exports.DocumentSourceBlockKind = exports.SortDirection = exports.DocumentSortField = exports.TemporalValidityKind = exports.ThreadActivityAction = exports.ThreadRetrievalStatus = exports.ThreadClassification = exports.IngestionRunStatus = exports.DocumentScope = exports.DocumentStatus = exports.protobufPackage = void 0;
9
- exports.PipelineEvent_PipelineFailed = exports.PipelineEvent_PipelineComplete = exports.PipelineEvent_DiffDecision = exports.PipelineEvent_ReconcileMatch = exports.PipelineEvent_EmbedComplete = exports.PipelineEvent_EmbedStarted = exports.PipelineEvent_ExtractThread = exports.PipelineEvent_ClassifyTag = exports.PipelineEvent_ParseComplete = exports.PipelineEvent_ParseStarted = exports.PipelineEvent = exports.RejectThreadResponse = exports.ApproveThreadResponse = exports.EditThreadResponse = exports.GetThreadResponse = exports.GetIngestionRunResponse = exports.StreamPipelineResponse = exports.BulkRejectThreadsResponse = exports.BulkRejectThreadsRequest = exports.BulkApproveThreadsResponse = exports.BulkApproveThreadsRequest = exports.RejectThreadRequest = exports.ApproveThreadRequest = exports.DeleteDocumentThreadResponse = exports.DeleteDocumentThreadRequest = exports.UpdateDocumentThreadResponse = exports.UpdateDocumentThreadRequest = void 0;
8
+ exports.GetRestrictedGroupRequest = exports.ListRestrictedGroupsResponse = exports.ListRestrictedGroupsRequest = exports.DeleteDocumentResponse = exports.DeleteDocumentRequest = exports.UpdateDocumentTagsResponse = exports.UpdateDocumentTagsRequest = exports.GetDocumentSourceResponse = exports.GetDocumentSourceRequest = exports.GetDocumentDetailResponse = exports.GetDocumentDetailRequest = exports.ListDocumentsResponse = exports.ListDocumentsRequest = exports.ListIngestionHistoryResponse = exports.ListIngestionHistoryRequest = exports.GetIngestionRunRequest = exports.StreamPipelineRequest = exports.UploadFileResponse = exports.UploadFileRequest = exports.IngestionHistoryEntry = exports.IngestionRun = exports.Thread = exports.DocumentSourceBlock = exports.DocumentDetail = exports.DocumentActionPermissions = exports.DocumentSummary = exports.DocumentThreadCounts = exports.Document = exports.Entity = exports.FacetConfig = exports.FacetFieldDefinition = exports.TemporalValidity = exports.SourceLocation = exports.RestrictedGroupReplacement = exports.RestrictedGroup = exports.UserSensitivityClearance = exports.SensitivityTagDefinition = exports.DocumentTag = exports.RestrictedGroupReplacementTarget = exports.DocumentSourceBlockKind = exports.SortDirection = exports.DocumentSortField = exports.TemporalValidityKind = exports.ThreadActivityAction = exports.ThreadRetrievalStatus = exports.ThreadClassification = exports.IngestionRunStatus = exports.DocumentScope = exports.DocumentStatus = exports.protobufPackage = void 0;
9
+ exports.PipelineEvent_PipelineFailed = exports.PipelineEvent_PipelineComplete = exports.PipelineEvent_DiffDecision = exports.PipelineEvent_ReconcileMatch = exports.PipelineEvent_EmbedComplete = exports.PipelineEvent_EmbedStarted = exports.PipelineEvent_ExtractThread = exports.PipelineEvent_ClassifyTag = exports.PipelineEvent_ParseComplete = exports.PipelineEvent_ParseStarted = exports.PipelineEvent = exports.RejectThreadResponse = exports.ApproveThreadResponse = exports.EditThreadResponse = exports.GetThreadResponse = exports.GetIngestionRunResponse = exports.StreamPipelineResponse = exports.BulkRejectThreadsResponse = exports.BulkRejectThreadsRequest = exports.BulkApproveThreadsResponse = exports.BulkApproveThreadsRequest = exports.RejectThreadRequest = exports.ApproveThreadRequest = exports.DeleteDocumentThreadResponse = exports.DeleteDocumentThreadRequest = exports.UpdateDocumentThreadResponse = exports.UpdateDocumentThreadRequest = exports.CreateDocumentThreadResponse = exports.CreateDocumentThreadRequest = exports.EditThreadRequest = exports.GetThreadRequest = exports.RetryIngestionResponse = exports.RetryIngestionRequest = exports.DeleteRestrictedGroupResponse = exports.DeleteRestrictedGroupRequest = exports.UpdateRestrictedGroupResponse = exports.UpdateRestrictedGroupRequest = exports.CreateRestrictedGroupResponse = exports.CreateRestrictedGroupRequest = exports.GetRestrictedGroupResponse = void 0;
10
10
  exports.documentStatusFromJSON = documentStatusFromJSON;
11
11
  exports.documentStatusToJSON = documentStatusToJSON;
12
12
  exports.documentScopeFromJSON = documentScopeFromJSON;
@@ -27,6 +27,8 @@ exports.sortDirectionFromJSON = sortDirectionFromJSON;
27
27
  exports.sortDirectionToJSON = sortDirectionToJSON;
28
28
  exports.documentSourceBlockKindFromJSON = documentSourceBlockKindFromJSON;
29
29
  exports.documentSourceBlockKindToJSON = documentSourceBlockKindToJSON;
30
+ exports.restrictedGroupReplacementTargetFromJSON = restrictedGroupReplacementTargetFromJSON;
31
+ exports.restrictedGroupReplacementTargetToJSON = restrictedGroupReplacementTargetToJSON;
30
32
  /* eslint-disable */
31
33
  const wire_1 = require("@bufbuild/protobuf/wire");
32
34
  const struct_pb_1 = require("../../../google/protobuf/struct.pb");
@@ -576,6 +578,49 @@ function documentSourceBlockKindToJSON(object) {
576
578
  return "UNRECOGNIZED";
577
579
  }
578
580
  }
581
+ var RestrictedGroupReplacementTarget;
582
+ (function (RestrictedGroupReplacementTarget) {
583
+ RestrictedGroupReplacementTarget[RestrictedGroupReplacementTarget["RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED"] = 0] = "RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED";
584
+ RestrictedGroupReplacementTarget[RestrictedGroupReplacementTarget["RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC"] = 1] = "RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC";
585
+ RestrictedGroupReplacementTarget[RestrictedGroupReplacementTarget["RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE"] = 2] = "RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE";
586
+ RestrictedGroupReplacementTarget[RestrictedGroupReplacementTarget["RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS"] = 3] = "RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS";
587
+ RestrictedGroupReplacementTarget[RestrictedGroupReplacementTarget["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
588
+ })(RestrictedGroupReplacementTarget || (exports.RestrictedGroupReplacementTarget = RestrictedGroupReplacementTarget = {}));
589
+ function restrictedGroupReplacementTargetFromJSON(object) {
590
+ switch (object) {
591
+ case 0:
592
+ case "RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED":
593
+ return RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED;
594
+ case 1:
595
+ case "RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC":
596
+ return RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC;
597
+ case 2:
598
+ case "RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE":
599
+ return RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE;
600
+ case 3:
601
+ case "RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS":
602
+ return RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS;
603
+ case -1:
604
+ case "UNRECOGNIZED":
605
+ default:
606
+ return RestrictedGroupReplacementTarget.UNRECOGNIZED;
607
+ }
608
+ }
609
+ function restrictedGroupReplacementTargetToJSON(object) {
610
+ switch (object) {
611
+ case RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED:
612
+ return "RESTRICTED_GROUP_REPLACEMENT_TARGET_UNSPECIFIED";
613
+ case RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC:
614
+ return "RESTRICTED_GROUP_REPLACEMENT_TARGET_PUBLIC";
615
+ case RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE:
616
+ return "RESTRICTED_GROUP_REPLACEMENT_TARGET_PRIVATE";
617
+ case RestrictedGroupReplacementTarget.RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS:
618
+ return "RESTRICTED_GROUP_REPLACEMENT_TARGET_RESTRICTED_GROUPS";
619
+ case RestrictedGroupReplacementTarget.UNRECOGNIZED:
620
+ default:
621
+ return "UNRECOGNIZED";
622
+ }
623
+ }
579
624
  function createBaseDocumentTag() {
580
625
  return { tag: "", confidence: 0 };
581
626
  }
@@ -944,23 +989,62 @@ exports.UserSensitivityClearance = {
944
989
  return message;
945
990
  },
946
991
  };
947
- function createBaseSourceLocation() {
948
- return { type: "", value: undefined };
992
+ function createBaseRestrictedGroup() {
993
+ return {
994
+ id: "",
995
+ organizationId: "",
996
+ slug: "",
997
+ name: "",
998
+ description: "",
999
+ active: false,
1000
+ userIds: [],
1001
+ orgTeamIds: [],
1002
+ documentCount: 0,
1003
+ createdAt: undefined,
1004
+ updatedAt: undefined,
1005
+ };
949
1006
  }
950
- exports.SourceLocation = {
1007
+ exports.RestrictedGroup = {
951
1008
  encode(message, writer = new wire_1.BinaryWriter()) {
952
- if (message.type !== "") {
953
- writer.uint32(10).string(message.type);
1009
+ if (message.id !== "") {
1010
+ writer.uint32(10).string(message.id);
954
1011
  }
955
- if (message.value !== undefined) {
956
- struct_pb_1.Value.encode(struct_pb_1.Value.wrap(message.value), writer.uint32(18).fork()).join();
1012
+ if (message.organizationId !== "") {
1013
+ writer.uint32(18).string(message.organizationId);
1014
+ }
1015
+ if (message.slug !== "") {
1016
+ writer.uint32(26).string(message.slug);
1017
+ }
1018
+ if (message.name !== "") {
1019
+ writer.uint32(34).string(message.name);
1020
+ }
1021
+ if (message.description !== "") {
1022
+ writer.uint32(42).string(message.description);
1023
+ }
1024
+ if (message.active !== false) {
1025
+ writer.uint32(48).bool(message.active);
1026
+ }
1027
+ for (const v of message.userIds) {
1028
+ writer.uint32(58).string(v);
1029
+ }
1030
+ for (const v of message.orgTeamIds) {
1031
+ writer.uint32(66).string(v);
1032
+ }
1033
+ if (message.documentCount !== 0) {
1034
+ writer.uint32(72).int32(message.documentCount);
1035
+ }
1036
+ if (message.createdAt !== undefined) {
1037
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.createdAt), writer.uint32(82).fork()).join();
1038
+ }
1039
+ if (message.updatedAt !== undefined) {
1040
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(90).fork()).join();
957
1041
  }
958
1042
  return writer;
959
1043
  },
960
1044
  decode(input, length) {
961
1045
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
962
1046
  const end = length === undefined ? reader.len : reader.pos + length;
963
- const message = createBaseSourceLocation();
1047
+ const message = createBaseRestrictedGroup();
964
1048
  while (reader.pos < end) {
965
1049
  const tag = reader.uint32();
966
1050
  switch (tag >>> 3) {
@@ -968,14 +1052,77 @@ exports.SourceLocation = {
968
1052
  if (tag !== 10) {
969
1053
  break;
970
1054
  }
971
- message.type = reader.string();
1055
+ message.id = reader.string();
972
1056
  continue;
973
1057
  }
974
1058
  case 2: {
975
1059
  if (tag !== 18) {
976
1060
  break;
977
1061
  }
978
- message.value = struct_pb_1.Value.unwrap(struct_pb_1.Value.decode(reader, reader.uint32()));
1062
+ message.organizationId = reader.string();
1063
+ continue;
1064
+ }
1065
+ case 3: {
1066
+ if (tag !== 26) {
1067
+ break;
1068
+ }
1069
+ message.slug = reader.string();
1070
+ continue;
1071
+ }
1072
+ case 4: {
1073
+ if (tag !== 34) {
1074
+ break;
1075
+ }
1076
+ message.name = reader.string();
1077
+ continue;
1078
+ }
1079
+ case 5: {
1080
+ if (tag !== 42) {
1081
+ break;
1082
+ }
1083
+ message.description = reader.string();
1084
+ continue;
1085
+ }
1086
+ case 6: {
1087
+ if (tag !== 48) {
1088
+ break;
1089
+ }
1090
+ message.active = reader.bool();
1091
+ continue;
1092
+ }
1093
+ case 7: {
1094
+ if (tag !== 58) {
1095
+ break;
1096
+ }
1097
+ message.userIds.push(reader.string());
1098
+ continue;
1099
+ }
1100
+ case 8: {
1101
+ if (tag !== 66) {
1102
+ break;
1103
+ }
1104
+ message.orgTeamIds.push(reader.string());
1105
+ continue;
1106
+ }
1107
+ case 9: {
1108
+ if (tag !== 72) {
1109
+ break;
1110
+ }
1111
+ message.documentCount = reader.int32();
1112
+ continue;
1113
+ }
1114
+ case 10: {
1115
+ if (tag !== 82) {
1116
+ break;
1117
+ }
1118
+ message.createdAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1119
+ continue;
1120
+ }
1121
+ case 11: {
1122
+ if (tag !== 90) {
1123
+ break;
1124
+ }
1125
+ message.updatedAt = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
979
1126
  continue;
980
1127
  }
981
1128
  }
@@ -988,51 +1135,119 @@ exports.SourceLocation = {
988
1135
  },
989
1136
  fromJSON(object) {
990
1137
  return {
991
- type: isSet(object.type) ? globalThis.String(object.type) : "",
992
- value: isSet(object === null || object === void 0 ? void 0 : object.value) ? object.value : undefined,
1138
+ id: isSet(object.id) ? globalThis.String(object.id) : "",
1139
+ organizationId: isSet(object.organizationId)
1140
+ ? globalThis.String(object.organizationId)
1141
+ : isSet(object.organization_id)
1142
+ ? globalThis.String(object.organization_id)
1143
+ : "",
1144
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
1145
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1146
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
1147
+ active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
1148
+ userIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.userIds)
1149
+ ? object.userIds.map((e) => globalThis.String(e))
1150
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.user_ids)
1151
+ ? object.user_ids.map((e) => globalThis.String(e))
1152
+ : [],
1153
+ orgTeamIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.orgTeamIds)
1154
+ ? object.orgTeamIds.map((e) => globalThis.String(e))
1155
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.org_team_ids)
1156
+ ? object.org_team_ids.map((e) => globalThis.String(e))
1157
+ : [],
1158
+ documentCount: isSet(object.documentCount)
1159
+ ? globalThis.Number(object.documentCount)
1160
+ : isSet(object.document_count)
1161
+ ? globalThis.Number(object.document_count)
1162
+ : 0,
1163
+ createdAt: isSet(object.createdAt)
1164
+ ? fromJsonTimestamp(object.createdAt)
1165
+ : isSet(object.created_at)
1166
+ ? fromJsonTimestamp(object.created_at)
1167
+ : undefined,
1168
+ updatedAt: isSet(object.updatedAt)
1169
+ ? fromJsonTimestamp(object.updatedAt)
1170
+ : isSet(object.updated_at)
1171
+ ? fromJsonTimestamp(object.updated_at)
1172
+ : undefined,
993
1173
  };
994
1174
  },
995
1175
  toJSON(message) {
1176
+ var _a, _b;
996
1177
  const obj = {};
997
- if (message.type !== "") {
998
- obj.type = message.type;
1178
+ if (message.id !== "") {
1179
+ obj.id = message.id;
999
1180
  }
1000
- if (message.value !== undefined) {
1001
- obj.value = message.value;
1181
+ if (message.organizationId !== "") {
1182
+ obj.organizationId = message.organizationId;
1183
+ }
1184
+ if (message.slug !== "") {
1185
+ obj.slug = message.slug;
1186
+ }
1187
+ if (message.name !== "") {
1188
+ obj.name = message.name;
1189
+ }
1190
+ if (message.description !== "") {
1191
+ obj.description = message.description;
1192
+ }
1193
+ if (message.active !== false) {
1194
+ obj.active = message.active;
1195
+ }
1196
+ if ((_a = message.userIds) === null || _a === void 0 ? void 0 : _a.length) {
1197
+ obj.userIds = message.userIds;
1198
+ }
1199
+ if ((_b = message.orgTeamIds) === null || _b === void 0 ? void 0 : _b.length) {
1200
+ obj.orgTeamIds = message.orgTeamIds;
1201
+ }
1202
+ if (message.documentCount !== 0) {
1203
+ obj.documentCount = Math.round(message.documentCount);
1204
+ }
1205
+ if (message.createdAt !== undefined) {
1206
+ obj.createdAt = message.createdAt.toISOString();
1207
+ }
1208
+ if (message.updatedAt !== undefined) {
1209
+ obj.updatedAt = message.updatedAt.toISOString();
1002
1210
  }
1003
1211
  return obj;
1004
1212
  },
1005
1213
  create(base) {
1006
- return exports.SourceLocation.fromPartial(base !== null && base !== void 0 ? base : {});
1214
+ return exports.RestrictedGroup.fromPartial(base !== null && base !== void 0 ? base : {});
1007
1215
  },
1008
1216
  fromPartial(object) {
1009
1217
  var _a, _b;
1010
- const message = createBaseSourceLocation();
1011
- message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
1012
- message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined;
1218
+ var _c, _d, _e, _f, _g, _h, _j, _k, _l;
1219
+ const message = createBaseRestrictedGroup();
1220
+ message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
1221
+ message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
1222
+ message.slug = (_e = object.slug) !== null && _e !== void 0 ? _e : "";
1223
+ message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
1224
+ message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
1225
+ message.active = (_h = object.active) !== null && _h !== void 0 ? _h : false;
1226
+ message.userIds = ((_a = object.userIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1227
+ message.orgTeamIds = ((_b = object.orgTeamIds) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
1228
+ message.documentCount = (_j = object.documentCount) !== null && _j !== void 0 ? _j : 0;
1229
+ message.createdAt = (_k = object.createdAt) !== null && _k !== void 0 ? _k : undefined;
1230
+ message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
1013
1231
  return message;
1014
1232
  },
1015
1233
  };
1016
- function createBaseTemporalValidity() {
1017
- return { kind: 0, validFrom: undefined, validUntil: undefined };
1234
+ function createBaseRestrictedGroupReplacement() {
1235
+ return { target: 0, restrictedGroupIds: [] };
1018
1236
  }
1019
- exports.TemporalValidity = {
1237
+ exports.RestrictedGroupReplacement = {
1020
1238
  encode(message, writer = new wire_1.BinaryWriter()) {
1021
- if (message.kind !== 0) {
1022
- writer.uint32(8).int32(message.kind);
1023
- }
1024
- if (message.validFrom !== undefined) {
1025
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.validFrom), writer.uint32(18).fork()).join();
1239
+ if (message.target !== 0) {
1240
+ writer.uint32(8).int32(message.target);
1026
1241
  }
1027
- if (message.validUntil !== undefined) {
1028
- timestamp_pb_1.Timestamp.encode(toTimestamp(message.validUntil), writer.uint32(26).fork()).join();
1242
+ for (const v of message.restrictedGroupIds) {
1243
+ writer.uint32(18).string(v);
1029
1244
  }
1030
1245
  return writer;
1031
1246
  },
1032
1247
  decode(input, length) {
1033
1248
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1034
1249
  const end = length === undefined ? reader.len : reader.pos + length;
1035
- const message = createBaseTemporalValidity();
1250
+ const message = createBaseRestrictedGroupReplacement();
1036
1251
  while (reader.pos < end) {
1037
1252
  const tag = reader.uint32();
1038
1253
  switch (tag >>> 3) {
@@ -1040,21 +1255,14 @@ exports.TemporalValidity = {
1040
1255
  if (tag !== 8) {
1041
1256
  break;
1042
1257
  }
1043
- message.kind = reader.int32();
1258
+ message.target = reader.int32();
1044
1259
  continue;
1045
1260
  }
1046
1261
  case 2: {
1047
1262
  if (tag !== 18) {
1048
1263
  break;
1049
1264
  }
1050
- message.validFrom = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1051
- continue;
1052
- }
1053
- case 3: {
1054
- if (tag !== 26) {
1055
- break;
1056
- }
1057
- message.validUntil = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1265
+ message.restrictedGroupIds.push(reader.string());
1058
1266
  continue;
1059
1267
  }
1060
1268
  }
@@ -1067,61 +1275,54 @@ exports.TemporalValidity = {
1067
1275
  },
1068
1276
  fromJSON(object) {
1069
1277
  return {
1070
- kind: isSet(object.kind) ? temporalValidityKindFromJSON(object.kind) : 0,
1071
- validFrom: isSet(object.validFrom)
1072
- ? fromJsonTimestamp(object.validFrom)
1073
- : isSet(object.valid_from)
1074
- ? fromJsonTimestamp(object.valid_from)
1075
- : undefined,
1076
- validUntil: isSet(object.validUntil)
1077
- ? fromJsonTimestamp(object.validUntil)
1078
- : isSet(object.valid_until)
1079
- ? fromJsonTimestamp(object.valid_until)
1080
- : undefined,
1278
+ target: isSet(object.target) ? restrictedGroupReplacementTargetFromJSON(object.target) : 0,
1279
+ restrictedGroupIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restrictedGroupIds)
1280
+ ? object.restrictedGroupIds.map((e) => globalThis.String(e))
1281
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restricted_group_ids)
1282
+ ? object.restricted_group_ids.map((e) => globalThis.String(e))
1283
+ : [],
1081
1284
  };
1082
1285
  },
1083
1286
  toJSON(message) {
1287
+ var _a;
1084
1288
  const obj = {};
1085
- if (message.kind !== 0) {
1086
- obj.kind = temporalValidityKindToJSON(message.kind);
1087
- }
1088
- if (message.validFrom !== undefined) {
1089
- obj.validFrom = message.validFrom.toISOString();
1289
+ if (message.target !== 0) {
1290
+ obj.target = restrictedGroupReplacementTargetToJSON(message.target);
1090
1291
  }
1091
- if (message.validUntil !== undefined) {
1092
- obj.validUntil = message.validUntil.toISOString();
1292
+ if ((_a = message.restrictedGroupIds) === null || _a === void 0 ? void 0 : _a.length) {
1293
+ obj.restrictedGroupIds = message.restrictedGroupIds;
1093
1294
  }
1094
1295
  return obj;
1095
1296
  },
1096
1297
  create(base) {
1097
- return exports.TemporalValidity.fromPartial(base !== null && base !== void 0 ? base : {});
1298
+ return exports.RestrictedGroupReplacement.fromPartial(base !== null && base !== void 0 ? base : {});
1098
1299
  },
1099
1300
  fromPartial(object) {
1100
- var _a, _b, _c;
1101
- const message = createBaseTemporalValidity();
1102
- message.kind = (_a = object.kind) !== null && _a !== void 0 ? _a : 0;
1103
- message.validFrom = (_b = object.validFrom) !== null && _b !== void 0 ? _b : undefined;
1104
- message.validUntil = (_c = object.validUntil) !== null && _c !== void 0 ? _c : undefined;
1301
+ var _a;
1302
+ var _b;
1303
+ const message = createBaseRestrictedGroupReplacement();
1304
+ message.target = (_b = object.target) !== null && _b !== void 0 ? _b : 0;
1305
+ message.restrictedGroupIds = ((_a = object.restrictedGroupIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
1105
1306
  return message;
1106
1307
  },
1107
1308
  };
1108
- function createBaseFacetFieldDefinition() {
1109
- return { name: "", type: "" };
1309
+ function createBaseSourceLocation() {
1310
+ return { type: "", value: undefined };
1110
1311
  }
1111
- exports.FacetFieldDefinition = {
1312
+ exports.SourceLocation = {
1112
1313
  encode(message, writer = new wire_1.BinaryWriter()) {
1113
- if (message.name !== "") {
1114
- writer.uint32(10).string(message.name);
1115
- }
1116
1314
  if (message.type !== "") {
1117
- writer.uint32(18).string(message.type);
1315
+ writer.uint32(10).string(message.type);
1316
+ }
1317
+ if (message.value !== undefined) {
1318
+ struct_pb_1.Value.encode(struct_pb_1.Value.wrap(message.value), writer.uint32(18).fork()).join();
1118
1319
  }
1119
1320
  return writer;
1120
1321
  },
1121
1322
  decode(input, length) {
1122
1323
  const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1123
1324
  const end = length === undefined ? reader.len : reader.pos + length;
1124
- const message = createBaseFacetFieldDefinition();
1325
+ const message = createBaseSourceLocation();
1125
1326
  while (reader.pos < end) {
1126
1327
  const tag = reader.uint32();
1127
1328
  switch (tag >>> 3) {
@@ -1129,14 +1330,14 @@ exports.FacetFieldDefinition = {
1129
1330
  if (tag !== 10) {
1130
1331
  break;
1131
1332
  }
1132
- message.name = reader.string();
1333
+ message.type = reader.string();
1133
1334
  continue;
1134
1335
  }
1135
1336
  case 2: {
1136
1337
  if (tag !== 18) {
1137
1338
  break;
1138
1339
  }
1139
- message.type = reader.string();
1340
+ message.value = struct_pb_1.Value.unwrap(struct_pb_1.Value.decode(reader, reader.uint32()));
1140
1341
  continue;
1141
1342
  }
1142
1343
  }
@@ -1149,22 +1350,183 @@ exports.FacetFieldDefinition = {
1149
1350
  },
1150
1351
  fromJSON(object) {
1151
1352
  return {
1152
- name: isSet(object.name) ? globalThis.String(object.name) : "",
1153
1353
  type: isSet(object.type) ? globalThis.String(object.type) : "",
1354
+ value: isSet(object === null || object === void 0 ? void 0 : object.value) ? object.value : undefined,
1154
1355
  };
1155
1356
  },
1156
1357
  toJSON(message) {
1157
1358
  const obj = {};
1158
- if (message.name !== "") {
1159
- obj.name = message.name;
1160
- }
1161
1359
  if (message.type !== "") {
1162
1360
  obj.type = message.type;
1163
1361
  }
1362
+ if (message.value !== undefined) {
1363
+ obj.value = message.value;
1364
+ }
1164
1365
  return obj;
1165
1366
  },
1166
1367
  create(base) {
1167
- return exports.FacetFieldDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
1368
+ return exports.SourceLocation.fromPartial(base !== null && base !== void 0 ? base : {});
1369
+ },
1370
+ fromPartial(object) {
1371
+ var _a, _b;
1372
+ const message = createBaseSourceLocation();
1373
+ message.type = (_a = object.type) !== null && _a !== void 0 ? _a : "";
1374
+ message.value = (_b = object.value) !== null && _b !== void 0 ? _b : undefined;
1375
+ return message;
1376
+ },
1377
+ };
1378
+ function createBaseTemporalValidity() {
1379
+ return { kind: 0, validFrom: undefined, validUntil: undefined };
1380
+ }
1381
+ exports.TemporalValidity = {
1382
+ encode(message, writer = new wire_1.BinaryWriter()) {
1383
+ if (message.kind !== 0) {
1384
+ writer.uint32(8).int32(message.kind);
1385
+ }
1386
+ if (message.validFrom !== undefined) {
1387
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.validFrom), writer.uint32(18).fork()).join();
1388
+ }
1389
+ if (message.validUntil !== undefined) {
1390
+ timestamp_pb_1.Timestamp.encode(toTimestamp(message.validUntil), writer.uint32(26).fork()).join();
1391
+ }
1392
+ return writer;
1393
+ },
1394
+ decode(input, length) {
1395
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1396
+ const end = length === undefined ? reader.len : reader.pos + length;
1397
+ const message = createBaseTemporalValidity();
1398
+ while (reader.pos < end) {
1399
+ const tag = reader.uint32();
1400
+ switch (tag >>> 3) {
1401
+ case 1: {
1402
+ if (tag !== 8) {
1403
+ break;
1404
+ }
1405
+ message.kind = reader.int32();
1406
+ continue;
1407
+ }
1408
+ case 2: {
1409
+ if (tag !== 18) {
1410
+ break;
1411
+ }
1412
+ message.validFrom = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1413
+ continue;
1414
+ }
1415
+ case 3: {
1416
+ if (tag !== 26) {
1417
+ break;
1418
+ }
1419
+ message.validUntil = fromTimestamp(timestamp_pb_1.Timestamp.decode(reader, reader.uint32()));
1420
+ continue;
1421
+ }
1422
+ }
1423
+ if ((tag & 7) === 4 || tag === 0) {
1424
+ break;
1425
+ }
1426
+ reader.skip(tag & 7);
1427
+ }
1428
+ return message;
1429
+ },
1430
+ fromJSON(object) {
1431
+ return {
1432
+ kind: isSet(object.kind) ? temporalValidityKindFromJSON(object.kind) : 0,
1433
+ validFrom: isSet(object.validFrom)
1434
+ ? fromJsonTimestamp(object.validFrom)
1435
+ : isSet(object.valid_from)
1436
+ ? fromJsonTimestamp(object.valid_from)
1437
+ : undefined,
1438
+ validUntil: isSet(object.validUntil)
1439
+ ? fromJsonTimestamp(object.validUntil)
1440
+ : isSet(object.valid_until)
1441
+ ? fromJsonTimestamp(object.valid_until)
1442
+ : undefined,
1443
+ };
1444
+ },
1445
+ toJSON(message) {
1446
+ const obj = {};
1447
+ if (message.kind !== 0) {
1448
+ obj.kind = temporalValidityKindToJSON(message.kind);
1449
+ }
1450
+ if (message.validFrom !== undefined) {
1451
+ obj.validFrom = message.validFrom.toISOString();
1452
+ }
1453
+ if (message.validUntil !== undefined) {
1454
+ obj.validUntil = message.validUntil.toISOString();
1455
+ }
1456
+ return obj;
1457
+ },
1458
+ create(base) {
1459
+ return exports.TemporalValidity.fromPartial(base !== null && base !== void 0 ? base : {});
1460
+ },
1461
+ fromPartial(object) {
1462
+ var _a, _b, _c;
1463
+ const message = createBaseTemporalValidity();
1464
+ message.kind = (_a = object.kind) !== null && _a !== void 0 ? _a : 0;
1465
+ message.validFrom = (_b = object.validFrom) !== null && _b !== void 0 ? _b : undefined;
1466
+ message.validUntil = (_c = object.validUntil) !== null && _c !== void 0 ? _c : undefined;
1467
+ return message;
1468
+ },
1469
+ };
1470
+ function createBaseFacetFieldDefinition() {
1471
+ return { name: "", type: "" };
1472
+ }
1473
+ exports.FacetFieldDefinition = {
1474
+ encode(message, writer = new wire_1.BinaryWriter()) {
1475
+ if (message.name !== "") {
1476
+ writer.uint32(10).string(message.name);
1477
+ }
1478
+ if (message.type !== "") {
1479
+ writer.uint32(18).string(message.type);
1480
+ }
1481
+ return writer;
1482
+ },
1483
+ decode(input, length) {
1484
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
1485
+ const end = length === undefined ? reader.len : reader.pos + length;
1486
+ const message = createBaseFacetFieldDefinition();
1487
+ while (reader.pos < end) {
1488
+ const tag = reader.uint32();
1489
+ switch (tag >>> 3) {
1490
+ case 1: {
1491
+ if (tag !== 10) {
1492
+ break;
1493
+ }
1494
+ message.name = reader.string();
1495
+ continue;
1496
+ }
1497
+ case 2: {
1498
+ if (tag !== 18) {
1499
+ break;
1500
+ }
1501
+ message.type = reader.string();
1502
+ continue;
1503
+ }
1504
+ }
1505
+ if ((tag & 7) === 4 || tag === 0) {
1506
+ break;
1507
+ }
1508
+ reader.skip(tag & 7);
1509
+ }
1510
+ return message;
1511
+ },
1512
+ fromJSON(object) {
1513
+ return {
1514
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
1515
+ type: isSet(object.type) ? globalThis.String(object.type) : "",
1516
+ };
1517
+ },
1518
+ toJSON(message) {
1519
+ const obj = {};
1520
+ if (message.name !== "") {
1521
+ obj.name = message.name;
1522
+ }
1523
+ if (message.type !== "") {
1524
+ obj.type = message.type;
1525
+ }
1526
+ return obj;
1527
+ },
1528
+ create(base) {
1529
+ return exports.FacetFieldDefinition.fromPartial(base !== null && base !== void 0 ? base : {});
1168
1530
  },
1169
1531
  fromPartial(object) {
1170
1532
  var _a, _b;
@@ -1452,6 +1814,7 @@ function createBaseDocument() {
1452
1814
  tags: [],
1453
1815
  metadata: undefined,
1454
1816
  sensitivityTags: [],
1817
+ restrictedGroups: [],
1455
1818
  };
1456
1819
  }
1457
1820
  exports.Document = {
@@ -1501,6 +1864,9 @@ exports.Document = {
1501
1864
  for (const v of message.sensitivityTags) {
1502
1865
  writer.uint32(130).string(v);
1503
1866
  }
1867
+ for (const v of message.restrictedGroups) {
1868
+ exports.RestrictedGroup.encode(v, writer.uint32(138).fork()).join();
1869
+ }
1504
1870
  return writer;
1505
1871
  },
1506
1872
  decode(input, length) {
@@ -1615,6 +1981,13 @@ exports.Document = {
1615
1981
  message.sensitivityTags.push(reader.string());
1616
1982
  continue;
1617
1983
  }
1984
+ case 17: {
1985
+ if (tag !== 138) {
1986
+ break;
1987
+ }
1988
+ message.restrictedGroups.push(exports.RestrictedGroup.decode(reader, reader.uint32()));
1989
+ continue;
1990
+ }
1618
1991
  }
1619
1992
  if ((tag & 7) === 4 || tag === 0) {
1620
1993
  break;
@@ -1678,10 +2051,15 @@ exports.Document = {
1678
2051
  : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.sensitivity_tags)
1679
2052
  ? object.sensitivity_tags.map((e) => globalThis.String(e))
1680
2053
  : [],
2054
+ restrictedGroups: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restrictedGroups)
2055
+ ? object.restrictedGroups.map((e) => exports.RestrictedGroup.fromJSON(e))
2056
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restricted_groups)
2057
+ ? object.restricted_groups.map((e) => exports.RestrictedGroup.fromJSON(e))
2058
+ : [],
1681
2059
  };
1682
2060
  },
1683
2061
  toJSON(message) {
1684
- var _a, _b;
2062
+ var _a, _b, _c;
1685
2063
  const obj = {};
1686
2064
  if (message.id !== "") {
1687
2065
  obj.id = message.id;
@@ -1728,30 +2106,34 @@ exports.Document = {
1728
2106
  if ((_b = message.sensitivityTags) === null || _b === void 0 ? void 0 : _b.length) {
1729
2107
  obj.sensitivityTags = message.sensitivityTags;
1730
2108
  }
2109
+ if ((_c = message.restrictedGroups) === null || _c === void 0 ? void 0 : _c.length) {
2110
+ obj.restrictedGroups = message.restrictedGroups.map((e) => exports.RestrictedGroup.toJSON(e));
2111
+ }
1731
2112
  return obj;
1732
2113
  },
1733
2114
  create(base) {
1734
2115
  return exports.Document.fromPartial(base !== null && base !== void 0 ? base : {});
1735
2116
  },
1736
2117
  fromPartial(object) {
1737
- var _a, _b;
1738
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
2118
+ var _a, _b, _c;
2119
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1739
2120
  const message = createBaseDocument();
1740
- message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
1741
- message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
1742
- message.filename = (_e = object.filename) !== null && _e !== void 0 ? _e : "";
1743
- message.mimeType = (_f = object.mimeType) !== null && _f !== void 0 ? _f : "";
1744
- message.parserName = (_g = object.parserName) !== null && _g !== void 0 ? _g : "";
1745
- message.status = (_h = object.status) !== null && _h !== void 0 ? _h : 0;
1746
- message.uploadedByUserId = (_j = object.uploadedByUserId) !== null && _j !== void 0 ? _j : "";
1747
- message.uploadedAt = (_k = object.uploadedAt) !== null && _k !== void 0 ? _k : undefined;
1748
- message.updatedAt = (_l = object.updatedAt) !== null && _l !== void 0 ? _l : undefined;
1749
- message.scope = (_m = object.scope) !== null && _m !== void 0 ? _m : 0;
1750
- message.pageCount = (_o = object.pageCount) !== null && _o !== void 0 ? _o : 0;
1751
- message.charCount = (_p = object.charCount) !== null && _p !== void 0 ? _p : 0;
2121
+ message.id = (_d = object.id) !== null && _d !== void 0 ? _d : "";
2122
+ message.organizationId = (_e = object.organizationId) !== null && _e !== void 0 ? _e : "";
2123
+ message.filename = (_f = object.filename) !== null && _f !== void 0 ? _f : "";
2124
+ message.mimeType = (_g = object.mimeType) !== null && _g !== void 0 ? _g : "";
2125
+ message.parserName = (_h = object.parserName) !== null && _h !== void 0 ? _h : "";
2126
+ message.status = (_j = object.status) !== null && _j !== void 0 ? _j : 0;
2127
+ message.uploadedByUserId = (_k = object.uploadedByUserId) !== null && _k !== void 0 ? _k : "";
2128
+ message.uploadedAt = (_l = object.uploadedAt) !== null && _l !== void 0 ? _l : undefined;
2129
+ message.updatedAt = (_m = object.updatedAt) !== null && _m !== void 0 ? _m : undefined;
2130
+ message.scope = (_o = object.scope) !== null && _o !== void 0 ? _o : 0;
2131
+ message.pageCount = (_p = object.pageCount) !== null && _p !== void 0 ? _p : 0;
2132
+ message.charCount = (_q = object.charCount) !== null && _q !== void 0 ? _q : 0;
1752
2133
  message.tags = ((_a = object.tags) === null || _a === void 0 ? void 0 : _a.map((e) => exports.DocumentTag.fromPartial(e))) || [];
1753
- message.metadata = (_q = object.metadata) !== null && _q !== void 0 ? _q : undefined;
2134
+ message.metadata = (_r = object.metadata) !== null && _r !== void 0 ? _r : undefined;
1754
2135
  message.sensitivityTags = ((_b = object.sensitivityTags) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
2136
+ message.restrictedGroups = ((_c = object.restrictedGroups) === null || _c === void 0 ? void 0 : _c.map((e) => exports.RestrictedGroup.fromPartial(e))) || [];
1755
2137
  return message;
1756
2138
  },
1757
2139
  };
@@ -1875,6 +2257,7 @@ function createBaseDocumentSummary() {
1875
2257
  latestIngestionStatus: 0,
1876
2258
  threadCounts: undefined,
1877
2259
  metadata: undefined,
2260
+ restrictedGroups: [],
1878
2261
  };
1879
2262
  }
1880
2263
  exports.DocumentSummary = {
@@ -1936,6 +2319,9 @@ exports.DocumentSummary = {
1936
2319
  if (message.metadata !== undefined) {
1937
2320
  struct_pb_1.Struct.encode(struct_pb_1.Struct.wrap(message.metadata), writer.uint32(154).fork()).join();
1938
2321
  }
2322
+ for (const v of message.restrictedGroups) {
2323
+ exports.RestrictedGroup.encode(v, writer.uint32(162).fork()).join();
2324
+ }
1939
2325
  return writer;
1940
2326
  },
1941
2327
  decode(input, length) {
@@ -2078,6 +2464,13 @@ exports.DocumentSummary = {
2078
2464
  message.metadata = struct_pb_1.Struct.unwrap(struct_pb_1.Struct.decode(reader, reader.uint32()));
2079
2465
  continue;
2080
2466
  }
2467
+ case 20: {
2468
+ if (tag !== 162) {
2469
+ break;
2470
+ }
2471
+ message.restrictedGroups.push(exports.RestrictedGroup.decode(reader, reader.uint32()));
2472
+ continue;
2473
+ }
2081
2474
  }
2082
2475
  if ((tag & 7) === 4 || tag === 0) {
2083
2476
  break;
@@ -2161,10 +2554,15 @@ exports.DocumentSummary = {
2161
2554
  ? exports.DocumentThreadCounts.fromJSON(object.thread_counts)
2162
2555
  : undefined,
2163
2556
  metadata: isObject(object.metadata) ? object.metadata : undefined,
2557
+ restrictedGroups: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restrictedGroups)
2558
+ ? object.restrictedGroups.map((e) => exports.RestrictedGroup.fromJSON(e))
2559
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restricted_groups)
2560
+ ? object.restricted_groups.map((e) => exports.RestrictedGroup.fromJSON(e))
2561
+ : [],
2164
2562
  };
2165
2563
  },
2166
2564
  toJSON(message) {
2167
- var _a, _b;
2565
+ var _a, _b, _c;
2168
2566
  const obj = {};
2169
2567
  if (message.id !== "") {
2170
2568
  obj.id = message.id;
@@ -2223,36 +2621,40 @@ exports.DocumentSummary = {
2223
2621
  if (message.metadata !== undefined) {
2224
2622
  obj.metadata = message.metadata;
2225
2623
  }
2624
+ if ((_c = message.restrictedGroups) === null || _c === void 0 ? void 0 : _c.length) {
2625
+ obj.restrictedGroups = message.restrictedGroups.map((e) => exports.RestrictedGroup.toJSON(e));
2626
+ }
2226
2627
  return obj;
2227
2628
  },
2228
2629
  create(base) {
2229
2630
  return exports.DocumentSummary.fromPartial(base !== null && base !== void 0 ? base : {});
2230
2631
  },
2231
2632
  fromPartial(object) {
2232
- var _a, _b;
2233
- var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
2633
+ var _a, _b, _c;
2634
+ var _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
2234
2635
  const message = createBaseDocumentSummary();
2235
- message.id = (_c = object.id) !== null && _c !== void 0 ? _c : "";
2236
- message.organizationId = (_d = object.organizationId) !== null && _d !== void 0 ? _d : "";
2237
- message.filename = (_e = object.filename) !== null && _e !== void 0 ? _e : "";
2238
- message.mimeType = (_f = object.mimeType) !== null && _f !== void 0 ? _f : "";
2239
- message.fileType = (_g = object.fileType) !== null && _g !== void 0 ? _g : "";
2240
- message.status = (_h = object.status) !== null && _h !== void 0 ? _h : 0;
2241
- message.scope = (_j = object.scope) !== null && _j !== void 0 ? _j : 0;
2636
+ message.id = (_d = object.id) !== null && _d !== void 0 ? _d : "";
2637
+ message.organizationId = (_e = object.organizationId) !== null && _e !== void 0 ? _e : "";
2638
+ message.filename = (_f = object.filename) !== null && _f !== void 0 ? _f : "";
2639
+ message.mimeType = (_g = object.mimeType) !== null && _g !== void 0 ? _g : "";
2640
+ message.fileType = (_h = object.fileType) !== null && _h !== void 0 ? _h : "";
2641
+ message.status = (_j = object.status) !== null && _j !== void 0 ? _j : 0;
2642
+ message.scope = (_k = object.scope) !== null && _k !== void 0 ? _k : 0;
2242
2643
  message.tags = ((_a = object.tags) === null || _a === void 0 ? void 0 : _a.map((e) => exports.DocumentTag.fromPartial(e))) || [];
2243
2644
  message.sensitivityTags = ((_b = object.sensitivityTags) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
2244
- message.uploadedByUserId = (_k = object.uploadedByUserId) !== null && _k !== void 0 ? _k : "";
2245
- message.ownerDisplayName = (_l = object.ownerDisplayName) !== null && _l !== void 0 ? _l : "";
2246
- message.uploadedAt = (_m = object.uploadedAt) !== null && _m !== void 0 ? _m : undefined;
2247
- message.updatedAt = (_o = object.updatedAt) !== null && _o !== void 0 ? _o : undefined;
2248
- message.pageCount = (_p = object.pageCount) !== null && _p !== void 0 ? _p : 0;
2249
- message.charCount = (_q = object.charCount) !== null && _q !== void 0 ? _q : 0;
2250
- message.latestIngestionRunId = (_r = object.latestIngestionRunId) !== null && _r !== void 0 ? _r : "";
2251
- message.latestIngestionStatus = (_s = object.latestIngestionStatus) !== null && _s !== void 0 ? _s : 0;
2645
+ message.uploadedByUserId = (_l = object.uploadedByUserId) !== null && _l !== void 0 ? _l : "";
2646
+ message.ownerDisplayName = (_m = object.ownerDisplayName) !== null && _m !== void 0 ? _m : "";
2647
+ message.uploadedAt = (_o = object.uploadedAt) !== null && _o !== void 0 ? _o : undefined;
2648
+ message.updatedAt = (_p = object.updatedAt) !== null && _p !== void 0 ? _p : undefined;
2649
+ message.pageCount = (_q = object.pageCount) !== null && _q !== void 0 ? _q : 0;
2650
+ message.charCount = (_r = object.charCount) !== null && _r !== void 0 ? _r : 0;
2651
+ message.latestIngestionRunId = (_s = object.latestIngestionRunId) !== null && _s !== void 0 ? _s : "";
2652
+ message.latestIngestionStatus = (_t = object.latestIngestionStatus) !== null && _t !== void 0 ? _t : 0;
2252
2653
  message.threadCounts = (object.threadCounts !== undefined && object.threadCounts !== null)
2253
2654
  ? exports.DocumentThreadCounts.fromPartial(object.threadCounts)
2254
2655
  : undefined;
2255
- message.metadata = (_t = object.metadata) !== null && _t !== void 0 ? _t : undefined;
2656
+ message.metadata = (_u = object.metadata) !== null && _u !== void 0 ? _u : undefined;
2657
+ message.restrictedGroups = ((_c = object.restrictedGroups) === null || _c === void 0 ? void 0 : _c.map((e) => exports.RestrictedGroup.fromPartial(e))) || [];
2256
2658
  return message;
2257
2659
  },
2258
2660
  };
@@ -4392,6 +4794,7 @@ function createBaseListDocumentsRequest() {
4392
4794
  pageToken: "",
4393
4795
  sortField: 0,
4394
4796
  sortDirection: 0,
4797
+ restrictedGroupIds: [],
4395
4798
  };
4396
4799
  }
4397
4800
  exports.ListDocumentsRequest = {
@@ -4441,6 +4844,9 @@ exports.ListDocumentsRequest = {
4441
4844
  if (message.sortDirection !== 0) {
4442
4845
  writer.uint32(104).int32(message.sortDirection);
4443
4846
  }
4847
+ for (const v of message.restrictedGroupIds) {
4848
+ writer.uint32(114).string(v);
4849
+ }
4444
4850
  return writer;
4445
4851
  },
4446
4852
  decode(input, length) {
@@ -4562,6 +4968,13 @@ exports.ListDocumentsRequest = {
4562
4968
  message.sortDirection = reader.int32();
4563
4969
  continue;
4564
4970
  }
4971
+ case 14: {
4972
+ if (tag !== 114) {
4973
+ break;
4974
+ }
4975
+ message.restrictedGroupIds.push(reader.string());
4976
+ continue;
4977
+ }
4565
4978
  }
4566
4979
  if ((tag & 7) === 4 || tag === 0) {
4567
4980
  break;
@@ -4627,10 +5040,15 @@ exports.ListDocumentsRequest = {
4627
5040
  : isSet(object.sort_direction)
4628
5041
  ? sortDirectionFromJSON(object.sort_direction)
4629
5042
  : 0,
5043
+ restrictedGroupIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restrictedGroupIds)
5044
+ ? object.restrictedGroupIds.map((e) => globalThis.String(e))
5045
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restricted_group_ids)
5046
+ ? object.restricted_group_ids.map((e) => globalThis.String(e))
5047
+ : [],
4630
5048
  };
4631
5049
  },
4632
5050
  toJSON(message) {
4633
- var _a, _b, _c, _d, _e;
5051
+ var _a, _b, _c, _d, _e, _f;
4634
5052
  const obj = {};
4635
5053
  if (message.organizationId !== "") {
4636
5054
  obj.organizationId = message.organizationId;
@@ -4671,28 +5089,32 @@ exports.ListDocumentsRequest = {
4671
5089
  if (message.sortDirection !== 0) {
4672
5090
  obj.sortDirection = sortDirectionToJSON(message.sortDirection);
4673
5091
  }
5092
+ if ((_f = message.restrictedGroupIds) === null || _f === void 0 ? void 0 : _f.length) {
5093
+ obj.restrictedGroupIds = message.restrictedGroupIds;
5094
+ }
4674
5095
  return obj;
4675
5096
  },
4676
5097
  create(base) {
4677
5098
  return exports.ListDocumentsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
4678
5099
  },
4679
5100
  fromPartial(object) {
4680
- var _a, _b, _c, _d, _e;
4681
- var _f, _g, _h, _j, _k, _l, _m, _o;
5101
+ var _a, _b, _c, _d, _e, _f;
5102
+ var _g, _h, _j, _k, _l, _m, _o, _p;
4682
5103
  const message = createBaseListDocumentsRequest();
4683
- message.organizationId = (_f = object.organizationId) !== null && _f !== void 0 ? _f : "";
4684
- message.actingUserId = (_g = object.actingUserId) !== null && _g !== void 0 ? _g : "";
5104
+ message.organizationId = (_g = object.organizationId) !== null && _g !== void 0 ? _g : "";
5105
+ message.actingUserId = (_h = object.actingUserId) !== null && _h !== void 0 ? _h : "";
4685
5106
  message.tags = ((_a = object.tags) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
4686
5107
  message.restrictedTags = ((_b = object.restrictedTags) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
4687
5108
  message.scopes = ((_c = object.scopes) === null || _c === void 0 ? void 0 : _c.map((e) => e)) || [];
4688
5109
  message.statuses = ((_d = object.statuses) === null || _d === void 0 ? void 0 : _d.map((e) => e)) || [];
4689
5110
  message.ingestionStatuses = ((_e = object.ingestionStatuses) === null || _e === void 0 ? void 0 : _e.map((e) => e)) || [];
4690
- message.uploadedAfter = (_h = object.uploadedAfter) !== null && _h !== void 0 ? _h : undefined;
4691
- message.uploadedBefore = (_j = object.uploadedBefore) !== null && _j !== void 0 ? _j : undefined;
4692
- message.pageSize = (_k = object.pageSize) !== null && _k !== void 0 ? _k : 0;
4693
- message.pageToken = (_l = object.pageToken) !== null && _l !== void 0 ? _l : "";
4694
- message.sortField = (_m = object.sortField) !== null && _m !== void 0 ? _m : 0;
4695
- message.sortDirection = (_o = object.sortDirection) !== null && _o !== void 0 ? _o : 0;
5111
+ message.uploadedAfter = (_j = object.uploadedAfter) !== null && _j !== void 0 ? _j : undefined;
5112
+ message.uploadedBefore = (_k = object.uploadedBefore) !== null && _k !== void 0 ? _k : undefined;
5113
+ message.pageSize = (_l = object.pageSize) !== null && _l !== void 0 ? _l : 0;
5114
+ message.pageToken = (_m = object.pageToken) !== null && _m !== void 0 ? _m : "";
5115
+ message.sortField = (_o = object.sortField) !== null && _o !== void 0 ? _o : 0;
5116
+ message.sortDirection = (_p = object.sortDirection) !== null && _p !== void 0 ? _p : 0;
5117
+ message.restrictedGroupIds = ((_f = object.restrictedGroupIds) === null || _f === void 0 ? void 0 : _f.map((e) => e)) || [];
4696
5118
  return message;
4697
5119
  },
4698
5120
  };
@@ -5515,6 +5937,969 @@ exports.DeleteDocumentResponse = {
5515
5937
  return message;
5516
5938
  },
5517
5939
  };
5940
+ function createBaseListRestrictedGroupsRequest() {
5941
+ return { organizationId: "", actingUserId: "" };
5942
+ }
5943
+ exports.ListRestrictedGroupsRequest = {
5944
+ encode(message, writer = new wire_1.BinaryWriter()) {
5945
+ if (message.organizationId !== "") {
5946
+ writer.uint32(10).string(message.organizationId);
5947
+ }
5948
+ if (message.actingUserId !== "") {
5949
+ writer.uint32(18).string(message.actingUserId);
5950
+ }
5951
+ return writer;
5952
+ },
5953
+ decode(input, length) {
5954
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
5955
+ const end = length === undefined ? reader.len : reader.pos + length;
5956
+ const message = createBaseListRestrictedGroupsRequest();
5957
+ while (reader.pos < end) {
5958
+ const tag = reader.uint32();
5959
+ switch (tag >>> 3) {
5960
+ case 1: {
5961
+ if (tag !== 10) {
5962
+ break;
5963
+ }
5964
+ message.organizationId = reader.string();
5965
+ continue;
5966
+ }
5967
+ case 2: {
5968
+ if (tag !== 18) {
5969
+ break;
5970
+ }
5971
+ message.actingUserId = reader.string();
5972
+ continue;
5973
+ }
5974
+ }
5975
+ if ((tag & 7) === 4 || tag === 0) {
5976
+ break;
5977
+ }
5978
+ reader.skip(tag & 7);
5979
+ }
5980
+ return message;
5981
+ },
5982
+ fromJSON(object) {
5983
+ return {
5984
+ organizationId: isSet(object.organizationId)
5985
+ ? globalThis.String(object.organizationId)
5986
+ : isSet(object.organization_id)
5987
+ ? globalThis.String(object.organization_id)
5988
+ : "",
5989
+ actingUserId: isSet(object.actingUserId)
5990
+ ? globalThis.String(object.actingUserId)
5991
+ : isSet(object.acting_user_id)
5992
+ ? globalThis.String(object.acting_user_id)
5993
+ : "",
5994
+ };
5995
+ },
5996
+ toJSON(message) {
5997
+ const obj = {};
5998
+ if (message.organizationId !== "") {
5999
+ obj.organizationId = message.organizationId;
6000
+ }
6001
+ if (message.actingUserId !== "") {
6002
+ obj.actingUserId = message.actingUserId;
6003
+ }
6004
+ return obj;
6005
+ },
6006
+ create(base) {
6007
+ return exports.ListRestrictedGroupsRequest.fromPartial(base !== null && base !== void 0 ? base : {});
6008
+ },
6009
+ fromPartial(object) {
6010
+ var _a, _b;
6011
+ const message = createBaseListRestrictedGroupsRequest();
6012
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
6013
+ message.actingUserId = (_b = object.actingUserId) !== null && _b !== void 0 ? _b : "";
6014
+ return message;
6015
+ },
6016
+ };
6017
+ function createBaseListRestrictedGroupsResponse() {
6018
+ return { restrictedGroups: [] };
6019
+ }
6020
+ exports.ListRestrictedGroupsResponse = {
6021
+ encode(message, writer = new wire_1.BinaryWriter()) {
6022
+ for (const v of message.restrictedGroups) {
6023
+ exports.RestrictedGroup.encode(v, writer.uint32(10).fork()).join();
6024
+ }
6025
+ return writer;
6026
+ },
6027
+ decode(input, length) {
6028
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6029
+ const end = length === undefined ? reader.len : reader.pos + length;
6030
+ const message = createBaseListRestrictedGroupsResponse();
6031
+ while (reader.pos < end) {
6032
+ const tag = reader.uint32();
6033
+ switch (tag >>> 3) {
6034
+ case 1: {
6035
+ if (tag !== 10) {
6036
+ break;
6037
+ }
6038
+ message.restrictedGroups.push(exports.RestrictedGroup.decode(reader, reader.uint32()));
6039
+ continue;
6040
+ }
6041
+ }
6042
+ if ((tag & 7) === 4 || tag === 0) {
6043
+ break;
6044
+ }
6045
+ reader.skip(tag & 7);
6046
+ }
6047
+ return message;
6048
+ },
6049
+ fromJSON(object) {
6050
+ return {
6051
+ restrictedGroups: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restrictedGroups)
6052
+ ? object.restrictedGroups.map((e) => exports.RestrictedGroup.fromJSON(e))
6053
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.restricted_groups)
6054
+ ? object.restricted_groups.map((e) => exports.RestrictedGroup.fromJSON(e))
6055
+ : [],
6056
+ };
6057
+ },
6058
+ toJSON(message) {
6059
+ var _a;
6060
+ const obj = {};
6061
+ if ((_a = message.restrictedGroups) === null || _a === void 0 ? void 0 : _a.length) {
6062
+ obj.restrictedGroups = message.restrictedGroups.map((e) => exports.RestrictedGroup.toJSON(e));
6063
+ }
6064
+ return obj;
6065
+ },
6066
+ create(base) {
6067
+ return exports.ListRestrictedGroupsResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6068
+ },
6069
+ fromPartial(object) {
6070
+ var _a;
6071
+ const message = createBaseListRestrictedGroupsResponse();
6072
+ message.restrictedGroups = ((_a = object.restrictedGroups) === null || _a === void 0 ? void 0 : _a.map((e) => exports.RestrictedGroup.fromPartial(e))) || [];
6073
+ return message;
6074
+ },
6075
+ };
6076
+ function createBaseGetRestrictedGroupRequest() {
6077
+ return { organizationId: "", restrictedGroupId: "", actingUserId: "" };
6078
+ }
6079
+ exports.GetRestrictedGroupRequest = {
6080
+ encode(message, writer = new wire_1.BinaryWriter()) {
6081
+ if (message.organizationId !== "") {
6082
+ writer.uint32(10).string(message.organizationId);
6083
+ }
6084
+ if (message.restrictedGroupId !== "") {
6085
+ writer.uint32(18).string(message.restrictedGroupId);
6086
+ }
6087
+ if (message.actingUserId !== "") {
6088
+ writer.uint32(26).string(message.actingUserId);
6089
+ }
6090
+ return writer;
6091
+ },
6092
+ decode(input, length) {
6093
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6094
+ const end = length === undefined ? reader.len : reader.pos + length;
6095
+ const message = createBaseGetRestrictedGroupRequest();
6096
+ while (reader.pos < end) {
6097
+ const tag = reader.uint32();
6098
+ switch (tag >>> 3) {
6099
+ case 1: {
6100
+ if (tag !== 10) {
6101
+ break;
6102
+ }
6103
+ message.organizationId = reader.string();
6104
+ continue;
6105
+ }
6106
+ case 2: {
6107
+ if (tag !== 18) {
6108
+ break;
6109
+ }
6110
+ message.restrictedGroupId = reader.string();
6111
+ continue;
6112
+ }
6113
+ case 3: {
6114
+ if (tag !== 26) {
6115
+ break;
6116
+ }
6117
+ message.actingUserId = reader.string();
6118
+ continue;
6119
+ }
6120
+ }
6121
+ if ((tag & 7) === 4 || tag === 0) {
6122
+ break;
6123
+ }
6124
+ reader.skip(tag & 7);
6125
+ }
6126
+ return message;
6127
+ },
6128
+ fromJSON(object) {
6129
+ return {
6130
+ organizationId: isSet(object.organizationId)
6131
+ ? globalThis.String(object.organizationId)
6132
+ : isSet(object.organization_id)
6133
+ ? globalThis.String(object.organization_id)
6134
+ : "",
6135
+ restrictedGroupId: isSet(object.restrictedGroupId)
6136
+ ? globalThis.String(object.restrictedGroupId)
6137
+ : isSet(object.restricted_group_id)
6138
+ ? globalThis.String(object.restricted_group_id)
6139
+ : "",
6140
+ actingUserId: isSet(object.actingUserId)
6141
+ ? globalThis.String(object.actingUserId)
6142
+ : isSet(object.acting_user_id)
6143
+ ? globalThis.String(object.acting_user_id)
6144
+ : "",
6145
+ };
6146
+ },
6147
+ toJSON(message) {
6148
+ const obj = {};
6149
+ if (message.organizationId !== "") {
6150
+ obj.organizationId = message.organizationId;
6151
+ }
6152
+ if (message.restrictedGroupId !== "") {
6153
+ obj.restrictedGroupId = message.restrictedGroupId;
6154
+ }
6155
+ if (message.actingUserId !== "") {
6156
+ obj.actingUserId = message.actingUserId;
6157
+ }
6158
+ return obj;
6159
+ },
6160
+ create(base) {
6161
+ return exports.GetRestrictedGroupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
6162
+ },
6163
+ fromPartial(object) {
6164
+ var _a, _b, _c;
6165
+ const message = createBaseGetRestrictedGroupRequest();
6166
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
6167
+ message.restrictedGroupId = (_b = object.restrictedGroupId) !== null && _b !== void 0 ? _b : "";
6168
+ message.actingUserId = (_c = object.actingUserId) !== null && _c !== void 0 ? _c : "";
6169
+ return message;
6170
+ },
6171
+ };
6172
+ function createBaseGetRestrictedGroupResponse() {
6173
+ return { restrictedGroup: undefined };
6174
+ }
6175
+ exports.GetRestrictedGroupResponse = {
6176
+ encode(message, writer = new wire_1.BinaryWriter()) {
6177
+ if (message.restrictedGroup !== undefined) {
6178
+ exports.RestrictedGroup.encode(message.restrictedGroup, writer.uint32(10).fork()).join();
6179
+ }
6180
+ return writer;
6181
+ },
6182
+ decode(input, length) {
6183
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6184
+ const end = length === undefined ? reader.len : reader.pos + length;
6185
+ const message = createBaseGetRestrictedGroupResponse();
6186
+ while (reader.pos < end) {
6187
+ const tag = reader.uint32();
6188
+ switch (tag >>> 3) {
6189
+ case 1: {
6190
+ if (tag !== 10) {
6191
+ break;
6192
+ }
6193
+ message.restrictedGroup = exports.RestrictedGroup.decode(reader, reader.uint32());
6194
+ continue;
6195
+ }
6196
+ }
6197
+ if ((tag & 7) === 4 || tag === 0) {
6198
+ break;
6199
+ }
6200
+ reader.skip(tag & 7);
6201
+ }
6202
+ return message;
6203
+ },
6204
+ fromJSON(object) {
6205
+ return {
6206
+ restrictedGroup: isSet(object.restrictedGroup)
6207
+ ? exports.RestrictedGroup.fromJSON(object.restrictedGroup)
6208
+ : isSet(object.restricted_group)
6209
+ ? exports.RestrictedGroup.fromJSON(object.restricted_group)
6210
+ : undefined,
6211
+ };
6212
+ },
6213
+ toJSON(message) {
6214
+ const obj = {};
6215
+ if (message.restrictedGroup !== undefined) {
6216
+ obj.restrictedGroup = exports.RestrictedGroup.toJSON(message.restrictedGroup);
6217
+ }
6218
+ return obj;
6219
+ },
6220
+ create(base) {
6221
+ return exports.GetRestrictedGroupResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6222
+ },
6223
+ fromPartial(object) {
6224
+ const message = createBaseGetRestrictedGroupResponse();
6225
+ message.restrictedGroup = (object.restrictedGroup !== undefined && object.restrictedGroup !== null)
6226
+ ? exports.RestrictedGroup.fromPartial(object.restrictedGroup)
6227
+ : undefined;
6228
+ return message;
6229
+ },
6230
+ };
6231
+ function createBaseCreateRestrictedGroupRequest() {
6232
+ return { organizationId: "", actingUserId: "", slug: "", name: "", description: "", userIds: [], orgTeamIds: [] };
6233
+ }
6234
+ exports.CreateRestrictedGroupRequest = {
6235
+ encode(message, writer = new wire_1.BinaryWriter()) {
6236
+ if (message.organizationId !== "") {
6237
+ writer.uint32(10).string(message.organizationId);
6238
+ }
6239
+ if (message.actingUserId !== "") {
6240
+ writer.uint32(18).string(message.actingUserId);
6241
+ }
6242
+ if (message.slug !== "") {
6243
+ writer.uint32(26).string(message.slug);
6244
+ }
6245
+ if (message.name !== "") {
6246
+ writer.uint32(34).string(message.name);
6247
+ }
6248
+ if (message.description !== "") {
6249
+ writer.uint32(42).string(message.description);
6250
+ }
6251
+ for (const v of message.userIds) {
6252
+ writer.uint32(50).string(v);
6253
+ }
6254
+ for (const v of message.orgTeamIds) {
6255
+ writer.uint32(58).string(v);
6256
+ }
6257
+ return writer;
6258
+ },
6259
+ decode(input, length) {
6260
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6261
+ const end = length === undefined ? reader.len : reader.pos + length;
6262
+ const message = createBaseCreateRestrictedGroupRequest();
6263
+ while (reader.pos < end) {
6264
+ const tag = reader.uint32();
6265
+ switch (tag >>> 3) {
6266
+ case 1: {
6267
+ if (tag !== 10) {
6268
+ break;
6269
+ }
6270
+ message.organizationId = reader.string();
6271
+ continue;
6272
+ }
6273
+ case 2: {
6274
+ if (tag !== 18) {
6275
+ break;
6276
+ }
6277
+ message.actingUserId = reader.string();
6278
+ continue;
6279
+ }
6280
+ case 3: {
6281
+ if (tag !== 26) {
6282
+ break;
6283
+ }
6284
+ message.slug = reader.string();
6285
+ continue;
6286
+ }
6287
+ case 4: {
6288
+ if (tag !== 34) {
6289
+ break;
6290
+ }
6291
+ message.name = reader.string();
6292
+ continue;
6293
+ }
6294
+ case 5: {
6295
+ if (tag !== 42) {
6296
+ break;
6297
+ }
6298
+ message.description = reader.string();
6299
+ continue;
6300
+ }
6301
+ case 6: {
6302
+ if (tag !== 50) {
6303
+ break;
6304
+ }
6305
+ message.userIds.push(reader.string());
6306
+ continue;
6307
+ }
6308
+ case 7: {
6309
+ if (tag !== 58) {
6310
+ break;
6311
+ }
6312
+ message.orgTeamIds.push(reader.string());
6313
+ continue;
6314
+ }
6315
+ }
6316
+ if ((tag & 7) === 4 || tag === 0) {
6317
+ break;
6318
+ }
6319
+ reader.skip(tag & 7);
6320
+ }
6321
+ return message;
6322
+ },
6323
+ fromJSON(object) {
6324
+ return {
6325
+ organizationId: isSet(object.organizationId)
6326
+ ? globalThis.String(object.organizationId)
6327
+ : isSet(object.organization_id)
6328
+ ? globalThis.String(object.organization_id)
6329
+ : "",
6330
+ actingUserId: isSet(object.actingUserId)
6331
+ ? globalThis.String(object.actingUserId)
6332
+ : isSet(object.acting_user_id)
6333
+ ? globalThis.String(object.acting_user_id)
6334
+ : "",
6335
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
6336
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
6337
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
6338
+ userIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.userIds)
6339
+ ? object.userIds.map((e) => globalThis.String(e))
6340
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.user_ids)
6341
+ ? object.user_ids.map((e) => globalThis.String(e))
6342
+ : [],
6343
+ orgTeamIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.orgTeamIds)
6344
+ ? object.orgTeamIds.map((e) => globalThis.String(e))
6345
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.org_team_ids)
6346
+ ? object.org_team_ids.map((e) => globalThis.String(e))
6347
+ : [],
6348
+ };
6349
+ },
6350
+ toJSON(message) {
6351
+ var _a, _b;
6352
+ const obj = {};
6353
+ if (message.organizationId !== "") {
6354
+ obj.organizationId = message.organizationId;
6355
+ }
6356
+ if (message.actingUserId !== "") {
6357
+ obj.actingUserId = message.actingUserId;
6358
+ }
6359
+ if (message.slug !== "") {
6360
+ obj.slug = message.slug;
6361
+ }
6362
+ if (message.name !== "") {
6363
+ obj.name = message.name;
6364
+ }
6365
+ if (message.description !== "") {
6366
+ obj.description = message.description;
6367
+ }
6368
+ if ((_a = message.userIds) === null || _a === void 0 ? void 0 : _a.length) {
6369
+ obj.userIds = message.userIds;
6370
+ }
6371
+ if ((_b = message.orgTeamIds) === null || _b === void 0 ? void 0 : _b.length) {
6372
+ obj.orgTeamIds = message.orgTeamIds;
6373
+ }
6374
+ return obj;
6375
+ },
6376
+ create(base) {
6377
+ return exports.CreateRestrictedGroupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
6378
+ },
6379
+ fromPartial(object) {
6380
+ var _a, _b;
6381
+ var _c, _d, _e, _f, _g;
6382
+ const message = createBaseCreateRestrictedGroupRequest();
6383
+ message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
6384
+ message.actingUserId = (_d = object.actingUserId) !== null && _d !== void 0 ? _d : "";
6385
+ message.slug = (_e = object.slug) !== null && _e !== void 0 ? _e : "";
6386
+ message.name = (_f = object.name) !== null && _f !== void 0 ? _f : "";
6387
+ message.description = (_g = object.description) !== null && _g !== void 0 ? _g : "";
6388
+ message.userIds = ((_a = object.userIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
6389
+ message.orgTeamIds = ((_b = object.orgTeamIds) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
6390
+ return message;
6391
+ },
6392
+ };
6393
+ function createBaseCreateRestrictedGroupResponse() {
6394
+ return { restrictedGroup: undefined };
6395
+ }
6396
+ exports.CreateRestrictedGroupResponse = {
6397
+ encode(message, writer = new wire_1.BinaryWriter()) {
6398
+ if (message.restrictedGroup !== undefined) {
6399
+ exports.RestrictedGroup.encode(message.restrictedGroup, writer.uint32(10).fork()).join();
6400
+ }
6401
+ return writer;
6402
+ },
6403
+ decode(input, length) {
6404
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6405
+ const end = length === undefined ? reader.len : reader.pos + length;
6406
+ const message = createBaseCreateRestrictedGroupResponse();
6407
+ while (reader.pos < end) {
6408
+ const tag = reader.uint32();
6409
+ switch (tag >>> 3) {
6410
+ case 1: {
6411
+ if (tag !== 10) {
6412
+ break;
6413
+ }
6414
+ message.restrictedGroup = exports.RestrictedGroup.decode(reader, reader.uint32());
6415
+ continue;
6416
+ }
6417
+ }
6418
+ if ((tag & 7) === 4 || tag === 0) {
6419
+ break;
6420
+ }
6421
+ reader.skip(tag & 7);
6422
+ }
6423
+ return message;
6424
+ },
6425
+ fromJSON(object) {
6426
+ return {
6427
+ restrictedGroup: isSet(object.restrictedGroup)
6428
+ ? exports.RestrictedGroup.fromJSON(object.restrictedGroup)
6429
+ : isSet(object.restricted_group)
6430
+ ? exports.RestrictedGroup.fromJSON(object.restricted_group)
6431
+ : undefined,
6432
+ };
6433
+ },
6434
+ toJSON(message) {
6435
+ const obj = {};
6436
+ if (message.restrictedGroup !== undefined) {
6437
+ obj.restrictedGroup = exports.RestrictedGroup.toJSON(message.restrictedGroup);
6438
+ }
6439
+ return obj;
6440
+ },
6441
+ create(base) {
6442
+ return exports.CreateRestrictedGroupResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6443
+ },
6444
+ fromPartial(object) {
6445
+ const message = createBaseCreateRestrictedGroupResponse();
6446
+ message.restrictedGroup = (object.restrictedGroup !== undefined && object.restrictedGroup !== null)
6447
+ ? exports.RestrictedGroup.fromPartial(object.restrictedGroup)
6448
+ : undefined;
6449
+ return message;
6450
+ },
6451
+ };
6452
+ function createBaseUpdateRestrictedGroupRequest() {
6453
+ return {
6454
+ organizationId: "",
6455
+ restrictedGroupId: "",
6456
+ actingUserId: "",
6457
+ slug: "",
6458
+ name: "",
6459
+ description: "",
6460
+ userIds: [],
6461
+ orgTeamIds: [],
6462
+ active: false,
6463
+ };
6464
+ }
6465
+ exports.UpdateRestrictedGroupRequest = {
6466
+ encode(message, writer = new wire_1.BinaryWriter()) {
6467
+ if (message.organizationId !== "") {
6468
+ writer.uint32(10).string(message.organizationId);
6469
+ }
6470
+ if (message.restrictedGroupId !== "") {
6471
+ writer.uint32(18).string(message.restrictedGroupId);
6472
+ }
6473
+ if (message.actingUserId !== "") {
6474
+ writer.uint32(26).string(message.actingUserId);
6475
+ }
6476
+ if (message.slug !== "") {
6477
+ writer.uint32(34).string(message.slug);
6478
+ }
6479
+ if (message.name !== "") {
6480
+ writer.uint32(42).string(message.name);
6481
+ }
6482
+ if (message.description !== "") {
6483
+ writer.uint32(50).string(message.description);
6484
+ }
6485
+ for (const v of message.userIds) {
6486
+ writer.uint32(58).string(v);
6487
+ }
6488
+ for (const v of message.orgTeamIds) {
6489
+ writer.uint32(66).string(v);
6490
+ }
6491
+ if (message.active !== false) {
6492
+ writer.uint32(72).bool(message.active);
6493
+ }
6494
+ return writer;
6495
+ },
6496
+ decode(input, length) {
6497
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6498
+ const end = length === undefined ? reader.len : reader.pos + length;
6499
+ const message = createBaseUpdateRestrictedGroupRequest();
6500
+ while (reader.pos < end) {
6501
+ const tag = reader.uint32();
6502
+ switch (tag >>> 3) {
6503
+ case 1: {
6504
+ if (tag !== 10) {
6505
+ break;
6506
+ }
6507
+ message.organizationId = reader.string();
6508
+ continue;
6509
+ }
6510
+ case 2: {
6511
+ if (tag !== 18) {
6512
+ break;
6513
+ }
6514
+ message.restrictedGroupId = reader.string();
6515
+ continue;
6516
+ }
6517
+ case 3: {
6518
+ if (tag !== 26) {
6519
+ break;
6520
+ }
6521
+ message.actingUserId = reader.string();
6522
+ continue;
6523
+ }
6524
+ case 4: {
6525
+ if (tag !== 34) {
6526
+ break;
6527
+ }
6528
+ message.slug = reader.string();
6529
+ continue;
6530
+ }
6531
+ case 5: {
6532
+ if (tag !== 42) {
6533
+ break;
6534
+ }
6535
+ message.name = reader.string();
6536
+ continue;
6537
+ }
6538
+ case 6: {
6539
+ if (tag !== 50) {
6540
+ break;
6541
+ }
6542
+ message.description = reader.string();
6543
+ continue;
6544
+ }
6545
+ case 7: {
6546
+ if (tag !== 58) {
6547
+ break;
6548
+ }
6549
+ message.userIds.push(reader.string());
6550
+ continue;
6551
+ }
6552
+ case 8: {
6553
+ if (tag !== 66) {
6554
+ break;
6555
+ }
6556
+ message.orgTeamIds.push(reader.string());
6557
+ continue;
6558
+ }
6559
+ case 9: {
6560
+ if (tag !== 72) {
6561
+ break;
6562
+ }
6563
+ message.active = reader.bool();
6564
+ continue;
6565
+ }
6566
+ }
6567
+ if ((tag & 7) === 4 || tag === 0) {
6568
+ break;
6569
+ }
6570
+ reader.skip(tag & 7);
6571
+ }
6572
+ return message;
6573
+ },
6574
+ fromJSON(object) {
6575
+ return {
6576
+ organizationId: isSet(object.organizationId)
6577
+ ? globalThis.String(object.organizationId)
6578
+ : isSet(object.organization_id)
6579
+ ? globalThis.String(object.organization_id)
6580
+ : "",
6581
+ restrictedGroupId: isSet(object.restrictedGroupId)
6582
+ ? globalThis.String(object.restrictedGroupId)
6583
+ : isSet(object.restricted_group_id)
6584
+ ? globalThis.String(object.restricted_group_id)
6585
+ : "",
6586
+ actingUserId: isSet(object.actingUserId)
6587
+ ? globalThis.String(object.actingUserId)
6588
+ : isSet(object.acting_user_id)
6589
+ ? globalThis.String(object.acting_user_id)
6590
+ : "",
6591
+ slug: isSet(object.slug) ? globalThis.String(object.slug) : "",
6592
+ name: isSet(object.name) ? globalThis.String(object.name) : "",
6593
+ description: isSet(object.description) ? globalThis.String(object.description) : "",
6594
+ userIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.userIds)
6595
+ ? object.userIds.map((e) => globalThis.String(e))
6596
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.user_ids)
6597
+ ? object.user_ids.map((e) => globalThis.String(e))
6598
+ : [],
6599
+ orgTeamIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.orgTeamIds)
6600
+ ? object.orgTeamIds.map((e) => globalThis.String(e))
6601
+ : globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.org_team_ids)
6602
+ ? object.org_team_ids.map((e) => globalThis.String(e))
6603
+ : [],
6604
+ active: isSet(object.active) ? globalThis.Boolean(object.active) : false,
6605
+ };
6606
+ },
6607
+ toJSON(message) {
6608
+ var _a, _b;
6609
+ const obj = {};
6610
+ if (message.organizationId !== "") {
6611
+ obj.organizationId = message.organizationId;
6612
+ }
6613
+ if (message.restrictedGroupId !== "") {
6614
+ obj.restrictedGroupId = message.restrictedGroupId;
6615
+ }
6616
+ if (message.actingUserId !== "") {
6617
+ obj.actingUserId = message.actingUserId;
6618
+ }
6619
+ if (message.slug !== "") {
6620
+ obj.slug = message.slug;
6621
+ }
6622
+ if (message.name !== "") {
6623
+ obj.name = message.name;
6624
+ }
6625
+ if (message.description !== "") {
6626
+ obj.description = message.description;
6627
+ }
6628
+ if ((_a = message.userIds) === null || _a === void 0 ? void 0 : _a.length) {
6629
+ obj.userIds = message.userIds;
6630
+ }
6631
+ if ((_b = message.orgTeamIds) === null || _b === void 0 ? void 0 : _b.length) {
6632
+ obj.orgTeamIds = message.orgTeamIds;
6633
+ }
6634
+ if (message.active !== false) {
6635
+ obj.active = message.active;
6636
+ }
6637
+ return obj;
6638
+ },
6639
+ create(base) {
6640
+ return exports.UpdateRestrictedGroupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
6641
+ },
6642
+ fromPartial(object) {
6643
+ var _a, _b;
6644
+ var _c, _d, _e, _f, _g, _h, _j;
6645
+ const message = createBaseUpdateRestrictedGroupRequest();
6646
+ message.organizationId = (_c = object.organizationId) !== null && _c !== void 0 ? _c : "";
6647
+ message.restrictedGroupId = (_d = object.restrictedGroupId) !== null && _d !== void 0 ? _d : "";
6648
+ message.actingUserId = (_e = object.actingUserId) !== null && _e !== void 0 ? _e : "";
6649
+ message.slug = (_f = object.slug) !== null && _f !== void 0 ? _f : "";
6650
+ message.name = (_g = object.name) !== null && _g !== void 0 ? _g : "";
6651
+ message.description = (_h = object.description) !== null && _h !== void 0 ? _h : "";
6652
+ message.userIds = ((_a = object.userIds) === null || _a === void 0 ? void 0 : _a.map((e) => e)) || [];
6653
+ message.orgTeamIds = ((_b = object.orgTeamIds) === null || _b === void 0 ? void 0 : _b.map((e) => e)) || [];
6654
+ message.active = (_j = object.active) !== null && _j !== void 0 ? _j : false;
6655
+ return message;
6656
+ },
6657
+ };
6658
+ function createBaseUpdateRestrictedGroupResponse() {
6659
+ return { restrictedGroup: undefined };
6660
+ }
6661
+ exports.UpdateRestrictedGroupResponse = {
6662
+ encode(message, writer = new wire_1.BinaryWriter()) {
6663
+ if (message.restrictedGroup !== undefined) {
6664
+ exports.RestrictedGroup.encode(message.restrictedGroup, writer.uint32(10).fork()).join();
6665
+ }
6666
+ return writer;
6667
+ },
6668
+ decode(input, length) {
6669
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6670
+ const end = length === undefined ? reader.len : reader.pos + length;
6671
+ const message = createBaseUpdateRestrictedGroupResponse();
6672
+ while (reader.pos < end) {
6673
+ const tag = reader.uint32();
6674
+ switch (tag >>> 3) {
6675
+ case 1: {
6676
+ if (tag !== 10) {
6677
+ break;
6678
+ }
6679
+ message.restrictedGroup = exports.RestrictedGroup.decode(reader, reader.uint32());
6680
+ continue;
6681
+ }
6682
+ }
6683
+ if ((tag & 7) === 4 || tag === 0) {
6684
+ break;
6685
+ }
6686
+ reader.skip(tag & 7);
6687
+ }
6688
+ return message;
6689
+ },
6690
+ fromJSON(object) {
6691
+ return {
6692
+ restrictedGroup: isSet(object.restrictedGroup)
6693
+ ? exports.RestrictedGroup.fromJSON(object.restrictedGroup)
6694
+ : isSet(object.restricted_group)
6695
+ ? exports.RestrictedGroup.fromJSON(object.restricted_group)
6696
+ : undefined,
6697
+ };
6698
+ },
6699
+ toJSON(message) {
6700
+ const obj = {};
6701
+ if (message.restrictedGroup !== undefined) {
6702
+ obj.restrictedGroup = exports.RestrictedGroup.toJSON(message.restrictedGroup);
6703
+ }
6704
+ return obj;
6705
+ },
6706
+ create(base) {
6707
+ return exports.UpdateRestrictedGroupResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6708
+ },
6709
+ fromPartial(object) {
6710
+ const message = createBaseUpdateRestrictedGroupResponse();
6711
+ message.restrictedGroup = (object.restrictedGroup !== undefined && object.restrictedGroup !== null)
6712
+ ? exports.RestrictedGroup.fromPartial(object.restrictedGroup)
6713
+ : undefined;
6714
+ return message;
6715
+ },
6716
+ };
6717
+ function createBaseDeleteRestrictedGroupRequest() {
6718
+ return { organizationId: "", restrictedGroupId: "", actingUserId: "", replacement: undefined };
6719
+ }
6720
+ exports.DeleteRestrictedGroupRequest = {
6721
+ encode(message, writer = new wire_1.BinaryWriter()) {
6722
+ if (message.organizationId !== "") {
6723
+ writer.uint32(10).string(message.organizationId);
6724
+ }
6725
+ if (message.restrictedGroupId !== "") {
6726
+ writer.uint32(18).string(message.restrictedGroupId);
6727
+ }
6728
+ if (message.actingUserId !== "") {
6729
+ writer.uint32(26).string(message.actingUserId);
6730
+ }
6731
+ if (message.replacement !== undefined) {
6732
+ exports.RestrictedGroupReplacement.encode(message.replacement, writer.uint32(34).fork()).join();
6733
+ }
6734
+ return writer;
6735
+ },
6736
+ decode(input, length) {
6737
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6738
+ const end = length === undefined ? reader.len : reader.pos + length;
6739
+ const message = createBaseDeleteRestrictedGroupRequest();
6740
+ while (reader.pos < end) {
6741
+ const tag = reader.uint32();
6742
+ switch (tag >>> 3) {
6743
+ case 1: {
6744
+ if (tag !== 10) {
6745
+ break;
6746
+ }
6747
+ message.organizationId = reader.string();
6748
+ continue;
6749
+ }
6750
+ case 2: {
6751
+ if (tag !== 18) {
6752
+ break;
6753
+ }
6754
+ message.restrictedGroupId = reader.string();
6755
+ continue;
6756
+ }
6757
+ case 3: {
6758
+ if (tag !== 26) {
6759
+ break;
6760
+ }
6761
+ message.actingUserId = reader.string();
6762
+ continue;
6763
+ }
6764
+ case 4: {
6765
+ if (tag !== 34) {
6766
+ break;
6767
+ }
6768
+ message.replacement = exports.RestrictedGroupReplacement.decode(reader, reader.uint32());
6769
+ continue;
6770
+ }
6771
+ }
6772
+ if ((tag & 7) === 4 || tag === 0) {
6773
+ break;
6774
+ }
6775
+ reader.skip(tag & 7);
6776
+ }
6777
+ return message;
6778
+ },
6779
+ fromJSON(object) {
6780
+ return {
6781
+ organizationId: isSet(object.organizationId)
6782
+ ? globalThis.String(object.organizationId)
6783
+ : isSet(object.organization_id)
6784
+ ? globalThis.String(object.organization_id)
6785
+ : "",
6786
+ restrictedGroupId: isSet(object.restrictedGroupId)
6787
+ ? globalThis.String(object.restrictedGroupId)
6788
+ : isSet(object.restricted_group_id)
6789
+ ? globalThis.String(object.restricted_group_id)
6790
+ : "",
6791
+ actingUserId: isSet(object.actingUserId)
6792
+ ? globalThis.String(object.actingUserId)
6793
+ : isSet(object.acting_user_id)
6794
+ ? globalThis.String(object.acting_user_id)
6795
+ : "",
6796
+ replacement: isSet(object.replacement) ? exports.RestrictedGroupReplacement.fromJSON(object.replacement) : undefined,
6797
+ };
6798
+ },
6799
+ toJSON(message) {
6800
+ const obj = {};
6801
+ if (message.organizationId !== "") {
6802
+ obj.organizationId = message.organizationId;
6803
+ }
6804
+ if (message.restrictedGroupId !== "") {
6805
+ obj.restrictedGroupId = message.restrictedGroupId;
6806
+ }
6807
+ if (message.actingUserId !== "") {
6808
+ obj.actingUserId = message.actingUserId;
6809
+ }
6810
+ if (message.replacement !== undefined) {
6811
+ obj.replacement = exports.RestrictedGroupReplacement.toJSON(message.replacement);
6812
+ }
6813
+ return obj;
6814
+ },
6815
+ create(base) {
6816
+ return exports.DeleteRestrictedGroupRequest.fromPartial(base !== null && base !== void 0 ? base : {});
6817
+ },
6818
+ fromPartial(object) {
6819
+ var _a, _b, _c;
6820
+ const message = createBaseDeleteRestrictedGroupRequest();
6821
+ message.organizationId = (_a = object.organizationId) !== null && _a !== void 0 ? _a : "";
6822
+ message.restrictedGroupId = (_b = object.restrictedGroupId) !== null && _b !== void 0 ? _b : "";
6823
+ message.actingUserId = (_c = object.actingUserId) !== null && _c !== void 0 ? _c : "";
6824
+ message.replacement = (object.replacement !== undefined && object.replacement !== null)
6825
+ ? exports.RestrictedGroupReplacement.fromPartial(object.replacement)
6826
+ : undefined;
6827
+ return message;
6828
+ },
6829
+ };
6830
+ function createBaseDeleteRestrictedGroupResponse() {
6831
+ return { deleted: false, affectedDocumentCount: 0 };
6832
+ }
6833
+ exports.DeleteRestrictedGroupResponse = {
6834
+ encode(message, writer = new wire_1.BinaryWriter()) {
6835
+ if (message.deleted !== false) {
6836
+ writer.uint32(8).bool(message.deleted);
6837
+ }
6838
+ if (message.affectedDocumentCount !== 0) {
6839
+ writer.uint32(16).int32(message.affectedDocumentCount);
6840
+ }
6841
+ return writer;
6842
+ },
6843
+ decode(input, length) {
6844
+ const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
6845
+ const end = length === undefined ? reader.len : reader.pos + length;
6846
+ const message = createBaseDeleteRestrictedGroupResponse();
6847
+ while (reader.pos < end) {
6848
+ const tag = reader.uint32();
6849
+ switch (tag >>> 3) {
6850
+ case 1: {
6851
+ if (tag !== 8) {
6852
+ break;
6853
+ }
6854
+ message.deleted = reader.bool();
6855
+ continue;
6856
+ }
6857
+ case 2: {
6858
+ if (tag !== 16) {
6859
+ break;
6860
+ }
6861
+ message.affectedDocumentCount = reader.int32();
6862
+ continue;
6863
+ }
6864
+ }
6865
+ if ((tag & 7) === 4 || tag === 0) {
6866
+ break;
6867
+ }
6868
+ reader.skip(tag & 7);
6869
+ }
6870
+ return message;
6871
+ },
6872
+ fromJSON(object) {
6873
+ return {
6874
+ deleted: isSet(object.deleted) ? globalThis.Boolean(object.deleted) : false,
6875
+ affectedDocumentCount: isSet(object.affectedDocumentCount)
6876
+ ? globalThis.Number(object.affectedDocumentCount)
6877
+ : isSet(object.affected_document_count)
6878
+ ? globalThis.Number(object.affected_document_count)
6879
+ : 0,
6880
+ };
6881
+ },
6882
+ toJSON(message) {
6883
+ const obj = {};
6884
+ if (message.deleted !== false) {
6885
+ obj.deleted = message.deleted;
6886
+ }
6887
+ if (message.affectedDocumentCount !== 0) {
6888
+ obj.affectedDocumentCount = Math.round(message.affectedDocumentCount);
6889
+ }
6890
+ return obj;
6891
+ },
6892
+ create(base) {
6893
+ return exports.DeleteRestrictedGroupResponse.fromPartial(base !== null && base !== void 0 ? base : {});
6894
+ },
6895
+ fromPartial(object) {
6896
+ var _a, _b;
6897
+ const message = createBaseDeleteRestrictedGroupResponse();
6898
+ message.deleted = (_a = object.deleted) !== null && _a !== void 0 ? _a : false;
6899
+ message.affectedDocumentCount = (_b = object.affectedDocumentCount) !== null && _b !== void 0 ? _b : 0;
6900
+ return message;
6901
+ },
6902
+ };
5518
6903
  function createBaseRetryIngestionRequest() {
5519
6904
  return { organizationId: "", ingestionRunId: "" };
5520
6905
  }