@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5053
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/extension-utils-BE0Y1Zlv.js +201 -0
- package/extension-utils-BE0Y1Zlv.js.map +1 -0
- package/extension-utils-BVDLwtKr.cjs +2 -0
- package/extension-utils-BVDLwtKr.cjs.map +1 -0
- package/freestyle-registration-manager-CDbljuRk.cjs +2 -0
- package/freestyle-registration-manager-CDbljuRk.cjs.map +1 -0
- package/freestyle-registration-manager-z0aYdMcC.js +1069 -0
- package/freestyle-registration-manager-z0aYdMcC.js.map +1 -0
- package/index.cjs +2 -0
- package/index.cjs.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/models/constants/index.d.ts +2 -0
- package/models/constants/index.d.ts.map +1 -0
- package/models/index.d.ts +6 -0
- package/models/index.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +25 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts +87 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/index.d.ts +4 -0
- package/models/models/agitation-required-trouble/index.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/types/index.d.ts +8 -0
- package/models/models/carb-agitator/carb-agitator-model.d.ts +14 -0
- package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -0
- package/models/models/carb-agitator/carb-agitator-registration.d.ts +84 -0
- package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +1 -0
- package/models/models/carb-agitator/index.d.ts +3 -0
- package/models/models/carb-agitator/index.d.ts.map +1 -0
- package/models/models/carb-agitator/types/index.d.ts +14 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts +20 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts +87 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts +23 -0
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts +89 -0
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts.map +1 -0
- package/models/models/cartridge-agitator/index.d.ts +6 -0
- package/models/models/cartridge-agitator/index.d.ts.map +1 -0
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts +8 -0
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts.map +1 -0
- package/models/models/cartridge-agitator/types/index.d.ts +14 -0
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +43 -0
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -0
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts +89 -0
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts.map +1 -0
- package/models/models/freestyle-assembly/index.d.ts +4 -0
- package/models/models/freestyle-assembly/index.d.ts.map +1 -0
- package/models/models/freestyle-assembly/types/index.d.ts +8 -0
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts +21 -0
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts.map +1 -0
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts +87 -0
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts.map +1 -0
- package/models/models/freestyle-holder/index.d.ts +4 -0
- package/models/models/freestyle-holder/index.d.ts.map +1 -0
- package/models/models/freestyle-holder/types/index.d.ts +8 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts +25 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts +87 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/index.d.ts +5 -0
- package/models/models/freestyle-nozzle/index.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/services/freestyle-nozzle-services.d.ts +32 -0
- package/models/models/freestyle-nozzle/services/freestyle-nozzle-services.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/services/index.d.ts +2 -0
- package/models/models/freestyle-nozzle/services/index.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/types/index.d.ts +8 -0
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts +14 -0
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts.map +1 -0
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts +87 -0
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts.map +1 -0
- package/models/models/freestyle-pump/index.d.ts +5 -0
- package/models/models/freestyle-pump/index.d.ts.map +1 -0
- package/models/models/freestyle-pump/services/freestyle-pump-services.d.ts +10 -0
- package/models/models/freestyle-pump/services/freestyle-pump-services.d.ts.map +1 -0
- package/models/models/freestyle-pump/services/index.d.ts +2 -0
- package/models/models/freestyle-pump/services/index.d.ts.map +1 -0
- package/models/models/freestyle-pump/types/index.d.ts +5 -0
- package/models/models/ice-agitator/ice-agitator-model.d.ts +65 -0
- package/models/models/ice-agitator/ice-agitator-model.d.ts.map +1 -0
- package/models/models/ice-agitator/ice-agitator-registration.d.ts +85 -0
- package/models/models/ice-agitator/ice-agitator-registration.d.ts.map +1 -0
- package/models/models/ice-agitator/index.d.ts +4 -0
- package/models/models/ice-agitator/index.d.ts.map +1 -0
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts +13 -0
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts.map +1 -0
- package/models/models/ice-agitator/services/index.d.ts +2 -0
- package/models/models/ice-agitator/services/index.d.ts.map +1 -0
- package/models/models/ice-agitator/types/index.d.ts +7 -0
- package/models/models/index.d.ts +11 -0
- package/models/models/index.d.ts.map +1 -0
- package/models/models/remote-tray/index.d.ts +6 -0
- package/models/models/remote-tray/index.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-container-model.d.ts +12 -0
- package/models/models/remote-tray/remote-tray-container-model.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-container-registration.d.ts +87 -0
- package/models/models/remote-tray/remote-tray-container-registration.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-model.d.ts +175 -0
- package/models/models/remote-tray/remote-tray-model.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-registration.d.ts +90 -0
- package/models/models/remote-tray/remote-tray-registration.d.ts.map +1 -0
- package/models/models/remote-tray/types/index.d.ts +10 -0
- package/models/models/types/assembly.d.ts +21 -0
- package/models/models/types/assembly.d.ts.map +1 -0
- package/models/models/types/ingredients.d.ts +33 -0
- package/models/models/types/ingredients.d.ts.map +1 -0
- package/models/models/types/pumps.d.ts +6 -0
- package/models/models/types/pumps.d.ts.map +1 -0
- package/models/utils/extension-utils.d.ts +37 -0
- package/models/utils/extension-utils.d.ts.map +1 -0
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +19 -0
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -0
- package/models/utils/extensions/assembly/types.d.ts +141 -0
- package/models/utils/extensions/assembly/types.d.ts.map +1 -0
- package/models/utils/extensions/availability/freestyle-loader.d.ts +31 -0
- package/models/utils/extensions/availability/freestyle-loader.d.ts.map +1 -0
- package/models/utils/extensions/availability/freestyle-mapper.d.ts +14 -0
- package/models/utils/extensions/availability/freestyle-mapper.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/assets.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/assets.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts +14 -0
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/beverages.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/beverages.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts +5 -0
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/brands.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/brands.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/copy-input.d.ts +4 -0
- package/models/utils/extensions/availability/middleware/copy-input.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/flavors.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/flavors.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/nutrition.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/nutrition.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/related-brands.d.ts +14 -0
- package/models/utils/extensions/availability/middleware/related-brands.d.ts.map +1 -0
- package/models/utils/extensions/availability/types.d.ts +251 -0
- package/models/utils/extensions/availability/types.d.ts.map +1 -0
- package/models/utils/extensions/availability/util/locate-brand.d.ts +2 -0
- package/models/utils/extensions/availability/util/locate-brand.d.ts.map +1 -0
- package/models/utils/extensions/availability/util/process-related-brand.d.ts +4 -0
- package/models/utils/extensions/availability/util/process-related-brand.d.ts.map +1 -0
- package/models/utils/extensions/ingredient/index.d.ts +2 -0
- package/models/utils/extensions/ingredient/index.d.ts.map +1 -0
- package/models/utils/extensions/ingredient/model-extension.d.ts +7 -0
- package/models/utils/extensions/ingredient/model-extension.d.ts.map +1 -0
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts +6 -0
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts.map +1 -0
- package/models/utils/freestyle-registration-manager.d.ts +39 -0
- package/models/utils/freestyle-registration-manager.d.ts.map +1 -0
- package/models/utils/index.d.ts +5 -0
- package/models/utils/index.d.ts.map +1 -0
- package/models.cjs +2 -0
- package/models.cjs.map +1 -0
- package/models.d.ts +1 -0
- package/models.js +26 -0
- package/models.js.map +1 -0
- package/package.json +37 -0
- package/ui/contexts/index.d.ts +2 -0
- package/ui/contexts/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-assembly/index.d.ts +2 -0
- package/ui/hooks/freestyle-assembly/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts +4 -0
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts.map +1 -0
- package/ui/hooks/freestyle-nozzle/index.d.ts +2 -0
- package/ui/hooks/freestyle-nozzle/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts +4 -0
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/index.d.ts +3 -0
- package/ui/hooks/ice-agitator/index.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts +14 -0
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts +7 -0
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts.map +1 -0
- package/ui/hooks/index.d.ts +5 -0
- package/ui/hooks/index.d.ts.map +1 -0
- package/ui/hooks/nutrition/index.d.ts +2 -0
- package/ui/hooks/nutrition/index.d.ts.map +1 -0
- package/ui/hooks/nutrition/use-nutrition-info.d.ts +4 -0
- package/ui/hooks/nutrition/use-nutrition-info.d.ts.map +1 -0
- package/ui/index.d.ts +3 -0
- package/ui/index.d.ts.map +1 -0
- package/ui.cjs +2 -0
- package/ui.cjs.map +1 -0
- package/ui.d.ts +1 -0
- package/ui.js +14 -0
- package/ui.js.map +1 -0
- package/use-nutrition-info-CjXNGbCN.js +52 -0
- package/use-nutrition-info-CjXNGbCN.js.map +1 -0
- package/use-nutrition-info-DjIGT-mE.cjs +2 -0
- package/use-nutrition-info-DjIGT-mE.cjs.map +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { IceAgitatorModel } from '../../../models/ice-agitator';
|
|
2
|
+
import { CarbAgitatorModel } from '../../../models/carb-agitator';
|
|
3
|
+
import { AssemblyTypes } from '@kosdev-code/kos-dispense-sdk';
|
|
4
|
+
|
|
5
|
+
export type AgitatorModel = CarbAgitatorModel | IceAgitatorModel;
|
|
6
|
+
export type AgitatorTypes = "iceAgitator" | "carbAgitator";
|
|
7
|
+
/**
|
|
8
|
+
* extension to the base assembly returned from the backend. These are additional properties that are not
|
|
9
|
+
* on the base assembly but added as part of an application.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```json
|
|
13
|
+
* {
|
|
14
|
+
"assemblies": [
|
|
15
|
+
{
|
|
16
|
+
"boards": [
|
|
17
|
+
...
|
|
18
|
+
],
|
|
19
|
+
"holders": {
|
|
20
|
+
...
|
|
21
|
+
},
|
|
22
|
+
"nozzles": [
|
|
23
|
+
...
|
|
24
|
+
],
|
|
25
|
+
"core": true,
|
|
26
|
+
"name": "core",
|
|
27
|
+
"path": "assembly.core",
|
|
28
|
+
// extra properties added to the assembly
|
|
29
|
+
"carbAgitator": {
|
|
30
|
+
"name": "carbAgitator",
|
|
31
|
+
"path": "assembly.core.board:ksm.carbAgitator"
|
|
32
|
+
},
|
|
33
|
+
"iceAgitator": {
|
|
34
|
+
"name": "iceAgitator",
|
|
35
|
+
"path": "assembly.core.board:ksm.iceAgitator"
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
*/
|
|
42
|
+
export interface FreestyleResponseExt {
|
|
43
|
+
iceAgitator?: {
|
|
44
|
+
name: "iceAgitator";
|
|
45
|
+
path: string;
|
|
46
|
+
state?: {
|
|
47
|
+
path: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
carbAgitator?: {
|
|
51
|
+
name: "carbAgitator";
|
|
52
|
+
path: string;
|
|
53
|
+
state?: {
|
|
54
|
+
path: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
cartridgeAgitators?: {
|
|
58
|
+
name: "agit";
|
|
59
|
+
path: string;
|
|
60
|
+
state: {
|
|
61
|
+
path: string;
|
|
62
|
+
};
|
|
63
|
+
}[];
|
|
64
|
+
remoteTrays?: {
|
|
65
|
+
holderPath: string;
|
|
66
|
+
name: string;
|
|
67
|
+
path: string;
|
|
68
|
+
}[];
|
|
69
|
+
}
|
|
70
|
+
export interface FreestyleNozzleExt {
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* extension to the holder types on the assembly as returned from the backend. These
|
|
74
|
+
* are additional properties that are not on the base assembly but added as part of an application.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
*
|
|
78
|
+
* In this example, the maxVolumeML and remainingVolumeML are added to the holder.
|
|
79
|
+
* ```json
|
|
80
|
+
* {
|
|
81
|
+
"assemblies": [
|
|
82
|
+
{
|
|
83
|
+
"boards": [
|
|
84
|
+
...
|
|
85
|
+
],
|
|
86
|
+
"holders": {
|
|
87
|
+
"carb": [
|
|
88
|
+
...
|
|
89
|
+
],
|
|
90
|
+
"ns": [
|
|
91
|
+
...
|
|
92
|
+
],
|
|
93
|
+
"micros.0": [
|
|
94
|
+
{
|
|
95
|
+
"agitated": false,
|
|
96
|
+
"ingredientId": "1048588",
|
|
97
|
+
"name": "S1",
|
|
98
|
+
"maxVolumeML": 680,
|
|
99
|
+
"remainingVolumeML": 520,
|
|
100
|
+
"path": "assembly.core.holder:S1"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"agitated": false,
|
|
104
|
+
"ingredientId": "1050608",
|
|
105
|
+
"name": "S2",
|
|
106
|
+
"maxVolumeML": 680,
|
|
107
|
+
"remainingVolumeML": 520,
|
|
108
|
+
"path": "assembly.core.holder:S2"
|
|
109
|
+
},
|
|
110
|
+
...
|
|
111
|
+
],
|
|
112
|
+
"micros.1": [
|
|
113
|
+
...
|
|
114
|
+
|
|
115
|
+
],
|
|
116
|
+
"water": [
|
|
117
|
+
...
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"nozzles": [],
|
|
121
|
+
...
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
*/
|
|
127
|
+
export interface FreestyleHolderExt {
|
|
128
|
+
agitated?: boolean;
|
|
129
|
+
}
|
|
130
|
+
export interface FreestyleBoardExt {
|
|
131
|
+
}
|
|
132
|
+
export interface FreestylePumpExt {
|
|
133
|
+
}
|
|
134
|
+
export type FreestyleAssemblyResponse = AssemblyTypes.AssemblyResponse<{
|
|
135
|
+
AssemblyExt: FreestyleResponseExt;
|
|
136
|
+
NozzleExt: FreestyleNozzleExt;
|
|
137
|
+
HolderExt: FreestyleHolderExt;
|
|
138
|
+
BoardExt: FreestyleBoardExt;
|
|
139
|
+
PumpExt: FreestylePumpExt;
|
|
140
|
+
}>;
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/assembly/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,gBAAgB,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,aAAa,GAAG,cAAc,CAAC;AAC3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,aAAa,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,CAAC;IACF,YAAY,CAAC,EAAE;QACb,IAAI,EAAE,cAAc,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE;YACN,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,CAAC;IAEF,kBAAkB,CAAC,EAAE;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,EAAE,CAAC;IAEJ,WAAW,CAAC,EAAE;QACZ,UAAU,EAAE,MAAM,CAAC;QACnB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,EAAE,CAAC;CACL;AAGD,MAAM,WAAW,kBAAkB;CAAG;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsDK;AACL,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;CAAG;AAErC,MAAM,WAAW,gBAAgB;CAAG;AAEpC,MAAM,MAAM,yBAAyB,GAAG,aAAa,CAAC,gBAAgB,CAAC;IACrE,WAAW,EAAE,oBAAoB,CAAC;IAClC,SAAS,EAAE,kBAAkB,CAAC;IAC9B,SAAS,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,OAAO,EAAE,gBAAgB,CAAC;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from './types';
|
|
2
|
+
import { DataLoader, Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
export declare const transformAvailabilityData: (input: UiSchemaResponse, additionalMiddleware?: Middleware<UiSchemaResponse, AvailabilityContext>[], replace?: boolean) => Promise<AvailabilityContext>;
|
|
5
|
+
/**
|
|
6
|
+
* Props for the freestyle availability loader
|
|
7
|
+
*/
|
|
8
|
+
export interface AvailabilityLoaderProps {
|
|
9
|
+
/** the url to send the request for the UiSchemaData. Defaults to http://localhost:8081/system/cui/core.json */
|
|
10
|
+
url?: string;
|
|
11
|
+
/** additional middlewares to execute as part of the data processing */
|
|
12
|
+
middleware?: Middleware<UiSchemaResponse, AvailabilityContext>[];
|
|
13
|
+
/** if true, replace the default middleware with the provided middleware */
|
|
14
|
+
replace?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Utility method to load the freestyle brandset data into the availability context.
|
|
18
|
+
*
|
|
19
|
+
* This loader will retrieve the UI Schema from the provided URL and transform it into
|
|
20
|
+
* a format that can be used to populate the availability brands and beverages with UI schema
|
|
21
|
+
* data.
|
|
22
|
+
*
|
|
23
|
+
* With this data, the availability models can have access to the brandset assets for
|
|
24
|
+
* brands, beverages and flavours.
|
|
25
|
+
*
|
|
26
|
+
*
|
|
27
|
+
* @param props
|
|
28
|
+
* @returns A DataLoader function that will load the availability context
|
|
29
|
+
*/
|
|
30
|
+
export declare const freestyleAvailabilityLoader: ({ url, middleware, replace, }?: AvailabilityLoaderProps) => DataLoader;
|
|
31
|
+
//# sourceMappingURL=freestyle-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-loader.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/freestyle-loader.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAErE,eAAO,MAAM,yBAAyB,UAC7B,gBAAgB,yBACD,WACpB,gBAAgB,EAChB,mBAAmB,CACpB,EAAE,wBAEF,QAAQ,mBAAmB,CAoB7B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gHAAgH;IAChH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,uEAAuE;IACvE,UAAU,CAAC,EAAE,UAAU,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,EAAE,CAAC;IAEjE,2EAA2E;IAC3E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AACD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,2BAA2B,mCAKnC,uBAAuB,KAAQ,UAWjC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvailabilityContext, BeverageData, BrandData } from './types';
|
|
2
|
+
import { GroupBeverageResponse } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This utility mapper will augment the core KOS availability data with freestyle specific
|
|
6
|
+
* UI data.
|
|
7
|
+
*
|
|
8
|
+
* @param input - the availability data including the group id.
|
|
9
|
+
* @param context - the data loaded into the availability context.
|
|
10
|
+
* @returns an augmented availability node with data specific to freestyle brands
|
|
11
|
+
* and beverages.
|
|
12
|
+
*/
|
|
13
|
+
export declare const freestyleAvailabilityMapper: (input: GroupBeverageResponse, context: AvailabilityContext) => Promise<BeverageData | BrandData>;
|
|
14
|
+
//# sourceMappingURL=freestyle-mapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-mapper.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/freestyle-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAEV,mBAAmB,EACnB,YAAY,EACZ,SAAS,EAEV,MAAM,SAAS,CAAC;AAsDjB;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,UAC/B,qBAAqB,WACnB,mBAAmB,sCAO7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the assets array into a dictionary
|
|
6
|
+
* @param context The context object that contains the data and result
|
|
7
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
8
|
+
*/
|
|
9
|
+
export declare const assetsMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
10
|
+
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAS,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO7E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CACvC,gBAAgB,EAChB,mBAAmB,CAMpB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the beverage screen data. The middleware will perform the following:
|
|
6
|
+
* 1. Organize the beverage screen data into a dictionary keyed by the brand id
|
|
7
|
+
* 2. Adds a beverages property to the beverage screen data that contains the organized beverage data
|
|
8
|
+
* 3. Processes related brands for each beverage screen
|
|
9
|
+
*
|
|
10
|
+
* @param context The context object that contains the data and result
|
|
11
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
12
|
+
*/
|
|
13
|
+
export declare const beverageScreenMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
14
|
+
//# sourceMappingURL=beverage-screen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beverage-screen.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/beverage-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EAGnB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAwClB;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,EAAE,UAAU,CAC/C,gBAAgB,EAChB,mBAAmB,CASpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the brands array into a dictionary
|
|
6
|
+
* @param context The context object that contains the data and result
|
|
7
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
8
|
+
*/
|
|
9
|
+
export declare const beveragesMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
10
|
+
//# sourceMappingURL=beverages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"beverages.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/beverages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAY,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAOhF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAC1C,gBAAgB,EAChB,mBAAmB,CAapB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brand-screen.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/brand-screen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EAEnB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA4BlB,eAAO,MAAM,qBAAqB,EAAE,UAAU,CAC5C,gBAAgB,EAChB,mBAAmB,CAMpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the brands array into a dictionary
|
|
6
|
+
* @param context The context object that contains the data and result
|
|
7
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
8
|
+
*/
|
|
9
|
+
export declare const brandsMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
10
|
+
//# sourceMappingURL=brands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"brands.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/brands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAS,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO7E;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,UAAU,CACvC,gBAAgB,EAChB,mBAAmB,CAMpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-input.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/copy-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAG/C,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the flavors array into a dictionary
|
|
6
|
+
* @param context The context object that contains the data and result
|
|
7
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
8
|
+
*/
|
|
9
|
+
export declare const flavorsMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
10
|
+
//# sourceMappingURL=flavors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flavors.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/flavors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,mBAAmB,EAAU,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAO9E;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CACxC,gBAAgB,EAChB,mBAAmB,CASpB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will augment the beverage data with nutrition information
|
|
6
|
+
* @param context The context object that contains the data and result
|
|
7
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
8
|
+
*/
|
|
9
|
+
export declare const nutritionMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
10
|
+
//# sourceMappingURL=nutrition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nutrition.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/nutrition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EAEnB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAiBlB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,UAAU,CAC1C,gBAAgB,EAChB,mBAAmB,CAWpB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { AvailabilityContext, UiSchemaResponse } from '../types';
|
|
2
|
+
import { Middleware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Middleware that will normalize the beverage screen data. The middleware will perform the following:
|
|
6
|
+
* 1. Organize the beverage screen data into a dictionary keyed by the brand id
|
|
7
|
+
* 2. Adds a beverages property to the beverage screen data that contains the organized beverage data
|
|
8
|
+
* 3. Processes related brands for each beverage screen
|
|
9
|
+
*
|
|
10
|
+
* @param context The context object that contains the data and result
|
|
11
|
+
* @param next called at the end of the middleware to indicate that the next middleware can be called
|
|
12
|
+
*/
|
|
13
|
+
export declare const relatedBrandMiddleware: Middleware<UiSchemaResponse, AvailabilityContext>;
|
|
14
|
+
//# sourceMappingURL=related-brands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"related-brands.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/middleware/related-brands.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EACV,mBAAmB,EAGnB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAkClB;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,UAAU,CAC7C,gBAAgB,EAChB,mBAAmB,CASpB,CAAC"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
export interface BaseAvailabilityData {
|
|
2
|
+
name: string;
|
|
3
|
+
displayNameKey: string;
|
|
4
|
+
asset?: Asset;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This is the data structure for a beverage availability node.
|
|
8
|
+
*
|
|
9
|
+
* It represents the additional data that will be added into the availability model
|
|
10
|
+
* for a beverage.
|
|
11
|
+
*
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
export interface BeverageData extends BaseAvailabilityData {
|
|
16
|
+
availabilityType: "beverage";
|
|
17
|
+
beverageColor: string;
|
|
18
|
+
flavor?: Flavor;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* This is the data structure for a brand availability node.
|
|
22
|
+
*
|
|
23
|
+
* It represents the additional data that will be added into the availability model
|
|
24
|
+
* for a brand.
|
|
25
|
+
*/
|
|
26
|
+
export interface BrandData extends BaseAvailabilityData {
|
|
27
|
+
availabilityType: "brand";
|
|
28
|
+
brandColor: string;
|
|
29
|
+
brandFamilyTextKey: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* This union type represents the data that can be loaded into the availability context.
|
|
33
|
+
*
|
|
34
|
+
* It can be either a beverage or a brand.
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
export type AvailabilityData = BeverageData | BrandData;
|
|
38
|
+
type AssetIdType = "asset";
|
|
39
|
+
export interface WaterButton {
|
|
40
|
+
backgroundAssetDbId: number;
|
|
41
|
+
beverageId: number;
|
|
42
|
+
dbId: number;
|
|
43
|
+
textAlignment: string;
|
|
44
|
+
name: string;
|
|
45
|
+
ringColor: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
textKey: string;
|
|
48
|
+
"backgroundAssetDbId.type": AssetIdType;
|
|
49
|
+
}
|
|
50
|
+
export interface Flavor {
|
|
51
|
+
dbId: number;
|
|
52
|
+
liquidColor: string;
|
|
53
|
+
name: string;
|
|
54
|
+
flavorFontColor: string;
|
|
55
|
+
mainFlavorColor: string;
|
|
56
|
+
displayNameKey: string;
|
|
57
|
+
}
|
|
58
|
+
type BeverageType = "Regular";
|
|
59
|
+
export interface Beverage {
|
|
60
|
+
"brandDbId.type": BeverageType;
|
|
61
|
+
highFoamingBeverage: boolean;
|
|
62
|
+
caffeineFree: boolean;
|
|
63
|
+
beverageColor: string;
|
|
64
|
+
showWaveAnimation: boolean;
|
|
65
|
+
brandDbId: number;
|
|
66
|
+
type: BeverageType;
|
|
67
|
+
flavorDbId: number;
|
|
68
|
+
beverageId: number;
|
|
69
|
+
dbId: number;
|
|
70
|
+
name: string;
|
|
71
|
+
lowCalorie: boolean;
|
|
72
|
+
carbonated: boolean;
|
|
73
|
+
displayNameKey: string;
|
|
74
|
+
experimentOnly: boolean;
|
|
75
|
+
}
|
|
76
|
+
type BrandType = "Regular";
|
|
77
|
+
export interface Brand {
|
|
78
|
+
brandColor: string;
|
|
79
|
+
caffeineFree: boolean;
|
|
80
|
+
type: BrandType;
|
|
81
|
+
brandFamilyTextKey: string;
|
|
82
|
+
dbId: number;
|
|
83
|
+
nutritionTextKey: string;
|
|
84
|
+
name: string;
|
|
85
|
+
lowCalorie: true;
|
|
86
|
+
caloricTextSubTitleKey: string;
|
|
87
|
+
trademark: string;
|
|
88
|
+
caloricTextTitleKey: string;
|
|
89
|
+
carbonated: boolean;
|
|
90
|
+
displayNameKey: string;
|
|
91
|
+
}
|
|
92
|
+
export interface SelfServe {
|
|
93
|
+
pourControlHoldForDrinkTextKey: string;
|
|
94
|
+
lowNoCalButtonTextKey: string;
|
|
95
|
+
"iceLeverEngaged.title": string;
|
|
96
|
+
allDrinksButtonTextKey: string;
|
|
97
|
+
pincodeLabelWaterKey: string;
|
|
98
|
+
pincodeLabelInputIncorrectKey: string;
|
|
99
|
+
inactivityQuestionKey: string;
|
|
100
|
+
"carbRecharging.message": string;
|
|
101
|
+
"beverage.water": string;
|
|
102
|
+
"iceLeverEngaged.message": string;
|
|
103
|
+
"agitationRequired.title": string;
|
|
104
|
+
inactivityResponseKey: string;
|
|
105
|
+
caffeineFreeButtonTextKey: string;
|
|
106
|
+
"beverage.sparklingWater": string;
|
|
107
|
+
pincodeLabelKeyDeleteKey: string;
|
|
108
|
+
dbId: number;
|
|
109
|
+
name: string;
|
|
110
|
+
unavailableTextKey: string;
|
|
111
|
+
pincodeLabelWaterAdaKey: string;
|
|
112
|
+
"agitationRequired.message": string;
|
|
113
|
+
pincodeLabelTitleKey: string;
|
|
114
|
+
"carbRecharging.title": string;
|
|
115
|
+
pincodeLabelTitleIncorrectKey: string;
|
|
116
|
+
}
|
|
117
|
+
export type AssetType = "Ambient/Attract/Promo/Background" | "Beverage/Brand/Promo Icon" | "Other Elements" | "Nutrition Info Button" | "Water Icon";
|
|
118
|
+
export type ResourceType = "image";
|
|
119
|
+
export interface Asset {
|
|
120
|
+
path: string;
|
|
121
|
+
dbId: number;
|
|
122
|
+
width: number;
|
|
123
|
+
height: number;
|
|
124
|
+
assetType: AssetType;
|
|
125
|
+
resourceType: ResourceType;
|
|
126
|
+
}
|
|
127
|
+
type StateContextType = "Text";
|
|
128
|
+
export interface PourButtonOverlay {
|
|
129
|
+
stopStateContentType: StateContextType;
|
|
130
|
+
stopStateKey: string;
|
|
131
|
+
startStateContentType: StateContextType;
|
|
132
|
+
startStateKey: string;
|
|
133
|
+
dbId: number;
|
|
134
|
+
name: string;
|
|
135
|
+
}
|
|
136
|
+
type ContentType = "Image";
|
|
137
|
+
export interface NutritionButton {
|
|
138
|
+
buttonText: string;
|
|
139
|
+
saltLabel: string;
|
|
140
|
+
sugarLabel: string;
|
|
141
|
+
carbohydrateLabel: string;
|
|
142
|
+
energyLabel: string;
|
|
143
|
+
sraDisclaimer: string;
|
|
144
|
+
unitDescriptor: string;
|
|
145
|
+
tableHeader: string;
|
|
146
|
+
"buttonImageAssetDbId.type": AssetIdType;
|
|
147
|
+
buttonImageAssetDbId: number;
|
|
148
|
+
dbId: number;
|
|
149
|
+
name: string;
|
|
150
|
+
buttonContentType: ContentType;
|
|
151
|
+
}
|
|
152
|
+
export type BeverageScreen = {
|
|
153
|
+
beverages: BeverageScreenData;
|
|
154
|
+
} & Record<string, string | number | boolean>;
|
|
155
|
+
export type BrandScreen = Record<string, string | number | boolean>;
|
|
156
|
+
export interface Nutrition {
|
|
157
|
+
country: string;
|
|
158
|
+
recipeType: string;
|
|
159
|
+
carbohydratesGramsPerOz: number;
|
|
160
|
+
sugarsGramsPerOz: number;
|
|
161
|
+
endDate: string;
|
|
162
|
+
allergensKey: string;
|
|
163
|
+
recipeName: string;
|
|
164
|
+
beverageDbId: number;
|
|
165
|
+
legalDescriptionKey: string;
|
|
166
|
+
ingredientsKey: string;
|
|
167
|
+
dbId: number;
|
|
168
|
+
beverage: string;
|
|
169
|
+
preferredVersion: boolean;
|
|
170
|
+
caloricValuePerOz: number;
|
|
171
|
+
ingredientsHeadingKey: string;
|
|
172
|
+
saltGramsPerOz: number;
|
|
173
|
+
recipeVersion: number;
|
|
174
|
+
startDate: string;
|
|
175
|
+
}
|
|
176
|
+
export interface UiSchemaResponse {
|
|
177
|
+
dbId: number;
|
|
178
|
+
name: string;
|
|
179
|
+
uiType: string;
|
|
180
|
+
primaryLanguage: string;
|
|
181
|
+
"backButtonAssetDbId.type": AssetType;
|
|
182
|
+
location: string;
|
|
183
|
+
platform: number;
|
|
184
|
+
beverageRingOpacity: string;
|
|
185
|
+
nutritionPanelStyle: string;
|
|
186
|
+
publishDate: string;
|
|
187
|
+
pourButtonRingOpacity: string;
|
|
188
|
+
backButtonAssetDbId: number;
|
|
189
|
+
waterButton: WaterButton;
|
|
190
|
+
selfServe: SelfServe;
|
|
191
|
+
pourButtonOverlay: PourButtonOverlay;
|
|
192
|
+
nutritionButton: NutritionButton;
|
|
193
|
+
beverageScreens: Record<string, BeverageScreen>;
|
|
194
|
+
brandScreen: Record<string, string | number | boolean>;
|
|
195
|
+
flavors: Flavor[];
|
|
196
|
+
beverages: Beverage[];
|
|
197
|
+
brands: Brand[];
|
|
198
|
+
assets: Asset[];
|
|
199
|
+
}
|
|
200
|
+
type NutritionBeverage = Beverage & {
|
|
201
|
+
nutrition?: Nutrition;
|
|
202
|
+
};
|
|
203
|
+
/**
|
|
204
|
+
* This is the interface for the data that is loaded into the availability context when
|
|
205
|
+
* the freestyle brandset is loaded.
|
|
206
|
+
*
|
|
207
|
+
* @remarks
|
|
208
|
+
* The data is derrived from the the UI Schema response from the availability service.
|
|
209
|
+
* The primary changes are that the data is organized into a format that is more easily
|
|
210
|
+
* consumed by the UI and model layers.
|
|
211
|
+
*
|
|
212
|
+
* Most lists have been converted into maps for easier lookup.
|
|
213
|
+
*/
|
|
214
|
+
export interface AvailabilityContext {
|
|
215
|
+
dbId: number;
|
|
216
|
+
name: string;
|
|
217
|
+
uiType: string;
|
|
218
|
+
primaryLanguage: string;
|
|
219
|
+
"backButtonAssetDbId.type": AssetType;
|
|
220
|
+
location: string;
|
|
221
|
+
platform: number;
|
|
222
|
+
beverageRingOpacity: string;
|
|
223
|
+
nutritionPanelStyle: string;
|
|
224
|
+
publishDate: string;
|
|
225
|
+
pourButtonRingOpacity: string;
|
|
226
|
+
backButtonAssetDbId: number;
|
|
227
|
+
waterButton: WaterButton;
|
|
228
|
+
selfServe: SelfServe;
|
|
229
|
+
pourButtonOverlay: PourButtonOverlay;
|
|
230
|
+
nutritionButton: NutritionButton;
|
|
231
|
+
beverageScreens: Record<string, BeverageScreen>;
|
|
232
|
+
brandScreen: Record<string, BrandScreen>;
|
|
233
|
+
flavors: Record<string, Flavor>;
|
|
234
|
+
beverages: Record<string, NutritionBeverage>;
|
|
235
|
+
brands: Record<string, Brand>;
|
|
236
|
+
assets: Record<string, Asset>;
|
|
237
|
+
beverageMap?: Record<string | number, string>;
|
|
238
|
+
}
|
|
239
|
+
export interface BeverageScreenData {
|
|
240
|
+
relatedBrands?: Record<string, {
|
|
241
|
+
rank: number;
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
}>;
|
|
244
|
+
[key: string]: any;
|
|
245
|
+
}
|
|
246
|
+
export interface BrandScreenData {
|
|
247
|
+
rank: number;
|
|
248
|
+
[key: string]: any;
|
|
249
|
+
}
|
|
250
|
+
export {};
|
|
251
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,YAAa,SAAQ,oBAAoB;IACxD,gBAAgB,EAAE,UAAU,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;GAKG;AACH,MAAM,WAAW,SAAU,SAAQ,oBAAoB;IACrD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,SAAS,CAAC;AAGxD,KAAK,WAAW,GAAG,OAAO,CAAC;AAC3B,MAAM,WAAW,WAAW;IAC1B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,0BAA0B,EAAE,WAAW,CAAC;CACzC;AAED,MAAM,WAAW,MAAM;IAC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and.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/util/locate-brand.ts"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,IAAI,EAAE,MAAM,OAIb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-related-brand.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/availability/util/process-related-brand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,mBAAmB,SACvB,OAAO,MAAM,EAAE,GAAG,CAAC,oBAEV,kBAAkB,WACvB,MAAM,QACT,MAAM,OACP,MAAM,SAcZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/ingredient/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FreestyleIngredientModelData } from '../../../models/types/ingredients';
|
|
2
|
+
import { DataMapper, IndexExtension, PropertyMapper } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
+
|
|
4
|
+
export declare const ingredientDataMapper: DataMapper;
|
|
5
|
+
export declare const ingredientIndexExtension: IndexExtension<FreestyleIngredientModelData>;
|
|
6
|
+
export declare const ingredientCategoryMapper: PropertyMapper;
|
|
7
|
+
//# sourceMappingURL=model-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-extension.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/extensions/ingredient/model-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,cAAc,EACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAEV,4BAA4B,EAE7B,MAAM,mCAAmC,CAAC;AAE3C,eAAO,MAAM,oBAAoB,EAAE,UAUlC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,cAAc,CAAC,4BAA4B,CAG/E,CAAC;AACJ,eAAO,MAAM,wBAAwB,EAAE,cAEf,CAAC"}
|