@mydoormot/app-types 1.1.4 → 1.1.6
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/.turbo/turbo-build.log +6 -4
- package/CHANGELOG.md +12 -0
- package/dist/index.d.ts +103 -89
- package/dist/index.js +21 -0
- package/package.json +4 -3
- package/src/enterprise.ts +23 -1
- package/src/errand.ts +7 -48
- package/src/index.ts +8 -0
- package/src/rider.ts +44 -0
- package/src/user.ts +4 -13
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
yarn run v1.22.19
|
|
1
2
|
$ tsup src/index.ts --format cjs --dts
|
|
2
3
|
CLI Building entry: src/index.ts
|
|
3
4
|
CLI Using tsconfig: tsconfig.json
|
|
4
5
|
CLI tsup v7.2.0
|
|
5
6
|
CLI Target: node16
|
|
6
7
|
CJS Build start
|
|
7
|
-
CJS dist/index.js
|
|
8
|
-
CJS ⚡️ Build success in
|
|
8
|
+
CJS dist/index.js 5.41 KB
|
|
9
|
+
CJS ⚡️ Build success in 63ms
|
|
9
10
|
DTS Build start
|
|
10
|
-
DTS ⚡️ Build success in
|
|
11
|
-
DTS dist/index.d.ts 8.
|
|
11
|
+
DTS ⚡️ Build success in 1161ms
|
|
12
|
+
DTS dist/index.d.ts 8.85 KB
|
|
13
|
+
Done in 3.13s.
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -22,23 +22,14 @@ type User = {
|
|
|
22
22
|
updatedAt: string;
|
|
23
23
|
createdAt: string;
|
|
24
24
|
enterprise: string[];
|
|
25
|
+
authType: AuthType | `${AuthType}`;
|
|
26
|
+
version: number;
|
|
25
27
|
pushTokens?: string[];
|
|
26
28
|
avatarUrl?: string;
|
|
27
29
|
state?: string;
|
|
28
30
|
city?: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
address?: string;
|
|
32
|
-
placeId?: string;
|
|
33
|
-
};
|
|
34
|
-
workAddress?: {
|
|
35
|
-
coordinates?: number[];
|
|
36
|
-
address?: string;
|
|
37
|
-
placeId?: string;
|
|
38
|
-
};
|
|
39
|
-
googleToken?: string;
|
|
40
|
-
appleToken?: string;
|
|
41
|
-
authType?: AuthType | `${AuthType}`;
|
|
31
|
+
googleUserId?: string;
|
|
32
|
+
appleUserId?: string;
|
|
42
33
|
};
|
|
43
34
|
type UserAddress = {
|
|
44
35
|
user: string;
|
|
@@ -59,6 +50,27 @@ declare enum EnterpriseType {
|
|
|
59
50
|
Property = "property",
|
|
60
51
|
Store = "store"
|
|
61
52
|
}
|
|
53
|
+
type Enterprise = {
|
|
54
|
+
id: string;
|
|
55
|
+
user: string | User;
|
|
56
|
+
name: string;
|
|
57
|
+
city: string;
|
|
58
|
+
verified: boolean;
|
|
59
|
+
enterpriseType: EnterpriseType | `${EnterpriseType}`;
|
|
60
|
+
deleted: boolean;
|
|
61
|
+
updatedAt: Date;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
isActive: boolean;
|
|
64
|
+
version: number;
|
|
65
|
+
officeNumber?: string;
|
|
66
|
+
address?: {
|
|
67
|
+
coordinates?: number[];
|
|
68
|
+
address?: string;
|
|
69
|
+
};
|
|
70
|
+
image?: string;
|
|
71
|
+
coverImage?: string;
|
|
72
|
+
activationDate?: string;
|
|
73
|
+
};
|
|
62
74
|
|
|
63
75
|
declare enum InvoiceStatus {
|
|
64
76
|
Pending = "pending",
|
|
@@ -84,6 +96,73 @@ interface Invoice {
|
|
|
84
96
|
accessCode?: string;
|
|
85
97
|
}
|
|
86
98
|
|
|
99
|
+
type City = {
|
|
100
|
+
id: string;
|
|
101
|
+
state: string | State;
|
|
102
|
+
name: string;
|
|
103
|
+
slug: string;
|
|
104
|
+
location: {
|
|
105
|
+
coordinates: number[];
|
|
106
|
+
};
|
|
107
|
+
population: string;
|
|
108
|
+
populationProper: string;
|
|
109
|
+
updatedAt: Date;
|
|
110
|
+
createdAt: Date;
|
|
111
|
+
version: number;
|
|
112
|
+
isRiderActive: boolean;
|
|
113
|
+
isPropertyActive: boolean;
|
|
114
|
+
errandPrice?: number;
|
|
115
|
+
};
|
|
116
|
+
type State = {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
slug: string;
|
|
120
|
+
location: {
|
|
121
|
+
coordinates: number[];
|
|
122
|
+
};
|
|
123
|
+
alias: string;
|
|
124
|
+
updatedAt: Date;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
};
|
|
127
|
+
type LatLng = `${number},${number}`;
|
|
128
|
+
|
|
129
|
+
type Rider = {
|
|
130
|
+
id: string;
|
|
131
|
+
user: string | User;
|
|
132
|
+
city: string | City;
|
|
133
|
+
currLocation: {
|
|
134
|
+
coordinates: number[];
|
|
135
|
+
};
|
|
136
|
+
vehicle: string | Vehicle;
|
|
137
|
+
vehicleNumber: string;
|
|
138
|
+
verified: boolean;
|
|
139
|
+
active: boolean;
|
|
140
|
+
updatedAt: Date;
|
|
141
|
+
createdAt: Date;
|
|
142
|
+
rating: number;
|
|
143
|
+
version: number;
|
|
144
|
+
hasBeenRated: boolean;
|
|
145
|
+
enterprise: string | Enterprise;
|
|
146
|
+
isTracking: boolean;
|
|
147
|
+
state?: string | State;
|
|
148
|
+
currentErrand?: Errand;
|
|
149
|
+
lastDeliveredErrand?: Errand;
|
|
150
|
+
};
|
|
151
|
+
declare enum VehicleType {
|
|
152
|
+
Bike = "bike",
|
|
153
|
+
Shuttle = "shuttle"
|
|
154
|
+
}
|
|
155
|
+
type Vehicle = {
|
|
156
|
+
user: string;
|
|
157
|
+
vehicleNumber: string;
|
|
158
|
+
enterprise: string;
|
|
159
|
+
version: number;
|
|
160
|
+
createdAt: string;
|
|
161
|
+
updatedAt: string;
|
|
162
|
+
vehicleType: VehicleType | `${VehicleType}`;
|
|
163
|
+
rider?: string;
|
|
164
|
+
};
|
|
165
|
+
|
|
87
166
|
declare enum ErrandStatus {
|
|
88
167
|
Pending = "pending",
|
|
89
168
|
RiderAssigned = "rider-assigned",
|
|
@@ -152,7 +231,7 @@ interface PendingErrand {
|
|
|
152
231
|
interface Errand {
|
|
153
232
|
id: string;
|
|
154
233
|
rider: string | Rider;
|
|
155
|
-
customerId: string;
|
|
234
|
+
customerId: string | User;
|
|
156
235
|
nameOfItem: string;
|
|
157
236
|
pickupDetails: AddressDetails;
|
|
158
237
|
deliveryDetails: AddressDetails;
|
|
@@ -163,16 +242,18 @@ interface Errand {
|
|
|
163
242
|
refId: string;
|
|
164
243
|
authorizationUrl: string;
|
|
165
244
|
accessCode: string;
|
|
166
|
-
invoiceId?: string;
|
|
245
|
+
invoiceId?: string | Invoice;
|
|
167
246
|
};
|
|
168
247
|
aliasId: string;
|
|
169
248
|
errandTimeline: string | ErrandTimeline;
|
|
170
249
|
updatedAt: Date;
|
|
171
250
|
createdAt: Date;
|
|
172
|
-
errandRating?: string;
|
|
251
|
+
errandRating?: string | ErrandRating;
|
|
173
252
|
payOnDeliveryAmount?: string;
|
|
174
253
|
additionalData?: string;
|
|
175
254
|
deliveryDate?: Date;
|
|
255
|
+
city?: City;
|
|
256
|
+
price?: number;
|
|
176
257
|
}
|
|
177
258
|
interface AggragatedErrand extends Errand {
|
|
178
259
|
parcelSize: `${ParcelSize}`;
|
|
@@ -194,7 +275,6 @@ interface AggragatedErrand extends Errand {
|
|
|
194
275
|
stateCoords: number[];
|
|
195
276
|
};
|
|
196
277
|
riderUserDetails: User;
|
|
197
|
-
errandRatingDetails?: ErrandRating;
|
|
198
278
|
}
|
|
199
279
|
interface ErrandRating {
|
|
200
280
|
createdAt: string;
|
|
@@ -211,47 +291,6 @@ declare enum AddressTypes {
|
|
|
211
291
|
DeliveryAddress = "deliveryAddress",
|
|
212
292
|
PickupAddress = "pickupAddress"
|
|
213
293
|
}
|
|
214
|
-
interface Rider {
|
|
215
|
-
id: string;
|
|
216
|
-
_id: string;
|
|
217
|
-
user: string | User;
|
|
218
|
-
city: string;
|
|
219
|
-
currLocation?: {
|
|
220
|
-
coordinates: number[];
|
|
221
|
-
};
|
|
222
|
-
name?: string;
|
|
223
|
-
vehicle: string;
|
|
224
|
-
vehicleNumber: string;
|
|
225
|
-
verified: boolean;
|
|
226
|
-
active: boolean;
|
|
227
|
-
updatedAt: Date;
|
|
228
|
-
createdAt: Date;
|
|
229
|
-
rating?: number;
|
|
230
|
-
hasBeenRated: boolean;
|
|
231
|
-
enterprise: string;
|
|
232
|
-
isTracking: boolean;
|
|
233
|
-
}
|
|
234
|
-
interface ActiveRider {
|
|
235
|
-
_id: string;
|
|
236
|
-
user: string;
|
|
237
|
-
enterprise: string;
|
|
238
|
-
city: string;
|
|
239
|
-
verified: boolean;
|
|
240
|
-
currLocation: {
|
|
241
|
-
type: 'Point';
|
|
242
|
-
coordinates: [];
|
|
243
|
-
};
|
|
244
|
-
active: boolean;
|
|
245
|
-
vehicleNumber: string;
|
|
246
|
-
rating: number;
|
|
247
|
-
hasBeenRated: number;
|
|
248
|
-
createdAt: string;
|
|
249
|
-
updatedAt: string;
|
|
250
|
-
version: number;
|
|
251
|
-
numErrands: number;
|
|
252
|
-
available: boolean;
|
|
253
|
-
fullName: string;
|
|
254
|
-
}
|
|
255
294
|
declare enum DeliveryStatus {
|
|
256
295
|
Pending = "pending",
|
|
257
296
|
EnRoute = "en-route",
|
|
@@ -304,36 +343,6 @@ type AddressDetails = {
|
|
|
304
343
|
addressId?: string;
|
|
305
344
|
};
|
|
306
345
|
|
|
307
|
-
type City = {
|
|
308
|
-
id: string;
|
|
309
|
-
state: string | State;
|
|
310
|
-
name: string;
|
|
311
|
-
slug: string;
|
|
312
|
-
location: {
|
|
313
|
-
coordinates: number[];
|
|
314
|
-
};
|
|
315
|
-
population: string;
|
|
316
|
-
populationProper: string;
|
|
317
|
-
updatedAt: Date;
|
|
318
|
-
createdAt: Date;
|
|
319
|
-
version: number;
|
|
320
|
-
isRiderActive: boolean;
|
|
321
|
-
isPropertyActive: boolean;
|
|
322
|
-
errandPrice?: number;
|
|
323
|
-
};
|
|
324
|
-
type State = {
|
|
325
|
-
id: string;
|
|
326
|
-
name: string;
|
|
327
|
-
slug: string;
|
|
328
|
-
location: {
|
|
329
|
-
coordinates: number[];
|
|
330
|
-
};
|
|
331
|
-
alias: string;
|
|
332
|
-
updatedAt: Date;
|
|
333
|
-
createdAt: Date;
|
|
334
|
-
};
|
|
335
|
-
type LatLng = `${number},${number}`;
|
|
336
|
-
|
|
337
346
|
declare enum NotificationType {
|
|
338
347
|
Errand = "errand",
|
|
339
348
|
ErrandTimeline = "errand-timeline"
|
|
@@ -371,5 +380,10 @@ interface PaginateResult<T> {
|
|
|
371
380
|
meta?: any;
|
|
372
381
|
[customLabel: string]: T[] | number | boolean | null | undefined;
|
|
373
382
|
}
|
|
383
|
+
declare enum LinkDestination {
|
|
384
|
+
Website = "web",
|
|
385
|
+
MainApp = "mydoormot:app",
|
|
386
|
+
RiderApp = "mydoormot:rider"
|
|
387
|
+
}
|
|
374
388
|
|
|
375
|
-
export {
|
|
389
|
+
export { AddressDetails, AddressTypes, AggragatedErrand, AuthType, City, DeliveryStatus, Enterprise, EnterpriseType, Errand, ErrandRating, ErrandStatus, ErrandTimeline, Invoice, InvoiceStatus, LatLng, LinkDestination, Notification, NotificationData, NotificationType, PaginateResult, ParcelSize, PaymentOptions, PendingErrand, Rider, RoleType, State, User, UserAddress, Vehicle, errandTimeline };
|
package/dist/index.js
CHANGED
|
@@ -23,8 +23,10 @@ __export(src_exports, {
|
|
|
23
23
|
AddressTypes: () => AddressTypes,
|
|
24
24
|
AuthType: () => AuthType,
|
|
25
25
|
DeliveryStatus: () => DeliveryStatus,
|
|
26
|
+
EnterpriseType: () => EnterpriseType,
|
|
26
27
|
ErrandStatus: () => ErrandStatus,
|
|
27
28
|
InvoiceStatus: () => InvoiceStatus,
|
|
29
|
+
LinkDestination: () => LinkDestination,
|
|
28
30
|
NotificationType: () => NotificationType,
|
|
29
31
|
ParcelSize: () => ParcelSize,
|
|
30
32
|
PaymentOptions: () => PaymentOptions,
|
|
@@ -127,13 +129,32 @@ var NotificationType = /* @__PURE__ */ ((NotificationType2) => {
|
|
|
127
129
|
NotificationType2["ErrandTimeline"] = "errand-timeline";
|
|
128
130
|
return NotificationType2;
|
|
129
131
|
})(NotificationType || {});
|
|
132
|
+
|
|
133
|
+
// src/enterprise.ts
|
|
134
|
+
var EnterpriseType = /* @__PURE__ */ ((EnterpriseType2) => {
|
|
135
|
+
EnterpriseType2["Restaurant"] = "restaurant";
|
|
136
|
+
EnterpriseType2["Dispatch"] = "dispatch";
|
|
137
|
+
EnterpriseType2["Property"] = "property";
|
|
138
|
+
EnterpriseType2["Store"] = "store";
|
|
139
|
+
return EnterpriseType2;
|
|
140
|
+
})(EnterpriseType || {});
|
|
141
|
+
|
|
142
|
+
// src/index.ts
|
|
143
|
+
var LinkDestination = /* @__PURE__ */ ((LinkDestination2) => {
|
|
144
|
+
LinkDestination2["Website"] = "web";
|
|
145
|
+
LinkDestination2["MainApp"] = "mydoormot:app";
|
|
146
|
+
LinkDestination2["RiderApp"] = "mydoormot:rider";
|
|
147
|
+
return LinkDestination2;
|
|
148
|
+
})(LinkDestination || {});
|
|
130
149
|
// Annotate the CommonJS export names for ESM import in node:
|
|
131
150
|
0 && (module.exports = {
|
|
132
151
|
AddressTypes,
|
|
133
152
|
AuthType,
|
|
134
153
|
DeliveryStatus,
|
|
154
|
+
EnterpriseType,
|
|
135
155
|
ErrandStatus,
|
|
136
156
|
InvoiceStatus,
|
|
157
|
+
LinkDestination,
|
|
137
158
|
NotificationType,
|
|
138
159
|
ParcelSize,
|
|
139
160
|
PaymentOptions,
|
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mydoormot/app-types",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"mains": "./dist/index.js",
|
|
6
|
+
"typess": "./dist/index.d.ts",
|
|
7
|
+
"main": "./src/index.ts",
|
|
7
8
|
"scripts": {
|
|
8
9
|
"clean": "del ./build/*",
|
|
9
10
|
"build": "tsup src/index.ts --format cjs --dts"
|
package/src/enterprise.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { User } from './user';
|
|
2
2
|
|
|
3
3
|
export enum EnterpriseType {
|
|
4
4
|
Restaurant = 'restaurant',
|
|
@@ -6,3 +6,25 @@ export enum EnterpriseType {
|
|
|
6
6
|
Property = 'property',
|
|
7
7
|
Store = 'store',
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
export type Enterprise = {
|
|
11
|
+
id: string;
|
|
12
|
+
user: string | User;
|
|
13
|
+
name: string;
|
|
14
|
+
city: string;
|
|
15
|
+
verified: boolean;
|
|
16
|
+
enterpriseType: EnterpriseType | `${EnterpriseType}`;
|
|
17
|
+
deleted: boolean;
|
|
18
|
+
updatedAt: Date;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
isActive: boolean;
|
|
21
|
+
version: number;
|
|
22
|
+
officeNumber?: string;
|
|
23
|
+
address?: {
|
|
24
|
+
coordinates?: number[];
|
|
25
|
+
address?: string;
|
|
26
|
+
};
|
|
27
|
+
image?: string;
|
|
28
|
+
coverImage?: string;
|
|
29
|
+
activationDate?: string;
|
|
30
|
+
};
|
package/src/errand.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Invoice, InvoiceStatus } from './invoice';
|
|
2
|
+
import { City } from './location';
|
|
3
|
+
import { Rider } from './rider';
|
|
2
4
|
import { User } from './user';
|
|
3
5
|
|
|
4
6
|
export enum ErrandStatus {
|
|
@@ -102,7 +104,7 @@ export interface PendingErrand {
|
|
|
102
104
|
export interface Errand {
|
|
103
105
|
id: string;
|
|
104
106
|
rider: string | Rider;
|
|
105
|
-
customerId: string;
|
|
107
|
+
customerId: string | User;
|
|
106
108
|
nameOfItem: string;
|
|
107
109
|
pickupDetails: AddressDetails;
|
|
108
110
|
deliveryDetails: AddressDetails;
|
|
@@ -113,17 +115,18 @@ export interface Errand {
|
|
|
113
115
|
refId: string;
|
|
114
116
|
authorizationUrl: string;
|
|
115
117
|
accessCode: string;
|
|
116
|
-
invoiceId?: string;
|
|
118
|
+
invoiceId?: string | Invoice;
|
|
117
119
|
};
|
|
118
120
|
aliasId: string;
|
|
119
121
|
errandTimeline: string | ErrandTimeline;
|
|
120
122
|
updatedAt: Date;
|
|
121
123
|
createdAt: Date;
|
|
122
|
-
|
|
123
|
-
errandRating?: string;
|
|
124
|
+
errandRating?: string | ErrandRating;
|
|
124
125
|
payOnDeliveryAmount?: string;
|
|
125
126
|
additionalData?: string;
|
|
126
127
|
deliveryDate?: Date;
|
|
128
|
+
city?: City;
|
|
129
|
+
price?: number;
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
export interface AggragatedErrand extends Errand {
|
|
@@ -146,7 +149,6 @@ export interface AggragatedErrand extends Errand {
|
|
|
146
149
|
stateCoords: number[];
|
|
147
150
|
};
|
|
148
151
|
riderUserDetails: User;
|
|
149
|
-
errandRatingDetails?: ErrandRating;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
export interface ErrandTimeline {
|
|
@@ -181,49 +183,6 @@ export enum AddressTypes {
|
|
|
181
183
|
PickupAddress = 'pickupAddress',
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
export interface Rider {
|
|
185
|
-
id: string;
|
|
186
|
-
_id: string;
|
|
187
|
-
user: string | User;
|
|
188
|
-
city: string;
|
|
189
|
-
currLocation?: {
|
|
190
|
-
coordinates: number[];
|
|
191
|
-
};
|
|
192
|
-
name?: string;
|
|
193
|
-
vehicle: string;
|
|
194
|
-
vehicleNumber: string;
|
|
195
|
-
verified: boolean;
|
|
196
|
-
active: boolean;
|
|
197
|
-
updatedAt: Date;
|
|
198
|
-
createdAt: Date;
|
|
199
|
-
rating?: number;
|
|
200
|
-
hasBeenRated: boolean; // NOTE: This tells app if the rider has an existing rating
|
|
201
|
-
enterprise: string;
|
|
202
|
-
isTracking: boolean;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
export interface ActiveRider {
|
|
206
|
-
_id: string;
|
|
207
|
-
user: string;
|
|
208
|
-
enterprise: string;
|
|
209
|
-
city: string;
|
|
210
|
-
verified: boolean;
|
|
211
|
-
currLocation: {
|
|
212
|
-
type: 'Point';
|
|
213
|
-
coordinates: [];
|
|
214
|
-
};
|
|
215
|
-
active: boolean;
|
|
216
|
-
vehicleNumber: string;
|
|
217
|
-
rating: number;
|
|
218
|
-
hasBeenRated: number;
|
|
219
|
-
createdAt: string;
|
|
220
|
-
updatedAt: string;
|
|
221
|
-
version: number;
|
|
222
|
-
numErrands: number;
|
|
223
|
-
available: boolean;
|
|
224
|
-
fullName: string;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
186
|
export enum DeliveryStatus {
|
|
228
187
|
Pending = 'pending',
|
|
229
188
|
EnRoute = 'en-route',
|
package/src/index.ts
CHANGED
|
@@ -14,8 +14,16 @@ export interface PaginateResult<T> {
|
|
|
14
14
|
[customLabel: string]: T[] | number | boolean | null | undefined;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export enum LinkDestination {
|
|
18
|
+
Website = 'web',
|
|
19
|
+
MainApp = 'mydoormot:app',
|
|
20
|
+
RiderApp = 'mydoormot:rider',
|
|
21
|
+
}
|
|
22
|
+
|
|
17
23
|
export * from './user';
|
|
18
24
|
export * from './errand';
|
|
19
25
|
export * from './location';
|
|
20
26
|
export * from './invoice';
|
|
21
27
|
export * from './notification';
|
|
28
|
+
export * from './rider';
|
|
29
|
+
export * from './enterprise';
|
package/src/rider.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Enterprise } from './enterprise';
|
|
2
|
+
import { Errand } from './errand';
|
|
3
|
+
import { City, State } from './location';
|
|
4
|
+
import { User } from './user';
|
|
5
|
+
|
|
6
|
+
export type Rider = {
|
|
7
|
+
id: string;
|
|
8
|
+
user: string | User;
|
|
9
|
+
city: string | City;
|
|
10
|
+
currLocation: {
|
|
11
|
+
coordinates: number[];
|
|
12
|
+
};
|
|
13
|
+
vehicle: string | Vehicle;
|
|
14
|
+
vehicleNumber: string;
|
|
15
|
+
verified: boolean;
|
|
16
|
+
active: boolean;
|
|
17
|
+
updatedAt: Date;
|
|
18
|
+
createdAt: Date;
|
|
19
|
+
rating: number;
|
|
20
|
+
version: number;
|
|
21
|
+
hasBeenRated: boolean;
|
|
22
|
+
enterprise: string | Enterprise;
|
|
23
|
+
isTracking: boolean;
|
|
24
|
+
|
|
25
|
+
state?: string | State;
|
|
26
|
+
currentErrand?: Errand;
|
|
27
|
+
lastDeliveredErrand?: Errand;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
enum VehicleType {
|
|
31
|
+
Bike = 'bike',
|
|
32
|
+
Shuttle = 'shuttle',
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Vehicle = {
|
|
36
|
+
user: string;
|
|
37
|
+
vehicleNumber: string;
|
|
38
|
+
enterprise: string;
|
|
39
|
+
version: number;
|
|
40
|
+
createdAt: string;
|
|
41
|
+
updatedAt: string;
|
|
42
|
+
vehicleType: VehicleType | `${VehicleType}`;
|
|
43
|
+
rider?: string;
|
|
44
|
+
};
|
package/src/user.ts
CHANGED
|
@@ -24,23 +24,14 @@ export type User = {
|
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
createdAt: string;
|
|
26
26
|
enterprise: string[];
|
|
27
|
+
authType: AuthType | `${AuthType}`;
|
|
28
|
+
version: number;
|
|
27
29
|
pushTokens?: string[];
|
|
28
30
|
avatarUrl?: string;
|
|
29
31
|
state?: string;
|
|
30
32
|
city?: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
address?: string;
|
|
34
|
-
placeId?: string;
|
|
35
|
-
};
|
|
36
|
-
workAddress?: {
|
|
37
|
-
coordinates?: number[];
|
|
38
|
-
address?: string;
|
|
39
|
-
placeId?: string;
|
|
40
|
-
};
|
|
41
|
-
googleToken?: string;
|
|
42
|
-
appleToken?: string;
|
|
43
|
-
authType?: AuthType | `${AuthType}`;
|
|
33
|
+
googleUserId?: string;
|
|
34
|
+
appleUserId?: string;
|
|
44
35
|
};
|
|
45
36
|
|
|
46
37
|
export type UserAddress = {
|