UNPKG

@ragnaraven/zitadel-node-dual

Version:

Library for API access to ZITADEL with modern ES import syntax. Works everywhere - NestJS, Node.js, any TypeScript environment. No more require()!

1,859 lines 53 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var user_schema_service_exports = {}; __export(user_schema_service_exports, { CreateUserSchemaRequest: () => CreateUserSchemaRequest, CreateUserSchemaResponse: () => CreateUserSchemaResponse, DeactivateUserSchemaRequest: () => DeactivateUserSchemaRequest, DeactivateUserSchemaResponse: () => DeactivateUserSchemaResponse, DeleteUserSchemaRequest: () => DeleteUserSchemaRequest, DeleteUserSchemaResponse: () => DeleteUserSchemaResponse, GetUserSchemaRequest: () => GetUserSchemaRequest, GetUserSchemaResponse: () => GetUserSchemaResponse, PatchUserSchemaRequest: () => PatchUserSchemaRequest, PatchUserSchemaResponse: () => PatchUserSchemaResponse, ReactivateUserSchemaRequest: () => ReactivateUserSchemaRequest, ReactivateUserSchemaResponse: () => ReactivateUserSchemaResponse, SearchUserSchemasRequest: () => SearchUserSchemasRequest, SearchUserSchemasResponse: () => SearchUserSchemasResponse, ZITADELUserSchemasDefinition: () => ZITADELUserSchemasDefinition, protobufPackage: () => protobufPackage }); module.exports = __toCommonJS(user_schema_service_exports); var import_wire = require("@bufbuild/protobuf/wire"); var import_object = require("../../../object/v3alpha/object.js"); var import_object2 = require("../../object/v3alpha/object.js"); var import_user_schema = require("./user_schema.js"); const protobufPackage = "zitadel.resources.userschema.v3alpha"; function createBaseSearchUserSchemasRequest() { return { instance: void 0, query: void 0, sortingColumn: void 0, filters: [] }; } const SearchUserSchemasRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(10).fork()).join(); } if (message.query !== void 0) { import_object2.SearchQuery.encode(message.query, writer.uint32(18).fork()).join(); } if (message.sortingColumn !== void 0) { writer.uint32(24).int32(message.sortingColumn); } for (const v of message.filters) { import_user_schema.SearchFilter.encode(v, writer.uint32(34).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseSearchUserSchemasRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.query = import_object2.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(import_user_schema.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) ? import_object.Instance.fromJSON(object.instance) : void 0, query: isSet(object.query) ? import_object2.SearchQuery.fromJSON(object.query) : void 0, sortingColumn: isSet(object.sortingColumn) ? (0, import_user_schema.fieldNameFromJSON)(object.sortingColumn) : void 0, filters: globalThis.Array.isArray(object?.filters) ? object.filters.map((e) => import_user_schema.SearchFilter.fromJSON(e)) : [] }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.query !== void 0) { obj.query = import_object2.SearchQuery.toJSON(message.query); } if (message.sortingColumn !== void 0) { obj.sortingColumn = (0, import_user_schema.fieldNameToJSON)(message.sortingColumn); } if (message.filters?.length) { obj.filters = message.filters.map((e) => import_user_schema.SearchFilter.toJSON(e)); } return obj; }, create(base) { return SearchUserSchemasRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseSearchUserSchemasRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.query = object.query !== void 0 && object.query !== null ? import_object2.SearchQuery.fromPartial(object.query) : void 0; message.sortingColumn = object.sortingColumn ?? void 0; message.filters = object.filters?.map((e) => import_user_schema.SearchFilter.fromPartial(e)) || []; return message; } }; function createBaseSearchUserSchemasResponse() { return { details: void 0, sortingColumn: 0, result: [] }; } const SearchUserSchemasResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.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) { import_user_schema.GetUserSchema.encode(v, writer.uint32(26).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseSearchUserSchemasResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.details = import_object2.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(import_user_schema.GetUserSchema.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) ? import_object2.ListDetails.fromJSON(object.details) : void 0, sortingColumn: isSet(object.sortingColumn) ? (0, import_user_schema.fieldNameFromJSON)(object.sortingColumn) : 0, result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => import_user_schema.GetUserSchema.fromJSON(e)) : [] }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.ListDetails.toJSON(message.details); } if (message.sortingColumn !== 0) { obj.sortingColumn = (0, import_user_schema.fieldNameToJSON)(message.sortingColumn); } if (message.result?.length) { obj.result = message.result.map((e) => import_user_schema.GetUserSchema.toJSON(e)); } return obj; }, create(base) { return SearchUserSchemasResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseSearchUserSchemasResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.ListDetails.fromPartial(object.details) : void 0; message.sortingColumn = object.sortingColumn ?? 0; message.result = object.result?.map((e) => import_user_schema.GetUserSchema.fromPartial(e)) || []; return message; } }; function createBaseGetUserSchemaRequest() { return { id: "" }; } const GetUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.id !== "") { writer.uint32(10).string(message.id); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseGetUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.id = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { id: isSet(object.id) ? globalThis.String(object.id) : "" }; }, toJSON(message) { const obj = {}; if (message.id !== "") { obj.id = message.id; } return obj; }, create(base) { return GetUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseGetUserSchemaRequest(); message.id = object.id ?? ""; return message; } }; function createBaseGetUserSchemaResponse() { return { userSchema: void 0 }; } const GetUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.userSchema !== void 0) { import_user_schema.GetUserSchema.encode(message.userSchema, writer.uint32(18).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseGetUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (tag !== 18) { break; } message.userSchema = import_user_schema.GetUserSchema.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { userSchema: isSet(object.userSchema) ? import_user_schema.GetUserSchema.fromJSON(object.userSchema) : void 0 }; }, toJSON(message) { const obj = {}; if (message.userSchema !== void 0) { obj.userSchema = import_user_schema.GetUserSchema.toJSON(message.userSchema); } return obj; }, create(base) { return GetUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseGetUserSchemaResponse(); message.userSchema = object.userSchema !== void 0 && object.userSchema !== null ? import_user_schema.GetUserSchema.fromPartial(object.userSchema) : void 0; return message; } }; function createBaseCreateUserSchemaRequest() { return { instance: void 0, userSchema: void 0 }; } const CreateUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(10).fork()).join(); } if (message.userSchema !== void 0) { import_user_schema.UserSchema.encode(message.userSchema, writer.uint32(18).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseCreateUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.userSchema = import_user_schema.UserSchema.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) ? import_object.Instance.fromJSON(object.instance) : void 0, userSchema: isSet(object.userSchema) ? import_user_schema.UserSchema.fromJSON(object.userSchema) : void 0 }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.userSchema !== void 0) { obj.userSchema = import_user_schema.UserSchema.toJSON(message.userSchema); } return obj; }, create(base) { return CreateUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseCreateUserSchemaRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.userSchema = object.userSchema !== void 0 && object.userSchema !== null ? import_user_schema.UserSchema.fromPartial(object.userSchema) : void 0; return message; } }; function createBaseCreateUserSchemaResponse() { return { details: void 0 }; } const CreateUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.Details.encode(message.details, writer.uint32(18).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseCreateUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (tag !== 18) { break; } message.details = import_object2.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) ? import_object2.Details.fromJSON(object.details) : void 0 }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.Details.toJSON(message.details); } return obj; }, create(base) { return CreateUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseCreateUserSchemaResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.Details.fromPartial(object.details) : void 0; return message; } }; function createBasePatchUserSchemaRequest() { return { instance: void 0, id: "", userSchema: void 0 }; } const PatchUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(10).fork()).join(); } if (message.id !== "") { writer.uint32(18).string(message.id); } if (message.userSchema !== void 0) { import_user_schema.PatchUserSchema.encode(message.userSchema, writer.uint32(26).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBasePatchUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.id = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.userSchema = import_user_schema.PatchUserSchema.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) ? import_object.Instance.fromJSON(object.instance) : void 0, id: isSet(object.id) ? globalThis.String(object.id) : "", userSchema: isSet(object.userSchema) ? import_user_schema.PatchUserSchema.fromJSON(object.userSchema) : void 0 }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.id !== "") { obj.id = message.id; } if (message.userSchema !== void 0) { obj.userSchema = import_user_schema.PatchUserSchema.toJSON(message.userSchema); } return obj; }, create(base) { return PatchUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBasePatchUserSchemaRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.id = object.id ?? ""; message.userSchema = object.userSchema !== void 0 && object.userSchema !== null ? import_user_schema.PatchUserSchema.fromPartial(object.userSchema) : void 0; return message; } }; function createBasePatchUserSchemaResponse() { return { details: void 0 }; } const PatchUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.Details.encode(message.details, writer.uint32(10).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBasePatchUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.details = import_object2.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) ? import_object2.Details.fromJSON(object.details) : void 0 }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.Details.toJSON(message.details); } return obj; }, create(base) { return PatchUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBasePatchUserSchemaResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.Details.fromPartial(object.details) : void 0; return message; } }; function createBaseDeactivateUserSchemaRequest() { return { instance: void 0, id: "" }; } const DeactivateUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(18).fork()).join(); } if (message.id !== "") { writer.uint32(10).string(message.id); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseDeactivateUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (tag !== 18) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 1: { if (tag !== 10) { 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) ? import_object.Instance.fromJSON(object.instance) : void 0, id: isSet(object.id) ? globalThis.String(object.id) : "" }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.id !== "") { obj.id = message.id; } return obj; }, create(base) { return DeactivateUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDeactivateUserSchemaRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.id = object.id ?? ""; return message; } }; function createBaseDeactivateUserSchemaResponse() { return { details: void 0 }; } const DeactivateUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.Details.encode(message.details, writer.uint32(10).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseDeactivateUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.details = import_object2.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) ? import_object2.Details.fromJSON(object.details) : void 0 }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.Details.toJSON(message.details); } return obj; }, create(base) { return DeactivateUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDeactivateUserSchemaResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.Details.fromPartial(object.details) : void 0; return message; } }; function createBaseReactivateUserSchemaRequest() { return { instance: void 0, id: "" }; } const ReactivateUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(18).fork()).join(); } if (message.id !== "") { writer.uint32(10).string(message.id); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseReactivateUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (tag !== 18) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 1: { if (tag !== 10) { 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) ? import_object.Instance.fromJSON(object.instance) : void 0, id: isSet(object.id) ? globalThis.String(object.id) : "" }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.id !== "") { obj.id = message.id; } return obj; }, create(base) { return ReactivateUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseReactivateUserSchemaRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.id = object.id ?? ""; return message; } }; function createBaseReactivateUserSchemaResponse() { return { details: void 0 }; } const ReactivateUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.Details.encode(message.details, writer.uint32(10).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseReactivateUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.details = import_object2.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) ? import_object2.Details.fromJSON(object.details) : void 0 }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.Details.toJSON(message.details); } return obj; }, create(base) { return ReactivateUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseReactivateUserSchemaResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.Details.fromPartial(object.details) : void 0; return message; } }; function createBaseDeleteUserSchemaRequest() { return { instance: void 0, id: "" }; } const DeleteUserSchemaRequest = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.instance !== void 0) { import_object.Instance.encode(message.instance, writer.uint32(18).fork()).join(); } if (message.id !== "") { writer.uint32(10).string(message.id); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseDeleteUserSchemaRequest(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: { if (tag !== 18) { break; } message.instance = import_object.Instance.decode(reader, reader.uint32()); continue; } case 1: { if (tag !== 10) { 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) ? import_object.Instance.fromJSON(object.instance) : void 0, id: isSet(object.id) ? globalThis.String(object.id) : "" }; }, toJSON(message) { const obj = {}; if (message.instance !== void 0) { obj.instance = import_object.Instance.toJSON(message.instance); } if (message.id !== "") { obj.id = message.id; } return obj; }, create(base) { return DeleteUserSchemaRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDeleteUserSchemaRequest(); message.instance = object.instance !== void 0 && object.instance !== null ? import_object.Instance.fromPartial(object.instance) : void 0; message.id = object.id ?? ""; return message; } }; function createBaseDeleteUserSchemaResponse() { return { details: void 0 }; } const DeleteUserSchemaResponse = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.details !== void 0) { import_object2.Details.encode(message.details, writer.uint32(10).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input); const end = length === void 0 ? reader.len : reader.pos + length; const message = createBaseDeleteUserSchemaResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.details = import_object2.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) ? import_object2.Details.fromJSON(object.details) : void 0 }; }, toJSON(message) { const obj = {}; if (message.details !== void 0) { obj.details = import_object2.Details.toJSON(message.details); } return obj; }, create(base) { return DeleteUserSchemaResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDeleteUserSchemaResponse(); message.details = object.details !== void 0 && object.details !== null ? import_object2.Details.fromPartial(object.details) : void 0; return message; } }; const ZITADELUserSchemasDefinition = { name: "ZITADELUserSchemas", fullName: "zitadel.resources.userschema.v3alpha.ZITADELUserSchemas", methods: { /** * Search user schemas * * Search all matching user schemas. By default, we will return all user schema of your instance. Make sure to include a limit and sorting for pagination. */ searchUserSchemas: { name: "SearchUserSchemas", requestType: SearchUserSchemasRequest, requestStream: false, responseType: SearchUserSchemasResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 110, 74, 54, 10, 3, 50, 48, 48, 18, 47, 10, 45, 65, 32, 108, 105, 115, 116, 32, 111, 102, 32, 97, 108, 108, 32, 117, 115, 101, 114, 32, 115, 99, 104, 101, 109, 97, 32, 109, 97, 116, 99, 104, 105, 110, 103, 32, 116, 104, 101, 32, 115, 101, 97, 114, 99, 104, 74, 52, 10, 3, 52, 48, 48, 18, 45, 10, 14, 105, 110, 118, 97, 108, 105, 100, 32, 115, 101, 97, 114, 99, 104, 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 ]) ], 400010: [ Buffer.from([19, 10, 17, 10, 15, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 114, 101, 97, 100]) ], 578365826: [ Buffer.from([ 50, 58, 7, 102, 105, 108, 116, 101, 114, 115, 34, 39, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115, 47, 95, 115, 101, 97, 114, 99, 104 ]) ] } } }, /** * User schema by ID * * Returns the user schema identified by the requested ID. */ getUserSchema: { name: "GetUserSchema", requestType: GetUserSchemaRequest, requestStream: false, responseType: GetUserSchemaResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 40, 74, 38, 10, 3, 50, 48, 48, 18, 31, 10, 29, 83, 99, 104, 101, 109, 97, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 114, 101, 116, 114, 105, 101, 118, 101, 100 ]) ], 400010: [ Buffer.from([19, 10, 17, 10, 15, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 114, 101, 97, 100]) ], 578365826: [ Buffer.from([ 38, 18, 36, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115, 47, 123, 105, 100, 125 ]) ] } } }, /** * Create a user schema * * Create the first revision of a new user schema. The schema can then be used on users to store and validate their data. */ createUserSchema: { name: "CreateUserSchema", requestType: CreateUserSchemaRequest, requestStream: false, responseType: CreateUserSchemaResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 89, 74, 87, 10, 3, 50, 48, 49, 18, 80, 10, 27, 83, 99, 104, 101, 109, 97, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 99, 114, 101, 97, 116, 101, 100, 18, 49, 10, 47, 26, 45, 35, 47, 100, 101, 102, 105, 110, 105, 116, 105, 111, 110, 115, 47, 118, 51, 97, 108, 112, 104, 97, 67, 114, 101, 97, 116, 101, 85, 115, 101, 114, 83, 99, 104, 101, 109, 97, 82, 101, 115, 112, 111, 110, 115, 101 ]) ], 400010: [ Buffer.from([ 25, 10, 18, 10, 16, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 119, 114, 105, 116, 101, 18, 3, 8, 201, 1 ]) ], 578365826: [ Buffer.from([ 46, 58, 11, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 34, 31, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115 ]) ] } } }, /** * Patch a user schema * * Patch an existing user schema to a new revision. Users based on the current revision will not be affected until they are updated. */ patchUserSchema: { name: "PatchUserSchema", requestType: PatchUserSchemaRequest, requestStream: false, responseType: PatchUserSchemaResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 38, 74, 36, 10, 3, 50, 48, 48, 18, 29, 10, 27, 83, 99, 104, 101, 109, 97, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 117, 112, 100, 97, 116, 101, 100 ]) ], 400010: [ Buffer.from([ 20, 10, 18, 10, 16, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 119, 114, 105, 116, 101 ]) ], 578365826: [ Buffer.from([ 51, 58, 11, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 50, 36, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115, 47, 123, 105, 100, 125 ]) ] } } }, /** * Deactivate a user schema * * Deactivate an existing user schema and change it into a read-only state. Users based on this schema cannot be updated anymore, but are still able to authenticate. */ deactivateUserSchema: { name: "DeactivateUserSchema", requestType: DeactivateUserSchemaRequest, requestStream: false, responseType: DeactivateUserSchemaResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 42, 74, 40, 10, 3, 50, 48, 48, 18, 33, 10, 31, 83, 99, 104, 101, 109, 97, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 100, 101, 97, 99, 116, 105, 118, 97, 116, 101, 100 ]) ], 400010: [ Buffer.from([ 20, 10, 18, 10, 16, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 119, 114, 105, 116, 101 ]) ], 578365826: [ Buffer.from([ 50, 34, 48, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115, 47, 123, 105, 100, 125, 47, 95, 100, 101, 97, 99, 116, 105, 118, 97, 116, 101 ]) ] } } }, /** * Reactivate a user schema * * Reactivate an previously deactivated user schema and change it into an active state again. */ reactivateUserSchema: { name: "ReactivateUserSchema", requestType: ReactivateUserSchemaRequest, requestStream: false, responseType: ReactivateUserSchemaResponse, responseStream: false, options: { _unknownFields: { 8338: [ Buffer.from([ 42, 74, 40, 10, 3, 50, 48, 48, 18, 33, 10, 31, 83, 99, 104, 101, 109, 97, 32, 115, 117, 99, 99, 101, 115, 115, 102, 117, 108, 108, 121, 32, 114, 101, 97, 99, 116, 105, 118, 97, 116, 101, 100 ]) ], 400010: [ Buffer.from([ 20, 10, 18, 10, 16, 117, 115, 101, 114, 115, 99, 104, 101, 109, 97, 46, 119, 114, 105, 116, 101 ]) ], 578365826: [ Buffer.from([ 50, 34, 48, 47, 114, 101, 115, 111, 117, 114, 99, 101, 115, 47, 118, 51, 97, 108, 112, 104, 97, 47, 117, 115, 101, 114, 95, 115, 99, 104, 101, 109, 97, 115, 47, 123, 105, 100, 125, 47, 95, 114, 101, 97, 99, 116, 105, 118, 97, 116, 101 ]) ] } } }, /** * Delete a user schema * * Delete an existing user schema. This operation is only allowed if there are no associated users to it. */ deleteUserSchema: