You've already forked npm-core-sdk
Latest generation
This commit is contained in:
1
index.ts
1
index.ts
@@ -73,6 +73,7 @@
|
|||||||
export * from './idp.client'
|
export * from './idp.client'
|
||||||
export * from './idp'
|
export * from './idp'
|
||||||
export * from './item'
|
export * from './item'
|
||||||
|
export * from './itemAction'
|
||||||
export * from './itemInput.client'
|
export * from './itemInput.client'
|
||||||
export * from './itemInput'
|
export * from './itemInput'
|
||||||
export * from './itemQuery.client'
|
export * from './itemQuery.client'
|
||||||
|
|||||||
167
itemAction.ts
Normal file
167
itemAction.ts
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
// @generated by protobuf-ts 2.11.1 with parameter use_proto_field_name,keep_enum_prefix
|
||||||
|
// @generated from protobuf file "itemAction.proto" (package "api", syntax proto3)
|
||||||
|
// tslint:disable
|
||||||
|
import { WireType } from "@protobuf-ts/runtime";
|
||||||
|
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
||||||
|
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
||||||
|
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
||||||
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
||||||
|
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 { EntityID } from "./shared";
|
||||||
|
import { CommandHeader } from "./shared";
|
||||||
|
// _common_
|
||||||
|
|
||||||
|
// Action Summary
|
||||||
|
// - DeleteStock : After each Item deleted, clear the corresponding Stocks > stock.Deleted
|
||||||
|
//
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* DeleteStock : clear the stock cooresponding to the item
|
||||||
|
* by sending cumulated snapshotted quantity on stock id not already cumulated,
|
||||||
|
* by reseting the quantity of missing stock entry for the current snapshot
|
||||||
|
*
|
||||||
|
* @generated from protobuf message api.ItemDeleteStockPayload
|
||||||
|
*/
|
||||||
|
export interface ItemDeleteStockPayload {
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated from protobuf message api.ItemDeleteStock
|
||||||
|
*/
|
||||||
|
export interface ItemDeleteStock {
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: api.CommandHeader Header = 1
|
||||||
|
*/
|
||||||
|
Header?: CommandHeader;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: api.EntityID ID = 2
|
||||||
|
*/
|
||||||
|
ID?: EntityID;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: api.ItemDeleteStockPayload Payload = 3
|
||||||
|
*/
|
||||||
|
Payload?: ItemDeleteStockPayload;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: api.ItemDeleteStockPayload EventPayload = 4
|
||||||
|
*/
|
||||||
|
EventPayload?: ItemDeleteStockPayload;
|
||||||
|
/**
|
||||||
|
* @generated from protobuf field: api.ItemDeleteStockPayload PreviousPayload = 5
|
||||||
|
*/
|
||||||
|
PreviousPayload?: ItemDeleteStockPayload;
|
||||||
|
}
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class ItemDeleteStockPayload$Type extends MessageType<ItemDeleteStockPayload> {
|
||||||
|
constructor() {
|
||||||
|
super("api.ItemDeleteStockPayload", [], { "api.messageType": "Command", "api.payload": true, "api.action": "DeleteStock" });
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<ItemDeleteStockPayload>): ItemDeleteStockPayload {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<ItemDeleteStockPayload>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeleteStockPayload): ItemDeleteStockPayload {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
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: ItemDeleteStockPayload, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
let u = options.writeUnknownFields;
|
||||||
|
if (u !== false)
|
||||||
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
||||||
|
return writer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @generated MessageType for protobuf message api.ItemDeleteStockPayload
|
||||||
|
*/
|
||||||
|
export const ItemDeleteStockPayload = new ItemDeleteStockPayload$Type();
|
||||||
|
// @generated message type with reflection information, may provide speed optimized methods
|
||||||
|
class ItemDeleteStock$Type extends MessageType<ItemDeleteStock> {
|
||||||
|
constructor() {
|
||||||
|
super("api.ItemDeleteStock", [
|
||||||
|
{ no: 1, name: "Header", kind: "message", localName: "Header", jsonName: "Header", T: () => CommandHeader },
|
||||||
|
{ no: 2, name: "ID", kind: "message", localName: "ID", jsonName: "ID", T: () => EntityID },
|
||||||
|
{ no: 3, name: "Payload", kind: "message", localName: "Payload", jsonName: "Payload", T: () => ItemDeleteStockPayload },
|
||||||
|
{ no: 4, name: "EventPayload", kind: "message", localName: "EventPayload", jsonName: "EventPayload", T: () => ItemDeleteStockPayload },
|
||||||
|
{ no: 5, name: "PreviousPayload", kind: "message", localName: "PreviousPayload", jsonName: "PreviousPayload", T: () => ItemDeleteStockPayload }
|
||||||
|
], { "api.messageType": "Command", "api.action": "DeleteStock", "api.resultingEvent": "stock.Deleted", "api.triggerEventFilters": "Deleted" });
|
||||||
|
}
|
||||||
|
create(value?: PartialMessage<ItemDeleteStock>): ItemDeleteStock {
|
||||||
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
if (value !== undefined)
|
||||||
|
reflectionMergePartial<ItemDeleteStock>(this, message, value);
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ItemDeleteStock): ItemDeleteStock {
|
||||||
|
let message = target ?? this.create(), end = reader.pos + length;
|
||||||
|
while (reader.pos < end) {
|
||||||
|
let [fieldNo, wireType] = reader.tag();
|
||||||
|
switch (fieldNo) {
|
||||||
|
case /* api.CommandHeader Header */ 1:
|
||||||
|
message.Header = CommandHeader.internalBinaryRead(reader, reader.uint32(), options, message.Header);
|
||||||
|
break;
|
||||||
|
case /* api.EntityID ID */ 2:
|
||||||
|
message.ID = EntityID.internalBinaryRead(reader, reader.uint32(), options, message.ID);
|
||||||
|
break;
|
||||||
|
case /* api.ItemDeleteStockPayload Payload */ 3:
|
||||||
|
message.Payload = ItemDeleteStockPayload.internalBinaryRead(reader, reader.uint32(), options, message.Payload);
|
||||||
|
break;
|
||||||
|
case /* api.ItemDeleteStockPayload EventPayload */ 4:
|
||||||
|
message.EventPayload = ItemDeleteStockPayload.internalBinaryRead(reader, reader.uint32(), options, message.EventPayload);
|
||||||
|
break;
|
||||||
|
case /* api.ItemDeleteStockPayload PreviousPayload */ 5:
|
||||||
|
message.PreviousPayload = ItemDeleteStockPayload.internalBinaryRead(reader, reader.uint32(), options, message.PreviousPayload);
|
||||||
|
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: ItemDeleteStock, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
||||||
|
/* api.CommandHeader Header = 1; */
|
||||||
|
if (message.Header)
|
||||||
|
CommandHeader.internalBinaryWrite(message.Header, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* api.EntityID ID = 2; */
|
||||||
|
if (message.ID)
|
||||||
|
EntityID.internalBinaryWrite(message.ID, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* api.ItemDeleteStockPayload Payload = 3; */
|
||||||
|
if (message.Payload)
|
||||||
|
ItemDeleteStockPayload.internalBinaryWrite(message.Payload, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* api.ItemDeleteStockPayload EventPayload = 4; */
|
||||||
|
if (message.EventPayload)
|
||||||
|
ItemDeleteStockPayload.internalBinaryWrite(message.EventPayload, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
||||||
|
/* api.ItemDeleteStockPayload PreviousPayload = 5; */
|
||||||
|
if (message.PreviousPayload)
|
||||||
|
ItemDeleteStockPayload.internalBinaryWrite(message.PreviousPayload, writer.tag(5, 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.ItemDeleteStock
|
||||||
|
*/
|
||||||
|
export const ItemDeleteStock = new ItemDeleteStock$Type();
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@reflex-platform/npm-core-sdk",
|
"name": "@reflex-platform/npm-core-sdk",
|
||||||
"version": "1.12.0-SNAPSHOT-251013080835",
|
"version": "1.12.0-SNAPSHOT-251013081848",
|
||||||
"description": "npm libs from core model proto files",
|
"description": "npm libs from core model proto files",
|
||||||
"homepage": "",
|
"homepage": "",
|
||||||
"main": "index.ts",
|
"main": "index.ts",
|
||||||
|
|||||||
@@ -210,6 +210,7 @@ export interface StockSnapshottedResponse {
|
|||||||
*/
|
*/
|
||||||
export interface StockDeletedPayload {
|
export interface StockDeletedPayload {
|
||||||
/**
|
/**
|
||||||
|
* option (preAggMethods) = "checkEmptyStock"; // Here are listed the pre aggregation methods to call when event message is aggregated
|
||||||
* Description of the goods
|
* Description of the goods
|
||||||
*
|
*
|
||||||
* @generated from protobuf field: api.EnrichedGoods Goods = 1
|
* @generated from protobuf field: api.EnrichedGoods Goods = 1
|
||||||
@@ -770,7 +771,7 @@ class StockDeletedPayload$Type extends MessageType<StockDeletedPayload> {
|
|||||||
{ no: 1, name: "Goods", kind: "message", localName: "Goods", jsonName: "Goods", T: () => EnrichedGoods, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Description of the goods" } } },
|
{ no: 1, name: "Goods", kind: "message", localName: "Goods", jsonName: "Goods", T: () => EnrichedGoods, options: { "validate.rules": { message: { required: true } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Description of the goods" } } },
|
||||||
{ no: 2, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the actor where the stock is located" }, "api.entityRef": "Actor" } },
|
{ no: 2, name: "ActorID", kind: "scalar", localName: "ActorID", jsonName: "ActorID", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } }, "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { description: "Identifier of the actor where the stock is located" }, "api.entityRef": "Actor" } },
|
||||||
{ no: 7, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", T: () => ActorPayload, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } }
|
{ no: 7, name: "Actor", kind: "message", localName: "Actor", jsonName: "Actor", T: () => ActorPayload, options: { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field": { readOnly: true } } }
|
||||||
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "The stock entry has been deleted", required: ["Goods", "ActorID"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted", "api.preAggMethods": "checkEmptyStock", "api.idGenMethod": "genStockDeletedId" });
|
], { "grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema": { jsonSchema: { description: "The stock entry has been deleted", required: ["Goods", "ActorID"] } }, "api.messageType": "Event", "api.payload": true, "api.inputEvent": "Deleted", "api.idGenMethod": "genStockDeletedId" });
|
||||||
}
|
}
|
||||||
create(value?: PartialMessage<StockDeletedPayload>): StockDeletedPayload {
|
create(value?: PartialMessage<StockDeletedPayload>): StockDeletedPayload {
|
||||||
const message = globalThis.Object.create((this.messagePrototype!));
|
const message = globalThis.Object.create((this.messagePrototype!));
|
||||||
|
|||||||
Reference in New Issue
Block a user