UNPKG

@zitadel/node

Version:

Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.

140 lines (139 loc) 4.65 kB
// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.7.0 // protoc unknown // source: zitadel/idp/v2/idp_service.proto /* eslint-disable */ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { IDP } from "./idp.js"; export const protobufPackage = "zitadel.idp.v2"; function createBaseGetIDPByIDRequest() { return { id: "" }; } export const GetIDPByIDRequest = { encode(message, writer = new BinaryWriter()) { if (message.id !== "") { writer.uint32(10).string(message.id); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetIDPByIDRequest(); 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 GetIDPByIDRequest.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseGetIDPByIDRequest(); message.id = object.id ?? ""; return message; }, }; function createBaseGetIDPByIDResponse() { return { idp: undefined }; } export const GetIDPByIDResponse = { encode(message, writer = new BinaryWriter()) { if (message.idp !== undefined) { IDP.encode(message.idp, writer.uint32(10).fork()).join(); } return writer; }, decode(input, length) { const reader = input instanceof BinaryReader ? input : new BinaryReader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGetIDPByIDResponse(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.idp = IDP.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { idp: isSet(object.idp) ? IDP.fromJSON(object.idp) : undefined }; }, toJSON(message) { const obj = {}; if (message.idp !== undefined) { obj.idp = IDP.toJSON(message.idp); } return obj; }, create(base) { return GetIDPByIDResponse.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseGetIDPByIDResponse(); message.idp = (object.idp !== undefined && object.idp !== null) ? IDP.fromPartial(object.idp) : undefined; return message; }, }; export const IdentityProviderServiceDefinition = { name: "IdentityProviderService", fullName: "zitadel.idp.v2.IdentityProviderService", methods: { /** * Get identity provider (IdP) by ID * * Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. */ getIDPByID: { name: "GetIDPByID", requestType: GetIDPByIDRequest, requestStream: false, responseType: GetIDPByIDResponse, responseStream: false, options: { _unknownFields: { 8338: [Buffer.from([13, 74, 11, 10, 3, 50, 48, 48, 18, 4, 10, 2, 79, 75])], 400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])], 578365826: [Buffer.from([15, 18, 13, 47, 118, 50, 47, 105, 100, 112, 115, 47, 123, 105, 100, 125])], }, }, }, }, }; function isSet(value) { return value !== null && value !== undefined; }