@community-kitchens/apiinterfaces 1.0.2 → 1.0.3

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.
@@ -0,0 +1,103 @@
1
+ import { Job, Shift, VolunteerHours } from "../types";
2
+
3
+ export interface AppNotification {
4
+ payload: { title: string; body: string };
5
+ app: string;
6
+ date: string;
7
+ id: string;
8
+ }
9
+
10
+ export interface NewAppNotificationArgs {
11
+ title: string;
12
+ message: string;
13
+ screen?: string;
14
+ subScreen?: string;
15
+ params?: Record<string, string>;
16
+ }
17
+
18
+ export interface HomeChefJob extends Omit<Job, "shifts"> {
19
+ shifts: string[];
20
+ }
21
+
22
+ export interface JobShiftsState {
23
+ shifts: Record<string, Shift>;
24
+ jobs: Job[];
25
+ }
26
+
27
+ export interface SignUpForHomeChefShiftArgs {
28
+ shiftId: string;
29
+ mealCount: string;
30
+ jobId: string;
31
+ date: string;
32
+ soup: boolean;
33
+ }
34
+
35
+ export interface RecipeItem {
36
+ header: string;
37
+ text: string[];
38
+ }
39
+
40
+ export interface Recipe {
41
+ id: string;
42
+ name: string;
43
+ ingredients: RecipeItem[];
44
+ instructions: RecipeItem[];
45
+ category: string;
46
+ description: string[] | string;
47
+ image: string;
48
+ author: string;
49
+ }
50
+
51
+ export type EditRecipeArgs = CreateRecipeArgs & { id: string };
52
+
53
+ export type RecipeState = Record<string, Recipe>;
54
+
55
+ export interface CreateRecipeArgs {
56
+ name: string;
57
+ ingredients: string;
58
+ instructions: string;
59
+ description: string;
60
+ category: string;
61
+ photo?: File;
62
+ author?: string;
63
+ }
64
+
65
+ export interface HomeChefQuizQuestion {
66
+ question: string;
67
+ answers: string[];
68
+ }
69
+
70
+ export interface HomeChefQuizAnswer {
71
+ index: number;
72
+ answer: number;
73
+ }
74
+
75
+ export interface HomeChefQuizResponse {
76
+ passed: boolean;
77
+ score: number;
78
+ wrongAnswers: number[];
79
+ rightAnswers?: string[];
80
+ }
81
+
82
+ export interface SupplyOrderInfo {
83
+ containers: number;
84
+ labels: number;
85
+ soup: number;
86
+ sandwich: number;
87
+ }
88
+
89
+ export interface SupplyOrder {
90
+ items: SupplyOrderInfo;
91
+ date: string;
92
+ fulfilled: boolean;
93
+ contact: { firstName: string; lastName: string; email: string };
94
+ id: string;
95
+ }
96
+
97
+ export type VolunteerHoursState = Record<string, VolunteerHours>;
98
+
99
+ export interface SendInviteArgs {
100
+ recipients: string[];
101
+ message: string;
102
+ subject: string;
103
+ }
package/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from "./form/formTypes";
4
4
  export * from "./mealProgram/types";
5
5
  export * from "./text/types";
6
6
  export * from "./volunteer/types";
7
+ export * from "./homeChef/types";
@@ -179,3 +179,46 @@ export interface PerformanceMeasures {
179
179
  }
180
180
 
181
181
  export type Language = "English" | "Spanish" | "Chinese";
182
+
183
+ export interface ClientMeal {
184
+ client: Client | null;
185
+ date: string;
186
+ id: string;
187
+ amount: number;
188
+ logged: boolean;
189
+ }
190
+
191
+ export type AddMealsArgs =
192
+ | {
193
+ meals: number;
194
+ clientId: string;
195
+ }
196
+ | {
197
+ meals: number;
198
+ clientId: string;
199
+ findByCCode: boolean;
200
+ date: string;
201
+ };
202
+
203
+ export interface GetClientMealsResponse {
204
+ clientMeals: ClientMeal[];
205
+ client: Client;
206
+ }
207
+
208
+ export interface Client {
209
+ id: string;
210
+ cCode?: string;
211
+ barcode: string[];
212
+ cCodeIncorrect?: boolean;
213
+ }
214
+
215
+ export type MonthlyReportResponse = Record<
216
+ string,
217
+ { meals: number; visits: number }
218
+ > | null;
219
+
220
+ export interface MonthlyReportArgs {
221
+ startDate: string;
222
+ endDate: string;
223
+ sunMonOnly?: boolean;
224
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-kitchens/apiinterfaces",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",