@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
1,417 lines (1,416 loc) • 112 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc unknown
// source: zitadel/action/v2beta/action_service.proto
/* eslint-disable */
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
import Long from "long";
import { Duration } from "../../../google/protobuf/duration.js";
import { Timestamp } from "../../../google/protobuf/timestamp.js";
import { PaginationRequest, PaginationResponse } from "../../filter/v2beta/filter.js";
import { Condition, Execution } from "./execution.js";
import { executionFieldNameFromJSON, executionFieldNameToJSON, ExecutionSearchFilter, targetFieldNameFromJSON, targetFieldNameToJSON, TargetSearchFilter, } from "./query.js";
import { RESTAsync, RESTCall, RESTWebhook, Target } from "./target.js";
export const protobufPackage = "zitadel.action.v2beta";
function createBaseCreateTargetRequest() {
return {
name: "",
restWebhook: undefined,
restCall: undefined,
restAsync: undefined,
timeout: undefined,
endpoint: "",
};
}
export const CreateTargetRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.name !== "") {
writer.uint32(10).string(message.name);
}
if (message.restWebhook !== undefined) {
RESTWebhook.encode(message.restWebhook, writer.uint32(18).fork()).join();
}
if (message.restCall !== undefined) {
RESTCall.encode(message.restCall, writer.uint32(26).fork()).join();
}
if (message.restAsync !== undefined) {
RESTAsync.encode(message.restAsync, writer.uint32(34).fork()).join();
}
if (message.timeout !== undefined) {
Duration.encode(message.timeout, writer.uint32(42).fork()).join();
}
if (message.endpoint !== "") {
writer.uint32(50).string(message.endpoint);
}
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 = createBaseCreateTargetRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.name = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.restWebhook = RESTWebhook.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.restCall = RESTCall.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.restAsync = RESTAsync.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.timeout = Duration.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.endpoint = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
name: isSet(object.name) ? globalThis.String(object.name) : "",
restWebhook: isSet(object.restWebhook) ? RESTWebhook.fromJSON(object.restWebhook) : undefined,
restCall: isSet(object.restCall) ? RESTCall.fromJSON(object.restCall) : undefined,
restAsync: isSet(object.restAsync) ? RESTAsync.fromJSON(object.restAsync) : undefined,
timeout: isSet(object.timeout) ? Duration.fromJSON(object.timeout) : undefined,
endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : "",
};
},
toJSON(message) {
const obj = {};
if (message.name !== "") {
obj.name = message.name;
}
if (message.restWebhook !== undefined) {
obj.restWebhook = RESTWebhook.toJSON(message.restWebhook);
}
if (message.restCall !== undefined) {
obj.restCall = RESTCall.toJSON(message.restCall);
}
if (message.restAsync !== undefined) {
obj.restAsync = RESTAsync.toJSON(message.restAsync);
}
if (message.timeout !== undefined) {
obj.timeout = Duration.toJSON(message.timeout);
}
if (message.endpoint !== "") {
obj.endpoint = message.endpoint;
}
return obj;
},
create(base) {
return CreateTargetRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateTargetRequest();
message.name = object.name ?? "";
message.restWebhook = (object.restWebhook !== undefined && object.restWebhook !== null)
? RESTWebhook.fromPartial(object.restWebhook)
: undefined;
message.restCall = (object.restCall !== undefined && object.restCall !== null)
? RESTCall.fromPartial(object.restCall)
: undefined;
message.restAsync = (object.restAsync !== undefined && object.restAsync !== null)
? RESTAsync.fromPartial(object.restAsync)
: undefined;
message.timeout = (object.timeout !== undefined && object.timeout !== null)
? Duration.fromPartial(object.timeout)
: undefined;
message.endpoint = object.endpoint ?? "";
return message;
},
};
function createBaseCreateTargetResponse() {
return { id: "", creationDate: undefined, signingKey: "" };
}
export const CreateTargetResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.creationDate !== undefined) {
Timestamp.encode(toTimestamp(message.creationDate), writer.uint32(18).fork()).join();
}
if (message.signingKey !== "") {
writer.uint32(26).string(message.signingKey);
}
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 = createBaseCreateTargetResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.id = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.creationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.signingKey = 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) : "",
creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
signingKey: isSet(object.signingKey) ? globalThis.String(object.signingKey) : "",
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.creationDate !== undefined) {
obj.creationDate = message.creationDate.toISOString();
}
if (message.signingKey !== "") {
obj.signingKey = message.signingKey;
}
return obj;
},
create(base) {
return CreateTargetResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateTargetResponse();
message.id = object.id ?? "";
message.creationDate = object.creationDate ?? undefined;
message.signingKey = object.signingKey ?? "";
return message;
},
};
function createBaseUpdateTargetRequest() {
return {
id: "",
name: undefined,
restWebhook: undefined,
restCall: undefined,
restAsync: undefined,
timeout: undefined,
endpoint: undefined,
expirationSigningKey: undefined,
};
}
export const UpdateTargetRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.name !== undefined) {
writer.uint32(18).string(message.name);
}
if (message.restWebhook !== undefined) {
RESTWebhook.encode(message.restWebhook, writer.uint32(26).fork()).join();
}
if (message.restCall !== undefined) {
RESTCall.encode(message.restCall, writer.uint32(34).fork()).join();
}
if (message.restAsync !== undefined) {
RESTAsync.encode(message.restAsync, writer.uint32(42).fork()).join();
}
if (message.timeout !== undefined) {
Duration.encode(message.timeout, writer.uint32(50).fork()).join();
}
if (message.endpoint !== undefined) {
writer.uint32(58).string(message.endpoint);
}
if (message.expirationSigningKey !== undefined) {
Duration.encode(message.expirationSigningKey, writer.uint32(66).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 = createBaseUpdateTargetRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.id = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.name = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.restWebhook = RESTWebhook.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.restCall = RESTCall.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.restAsync = RESTAsync.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.timeout = Duration.decode(reader, reader.uint32());
continue;
}
case 7: {
if (tag !== 58) {
break;
}
message.endpoint = reader.string();
continue;
}
case 8: {
if (tag !== 66) {
break;
}
message.expirationSigningKey = Duration.decode(reader, reader.uint32());
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) : "",
name: isSet(object.name) ? globalThis.String(object.name) : undefined,
restWebhook: isSet(object.restWebhook) ? RESTWebhook.fromJSON(object.restWebhook) : undefined,
restCall: isSet(object.restCall) ? RESTCall.fromJSON(object.restCall) : undefined,
restAsync: isSet(object.restAsync) ? RESTAsync.fromJSON(object.restAsync) : undefined,
timeout: isSet(object.timeout) ? Duration.fromJSON(object.timeout) : undefined,
endpoint: isSet(object.endpoint) ? globalThis.String(object.endpoint) : undefined,
expirationSigningKey: isSet(object.expirationSigningKey)
? Duration.fromJSON(object.expirationSigningKey)
: undefined,
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.name !== undefined) {
obj.name = message.name;
}
if (message.restWebhook !== undefined) {
obj.restWebhook = RESTWebhook.toJSON(message.restWebhook);
}
if (message.restCall !== undefined) {
obj.restCall = RESTCall.toJSON(message.restCall);
}
if (message.restAsync !== undefined) {
obj.restAsync = RESTAsync.toJSON(message.restAsync);
}
if (message.timeout !== undefined) {
obj.timeout = Duration.toJSON(message.timeout);
}
if (message.endpoint !== undefined) {
obj.endpoint = message.endpoint;
}
if (message.expirationSigningKey !== undefined) {
obj.expirationSigningKey = Duration.toJSON(message.expirationSigningKey);
}
return obj;
},
create(base) {
return UpdateTargetRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateTargetRequest();
message.id = object.id ?? "";
message.name = object.name ?? undefined;
message.restWebhook = (object.restWebhook !== undefined && object.restWebhook !== null)
? RESTWebhook.fromPartial(object.restWebhook)
: undefined;
message.restCall = (object.restCall !== undefined && object.restCall !== null)
? RESTCall.fromPartial(object.restCall)
: undefined;
message.restAsync = (object.restAsync !== undefined && object.restAsync !== null)
? RESTAsync.fromPartial(object.restAsync)
: undefined;
message.timeout = (object.timeout !== undefined && object.timeout !== null)
? Duration.fromPartial(object.timeout)
: undefined;
message.endpoint = object.endpoint ?? undefined;
message.expirationSigningKey = (object.expirationSigningKey !== undefined && object.expirationSigningKey !== null)
? Duration.fromPartial(object.expirationSigningKey)
: undefined;
return message;
},
};
function createBaseUpdateTargetResponse() {
return { changeDate: undefined, signingKey: undefined };
}
export const UpdateTargetResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.changeDate !== undefined) {
Timestamp.encode(toTimestamp(message.changeDate), writer.uint32(10).fork()).join();
}
if (message.signingKey !== undefined) {
writer.uint32(18).string(message.signingKey);
}
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 = createBaseUpdateTargetResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.signingKey = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
changeDate: isSet(object.changeDate) ? fromJsonTimestamp(object.changeDate) : undefined,
signingKey: isSet(object.signingKey) ? globalThis.String(object.signingKey) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.changeDate !== undefined) {
obj.changeDate = message.changeDate.toISOString();
}
if (message.signingKey !== undefined) {
obj.signingKey = message.signingKey;
}
return obj;
},
create(base) {
return UpdateTargetResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateTargetResponse();
message.changeDate = object.changeDate ?? undefined;
message.signingKey = object.signingKey ?? undefined;
return message;
},
};
function createBaseDeleteTargetRequest() {
return { id: "" };
}
export const DeleteTargetRequest = {
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);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseDeleteTargetRequest();
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 DeleteTargetRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteTargetRequest();
message.id = object.id ?? "";
return message;
},
};
function createBaseDeleteTargetResponse() {
return { deletionDate: undefined };
}
export const DeleteTargetResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.deletionDate !== undefined) {
Timestamp.encode(toTimestamp(message.deletionDate), 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 = createBaseDeleteTargetResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 3: {
if (tag !== 26) {
break;
}
message.deletionDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { deletionDate: isSet(object.deletionDate) ? fromJsonTimestamp(object.deletionDate) : undefined };
},
toJSON(message) {
const obj = {};
if (message.deletionDate !== undefined) {
obj.deletionDate = message.deletionDate.toISOString();
}
return obj;
},
create(base) {
return DeleteTargetResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteTargetResponse();
message.deletionDate = object.deletionDate ?? undefined;
return message;
},
};
function createBaseGetTargetRequest() {
return { id: "" };
}
export const GetTargetRequest = {
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);
const end = length === undefined ? reader.len : reader.pos + length;
const message = createBaseGetTargetRequest();
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 GetTargetRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetTargetRequest();
message.id = object.id ?? "";
return message;
},
};
function createBaseGetTargetResponse() {
return { target: undefined };
}
export const GetTargetResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.target !== undefined) {
Target.encode(message.target, 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 = createBaseGetTargetResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.target = Target.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { target: isSet(object.target) ? Target.fromJSON(object.target) : undefined };
},
toJSON(message) {
const obj = {};
if (message.target !== undefined) {
obj.target = Target.toJSON(message.target);
}
return obj;
},
create(base) {
return GetTargetResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetTargetResponse();
message.target = (object.target !== undefined && object.target !== null)
? Target.fromPartial(object.target)
: undefined;
return message;
},
};
function createBaseListTargetsRequest() {
return { pagination: undefined, sortingColumn: undefined, filters: [] };
}
export const ListTargetsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.pagination !== undefined) {
PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== undefined) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.filters) {
TargetSearchFilter.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 = createBaseListTargetsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.pagination = PaginationRequest.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.filters.push(TargetSearchFilter.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
sortingColumn: isSet(object.sortingColumn) ? targetFieldNameFromJSON(object.sortingColumn) : undefined,
filters: globalThis.Array.isArray(object?.filters)
? object.filters.map((e) => TargetSearchFilter.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.pagination !== undefined) {
obj.pagination = PaginationRequest.toJSON(message.pagination);
}
if (message.sortingColumn !== undefined) {
obj.sortingColumn = targetFieldNameToJSON(message.sortingColumn);
}
if (message.filters?.length) {
obj.filters = message.filters.map((e) => TargetSearchFilter.toJSON(e));
}
return obj;
},
create(base) {
return ListTargetsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListTargetsRequest();
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationRequest.fromPartial(object.pagination)
: undefined;
message.sortingColumn = object.sortingColumn ?? undefined;
message.filters = object.filters?.map((e) => TargetSearchFilter.fromPartial(e)) || [];
return message;
},
};
function createBaseListTargetsResponse() {
return { pagination: undefined, result: [] };
}
export const ListTargetsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.pagination !== undefined) {
PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
}
for (const v of message.result) {
Target.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 = createBaseListTargetsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.pagination = PaginationResponse.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.result.push(Target.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => Target.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.pagination !== undefined) {
obj.pagination = PaginationResponse.toJSON(message.pagination);
}
if (message.result?.length) {
obj.result = message.result.map((e) => Target.toJSON(e));
}
return obj;
},
create(base) {
return ListTargetsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListTargetsResponse();
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationResponse.fromPartial(object.pagination)
: undefined;
message.result = object.result?.map((e) => Target.fromPartial(e)) || [];
return message;
},
};
function createBaseSetExecutionRequest() {
return { condition: undefined, targets: [] };
}
export const SetExecutionRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.condition !== undefined) {
Condition.encode(message.condition, writer.uint32(10).fork()).join();
}
for (const v of message.targets) {
writer.uint32(18).string(v);
}
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 = createBaseSetExecutionRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.condition = Condition.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.targets.push(reader.string());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
condition: isSet(object.condition) ? Condition.fromJSON(object.condition) : undefined,
targets: globalThis.Array.isArray(object?.targets) ? object.targets.map((e) => globalThis.String(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.condition !== undefined) {
obj.condition = Condition.toJSON(message.condition);
}
if (message.targets?.length) {
obj.targets = message.targets;
}
return obj;
},
create(base) {
return SetExecutionRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetExecutionRequest();
message.condition = (object.condition !== undefined && object.condition !== null)
? Condition.fromPartial(object.condition)
: undefined;
message.targets = object.targets?.map((e) => e) || [];
return message;
},
};
function createBaseSetExecutionResponse() {
return { setDate: undefined };
}
export const SetExecutionResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.setDate !== undefined) {
Timestamp.encode(toTimestamp(message.setDate), 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 = createBaseSetExecutionResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.setDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { setDate: isSet(object.setDate) ? fromJsonTimestamp(object.setDate) : undefined };
},
toJSON(message) {
const obj = {};
if (message.setDate !== undefined) {
obj.setDate = message.setDate.toISOString();
}
return obj;
},
create(base) {
return SetExecutionResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseSetExecutionResponse();
message.setDate = object.setDate ?? undefined;
return message;
},
};
function createBaseListExecutionsRequest() {
return { pagination: undefined, sortingColumn: undefined, filters: [] };
}
export const ListExecutionsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.pagination !== undefined) {
PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== undefined) {
writer.uint32(16).int32(message.sortingColumn);
}
for (const v of message.filters) {
ExecutionSearchFilter.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 = createBaseListExecutionsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.pagination = PaginationRequest.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 16) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.filters.push(ExecutionSearchFilter.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
sortingColumn: isSet(object.sortingColumn) ? executionFieldNameFromJSON(object.sortingColumn) : undefined,
filters: globalThis.Array.isArray(object?.filters)
? object.filters.map((e) => ExecutionSearchFilter.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.pagination !== undefined) {
obj.pagination = PaginationRequest.toJSON(message.pagination);
}
if (message.sortingColumn !== undefined) {
obj.sortingColumn = executionFieldNameToJSON(message.sortingColumn);
}
if (message.filters?.length) {
obj.filters = message.filters.map((e) => ExecutionSearchFilter.toJSON(e));
}
return obj;
},
create(base) {
return ListExecutionsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListExecutionsRequest();
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationRequest.fromPartial(object.pagination)
: undefined;
message.sortingColumn = object.sortingColumn ?? undefined;
message.filters = object.filters?.map((e) => ExecutionSearchFilter.fromPartial(e)) || [];
return message;
},
};
function createBaseListExecutionsResponse() {
return { pagination: undefined, result: [] };
}
export const ListExecutionsResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.pagination !== undefined) {
PaginationResponse.encode(message.pagination, writer.uint32(10).fork()).join();
}
for (const v of message.result) {
Execution.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 = createBaseListExecutionsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.pagination = PaginationResponse.decode(reader, reader.uint32());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.result.push(Execution.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
result: globalThis.Array.isArray(object?.result) ? object.result.map((e) => Execution.fromJSON(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.pagination !== undefined) {
obj.pagination = PaginationResponse.toJSON(message.pagination);
}
if (message.result?.length) {
obj.result = message.result.map((e) => Execution.toJSON(e));
}
return obj;
},
create(base) {
return ListExecutionsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListExecutionsResponse();
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationResponse.fromPartial(object.pagination)
: undefined;
message.result = object.result?.map((e) => Execution.fromPartial(e)) || [];
return message;
},
};
function createBaseListExecutionFunctionsRequest() {
return {};
}
export const ListExecutionFunctionsRequest = {
encode(_, writer = new BinaryWriter()) {
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 = createBaseListExecutionFunctionsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ListExecutionFunctionsRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseListExecutionFunctionsRequest();
return message;
},
};
function createBaseListExecutionFunctionsResponse() {
return { functions: [] };
}
export const ListExecutionFunctionsResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.functions) {
writer.uint32(10).string(v);
}
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 = createBaseListExecutionFunctionsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.functions.push(reader.string());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
functions: globalThis.Array.isArray(object?.functions)
? object.functions.map((e) => globalThis.String(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.functions?.length) {
obj.functions = message.functions;
}
return obj;
},
create(base) {
return ListExecutionFunctionsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListExecutionFunctionsResponse();
message.functions = object.functions?.map((e) => e) || [];
return message;
},
};
function createBaseListExecutionMethodsRequest() {
return {};
}
export const ListExecutionMethodsRequest = {
encode(_, writer = new BinaryWriter()) {
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 = createBaseListExecutionMethodsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ListExecutionMethodsRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseListExecutionMethodsRequest();
return message;
},
};
function createBaseListExecutionMethodsResponse() {
return { methods: [] };
}
export const ListExecutionMethodsResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.methods) {
writer.uint32(10).string(v);
}
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 = createBaseListExecutionMethodsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.methods.push(reader.string());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
methods: globalThis.Array.isArray(object?.methods) ? object.methods.map((e) => globalThis.String(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.methods?.length) {
obj.methods = message.methods;
}
return obj;
},
create(base) {
return ListExecutionMethodsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListExecutionMethodsResponse();
message.methods = object.methods?.map((e) => e) || [];
return message;
},
};
function createBaseListExecutionServicesRequest() {
return {};
}
export const ListExecutionServicesRequest = {
encode(_, writer = new BinaryWriter()) {
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 = createBaseListExecutionServicesRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(_) {
return {};
},
toJSON(_) {
const obj = {};
return obj;
},
create(base) {
return ListExecutionServicesRequest.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseListExecutionServicesRequest();
return message;
},
};
function createBaseListExecutionServicesResponse() {
return { services: [] };
}
export const ListExecutionServicesResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.services) {
writer.uint32(10).string(v);
}
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 = createBaseListExecutionServicesResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.services.push(reader.string());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
services: globalThis.Array.isArray(object?.services) ? object.services.map((e) => globalThis.String(e)) : [],
};
},
toJSON(message) {
const obj = {};
if (message.services?.length) {
obj.services = message.services;
}
return obj;
},
create(base) {
return ListExecutionServicesResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListExecutionServicesResponse();
message.services = object.services?.map((e) => e) || [];
return message;
},
};
export const ActionServiceDefinition = {
name: "ActionService",
fullName: "zitadel.action.v2beta.ActionService",
methods: {
/**
* Create Target
*
* Create a new target to your endpoint, which can be used in executions.
*
* Required permission:
* - `action.target.write`
*
* Required feature flag:
* - `actions`
*/