You've already forked npm-core-sdk
156 lines
8.5 KiB
TypeScript
156 lines
8.5 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "driver.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 { ListTranslationsResult } from "./translations";
|
|
import { GetBasicSettingsResponse } from "./site";
|
|
import { Appointment } from "./appointment";
|
|
/**
|
|
* @generated from protobuf message api.GetAppointmentDriverDataRequest
|
|
*/
|
|
export interface GetAppointmentDriverDataRequest {
|
|
/**
|
|
* @generated from protobuf field: string DriverJWT = 1
|
|
*/
|
|
DriverJWT: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.GetAppointmentDriverDataResponse
|
|
*/
|
|
export interface GetAppointmentDriverDataResponse {
|
|
/**
|
|
* @generated from protobuf field: api.Appointment Appointment = 1
|
|
*/
|
|
Appointment?: Appointment;
|
|
/**
|
|
* @generated from protobuf field: api.GetBasicSettingsResponse BasicSettings = 2
|
|
*/
|
|
BasicSettings?: GetBasicSettingsResponse;
|
|
/**
|
|
* @generated from protobuf field: api.ListTranslationsResult Translations = 3
|
|
*/
|
|
Translations?: ListTranslationsResult;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetAppointmentDriverDataRequest$Type extends MessageType<GetAppointmentDriverDataRequest> {
|
|
constructor() {
|
|
super("api.GetAppointmentDriverDataRequest", [
|
|
{ no: 1, name: "DriverJWT", kind: "scalar", localName: "DriverJWT", jsonName: "DriverJWT", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["DriverJWT"] } } });
|
|
}
|
|
create(value?: PartialMessage<GetAppointmentDriverDataRequest>): GetAppointmentDriverDataRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.DriverJWT = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetAppointmentDriverDataRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAppointmentDriverDataRequest): GetAppointmentDriverDataRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string DriverJWT */ 1:
|
|
message.DriverJWT = 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: GetAppointmentDriverDataRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string DriverJWT = 1; */
|
|
if (message.DriverJWT !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.DriverJWT);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.GetAppointmentDriverDataRequest
|
|
*/
|
|
export const GetAppointmentDriverDataRequest = new GetAppointmentDriverDataRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetAppointmentDriverDataResponse$Type extends MessageType<GetAppointmentDriverDataResponse> {
|
|
constructor() {
|
|
super("api.GetAppointmentDriverDataResponse", [
|
|
{ no: 1, name: "Appointment", kind: "message", localName: "Appointment", jsonName: "Appointment", T: () => Appointment },
|
|
{ no: 2, name: "BasicSettings", kind: "message", localName: "BasicSettings", jsonName: "BasicSettings", T: () => GetBasicSettingsResponse },
|
|
{ no: 3, name: "Translations", kind: "message", localName: "Translations", jsonName: "Translations", T: () => ListTranslationsResult }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<GetAppointmentDriverDataResponse>): GetAppointmentDriverDataResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetAppointmentDriverDataResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAppointmentDriverDataResponse): GetAppointmentDriverDataResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Appointment Appointment */ 1:
|
|
message.Appointment = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.Appointment);
|
|
break;
|
|
case /* api.GetBasicSettingsResponse BasicSettings */ 2:
|
|
message.BasicSettings = GetBasicSettingsResponse.internalBinaryRead(reader, reader.uint32(), options, message.BasicSettings);
|
|
break;
|
|
case /* api.ListTranslationsResult Translations */ 3:
|
|
message.Translations = ListTranslationsResult.internalBinaryRead(reader, reader.uint32(), options, message.Translations);
|
|
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: GetAppointmentDriverDataResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Appointment Appointment = 1; */
|
|
if (message.Appointment)
|
|
Appointment.internalBinaryWrite(message.Appointment, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.GetBasicSettingsResponse BasicSettings = 2; */
|
|
if (message.BasicSettings)
|
|
GetBasicSettingsResponse.internalBinaryWrite(message.BasicSettings, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.ListTranslationsResult Translations = 3; */
|
|
if (message.Translations)
|
|
ListTranslationsResult.internalBinaryWrite(message.Translations, writer.tag(3, 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.GetAppointmentDriverDataResponse
|
|
*/
|
|
export const GetAppointmentDriverDataResponse = new GetAppointmentDriverDataResponse$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.DriverService
|
|
*/
|
|
export const DriverService = new ServiceType("api.DriverService", [
|
|
{ name: "GetAppointmentDriverData", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Appointment Driver"], description: "Get the appointment data for the driver, including the appointment details, basic settings, and translations from a signed JWT token." }, "google.api.method_visibility": { restriction: "SDK" } }, I: GetAppointmentDriverDataRequest, O: GetAppointmentDriverDataResponse }
|
|
], { "api.k8sService": "driver-service" });
|