You've already forked npm-core-sdk
Latest generation
This commit is contained in:
111
appointment.ts
111
appointment.ts
@@ -10,7 +10,7 @@ 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 { QuantityByUnit } from "./slotbooking";
|
||||
import { AppointmentContent } from "./slotbooking";
|
||||
import { Address } from "./repositoryShared";
|
||||
import { AttachmentSummary } from "./shared";
|
||||
import { AppointmentStatusStruct } from "./collabShared";
|
||||
@@ -56,9 +56,10 @@ export interface AppointmentPayload {
|
||||
AppointmentType: AppointmentType;
|
||||
/**
|
||||
* List of the orders and projects for which the appointment is made, with the quantities
|
||||
* TODO ??
|
||||
* TODO Remove after upgrade model
|
||||
*
|
||||
* @generated from protobuf field: repeated api.AppointmentCommission Commissions = 2
|
||||
* @deprecated
|
||||
* @generated from protobuf field: repeated api.AppointmentCommission Commissions = 2 [deprecated = true]
|
||||
*/
|
||||
Commissions: AppointmentCommission[];
|
||||
/**
|
||||
@@ -83,13 +84,15 @@ export interface AppointmentPayload {
|
||||
* User mails being notified on this appointment
|
||||
* TODO Need to add a structure to store platform user identifiers which can act on this appointment ?
|
||||
*
|
||||
* @generated from protobuf field: repeated string Emails = 7
|
||||
* @deprecated
|
||||
* @generated from protobuf field: repeated string Emails = 7 [deprecated = true]
|
||||
*/
|
||||
Emails: string[];
|
||||
/**
|
||||
* Emails removed from the appointment
|
||||
*
|
||||
* @generated from protobuf field: repeated string RemovedEmails = 16
|
||||
* @deprecated
|
||||
* @generated from protobuf field: repeated string RemovedEmails = 16 [deprecated = true]
|
||||
*/
|
||||
RemovedEmails: string[];
|
||||
/**
|
||||
@@ -134,7 +137,8 @@ export interface AppointmentPayload {
|
||||
/**
|
||||
* Empty attribute, just used for inpout api payloads to resolve the site resource from project context with actor alias
|
||||
*
|
||||
* @generated from protobuf field: string ActorID = 20
|
||||
* @deprecated
|
||||
* @generated from protobuf field: string ActorID = 20 [deprecated = true]
|
||||
*/
|
||||
ActorID: string;
|
||||
/**
|
||||
@@ -149,18 +153,39 @@ export interface AppointmentPayload {
|
||||
* @generated from protobuf field: string SiteName = 22
|
||||
*/
|
||||
SiteName: string;
|
||||
/**
|
||||
* Total volumetry in all commissions inside the truck.
|
||||
*
|
||||
* @generated from protobuf field: repeated api.QuantityByUnit TotalQuantities = 23
|
||||
*/
|
||||
TotalQuantities: QuantityByUnit[];
|
||||
// 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
|
||||
@@ -244,12 +269,12 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
constructor() {
|
||||
super("api.AppointmentPayload", [
|
||||
{ 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: 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" } },
|
||||
{ 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: { minItems: "1", items: { string: { email: true, ignoreEmpty: true } } } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Must be a valid email address", example: "[\"John.doe@reflex.com\", \"will.smith@reflex.com\"]" }, "api.aggSkip": "EmailsRemoved,EmailsAdded" } },
|
||||
{ no: 16, name: "RemovedEmails", kind: "scalar", localName: "RemovedEmails", jsonName: "RemovedEmails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true }, "api.aggSkip": "EmailsRemoved" } },
|
||||
{ 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.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" } },
|
||||
@@ -260,8 +285,11 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
{ 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*/ },
|
||||
{ no: 23, name: "TotalQuantities", kind: "message", localName: "TotalQuantities", jsonName: "TotalQuantities", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuantityByUnit },
|
||||
{ no: 24, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/ }
|
||||
{ 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 {
|
||||
@@ -280,8 +308,9 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
message.InstructionAck = false;
|
||||
message.ActorID = "";
|
||||
message.SiteName = "";
|
||||
message.TotalQuantities = [];
|
||||
message.TimeZone = "";
|
||||
message.Attendees = [];
|
||||
message.RemovedAttendees = [];
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<AppointmentPayload>(this, message, value);
|
||||
return message;
|
||||
@@ -294,7 +323,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
case /* api.AppointmentType AppointmentType */ 1:
|
||||
message.AppointmentType = reader.int32();
|
||||
break;
|
||||
case /* repeated api.AppointmentCommission Commissions */ 2:
|
||||
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:
|
||||
@@ -306,10 +335,10 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
case /* api.Slot Slot */ 6:
|
||||
message.Slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.Slot);
|
||||
break;
|
||||
case /* repeated string Emails */ 7:
|
||||
case /* repeated string Emails = 7 [deprecated = true] */ 7:
|
||||
message.Emails.push(reader.string());
|
||||
break;
|
||||
case /* repeated string RemovedEmails */ 16:
|
||||
case /* repeated string RemovedEmails = 16 [deprecated = true] */ 16:
|
||||
message.RemovedEmails.push(reader.string());
|
||||
break;
|
||||
case /* api.AppointmentStatusStruct Status */ 8:
|
||||
@@ -333,7 +362,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
case /* bool InstructionAck */ 18:
|
||||
message.InstructionAck = reader.bool();
|
||||
break;
|
||||
case /* string ActorID */ 20:
|
||||
case /* string ActorID = 20 [deprecated = true] */ 20:
|
||||
message.ActorID = reader.string();
|
||||
break;
|
||||
case /* api.Address Address */ 21:
|
||||
@@ -342,12 +371,21 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
case /* string SiteName */ 22:
|
||||
message.SiteName = reader.string();
|
||||
break;
|
||||
case /* repeated api.QuantityByUnit TotalQuantities */ 23:
|
||||
message.TotalQuantities.push(QuantityByUnit.internalBinaryRead(reader, reader.uint32(), options));
|
||||
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")
|
||||
@@ -363,7 +401,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
/* api.AppointmentType AppointmentType = 1; */
|
||||
if (message.AppointmentType !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.AppointmentType);
|
||||
/* repeated api.AppointmentCommission Commissions = 2; */
|
||||
/* 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; */
|
||||
@@ -372,7 +410,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
/* api.Slot Slot = 6; */
|
||||
if (message.Slot)
|
||||
Slot.internalBinaryWrite(message.Slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated string Emails = 7; */
|
||||
/* 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; */
|
||||
@@ -390,7 +428,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
/* int32 AttachmentNumber = 14; */
|
||||
if (message.AttachmentNumber !== 0)
|
||||
writer.tag(14, WireType.Varint).int32(message.AttachmentNumber);
|
||||
/* repeated string RemovedEmails = 16; */
|
||||
/* 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; */
|
||||
@@ -402,7 +440,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
/* 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; */
|
||||
/* string ActorID = 20 [deprecated = true]; */
|
||||
if (message.ActorID !== "")
|
||||
writer.tag(20, WireType.LengthDelimited).string(message.ActorID);
|
||||
/* api.Address Address = 21; */
|
||||
@@ -411,12 +449,21 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
/* string SiteName = 22; */
|
||||
if (message.SiteName !== "")
|
||||
writer.tag(22, WireType.LengthDelimited).string(message.SiteName);
|
||||
/* repeated api.QuantityByUnit TotalQuantities = 23; */
|
||||
for (let i = 0; i < message.TotalQuantities.length; i++)
|
||||
QuantityByUnit.internalBinaryWrite(message.TotalQuantities[i], writer.tag(23, WireType.LengthDelimited).fork(), options).join();
|
||||
/* 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);
|
||||
|
||||
Reference in New Issue
Block a user