Latest generation

This commit is contained in:
ci core model
2025-07-23 09:15:20 +00:00
parent e7c64b16bb
commit 0584255677
3 changed files with 141 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "@reflex-platform/npm-core-sdk",
"version": "1.11.0-SNAPSHOT-250722132715",
"version": "1.11.0-SNAPSHOT-250723091455",
"description": "npm libs from core model proto files",
"homepage": "",
"main": "index.ts",

View File

@@ -15,6 +15,7 @@ import type { BookAppointmentResponse } from "./site";
import type { BookAppointmentRequest } from "./site";
import type { ListUserSitesResponse } from "./site";
import type { ListUserSitesRequest } from "./site";
import type { GetAllSlotsResponse } from "./site";
import type { GetAvailableSlotsResponse } from "./site";
import type { GetAvailableSlotsRequest } from "./site";
import type { SuggestSiteIDResult } from "./site";
@@ -91,7 +92,7 @@ export interface ISiteServiceClient {
/**
* @generated from protobuf rpc: GetAllSlots
*/
getAllSlots(input: GetAvailableSlotsRequest, options?: RpcOptions): UnaryCall<GetAvailableSlotsRequest, GetAvailableSlotsResponse>;
getAllSlots(input: GetAvailableSlotsRequest, options?: RpcOptions): UnaryCall<GetAvailableSlotsRequest, GetAllSlotsResponse>;
/**
* @generated from protobuf rpc: ListUserSites
*/
@@ -210,9 +211,9 @@ export class SiteServiceClient implements ISiteServiceClient, ServiceInfo {
/**
* @generated from protobuf rpc: GetAllSlots
*/
getAllSlots(input: GetAvailableSlotsRequest, options?: RpcOptions): UnaryCall<GetAvailableSlotsRequest, GetAvailableSlotsResponse> {
getAllSlots(input: GetAvailableSlotsRequest, options?: RpcOptions): UnaryCall<GetAvailableSlotsRequest, GetAllSlotsResponse> {
const method = this.methods[11], opt = this._transport.mergeOptions(options);
return stackIntercept<GetAvailableSlotsRequest, GetAvailableSlotsResponse>("unary", this._transport, method, opt, input);
return stackIntercept<GetAvailableSlotsRequest, GetAllSlotsResponse>("unary", this._transport, method, opt, input);
}
/**
* @generated from protobuf rpc: ListUserSites

137
site.ts
View File

@@ -579,6 +579,32 @@ export interface GetAvailableSlotsResponse {
*/
EstimatedNeededDurationInMinutes: bigint; // Computed needed slot duration in minutes
}
/**
* @generated from protobuf message api.SlotGroupAndReason
*/
export interface SlotGroupAndReason {
/**
* @generated from protobuf field: api.SlotGroup Slotgroup = 1
*/
Slotgroup?: SlotGroup;
/**
* @generated from protobuf field: string Reason = 2
*/
Reason: string;
}
/**
* @generated from protobuf message api.GetAllSlotsResponse
*/
export interface GetAllSlotsResponse {
/**
* @generated from protobuf field: repeated api.SlotGroupAndReason SlotGroupAndReasons = 1
*/
SlotGroupAndReasons: SlotGroupAndReason[]; // List of slot groups and the reason of their status
/**
* @generated from protobuf field: uint64 EstimatedNeededDurationInMinutes = 2
*/
EstimatedNeededDurationInMinutes: bigint; // Computed needed slot duration in minutes
}
/**
* BookAppointment
*
@@ -2418,6 +2444,115 @@ class GetAvailableSlotsResponse$Type extends MessageType<GetAvailableSlotsRespon
*/
export const GetAvailableSlotsResponse = new GetAvailableSlotsResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class SlotGroupAndReason$Type extends MessageType<SlotGroupAndReason> {
constructor() {
super("api.SlotGroupAndReason", [
{ no: 1, name: "Slotgroup", kind: "message", localName: "Slotgroup", jsonName: "Slotgroup", T: () => SlotGroup },
{ no: 2, name: "Reason", kind: "scalar", localName: "Reason", jsonName: "Reason", T: 9 /*ScalarType.STRING*/ }
]);
}
create(value?: PartialMessage<SlotGroupAndReason>): SlotGroupAndReason {
const message = globalThis.Object.create((this.messagePrototype!));
message.Reason = "";
if (value !== undefined)
reflectionMergePartial<SlotGroupAndReason>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SlotGroupAndReason): SlotGroupAndReason {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* api.SlotGroup Slotgroup */ 1:
message.Slotgroup = SlotGroup.internalBinaryRead(reader, reader.uint32(), options, message.Slotgroup);
break;
case /* string Reason */ 2:
message.Reason = 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: SlotGroupAndReason, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* api.SlotGroup Slotgroup = 1; */
if (message.Slotgroup)
SlotGroup.internalBinaryWrite(message.Slotgroup, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* string Reason = 2; */
if (message.Reason !== "")
writer.tag(2, WireType.LengthDelimited).string(message.Reason);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.SlotGroupAndReason
*/
export const SlotGroupAndReason = new SlotGroupAndReason$Type();
// @generated message type with reflection information, may provide speed optimized methods
class GetAllSlotsResponse$Type extends MessageType<GetAllSlotsResponse> {
constructor() {
super("api.GetAllSlotsResponse", [
{ no: 1, name: "SlotGroupAndReasons", kind: "message", localName: "SlotGroupAndReasons", jsonName: "SlotGroupAndReasons", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SlotGroupAndReason },
{ no: 2, name: "EstimatedNeededDurationInMinutes", kind: "scalar", localName: "EstimatedNeededDurationInMinutes", jsonName: "EstimatedNeededDurationInMinutes", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ }
]);
}
create(value?: PartialMessage<GetAllSlotsResponse>): GetAllSlotsResponse {
const message = globalThis.Object.create((this.messagePrototype!));
message.SlotGroupAndReasons = [];
message.EstimatedNeededDurationInMinutes = 0n;
if (value !== undefined)
reflectionMergePartial<GetAllSlotsResponse>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GetAllSlotsResponse): GetAllSlotsResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* repeated api.SlotGroupAndReason SlotGroupAndReasons */ 1:
message.SlotGroupAndReasons.push(SlotGroupAndReason.internalBinaryRead(reader, reader.uint32(), options));
break;
case /* uint64 EstimatedNeededDurationInMinutes */ 2:
message.EstimatedNeededDurationInMinutes = reader.uint64().toBigInt();
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: GetAllSlotsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* repeated api.SlotGroupAndReason SlotGroupAndReasons = 1; */
for (let i = 0; i < message.SlotGroupAndReasons.length; i++)
SlotGroupAndReason.internalBinaryWrite(message.SlotGroupAndReasons[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
/* uint64 EstimatedNeededDurationInMinutes = 2; */
if (message.EstimatedNeededDurationInMinutes !== 0n)
writer.tag(2, WireType.Varint).uint64(message.EstimatedNeededDurationInMinutes);
let u = options.writeUnknownFields;
if (u !== false)
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.GetAllSlotsResponse
*/
export const GetAllSlotsResponse = new GetAllSlotsResponse$Type();
// @generated message type with reflection information, may provide speed optimized methods
class BookAppointmentRequest$Type extends MessageType<BookAppointmentRequest> {
constructor() {
super("api.BookAppointmentRequest", [
@@ -3089,7 +3224,7 @@ export const SiteService = new ServiceType("api.SiteService", [
{ name: "DeleteInstructionDocument", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Delete an instruction document on a site for a specific language. If no languages are specified, all the documents per language are removed" }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteInstructionDocumentRequest, O: DeleteInstructionDocumentResponse },
{ name: "SuggestID", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Site"], description: "Suggest a site ID" }, "api.rscType": "Organisation", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: SuggestSiteIDRequest, O: SuggestSiteIDResult },
{ 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": "", "api.moduleID": "appointment-scheduling", "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": "Site", "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": "Site", "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: "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": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: BookAppointmentRequest, 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": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: BookAppointmentRequest, O: BookAppointmentResponse },