You've already forked npm-core-sdk
Latest generation
This commit is contained in:
46
model.ts
46
model.ts
@@ -11,8 +11,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 { ResourceType } from "./shared";
|
||||
import { RequestSiteHeader } from "./shared";
|
||||
import { RequestProjectHeader } from "./shared";
|
||||
// message MetadataSchema {
|
||||
// string Id = 1;
|
||||
@@ -116,9 +114,9 @@ export interface GetProjectDataModelResult {
|
||||
*/
|
||||
export interface GetSiteDataModelRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
Header?: RequestProjectHeader;
|
||||
/**
|
||||
* @generated from protobuf field: api.DataFilters Filters = 2
|
||||
*/
|
||||
@@ -192,9 +190,9 @@ export interface GetProjectEntityModelResult {
|
||||
*/
|
||||
export interface GetSiteEntityModelRequest {
|
||||
/**
|
||||
* @generated from protobuf field: api.RequestSiteHeader Header = 1
|
||||
* @generated from protobuf field: api.RequestProjectHeader Header = 1
|
||||
*/
|
||||
Header?: RequestSiteHeader;
|
||||
Header?: RequestProjectHeader;
|
||||
/**
|
||||
* @generated from protobuf field: string Entity = 2
|
||||
*/
|
||||
@@ -221,10 +219,6 @@ export interface GetEntitiesRequest {
|
||||
* @generated from protobuf field: string Domain = 2
|
||||
*/
|
||||
Domain: string;
|
||||
/**
|
||||
* @generated from protobuf field: api.ResourceType RscType = 3
|
||||
*/
|
||||
RscType: ResourceType; // Resource Type : RESOURCE_TYPE_PROJECT or RESOURCE_TYPE_SITE
|
||||
}
|
||||
/**
|
||||
* @generated from protobuf message api.GetEntitiesResult
|
||||
@@ -504,7 +498,7 @@ export const GetProjectDataModelResult = new GetProjectDataModelResult$Type();
|
||||
class GetSiteDataModelRequest$Type extends MessageType<GetSiteDataModelRequest> {
|
||||
constructor() {
|
||||
super("api.GetSiteDataModelRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "Filters", kind: "message", localName: "Filters", jsonName: "Filters", T: () => DataFilters, options: { "validate.rules": { message: { required: true } } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Filters"] } } });
|
||||
}
|
||||
@@ -519,8 +513,8 @@ class GetSiteDataModelRequest$Type extends MessageType<GetSiteDataModelRequest>
|
||||
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);
|
||||
case /* api.RequestProjectHeader Header */ 1:
|
||||
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* api.DataFilters Filters */ 2:
|
||||
message.Filters = DataFilters.internalBinaryRead(reader, reader.uint32(), options, message.Filters);
|
||||
@@ -537,9 +531,9 @@ class GetSiteDataModelRequest$Type extends MessageType<GetSiteDataModelRequest>
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: GetSiteDataModelRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
/* api.RequestProjectHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* api.DataFilters Filters = 2; */
|
||||
if (message.Filters)
|
||||
DataFilters.internalBinaryWrite(message.Filters, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||
@@ -824,7 +818,7 @@ export const GetProjectEntityModelResult = new GetProjectEntityModelResult$Type(
|
||||
class GetSiteEntityModelRequest$Type extends MessageType<GetSiteEntityModelRequest> {
|
||||
constructor() {
|
||||
super("api.GetSiteEntityModelRequest", [
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestSiteHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => RequestProjectHeader, options: { "validate.rules": { message: { required: true } } } },
|
||||
{ no: 2, name: "Entity", kind: "scalar", localName: "Entity", jsonName: "Entity", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Entity to get the model", example: "\"order\"" } } },
|
||||
{ no: 3, name: "Domain", kind: "scalar", localName: "Domain", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Domain of the entity to get the model", example: "\"trade\"" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Header", "Domain", "Entity"] } } });
|
||||
@@ -842,8 +836,8 @@ class GetSiteEntityModelRequest$Type extends MessageType<GetSiteEntityModelReque
|
||||
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);
|
||||
case /* api.RequestProjectHeader Header */ 1:
|
||||
message.Header = RequestProjectHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||
break;
|
||||
case /* string Entity */ 2:
|
||||
message.Entity = reader.string();
|
||||
@@ -863,9 +857,9 @@ class GetSiteEntityModelRequest$Type extends MessageType<GetSiteEntityModelReque
|
||||
return message;
|
||||
}
|
||||
internalBinaryWrite(message: GetSiteEntityModelRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||
/* api.RequestSiteHeader Header = 1; */
|
||||
/* api.RequestProjectHeader Header = 1; */
|
||||
if (message.Header)
|
||||
RequestSiteHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
RequestProjectHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||
/* string Entity = 2; */
|
||||
if (message.Entity !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.Entity);
|
||||
@@ -933,14 +927,12 @@ export const GetSiteEntityModelResult = new GetSiteEntityModelResult$Type();
|
||||
class GetEntitiesRequest$Type extends MessageType<GetEntitiesRequest> {
|
||||
constructor() {
|
||||
super("api.GetEntitiesRequest", [
|
||||
{ no: 2, name: "Domain", kind: "scalar", localName: "Domain", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } },
|
||||
{ no: 3, name: "RscType", kind: "enum", localName: "RscType", jsonName: "RscType", T: () => ["api.ResourceType", ResourceType], options: { "validate.rules": { enum: { in: [30, 80] } } } }
|
||||
{ no: 2, name: "Domain", kind: "scalar", localName: "Domain", jsonName: "Domain", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { in: ["trade", "collab"] } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { default: "trade" } } }
|
||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { required: ["Domain"] } } });
|
||||
}
|
||||
create(value?: PartialMessage<GetEntitiesRequest>): GetEntitiesRequest {
|
||||
const message = globalThis.Object.create((this.messagePrototype!));
|
||||
message.Domain = "";
|
||||
message.RscType = 0;
|
||||
if (value !== undefined)
|
||||
reflectionMergePartial<GetEntitiesRequest>(this, message, value);
|
||||
return message;
|
||||
@@ -953,9 +945,6 @@ class GetEntitiesRequest$Type extends MessageType<GetEntitiesRequest> {
|
||||
case /* string Domain */ 2:
|
||||
message.Domain = reader.string();
|
||||
break;
|
||||
case /* api.ResourceType RscType */ 3:
|
||||
message.RscType = reader.int32();
|
||||
break;
|
||||
default:
|
||||
let u = options.readUnknownField;
|
||||
if (u === "throw")
|
||||
@@ -971,9 +960,6 @@ class GetEntitiesRequest$Type extends MessageType<GetEntitiesRequest> {
|
||||
/* string Domain = 2; */
|
||||
if (message.Domain !== "")
|
||||
writer.tag(2, WireType.LengthDelimited).string(message.Domain);
|
||||
/* api.ResourceType RscType = 3; */
|
||||
if (message.RscType !== 0)
|
||||
writer.tag(3, WireType.Varint).int32(message.RscType);
|
||||
let u = options.writeUnknownFields;
|
||||
if (u !== false)
|
||||
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||
@@ -1039,8 +1025,6 @@ export const ModelService = new ServiceType("api.ModelService", [
|
||||
{ name: "GetEntityModel", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "DEPRECATED : replaced by GetProjectEntityModel. Get entity data model with project metadata in Json Format" }, "api.rscType": "Project", "api.roles": "Platform.Project-Model", "google.api.method_visibility": { restriction: "SDK" } }, I: GetEntityModelRequest, O: GetEntityModelResult },
|
||||
{ name: "GetProjectDataModel", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get project data model" }, "api.rscType": "Project", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetProjectDataModelRequest, O: GetProjectDataModelResult },
|
||||
{ name: "GetProjectEntityModel", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get entity data model with project metadata in Json Format" }, "api.rscType": "Project", "api.roles": "Platform.Project-Model", "google.api.method_visibility": { restriction: "SDK" } }, I: GetProjectEntityModelRequest, O: GetProjectEntityModelResult },
|
||||
{ name: "GetSiteDataModel", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get site data model" }, "api.rscType": "Site", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetSiteDataModelRequest, O: GetSiteDataModelResult },
|
||||
{ name: "GetSiteEntityModel", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get entity data model with site metadata in Json Format" }, "api.rscType": "Site", "api.roles": "Platform.Site-Model", "google.api.method_visibility": { restriction: "SDK" } }, I: GetSiteEntityModelRequest, O: GetSiteEntityModelResult },
|
||||
{ name: "GetEntities", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get entities" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetEntitiesRequest, O: GetEntitiesResult },
|
||||
{ name: "GetEntitiesWithMetadata", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get entities with metadata" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetEntitiesRequest, O: GetEntitiesResult },
|
||||
{ name: "GetEntitiesWithDataRestriction", options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation": { tags: ["Model"], description: "Get entities with data restriction" }, "api.rscType": "Platform", "api.roles": "", "google.api.method_visibility": { restriction: "SDK" } }, I: GetEntitiesRequest, O: GetEntitiesResult }
|
||||
|
||||
Reference in New Issue
Block a user