@pastelarai/pastelarai-shared-types 1.0.118 → 1.0.120
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.
|
@@ -2,7 +2,7 @@ import { CONTENTTYPE, STATUS, STORAGEUNIT, TASKACTIONTYPE, TASKUNIT, UNIT } from
|
|
|
2
2
|
import { PRODUCTCATEGORY } from "src/data/categories";
|
|
3
3
|
import { IdName } from "./bill";
|
|
4
4
|
import { Avatar, Customer, ProductInRange } from "./ranges";
|
|
5
|
-
import { WorkingRecipe, Content, WorkingContent } from "./recipes";
|
|
5
|
+
import { WorkingRecipe, Content, WorkingContent, SharableContent } from "./recipes";
|
|
6
6
|
export interface Format {
|
|
7
7
|
_id?: string;
|
|
8
8
|
name: string;
|
|
@@ -137,3 +137,55 @@ export interface WorkingProduct {
|
|
|
137
137
|
ranges_list: IdNameAvatar[];
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
+
export interface SharableTaskProduct {
|
|
141
|
+
translations: {
|
|
142
|
+
language: string;
|
|
143
|
+
action_name: string;
|
|
144
|
+
}[];
|
|
145
|
+
action_type: TASKACTIONTYPE;
|
|
146
|
+
duration: number;
|
|
147
|
+
cost: number;
|
|
148
|
+
quantity: {
|
|
149
|
+
value: number;
|
|
150
|
+
unit: TASKUNIT;
|
|
151
|
+
};
|
|
152
|
+
content_type?: CONTENTTYPE;
|
|
153
|
+
content_id?: string;
|
|
154
|
+
content_quantity_per_product?: {
|
|
155
|
+
value: number;
|
|
156
|
+
unit: UNIT;
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
export interface SharableCompositionBase {
|
|
160
|
+
format: Format;
|
|
161
|
+
units_per_batch: number;
|
|
162
|
+
stock?: number;
|
|
163
|
+
content_list: SharableContent[];
|
|
164
|
+
tasks_list: SharableTaskProduct[];
|
|
165
|
+
costs: Costs;
|
|
166
|
+
}
|
|
167
|
+
export type SharableComposition = SharableCompositionBase & {
|
|
168
|
+
[key in PricingType]?: Pricing;
|
|
169
|
+
};
|
|
170
|
+
export interface SharableProduct {
|
|
171
|
+
source: string;
|
|
172
|
+
translations: {
|
|
173
|
+
language: string;
|
|
174
|
+
name: string;
|
|
175
|
+
description: string;
|
|
176
|
+
holidays: string;
|
|
177
|
+
}[];
|
|
178
|
+
category: PRODUCTCATEGORY;
|
|
179
|
+
storage: {
|
|
180
|
+
unit: STORAGEUNIT;
|
|
181
|
+
value: number;
|
|
182
|
+
};
|
|
183
|
+
stock: number;
|
|
184
|
+
base_format: string;
|
|
185
|
+
composition: SharableComposition[];
|
|
186
|
+
_id?: string;
|
|
187
|
+
using?: {
|
|
188
|
+
ranges_list: IdNameAvatar[];
|
|
189
|
+
customer_orders_list: Customer[];
|
|
190
|
+
};
|
|
191
|
+
}
|
|
@@ -66,7 +66,7 @@ export interface SharableLaminatedDough {
|
|
|
66
66
|
}[];
|
|
67
67
|
error: boolean;
|
|
68
68
|
}
|
|
69
|
-
export interface
|
|
69
|
+
export interface SharableContent {
|
|
70
70
|
variants: {
|
|
71
71
|
country: string;
|
|
72
72
|
name: string;
|
|
@@ -91,7 +91,7 @@ export interface SharableRecipe {
|
|
|
91
91
|
category: RECIPECATEGORY;
|
|
92
92
|
prep_time?: number;
|
|
93
93
|
stock: number;
|
|
94
|
-
ingredients_list:
|
|
94
|
+
ingredients_list: SharableContent[];
|
|
95
95
|
laminated_dough?: SharableLaminatedDough;
|
|
96
96
|
costs: RecipeCost;
|
|
97
97
|
_id?: string;
|