diff --git a/package.json b/package.json index 2983d0f7..80c4b5e9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@reflex-platform/npm-core-sdk", - "version": "1.13.0-SNAPSHOT-260116161846", + "version": "1.13.0-SNAPSHOT-260119091023", "description": "npm libs from core model proto files", "homepage": "", "main": "index.ts", diff --git a/site.client.ts b/site.client.ts index ccaaa5f3..5114969a 100644 --- a/site.client.ts +++ b/site.client.ts @@ -6,6 +6,8 @@ import type { ServiceInfo } from "@protobuf-ts/runtime-rpc"; import { SiteService } from "./site"; import type { ListSettingsResponse } from "./site"; import type { ListSettingsRequest } from "./site"; +import type { CheckAppointmentModifiableResponse } from "./site"; +import type { CheckAppointmentModifiableRequest } from "./site"; import type { GetMyBookingContextResponse } from "./site"; import type { GetMyBookingContextRequest } from "./site"; import type { GetBookingContextResponse } from "./site"; @@ -209,6 +211,10 @@ export interface ISiteServiceClient { * @generated from protobuf rpc: GetMyBookingContext */ getMyBookingContext(input: GetMyBookingContextRequest, options?: RpcOptions): UnaryCall; + /** + * @generated from protobuf rpc: CheckAppointmentModifiable + */ + checkAppointmentModifiable(input: CheckAppointmentModifiableRequest, options?: RpcOptions): UnaryCall; /** * @generated from protobuf rpc: ListSettings */ @@ -468,11 +474,18 @@ export class SiteServiceClient implements ISiteServiceClient, ServiceInfo { const method = this.methods[34], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } + /** + * @generated from protobuf rpc: CheckAppointmentModifiable + */ + checkAppointmentModifiable(input: CheckAppointmentModifiableRequest, options?: RpcOptions): UnaryCall { + const method = this.methods[35], opt = this._transport.mergeOptions(options); + return stackIntercept("unary", this._transport, method, opt, input); + } /** * @generated from protobuf rpc: ListSettings */ listSettings(input: ListSettingsRequest, options?: RpcOptions): UnaryCall { - const method = this.methods[35], opt = this._transport.mergeOptions(options); + const method = this.methods[36], opt = this._transport.mergeOptions(options); return stackIntercept("unary", this._transport, method, opt, input); } } diff --git a/site.ts b/site.ts index 3d2019f5..7abe5647 100644 --- a/site.ts +++ b/site.ts @@ -1458,6 +1458,42 @@ export interface InitBookerProfileResponse { */ SiteID: string; // Site ID } +/** + * CheckAppointmentModifiable + * + * @generated from protobuf message api.CheckAppointmentModifiableRequest + */ +export interface CheckAppointmentModifiableRequest { + /** + * @generated from protobuf field: api.RequestProjectHeader Header = 1 + */ + Header?: RequestProjectHeader; + /** + * Type of appointment : Loading / Unloading / Both + * + * @generated from protobuf field: string AppointmentID = 2 + */ + AppointmentID: string; + /** + * actor with which the siteID/project-depositID will be processed + * + * @generated from protobuf field: string ActorID = 3 + */ + ActorID: string; +} +/** + * @generated from protobuf message api.CheckAppointmentModifiableResponse + */ +export interface CheckAppointmentModifiableResponse { + /** + * @generated from protobuf field: api.ResponseHeader Header = 2 + */ + Header?: ResponseHeader; + /** + * @generated from protobuf field: bool IsModifiable = 1 + */ + IsModifiable: boolean; +} // @generated message type with reflection information, may provide speed optimized methods class Site$Type extends MessageType { constructor() { @@ -5967,6 +6003,122 @@ class InitBookerProfileResponse$Type extends MessageType { + constructor() { + super("api.CheckAppointmentModifiableRequest", [ + { no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } }, + { no: 2, name: "AppointmentID", kind: "scalar", localName: "AppointmentID", jsonName: "AppointmentID", T: 9 /*ScalarType.STRING*/ }, + { no: 3, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/ } + ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "AppointmentID"] } } }); + } + create(value?: PartialMessage): CheckAppointmentModifiableRequest { + const message = globalThis.Object.create((this.messagePrototype!)); + message.AppointmentID = ""; + message.ActorID = ""; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckAppointmentModifiableRequest): CheckAppointmentModifiableRequest { + 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 /* string AppointmentID */ 2: + message.AppointmentID = reader.string(); + break; + case /* string ActorID */ 3: + 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: CheckAppointmentModifiableRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* api.RequestProjectHeader Header = 1; */ + if (message.Header) + RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join(); + /* string AppointmentID = 2; */ + if (message.AppointmentID !== "") + writer.tag(2, WireType.LengthDelimited).string(message.AppointmentID); + /* string ActorID = 3; */ + if (message.ActorID !== "") + writer.tag(3, 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.CheckAppointmentModifiableRequest + */ +export const CheckAppointmentModifiableRequest = new CheckAppointmentModifiableRequest$Type(); +// @generated message type with reflection information, may provide speed optimized methods +class CheckAppointmentModifiableResponse$Type extends MessageType { + constructor() { + super("api.CheckAppointmentModifiableResponse", [ + { no: 2, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => ResponseHeader }, + { no: 1, name: "IsModifiable", kind: "scalar", localName: "IsModifiable", jsonName: "IsModifiable", T: 8 /*ScalarType.BOOL*/ } + ]); + } + create(value?: PartialMessage): CheckAppointmentModifiableResponse { + const message = globalThis.Object.create((this.messagePrototype!)); + message.IsModifiable = false; + if (value !== undefined) + reflectionMergePartial(this, message, value); + return message; + } + internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CheckAppointmentModifiableResponse): CheckAppointmentModifiableResponse { + 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; + case /* bool IsModifiable */ 1: + message.IsModifiable = reader.bool(); + 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: CheckAppointmentModifiableResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter { + /* bool IsModifiable = 1; */ + if (message.IsModifiable !== false) + writer.tag(1, WireType.Varint).bool(message.IsModifiable); + /* 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.CheckAppointmentModifiableResponse + */ +export const CheckAppointmentModifiableResponse = new CheckAppointmentModifiableResponse$Type(); /** * @generated ServiceType for protobuf service api.SiteService */ @@ -6006,5 +6158,6 @@ export const SiteService = new ServiceType("api.SiteService", [ { name: "InitBookerProfile", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Init the booker profile for a site. The user will gain access to the site and be able to book appointments." }, "api.rscType": "Platform", "api.roles": "" }, I: InitBookerProfileRequest, O: InitBookerProfileResponse }, { name: "GetBookingContext", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Get the booking context for a given Project and Actor" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetBookingContextRequest, O: GetBookingContextResponse }, { name: "GetMyBookingContext", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Get your appointment available booking context according to your permissions." }, "api.rscType": "Platform", "api.roles": "" }, I: GetMyBookingContextRequest, O: GetMyBookingContextResponse }, + { name: "CheckAppointmentModifiable", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Check if appointment is in modifiable range." }, "api.rscType": "Platform", "api.roles": "" }, I: CheckAppointmentModifiableRequest, O: CheckAppointmentModifiableResponse }, { name: "ListSettings", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "List all settings in the platform." }, "api.rscType": "Platform", "api.roles": "Platform.Site", "google.api.method_visibility": { restriction: "INTERNAL" } }, I: ListSettingsRequest, O: ListSettingsResponse } ], { "api.k8sService": "core-site" });