diff --git a/calendar.client.ts b/calendar.client.ts index c083fa3d..39fc840f 100644 --- a/calendar.client.ts +++ b/calendar.client.ts @@ -4,8 +4,6 @@ import type { RpcTransport } from "@protobuf-ts/runtime-rpc"; import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { CalendarService } from "./calendar"; -import type { CloneCalendarOnSiteResponse } from "./calendar"; -import type { CloneCalendarOnSiteRequest } from "./calendar"; import type { ImportClassicHolidaysOnSiteResponse } from "./calendar"; import type { ImportClassicHolidaysOnSiteRequest } from "./calendar"; import type { DeleteCalendarOnSiteResponse } from "./calendar"; @@ -18,8 +16,6 @@ import type { GetCalendarOnSiteResponse } from "./calendar"; import type { GetCalendarOnSiteRequest } from "./calendar"; import type { CreateCalendarOnSiteResponse } from "./calendar"; import type { CreateCalendarOnSiteRequest } from "./calendar"; -import type { CloneCalendarOnOrganisationResponse } from "./calendar"; -import type { CloneCalendarOnOrganisationRequest } from "./calendar"; import type { ImportClassicHolidaysOnOrganisationResponse } from "./calendar"; import type { ImportClassicHolidaysOnOrganisationRequest } from "./calendar"; import type { DeleteCalendarOnOrganisationResponse } from "./calendar"; @@ -63,10 +59,6 @@ export interface ICalendarServiceClient { * @generated from protobuf rpc: ImportClassicHolidaysOnOrganisation(api.ImportClassicHolidaysOnOrganisationRequest) returns (api.ImportClassicHolidaysOnOrganisationResponse); */ importClassicHolidaysOnOrganisation(input: ImportClassicHolidaysOnOrganisationRequest, options?: RpcOptions): UnaryCall; - /** - * @generated from protobuf rpc: CloneCalendarOnOrganisation(api.CloneCalendarOnOrganisationRequest) returns (api.CloneCalendarOnOrganisationResponse); - */ - cloneCalendarOnOrganisation(input: CloneCalendarOnOrganisationRequest, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: CreateCalendarOnSite(api.CreateCalendarOnSiteRequest) returns (api.CreateCalendarOnSiteResponse); */ @@ -91,10 +83,6 @@ export interface ICalendarServiceClient { * @generated from protobuf rpc: ImportClassicHolidaysOnSite(api.ImportClassicHolidaysOnSiteRequest) returns (api.ImportClassicHolidaysOnSiteResponse); */ importClassicHolidaysOnSite(input: ImportClassicHolidaysOnSiteRequest, options?: RpcOptions): UnaryCall; - /** - * @generated from protobuf rpc: CloneCalendarOnSite(api.CloneCalendarOnSiteRequest) returns (api.CloneCalendarOnSiteResponse); - */ - cloneCalendarOnSite(input: CloneCalendarOnSiteRequest, options?: RpcOptions): UnaryCall; } /** * @generated from protobuf service api.CalendarService @@ -147,60 +135,46 @@ export class CalendarServiceClient implements ICalendarServiceClient, ServiceInf const method = this.methods[5], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } - /** - * @generated from protobuf rpc: CloneCalendarOnOrganisation(api.CloneCalendarOnOrganisationRequest) returns (api.CloneCalendarOnOrganisationResponse); - */ - cloneCalendarOnOrganisation(input: CloneCalendarOnOrganisationRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[6], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } /** * @generated from protobuf rpc: CreateCalendarOnSite(api.CreateCalendarOnSiteRequest) returns (api.CreateCalendarOnSiteResponse); */ createCalendarOnSite(input: CreateCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[7], opt = this._transport.mergeOptions(options); + const method = this.methods[6], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetCalendarOnSite(api.GetCalendarOnSiteRequest) returns (api.GetCalendarOnSiteResponse); */ getCalendarOnSite(input: GetCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[8], opt = this._transport.mergeOptions(options); + const method = this.methods[7], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ListCalendarOnSite(api.ListCalendarOnSiteRequest) returns (api.ListCalendarOnSiteResponse); */ listCalendarOnSite(input: ListCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[9], opt = this._transport.mergeOptions(options); + const method = this.methods[8], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: UpdateCalendarOnSite(api.UpdateCalendarOnSiteRequest) returns (api.UpdateCalendarOnSiteResponse); */ updateCalendarOnSite(input: UpdateCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[10], opt = this._transport.mergeOptions(options); + const method = this.methods[9], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: DeleteCalendarOnSite(api.DeleteCalendarOnSiteRequest) returns (api.DeleteCalendarOnSiteResponse); */ deleteCalendarOnSite(input: DeleteCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[11], opt = this._transport.mergeOptions(options); + const method = this.methods[10], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ImportClassicHolidaysOnSite(api.ImportClassicHolidaysOnSiteRequest) returns (api.ImportClassicHolidaysOnSiteResponse); */ importClassicHolidaysOnSite(input: ImportClassicHolidaysOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[12], opt = this._transport.mergeOptions(options); + const method = this.methods[11], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } - /** - * @generated from protobuf rpc: CloneCalendarOnSite(api.CloneCalendarOnSiteRequest) returns (api.CloneCalendarOnSiteResponse); - */ - cloneCalendarOnSite(input: CloneCalendarOnSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[13], opt = this._transport.mergeOptions(options); - return stackIntercept("unary", this._transport, method, opt, input); - } } diff --git a/calendar.ts b/calendar.ts index 414f9d5d..be263545 100644 --- a/calendar.ts +++ b/calendar.ts @@ -18,19 +18,25 @@ import { LabelByLanguage } from "./shared"; import { TimeRange } from "./shared"; import { WeekDay } from "./shared"; /** - * @generated from protobuf message api.WorkDay + * @generated from protobuf message api.WorkTimeDay */ -export interface WorkDay { +export interface WorkTimeDay { /** * Day of the week * * @generated from protobuf field: api.WeekDay WeekDay = 1 [json_name = "WeekDay"]; */ WeekDay: WeekDay; + /** + * Is a workingDay + * + * @generated from protobuf field: bool IsWorkingDay = 2 [json_name = "IsWorkingDay"]; + */ + IsWorkingDay: boolean; /** * Opening hours definition according to filters * - * @generated from protobuf field: repeated api.TimeRange TimeRanges = 2 [json_name = "TimeRanges"]; + * @generated from protobuf field: repeated api.TimeRange TimeRanges = 3 [json_name = "TimeRanges"]; */ TimeRanges: TimeRange[]; } @@ -44,21 +50,6 @@ export interface ExceptionnalClosure { * @generated from protobuf field: repeated api.LabelByLanguage Label = 1 [json_name = "Label"]; */ Label: LabelByLanguage[]; - // string StartDate = 2 - // [ - // (validate.rules).string.dateIso8601 = true, - // (viewType) = {Types: [ - // {Context: "*", Type: "date"} - // ]} - // ]; - // string EndDate = 3 - // [ - // (validate.rules).string.dateIso8601 = true, - // (viewType) = {Types: [ - // {Context: "*", Type: "date"} - // ]} - // ]; - /** * Start of the ExceptionnalClosure, format yyyy-mm-dd //TODO are we sure about the format * @@ -129,11 +120,11 @@ export interface Calendar { */ ExceptionnalClosures: ExceptionnalClosure[]; /** - * Definition of the opening rules by week day + * Definition of the opening hours by week day * - * @generated from protobuf field: repeated api.WorkDay WorkDays = 7 [json_name = "WorkDays"]; + * @generated from protobuf field: repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; */ - WorkDays: WorkDay[]; + WorkTimeDays: WorkTimeDay[]; } // ========== REQUESTS & RESPONSE MESSAGES ========== @@ -167,6 +158,12 @@ export interface CreateCalendarOnOrganisationRequest { * @generated from protobuf field: repeated api.ExceptionnalClosure ExceptionnalClosures = 4 [json_name = "ExceptionnalClosures"]; */ ExceptionnalClosures: ExceptionnalClosure[]; + /** + * Definition of the opening hours by week day + * + * @generated from protobuf field: repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; + */ + WorkTimeDays: WorkTimeDay[]; } /** * @generated from protobuf message api.CreateCalendarOnOrganisationResponse @@ -255,6 +252,12 @@ export interface UpdateCalendarOnOrganisationRequest { * @generated from protobuf field: repeated api.ExceptionnalClosure ExceptionnalClosures = 5 [json_name = "ExceptionnalClosures"]; */ ExceptionnalClosures: ExceptionnalClosure[]; + /** + * Definition of the opening hours by week day + * + * @generated from protobuf field: repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; + */ + WorkTimeDays: WorkTimeDay[]; } /** * @generated from protobuf message api.UpdateCalendarOnOrganisationResponse @@ -375,6 +378,12 @@ export interface CreateCalendarOnSiteRequest { * @generated from protobuf field: repeated api.ExceptionnalClosure ExceptionnalClosures = 4 [json_name = "ExceptionnalClosures"]; */ ExceptionnalClosures: ExceptionnalClosure[]; + /** + * Definition of the opening hours by week day + * + * @generated from protobuf field: repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; + */ + WorkTimeDays: WorkTimeDay[]; } /** * @generated from protobuf message api.CreateCalendarOnSiteResponse @@ -465,6 +474,12 @@ export interface UpdateCalendarOnSiteRequest { * @generated from protobuf field: repeated api.ExceptionnalClosure ExceptionnalClosures = 5 [json_name = "ExceptionnalClosures"]; */ ExceptionnalClosures: ExceptionnalClosure[]; + /** + * Definition of the opening hours by week day + * + * @generated from protobuf field: repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; + */ + WorkTimeDays: WorkTimeDay[]; } /** * @generated from protobuf message api.UpdateCalendarOnSiteResponse @@ -558,22 +573,24 @@ export interface CloneCalendarOnSiteResponse { Calendar?: Calendar; } // @generated message type with reflection information, may provide speed optimized methods -class WorkDay$Type extends MessageType { +class WorkTimeDay$Type extends MessageType { constructor() { - super("api.WorkDay", [ + super("api.WorkTimeDay", [ { no: 1, name: "WeekDay", kind: "enum", localName: "WeekDay", jsonName: "WeekDay", T: () => ["api.WeekDay", WeekDay] }, - { no: 2, name: "TimeRanges", kind: "message", localName: "TimeRanges", jsonName: "TimeRanges", repeat: 1 /*RepeatType.PACKED*/, T: () => TimeRange } + { no: 2, name: "IsWorkingDay", kind: "scalar", localName: "IsWorkingDay", jsonName: "IsWorkingDay", T: 8 /*ScalarType.BOOL*/ }, + { no: 3, name: "TimeRanges", kind: "message", localName: "TimeRanges", jsonName: "TimeRanges", repeat: 1 /*RepeatType.PACKED*/, T: () => TimeRange } ]); } - create(value?: PartialMessage): WorkDay { + create(value?: PartialMessage): WorkTimeDay { const message = globalThis.Object.create((this.messagePrototype!)); message.WeekDay = 0; + message.IsWorkingDay = false; message.TimeRanges = []; if (value !== undefined) - reflectionMergePartial(this, message, value); + reflectionMergePartial(this, message, value); return message; } - internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WorkDay): WorkDay { + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WorkTimeDay): WorkTimeDay { let message = target ?? this.create(), end = reader.pos + length; while (reader.pos < end) { let [fieldNo, wireType] = reader.tag(); @@ -581,7 +598,10 @@ class WorkDay$Type extends MessageType { case /* api.WeekDay WeekDay = 1 [json_name = "WeekDay"];*/ 1: message.WeekDay = reader.int32(); break; - case /* repeated api.TimeRange TimeRanges = 2 [json_name = "TimeRanges"];*/ 2: + case /* bool IsWorkingDay = 2 [json_name = "IsWorkingDay"];*/ 2: + message.IsWorkingDay = reader.bool(); + break; + case /* repeated api.TimeRange TimeRanges = 3 [json_name = "TimeRanges"];*/ 3: message.TimeRanges.push(TimeRange.internalBinaryRead(reader, reader.uint32(), options)); break; default: @@ -595,13 +615,16 @@ class WorkDay$Type extends MessageType { } return message; } - internalBinaryWrite(message: WorkDay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + internalBinaryWrite(message: WorkTimeDay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { /* api.WeekDay WeekDay = 1 [json_name = "WeekDay"]; */ if (message.WeekDay !== 0) writer.tag(1, WireType.Varint).int32(message.WeekDay); - /* repeated api.TimeRange TimeRanges = 2 [json_name = "TimeRanges"]; */ + /* bool IsWorkingDay = 2 [json_name = "IsWorkingDay"]; */ + if (message.IsWorkingDay !== false) + writer.tag(2, WireType.Varint).bool(message.IsWorkingDay); + /* repeated api.TimeRange TimeRanges = 3 [json_name = "TimeRanges"]; */ for (let i = 0; i < message.TimeRanges.length; i++) - TimeRange.internalBinaryWrite(message.TimeRanges[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join(); + TimeRange.internalBinaryWrite(message.TimeRanges[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -609,9 +632,9 @@ class WorkDay$Type extends MessageType { } } /** - * @generated MessageType for protobuf message api.WorkDay + * @generated MessageType for protobuf message api.WorkTimeDay */ -export const WorkDay = new WorkDay$Type(); +export const WorkTimeDay = new WorkTimeDay$Type(); // @generated message type with reflection information, may provide speed optimized methods class ExceptionnalClosure$Type extends MessageType { constructor() { @@ -709,7 +732,7 @@ class Calendar$Type extends MessageType { { no: 4, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ }, { no: 5, name: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, { no: 6, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure }, - { no: 7, name: "WorkDays", kind: "message", localName: "WorkDays", jsonName: "WorkDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkDay, options: { "api.aggKey": "WeekDay" } } + { no: 7, name: "WorkTimeDays", kind: "message", localName: "WorkTimeDays", jsonName: "WorkTimeDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkTimeDay, options: { "api.aggKey": "WeekDay" } } ]); } create(value?: PartialMessage): Calendar { @@ -720,7 +743,7 @@ class Calendar$Type extends MessageType { message.Name = ""; message.Description = ""; message.ExceptionnalClosures = []; - message.WorkDays = []; + message.WorkTimeDays = []; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -748,8 +771,8 @@ class Calendar$Type extends MessageType { case /* repeated api.ExceptionnalClosure ExceptionnalClosures = 6 [json_name = "ExceptionnalClosures"];*/ 6: message.ExceptionnalClosures.push(ExceptionnalClosure.internalBinaryRead(reader, reader.uint32(), options)); break; - case /* repeated api.WorkDay WorkDays = 7 [json_name = "WorkDays"];*/ 7: - message.WorkDays.push(WorkDay.internalBinaryRead(reader, reader.uint32(), options)); + case /* repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"];*/ 7: + message.WorkTimeDays.push(WorkTimeDay.internalBinaryRead(reader, reader.uint32(), options)); break; default: let u = options.readUnknownField; @@ -781,9 +804,9 @@ class Calendar$Type extends MessageType { /* repeated api.ExceptionnalClosure ExceptionnalClosures = 6 [json_name = "ExceptionnalClosures"]; */ for (let i = 0; i < message.ExceptionnalClosures.length; i++) ExceptionnalClosure.internalBinaryWrite(message.ExceptionnalClosures[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join(); - /* repeated api.WorkDay WorkDays = 7 [json_name = "WorkDays"]; */ - for (let i = 0; i < message.WorkDays.length; i++) - WorkDay.internalBinaryWrite(message.WorkDays[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); + /* repeated api.WorkTimeDay WorkTimeDays = 7 [json_name = "WorkTimeDays"]; */ + for (let i = 0; i < message.WorkTimeDays.length; i++) + WorkTimeDay.internalBinaryWrite(message.WorkTimeDays[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join(); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -801,7 +824,8 @@ class CreateCalendarOnOrganisationRequest$Type extends MessageType RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } }, { no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, - { no: 4, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure } + { no: 4, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure }, + { no: 7, name: "WorkTimeDays", kind: "message", localName: "WorkTimeDays", jsonName: "WorkTimeDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkTimeDay, options: { "api.aggKey": "WeekDay" } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); } create(value?: PartialMessage): CreateCalendarOnOrganisationRequest { @@ -809,6 +833,7 @@ class CreateCalendarOnOrganisationRequest$Type extends MessageType(this, message, value); return message; @@ -830,6 +855,9 @@ class CreateCalendarOnOrganisationRequest$Type extends MessageType ExceptionnalClosure } + { no: 5, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure }, + { no: 7, name: "WorkTimeDays", kind: "message", localName: "WorkTimeDays", jsonName: "WorkTimeDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkTimeDay, options: { "api.aggKey": "WeekDay" } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); } create(value?: PartialMessage): UpdateCalendarOnOrganisationRequest { @@ -1120,6 +1152,7 @@ class UpdateCalendarOnOrganisationRequest$Type extends MessageType(this, message, value); return message; @@ -1144,6 +1177,9 @@ class UpdateCalendarOnOrganisationRequest$Type extends MessageType RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } }, { no: 2, name: "Name", kind: "scalar", localName: "Name", jsonName: "Name", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "Description", kind: "scalar", localName: "Description", jsonName: "Description", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } }, - { no: 4, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure } + { no: 4, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure }, + { no: 7, name: "WorkTimeDays", kind: "message", localName: "WorkTimeDays", jsonName: "WorkTimeDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkTimeDay, options: { "api.aggKey": "WeekDay" } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); } create(value?: PartialMessage): CreateCalendarOnSiteRequest { @@ -1551,6 +1591,7 @@ class CreateCalendarOnSiteRequest$Type extends MessageType(this, message, value); return message; @@ -1572,6 +1613,9 @@ class CreateCalendarOnSiteRequest$Type extends MessageType ExceptionnalClosure } + { no: 5, name: "ExceptionnalClosures", kind: "message", localName: "ExceptionnalClosures", jsonName: "ExceptionnalClosures", repeat: 1 /*RepeatType.PACKED*/, T: () => ExceptionnalClosure }, + { no: 7, name: "WorkTimeDays", kind: "message", localName: "WorkTimeDays", jsonName: "WorkTimeDays", repeat: 1 /*RepeatType.PACKED*/, T: () => WorkTimeDay, options: { "api.aggKey": "WeekDay" } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); } create(value?: PartialMessage): UpdateCalendarOnSiteRequest { @@ -1862,6 +1910,7 @@ class UpdateCalendarOnSiteRequest$Type extends MessageType(this, message, value); return message; @@ -1886,6 +1935,9 @@ class UpdateCalendarOnSiteRequest$Type extends MessageType { diff --git a/package.json b/package.json index 4ed1ea53..91e47f9d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.11.0-SNAPSHOT-250430075943", + "version": "1.11.0-SNAPSHOT-250430151833", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/site.ts b/site.ts index c9d9d3f9..bea8cd54 100644 --- a/site.ts +++ b/site.ts @@ -120,34 +120,28 @@ export interface Site { * @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"]; + * @generated from protobuf field: int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"]; */ RoundedPeriodInMinutes: bigint; /** * Site Time zone * - * @generated from protobuf field: string TimeZone = 20 [json_name = "TimeZone"]; + * @generated from protobuf field: string TimeZone = 19 [json_name = "TimeZone"]; */ TimeZone: string; /** * Must be a valid email address * - * @generated from protobuf field: repeated string Emails = 21 [json_name = "Emails"]; + * @generated from protobuf field: repeated string Emails = 20 [json_name = "Emails"]; */ Emails: string[]; /** * set the fallback language in case of missing translation * - * @generated from protobuf field: string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"]; + * @generated from protobuf field: string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"]; */ DefaultSiteLanguageISO6391: string; } @@ -178,9 +172,9 @@ export interface CreateSiteRequest { /** * Must be a valid email address from a user know to the platform * - * @generated from protobuf field: string Emails = 4 [json_name = "Emails"]; + * @generated from protobuf field: string Email = 4 [json_name = "Email"]; */ - Emails: string; + Email: string; } /** * @generated from protobuf message api.CreateSiteResponse @@ -329,34 +323,28 @@ export interface UpdateSiteRequest { * @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"]; + * @generated from protobuf field: int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"]; */ RoundedPeriodInMinutes: bigint; /** * Add Site Time zone * - * @generated from protobuf field: string TargetTimeZone = 20 [json_name = "TargetTimeZone"]; + * @generated from protobuf field: string TargetTimeZone = 19 [json_name = "TargetTimeZone"]; */ TargetTimeZone: string; /** * Must be a valid email address * - * @generated from protobuf field: repeated string Emails = 21 [json_name = "Emails"]; + * @generated from protobuf field: repeated string Emails = 20 [json_name = "Emails"]; */ Emails: string[]; /** * set the fallback language in case of missing translation * - * @generated from protobuf field: string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"]; + * @generated from protobuf field: string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"]; */ DefaultSiteLanguageISO6391: string; } @@ -563,11 +551,10 @@ class Site$Type extends MessageType { { no: 15, name: "Instructions", kind: "message", localName: "Instructions", jsonName: "Instructions", repeat: 1 /*RepeatType.PACKED*/, T: () => LabelByLanguage, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } }, { no: 16, name: "InstructionDocuments", kind: "message", localName: "InstructionDocuments", jsonName: "InstructionDocuments", repeat: 1 /*RepeatType.PACKED*/, T: () => Document }, { no: 17, name: "CarrierInformations", kind: "message", localName: "CarrierInformations", jsonName: "CarrierInformations", repeat: 1 /*RepeatType.PACKED*/, T: () => CarrierInformation }, - { no: 18, name: "CalendarIDs", kind: "scalar", localName: "CalendarIDs", jsonName: "CalendarIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 19, name: "RoundedPeriodInMinutes", kind: "scalar", localName: "RoundedPeriodInMinutes", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 20, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Site time zone format", example: "\"Europe/Paris\"" } } }, - { no: 21, name: "Emails", kind: "scalar", localName: "Emails", 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", localName: "DefaultSiteLanguageISO6391", 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: "ISO 639 code message language", example: "\"en\"" } } } + { no: 18, name: "RoundedPeriodInMinutes", kind: "scalar", localName: "RoundedPeriodInMinutes", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 19, name: "TimeZone", kind: "scalar", localName: "TimeZone", jsonName: "TimeZone", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", tzData: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Site time zone format", example: "\"Europe/Paris\"" } } }, + { no: 20, name: "Emails", kind: "scalar", localName: "Emails", 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: 21, name: "DefaultSiteLanguageISO6391", kind: "scalar", localName: "DefaultSiteLanguageISO6391", 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: "ISO 639 code message language", example: "\"en\"" } } } ]); } create(value?: PartialMessage): Site { @@ -588,7 +575,6 @@ class Site$Type extends MessageType { message.Instructions = []; message.InstructionDocuments = []; message.CarrierInformations = []; - message.CalendarIDs = []; message.RoundedPeriodInMinutes = 0n; message.TimeZone = ""; message.Emails = []; @@ -653,19 +639,16 @@ class Site$Type extends MessageType { 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: + case /* int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"];*/ 18: message.RoundedPeriodInMinutes = reader.int64().toBigInt(); break; - case /* string TimeZone = 20 [json_name = "TimeZone"];*/ 20: + case /* string TimeZone = 19 [json_name = "TimeZone"];*/ 19: message.TimeZone = reader.string(); break; - case /* repeated string Emails = 21 [json_name = "Emails"];*/ 21: + case /* repeated string Emails = 20 [json_name = "Emails"];*/ 20: message.Emails.push(reader.string()); break; - case /* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];*/ 22: + case /* string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"];*/ 21: message.DefaultSiteLanguageISO6391 = reader.string(); break; default: @@ -731,21 +714,18 @@ class Site$Type extends MessageType { /* 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"]; */ + /* int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"]; */ if (message.RoundedPeriodInMinutes !== 0n) - writer.tag(19, WireType.Varint).int64(message.RoundedPeriodInMinutes); - /* string TimeZone = 20 [json_name = "TimeZone"]; */ + writer.tag(18, WireType.Varint).int64(message.RoundedPeriodInMinutes); + /* string TimeZone = 19 [json_name = "TimeZone"]; */ if (message.TimeZone !== "") - writer.tag(20, WireType.LengthDelimited).string(message.TimeZone); - /* repeated string Emails = 21 [json_name = "Emails"]; */ + writer.tag(19, WireType.LengthDelimited).string(message.TimeZone); + /* repeated string Emails = 20 [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"]; */ + writer.tag(20, WireType.LengthDelimited).string(message.Emails[i]); + /* string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"]; */ if (message.DefaultSiteLanguageISO6391 !== "") - writer.tag(22, WireType.LengthDelimited).string(message.DefaultSiteLanguageISO6391); + writer.tag(21, WireType.LengthDelimited).string(message.DefaultSiteLanguageISO6391); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -763,14 +743,14 @@ class CreateSiteRequest$Type extends MessageType { { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } }, { no: 2, name: "SiteID", kind: "scalar", localName: "SiteID", jsonName: "SiteID", T: 9 /*ScalarType.STRING*/ }, { no: 3, name: "SiteName", kind: "scalar", localName: "SiteName", jsonName: "SiteName", T: 9 /*ScalarType.STRING*/ }, - { no: 4, name: "Emails", kind: "scalar", localName: "Emails", jsonName: "Emails", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1", email: true } } } } + { no: 4, name: "Email", kind: "scalar", localName: "Email", jsonName: "Email", 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 { const message = globalThis.Object.create((this.messagePrototype!)); message.SiteID = ""; message.SiteName = ""; - message.Emails = ""; + message.Email = ""; if (value !== undefined) reflectionMergePartial(this, message, value); return message; @@ -789,8 +769,8 @@ class CreateSiteRequest$Type extends MessageType { 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(); + case /* string Email = 4 [json_name = "Email"];*/ 4: + message.Email = reader.string(); break; default: let u = options.readUnknownField; @@ -813,9 +793,9 @@ class CreateSiteRequest$Type extends MessageType { /* 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); + /* string Email = 4 [json_name = "Email"]; */ + if (message.Email !== "") + writer.tag(4, WireType.LengthDelimited).string(message.Email); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); @@ -1086,11 +1066,10 @@ class UpdateSiteRequest$Type extends MessageType { { no: 15, name: "Instructions", kind: "message", localName: "Instructions", jsonName: "Instructions", repeat: 1 /*RepeatType.PACKED*/, T: () => LabelByLanguage, options: { "api.language": true, "api.aggKey": "LanguageCodeISO6391" } }, { no: 16, name: "InstructionDocuments", kind: "message", localName: "InstructionDocuments", jsonName: "InstructionDocuments", repeat: 1 /*RepeatType.PACKED*/, T: () => Document }, { no: 17, name: "CarrierInformations", kind: "message", localName: "CarrierInformations", jsonName: "CarrierInformations", repeat: 1 /*RepeatType.PACKED*/, T: () => CarrierInformation }, - { no: 18, name: "CalendarIDs", kind: "scalar", localName: "CalendarIDs", jsonName: "CalendarIDs", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ }, - { no: 19, name: "RoundedPeriodInMinutes", kind: "scalar", localName: "RoundedPeriodInMinutes", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, - { no: 20, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", 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 format", example: "\"Europe/Paris\"" } } }, - { no: 21, name: "Emails", kind: "scalar", localName: "Emails", 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", localName: "DefaultSiteLanguageISO6391", 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: "ISO 639 code message language", example: "\"en\"" } } } + { no: 18, name: "RoundedPeriodInMinutes", kind: "scalar", localName: "RoundedPeriodInMinutes", jsonName: "RoundedPeriodInMinutes", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ }, + { no: 19, name: "TargetTimeZone", kind: "scalar", localName: "TargetTimeZone", 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 format", example: "\"Europe/Paris\"" } } }, + { no: 20, name: "Emails", kind: "scalar", localName: "Emails", 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: 21, name: "DefaultSiteLanguageISO6391", kind: "scalar", localName: "DefaultSiteLanguageISO6391", 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: "ISO 639 code message language", example: "\"en\"" } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID"] } } }); } create(value?: PartialMessage): UpdateSiteRequest { @@ -1110,7 +1089,6 @@ class UpdateSiteRequest$Type extends MessageType { message.Instructions = []; message.InstructionDocuments = []; message.CarrierInformations = []; - message.CalendarIDs = []; message.RoundedPeriodInMinutes = 0n; message.TargetTimeZone = ""; message.Emails = []; @@ -1175,19 +1153,16 @@ class UpdateSiteRequest$Type extends MessageType { 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: + case /* int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"];*/ 18: message.RoundedPeriodInMinutes = reader.int64().toBigInt(); break; - case /* string TargetTimeZone = 20 [json_name = "TargetTimeZone"];*/ 20: + case /* string TargetTimeZone = 19 [json_name = "TargetTimeZone"];*/ 19: message.TargetTimeZone = reader.string(); break; - case /* repeated string Emails = 21 [json_name = "Emails"];*/ 21: + case /* repeated string Emails = 20 [json_name = "Emails"];*/ 20: message.Emails.push(reader.string()); break; - case /* string DefaultSiteLanguageISO6391 = 22 [json_name = "DefaultSiteLanguageISO6391"];*/ 22: + case /* string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"];*/ 21: message.DefaultSiteLanguageISO6391 = reader.string(); break; default: @@ -1253,21 +1228,18 @@ class UpdateSiteRequest$Type extends MessageType { /* 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"]; */ + /* int64 RoundedPeriodInMinutes = 18 [json_name = "RoundedPeriodInMinutes"]; */ if (message.RoundedPeriodInMinutes !== 0n) - writer.tag(19, WireType.Varint).int64(message.RoundedPeriodInMinutes); - /* string TargetTimeZone = 20 [json_name = "TargetTimeZone"]; */ + writer.tag(18, WireType.Varint).int64(message.RoundedPeriodInMinutes); + /* string TargetTimeZone = 19 [json_name = "TargetTimeZone"]; */ if (message.TargetTimeZone !== "") - writer.tag(20, WireType.LengthDelimited).string(message.TargetTimeZone); - /* repeated string Emails = 21 [json_name = "Emails"]; */ + writer.tag(19, WireType.LengthDelimited).string(message.TargetTimeZone); + /* repeated string Emails = 20 [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"]; */ + writer.tag(20, WireType.LengthDelimited).string(message.Emails[i]); + /* string DefaultSiteLanguageISO6391 = 21 [json_name = "DefaultSiteLanguageISO6391"]; */ if (message.DefaultSiteLanguageISO6391 !== "") - writer.tag(22, WireType.LengthDelimited).string(message.DefaultSiteLanguageISO6391); + writer.tag(21, WireType.LengthDelimited).string(message.DefaultSiteLanguageISO6391); let u = options.writeUnknownFields; if (u !== false) (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);