You've already forked npm-core-sdk
Latest generation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// @generated by protobuf-ts 2.10.0 with parameter use_proto_field_name
|
||||
// @generated by protobuf-ts 2.11.0 with parameter use_proto_field_name
|
||||
// @generated from protobuf file "appointment.proto" (package "api", syntax proto3)
|
||||
// tslint:disable
|
||||
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||
@@ -30,15 +30,15 @@ import { EventHeader } from "./shared";
|
||||
*/
|
||||
export interface Appointment {
|
||||
/**
|
||||
* @generated from protobuf field: api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];
|
||||
* @generated from protobuf field: api.EventHeader LastEventHeader = 1
|
||||
*/
|
||||
LastEventHeader?: EventHeader;
|
||||
/**
|
||||
* @generated from protobuf field: api.EntityID ID = 2 [json_name = "ID"];
|
||||
* @generated from protobuf field: api.EntityID ID = 2
|
||||
*/
|
||||
ID?: EntityID;
|
||||
/**
|
||||
* @generated from protobuf field: api.AppointmentPayload Payload = 3 [json_name = "Payload"];
|
||||
* @generated from protobuf field: api.AppointmentPayload Payload = 3
|
||||
*/
|
||||
Payload?: AppointmentPayload;
|
||||
}
|
||||
@@ -49,57 +49,57 @@ export interface AppointmentPayload {
|
||||
/**
|
||||
* Type of appointment : Expedition / Reception / Both
|
||||
*
|
||||
* @generated from protobuf field: api.AppointmentType AppointmentType = 1 [json_name = "AppointmentType"];
|
||||
* @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 ??
|
||||
*
|
||||
* @generated from protobuf field: repeated api.Commission Commissions = 2 [json_name = "Commissions"];
|
||||
* @generated from protobuf field: repeated api.Commission Commissions = 2
|
||||
*/
|
||||
Commissions: Commission[];
|
||||
/**
|
||||
* Cumulative quantity for all the commissions
|
||||
*
|
||||
* @generated from protobuf field: repeated api.QuantityByUnit QuantitiesByUnits = 3 [json_name = "QuantitiesByUnits"];
|
||||
* @generated from protobuf field: repeated api.QuantityByUnit QuantitiesByUnits = 3
|
||||
*/
|
||||
QuantitiesByUnits: QuantityByUnit[];
|
||||
/**
|
||||
* Set of segmentation constraining the slot booking
|
||||
*
|
||||
* @generated from protobuf field: repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];
|
||||
* @generated from protobuf field: repeated api.Segmentation Segmentations = 4
|
||||
*/
|
||||
Segmentations: Segmentation[];
|
||||
/**
|
||||
* Required carrierInformation, some can be obligatory
|
||||
*
|
||||
* @generated from protobuf field: repeated api.CarrierInformationWithValue CarrierInformation = 5 [json_name = "CarrierInformation"];
|
||||
* @generated from protobuf field: repeated api.CarrierInformationWithValue CarrierInformation = 5
|
||||
*/
|
||||
CarrierInformation: CarrierInformationWithValue[];
|
||||
/**
|
||||
* The slot booked for the appointment
|
||||
*
|
||||
* @generated from protobuf field: api.Slot Slot = 6 [json_name = "Slot"];
|
||||
* @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 ?
|
||||
*
|
||||
* @generated from protobuf field: repeated string Emails = 7 [json_name = "Emails"];
|
||||
* @generated from protobuf field: repeated string Emails = 7
|
||||
*/
|
||||
Emails: string[];
|
||||
/**
|
||||
* Appointment Status and status history
|
||||
*
|
||||
* @generated from protobuf field: api.AppointmentStatusStruct Status = 8 [json_name = "Status"];
|
||||
* @generated from protobuf field: api.AppointmentStatusStruct Status = 8
|
||||
*/
|
||||
Status?: AppointmentStatusStruct;
|
||||
/**
|
||||
* Creation date of the appointment
|
||||
*
|
||||
* @generated from protobuf field: string CreationDate = 9 [json_name = "CreationDate"];
|
||||
* @generated from protobuf field: string CreationDate = 9
|
||||
*/
|
||||
CreationDate: string;
|
||||
}
|
||||
@@ -108,15 +108,15 @@ export interface AppointmentPayload {
|
||||
*/
|
||||
export interface AppointmentTriplet {
|
||||
/**
|
||||
* @generated from protobuf field: api.Appointment Current = 1 [json_name = "Current"];
|
||||
* @generated from protobuf field: api.Appointment Current = 1
|
||||
*/
|
||||
Current?: Appointment;
|
||||
/**
|
||||
* @generated from protobuf field: api.Appointment Previous = 2 [json_name = "Previous"];
|
||||
* @generated from protobuf field: api.Appointment Previous = 2
|
||||
*/
|
||||
Previous?: Appointment;
|
||||
/**
|
||||
* @generated from protobuf field: api.Appointment LastEvent = 3 [json_name = "LastEvent"];
|
||||
* @generated from protobuf field: api.Appointment LastEvent = 3
|
||||
*/
|
||||
LastEvent?: Appointment;
|
||||
}
|
||||
@@ -140,13 +140,13 @@ class Appointment$Type extends MessageType<Appointment> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"];*/ 1:
|
||||
case /* api.EventHeader LastEventHeader */ 1:
|
||||
message.LastEventHeader = EventHeader.internalBinaryRead(reader, reader.uint32(), options, message.LastEventHeader);
|
||||
break;
|
||||
case /* api.EntityID ID = 2 [json_name = "ID"];*/ 2:
|
||||
case /* api.EntityID ID */ 2:
|
||||
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
||||
break;
|
||||
case /* api.AppointmentPayload Payload = 3 [json_name = "Payload"];*/ 3:
|
||||
case /* api.AppointmentPayload Payload */ 3:
|
||||
message.Payload = AppointmentPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
||||
break;
|
||||
default:
|
||||
@@ -161,13 +161,13 @@ class Appointment$Type extends MessageType<Appointment> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: Appointment, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.EventHeader LastEventHeader = 1 [json_name = "LastEventHeader"]; */
|
||||
/* api.EventHeader LastEventHeader = 1; */
|
||||
if (message.LastEventHeader)
|
||||
EventHeader.internalBinaryWrite(message.LastEventHeader, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.EntityID ID = 2 [json_name = "ID"]; */
|
||||
/* api.EntityID ID = 2; */
|
||||
if (message.ID)
|
||||
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.AppointmentPayload Payload = 3 [json_name = "Payload"]; */
|
||||
/* api.AppointmentPayload Payload = 3; */
|
||||
if (message.Payload)
|
||||
AppointmentPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
@@ -193,7 +193,7 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
{ 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\"]" } } },
|
||||
{ no: 8, name: "Status", kind: "message", localName: "Status", jsonName: "Status", T: () => AppointmentStatusStruct, options: { "api.aggSkip": "StatusUpdated", "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Status of the appointment" } } },
|
||||
{ no: 9, name: "CreationDate", kind: "scalar", localName: "CreationDate", jsonName: "CreationDate", T: 9 /*ScalarType.STRING*/, options: { "api.viewType": { Types: [{ Context: "*", Type: "date" }] }, "validate.rules": { string: { dateIso8601: true } } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Segmentations"] } } });
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["AppointmentType", "Segmentations"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<AppointmentPayload>): AppointmentPayload {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
@@ -213,31 +213,31 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.AppointmentType AppointmentType = 1 [json_name = "AppointmentType"];*/ 1:
|
||||
case /* api.AppointmentType AppointmentType */ 1:
|
||||
message.AppointmentType = reader.int32();
|
||||
break;
|
||||
case /* repeated api.Commission Commissions = 2 [json_name = "Commissions"];*/ 2:
|
||||
case /* repeated api.Commission Commissions */ 2:
|
||||
message.Commissions.push(Commission.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.QuantityByUnit QuantitiesByUnits = 3 [json_name = "QuantitiesByUnits"];*/ 3:
|
||||
case /* repeated api.QuantityByUnit QuantitiesByUnits */ 3:
|
||||
message.QuantitiesByUnits.push(QuantityByUnit.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];*/ 4:
|
||||
case /* repeated api.Segmentation Segmentations */ 4:
|
||||
message.Segmentations.push(Segmentation.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.CarrierInformationWithValue CarrierInformation = 5 [json_name = "CarrierInformation"];*/ 5:
|
||||
case /* repeated api.CarrierInformationWithValue CarrierInformation */ 5:
|
||||
message.CarrierInformation.push(CarrierInformationWithValue.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* api.Slot Slot = 6 [json_name = "Slot"];*/ 6:
|
||||
case /* api.Slot Slot */ 6:
|
||||
message.Slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.Slot);
|
||||
break;
|
||||
case /* repeated string Emails = 7 [json_name = "Emails"];*/ 7:
|
||||
case /* repeated string Emails */ 7:
|
||||
message.Emails.push(reader.string());
|
||||
break;
|
||||
case /* api.AppointmentStatusStruct Status = 8 [json_name = "Status"];*/ 8:
|
||||
case /* api.AppointmentStatusStruct Status */ 8:
|
||||
message.Status = AppointmentStatusStruct.internalBinaryRead(reader, reader.uint32(), options, message.Status);
|
||||
break;
|
||||
case /* string CreationDate = 9 [json_name = "CreationDate"];*/ 9:
|
||||
case /* string CreationDate */ 9:
|
||||
message.CreationDate = reader.string();
|
||||
break;
|
||||
default:
|
||||
@@ -252,31 +252,31 @@ class AppointmentPayload$Type extends MessageType<AppointmentPayload> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: AppointmentPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.AppointmentType AppointmentType = 1 [json_name = "AppointmentType"]; */
|
||||
/* api.AppointmentType AppointmentType = 1; */
|
||||
if (message.AppointmentType !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.AppointmentType);
|
||||
/* repeated api.Commission Commissions = 2 [json_name = "Commissions"]; */
|
||||
/* repeated api.Commission Commissions = 2; */
|
||||
for (let i = 0; i < message.Commissions.length; i++)
|
||||
Commission.internalBinaryWrite(message.Commissions[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.QuantityByUnit QuantitiesByUnits = 3 [json_name = "QuantitiesByUnits"]; */
|
||||
/* repeated api.QuantityByUnit QuantitiesByUnits = 3; */
|
||||
for (let i = 0; i < message.QuantitiesByUnits.length; i++)
|
||||
QuantityByUnit.internalBinaryWrite(message.QuantitiesByUnits[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"]; */
|
||||
/* repeated api.Segmentation Segmentations = 4; */
|
||||
for (let i = 0; i < message.Segmentations.length; i++)
|
||||
Segmentation.internalBinaryWrite(message.Segmentations[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.CarrierInformationWithValue CarrierInformation = 5 [json_name = "CarrierInformation"]; */
|
||||
/* repeated api.CarrierInformationWithValue CarrierInformation = 5; */
|
||||
for (let i = 0; i < message.CarrierInformation.length; i++)
|
||||
CarrierInformationWithValue.internalBinaryWrite(message.CarrierInformation[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.Slot Slot = 6 [json_name = "Slot"]; */
|
||||
/* api.Slot Slot = 6; */
|
||||
if (message.Slot)
|
||||
Slot.internalBinaryWrite(message.Slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated string Emails = 7 [json_name = "Emails"]; */
|
||||
/* 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 [json_name = "Status"]; */
|
||||
/* api.AppointmentStatusStruct Status = 8; */
|
||||
if (message.Status)
|
||||
AppointmentStatusStruct.internalBinaryWrite(message.Status, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string CreationDate = 9 [json_name = "CreationDate"]; */
|
||||
/* string CreationDate = 9; */
|
||||
if (message.CreationDate !== "")
|
||||
writer.tag(9, WireType.LengthDelimited).string(message.CreationDate);
|
||||
let u = options.writeUnknownFields;
|
||||
@@ -309,13 +309,13 @@ class AppointmentTriplet$Type extends MessageType<AppointmentTriplet> {
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.Appointment Current = 1 [json_name = "Current"];*/ 1:
|
||||
case /* api.Appointment Current */ 1:
|
||||
message.Current = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.Current);
|
||||
break;
|
||||
case /* api.Appointment Previous = 2 [json_name = "Previous"];*/ 2:
|
||||
case /* api.Appointment Previous */ 2:
|
||||
message.Previous = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.Previous);
|
||||
break;
|
||||
case /* api.Appointment LastEvent = 3 [json_name = "LastEvent"];*/ 3:
|
||||
case /* api.Appointment LastEvent */ 3:
|
||||
message.LastEvent = Appointment.internalBinaryRead(reader, reader.uint32(), options, message.LastEvent);
|
||||
break;
|
||||
default:
|
||||
@@ -330,13 +330,13 @@ class AppointmentTriplet$Type extends MessageType<AppointmentTriplet> {
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: AppointmentTriplet, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.Appointment Current = 1 [json_name = "Current"]; */
|
||||
/* api.Appointment Current = 1; */
|
||||
if (message.Current)
|
||||
Appointment.internalBinaryWrite(message.Current, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.Appointment Previous = 2 [json_name = "Previous"]; */
|
||||
/* api.Appointment Previous = 2; */
|
||||
if (message.Previous)
|
||||
Appointment.internalBinaryWrite(message.Previous, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.Appointment LastEvent = 3 [json_name = "LastEvent"]; */
|
||||
/* api.Appointment LastEvent = 3; */
|
||||
if (message.LastEvent)
|
||||
Appointment.internalBinaryWrite(message.LastEvent, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
|
||||
Reference in New Issue
Block a user