Latest generation

This commit is contained in:
ci core model
2025-05-26 13:58:27 +00:00
parent ec4aed16ee
commit ce5810721d
6 changed files with 254 additions and 100 deletions

View File

@@ -10,7 +10,6 @@ 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 { QuantityByUnit } from "./slotbooking";
import { Struct } from "./google/protobuf/struct";
import { DateTime } from "./shared";
import { ClaimStatus } from "./shared";
@@ -197,29 +196,6 @@ export interface AppointmentStatusStruct {
*/
Version: number;
}
/**
* @generated from protobuf message api.Commission
*/
export interface Commission {
/**
* Identifier for the project associated with the order
*
* @generated from protobuf field: string ProjectID = 1
*/
ProjectID: string;
/**
* ID of the order, might be null for standalone
*
* @generated from protobuf field: string OrderID = 2
*/
OrderID: string;
/**
* Volumetry inside the truck, should have at least one item listed
*
* @generated from protobuf field: repeated api.QuantityByUnit Quantities = 3
*/
Quantities: QuantityByUnit[];
}
/**
* @generated from protobuf enum api.NotifTypeEnum
*/
@@ -863,66 +839,3 @@ class AppointmentStatusStruct$Type extends MessageType<AppointmentStatusStruct>
* @generated MessageType for protobuf message api.AppointmentStatusStruct
*/
export const AppointmentStatusStruct = new AppointmentStatusStruct$Type();
// @generated message type with reflection information, may provide speed optimized methods
class Commission$Type extends MessageType<Commission> {
constructor() {
super("api.Commission", [
{ no: 1, name: "ProjectID", kind: "scalar", localName: "ProjectID", jsonName: "ProjectID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
{ no: 2, name: "OrderID", kind: "scalar", localName: "OrderID", jsonName: "OrderID", T: 9 /*ScalarType.STRING*/ },
{ no: 3, name: "Quantities", kind: "message", localName: "Quantities", jsonName: "Quantities", repeat: 2 /*RepeatType.UNPACKED*/, T: () => QuantityByUnit, options: { "validate.rules": { repeated: { minItems: "1" } } } }
]);
}
create(value?: PartialMessage<Commission>): Commission {
const message = globalThis.Object.create((this.messagePrototype!));
message.ProjectID = "";
message.OrderID = "";
message.Quantities = [];
if (value !== undefined)
reflectionMergePartial<Commission>(this, message, value);
return message;
}
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Commission): Commission {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
case /* string ProjectID */ 1:
message.ProjectID = reader.string();
break;
case /* string OrderID */ 2:
message.OrderID = reader.string();
break;
case /* repeated api.QuantityByUnit Quantities */ 3:
message.Quantities.push(QuantityByUnit.internalBinaryRead(reader, reader.uint32(), options));
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: Commission, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* string ProjectID = 1; */
if (message.ProjectID !== "")
writer.tag(1, WireType.LengthDelimited).string(message.ProjectID);
/* string OrderID = 2; */
if (message.OrderID !== "")
writer.tag(2, WireType.LengthDelimited).string(message.OrderID);
/* repeated api.QuantityByUnit Quantities = 3; */
for (let i = 0; i < message.Quantities.length; i++)
QuantityByUnit.internalBinaryWrite(message.Quantities[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);
return writer;
}
}
/**
* @generated MessageType for protobuf message api.Commission
*/
export const Commission = new Commission$Type();