@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
7,360 lines • 264 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc unknown
// source: zitadel/user/v2beta/user_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Struct } from "../../../google/protobuf/struct.js";
import { Details, ListDetails, ListQuery, Organization } from "../../object/v2beta/object.js";
import { passkeyAuthenticatorFromJSON, passkeyAuthenticatorToJSON, PasskeyRegistrationCode, ReturnPasskeyRegistrationCode, SendPasskeyRegistrationLink, } from "./auth.js";
import { ReturnEmailVerificationCode, SendEmailVerificationCode, SetHumanEmail } from "./email.js";
import { FormData, IDPInformation, IDPIntent, IDPLink, LDAPCredentials, RedirectURLs } from "./idp.js";
import { HashedPassword, Password, ReturnPasswordResetCode, SendPasswordResetLink, SetPassword } from "./password.js";
import { ReturnPhoneVerificationCode, SendPhoneVerificationCode, SetHumanPhone } from "./phone.js";
import { SearchQuery, userFieldNameFromJSON, userFieldNameToJSON } from "./query.js";
import { SetHumanProfile, SetMetadataEntry, User } from "./user.js";
export const protobufPackage = "zitadel.user.v2beta";
export var AuthenticationMethodType;
(function (AuthenticationMethodType) {
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_UNSPECIFIED"] = 0] = "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_PASSWORD"] = 1] = "AUTHENTICATION_METHOD_TYPE_PASSWORD";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_PASSKEY"] = 2] = "AUTHENTICATION_METHOD_TYPE_PASSKEY";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_IDP"] = 3] = "AUTHENTICATION_METHOD_TYPE_IDP";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_TOTP"] = 4] = "AUTHENTICATION_METHOD_TYPE_TOTP";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_U2F"] = 5] = "AUTHENTICATION_METHOD_TYPE_U2F";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_OTP_SMS"] = 6] = "AUTHENTICATION_METHOD_TYPE_OTP_SMS";
AuthenticationMethodType[AuthenticationMethodType["AUTHENTICATION_METHOD_TYPE_OTP_EMAIL"] = 7] = "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL";
AuthenticationMethodType[AuthenticationMethodType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
})(AuthenticationMethodType || (AuthenticationMethodType = {}));
export function authenticationMethodTypeFromJSON(object) {
switch (object) {
case 0:
case "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_UNSPECIFIED;
case 1:
case "AUTHENTICATION_METHOD_TYPE_PASSWORD":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_PASSWORD;
case 2:
case "AUTHENTICATION_METHOD_TYPE_PASSKEY":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_PASSKEY;
case 3:
case "AUTHENTICATION_METHOD_TYPE_IDP":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_IDP;
case 4:
case "AUTHENTICATION_METHOD_TYPE_TOTP":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_TOTP;
case 5:
case "AUTHENTICATION_METHOD_TYPE_U2F":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_U2F;
case 6:
case "AUTHENTICATION_METHOD_TYPE_OTP_SMS":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_OTP_SMS;
case 7:
case "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL":
return AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_OTP_EMAIL;
case -1:
case "UNRECOGNIZED":
default:
return AuthenticationMethodType.UNRECOGNIZED;
}
}
export function authenticationMethodTypeToJSON(object) {
switch (object) {
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_UNSPECIFIED:
return "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_PASSWORD:
return "AUTHENTICATION_METHOD_TYPE_PASSWORD";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_PASSKEY:
return "AUTHENTICATION_METHOD_TYPE_PASSKEY";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_IDP:
return "AUTHENTICATION_METHOD_TYPE_IDP";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_TOTP:
return "AUTHENTICATION_METHOD_TYPE_TOTP";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_U2F:
return "AUTHENTICATION_METHOD_TYPE_U2F";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_OTP_SMS:
return "AUTHENTICATION_METHOD_TYPE_OTP_SMS";
case AuthenticationMethodType.AUTHENTICATION_METHOD_TYPE_OTP_EMAIL:
return "AUTHENTICATION_METHOD_TYPE_OTP_EMAIL";
case AuthenticationMethodType.UNRECOGNIZED:
default:
return "UNRECOGNIZED";
}
}
function createBaseAddHumanUserRequest() {
return {
userId: undefined,
username: undefined,
organization: undefined,
profile: undefined,
email: undefined,
phone: undefined,
metadata: [],
password: undefined,
hashedPassword: undefined,
idpLinks: [],
totpSecret: undefined,
};
}
export const AddHumanUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== undefined) {
writer.uint32(10).string(message.userId);
}
if (message.username !== undefined) {
writer.uint32(18).string(message.username);
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(90).fork()).join();
}
if (message.profile !== undefined) {
SetHumanProfile.encode(message.profile, writer.uint32(34).fork()).join();
}
if (message.email !== undefined) {
SetHumanEmail.encode(message.email, writer.uint32(42).fork()).join();
}
if (message.phone !== undefined) {
SetHumanPhone.encode(message.phone, writer.uint32(82).fork()).join();
}
for (const v of message.metadata) {
SetMetadataEntry.encode(v, writer.uint32(50).fork()).join();
}
if (message.password !== undefined) {
Password.encode(message.password, writer.uint32(58).fork()).join();
}
if (message.hashedPassword !== undefined) {
HashedPassword.encode(message.hashedPassword, writer.uint32(66).fork()).join();
}
for (const v of message.idpLinks) {
IDPLink.encode(v, writer.uint32(74).fork()).join();
}
if (message.totpSecret !== undefined) {
writer.uint32(98).string(message.totpSecret);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddHumanUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.username = reader.string();
continue;
}
case 11: {
if (tag !== 90) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.profile = SetHumanProfile.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.email = SetHumanEmail.decode(reader, reader.uint32());
continue;
}
case 10: {
if (tag !== 82) {
break;
}
message.phone = SetHumanPhone.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.metadata.push(SetMetadataEntry.decode(reader, reader.uint32()));
continue;
}
case 7: {
if (tag !== 58) {
break;
}
message.password = Password.decode(reader, reader.uint32());
continue;
}
case 8: {
if (tag !== 66) {
break;
}
message.hashedPassword = HashedPassword.decode(reader, reader.uint32());
continue;
}
case 9: {
if (tag !== 74) {
break;
}
message.idpLinks.push(IDPLink.decode(reader, reader.uint32()));
continue;
}
case 12: {
if (tag !== 98) {
break;
}
message.totpSecret = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : undefined,
username: isSet(object.username) ? globalThis.String(object.username) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
profile: isSet(object.profile) ? SetHumanProfile.fromJSON(object.profile) : undefined,
email: isSet(object.email) ? SetHumanEmail.fromJSON(object.email) : undefined,
phone: isSet(object.phone) ? SetHumanPhone.fromJSON(object.phone) : undefined,
metadata: globalThis.Array.isArray(object?.metadata)
? object.metadata.map((e) => SetMetadataEntry.fromJSON(e))
: [],
password: isSet(object.password) ? Password.fromJSON(object.password) : undefined,
hashedPassword: isSet(object.hashedPassword) ? HashedPassword.fromJSON(object.hashedPassword) : undefined,
idpLinks: globalThis.Array.isArray(object?.idpLinks) ? object.idpLinks.map((e) => IDPLink.fromJSON(e)) : [],
totpSecret: isSet(object.totpSecret) ? globalThis.String(object.totpSecret) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== undefined) {
obj.userId = message.userId;
}
if (message.username !== undefined) {
obj.username = message.username;
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.profile !== undefined) {
obj.profile = SetHumanProfile.toJSON(message.profile);
}
if (message.email !== undefined) {
obj.email = SetHumanEmail.toJSON(message.email);
}
if (message.phone !== undefined) {
obj.phone = SetHumanPhone.toJSON(message.phone);
}
if (message.metadata?.length) {
obj.metadata = message.metadata.map((e) => SetMetadataEntry.toJSON(e));
}
if (message.password !== undefined) {
obj.password = Password.toJSON(message.password);
}
if (message.hashedPassword !== undefined) {
obj.hashedPassword = HashedPassword.toJSON(message.hashedPassword);
}
if (message.idpLinks?.length) {
obj.idpLinks = message.idpLinks.map((e) => IDPLink.toJSON(e));
}
if (message.totpSecret !== undefined) {
obj.totpSecret = message.totpSecret;
}
return obj;
},
create(base) {
return AddHumanUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddHumanUserRequest();
message.userId = object.userId ?? undefined;
message.username = object.username ?? undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.profile = (object.profile !== undefined && object.profile !== null)
? SetHumanProfile.fromPartial(object.profile)
: undefined;
message.email = (object.email !== undefined && object.email !== null)
? SetHumanEmail.fromPartial(object.email)
: undefined;
message.phone = (object.phone !== undefined && object.phone !== null)
? SetHumanPhone.fromPartial(object.phone)
: undefined;
message.metadata = object.metadata?.map((e) => SetMetadataEntry.fromPartial(e)) || [];
message.password = (object.password !== undefined && object.password !== null)
? Password.fromPartial(object.password)
: undefined;
message.hashedPassword = (object.hashedPassword !== undefined && object.hashedPassword !== null)
? HashedPassword.fromPartial(object.hashedPassword)
: undefined;
message.idpLinks = object.idpLinks?.map((e) => IDPLink.fromPartial(e)) || [];
message.totpSecret = object.totpSecret ?? undefined;
return message;
},
};
function createBaseAddHumanUserResponse() {
return { userId: "", details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const AddHumanUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(18).fork()).join();
}
if (message.emailCode !== undefined) {
writer.uint32(26).string(message.emailCode);
}
if (message.phoneCode !== undefined) {
writer.uint32(34).string(message.phoneCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddHumanUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.emailCode = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.phoneCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
emailCode: isSet(object.emailCode) ? globalThis.String(object.emailCode) : undefined,
phoneCode: isSet(object.phoneCode) ? globalThis.String(object.phoneCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.emailCode !== undefined) {
obj.emailCode = message.emailCode;
}
if (message.phoneCode !== undefined) {
obj.phoneCode = message.phoneCode;
}
return obj;
},
create(base) {
return AddHumanUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddHumanUserResponse();
message.userId = object.userId ?? "";
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.emailCode = object.emailCode ?? undefined;
message.phoneCode = object.phoneCode ?? undefined;
return message;
},
};
function createBaseGetUserByIDRequest() {
return { userId: "" };
}
export const GetUserByIDRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetUserByIDRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return GetUserByIDRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetUserByIDRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseGetUserByIDResponse() {
return { details: undefined, user: undefined };
}
export const GetUserByIDResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.user !== undefined) {
User.encode(message.user, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetUserByIDResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.user = User.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.user !== undefined) {
obj.user = User.toJSON(message.user);
}
return obj;
},
create(base) {
return GetUserByIDResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetUserByIDResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
return message;
},
};
function createBaseListUsersRequest() {
return { query: undefined, sortingColumn: 0, queries: [] };
}
export const ListUsersRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.query !== undefined) {
ListQuery.encode(message.query, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.queries) {
SearchQuery.encode(v, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListUsersRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.query = ListQuery.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.queries.push(SearchQuery.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
query: isSet(object.query) ? ListQuery.fromJSON(object.query) : undefined,
sortingColumn: isSet(object.sortingColumn) ? userFieldNameFromJSON(object.sortingColumn) : 0,
queries: globalThis.Array.isArray(object?.queries) ? object.queries.map((e) => SearchQuery.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.query !== undefined) {
obj.query = ListQuery.toJSON(message.query);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = userFieldNameToJSON(message.sortingColumn);
}
if (message.queries?.length) {
obj.queries = message.queries.map((e) => SearchQuery.toJSON(e));
}
return obj;
},
create(base) {
return ListUsersRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListUsersRequest();
message.query = (object.query !== undefined && object.query !== null)
? ListQuery.fromPartial(object.query)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.queries = object.queries?.map((e) => SearchQuery.fromPartial(e)) || [];
return message;
},
};
function createBaseListUsersResponse() {
return { details: undefined, sortingColumn: 0, result: [] };
}
export const ListUsersResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.result) {
User.encode(v, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListUsersResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ListDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.result.push(User.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
sortingColumn: isSet(object.sortingColumn) ? userFieldNameFromJSON(object.sortingColumn) : 0,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => User.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = userFieldNameToJSON(message.sortingColumn);
}
if (message.result?.length) {
obj.result = message.result.map((e) => User.toJSON(e));
}
return obj;
},
create(base) {
return ListUsersResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListUsersResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.result = object.result?.map((e) => User.fromPartial(e)) || [];
return message;
},
};
function createBaseSetEmailRequest() {
return { userId: "", email: "", sendCode: undefined, returnCode: undefined, isVerified: undefined };
}
export const SetEmailRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.email !== "") {
writer.uint32(18).string(message.email);
}
if (message.sendCode !== undefined) {
SendEmailVerificationCode.encode(message.sendCode, writer.uint32(26).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnEmailVerificationCode.encode(message.returnCode, writer.uint32(34).fork()).join();
}
if (message.isVerified !== undefined) {
writer.uint32(40).bool(message.isVerified);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetEmailRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.email = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.sendCode = SendEmailVerificationCode.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.returnCode = ReturnEmailVerificationCode.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.isVerified = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
email: isSet(object.email) ? globalThis.String(object.email) : "",
sendCode: isSet(object.sendCode) ? SendEmailVerificationCode.fromJSON(object.sendCode) : undefined,
returnCode: isSet(object.returnCode) ? ReturnEmailVerificationCode.fromJSON(object.returnCode) : undefined,
isVerified: isSet(object.isVerified) ? globalThis.Boolean(object.isVerified) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.email !== "") {
obj.email = message.email;
}
if (message.sendCode !== undefined) {
obj.sendCode = SendEmailVerificationCode.toJSON(message.sendCode);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnEmailVerificationCode.toJSON(message.returnCode);
}
if (message.isVerified !== undefined) {
obj.isVerified = message.isVerified;
}
return obj;
},
create(base) {
return SetEmailRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetEmailRequest();
message.userId = object.userId ?? "";
message.email = object.email ?? "";
message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
? SendEmailVerificationCode.fromPartial(object.sendCode)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnEmailVerificationCode.fromPartial(object.returnCode)
: undefined;
message.isVerified = object.isVerified ?? undefined;
return message;
},
};
function createBaseSetEmailResponse() {
return { details: undefined, verificationCode: undefined };
}
export const SetEmailResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.verificationCode !== undefined) {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetEmailResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return SetEmailResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetEmailResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseResendEmailCodeRequest() {
return { userId: "", sendCode: undefined, returnCode: undefined };
}
export const ResendEmailCodeRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.sendCode !== undefined) {
SendEmailVerificationCode.encode(message.sendCode, writer.uint32(18).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnEmailVerificationCode.encode(message.returnCode, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResendEmailCodeRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.sendCode = SendEmailVerificationCode.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.returnCode = ReturnEmailVerificationCode.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
sendCode: isSet(object.sendCode) ? SendEmailVerificationCode.fromJSON(object.sendCode) : undefined,
returnCode: isSet(object.returnCode) ? ReturnEmailVerificationCode.fromJSON(object.returnCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.sendCode !== undefined) {
obj.sendCode = SendEmailVerificationCode.toJSON(message.sendCode);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnEmailVerificationCode.toJSON(message.returnCode);
}
return obj;
},
create(base) {
return ResendEmailCodeRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResendEmailCodeRequest();
message.userId = object.userId ?? "";
message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
? SendEmailVerificationCode.fromPartial(object.sendCode)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnEmailVerificationCode.fromPartial(object.returnCode)
: undefined;
return message;
},
};
function createBaseResendEmailCodeResponse() {
return { details: undefined, verificationCode: undefined };
}
export const ResendEmailCodeResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.verificationCode !== undefined) {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResendEmailCodeResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return ResendEmailCodeResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResendEmailCodeResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseVerifyEmailRequest() {
return { userId: "", verificationCode: "" };
}
export const VerifyEmailRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.verificationCode !== "") {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyEmailRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.verificationCode !== "") {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return VerifyEmailRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyEmailRequest();
message.userId = object.userId ?? "";
message.verificationCode = object.verificationCode ?? "";
return message;
},
};
function createBaseVerifyEmailResponse() {
return { details: undefined };
}
export const VerifyEmailResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyEmailResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return VerifyEmailResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyEmailResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseSetPhoneRequest() {
return { userId: "", phone: "", sendCode: undefined, returnCode: undefined, isVerified: undefined };
}
export const SetPhoneRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.phone !== "") {
writer.uint32(18).string(message.phone);
}
if (message.sendCode !== undefined) {
SendPhoneVerificationCode.encode(message.sendCode, writer.uint32(26).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnPhoneVerificationCode.encode(message.returnCode, writer.uint32(34).fork()).join();
}
if (message.isVerified !== undefined) {
writer.uint32(40).bool(message.isVerified);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPhoneRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.phone = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.sendCode = SendPhoneVerificationCode.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.returnCode = ReturnPhoneVerificationCode.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.isVerified = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
phone: isSet(object.phone) ? globalThis.String(object.phone) : "",
sendCode: isSet(object.sendCode) ? SendPhoneVerificationCode.fromJSON(object.sendCode) : undefined,
returnCode: isSet(object.returnCode) ? ReturnPhoneVerificationCode.fromJSON(object.returnCode) : undefined,
isVerified: isSet(object.isVerified) ? globalThis.Boolean(object.isVerified) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.phone !== "") {
obj.phone = message.phone;
}
if (message.sendCode !== undefined) {
obj.sendCode = SendPhoneVerificationCode.toJSON(message.sendCode);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnPhoneVerificationCode.toJSON(message.returnCode);
}
if (message.isVerified !== undefined) {
obj.isVerified = message.isVerified;
}
return obj;
},
create(base) {
return SetPhoneRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPhoneRequest();
message.userId = object.userId ?? "";
message.phone = object.phone ?? "";
message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
? SendPhoneVerificationCode.fromPartial(object.sendCode)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnPhoneVerificationCode.fromPartial(object.returnCode)
: undefined;
message.isVerified = object.isVerified ?? undefined;
return message;
},
};
function createBaseSetPhoneResponse() {
return { details: undefined, verificationCode: undefined };
}
export const SetPhoneResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.verificationCode !== undefined) {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPhoneResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return SetPhoneResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPhoneResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseRemovePhoneRequest() {
return { userId: "" };
}
export const RemovePhoneRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemovePhoneRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RemovePhoneRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemovePhoneRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseRemovePhoneResponse() {
return { details: undefined };
}
export const RemovePhoneResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemovePhoneResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return RemovePhoneResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemovePhoneResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseResendPhoneCodeRequest() {
return { userId: "", sendCode: undefined, returnCode: undefined };
}
export const ResendPhoneCodeRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.sendCode !== undefined) {
SendPhoneVerificationCode.encode(message.sendCode, writer.uint32(26).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnPhoneVerificationCode.encode(message.returnCode, writer.uint32(34).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResendPhoneCodeRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.sendCode = SendPhoneVerificationCode.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.returnCode = ReturnPhoneVerificationCode.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
sendCode: isSet(object.sendCode) ? SendPhoneVerificationCode.fromJSON(object.sendCode) : undefined,
returnCode: isSet(object.returnCode) ? ReturnPhoneVerificationCode.fromJSON(object.returnCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.sendCode !== undefined) {
obj.sendCode = SendPhoneVerificationCode.toJSON(message.sendCode);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnPhoneVerificationCode.toJSON(message.returnCode);
}
return obj;
},
create(base) {
return ResendPhoneCodeRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResendPhoneCodeRequest();
message.userId = object.userId ?? "";
message.sendCode = (object.sendCode !== undefined && object.sendCode !== null)
? SendPhoneVerificationCode.fromPartial(object.sendCode)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnPhoneVerificationCode.fromPartial(object.returnCode)
: undefined;
return message;
},
};
function createBaseResendPhoneCodeResponse() {
return { details: undefined, verificationCode: undefined };
}
export const ResendPhoneCodeResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.verificationCode !== undefined) {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseResendPhoneCodeResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return ResendPhoneCodeResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseResendPhoneCodeResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseVerifyPhoneRequest() {
return { userId: "", verificationCode: "" };
}
export const VerifyPhoneRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.verificationCode !== "") {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyPhoneRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.verificationCode !== "") {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return VerifyPhoneRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyPhoneRequest();
message.userId = object.userId ?? "";
message.verificationCode = object.verificationCode ?? "";
return message;
},
};
function createBaseVerifyPhoneResponse() {
return { details: undefined };
}
export const VerifyPhoneResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyPhoneResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return VerifyPhoneResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyPhoneResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseDeleteUserRequest() {
return { userId: "" };
}
export const DeleteUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeleteUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return DeleteUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteUserRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseDeleteUserResponse() {
return { details: undefined };
}
export const DeleteUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeleteUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return DeleteUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseUpdateHumanUserRequest() {
return {
userId: "",
username: undefined,
profile: undefined,
email: undefined,
phone: undefined,
password: undefined,
};
}
export const UpdateHumanUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.username !== undefined) {
writer.uint32(18).string(message.username);
}
if (message.profile !== undefined) {
SetHumanProfile.encode(message.profile, writer.uint32(26).fork()).join();
}
if (message.email !== undefined) {
SetHumanEmail.encode(message.email, writer.uint32(34).fork()).join();
}
if (message.phone !== undefined) {
SetHumanPhone.encode(message.phone, writer.uint32(42).fork()).join();
}
if (message.password !== undefined) {
SetPassword.encode(message.password, writer.uint32(50).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUpdateHumanUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.username = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.profile = SetHumanProfile.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.email = SetHumanEmail.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.phone = SetHumanPhone.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.password = SetPassword.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
username: isSet(object.username) ? globalThis.String(object.username) : undefined,
profile: isSet(object.profile) ? SetHumanProfile.fromJSON(object.profile) : undefined,
email: isSet(object.email) ? SetHumanEmail.fromJSON(object.email) : undefined,
phone: isSet(object.phone) ? SetHumanPhone.fromJSON(object.phone) : undefined,
password: isSet(object.password) ? SetPassword.fromJSON(object.password) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.username !== undefined) {
obj.username = message.username;
}
if (message.profile !== undefined) {
obj.profile = SetHumanProfile.toJSON(message.profile);
}
if (message.email !== undefined) {
obj.email = SetHumanEmail.toJSON(message.email);
}
if (message.phone !== undefined) {
obj.phone = SetHumanPhone.toJSON(message.phone);
}
if (message.password !== undefined) {
obj.password = SetPassword.toJSON(message.password);
}
return obj;
},
create(base) {
return UpdateHumanUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateHumanUserRequest();
message.userId = object.userId ?? "";
message.username = object.username ?? undefined;
message.profile = (object.profile !== undefined && object.profile !== null)
? SetHumanProfile.fromPartial(object.profile)
: undefined;
message.email = (object.email !== undefined && object.email !== null)
? SetHumanEmail.fromPartial(object.email)
: undefined;
message.phone = (object.phone !== undefined && object.phone !== null)
? SetHumanPhone.fromPartial(object.phone)
: undefined;
message.password = (object.password !== undefined && object.password !== null)
? SetPassword.fromPartial(object.password)
: undefined;
return message;
},
};
function createBaseUpdateHumanUserResponse() {
return { details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const UpdateHumanUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.emailCode !== undefined) {
writer.uint32(18).string(message.emailCode);
}
if (message.phoneCode !== undefined) {
writer.uint32(26).string(message.phoneCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUpdateHumanUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.emailCode = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.phoneCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
emailCode: isSet(object.emailCode) ? globalThis.String(object.emailCode) : undefined,
phoneCode: isSet(object.phoneCode) ? globalThis.String(object.phoneCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.emailCode !== undefined) {
obj.emailCode = message.emailCode;
}
if (message.phoneCode !== undefined) {
obj.phoneCode = message.phoneCode;
}
return obj;
},
create(base) {
return UpdateHumanUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateHumanUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.emailCode = object.emailCode ?? undefined;
message.phoneCode = object.phoneCode ?? undefined;
return message;
},
};
function createBaseDeactivateUserRequest() {
return { userId: "" };
}
export const DeactivateUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeactivateUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return DeactivateUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeactivateUserRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseDeactivateUserResponse() {
return { details: undefined };
}
export const DeactivateUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeactivateUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return DeactivateUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeactivateUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseReactivateUserRequest() {
return { userId: "" };
}
export const ReactivateUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseReactivateUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return ReactivateUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseReactivateUserRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseReactivateUserResponse() {
return { details: undefined };
}
export const ReactivateUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseReactivateUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return ReactivateUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseReactivateUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseLockUserRequest() {
return { userId: "" };
}
export const LockUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseLockUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return LockUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseLockUserRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseLockUserResponse() {
return { details: undefined };
}
export const LockUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseLockUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return LockUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseLockUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseUnlockUserRequest() {
return { userId: "" };
}
export const UnlockUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUnlockUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return UnlockUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUnlockUserRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseUnlockUserResponse() {
return { details: undefined };
}
export const UnlockUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseUnlockUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return UnlockUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUnlockUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRegisterPasskeyRequest() {
return { userId: "", code: undefined, authenticator: 0, domain: "" };
}
export const RegisterPasskeyRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.code !== undefined) {
PasskeyRegistrationCode.encode(message.code, writer.uint32(18).fork()).join();
}
if (message.authenticator !== 0) {
writer.uint32(24).int32(message.authenticator);
}
if (message.domain !== "") {
writer.uint32(34).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterPasskeyRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.code = PasskeyRegistrationCode.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.authenticator = reader.int32();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
code: isSet(object.code) ? PasskeyRegistrationCode.fromJSON(object.code) : undefined,
authenticator: isSet(object.authenticator) ? passkeyAuthenticatorFromJSON(object.authenticator) : 0,
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.code !== undefined) {
obj.code = PasskeyRegistrationCode.toJSON(message.code);
}
if (message.authenticator !== 0) {
obj.authenticator = passkeyAuthenticatorToJSON(message.authenticator);
}
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return RegisterPasskeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterPasskeyRequest();
message.userId = object.userId ?? "";
message.code = (object.code !== undefined && object.code !== null)
? PasskeyRegistrationCode.fromPartial(object.code)
: undefined;
message.authenticator = object.authenticator ?? 0;
message.domain = object.domain ?? "";
return message;
},
};
function createBaseRegisterPasskeyResponse() {
return { details: undefined, passkeyId: "", publicKeyCredentialCreationOptions: undefined };
}
export const RegisterPasskeyResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.passkeyId !== "") {
writer.uint32(18).string(message.passkeyId);
}
if (message.publicKeyCredentialCreationOptions !== undefined) {
Struct.encode(Struct.wrap(message.publicKeyCredentialCreationOptions), writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterPasskeyResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.passkeyId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.publicKeyCredentialCreationOptions = Struct.unwrap(Struct.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
passkeyId: isSet(object.passkeyId) ? globalThis.String(object.passkeyId) : "",
publicKeyCredentialCreationOptions: isObject(object.publicKeyCredentialCreationOptions)
? object.publicKeyCredentialCreationOptions
: undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.passkeyId !== "") {
obj.passkeyId = message.passkeyId;
}
if (message.publicKeyCredentialCreationOptions !== undefined) {
obj.publicKeyCredentialCreationOptions = message.publicKeyCredentialCreationOptions;
}
return obj;
},
create(base) {
return RegisterPasskeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterPasskeyResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.passkeyId = object.passkeyId ?? "";
message.publicKeyCredentialCreationOptions = object.publicKeyCredentialCreationOptions ?? undefined;
return message;
},
};
function createBaseVerifyPasskeyRegistrationRequest() {
return { userId: "", passkeyId: "", publicKeyCredential: undefined, passkeyName: "" };
}
export const VerifyPasskeyRegistrationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.passkeyId !== "") {
writer.uint32(18).string(message.passkeyId);
}
if (message.publicKeyCredential !== undefined) {
Struct.encode(Struct.wrap(message.publicKeyCredential), writer.uint32(26).fork()).join();
}
if (message.passkeyName !== "") {
writer.uint32(34).string(message.passkeyName);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyPasskeyRegistrationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.passkeyId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.publicKeyCredential = Struct.unwrap(Struct.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.passkeyName = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
passkeyId: isSet(object.passkeyId) ? globalThis.String(object.passkeyId) : "",
publicKeyCredential: isObject(object.publicKeyCredential) ? object.publicKeyCredential : undefined,
passkeyName: isSet(object.passkeyName) ? globalThis.String(object.passkeyName) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.passkeyId !== "") {
obj.passkeyId = message.passkeyId;
}
if (message.publicKeyCredential !== undefined) {
obj.publicKeyCredential = message.publicKeyCredential;
}
if (message.passkeyName !== "") {
obj.passkeyName = message.passkeyName;
}
return obj;
},
create(base) {
return VerifyPasskeyRegistrationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyPasskeyRegistrationRequest();
message.userId = object.userId ?? "";
message.passkeyId = object.passkeyId ?? "";
message.publicKeyCredential = object.publicKeyCredential ?? undefined;
message.passkeyName = object.passkeyName ?? "";
return message;
},
};
function createBaseVerifyPasskeyRegistrationResponse() {
return { details: undefined };
}
export const VerifyPasskeyRegistrationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyPasskeyRegistrationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return VerifyPasskeyRegistrationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyPasskeyRegistrationResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRegisterU2FRequest() {
return { userId: "", domain: "" };
}
export const RegisterU2FRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.domain !== "") {
writer.uint32(18).string(message.domain);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterU2FRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.domain = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
domain: isSet(object.domain) ? globalThis.String(object.domain) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.domain !== "") {
obj.domain = message.domain;
}
return obj;
},
create(base) {
return RegisterU2FRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterU2FRequest();
message.userId = object.userId ?? "";
message.domain = object.domain ?? "";
return message;
},
};
function createBaseRegisterU2FResponse() {
return { details: undefined, u2fId: "", publicKeyCredentialCreationOptions: undefined };
}
export const RegisterU2FResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.u2fId !== "") {
writer.uint32(18).string(message.u2fId);
}
if (message.publicKeyCredentialCreationOptions !== undefined) {
Struct.encode(Struct.wrap(message.publicKeyCredentialCreationOptions), writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterU2FResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.u2fId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.publicKeyCredentialCreationOptions = Struct.unwrap(Struct.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
u2fId: isSet(object.u2fId) ? globalThis.String(object.u2fId) : "",
publicKeyCredentialCreationOptions: isObject(object.publicKeyCredentialCreationOptions)
? object.publicKeyCredentialCreationOptions
: undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.u2fId !== "") {
obj.u2fId = message.u2fId;
}
if (message.publicKeyCredentialCreationOptions !== undefined) {
obj.publicKeyCredentialCreationOptions = message.publicKeyCredentialCreationOptions;
}
return obj;
},
create(base) {
return RegisterU2FResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterU2FResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.u2fId = object.u2fId ?? "";
message.publicKeyCredentialCreationOptions = object.publicKeyCredentialCreationOptions ?? undefined;
return message;
},
};
function createBaseVerifyU2FRegistrationRequest() {
return { userId: "", u2fId: "", publicKeyCredential: undefined, tokenName: "" };
}
export const VerifyU2FRegistrationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.u2fId !== "") {
writer.uint32(18).string(message.u2fId);
}
if (message.publicKeyCredential !== undefined) {
Struct.encode(Struct.wrap(message.publicKeyCredential), writer.uint32(26).fork()).join();
}
if (message.tokenName !== "") {
writer.uint32(34).string(message.tokenName);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyU2FRegistrationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.u2fId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.publicKeyCredential = Struct.unwrap(Struct.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.tokenName = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
u2fId: isSet(object.u2fId) ? globalThis.String(object.u2fId) : "",
publicKeyCredential: isObject(object.publicKeyCredential) ? object.publicKeyCredential : undefined,
tokenName: isSet(object.tokenName) ? globalThis.String(object.tokenName) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.u2fId !== "") {
obj.u2fId = message.u2fId;
}
if (message.publicKeyCredential !== undefined) {
obj.publicKeyCredential = message.publicKeyCredential;
}
if (message.tokenName !== "") {
obj.tokenName = message.tokenName;
}
return obj;
},
create(base) {
return VerifyU2FRegistrationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyU2FRegistrationRequest();
message.userId = object.userId ?? "";
message.u2fId = object.u2fId ?? "";
message.publicKeyCredential = object.publicKeyCredential ?? undefined;
message.tokenName = object.tokenName ?? "";
return message;
},
};
function createBaseVerifyU2FRegistrationResponse() {
return { details: undefined };
}
export const VerifyU2FRegistrationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyU2FRegistrationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return VerifyU2FRegistrationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyU2FRegistrationResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRegisterTOTPRequest() {
return { userId: "" };
}
export const RegisterTOTPRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterTOTPRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RegisterTOTPRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterTOTPRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseRegisterTOTPResponse() {
return { details: undefined, uri: "", secret: "" };
}
export const RegisterTOTPResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.uri !== "") {
writer.uint32(18).string(message.uri);
}
if (message.secret !== "") {
writer.uint32(26).string(message.secret);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRegisterTOTPResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.uri = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.secret = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
uri: isSet(object.uri) ? globalThis.String(object.uri) : "",
secret: isSet(object.secret) ? globalThis.String(object.secret) : "",
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.uri !== "") {
obj.uri = message.uri;
}
if (message.secret !== "") {
obj.secret = message.secret;
}
return obj;
},
create(base) {
return RegisterTOTPResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegisterTOTPResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.uri = object.uri ?? "";
message.secret = object.secret ?? "";
return message;
},
};
function createBaseVerifyTOTPRegistrationRequest() {
return { userId: "", code: "" };
}
export const VerifyTOTPRegistrationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.code !== "") {
writer.uint32(18).string(message.code);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyTOTPRegistrationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.code = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
code: isSet(object.code) ? globalThis.String(object.code) : "",
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.code !== "") {
obj.code = message.code;
}
return obj;
},
create(base) {
return VerifyTOTPRegistrationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyTOTPRegistrationRequest();
message.userId = object.userId ?? "";
message.code = object.code ?? "";
return message;
},
};
function createBaseVerifyTOTPRegistrationResponse() {
return { details: undefined };
}
export const VerifyTOTPRegistrationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseVerifyTOTPRegistrationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return VerifyTOTPRegistrationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseVerifyTOTPRegistrationResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveTOTPRequest() {
return { userId: "" };
}
export const RemoveTOTPRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveTOTPRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RemoveTOTPRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveTOTPRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseRemoveTOTPResponse() {
return { details: undefined };
}
export const RemoveTOTPResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveTOTPResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveTOTPResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveTOTPResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseAddOTPSMSRequest() {
return { userId: "" };
}
export const AddOTPSMSRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddOTPSMSRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return AddOTPSMSRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddOTPSMSRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseAddOTPSMSResponse() {
return { details: undefined };
}
export const AddOTPSMSResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddOTPSMSResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return AddOTPSMSResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddOTPSMSResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveOTPSMSRequest() {
return { userId: "" };
}
export const RemoveOTPSMSRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveOTPSMSRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RemoveOTPSMSRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveOTPSMSRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseRemoveOTPSMSResponse() {
return { details: undefined };
}
export const RemoveOTPSMSResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveOTPSMSResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveOTPSMSResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveOTPSMSResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseAddOTPEmailRequest() {
return { userId: "" };
}
export const AddOTPEmailRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddOTPEmailRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return AddOTPEmailRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddOTPEmailRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseAddOTPEmailResponse() {
return { details: undefined };
}
export const AddOTPEmailResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddOTPEmailResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return AddOTPEmailResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddOTPEmailResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseRemoveOTPEmailRequest() {
return { userId: "" };
}
export const RemoveOTPEmailRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveOTPEmailRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RemoveOTPEmailRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveOTPEmailRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseRemoveOTPEmailResponse() {
return { details: undefined };
}
export const RemoveOTPEmailResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRemoveOTPEmailResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return RemoveOTPEmailResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRemoveOTPEmailResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseCreatePasskeyRegistrationLinkRequest() {
return { userId: "", sendLink: undefined, returnCode: undefined };
}
export const CreatePasskeyRegistrationLinkRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.sendLink !== undefined) {
SendPasskeyRegistrationLink.encode(message.sendLink, writer.uint32(18).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnPasskeyRegistrationCode.encode(message.returnCode, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreatePasskeyRegistrationLinkRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.sendLink = SendPasskeyRegistrationLink.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.returnCode = ReturnPasskeyRegistrationCode.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
sendLink: isSet(object.sendLink) ? SendPasskeyRegistrationLink.fromJSON(object.sendLink) : undefined,
returnCode: isSet(object.returnCode) ? ReturnPasskeyRegistrationCode.fromJSON(object.returnCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.sendLink !== undefined) {
obj.sendLink = SendPasskeyRegistrationLink.toJSON(message.sendLink);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnPasskeyRegistrationCode.toJSON(message.returnCode);
}
return obj;
},
create(base) {
return CreatePasskeyRegistrationLinkRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreatePasskeyRegistrationLinkRequest();
message.userId = object.userId ?? "";
message.sendLink = (object.sendLink !== undefined && object.sendLink !== null)
? SendPasskeyRegistrationLink.fromPartial(object.sendLink)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnPasskeyRegistrationCode.fromPartial(object.returnCode)
: undefined;
return message;
},
};
function createBaseCreatePasskeyRegistrationLinkResponse() {
return { details: undefined, code: undefined };
}
export const CreatePasskeyRegistrationLinkResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.code !== undefined) {
PasskeyRegistrationCode.encode(message.code, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreatePasskeyRegistrationLinkResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.code = PasskeyRegistrationCode.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
code: isSet(object.code) ? PasskeyRegistrationCode.fromJSON(object.code) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.code !== undefined) {
obj.code = PasskeyRegistrationCode.toJSON(message.code);
}
return obj;
},
create(base) {
return CreatePasskeyRegistrationLinkResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreatePasskeyRegistrationLinkResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.code = (object.code !== undefined && object.code !== null)
? PasskeyRegistrationCode.fromPartial(object.code)
: undefined;
return message;
},
};
function createBaseStartIdentityProviderIntentRequest() {
return { idpId: "", urls: undefined, ldap: undefined };
}
export const StartIdentityProviderIntentRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.idpId !== "") {
writer.uint32(10).string(message.idpId);
}
if (message.urls !== undefined) {
RedirectURLs.encode(message.urls, writer.uint32(18).fork()).join();
}
if (message.ldap !== undefined) {
LDAPCredentials.encode(message.ldap, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStartIdentityProviderIntentRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.idpId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.urls = RedirectURLs.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.ldap = LDAPCredentials.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
idpId: isSet(object.idpId) ? globalThis.String(object.idpId) : "",
urls: isSet(object.urls) ? RedirectURLs.fromJSON(object.urls) : undefined,
ldap: isSet(object.ldap) ? LDAPCredentials.fromJSON(object.ldap) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.idpId !== "") {
obj.idpId = message.idpId;
}
if (message.urls !== undefined) {
obj.urls = RedirectURLs.toJSON(message.urls);
}
if (message.ldap !== undefined) {
obj.ldap = LDAPCredentials.toJSON(message.ldap);
}
return obj;
},
create(base) {
return StartIdentityProviderIntentRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseStartIdentityProviderIntentRequest();
message.idpId = object.idpId ?? "";
message.urls = (object.urls !== undefined && object.urls !== null)
? RedirectURLs.fromPartial(object.urls)
: undefined;
message.ldap = (object.ldap !== undefined && object.ldap !== null)
? LDAPCredentials.fromPartial(object.ldap)
: undefined;
return message;
},
};
function createBaseStartIdentityProviderIntentResponse() {
return { details: undefined, authUrl: undefined, idpIntent: undefined, postForm: undefined, formData: undefined };
}
export const StartIdentityProviderIntentResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.authUrl !== undefined) {
writer.uint32(18).string(message.authUrl);
}
if (message.idpIntent !== undefined) {
IDPIntent.encode(message.idpIntent, writer.uint32(26).fork()).join();
}
if (message.postForm !== undefined) {
writer.uint32(34).bytes(message.postForm);
}
if (message.formData !== undefined) {
FormData.encode(message.formData, writer.uint32(42).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseStartIdentityProviderIntentResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.authUrl = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.idpIntent = IDPIntent.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.postForm = Buffer.from(reader.bytes());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.formData = FormData.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
authUrl: isSet(object.authUrl) ? globalThis.String(object.authUrl) : undefined,
idpIntent: isSet(object.idpIntent) ? IDPIntent.fromJSON(object.idpIntent) : undefined,
postForm: isSet(object.postForm) ? Buffer.from(bytesFromBase64(object.postForm)) : undefined,
formData: isSet(object.formData) ? FormData.fromJSON(object.formData) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.authUrl !== undefined) {
obj.authUrl = message.authUrl;
}
if (message.idpIntent !== undefined) {
obj.idpIntent = IDPIntent.toJSON(message.idpIntent);
}
if (message.postForm !== undefined) {
obj.postForm = base64FromBytes(message.postForm);
}
if (message.formData !== undefined) {
obj.formData = FormData.toJSON(message.formData);
}
return obj;
},
create(base) {
return StartIdentityProviderIntentResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseStartIdentityProviderIntentResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.authUrl = object.authUrl ?? undefined;
message.idpIntent = (object.idpIntent !== undefined && object.idpIntent !== null)
? IDPIntent.fromPartial(object.idpIntent)
: undefined;
message.postForm = object.postForm ?? undefined;
message.formData = (object.formData !== undefined && object.formData !== null)
? FormData.fromPartial(object.formData)
: undefined;
return message;
},
};
function createBaseRetrieveIdentityProviderIntentRequest() {
return { idpIntentId: "", idpIntentToken: "" };
}
export const RetrieveIdentityProviderIntentRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.idpIntentId !== "") {
writer.uint32(10).string(message.idpIntentId);
}
if (message.idpIntentToken !== "") {
writer.uint32(18).string(message.idpIntentToken);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRetrieveIdentityProviderIntentRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.idpIntentId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.idpIntentToken = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
idpIntentId: isSet(object.idpIntentId) ? globalThis.String(object.idpIntentId) : "",
idpIntentToken: isSet(object.idpIntentToken) ? globalThis.String(object.idpIntentToken) : "",
};
},
toJSON(message) {
const obj = {};
if (message.idpIntentId !== "") {
obj.idpIntentId = message.idpIntentId;
}
if (message.idpIntentToken !== "") {
obj.idpIntentToken = message.idpIntentToken;
}
return obj;
},
create(base) {
return RetrieveIdentityProviderIntentRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRetrieveIdentityProviderIntentRequest();
message.idpIntentId = object.idpIntentId ?? "";
message.idpIntentToken = object.idpIntentToken ?? "";
return message;
},
};
function createBaseRetrieveIdentityProviderIntentResponse() {
return { details: undefined, idpInformation: undefined, userId: "" };
}
export const RetrieveIdentityProviderIntentResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.idpInformation !== undefined) {
IDPInformation.encode(message.idpInformation, writer.uint32(18).fork()).join();
}
if (message.userId !== "") {
writer.uint32(26).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseRetrieveIdentityProviderIntentResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.idpInformation = IDPInformation.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
idpInformation: isSet(object.idpInformation) ? IDPInformation.fromJSON(object.idpInformation) : undefined,
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.idpInformation !== undefined) {
obj.idpInformation = IDPInformation.toJSON(message.idpInformation);
}
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return RetrieveIdentityProviderIntentResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRetrieveIdentityProviderIntentResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.idpInformation = (object.idpInformation !== undefined && object.idpInformation !== null)
? IDPInformation.fromPartial(object.idpInformation)
: undefined;
message.userId = object.userId ?? "";
return message;
},
};
function createBaseAddIDPLinkRequest() {
return { userId: "", idpLink: undefined };
}
export const AddIDPLinkRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.idpLink !== undefined) {
IDPLink.encode(message.idpLink, writer.uint32(18).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddIDPLinkRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.idpLink = IDPLink.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
idpLink: isSet(object.idpLink) ? IDPLink.fromJSON(object.idpLink) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.idpLink !== undefined) {
obj.idpLink = IDPLink.toJSON(message.idpLink);
}
return obj;
},
create(base) {
return AddIDPLinkRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddIDPLinkRequest();
message.userId = object.userId ?? "";
message.idpLink = (object.idpLink !== undefined && object.idpLink !== null)
? IDPLink.fromPartial(object.idpLink)
: undefined;
return message;
},
};
function createBaseAddIDPLinkResponse() {
return { details: undefined };
}
export const AddIDPLinkResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseAddIDPLinkResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return AddIDPLinkResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAddIDPLinkResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBasePasswordResetRequest() {
return { userId: "", sendLink: undefined, returnCode: undefined };
}
export const PasswordResetRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.sendLink !== undefined) {
SendPasswordResetLink.encode(message.sendLink, writer.uint32(18).fork()).join();
}
if (message.returnCode !== undefined) {
ReturnPasswordResetCode.encode(message.returnCode, writer.uint32(26).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePasswordResetRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.sendLink = SendPasswordResetLink.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.returnCode = ReturnPasswordResetCode.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
sendLink: isSet(object.sendLink) ? SendPasswordResetLink.fromJSON(object.sendLink) : undefined,
returnCode: isSet(object.returnCode) ? ReturnPasswordResetCode.fromJSON(object.returnCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.sendLink !== undefined) {
obj.sendLink = SendPasswordResetLink.toJSON(message.sendLink);
}
if (message.returnCode !== undefined) {
obj.returnCode = ReturnPasswordResetCode.toJSON(message.returnCode);
}
return obj;
},
create(base) {
return PasswordResetRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBasePasswordResetRequest();
message.userId = object.userId ?? "";
message.sendLink = (object.sendLink !== undefined && object.sendLink !== null)
? SendPasswordResetLink.fromPartial(object.sendLink)
: undefined;
message.returnCode = (object.returnCode !== undefined && object.returnCode !== null)
? ReturnPasswordResetCode.fromPartial(object.returnCode)
: undefined;
return message;
},
};
function createBasePasswordResetResponse() {
return { details: undefined, verificationCode: undefined };
}
export const PasswordResetResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
if (message.verificationCode !== undefined) {
writer.uint32(18).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBasePasswordResetResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? Details.fromJSON(object.details) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return PasswordResetResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBasePasswordResetResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseSetPasswordRequest() {
return { userId: "", newPassword: undefined, currentPassword: undefined, verificationCode: undefined };
}
export const SetPasswordRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
if (message.newPassword !== undefined) {
Password.encode(message.newPassword, writer.uint32(18).fork()).join();
}
if (message.currentPassword !== undefined) {
writer.uint32(26).string(message.currentPassword);
}
if (message.verificationCode !== undefined) {
writer.uint32(34).string(message.verificationCode);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPasswordRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.newPassword = Password.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.currentPassword = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.verificationCode = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
newPassword: isSet(object.newPassword) ? Password.fromJSON(object.newPassword) : undefined,
currentPassword: isSet(object.currentPassword) ? globalThis.String(object.currentPassword) : undefined,
verificationCode: isSet(object.verificationCode) ? globalThis.String(object.verificationCode) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
if (message.newPassword !== undefined) {
obj.newPassword = Password.toJSON(message.newPassword);
}
if (message.currentPassword !== undefined) {
obj.currentPassword = message.currentPassword;
}
if (message.verificationCode !== undefined) {
obj.verificationCode = message.verificationCode;
}
return obj;
},
create(base) {
return SetPasswordRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPasswordRequest();
message.userId = object.userId ?? "";
message.newPassword = (object.newPassword !== undefined && object.newPassword !== null)
? Password.fromPartial(object.newPassword)
: undefined;
message.currentPassword = object.currentPassword ?? undefined;
message.verificationCode = object.verificationCode ?? undefined;
return message;
},
};
function createBaseSetPasswordResponse() {
return { details: undefined };
}
export const SetPasswordResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
Details.encode(message.details, writer.uint32(10).fork()).join();
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseSetPasswordResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = Details.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { details: isSet(object.details) ? Details.fromJSON(object.details) : undefined };
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = Details.toJSON(message.details);
}
return obj;
},
create(base) {
return SetPasswordResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetPasswordResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseListAuthenticationMethodTypesRequest() {
return { userId: "" };
}
export const ListAuthenticationMethodTypesRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.userId !== "") {
writer.uint32(10).string(message.userId);
}
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListAuthenticationMethodTypesRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.userId = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { userId: isSet(object.userId) ? globalThis.String(object.userId) : "" };
},
toJSON(message) {
const obj = {};
if (message.userId !== "") {
obj.userId = message.userId;
}
return obj;
},
create(base) {
return ListAuthenticationMethodTypesRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListAuthenticationMethodTypesRequest();
message.userId = object.userId ?? "";
return message;
},
};
function createBaseListAuthenticationMethodTypesResponse() {
return { details: undefined, authMethodTypes: [] };
}
export const ListAuthenticationMethodTypesResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
writer.uint32(18).fork();
for (const v of message.authMethodTypes) {
writer.int32(v);
}
writer.join();
return writer;
},
decode(input, length) {
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseListAuthenticationMethodTypesResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.details = ListDetails.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag === 16) {
message.authMethodTypes.push(reader.int32());
continue;
}
if (tag === 18) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.authMethodTypes.push(reader.int32());
}
continue;
}
break;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
details: isSet(object.details) ? ListDetails.fromJSON(object.details) : undefined,
authMethodTypes: globalThis.Array.isArray(object?.authMethodTypes)
? object.authMethodTypes.map((e) => authenticationMethodTypeFromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.authMethodTypes?.length) {
obj.authMethodTypes = message.authMethodTypes.map((e) => authenticationMethodTypeToJSON(e));
}
return obj;
},
create(base) {
return ListAuthenticationMethodTypesResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListAuthenticationMethodTypesResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.authMethodTypes = object.authMethodTypes?.map((e) => e) || [];
return message;
},
};
export const UserServiceDefinition = {
name: "UserService",
fullName: "zitadel.user.v2beta.UserService",
methods: {
/**
* Create a new human user
*
* Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA)
*/
addHumanUser: {
name: "AddHumanUser",
requestType: AddHumanUserRequest,
requestStream: false,
responseType: AddHumanUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [
Buffer.from([
33,
10,
26,
10,
10,
117,
115,
101,
114,
46,
119,
114,
105,
116,
101,
26,
12,
111,
114,
103,
97,
110,
105,
122,
97,
116,
105,
111,
110,
18,
3,
8,
201,
1,
]),
],
578365826: [
Buffer.from([
24,
58,
1,
42,
34,
19,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
104,
117,
109,
97,
110,
]),
],
},
},
},
/**
* User by ID
*
* Returns the full user object (human or machine) including the profile, email, etc.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
getUserByID: {
name: "GetUserByID",
requestType: GetUserByIDRequest,
requestStream: false,
responseType: GetUserByIDResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [
Buffer.from([
22,
10,
15,
10,
13,
97,
117,
116,
104,
101,
110,
116,
105,
99,
97,
116,
101,
100,
18,
3,
8,
200,
1,
]),
],
578365826: [
Buffer.from([
25,
18,
23,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Search Users
*
* Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
listUsers: {
name: "ListUsers",
requestType: ListUsersRequest,
requestStream: false,
responseType: ListUsersResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
109,
74,
47,
10,
3,
50,
48,
48,
18,
40,
10,
38,
65,
32,
108,
105,
115,
116,
32,
111,
102,
32,
97,
108,
108,
32,
117,
115,
101,
114,
115,
32,
109,
97,
116,
99,
104,
105,
110,
103,
32,
116,
104,
101,
32,
113,
117,
101,
114,
121,
74,
56,
10,
3,
52,
48,
48,
18,
49,
10,
18,
105,
110,
118,
97,
108,
105,
100,
32,
108,
105,
115,
116,
32,
113,
117,
101,
114,
121,
18,
27,
10,
25,
26,
23,
35,
47,
100,
101,
102,
105,
110,
105,
116,
105,
111,
110,
115,
47,
114,
112,
99,
83,
116,
97,
116,
117,
115,
88,
1,
]),
],
400010: [
Buffer.from([
22,
10,
15,
10,
13,
97,
117,
116,
104,
101,
110,
116,
105,
99,
97,
116,
101,
100,
18,
3,
8,
200,
1,
]),
],
578365826: [Buffer.from([18, 58, 1, 42, 34, 13, 47, 118, 50, 98, 101, 116, 97, 47, 117, 115, 101, 114, 115])],
},
},
},
/**
* Change the user email
*
* Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
setEmail: {
name: "SetEmail",
requestType: SetEmailRequest,
requestStream: false,
responseType: SetEmailResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
34,
58,
1,
42,
34,
29,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
101,
109,
97,
105,
108,
]),
],
},
},
},
/**
* Resend code to verify user email
*
* Resend code to verify user email
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
resendEmailCode: {
name: "ResendEmailCode",
requestType: ResendEmailCodeRequest,
requestStream: false,
responseType: ResendEmailCodeResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
101,
109,
97,
105,
108,
47,
114,
101,
115,
101,
110,
100,
]),
],
},
},
},
/**
* Verify the email
*
* Verify the email with the generated code.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
verifyEmail: {
name: "VerifyEmail",
requestType: VerifyEmailRequest,
requestStream: false,
responseType: VerifyEmailResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
101,
109,
97,
105,
108,
47,
118,
101,
114,
105,
102,
121,
]),
],
},
},
},
/**
* Set the user phone
*
* Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
setPhone: {
name: "SetPhone",
requestType: SetPhoneRequest,
requestStream: false,
responseType: SetPhoneResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
34,
58,
1,
42,
34,
29,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
104,
111,
110,
101,
]),
],
},
},
},
/**
* Remove the user phone
*
* Remove the user phone
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
removePhone: {
name: "RemovePhone",
requestType: RemovePhoneRequest,
requestStream: false,
responseType: RemovePhoneResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
74,
18,
21,
68,
101,
108,
101,
116,
101,
32,
116,
104,
101,
32,
117,
115,
101,
114,
32,
112,
104,
111,
110,
101,
26,
34,
68,
101,
108,
101,
116,
101,
32,
116,
104,
101,
32,
112,
104,
111,
110,
101,
32,
110,
117,
109,
98,
101,
114,
32,
111,
102,
32,
97,
32,
117,
115,
101,
114,
46,
74,
11,
10,
3,
50,
48,
48,
18,
4,
10,
2,
79,
75,
88,
1,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
34,
58,
1,
42,
42,
29,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
104,
111,
110,
101,
]),
],
},
},
},
/**
* Resend code to verify user phone
*
* Resend code to verify user phone
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
resendPhoneCode: {
name: "ResendPhoneCode",
requestType: ResendPhoneCodeRequest,
requestStream: false,
responseType: ResendPhoneCodeResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
104,
111,
110,
101,
47,
114,
101,
115,
101,
110,
100,
]),
],
},
},
},
/**
* Verify the phone
*
* Verify the phone with the generated code.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
verifyPhone: {
name: "VerifyPhone",
requestType: VerifyPhoneRequest,
requestStream: false,
responseType: VerifyPhoneResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
104,
111,
110,
101,
47,
118,
101,
114,
105,
102,
121,
]),
],
},
},
},
/**
* Update User
*
* Update all information from a user.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
updateHumanUser: {
name: "UpdateHumanUser",
requestType: UpdateHumanUserRequest,
requestStream: false,
responseType: UpdateHumanUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
25,
26,
23,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Deactivate user
*
* The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
deactivateUser: {
name: "DeactivateUser",
requestType: DeactivateUserRequest,
requestStream: false,
responseType: DeactivateUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
39,
58,
1,
42,
34,
34,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
100,
101,
97,
99,
116,
105,
118,
97,
116,
101,
]),
],
},
},
},
/**
* Reactivate user
*
* Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
reactivateUser: {
name: "ReactivateUser",
requestType: ReactivateUserRequest,
requestStream: false,
responseType: ReactivateUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
39,
58,
1,
42,
34,
34,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
114,
101,
97,
99,
116,
105,
118,
97,
116,
101,
]),
],
},
},
},
/**
* Lock user
*
* The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
lockUser: {
name: "LockUser",
requestType: LockUserRequest,
requestStream: false,
responseType: LockUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
33,
58,
1,
42,
34,
28,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
108,
111,
99,
107,
]),
],
},
},
},
/**
* Unlock user
*
* The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
unlockUser: {
name: "UnlockUser",
requestType: UnlockUserRequest,
requestStream: false,
responseType: UnlockUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
35,
58,
1,
42,
34,
30,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
117,
110,
108,
111,
99,
107,
]),
],
},
},
},
/**
* Delete user
*
* The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
deleteUser: {
name: "DeleteUser",
requestType: DeleteUserRequest,
requestStream: false,
responseType: DeleteUserResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
25,
42,
23,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Start the registration of passkey for a user
*
* Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
registerPasskey: {
name: "RegisterPasskey",
requestType: RegisterPasskeyRequest,
requestStream: false,
responseType: RegisterPasskeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
37,
58,
1,
42,
34,
32,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
97,
115,
115,
107,
101,
121,
115,
]),
],
},
},
},
/**
* Verify a passkey for a user
*
* Verify the passkey registration with the public key credential.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
verifyPasskeyRegistration: {
name: "VerifyPasskeyRegistration",
requestType: VerifyPasskeyRegistrationRequest,
requestStream: false,
responseType: VerifyPasskeyRegistrationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
50,
58,
1,
42,
34,
45,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
97,
115,
115,
107,
101,
121,
115,
47,
123,
112,
97,
115,
115,
107,
101,
121,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Create a passkey registration link for a user
*
* Create a passkey registration link which includes a code and either return it or send it to the user.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
createPasskeyRegistrationLink: {
name: "CreatePasskeyRegistrationLink",
requestType: CreatePasskeyRegistrationLinkRequest,
requestStream: false,
responseType: CreatePasskeyRegistrationLinkResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [
Buffer.from([
22,
10,
20,
10,
18,
117,
115,
101,
114,
46,
112,
97,
115,
115,
107,
101,
121,
46,
119,
114,
105,
116,
101,
]),
],
578365826: [
Buffer.from([
55,
58,
1,
42,
34,
50,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
97,
115,
115,
107,
101,
121,
115,
47,
114,
101,
103,
105,
115,
116,
114,
97,
116,
105,
111,
110,
95,
108,
105,
110,
107,
]),
],
},
},
},
/**
* Start the registration of a u2f token for a user
*
* Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
registerU2F: {
name: "RegisterU2F",
requestType: RegisterU2FRequest,
requestStream: false,
responseType: RegisterU2FResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
32,
58,
1,
42,
34,
27,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
117,
50,
102,
]),
],
},
},
},
/**
* Verify a u2f token for a user
*
* Verify the u2f token registration with the public key credential.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
verifyU2FRegistration: {
name: "VerifyU2FRegistration",
requestType: VerifyU2FRegistrationRequest,
requestStream: false,
responseType: VerifyU2FRegistrationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
117,
50,
102,
47,
123,
117,
50,
102,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Start the registration of a TOTP generator for a user
*
* Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
registerTOTP: {
name: "RegisterTOTP",
requestType: RegisterTOTPRequest,
requestStream: false,
responseType: RegisterTOTPResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
33,
58,
1,
42,
34,
28,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
116,
111,
116,
112,
]),
],
},
},
},
/**
* Verify a TOTP generator for a user
*
* Verify the TOTP registration with a generated code.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
verifyTOTPRegistration: {
name: "VerifyTOTPRegistration",
requestType: VerifyTOTPRegistrationRequest,
requestStream: false,
responseType: VerifyTOTPRegistrationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
40,
58,
1,
42,
34,
35,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
116,
111,
116,
112,
47,
118,
101,
114,
105,
102,
121,
]),
],
},
},
},
/**
* Remove TOTP generator from a user
*
* Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
removeTOTP: {
name: "RemoveTOTP",
requestType: RemoveTOTPRequest,
requestStream: false,
responseType: RemoveTOTPResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
30,
42,
28,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
116,
111,
116,
112,
]),
],
},
},
},
/**
* Add OTP SMS for a user
*
* Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
addOTPSMS: {
name: "AddOTPSMS",
requestType: AddOTPSMSRequest,
requestStream: false,
responseType: AddOTPSMSResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
36,
58,
1,
42,
34,
31,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
111,
116,
112,
95,
115,
109,
115,
]),
],
},
},
},
/**
* Remove One-Time Password (OTP) SMS from a user
*
* Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
removeOTPSMS: {
name: "RemoveOTPSMS",
requestType: RemoveOTPSMSRequest,
requestStream: false,
responseType: RemoveOTPSMSResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
33,
42,
31,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
111,
116,
112,
95,
115,
109,
115,
]),
],
},
},
},
/**
* Add OTP Email for a user
*
* Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
addOTPEmail: {
name: "AddOTPEmail",
requestType: AddOTPEmailRequest,
requestStream: false,
responseType: AddOTPEmailResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
38,
58,
1,
42,
34,
33,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
111,
116,
112,
95,
101,
109,
97,
105,
108,
]),
],
},
},
},
/**
* Remove One-Time Password (OTP) Email from a user
*
* Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
removeOTPEmail: {
name: "RemoveOTPEmail",
requestType: RemoveOTPEmailRequest,
requestStream: false,
responseType: RemoveOTPEmailResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
35,
42,
33,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
111,
116,
112,
95,
101,
109,
97,
105,
108,
]),
],
},
},
},
/**
* Start flow with an identity provider
*
* Start a flow with an identity provider, for external login, registration or linking.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
startIdentityProviderIntent: {
name: "StartIdentityProviderIntent",
requestType: StartIdentityProviderIntentRequest,
requestStream: false,
responseType: StartIdentityProviderIntentResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
24,
58,
1,
42,
34,
19,
47,
118,
50,
98,
101,
116,
97,
47,
105,
100,
112,
95,
105,
110,
116,
101,
110,
116,
115,
]),
],
},
},
},
/**
* Retrieve the information returned by the identity provider
*
* Retrieve the information returned by the identity provider for registration or updating an existing user with new information.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
retrieveIdentityProviderIntent: {
name: "RetrieveIdentityProviderIntent",
requestType: RetrieveIdentityProviderIntentRequest,
requestStream: false,
responseType: RetrieveIdentityProviderIntentResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
40,
58,
1,
42,
34,
35,
47,
118,
50,
98,
101,
116,
97,
47,
105,
100,
112,
95,
105,
110,
116,
101,
110,
116,
115,
47,
123,
105,
100,
112,
95,
105,
110,
116,
101,
110,
116,
95,
105,
100,
125,
]),
],
},
},
},
/**
* Add link to an identity provider to an user
*
* Add link to an identity provider to an user.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
addIDPLink: {
name: "AddIDPLink",
requestType: AddIDPLinkRequest,
requestStream: false,
responseType: AddIDPLinkResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
34,
58,
1,
42,
34,
29,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
108,
105,
110,
107,
115,
]),
],
},
},
},
/**
* Request a code to reset a password
*
* Request a code to reset a password.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
passwordReset: {
name: "PasswordReset",
requestType: PasswordResetRequest,
requestStream: false,
responseType: PasswordResetResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
43,
58,
1,
42,
34,
38,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
97,
115,
115,
119,
111,
114,
100,
95,
114,
101,
115,
101,
116,
]),
],
},
},
},
/**
* Change password
*
* Change the password of a user with either a verification code or the current password.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
setPassword: {
name: "SetPassword",
requestType: SetPasswordRequest,
requestStream: false,
responseType: SetPasswordResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
37,
58,
1,
42,
34,
32,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
112,
97,
115,
115,
119,
111,
114,
100,
]),
],
},
},
},
/**
* List all possible authentication methods of a user
*
* List all possible authentication methods of a user like password, passwordless, (T)OTP and more.
*
* Deprecated: please move to the corresponding endpoint under user service v2 (GA).
*/
listAuthenticationMethodTypes: {
name: "ListAuthenticationMethodTypes",
requestType: ListAuthenticationMethodTypesRequest,
requestStream: false,
responseType: ListAuthenticationMethodTypesResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [Buffer.from([15, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75, 88, 1])],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
48,
18,
46,
47,
118,
50,
98,
101,
116,
97,
47,
117,
115,
101,
114,
115,
47,
123,
117,
115,
101,
114,
95,
105,
100,
125,
47,
97,
117,
116,
104,
101,
110,
116,
105,
99,
97,
116,
105,
111,
110,
95,
109,
101,
116,
104,
111,
100,
115,
]),
],
},
},
},
},
};
function bytesFromBase64(b64) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
}
function base64FromBytes(arr) {
return globalThis.Buffer.from(arr).toString("base64");
}
function isObject(value) {
return typeof value === "object" && value !== null;
}
function isSet(value) {
return value !== null && value !== undefined;
}