You've already forked npm-core-sdk
341 lines
17 KiB
TypeScript
341 lines
17 KiB
TypeScript
// @generated by protobuf-ts 2.10.0 with parameter use_proto_field_name
|
|
// @generated from protobuf file "base.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
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";
|
|
/**
|
|
* @generated from protobuf message api.AdminAddress
|
|
*/
|
|
export interface AdminAddress {
|
|
/**
|
|
* @generated from protobuf field: string City = 1 [json_name = "City"];
|
|
*/
|
|
City: string;
|
|
/**
|
|
* Country Code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1'>ISO_3166-1</a> format
|
|
*
|
|
* @generated from protobuf field: string CountryCode = 2 [json_name = "CountryCode"];
|
|
*/
|
|
CountryCode: string;
|
|
/**
|
|
* @generated from protobuf field: api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"];
|
|
*/
|
|
GeographicalCoordinates?: AdminGeographicalCoordinates;
|
|
/**
|
|
* @generated from protobuf field: string Name = 4 [json_name = "Name"];
|
|
*/
|
|
Name: string;
|
|
/**
|
|
* @generated from protobuf field: string POBoxNumber = 5 [json_name = "POBoxNumber"];
|
|
*/
|
|
POBoxNumber: string;
|
|
/**
|
|
* @generated from protobuf field: string PostalCode = 6 [json_name = "PostalCode"];
|
|
*/
|
|
PostalCode: string;
|
|
/**
|
|
* @generated from protobuf field: string ProvinceCode = 7 [json_name = "ProvinceCode"];
|
|
*/
|
|
ProvinceCode: string;
|
|
/**
|
|
* @generated from protobuf field: string State = 8 [json_name = "State"];
|
|
*/
|
|
State: string;
|
|
/**
|
|
* @generated from protobuf field: string StreetAddressOne = 9 [json_name = "StreetAddressOne"];
|
|
*/
|
|
StreetAddressOne: string;
|
|
/**
|
|
* @generated from protobuf field: string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"];
|
|
*/
|
|
StreetAddressTwo: string;
|
|
/**
|
|
* @generated from protobuf field: string StreetAddressThree = 11 [json_name = "StreetAddressThree"];
|
|
*/
|
|
StreetAddressThree: string;
|
|
/**
|
|
* @generated from protobuf field: string PlusCode = 12 [json_name = "PlusCode"];
|
|
*/
|
|
PlusCode: string;
|
|
}
|
|
/**
|
|
*
|
|
* Geographical coordinates information
|
|
*
|
|
* @generated from protobuf message api.AdminGeographicalCoordinates
|
|
*/
|
|
export interface AdminGeographicalCoordinates {
|
|
/**
|
|
* @generated from protobuf field: string Latitude = 1 [json_name = "Latitude"];
|
|
*/
|
|
Latitude: string;
|
|
/**
|
|
* @generated from protobuf field: string Longitude = 2 [json_name = "Longitude"];
|
|
*/
|
|
Longitude: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.Paging
|
|
*/
|
|
export interface Paging {
|
|
/**
|
|
* @generated from protobuf field: int32 Limit = 1 [json_name = "Limit"];
|
|
*/
|
|
Limit: number;
|
|
/**
|
|
* @generated from protobuf field: int32 Offset = 2 [json_name = "Offset"];
|
|
*/
|
|
Offset: number;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AdminAddress$Type extends MessageType<AdminAddress> {
|
|
constructor() {
|
|
super("api.AdminAddress", [
|
|
{ no: 1, name: "City", kind: "scalar", localName: "City", jsonName: "City", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "CountryCode", kind: "scalar", localName: "CountryCode", jsonName: "CountryCode", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { countryCodeIso3166: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Country Code in <a href='https://en.wikipedia.org/wiki/ISO_3166-1'>ISO_3166-1</a> format", example: "[\"FR\", \"FRA\", \"250\"]" } } },
|
|
{ no: 3, name: "GeographicalCoordinates", kind: "message", localName: "GeographicalCoordinates", jsonName: "GeographicalCoordinates", T: () => AdminGeographicalCoordinates },
|
|
{ no: 4, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 5, name: "POBoxNumber", kind: "scalar", localName: "POBoxNumber", jsonName: "POBoxNumber", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 6, name: "PostalCode", kind: "scalar", localName: "PostalCode", jsonName: "PostalCode", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 7, name: "ProvinceCode", kind: "scalar", localName: "ProvinceCode", jsonName: "ProvinceCode", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 8, name: "State", kind: "scalar", localName: "State", jsonName: "State", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 9, name: "StreetAddressOne", kind: "scalar", localName: "StreetAddressOne", jsonName: "StreetAddressOne", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 10, name: "StreetAddressTwo", kind: "scalar", localName: "StreetAddressTwo", jsonName: "StreetAddressTwo", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 11, name: "StreetAddressThree", kind: "scalar", localName: "StreetAddressThree", jsonName: "StreetAddressThree", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 12, name: "PlusCode", kind: "scalar", localName: "PlusCode", jsonName: "PlusCode", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<AdminAddress>): AdminAddress {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.City = "";
|
|
message.CountryCode = "";
|
|
message.Name = "";
|
|
message.POBoxNumber = "";
|
|
message.PostalCode = "";
|
|
message.ProvinceCode = "";
|
|
message.State = "";
|
|
message.StreetAddressOne = "";
|
|
message.StreetAddressTwo = "";
|
|
message.StreetAddressThree = "";
|
|
message.PlusCode = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AdminAddress>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminAddress): AdminAddress {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string City = 1 [json_name = "City"];*/ 1:
|
|
message.City = reader.string();
|
|
break;
|
|
case /* string CountryCode = 2 [json_name = "CountryCode"];*/ 2:
|
|
message.CountryCode = reader.string();
|
|
break;
|
|
case /* api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"];*/ 3:
|
|
message.GeographicalCoordinates = AdminGeographicalCoordinates.internalBinaryRead(reader, reader.uint32(), options, message.GeographicalCoordinates);
|
|
break;
|
|
case /* string Name = 4 [json_name = "Name"];*/ 4:
|
|
message.Name = reader.string();
|
|
break;
|
|
case /* string POBoxNumber = 5 [json_name = "POBoxNumber"];*/ 5:
|
|
message.POBoxNumber = reader.string();
|
|
break;
|
|
case /* string PostalCode = 6 [json_name = "PostalCode"];*/ 6:
|
|
message.PostalCode = reader.string();
|
|
break;
|
|
case /* string ProvinceCode = 7 [json_name = "ProvinceCode"];*/ 7:
|
|
message.ProvinceCode = reader.string();
|
|
break;
|
|
case /* string State = 8 [json_name = "State"];*/ 8:
|
|
message.State = reader.string();
|
|
break;
|
|
case /* string StreetAddressOne = 9 [json_name = "StreetAddressOne"];*/ 9:
|
|
message.StreetAddressOne = reader.string();
|
|
break;
|
|
case /* string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"];*/ 10:
|
|
message.StreetAddressTwo = reader.string();
|
|
break;
|
|
case /* string StreetAddressThree = 11 [json_name = "StreetAddressThree"];*/ 11:
|
|
message.StreetAddressThree = reader.string();
|
|
break;
|
|
case /* string PlusCode = 12 [json_name = "PlusCode"];*/ 12:
|
|
message.PlusCode = 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: AdminAddress, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string City = 1 [json_name = "City"]; */
|
|
if (message.City !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.City);
|
|
/* string CountryCode = 2 [json_name = "CountryCode"]; */
|
|
if (message.CountryCode !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.CountryCode);
|
|
/* api.AdminGeographicalCoordinates GeographicalCoordinates = 3 [json_name = "GeographicalCoordinates"]; */
|
|
if (message.GeographicalCoordinates)
|
|
AdminGeographicalCoordinates.internalBinaryWrite(message.GeographicalCoordinates, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* string Name = 4 [json_name = "Name"]; */
|
|
if (message.Name !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.Name);
|
|
/* string POBoxNumber = 5 [json_name = "POBoxNumber"]; */
|
|
if (message.POBoxNumber !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.POBoxNumber);
|
|
/* string PostalCode = 6 [json_name = "PostalCode"]; */
|
|
if (message.PostalCode !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.PostalCode);
|
|
/* string ProvinceCode = 7 [json_name = "ProvinceCode"]; */
|
|
if (message.ProvinceCode !== "")
|
|
writer.tag(7, WireType.LengthDelimited).string(message.ProvinceCode);
|
|
/* string State = 8 [json_name = "State"]; */
|
|
if (message.State !== "")
|
|
writer.tag(8, WireType.LengthDelimited).string(message.State);
|
|
/* string StreetAddressOne = 9 [json_name = "StreetAddressOne"]; */
|
|
if (message.StreetAddressOne !== "")
|
|
writer.tag(9, WireType.LengthDelimited).string(message.StreetAddressOne);
|
|
/* string StreetAddressTwo = 10 [json_name = "StreetAddressTwo"]; */
|
|
if (message.StreetAddressTwo !== "")
|
|
writer.tag(10, WireType.LengthDelimited).string(message.StreetAddressTwo);
|
|
/* string StreetAddressThree = 11 [json_name = "StreetAddressThree"]; */
|
|
if (message.StreetAddressThree !== "")
|
|
writer.tag(11, WireType.LengthDelimited).string(message.StreetAddressThree);
|
|
/* string PlusCode = 12 [json_name = "PlusCode"]; */
|
|
if (message.PlusCode !== "")
|
|
writer.tag(12, WireType.LengthDelimited).string(message.PlusCode);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AdminAddress
|
|
*/
|
|
export const AdminAddress = new AdminAddress$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AdminGeographicalCoordinates$Type extends MessageType<AdminGeographicalCoordinates> {
|
|
constructor() {
|
|
super("api.AdminGeographicalCoordinates", [
|
|
{ no: 1, name: "Latitude", kind: "scalar", localName: "Latitude", jsonName: "Latitude", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 2, name: "Longitude", kind: "scalar", localName: "Longitude", jsonName: "Longitude", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<AdminGeographicalCoordinates>): AdminGeographicalCoordinates {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Latitude = "";
|
|
message.Longitude = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AdminGeographicalCoordinates>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AdminGeographicalCoordinates): AdminGeographicalCoordinates {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string Latitude = 1 [json_name = "Latitude"];*/ 1:
|
|
message.Latitude = reader.string();
|
|
break;
|
|
case /* string Longitude = 2 [json_name = "Longitude"];*/ 2:
|
|
message.Longitude = 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: AdminGeographicalCoordinates, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string Latitude = 1 [json_name = "Latitude"]; */
|
|
if (message.Latitude !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.Latitude);
|
|
/* string Longitude = 2 [json_name = "Longitude"]; */
|
|
if (message.Longitude !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.Longitude);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AdminGeographicalCoordinates
|
|
*/
|
|
export const AdminGeographicalCoordinates = new AdminGeographicalCoordinates$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Paging$Type extends MessageType<Paging> {
|
|
constructor() {
|
|
super("api.Paging", [
|
|
{ no: 1, name: "Limit", kind: "scalar", localName: "Limit", jsonName: "Limit", T: 5 /*ScalarType.INT32*/ },
|
|
{ no: 2, name: "Offset", kind: "scalar", localName: "Offset", jsonName: "Offset", T: 5 /*ScalarType.INT32*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Paging>): Paging {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.Limit = 0;
|
|
message.Offset = 0;
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Paging>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Paging): Paging {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* int32 Limit = 1 [json_name = "Limit"];*/ 1:
|
|
message.Limit = reader.int32();
|
|
break;
|
|
case /* int32 Offset = 2 [json_name = "Offset"];*/ 2:
|
|
message.Offset = 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: Paging, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* int32 Limit = 1 [json_name = "Limit"]; */
|
|
if (message.Limit !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.Limit);
|
|
/* int32 Offset = 2 [json_name = "Offset"]; */
|
|
if (message.Offset !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.Offset);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.Paging
|
|
*/
|
|
export const Paging = new Paging$Type();
|