@roastbook/open-coffee-schema 0.0.0-stage → 0.4.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/index.js ADDED
@@ -0,0 +1,94 @@
1
+ // Generated by scripts/build-package.ts. Do not edit.
2
+ export const SCHEMA_IDS = {
3
+ "coffee-places": {
4
+ "latest": "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.4.0.json",
5
+ "versions": {
6
+ "0.1.0": "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.1.0.json",
7
+ "0.2.0": "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.2.0.json",
8
+ "0.3.0": "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.3.0.json",
9
+ "0.4.0": "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.4.0.json"
10
+ }
11
+ },
12
+ "brew-methods": {
13
+ "latest": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.4.0.json",
14
+ "versions": {
15
+ "0.1.0": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.1.0.json",
16
+ "0.2.0": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.2.0.json",
17
+ "0.3.0": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.3.0.json",
18
+ "0.4.0": "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.4.0.json"
19
+ }
20
+ },
21
+ "equipment": {
22
+ "latest": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.4.0.json",
23
+ "versions": {
24
+ "0.1.0": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.1.0.json",
25
+ "0.2.0": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.2.0.json",
26
+ "0.3.0": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.3.0.json",
27
+ "0.4.0": "https://schema.roastbook.coffee/equipment/equipment.schema.v0.4.0.json"
28
+ }
29
+ },
30
+ "common": {
31
+ "latest": "https://schema.roastbook.coffee/common/common.schema.v0.4.0.json",
32
+ "versions": {
33
+ "0.1.0": "https://schema.roastbook.coffee/common/common.schema.v0.1.0.json",
34
+ "0.2.0": "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json",
35
+ "0.3.0": "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json",
36
+ "0.4.0": "https://schema.roastbook.coffee/common/common.schema.v0.4.0.json"
37
+ }
38
+ }
39
+ };
40
+ export const BREW_METHOD_CATEGORY_VALUES = ["espresso","filter","immersion","pressure","vacuum","boiling","cold"];
41
+ export const BREW_METHOD_EXTRACTION_VALUES = ["percolation","immersion","hybrid"];
42
+ export const BREW_METHOD_FILTER_TYPES_VALUES = ["paper","metal","cloth","none"];
43
+ export const BREW_PARAMETER_VALUES = ["dose_g","brew_water_g","yield_g","brew_ratio","yield_ratio","grind_setting","brew_time_seconds","target_time_seconds","brew_temperature_celsius","bloom_time_seconds","bloom_water_g","preinfusion_time_seconds","preinfusion_pressure_bar","brew_pressure_bar","flow_rate_ml_per_second","tamp_force_kg","uses_puck_screen","paper_filter_position","distribution_method","pour_count","steep_time_seconds"];
44
+ export const COFFEE_PLACE_FOOD_FOCUS_VALUES = ["coffee_led","food_led","balanced"];
45
+ export const COFFEE_PLACE_GOOD_FOR_VALUES = ["working","meetings","quick_espresso","takeaway","brunch","groups","reading","date","coffee_nerds","families"];
46
+ export const COFFEE_PLACE_STATUS_VALUES = ["open","temporarily_closed","closed","unverified"];
47
+ export const COFFEE_PLACE_TYPE_VALUES = ["CafeOrCoffeeShop"];
48
+ export const DISTRIBUTION_METHOD_VALUES = ["wdt","blind_shaker","distribution_tool","stockfleth_move"];
49
+ export const EQUIPMENT_BASKET_KIND_VALUES = ["single","double","triple","other"];
50
+ export const EQUIPMENT_BREWER_DRIVE_VALUES = ["manual","electric","stovetop"];
51
+ export const EQUIPMENT_BREWER_FILTER_SHAPE_VALUES = ["cone","flat_bottom","basket","disc","none"];
52
+ export const EQUIPMENT_BREWER_FLOW_CONTROL_VALUES = ["fixed","manual_valve","programmable"];
53
+ export const EQUIPMENT_BREWER_MATERIAL_VALUES = ["ceramic","glass","plastic","stainless_steel","copper","aluminium","porcelain","wood","silicone","other"];
54
+ export const EQUIPMENT_BREWER_MECHANISM_VALUES = ["percolation","immersion","hybrid","press","vacuum","boiling","other"];
55
+ export const EQUIPMENT_ESPRESSO_MACHINE_CONNECTIVITY_VALUES = ["bluetooth","wifi","usb"];
56
+ export const EQUIPMENT_ESPRESSO_MACHINE_FLOW_CONTROL_VALUES = ["none","manual","programmable"];
57
+ export const EQUIPMENT_ESPRESSO_MACHINE_GROUP_TYPE_VALUES = ["e61","saturated","semi_saturated","lever","integrated","other"];
58
+ export const EQUIPMENT_ESPRESSO_MACHINE_HEATING_ARCHITECTURE_VALUES = ["single_boiler","heat_exchanger","dual_boiler","multi_boiler","single_thermoblock","dual_thermoblock","hybrid","manual","other"];
59
+ export const EQUIPMENT_ESPRESSO_MACHINE_PREINFUSION_CONTROL_VALUES = ["none","supported","fixed","adjustable","programmable"];
60
+ export const EQUIPMENT_ESPRESSO_MACHINE_PRESSURE_CONTROL_VALUES = ["fixed","adjustable_opv","manual","programmable"];
61
+ export const EQUIPMENT_ESPRESSO_MACHINE_PUMP_TYPE_VALUES = ["vibration","rotary","gear","peristaltic","manual","other"];
62
+ export const EQUIPMENT_ESPRESSO_MACHINE_SHOT_STOP_MODES_VALUES = ["manual","weight","time","volume"];
63
+ export const EQUIPMENT_ESPRESSO_MACHINE_STEAM_SYSTEM_VALUES = ["none","shared_heater","dedicated_heater"];
64
+ export const EQUIPMENT_ESPRESSO_MACHINE_TEMPERATURE_CONTROL_VALUES = ["none","fixed","adjustable","programmable"];
65
+ export const EQUIPMENT_ESPRESSO_MACHINE_WATER_SOURCE_MODES_VALUES = ["reservoir","plumbed"];
66
+ export const EQUIPMENT_GRINDER_ADJUSTMENT_TYPE_VALUES = ["fixed","stepped","stepless"];
67
+ export const EQUIPMENT_GRINDER_BEAN_FEED_VALUES = ["single_dose","hopper","both"];
68
+ export const EQUIPMENT_GRINDER_BREW_RANGE_VALUES = ["espresso","filter","turkish"];
69
+ export const EQUIPMENT_GRINDER_BURR_MATERIAL_VALUES = ["steel","ceramic","titanium_coated","other"];
70
+ export const EQUIPMENT_GRINDER_BURR_MECHANISM_VALUES = ["conical","flat","ghost","roller","blade","other"];
71
+ export const EQUIPMENT_GRINDER_DOSE_CONTROL_MODES_VALUES = ["manual","time","weight"];
72
+ export const EQUIPMENT_GRINDER_DRIVE_VALUES = ["manual","electric"];
73
+ export const EQUIPMENT_GRINDER_GRIND_SETTING_FORMAT_VALUES = ["whole_number","decimal","string"];
74
+ export const EQUIPMENT_KETTLE_HEAT_SOURCE_VALUES = ["electric","stovetop","induction_compatible","other"];
75
+ export const EQUIPMENT_KETTLE_SPOUT_TYPE_VALUES = ["gooseneck","standard","other"];
76
+ export const EQUIPMENT_KETTLE_TEMPERATURE_CONTROL_VALUES = ["none","fixed","adjustable"];
77
+ export const EQUIPMENT_SCALE_CONNECTIVITY_VALUES = ["bluetooth","wifi","usb"];
78
+ export const EQUIPMENT_TAMPER_BASE_SHAPE_VALUES = ["flat","convex","rippled","other"];
79
+ export const EQUIPMENT_TAMPER_FORCE_CONTROL_VALUES = ["none","fixed","adjustable"];
80
+ export const EQUIPMENT_TYPE_VALUES = ["espresso_machine","espresso_machine_with_grinder","grinder","brewer","kettle","scale","tamper","wdt","basket","filter","roaster","milk_frother","accessory"];
81
+ export const EQUIPMENT_WDT_DEPTH_CONTROL_VALUES = ["none","fixed","adjustable"];
82
+ export const GRIND_SIZE_VALUES = ["extra_fine","fine","medium_fine","medium","medium_coarse","coarse","extra_coarse"];
83
+ export const PAPER_FILTER_POSITION_VALUES = ["none","top","bottom","both"];
84
+ export const SPECIALTY_TIER_VALUES = ["A","B","none","unknown"];
85
+ /** Validator for the "iri" format, which ajv-formats lacks: ajv.addFormat("iri", isIri). */
86
+ export function isIri(value) {
87
+ if (typeof value !== "string" || !/^[A-Za-z][A-Za-z0-9+.-]*:[^\s<>"{}|\\^`\u0000-\u001f\u007f]+$/.test(value))
88
+ return !1;
89
+ try {
90
+ return Boolean(new URL(value));
91
+ } catch {
92
+ return !1;
93
+ }
94
+ }
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
2
  "name": "@roastbook/open-coffee-schema",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.4.0",
4
+ "description": "TypeScript types, JSON Schemas, JSON-LD context and allowed values of the Open Coffee standard (coffee places, equipment, brew methods). By Roastbook.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": false,
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/Roastbook/open-coffee-schema",
11
+ "directory": "packages/schema"
12
+ },
13
+ "homepage": "https://schema.roastbook.coffee/",
14
+ "bugs": "https://github.com/Roastbook/open-coffee-schema/issues",
15
+ "keywords": [
16
+ "open-coffee",
17
+ "roastbook",
18
+ "json-schema",
19
+ "json-ld",
20
+ "schema-org",
21
+ "coffee",
22
+ "specialty-coffee",
23
+ "cafes",
24
+ "open-data",
25
+ "typescript"
26
+ ],
27
+ "publishConfig": {
28
+ "registry": "https://registry.npmjs.org",
29
+ "access": "public",
30
+ "provenance": true
31
+ },
32
+ "exports": {
33
+ ".": {
34
+ "types": "./index.d.ts",
35
+ "default": "./index.js"
36
+ },
37
+ "./schemas": {
38
+ "types": "./schemas.d.ts",
39
+ "default": "./schemas.js"
40
+ },
41
+ "./package.json": "./package.json",
42
+ "./coffee-places/v0.1.0.json": "./coffee-places/v0.1.0.json",
43
+ "./coffee-places/v0.2.0.json": "./coffee-places/v0.2.0.json",
44
+ "./coffee-places/v0.3.0.json": "./coffee-places/v0.3.0.json",
45
+ "./coffee-places/v0.4.0.json": "./coffee-places/v0.4.0.json",
46
+ "./coffee-places/latest.json": "./coffee-places/latest.json",
47
+ "./brew-methods/v0.1.0.json": "./brew-methods/v0.1.0.json",
48
+ "./brew-methods/v0.2.0.json": "./brew-methods/v0.2.0.json",
49
+ "./brew-methods/v0.3.0.json": "./brew-methods/v0.3.0.json",
50
+ "./brew-methods/v0.4.0.json": "./brew-methods/v0.4.0.json",
51
+ "./brew-methods/latest.json": "./brew-methods/latest.json",
52
+ "./equipment/v0.1.0.json": "./equipment/v0.1.0.json",
53
+ "./equipment/v0.2.0.json": "./equipment/v0.2.0.json",
54
+ "./equipment/v0.3.0.json": "./equipment/v0.3.0.json",
55
+ "./equipment/v0.4.0.json": "./equipment/v0.4.0.json",
56
+ "./equipment/latest.json": "./equipment/latest.json",
57
+ "./common/v0.1.0.json": "./common/v0.1.0.json",
58
+ "./common/v0.2.0.json": "./common/v0.2.0.json",
59
+ "./common/v0.3.0.json": "./common/v0.3.0.json",
60
+ "./common/v0.4.0.json": "./common/v0.4.0.json",
61
+ "./common/latest.json": "./common/latest.json",
62
+ "./coffee-places/context.v0.1.0.json": "./coffee-places/context.v0.1.0.json",
63
+ "./coffee-places/context.v0.3.0.json": "./coffee-places/context.v0.3.0.json",
64
+ "./coffee-places/context.v0.4.0.json": "./coffee-places/context.v0.4.0.json",
65
+ "./coffee-places/context.latest.json": "./coffee-places/context.latest.json"
66
+ },
67
+ "main": "./index.js",
68
+ "types": "./index.d.ts"
69
+ }
package/schemas.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ // Generated by scripts/build-package.ts. Do not edit.
2
+ export type SchemaId = "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.1.0.json" | "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.2.0.json" | "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.3.0.json" | "https://schema.roastbook.coffee/brew-methods/brew-methods.schema.v0.4.0.json" | "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.1.0.json" | "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.2.0.json" | "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.3.0.json" | "https://schema.roastbook.coffee/coffee-places/coffee-places.schema.v0.4.0.json" | "https://schema.roastbook.coffee/common/common.schema.v0.1.0.json" | "https://schema.roastbook.coffee/common/common.schema.v0.2.0.json" | "https://schema.roastbook.coffee/common/common.schema.v0.3.0.json" | "https://schema.roastbook.coffee/common/common.schema.v0.4.0.json" | "https://schema.roastbook.coffee/equipment/equipment.schema.v0.1.0.json" | "https://schema.roastbook.coffee/equipment/equipment.schema.v0.2.0.json" | "https://schema.roastbook.coffee/equipment/equipment.schema.v0.3.0.json" | "https://schema.roastbook.coffee/equipment/equipment.schema.v0.4.0.json";
3
+ /** Every schema version, keyed by $id. Add them all to Ajv, then validate against an $id. */
4
+ export declare const schemas: Record<SchemaId, Record<string, unknown>>;
5
+ export default schemas;