You've already forked npm-core-sdk
Latest generation
This commit is contained in:
895
tiny-url.ts
895
tiny-url.ts
@@ -15,7 +15,6 @@ import { FileDataResponse } from "./shared";
|
||||
import { FileDataRequest } from "./shared";
|
||||
import { RequestPartnerAppHeader } from "./shared";
|
||||
import { RequestProjectHeader } from "./shared";
|
||||
import { RequestSiteHeader } from "./shared";
|
||||
import { RequestOrganisationHeader } from "./shared";
|
||||
import { ResourceType } from "./shared";
|
||||
/**
|
||||
@@ -124,44 +123,6 @@ export interface OrganisationShortenURLResponse {
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteShortenURLRequest
|
||||
*/
|
||||
export interface SiteShortenURLRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string URL = 2
|
||||
*/
|
||||
URL: string;
|
||||
/**
|
||||
* @generated from protobuf field: int64 TimeToLive = 3
|
||||
*/
|
||||
TimeToLive: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsPublic = 4
|
||||
*/
|
||||
IsPublic: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsOnce = 5
|
||||
*/
|
||||
IsOnce: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: string Alias = 6
|
||||
*/
|
||||
Alias: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteShortenURLResponse
|
||||
*/
|
||||
export interface SiteShortenURLResponse {
|
||||
/**
|
||||
* @generated from protobuf field: api.TinyURL TinyURL = 1
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectShortenURLRequest
|
||||
*/
|
||||
@@ -276,44 +237,6 @@ export interface OrganisationUploadFileResponse {
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteUploadFileRequest
|
||||
*/
|
||||
export interface SiteUploadFileRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: api.FileDataRequest File = 2
|
||||
*/
|
||||
File?: FileDataRequest;
|
||||
/**
|
||||
* @generated from protobuf field: int64 TimeToLive = 3
|
||||
*/
|
||||
TimeToLive: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsPublic = 4
|
||||
*/
|
||||
IsPublic: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsOnce = 5
|
||||
*/
|
||||
IsOnce: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: string Alias = 6
|
||||
*/
|
||||
Alias: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteUploadFileResponse
|
||||
*/
|
||||
export interface SiteUploadFileResponse {
|
||||
/**
|
||||
* @generated from protobuf field: api.TinyURL TinyURL = 1
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectUploadFileRequest
|
||||
*/
|
||||
@@ -428,44 +351,6 @@ export interface OrganisationUploadPayloadResponse {
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteUploadPayloadRequest
|
||||
*/
|
||||
export interface SiteUploadPayloadRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string Payload = 2
|
||||
*/
|
||||
Payload: string;
|
||||
/**
|
||||
* @generated from protobuf field: int64 TimeToLive = 3
|
||||
*/
|
||||
TimeToLive: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsPublic = 4
|
||||
*/
|
||||
IsPublic: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: bool IsOnce = 5
|
||||
*/
|
||||
IsOnce: boolean;
|
||||
/**
|
||||
* @generated from protobuf field: string Alias = 6
|
||||
*/
|
||||
Alias: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteUploadPayloadResponse
|
||||
*/
|
||||
export interface SiteUploadPayloadResponse {
|
||||
/**
|
||||
* @generated from protobuf field: api.TinyURL TinyURL = 1
|
||||
*/
|
||||
TinyURL?: TinyURL;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectUploadPayloadRequest
|
||||
*/
|
||||
@@ -560,24 +445,6 @@ export interface OrganisationListTinyURLsResponse {
|
||||
*/
|
||||
TinyURLs: TinyURL[];
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteListTinyURLsRequest
|
||||
*/
|
||||
export interface SiteListTinyURLsRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteListTinyURLsResponse
|
||||
*/
|
||||
export interface SiteListTinyURLsResponse {
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.TinyURL TinyURLs = 1
|
||||
*/
|
||||
TinyURLs: TinyURL[];
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectListTinyURLsRequest
|
||||
*/
|
||||
@@ -632,24 +499,6 @@ export interface OrganisationDeleteTinyURLRequest {
|
||||
*/
|
||||
export interface OrganisationDeleteTinyURLResponse {
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteDeleteTinyURLRequest
|
||||
*/
|
||||
export interface SiteDeleteTinyURLRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 2
|
||||
*/
|
||||
ID: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteDeleteTinyURLResponse
|
||||
*/
|
||||
export interface SiteDeleteTinyURLResponse {
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectDeleteTinyURLRequest
|
||||
*/
|
||||
@@ -720,40 +569,6 @@ export interface OrganisationGetTinyURLResponse {
|
||||
*/
|
||||
Payload: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteGetTinyURLRequest
|
||||
*/
|
||||
export interface SiteGetTinyURLRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 2
|
||||
*/
|
||||
ID: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.SiteGetTinyURLResponse
|
||||
*/
|
||||
export interface SiteGetTinyURLResponse {
|
||||
/**
|
||||
* @generated from protobuf field: api.TinyURLKind Kind = 1
|
||||
*/
|
||||
Kind: TinyURLKind;
|
||||
/**
|
||||
* @generated from protobuf field: api.FileDataResponse File = 2
|
||||
*/
|
||||
File?: FileDataResponse;
|
||||
/**
|
||||
* @generated from protobuf field: string LongURL = 3
|
||||
*/
|
||||
LongURL: string;
|
||||
/**
|
||||
* @generated from protobuf field: string Payload = 4
|
||||
*/
|
||||
Payload: string;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.ProjectGetTinyURLRequest
|
||||
*/
|
||||
@@ -1185,138 +1000,6 @@ class OrganisationShortenURLResponse$Type extends MessageType<OrganisationShorte
|
||||
*/
|
||||
export const OrganisationShortenURLResponse = new OrganisationShortenURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteShortenURLRequest$Type extends MessageType<SiteShortenURLRequest> {
|
||||
constructor() {
|
||||
super("api.SiteShortenURLRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "URL", kind: "scalar", localName: "URL", jsonName: "URL", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
||||
{ no: 3, name: "TimeToLive", kind: "scalar", localName: "TimeToLive", jsonName: "TimeToLive", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "validate.rules": { int64: { lte: "1500000000" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Specifies the time to live (TTL) of the TinyURL in seconds, limited to fifty years. A value of zero or less indicates an infinite TTL." } } },
|
||||
{ no: 4, name: "IsPublic", kind: "scalar", localName: "IsPublic", jsonName: "IsPublic", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 5, name: "IsOnce", kind: "scalar", localName: "IsOnce", jsonName: "IsOnce", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "Alias", kind: "scalar", localName: "Alias", jsonName: "Alias", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50", pattern: "^[a-zA-Z0-9-]*$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional, customize the link by adding an alias to the url. If omitted a unique ID is generated" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "URL", "TimeToLive"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteShortenURLRequest>): SiteShortenURLRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.URL = "";
|
||||
message.TimeToLive = 0n;
|
||||
message.IsPublic = false;
|
||||
message.IsOnce = false;
|
||||
message.Alias = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteShortenURLRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteShortenURLRequest): SiteShortenURLRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string URL */ 2:
|
||||
message.URL = reader.string();
|
||||
break;
|
||||
case /* int64 TimeToLive */ 3:
|
||||
message.TimeToLive = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* bool IsPublic */ 4:
|
||||
message.IsPublic = reader.bool();
|
||||
break;
|
||||
case /* bool IsOnce */ 5:
|
||||
message.IsOnce = reader.bool();
|
||||
break;
|
||||
case /* string Alias */ 6:
|
||||
message.Alias = 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: SiteShortenURLRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string URL = 2; */
|
||||
if (message.URL !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.URL);
|
||||
/* int64 TimeToLive = 3; */
|
||||
if (message.TimeToLive !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.TimeToLive);
|
||||
/* bool IsPublic = 4; */
|
||||
if (message.IsPublic !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.IsPublic);
|
||||
/* bool IsOnce = 5; */
|
||||
if (message.IsOnce !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.IsOnce);
|
||||
/* string Alias = 6; */
|
||||
if (message.Alias !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.Alias);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteShortenURLRequest
|
||||
*/
|
||||
export const SiteShortenURLRequest = new SiteShortenURLRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteShortenURLResponse$Type extends MessageType<SiteShortenURLResponse> {
|
||||
constructor() {
|
||||
super("api.SiteShortenURLResponse", [
|
||||
{ no: 1, name: "TinyURL", kind: "message", localName: "TinyURL", jsonName: "TinyURL", T: () => TinyURL }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SiteShortenURLResponse>): SiteShortenURLResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteShortenURLResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteShortenURLResponse): SiteShortenURLResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.TinyURL TinyURL */ 1:
|
||||
message.TinyURL = TinyURL.internalBinaryRead(reader, reader.uint32(), options, message.TinyURL);
|
||||
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: SiteShortenURLResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.TinyURL TinyURL = 1; */
|
||||
if (message.TinyURL)
|
||||
TinyURL.internalBinaryWrite(message.TinyURL, 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.SiteShortenURLResponse
|
||||
*/
|
||||
export const SiteShortenURLResponse = new SiteShortenURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectShortenURLRequest$Type extends MessageType<ProjectShortenURLRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectShortenURLRequest", [
|
||||
@@ -1712,137 +1395,6 @@ class OrganisationUploadFileResponse$Type extends MessageType<OrganisationUpload
|
||||
*/
|
||||
export const OrganisationUploadFileResponse = new OrganisationUploadFileResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteUploadFileRequest$Type extends MessageType<SiteUploadFileRequest> {
|
||||
constructor() {
|
||||
super("api.SiteUploadFileRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "File", kind: "message", localName: "File", jsonName: "File", T: () => FileDataRequest, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 3, name: "TimeToLive", kind: "scalar", localName: "TimeToLive", jsonName: "TimeToLive", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "validate.rules": { int64: { lte: "1500000000" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Specifies the time to live (TTL) of the TinyURL in seconds, limited to fifty years. A value of zero or less indicates an infinite TTL." } } },
|
||||
{ no: 4, name: "IsPublic", kind: "scalar", localName: "IsPublic", jsonName: "IsPublic", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 5, name: "IsOnce", kind: "scalar", localName: "IsOnce", jsonName: "IsOnce", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "Alias", kind: "scalar", localName: "Alias", jsonName: "Alias", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50", pattern: "^[a-zA-Z0-9-]*$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional, customize the link by adding an alias to the url. If omitted a unique ID is generated" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "File", "TimeToLive"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteUploadFileRequest>): SiteUploadFileRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.TimeToLive = 0n;
|
||||
message.IsPublic = false;
|
||||
message.IsOnce = false;
|
||||
message.Alias = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteUploadFileRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteUploadFileRequest): SiteUploadFileRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* api.FileDataRequest File */ 2:
|
||||
message.File = FileDataRequest.internalBinaryRead(reader, reader.uint32(), options, message.File);
|
||||
break;
|
||||
case /* int64 TimeToLive */ 3:
|
||||
message.TimeToLive = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* bool IsPublic */ 4:
|
||||
message.IsPublic = reader.bool();
|
||||
break;
|
||||
case /* bool IsOnce */ 5:
|
||||
message.IsOnce = reader.bool();
|
||||
break;
|
||||
case /* string Alias */ 6:
|
||||
message.Alias = 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: SiteUploadFileRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.FileDataRequest File = 2; */
|
||||
if (message.File)
|
||||
FileDataRequest.internalBinaryWrite(message.File, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* int64 TimeToLive = 3; */
|
||||
if (message.TimeToLive !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.TimeToLive);
|
||||
/* bool IsPublic = 4; */
|
||||
if (message.IsPublic !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.IsPublic);
|
||||
/* bool IsOnce = 5; */
|
||||
if (message.IsOnce !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.IsOnce);
|
||||
/* string Alias = 6; */
|
||||
if (message.Alias !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.Alias);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteUploadFileRequest
|
||||
*/
|
||||
export const SiteUploadFileRequest = new SiteUploadFileRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteUploadFileResponse$Type extends MessageType<SiteUploadFileResponse> {
|
||||
constructor() {
|
||||
super("api.SiteUploadFileResponse", [
|
||||
{ no: 1, name: "TinyURL", kind: "message", localName: "TinyURL", jsonName: "TinyURL", T: () => TinyURL }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SiteUploadFileResponse>): SiteUploadFileResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteUploadFileResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteUploadFileResponse): SiteUploadFileResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.TinyURL TinyURL */ 1:
|
||||
message.TinyURL = TinyURL.internalBinaryRead(reader, reader.uint32(), options, message.TinyURL);
|
||||
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: SiteUploadFileResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.TinyURL TinyURL = 1; */
|
||||
if (message.TinyURL)
|
||||
TinyURL.internalBinaryWrite(message.TinyURL, 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.SiteUploadFileResponse
|
||||
*/
|
||||
export const SiteUploadFileResponse = new SiteUploadFileResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectUploadFileRequest$Type extends MessageType<ProjectUploadFileRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectUploadFileRequest", [
|
||||
@@ -2237,138 +1789,6 @@ class OrganisationUploadPayloadResponse$Type extends MessageType<OrganisationUpl
|
||||
*/
|
||||
export const OrganisationUploadPayloadResponse = new OrganisationUploadPayloadResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteUploadPayloadRequest$Type extends MessageType<SiteUploadPayloadRequest> {
|
||||
constructor() {
|
||||
super("api.SiteUploadPayloadRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "The payload content, which can either be plain text or a stringified JSON. The MIME type will be automatically inferred based on whether the content can be parsed as JSON." } } },
|
||||
{ no: 3, name: "TimeToLive", kind: "scalar", localName: "TimeToLive", jsonName: "TimeToLive", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/, options: { "validate.rules": { int64: { lte: "1500000000" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Specifies the time to live (TTL) of the TinyURL in seconds, limited to fifty years. A value of zero or less indicates an infinite TTL." } } },
|
||||
{ no: 4, name: "IsPublic", kind: "scalar", localName: "IsPublic", jsonName: "IsPublic", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 5, name: "IsOnce", kind: "scalar", localName: "IsOnce", jsonName: "IsOnce", T: 8 /*ScalarType.BOOL*/ },
|
||||
{ no: 6, name: "Alias", kind: "scalar", localName: "Alias", jsonName: "Alias", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { maxLen: "50", pattern: "^[a-zA-Z0-9-]*$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Optional, customize the link by adding an alias to the url. If omitted a unique ID is generated" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Payload", "TimeToLive"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteUploadPayloadRequest>): SiteUploadPayloadRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.Payload = "";
|
||||
message.TimeToLive = 0n;
|
||||
message.IsPublic = false;
|
||||
message.IsOnce = false;
|
||||
message.Alias = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteUploadPayloadRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteUploadPayloadRequest): SiteUploadPayloadRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string Payload */ 2:
|
||||
message.Payload = reader.string();
|
||||
break;
|
||||
case /* int64 TimeToLive */ 3:
|
||||
message.TimeToLive = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* bool IsPublic */ 4:
|
||||
message.IsPublic = reader.bool();
|
||||
break;
|
||||
case /* bool IsOnce */ 5:
|
||||
message.IsOnce = reader.bool();
|
||||
break;
|
||||
case /* string Alias */ 6:
|
||||
message.Alias = 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: SiteUploadPayloadRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string Payload = 2; */
|
||||
if (message.Payload !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.Payload);
|
||||
/* int64 TimeToLive = 3; */
|
||||
if (message.TimeToLive !== 0n)
|
||||
writer.tag(3, WireType.Varint).int64(message.TimeToLive);
|
||||
/* bool IsPublic = 4; */
|
||||
if (message.IsPublic !== false)
|
||||
writer.tag(4, WireType.Varint).bool(message.IsPublic);
|
||||
/* bool IsOnce = 5; */
|
||||
if (message.IsOnce !== false)
|
||||
writer.tag(5, WireType.Varint).bool(message.IsOnce);
|
||||
/* string Alias = 6; */
|
||||
if (message.Alias !== "")
|
||||
writer.tag(6, WireType.LengthDelimited).string(message.Alias);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteUploadPayloadRequest
|
||||
*/
|
||||
export const SiteUploadPayloadRequest = new SiteUploadPayloadRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteUploadPayloadResponse$Type extends MessageType<SiteUploadPayloadResponse> {
|
||||
constructor() {
|
||||
super("api.SiteUploadPayloadResponse", [
|
||||
{ no: 1, name: "TinyURL", kind: "message", localName: "TinyURL", jsonName: "TinyURL", T: () => TinyURL }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SiteUploadPayloadResponse>): SiteUploadPayloadResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteUploadPayloadResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteUploadPayloadResponse): SiteUploadPayloadResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.TinyURL TinyURL */ 1:
|
||||
message.TinyURL = TinyURL.internalBinaryRead(reader, reader.uint32(), options, message.TinyURL);
|
||||
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: SiteUploadPayloadResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.TinyURL TinyURL = 1; */
|
||||
if (message.TinyURL)
|
||||
TinyURL.internalBinaryWrite(message.TinyURL, 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.SiteUploadPayloadResponse
|
||||
*/
|
||||
export const SiteUploadPayloadResponse = new SiteUploadPayloadResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectUploadPayloadRequest$Type extends MessageType<ProjectUploadPayloadRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectUploadPayloadRequest", [
|
||||
@@ -2726,99 +2146,6 @@ class OrganisationListTinyURLsResponse$Type extends MessageType<OrganisationList
|
||||
*/
|
||||
export const OrganisationListTinyURLsResponse = new OrganisationListTinyURLsResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteListTinyURLsRequest$Type extends MessageType<SiteListTinyURLsRequest> {
|
||||
constructor() {
|
||||
super("api.SiteListTinyURLsRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteListTinyURLsRequest>): SiteListTinyURLsRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteListTinyURLsRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteListTinyURLsRequest): SiteListTinyURLsRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.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: SiteListTinyURLsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.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.SiteListTinyURLsRequest
|
||||
*/
|
||||
export const SiteListTinyURLsRequest = new SiteListTinyURLsRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteListTinyURLsResponse$Type extends MessageType<SiteListTinyURLsResponse> {
|
||||
constructor() {
|
||||
super("api.SiteListTinyURLsResponse", [
|
||||
{ no: 1, name: "TinyURLs", kind: "message", localName: "TinyURLs", jsonName: "TinyURLs", repeat: 2 /*RepeatType.UNPACKED*/, T: () => TinyURL }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SiteListTinyURLsResponse>): SiteListTinyURLsResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.TinyURLs = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteListTinyURLsResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteListTinyURLsResponse): SiteListTinyURLsResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* repeated api.TinyURL TinyURLs */ 1:
|
||||
message.TinyURLs.push(TinyURL.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: SiteListTinyURLsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* repeated api.TinyURL TinyURLs = 1; */
|
||||
for (let i = 0; i < message.TinyURLs.length; i++)
|
||||
TinyURL.internalBinaryWrite(message.TinyURLs[i], 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.SiteListTinyURLsResponse
|
||||
*/
|
||||
export const SiteListTinyURLsResponse = new SiteListTinyURLsResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectListTinyURLsRequest$Type extends MessageType<ProjectListTinyURLsRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectListTinyURLsRequest", [
|
||||
@@ -3097,98 +2424,6 @@ class OrganisationDeleteTinyURLResponse$Type extends MessageType<OrganisationDel
|
||||
*/
|
||||
export const OrganisationDeleteTinyURLResponse = new OrganisationDeleteTinyURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteDeleteTinyURLRequest$Type extends MessageType<SiteDeleteTinyURLRequest> {
|
||||
constructor() {
|
||||
super("api.SiteDeleteTinyURLRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteDeleteTinyURLRequest>): SiteDeleteTinyURLRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteDeleteTinyURLRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteDeleteTinyURLRequest): SiteDeleteTinyURLRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string ID */ 2:
|
||||
message.ID = 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: SiteDeleteTinyURLRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string ID = 2; */
|
||||
if (message.ID !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.ID);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteDeleteTinyURLRequest
|
||||
*/
|
||||
export const SiteDeleteTinyURLRequest = new SiteDeleteTinyURLRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteDeleteTinyURLResponse$Type extends MessageType<SiteDeleteTinyURLResponse> {
|
||||
constructor() {
|
||||
super("api.SiteDeleteTinyURLResponse", []);
|
||||
}
|
||||
create(value?: PartialMessage<SiteDeleteTinyURLResponse>): SiteDeleteTinyURLResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteDeleteTinyURLResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteDeleteTinyURLResponse): SiteDeleteTinyURLResponse {
|
||||
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: SiteDeleteTinyURLResponse, 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.SiteDeleteTinyURLResponse
|
||||
*/
|
||||
export const SiteDeleteTinyURLResponse = new SiteDeleteTinyURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectDeleteTinyURLRequest$Type extends MessageType<ProjectDeleteTinyURLRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectDeleteTinyURLRequest", [
|
||||
@@ -3497,130 +2732,6 @@ class OrganisationGetTinyURLResponse$Type extends MessageType<OrganisationGetTin
|
||||
*/
|
||||
export const OrganisationGetTinyURLResponse = new OrganisationGetTinyURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteGetTinyURLRequest$Type extends MessageType<SiteGetTinyURLRequest> {
|
||||
constructor() {
|
||||
super("api.SiteGetTinyURLRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<SiteGetTinyURLRequest>): SiteGetTinyURLRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteGetTinyURLRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteGetTinyURLRequest): SiteGetTinyURLRequest {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.RequestSiteHeader Header */ 1:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string ID */ 2:
|
||||
message.ID = 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: SiteGetTinyURLRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string ID = 2; */
|
||||
if (message.ID !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.ID);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteGetTinyURLRequest
|
||||
*/
|
||||
export const SiteGetTinyURLRequest = new SiteGetTinyURLRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class SiteGetTinyURLResponse$Type extends MessageType<SiteGetTinyURLResponse> {
|
||||
constructor() {
|
||||
super("api.SiteGetTinyURLResponse", [
|
||||
{ no: 1, name: "Kind", kind: "enum", localName: "Kind", jsonName: "Kind", T: () => ["api.TinyURLKind", TinyURLKind] },
|
||||
{ no: 2, name: "File", kind: "message", localName: "File", jsonName: "File", T: () => FileDataResponse },
|
||||
{ no: 3, name: "LongURL", kind: "scalar", localName: "LongURL", jsonName: "LongURL", T: 9 /*ScalarType.STRING*/ },
|
||||
{ no: 4, name: "Payload", kind: "scalar", localName: "Payload", jsonName: "Payload", T: 9 /*ScalarType.STRING*/ }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<SiteGetTinyURLResponse>): SiteGetTinyURLResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.Kind = 0;
|
||||
message.LongURL = "";
|
||||
message.Payload = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<SiteGetTinyURLResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SiteGetTinyURLResponse): SiteGetTinyURLResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.TinyURLKind Kind */ 1:
|
||||
message.Kind = reader.int32();
|
||||
break;
|
||||
case /* api.FileDataResponse File */ 2:
|
||||
message.File = FileDataResponse.internalBinaryRead(reader, reader.uint32(), options, message.File);
|
||||
break;
|
||||
case /* string LongURL */ 3:
|
||||
message.LongURL = reader.string();
|
||||
break;
|
||||
case /* string Payload */ 4:
|
||||
message.Payload = 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: SiteGetTinyURLResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.TinyURLKind Kind = 1; */
|
||||
if (message.Kind !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.Kind);
|
||||
/* api.FileDataResponse File = 2; */
|
||||
if (message.File)
|
||||
FileDataResponse.internalBinaryWrite(message.File, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string LongURL = 3; */
|
||||
if (message.LongURL !== "")
|
||||
writer.tag(3, WireType.LengthDelimited).string(message.LongURL);
|
||||
/* string Payload = 4; */
|
||||
if (message.Payload !== "")
|
||||
writer.tag(4, WireType.LengthDelimited).string(message.Payload);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.SiteGetTinyURLResponse
|
||||
*/
|
||||
export const SiteGetTinyURLResponse = new SiteGetTinyURLResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ProjectGetTinyURLRequest$Type extends MessageType<ProjectGetTinyURLRequest> {
|
||||
constructor() {
|
||||
super("api.ProjectGetTinyURLRequest", [
|
||||
@@ -3966,27 +3077,21 @@ export const DeleteAllTinyURLsResponse = new DeleteAllTinyURLsResponse$Type();
|
||||
*/
|
||||
export const TinyURLService = new ServiceType("api.TinyURLService", [
|
||||
{ name: "OrganisationShortenURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Generates a short alias for a given URL linked to a organisation." }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationShortenURLRequest, O: OrganisationShortenURLResponse },
|
||||
{ name: "SiteShortenURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Generates a short alias for a given URL linked to a site." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteShortenURLRequest, O: SiteShortenURLResponse },
|
||||
{ name: "ProjectShortenURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Generates a short alias for a given URL linked to a project." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectShortenURLRequest, O: ProjectShortenURLResponse },
|
||||
{ name: "PartnerAppShortenURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Generates a short alias for a given URL linked to a partnerApp." }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppShortenURLRequest, O: PartnerAppShortenURLResponse },
|
||||
{ name: "OrganisationUploadFile", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a file linked to a specific organisation resource. Generates a short URL to download the file. <br>Must be called using a multipart form-data content type request. <br> Example of curl request : curl -X POST https://$REFLEXPLATFORM_REST_URL/api.TinyURLService/OrganisationUploadFile -H \"Authorization: Bearer ...\" -F File=\"@path/to/my/file/to/upload\" -F OrganisationID=myOrganisationID -F TimeToLive=-1 -F IsPublic=false -F IsOnce=false -F Alias=myAlias" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationUploadFileRequest, O: OrganisationUploadFileResponse },
|
||||
{ name: "SiteUploadFile", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a file linked to a specific site resource. Generates a short URL to download the file. <br>Must be called using a multipart form-data content type request. <br> Example of curl request : curl -X POST https://$REFLEXPLATFORM_REST_URL/api.TinyURLService/SiteUploadFile -H \"Authorization: Bearer ...\" -F File=\"@path/to/my/file/to/upload\" -F SiteID=mySiteID -F TimeToLive=-1 -F IsPublic=false -F IsOnce=false -F Alias=myAlias" }, "api.rscType": "Site", "api.roles": "Platform.Site-TinyURL", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteUploadFileRequest, O: SiteUploadFileResponse },
|
||||
{ name: "ProjectUploadFile", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a file linked to a specific project resource. Generates a short URL to download the file. <br>Must be called using a multipart form-data content type request. <br> Example of curl request : curl -X POST https://$REFLEXPLATFORM_REST_URL/api.TinyURLService/ProjectUploadFile -H \"Authorization: Bearer ...\" -F File=\"@path/to/my/file/to/upload\" -F ProjectID=myProjectID -F TimeToLive=-1 -F IsPublic=false -F IsOnce=false -F Alias=myAlias" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectUploadFileRequest, O: ProjectUploadFileResponse },
|
||||
{ name: "PartnerAppUploadFile", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a file linked to a specific partnerApp resource. Generates a short URL to download the file. <br>Must be called using a multipart form-data content type request. <br> Example of curl request : curl -X POST https://$REFLEXPLATFORM_REST_URL/api.TinyURLService/PartnerAppUploadFile -H \"Authorization: Bearer ...\" -F File=\"@path/to/my/file/to/upload\" -F PartnerAppID=myPartnerAppID -F TimeToLive=-1 -F IsPublic=false -F IsOnce=false -F Alias=myAlias" }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppUploadFileRequest, O: PartnerAppUploadFileResponse },
|
||||
{ name: "OrganisationUploadPayload", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a payload (either plain text or JSON) linked to a specific organisation resource. Generates a short URL to retrieve the payload." }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationUploadPayloadRequest, O: OrganisationUploadPayloadResponse },
|
||||
{ name: "SiteUploadPayload", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a payload (either plain text or JSON) linked to a specific site resource. Generates a short URL to retrieve the payload." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteUploadPayloadRequest, O: SiteUploadPayloadResponse },
|
||||
{ name: "ProjectUploadPayload", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a payload (either plain text or JSON) linked to a specific project resource. Generates a short URL to retrieve the payload." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectUploadPayloadRequest, O: ProjectUploadPayloadResponse },
|
||||
{ name: "PartnerAppUploadPayload", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Uploads a payload (either plain text or JSON) linked to a specific partnerApp resource. Generates a short URL to retrieve the payload." }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppUploadPayloadRequest, O: PartnerAppUploadPayloadResponse },
|
||||
{ name: "OrganisationListTinyURLs", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "List all the tiny URLs linked to a specific organisation resource." }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationListTinyURLsRequest, O: OrganisationListTinyURLsResponse },
|
||||
{ name: "SiteListTinyURLs", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "List all the tiny URLs linked to a specific site resource." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteListTinyURLsRequest, O: SiteListTinyURLsResponse },
|
||||
{ name: "ProjectListTinyURLs", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "List all the tiny URLs linked to a specific project resource." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectListTinyURLsRequest, O: ProjectListTinyURLsResponse },
|
||||
{ name: "PartnerAppListTinyURLs", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "List all the tiny URLs linked to a specific partnerApp resource." }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppListTinyURLsRequest, O: PartnerAppListTinyURLsResponse },
|
||||
{ name: "OrganisationDeleteTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Delete a tiny URL linked to a specific organisation resource." }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationDeleteTinyURLRequest, O: OrganisationDeleteTinyURLResponse },
|
||||
{ name: "SiteDeleteTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Delete a tiny URL linked to a specific site resource." }, "api.rscType": "Site", "api.roles": "Platform.Site-TinyURL", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteDeleteTinyURLRequest, O: SiteDeleteTinyURLResponse },
|
||||
{ name: "ProjectDeleteTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Delete a tiny URL linked to a specific project resource." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectDeleteTinyURLRequest, O: ProjectDeleteTinyURLResponse },
|
||||
{ name: "PartnerAppDeleteTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Delete a tiny URL linked to a specific partnerApp resource." }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppDeleteTinyURLRequest, O: PartnerAppDeleteTinyURLResponse },
|
||||
{ name: "OrganisationGetTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Get a tiny URL linked to a specific Organisation resource. Can be a link or a file." }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: OrganisationGetTinyURLRequest, O: OrganisationGetTinyURLResponse },
|
||||
{ name: "SiteGetTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Get a tiny URL linked to a specific site resource. Can be a link or a file." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SiteGetTinyURLRequest, O: SiteGetTinyURLResponse },
|
||||
{ name: "ProjectGetTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Get a tiny URL linked to a specific project resource. Can be a link or a file." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ProjectGetTinyURLRequest, O: ProjectGetTinyURLResponse },
|
||||
{ name: "PartnerAppGetTinyURL", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Get a tiny URL linked to a specific partner app resource. Can be a link or a file." }, "api.rscType": "PartnerApp", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: PartnerAppGetTinyURLRequest, O: PartnerAppGetTinyURLResponse },
|
||||
{ name: "DeleteAll", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["TinyURL"], description: "Delete all tiny URLs linked to a resource" }, "api.rscType": "Platform", "api.roles": "Platform.Organisation-Deletion", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: DeleteAllTinyURLsRequest, O: DeleteAllTinyURLsResponse }
|
||||
|
||||
Reference in New Issue
Block a user