You've already forked npm-core-sdk
Latest generation
This commit is contained in:
@@ -15,8 +15,8 @@ import { ResponseHeader } from "./shared";
|
||||
import { Slot } from "./slotbooking";
|
||||
import { EntityID } from "./shared";
|
||||
import { BookableSlot } from "./slotbooking";
|
||||
import { MetadataElement } from "./shared";
|
||||
import { AppointmentContent } from "./slotbooking";
|
||||
import { MetadataElement } from "./shared";
|
||||
import { SegmentationSelection } from "./slotbooking";
|
||||
import { AppointmentType } from "./slotbooking";
|
||||
import { RequestProjectHeader } from "./shared";
|
||||
@@ -38,10 +38,16 @@ export interface GetBookingSlotsRequest {
|
||||
AppointmentType: AppointmentType;
|
||||
/**
|
||||
* Set of segmentation constraining the slot booking
|
||||
* TODO delete after upgrade model
|
||||
*
|
||||
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 4
|
||||
* @deprecated
|
||||
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 4 [deprecated = true]
|
||||
*/
|
||||
SegmentationSelections: SegmentationSelection[];
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.MetadataElement SegmentationKeys = 14
|
||||
*/
|
||||
SegmentationKeys: MetadataElement[];
|
||||
/**
|
||||
* @generated from protobuf field: string StartDate = 5
|
||||
*/
|
||||
@@ -125,10 +131,16 @@ export interface BookAppointmentPayload {
|
||||
AppointmentType: AppointmentType;
|
||||
/**
|
||||
* Set of segmentation constraining the slot booking
|
||||
* TODO delete after upgrade model
|
||||
*
|
||||
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 2
|
||||
* @deprecated
|
||||
* @generated from protobuf field: repeated api.SegmentationSelection SegmentationSelections = 2 [deprecated = true]
|
||||
*/
|
||||
SegmentationSelections: SegmentationSelection[];
|
||||
/**
|
||||
* @generated from protobuf field: repeated api.MetadataElement SegmentationKeys = 14
|
||||
*/
|
||||
SegmentationKeys: MetadataElement[];
|
||||
/**
|
||||
* Carrier information metadata
|
||||
*
|
||||
@@ -451,6 +463,7 @@ class GetBookingSlotsRequest$Type extends MessageType<GetBookingSlotsRequest> {
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
||||
{ no: 4, name: "SegmentationSelections", kind: "message", localName: "SegmentationSelections", jsonName: "SegmentationSelections", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SegmentationSelection },
|
||||
{ no: 14, name: "SegmentationKeys", kind: "message", localName: "SegmentationKeys", jsonName: "SegmentationKeys", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Segmentation keys" }, "api.metadata": true, "api.aggKey": "Key" } },
|
||||
{ no: 5, name: "StartDate", kind: "scalar", localName: "StartDate", jsonName: "StartDate", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { pattern: "^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[a-zA-Z0-9-]+$" } } },
|
||||
{ no: 6, name: "EndDate", kind: "scalar", localName: "EndDate", jsonName: "EndDate", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { pattern: "^20[0-9]{2}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { pattern: "^[a-zA-Z0-9-]+$" } } },
|
||||
{ no: 7, name: "SkippedAppointmentIDs", kind: "scalar", localName: "SkippedAppointmentIDs", jsonName: "SkippedAppointmentIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
||||
@@ -458,12 +471,13 @@ class GetBookingSlotsRequest$Type extends MessageType<GetBookingSlotsRequest> {
|
||||
{ no: 11, name: "Unloading", kind: "message", localName: "Unloading", jsonName: "Unloading", T: () => AppointmentContent },
|
||||
{ no: 12, 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: 13, 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" } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AppointmentType", "SegmentationSelections"] } } });
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AppointmentType"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<GetBookingSlotsRequest>): GetBookingSlotsRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.AppointmentType = 0;
|
||||
message.SegmentationSelections = [];
|
||||
message.SegmentationKeys = [];
|
||||
message.StartDate = "";
|
||||
message.EndDate = "";
|
||||
message.SkippedAppointmentIDs = [];
|
||||
@@ -484,9 +498,12 @@ class GetBookingSlotsRequest$Type extends MessageType<GetBookingSlotsRequest> {
|
||||
case /* api.AppointmentType AppointmentType */ 2:
|
||||
message.AppointmentType = reader.int32();
|
||||
break;
|
||||
case /* repeated api.SegmentationSelection SegmentationSelections */ 4:
|
||||
case /* repeated api.SegmentationSelection SegmentationSelections = 4 [deprecated = true] */ 4:
|
||||
message.SegmentationSelections.push(SegmentationSelection.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.MetadataElement SegmentationKeys */ 14:
|
||||
message.SegmentationKeys.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* string StartDate */ 5:
|
||||
message.StartDate = reader.string();
|
||||
break;
|
||||
@@ -526,7 +543,7 @@ class GetBookingSlotsRequest$Type extends MessageType<GetBookingSlotsRequest> {
|
||||
/* api.AppointmentType AppointmentType = 2; */
|
||||
if (message.AppointmentType !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.AppointmentType);
|
||||
/* repeated api.SegmentationSelection SegmentationSelections = 4; */
|
||||
/* repeated api.SegmentationSelection SegmentationSelections = 4 [deprecated = true]; */
|
||||
for (let i = 0; i < message.SegmentationSelections.length; i++)
|
||||
SegmentationSelection.internalBinaryWrite(message.SegmentationSelections[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string StartDate = 5; */
|
||||
@@ -550,6 +567,9 @@ class GetBookingSlotsRequest$Type extends MessageType<GetBookingSlotsRequest> {
|
||||
/* repeated api.MetadataElement MetaData = 13; */
|
||||
for (let i = 0; i < message.MetaData.length; i++)
|
||||
MetadataElement.internalBinaryWrite(message.MetaData[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.MetadataElement SegmentationKeys = 14; */
|
||||
for (let i = 0; i < message.SegmentationKeys.length; i++)
|
||||
MetadataElement.internalBinaryWrite(message.SegmentationKeys[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -681,6 +701,7 @@ class BookAppointmentPayload$Type extends MessageType<BookAppointmentPayload> {
|
||||
super("api.BookAppointmentPayload", [
|
||||
{ no: 1, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
||||
{ no: 2, name: "SegmentationSelections", kind: "message", localName: "SegmentationSelections", jsonName: "SegmentationSelections", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SegmentationSelection },
|
||||
{ no: 14, name: "SegmentationKeys", kind: "message", localName: "SegmentationKeys", jsonName: "SegmentationKeys", repeat: 2 /*RepeatType.UNPACKED*/, T: () => MetadataElement, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Segmentation keys" }, "api.metadata": true, "api.aggKey": "Key" } },
|
||||
{ no: 3, 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: 4, name: "Slot", kind: "message", localName: "Slot", jsonName: "Slot", T: () => Slot },
|
||||
{ no: 6, 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" } },
|
||||
@@ -690,12 +711,13 @@ class BookAppointmentPayload$Type extends MessageType<BookAppointmentPayload> {
|
||||
{ no: 10, name: "Loading", kind: "message", localName: "Loading", jsonName: "Loading", T: () => AppointmentContent },
|
||||
{ no: 11, name: "Unloading", kind: "message", localName: "Unloading", jsonName: "Unloading", T: () => AppointmentContent },
|
||||
{ no: 13, 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\"]" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload", required: ["AppointmentType", "Slot", "SegmentationSelections", "CarrierInformation", "Attendees"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created" });
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "Event Payload", required: ["AppointmentType", "Slot", "CarrierInformation", "Attendees"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Created" });
|
||||
}
|
||||
create(value?: PartialMessage<BookAppointmentPayload>): BookAppointmentPayload {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.AppointmentType = 0;
|
||||
message.SegmentationSelections = [];
|
||||
message.SegmentationKeys = [];
|
||||
message.CarrierInformation = [];
|
||||
message.MetaData = [];
|
||||
message.Reason = "";
|
||||
@@ -714,9 +736,12 @@ class BookAppointmentPayload$Type extends MessageType<BookAppointmentPayload> {
|
||||
case /* api.AppointmentType AppointmentType */ 1:
|
||||
message.AppointmentType = reader.int32();
|
||||
break;
|
||||
case /* repeated api.SegmentationSelection SegmentationSelections */ 2:
|
||||
case /* repeated api.SegmentationSelection SegmentationSelections = 2 [deprecated = true] */ 2:
|
||||
message.SegmentationSelections.push(SegmentationSelection.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.MetadataElement SegmentationKeys */ 14:
|
||||
message.SegmentationKeys.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
case /* repeated api.MetadataElement CarrierInformation */ 3:
|
||||
message.CarrierInformation.push(MetadataElement.internalBinaryRead(reader, reader.uint32(), options));
|
||||
break;
|
||||
@@ -759,7 +784,7 @@ class BookAppointmentPayload$Type extends MessageType<BookAppointmentPayload> {
|
||||
/* api.AppointmentType AppointmentType = 1; */
|
||||
if (message.AppointmentType !== 0)
|
||||
writer.tag(1, WireType.Varint).int32(message.AppointmentType);
|
||||
/* repeated api.SegmentationSelection SegmentationSelections = 2; */
|
||||
/* repeated api.SegmentationSelection SegmentationSelections = 2 [deprecated = true]; */
|
||||
for (let i = 0; i < message.SegmentationSelections.length; i++)
|
||||
SegmentationSelection.internalBinaryWrite(message.SegmentationSelections[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
/* repeated api.MetadataElement CarrierInformation = 3; */
|
||||
@@ -789,6 +814,9 @@ class BookAppointmentPayload$Type extends MessageType<BookAppointmentPayload> {
|
||||
/* repeated string Emails = 13; */
|
||||
for (let i = 0; i < message.Emails.length; i++)
|
||||
writer.tag(13, WireType.LengthDelimited).string(message.Emails[i]);
|
||||
/* repeated api.MetadataElement SegmentationKeys = 14; */
|
||||
for (let i = 0; i < message.SegmentationKeys.length; i++)
|
||||
MetadataElement.internalBinaryWrite(message.SegmentationKeys[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
|
||||
Reference in New Issue
Block a user