@community-kitchens/apiinterfaces 1.0.20 → 1.0.22

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/homeChef/types.ts CHANGED
@@ -1,4 +1,8 @@
1
- import { Job, VolunteerShift, VolunteerHours } from "../volunteer/types";
1
+ import {
2
+ Job,
3
+ VolunteerShift,
4
+ VolunteerHours,
5
+ } from "../volunteer/jobsAndShifts";
2
6
 
3
7
  export interface NotificationPayload {
4
8
  title: string;
package/index.ts CHANGED
@@ -3,6 +3,6 @@ export * from "./d4j/types";
3
3
  export * from "./form/formTypes";
4
4
  export * from "./mealProgram/types";
5
5
  export * from "./text/types";
6
- export * from "./volunteer/types";
6
+ export * from "./volunteer";
7
7
  export * from "./homeChef/types";
8
8
  export * from "./sign/types";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-kitchens/apiinterfaces",
3
- "version": "1.0.20",
3
+ "version": "1.0.22",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -0,0 +1,13 @@
1
+ export type Campaign = {
2
+ mealsDonated: number;
3
+ };
4
+
5
+ export interface VolunteerCampaign {
6
+ name: string;
7
+ startDate?: string;
8
+ endDate?: string;
9
+ description?: string;
10
+ id: string;
11
+ shortDescription?: string;
12
+ totalHours?: number;
13
+ }
@@ -0,0 +1,32 @@
1
+ export interface VolunteerForCheckIn {
2
+ hoursId: string;
3
+ contactId: string;
4
+ firstName?: string;
5
+ lastName: string;
6
+ email?: string;
7
+ volunteerAgreement: boolean;
8
+ status: string;
9
+ }
10
+
11
+ export interface ShiftForCheckIn {
12
+ id: string;
13
+ jobName: string;
14
+ startTime: string;
15
+ duration: number;
16
+ }
17
+
18
+ export interface JobForCheckIn {
19
+ name: string;
20
+ shifts: string[];
21
+ id: string;
22
+ }
23
+
24
+ export interface CheckInArgs {
25
+ hoursId: string;
26
+ duration: number;
27
+ }
28
+
29
+ export type CheckInShiftsResponse = {
30
+ jobs: Record<string, JobForCheckIn>;
31
+ shifts: Record<string, ShiftForCheckIn>;
32
+ };
@@ -0,0 +1,22 @@
1
+ export interface Volunteer {
2
+ householdId: string;
3
+ name?: string;
4
+ id: string;
5
+ portalUsername?: string;
6
+ firstName?: string;
7
+ volunteerAgreement: boolean;
8
+ email: string;
9
+ calfreshVolunteer?: boolean;
10
+ }
11
+
12
+ export interface CreateVolunteerArgs {
13
+ email: string;
14
+ firstName: string;
15
+ lastName: string;
16
+ calfreshVolunteer?: boolean;
17
+ }
18
+
19
+ export interface UploadDocArgs {
20
+ file: File;
21
+ date: string;
22
+ }
@@ -0,0 +1,27 @@
1
+ import { Job } from "./jobsAndShifts";
2
+
3
+ export type CarSize = "Small" | "Medium" | "Large" | "Bike";
4
+
5
+ export interface DriverInfo {
6
+ licenseExpiration?: string;
7
+ insuranceExpiration?: string;
8
+ volunteerAgreement: boolean;
9
+ car: CarInfo;
10
+ driverStatus?: "Active" | "Inactive";
11
+ }
12
+
13
+ export interface CarInfo {
14
+ size?: CarSize;
15
+ make?: string;
16
+ model?: string;
17
+ year?: string;
18
+ color?: string;
19
+ }
20
+
21
+ export interface DriverJob extends Job {
22
+ carSizeRequired: CarSize;
23
+ destination: string;
24
+ dropoffNotes: string;
25
+ distance: number;
26
+ timeRequired?: number;
27
+ }
@@ -0,0 +1,37 @@
1
+ export interface CancelVolunteerHoursArgs {
2
+ hoursId: string;
3
+ contactId?: string;
4
+ }
5
+
6
+ export interface GetVolunteerHoursArgs {
7
+ campaignId: string;
8
+ contactId: string;
9
+ }
10
+
11
+ export interface VolunteerHours {
12
+ id: string;
13
+ mealCount?: string;
14
+ time: string;
15
+ job: string;
16
+ status: string;
17
+ shift: string;
18
+ campaign?: string;
19
+ mealType?: "Entree" | "Soup";
20
+ }
21
+
22
+ export interface EditHoursArgs {
23
+ id: string;
24
+ mealCount: string;
25
+ cancel: boolean;
26
+ date: string;
27
+ fridge: string;
28
+ mealType: "Soup" | "Entree";
29
+ }
30
+
31
+ export interface CreateVolunteerHoursArgs {
32
+ shiftId: string;
33
+ jobId: string;
34
+ date: string;
35
+ contactSalesforceId: string;
36
+ reserved?: boolean;
37
+ }
@@ -0,0 +1,6 @@
1
+ export * from "./campaign";
2
+ export * from "./checkin";
3
+ export * from "./contact";
4
+ export * from "./driver";
5
+ export * from "./hours";
6
+ export * from "./jobsAndShifts";
@@ -0,0 +1,40 @@
1
+ export interface VolunteerShift {
2
+ id: string;
3
+ startTime: string;
4
+ open: boolean;
5
+ job: string;
6
+ restaurantMeals?: boolean;
7
+ duration: number;
8
+ // endTime: string;
9
+ slots: number;
10
+ reservedOpen?: boolean;
11
+ totalSlots?: number;
12
+ }
13
+
14
+ export type FridgeRegion =
15
+ | "East Oakland"
16
+ | "West Oakland"
17
+ | "Berkeley"
18
+ | "CK Kitchen";
19
+
20
+ export interface Job {
21
+ id: string;
22
+ name: string;
23
+ location?: string;
24
+ locationInfo?: string;
25
+ locationCity?: string;
26
+ shifts: VolunteerShift[];
27
+ active: boolean;
28
+ ongoing: boolean;
29
+ description?: string;
30
+ campaign: string;
31
+ region?: FridgeRegion;
32
+ notes?: string;
33
+ photo?: string;
34
+ noTextAlert?: boolean;
35
+ }
36
+
37
+ export interface GetShiftsResponse {
38
+ jobs: Job[];
39
+ shifts: VolunteerShift[];
40
+ }
@@ -1,172 +0,0 @@
1
- export interface VolunteerForCheckIn {
2
- hoursId: string;
3
- contactId: string;
4
- firstName?: string;
5
- lastName: string;
6
- email?: string;
7
- volunteerAgreement: boolean;
8
- status: string;
9
- }
10
-
11
- export interface ShiftForCheckIn {
12
- id: string;
13
- jobName: string;
14
- startTime: string;
15
- duration: number;
16
- }
17
-
18
- export interface JobForCheckIn {
19
- name: string;
20
- shifts: string[];
21
- id: string;
22
- }
23
-
24
- export interface CheckInArgs {
25
- hoursId: string;
26
- duration: number;
27
- }
28
-
29
- export type CheckInShiftsResponse = {
30
- jobs: Record<string, JobForCheckIn>;
31
- shifts: Record<string, ShiftForCheckIn>;
32
- };
33
-
34
- export type CarSize = "Small" | "Medium" | "Large" | "Bike";
35
-
36
- export interface DriverInfo {
37
- licenseExpiration?: string;
38
- insuranceExpiration?: string;
39
- volunteerAgreement: boolean;
40
- car: CarInfo;
41
- driverStatus?: "Active" | "Inactive";
42
- }
43
-
44
- export interface CarInfo {
45
- size?: CarSize;
46
- make?: string;
47
- model?: string;
48
- year?: string;
49
- color?: string;
50
- }
51
-
52
- export interface UploadDocArgs {
53
- file: File;
54
- date: string;
55
- }
56
-
57
- export type Campaign = {
58
- mealsDonated: number;
59
- };
60
-
61
- export interface VolunteerShift {
62
- id: string;
63
- startTime: string;
64
- open: boolean;
65
- job: string;
66
- restaurantMeals?: boolean;
67
- duration: number;
68
- // endTime: string;
69
- slots: number;
70
- reservedOpen?: boolean;
71
- totalSlots?: number;
72
- }
73
-
74
- export type FridgeRegion =
75
- | "East Oakland"
76
- | "West Oakland"
77
- | "Berkeley"
78
- | "CK Kitchen";
79
-
80
- export interface Job {
81
- id: string;
82
- name: string;
83
- location?: string;
84
- locationInfo?: string;
85
- locationCity?: string;
86
- shifts: VolunteerShift[];
87
- active: boolean;
88
- ongoing: boolean;
89
- description?: string;
90
- campaign: string;
91
- region?: FridgeRegion;
92
- notes?: string;
93
- photo?: string;
94
- noTextAlert?: boolean;
95
- }
96
-
97
- export interface DriverJob extends Job {
98
- carSizeRequired: CarSize;
99
- destination: string;
100
- dropoffNotes: string;
101
- distance: number;
102
- timeRequired?: number;
103
- }
104
-
105
- export interface GetShiftsResponse {
106
- jobs: Job[];
107
- shifts: VolunteerShift[];
108
- }
109
-
110
- export interface VolunteerCampaign {
111
- name: string;
112
- startDate?: string;
113
- endDate?: string;
114
- description?: string;
115
- id: string;
116
- shortDescription?: string;
117
- }
118
-
119
- export interface VolunteerHours {
120
- id: string;
121
- mealCount?: string;
122
- time: string;
123
- job: string;
124
- status: string;
125
- shift: string;
126
- campaign?: string;
127
- mealType?: "Entree" | "Soup";
128
- }
129
-
130
- export interface EditHoursArgs {
131
- id: string;
132
- mealCount: string;
133
- cancel: boolean;
134
- date: string;
135
- fridge: string;
136
- mealType: "Soup" | "Entree";
137
- }
138
-
139
- export interface CreateVolunteerHoursArgs {
140
- shiftId: string;
141
- jobId: string;
142
- date: string;
143
- contactSalesforceId: string;
144
- reserved?: boolean;
145
- }
146
-
147
- export interface Volunteer {
148
- householdId: string;
149
- name?: string;
150
- id: string;
151
- portalUsername?: string;
152
- firstName?: string;
153
- volunteerAgreement: boolean;
154
- email: string;
155
- calfreshVolunteer?: boolean;
156
- }
157
-
158
- export interface CreateVolunteerArgs {
159
- email: string;
160
- firstName: string;
161
- lastName: string;
162
- }
163
-
164
- export interface CancelVolunteerHoursArgs {
165
- hoursId: string;
166
- contactId?: string;
167
- }
168
-
169
- export interface GetVolunteerHoursArgs {
170
- campaignId: string;
171
- contactId: string;
172
- }