diff --git a/kpi.ts b/kpi.ts index 2b20e50..a5f82c5 100644 --- a/kpi.ts +++ b/kpi.ts @@ -12,6 +12,7 @@ import type { PartialMessage } from "@protobuf-ts/runtime"; import { reflectionMergePartial } from "@protobuf-ts/runtime"; import { MessageType } from "@protobuf-ts/runtime"; import { EntityType } from "./shared"; +import { KpiGroup } from "./shared"; import { RequestProjectHeader } from "./shared"; /** * @generated from protobuf message api.Kpi @@ -165,11 +166,9 @@ export interface GetCompatibleKpisRequest { */ Header?: RequestProjectHeader; /** - * TODO : Create an enum ? - * - * @generated from protobuf field: string Group = 3 + * @generated from protobuf field: api.KpiGroup Group = 3 */ - Group: string; + Group: KpiGroup; /** * @generated from protobuf field: repeated string CompatibleWith = 4 */ @@ -814,13 +813,13 @@ class GetCompatibleKpisRequest$Type extends MessageType RequestProjectHeader, options: { "n1validate.rules": { message: { required: true } } } }, - { no: 3, name: "Group", kind: "scalar", localName: "Group", jsonName: "Group", T: 9 /*ScalarType.STRING*/, options: { "n1validate.rules": { string: { in: ["executionflow", "stock", "movement", "handlingunit", "actor", "item", "stock_extended", "claim", "appointment"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Widget analysis criterion, executionflow, stock, movement or handlingunit", example: "\"executionflow\"" } } }, + { no: 3, name: "Group", kind: "enum", localName: "Group", jsonName: "Group", T: () => ["api.KpiGroup", KpiGroup], options: { "n1validate.rules": { enum: { definedOnly: true } } } }, { no: 4, name: "CompatibleWith", kind: "scalar", localName: "CompatibleWith", jsonName: "CompatibleWith", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "List of already selected KPI names" } } } ], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header"] } } }); } create(value?: PartialMessage): GetCompatibleKpisRequest { const message = globalThis.Object.create((this.messagePrototype!)); - message.Group = ""; + message.Group = 0; message.CompatibleWith = []; if (value !== undefined) reflectionMergePartial(this, message, value); @@ -834,8 +833,8 @@ class GetCompatibleKpisRequest$Type extends MessageType