diff --git a/package.json b/package.json index f54e05b..7216a45 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.12.0-SNAPSHOT-251121083655", + "version": "1.12.0-SNAPSHOT-251121102417", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/site.client.ts b/site.client.ts index 533292f..ccf8578 100644 --- a/site.client.ts +++ b/site.client.ts @@ -44,6 +44,8 @@ import type { ForceBookAppointmentRequest } from "./site"; import type { BookAppointmentNoReferenceRequest } from "./site"; import type { BookAppointmentResponse } from "./site"; import type { BookAppointmentRequest } from "./site"; +import type { CheckAppointmentCommissionResponse } from "./site"; +import type { CheckAppointmentCommissionRequest } from "./site"; import type { ListUserSitesResponse } from "./site"; import type { ListUserSitesRequest } from "./site"; import type { GetAllSlotsResponse } from "./site"; @@ -104,6 +106,10 @@ export interface ISiteServiceClient { * @generated from protobuf rpc: ListUserSites */ listUserSites(input: ListUserSitesRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: CheckAppointmentCommission + */ + checkAppointmentCommission(input: CheckAppointmentCommissionRequest, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: BookAppointment */ @@ -273,172 +279,179 @@ export class SiteServiceClient implements ISiteServiceClient, ServiceInfo { const method = this.methods[8], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: CheckAppointmentCommission + */ + checkAppointmentCommission(input: CheckAppointmentCommissionRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[9], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } /** * @generated from protobuf rpc: BookAppointment */ bookAppointment(input: BookAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[9], 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: BookAppointmentNoReference */ bookAppointmentNoReference(input: BookAppointmentNoReferenceRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[10], 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: ForceBookAppointment */ forceBookAppointment(input: ForceBookAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[11], opt = this._transport.mergeOptions(options); + const method = this.methods[12], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: CancelAppointment */ cancelAppointment(input: CancelAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[12], opt = this._transport.mergeOptions(options); + const method = this.methods[13], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: UpdateAppointment */ updateAppointment(input: UpdateAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[13], opt = this._transport.mergeOptions(options); + const method = this.methods[14], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: UpdateAppointmentNoReference */ updateAppointmentNoReference(input: UpdateAppointmentNoReferenceRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[14], opt = this._transport.mergeOptions(options); + const method = this.methods[15], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ForceUpdateAppointment */ forceUpdateAppointment(input: ForceUpdateAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[15], opt = this._transport.mergeOptions(options); + const method = this.methods[16], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: RescheduleAppointment */ rescheduleAppointment(input: RescheduleAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[16], opt = this._transport.mergeOptions(options); + const method = this.methods[17], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ForceRescheduleAppointment */ forceRescheduleAppointment(input: RescheduleAppointmentRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[17], opt = this._transport.mergeOptions(options); + const method = this.methods[18], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: DeleteSettings */ deleteSettings(input: DeleteSettingsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[18], opt = this._transport.mergeOptions(options); + const method = this.methods[19], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: CreateSettings */ createSettings(input: CreateSettingsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[19], opt = this._transport.mergeOptions(options); + const method = this.methods[20], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetUnits */ getUnits(input: GetUnitsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[20], opt = this._transport.mergeOptions(options); + const method = this.methods[21], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetBasicSettings */ getBasicSettings(input: GetBasicSettingsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[21], opt = this._transport.mergeOptions(options); + const method = this.methods[22], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ListSitesAuthorizedForBooking */ listSitesAuthorizedForBooking(input: ListSitesAuthorizedForBookingRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[22], opt = this._transport.mergeOptions(options); + const method = this.methods[23], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetBookingSegmentations */ getBookingSegmentations(input: GetBookingSegmentationsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[23], opt = this._transport.mergeOptions(options); + const method = this.methods[24], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ResolveSite */ resolveSite(input: ResolveSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[24], opt = this._transport.mergeOptions(options); + const method = this.methods[25], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetSiteFromAlias */ getSiteFromAlias(input: GetSiteFromAliasRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[25], opt = this._transport.mergeOptions(options); + const method = this.methods[26], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetAliasesOfSite */ getAliasesOfSite(input: GetAliasesOfSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[26], opt = this._transport.mergeOptions(options); + const method = this.methods[27], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: SetSiteAlias */ setSiteAlias(input: SetSiteAliasRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[27], opt = this._transport.mergeOptions(options); + const method = this.methods[28], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ClearSiteAlias */ clearSiteAlias(input: ClearSiteAliasRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[28], opt = this._transport.mergeOptions(options); + const method = this.methods[29], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ClearAliasesOfSite */ clearAliasesOfSite(input: ClearAliasesOfSiteRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[29], opt = this._transport.mergeOptions(options); + const method = this.methods[30], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: ClearAliasesOfProject */ clearAliasesOfProject(input: ClearAliasesOfProjectRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[30], opt = this._transport.mergeOptions(options); + const method = this.methods[31], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: InitBookerProfile */ initBookerProfile(input: InitBookerProfileRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[31], opt = this._transport.mergeOptions(options); + const method = this.methods[32], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } /** * @generated from protobuf rpc: GetBookingContext */ getBookingContext(input: GetBookingContextRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[32], opt = this._transport.mergeOptions(options); + const method = this.methods[33], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } } diff --git a/site.ts b/site.ts index 296f663..b5bbb93 100644 --- a/site.ts +++ b/site.ts @@ -12,12 +12,12 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { Period } from "./shared"; -import { ResponseHeader } from "./shared"; import { PrjMetadata } from "./metadatadef"; import { SegmentationFilter } from "./slotbooking"; import { QuantityByUnit } from "./slotbooking"; import { Slot } from "./slotbooking"; import { MetadataElement } from "./shared"; +import { ResponseHeader } from "./shared"; import { SlotGroup } from "./slotbooking"; import { SegmentationSelection } from "./slotbooking"; import { Commission } from "./slotbooking"; @@ -559,6 +559,44 @@ export interface GetAllSlotsResponse { */ EstimatedNeededDurationInMinutes: bigint; // Computed needed slot duration in minutes } +/** + * CheckAppointmentCommission + * + * @generated from protobuf message api.CheckAppointmentCommissionRequest + */ +export interface CheckAppointmentCommissionRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * Type of appointment : Expedition / Reception / Both + * + * @generated from protobuf field: api.AppointmentType AppointmentType = 2 + */ + AppointmentType: AppointmentType; + /** + * Definition of the commission to check + * + * @generated from protobuf field: api.Commission Commission = 3 + */ + Commission?: Commission; + /** + * actor with which the siteID/project-depositID will be processed + * + * @generated from protobuf field: string ActorID = 4 + */ + ActorID: string; +} +/** + * @generated from protobuf message api.CheckAppointmentCommissionResponse + */ +export interface CheckAppointmentCommissionResponse { + /** + * @generated from protobuf field: api.ResponseHeader Header = 2 + */ + Header?: ResponseHeader; +} /** * BookAppointment * @@ -2930,6 +2968,121 @@ class GetAllSlotsResponse$Type extends MessageType { */ export const GetAllSlotsResponse = new GetAllSlotsResponse$Type(); // @generated message type with reflection information, may provide speed optimized methods +class CheckAppointmentCommissionRequest$Type extends MessageType { + constructor() { + super("api.CheckAppointmentCommissionRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }, + { no: 2, name: "AppointmentType", kind: "enum", localName: "AppointmentType", jsonName: "AppointmentType", T: () => ["api.AppointmentType", AppointmentType], options: { "validate.rules": { enum: { definedOnly: true } } } }, + { no: 3, name: "Commission", kind: "message", localName: "Commission", jsonName: "Commission", T: () => Commission }, + { no: 4, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AppointmentType", "Commission", "ActorID"] } } }); + } + create(value?: PartialMessage): CheckAppointmentCommissionRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.AppointmentType = 0; + message.ActorID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckAppointmentCommissionRequest): CheckAppointmentCommissionRequest { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.RequestProjectHeader Header */ 1: + message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header); + break; + case /* api.AppointmentType AppointmentType */ 2: + message.AppointmentType = reader.int32(); + break; + case /* api.Commission Commission */ 3: + message.Commission = Commission.internalBinaryRead(reader, reader.uint32(), options, message.Commission); + break; + case /* string ActorID */ 4: + message.ActorID = 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: CheckAppointmentCommissionRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* api.AppointmentType AppointmentType = 2; */ + if (message.AppointmentType !== 0) + writer.tag(2, WireType.Varint).int32(message.AppointmentType); + /* api.Commission Commission = 3; */ + if (message.Commission) + Commission.internalBinaryWrite(message.Commission, writer.tag(3, WireType.LengthDelimited).fork(), options).join(); + /* string ActorID = 4; */ + if (message.ActorID !== "") + writer.tag(4, WireType.LengthDelimited).string(message.ActorID); + let u = options.writeUnknownFields; + if (u !== false) + (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer); + return writer; + } +} +/** + * @generated MessageType for protobuf message api.CheckAppointmentCommissionRequest + */ +export const CheckAppointmentCommissionRequest = new CheckAppointmentCommissionRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CheckAppointmentCommissionResponse$Type extends MessageType { + constructor() { + super("api.CheckAppointmentCommissionResponse", [ + { no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => ResponseHeader } + ]); + } + create(value?: PartialMessage): CheckAppointmentCommissionResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckAppointmentCommissionResponse): CheckAppointmentCommissionResponse { + let message = target ?? this.create(), end = reader.pos + length; + while (reader.pos < end) { + let [fieldNo, wireType] = reader.tag(); + switch (fieldNo) { + case /* api.ResponseHeader Header */ 2: + message.Header = ResponseHeader.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: CheckAppointmentCommissionResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.ResponseHeader Header = 2; */ + if (message.Header) + ResponseHeader.internalBinaryWrite(message.Header, writer.tag(2, 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.CheckAppointmentCommissionResponse + */ +export const CheckAppointmentCommissionResponse = new CheckAppointmentCommissionResponse$Type(); +// @generated message type with reflection information, may provide speed optimized methods class BookAppointmentRequest$Type extends MessageType { constructor() { super("api.BookAppointmentRequest", [ @@ -5756,6 +5909,7 @@ export const SiteService = new ServiceType("api.SiteService", [ { 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": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetAvailableSlotsRequest, O: GetAvailableSlotsResponse }, { name: "GetAllSlots", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Get all slots to book an appointment on the site." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetAvailableSlotsRequest, O: GetAllSlotsResponse }, { 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: "CheckAppointmentCommission", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Check an appointment commision" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: CheckAppointmentCommissionRequest, O: CheckAppointmentCommissionResponse }, { name: "BookAppointment", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Book an appointment on the site, if the requested slots are available." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: BookAppointmentRequest, O: BookAppointmentResponse }, { name: "BookAppointmentNoReference", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Book an appointment on the site, if the requested slots are available." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: BookAppointmentNoReferenceRequest, O: BookAppointmentResponse }, { name: "ForceBookAppointment", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Book an appointment on the site without checking if the slots are available." }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: ForceBookAppointmentRequest, O: BookAppointmentResponse },