You've already forked npm-core-sdk
537 lines
30 KiB
TypeScript
537 lines
30 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "appointment.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";
|
|
import { AppointmentContent } from "./slotbooking";
|
|
import { Address } from "./repositoryShared";
|
|
import { AttachmentSummary } from "./shared";
|
|
import { AppointmentStatusStruct } from "./collabShared";
|
|
import { Slot } from "./slotbooking";
|
|
import { MetadataElement } from "./shared";
|
|
import { SegmentationSelection } from "./slotbooking";
|
|
import { AppointmentCommission } from "./slotbooking";
|
|
import { AppointmentType } from "./slotbooking";
|
|
import { EntityID } from "./shared";
|
|
import { EventHeader } from "./shared";
|
|
// _common_
|
|
// import "visibility.proto";
|
|
|
|
/**
|
|
*
|
|
* Aggregation object message
|
|
*
|
|
* @generated from protobuf message api.Appointment
|
|
*/
|
|
export interface Appointment {
|
|
/**
|
|
* @generated from protobuf field: api.EventHeader LastEventHeader = 1
|
|
*/
|
|
LastEventHeader?: EventHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentPayload Payload = 3
|
|
*/
|
|
Payload?: AppointmentPayload;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.AppointmentPayload
|
|
*/
|
|
export interface AppointmentPayload {
|
|
/**
|
|
* Type of appointment : Loading / Unloading / Both
|
|
*
|
|
* @generated from protobuf field: api.AppointmentType AppointmentType = 1
|
|
*/
|
|
AppointmentType: AppointmentType;
|
|
/**
|
|
* List of the orders and projects for which the appointment is made, with the quantities
|
|
* TODO Remove after upgrade model
|
|
*
|
|
* @deprecated
|
|
* @generated from protobuf field: repeated api.AppointmentCommission Commissions = 2 [deprecated = true]
|
|
*/
|
|
Commissions: AppointmentCommission[];
|
|
/**
|
|
* Set of segmentation constraining the slot booking
|
|
*
|
|
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 4
|
|
*/
|
|
SegmentationSelections: SegmentationSelection[];
|
|
/**
|
|
* Carrier information metadata
|
|
*
|
|
* @generated from protobuf field: repeated api.MetadataElement CarrierInformation = 19
|
|
*/
|
|
CarrierInformation: MetadataElement[];
|
|
/**
|
|
* The slot booked for the appointment
|
|
*
|
|
* @generated from protobuf field: api.Slot Slot = 6
|
|
*/
|
|
Slot?: Slot;
|
|
/**
|
|
* User mails being notified on this appointment
|
|
* TODO Need to add a structure to store platform user identifiers which can act on this appointment ?
|
|
*
|
|
* @deprecated
|
|
* @generated from protobuf field: repeated string Emails = 7 [deprecated = true]
|
|
*/
|
|
Emails: string[];
|
|
/**
|
|
* Emails removed from the appointment
|
|
*
|
|
* @deprecated
|
|
* @generated from protobuf field: repeated string RemovedEmails = 16 [deprecated = true]
|
|
*/
|
|
RemovedEmails: string[];
|
|
/**
|
|
* Appointment Status and status history
|
|
*
|
|
* @generated from protobuf field: api.AppointmentStatusStruct Status = 8
|
|
*/
|
|
Status?: AppointmentStatusStruct;
|
|
/**
|
|
* Creation date of the appointment
|
|
*
|
|
* @generated from protobuf field: string CreationDate = 9
|
|
*/
|
|
CreationDate: string;
|
|
/**
|
|
* @generated from protobuf field: repeated api.MetadataElement MetaData = 10
|
|
*/
|
|
MetaData: MetadataElement[];
|
|
// string CarrierID = 11;
|
|
// string CarrierName = 12;
|
|
|
|
/**
|
|
* @generated from protobuf field: repeated api.AttachmentSummary Attachments = 13
|
|
*/
|
|
Attachments: AttachmentSummary[];
|
|
/**
|
|
* @generated from protobuf field: int32 AttachmentNumber = 14
|
|
*/
|
|
AttachmentNumber: number;
|
|
/**
|
|
* The Reason for which the appointment has no commission
|
|
*
|
|
* @generated from protobuf field: string Reason = 17
|
|
*/
|
|
Reason: string;
|
|
/**
|
|
* Acknowledgment of the site instructions
|
|
*
|
|
* @generated from protobuf field: bool InstructionAck = 18
|
|
*/
|
|
InstructionAck: boolean;
|
|
/**
|
|
* Empty attribute, just used for inpout api payloads to resolve the site resource from project context with actor alias
|
|
*
|
|
* @deprecated
|
|
* @generated from protobuf field: string ActorID = 20 [deprecated = true]
|
|
*/
|
|
ActorID: string;
|
|
/**
|
|
* Address of the appointment site
|
|
*
|
|
* @generated from protobuf field: api.Address Address = 21
|
|
*/
|
|
Address?: Address;
|
|
/**
|
|
* Name of the appointment site
|
|
*
|
|
* @generated from protobuf field: string SiteName = 22
|
|
*/
|
|
SiteName: string;
|
|
// Total volumetry in all commissions inside the truck.
|
|
// repeated QuantityByUnit TotalQuantities = 23;
|
|
|
|
/**
|
|
* time zone of the site on which the appointment is booked
|
|
*
|
|
* @generated from protobuf field: string TimeZone = 24
|
|
*/
|
|
TimeZone: string;
|
|
/**
|
|
* Loading content
|
|
*
|
|
* @generated from protobuf field: api.AppointmentContent Loading = 25
|
|
*/
|
|
Loading?: AppointmentContent;
|
|
/**
|
|
* Unoading content
|
|
*
|
|
* @generated from protobuf field: api.AppointmentContent Unloading = 26
|
|
*/
|
|
Unloading?: AppointmentContent;
|
|
/**
|
|
* User being notified on this appointment
|
|
*
|
|
* @generated from protobuf field: repeated string Attendees = 27
|
|
*/
|
|
Attendees: string[];
|
|
/**
|
|
* Emails removed from the appointment
|
|
*
|
|
* @generated from protobuf field: repeated string RemovedAttendees = 28
|
|
*/
|
|
RemovedAttendees: string[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.AppointmentTriplet
|
|
*/
|
|
export interface AppointmentTriplet {
|
|
/**
|
|
* @generated from protobuf field: api.Appointment Current = 1
|
|
*/
|
|
Current?: Appointment;
|
|
/**
|
|
* @generated from protobuf field: api.Appointment Previous = 2
|
|
*/
|
|
Previous?: Appointment;
|
|
/**
|
|
* @generated from protobuf field: api.Appointment LastEvent = 3
|
|
*/
|
|
LastEvent?: Appointment;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Appointment$Type extends MessageType<Appointment> {
|
|
constructor() {
|
|
super("api.Appointment", [
|
|
{ no: 1, name: "LastEventHeader", kind: "message", localName: "LastEventHeader", jsonName: "LastEventHeader", T: () => EventHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentPayload }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Aggregation object message" } } });
|
|
}
|
|
create(value?: PartialMessage<Appointment>): Appointment {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Appointment>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Appointment): Appointment {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.EventHeader LastEventHeader */ 1:
|
|
message.LastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.LastEventHeader);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.AppointmentPayload Payload */ 3:
|
|
message.Payload = AppointmentPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
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: Appointment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.EventHeader LastEventHeader = 1; */
|
|
if (message.LastEventHeader)
|
|
EventHeader.internalBinaryWrite(message.LastEventHeader, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.EntityID ID = 2; */
|
|
if (message.ID)
|
|
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentPayload Payload = 3; */
|
|
if (message.Payload)
|
|
AppointmentPayload.internalBinaryWrite(message.Payload, 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.Appointment
|
|
*/
|
|
export const Appointment = new Appointment$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
|
constructor() {
|
|
super("api.AppointmentPayload", [
|
|
{ no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "api.kpiItems": { Items: [{ Context: "Appointment", Group: "appointment", Queryable: true }] } } },
|
|
{ no: 2, name: "Commissions", kind: "message", localName: "Commissions", jsonName: "Commissions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AppointmentCommission, options: { "validate.rules": { repeated: { maxItems: "0" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Deprecated field, to be removed. Use Loading and Unloading fields instead", readOnly: true } } },
|
|
{ no: 4, name: "SegmentationSelections", kind: "message", localName: "SegmentationSelections", jsonName: "SegmentationSelections", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SegmentationSelection },
|
|
{ no: 19, name: "CarrierInformation", kind: "message", localName: "CarrierInformation", jsonName: "CarrierInformation", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Carrier information metadata" }, "api.metadata": true, "api.aggKey": "Key", "api.parentEntity": "Appointment" } },
|
|
{ no: 6, name: "Slot", kind: "message", localName: "Slot", jsonName: "Slot", T: () => Slot },
|
|
{ no: 7, name: "Emails", kind: "scalar", localName: "Emails", jsonName: "Emails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "0", items: { string: { email: true, ignoreEmpty: true } } } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Deprecated field, to be removed. Use Attendees field instead", readOnly: true }, "api.aggSkip": "EmailsRemoved,EmailsAdded" } },
|
|
{ no: 16, name: "RemovedEmails", kind: "scalar", localName: "RemovedEmails", jsonName: "RemovedEmails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { maxItems: "0" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Deprecated field, to be removed. Use RemovedAttendees field instead", readOnly: true }, "api.aggSkip": "EmailsRemoved" } },
|
|
{ no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Status of the appointment" }, "api.aggSkip": "StatusUpdated" } },
|
|
{ no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { dateIso8601: true } }, "api.kpiItems": { Items: [{ Context: "Appointment", Group: "appointment", Queryable: true }] }, "api.viewType": { Types: [{ Context: "*", Type: "date" }] } } },
|
|
{ no: 10, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Metadata are characteristics specific to the site. They can be of several data form (string, integer, float, boolean or timestamp)" }, "api.metadata": true, "api.aggKey": "Key", "api.parentEntity": "Appointment" } },
|
|
{ no: 13, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Number of attachments per type" }, "api.aggSkip": "AttachmentAdded,AttachmentRemoved" } },
|
|
{ no: 14, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Total number of attachments" } } },
|
|
{ no: 17, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/, options: { "api.kpiItems": { Items: [{ Context: "Appointment", Group: "appointment", Queryable: true }] } } },
|
|
{ no: 18, name: "InstructionAck", kind: "scalar", localName: "InstructionAck", jsonName: "InstructionAck", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 20, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "api.aggSkip": "Created,Canceled,SlotUpdated,CommissionsUpdated,CarrierInformationUpdated,CarrierExpected,AllocationError,CarrierArrived,LoadingStarted,LoadingCompleted,UnloadingStarted,UnloadingCompleted,CarrierDeparted,MetaDataUpdated,AttachmentAdded,AttachmentRemoved,EmailsAdded,EmailsRemoved,Sanitised,CustomFieldsUpdated" } },
|
|
{ no: 21, name: "Address", kind: "message", localName: "Address", jsonName: "Address", T: () => Address },
|
|
{ no: 22, name: "SiteName", kind: "scalar", localName: "SiteName", jsonName: "SiteName", T: 9 /*ScalarType.STRING*/, options: { "api.kpiItems": { Items: [{ Context: "Appointment", Group: "appointment", Queryable: true }] } } },
|
|
{ no: 24, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 25, name: "Loading", kind: "message", localName: "Loading", jsonName: "Loading", T: () => AppointmentContent },
|
|
{ no: 26, name: "Unloading", kind: "message", localName: "Unloading", jsonName: "Unloading", T: () => AppointmentContent },
|
|
{ no: 27, name: "Attendees", kind: "scalar", localName: "Attendees", jsonName: "Attendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { minItems: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Attendees of the appointment" }, "api.aggSkip": "AttendeesAdded", "api.viewType": { Types: [{ Context: "*", Type: "user" }] } } },
|
|
{ no: 28, name: "RemovedAttendees", kind: "scalar", localName: "RemovedAttendees", jsonName: "RemovedAttendees", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true }, "api.aggSkip": "AttendeesRemoved", "api.viewType": { Types: [{ Context: "*", Type: "user" }] } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["AppointmentType", "Segmentations"] } } });
|
|
}
|
|
create(value?: PartialMessage<AppointmentPayload>): AppointmentPayload {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.AppointmentType = 0;
|
|
message.Commissions = [];
|
|
message.SegmentationSelections = [];
|
|
message.CarrierInformation = [];
|
|
message.Emails = [];
|
|
message.RemovedEmails = [];
|
|
message.CreationDate = "";
|
|
message.MetaData = [];
|
|
message.Attachments = [];
|
|
message.AttachmentNumber = 0;
|
|
message.Reason = "";
|
|
message.InstructionAck = false;
|
|
message.ActorID = "";
|
|
message.SiteName = "";
|
|
message.TimeZone = "";
|
|
message.Attendees = [];
|
|
message.RemovedAttendees = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentPayload): AppointmentPayload {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.AppointmentType AppointmentType */ 1:
|
|
message.AppointmentType = reader.int32();
|
|
break;
|
|
case /* repeated api.AppointmentCommission Commissions = 2 [deprecated = true] */ 2:
|
|
message.Commissions.push(AppointmentCommission.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.SegmentationSelection SegmentationSelections */ 4:
|
|
message.SegmentationSelections.push(SegmentationSelection.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.MetadataElement CarrierInformation */ 19:
|
|
message.CarrierInformation.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.Slot Slot */ 6:
|
|
message.Slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.Slot);
|
|
break;
|
|
case /* repeated string Emails = 7 [deprecated = true] */ 7:
|
|
message.Emails.push(reader.string());
|
|
break;
|
|
case /* repeated string RemovedEmails = 16 [deprecated = true] */ 16:
|
|
message.RemovedEmails.push(reader.string());
|
|
break;
|
|
case /* api.AppointmentStatusStruct Status */ 8:
|
|
message.Status = AppointmentStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
|
|
break;
|
|
case /* string CreationDate */ 9:
|
|
message.CreationDate = reader.string();
|
|
break;
|
|
case /* repeated api.MetadataElement MetaData */ 10:
|
|
message.MetaData.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.AttachmentSummary Attachments */ 13:
|
|
message.Attachments.push(AttachmentSummary.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* int32 AttachmentNumber */ 14:
|
|
message.AttachmentNumber = reader.int32();
|
|
break;
|
|
case /* string Reason */ 17:
|
|
message.Reason = reader.string();
|
|
break;
|
|
case /* bool InstructionAck */ 18:
|
|
message.InstructionAck = reader.bool();
|
|
break;
|
|
case /* string ActorID = 20 [deprecated = true] */ 20:
|
|
message.ActorID = reader.string();
|
|
break;
|
|
case /* api.Address Address */ 21:
|
|
message.Address = Address.internalBinaryRead(reader, reader.uint32(), options, message.Address);
|
|
break;
|
|
case /* string SiteName */ 22:
|
|
message.SiteName = reader.string();
|
|
break;
|
|
case /* string TimeZone */ 24:
|
|
message.TimeZone = reader.string();
|
|
break;
|
|
case /* api.AppointmentContent Loading */ 25:
|
|
message.Loading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Loading);
|
|
break;
|
|
case /* api.AppointmentContent Unloading */ 26:
|
|
message.Unloading = AppointmentContent.internalBinaryRead(reader, reader.uint32(), options, message.Unloading);
|
|
break;
|
|
case /* repeated string Attendees */ 27:
|
|
message.Attendees.push(reader.string());
|
|
break;
|
|
case /* repeated string RemovedAttendees */ 28:
|
|
message.RemovedAttendees.push(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: AppointmentPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.AppointmentType AppointmentType = 1; */
|
|
if (message.AppointmentType !== 0)
|
|
writer.tag(1, WireType.Varint).int32(message.AppointmentType);
|
|
/* repeated api.AppointmentCommission Commissions = 2 [deprecated = true]; */
|
|
for (let i = 0; i < message.Commissions.length; i++)
|
|
AppointmentCommission.internalBinaryWrite(message.Commissions[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.SegmentationSelection SegmentationSelections = 4; */
|
|
for (let i = 0; i < message.SegmentationSelections.length; i++)
|
|
SegmentationSelection.internalBinaryWrite(message.SegmentationSelections[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Slot Slot = 6; */
|
|
if (message.Slot)
|
|
Slot.internalBinaryWrite(message.Slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string Emails = 7 [deprecated = true]; */
|
|
for (let i = 0; i < message.Emails.length; i++)
|
|
writer.tag(7, WireType.LengthDelimited).string(message.Emails[i]);
|
|
/* api.AppointmentStatusStruct Status = 8; */
|
|
if (message.Status)
|
|
AppointmentStatusStruct.internalBinaryWrite(message.Status, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
|
/* string CreationDate = 9; */
|
|
if (message.CreationDate !== "")
|
|
writer.tag(9, WireType.LengthDelimited).string(message.CreationDate);
|
|
/* repeated api.MetadataElement MetaData = 10; */
|
|
for (let i = 0; i < message.MetaData.length; i++)
|
|
MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.AttachmentSummary Attachments = 13; */
|
|
for (let i = 0; i < message.Attachments.length; i++)
|
|
AttachmentSummary.internalBinaryWrite(message.Attachments[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
/* int32 AttachmentNumber = 14; */
|
|
if (message.AttachmentNumber !== 0)
|
|
writer.tag(14, WireType.Varint).int32(message.AttachmentNumber);
|
|
/* repeated string RemovedEmails = 16 [deprecated = true]; */
|
|
for (let i = 0; i < message.RemovedEmails.length; i++)
|
|
writer.tag(16, WireType.LengthDelimited).string(message.RemovedEmails[i]);
|
|
/* string Reason = 17; */
|
|
if (message.Reason !== "")
|
|
writer.tag(17, WireType.LengthDelimited).string(message.Reason);
|
|
/* bool InstructionAck = 18; */
|
|
if (message.InstructionAck !== false)
|
|
writer.tag(18, WireType.Varint).bool(message.InstructionAck);
|
|
/* repeated api.MetadataElement CarrierInformation = 19; */
|
|
for (let i = 0; i < message.CarrierInformation.length; i++)
|
|
MetadataElement.internalBinaryWrite(message.CarrierInformation[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
/* string ActorID = 20 [deprecated = true]; */
|
|
if (message.ActorID !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.ActorID);
|
|
/* api.Address Address = 21; */
|
|
if (message.Address)
|
|
Address.internalBinaryWrite(message.Address, writer.tag(21, WireType.LengthDelimited).fork(), options).join();
|
|
/* string SiteName = 22; */
|
|
if (message.SiteName !== "")
|
|
writer.tag(22, WireType.LengthDelimited).string(message.SiteName);
|
|
/* string TimeZone = 24; */
|
|
if (message.TimeZone !== "")
|
|
writer.tag(24, WireType.LengthDelimited).string(message.TimeZone);
|
|
/* api.AppointmentContent Loading = 25; */
|
|
if (message.Loading)
|
|
AppointmentContent.internalBinaryWrite(message.Loading, writer.tag(25, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentContent Unloading = 26; */
|
|
if (message.Unloading)
|
|
AppointmentContent.internalBinaryWrite(message.Unloading, writer.tag(26, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string Attendees = 27; */
|
|
for (let i = 0; i < message.Attendees.length; i++)
|
|
writer.tag(27, WireType.LengthDelimited).string(message.Attendees[i]);
|
|
/* repeated string RemovedAttendees = 28; */
|
|
for (let i = 0; i < message.RemovedAttendees.length; i++)
|
|
writer.tag(28, WireType.LengthDelimited).string(message.RemovedAttendees[i]);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AppointmentPayload
|
|
*/
|
|
export const AppointmentPayload = new AppointmentPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentTriplet$Type extends MessageType<AppointmentTriplet> {
|
|
constructor() {
|
|
super("api.AppointmentTriplet", [
|
|
{ no: 1, name: "Current", kind: "message", localName: "Current", jsonName: "Current", T: () => Appointment },
|
|
{ no: 2, name: "Previous", kind: "message", localName: "Previous", jsonName: "Previous", T: () => Appointment },
|
|
{ no: 3, name: "LastEvent", kind: "message", localName: "LastEvent", jsonName: "LastEvent", T: () => Appointment }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<AppointmentTriplet>): AppointmentTriplet {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentTriplet>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentTriplet): AppointmentTriplet {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Appointment Current */ 1:
|
|
message.Current = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.Current);
|
|
break;
|
|
case /* api.Appointment Previous */ 2:
|
|
message.Previous = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.Previous);
|
|
break;
|
|
case /* api.Appointment LastEvent */ 3:
|
|
message.LastEvent = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.LastEvent);
|
|
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: AppointmentTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Appointment Current = 1; */
|
|
if (message.Current)
|
|
Appointment.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Appointment Previous = 2; */
|
|
if (message.Previous)
|
|
Appointment.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Appointment LastEvent = 3; */
|
|
if (message.LastEvent)
|
|
Appointment.internalBinaryWrite(message.LastEvent, 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.AppointmentTriplet
|
|
*/
|
|
export const AppointmentTriplet = new AppointmentTriplet$Type();
|