@simonarcher/fika-types 1.0.25 → 1.0.27
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/coffee.d.ts +13 -4
- package/dist/coffee.js +60 -1
- package/dist/farm.d.ts +1 -0
- package/dist/shop.d.ts +1 -0
- package/package.json +1 -1
package/dist/coffee.d.ts
CHANGED
|
@@ -61,6 +61,7 @@ export interface LinkedFarm {
|
|
|
61
61
|
id: string;
|
|
62
62
|
name: string;
|
|
63
63
|
country: string;
|
|
64
|
+
countryCode?: string;
|
|
64
65
|
region?: string;
|
|
65
66
|
logo?: string;
|
|
66
67
|
}
|
|
@@ -68,6 +69,14 @@ export type DecafMethod = "Swiss Water" | "Sugarcane / Ethyl Acetate" | "Carbon
|
|
|
68
69
|
export declare const DECAF_METHODS: readonly ["Swiss Water", "Sugarcane / Ethyl Acetate", "Carbon Dioxide (CO₂)", "Methylene Chloride", "Mountain Water", "Unknown"];
|
|
69
70
|
export type CoffeeProcessingMethod = "Washed (Wet)" | "Natural (Dry)" | "Honey" | "Anaerobic Fermentation" | "Carbonic Maceration" | "Wet-Hulled" | "Semi-Washed" | "Experimental / Other" | "Unknown";
|
|
70
71
|
export type RoastLevel = 'Light' | 'Medium' | 'Dark' | 'Medium-Dark' | 'Medium-Light' | 'Espresso';
|
|
72
|
+
export interface Origin {
|
|
73
|
+
countryCode: string;
|
|
74
|
+
countryName?: string;
|
|
75
|
+
region?: string;
|
|
76
|
+
subregion?: string;
|
|
77
|
+
elevationMinMeters?: number;
|
|
78
|
+
elevationMaxMeters?: number;
|
|
79
|
+
}
|
|
71
80
|
export interface CoffeeBean {
|
|
72
81
|
active: boolean;
|
|
73
82
|
id: string;
|
|
@@ -77,6 +86,7 @@ export interface CoffeeBean {
|
|
|
77
86
|
roasterId: string;
|
|
78
87
|
farmId?: string;
|
|
79
88
|
farm?: LinkedFarm;
|
|
89
|
+
origins?: Origin[];
|
|
80
90
|
varieties?: string[];
|
|
81
91
|
harvestYear?: number;
|
|
82
92
|
lotName?: string;
|
|
@@ -102,10 +112,7 @@ export interface SubmissionCoffeeBeanData {
|
|
|
102
112
|
description?: string;
|
|
103
113
|
image?: string;
|
|
104
114
|
roasterId: string;
|
|
105
|
-
|
|
106
|
-
region?: string;
|
|
107
|
-
origin?: string;
|
|
108
|
-
elevation?: number;
|
|
115
|
+
origins?: Origin[];
|
|
109
116
|
processing?: CoffeeProcessingMethod;
|
|
110
117
|
tastingNotes?: string[];
|
|
111
118
|
isDecaf: boolean;
|
|
@@ -115,4 +122,6 @@ export interface SubmissionCoffeeBeanData {
|
|
|
115
122
|
active: boolean;
|
|
116
123
|
}
|
|
117
124
|
export declare const COFFEE_PRODUCING_COUNTRIES: string[];
|
|
125
|
+
export declare const COUNTRY_NAME_TO_CODE: Record<string, string>;
|
|
126
|
+
export declare const COUNTRY_CODE_TO_NAME: Record<string, string>;
|
|
118
127
|
export type BrewMethod = "Espresso" | "Filter" | "Pour Over" | "Aeropress" | "French Press" | "Cold Brew" | "Moka Pot" | "Siphon" | "Other";
|
package/dist/coffee.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COFFEE_PRODUCING_COUNTRIES = exports.DECAF_METHODS = void 0;
|
|
3
|
+
exports.COUNTRY_CODE_TO_NAME = exports.COUNTRY_NAME_TO_CODE = exports.COFFEE_PRODUCING_COUNTRIES = exports.DECAF_METHODS = void 0;
|
|
4
4
|
exports.DECAF_METHODS = [
|
|
5
5
|
"Swiss Water",
|
|
6
6
|
"Sugarcane / Ethyl Acetate",
|
|
@@ -38,3 +38,62 @@ exports.COFFEE_PRODUCING_COUNTRIES = [
|
|
|
38
38
|
"Yemen",
|
|
39
39
|
"Other",
|
|
40
40
|
];
|
|
41
|
+
// Mapping between common origin country names and ISO 3166-1 alpha-2 codes
|
|
42
|
+
exports.COUNTRY_NAME_TO_CODE = {
|
|
43
|
+
"Bolivia": "BO",
|
|
44
|
+
"Brazil": "BR",
|
|
45
|
+
"Burundi": "BI",
|
|
46
|
+
"Colombia": "CO",
|
|
47
|
+
"Costa Rica": "CR",
|
|
48
|
+
"Dominican Republic": "DO",
|
|
49
|
+
"Ecuador": "EC",
|
|
50
|
+
"El Salvador": "SV",
|
|
51
|
+
"Ethiopia": "ET",
|
|
52
|
+
"Guatemala": "GT",
|
|
53
|
+
"Haiti": "HT",
|
|
54
|
+
"Honduras": "HN",
|
|
55
|
+
"India": "IN",
|
|
56
|
+
"Indonesia": "ID",
|
|
57
|
+
"Jamaica": "JM",
|
|
58
|
+
"Kenya": "KE",
|
|
59
|
+
"Mexico": "MX",
|
|
60
|
+
"Nicaragua": "NI",
|
|
61
|
+
"Panama": "PA",
|
|
62
|
+
"Papua New Guinea": "PG",
|
|
63
|
+
"Peru": "PE",
|
|
64
|
+
"Rwanda": "RW",
|
|
65
|
+
"Tanzania": "TZ",
|
|
66
|
+
"Uganda": "UG",
|
|
67
|
+
"Vietnam": "VN",
|
|
68
|
+
"Yemen": "YE",
|
|
69
|
+
"Other": "ZZ",
|
|
70
|
+
};
|
|
71
|
+
exports.COUNTRY_CODE_TO_NAME = {
|
|
72
|
+
BO: "Bolivia",
|
|
73
|
+
BR: "Brazil",
|
|
74
|
+
BI: "Burundi",
|
|
75
|
+
CO: "Colombia",
|
|
76
|
+
CR: "Costa Rica",
|
|
77
|
+
DO: "Dominican Republic",
|
|
78
|
+
EC: "Ecuador",
|
|
79
|
+
SV: "El Salvador",
|
|
80
|
+
ET: "Ethiopia",
|
|
81
|
+
GT: "Guatemala",
|
|
82
|
+
HT: "Haiti",
|
|
83
|
+
HN: "Honduras",
|
|
84
|
+
IN: "India",
|
|
85
|
+
ID: "Indonesia",
|
|
86
|
+
JM: "Jamaica",
|
|
87
|
+
KE: "Kenya",
|
|
88
|
+
MX: "Mexico",
|
|
89
|
+
NI: "Nicaragua",
|
|
90
|
+
PA: "Panama",
|
|
91
|
+
PG: "Papua New Guinea",
|
|
92
|
+
PE: "Peru",
|
|
93
|
+
RW: "Rwanda",
|
|
94
|
+
TZ: "Tanzania",
|
|
95
|
+
UG: "Uganda",
|
|
96
|
+
VN: "Vietnam",
|
|
97
|
+
YE: "Yemen",
|
|
98
|
+
ZZ: "Other",
|
|
99
|
+
};
|
package/dist/farm.d.ts
CHANGED
package/dist/shop.d.ts
CHANGED
|
@@ -210,6 +210,7 @@ export interface RoastingAndBeansInfo {
|
|
|
210
210
|
flavourNotes?: string[];
|
|
211
211
|
coffeeBeans?: string[];
|
|
212
212
|
coffeeOriginCountries?: string[];
|
|
213
|
+
coffeeOriginCountryCodes?: string[];
|
|
213
214
|
processingMethods?: CoffeeProcessingMethod[];
|
|
214
215
|
roastLevels?: RoastLevel[];
|
|
215
216
|
singleOrigin?: boolean;
|