You've already forked npm-core-sdk
Latest generation
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
import type { RpcTransport } from "@protobuf-ts/runtime-rpc";
|
||||
import type { ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
||||
import { CalendarService } from "./calendar";
|
||||
import type { ComputeETAPeriodOnSiteResponse } from "./calendar";
|
||||
import type { ComputeETAPeriodOnSiteRequest } from "./calendar";
|
||||
import type { GetPublicHolidaysResponse } from "./calendar";
|
||||
import type { GetPublicHolidaysRequest } from "./calendar";
|
||||
import type { DeleteOnSiteResponse } from "./calendar";
|
||||
@@ -16,6 +18,8 @@ import type { GetOnSiteResponse } from "./calendar";
|
||||
import type { GetOnSiteRequest } from "./calendar";
|
||||
import type { CreateOnSiteResponse } from "./calendar";
|
||||
import type { CreateOnSiteRequest } from "./calendar";
|
||||
import type { ComputeETAPeriodOnOrganisationResponse } from "./calendar";
|
||||
import type { ComputeETAPeriodOnOrganisationRequest } from "./calendar";
|
||||
import type { DeleteOnOrganisationResponse } from "./calendar";
|
||||
import type { DeleteOnOrganisationRequest } from "./calendar";
|
||||
import type { UpdateOnOrganisationResponse } from "./calendar";
|
||||
@@ -53,6 +57,10 @@ export interface ICalendarServiceClient {
|
||||
* @generated from protobuf rpc: DeleteOnOrganisation
|
||||
*/
|
||||
deleteOnOrganisation(input: DeleteOnOrganisationRequest, options?: RpcOptions): UnaryCall<DeleteOnOrganisationRequest, DeleteOnOrganisationResponse>;
|
||||
/**
|
||||
* @generated from protobuf rpc: ComputeETAPeriodOnOrganisation
|
||||
*/
|
||||
computeETAPeriodOnOrganisation(input: ComputeETAPeriodOnOrganisationRequest, options?: RpcOptions): UnaryCall<ComputeETAPeriodOnOrganisationRequest, ComputeETAPeriodOnOrganisationResponse>;
|
||||
/**
|
||||
* @generated from protobuf rpc: CreateOnSite
|
||||
*/
|
||||
@@ -77,6 +85,10 @@ export interface ICalendarServiceClient {
|
||||
* @generated from protobuf rpc: GetPublicHolidays
|
||||
*/
|
||||
getPublicHolidays(input: GetPublicHolidaysRequest, options?: RpcOptions): UnaryCall<GetPublicHolidaysRequest, GetPublicHolidaysResponse>;
|
||||
/**
|
||||
* @generated from protobuf rpc: ComputeETAPeriodOnSite
|
||||
*/
|
||||
computeETAPeriodOnSite(input: ComputeETAPeriodOnSiteRequest, options?: RpcOptions): UnaryCall<ComputeETAPeriodOnSiteRequest, ComputeETAPeriodOnSiteResponse>;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf service api.CalendarService
|
||||
@@ -122,46 +134,60 @@ export class CalendarServiceClient implements ICalendarServiceClient, ServiceInf
|
||||
const method = this.methods[4], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DeleteOnOrganisationRequest, DeleteOnOrganisationResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: ComputeETAPeriodOnOrganisation
|
||||
*/
|
||||
computeETAPeriodOnOrganisation(input: ComputeETAPeriodOnOrganisationRequest, options?: RpcOptions): UnaryCall<ComputeETAPeriodOnOrganisationRequest, ComputeETAPeriodOnOrganisationResponse> {
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ComputeETAPeriodOnOrganisationRequest, ComputeETAPeriodOnOrganisationResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: CreateOnSite
|
||||
*/
|
||||
createOnSite(input: CreateOnSiteRequest, options?: RpcOptions): UnaryCall<CreateOnSiteRequest, CreateOnSiteResponse> {
|
||||
const method = this.methods[5], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<CreateOnSiteRequest, CreateOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: GetOnSite
|
||||
*/
|
||||
getOnSite(input: GetOnSiteRequest, options?: RpcOptions): UnaryCall<GetOnSiteRequest, GetOnSiteResponse> {
|
||||
const method = this.methods[6], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GetOnSiteRequest, GetOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: ListOnSite
|
||||
*/
|
||||
listOnSite(input: ListOnSiteRequest, options?: RpcOptions): UnaryCall<ListOnSiteRequest, ListOnSiteResponse> {
|
||||
const method = this.methods[7], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ListOnSiteRequest, ListOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: UpdateOnSite
|
||||
*/
|
||||
updateOnSite(input: UpdateOnSiteRequest, options?: RpcOptions): UnaryCall<UpdateOnSiteRequest, UpdateOnSiteResponse> {
|
||||
const method = this.methods[8], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<UpdateOnSiteRequest, UpdateOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: DeleteOnSite
|
||||
*/
|
||||
deleteOnSite(input: DeleteOnSiteRequest, options?: RpcOptions): UnaryCall<DeleteOnSiteRequest, DeleteOnSiteResponse> {
|
||||
const method = this.methods[9], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<DeleteOnSiteRequest, DeleteOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: GetPublicHolidays
|
||||
*/
|
||||
getPublicHolidays(input: GetPublicHolidaysRequest, options?: RpcOptions): UnaryCall<GetPublicHolidaysRequest, GetPublicHolidaysResponse> {
|
||||
const method = this.methods[10], opt = this._transport.mergeOptions(options);
|
||||
const method = this.methods[11], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<GetPublicHolidaysRequest, GetPublicHolidaysResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf rpc: ComputeETAPeriodOnSite
|
||||
*/
|
||||
computeETAPeriodOnSite(input: ComputeETAPeriodOnSiteRequest, options?: RpcOptions): UnaryCall<ComputeETAPeriodOnSiteRequest, ComputeETAPeriodOnSiteResponse> {
|
||||
const method = this.methods[12], opt = this._transport.mergeOptions(options);
|
||||
return stackIntercept<ComputeETAPeriodOnSiteRequest, ComputeETAPeriodOnSiteResponse>("unary", this._transport, method, opt, input);
|
||||
}
|
||||
}
|
||||
|
||||
288
calendar.ts
288
calendar.ts
@@ -12,6 +12,8 @@ import type { PartialMessage } from "@protobuf-ts/runtime";
|
||||
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
||||
import { MessageType } from "@protobuf-ts/runtime";
|
||||
import { RequestSiteHeader } from "./shared";
|
||||
import { DateTime } from "./shared";
|
||||
import { Period } from "./shared";
|
||||
import { RequestOrganisationHeader } from "./shared";
|
||||
import { ResourceType } from "./shared";
|
||||
import { LabelByLanguage } from "./shared";
|
||||
@@ -320,6 +322,40 @@ export interface GetPublicHolidaysResponse {
|
||||
*/
|
||||
Holidays: ExceptionalClosure[];
|
||||
}
|
||||
/**
|
||||
* ComputeETAPeriodOnOrganisationRequest
|
||||
*
|
||||
* @generated from protobuf message api.ComputeETAPeriodOnOrganisationRequest
|
||||
*/
|
||||
export interface ComputeETAPeriodOnOrganisationRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestOrganisationHeader Header = 1
|
||||
*/
|
||||
Header?: RequestOrganisationHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 2
|
||||
*/
|
||||
ID: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.Period Period = 3
|
||||
*/
|
||||
Period?: Period;
|
||||
}
|
||||
/**
|
||||
* GetPublicHolidays response
|
||||
*
|
||||
* @generated from protobuf message api.ComputeETAPeriodOnOrganisationResponse
|
||||
*/
|
||||
export interface ComputeETAPeriodOnOrganisationResponse {
|
||||
/**
|
||||
* List of public holidays generated
|
||||
*
|
||||
* @generated from protobuf field: api.DateTime StartEta = 1
|
||||
*/
|
||||
StartEta?: DateTime;
|
||||
}
|
||||
// //// API at Site level
|
||||
|
||||
/**
|
||||
* Create a calendar at site level
|
||||
*
|
||||
@@ -364,8 +400,6 @@ export interface CreateOnSiteResponse {
|
||||
*/
|
||||
Calendar?: Calendar;
|
||||
}
|
||||
// //// API at Site level
|
||||
|
||||
/**
|
||||
* Get a calendar at site level
|
||||
*
|
||||
@@ -480,6 +514,38 @@ export interface DeleteOnSiteRequest {
|
||||
*/
|
||||
export interface DeleteOnSiteResponse {
|
||||
}
|
||||
/**
|
||||
* ComputeETAPeriodOnSiteRequest
|
||||
*
|
||||
* @generated from protobuf message api.ComputeETAPeriodOnSiteRequest
|
||||
*/
|
||||
export interface ComputeETAPeriodOnSiteRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string ID = 2
|
||||
*/
|
||||
ID: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.Period Period = 3
|
||||
*/
|
||||
Period?: Period;
|
||||
}
|
||||
/**
|
||||
* GetPublicHolidays response
|
||||
*
|
||||
* @generated from protobuf message api.ComputeETAPeriodOnSiteResponse
|
||||
*/
|
||||
export interface ComputeETAPeriodOnSiteResponse {
|
||||
/**
|
||||
* List of public holidays generated
|
||||
*
|
||||
* @generated from protobuf field: api.DateTime StartEta = 1
|
||||
*/
|
||||
StartEta?: DateTime;
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class WorkTimeDay$Type extends MessageType<WorkTimeDay> {
|
||||
constructor() {
|
||||
@@ -1369,6 +1435,113 @@ class GetPublicHolidaysResponse$Type extends MessageType<GetPublicHolidaysRespon
|
||||
*/
|
||||
export const GetPublicHolidaysResponse = new GetPublicHolidaysResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ComputeETAPeriodOnOrganisationRequest$Type extends MessageType<ComputeETAPeriodOnOrganisationRequest> {
|
||||
constructor() {
|
||||
super("api.ComputeETAPeriodOnOrganisationRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestOrganisationHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
||||
{ no: 3, name: "Period", kind: "message", localName: "Period", jsonName: "Period", T: () => Period }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Period"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<ComputeETAPeriodOnOrganisationRequest>): ComputeETAPeriodOnOrganisationRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ComputeETAPeriodOnOrganisationRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputeETAPeriodOnOrganisationRequest): ComputeETAPeriodOnOrganisationRequest {
|
||||
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:
|
||||
message.Header = RequestOrganisationHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string ID */ 2:
|
||||
message.ID = reader.string();
|
||||
break;
|
||||
case /* api.Period Period */ 3:
|
||||
message.Period = Period.internalBinaryRead(reader, reader.uint32(), options, message.Period);
|
||||
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: ComputeETAPeriodOnOrganisationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestOrganisationHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestOrganisationHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string ID = 2; */
|
||||
if (message.ID !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.ID);
|
||||
/* api.Period Period = 3; */
|
||||
if (message.Period)
|
||||
Period.internalBinaryWrite(message.Period, writer.tag(3, 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.ComputeETAPeriodOnOrganisationRequest
|
||||
*/
|
||||
export const ComputeETAPeriodOnOrganisationRequest = new ComputeETAPeriodOnOrganisationRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ComputeETAPeriodOnOrganisationResponse$Type extends MessageType<ComputeETAPeriodOnOrganisationResponse> {
|
||||
constructor() {
|
||||
super("api.ComputeETAPeriodOnOrganisationResponse", [
|
||||
{ no: 1, name: "StartEta", kind: "message", localName: "StartEta", jsonName: "StartEta", T: () => DateTime }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ComputeETAPeriodOnOrganisationResponse>): ComputeETAPeriodOnOrganisationResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ComputeETAPeriodOnOrganisationResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputeETAPeriodOnOrganisationResponse): ComputeETAPeriodOnOrganisationResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.DateTime StartEta */ 1:
|
||||
message.StartEta = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.StartEta);
|
||||
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: ComputeETAPeriodOnOrganisationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.DateTime StartEta = 1; */
|
||||
if (message.StartEta)
|
||||
DateTime.internalBinaryWrite(message.StartEta, 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.ComputeETAPeriodOnOrganisationResponse
|
||||
*/
|
||||
export const ComputeETAPeriodOnOrganisationResponse = new ComputeETAPeriodOnOrganisationResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class CreateOnSiteRequest$Type extends MessageType<CreateOnSiteRequest> {
|
||||
constructor() {
|
||||
super("api.CreateOnSiteRequest", [
|
||||
@@ -1909,6 +2082,113 @@ class DeleteOnSiteResponse$Type extends MessageType<DeleteOnSiteResponse> {
|
||||
* @generated MessageType for protobuf message api.DeleteOnSiteResponse
|
||||
*/
|
||||
export const DeleteOnSiteResponse = new DeleteOnSiteResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ComputeETAPeriodOnSiteRequest$Type extends MessageType<ComputeETAPeriodOnSiteRequest> {
|
||||
constructor() {
|
||||
super("api.ComputeETAPeriodOnSiteRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "ID", kind: "scalar", localName: "ID", jsonName: "ID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
||||
{ no: 3, name: "Period", kind: "message", localName: "Period", jsonName: "Period", T: () => Period }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "ID", "Period"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<ComputeETAPeriodOnSiteRequest>): ComputeETAPeriodOnSiteRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.ID = "";
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ComputeETAPeriodOnSiteRequest>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputeETAPeriodOnSiteRequest): ComputeETAPeriodOnSiteRequest {
|
||||
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:
|
||||
message.Header = RequestSiteHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string ID */ 2:
|
||||
message.ID = reader.string();
|
||||
break;
|
||||
case /* api.Period Period */ 3:
|
||||
message.Period = Period.internalBinaryRead(reader, reader.uint32(), options, message.Period);
|
||||
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: ComputeETAPeriodOnSiteRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string ID = 2; */
|
||||
if (message.ID !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.ID);
|
||||
/* api.Period Period = 3; */
|
||||
if (message.Period)
|
||||
Period.internalBinaryWrite(message.Period, writer.tag(3, 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.ComputeETAPeriodOnSiteRequest
|
||||
*/
|
||||
export const ComputeETAPeriodOnSiteRequest = new ComputeETAPeriodOnSiteRequest$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class ComputeETAPeriodOnSiteResponse$Type extends MessageType<ComputeETAPeriodOnSiteResponse> {
|
||||
constructor() {
|
||||
super("api.ComputeETAPeriodOnSiteResponse", [
|
||||
{ no: 1, name: "StartEta", kind: "message", localName: "StartEta", jsonName: "StartEta", T: () => DateTime }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<ComputeETAPeriodOnSiteResponse>): ComputeETAPeriodOnSiteResponse {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<ComputeETAPeriodOnSiteResponse>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ComputeETAPeriodOnSiteResponse): ComputeETAPeriodOnSiteResponse {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* api.DateTime StartEta */ 1:
|
||||
message.StartEta = DateTime.internalBinaryRead(reader, reader.uint32(), options, message.StartEta);
|
||||
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: ComputeETAPeriodOnSiteResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.DateTime StartEta = 1; */
|
||||
if (message.StartEta)
|
||||
DateTime.internalBinaryWrite(message.StartEta, 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.ComputeETAPeriodOnSiteResponse
|
||||
*/
|
||||
export const ComputeETAPeriodOnSiteResponse = new ComputeETAPeriodOnSiteResponse$Type();
|
||||
/**
|
||||
* @generated ServiceType for protobuf service api.CalendarService
|
||||
*/
|
||||
@@ -1918,10 +2198,12 @@ export const CalendarService = new ServiceType("api.CalendarService", [
|
||||
{ name: "ListOnOrganisation", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "List Calendar of an organisation" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: ListOnOrganisationRequest, O: ListOnOrganisationResponse },
|
||||
{ name: "UpdateOnOrganisation", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Update a Calendar at organisation level" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: UpdateOnOrganisationRequest, O: UpdateOnOrganisationResponse },
|
||||
{ name: "DeleteOnOrganisation", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Delete a Calendar at organisation level" }, "api.rscType": "Organisation", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteOnOrganisationRequest, O: DeleteOnOrganisationResponse },
|
||||
{ name: "ComputeETAPeriodOnOrganisation", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Compute the ETA according to a Period and the Calendar at organisation level" }, "api.rscType": "Organisation", "api.roles": "Platform.Calendar-Query", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: ComputeETAPeriodOnOrganisationRequest, O: ComputeETAPeriodOnOrganisationResponse },
|
||||
{ name: "CreateOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Create a Calendar for the site" }, "api.rscType": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: CreateOnSiteRequest, O: CreateOnSiteResponse },
|
||||
{ name: "GetOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Get a Calendar at site level" }, "api.rscType": "Site", "api.roles": "Platform.Calendar-Query", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: GetOnSiteRequest, O: GetOnSiteResponse },
|
||||
{ name: "ListOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "List Calendar of an site" }, "api.rscType": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: ListOnSiteRequest, O: ListOnSiteResponse },
|
||||
{ name: "UpdateOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Update a Calendar at site level" }, "api.rscType": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: UpdateOnSiteRequest, O: UpdateOnSiteResponse },
|
||||
{ name: "DeleteOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Delete a Calendar at site level" }, "api.rscType": "Site", "api.roles": "", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: DeleteOnSiteRequest, O: DeleteOnSiteResponse },
|
||||
{ name: "GetPublicHolidays", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Get public holidays for a given country up to a given year" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetPublicHolidaysRequest, O: GetPublicHolidaysResponse }
|
||||
{ name: "GetPublicHolidays", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Get public holidays for a given country up to a given year" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetPublicHolidaysRequest, O: GetPublicHolidaysResponse },
|
||||
{ name: "ComputeETAPeriodOnSite", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Calendar"], description: "Compute the ETA according to a Period and the Calendar at site level" }, "api.rscType": "Site", "api.roles": "Platform.Calendar-Query", "api.moduleID": "appointment-scheduling", "google.api.method_visibility": { restriction: "SDK" } }, I: ComputeETAPeriodOnSiteRequest, O: ComputeETAPeriodOnSiteResponse }
|
||||
], { "api.k8sService": "core-calendar" });
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@reflex-platform/npm-core-sdk",
|
||||
"version": "1.11.0-SNAPSHOT-250730071244",
|
||||
"version": "1.11.0-SNAPSHOT-250731073447",
|
||||
"description": "npm libs from core model proto files",
|
||||
"homepage": "",
|
||||
"main": "index.ts",
|
||||
|
||||
93
shared.ts
93
shared.ts
@@ -1999,6 +1999,19 @@ export interface FileDataResponse {
|
||||
*/
|
||||
Content: Uint8Array;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.Period
|
||||
*/
|
||||
export interface Period {
|
||||
/**
|
||||
* @generated from protobuf field: int64 Value = 1
|
||||
*/
|
||||
Value: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: api.PeriodUnit Unit = 2
|
||||
*/
|
||||
Unit: PeriodUnit;
|
||||
}
|
||||
/**
|
||||
* List all data set in the model
|
||||
*
|
||||
@@ -2660,6 +2673,31 @@ export enum ResourceType {
|
||||
*/
|
||||
RESOURCE_TYPE_SITE = 80
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf enum api.PeriodUnit
|
||||
*/
|
||||
export enum PeriodUnit {
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_UNDEFINED = 0;
|
||||
*/
|
||||
PERIOD_UNIT_UNDEFINED = 0,
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_WORK_HOUR = 1;
|
||||
*/
|
||||
PERIOD_UNIT_WORK_HOUR = 1,
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_WORK_DAY = 2;
|
||||
*/
|
||||
PERIOD_UNIT_WORK_DAY = 2,
|
||||
/**
|
||||
* Google Duration class only expresses durations in seconds and nanoseconds
|
||||
* To get it in calendar days, working days, it is more complex because all year days do not have the same length...
|
||||
* Some go libraries will be required
|
||||
*
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_CALENDAR_DAY = 3;
|
||||
*/
|
||||
PERIOD_UNIT_CALENDAR_DAY = 3
|
||||
}
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class RequestHeader$Type extends MessageType<RequestHeader> {
|
||||
constructor() {
|
||||
@@ -8372,3 +8410,58 @@ class FileDataResponse$Type extends MessageType<FileDataResponse> {
|
||||
* @generated MessageType for protobuf message api.FileDataResponse
|
||||
*/
|
||||
export const FileDataResponse = new FileDataResponse$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Period$Type extends MessageType<Period> {
|
||||
constructor() {
|
||||
super("api.Period", [
|
||||
{ no: 1, name: "Value", kind: "scalar", localName: "Value", jsonName: "Value", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "Unit", kind: "enum", localName: "Unit", jsonName: "Unit", T: () => ["api.PeriodUnit", PeriodUnit] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Period>): Period {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.Value = 0n;
|
||||
message.Unit = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Period>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Period): Period {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 Value */ 1:
|
||||
message.Value = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* api.PeriodUnit Unit */ 2:
|
||||
message.Unit = reader.int32();
|
||||
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: Period, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 Value = 1; */
|
||||
if (message.Value !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.Value);
|
||||
/* api.PeriodUnit Unit = 2; */
|
||||
if (message.Unit !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.Unit);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.Period
|
||||
*/
|
||||
export const Period = new Period$Type();
|
||||
|
||||
@@ -10,6 +10,7 @@ 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 { Period } from "./shared";
|
||||
import { TimeRange } from "./shared";
|
||||
import { WeekDay } from "./shared";
|
||||
import { LabelByLanguage } from "./shared";
|
||||
@@ -45,19 +46,6 @@ export interface QuantityByUnit {
|
||||
*/
|
||||
Value: number;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.Period
|
||||
*/
|
||||
export interface Period {
|
||||
/**
|
||||
* @generated from protobuf field: int64 Value = 1
|
||||
*/
|
||||
Value: bigint;
|
||||
/**
|
||||
* @generated from protobuf field: api.PeriodUnit Unit = 2
|
||||
*/
|
||||
Unit: PeriodUnit;
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.Slot
|
||||
*/
|
||||
@@ -623,31 +611,6 @@ export enum AppointmentType {
|
||||
*/
|
||||
APPOINTMENT_TYPE_BOTH = 4
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf enum api.PeriodUnit
|
||||
*/
|
||||
export enum PeriodUnit {
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_UNDEFINED = 0;
|
||||
*/
|
||||
PERIOD_UNIT_UNDEFINED = 0,
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_WORK_HOUR = 1;
|
||||
*/
|
||||
PERIOD_UNIT_WORK_HOUR = 1,
|
||||
/**
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_WORK_DAY = 2;
|
||||
*/
|
||||
PERIOD_UNIT_WORK_DAY = 2,
|
||||
/**
|
||||
* Google Duration class only expresses durations in seconds and nanoseconds
|
||||
* To get it in calendar days, working days, it is more complex because all year days do not have the same length...
|
||||
* Some go libraries will be required
|
||||
*
|
||||
* @generated from protobuf enum value: PERIOD_UNIT_CALENDAR_DAY = 3;
|
||||
*/
|
||||
PERIOD_UNIT_CALENDAR_DAY = 3
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf enum api.CapacityRuleScope
|
||||
*/
|
||||
@@ -830,61 +793,6 @@ class QuantityByUnit$Type extends MessageType<QuantityByUnit> {
|
||||
*/
|
||||
export const QuantityByUnit = new QuantityByUnit$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Period$Type extends MessageType<Period> {
|
||||
constructor() {
|
||||
super("api.Period", [
|
||||
{ no: 1, name: "Value", kind: "scalar", localName: "Value", jsonName: "Value", T: 3 /*ScalarType.INT64*/, L: 0 /*LongType.BIGINT*/ },
|
||||
{ no: 2, name: "Unit", kind: "enum", localName: "Unit", jsonName: "Unit", T: () => ["api.PeriodUnit", PeriodUnit] }
|
||||
]);
|
||||
}
|
||||
create(value?: PartialMessage<Period>): Period {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.Value = 0n;
|
||||
message.Unit = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<Period>(this, message, value);
|
||||
return message;
|
||||
}
|
||||
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Period): Period {
|
||||
let message = target ?? this.create(), end = reader.pos + length;
|
||||
while (reader.pos < end) {
|
||||
let [fieldNo, wireType] = reader.tag();
|
||||
switch (fieldNo) {
|
||||
case /* int64 Value */ 1:
|
||||
message.Value = reader.int64().toBigInt();
|
||||
break;
|
||||
case /* api.PeriodUnit Unit */ 2:
|
||||
message.Unit = reader.int32();
|
||||
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: Period, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* int64 Value = 1; */
|
||||
if (message.Value !== 0n)
|
||||
writer.tag(1, WireType.Varint).int64(message.Value);
|
||||
/* api.PeriodUnit Unit = 2; */
|
||||
if (message.Unit !== 0)
|
||||
writer.tag(2, WireType.Varint).int32(message.Unit);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
return writer;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @generated MessageType for protobuf message api.Period
|
||||
*/
|
||||
export const Period = new Period$Type();
|
||||
// @generated message type with reflection information, may provide speed optimized methods
|
||||
class Slot$Type extends MessageType<Slot> {
|
||||
constructor() {
|
||||
super("api.Slot", [
|
||||
|
||||
Reference in New Issue
Block a user