@miradorlabs/web-grpc 3.50.0 → 3.51.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.
package/package.json
CHANGED
|
@@ -2029,7 +2029,7 @@ export interface AISessionEvent {
|
|
|
2029
2029
|
effort: string;
|
|
2030
2030
|
/**
|
|
2031
2031
|
* The event inside its type, from one closed vocabulary per type:
|
|
2032
|
-
* session: start | turn message: user | assistant model: call
|
|
2032
|
+
* session: start | turn message: user | assistant | system (the system prompt) model: call
|
|
2033
2033
|
* tool: call | result | decision agent: run (one subagent run)
|
|
2034
2034
|
* command: compact | clear | resume | exit | model | effort | login | logout | usage | status | plugin | review
|
|
2035
2035
|
* compaction: manual | auto auth: login | logout | recovery
|
|
@@ -60,6 +60,42 @@ export interface MarkAlertsReadResponse {
|
|
|
60
60
|
unreadCount: number;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
export interface GetDigestSlackChannelRequest {
|
|
64
|
+
organizationId: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface GetDigestSlackChannelResponse {
|
|
68
|
+
status:
|
|
69
|
+
| ResponseStatus
|
|
70
|
+
| undefined;
|
|
71
|
+
/** Absent when no channel is set. */
|
|
72
|
+
channel: DigestSlackChannel | undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface SetDigestSlackChannelRequest {
|
|
76
|
+
organizationId: string;
|
|
77
|
+
/** A channel id from OAuthGatewayService.ListSlackChannels. Empty clears the setting. */
|
|
78
|
+
slackChannelId: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface SetDigestSlackChannelResponse {
|
|
82
|
+
status:
|
|
83
|
+
| ResponseStatus
|
|
84
|
+
| undefined;
|
|
85
|
+
/** The channel now set; absent after a clear. */
|
|
86
|
+
channel: DigestSlackChannel | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/** DigestSlackChannel is where an organization's daily digest posts in Slack. */
|
|
90
|
+
export interface DigestSlackChannel {
|
|
91
|
+
slackChannelId: string;
|
|
92
|
+
/** The channel's name when it was set, for display: a later rename in Slack does not change it. */
|
|
93
|
+
slackChannelName: string;
|
|
94
|
+
/** The user who set it. */
|
|
95
|
+
updatedBy: string;
|
|
96
|
+
updatedAt: Date | undefined;
|
|
97
|
+
}
|
|
98
|
+
|
|
63
99
|
function createBaseListAlertsRequest(): ListAlertsRequest {
|
|
64
100
|
return { organizationId: "", pageSize: 0, pageToken: "" };
|
|
65
101
|
}
|
|
@@ -679,10 +715,491 @@ export const MarkAlertsReadResponse: MessageFns<MarkAlertsReadResponse> = {
|
|
|
679
715
|
},
|
|
680
716
|
};
|
|
681
717
|
|
|
718
|
+
function createBaseGetDigestSlackChannelRequest(): GetDigestSlackChannelRequest {
|
|
719
|
+
return { organizationId: "" };
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
export const GetDigestSlackChannelRequest: MessageFns<GetDigestSlackChannelRequest> = {
|
|
723
|
+
encode(message: GetDigestSlackChannelRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
724
|
+
if (message.organizationId !== "") {
|
|
725
|
+
writer.uint32(10).string(message.organizationId);
|
|
726
|
+
}
|
|
727
|
+
return writer;
|
|
728
|
+
},
|
|
729
|
+
|
|
730
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDigestSlackChannelRequest {
|
|
731
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
732
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
733
|
+
if (previousRecursionDepth >= 100) {
|
|
734
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
735
|
+
}
|
|
736
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
737
|
+
try {
|
|
738
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
739
|
+
const message = createBaseGetDigestSlackChannelRequest();
|
|
740
|
+
while (reader.pos < end) {
|
|
741
|
+
const tag = reader.uint32();
|
|
742
|
+
switch (tag >>> 3) {
|
|
743
|
+
case 1: {
|
|
744
|
+
if (tag !== 10) {
|
|
745
|
+
break;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
message.organizationId = reader.string();
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
755
|
+
reader.skip(tag & 7);
|
|
756
|
+
}
|
|
757
|
+
return message;
|
|
758
|
+
} finally {
|
|
759
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
|
|
763
|
+
fromJSON(object: any): GetDigestSlackChannelRequest {
|
|
764
|
+
return {
|
|
765
|
+
organizationId: isSet(object.organizationId)
|
|
766
|
+
? globalThis.String(object.organizationId)
|
|
767
|
+
: isSet(object.organization_id)
|
|
768
|
+
? globalThis.String(object.organization_id)
|
|
769
|
+
: "",
|
|
770
|
+
};
|
|
771
|
+
},
|
|
772
|
+
|
|
773
|
+
toJSON(message: GetDigestSlackChannelRequest): unknown {
|
|
774
|
+
const obj: any = {};
|
|
775
|
+
if (message.organizationId !== "") {
|
|
776
|
+
obj.organizationId = message.organizationId;
|
|
777
|
+
}
|
|
778
|
+
return obj;
|
|
779
|
+
},
|
|
780
|
+
|
|
781
|
+
create<I extends Exact<DeepPartial<GetDigestSlackChannelRequest>, I>>(base?: I): GetDigestSlackChannelRequest {
|
|
782
|
+
return GetDigestSlackChannelRequest.fromPartial(base ?? ({} as any));
|
|
783
|
+
},
|
|
784
|
+
fromPartial<I extends Exact<DeepPartial<GetDigestSlackChannelRequest>, I>>(object: I): GetDigestSlackChannelRequest {
|
|
785
|
+
const message = createBaseGetDigestSlackChannelRequest();
|
|
786
|
+
message.organizationId = object.organizationId ?? "";
|
|
787
|
+
return message;
|
|
788
|
+
},
|
|
789
|
+
};
|
|
790
|
+
|
|
791
|
+
function createBaseGetDigestSlackChannelResponse(): GetDigestSlackChannelResponse {
|
|
792
|
+
return { status: undefined, channel: undefined };
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
export const GetDigestSlackChannelResponse: MessageFns<GetDigestSlackChannelResponse> = {
|
|
796
|
+
encode(message: GetDigestSlackChannelResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
797
|
+
if (message.status !== undefined) {
|
|
798
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
799
|
+
}
|
|
800
|
+
if (message.channel !== undefined) {
|
|
801
|
+
DigestSlackChannel.encode(message.channel, writer.uint32(18).fork()).join();
|
|
802
|
+
}
|
|
803
|
+
return writer;
|
|
804
|
+
},
|
|
805
|
+
|
|
806
|
+
decode(input: BinaryReader | Uint8Array, length?: number): GetDigestSlackChannelResponse {
|
|
807
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
808
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
809
|
+
if (previousRecursionDepth >= 100) {
|
|
810
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
811
|
+
}
|
|
812
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
813
|
+
try {
|
|
814
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
815
|
+
const message = createBaseGetDigestSlackChannelResponse();
|
|
816
|
+
while (reader.pos < end) {
|
|
817
|
+
const tag = reader.uint32();
|
|
818
|
+
switch (tag >>> 3) {
|
|
819
|
+
case 1: {
|
|
820
|
+
if (tag !== 10) {
|
|
821
|
+
break;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
825
|
+
continue;
|
|
826
|
+
}
|
|
827
|
+
case 2: {
|
|
828
|
+
if (tag !== 18) {
|
|
829
|
+
break;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
message.channel = DigestSlackChannel.decode(reader, reader.uint32());
|
|
833
|
+
continue;
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
reader.skip(tag & 7);
|
|
840
|
+
}
|
|
841
|
+
return message;
|
|
842
|
+
} finally {
|
|
843
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
844
|
+
}
|
|
845
|
+
},
|
|
846
|
+
|
|
847
|
+
fromJSON(object: any): GetDigestSlackChannelResponse {
|
|
848
|
+
return {
|
|
849
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
850
|
+
channel: isSet(object.channel) ? DigestSlackChannel.fromJSON(object.channel) : undefined,
|
|
851
|
+
};
|
|
852
|
+
},
|
|
853
|
+
|
|
854
|
+
toJSON(message: GetDigestSlackChannelResponse): unknown {
|
|
855
|
+
const obj: any = {};
|
|
856
|
+
if (message.status !== undefined) {
|
|
857
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
858
|
+
}
|
|
859
|
+
if (message.channel !== undefined) {
|
|
860
|
+
obj.channel = DigestSlackChannel.toJSON(message.channel);
|
|
861
|
+
}
|
|
862
|
+
return obj;
|
|
863
|
+
},
|
|
864
|
+
|
|
865
|
+
create<I extends Exact<DeepPartial<GetDigestSlackChannelResponse>, I>>(base?: I): GetDigestSlackChannelResponse {
|
|
866
|
+
return GetDigestSlackChannelResponse.fromPartial(base ?? ({} as any));
|
|
867
|
+
},
|
|
868
|
+
fromPartial<I extends Exact<DeepPartial<GetDigestSlackChannelResponse>, I>>(
|
|
869
|
+
object: I,
|
|
870
|
+
): GetDigestSlackChannelResponse {
|
|
871
|
+
const message = createBaseGetDigestSlackChannelResponse();
|
|
872
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
873
|
+
? ResponseStatus.fromPartial(object.status)
|
|
874
|
+
: undefined;
|
|
875
|
+
message.channel = (object.channel !== undefined && object.channel !== null)
|
|
876
|
+
? DigestSlackChannel.fromPartial(object.channel)
|
|
877
|
+
: undefined;
|
|
878
|
+
return message;
|
|
879
|
+
},
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
function createBaseSetDigestSlackChannelRequest(): SetDigestSlackChannelRequest {
|
|
883
|
+
return { organizationId: "", slackChannelId: "" };
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
export const SetDigestSlackChannelRequest: MessageFns<SetDigestSlackChannelRequest> = {
|
|
887
|
+
encode(message: SetDigestSlackChannelRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
888
|
+
if (message.organizationId !== "") {
|
|
889
|
+
writer.uint32(10).string(message.organizationId);
|
|
890
|
+
}
|
|
891
|
+
if (message.slackChannelId !== "") {
|
|
892
|
+
writer.uint32(18).string(message.slackChannelId);
|
|
893
|
+
}
|
|
894
|
+
return writer;
|
|
895
|
+
},
|
|
896
|
+
|
|
897
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SetDigestSlackChannelRequest {
|
|
898
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
899
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
900
|
+
if (previousRecursionDepth >= 100) {
|
|
901
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
902
|
+
}
|
|
903
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
904
|
+
try {
|
|
905
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
906
|
+
const message = createBaseSetDigestSlackChannelRequest();
|
|
907
|
+
while (reader.pos < end) {
|
|
908
|
+
const tag = reader.uint32();
|
|
909
|
+
switch (tag >>> 3) {
|
|
910
|
+
case 1: {
|
|
911
|
+
if (tag !== 10) {
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
message.organizationId = reader.string();
|
|
916
|
+
continue;
|
|
917
|
+
}
|
|
918
|
+
case 2: {
|
|
919
|
+
if (tag !== 18) {
|
|
920
|
+
break;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
message.slackChannelId = reader.string();
|
|
924
|
+
continue;
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
928
|
+
break;
|
|
929
|
+
}
|
|
930
|
+
reader.skip(tag & 7);
|
|
931
|
+
}
|
|
932
|
+
return message;
|
|
933
|
+
} finally {
|
|
934
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
|
|
938
|
+
fromJSON(object: any): SetDigestSlackChannelRequest {
|
|
939
|
+
return {
|
|
940
|
+
organizationId: isSet(object.organizationId)
|
|
941
|
+
? globalThis.String(object.organizationId)
|
|
942
|
+
: isSet(object.organization_id)
|
|
943
|
+
? globalThis.String(object.organization_id)
|
|
944
|
+
: "",
|
|
945
|
+
slackChannelId: isSet(object.slackChannelId)
|
|
946
|
+
? globalThis.String(object.slackChannelId)
|
|
947
|
+
: isSet(object.slack_channel_id)
|
|
948
|
+
? globalThis.String(object.slack_channel_id)
|
|
949
|
+
: "",
|
|
950
|
+
};
|
|
951
|
+
},
|
|
952
|
+
|
|
953
|
+
toJSON(message: SetDigestSlackChannelRequest): unknown {
|
|
954
|
+
const obj: any = {};
|
|
955
|
+
if (message.organizationId !== "") {
|
|
956
|
+
obj.organizationId = message.organizationId;
|
|
957
|
+
}
|
|
958
|
+
if (message.slackChannelId !== "") {
|
|
959
|
+
obj.slackChannelId = message.slackChannelId;
|
|
960
|
+
}
|
|
961
|
+
return obj;
|
|
962
|
+
},
|
|
963
|
+
|
|
964
|
+
create<I extends Exact<DeepPartial<SetDigestSlackChannelRequest>, I>>(base?: I): SetDigestSlackChannelRequest {
|
|
965
|
+
return SetDigestSlackChannelRequest.fromPartial(base ?? ({} as any));
|
|
966
|
+
},
|
|
967
|
+
fromPartial<I extends Exact<DeepPartial<SetDigestSlackChannelRequest>, I>>(object: I): SetDigestSlackChannelRequest {
|
|
968
|
+
const message = createBaseSetDigestSlackChannelRequest();
|
|
969
|
+
message.organizationId = object.organizationId ?? "";
|
|
970
|
+
message.slackChannelId = object.slackChannelId ?? "";
|
|
971
|
+
return message;
|
|
972
|
+
},
|
|
973
|
+
};
|
|
974
|
+
|
|
975
|
+
function createBaseSetDigestSlackChannelResponse(): SetDigestSlackChannelResponse {
|
|
976
|
+
return { status: undefined, channel: undefined };
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export const SetDigestSlackChannelResponse: MessageFns<SetDigestSlackChannelResponse> = {
|
|
980
|
+
encode(message: SetDigestSlackChannelResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
981
|
+
if (message.status !== undefined) {
|
|
982
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
983
|
+
}
|
|
984
|
+
if (message.channel !== undefined) {
|
|
985
|
+
DigestSlackChannel.encode(message.channel, writer.uint32(18).fork()).join();
|
|
986
|
+
}
|
|
987
|
+
return writer;
|
|
988
|
+
},
|
|
989
|
+
|
|
990
|
+
decode(input: BinaryReader | Uint8Array, length?: number): SetDigestSlackChannelResponse {
|
|
991
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
992
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
993
|
+
if (previousRecursionDepth >= 100) {
|
|
994
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
995
|
+
}
|
|
996
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
997
|
+
try {
|
|
998
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
999
|
+
const message = createBaseSetDigestSlackChannelResponse();
|
|
1000
|
+
while (reader.pos < end) {
|
|
1001
|
+
const tag = reader.uint32();
|
|
1002
|
+
switch (tag >>> 3) {
|
|
1003
|
+
case 1: {
|
|
1004
|
+
if (tag !== 10) {
|
|
1005
|
+
break;
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1009
|
+
continue;
|
|
1010
|
+
}
|
|
1011
|
+
case 2: {
|
|
1012
|
+
if (tag !== 18) {
|
|
1013
|
+
break;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
message.channel = DigestSlackChannel.decode(reader, reader.uint32());
|
|
1017
|
+
continue;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1021
|
+
break;
|
|
1022
|
+
}
|
|
1023
|
+
reader.skip(tag & 7);
|
|
1024
|
+
}
|
|
1025
|
+
return message;
|
|
1026
|
+
} finally {
|
|
1027
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1028
|
+
}
|
|
1029
|
+
},
|
|
1030
|
+
|
|
1031
|
+
fromJSON(object: any): SetDigestSlackChannelResponse {
|
|
1032
|
+
return {
|
|
1033
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1034
|
+
channel: isSet(object.channel) ? DigestSlackChannel.fromJSON(object.channel) : undefined,
|
|
1035
|
+
};
|
|
1036
|
+
},
|
|
1037
|
+
|
|
1038
|
+
toJSON(message: SetDigestSlackChannelResponse): unknown {
|
|
1039
|
+
const obj: any = {};
|
|
1040
|
+
if (message.status !== undefined) {
|
|
1041
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1042
|
+
}
|
|
1043
|
+
if (message.channel !== undefined) {
|
|
1044
|
+
obj.channel = DigestSlackChannel.toJSON(message.channel);
|
|
1045
|
+
}
|
|
1046
|
+
return obj;
|
|
1047
|
+
},
|
|
1048
|
+
|
|
1049
|
+
create<I extends Exact<DeepPartial<SetDigestSlackChannelResponse>, I>>(base?: I): SetDigestSlackChannelResponse {
|
|
1050
|
+
return SetDigestSlackChannelResponse.fromPartial(base ?? ({} as any));
|
|
1051
|
+
},
|
|
1052
|
+
fromPartial<I extends Exact<DeepPartial<SetDigestSlackChannelResponse>, I>>(
|
|
1053
|
+
object: I,
|
|
1054
|
+
): SetDigestSlackChannelResponse {
|
|
1055
|
+
const message = createBaseSetDigestSlackChannelResponse();
|
|
1056
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1057
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1058
|
+
: undefined;
|
|
1059
|
+
message.channel = (object.channel !== undefined && object.channel !== null)
|
|
1060
|
+
? DigestSlackChannel.fromPartial(object.channel)
|
|
1061
|
+
: undefined;
|
|
1062
|
+
return message;
|
|
1063
|
+
},
|
|
1064
|
+
};
|
|
1065
|
+
|
|
1066
|
+
function createBaseDigestSlackChannel(): DigestSlackChannel {
|
|
1067
|
+
return { slackChannelId: "", slackChannelName: "", updatedBy: "", updatedAt: undefined };
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
export const DigestSlackChannel: MessageFns<DigestSlackChannel> = {
|
|
1071
|
+
encode(message: DigestSlackChannel, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1072
|
+
if (message.slackChannelId !== "") {
|
|
1073
|
+
writer.uint32(10).string(message.slackChannelId);
|
|
1074
|
+
}
|
|
1075
|
+
if (message.slackChannelName !== "") {
|
|
1076
|
+
writer.uint32(18).string(message.slackChannelName);
|
|
1077
|
+
}
|
|
1078
|
+
if (message.updatedBy !== "") {
|
|
1079
|
+
writer.uint32(26).string(message.updatedBy);
|
|
1080
|
+
}
|
|
1081
|
+
if (message.updatedAt !== undefined) {
|
|
1082
|
+
Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(34).fork()).join();
|
|
1083
|
+
}
|
|
1084
|
+
return writer;
|
|
1085
|
+
},
|
|
1086
|
+
|
|
1087
|
+
decode(input: BinaryReader | Uint8Array, length?: number): DigestSlackChannel {
|
|
1088
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1089
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1090
|
+
if (previousRecursionDepth >= 100) {
|
|
1091
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1092
|
+
}
|
|
1093
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1094
|
+
try {
|
|
1095
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1096
|
+
const message = createBaseDigestSlackChannel();
|
|
1097
|
+
while (reader.pos < end) {
|
|
1098
|
+
const tag = reader.uint32();
|
|
1099
|
+
switch (tag >>> 3) {
|
|
1100
|
+
case 1: {
|
|
1101
|
+
if (tag !== 10) {
|
|
1102
|
+
break;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
message.slackChannelId = reader.string();
|
|
1106
|
+
continue;
|
|
1107
|
+
}
|
|
1108
|
+
case 2: {
|
|
1109
|
+
if (tag !== 18) {
|
|
1110
|
+
break;
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
message.slackChannelName = reader.string();
|
|
1114
|
+
continue;
|
|
1115
|
+
}
|
|
1116
|
+
case 3: {
|
|
1117
|
+
if (tag !== 26) {
|
|
1118
|
+
break;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
message.updatedBy = reader.string();
|
|
1122
|
+
continue;
|
|
1123
|
+
}
|
|
1124
|
+
case 4: {
|
|
1125
|
+
if (tag !== 34) {
|
|
1126
|
+
break;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1130
|
+
continue;
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1134
|
+
break;
|
|
1135
|
+
}
|
|
1136
|
+
reader.skip(tag & 7);
|
|
1137
|
+
}
|
|
1138
|
+
return message;
|
|
1139
|
+
} finally {
|
|
1140
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
1143
|
+
|
|
1144
|
+
fromJSON(object: any): DigestSlackChannel {
|
|
1145
|
+
return {
|
|
1146
|
+
slackChannelId: isSet(object.slackChannelId)
|
|
1147
|
+
? globalThis.String(object.slackChannelId)
|
|
1148
|
+
: isSet(object.slack_channel_id)
|
|
1149
|
+
? globalThis.String(object.slack_channel_id)
|
|
1150
|
+
: "",
|
|
1151
|
+
slackChannelName: isSet(object.slackChannelName)
|
|
1152
|
+
? globalThis.String(object.slackChannelName)
|
|
1153
|
+
: isSet(object.slack_channel_name)
|
|
1154
|
+
? globalThis.String(object.slack_channel_name)
|
|
1155
|
+
: "",
|
|
1156
|
+
updatedBy: isSet(object.updatedBy)
|
|
1157
|
+
? globalThis.String(object.updatedBy)
|
|
1158
|
+
: isSet(object.updated_by)
|
|
1159
|
+
? globalThis.String(object.updated_by)
|
|
1160
|
+
: "",
|
|
1161
|
+
updatedAt: isSet(object.updatedAt)
|
|
1162
|
+
? fromJsonTimestamp(object.updatedAt)
|
|
1163
|
+
: isSet(object.updated_at)
|
|
1164
|
+
? fromJsonTimestamp(object.updated_at)
|
|
1165
|
+
: undefined,
|
|
1166
|
+
};
|
|
1167
|
+
},
|
|
1168
|
+
|
|
1169
|
+
toJSON(message: DigestSlackChannel): unknown {
|
|
1170
|
+
const obj: any = {};
|
|
1171
|
+
if (message.slackChannelId !== "") {
|
|
1172
|
+
obj.slackChannelId = message.slackChannelId;
|
|
1173
|
+
}
|
|
1174
|
+
if (message.slackChannelName !== "") {
|
|
1175
|
+
obj.slackChannelName = message.slackChannelName;
|
|
1176
|
+
}
|
|
1177
|
+
if (message.updatedBy !== "") {
|
|
1178
|
+
obj.updatedBy = message.updatedBy;
|
|
1179
|
+
}
|
|
1180
|
+
if (message.updatedAt !== undefined) {
|
|
1181
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
1182
|
+
}
|
|
1183
|
+
return obj;
|
|
1184
|
+
},
|
|
1185
|
+
|
|
1186
|
+
create<I extends Exact<DeepPartial<DigestSlackChannel>, I>>(base?: I): DigestSlackChannel {
|
|
1187
|
+
return DigestSlackChannel.fromPartial(base ?? ({} as any));
|
|
1188
|
+
},
|
|
1189
|
+
fromPartial<I extends Exact<DeepPartial<DigestSlackChannel>, I>>(object: I): DigestSlackChannel {
|
|
1190
|
+
const message = createBaseDigestSlackChannel();
|
|
1191
|
+
message.slackChannelId = object.slackChannelId ?? "";
|
|
1192
|
+
message.slackChannelName = object.slackChannelName ?? "";
|
|
1193
|
+
message.updatedBy = object.updatedBy ?? "";
|
|
1194
|
+
message.updatedAt = object.updatedAt ?? undefined;
|
|
1195
|
+
return message;
|
|
1196
|
+
},
|
|
1197
|
+
};
|
|
1198
|
+
|
|
682
1199
|
/**
|
|
683
1200
|
* NotificationGatewayService mirrors notification.api.v1.NotificationService: the organization's in-app alerts, which
|
|
684
|
-
* every member sees, with the signed-in member's own read state
|
|
685
|
-
* and every 30-60 s); there is no stream.
|
|
1201
|
+
* every member sees, with the signed-in member's own read state, and the Slack channel its daily digest posts to. Poll
|
|
1202
|
+
* ListAlerts for the bell (on load, on window focus and every 30-60 s); there is no stream.
|
|
686
1203
|
*/
|
|
687
1204
|
export interface NotificationGatewayService {
|
|
688
1205
|
/**
|
|
@@ -692,6 +1209,24 @@ export interface NotificationGatewayService {
|
|
|
692
1209
|
ListAlerts(request: ListAlertsRequest, metadata?: Metadata): Promise<ListAlertsResponse>;
|
|
693
1210
|
/** MarkAlertsRead marks alerts read for the signed-in member and returns the new unread count. */
|
|
694
1211
|
MarkAlertsRead(request: MarkAlertsReadRequest, metadata?: Metadata): Promise<MarkAlertsReadResponse>;
|
|
1212
|
+
/**
|
|
1213
|
+
* GetDigestSlackChannel returns the Slack channel the organization's daily digest posts to, absent when none is
|
|
1214
|
+
* set. Any member may call it.
|
|
1215
|
+
*/
|
|
1216
|
+
GetDigestSlackChannel(
|
|
1217
|
+
request: GetDigestSlackChannelRequest,
|
|
1218
|
+
metadata?: Metadata,
|
|
1219
|
+
): Promise<GetDigestSlackChannelResponse>;
|
|
1220
|
+
/**
|
|
1221
|
+
* SetDigestSlackChannel picks the Slack channel the organization's daily digest posts to, or clears it. Admins
|
|
1222
|
+
* only. The channel must be one OAuthGatewayService.ListSlackChannels lists; STATUS_CODE_VALIDATION_ERROR for a
|
|
1223
|
+
* non-admin, when Slack is not connected, or for a channel it does not list, and STATUS_CODE_UNAVAILABLE when
|
|
1224
|
+
* Slack cannot be asked. Clearing never asks Slack, so it works while Slack is disconnected or down.
|
|
1225
|
+
*/
|
|
1226
|
+
SetDigestSlackChannel(
|
|
1227
|
+
request: SetDigestSlackChannelRequest,
|
|
1228
|
+
metadata?: Metadata,
|
|
1229
|
+
): Promise<SetDigestSlackChannelResponse>;
|
|
695
1230
|
}
|
|
696
1231
|
|
|
697
1232
|
export const NotificationGatewayServiceServiceName = "gateway.web.v1.NotificationGatewayService";
|
|
@@ -703,6 +1238,8 @@ export class NotificationGatewayServiceClientImpl implements NotificationGateway
|
|
|
703
1238
|
this.rpc = rpc;
|
|
704
1239
|
this.ListAlerts = this.ListAlerts.bind(this);
|
|
705
1240
|
this.MarkAlertsRead = this.MarkAlertsRead.bind(this);
|
|
1241
|
+
this.GetDigestSlackChannel = this.GetDigestSlackChannel.bind(this);
|
|
1242
|
+
this.SetDigestSlackChannel = this.SetDigestSlackChannel.bind(this);
|
|
706
1243
|
}
|
|
707
1244
|
ListAlerts(request: ListAlertsRequest, metadata?: Metadata): Promise<ListAlertsResponse> {
|
|
708
1245
|
const data = ListAlertsRequest.encode(request).finish();
|
|
@@ -715,6 +1252,24 @@ export class NotificationGatewayServiceClientImpl implements NotificationGateway
|
|
|
715
1252
|
const promise = this.rpc.request(this.service, "MarkAlertsRead", data, metadata);
|
|
716
1253
|
return promise.then((data) => MarkAlertsReadResponse.decode(new BinaryReader(data)));
|
|
717
1254
|
}
|
|
1255
|
+
|
|
1256
|
+
GetDigestSlackChannel(
|
|
1257
|
+
request: GetDigestSlackChannelRequest,
|
|
1258
|
+
metadata?: Metadata,
|
|
1259
|
+
): Promise<GetDigestSlackChannelResponse> {
|
|
1260
|
+
const data = GetDigestSlackChannelRequest.encode(request).finish();
|
|
1261
|
+
const promise = this.rpc.request(this.service, "GetDigestSlackChannel", data, metadata);
|
|
1262
|
+
return promise.then((data) => GetDigestSlackChannelResponse.decode(new BinaryReader(data)));
|
|
1263
|
+
}
|
|
1264
|
+
|
|
1265
|
+
SetDigestSlackChannel(
|
|
1266
|
+
request: SetDigestSlackChannelRequest,
|
|
1267
|
+
metadata?: Metadata,
|
|
1268
|
+
): Promise<SetDigestSlackChannelResponse> {
|
|
1269
|
+
const data = SetDigestSlackChannelRequest.encode(request).finish();
|
|
1270
|
+
const promise = this.rpc.request(this.service, "SetDigestSlackChannel", data, metadata);
|
|
1271
|
+
return promise.then((data) => SetDigestSlackChannelResponse.decode(new BinaryReader(data)));
|
|
1272
|
+
}
|
|
718
1273
|
}
|
|
719
1274
|
|
|
720
1275
|
interface Rpc {
|