@unaxiom/genesis-sdk
Version:
NPM module that provides access to Genesis' API
306 lines (305 loc) • 10.4 kB
JavaScript
"use strict";
// @generated by protoc-gen-es v1.3.0 with parameter "target=ts"
// @generated from file families.proto (package Genesis, syntax proto3)
/* eslint-disable */
// @ts-nocheck
Object.defineProperty(exports, "__esModule", { value: true });
exports.FamiliesList = exports.Family = void 0;
const protobuf_1 = require("@bufbuild/protobuf");
const base_pb_js_1 = require("./base_pb.js");
/**
*
* Describes the parameters that are part of a family structure
*
* @generated from message Genesis.Family
*/
class Family extends protobuf_1.Message {
/**
* ID of the resource
*
* @generated from field: int64 id = 1;
*/
id = protobuf_1.protoInt64.zero;
/**
* UUID of the resource
*
* @generated from field: bytes uuid = 2;
*/
uuid = new Uint8Array(0);
/**
* The family type
*
* @generated from field: string family_type = 3;
*/
familyType = "";
/**
* The name of the family
*
* @generated from field: string name = 4;
*/
name = "";
/**
* The name of the family on a printed document
*
* @generated from field: string print_name = 5;
*/
printName = "";
/**
* The drawing number of the family
*
* @generated from field: string drawing_number = 6;
*/
drawingNumber = "";
/**
* The description of the family
*
* @generated from field: string description = 7;
*/
description = "";
/**
* The unique code used to identify the family
*
* @generated from field: string code = 8;
*/
code = "";
/**
* The HSN/SAC code of the family
*
* @generated from field: string hsn_sac_code = 9;
*/
hsnSacCode = "";
/**
* The ID of the associated unit of material
*
* @generated from field: int64 uom_id = 10;
*/
uomId = protobuf_1.protoInt64.zero;
/**
* The unit quantity of the family
*
* @generated from field: int64 unit_quantity = 11;
*/
unitQuantity = protobuf_1.protoInt64.zero;
/**
* Stores the username of the user who added this resource
*
* @generated from field: string added_by = 12;
*/
addedBy = "";
/**
* The ID of the associated parent family
*
* @generated from field: int64 parent_id = 13;
*/
parentId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated root family
*
* @generated from field: int64 root_id = 14;
*/
rootId = protobuf_1.protoInt64.zero;
/**
* Stores if the family is a leaf
*
* @generated from field: bool leaf = 15;
*/
leaf = false;
/**
* The ID of the associated ledger
*
* @generated from field: int64 ledger_id = 16;
*/
ledgerId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated QC group
*
* @generated from field: int64 qc_group_id = 17;
*/
qcGroupId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated tax group
*
* @generated from field: int64 tax_group_id = 18;
*/
taxGroupId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated location
*
* @generated from field: int64 location_id = 19;
*/
locationId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated store
*
* @generated from field: int64 store_id = 20;
*/
storeId = protobuf_1.protoInt64.zero;
/**
* The ID of the associated QC location
*
* @generated from field: int64 qc_hub_id = 21;
*/
qcHubId = protobuf_1.protoInt64.zero;
/**
* The unit price of the family (in cents)
*
* @generated from field: int64 price = 22;
*/
price = protobuf_1.protoInt64.zero;
/**
* The minimum stock to maintain (in cents)
*
* @generated from field: int64 min_stock_to_maintain = 23;
*/
minStockToMaintain = protobuf_1.protoInt64.zero;
/**
* The initial stock of the family
*
* @generated from field: int64 initial_stock = 24;
*/
initialStock = protobuf_1.protoInt64.zero;
/**
* The associated vault folder ID
*
* @generated from field: int64 vault_folder_id = 25;
*/
vaultFolderId = protobuf_1.protoInt64.zero;
/**
* The associated consumption sequence
*
* @generated from field: string consumption_sequence = 26;
*/
consumptionSequence = "";
/**
* The status that the family is in
*
* @generated from field: Genesis.STANDARD_LIFECYCLE_STATUS status = 27;
*/
status = base_pb_js_1.STANDARD_LIFECYCLE_STATUS.PREVERIFY_UNSPECIFIED;
/**
* Stores the UNIX timestamp of when a resource was approved
*
* @generated from field: int64 approved_on = 28;
*/
approvedOn = protobuf_1.protoInt64.zero;
/**
* Stores the username of the user who approved the family
*
* @generated from field: string approved_by = 29;
*/
approvedBy = "";
/**
* The ID of the role of the approver at the time of approval
*
* @generated from field: int64 approver_role_id = 30;
*/
approverRoleId = protobuf_1.protoInt64.zero;
/**
* The associated list of label IDs
*
* @generated from field: repeated int64 label_ids = 31;
*/
labelIds = [];
/**
* Represents if the family is active
*
* @generated from field: bool active = 32;
*/
active = false;
/**
* Stores the UNIX timestamp of when the family was created
*
* @generated from field: int64 timestamp = 33;
*/
timestamp = protobuf_1.protoInt64.zero;
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.Family";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 2, name: "uuid", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
{ no: 3, name: "family_type", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 5, name: "print_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 6, name: "drawing_number", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 7, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 8, name: "code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 9, name: "hsn_sac_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 10, name: "uom_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 11, name: "unit_quantity", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 12, name: "added_by", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 13, name: "parent_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 14, name: "root_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 15, name: "leaf", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 16, name: "ledger_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 17, name: "qc_group_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 18, name: "tax_group_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 19, name: "location_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 20, name: "store_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 21, name: "qc_hub_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 22, name: "price", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 23, name: "min_stock_to_maintain", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 24, name: "initial_stock", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 25, name: "vault_folder_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 26, name: "consumption_sequence", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 27, name: "status", kind: "enum", T: protobuf_1.proto3.getEnumType(base_pb_js_1.STANDARD_LIFECYCLE_STATUS) },
{ no: 28, name: "approved_on", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 29, name: "approved_by", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 30, name: "approver_role_id", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
{ no: 31, name: "label_ids", kind: "scalar", T: 3 /* ScalarType.INT64 */, repeated: true },
{ no: 32, name: "active", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 33, name: "timestamp", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
]);
static fromBinary(bytes, options) {
return new Family().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new Family().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new Family().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(Family, a, b);
}
}
exports.Family = Family;
/**
*
* Describes the message consisting of the list of families
*
* @generated from message Genesis.FamiliesList
*/
class FamiliesList extends protobuf_1.Message {
/**
* List of families
*
* @generated from field: repeated Genesis.Family list = 1;
*/
list = [];
constructor(data) {
super();
protobuf_1.proto3.util.initPartial(data, this);
}
static runtime = protobuf_1.proto3;
static typeName = "Genesis.FamiliesList";
static fields = protobuf_1.proto3.util.newFieldList(() => [
{ no: 1, name: "list", kind: "message", T: Family, repeated: true },
]);
static fromBinary(bytes, options) {
return new FamiliesList().fromBinary(bytes, options);
}
static fromJson(jsonValue, options) {
return new FamiliesList().fromJson(jsonValue, options);
}
static fromJsonString(jsonString, options) {
return new FamiliesList().fromJsonString(jsonString, options);
}
static equals(a, b) {
return protobuf_1.proto3.util.equals(FamiliesList, a, b);
}
}
exports.FamiliesList = FamiliesList;