@miradorlabs/web-grpc 4.38.0 → 4.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.
- package/package.json +1 -1
- package/proto/gateway/web/v1/account_gateway.ts +251 -0
- package/proto/gateway/web/v1/account_gateway_grpc_pb.js +37 -0
- package/proto/gateway/web/v1/account_gateway_pb.js +466 -0
- package/proto/gateway/web/v1/claude_enterprise_gateway.ts +1 -1
- package/proto/gateway/web/v1/desktop_auth_gateway.ts +516 -0
- package/proto/gateway/web/v1/desktop_auth_gateway_grpc_pb.js +74 -0
- package/proto/gateway/web/v1/desktop_auth_gateway_pb.js +932 -0
- package/proto/gateway/web/v1/policy_gateway.ts +25 -7
- package/proto/gateway/web/v1/policy_gateway_grpc_pb.js +2 -0
|
@@ -52,6 +52,34 @@ export interface RevokeCliSessionFamilyResponse {
|
|
|
52
52
|
status: ResponseStatus | undefined;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
export interface AuthorizeDesktopUserLoginRequest {
|
|
56
|
+
/** code_challenge is the base64url-encoded SHA-256 of the desktop's PKCE verifier. */
|
|
57
|
+
codeChallenge: string;
|
|
58
|
+
/** redirect_port is the loopback port the desktop is listening on. */
|
|
59
|
+
redirectPort: number;
|
|
60
|
+
label: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface AuthorizeDesktopUserLoginResponse {
|
|
64
|
+
status: ResponseStatus | undefined;
|
|
65
|
+
code: string;
|
|
66
|
+
expiresAt: Date | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface AuthorizeDesktopUserFreshSessionRequest {
|
|
70
|
+
/** code_challenge is the base64url-encoded SHA-256 of the desktop's PKCE verifier. */
|
|
71
|
+
codeChallenge: string;
|
|
72
|
+
/** redirect_port is the loopback port the desktop is listening on. */
|
|
73
|
+
redirectPort: number;
|
|
74
|
+
label: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface AuthorizeDesktopUserFreshSessionResponse {
|
|
78
|
+
status: ResponseStatus | undefined;
|
|
79
|
+
code: string;
|
|
80
|
+
expiresAt: Date | undefined;
|
|
81
|
+
}
|
|
82
|
+
|
|
55
83
|
function createBaseAuthorizeDesktopLoginRequest(): AuthorizeDesktopLoginRequest {
|
|
56
84
|
return { organizationId: "", codeChallenge: "", redirectPort: 0, label: "" };
|
|
57
85
|
}
|
|
@@ -680,6 +708,454 @@ export const RevokeCliSessionFamilyResponse: MessageFns<RevokeCliSessionFamilyRe
|
|
|
680
708
|
},
|
|
681
709
|
};
|
|
682
710
|
|
|
711
|
+
function createBaseAuthorizeDesktopUserLoginRequest(): AuthorizeDesktopUserLoginRequest {
|
|
712
|
+
return { codeChallenge: "", redirectPort: 0, label: "" };
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export const AuthorizeDesktopUserLoginRequest: MessageFns<AuthorizeDesktopUserLoginRequest> = {
|
|
716
|
+
encode(message: AuthorizeDesktopUserLoginRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
717
|
+
if (message.codeChallenge !== "") {
|
|
718
|
+
writer.uint32(10).string(message.codeChallenge);
|
|
719
|
+
}
|
|
720
|
+
if (message.redirectPort !== 0) {
|
|
721
|
+
writer.uint32(16).int32(message.redirectPort);
|
|
722
|
+
}
|
|
723
|
+
if (message.label !== "") {
|
|
724
|
+
writer.uint32(26).string(message.label);
|
|
725
|
+
}
|
|
726
|
+
return writer;
|
|
727
|
+
},
|
|
728
|
+
|
|
729
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AuthorizeDesktopUserLoginRequest {
|
|
730
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
731
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
732
|
+
if (previousRecursionDepth >= 100) {
|
|
733
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
734
|
+
}
|
|
735
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
736
|
+
try {
|
|
737
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
738
|
+
const message = createBaseAuthorizeDesktopUserLoginRequest();
|
|
739
|
+
while (reader.pos < end) {
|
|
740
|
+
const tag = reader.uint32();
|
|
741
|
+
switch (tag >>> 3) {
|
|
742
|
+
case 1: {
|
|
743
|
+
if (tag !== 10) {
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
message.codeChallenge = reader.string();
|
|
748
|
+
continue;
|
|
749
|
+
}
|
|
750
|
+
case 2: {
|
|
751
|
+
if (tag !== 16) {
|
|
752
|
+
break;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
message.redirectPort = reader.int32();
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
case 3: {
|
|
759
|
+
if (tag !== 26) {
|
|
760
|
+
break;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
message.label = reader.string();
|
|
764
|
+
continue;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
768
|
+
break;
|
|
769
|
+
}
|
|
770
|
+
reader.skip(tag & 7);
|
|
771
|
+
}
|
|
772
|
+
return message;
|
|
773
|
+
} finally {
|
|
774
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
|
|
778
|
+
fromJSON(object: any): AuthorizeDesktopUserLoginRequest {
|
|
779
|
+
return {
|
|
780
|
+
codeChallenge: isSet(object.codeChallenge)
|
|
781
|
+
? globalThis.String(object.codeChallenge)
|
|
782
|
+
: isSet(object.code_challenge)
|
|
783
|
+
? globalThis.String(object.code_challenge)
|
|
784
|
+
: "",
|
|
785
|
+
redirectPort: isSet(object.redirectPort)
|
|
786
|
+
? globalThis.Number(object.redirectPort)
|
|
787
|
+
: isSet(object.redirect_port)
|
|
788
|
+
? globalThis.Number(object.redirect_port)
|
|
789
|
+
: 0,
|
|
790
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
791
|
+
};
|
|
792
|
+
},
|
|
793
|
+
|
|
794
|
+
toJSON(message: AuthorizeDesktopUserLoginRequest): unknown {
|
|
795
|
+
const obj: any = {};
|
|
796
|
+
if (message.codeChallenge !== "") {
|
|
797
|
+
obj.codeChallenge = message.codeChallenge;
|
|
798
|
+
}
|
|
799
|
+
if (message.redirectPort !== 0) {
|
|
800
|
+
obj.redirectPort = Math.round(message.redirectPort);
|
|
801
|
+
}
|
|
802
|
+
if (message.label !== "") {
|
|
803
|
+
obj.label = message.label;
|
|
804
|
+
}
|
|
805
|
+
return obj;
|
|
806
|
+
},
|
|
807
|
+
|
|
808
|
+
create<I extends Exact<DeepPartial<AuthorizeDesktopUserLoginRequest>, I>>(
|
|
809
|
+
base?: I,
|
|
810
|
+
): AuthorizeDesktopUserLoginRequest {
|
|
811
|
+
return AuthorizeDesktopUserLoginRequest.fromPartial(base ?? ({} as any));
|
|
812
|
+
},
|
|
813
|
+
fromPartial<I extends Exact<DeepPartial<AuthorizeDesktopUserLoginRequest>, I>>(
|
|
814
|
+
object: I,
|
|
815
|
+
): AuthorizeDesktopUserLoginRequest {
|
|
816
|
+
const message = createBaseAuthorizeDesktopUserLoginRequest();
|
|
817
|
+
message.codeChallenge = object.codeChallenge ?? "";
|
|
818
|
+
message.redirectPort = object.redirectPort ?? 0;
|
|
819
|
+
message.label = object.label ?? "";
|
|
820
|
+
return message;
|
|
821
|
+
},
|
|
822
|
+
};
|
|
823
|
+
|
|
824
|
+
function createBaseAuthorizeDesktopUserLoginResponse(): AuthorizeDesktopUserLoginResponse {
|
|
825
|
+
return { status: undefined, code: "", expiresAt: undefined };
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
export const AuthorizeDesktopUserLoginResponse: MessageFns<AuthorizeDesktopUserLoginResponse> = {
|
|
829
|
+
encode(message: AuthorizeDesktopUserLoginResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
830
|
+
if (message.status !== undefined) {
|
|
831
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
832
|
+
}
|
|
833
|
+
if (message.code !== "") {
|
|
834
|
+
writer.uint32(18).string(message.code);
|
|
835
|
+
}
|
|
836
|
+
if (message.expiresAt !== undefined) {
|
|
837
|
+
Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(26).fork()).join();
|
|
838
|
+
}
|
|
839
|
+
return writer;
|
|
840
|
+
},
|
|
841
|
+
|
|
842
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AuthorizeDesktopUserLoginResponse {
|
|
843
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
844
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
845
|
+
if (previousRecursionDepth >= 100) {
|
|
846
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
847
|
+
}
|
|
848
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
849
|
+
try {
|
|
850
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
851
|
+
const message = createBaseAuthorizeDesktopUserLoginResponse();
|
|
852
|
+
while (reader.pos < end) {
|
|
853
|
+
const tag = reader.uint32();
|
|
854
|
+
switch (tag >>> 3) {
|
|
855
|
+
case 1: {
|
|
856
|
+
if (tag !== 10) {
|
|
857
|
+
break;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
861
|
+
continue;
|
|
862
|
+
}
|
|
863
|
+
case 2: {
|
|
864
|
+
if (tag !== 18) {
|
|
865
|
+
break;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
message.code = reader.string();
|
|
869
|
+
continue;
|
|
870
|
+
}
|
|
871
|
+
case 3: {
|
|
872
|
+
if (tag !== 26) {
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
877
|
+
continue;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
881
|
+
break;
|
|
882
|
+
}
|
|
883
|
+
reader.skip(tag & 7);
|
|
884
|
+
}
|
|
885
|
+
return message;
|
|
886
|
+
} finally {
|
|
887
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
|
|
891
|
+
fromJSON(object: any): AuthorizeDesktopUserLoginResponse {
|
|
892
|
+
return {
|
|
893
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
894
|
+
code: isSet(object.code) ? globalThis.String(object.code) : "",
|
|
895
|
+
expiresAt: isSet(object.expiresAt)
|
|
896
|
+
? fromJsonTimestamp(object.expiresAt)
|
|
897
|
+
: isSet(object.expires_at)
|
|
898
|
+
? fromJsonTimestamp(object.expires_at)
|
|
899
|
+
: undefined,
|
|
900
|
+
};
|
|
901
|
+
},
|
|
902
|
+
|
|
903
|
+
toJSON(message: AuthorizeDesktopUserLoginResponse): unknown {
|
|
904
|
+
const obj: any = {};
|
|
905
|
+
if (message.status !== undefined) {
|
|
906
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
907
|
+
}
|
|
908
|
+
if (message.code !== "") {
|
|
909
|
+
obj.code = message.code;
|
|
910
|
+
}
|
|
911
|
+
if (message.expiresAt !== undefined) {
|
|
912
|
+
obj.expiresAt = message.expiresAt.toISOString();
|
|
913
|
+
}
|
|
914
|
+
return obj;
|
|
915
|
+
},
|
|
916
|
+
|
|
917
|
+
create<I extends Exact<DeepPartial<AuthorizeDesktopUserLoginResponse>, I>>(
|
|
918
|
+
base?: I,
|
|
919
|
+
): AuthorizeDesktopUserLoginResponse {
|
|
920
|
+
return AuthorizeDesktopUserLoginResponse.fromPartial(base ?? ({} as any));
|
|
921
|
+
},
|
|
922
|
+
fromPartial<I extends Exact<DeepPartial<AuthorizeDesktopUserLoginResponse>, I>>(
|
|
923
|
+
object: I,
|
|
924
|
+
): AuthorizeDesktopUserLoginResponse {
|
|
925
|
+
const message = createBaseAuthorizeDesktopUserLoginResponse();
|
|
926
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
927
|
+
? ResponseStatus.fromPartial(object.status)
|
|
928
|
+
: undefined;
|
|
929
|
+
message.code = object.code ?? "";
|
|
930
|
+
message.expiresAt = object.expiresAt ?? undefined;
|
|
931
|
+
return message;
|
|
932
|
+
},
|
|
933
|
+
};
|
|
934
|
+
|
|
935
|
+
function createBaseAuthorizeDesktopUserFreshSessionRequest(): AuthorizeDesktopUserFreshSessionRequest {
|
|
936
|
+
return { codeChallenge: "", redirectPort: 0, label: "" };
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export const AuthorizeDesktopUserFreshSessionRequest: MessageFns<AuthorizeDesktopUserFreshSessionRequest> = {
|
|
940
|
+
encode(message: AuthorizeDesktopUserFreshSessionRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
941
|
+
if (message.codeChallenge !== "") {
|
|
942
|
+
writer.uint32(10).string(message.codeChallenge);
|
|
943
|
+
}
|
|
944
|
+
if (message.redirectPort !== 0) {
|
|
945
|
+
writer.uint32(16).int32(message.redirectPort);
|
|
946
|
+
}
|
|
947
|
+
if (message.label !== "") {
|
|
948
|
+
writer.uint32(26).string(message.label);
|
|
949
|
+
}
|
|
950
|
+
return writer;
|
|
951
|
+
},
|
|
952
|
+
|
|
953
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AuthorizeDesktopUserFreshSessionRequest {
|
|
954
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
955
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
956
|
+
if (previousRecursionDepth >= 100) {
|
|
957
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
958
|
+
}
|
|
959
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
960
|
+
try {
|
|
961
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
962
|
+
const message = createBaseAuthorizeDesktopUserFreshSessionRequest();
|
|
963
|
+
while (reader.pos < end) {
|
|
964
|
+
const tag = reader.uint32();
|
|
965
|
+
switch (tag >>> 3) {
|
|
966
|
+
case 1: {
|
|
967
|
+
if (tag !== 10) {
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
message.codeChallenge = reader.string();
|
|
972
|
+
continue;
|
|
973
|
+
}
|
|
974
|
+
case 2: {
|
|
975
|
+
if (tag !== 16) {
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
message.redirectPort = reader.int32();
|
|
980
|
+
continue;
|
|
981
|
+
}
|
|
982
|
+
case 3: {
|
|
983
|
+
if (tag !== 26) {
|
|
984
|
+
break;
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
message.label = reader.string();
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
992
|
+
break;
|
|
993
|
+
}
|
|
994
|
+
reader.skip(tag & 7);
|
|
995
|
+
}
|
|
996
|
+
return message;
|
|
997
|
+
} finally {
|
|
998
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
|
|
1002
|
+
fromJSON(object: any): AuthorizeDesktopUserFreshSessionRequest {
|
|
1003
|
+
return {
|
|
1004
|
+
codeChallenge: isSet(object.codeChallenge)
|
|
1005
|
+
? globalThis.String(object.codeChallenge)
|
|
1006
|
+
: isSet(object.code_challenge)
|
|
1007
|
+
? globalThis.String(object.code_challenge)
|
|
1008
|
+
: "",
|
|
1009
|
+
redirectPort: isSet(object.redirectPort)
|
|
1010
|
+
? globalThis.Number(object.redirectPort)
|
|
1011
|
+
: isSet(object.redirect_port)
|
|
1012
|
+
? globalThis.Number(object.redirect_port)
|
|
1013
|
+
: 0,
|
|
1014
|
+
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
1015
|
+
};
|
|
1016
|
+
},
|
|
1017
|
+
|
|
1018
|
+
toJSON(message: AuthorizeDesktopUserFreshSessionRequest): unknown {
|
|
1019
|
+
const obj: any = {};
|
|
1020
|
+
if (message.codeChallenge !== "") {
|
|
1021
|
+
obj.codeChallenge = message.codeChallenge;
|
|
1022
|
+
}
|
|
1023
|
+
if (message.redirectPort !== 0) {
|
|
1024
|
+
obj.redirectPort = Math.round(message.redirectPort);
|
|
1025
|
+
}
|
|
1026
|
+
if (message.label !== "") {
|
|
1027
|
+
obj.label = message.label;
|
|
1028
|
+
}
|
|
1029
|
+
return obj;
|
|
1030
|
+
},
|
|
1031
|
+
|
|
1032
|
+
create<I extends Exact<DeepPartial<AuthorizeDesktopUserFreshSessionRequest>, I>>(
|
|
1033
|
+
base?: I,
|
|
1034
|
+
): AuthorizeDesktopUserFreshSessionRequest {
|
|
1035
|
+
return AuthorizeDesktopUserFreshSessionRequest.fromPartial(base ?? ({} as any));
|
|
1036
|
+
},
|
|
1037
|
+
fromPartial<I extends Exact<DeepPartial<AuthorizeDesktopUserFreshSessionRequest>, I>>(
|
|
1038
|
+
object: I,
|
|
1039
|
+
): AuthorizeDesktopUserFreshSessionRequest {
|
|
1040
|
+
const message = createBaseAuthorizeDesktopUserFreshSessionRequest();
|
|
1041
|
+
message.codeChallenge = object.codeChallenge ?? "";
|
|
1042
|
+
message.redirectPort = object.redirectPort ?? 0;
|
|
1043
|
+
message.label = object.label ?? "";
|
|
1044
|
+
return message;
|
|
1045
|
+
},
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
function createBaseAuthorizeDesktopUserFreshSessionResponse(): AuthorizeDesktopUserFreshSessionResponse {
|
|
1049
|
+
return { status: undefined, code: "", expiresAt: undefined };
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
export const AuthorizeDesktopUserFreshSessionResponse: MessageFns<AuthorizeDesktopUserFreshSessionResponse> = {
|
|
1053
|
+
encode(message: AuthorizeDesktopUserFreshSessionResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
1054
|
+
if (message.status !== undefined) {
|
|
1055
|
+
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
1056
|
+
}
|
|
1057
|
+
if (message.code !== "") {
|
|
1058
|
+
writer.uint32(18).string(message.code);
|
|
1059
|
+
}
|
|
1060
|
+
if (message.expiresAt !== undefined) {
|
|
1061
|
+
Timestamp.encode(toTimestamp(message.expiresAt), writer.uint32(26).fork()).join();
|
|
1062
|
+
}
|
|
1063
|
+
return writer;
|
|
1064
|
+
},
|
|
1065
|
+
|
|
1066
|
+
decode(input: BinaryReader | Uint8Array, length?: number): AuthorizeDesktopUserFreshSessionResponse {
|
|
1067
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
1068
|
+
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
1069
|
+
if (previousRecursionDepth >= 100) {
|
|
1070
|
+
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
1071
|
+
}
|
|
1072
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
1073
|
+
try {
|
|
1074
|
+
const end = length === undefined ? reader.len : reader.pos + length;
|
|
1075
|
+
const message = createBaseAuthorizeDesktopUserFreshSessionResponse();
|
|
1076
|
+
while (reader.pos < end) {
|
|
1077
|
+
const tag = reader.uint32();
|
|
1078
|
+
switch (tag >>> 3) {
|
|
1079
|
+
case 1: {
|
|
1080
|
+
if (tag !== 10) {
|
|
1081
|
+
break;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
1085
|
+
continue;
|
|
1086
|
+
}
|
|
1087
|
+
case 2: {
|
|
1088
|
+
if (tag !== 18) {
|
|
1089
|
+
break;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
message.code = reader.string();
|
|
1093
|
+
continue;
|
|
1094
|
+
}
|
|
1095
|
+
case 3: {
|
|
1096
|
+
if (tag !== 26) {
|
|
1097
|
+
break;
|
|
1098
|
+
}
|
|
1099
|
+
|
|
1100
|
+
message.expiresAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
|
|
1101
|
+
continue;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1105
|
+
break;
|
|
1106
|
+
}
|
|
1107
|
+
reader.skip(tag & 7);
|
|
1108
|
+
}
|
|
1109
|
+
return message;
|
|
1110
|
+
} finally {
|
|
1111
|
+
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
1112
|
+
}
|
|
1113
|
+
},
|
|
1114
|
+
|
|
1115
|
+
fromJSON(object: any): AuthorizeDesktopUserFreshSessionResponse {
|
|
1116
|
+
return {
|
|
1117
|
+
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
1118
|
+
code: isSet(object.code) ? globalThis.String(object.code) : "",
|
|
1119
|
+
expiresAt: isSet(object.expiresAt)
|
|
1120
|
+
? fromJsonTimestamp(object.expiresAt)
|
|
1121
|
+
: isSet(object.expires_at)
|
|
1122
|
+
? fromJsonTimestamp(object.expires_at)
|
|
1123
|
+
: undefined,
|
|
1124
|
+
};
|
|
1125
|
+
},
|
|
1126
|
+
|
|
1127
|
+
toJSON(message: AuthorizeDesktopUserFreshSessionResponse): unknown {
|
|
1128
|
+
const obj: any = {};
|
|
1129
|
+
if (message.status !== undefined) {
|
|
1130
|
+
obj.status = ResponseStatus.toJSON(message.status);
|
|
1131
|
+
}
|
|
1132
|
+
if (message.code !== "") {
|
|
1133
|
+
obj.code = message.code;
|
|
1134
|
+
}
|
|
1135
|
+
if (message.expiresAt !== undefined) {
|
|
1136
|
+
obj.expiresAt = message.expiresAt.toISOString();
|
|
1137
|
+
}
|
|
1138
|
+
return obj;
|
|
1139
|
+
},
|
|
1140
|
+
|
|
1141
|
+
create<I extends Exact<DeepPartial<AuthorizeDesktopUserFreshSessionResponse>, I>>(
|
|
1142
|
+
base?: I,
|
|
1143
|
+
): AuthorizeDesktopUserFreshSessionResponse {
|
|
1144
|
+
return AuthorizeDesktopUserFreshSessionResponse.fromPartial(base ?? ({} as any));
|
|
1145
|
+
},
|
|
1146
|
+
fromPartial<I extends Exact<DeepPartial<AuthorizeDesktopUserFreshSessionResponse>, I>>(
|
|
1147
|
+
object: I,
|
|
1148
|
+
): AuthorizeDesktopUserFreshSessionResponse {
|
|
1149
|
+
const message = createBaseAuthorizeDesktopUserFreshSessionResponse();
|
|
1150
|
+
message.status = (object.status !== undefined && object.status !== null)
|
|
1151
|
+
? ResponseStatus.fromPartial(object.status)
|
|
1152
|
+
: undefined;
|
|
1153
|
+
message.code = object.code ?? "";
|
|
1154
|
+
message.expiresAt = object.expiresAt ?? undefined;
|
|
1155
|
+
return message;
|
|
1156
|
+
},
|
|
1157
|
+
};
|
|
1158
|
+
|
|
683
1159
|
/**
|
|
684
1160
|
* DesktopAuthGatewayService is the desktop's approval page. A refusal is a non-success status whose reason clients
|
|
685
1161
|
* branch on (status.reason); the message is for people.
|
|
@@ -712,6 +1188,26 @@ export interface DesktopAuthGatewayService {
|
|
|
712
1188
|
request: RevokeCliSessionFamilyRequest,
|
|
713
1189
|
metadata?: Metadata,
|
|
714
1190
|
): Promise<RevokeCliSessionFamilyResponse>;
|
|
1191
|
+
/**
|
|
1192
|
+
* AuthorizeDesktopUserLogin is the click for a user session: one person in this deployment's product, with no
|
|
1193
|
+
* organization, covering the caller's current and future memberships in it; the session may delegate. Refusals:
|
|
1194
|
+
* VALIDATION_ERROR with reason USER_SESSIONS_DISABLED or ACCOUNT_REQUIRED.
|
|
1195
|
+
*/
|
|
1196
|
+
AuthorizeDesktopUserLogin(
|
|
1197
|
+
request: AuthorizeDesktopUserLoginRequest,
|
|
1198
|
+
metadata?: Metadata,
|
|
1199
|
+
): Promise<AuthorizeDesktopUserLoginResponse>;
|
|
1200
|
+
/**
|
|
1201
|
+
* AuthorizeDesktopUserFreshSession is the clickless approval of a user session right after a sign-in in the
|
|
1202
|
+
* desktop's window, with a Clerk session under five minutes old taken from the verified token, never from the
|
|
1203
|
+
* request. It covers every organization the caller belongs to in this product, now and in the future, so the window
|
|
1204
|
+
* says so before the sign-in. Refusals: VALIDATION_ERROR with reason CONSENT_REQUIRED (show the click) or
|
|
1205
|
+
* USER_SESSIONS_DISABLED, or PERMISSION_DENIED (denied, no click).
|
|
1206
|
+
*/
|
|
1207
|
+
AuthorizeDesktopUserFreshSession(
|
|
1208
|
+
request: AuthorizeDesktopUserFreshSessionRequest,
|
|
1209
|
+
metadata?: Metadata,
|
|
1210
|
+
): Promise<AuthorizeDesktopUserFreshSessionResponse>;
|
|
715
1211
|
}
|
|
716
1212
|
|
|
717
1213
|
export const DesktopAuthGatewayServiceServiceName = "gateway.web.v1.DesktopAuthGatewayService";
|
|
@@ -724,6 +1220,8 @@ export class DesktopAuthGatewayServiceClientImpl implements DesktopAuthGatewaySe
|
|
|
724
1220
|
this.AuthorizeDesktopLogin = this.AuthorizeDesktopLogin.bind(this);
|
|
725
1221
|
this.AuthorizeDesktopFreshSession = this.AuthorizeDesktopFreshSession.bind(this);
|
|
726
1222
|
this.RevokeCliSessionFamily = this.RevokeCliSessionFamily.bind(this);
|
|
1223
|
+
this.AuthorizeDesktopUserLogin = this.AuthorizeDesktopUserLogin.bind(this);
|
|
1224
|
+
this.AuthorizeDesktopUserFreshSession = this.AuthorizeDesktopUserFreshSession.bind(this);
|
|
727
1225
|
}
|
|
728
1226
|
AuthorizeDesktopLogin(
|
|
729
1227
|
request: AuthorizeDesktopLoginRequest,
|
|
@@ -751,6 +1249,24 @@ export class DesktopAuthGatewayServiceClientImpl implements DesktopAuthGatewaySe
|
|
|
751
1249
|
const promise = this.rpc.request(this.service, "RevokeCliSessionFamily", data, metadata);
|
|
752
1250
|
return promise.then((data) => RevokeCliSessionFamilyResponse.decode(new BinaryReader(data)));
|
|
753
1251
|
}
|
|
1252
|
+
|
|
1253
|
+
AuthorizeDesktopUserLogin(
|
|
1254
|
+
request: AuthorizeDesktopUserLoginRequest,
|
|
1255
|
+
metadata?: Metadata,
|
|
1256
|
+
): Promise<AuthorizeDesktopUserLoginResponse> {
|
|
1257
|
+
const data = AuthorizeDesktopUserLoginRequest.encode(request).finish();
|
|
1258
|
+
const promise = this.rpc.request(this.service, "AuthorizeDesktopUserLogin", data, metadata);
|
|
1259
|
+
return promise.then((data) => AuthorizeDesktopUserLoginResponse.decode(new BinaryReader(data)));
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
AuthorizeDesktopUserFreshSession(
|
|
1263
|
+
request: AuthorizeDesktopUserFreshSessionRequest,
|
|
1264
|
+
metadata?: Metadata,
|
|
1265
|
+
): Promise<AuthorizeDesktopUserFreshSessionResponse> {
|
|
1266
|
+
const data = AuthorizeDesktopUserFreshSessionRequest.encode(request).finish();
|
|
1267
|
+
const promise = this.rpc.request(this.service, "AuthorizeDesktopUserFreshSession", data, metadata);
|
|
1268
|
+
return promise.then((data) => AuthorizeDesktopUserFreshSessionResponse.decode(new BinaryReader(data)));
|
|
1269
|
+
}
|
|
754
1270
|
}
|
|
755
1271
|
|
|
756
1272
|
interface Rpc {
|
|
@@ -51,6 +51,50 @@ function deserialize_gateway_web_v1_AuthorizeDesktopLoginResponse(buffer_arg) {
|
|
|
51
51
|
return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopLoginResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
function serialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionRequest(arg) {
|
|
55
|
+
if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionRequest)) {
|
|
56
|
+
throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopUserFreshSessionRequest');
|
|
57
|
+
}
|
|
58
|
+
return Buffer.from(arg.serializeBinary());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function deserialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionRequest(buffer_arg) {
|
|
62
|
+
return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function serialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionResponse(arg) {
|
|
66
|
+
if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionResponse)) {
|
|
67
|
+
throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopUserFreshSessionResponse');
|
|
68
|
+
}
|
|
69
|
+
return Buffer.from(arg.serializeBinary());
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function deserialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionResponse(buffer_arg) {
|
|
73
|
+
return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function serialize_gateway_web_v1_AuthorizeDesktopUserLoginRequest(arg) {
|
|
77
|
+
if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginRequest)) {
|
|
78
|
+
throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopUserLoginRequest');
|
|
79
|
+
}
|
|
80
|
+
return Buffer.from(arg.serializeBinary());
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function deserialize_gateway_web_v1_AuthorizeDesktopUserLoginRequest(buffer_arg) {
|
|
84
|
+
return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function serialize_gateway_web_v1_AuthorizeDesktopUserLoginResponse(arg) {
|
|
88
|
+
if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginResponse)) {
|
|
89
|
+
throw new Error('Expected argument of type gateway.web.v1.AuthorizeDesktopUserLoginResponse');
|
|
90
|
+
}
|
|
91
|
+
return Buffer.from(arg.serializeBinary());
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function deserialize_gateway_web_v1_AuthorizeDesktopUserLoginResponse(buffer_arg) {
|
|
95
|
+
return proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
96
|
+
}
|
|
97
|
+
|
|
54
98
|
function serialize_gateway_web_v1_RevokeCliSessionFamilyRequest(arg) {
|
|
55
99
|
if (!(arg instanceof proto_gateway_web_v1_desktop_auth_gateway_pb.RevokeCliSessionFamilyRequest)) {
|
|
56
100
|
throw new Error('Expected argument of type gateway.web.v1.RevokeCliSessionFamilyRequest');
|
|
@@ -119,6 +163,36 @@ revokeCliSessionFamily: {
|
|
|
119
163
|
responseSerialize: serialize_gateway_web_v1_RevokeCliSessionFamilyResponse,
|
|
120
164
|
responseDeserialize: deserialize_gateway_web_v1_RevokeCliSessionFamilyResponse,
|
|
121
165
|
},
|
|
166
|
+
// AuthorizeDesktopUserLogin is the click for a user session: one person in this deployment's product, with no
|
|
167
|
+
// organization, covering the caller's current and future memberships in it; the session may delegate. Refusals:
|
|
168
|
+
// VALIDATION_ERROR with reason USER_SESSIONS_DISABLED or ACCOUNT_REQUIRED.
|
|
169
|
+
authorizeDesktopUserLogin: {
|
|
170
|
+
path: '/gateway.web.v1.DesktopAuthGatewayService/AuthorizeDesktopUserLogin',
|
|
171
|
+
requestStream: false,
|
|
172
|
+
responseStream: false,
|
|
173
|
+
requestType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginRequest,
|
|
174
|
+
responseType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserLoginResponse,
|
|
175
|
+
requestSerialize: serialize_gateway_web_v1_AuthorizeDesktopUserLoginRequest,
|
|
176
|
+
requestDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopUserLoginRequest,
|
|
177
|
+
responseSerialize: serialize_gateway_web_v1_AuthorizeDesktopUserLoginResponse,
|
|
178
|
+
responseDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopUserLoginResponse,
|
|
179
|
+
},
|
|
180
|
+
// AuthorizeDesktopUserFreshSession is the clickless approval of a user session right after a sign-in in the
|
|
181
|
+
// desktop's window, with a Clerk session under five minutes old taken from the verified token, never from the
|
|
182
|
+
// request. It covers every organization the caller belongs to in this product, now and in the future, so the window
|
|
183
|
+
// says so before the sign-in. Refusals: VALIDATION_ERROR with reason CONSENT_REQUIRED (show the click) or
|
|
184
|
+
// USER_SESSIONS_DISABLED, or PERMISSION_DENIED (denied, no click).
|
|
185
|
+
authorizeDesktopUserFreshSession: {
|
|
186
|
+
path: '/gateway.web.v1.DesktopAuthGatewayService/AuthorizeDesktopUserFreshSession',
|
|
187
|
+
requestStream: false,
|
|
188
|
+
responseStream: false,
|
|
189
|
+
requestType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionRequest,
|
|
190
|
+
responseType: proto_gateway_web_v1_desktop_auth_gateway_pb.AuthorizeDesktopUserFreshSessionResponse,
|
|
191
|
+
requestSerialize: serialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionRequest,
|
|
192
|
+
requestDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionRequest,
|
|
193
|
+
responseSerialize: serialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionResponse,
|
|
194
|
+
responseDeserialize: deserialize_gateway_web_v1_AuthorizeDesktopUserFreshSessionResponse,
|
|
195
|
+
},
|
|
122
196
|
};
|
|
123
197
|
|
|
124
198
|
exports.DesktopAuthGatewayServiceClient = grpc.makeGenericClientConstructor(DesktopAuthGatewayServiceService, 'DesktopAuthGatewayService');
|