You've already forked npm-core-sdk
1901 lines
105 KiB
TypeScript
1901 lines
105 KiB
TypeScript
// @generated by protobuf-ts 2.9.6
|
|
// @generated from protobuf file "site.proto" (package "api", syntax proto3)
|
|
// tslint:disable
|
|
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
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 { Slot } from "./slotbooking";
|
|
import { Commission } from "./collabShared";
|
|
import { AppointmentType } from "./slotbooking";
|
|
import { RequestSiteHeader } from "./shared";
|
|
import { RequestOrganisationHeader } from "./shared";
|
|
import { CarrierInformation } from "./slotbooking";
|
|
import { Document } from "./slotbooking";
|
|
import { LabelByLanguage } from "./shared";
|
|
import { CapacityRule } from "./slotbooking";
|
|
import { DurationRule } from "./slotbooking";
|
|
import { OpeningRule } from "./slotbooking";
|
|
import { Unit } from "./slotbooking";
|
|
import { ProjectAuthorisation } from "./slotbooking";
|
|
import { Segmentation } from "./slotbooking";
|
|
import { Address } from "./repositoryShared";
|
|
/**
|
|
* Message defining the structure of a Site.
|
|
*
|
|
* @generated from protobuf message api.Site
|
|
*/
|
|
export interface Site {
|
|
/**
|
|
* @generated from protobuf field: string ID = 1 [json_name = "ID"];
|
|
*/
|
|
iD: string; // Unique identifier for the site. (formatted as such: "SITE_<OrganisationID>_<UUID>")
|
|
/**
|
|
* Name of the Site
|
|
*
|
|
* @generated from protobuf field: string Name = 2 [json_name = "Name"];
|
|
*/
|
|
name: string;
|
|
/**
|
|
* Identifier for the organisation associated with the site.
|
|
*
|
|
* @generated from protobuf field: string OrganisationID = 3 [json_name = "OrganisationID"];
|
|
*/
|
|
organisationID: string;
|
|
/**
|
|
* @generated from protobuf field: bool Active = 4 [json_name = "Active"];
|
|
*/
|
|
active: boolean; // If the Site is active or not
|
|
/**
|
|
* @generated from protobuf field: string PhotoURI = 5 [json_name = "PhotoURI"];
|
|
*/
|
|
photoURI: string; // Link to a picture to display
|
|
/**
|
|
* @generated from protobuf field: api.Address Address = 6 [json_name = "Address"];
|
|
*/
|
|
address?: Address; // Address of the Site
|
|
/**
|
|
* @generated from protobuf field: repeated string Phones = 7 [json_name = "Phones"];
|
|
*/
|
|
phones: string[];
|
|
/**
|
|
* @generated from protobuf field: string Fax = 8 [json_name = "Fax"];
|
|
*/
|
|
fax: string;
|
|
/**
|
|
* List of Segmentations that segment the logistic site.
|
|
*
|
|
* @generated from protobuf field: repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"];
|
|
*/
|
|
segmentations: Segmentation[];
|
|
/**
|
|
* List of allowed project and the constraints (interval time in which they can book an appointment) they are associated with.
|
|
*
|
|
* @generated from protobuf field: repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"];
|
|
*/
|
|
authorisations: ProjectAuthorisation[];
|
|
/**
|
|
* List of containment units which will be used to estimate the needed time to load or unload.
|
|
*
|
|
* @generated from protobuf field: repeated api.Unit Units = 11 [json_name = "Units"];
|
|
*/
|
|
units: Unit[];
|
|
/**
|
|
* Definition of the opening rules. 2 opening rule definitions cannot overlap.
|
|
*
|
|
* @generated from protobuf field: repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"];
|
|
*/
|
|
openingRules: OpeningRule[];
|
|
/**
|
|
* Definition of the booking slot duration rules.
|
|
*
|
|
* @generated from protobuf field: repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"];
|
|
*/
|
|
durationRules: DurationRule[];
|
|
/**
|
|
* Definition of the capacity rules. 2 capacity rule can overlap and the more constraining one will be applied.
|
|
*
|
|
* @generated from protobuf field: repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"];
|
|
*/
|
|
capacityRules: CapacityRule[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"];
|
|
*/
|
|
instructions: LabelByLanguage[]; // @option language
|
|
/**
|
|
* Set of instruction document, listing necessary equipment and such
|
|
*
|
|
* @generated from protobuf field: repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"];
|
|
*/
|
|
instructionDocuments: Document[];
|
|
/**
|
|
* Set of required or optional information to ask when a slot is booked
|
|
*
|
|
* @generated from protobuf field: repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"];
|
|
*/
|
|
carrierInformations: CarrierInformation[];
|
|
/**
|
|
* Link to calendar ID available at organisation level
|
|
*
|
|
* @generated from protobuf field: repeated string CalendarIDs = 18 [json_name = "CalendarIDs"];
|
|
*/
|
|
calendarIDs: string[];
|
|
/**
|
|
* Defines the rounded value to define booking period
|
|
*
|
|
* @generated from protobuf field: int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"];
|
|
*/
|
|
roundedPeriodInMinutes: bigint;
|
|
/**
|
|
* Add Site Time zone
|
|
*
|
|
* @generated from protobuf field: string TargetTimeZone = 20 [json_name = "TargetTimeZone"];
|
|
*/
|
|
targetTimeZone: string;
|
|
/**
|
|
* Must be a valid email address
|
|
*
|
|
* @generated from protobuf field: repeated string Emails = 21 [json_name = "Emails"];
|
|
*/
|
|
emails: string[];
|
|
/**
|
|
* set the fallback language in case of missing translation
|
|
*
|
|
* @generated from protobuf field: string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];
|
|
*/
|
|
defaultSiteLanguageISO6391: string;
|
|
}
|
|
// ========== REQUESTS & RESPONSE MESSAGES ==========
|
|
|
|
/**
|
|
* Create
|
|
*
|
|
* @generated from protobuf message api.CreateSiteRequest
|
|
*/
|
|
export interface CreateSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestOrganisationHeader;
|
|
/**
|
|
* Identifier of the new Site
|
|
*
|
|
* @generated from protobuf field: string SiteID = 2 [json_name = "SiteID"];
|
|
*/
|
|
siteID: string;
|
|
/**
|
|
* Name of the new Site, modifiable after creation
|
|
*
|
|
* @generated from protobuf field: string SiteName = 3 [json_name = "SiteName"];
|
|
*/
|
|
siteName: string;
|
|
/**
|
|
* Must be a valid email address from a user know to the platform
|
|
*
|
|
* @generated from protobuf field: string Emails = 4 [json_name = "Emails"];
|
|
*/
|
|
emails: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CreateSiteResponse
|
|
*/
|
|
export interface CreateSiteResponse {
|
|
/**
|
|
* @generated from protobuf field: api.Site Site = 1 [json_name = "Site"];
|
|
*/
|
|
site?: Site;
|
|
}
|
|
/**
|
|
* Get
|
|
*
|
|
* @generated from protobuf message api.GetSiteRequest
|
|
*/
|
|
export interface GetSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestOrganisationHeader;
|
|
/**
|
|
* @generated from protobuf field: string ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.GetSiteResponse
|
|
*/
|
|
export interface GetSiteResponse {
|
|
/**
|
|
* @generated from protobuf field: api.Site Site = 1 [json_name = "Site"];
|
|
*/
|
|
site?: Site;
|
|
}
|
|
/**
|
|
* List
|
|
*
|
|
* @generated from protobuf message api.ListSiteRequest
|
|
*/
|
|
export interface ListSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestOrganisationHeader;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ListSiteResponse
|
|
*/
|
|
export interface ListSiteResponse {
|
|
/**
|
|
* @generated from protobuf field: repeated api.Site Sites = 1 [json_name = "Sites"];
|
|
*/
|
|
sites: Site[];
|
|
}
|
|
/**
|
|
* Update
|
|
*
|
|
* @generated from protobuf message api.UpdateSiteRequest
|
|
*/
|
|
export interface UpdateSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestOrganisationHeader;
|
|
/**
|
|
* Unique identifier of the site
|
|
*
|
|
* @generated from protobuf field: string ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD: string;
|
|
/**
|
|
* Name of the Site
|
|
*
|
|
* @generated from protobuf field: string Name = 3 [json_name = "Name"];
|
|
*/
|
|
name: string;
|
|
/**
|
|
* @generated from protobuf field: bool Active = 4 [json_name = "Active"];
|
|
*/
|
|
active: boolean; // If the Site is active or not
|
|
/**
|
|
* @generated from protobuf field: string PhotoURI = 5 [json_name = "PhotoURI"];
|
|
*/
|
|
photoURI: string; // link to a picture to display
|
|
/**
|
|
* @generated from protobuf field: api.Address Address = 6 [json_name = "Address"];
|
|
*/
|
|
address?: Address; // address of the Site
|
|
/**
|
|
* @generated from protobuf field: repeated string Phones = 7 [json_name = "Phones"];
|
|
*/
|
|
phones: string[];
|
|
/**
|
|
* @generated from protobuf field: string Fax = 8 [json_name = "Fax"];
|
|
*/
|
|
fax: string;
|
|
/**
|
|
* List of Segmentations that segment the logistic site.
|
|
*
|
|
* @generated from protobuf field: repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"];
|
|
*/
|
|
segmentations: Segmentation[];
|
|
/**
|
|
* List of allowed project and the constraints (interval time in which they can book an appointment) they are associated with.
|
|
*
|
|
* @generated from protobuf field: repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"];
|
|
*/
|
|
authorisations: ProjectAuthorisation[];
|
|
/**
|
|
* List of containment units which will be used to estimate the needed time to load or unload.
|
|
*
|
|
* @generated from protobuf field: repeated api.Unit Units = 11 [json_name = "Units"];
|
|
*/
|
|
units: Unit[];
|
|
/**
|
|
* Definition of the opening rules. 2 opening rule definitions cannot overlap.
|
|
*
|
|
* @generated from protobuf field: repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"];
|
|
*/
|
|
openingRules: OpeningRule[];
|
|
/**
|
|
* Definition of the booking slot duration rules.
|
|
*
|
|
* @generated from protobuf field: repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"];
|
|
*/
|
|
durationRules: DurationRule[];
|
|
/**
|
|
* Definition of the capacity rules. 2 capacity rule can overlap and the more constraining one will be applied.
|
|
*
|
|
* @generated from protobuf field: repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"];
|
|
*/
|
|
capacityRules: CapacityRule[];
|
|
/**
|
|
* @generated from protobuf field: repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"];
|
|
*/
|
|
instructions: LabelByLanguage[]; // @option language
|
|
/**
|
|
* Set of instruction document, listing necessary equipment and such
|
|
*
|
|
* @generated from protobuf field: repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"];
|
|
*/
|
|
instructionDocuments: Document[];
|
|
/**
|
|
* Set of required or optional information to ask when a slot is booked
|
|
*
|
|
* @generated from protobuf field: repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"];
|
|
*/
|
|
carrierInformations: CarrierInformation[];
|
|
/**
|
|
* Link to calendar ID available at organisation level
|
|
*
|
|
* @generated from protobuf field: repeated string CalendarIDs = 18 [json_name = "CalendarIDs"];
|
|
*/
|
|
calendarIDs: string[];
|
|
/**
|
|
* Defines the rounded value to define booking period
|
|
*
|
|
* @generated from protobuf field: int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"];
|
|
*/
|
|
roundedPeriodInMinutes: bigint;
|
|
/**
|
|
* Add Site Time zone
|
|
*
|
|
* @generated from protobuf field: string TargetTimeZone = 20 [json_name = "TargetTimeZone"];
|
|
*/
|
|
targetTimeZone: string;
|
|
/**
|
|
* Must be a valid email address
|
|
*
|
|
* @generated from protobuf field: repeated string Emails = 21 [json_name = "Emails"];
|
|
*/
|
|
emails: string[];
|
|
/**
|
|
* set the fallback language in case of missing translation
|
|
*
|
|
* @generated from protobuf field: string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];
|
|
*/
|
|
defaultSiteLanguageISO6391: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.UpdateSiteResponse
|
|
*/
|
|
export interface UpdateSiteResponse {
|
|
/**
|
|
* @generated from protobuf field: api.Site Site = 1 [json_name = "Site"];
|
|
*/
|
|
site?: Site;
|
|
}
|
|
/**
|
|
* Delete
|
|
*
|
|
* @generated from protobuf message api.DeleteSiteRequest
|
|
*/
|
|
export interface DeleteSiteRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestOrganisationHeader;
|
|
/**
|
|
* @generated from protobuf field: string ID = 2 [json_name = "ID"];
|
|
*/
|
|
iD: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.DeleteSiteResponse
|
|
*/
|
|
export interface DeleteSiteResponse {
|
|
}
|
|
/**
|
|
* GetAvailableSlots
|
|
*
|
|
* @generated from protobuf message api.GetAvailableSlotsRequest
|
|
*/
|
|
export interface GetAvailableSlotsRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestSiteHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestSiteHeader;
|
|
/**
|
|
* Type of appointment : Expedition / Reception / Both
|
|
*
|
|
* @generated from protobuf field: api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"];
|
|
*/
|
|
appointmentType: AppointmentType;
|
|
/**
|
|
* List of the orders and projects for which the appointment is made, with the quantities
|
|
*
|
|
* @generated from protobuf field: repeated api.Commission Commissions = 3 [json_name = "Commissions"];
|
|
*/
|
|
commissions: Commission[];
|
|
/**
|
|
* Set of segmentation constraining the slot booking
|
|
*
|
|
* @generated from protobuf field: repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];
|
|
*/
|
|
segmentations: Segmentation[];
|
|
/**
|
|
* Start date of the range to look for available slots
|
|
*
|
|
* @generated from protobuf field: string StartDate = 5 [json_name = "StartDate"];
|
|
*/
|
|
startDate: string;
|
|
/**
|
|
* End date of the range to look for available slots
|
|
*
|
|
* @generated from protobuf field: string EndDate = 6 [json_name = "EndDate"];
|
|
*/
|
|
endDate: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.GetAvailableSlotsResponse
|
|
*/
|
|
export interface GetAvailableSlotsResponse {
|
|
/**
|
|
* @generated from protobuf field: repeated api.Slot Slots = 1 [json_name = "Slots"];
|
|
*/
|
|
slots: Slot[];
|
|
}
|
|
/**
|
|
* BookAppointment
|
|
*
|
|
* @generated from protobuf message api.BookAppointmentRequest
|
|
*/
|
|
export interface BookAppointmentRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestSiteHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestSiteHeader;
|
|
/**
|
|
* Type of appointment : Expedition / Reception / Both
|
|
*
|
|
* @generated from protobuf field: api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"];
|
|
*/
|
|
appointmentType: AppointmentType;
|
|
/**
|
|
* List of the orders and projects for which the appointment is made, with the quantities
|
|
*
|
|
* @generated from protobuf field: repeated api.Commission Commissions = 3 [json_name = "Commissions"];
|
|
*/
|
|
commissions: Commission[];
|
|
/**
|
|
* Set of segmentation constraining the slot booking
|
|
*
|
|
* @generated from protobuf field: repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];
|
|
*/
|
|
segmentations: Segmentation[];
|
|
/**
|
|
* Required carrierInformation, some can be obligatory
|
|
*
|
|
* @generated from protobuf field: repeated api.CarrierInformation CarrierInformation = 5 [json_name = "CarrierInformation"];
|
|
*/
|
|
carrierInformation: CarrierInformation[];
|
|
/**
|
|
* The slot to book for the appointment
|
|
*
|
|
* @generated from protobuf field: api.Slot Slot = 6 [json_name = "Slot"];
|
|
*/
|
|
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 = 8 [json_name = "Emails"];
|
|
*/
|
|
emails: string[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.BookAppointmentResponse
|
|
*/
|
|
export interface BookAppointmentResponse {
|
|
/**
|
|
* @generated from protobuf field: string AppointmentID = 1 [json_name = "AppointmentID"];
|
|
*/
|
|
appointmentID: string;
|
|
}
|
|
/**
|
|
* CancelAppointment
|
|
*
|
|
* @generated from protobuf message api.CancelAppointmentRequest
|
|
*/
|
|
export interface CancelAppointmentRequest {
|
|
/**
|
|
* @generated from protobuf field: api.RequestSiteHeader Header = 1 [json_name = "Header"];
|
|
*/
|
|
header?: RequestSiteHeader;
|
|
/**
|
|
* @generated from protobuf field: string AppointmentID = 2 [json_name = "AppointmentID"];
|
|
*/
|
|
appointmentID: string;
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.CancelAppointmentResponse
|
|
*/
|
|
export interface CancelAppointmentResponse {
|
|
/**
|
|
* @generated from protobuf field: string AppointmentID = 1 [json_name = "AppointmentID"];
|
|
*/
|
|
appointmentID: string;
|
|
}
|
|
/**
|
|
* ListUserSites
|
|
*
|
|
* @generated from protobuf message api.ListUserSitesRequest
|
|
*/
|
|
export interface ListUserSitesRequest {
|
|
/**
|
|
* TODO optional filter
|
|
*
|
|
* @generated from protobuf field: repeated string ProjectID = 1 [json_name = "ProjectID"];
|
|
*/
|
|
projectID: string[];
|
|
}
|
|
/**
|
|
* @generated from protobuf message api.ListUserSitesResponse
|
|
*/
|
|
export interface ListUserSitesResponse {
|
|
/**
|
|
* @generated from protobuf field: repeated api.Site Sites = 1 [json_name = "Sites"];
|
|
*/
|
|
sites: Site[];
|
|
}
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class Site$Type extends MessageType<Site> {
|
|
constructor() {
|
|
super("api.Site", [
|
|
{ no: 1, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 2, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "OrganisationID", kind: "scalar", jsonName: "OrganisationID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Active", kind: "scalar", jsonName: "Active", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 5, name: "PhotoURI", kind: "scalar", jsonName: "PhotoURI", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 6, name: "Address", kind: "message", jsonName: "Address", T: () => Address },
|
|
{ no: 7, name: "Phones", kind: "scalar", jsonName: "Phones", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"06 00 00 00 00\", \"+49 00 0000 0000\"]" } } },
|
|
{ no: 8, name: "Fax", kind: "scalar", jsonName: "Fax", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"06 00 00 00 00\", \"+49 00 0000 0000\"]" } } },
|
|
{ no: 9, name: "Segmentations", kind: "message", jsonName: "Segmentations", repeat: 1 /*RepeatType.PACKED*/, T: () => Segmentation },
|
|
{ no: 10, name: "Authorisations", kind: "message", jsonName: "Authorisations", repeat: 1 /*RepeatType.PACKED*/, T: () => ProjectAuthorisation },
|
|
{ no: 11, name: "Units", kind: "message", jsonName: "Units", repeat: 1 /*RepeatType.PACKED*/, T: () => Unit, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 12, name: "OpeningRules", kind: "message", jsonName: "OpeningRules", repeat: 1 /*RepeatType.PACKED*/, T: () => OpeningRule },
|
|
{ no: 13, name: "DurationRules", kind: "message", jsonName: "DurationRules", repeat: 1 /*RepeatType.PACKED*/, T: () => DurationRule },
|
|
{ no: 14, name: "CapacityRules", kind: "message", jsonName: "CapacityRules", repeat: 1 /*RepeatType.PACKED*/, T: () => CapacityRule },
|
|
{ no: 15, name: "Instructions", kind: "message", jsonName: "Instructions", repeat: 1 /*RepeatType.PACKED*/, T: () => LabelByLanguage, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } },
|
|
{ no: 16, name: "InstructionDocuments", kind: "message", jsonName: "InstructionDocuments", repeat: 1 /*RepeatType.PACKED*/, T: () => Document },
|
|
{ no: 17, name: "CarrierInformations", kind: "message", jsonName: "CarrierInformations", repeat: 1 /*RepeatType.PACKED*/, T: () => CarrierInformation },
|
|
{ no: 18, name: "CalendarIDs", kind: "scalar", jsonName: "CalendarIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 19, name: "RoundedPeriodInMinutes", kind: "scalar", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
{ no: 20, name: "TargetTimeZone", kind: "scalar", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target site time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
|
|
{ no: 21, name: "Emails", kind: "scalar", jsonName: "Emails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { items: { string: { email: true, ignoreEmpty: true } } } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"John.doe@reflex.com\", \"will.smith@reflex.com\"]" } } },
|
|
{ no: 22, name: "DefaultSiteLanguageISO6391", kind: "scalar", jsonName: "DefaultSiteLanguageISO6391", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "3", languageIso639: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "<a href='https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes'>ISO 639 code</a> message language", example: "\"en\"" } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<Site>): Site {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.iD = "";
|
|
message.name = "";
|
|
message.organisationID = "";
|
|
message.active = false;
|
|
message.photoURI = "";
|
|
message.phones = [];
|
|
message.fax = "";
|
|
message.segmentations = [];
|
|
message.authorisations = [];
|
|
message.units = [];
|
|
message.openingRules = [];
|
|
message.durationRules = [];
|
|
message.capacityRules = [];
|
|
message.instructions = [];
|
|
message.instructionDocuments = [];
|
|
message.carrierInformations = [];
|
|
message.calendarIDs = [];
|
|
message.roundedPeriodInMinutes = 0n;
|
|
message.targetTimeZone = "";
|
|
message.emails = [];
|
|
message.defaultSiteLanguageISO6391 = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<Site>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Site): Site {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string ID = 1 [json_name = "ID"];*/ 1:
|
|
message.iD = reader.string();
|
|
break;
|
|
case /* string Name = 2 [json_name = "Name"];*/ 2:
|
|
message.name = reader.string();
|
|
break;
|
|
case /* string OrganisationID = 3 [json_name = "OrganisationID"];*/ 3:
|
|
message.organisationID = reader.string();
|
|
break;
|
|
case /* bool Active = 4 [json_name = "Active"];*/ 4:
|
|
message.active = reader.bool();
|
|
break;
|
|
case /* string PhotoURI = 5 [json_name = "PhotoURI"];*/ 5:
|
|
message.photoURI = reader.string();
|
|
break;
|
|
case /* api.Address Address = 6 [json_name = "Address"];*/ 6:
|
|
message.address = Address.internalBinaryRead(reader, reader.uint32(), options, message.address);
|
|
break;
|
|
case /* repeated string Phones = 7 [json_name = "Phones"];*/ 7:
|
|
message.phones.push(reader.string());
|
|
break;
|
|
case /* string Fax = 8 [json_name = "Fax"];*/ 8:
|
|
message.fax = reader.string();
|
|
break;
|
|
case /* repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"];*/ 9:
|
|
message.segmentations.push(Segmentation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"];*/ 10:
|
|
message.authorisations.push(ProjectAuthorisation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Unit Units = 11 [json_name = "Units"];*/ 11:
|
|
message.units.push(Unit.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"];*/ 12:
|
|
message.openingRules.push(OpeningRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"];*/ 13:
|
|
message.durationRules.push(DurationRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"];*/ 14:
|
|
message.capacityRules.push(CapacityRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"];*/ 15:
|
|
message.instructions.push(LabelByLanguage.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"];*/ 16:
|
|
message.instructionDocuments.push(Document.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"];*/ 17:
|
|
message.carrierInformations.push(CarrierInformation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated string CalendarIDs = 18 [json_name = "CalendarIDs"];*/ 18:
|
|
message.calendarIDs.push(reader.string());
|
|
break;
|
|
case /* int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"];*/ 19:
|
|
message.roundedPeriodInMinutes = reader.int64().toBigInt();
|
|
break;
|
|
case /* string TargetTimeZone = 20 [json_name = "TargetTimeZone"];*/ 20:
|
|
message.targetTimeZone = reader.string();
|
|
break;
|
|
case /* repeated string Emails = 21 [json_name = "Emails"];*/ 21:
|
|
message.emails.push(reader.string());
|
|
break;
|
|
case /* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];*/ 22:
|
|
message.defaultSiteLanguageISO6391 = 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: Site, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string ID = 1 [json_name = "ID"]; */
|
|
if (message.iD !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.iD);
|
|
/* string Name = 2 [json_name = "Name"]; */
|
|
if (message.name !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.name);
|
|
/* string OrganisationID = 3 [json_name = "OrganisationID"]; */
|
|
if (message.organisationID !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.organisationID);
|
|
/* bool Active = 4 [json_name = "Active"]; */
|
|
if (message.active !== false)
|
|
writer.tag(4, WireType.Varint).bool(message.active);
|
|
/* string PhotoURI = 5 [json_name = "PhotoURI"]; */
|
|
if (message.photoURI !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.photoURI);
|
|
/* api.Address Address = 6 [json_name = "Address"]; */
|
|
if (message.address)
|
|
Address.internalBinaryWrite(message.address, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string Phones = 7 [json_name = "Phones"]; */
|
|
for (let i = 0; i < message.phones.length; i++)
|
|
writer.tag(7, WireType.LengthDelimited).string(message.phones[i]);
|
|
/* string Fax = 8 [json_name = "Fax"]; */
|
|
if (message.fax !== "")
|
|
writer.tag(8, WireType.LengthDelimited).string(message.fax);
|
|
/* repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"]; */
|
|
for (let i = 0; i < message.segmentations.length; i++)
|
|
Segmentation.internalBinaryWrite(message.segmentations[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"]; */
|
|
for (let i = 0; i < message.authorisations.length; i++)
|
|
ProjectAuthorisation.internalBinaryWrite(message.authorisations[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Unit Units = 11 [json_name = "Units"]; */
|
|
for (let i = 0; i < message.units.length; i++)
|
|
Unit.internalBinaryWrite(message.units[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"]; */
|
|
for (let i = 0; i < message.openingRules.length; i++)
|
|
OpeningRule.internalBinaryWrite(message.openingRules[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"]; */
|
|
for (let i = 0; i < message.durationRules.length; i++)
|
|
DurationRule.internalBinaryWrite(message.durationRules[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"]; */
|
|
for (let i = 0; i < message.capacityRules.length; i++)
|
|
CapacityRule.internalBinaryWrite(message.capacityRules[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"]; */
|
|
for (let i = 0; i < message.instructions.length; i++)
|
|
LabelByLanguage.internalBinaryWrite(message.instructions[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"]; */
|
|
for (let i = 0; i < message.instructionDocuments.length; i++)
|
|
Document.internalBinaryWrite(message.instructionDocuments[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"]; */
|
|
for (let i = 0; i < message.carrierInformations.length; i++)
|
|
CarrierInformation.internalBinaryWrite(message.carrierInformations[i], writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string CalendarIDs = 18 [json_name = "CalendarIDs"]; */
|
|
for (let i = 0; i < message.calendarIDs.length; i++)
|
|
writer.tag(18, WireType.LengthDelimited).string(message.calendarIDs[i]);
|
|
/* int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"]; */
|
|
if (message.roundedPeriodInMinutes !== 0n)
|
|
writer.tag(19, WireType.Varint).int64(message.roundedPeriodInMinutes);
|
|
/* string TargetTimeZone = 20 [json_name = "TargetTimeZone"]; */
|
|
if (message.targetTimeZone !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.targetTimeZone);
|
|
/* repeated string Emails = 21 [json_name = "Emails"]; */
|
|
for (let i = 0; i < message.emails.length; i++)
|
|
writer.tag(21, WireType.LengthDelimited).string(message.emails[i]);
|
|
/* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"]; */
|
|
if (message.defaultSiteLanguageISO6391 !== "")
|
|
writer.tag(22, WireType.LengthDelimited).string(message.defaultSiteLanguageISO6391);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.Site
|
|
*/
|
|
export const Site = new Site$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreateSiteRequest$Type extends MessageType<CreateSiteRequest> {
|
|
constructor() {
|
|
super("api.CreateSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "SiteID", kind: "scalar", jsonName: "SiteID", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 3, name: "SiteName", kind: "scalar", jsonName: "SiteName", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 4, name: "Emails", kind: "scalar", jsonName: "Emails", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", email: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header,Emails"] } } });
|
|
}
|
|
create(value?: PartialMessage<CreateSiteRequest>): CreateSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.siteID = "";
|
|
message.siteName = "";
|
|
message.emails = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreateSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateSiteRequest): CreateSiteRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* string SiteID = 2 [json_name = "SiteID"];*/ 2:
|
|
message.siteID = reader.string();
|
|
break;
|
|
case /* string SiteName = 3 [json_name = "SiteName"];*/ 3:
|
|
message.siteName = reader.string();
|
|
break;
|
|
case /* string Emails = 4 [json_name = "Emails"];*/ 4:
|
|
message.emails = 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: CreateSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string SiteID = 2 [json_name = "SiteID"]; */
|
|
if (message.siteID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.siteID);
|
|
/* string SiteName = 3 [json_name = "SiteName"]; */
|
|
if (message.siteName !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.siteName);
|
|
/* string Emails = 4 [json_name = "Emails"]; */
|
|
if (message.emails !== "")
|
|
writer.tag(4, WireType.LengthDelimited).string(message.emails);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CreateSiteRequest
|
|
*/
|
|
export const CreateSiteRequest = new CreateSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CreateSiteResponse$Type extends MessageType<CreateSiteResponse> {
|
|
constructor() {
|
|
super("api.CreateSiteResponse", [
|
|
{ no: 1, name: "Site", kind: "message", jsonName: "Site", T: () => Site, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CreateSiteResponse>): CreateSiteResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CreateSiteResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CreateSiteResponse): CreateSiteResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Site Site = 1 [json_name = "Site"];*/ 1:
|
|
message.site = Site.internalBinaryRead(reader, reader.uint32(), options, message.site);
|
|
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: CreateSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Site Site = 1 [json_name = "Site"]; */
|
|
if (message.site)
|
|
Site.internalBinaryWrite(message.site, writer.tag(1, 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.CreateSiteResponse
|
|
*/
|
|
export const CreateSiteResponse = new CreateSiteResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetSiteRequest$Type extends MessageType<GetSiteRequest> {
|
|
constructor() {
|
|
super("api.GetSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
|
|
}
|
|
create(value?: PartialMessage<GetSiteRequest>): GetSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.iD = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSiteRequest): GetSiteRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* string ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = 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: GetSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string ID = 2 [json_name = "ID"]; */
|
|
if (message.iD !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.iD);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.GetSiteRequest
|
|
*/
|
|
export const GetSiteRequest = new GetSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetSiteResponse$Type extends MessageType<GetSiteResponse> {
|
|
constructor() {
|
|
super("api.GetSiteResponse", [
|
|
{ no: 1, name: "Site", kind: "message", jsonName: "Site", T: () => Site, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<GetSiteResponse>): GetSiteResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetSiteResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetSiteResponse): GetSiteResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Site Site = 1 [json_name = "Site"];*/ 1:
|
|
message.site = Site.internalBinaryRead(reader, reader.uint32(), options, message.site);
|
|
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: GetSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Site Site = 1 [json_name = "Site"]; */
|
|
if (message.site)
|
|
Site.internalBinaryWrite(message.site, writer.tag(1, 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.GetSiteResponse
|
|
*/
|
|
export const GetSiteResponse = new GetSiteResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListSiteRequest$Type extends MessageType<ListSiteRequest> {
|
|
constructor() {
|
|
super("api.ListSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } });
|
|
}
|
|
create(value?: PartialMessage<ListSiteRequest>): ListSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListSiteRequest): ListSiteRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
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: ListSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, 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.ListSiteRequest
|
|
*/
|
|
export const ListSiteRequest = new ListSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListSiteResponse$Type extends MessageType<ListSiteResponse> {
|
|
constructor() {
|
|
super("api.ListSiteResponse", [
|
|
{ no: 1, name: "Sites", kind: "message", jsonName: "Sites", repeat: 1 /*RepeatType.PACKED*/, T: () => Site }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ListSiteResponse>): ListSiteResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.sites = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListSiteResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListSiteResponse): ListSiteResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.Site Sites = 1 [json_name = "Sites"];*/ 1:
|
|
message.sites.push(Site.internalBinaryRead(reader, reader.uint32(), options));
|
|
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: ListSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.Site Sites = 1 [json_name = "Sites"]; */
|
|
for (let i = 0; i < message.sites.length; i++)
|
|
Site.internalBinaryWrite(message.sites[i], writer.tag(1, 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.ListSiteResponse
|
|
*/
|
|
export const ListSiteResponse = new ListSiteResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdateSiteRequest$Type extends MessageType<UpdateSiteRequest> {
|
|
constructor() {
|
|
super("api.UpdateSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 3, name: "Name", kind: "scalar", jsonName: "Name", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
{ no: 4, name: "Active", kind: "scalar", jsonName: "Active", T: 8 /*ScalarType.BOOL*/ },
|
|
{ no: 5, name: "PhotoURI", kind: "scalar", jsonName: "PhotoURI", T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 6, name: "Address", kind: "message", jsonName: "Address", T: () => Address },
|
|
{ no: 7, name: "Phones", kind: "scalar", jsonName: "Phones", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"06 00 00 00 00\", \"+49 00 0000 0000\"]" } } },
|
|
{ no: 8, name: "Fax", kind: "scalar", jsonName: "Fax", T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"06 00 00 00 00\", \"+49 00 0000 0000\"]" } } },
|
|
{ no: 9, name: "Segmentations", kind: "message", jsonName: "Segmentations", repeat: 1 /*RepeatType.PACKED*/, T: () => Segmentation },
|
|
{ no: 10, name: "Authorisations", kind: "message", jsonName: "Authorisations", repeat: 1 /*RepeatType.PACKED*/, T: () => ProjectAuthorisation },
|
|
{ no: 11, name: "Units", kind: "message", jsonName: "Units", repeat: 1 /*RepeatType.PACKED*/, T: () => Unit, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 12, name: "OpeningRules", kind: "message", jsonName: "OpeningRules", repeat: 1 /*RepeatType.PACKED*/, T: () => OpeningRule },
|
|
{ no: 13, name: "DurationRules", kind: "message", jsonName: "DurationRules", repeat: 1 /*RepeatType.PACKED*/, T: () => DurationRule },
|
|
{ no: 14, name: "CapacityRules", kind: "message", jsonName: "CapacityRules", repeat: 1 /*RepeatType.PACKED*/, T: () => CapacityRule },
|
|
{ no: 15, name: "Instructions", kind: "message", jsonName: "Instructions", repeat: 1 /*RepeatType.PACKED*/, T: () => LabelByLanguage, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } },
|
|
{ no: 16, name: "InstructionDocuments", kind: "message", jsonName: "InstructionDocuments", repeat: 1 /*RepeatType.PACKED*/, T: () => Document },
|
|
{ no: 17, name: "CarrierInformations", kind: "message", jsonName: "CarrierInformations", repeat: 1 /*RepeatType.PACKED*/, T: () => CarrierInformation },
|
|
{ no: 18, name: "CalendarIDs", kind: "scalar", jsonName: "CalendarIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
|
|
{ no: 19, name: "RoundedPeriodInMinutes", kind: "scalar", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
|
{ no: 20, name: "TargetTimeZone", kind: "scalar", jsonName: "TargetTimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Target site time zone <a href='https://en.wikipedia.org/wiki/List_of_tz_database_time_zones'>format</a>", example: "\"Europe/Paris\"" } } },
|
|
{ no: 21, name: "Emails", kind: "scalar", jsonName: "Emails", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { items: { string: { email: true, ignoreEmpty: true } } } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { example: "[\"John.doe@reflex.com\", \"will.smith@reflex.com\"]" } } },
|
|
{ no: 22, name: "DefaultSiteLanguageISO6391", kind: "scalar", jsonName: "DefaultSiteLanguageISO6391", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "2", maxLen: "3", languageIso639: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "<a href='https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes'>ISO 639 code</a> message language", example: "\"en\"" } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
|
|
}
|
|
create(value?: PartialMessage<UpdateSiteRequest>): UpdateSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.iD = "";
|
|
message.name = "";
|
|
message.active = false;
|
|
message.photoURI = "";
|
|
message.phones = [];
|
|
message.fax = "";
|
|
message.segmentations = [];
|
|
message.authorisations = [];
|
|
message.units = [];
|
|
message.openingRules = [];
|
|
message.durationRules = [];
|
|
message.capacityRules = [];
|
|
message.instructions = [];
|
|
message.instructionDocuments = [];
|
|
message.carrierInformations = [];
|
|
message.calendarIDs = [];
|
|
message.roundedPeriodInMinutes = 0n;
|
|
message.targetTimeZone = "";
|
|
message.emails = [];
|
|
message.defaultSiteLanguageISO6391 = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdateSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSiteRequest): UpdateSiteRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* string ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = reader.string();
|
|
break;
|
|
case /* string Name = 3 [json_name = "Name"];*/ 3:
|
|
message.name = reader.string();
|
|
break;
|
|
case /* bool Active = 4 [json_name = "Active"];*/ 4:
|
|
message.active = reader.bool();
|
|
break;
|
|
case /* string PhotoURI = 5 [json_name = "PhotoURI"];*/ 5:
|
|
message.photoURI = reader.string();
|
|
break;
|
|
case /* api.Address Address = 6 [json_name = "Address"];*/ 6:
|
|
message.address = Address.internalBinaryRead(reader, reader.uint32(), options, message.address);
|
|
break;
|
|
case /* repeated string Phones = 7 [json_name = "Phones"];*/ 7:
|
|
message.phones.push(reader.string());
|
|
break;
|
|
case /* string Fax = 8 [json_name = "Fax"];*/ 8:
|
|
message.fax = reader.string();
|
|
break;
|
|
case /* repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"];*/ 9:
|
|
message.segmentations.push(Segmentation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"];*/ 10:
|
|
message.authorisations.push(ProjectAuthorisation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Unit Units = 11 [json_name = "Units"];*/ 11:
|
|
message.units.push(Unit.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"];*/ 12:
|
|
message.openingRules.push(OpeningRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"];*/ 13:
|
|
message.durationRules.push(DurationRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"];*/ 14:
|
|
message.capacityRules.push(CapacityRule.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"];*/ 15:
|
|
message.instructions.push(LabelByLanguage.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"];*/ 16:
|
|
message.instructionDocuments.push(Document.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"];*/ 17:
|
|
message.carrierInformations.push(CarrierInformation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated string CalendarIDs = 18 [json_name = "CalendarIDs"];*/ 18:
|
|
message.calendarIDs.push(reader.string());
|
|
break;
|
|
case /* int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"];*/ 19:
|
|
message.roundedPeriodInMinutes = reader.int64().toBigInt();
|
|
break;
|
|
case /* string TargetTimeZone = 20 [json_name = "TargetTimeZone"];*/ 20:
|
|
message.targetTimeZone = reader.string();
|
|
break;
|
|
case /* repeated string Emails = 21 [json_name = "Emails"];*/ 21:
|
|
message.emails.push(reader.string());
|
|
break;
|
|
case /* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];*/ 22:
|
|
message.defaultSiteLanguageISO6391 = 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: UpdateSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string ID = 2 [json_name = "ID"]; */
|
|
if (message.iD !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.iD);
|
|
/* string Name = 3 [json_name = "Name"]; */
|
|
if (message.name !== "")
|
|
writer.tag(3, WireType.LengthDelimited).string(message.name);
|
|
/* bool Active = 4 [json_name = "Active"]; */
|
|
if (message.active !== false)
|
|
writer.tag(4, WireType.Varint).bool(message.active);
|
|
/* string PhotoURI = 5 [json_name = "PhotoURI"]; */
|
|
if (message.photoURI !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.photoURI);
|
|
/* api.Address Address = 6 [json_name = "Address"]; */
|
|
if (message.address)
|
|
Address.internalBinaryWrite(message.address, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string Phones = 7 [json_name = "Phones"]; */
|
|
for (let i = 0; i < message.phones.length; i++)
|
|
writer.tag(7, WireType.LengthDelimited).string(message.phones[i]);
|
|
/* string Fax = 8 [json_name = "Fax"]; */
|
|
if (message.fax !== "")
|
|
writer.tag(8, WireType.LengthDelimited).string(message.fax);
|
|
/* repeated api.Segmentation Segmentations = 9 [json_name = "Segmentations"]; */
|
|
for (let i = 0; i < message.segmentations.length; i++)
|
|
Segmentation.internalBinaryWrite(message.segmentations[i], writer.tag(9, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.ProjectAuthorisation Authorisations = 10 [json_name = "Authorisations"]; */
|
|
for (let i = 0; i < message.authorisations.length; i++)
|
|
ProjectAuthorisation.internalBinaryWrite(message.authorisations[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Unit Units = 11 [json_name = "Units"]; */
|
|
for (let i = 0; i < message.units.length; i++)
|
|
Unit.internalBinaryWrite(message.units[i], writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.OpeningRule OpeningRules = 12 [json_name = "OpeningRules"]; */
|
|
for (let i = 0; i < message.openingRules.length; i++)
|
|
OpeningRule.internalBinaryWrite(message.openingRules[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.DurationRule DurationRules = 13 [json_name = "DurationRules"]; */
|
|
for (let i = 0; i < message.durationRules.length; i++)
|
|
DurationRule.internalBinaryWrite(message.durationRules[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.CapacityRule CapacityRules = 14 [json_name = "CapacityRules"]; */
|
|
for (let i = 0; i < message.capacityRules.length; i++)
|
|
CapacityRule.internalBinaryWrite(message.capacityRules[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.LabelByLanguage Instructions = 15 [json_name = "Instructions"]; */
|
|
for (let i = 0; i < message.instructions.length; i++)
|
|
LabelByLanguage.internalBinaryWrite(message.instructions[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Document InstructionDocuments = 16 [json_name = "InstructionDocuments"]; */
|
|
for (let i = 0; i < message.instructionDocuments.length; i++)
|
|
Document.internalBinaryWrite(message.instructionDocuments[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.CarrierInformation CarrierInformations = 17 [json_name = "CarrierInformations"]; */
|
|
for (let i = 0; i < message.carrierInformations.length; i++)
|
|
CarrierInformation.internalBinaryWrite(message.carrierInformations[i], writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string CalendarIDs = 18 [json_name = "CalendarIDs"]; */
|
|
for (let i = 0; i < message.calendarIDs.length; i++)
|
|
writer.tag(18, WireType.LengthDelimited).string(message.calendarIDs[i]);
|
|
/* int64 RoundedPeriodInMinutes = 19 [json_name = "RoundedPeriodInMinutes"]; */
|
|
if (message.roundedPeriodInMinutes !== 0n)
|
|
writer.tag(19, WireType.Varint).int64(message.roundedPeriodInMinutes);
|
|
/* string TargetTimeZone = 20 [json_name = "TargetTimeZone"]; */
|
|
if (message.targetTimeZone !== "")
|
|
writer.tag(20, WireType.LengthDelimited).string(message.targetTimeZone);
|
|
/* repeated string Emails = 21 [json_name = "Emails"]; */
|
|
for (let i = 0; i < message.emails.length; i++)
|
|
writer.tag(21, WireType.LengthDelimited).string(message.emails[i]);
|
|
/* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"]; */
|
|
if (message.defaultSiteLanguageISO6391 !== "")
|
|
writer.tag(22, WireType.LengthDelimited).string(message.defaultSiteLanguageISO6391);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.UpdateSiteRequest
|
|
*/
|
|
export const UpdateSiteRequest = new UpdateSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class UpdateSiteResponse$Type extends MessageType<UpdateSiteResponse> {
|
|
constructor() {
|
|
super("api.UpdateSiteResponse", [
|
|
{ no: 1, name: "Site", kind: "message", jsonName: "Site", T: () => Site, options: { "validate.rules": { message: { required: true } } } }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<UpdateSiteResponse>): UpdateSiteResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<UpdateSiteResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSiteResponse): UpdateSiteResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.Site Site = 1 [json_name = "Site"];*/ 1:
|
|
message.site = Site.internalBinaryRead(reader, reader.uint32(), options, message.site);
|
|
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: UpdateSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.Site Site = 1 [json_name = "Site"]; */
|
|
if (message.site)
|
|
Site.internalBinaryWrite(message.site, writer.tag(1, 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.UpdateSiteResponse
|
|
*/
|
|
export const UpdateSiteResponse = new UpdateSiteResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteSiteRequest$Type extends MessageType<DeleteSiteRequest> {
|
|
constructor() {
|
|
super("api.DeleteSiteRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "ID", kind: "scalar", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } });
|
|
}
|
|
create(value?: PartialMessage<DeleteSiteRequest>): DeleteSiteRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.iD = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteSiteRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSiteRequest): DeleteSiteRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestOrganisationHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* string ID = 2 [json_name = "ID"];*/ 2:
|
|
message.iD = 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: DeleteSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestOrganisationHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestOrganisationHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string ID = 2 [json_name = "ID"]; */
|
|
if (message.iD !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.iD);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteSiteRequest
|
|
*/
|
|
export const DeleteSiteRequest = new DeleteSiteRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class DeleteSiteResponse$Type extends MessageType<DeleteSiteResponse> {
|
|
constructor() {
|
|
super("api.DeleteSiteResponse", []);
|
|
}
|
|
create(value?: PartialMessage<DeleteSiteResponse>): DeleteSiteResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
if (value !== undefined)
|
|
reflectionMergePartial<DeleteSiteResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DeleteSiteResponse): DeleteSiteResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
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: DeleteSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.DeleteSiteResponse
|
|
*/
|
|
export const DeleteSiteResponse = new DeleteSiteResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetAvailableSlotsRequest$Type extends MessageType<GetAvailableSlotsRequest> {
|
|
constructor() {
|
|
super("api.GetAvailableSlotsRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "AppointmentType", kind: "enum", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
{ no: 3, name: "Commissions", kind: "message", jsonName: "Commissions", repeat: 1 /*RepeatType.PACKED*/, T: () => Commission, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 4, name: "Segmentations", kind: "message", jsonName: "Segmentations", repeat: 1 /*RepeatType.PACKED*/, T: () => Segmentation },
|
|
{ no: 5, name: "StartDate", kind: "scalar", 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])$" } } } },
|
|
{ no: 6, name: "EndDate", kind: "scalar", 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_schema": { jsonSchema: { required: ["Header", "DurationInMinutes"] } } });
|
|
}
|
|
create(value?: PartialMessage<GetAvailableSlotsRequest>): GetAvailableSlotsRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.appointmentType = 0;
|
|
message.commissions = [];
|
|
message.segmentations = [];
|
|
message.startDate = "";
|
|
message.endDate = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetAvailableSlotsRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAvailableSlotsRequest): GetAvailableSlotsRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestSiteHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"];*/ 2:
|
|
message.appointmentType = reader.int32();
|
|
break;
|
|
case /* repeated api.Commission Commissions = 3 [json_name = "Commissions"];*/ 3:
|
|
message.commissions.push(Commission.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];*/ 4:
|
|
message.segmentations.push(Segmentation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* string StartDate = 5 [json_name = "StartDate"];*/ 5:
|
|
message.startDate = reader.string();
|
|
break;
|
|
case /* string EndDate = 6 [json_name = "EndDate"];*/ 6:
|
|
message.endDate = 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: GetAvailableSlotsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestSiteHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestSiteHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"]; */
|
|
if (message.appointmentType !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.appointmentType);
|
|
/* repeated api.Commission Commissions = 3 [json_name = "Commissions"]; */
|
|
for (let i = 0; i < message.commissions.length; i++)
|
|
Commission.internalBinaryWrite(message.commissions[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"]; */
|
|
for (let i = 0; i < message.segmentations.length; i++)
|
|
Segmentation.internalBinaryWrite(message.segmentations[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* string StartDate = 5 [json_name = "StartDate"]; */
|
|
if (message.startDate !== "")
|
|
writer.tag(5, WireType.LengthDelimited).string(message.startDate);
|
|
/* string EndDate = 6 [json_name = "EndDate"]; */
|
|
if (message.endDate !== "")
|
|
writer.tag(6, WireType.LengthDelimited).string(message.endDate);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.GetAvailableSlotsRequest
|
|
*/
|
|
export const GetAvailableSlotsRequest = new GetAvailableSlotsRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class GetAvailableSlotsResponse$Type extends MessageType<GetAvailableSlotsResponse> {
|
|
constructor() {
|
|
super("api.GetAvailableSlotsResponse", [
|
|
{ no: 1, name: "Slots", kind: "message", jsonName: "Slots", repeat: 1 /*RepeatType.PACKED*/, T: () => Slot }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<GetAvailableSlotsResponse>): GetAvailableSlotsResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.slots = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<GetAvailableSlotsResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAvailableSlotsResponse): GetAvailableSlotsResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.Slot Slots = 1 [json_name = "Slots"];*/ 1:
|
|
message.slots.push(Slot.internalBinaryRead(reader, reader.uint32(), options));
|
|
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: GetAvailableSlotsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.Slot Slots = 1 [json_name = "Slots"]; */
|
|
for (let i = 0; i < message.slots.length; i++)
|
|
Slot.internalBinaryWrite(message.slots[i], writer.tag(1, 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.GetAvailableSlotsResponse
|
|
*/
|
|
export const GetAvailableSlotsResponse = new GetAvailableSlotsResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class BookAppointmentRequest$Type extends MessageType<BookAppointmentRequest> {
|
|
constructor() {
|
|
super("api.BookAppointmentRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "AppointmentType", kind: "enum", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "validate.rules": { enum: { definedOnly: true } } } },
|
|
{ no: 3, name: "Commissions", kind: "message", jsonName: "Commissions", repeat: 1 /*RepeatType.PACKED*/, T: () => Commission, options: { "validate.rules": { repeated: { minItems: "1" } } } },
|
|
{ no: 4, name: "Segmentations", kind: "message", jsonName: "Segmentations", repeat: 1 /*RepeatType.PACKED*/, T: () => Segmentation },
|
|
{ no: 5, name: "CarrierInformation", kind: "message", jsonName: "CarrierInformation", repeat: 1 /*RepeatType.PACKED*/, T: () => CarrierInformation },
|
|
{ no: 6, name: "Slot", kind: "message", jsonName: "Slot", T: () => Slot },
|
|
{ no: 8, name: "Emails", kind: "scalar", 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: { required: ["Header", "AppointmentType", "Commissions", "QuantitiesByUnits", "Segmentations", "CarrierInformation"] } } });
|
|
}
|
|
create(value?: PartialMessage<BookAppointmentRequest>): BookAppointmentRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.appointmentType = 0;
|
|
message.commissions = [];
|
|
message.segmentations = [];
|
|
message.carrierInformation = [];
|
|
message.emails = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<BookAppointmentRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BookAppointmentRequest): BookAppointmentRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestSiteHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"];*/ 2:
|
|
message.appointmentType = reader.int32();
|
|
break;
|
|
case /* repeated api.Commission Commissions = 3 [json_name = "Commissions"];*/ 3:
|
|
message.commissions.push(Commission.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"];*/ 4:
|
|
message.segmentations.push(Segmentation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* repeated api.CarrierInformation CarrierInformation = 5 [json_name = "CarrierInformation"];*/ 5:
|
|
message.carrierInformation.push(CarrierInformation.internalBinaryRead(reader, reader.uint32(), options));
|
|
break;
|
|
case /* api.Slot Slot = 6 [json_name = "Slot"];*/ 6:
|
|
message.slot = Slot.internalBinaryRead(reader, reader.uint32(), options, message.slot);
|
|
break;
|
|
case /* repeated string Emails = 8 [json_name = "Emails"];*/ 8:
|
|
message.emails.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: BookAppointmentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestSiteHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestSiteHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.AppointmentType AppointmentType = 2 [json_name = "AppointmentType"]; */
|
|
if (message.appointmentType !== 0)
|
|
writer.tag(2, WireType.Varint).int32(message.appointmentType);
|
|
/* repeated api.Commission Commissions = 3 [json_name = "Commissions"]; */
|
|
for (let i = 0; i < message.commissions.length; i++)
|
|
Commission.internalBinaryWrite(message.commissions[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.Segmentation Segmentations = 4 [json_name = "Segmentations"]; */
|
|
for (let i = 0; i < message.segmentations.length; i++)
|
|
Segmentation.internalBinaryWrite(message.segmentations[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated api.CarrierInformation CarrierInformation = 5 [json_name = "CarrierInformation"]; */
|
|
for (let i = 0; i < message.carrierInformation.length; i++)
|
|
CarrierInformation.internalBinaryWrite(message.carrierInformation[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
/* api.Slot Slot = 6 [json_name = "Slot"]; */
|
|
if (message.slot)
|
|
Slot.internalBinaryWrite(message.slot, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
/* repeated string Emails = 8 [json_name = "Emails"]; */
|
|
for (let i = 0; i < message.emails.length; i++)
|
|
writer.tag(8, WireType.LengthDelimited).string(message.emails[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.BookAppointmentRequest
|
|
*/
|
|
export const BookAppointmentRequest = new BookAppointmentRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class BookAppointmentResponse$Type extends MessageType<BookAppointmentResponse> {
|
|
constructor() {
|
|
super("api.BookAppointmentResponse", [
|
|
{ no: 1, name: "AppointmentID", kind: "scalar", jsonName: "AppointmentID", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<BookAppointmentResponse>): BookAppointmentResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.appointmentID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<BookAppointmentResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: BookAppointmentResponse): BookAppointmentResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string AppointmentID = 1 [json_name = "AppointmentID"];*/ 1:
|
|
message.appointmentID = 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: BookAppointmentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string AppointmentID = 1 [json_name = "AppointmentID"]; */
|
|
if (message.appointmentID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.appointmentID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.BookAppointmentResponse
|
|
*/
|
|
export const BookAppointmentResponse = new BookAppointmentResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CancelAppointmentRequest$Type extends MessageType<CancelAppointmentRequest> {
|
|
constructor() {
|
|
super("api.CancelAppointmentRequest", [
|
|
{ no: 1, name: "Header", kind: "message", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
|
{ no: 2, name: "AppointmentID", kind: "scalar", jsonName: "AppointmentID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AppointmentID"] } } });
|
|
}
|
|
create(value?: PartialMessage<CancelAppointmentRequest>): CancelAppointmentRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.appointmentID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CancelAppointmentRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CancelAppointmentRequest): CancelAppointmentRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* api.RequestSiteHeader Header = 1 [json_name = "Header"];*/ 1:
|
|
message.header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.header);
|
|
break;
|
|
case /* string AppointmentID = 2 [json_name = "AppointmentID"];*/ 2:
|
|
message.appointmentID = 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: CancelAppointmentRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* api.RequestSiteHeader Header = 1 [json_name = "Header"]; */
|
|
if (message.header)
|
|
RequestSiteHeader.internalBinaryWrite(message.header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
/* string AppointmentID = 2 [json_name = "AppointmentID"]; */
|
|
if (message.appointmentID !== "")
|
|
writer.tag(2, WireType.LengthDelimited).string(message.appointmentID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CancelAppointmentRequest
|
|
*/
|
|
export const CancelAppointmentRequest = new CancelAppointmentRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class CancelAppointmentResponse$Type extends MessageType<CancelAppointmentResponse> {
|
|
constructor() {
|
|
super("api.CancelAppointmentResponse", [
|
|
{ no: 1, name: "AppointmentID", kind: "scalar", jsonName: "AppointmentID", T: 9 /*ScalarType.STRING*/ }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<CancelAppointmentResponse>): CancelAppointmentResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.appointmentID = "";
|
|
if (value !== undefined)
|
|
reflectionMergePartial<CancelAppointmentResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CancelAppointmentResponse): CancelAppointmentResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* string AppointmentID = 1 [json_name = "AppointmentID"];*/ 1:
|
|
message.appointmentID = 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: CancelAppointmentResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* string AppointmentID = 1 [json_name = "AppointmentID"]; */
|
|
if (message.appointmentID !== "")
|
|
writer.tag(1, WireType.LengthDelimited).string(message.appointmentID);
|
|
let u = options.writeUnknownFields;
|
|
if (u !== false)
|
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
return writer;
|
|
}
|
|
}
|
|
/**
|
|
* @generated MessageType for protobuf message api.CancelAppointmentResponse
|
|
*/
|
|
export const CancelAppointmentResponse = new CancelAppointmentResponse$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListUserSitesRequest$Type extends MessageType<ListUserSitesRequest> {
|
|
constructor() {
|
|
super("api.ListUserSitesRequest", [
|
|
{ no: 1, name: "ProjectID", kind: "scalar", jsonName: "ProjectID", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { repeated: { minItems: "1", items: { string: { minLen: "1" } } } } } }
|
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": {} });
|
|
}
|
|
create(value?: PartialMessage<ListUserSitesRequest>): ListUserSitesRequest {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.projectID = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListUserSitesRequest>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserSitesRequest): ListUserSitesRequest {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated string ProjectID = 1 [json_name = "ProjectID"];*/ 1:
|
|
message.projectID.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: ListUserSitesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated string ProjectID = 1 [json_name = "ProjectID"]; */
|
|
for (let i = 0; i < message.projectID.length; i++)
|
|
writer.tag(1, WireType.LengthDelimited).string(message.projectID[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.ListUserSitesRequest
|
|
*/
|
|
export const ListUserSitesRequest = new ListUserSitesRequest$Type();
|
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
class ListUserSitesResponse$Type extends MessageType<ListUserSitesResponse> {
|
|
constructor() {
|
|
super("api.ListUserSitesResponse", [
|
|
{ no: 1, name: "Sites", kind: "message", jsonName: "Sites", repeat: 1 /*RepeatType.PACKED*/, T: () => Site }
|
|
]);
|
|
}
|
|
create(value?: PartialMessage<ListUserSitesResponse>): ListUserSitesResponse {
|
|
const message = globalThis.Object.create((this.messagePrototype!));
|
|
message.sites = [];
|
|
if (value !== undefined)
|
|
reflectionMergePartial<ListUserSitesResponse>(this, message, value);
|
|
return message;
|
|
}
|
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ListUserSitesResponse): ListUserSitesResponse {
|
|
let message = target ?? this.create(), end = reader.pos + length;
|
|
while (reader.pos < end) {
|
|
let [fieldNo, wireType] = reader.tag();
|
|
switch (fieldNo) {
|
|
case /* repeated api.Site Sites = 1 [json_name = "Sites"];*/ 1:
|
|
message.sites.push(Site.internalBinaryRead(reader, reader.uint32(), options));
|
|
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: ListUserSitesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
/* repeated api.Site Sites = 1 [json_name = "Sites"]; */
|
|
for (let i = 0; i < message.sites.length; i++)
|
|
Site.internalBinaryWrite(message.sites[i], writer.tag(1, 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.ListUserSitesResponse
|
|
*/
|
|
export const ListUserSitesResponse = new ListUserSitesResponse$Type();
|
|
/**
|
|
* @generated ServiceType for protobuf service api.SiteService
|
|
*/
|
|
export const SiteService = new ServiceType("api.SiteService", [
|
|
{ name: "Create", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Create a site" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "slotbooking", "google.api.method_visibility": { restriction: "SDK" } }, I: CreateSiteRequest, O: CreateSiteResponse },
|
|
{ name: "Get", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Get a site" }, "api.rscType": "Site", "api.roles": "Platform.Site", "api.moduleID": "slotbooking", "google.api.method_visibility": { restriction: "SDK" } }, I: GetSiteRequest, O: GetSiteResponse },
|
|
{ name: "List", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "List site of an organisation" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "slotbooking", "google.api.method_visibility": { restriction: "SDK" } }, I: ListSiteRequest, O: ListSiteResponse },
|
|
{ name: "Update", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Update a site" }, "api.rscType": "Site", "api.roles": "", "api.moduleID": "slotbooking", "google.api.method_visibility": { restriction: "SDK" } }, I: UpdateSiteRequest, O: UpdateSiteResponse },
|
|
{ name: "Delete", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Delete a site" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "slotbooking", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteSiteRequest, O: DeleteSiteResponse },
|
|
{ name: "GetAvailableSlots", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Get available slots to book an appointment on the site." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetAvailableSlotsRequest, O: GetAvailableSlotsResponse },
|
|
{ name: "ListUserSites", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "List sites authorized for a user according to its permissions." }, "api.rscType": "Platform", "api.roles": "Platform.Site", "google.api.method_visibility": { restriction: "SDK" } }, I: ListUserSitesRequest, O: ListUserSitesResponse },
|
|
{ name: "BookAppointment", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site,Appointment"], description: "Book an appointment on the site." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: BookAppointmentRequest, O: BookAppointmentResponse },
|
|
{ name: "CancelAppointment", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site,Appointment"], description: "Cancel an appointment on the site." }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: CancelAppointmentRequest, O: CancelAppointmentResponse }
|
|
], { "api.k8sService": "slotbookingtype-server" });
|