@alpamayo-solutions/colca-client 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.d.ts +53 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +23 -0
- package/dist/catalog.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product and recipe records of a node's catalog: the `json` value of the `_Constant`
|
|
3
|
+
* at `catalog/products/{sku}` and at `catalog/recipes/{id}`. The node checks only that
|
|
4
|
+
* the value is JSON; `colca_data_contracts.catalog` holds the rules and the JSON Schema.
|
|
5
|
+
*/
|
|
6
|
+
/** Who wrote a record or a field: an external system's key, `manual` for a person, `default` for
|
|
7
|
+
* a placeholder. */
|
|
8
|
+
export interface CatalogProvenance {
|
|
9
|
+
source: string;
|
|
10
|
+
set_by?: string | null;
|
|
11
|
+
/** RFC 3339. */
|
|
12
|
+
set_at?: string | null;
|
|
13
|
+
}
|
|
14
|
+
export interface CatalogProduct {
|
|
15
|
+
sku: string;
|
|
16
|
+
name?: string | null;
|
|
17
|
+
substrate?: string | null;
|
|
18
|
+
thickness_mm?: number | null;
|
|
19
|
+
length_mm?: number | null;
|
|
20
|
+
width_mm?: number | null;
|
|
21
|
+
/** What sanding takes off the board, both sides together. */
|
|
22
|
+
sandoff_mm?: number | null;
|
|
23
|
+
density_kg_m3?: number | null;
|
|
24
|
+
/** The grit of the last belt the board sees, FEPA P. */
|
|
25
|
+
final_grit?: number | null;
|
|
26
|
+
/** The recipe, by key: many products share one. */
|
|
27
|
+
recipe_id?: string | null;
|
|
28
|
+
/** The product a line runs when nobody chose one. */
|
|
29
|
+
is_default?: boolean;
|
|
30
|
+
/** Whatever the plant keeps beyond the standard fields. */
|
|
31
|
+
attributes?: Record<string, unknown>;
|
|
32
|
+
provenance?: CatalogProvenance;
|
|
33
|
+
/** Placeholders (`default`) and fields someone other than `provenance.source` set. */
|
|
34
|
+
field_provenance?: Partial<Record<CatalogProductField, CatalogProvenance>>;
|
|
35
|
+
}
|
|
36
|
+
export interface CatalogRecipe {
|
|
37
|
+
id: string;
|
|
38
|
+
name?: string | null;
|
|
39
|
+
is_default?: boolean;
|
|
40
|
+
/** One grit per head, keyed by the head's path below the line (`mas2/sta1/aggos`);
|
|
41
|
+
* `null` for a head the recipe leaves without a belt. */
|
|
42
|
+
grits?: Record<string, number | null>;
|
|
43
|
+
attributes?: Record<string, unknown>;
|
|
44
|
+
provenance?: CatalogProvenance;
|
|
45
|
+
field_provenance?: Partial<Record<CatalogRecipeField, CatalogProvenance>>;
|
|
46
|
+
}
|
|
47
|
+
export declare const CATALOG_PRODUCT_FIELDS: readonly ["sku", "name", "substrate", "thickness_mm", "length_mm", "width_mm", "sandoff_mm", "density_kg_m3", "final_grit", "recipe_id", "is_default", "attributes"];
|
|
48
|
+
export type CatalogProductField = (typeof CATALOG_PRODUCT_FIELDS)[number];
|
|
49
|
+
export declare const CATALOG_RECIPE_FIELDS: readonly ["id", "name", "is_default", "grits", "attributes"];
|
|
50
|
+
export type CatalogRecipeField = (typeof CATALOG_RECIPE_FIELDS)[number];
|
|
51
|
+
export declare const CATALOG_PRODUCTS = "catalog/products";
|
|
52
|
+
export declare const CATALOG_RECIPES = "catalog/recipes";
|
|
53
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;oBACoB;AACpB,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,gBAAgB;IAChB,MAAM,CAAC,EAAE,MAAM,GA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,kBAAkB,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAC3E;AAED,eAAO,MAAM,sBAAsB,sKAazB,CAAC;AACX,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E,eAAO,MAAM,qBAAqB,8DAA+D,CAAC;AAClG,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,eAAO,MAAM,eAAe,oBAAoB,CAAC"}
|
package/dist/catalog.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product and recipe records of a node's catalog: the `json` value of the `_Constant`
|
|
3
|
+
* at `catalog/products/{sku}` and at `catalog/recipes/{id}`. The node checks only that
|
|
4
|
+
* the value is JSON; `colca_data_contracts.catalog` holds the rules and the JSON Schema.
|
|
5
|
+
*/
|
|
6
|
+
export const CATALOG_PRODUCT_FIELDS = [
|
|
7
|
+
"sku",
|
|
8
|
+
"name",
|
|
9
|
+
"substrate",
|
|
10
|
+
"thickness_mm",
|
|
11
|
+
"length_mm",
|
|
12
|
+
"width_mm",
|
|
13
|
+
"sandoff_mm",
|
|
14
|
+
"density_kg_m3",
|
|
15
|
+
"final_grit",
|
|
16
|
+
"recipe_id",
|
|
17
|
+
"is_default",
|
|
18
|
+
"attributes",
|
|
19
|
+
];
|
|
20
|
+
export const CATALOG_RECIPE_FIELDS = ["id", "name", "is_default", "grits", "attributes"];
|
|
21
|
+
export const CATALOG_PRODUCTS = "catalog/products";
|
|
22
|
+
export const CATALOG_RECIPES = "catalog/recipes";
|
|
23
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8CH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,KAAK;IACL,MAAM;IACN,WAAW;IACX,cAAc;IACd,WAAW;IACX,UAAU;IACV,YAAY;IACZ,eAAe;IACf,YAAY;IACZ,WAAW;IACX,YAAY;IACZ,YAAY;CACJ,CAAC;AAGX,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,CAAU,CAAC;AAGlG,MAAM,CAAC,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AACnD,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,5 +17,7 @@ export { DEFAULT_ROOT, TOPIC_VERSION, parseTopic, topic, topicMatches, topicPref
|
|
|
17
17
|
export type { TopicOptions, TopicParts } from "./topics.js";
|
|
18
18
|
export { annotationIdMaterial, deriveAnnotationId, newUlid, ulidFromBytes } from "./ids.js";
|
|
19
19
|
export type { AnnotationIdInput } from "./ids.js";
|
|
20
|
+
export { CATALOG_PRODUCTS, CATALOG_PRODUCT_FIELDS, CATALOG_RECIPES, CATALOG_RECIPE_FIELDS, } from "./catalog.js";
|
|
21
|
+
export type { CatalogProduct, CatalogProductField, CatalogProvenance, CatalogRecipe, CatalogRecipeField, } from "./catalog.js";
|
|
20
22
|
export * from "./generated/contracts.js";
|
|
21
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC5C,YAAY,EACV,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACZ,GAAG,EACH,OAAO,EACP,IAAI,EACJ,aAAa,EACb,QAAQ,GACT,MAAM,WAAW,CAAC;AAEnB,OAAO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Ac,EACd,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAGtB,cAAc,0BAA0B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export { Door, DoorError } from "./door.js";
|
|
|
13
13
|
export { Stream } from "./stream.js";
|
|
14
14
|
export { DEFAULT_ROOT, TOPIC_VERSION, parseTopic, topic, topicMatches, topicPrefix } from "./topics.js";
|
|
15
15
|
export { annotationIdMaterial, deriveAnnotationId, newUlid, ulidFromBytes } from "./ids.js";
|
|
16
|
+
export { CATALOG_PRODUCTS, CATALOG_PRODUCT_FIELDS, CATALOG_RECIPES, CATALOG_RECIPE_FIELDS, } from "./catalog.js";
|
|
16
17
|
// The 32 contracts, straight from the bundle the node validates against.
|
|
17
18
|
export * from "./generated/contracts.js";
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAa5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxG,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5F,yEAAyE;AACzE,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAa5C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGxG,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG5F,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,eAAe,EACf,qBAAqB,GACtB,MAAM,cAAc,CAAC;AAStB,yEAAyE;AACzE,cAAc,0BAA0B,CAAC"}
|