@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
1,373 lines • 379 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc unknown
// source: zitadel/resources/user/v3alpha/user_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Struct } from "../../../../google/protobuf/struct.js";
import { Instance, Organization } from "../../../object/v3alpha/object.js";
import { Details, ListDetails, SearchQuery } from "../../object/v3alpha/object.js";
import { AuthenticatorRegistrationCode, IdentityProviderIntent, IDPAuthenticator, IDPInformation, LDAPCredentials, RedirectURLs, ReturnPasswordResetCode, ReturnWebAuthNRegistrationCode, SendPasswordResetEmail, SendPasswordResetSMS, SendWebAuthNRegistrationLink, SetPassword, SetUsername, StartWebAuthNRegistration, VerifyWebAuthNRegistration, } from "./authenticator.js";
import { ReturnEmailVerificationCode, ReturnPhoneVerificationCode, SendEmailVerificationCode, SendPhoneVerificationCode, SetEmail, SetPhone, } from "./communication.js";
import { fieldNameFromJSON, fieldNameToJSON, SearchFilter } from "./query.js";
import { CreateUser, GetUser, PatchUser } from "./user.js";
export const protobufPackage = "zitadel.resources.user.v3alpha";
function createBaseSearchUsersRequest() {
return { instance: undefined, query: undefined, sortingColumn: 0, filters: [] };
}
export const SearchUsersRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.query !== undefined) {
SearchQuery.encode(message.query, writer.uint32(18).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(24).int32(message.sortingColumn);
}
for (const v of message.filters) {
SearchFilter.encode(v, 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 = createBaseSearchUsersRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.query = SearchQuery.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.filters.push(SearchFilter.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
query: isSet(object.query) ? SearchQuery.fromJSON(object.query) : undefined,
sortingColumn: isSet(object.sortingColumn) ? fieldNameFromJSON(object.sortingColumn) : 0,
filters: globalThis.Array.isArray(object?.filters)
? object.filters.map((e) => SearchFilter.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.query !== undefined) {
obj.query = SearchQuery.toJSON(message.query);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = fieldNameToJSON(message.sortingColumn);
}
if (message.filters?.length) {
obj.filters = message.filters.map((e) => SearchFilter.toJSON(e));
}
return obj;
},
create(base) {
return SearchUsersRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSearchUsersRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.query = (object.query !== undefined && object.query !== null)
? SearchQuery.fromPartial(object.query)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.filters = object.filters?.map((e) => SearchFilter.fromPartial(e)) || [];
return message;
},
};
function createBaseSearchUsersResponse() {
return { details: undefined, result: [] };
}
export const SearchUsersResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.details !== undefined) {
ListDetails.encode(message.details, writer.uint32(10).fork()).join();
}
for (const v of message.result) {
GetUser.encode(v, 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 = createBaseSearchUsersResponse();
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 !== 18) {
break;
}
message.result.push(GetUser.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,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => GetUser.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.details !== undefined) {
obj.details = ListDetails.toJSON(message.details);
}
if (message.result?.length) {
obj.result = message.result.map((e) => GetUser.toJSON(e));
}
return obj;
},
create(base) {
return SearchUsersResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSearchUsersResponse();
message.details = (object.details !== undefined && object.details !== null)
? ListDetails.fromPartial(object.details)
: undefined;
message.result = object.result?.map((e) => GetUser.fromPartial(e)) || [];
return message;
},
};
function createBaseGetUserRequest() {
return { instance: undefined, id: "" };
}
export const GetUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.id !== "") {
writer.uint32(18).string(message.id);
}
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 = createBaseGetUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return GetUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.id = object.id ?? "";
return message;
},
};
function createBaseGetUserResponse() {
return { user: undefined };
}
export const GetUserResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.user !== undefined) {
GetUser.encode(message.user, 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 = createBaseGetUserResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.user = GetUser.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { user: isSet(object.user) ? GetUser.fromJSON(object.user) : undefined };
},
toJSON(message) {
const obj = {};
if (message.user !== undefined) {
obj.user = GetUser.toJSON(message.user);
}
return obj;
},
create(base) {
return GetUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetUserResponse();
message.user = (object.user !== undefined && object.user !== null) ? GetUser.fromPartial(object.user) : undefined;
return message;
},
};
function createBaseCreateUserRequest() {
return { instance: undefined, organization: undefined, user: undefined };
}
export const CreateUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.user !== undefined) {
CreateUser.encode(message.user, 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 = createBaseCreateUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.user = CreateUser.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
user: isSet(object.user) ? CreateUser.fromJSON(object.user) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.user !== undefined) {
obj.user = CreateUser.toJSON(message.user);
}
return obj;
},
create(base) {
return CreateUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.user = (object.user !== undefined && object.user !== null)
? CreateUser.fromPartial(object.user)
: undefined;
return message;
},
};
function createBaseCreateUserResponse() {
return { details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const CreateUserResponse = {
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 = createBaseCreateUserResponse();
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 CreateUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateUserResponse();
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 createBasePatchUserRequest() {
return { instance: undefined, organization: undefined, id: "", user: undefined };
}
export const PatchUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
if (message.user !== undefined) {
PatchUser.encode(message.user, 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 = createBasePatchUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.user = PatchUser.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
user: isSet(object.user) ? PatchUser.fromJSON(object.user) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
if (message.user !== undefined) {
obj.user = PatchUser.toJSON(message.user);
}
return obj;
},
create(base) {
return PatchUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBasePatchUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
message.user = (object.user !== undefined && object.user !== null) ? PatchUser.fromPartial(object.user) : undefined;
return message;
},
};
function createBasePatchUserResponse() {
return { details: undefined, emailCode: undefined, phoneCode: undefined };
}
export const PatchUserResponse = {
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 = createBasePatchUserResponse();
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 PatchUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBasePatchUserResponse();
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 { instance: undefined, organization: undefined, id: "" };
}
export const DeactivateUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
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.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return DeactivateUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeactivateUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
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 createBaseActivateUserRequest() {
return { instance: undefined, organization: undefined, id: "" };
}
export const ActivateUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
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 = createBaseActivateUserRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return ActivateUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseActivateUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
return message;
},
};
function createBaseActivateUserResponse() {
return { details: undefined };
}
export const ActivateUserResponse = {
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 = createBaseActivateUserResponse();
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 ActivateUserResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseActivateUserResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseLockUserRequest() {
return { instance: undefined, organization: undefined, id: "" };
}
export const LockUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
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.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return LockUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseLockUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
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 { instance: undefined, organization: undefined, id: "" };
}
export const UnlockUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
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.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return UnlockUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUnlockUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
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 createBaseDeleteUserRequest() {
return { instance: undefined, organization: undefined, id: "" };
}
export const DeleteUserRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.organization !== undefined) {
Organization.encode(message.organization, writer.uint32(18).fork()).join();
}
if (message.id !== "") {
writer.uint32(26).string(message.id);
}
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.instance = Instance.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.organization = Organization.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.id = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
instance: isSet(object.instance) ? Instance.fromJSON(object.instance) : undefined,
organization: isSet(object.organization) ? Organization.fromJSON(object.organization) : undefined,
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.organization !== undefined) {
obj.organization = Organization.toJSON(message.organization);
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return DeleteUserRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteUserRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.organization = (object.organization !== undefined && object.organization !== null)
? Organization.fromPartial(object.organization)
: undefined;
message.id = object.id ?? "";
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 createBaseSetContactEmailRequest() {
return { instance: undefined, organization: undefined, id: