@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
1,515 lines • 56.5 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.0
// protoc unknown
// source: zitadel/resources/webkey/v3alpha/webkey_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import { Instance } from "../../../object/v3alpha/object.js";
import { Details } from "../../object/v3alpha/object.js";
import { GetWebKey, WebKey } from "./key.js";
export const protobufPackage = "zitadel.resources.webkey.v3alpha";
function createBaseCreateWebKeyRequest() {
return { instance: undefined, key: undefined };
}
export const CreateWebKeyRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, writer.uint32(10).fork()).join();
}
if (message.key !== undefined) {
WebKey.encode(message.key, writer.uint32(18).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 = createBaseCreateWebKeyRequest();
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.key = WebKey.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,
key: isSet(object.key) ? WebKey.fromJSON(object.key) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
if (message.key !== undefined) {
obj.key = WebKey.toJSON(message.key);
}
return obj;
},
create(base) {
return CreateWebKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateWebKeyRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.key = (object.key !== undefined && object.key !== null) ? WebKey.fromPartial(object.key) : undefined;
return message;
},
};
function createBaseCreateWebKeyResponse() {
return { details: undefined };
}
export const CreateWebKeyResponse = {
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);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseCreateWebKeyResponse();
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 CreateWebKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateWebKeyResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseActivateWebKeyRequest() {
return { instance: undefined, id: "" };
}
export const ActivateWebKeyRequest = {
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);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseActivateWebKeyRequest();
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 ActivateWebKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseActivateWebKeyRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.id = object.id ?? "";
return message;
},
};
function createBaseActivateWebKeyResponse() {
return { details: undefined };
}
export const ActivateWebKeyResponse = {
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);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseActivateWebKeyResponse();
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 ActivateWebKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseActivateWebKeyResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseDeleteWebKeyRequest() {
return { instance: undefined, id: "" };
}
export const DeleteWebKeyRequest = {
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);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeleteWebKeyRequest();
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 DeleteWebKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteWebKeyRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
message.id = object.id ?? "";
return message;
},
};
function createBaseDeleteWebKeyResponse() {
return { details: undefined };
}
export const DeleteWebKeyResponse = {
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);
let end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeleteWebKeyResponse();
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 DeleteWebKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteWebKeyResponse();
message.details = (object.details !== undefined && object.details !== null)
? Details.fromPartial(object.details)
: undefined;
return message;
},
};
function createBaseListWebKeysRequest() {
return { instance: undefined };
}
export const ListWebKeysRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.instance !== undefined) {
Instance.encode(message.instance, 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 = createBaseListWebKeysRequest();
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;
}
}
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 };
},
toJSON(message) {
const obj = {};
if (message.instance !== undefined) {
obj.instance = Instance.toJSON(message.instance);
}
return obj;
},
create(base) {
return ListWebKeysRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListWebKeysRequest();
message.instance = (object.instance !== undefined && object.instance !== null)
? Instance.fromPartial(object.instance)
: undefined;
return message;
},
};
function createBaseListWebKeysResponse() {
return { webKeys: [] };
}
export const ListWebKeysResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.webKeys) {
GetWebKey.encode(v, 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 = createBaseListWebKeysResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.webKeys.push(GetWebKey.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
webKeys: globalThis.Array.isArray(object?.webKeys) ? object.webKeys.map((e) => GetWebKey.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.webKeys?.length) {
obj.webKeys = message.webKeys.map((e) => GetWebKey.toJSON(e));
}
return obj;
},
create(base) {
return ListWebKeysResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListWebKeysResponse();
message.webKeys = object.webKeys?.map((e) => GetWebKey.fromPartial(e)) || [];
return message;
},
};
export const ZITADELWebKeysDefinition = {
name: "ZITADELWebKeys",
fullName: "zitadel.resources.webkey.v3alpha.ZITADELWebKeys",
methods: {
createWebKey: {
name: "CreateWebKey",
requestType: CreateWebKeyRequest,
requestStream: false,
responseType: CreateWebKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
213,
1,
18,
40,
71,
101,
110,
101,
114,
97,
116,
101,
32,
97,
32,
119,
101,
98,
32,
107,
101,
121,
32,
112,
97,
105,
114,
32,
102,
111,
114,
32,
116,
104,
101,
32,
105,
110,
115,
116,
97,
110,
99,
101,
26,
155,
1,
71,
101,
110,
101,
114,
97,
116,
101,
32,
97,
32,
112,
114,
105,
118,
97,
116,
101,
32,
97,
110,
100,
32,
112,
117,
98,
108,
105,
99,
32,
107,
101,
121,
32,
112,
97,
105,
114,
46,
32,
84,
104,
101,
32,
112,
114,
105,
118,
97,
116,
101,
32,
107,
101,
121,
32,
99,
97,
110,
32,
98,
101,
32,
117,
115,
101,
100,
32,
116,
111,
32,
115,
105,
103,
110,
32,
79,
73,
68,
67,
32,
116,
111,
107,
101,
110,
115,
32,
97,
102,
116,
101,
114,
32,
97,
99,
116,
105,
118,
97,
116,
105,
111,
110,
46,
32,
84,
104,
101,
32,
112,
117,
98,
108,
105,
99,
32,
107,
101,
121,
32,
99,
97,
110,
32,
98,
101,
32,
117,
115,
101,
100,
32,
116,
111,
32,
118,
97,
108,
105,
116,
101,
32,
79,
73,
68,
67,
32,
116,
111,
107,
101,
110,
115,
46,
74,
11,
10,
3,
50,
48,
48,
18,
4,
10,
2,
79,
75,
]),
],
400010: [
Buffer.from([
26,
10,
19,
10,
17,
105,
97,
109,
46,
119,
101,
98,
95,
107,
101,
121,
46,
119,
114,
105,
116,
101,
18,
3,
8,
201,
1,
]),
],
578365826: [
Buffer.from([
34,
58,
3,
107,
101,
121,
34,
27,
47,
114,
101,
115,
111,
117,
114,
99,
101,
115,
47,
118,
51,
97,
108,
112,
104,
97,
47,
119,
101,
98,
95,
107,
101,
121,
115,
]),
],
},
},
},
activateWebKey: {
name: "ActivateWebKey",
requestType: ActivateWebKeyRequest,
requestStream: false,
responseType: ActivateWebKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
132,
3,
18,
39,
65,
99,
116,
105,
118,
97,
116,
101,
32,
97,
32,
115,
105,
103,
110,
105,
110,
103,
32,
107,
101,
121,
32,
102,
111,
114,
32,
116,
104,
101,
32,
105,
110,
115,
116,
97,
110,
99,
101,
26,
203,
2,
83,
119,
105,
116,
99,
104,
32,
116,
104,
101,
32,
97,
99,
116,
105,
118,
101,
32,
115,
105,
103,
110,
105,
110,
103,
32,
119,
101,
98,
32,
107,
101,
121,
46,
32,
84,
104,
101,
32,
112,
114,
101,
118,
105,
111,
117,
115,
108,
121,
32,
97,
99,
116,
105,
118,
101,
32,
107,
101,
121,
32,
119,
105,
108,
108,
32,
98,
101,
32,
100,
101,
97,
99,
116,
105,
118,
97,
116,
101,
100,
46,
32,
78,
111,
116,
101,
32,
116,
104,
97,
116,
32,
116,
104,
101,
32,
74,
87,
75,
115,
32,
79,
73,
68,
67,
32,
101,
110,
100,
112,
111,
105,
110,
116,
32,
114,
101,
116,
117,
114,
110,
115,
32,
97,
32,
99,
97,
99,
104,
101,
97,
98,
108,
101,
32,
114,
101,
115,
112,
111,
110,
115,
101,
46,
32,
84,
104,
101,
114,
101,
102,
111,
114,
101,
32,
105,
116,
32,
105,
115,
32,
110,
111,
116,
32,
97,
100,
118,
105,
115,
101,
100,
32,
116,
111,
32,
97,
99,
116,
105,
118,
97,
116,
101,
32,
97,
32,
107,
101,
121,
32,
116,
104,
97,
116,
32,
104,
97,
115,
32,
98,
101,
101,
110,
32,
99,
114,
101,
97,
116,
101,
100,
32,
119,
105,
116,
104,
105,
110,
32,
116,
104,
101,
32,
99,
97,
99,
104,
101,
32,
100,
117,
114,
97,
116,
105,
111,
110,
32,
40,
100,
101,
102,
97,
117,
108,
116,
32,
105,
115,
32,
53,
109,
105,
110,
41,
44,
32,
97,
115,
32,
116,
104,
101,
32,
112,
117,
98,
108,
105,
99,
32,
107,
101,
121,
32,
109,
97,
121,
32,
110,
111,
116,
32,
104,
97,
118,
101,
32,
98,
101,
101,
110,
32,
112,
114,
111,
112,
97,
103,
97,
116,
101,
100,
32,
116,
111,
32,
99,
97,
99,
104,
101,
115,
32,
97,
110,
100,
32,
99,
108,
105,
101,
110,
116,
115,
32,
121,
101,
116,
46,
74,
11,
10,
3,
50,
48,
48,
18,
4,
10,
2,
79,
75,
]),
],
400010: [
Buffer.from([
26,
10,
19,
10,
17,
105,
97,
109,
46,
119,
101,
98,
95,
107,
101,
121,
46,
119,
114,
105,
116,
101,
18,
3,
8,
200,
1,
]),
],
578365826: [
Buffer.from([
44,
34,
42,
47,
114,
101,
115,
111,
117,
114,
99,
101,
115,
47,
118,
51,
97,
108,
112,
104,
97,
47,
119,
101,
98,
95,
107,
101,
121,
115,
47,
123,
105,
100,
125,
47,
95,
97,
99,
116,
105,
118,
97,
116,
101,
]),
],
},
},
},
deleteWebKey: {
name: "DeleteWebKey",
requestType: DeleteWebKeyRequest,
requestStream: false,
responseType: DeleteWebKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
182,
1,
18,
38,
68,
101,
108,
101,
116,
101,
32,
97,
32,
119,
101,
98,
32,
107,
101,
121,
32,
112,
97,
105,
114,
32,
102,
111,
114,
32,
116,
104,
101,
32,
105,
110,
115,
116,
97,
110,
99,
101,
26,
127,
68,
101,
108,
101,
116,
101,
32,
97,
32,
119,
101,
98,
32,
107,
101,
121,
32,
112,
97,
105,
114,
46,
32,
79,
110,
108,
121,
32,
105,
110,
97,
99,
116,
105,
118,
101,
32,
107,
101,
121,
115,
32,
99,
97,
110,
32,
98,
101,
32,
100,
101,
108,
101,
116,
101,
100,
46,
32,
79,
110,
99,
101,
32,
97,
32,
107,
101,
121,
32,
105,
115,
32,
100,
101,
108,
101,
116,
101,
100,
44,
32,
97,
110,
121,
32,
116,
111,
107,
101,
110,
115,
32,
115,
105,
103,
110,
101,
100,
32,
98,
121,
32,
116,
104,
105,
115,
32,
107,
101,
121,
32,
119,
105,
108,
108,
32,
98,
101,
32,
105,
110,
118,
97,
108,
105,
100,
46,
74,
11,
10,
3,
50,
48,
48,
18,
4,
10,
2,
79,
75,
]),
],
400010: [
Buffer.from([
27,
10,
20,
10,
18,
105,
97,
109,
46,
119,
101,
98,
95,
107,
101,
121,
46,
100,
101,
108,
101,
116,
101,
18,
3,
8,
200,
1,
]),
],
578365826: [
Buffer.from([
34,
42,
32,
47,
114,
101,
115,
111,
117,
114,