You've already forked npm-core-sdk
685 lines
37 KiB
TypeScript
685 lines
37 KiB
TypeScript
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
|
// @generated from protobuf file "appointmentAction.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 { Address } from "./repositoryShared";
|
|
import { EntityID } from "./shared";
|
|
import { CommandHeader } from "./shared";
|
|
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";
|
|
// Action Summary
|
|
// - Notify : Push appointment to project present into the commissions
|
|
|
|
/**
|
|
*
|
|
* Notify : Push the appointment event to partner apps
|
|
*
|
|
* @generated from protobuf message api.AppointmentNotifyPayload
|
|
*/
|
|
export interface AppointmentNotifyPayload {
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentType AppointmentType = 1
|
|
*/
|
|
AppointmentType: AppointmentType;
|
|
/**
|
|
* @generated from protobuf field: repeated api.AppointmentCommission Commissions = 2
|
|
*/
|
|
Commissions: AppointmentCommission[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 4
|
|
*/
|
|
SegmentationSelections: SegmentationSelection[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.MetadataElement CarrierInformation = 19
|
|
*/
|
|
CarrierInformation: MetadataElement[];
|
|
/**
|
|
* @generated from protobuf field: api.Slot Slot = 6
|
|
*/
|
|
Slot?: Slot;
|
|
/**
|
|
* @generated from protobuf field: repeated string Emails = 7
|
|
*/
|
|
Emails: string[];
|
|
/**
|
|
* @generated from protobuf field: repeated string RemovedEmails = 16
|
|
*/
|
|
RemovedEmails: string[];
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentStatusStruct Status = 8
|
|
*/
|
|
Status?: AppointmentStatusStruct;
|
|
/**
|
|
* @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;
|
|
/**
|
|
* @generated from protobuf field: string Reason = 17
|
|
*/
|
|
Reason: string;
|
|
/**
|
|
* @generated from protobuf field: bool InstructionAck = 18
|
|
*/
|
|
InstructionAck: boolean;
|
|
/**
|
|
* @generated from protobuf field: string TimeZone = 20
|
|
*/
|
|
TimeZone: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.AppointmentNotify
|
|
*/
|
|
export interface AppointmentNotify {
|
|
/**
|
|
* option (triggerEventFilters) = "All";
|
|
*
|
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
|
*/
|
|
Header?: CommandHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentNotifyPayload Payload = 3
|
|
*/
|
|
Payload?: AppointmentNotifyPayload;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentNotifyPayload EventPayload = 4
|
|
*/
|
|
EventPayload?: AppointmentNotifyPayload;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentNotifyPayload PreviousPayload = 5
|
|
*/
|
|
PreviousPayload?: AppointmentNotifyPayload;
|
|
}
|
|
/**
|
|
*
|
|
* Mail : Push the appointment event to watchers
|
|
*
|
|
* @generated from protobuf message api.AppointmentMailPayload
|
|
*/
|
|
export interface AppointmentMailPayload {
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentType AppointmentType = 1
|
|
*/
|
|
AppointmentType: AppointmentType;
|
|
/**
|
|
* @generated from protobuf field: repeated api.AppointmentCommission Commissions = 2
|
|
*/
|
|
Commissions: AppointmentCommission[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 4
|
|
*/
|
|
SegmentationSelections: SegmentationSelection[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.MetadataElement CarrierInformation = 19
|
|
*/
|
|
CarrierInformation: MetadataElement[];
|
|
/**
|
|
* @generated from protobuf field: api.Slot Slot = 6
|
|
*/
|
|
Slot?: Slot;
|
|
/**
|
|
* @generated from protobuf field: repeated string Emails = 7
|
|
*/
|
|
Emails: string[];
|
|
/**
|
|
* @generated from protobuf field: repeated string RemovedEmails = 16
|
|
*/
|
|
RemovedEmails: string[];
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentStatusStruct Status = 8
|
|
*/
|
|
Status?: AppointmentStatusStruct;
|
|
/**
|
|
* @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;
|
|
/**
|
|
* @generated from protobuf field: string Reason = 17
|
|
*/
|
|
Reason: string;
|
|
/**
|
|
* Address of the appointment site
|
|
*
|
|
* @generated from protobuf field: api.Address Address = 18
|
|
*/
|
|
Address?: Address;
|
|
/**
|
|
* Name of the appointment site
|
|
*
|
|
* @generated from protobuf field: string SiteName = 20
|
|
*/
|
|
SiteName: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.AppointmentMail
|
|
*/
|
|
export interface AppointmentMail {
|
|
/**
|
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
|
*/
|
|
Header?: CommandHeader;
|
|
/**
|
|
* @generated from protobuf field: api.EntityID ID = 2
|
|
*/
|
|
ID?: EntityID;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentMailPayload Payload = 3
|
|
*/
|
|
Payload?: AppointmentMailPayload;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentMailPayload EventPayload = 4
|
|
*/
|
|
EventPayload?: AppointmentMailPayload;
|
|
/**
|
|
* @generated from protobuf field: api.AppointmentMailPayload PreviousPayload = 5
|
|
*/
|
|
PreviousPayload?: AppointmentMailPayload;
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentNotifyPayload$Type extends MessageType<AppointmentNotifyPayload> {
|
|
constructor() {
|
|
super("api.AppointmentNotifyPayload", [
|
|
{ no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType] },
|
|
{ no: 2, name: "Commissions", kind: "message", localName: "Commissions", jsonName: "Commissions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AppointmentCommission },
|
|
{ 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 },
|
|
{ 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*/ },
|
|
{ no: 16, name: "RemovedEmails", kind: "scalar", localName: "RemovedEmails", jsonName: "RemovedEmails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct },
|
|
{ no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 10, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement },
|
|
{ no: 13, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary },
|
|
{ no: 14, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ },
|
|
{ no: 17, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 18, name: "InstructionAck", kind: "scalar", localName: "InstructionAck", jsonName: "InstructionAck", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 20, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/ }
|
|
], { "api.messageType": "Command", "api.payload": true, "api.action": "Notify" });
|
|
}
|
|
create(value?: PartialMessage<AppointmentNotifyPayload>): AppointmentNotifyPayload {
|
|
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.TimeZone = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentNotifyPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentNotifyPayload): AppointmentNotifyPayload {
|
|
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:
|
|
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:
|
|
message.Emails.push(reader.string());
|
|
break;
|
|
case /* repeated string RemovedEmails */ 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 TimeZone */ 20:
|
|
message.TimeZone = 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: AppointmentNotifyPayload, 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; */
|
|
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; */
|
|
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; */
|
|
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 TimeZone = 20; */
|
|
if (message.TimeZone !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.TimeZone);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AppointmentNotifyPayload
|
|
*/
|
|
export const AppointmentNotifyPayload = new AppointmentNotifyPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentNotify$Type extends MessageType<AppointmentNotify> {
|
|
constructor() {
|
|
super("api.AppointmentNotify", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentNotifyPayload },
|
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => AppointmentNotifyPayload },
|
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => AppointmentNotifyPayload }
|
|
], { "api.messageType": "Command", "api.action": "Notify" });
|
|
}
|
|
create(value?: PartialMessage<AppointmentNotify>): AppointmentNotify {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentNotify>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentNotify): AppointmentNotify {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CommandHeader Header */ 1:
|
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.AppointmentNotifyPayload Payload */ 3:
|
|
message.Payload = AppointmentNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
break;
|
|
case /* api.AppointmentNotifyPayload EventPayload */ 4:
|
|
message.EventPayload = AppointmentNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
|
break;
|
|
case /* api.AppointmentNotifyPayload PreviousPayload */ 5:
|
|
message.PreviousPayload = AppointmentNotifyPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
|
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: AppointmentNotify, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CommandHeader Header = 1; */
|
|
if (message.Header)
|
|
CommandHeader.internalBinaryWrite(message.Header, 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.AppointmentNotifyPayload Payload = 3; */
|
|
if (message.Payload)
|
|
AppointmentNotifyPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentNotifyPayload EventPayload = 4; */
|
|
if (message.EventPayload)
|
|
AppointmentNotifyPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentNotifyPayload PreviousPayload = 5; */
|
|
if (message.PreviousPayload)
|
|
AppointmentNotifyPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.AppointmentNotify
|
|
*/
|
|
export const AppointmentNotify = new AppointmentNotify$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentMailPayload$Type extends MessageType<AppointmentMailPayload> {
|
|
constructor() {
|
|
super("api.AppointmentMailPayload", [
|
|
{ no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType] },
|
|
{ no: 2, name: "Commissions", kind: "message", localName: "Commissions", jsonName: "Commissions", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AppointmentCommission },
|
|
{ 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 },
|
|
{ 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*/ },
|
|
{ no: 16, name: "RemovedEmails", kind: "scalar", localName: "RemovedEmails", jsonName: "RemovedEmails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct },
|
|
{ no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 10, name: "MetaData", kind: "message", localName: "MetaData", jsonName: "MetaData", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement },
|
|
{ no: 13, name: "Attachments", kind: "message", localName: "Attachments", jsonName: "Attachments", repeat: 2 /*RepeatType.UNPACKED*/, T: () => AttachmentSummary },
|
|
{ no: 14, name: "AttachmentNumber", kind: "scalar", localName: "AttachmentNumber", jsonName: "AttachmentNumber", T: 5 /*ScalarType.INT32*/ },
|
|
{ no: 17, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 18, name: "Address", kind: "message", localName: "Address", jsonName: "Address", T: () => Address },
|
|
{ no: 20, name: "SiteName", kind: "scalar", localName: "SiteName", jsonName: "SiteName", T: 9 /*ScalarType.STRING*/ }
|
|
], { "api.messageType": "Command", "api.payload": true, "api.action": "Mail" });
|
|
}
|
|
create(value?: PartialMessage<AppointmentMailPayload>): AppointmentMailPayload {
|
|
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.SiteName = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentMailPayload>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentMailPayload): AppointmentMailPayload {
|
|
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:
|
|
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:
|
|
message.Emails.push(reader.string());
|
|
break;
|
|
case /* repeated string RemovedEmails */ 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 /* api.Address Address */ 18:
|
|
message.Address = Address.internalBinaryRead(reader, reader.uint32(), options, message.Address);
|
|
break;
|
|
case /* string SiteName */ 20:
|
|
message.SiteName = 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: AppointmentMailPayload, 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; */
|
|
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; */
|
|
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; */
|
|
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);
|
|
/* api.Address Address = 18; */
|
|
if (message.Address)
|
|
Address.internalBinaryWrite(message.Address, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
/* 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 SiteName = 20; */
|
|
if (message.SiteName !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.SiteName);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.AppointmentMailPayload
|
|
*/
|
|
export const AppointmentMailPayload = new AppointmentMailPayload$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class AppointmentMail$Type extends MessageType<AppointmentMail> {
|
|
constructor() {
|
|
super("api.AppointmentMail", [
|
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => AppointmentMailPayload },
|
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => AppointmentMailPayload },
|
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => AppointmentMailPayload }
|
|
], { "api.messageType": "Command", "api.action": "Mail", "api.resultingEvent": "collab.notif.Created", "api.triggerEventFilters": "Created,EmailsAdded,SlotUpdated,Canceled" });
|
|
}
|
|
create(value?: PartialMessage<AppointmentMail>): AppointmentMail {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<AppointmentMail>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AppointmentMail): AppointmentMail {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.CommandHeader Header */ 1:
|
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
|
break;
|
|
case /* api.EntityID ID */ 2:
|
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
|
break;
|
|
case /* api.AppointmentMailPayload Payload */ 3:
|
|
message.Payload = AppointmentMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
|
break;
|
|
case /* api.AppointmentMailPayload EventPayload */ 4:
|
|
message.EventPayload = AppointmentMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
|
break;
|
|
case /* api.AppointmentMailPayload PreviousPayload */ 5:
|
|
message.PreviousPayload = AppointmentMailPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
|
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: AppointmentMail, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.CommandHeader Header = 1; */
|
|
if (message.Header)
|
|
CommandHeader.internalBinaryWrite(message.Header, 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.AppointmentMailPayload Payload = 3; */
|
|
if (message.Payload)
|
|
AppointmentMailPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentMailPayload EventPayload = 4; */
|
|
if (message.EventPayload)
|
|
AppointmentMailPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentMailPayload PreviousPayload = 5; */
|
|
if (message.PreviousPayload)
|
|
AppointmentMailPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.AppointmentMail
|
|
*/
|
|
export const AppointmentMail = new AppointmentMail$Type();
|