@zitadel/node
Version:
Library for API access to ZITADEL. Provides compiled gRPC service clients and helpers for applications and service accounts.
4,394 lines • 160 kB
JavaScript
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
// versions:
// protoc-gen-ts_proto v2.7.5
// protoc unknown
// source: zitadel/app/v2beta/app_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/v2/filter.js";
import { aPIAuthMethodTypeFromJSON, aPIAuthMethodTypeToJSON } from "./api.js";
import { Application, ApplicationKey, applicationKeysSortingFromJSON, applicationKeysSortingToJSON, ApplicationSearchFilter, appSortingFromJSON, appSortingToJSON, } from "./app.js";
import { LoginVersion } from "./login.js";
import { oIDCAppTypeFromJSON, oIDCAppTypeToJSON, oIDCAuthMethodTypeFromJSON, oIDCAuthMethodTypeToJSON, oIDCGrantTypeFromJSON, oIDCGrantTypeToJSON, OIDCLocalizedMessage, oIDCResponseTypeFromJSON, oIDCResponseTypeToJSON, oIDCTokenTypeFromJSON, oIDCTokenTypeToJSON, oIDCVersionFromJSON, oIDCVersionToJSON, } from "./oidc.js";
export const protobufPackage = "zitadel.app.v2beta";
function createBaseCreateApplicationRequest() {
return { projectId: "", id: "", name: "", oidcRequest: undefined, samlRequest: undefined, apiRequest: undefined };
}
export const CreateApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
if (message.id !== "") {
writer.uint32(18).string(message.id);
}
if (message.name !== "") {
writer.uint32(26).string(message.name);
}
if (message.oidcRequest !== undefined) {
CreateOIDCApplicationRequest.encode(message.oidcRequest, writer.uint32(34).fork()).join();
}
if (message.samlRequest !== undefined) {
CreateSAMLApplicationRequest.encode(message.samlRequest, writer.uint32(42).fork()).join();
}
if (message.apiRequest !== undefined) {
CreateAPIApplicationRequest.encode(message.apiRequest, writer.uint32(50).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 = createBaseCreateApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.id = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.name = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.oidcRequest = CreateOIDCApplicationRequest.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.samlRequest = CreateSAMLApplicationRequest.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.apiRequest = CreateAPIApplicationRequest.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
id: isSet(object.id) ? globalThis.String(object.id) : "",
name: isSet(object.name) ? globalThis.String(object.name) : "",
oidcRequest: isSet(object.oidcRequest) ? CreateOIDCApplicationRequest.fromJSON(object.oidcRequest) : undefined,
samlRequest: isSet(object.samlRequest) ? CreateSAMLApplicationRequest.fromJSON(object.samlRequest) : undefined,
apiRequest: isSet(object.apiRequest) ? CreateAPIApplicationRequest.fromJSON(object.apiRequest) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.id !== "") {
obj.id = message.id;
}
if (message.name !== "") {
obj.name = message.name;
}
if (message.oidcRequest !== undefined) {
obj.oidcRequest = CreateOIDCApplicationRequest.toJSON(message.oidcRequest);
}
if (message.samlRequest !== undefined) {
obj.samlRequest = CreateSAMLApplicationRequest.toJSON(message.samlRequest);
}
if (message.apiRequest !== undefined) {
obj.apiRequest = CreateAPIApplicationRequest.toJSON(message.apiRequest);
}
return obj;
},
create(base) {
return CreateApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateApplicationRequest();
message.projectId = object.projectId ?? "";
message.id = object.id ?? "";
message.name = object.name ?? "";
message.oidcRequest = (object.oidcRequest !== undefined && object.oidcRequest !== null)
? CreateOIDCApplicationRequest.fromPartial(object.oidcRequest)
: undefined;
message.samlRequest = (object.samlRequest !== undefined && object.samlRequest !== null)
? CreateSAMLApplicationRequest.fromPartial(object.samlRequest)
: undefined;
message.apiRequest = (object.apiRequest !== undefined && object.apiRequest !== null)
? CreateAPIApplicationRequest.fromPartial(object.apiRequest)
: undefined;
return message;
},
};
function createBaseCreateApplicationResponse() {
return {
appId: "",
creationDate: undefined,
oidcResponse: undefined,
samlResponse: undefined,
apiResponse: undefined,
};
}
export const CreateApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.appId !== "") {
writer.uint32(10).string(message.appId);
}
if (message.creationDate !== undefined) {
Timestamp.encode(toTimestamp(message.creationDate), writer.uint32(18).fork()).join();
}
if (message.oidcResponse !== undefined) {
CreateOIDCApplicationResponse.encode(message.oidcResponse, writer.uint32(26).fork()).join();
}
if (message.samlResponse !== undefined) {
CreateSAMLApplicationResponse.encode(message.samlResponse, writer.uint32(34).fork()).join();
}
if (message.apiResponse !== undefined) {
CreateAPIApplicationResponse.encode(message.apiResponse, writer.uint32(42).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 = createBaseCreateApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.appId = 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.oidcResponse = CreateOIDCApplicationResponse.decode(reader, reader.uint32());
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.samlResponse = CreateSAMLApplicationResponse.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.apiResponse = CreateAPIApplicationResponse.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
appId: isSet(object.appId) ? globalThis.String(object.appId) : "",
creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
oidcResponse: isSet(object.oidcResponse)
? CreateOIDCApplicationResponse.fromJSON(object.oidcResponse)
: undefined,
samlResponse: isSet(object.samlResponse)
? CreateSAMLApplicationResponse.fromJSON(object.samlResponse)
: undefined,
apiResponse: isSet(object.apiResponse) ? CreateAPIApplicationResponse.fromJSON(object.apiResponse) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.appId !== "") {
obj.appId = message.appId;
}
if (message.creationDate !== undefined) {
obj.creationDate = message.creationDate.toISOString();
}
if (message.oidcResponse !== undefined) {
obj.oidcResponse = CreateOIDCApplicationResponse.toJSON(message.oidcResponse);
}
if (message.samlResponse !== undefined) {
obj.samlResponse = CreateSAMLApplicationResponse.toJSON(message.samlResponse);
}
if (message.apiResponse !== undefined) {
obj.apiResponse = CreateAPIApplicationResponse.toJSON(message.apiResponse);
}
return obj;
},
create(base) {
return CreateApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateApplicationResponse();
message.appId = object.appId ?? "";
message.creationDate = object.creationDate ?? undefined;
message.oidcResponse = (object.oidcResponse !== undefined && object.oidcResponse !== null)
? CreateOIDCApplicationResponse.fromPartial(object.oidcResponse)
: undefined;
message.samlResponse = (object.samlResponse !== undefined && object.samlResponse !== null)
? CreateSAMLApplicationResponse.fromPartial(object.samlResponse)
: undefined;
message.apiResponse = (object.apiResponse !== undefined && object.apiResponse !== null)
? CreateAPIApplicationResponse.fromPartial(object.apiResponse)
: undefined;
return message;
},
};
function createBaseCreateOIDCApplicationRequest() {
return {
redirectUris: [],
responseTypes: [],
grantTypes: [],
appType: 0,
authMethodType: 0,
postLogoutRedirectUris: [],
version: 0,
devMode: false,
accessTokenType: 0,
accessTokenRoleAssertion: false,
idTokenRoleAssertion: false,
idTokenUserinfoAssertion: false,
clockSkew: undefined,
additionalOrigins: [],
skipNativeAppSuccessPage: false,
backChannelLogoutUri: "",
loginVersion: undefined,
};
}
export const CreateOIDCApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.redirectUris) {
writer.uint32(10).string(v);
}
writer.uint32(18).fork();
for (const v of message.responseTypes) {
writer.int32(v);
}
writer.join();
writer.uint32(26).fork();
for (const v of message.grantTypes) {
writer.int32(v);
}
writer.join();
if (message.appType !== 0) {
writer.uint32(32).int32(message.appType);
}
if (message.authMethodType !== 0) {
writer.uint32(40).int32(message.authMethodType);
}
for (const v of message.postLogoutRedirectUris) {
writer.uint32(50).string(v);
}
if (message.version !== 0) {
writer.uint32(56).int32(message.version);
}
if (message.devMode !== false) {
writer.uint32(64).bool(message.devMode);
}
if (message.accessTokenType !== 0) {
writer.uint32(72).int32(message.accessTokenType);
}
if (message.accessTokenRoleAssertion !== false) {
writer.uint32(80).bool(message.accessTokenRoleAssertion);
}
if (message.idTokenRoleAssertion !== false) {
writer.uint32(88).bool(message.idTokenRoleAssertion);
}
if (message.idTokenUserinfoAssertion !== false) {
writer.uint32(96).bool(message.idTokenUserinfoAssertion);
}
if (message.clockSkew !== undefined) {
Duration.encode(message.clockSkew, writer.uint32(106).fork()).join();
}
for (const v of message.additionalOrigins) {
writer.uint32(114).string(v);
}
if (message.skipNativeAppSuccessPage !== false) {
writer.uint32(120).bool(message.skipNativeAppSuccessPage);
}
if (message.backChannelLogoutUri !== "") {
writer.uint32(130).string(message.backChannelLogoutUri);
}
if (message.loginVersion !== undefined) {
LoginVersion.encode(message.loginVersion, writer.uint32(138).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 = createBaseCreateOIDCApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.redirectUris.push(reader.string());
continue;
}
case 2: {
if (tag === 16) {
message.responseTypes.push(reader.int32());
continue;
}
if (tag === 18) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.responseTypes.push(reader.int32());
}
continue;
}
break;
}
case 3: {
if (tag === 24) {
message.grantTypes.push(reader.int32());
continue;
}
if (tag === 26) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.grantTypes.push(reader.int32());
}
continue;
}
break;
}
case 4: {
if (tag !== 32) {
break;
}
message.appType = reader.int32();
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.authMethodType = reader.int32();
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.postLogoutRedirectUris.push(reader.string());
continue;
}
case 7: {
if (tag !== 56) {
break;
}
message.version = reader.int32();
continue;
}
case 8: {
if (tag !== 64) {
break;
}
message.devMode = reader.bool();
continue;
}
case 9: {
if (tag !== 72) {
break;
}
message.accessTokenType = reader.int32();
continue;
}
case 10: {
if (tag !== 80) {
break;
}
message.accessTokenRoleAssertion = reader.bool();
continue;
}
case 11: {
if (tag !== 88) {
break;
}
message.idTokenRoleAssertion = reader.bool();
continue;
}
case 12: {
if (tag !== 96) {
break;
}
message.idTokenUserinfoAssertion = reader.bool();
continue;
}
case 13: {
if (tag !== 106) {
break;
}
message.clockSkew = Duration.decode(reader, reader.uint32());
continue;
}
case 14: {
if (tag !== 114) {
break;
}
message.additionalOrigins.push(reader.string());
continue;
}
case 15: {
if (tag !== 120) {
break;
}
message.skipNativeAppSuccessPage = reader.bool();
continue;
}
case 16: {
if (tag !== 130) {
break;
}
message.backChannelLogoutUri = reader.string();
continue;
}
case 17: {
if (tag !== 138) {
break;
}
message.loginVersion = LoginVersion.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
redirectUris: globalThis.Array.isArray(object?.redirectUris)
? object.redirectUris.map((e) => globalThis.String(e))
: [],
responseTypes: globalThis.Array.isArray(object?.responseTypes)
? object.responseTypes.map((e) => oIDCResponseTypeFromJSON(e))
: [],
grantTypes: globalThis.Array.isArray(object?.grantTypes)
? object.grantTypes.map((e) => oIDCGrantTypeFromJSON(e))
: [],
appType: isSet(object.appType) ? oIDCAppTypeFromJSON(object.appType) : 0,
authMethodType: isSet(object.authMethodType) ? oIDCAuthMethodTypeFromJSON(object.authMethodType) : 0,
postLogoutRedirectUris: globalThis.Array.isArray(object?.postLogoutRedirectUris)
? object.postLogoutRedirectUris.map((e) => globalThis.String(e))
: [],
version: isSet(object.version) ? oIDCVersionFromJSON(object.version) : 0,
devMode: isSet(object.devMode) ? globalThis.Boolean(object.devMode) : false,
accessTokenType: isSet(object.accessTokenType) ? oIDCTokenTypeFromJSON(object.accessTokenType) : 0,
accessTokenRoleAssertion: isSet(object.accessTokenRoleAssertion)
? globalThis.Boolean(object.accessTokenRoleAssertion)
: false,
idTokenRoleAssertion: isSet(object.idTokenRoleAssertion)
? globalThis.Boolean(object.idTokenRoleAssertion)
: false,
idTokenUserinfoAssertion: isSet(object.idTokenUserinfoAssertion)
? globalThis.Boolean(object.idTokenUserinfoAssertion)
: false,
clockSkew: isSet(object.clockSkew) ? Duration.fromJSON(object.clockSkew) : undefined,
additionalOrigins: globalThis.Array.isArray(object?.additionalOrigins)
? object.additionalOrigins.map((e) => globalThis.String(e))
: [],
skipNativeAppSuccessPage: isSet(object.skipNativeAppSuccessPage)
? globalThis.Boolean(object.skipNativeAppSuccessPage)
: false,
backChannelLogoutUri: isSet(object.backChannelLogoutUri) ? globalThis.String(object.backChannelLogoutUri) : "",
loginVersion: isSet(object.loginVersion) ? LoginVersion.fromJSON(object.loginVersion) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.redirectUris?.length) {
obj.redirectUris = message.redirectUris;
}
if (message.responseTypes?.length) {
obj.responseTypes = message.responseTypes.map((e) => oIDCResponseTypeToJSON(e));
}
if (message.grantTypes?.length) {
obj.grantTypes = message.grantTypes.map((e) => oIDCGrantTypeToJSON(e));
}
if (message.appType !== 0) {
obj.appType = oIDCAppTypeToJSON(message.appType);
}
if (message.authMethodType !== 0) {
obj.authMethodType = oIDCAuthMethodTypeToJSON(message.authMethodType);
}
if (message.postLogoutRedirectUris?.length) {
obj.postLogoutRedirectUris = message.postLogoutRedirectUris;
}
if (message.version !== 0) {
obj.version = oIDCVersionToJSON(message.version);
}
if (message.devMode !== false) {
obj.devMode = message.devMode;
}
if (message.accessTokenType !== 0) {
obj.accessTokenType = oIDCTokenTypeToJSON(message.accessTokenType);
}
if (message.accessTokenRoleAssertion !== false) {
obj.accessTokenRoleAssertion = message.accessTokenRoleAssertion;
}
if (message.idTokenRoleAssertion !== false) {
obj.idTokenRoleAssertion = message.idTokenRoleAssertion;
}
if (message.idTokenUserinfoAssertion !== false) {
obj.idTokenUserinfoAssertion = message.idTokenUserinfoAssertion;
}
if (message.clockSkew !== undefined) {
obj.clockSkew = Duration.toJSON(message.clockSkew);
}
if (message.additionalOrigins?.length) {
obj.additionalOrigins = message.additionalOrigins;
}
if (message.skipNativeAppSuccessPage !== false) {
obj.skipNativeAppSuccessPage = message.skipNativeAppSuccessPage;
}
if (message.backChannelLogoutUri !== "") {
obj.backChannelLogoutUri = message.backChannelLogoutUri;
}
if (message.loginVersion !== undefined) {
obj.loginVersion = LoginVersion.toJSON(message.loginVersion);
}
return obj;
},
create(base) {
return CreateOIDCApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateOIDCApplicationRequest();
message.redirectUris = object.redirectUris?.map((e) => e) || [];
message.responseTypes = object.responseTypes?.map((e) => e) || [];
message.grantTypes = object.grantTypes?.map((e) => e) || [];
message.appType = object.appType ?? 0;
message.authMethodType = object.authMethodType ?? 0;
message.postLogoutRedirectUris = object.postLogoutRedirectUris?.map((e) => e) || [];
message.version = object.version ?? 0;
message.devMode = object.devMode ?? false;
message.accessTokenType = object.accessTokenType ?? 0;
message.accessTokenRoleAssertion = object.accessTokenRoleAssertion ?? false;
message.idTokenRoleAssertion = object.idTokenRoleAssertion ?? false;
message.idTokenUserinfoAssertion = object.idTokenUserinfoAssertion ?? false;
message.clockSkew = (object.clockSkew !== undefined && object.clockSkew !== null)
? Duration.fromPartial(object.clockSkew)
: undefined;
message.additionalOrigins = object.additionalOrigins?.map((e) => e) || [];
message.skipNativeAppSuccessPage = object.skipNativeAppSuccessPage ?? false;
message.backChannelLogoutUri = object.backChannelLogoutUri ?? "";
message.loginVersion = (object.loginVersion !== undefined && object.loginVersion !== null)
? LoginVersion.fromPartial(object.loginVersion)
: undefined;
return message;
},
};
function createBaseCreateOIDCApplicationResponse() {
return { clientId: "", clientSecret: "", noneCompliant: false, complianceProblems: [] };
}
export const CreateOIDCApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.clientId !== "") {
writer.uint32(10).string(message.clientId);
}
if (message.clientSecret !== "") {
writer.uint32(18).string(message.clientSecret);
}
if (message.noneCompliant !== false) {
writer.uint32(24).bool(message.noneCompliant);
}
for (const v of message.complianceProblems) {
OIDCLocalizedMessage.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 = createBaseCreateOIDCApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.clientId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.clientSecret = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.noneCompliant = reader.bool();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.complianceProblems.push(OIDCLocalizedMessage.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
noneCompliant: isSet(object.noneCompliant) ? globalThis.Boolean(object.noneCompliant) : false,
complianceProblems: globalThis.Array.isArray(object?.complianceProblems)
? object.complianceProblems.map((e) => OIDCLocalizedMessage.fromJSON(e))
: [],
};
},
toJSON(message) {
const obj = {};
if (message.clientId !== "") {
obj.clientId = message.clientId;
}
if (message.clientSecret !== "") {
obj.clientSecret = message.clientSecret;
}
if (message.noneCompliant !== false) {
obj.noneCompliant = message.noneCompliant;
}
if (message.complianceProblems?.length) {
obj.complianceProblems = message.complianceProblems.map((e) => OIDCLocalizedMessage.toJSON(e));
}
return obj;
},
create(base) {
return CreateOIDCApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateOIDCApplicationResponse();
message.clientId = object.clientId ?? "";
message.clientSecret = object.clientSecret ?? "";
message.noneCompliant = object.noneCompliant ?? false;
message.complianceProblems = object.complianceProblems?.map((e) => OIDCLocalizedMessage.fromPartial(e)) || [];
return message;
},
};
function createBaseCreateSAMLApplicationRequest() {
return { metadataXml: undefined, metadataUrl: undefined, loginVersion: undefined };
}
export const CreateSAMLApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.metadataXml !== undefined) {
writer.uint32(10).bytes(message.metadataXml);
}
if (message.metadataUrl !== undefined) {
writer.uint32(18).string(message.metadataUrl);
}
if (message.loginVersion !== undefined) {
LoginVersion.encode(message.loginVersion, 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 = createBaseCreateSAMLApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.metadataXml = Buffer.from(reader.bytes());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.metadataUrl = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.loginVersion = LoginVersion.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
metadataXml: isSet(object.metadataXml) ? Buffer.from(bytesFromBase64(object.metadataXml)) : undefined,
metadataUrl: isSet(object.metadataUrl) ? globalThis.String(object.metadataUrl) : undefined,
loginVersion: isSet(object.loginVersion) ? LoginVersion.fromJSON(object.loginVersion) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.metadataXml !== undefined) {
obj.metadataXml = base64FromBytes(message.metadataXml);
}
if (message.metadataUrl !== undefined) {
obj.metadataUrl = message.metadataUrl;
}
if (message.loginVersion !== undefined) {
obj.loginVersion = LoginVersion.toJSON(message.loginVersion);
}
return obj;
},
create(base) {
return CreateSAMLApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateSAMLApplicationRequest();
message.metadataXml = object.metadataXml ?? undefined;
message.metadataUrl = object.metadataUrl ?? undefined;
message.loginVersion = (object.loginVersion !== undefined && object.loginVersion !== null)
? LoginVersion.fromPartial(object.loginVersion)
: undefined;
return message;
},
};
function createBaseCreateSAMLApplicationResponse() {
return {};
}
export const CreateSAMLApplicationResponse = {
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 = createBaseCreateSAMLApplicationResponse();
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 CreateSAMLApplicationResponse.fromPartial(base ?? {});
},
fromPartial(_) {
const message = createBaseCreateSAMLApplicationResponse();
return message;
},
};
function createBaseCreateAPIApplicationRequest() {
return { authMethodType: 0 };
}
export const CreateAPIApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.authMethodType !== 0) {
writer.uint32(8).int32(message.authMethodType);
}
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 = createBaseCreateAPIApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
break;
}
message.authMethodType = reader.int32();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { authMethodType: isSet(object.authMethodType) ? aPIAuthMethodTypeFromJSON(object.authMethodType) : 0 };
},
toJSON(message) {
const obj = {};
if (message.authMethodType !== 0) {
obj.authMethodType = aPIAuthMethodTypeToJSON(message.authMethodType);
}
return obj;
},
create(base) {
return CreateAPIApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateAPIApplicationRequest();
message.authMethodType = object.authMethodType ?? 0;
return message;
},
};
function createBaseCreateAPIApplicationResponse() {
return { clientId: "", clientSecret: "" };
}
export const CreateAPIApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.clientId !== "") {
writer.uint32(10).string(message.clientId);
}
if (message.clientSecret !== "") {
writer.uint32(18).string(message.clientSecret);
}
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 = createBaseCreateAPIApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.clientId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.clientSecret = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
clientId: isSet(object.clientId) ? globalThis.String(object.clientId) : "",
clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
};
},
toJSON(message) {
const obj = {};
if (message.clientId !== "") {
obj.clientId = message.clientId;
}
if (message.clientSecret !== "") {
obj.clientSecret = message.clientSecret;
}
return obj;
},
create(base) {
return CreateAPIApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateAPIApplicationResponse();
message.clientId = object.clientId ?? "";
message.clientSecret = object.clientSecret ?? "";
return message;
},
};
function createBaseUpdateApplicationRequest() {
return {
projectId: "",
id: "",
name: "",
samlConfigurationRequest: undefined,
oidcConfigurationRequest: undefined,
apiConfigurationRequest: undefined,
};
}
export const UpdateApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
if (message.id !== "") {
writer.uint32(18).string(message.id);
}
if (message.name !== "") {
writer.uint32(26).string(message.name);
}
if (message.samlConfigurationRequest !== undefined) {
UpdateSAMLApplicationConfigurationRequest.encode(message.samlConfigurationRequest, writer.uint32(34).fork())
.join();
}
if (message.oidcConfigurationRequest !== undefined) {
UpdateOIDCApplicationConfigurationRequest.encode(message.oidcConfigurationRequest, writer.uint32(42).fork())
.join();
}
if (message.apiConfigurationRequest !== undefined) {
UpdateAPIApplicationConfigurationRequest.encode(message.apiConfigurationRequest, writer.uint32(50).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 = createBaseUpdateApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.id = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.name = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.samlConfigurationRequest = UpdateSAMLApplicationConfigurationRequest.decode(reader, reader.uint32());
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.oidcConfigurationRequest = UpdateOIDCApplicationConfigurationRequest.decode(reader, reader.uint32());
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.apiConfigurationRequest = UpdateAPIApplicationConfigurationRequest.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
id: isSet(object.id) ? globalThis.String(object.id) : "",
name: isSet(object.name) ? globalThis.String(object.name) : "",
samlConfigurationRequest: isSet(object.samlConfigurationRequest)
? UpdateSAMLApplicationConfigurationRequest.fromJSON(object.samlConfigurationRequest)
: undefined,
oidcConfigurationRequest: isSet(object.oidcConfigurationRequest)
? UpdateOIDCApplicationConfigurationRequest.fromJSON(object.oidcConfigurationRequest)
: undefined,
apiConfigurationRequest: isSet(object.apiConfigurationRequest)
? UpdateAPIApplicationConfigurationRequest.fromJSON(object.apiConfigurationRequest)
: undefined,
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.id !== "") {
obj.id = message.id;
}
if (message.name !== "") {
obj.name = message.name;
}
if (message.samlConfigurationRequest !== undefined) {
obj.samlConfigurationRequest = UpdateSAMLApplicationConfigurationRequest.toJSON(message.samlConfigurationRequest);
}
if (message.oidcConfigurationRequest !== undefined) {
obj.oidcConfigurationRequest = UpdateOIDCApplicationConfigurationRequest.toJSON(message.oidcConfigurationRequest);
}
if (message.apiConfigurationRequest !== undefined) {
obj.apiConfigurationRequest = UpdateAPIApplicationConfigurationRequest.toJSON(message.apiConfigurationRequest);
}
return obj;
},
create(base) {
return UpdateApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateApplicationRequest();
message.projectId = object.projectId ?? "";
message.id = object.id ?? "";
message.name = object.name ?? "";
message.samlConfigurationRequest =
(object.samlConfigurationRequest !== undefined && object.samlConfigurationRequest !== null)
? UpdateSAMLApplicationConfigurationRequest.fromPartial(object.samlConfigurationRequest)
: undefined;
message.oidcConfigurationRequest =
(object.oidcConfigurationRequest !== undefined && object.oidcConfigurationRequest !== null)
? UpdateOIDCApplicationConfigurationRequest.fromPartial(object.oidcConfigurationRequest)
: undefined;
message.apiConfigurationRequest =
(object.apiConfigurationRequest !== undefined && object.apiConfigurationRequest !== null)
? UpdateAPIApplicationConfigurationRequest.fromPartial(object.apiConfigurationRequest)
: undefined;
return message;
},
};
function createBaseUpdateApplicationResponse() {
return { changeDate: undefined };
}
export const UpdateApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.changeDate !== undefined) {
Timestamp.encode(toTimestamp(message.changeDate), 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 = createBaseUpdateApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 2: {
if (tag !== 18) {
break;
}
message.changeDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
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 };
},
toJSON(message) {
const obj = {};
if (message.changeDate !== undefined) {
obj.changeDate = message.changeDate.toISOString();
}
return obj;
},
create(base) {
return UpdateApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateApplicationResponse();
message.changeDate = object.changeDate ?? undefined;
return message;
},
};
function createBaseUpdateSAMLApplicationConfigurationRequest() {
return { metadataXml: undefined, metadataUrl: undefined, loginVersion: undefined };
}
export const UpdateSAMLApplicationConfigurationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.metadataXml !== undefined) {
writer.uint32(10).bytes(message.metadataXml);
}
if (message.metadataUrl !== undefined) {
writer.uint32(18).string(message.metadataUrl);
}
if (message.loginVersion !== undefined) {
LoginVersion.encode(message.loginVersion, 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 = createBaseUpdateSAMLApplicationConfigurationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.metadataXml = Buffer.from(reader.bytes());
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.metadataUrl = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.loginVersion = LoginVersion.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
metadataXml: isSet(object.metadataXml) ? Buffer.from(bytesFromBase64(object.metadataXml)) : undefined,
metadataUrl: isSet(object.metadataUrl) ? globalThis.String(object.metadataUrl) : undefined,
loginVersion: isSet(object.loginVersion) ? LoginVersion.fromJSON(object.loginVersion) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.metadataXml !== undefined) {
obj.metadataXml = base64FromBytes(message.metadataXml);
}
if (message.metadataUrl !== undefined) {
obj.metadataUrl = message.metadataUrl;
}
if (message.loginVersion !== undefined) {
obj.loginVersion = LoginVersion.toJSON(message.loginVersion);
}
return obj;
},
create(base) {
return UpdateSAMLApplicationConfigurationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateSAMLApplicationConfigurationRequest();
message.metadataXml = object.metadataXml ?? undefined;
message.metadataUrl = object.metadataUrl ?? undefined;
message.loginVersion = (object.loginVersion !== undefined && object.loginVersion !== null)
? LoginVersion.fromPartial(object.loginVersion)
: undefined;
return message;
},
};
function createBaseUpdateOIDCApplicationConfigurationRequest() {
return {
redirectUris: [],
responseTypes: [],
grantTypes: [],
appType: undefined,
authMethodType: undefined,
postLogoutRedirectUris: [],
version: undefined,
devMode: undefined,
accessTokenType: undefined,
accessTokenRoleAssertion: undefined,
idTokenRoleAssertion: undefined,
idTokenUserinfoAssertion: undefined,
clockSkew: undefined,
additionalOrigins: [],
skipNativeAppSuccessPage: undefined,
backChannelLogoutUri: undefined,
loginVersion: undefined,
};
}
export const UpdateOIDCApplicationConfigurationRequest = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.redirectUris) {
writer.uint32(10).string(v);
}
writer.uint32(18).fork();
for (const v of message.responseTypes) {
writer.int32(v);
}
writer.join();
writer.uint32(26).fork();
for (const v of message.grantTypes) {
writer.int32(v);
}
writer.join();
if (message.appType !== undefined) {
writer.uint32(32).int32(message.appType);
}
if (message.authMethodType !== undefined) {
writer.uint32(40).int32(message.authMethodType);
}
for (const v of message.postLogoutRedirectUris) {
writer.uint32(50).string(v);
}
if (message.version !== undefined) {
writer.uint32(56).int32(message.version);
}
if (message.devMode !== undefined) {
writer.uint32(64).bool(message.devMode);
}
if (message.accessTokenType !== undefined) {
writer.uint32(72).int32(message.accessTokenType);
}
if (message.accessTokenRoleAssertion !== undefined) {
writer.uint32(80).bool(message.accessTokenRoleAssertion);
}
if (message.idTokenRoleAssertion !== undefined) {
writer.uint32(88).bool(message.idTokenRoleAssertion);
}
if (message.idTokenUserinfoAssertion !== undefined) {
writer.uint32(96).bool(message.idTokenUserinfoAssertion);
}
if (message.clockSkew !== undefined) {
Duration.encode(message.clockSkew, writer.uint32(106).fork()).join();
}
for (const v of message.additionalOrigins) {
writer.uint32(114).string(v);
}
if (message.skipNativeAppSuccessPage !== undefined) {
writer.uint32(120).bool(message.skipNativeAppSuccessPage);
}
if (message.backChannelLogoutUri !== undefined) {
writer.uint32(130).string(message.backChannelLogoutUri);
}
if (message.loginVersion !== undefined) {
LoginVersion.encode(message.loginVersion, writer.uint32(138).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 = createBaseUpdateOIDCApplicationConfigurationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.redirectUris.push(reader.string());
continue;
}
case 2: {
if (tag === 16) {
message.responseTypes.push(reader.int32());
continue;
}
if (tag === 18) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.responseTypes.push(reader.int32());
}
continue;
}
break;
}
case 3: {
if (tag === 24) {
message.grantTypes.push(reader.int32());
continue;
}
if (tag === 26) {
const end2 = reader.uint32() + reader.pos;
while (reader.pos < end2) {
message.grantTypes.push(reader.int32());
}
continue;
}
break;
}
case 4: {
if (tag !== 32) {
break;
}
message.appType = reader.int32();
continue;
}
case 5: {
if (tag !== 40) {
break;
}
message.authMethodType = reader.int32();
continue;
}
case 6: {
if (tag !== 50) {
break;
}
message.postLogoutRedirectUris.push(reader.string());
continue;
}
case 7: {
if (tag !== 56) {
break;
}
message.version = reader.int32();
continue;
}
case 8: {
if (tag !== 64) {
break;
}
message.devMode = reader.bool();
continue;
}
case 9: {
if (tag !== 72) {
break;
}
message.accessTokenType = reader.int32();
continue;
}
case 10: {
if (tag !== 80) {
break;
}
message.accessTokenRoleAssertion = reader.bool();
continue;
}
case 11: {
if (tag !== 88) {
break;
}
message.idTokenRoleAssertion = reader.bool();
continue;
}
case 12: {
if (tag !== 96) {
break;
}
message.idTokenUserinfoAssertion = reader.bool();
continue;
}
case 13: {
if (tag !== 106) {
break;
}
message.clockSkew = Duration.decode(reader, reader.uint32());
continue;
}
case 14: {
if (tag !== 114) {
break;
}
message.additionalOrigins.push(reader.string());
continue;
}
case 15: {
if (tag !== 120) {
break;
}
message.skipNativeAppSuccessPage = reader.bool();
continue;
}
case 16: {
if (tag !== 130) {
break;
}
message.backChannelLogoutUri = reader.string();
continue;
}
case 17: {
if (tag !== 138) {
break;
}
message.loginVersion = LoginVersion.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
redirectUris: globalThis.Array.isArray(object?.redirectUris)
? object.redirectUris.map((e) => globalThis.String(e))
: [],
responseTypes: globalThis.Array.isArray(object?.responseTypes)
? object.responseTypes.map((e) => oIDCResponseTypeFromJSON(e))
: [],
grantTypes: globalThis.Array.isArray(object?.grantTypes)
? object.grantTypes.map((e) => oIDCGrantTypeFromJSON(e))
: [],
appType: isSet(object.appType) ? oIDCAppTypeFromJSON(object.appType) : undefined,
authMethodType: isSet(object.authMethodType) ? oIDCAuthMethodTypeFromJSON(object.authMethodType) : undefined,
postLogoutRedirectUris: globalThis.Array.isArray(object?.postLogoutRedirectUris)
? object.postLogoutRedirectUris.map((e) => globalThis.String(e))
: [],
version: isSet(object.version) ? oIDCVersionFromJSON(object.version) : undefined,
devMode: isSet(object.devMode) ? globalThis.Boolean(object.devMode) : undefined,
accessTokenType: isSet(object.accessTokenType) ? oIDCTokenTypeFromJSON(object.accessTokenType) : undefined,
accessTokenRoleAssertion: isSet(object.accessTokenRoleAssertion)
? globalThis.Boolean(object.accessTokenRoleAssertion)
: undefined,
idTokenRoleAssertion: isSet(object.idTokenRoleAssertion)
? globalThis.Boolean(object.idTokenRoleAssertion)
: undefined,
idTokenUserinfoAssertion: isSet(object.idTokenUserinfoAssertion)
? globalThis.Boolean(object.idTokenUserinfoAssertion)
: undefined,
clockSkew: isSet(object.clockSkew) ? Duration.fromJSON(object.clockSkew) : undefined,
additionalOrigins: globalThis.Array.isArray(object?.additionalOrigins)
? object.additionalOrigins.map((e) => globalThis.String(e))
: [],
skipNativeAppSuccessPage: isSet(object.skipNativeAppSuccessPage)
? globalThis.Boolean(object.skipNativeAppSuccessPage)
: undefined,
backChannelLogoutUri: isSet(object.backChannelLogoutUri)
? globalThis.String(object.backChannelLogoutUri)
: undefined,
loginVersion: isSet(object.loginVersion) ? LoginVersion.fromJSON(object.loginVersion) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.redirectUris?.length) {
obj.redirectUris = message.redirectUris;
}
if (message.responseTypes?.length) {
obj.responseTypes = message.responseTypes.map((e) => oIDCResponseTypeToJSON(e));
}
if (message.grantTypes?.length) {
obj.grantTypes = message.grantTypes.map((e) => oIDCGrantTypeToJSON(e));
}
if (message.appType !== undefined) {
obj.appType = oIDCAppTypeToJSON(message.appType);
}
if (message.authMethodType !== undefined) {
obj.authMethodType = oIDCAuthMethodTypeToJSON(message.authMethodType);
}
if (message.postLogoutRedirectUris?.length) {
obj.postLogoutRedirectUris = message.postLogoutRedirectUris;
}
if (message.version !== undefined) {
obj.version = oIDCVersionToJSON(message.version);
}
if (message.devMode !== undefined) {
obj.devMode = message.devMode;
}
if (message.accessTokenType !== undefined) {
obj.accessTokenType = oIDCTokenTypeToJSON(message.accessTokenType);
}
if (message.accessTokenRoleAssertion !== undefined) {
obj.accessTokenRoleAssertion = message.accessTokenRoleAssertion;
}
if (message.idTokenRoleAssertion !== undefined) {
obj.idTokenRoleAssertion = message.idTokenRoleAssertion;
}
if (message.idTokenUserinfoAssertion !== undefined) {
obj.idTokenUserinfoAssertion = message.idTokenUserinfoAssertion;
}
if (message.clockSkew !== undefined) {
obj.clockSkew = Duration.toJSON(message.clockSkew);
}
if (message.additionalOrigins?.length) {
obj.additionalOrigins = message.additionalOrigins;
}
if (message.skipNativeAppSuccessPage !== undefined) {
obj.skipNativeAppSuccessPage = message.skipNativeAppSuccessPage;
}
if (message.backChannelLogoutUri !== undefined) {
obj.backChannelLogoutUri = message.backChannelLogoutUri;
}
if (message.loginVersion !== undefined) {
obj.loginVersion = LoginVersion.toJSON(message.loginVersion);
}
return obj;
},
create(base) {
return UpdateOIDCApplicationConfigurationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateOIDCApplicationConfigurationRequest();
message.redirectUris = object.redirectUris?.map((e) => e) || [];
message.responseTypes = object.responseTypes?.map((e) => e) || [];
message.grantTypes = object.grantTypes?.map((e) => e) || [];
message.appType = object.appType ?? undefined;
message.authMethodType = object.authMethodType ?? undefined;
message.postLogoutRedirectUris = object.postLogoutRedirectUris?.map((e) => e) || [];
message.version = object.version ?? undefined;
message.devMode = object.devMode ?? undefined;
message.accessTokenType = object.accessTokenType ?? undefined;
message.accessTokenRoleAssertion = object.accessTokenRoleAssertion ?? undefined;
message.idTokenRoleAssertion = object.idTokenRoleAssertion ?? undefined;
message.idTokenUserinfoAssertion = object.idTokenUserinfoAssertion ?? undefined;
message.clockSkew = (object.clockSkew !== undefined && object.clockSkew !== null)
? Duration.fromPartial(object.clockSkew)
: undefined;
message.additionalOrigins = object.additionalOrigins?.map((e) => e) || [];
message.skipNativeAppSuccessPage = object.skipNativeAppSuccessPage ?? undefined;
message.backChannelLogoutUri = object.backChannelLogoutUri ?? undefined;
message.loginVersion = (object.loginVersion !== undefined && object.loginVersion !== null)
? LoginVersion.fromPartial(object.loginVersion)
: undefined;
return message;
},
};
function createBaseUpdateAPIApplicationConfigurationRequest() {
return { authMethodType: 0 };
}
export const UpdateAPIApplicationConfigurationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.authMethodType !== 0) {
writer.uint32(8).int32(message.authMethodType);
}
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 = createBaseUpdateAPIApplicationConfigurationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 8) {
break;
}
message.authMethodType = reader.int32();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { authMethodType: isSet(object.authMethodType) ? aPIAuthMethodTypeFromJSON(object.authMethodType) : 0 };
},
toJSON(message) {
const obj = {};
if (message.authMethodType !== 0) {
obj.authMethodType = aPIAuthMethodTypeToJSON(message.authMethodType);
}
return obj;
},
create(base) {
return UpdateAPIApplicationConfigurationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseUpdateAPIApplicationConfigurationRequest();
message.authMethodType = object.authMethodType ?? 0;
return message;
},
};
function createBaseGetApplicationRequest() {
return { id: "" };
}
export const GetApplicationRequest = {
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 = createBaseGetApplicationRequest();
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 GetApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetApplicationRequest();
message.id = object.id ?? "";
return message;
},
};
function createBaseGetApplicationResponse() {
return { app: undefined };
}
export const GetApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.app !== undefined) {
Application.encode(message.app, 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 = createBaseGetApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.app = Application.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return { app: isSet(object.app) ? Application.fromJSON(object.app) : undefined };
},
toJSON(message) {
const obj = {};
if (message.app !== undefined) {
obj.app = Application.toJSON(message.app);
}
return obj;
},
create(base) {
return GetApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetApplicationResponse();
message.app = (object.app !== undefined && object.app !== null) ? Application.fromPartial(object.app) : undefined;
return message;
},
};
function createBaseDeleteApplicationRequest() {
return { projectId: "", id: "" };
}
export const DeleteApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
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 = createBaseDeleteApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
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 {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return DeleteApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteApplicationRequest();
message.projectId = object.projectId ?? "";
message.id = object.id ?? "";
return message;
},
};
function createBaseDeleteApplicationResponse() {
return { deletionDate: undefined };
}
export const DeleteApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.deletionDate !== undefined) {
Timestamp.encode(toTimestamp(message.deletionDate), 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 = createBaseDeleteApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
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 DeleteApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteApplicationResponse();
message.deletionDate = object.deletionDate ?? undefined;
return message;
},
};
function createBaseDeactivateApplicationRequest() {
return { projectId: "", id: "" };
}
export const DeactivateApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
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 = createBaseDeactivateApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
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 {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return DeactivateApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeactivateApplicationRequest();
message.projectId = object.projectId ?? "";
message.id = object.id ?? "";
return message;
},
};
function createBaseDeactivateApplicationResponse() {
return { deactivationDate: undefined };
}
export const DeactivateApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.deactivationDate !== undefined) {
Timestamp.encode(toTimestamp(message.deactivationDate), 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 = createBaseDeactivateApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.deactivationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
deactivationDate: isSet(object.deactivationDate) ? fromJsonTimestamp(object.deactivationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.deactivationDate !== undefined) {
obj.deactivationDate = message.deactivationDate.toISOString();
}
return obj;
},
create(base) {
return DeactivateApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeactivateApplicationResponse();
message.deactivationDate = object.deactivationDate ?? undefined;
return message;
},
};
function createBaseReactivateApplicationRequest() {
return { projectId: "", id: "" };
}
export const ReactivateApplicationRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
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 = createBaseReactivateApplicationRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
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 {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
id: isSet(object.id) ? globalThis.String(object.id) : "",
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.id !== "") {
obj.id = message.id;
}
return obj;
},
create(base) {
return ReactivateApplicationRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseReactivateApplicationRequest();
message.projectId = object.projectId ?? "";
message.id = object.id ?? "";
return message;
},
};
function createBaseReactivateApplicationResponse() {
return { reactivationDate: undefined };
}
export const ReactivateApplicationResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.reactivationDate !== undefined) {
Timestamp.encode(toTimestamp(message.reactivationDate), 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 = createBaseReactivateApplicationResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.reactivationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
reactivationDate: isSet(object.reactivationDate) ? fromJsonTimestamp(object.reactivationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.reactivationDate !== undefined) {
obj.reactivationDate = message.reactivationDate.toISOString();
}
return obj;
},
create(base) {
return ReactivateApplicationResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseReactivateApplicationResponse();
message.reactivationDate = object.reactivationDate ?? undefined;
return message;
},
};
function createBaseRegenerateClientSecretRequest() {
return { projectId: "", applicationId: "", isOidc: undefined, isApi: undefined };
}
export const RegenerateClientSecretRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
if (message.applicationId !== "") {
writer.uint32(18).string(message.applicationId);
}
if (message.isOidc !== undefined) {
writer.uint32(24).bool(message.isOidc);
}
if (message.isApi !== undefined) {
writer.uint32(32).bool(message.isApi);
}
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 = createBaseRegenerateClientSecretRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.applicationId = reader.string();
continue;
}
case 3: {
if (tag !== 24) {
break;
}
message.isOidc = reader.bool();
continue;
}
case 4: {
if (tag !== 32) {
break;
}
message.isApi = reader.bool();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
applicationId: isSet(object.applicationId) ? globalThis.String(object.applicationId) : "",
isOidc: isSet(object.isOidc) ? globalThis.Boolean(object.isOidc) : undefined,
isApi: isSet(object.isApi) ? globalThis.Boolean(object.isApi) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.applicationId !== "") {
obj.applicationId = message.applicationId;
}
if (message.isOidc !== undefined) {
obj.isOidc = message.isOidc;
}
if (message.isApi !== undefined) {
obj.isApi = message.isApi;
}
return obj;
},
create(base) {
return RegenerateClientSecretRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegenerateClientSecretRequest();
message.projectId = object.projectId ?? "";
message.applicationId = object.applicationId ?? "";
message.isOidc = object.isOidc ?? undefined;
message.isApi = object.isApi ?? undefined;
return message;
},
};
function createBaseRegenerateClientSecretResponse() {
return { clientSecret: "", creationDate: undefined };
}
export const RegenerateClientSecretResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.clientSecret !== "") {
writer.uint32(10).string(message.clientSecret);
}
if (message.creationDate !== undefined) {
Timestamp.encode(toTimestamp(message.creationDate), 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 = createBaseRegenerateClientSecretResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.clientSecret = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.creationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
clientSecret: isSet(object.clientSecret) ? globalThis.String(object.clientSecret) : "",
creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.clientSecret !== "") {
obj.clientSecret = message.clientSecret;
}
if (message.creationDate !== undefined) {
obj.creationDate = message.creationDate.toISOString();
}
return obj;
},
create(base) {
return RegenerateClientSecretResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseRegenerateClientSecretResponse();
message.clientSecret = object.clientSecret ?? "";
message.creationDate = object.creationDate ?? undefined;
return message;
},
};
function createBaseListApplicationsRequest() {
return { projectId: "", pagination: undefined, filters: [], sortingColumn: 0 };
}
export const ListApplicationsRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.projectId !== "") {
writer.uint32(10).string(message.projectId);
}
if (message.pagination !== undefined) {
PaginationRequest.encode(message.pagination, writer.uint32(18).fork()).join();
}
for (const v of message.filters) {
ApplicationSearchFilter.encode(v, writer.uint32(26).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(32).int32(message.sortingColumn);
}
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 = createBaseListApplicationsRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.projectId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.pagination = PaginationRequest.decode(reader, reader.uint32());
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.filters.push(ApplicationSearchFilter.decode(reader, reader.uint32()));
continue;
}
case 4: {
if (tag !== 32) {
break;
}
message.sortingColumn = reader.int32();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
pagination: isSet(object.pagination) ? PaginationRequest.fromJSON(object.pagination) : undefined,
filters: globalThis.Array.isArray(object?.filters)
? object.filters.map((e) => ApplicationSearchFilter.fromJSON(e))
: [],
sortingColumn: isSet(object.sortingColumn) ? appSortingFromJSON(object.sortingColumn) : 0,
};
},
toJSON(message) {
const obj = {};
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.pagination !== undefined) {
obj.pagination = PaginationRequest.toJSON(message.pagination);
}
if (message.filters?.length) {
obj.filters = message.filters.map((e) => ApplicationSearchFilter.toJSON(e));
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = appSortingToJSON(message.sortingColumn);
}
return obj;
},
create(base) {
return ListApplicationsRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListApplicationsRequest();
message.projectId = object.projectId ?? "";
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationRequest.fromPartial(object.pagination)
: undefined;
message.filters = object.filters?.map((e) => ApplicationSearchFilter.fromPartial(e)) || [];
message.sortingColumn = object.sortingColumn ?? 0;
return message;
},
};
function createBaseListApplicationsResponse() {
return { applications: [], pagination: undefined };
}
export const ListApplicationsResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.applications) {
Application.encode(v, writer.uint32(10).fork()).join();
}
if (message.pagination !== undefined) {
PaginationResponse.encode(message.pagination, 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 = createBaseListApplicationsResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.applications.push(Application.decode(reader, reader.uint32()));
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.pagination = PaginationResponse.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
applications: globalThis.Array.isArray(object?.applications)
? object.applications.map((e) => Application.fromJSON(e))
: [],
pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.applications?.length) {
obj.applications = message.applications.map((e) => Application.toJSON(e));
}
if (message.pagination !== undefined) {
obj.pagination = PaginationResponse.toJSON(message.pagination);
}
return obj;
},
create(base) {
return ListApplicationsResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListApplicationsResponse();
message.applications = object.applications?.map((e) => Application.fromPartial(e)) || [];
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationResponse.fromPartial(object.pagination)
: undefined;
return message;
},
};
function createBaseCreateApplicationKeyRequest() {
return { appId: "", projectId: "", expirationDate: undefined };
}
export const CreateApplicationKeyRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.appId !== "") {
writer.uint32(10).string(message.appId);
}
if (message.projectId !== "") {
writer.uint32(18).string(message.projectId);
}
if (message.expirationDate !== undefined) {
Timestamp.encode(toTimestamp(message.expirationDate), 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 = createBaseCreateApplicationKeyRequest();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.appId = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.projectId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.expirationDate = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
appId: isSet(object.appId) ? globalThis.String(object.appId) : "",
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
expirationDate: isSet(object.expirationDate) ? fromJsonTimestamp(object.expirationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.appId !== "") {
obj.appId = message.appId;
}
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.expirationDate !== undefined) {
obj.expirationDate = message.expirationDate.toISOString();
}
return obj;
},
create(base) {
return CreateApplicationKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateApplicationKeyRequest();
message.appId = object.appId ?? "";
message.projectId = object.projectId ?? "";
message.expirationDate = object.expirationDate ?? undefined;
return message;
},
};
function createBaseCreateApplicationKeyResponse() {
return { id: "", creationDate: undefined, keyDetails: Buffer.alloc(0) };
}
export const CreateApplicationKeyResponse = {
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.keyDetails.length !== 0) {
writer.uint32(26).bytes(message.keyDetails);
}
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 = createBaseCreateApplicationKeyResponse();
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.keyDetails = Buffer.from(reader.bytes());
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,
keyDetails: isSet(object.keyDetails) ? Buffer.from(bytesFromBase64(object.keyDetails)) : Buffer.alloc(0),
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.creationDate !== undefined) {
obj.creationDate = message.creationDate.toISOString();
}
if (message.keyDetails.length !== 0) {
obj.keyDetails = base64FromBytes(message.keyDetails);
}
return obj;
},
create(base) {
return CreateApplicationKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseCreateApplicationKeyResponse();
message.id = object.id ?? "";
message.creationDate = object.creationDate ?? undefined;
message.keyDetails = object.keyDetails ?? Buffer.alloc(0);
return message;
},
};
function createBaseDeleteApplicationKeyRequest() {
return { id: "", projectId: "", applicationId: "", organizationId: "" };
}
export const DeleteApplicationKeyRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.projectId !== "") {
writer.uint32(18).string(message.projectId);
}
if (message.applicationId !== "") {
writer.uint32(26).string(message.applicationId);
}
if (message.organizationId !== "") {
writer.uint32(34).string(message.organizationId);
}
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 = createBaseDeleteApplicationKeyRequest();
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.projectId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.applicationId = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.organizationId = 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) : "",
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
applicationId: isSet(object.applicationId) ? globalThis.String(object.applicationId) : "",
organizationId: isSet(object.organizationId) ? globalThis.String(object.organizationId) : "",
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.applicationId !== "") {
obj.applicationId = message.applicationId;
}
if (message.organizationId !== "") {
obj.organizationId = message.organizationId;
}
return obj;
},
create(base) {
return DeleteApplicationKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteApplicationKeyRequest();
message.id = object.id ?? "";
message.projectId = object.projectId ?? "";
message.applicationId = object.applicationId ?? "";
message.organizationId = object.organizationId ?? "";
return message;
},
};
function createBaseDeleteApplicationKeyResponse() {
return { deletionDate: undefined };
}
export const DeleteApplicationKeyResponse = {
encode(message, writer = new BinaryWriter()) {
if (message.deletionDate !== undefined) {
Timestamp.encode(toTimestamp(message.deletionDate), 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 = createBaseDeleteApplicationKeyResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
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 DeleteApplicationKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseDeleteApplicationKeyResponse();
message.deletionDate = object.deletionDate ?? undefined;
return message;
},
};
function createBaseGetApplicationKeyRequest() {
return { id: "", projectId: "", applicationId: "", organizationId: "" };
}
export const GetApplicationKeyRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.id !== "") {
writer.uint32(10).string(message.id);
}
if (message.projectId !== "") {
writer.uint32(18).string(message.projectId);
}
if (message.applicationId !== "") {
writer.uint32(26).string(message.applicationId);
}
if (message.organizationId !== "") {
writer.uint32(34).string(message.organizationId);
}
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 = createBaseGetApplicationKeyRequest();
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.projectId = reader.string();
continue;
}
case 3: {
if (tag !== 26) {
break;
}
message.applicationId = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.organizationId = 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) : "",
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : "",
applicationId: isSet(object.applicationId) ? globalThis.String(object.applicationId) : "",
organizationId: isSet(object.organizationId) ? globalThis.String(object.organizationId) : "",
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.projectId !== "") {
obj.projectId = message.projectId;
}
if (message.applicationId !== "") {
obj.applicationId = message.applicationId;
}
if (message.organizationId !== "") {
obj.organizationId = message.organizationId;
}
return obj;
},
create(base) {
return GetApplicationKeyRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetApplicationKeyRequest();
message.id = object.id ?? "";
message.projectId = object.projectId ?? "";
message.applicationId = object.applicationId ?? "";
message.organizationId = object.organizationId ?? "";
return message;
},
};
function createBaseGetApplicationKeyResponse() {
return { id: "", creationDate: undefined, expirationDate: undefined };
}
export const GetApplicationKeyResponse = {
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.expirationDate !== undefined) {
Timestamp.encode(toTimestamp(message.expirationDate), 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 = createBaseGetApplicationKeyResponse();
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.expirationDate = fromTimestamp(Timestamp.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) : "",
creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
expirationDate: isSet(object.expirationDate) ? fromJsonTimestamp(object.expirationDate) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.id !== "") {
obj.id = message.id;
}
if (message.creationDate !== undefined) {
obj.creationDate = message.creationDate.toISOString();
}
if (message.expirationDate !== undefined) {
obj.expirationDate = message.expirationDate.toISOString();
}
return obj;
},
create(base) {
return GetApplicationKeyResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseGetApplicationKeyResponse();
message.id = object.id ?? "";
message.creationDate = object.creationDate ?? undefined;
message.expirationDate = object.expirationDate ?? undefined;
return message;
},
};
function createBaseListApplicationKeysRequest() {
return {
pagination: undefined,
sortingColumn: 0,
applicationId: undefined,
projectId: undefined,
organizationId: undefined,
};
}
export const ListApplicationKeysRequest = {
encode(message, writer = new BinaryWriter()) {
if (message.pagination !== undefined) {
PaginationRequest.encode(message.pagination, writer.uint32(10).fork()).join();
}
if (message.sortingColumn !== 0) {
writer.uint32(16).int32(message.sortingColumn);
}
if (message.applicationId !== undefined) {
writer.uint32(26).string(message.applicationId);
}
if (message.projectId !== undefined) {
writer.uint32(34).string(message.projectId);
}
if (message.organizationId !== undefined) {
writer.uint32(42).string(message.organizationId);
}
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 = createBaseListApplicationKeysRequest();
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.applicationId = reader.string();
continue;
}
case 4: {
if (tag !== 34) {
break;
}
message.projectId = reader.string();
continue;
}
case 5: {
if (tag !== 42) {
break;
}
message.organizationId = reader.string();
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) ? applicationKeysSortingFromJSON(object.sortingColumn) : 0,
applicationId: isSet(object.applicationId) ? globalThis.String(object.applicationId) : undefined,
projectId: isSet(object.projectId) ? globalThis.String(object.projectId) : undefined,
organizationId: isSet(object.organizationId) ? globalThis.String(object.organizationId) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.pagination !== undefined) {
obj.pagination = PaginationRequest.toJSON(message.pagination);
}
if (message.sortingColumn !== 0) {
obj.sortingColumn = applicationKeysSortingToJSON(message.sortingColumn);
}
if (message.applicationId !== undefined) {
obj.applicationId = message.applicationId;
}
if (message.projectId !== undefined) {
obj.projectId = message.projectId;
}
if (message.organizationId !== undefined) {
obj.organizationId = message.organizationId;
}
return obj;
},
create(base) {
return ListApplicationKeysRequest.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListApplicationKeysRequest();
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationRequest.fromPartial(object.pagination)
: undefined;
message.sortingColumn = object.sortingColumn ?? 0;
message.applicationId = object.applicationId ?? undefined;
message.projectId = object.projectId ?? undefined;
message.organizationId = object.organizationId ?? undefined;
return message;
},
};
function createBaseListApplicationKeysResponse() {
return { keys: [], pagination: undefined };
}
export const ListApplicationKeysResponse = {
encode(message, writer = new BinaryWriter()) {
for (const v of message.keys) {
ApplicationKey.encode(v, writer.uint32(10).fork()).join();
}
if (message.pagination !== undefined) {
PaginationResponse.encode(message.pagination, 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 = createBaseListApplicationKeysResponse();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.keys.push(ApplicationKey.decode(reader, reader.uint32()));
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.pagination = PaginationResponse.decode(reader, reader.uint32());
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e) => ApplicationKey.fromJSON(e)) : [],
pagination: isSet(object.pagination) ? PaginationResponse.fromJSON(object.pagination) : undefined,
};
},
toJSON(message) {
const obj = {};
if (message.keys?.length) {
obj.keys = message.keys.map((e) => ApplicationKey.toJSON(e));
}
if (message.pagination !== undefined) {
obj.pagination = PaginationResponse.toJSON(message.pagination);
}
return obj;
},
create(base) {
return ListApplicationKeysResponse.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseListApplicationKeysResponse();
message.keys = object.keys?.map((e) => ApplicationKey.fromPartial(e)) || [];
message.pagination = (object.pagination !== undefined && object.pagination !== null)
? PaginationResponse.fromPartial(object.pagination)
: undefined;
return message;
},
};
export const AppServiceDefinition = {
name: "AppService",
fullName: "zitadel.app.v2beta.AppService",
methods: {
/**
* Create Application
*
* Create an application. The application can be OIDC, API or SAML type, based on the input.
*
* Required permissions:
* - project.app.write
*/
createApplication: {
name: "CreateApplication",
requestType: CreateApplicationRequest,
requestStream: false,
responseType: CreateApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
34,
74,
32,
10,
3,
50,
48,
48,
18,
25,
10,
23,
84,
104,
101,
32,
99,
114,
101,
97,
116,
101,
100,
32,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
25,
58,
1,
42,
34,
20,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
]),
],
},
},
},
/**
* Update Application
*
* Changes the configuration of an OIDC, API or SAML type application, as well as
* the application name, based on the input provided.
*
* Required permissions:
* - project.app.write
*/
updateApplication: {
name: "UpdateApplication",
requestType: UpdateApplicationRequest,
requestStream: false,
responseType: UpdateApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
27,
74,
25,
10,
3,
50,
48,
48,
18,
18,
10,
16,
84,
104,
101,
32,
117,
112,
100,
97,
116,
101,
100,
32,
97,
112,
112,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
30,
58,
1,
42,
50,
25,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
105,
100,
125,
]),
],
},
},
},
/**
* Get Application
*
* Retrieves the application matching the provided ID.
*
* Required permissions:
* - project.app.read
*/
getApplication: {
name: "GetApplication",
requestType: GetApplicationRequest,
requestStream: false,
responseType: GetApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
27,
74,
25,
10,
3,
50,
48,
48,
18,
18,
10,
16,
84,
104,
101,
32,
102,
101,
116,
99,
104,
101,
100,
32,
97,
112,
112,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
27,
18,
25,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
105,
100,
125,
]),
],
},
},
},
/**
* Delete Application
*
* Deletes the application belonging to the input project and matching the provided
* application ID.
*
* Required permissions:
* - project.app.delete
*/
deleteApplication: {
name: "DeleteApplication",
requestType: DeleteApplicationRequest,
requestStream: false,
responseType: DeleteApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
32,
74,
30,
10,
3,
50,
48,
48,
18,
23,
10,
21,
84,
104,
101,
32,
116,
105,
109,
101,
32,
111,
102,
32,
100,
101,
108,
101,
116,
105,
111,
110,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
27,
42,
25,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
105,
100,
125,
]),
],
},
},
},
/**
* Deactivate Application
*
* Deactivates the application belonging to the input project and matching the provided
* application ID.
*
* Required permissions:
* - project.app.write
*/
deactivateApplication: {
name: "DeactivateApplication",
requestType: DeactivateApplicationRequest,
requestStream: false,
responseType: DeactivateApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
36,
74,
34,
10,
3,
50,
48,
48,
18,
27,
10,
25,
84,
104,
101,
32,
116,
105,
109,
101,
32,
111,
102,
32,
100,
101,
97,
99,
116,
105,
118,
97,
116,
105,
111,
110,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
105,
100,
125,
47,
100,
101,
97,
99,
116,
105,
118,
97,
116,
101,
]),
],
},
},
},
/**
* Reactivate Application
*
* Reactivates the application belonging to the input project and matching the provided
* application ID.
*
* Required permissions:
* - project.app.write
*/
reactivateApplication: {
name: "ReactivateApplication",
requestType: ReactivateApplicationRequest,
requestStream: false,
responseType: ReactivateApplicationResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
36,
74,
34,
10,
3,
50,
48,
48,
18,
27,
10,
25,
84,
104,
101,
32,
116,
105,
109,
101,
32,
111,
102,
32,
114,
101,
97,
99,
116,
105,
118,
97,
116,
105,
111,
110,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
41,
58,
1,
42,
34,
36,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
105,
100,
125,
47,
114,
101,
97,
99,
116,
105,
118,
97,
116,
101,
]),
],
},
},
},
/**
* Regenerate Client Secret
*
* Regenerates the client secret of an API or OIDC application that belongs to the input project.
*
* Required permissions:
* - project.app.write
*/
regenerateClientSecret: {
name: "RegenerateClientSecret",
requestType: RegenerateClientSecretRequest,
requestStream: false,
responseType: RegenerateClientSecretResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
41,
74,
39,
10,
3,
50,
48,
48,
18,
32,
10,
30,
84,
104,
101,
32,
114,
101,
103,
101,
110,
101,
114,
97,
116,
101,
100,
32,
99,
108,
105,
101,
110,
116,
32,
115,
101,
99,
114,
101,
116,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
65,
58,
1,
42,
34,
60,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
123,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
95,
105,
100,
125,
47,
103,
101,
110,
101,
114,
97,
116,
101,
95,
99,
108,
105,
101,
110,
116,
95,
115,
101,
99,
114,
101,
116,
]),
],
},
},
},
/**
* List Applications
*
* Returns a list of applications matching the input parameters that belong to the provided
* project.
*
* The result can be sorted by app id, name, creation date, change date or state. It can also
* be filtered by app state, app type and app name.
*
* Required permissions:
* - project.app.read
*/
listApplications: {
name: "ListApplications",
requestType: ListApplicationsRequest,
requestStream: false,
responseType: ListApplicationsResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
36,
74,
34,
10,
3,
50,
48,
48,
18,
27,
10,
25,
84,
104,
101,
32,
109,
97,
116,
99,
104,
105,
110,
103,
32,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
32,
58,
1,
42,
34,
27,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
47,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
/**
* Create Application Key
*
* Create a new application key, which is used to authorize an API application.
*
* Key details are returned in the response. They must be stored safely, as it will not
* be possible to retrieve them again.
*
* Required permissions:
* - `project.app.write`
*/
createApplicationKey: {
name: "CreateApplicationKey",
requestType: CreateApplicationKeyRequest,
requestStream: false,
responseType: CreateApplicationKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
38,
74,
36,
10,
3,
50,
48,
48,
18,
29,
10,
27,
84,
104,
101,
32,
99,
114,
101,
97,
116,
101,
100,
32,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
32,
107,
101,
121,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
29,
58,
1,
42,
34,
24,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
95,
107,
101,
121,
115,
]),
],
},
},
},
/**
* Delete Application Key
*
* Deletes an application key matching the provided ID.
*
* Organization ID is not mandatory, but helps with filtering/performance.
*
* The deletion time is returned in response message.
*
* Required permissions:
* - `project.app.write`
*/
deleteApplicationKey: {
name: "DeleteApplicationKey",
requestType: DeleteApplicationKeyRequest,
requestStream: false,
responseType: DeleteApplicationKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
32,
74,
30,
10,
3,
50,
48,
48,
18,
23,
10,
21,
84,
104,
101,
32,
116,
105,
109,
101,
32,
111,
102,
32,
100,
101,
108,
101,
116,
105,
111,
110,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
31,
42,
29,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
95,
107,
101,
121,
115,
47,
123,
105,
100,
125,
]),
],
},
},
},
/**
* Get Application Key
*
* Retrieves the application key matching the provided ID.
*
* Specifying a project, organization and app ID is optional but help with filtering/performance.
*
* Required permissions:
* - project.app.read
*/
getApplicationKey: {
name: "GetApplicationKey",
requestType: GetApplicationKeyRequest,
requestStream: false,
responseType: GetApplicationKeyResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
31,
74,
29,
10,
3,
50,
48,
48,
18,
22,
10,
20,
84,
104,
101,
32,
102,
101,
116,
99,
104,
101,
100,
32,
97,
112,
112,
32,
107,
101,
121,
46,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
31,
18,
29,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
95,
107,
101,
121,
115,
47,
123,
105,
100,
125,
]),
],
},
},
},
/**
* List Application Keys
*
* Returns a list of application keys matching the input parameters.
*
* The result can be sorted by id, aggregate, creation date, expiration date, resource owner or type.
* It can also be filtered by app, project or organization ID.
*
* Required permissions:
* - project.app.read
*/
listApplicationKeys: {
name: "ListApplicationKeys",
requestType: ListApplicationKeysRequest,
requestStream: false,
responseType: ListApplicationKeysResponse,
responseStream: false,
options: {
_unknownFields: {
8338: [
Buffer.from([
36,
74,
34,
10,
3,
50,
48,
48,
18,
27,
10,
25,
84,
104,
101,
32,
109,
97,
116,
99,
104,
105,
110,
103,
32,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
115,
]),
],
400010: [Buffer.from([17, 10, 15, 10, 13, 97, 117, 116, 104, 101, 110, 116, 105, 99, 97, 116, 101, 100])],
578365826: [
Buffer.from([
36,
58,
1,
42,
34,
31,
47,
118,
50,
98,
101,
116,
97,
47,
97,
112,
112,
108,
105,
99,
97,
116,
105,
111,
110,
95,
107,
101,
121,
115,
47,
115,
101,
97,
114,
99,
104,
]),
],
},
},
},
},
};
function bytesFromBase64(b64) {
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
}
function base64FromBytes(arr) {
return globalThis.Buffer.from(arr).toString("base64");
}
function toTimestamp(date) {
const seconds = numberToLong(Math.trunc(date.getTime() / 1_000));
const nanos = (date.getTime() % 1_000) * 1_000_000;
return { seconds, nanos };
}
function fromTimestamp(t) {
let millis = (t.seconds.toNumber() || 0) * 1_000;
millis += (t.nanos || 0) / 1_000_000;
return new globalThis.Date(millis);
}
function fromJsonTimestamp(o) {
if (o instanceof globalThis.Date) {
return o;
}
else if (typeof o === "string") {
return new globalThis.Date(o);
}
else {
return fromTimestamp(Timestamp.fromJSON(o));
}
}
function numberToLong(number) {
return Long.fromNumber(number);
}
function isSet(value) {
return value !== null && value !== undefined;
}