You've already forked npm-core-sdk
1218 lines
66 KiB
TypeScript
1218 lines
66 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "attachmentV2.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
import { WireType } from "@protobuf-ts/runtime";
|
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
import { ResponseHeader } from "./shared";
|
|
import { EntityType } from "./shared";
|
|
import { RequestProjectHeader } from "./shared";
|
|
import { FileDataRequest } from "./shared";
|
|
import { FileDataResponse } from "./shared";
|
|
import { AttachmentTypeResponseHeader } from "./shared";
|
|
import { RequestAttachmentTypeHeader } from "./shared";
|
|
import { ResourceType } from "./shared";
|
|
import { AttachmentType } from "./shared";
|
|
// ========== MODEL MESSAGES ==========
|
|
|
|
/**
|
|
* @generated from protobuf message api.Attachment
|
|
*/
|
|
export interface Attachment {
|
|
/**
|
|
* string ProjectID = 1
|
|
* [
|
|
* (validate.rules).string.min_len = 1
|
|
* ];
|
|
*
|
|
* @generated from protobuf field: string Name = 2
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.AttachmentType AttachmentType = 4
|
|
*/
|
|
AttachmentType?: AttachmentType;
|
|
/**
|
|
* @generated from protobuf field: string URI = 5
|
|
*/
|
|
URI: string;
|
|
/**
|
|
* @generated from protobuf field: string MIMEType = 6
|
|
*/
|
|
MIMEType: string;
|
|
/**
|
|
* @generated from protobuf field: string UploadedAt = 11
|
|
*/
|
|
UploadedAt: string;
|
|
/**
|
|
* @generated from protobuf field: api.AttachmentKind Kind = 12
|
|
*/
|
|
Kind: AttachmentKind;
|
|
/**
|
|
* @generated from protobuf field: string WebURI = 13
|
|
*/
|
|
WebURI: string;
|
|
/**
|
|
* @generated from protobuf field: api.ResourceType ResourceType = 14
|
|
*/
|
|
ResourceType: ResourceType;
|
|
/**
|
|
* @generated from protobuf field: string ResourceID = 15
|
|
*/
|
|
ResourceID: string;
|
|
}
|
|
// ========== REQUESTS & RESPONSE MESSAGES ==========
|
|
|
|
/**
|
|
* Download
|
|
*
|
|
* @generated from protobuf message api.DownloadAttachmentV2Request
|
|
*/
|
|
export interface DownloadAttachmentV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestAttachmentTypeHeader Header = 1
|
|
*/
|
|
Header?: RequestAttachmentTypeHeader;
|
|
/**
|
|
* @generated from protobuf field: string Name = 2
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DownloadAttachmentV2Response
|
|
*/
|
|
export interface DownloadAttachmentV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.AttachmentTypeResponseHeader Header = 2
|
|
*/
|
|
Header?: AttachmentTypeResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: api.FileDataResponse File = 1
|
|
*/
|
|
File?: FileDataResponse;
|
|
}
|
|
/**
|
|
* Upload
|
|
*
|
|
* @generated from protobuf message api.UploadAttachmentV2Request
|
|
*/
|
|
export interface UploadAttachmentV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestAttachmentTypeHeader Header = 1
|
|
*/
|
|
Header?: RequestAttachmentTypeHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.FileDataRequest Attachment = 4
|
|
*/
|
|
Attachment?: FileDataRequest;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.UploadAttachmentV2Response
|
|
*/
|
|
export interface UploadAttachmentV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.AttachmentTypeResponseHeader Header = 2
|
|
*/
|
|
Header?: AttachmentTypeResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: api.Attachment Attachment = 1
|
|
*/
|
|
Attachment?: Attachment;
|
|
}
|
|
/**
|
|
* AddLink
|
|
*
|
|
* @generated from protobuf message api.AddLinkV2Request
|
|
*/
|
|
export interface AddLinkV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestAttachmentTypeHeader Header = 1
|
|
*/
|
|
Header?: RequestAttachmentTypeHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: string Name = 4
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string URI = 5
|
|
*/
|
|
URI: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.AddLinkV2Response
|
|
*/
|
|
export interface AddLinkV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.AttachmentTypeResponseHeader Header = 2
|
|
*/
|
|
Header?: AttachmentTypeResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: api.Attachment Attachment = 1
|
|
*/
|
|
Attachment?: Attachment;
|
|
}
|
|
/**
|
|
* Delete
|
|
*
|
|
* @generated from protobuf message api.DeleteAttachmentV2Request
|
|
*/
|
|
export interface DeleteAttachmentV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestAttachmentTypeHeader Header = 1
|
|
*/
|
|
Header?: RequestAttachmentTypeHeader;
|
|
/**
|
|
* @generated from protobuf field: string Name = 2
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteAttachmentV2Response
|
|
*/
|
|
export interface DeleteAttachmentV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.AttachmentTypeResponseHeader Header = 1
|
|
*/
|
|
Header?: AttachmentTypeResponseHeader;
|
|
}
|
|
/**
|
|
* List
|
|
*
|
|
* @generated from protobuf message api.ListAttachmentsV2Request
|
|
*/
|
|
export interface ListAttachmentsV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
/**
|
|
* @generated from protobuf field: api.EntityType EntityType = 4
|
|
*/
|
|
EntityType: EntityType;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ListAttachmentsV2Response
|
|
*/
|
|
export interface ListAttachmentsV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.ResponseHeader Header = 2
|
|
*/
|
|
Header?: ResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: repeated api.Attachment Attachments = 1
|
|
*/
|
|
Attachments: Attachment[];
|
|
}
|
|
/**
|
|
* Share
|
|
*
|
|
* @generated from protobuf message api.ShareAttachmentV2Request
|
|
*/
|
|
export interface ShareAttachmentV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestAttachmentTypeHeader Header = 1
|
|
*/
|
|
Header?: RequestAttachmentTypeHeader;
|
|
/**
|
|
* @generated from protobuf field: string Name = 2
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string EntityRefID = 3
|
|
*/
|
|
EntityRefID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ShareAttachmentV2Response
|
|
*/
|
|
export interface ShareAttachmentV2Response {
|
|
/**
|
|
* Header of the response
|
|
*
|
|
* @generated from protobuf field: api.AttachmentTypeResponseHeader Header = 2
|
|
*/
|
|
Header?: AttachmentTypeResponseHeader;
|
|
/**
|
|
* @generated from protobuf field: string ShareLink = 1
|
|
*/
|
|
ShareLink: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteAllAttachmentsV2Request
|
|
*/
|
|
export interface DeleteAllAttachmentsV2Request {
|
|
/**
|
|
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
|
*/
|
|
Header?: RequestProjectHeader;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteAllAttachmentsV2Response
|
|
*/
|
|
export interface DeleteAllAttachmentsV2Response {
|
|
}
|
|
/**
|
|
* @generated from protobuf enum api.AttachmentKind
|
|
*/
|
|
export enum AttachmentKind {
|
|
/**
|
|
* @generated from protobuf enum value: ATTACHMENT_KIND_UNKNOWN = 0;
|
|
*/
|
|
ATTACHMENT_KIND_UNKNOWN = 0,
|
|
/**
|
|
* @generated from protobuf enum value: ATTACHMENT_KIND_FILE = 1;
|
|
*/
|
|
ATTACHMENT_KIND_FILE = 1,
|
|
/**
|
|
* @generated from protobuf enum value: ATTACHMENT_KIND_LINK = 2;
|
|
*/
|
|
ATTACHMENT_KIND_LINK = 2
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Attachment$Type extends MessageType<Attachment> {
|
|
constructor() {
|
|
super("api.Attachment", [
|
|
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "AttachmentType", kind: "message", localName: "AttachmentType", jsonName: "AttachmentType", T: () => AttachmentType, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 5, name: "URI", kind: "scalar", localName: "URI", jsonName: "URI", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "URI of the attachment through which it can be downloaded (must be authenticated with a bearer token). In case the Attachment is a link, the URI is the link itself." } } },
|
|
{ no: 6, name: "MIMEType", kind: "scalar", localName: "MIMEType", jsonName: "MIMEType", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 11, name: "UploadedAt", kind: "scalar", localName: "UploadedAt", jsonName: "UploadedAt", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { dateIso8601: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "UTC date/time in <a href='https://en.wikipedia.org/wiki/ISO_8601'>ISO 8601</a> format" } } },
|
|
{ no: 12, name: "Kind", kind: "enum", localName: "Kind", jsonName: "Kind", T: () => ["api.AttachmentKind", AttachmentKind], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Kind of the attachment (file or link)" } } },
|
|
{ no: 13, name: "WebURI", kind: "scalar", localName: "WebURI", jsonName: "WebURI", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "URI of the attachment through which it can be accessed on an authenticated web app. In case the Attachment is a link, the URI is empty." } } },
|
|
{ no: 14, name: "ResourceType", kind: "enum", localName: "ResourceType", jsonName: "ResourceType", T: () => ["api.ResourceType", ResourceType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
{ no: 15, name: "ResourceID", kind: "scalar", localName: "ResourceID", jsonName: "ResourceID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Attachment>): Attachment {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.EntityRefID = "";
|
|
message.URI = "";
|
|
message.MIMEType = "";
|
|
message.UploadedAt = "";
|
|
message.Kind = 0;
|
|
message.WebURI = "";
|
|
message.ResourceType = 0;
|
|
message.ResourceID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Attachment>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Attachment): Attachment {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Name */ 2:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.AttachmentType AttachmentType */ 4:
|
|
message.AttachmentType = AttachmentType.internalBinaryRead(reader, reader.uint32(), options, message.AttachmentType);
|
|
break;
|
|
case /* string URI */ 5:
|
|
message.URI = reader.string();
|
|
break;
|
|
case /* string MIMEType */ 6:
|
|
message.MIMEType = reader.string();
|
|
break;
|
|
case /* string UploadedAt */ 11:
|
|
message.UploadedAt = reader.string();
|
|
break;
|
|
case /* api.AttachmentKind Kind */ 12:
|
|
message.Kind = reader.int32();
|
|
break;
|
|
case /* string WebURI */ 13:
|
|
message.WebURI = reader.string();
|
|
break;
|
|
case /* api.ResourceType ResourceType */ 14:
|
|
message.ResourceType = reader.int32();
|
|
break;
|
|
case /* string ResourceID */ 15:
|
|
message.ResourceID = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: Attachment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Name = 2; */
|
|
if (message.Name !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Name);
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.AttachmentType AttachmentType = 4; */
|
|
if (message.AttachmentType)
|
|
AttachmentType.internalBinaryWrite(message.AttachmentType, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* string URI = 5; */
|
|
if (message.URI !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.URI);
|
|
/* string MIMEType = 6; */
|
|
if (message.MIMEType !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.MIMEType);
|
|
/* string UploadedAt = 11; */
|
|
if (message.UploadedAt !== "")
|
|
writer.tag(11, WireType.LengthDelimited).string(message.UploadedAt);
|
|
/* api.AttachmentKind Kind = 12; */
|
|
if (message.Kind !== 0)
|
|
writer.tag(12, WireType.Varint).int32(message.Kind);
|
|
/* string WebURI = 13; */
|
|
if (message.WebURI !== "")
|
|
writer.tag(13, WireType.LengthDelimited).string(message.WebURI);
|
|
/* api.ResourceType ResourceType = 14; */
|
|
if (message.ResourceType !== 0)
|
|
writer.tag(14, WireType.Varint).int32(message.ResourceType);
|
|
/* string ResourceID = 15; */
|
|
if (message.ResourceID !== "")
|
|
writer.tag(15, WireType.LengthDelimited).string(message.ResourceID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.Attachment
|
|
*/
|
|
export const Attachment = new Attachment$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DownloadAttachmentV2Request$Type extends MessageType<DownloadAttachmentV2Request> {
|
|
constructor() {
|
|
super("api.DownloadAttachmentV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestAttachmentTypeHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the attachment to download" } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the entity where the attachment is located" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Name", "EntityRefID"] } } });
|
|
}
|
|
create(value?: PartialMessage<DownloadAttachmentV2Request>): DownloadAttachmentV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.EntityRefID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DownloadAttachmentV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAttachmentV2Request): DownloadAttachmentV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestAttachmentTypeHeader Header */ 1:
|
|
message.Header = RequestAttachmentTypeHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string Name */ 2:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DownloadAttachmentV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestAttachmentTypeHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestAttachmentTypeHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Name = 2; */
|
|
if (message.Name !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Name);
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DownloadAttachmentV2Request
|
|
*/
|
|
export const DownloadAttachmentV2Request = new DownloadAttachmentV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DownloadAttachmentV2Response$Type extends MessageType<DownloadAttachmentV2Response> {
|
|
constructor() {
|
|
super("api.DownloadAttachmentV2Response", [
|
|
{ no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => AttachmentTypeResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
|
|
{ no: 1, name: "File", kind: "message", localName: "File", jsonName: "File", T: () => FileDataResponse, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<DownloadAttachmentV2Response>): DownloadAttachmentV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DownloadAttachmentV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DownloadAttachmentV2Response): DownloadAttachmentV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AttachmentTypeResponseHeader Header */ 2:
|
|
message.Header = AttachmentTypeResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.FileDataResponse File */ 1:
|
|
message.File = FileDataResponse.internalBinaryRead(reader, reader.uint32(), options, message.File);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DownloadAttachmentV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.FileDataResponse File = 1; */
|
|
if (message.File)
|
|
FileDataResponse.internalBinaryWrite(message.File, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AttachmentTypeResponseHeader Header = 2; */
|
|
if (message.Header)
|
|
AttachmentTypeResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DownloadAttachmentV2Response
|
|
*/
|
|
export const DownloadAttachmentV2Response = new DownloadAttachmentV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UploadAttachmentV2Request$Type extends MessageType<UploadAttachmentV2Request> {
|
|
constructor() {
|
|
super("api.UploadAttachmentV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestAttachmentTypeHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the entity where the attachment is located" } } },
|
|
{ no: 4, name: "Attachment", kind: "message", localName: "Attachment", jsonName: "Attachment", T: () => FileDataRequest, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AttachmentTypeID", "EntityRefID", "Attachment"] } } });
|
|
}
|
|
create(value?: PartialMessage<UploadAttachmentV2Request>): UploadAttachmentV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UploadAttachmentV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadAttachmentV2Request): UploadAttachmentV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestAttachmentTypeHeader Header */ 1:
|
|
message.Header = RequestAttachmentTypeHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.FileDataRequest Attachment */ 4:
|
|
message.Attachment = FileDataRequest.internalBinaryRead(reader, reader.uint32(), options, message.Attachment);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: UploadAttachmentV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestAttachmentTypeHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestAttachmentTypeHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.FileDataRequest Attachment = 4; */
|
|
if (message.Attachment)
|
|
FileDataRequest.internalBinaryWrite(message.Attachment, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.UploadAttachmentV2Request
|
|
*/
|
|
export const UploadAttachmentV2Request = new UploadAttachmentV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UploadAttachmentV2Response$Type extends MessageType<UploadAttachmentV2Response> {
|
|
constructor() {
|
|
super("api.UploadAttachmentV2Response", [
|
|
{ no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => AttachmentTypeResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
|
|
{ no: 1, name: "Attachment", kind: "message", localName: "Attachment", jsonName: "Attachment", T: () => Attachment, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<UploadAttachmentV2Response>): UploadAttachmentV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UploadAttachmentV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UploadAttachmentV2Response): UploadAttachmentV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AttachmentTypeResponseHeader Header */ 2:
|
|
message.Header = AttachmentTypeResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.Attachment Attachment */ 1:
|
|
message.Attachment = Attachment.internalBinaryRead(reader, reader.uint32(), options, message.Attachment);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: UploadAttachmentV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Attachment Attachment = 1; */
|
|
if (message.Attachment)
|
|
Attachment.internalBinaryWrite(message.Attachment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AttachmentTypeResponseHeader Header = 2; */
|
|
if (message.Header)
|
|
AttachmentTypeResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.UploadAttachmentV2Response
|
|
*/
|
|
export const UploadAttachmentV2Response = new UploadAttachmentV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AddLinkV2Request$Type extends MessageType<AddLinkV2Request> {
|
|
constructor() {
|
|
super("api.AddLinkV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestAttachmentTypeHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the entity where the attachment is located" } } },
|
|
{ no: 4, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the link to add to the entity" } } },
|
|
{ no: 5, name: "URI", kind: "scalar", localName: "URI", jsonName: "URI", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "URI to add to the entity" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AttachmentTypeID", "EntityRefID", "Name", "URI"] } } });
|
|
}
|
|
create(value?: PartialMessage<AddLinkV2Request>): AddLinkV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
message.Name = "";
|
|
message.URI = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AddLinkV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddLinkV2Request): AddLinkV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestAttachmentTypeHeader Header */ 1:
|
|
message.Header = RequestAttachmentTypeHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* string Name */ 4:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string URI */ 5:
|
|
message.URI = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: AddLinkV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestAttachmentTypeHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestAttachmentTypeHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* string Name = 4; */
|
|
if (message.Name !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.Name);
|
|
/* string URI = 5; */
|
|
if (message.URI !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.URI);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AddLinkV2Request
|
|
*/
|
|
export const AddLinkV2Request = new AddLinkV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AddLinkV2Response$Type extends MessageType<AddLinkV2Response> {
|
|
constructor() {
|
|
super("api.AddLinkV2Response", [
|
|
{ no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => AttachmentTypeResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
|
|
{ no: 1, name: "Attachment", kind: "message", localName: "Attachment", jsonName: "Attachment", T: () => Attachment, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<AddLinkV2Response>): AddLinkV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AddLinkV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AddLinkV2Response): AddLinkV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AttachmentTypeResponseHeader Header */ 2:
|
|
message.Header = AttachmentTypeResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.Attachment Attachment */ 1:
|
|
message.Attachment = Attachment.internalBinaryRead(reader, reader.uint32(), options, message.Attachment);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: AddLinkV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Attachment Attachment = 1; */
|
|
if (message.Attachment)
|
|
Attachment.internalBinaryWrite(message.Attachment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AttachmentTypeResponseHeader Header = 2; */
|
|
if (message.Header)
|
|
AttachmentTypeResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AddLinkV2Response
|
|
*/
|
|
export const AddLinkV2Response = new AddLinkV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAttachmentV2Request$Type extends MessageType<DeleteAttachmentV2Request> {
|
|
constructor() {
|
|
super("api.DeleteAttachmentV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestAttachmentTypeHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the attachment to download" } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the entity where the attachment is located" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Name", "EntityRefID", "AttachmentTypeID"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteAttachmentV2Request>): DeleteAttachmentV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.EntityRefID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAttachmentV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAttachmentV2Request): DeleteAttachmentV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestAttachmentTypeHeader Header */ 1:
|
|
message.Header = RequestAttachmentTypeHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string Name */ 2:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DeleteAttachmentV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestAttachmentTypeHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestAttachmentTypeHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Name = 2; */
|
|
if (message.Name !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Name);
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteAttachmentV2Request
|
|
*/
|
|
export const DeleteAttachmentV2Request = new DeleteAttachmentV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAttachmentV2Response$Type extends MessageType<DeleteAttachmentV2Response> {
|
|
constructor() {
|
|
super("api.DeleteAttachmentV2Response", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => AttachmentTypeResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<DeleteAttachmentV2Response>): DeleteAttachmentV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAttachmentV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAttachmentV2Response): DeleteAttachmentV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AttachmentTypeResponseHeader Header */ 1:
|
|
message.Header = AttachmentTypeResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DeleteAttachmentV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.AttachmentTypeResponseHeader Header = 1; */
|
|
if (message.Header)
|
|
AttachmentTypeResponseHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteAttachmentV2Response
|
|
*/
|
|
export const DeleteAttachmentV2Response = new DeleteAttachmentV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListAttachmentsV2Request$Type extends MessageType<ListAttachmentsV2Request> {
|
|
constructor() {
|
|
super("api.ListAttachmentsV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Identifier of the entity where the attachment is located" } } },
|
|
{ no: 4, name: "EntityType", kind: "enum", localName: "EntityType", jsonName: "EntityType", T: () => ["api.EntityType", EntityType], options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional : Type of the entity where the attachment is located" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<ListAttachmentsV2Request>): ListAttachmentsV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.EntityRefID = "";
|
|
message.EntityType = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListAttachmentsV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAttachmentsV2Request): ListAttachmentsV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
case /* api.EntityType EntityType */ 4:
|
|
message.EntityType = reader.int32();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: ListAttachmentsV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
/* api.EntityType EntityType = 4; */
|
|
if (message.EntityType !== 0)
|
|
writer.tag(4, WireType.Varint).int32(message.EntityType);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ListAttachmentsV2Request
|
|
*/
|
|
export const ListAttachmentsV2Request = new ListAttachmentsV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListAttachmentsV2Response$Type extends MessageType<ListAttachmentsV2Response> {
|
|
constructor() {
|
|
super("api.ListAttachmentsV2Response", [
|
|
{ no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => ResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
|
|
{ no: 1, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => Attachment, options: { "validate.rules": { repeated: { minItems: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "List of attachments matching to the request" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ListAttachmentsV2Response>): ListAttachmentsV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Attachments = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListAttachmentsV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListAttachmentsV2Response): ListAttachmentsV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.ResponseHeader Header */ 2:
|
|
message.Header = ResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* repeated api.Attachment Attachments */ 1:
|
|
message.Attachments.push(Attachment.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: ListAttachmentsV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.Attachment Attachments = 1; */
|
|
for (let i = 0; i < message.Attachments.length; i++)
|
|
Attachment.internalBinaryWrite(message.Attachments[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ResponseHeader Header = 2; */
|
|
if (message.Header)
|
|
ResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ListAttachmentsV2Response
|
|
*/
|
|
export const ListAttachmentsV2Response = new ListAttachmentsV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ShareAttachmentV2Request$Type extends MessageType<ShareAttachmentV2Request> {
|
|
constructor() {
|
|
super("api.ShareAttachmentV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestAttachmentTypeHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Name of the attachment to download" } } },
|
|
{ no: 3, name: "EntityRefID", kind: "scalar", localName: "EntityRefID", jsonName: "EntityRefID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the entity where the attachment is located" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Name", "EntityRefID", "AttachmentTypeID"] } } });
|
|
}
|
|
create(value?: PartialMessage<ShareAttachmentV2Request>): ShareAttachmentV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Name = "";
|
|
message.EntityRefID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ShareAttachmentV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShareAttachmentV2Request): ShareAttachmentV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestAttachmentTypeHeader Header */ 1:
|
|
message.Header = RequestAttachmentTypeHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string Name */ 2:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string EntityRefID */ 3:
|
|
message.EntityRefID = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: ShareAttachmentV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestAttachmentTypeHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestAttachmentTypeHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Name = 2; */
|
|
if (message.Name !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Name);
|
|
/* string EntityRefID = 3; */
|
|
if (message.EntityRefID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.EntityRefID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ShareAttachmentV2Request
|
|
*/
|
|
export const ShareAttachmentV2Request = new ShareAttachmentV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ShareAttachmentV2Response$Type extends MessageType<ShareAttachmentV2Response> {
|
|
constructor() {
|
|
super("api.ShareAttachmentV2Response", [
|
|
{ no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => AttachmentTypeResponseHeader, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Header of the response" } } },
|
|
{ no: 1, name: "ShareLink", kind: "scalar", localName: "ShareLink", jsonName: "ShareLink", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Link to access to the attchment if the sharing policy allows to" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ShareAttachmentV2Response>): ShareAttachmentV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.ShareLink = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ShareAttachmentV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ShareAttachmentV2Response): ShareAttachmentV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AttachmentTypeResponseHeader Header */ 2:
|
|
message.Header = AttachmentTypeResponseHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* string ShareLink */ 1:
|
|
message.ShareLink = reader.string();
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: ShareAttachmentV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ShareLink = 1; */
|
|
if (message.ShareLink !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.ShareLink);
|
|
/* api.AttachmentTypeResponseHeader Header = 2; */
|
|
if (message.Header)
|
|
AttachmentTypeResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.ShareAttachmentV2Response
|
|
*/
|
|
export const ShareAttachmentV2Response = new ShareAttachmentV2Response$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAllAttachmentsV2Request$Type extends MessageType<DeleteAllAttachmentsV2Request> {
|
|
constructor() {
|
|
super("api.DeleteAllAttachmentsV2Request", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteAllAttachmentsV2Request>): DeleteAllAttachmentsV2Request {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAllAttachmentsV2Request>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllAttachmentsV2Request): DeleteAllAttachmentsV2Request {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestProjectHeader Header */ 1:
|
|
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DeleteAllAttachmentsV2Request, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestProjectHeader Header = 1; */
|
|
if (message.Header)
|
|
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteAllAttachmentsV2Request
|
|
*/
|
|
export const DeleteAllAttachmentsV2Request = new DeleteAllAttachmentsV2Request$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteAllAttachmentsV2Response$Type extends MessageType<DeleteAllAttachmentsV2Response> {
|
|
constructor() {
|
|
super("api.DeleteAllAttachmentsV2Response", []);
|
|
}
|
|
create(value?: PartialMessage<DeleteAllAttachmentsV2Response>): DeleteAllAttachmentsV2Response {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteAllAttachmentsV2Response>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteAllAttachmentsV2Response): DeleteAllAttachmentsV2Response {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
default:
|
|
let u = options.readUnknownField;
|
|
if (u === "throw")
|
|
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
let d = reader.skip(wireType);
|
|
if (u !== false)
|
|
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
}
|
|
}
|
|
return message;
|
|
}
|
|
internalBinaryWrite(message: DeleteAllAttachmentsV2Response, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteAllAttachmentsV2Response
|
|
*/
|
|
export const DeleteAllAttachmentsV2Response = new DeleteAllAttachmentsV2Response$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.AttachmentServiceV2
|
|
*/
|
|
export const AttachmentServiceV2 = new ServiceType("api.AttachmentServiceV2", [
|
|
{ name: "Upload", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Upload a document attached to an entity. <br>Must be called using a multipart form-data content type request. <br>Example of curl request : curl -H \"Authorization: $TOKEN\" -F \"Attachment=@path/to/my/file/to/upload\" -F \"EntityRefID=myentityrefid\" -F \"AttachmentTypeID=myattachmenttypeid\" https://$REFLEXPLATFORM_REST_URL/api.AttachmentServiceV2/Upload" }, "api.rscType": "AttachmentType", "api.roles": "AttachmentType.Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: UploadAttachmentV2Request, O: UploadAttachmentV2Response },
|
|
{ name: "AddLink", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Add a link to an entity." }, "api.rscType": "AttachmentType", "api.roles": "AttachmentType.Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: AddLinkV2Request, O: AddLinkV2Response },
|
|
{ name: "Download", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Download a document attached to an entity", consumes: ["application/json"] }, "api.rscType": "AttachmentType", "api.roles": "AttachmentType.Reader", "google.api.method_visibility": { restriction: "SDK" } }, I: DownloadAttachmentV2Request, O: DownloadAttachmentV2Response },
|
|
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Delete a document attached to an entity" }, "api.rscType": "AttachmentType", "api.roles": "AttachmentType.Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteAttachmentV2Request, O: DeleteAttachmentV2Response },
|
|
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "List all documents attached to an entity" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ListAttachmentsV2Request, O: ListAttachmentsV2Response },
|
|
{ name: "Share", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Share a document attached to an entity" }, "api.rscType": "AttachmentType", "api.roles": "AttachmentType.Writer", "google.api.method_visibility": { restriction: "SDK" } }, I: ShareAttachmentV2Request, O: ShareAttachmentV2Response },
|
|
{ name: "DeleteAll", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Attachment"], description: "Delete all documents attached to entities within the project" }, "api.rscType": "Project", "api.roles": "Platform.Project-Deletion", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteAllAttachmentsV2Request, O: DeleteAllAttachmentsV2Response }
|
|
], { "api.k8sService": "attachment-server" });
|