hububb-saas-shared 1.1.2 → 1.1.5

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.
@@ -1,6 +1,7 @@
1
1
  export declare enum ServiceType {
2
- ON_DEMAND = "FULL",
3
- SUBSCRIPTION = "PRORATED"
2
+ INTEGRATION = "INTEGRATION",
3
+ ON_DEMAND = "ON_DEMAND",
4
+ RECURRING = "RECURRING"
4
5
  }
5
6
  export declare enum TaskStatus {
6
7
  PENDING = "PENDING",
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SubscriptionStatus = exports.PurchaseStatus = exports.PriceType = exports.InvoiceStatus = exports.InvoiceType = exports.TaskPriority = exports.TaskStatus = exports.ServiceType = void 0;
4
4
  var ServiceType;
5
5
  (function (ServiceType) {
6
- ServiceType["ON_DEMAND"] = "FULL";
7
- ServiceType["SUBSCRIPTION"] = "PRORATED";
6
+ ServiceType["INTEGRATION"] = "INTEGRATION";
7
+ ServiceType["ON_DEMAND"] = "ON_DEMAND";
8
+ ServiceType["RECURRING"] = "RECURRING";
8
9
  })(ServiceType || (exports.ServiceType = ServiceType = {}));
9
10
  var TaskStatus;
10
11
  (function (TaskStatus) {
@@ -48,3 +48,4 @@ export * from "./service-provider";
48
48
  export * from "./service-worker";
49
49
  export * from "./task-requirement";
50
50
  export * from "./task-requirement-photo";
51
+ export * from "./task-thread";
@@ -64,3 +64,4 @@ __exportStar(require("./service-provider"), exports);
64
64
  __exportStar(require("./service-worker"), exports);
65
65
  __exportStar(require("./task-requirement"), exports);
66
66
  __exportStar(require("./task-requirement-photo"), exports);
67
+ __exportStar(require("./task-thread"), exports);
@@ -251,10 +251,10 @@ export declare const updatePropertySchema: z.ZodObject<{
251
251
  type: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AIRBNB", "BOOKING_COM"]>>>;
252
252
  }, "strip", z.ZodTypeAny, {
253
253
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
254
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
254
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
255
255
  }, {
256
256
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
257
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
257
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
258
258
  }>, "many">>;
259
259
  }, "strip", z.ZodTypeAny, {
260
260
  address?: {
@@ -320,7 +320,7 @@ export declare const updatePropertySchema: z.ZodObject<{
320
320
  }[] | undefined;
321
321
  connectionRequests?: {
322
322
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
323
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
323
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
324
324
  }[] | undefined;
325
325
  }, {
326
326
  address?: {
@@ -386,6 +386,6 @@ export declare const updatePropertySchema: z.ZodObject<{
386
386
  }[] | undefined;
387
387
  connectionRequests?: {
388
388
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
389
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
389
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
390
390
  }[] | undefined;
391
391
  }>;
@@ -12,12 +12,12 @@ export declare const propertyConnectionRequestSchema: z.ZodObject<{
12
12
  updatedAt: Date;
13
13
  propertyId: number;
14
14
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
15
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
15
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
16
16
  }, {
17
17
  id: number;
18
18
  createdAt: Date;
19
19
  updatedAt: Date;
20
20
  propertyId: number;
21
21
  type?: "AIRBNB" | "BOOKING_COM" | null | undefined;
22
- status?: "PENDING" | "COMPLETED" | "IN_PROGRESS" | "REJECTED" | null | undefined;
22
+ status?: "PENDING" | "IN_PROGRESS" | "COMPLETED" | "REJECTED" | null | undefined;
23
23
  }>;
@@ -13,6 +13,14 @@ export declare const taskSchema: import("zod").ZodObject<{
13
13
  propertyId: import("zod").ZodNumber;
14
14
  paymentStatus: import("zod").ZodUnion<[import("zod").ZodUnion<[import("zod").ZodLiteral<"PENDING">, import("zod").ZodLiteral<"PAID">]>, import("zod").ZodLiteral<"FAILED">]>;
15
15
  assignedWorkerId: import("zod").ZodOptional<import("zod").ZodNumber>;
16
+ startedAt: import("zod").ZodOptional<import("zod").ZodDate>;
17
+ completedAt: import("zod").ZodOptional<import("zod").ZodDate>;
18
+ confirmedAt: import("zod").ZodOptional<import("zod").ZodDate>;
19
+ startedBy: import("zod").ZodOptional<import("zod").ZodString>;
20
+ completedBy: import("zod").ZodOptional<import("zod").ZodString>;
21
+ confirmedBy: import("zod").ZodOptional<import("zod").ZodString>;
22
+ cancelledAt: import("zod").ZodOptional<import("zod").ZodDate>;
23
+ cancelledBy: import("zod").ZodOptional<import("zod").ZodString>;
16
24
  }, "strip", import("zod").ZodTypeAny, {
17
25
  id: number;
18
26
  priority: TaskPriority;
@@ -27,6 +35,14 @@ export declare const taskSchema: import("zod").ZodObject<{
27
35
  paymentStatus: "PENDING" | "PAID" | "FAILED";
28
36
  description?: string | undefined;
29
37
  assignedWorkerId?: number | undefined;
38
+ startedAt?: Date | undefined;
39
+ completedAt?: Date | undefined;
40
+ confirmedAt?: Date | undefined;
41
+ startedBy?: string | undefined;
42
+ completedBy?: string | undefined;
43
+ confirmedBy?: string | undefined;
44
+ cancelledAt?: Date | undefined;
45
+ cancelledBy?: string | undefined;
30
46
  }, {
31
47
  id: number;
32
48
  priority: TaskPriority;
@@ -41,4 +57,12 @@ export declare const taskSchema: import("zod").ZodObject<{
41
57
  paymentStatus: "PENDING" | "PAID" | "FAILED";
42
58
  description?: string | undefined;
43
59
  assignedWorkerId?: number | undefined;
60
+ startedAt?: Date | undefined;
61
+ completedAt?: Date | undefined;
62
+ confirmedAt?: Date | undefined;
63
+ startedBy?: string | undefined;
64
+ completedBy?: string | undefined;
65
+ confirmedBy?: string | undefined;
66
+ cancelledAt?: Date | undefined;
67
+ cancelledBy?: string | undefined;
44
68
  }>;
@@ -17,4 +17,12 @@ exports.taskSchema = (0, zod_1.object)({
17
17
  propertyId: (0, zod_1.number)().int(),
18
18
  paymentStatus: (0, zod_1.literal)("PENDING").or((0, zod_1.literal)("PAID")).or((0, zod_1.literal)("FAILED")),
19
19
  assignedWorkerId: (0, zod_1.number)().int().optional(),
20
+ startedAt: (0, zod_1.date)().optional(),
21
+ completedAt: (0, zod_1.date)().optional(),
22
+ confirmedAt: (0, zod_1.date)().optional(),
23
+ startedBy: (0, zod_1.string)().optional(),
24
+ completedBy: (0, zod_1.string)().optional(),
25
+ confirmedBy: (0, zod_1.string)().optional(),
26
+ cancelledAt: (0, zod_1.date)().optional(),
27
+ cancelledBy: (0, zod_1.string)().optional(),
20
28
  });
@@ -0,0 +1,282 @@
1
+ export declare const taskCommentSchema: import("zod").ZodObject<{
2
+ id: import("zod").ZodOptional<import("zod").ZodString>;
3
+ taskId: import("zod").ZodOptional<import("zod").ZodString>;
4
+ content: import("zod").ZodOptional<import("zod").ZodString>;
5
+ createdAt: import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>;
6
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
7
+ author: import("zod").ZodObject<Pick<{
8
+ id: import("zod").ZodString;
9
+ name: import("zod").ZodString;
10
+ email: import("zod").ZodString;
11
+ createdAt: import("zod").ZodDate;
12
+ updatedAt: import("zod").ZodDate;
13
+ tierId: import("zod").ZodNumber;
14
+ firstName: import("zod").ZodString;
15
+ lastName: import("zod").ZodString;
16
+ phone: import("zod").ZodString;
17
+ photoUrl: import("zod").ZodOptional<import("zod").ZodString>;
18
+ isOnboardingCompleted: import("zod").ZodBoolean;
19
+ userRoleId: import("zod").ZodNumber;
20
+ stripeCustomerId: import("zod").ZodOptional<import("zod").ZodString>;
21
+ onboardingStep: import("zod").ZodNumber;
22
+ onboardingType: import("zod").ZodUnion<[import("zod").ZodLiteral<"AIRBNB_CONNECT">, import("zod").ZodLiteral<"MANUAL_LISTING">]>;
23
+ hasFullAccess: import("zod").ZodOptional<import("zod").ZodBoolean>;
24
+ hasCompletedTour: import("zod").ZodOptional<import("zod").ZodBoolean>;
25
+ position: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"bookkeper">, import("zod").ZodLiteral<"customer-experience">, import("zod").ZodLiteral<"customer-experience-head">, import("zod").ZodLiteral<"guest-coordinator">, import("zod").ZodLiteral<"guest-coordinator-head">, import("zod").ZodLiteral<"property-manager">, import("zod").ZodLiteral<"property-manager-head">, import("zod").ZodLiteral<"account-manager">, import("zod").ZodLiteral<"account-manager-head">, import("zod").ZodLiteral<"developer">, import("zod").ZodLiteral<"finance">, import("zod").ZodLiteral<"finance-head">, import("zod").ZodLiteral<"marketing">, import("zod").ZodLiteral<"marketing-head">, import("zod").ZodLiteral<"product">, import("zod").ZodLiteral<"product-head">]>>;
26
+ }, "name" | "id" | "email" | "firstName" | "lastName" | "phone" | "photoUrl" | "userRoleId">, "strip", import("zod").ZodTypeAny, {
27
+ name: string;
28
+ id: string;
29
+ email: string;
30
+ firstName: string;
31
+ lastName: string;
32
+ phone: string;
33
+ userRoleId: number;
34
+ photoUrl?: string | undefined;
35
+ }, {
36
+ name: string;
37
+ id: string;
38
+ email: string;
39
+ firstName: string;
40
+ lastName: string;
41
+ phone: string;
42
+ userRoleId: number;
43
+ photoUrl?: string | undefined;
44
+ }>;
45
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"message">, import("zod").ZodLiteral<"attachment">]>;
46
+ attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
47
+ url: import("zod").ZodString;
48
+ ref: import("zod").ZodString;
49
+ name: import("zod").ZodString;
50
+ }, "strip", import("zod").ZodTypeAny, {
51
+ name: string;
52
+ url: string;
53
+ ref: string;
54
+ }, {
55
+ name: string;
56
+ url: string;
57
+ ref: string;
58
+ }>, "many">>;
59
+ source: import("zod").ZodOptional<import("zod").ZodString>;
60
+ }, "strip", import("zod").ZodTypeAny, {
61
+ type: "attachment" | "message";
62
+ createdAt: import("../../helpers").Timestamp;
63
+ author: {
64
+ name: string;
65
+ id: string;
66
+ email: string;
67
+ firstName: string;
68
+ lastName: string;
69
+ phone: string;
70
+ userRoleId: number;
71
+ photoUrl?: string | undefined;
72
+ };
73
+ id?: string | undefined;
74
+ source?: string | undefined;
75
+ content?: string | undefined;
76
+ attachments?: {
77
+ name: string;
78
+ url: string;
79
+ ref: string;
80
+ }[] | undefined;
81
+ authorId?: string | undefined;
82
+ taskId?: string | undefined;
83
+ }, {
84
+ type: "attachment" | "message";
85
+ createdAt: import("../../helpers").Timestamp;
86
+ author: {
87
+ name: string;
88
+ id: string;
89
+ email: string;
90
+ firstName: string;
91
+ lastName: string;
92
+ phone: string;
93
+ userRoleId: number;
94
+ photoUrl?: string | undefined;
95
+ };
96
+ id?: string | undefined;
97
+ source?: string | undefined;
98
+ content?: string | undefined;
99
+ attachments?: {
100
+ name: string;
101
+ url: string;
102
+ ref: string;
103
+ }[] | undefined;
104
+ authorId?: string | undefined;
105
+ taskId?: string | undefined;
106
+ }>;
107
+ export declare const taskThreadSchema: import("zod").ZodObject<{
108
+ id: import("zod").ZodOptional<import("zod").ZodString>;
109
+ taskId: import("zod").ZodOptional<import("zod").ZodString>;
110
+ createdAt: import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>;
111
+ updatedAt: import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>;
112
+ lastMessage: import("zod").ZodOptional<import("zod").ZodObject<{
113
+ id: import("zod").ZodOptional<import("zod").ZodString>;
114
+ taskId: import("zod").ZodOptional<import("zod").ZodString>;
115
+ content: import("zod").ZodOptional<import("zod").ZodString>;
116
+ createdAt: import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>;
117
+ authorId: import("zod").ZodOptional<import("zod").ZodString>;
118
+ author: import("zod").ZodObject<Pick<{
119
+ id: import("zod").ZodString;
120
+ name: import("zod").ZodString;
121
+ email: import("zod").ZodString;
122
+ createdAt: import("zod").ZodDate;
123
+ updatedAt: import("zod").ZodDate;
124
+ tierId: import("zod").ZodNumber;
125
+ firstName: import("zod").ZodString;
126
+ lastName: import("zod").ZodString;
127
+ phone: import("zod").ZodString;
128
+ photoUrl: import("zod").ZodOptional<import("zod").ZodString>;
129
+ isOnboardingCompleted: import("zod").ZodBoolean;
130
+ userRoleId: import("zod").ZodNumber;
131
+ stripeCustomerId: import("zod").ZodOptional<import("zod").ZodString>;
132
+ onboardingStep: import("zod").ZodNumber;
133
+ onboardingType: import("zod").ZodUnion<[import("zod").ZodLiteral<"AIRBNB_CONNECT">, import("zod").ZodLiteral<"MANUAL_LISTING">]>;
134
+ hasFullAccess: import("zod").ZodOptional<import("zod").ZodBoolean>;
135
+ hasCompletedTour: import("zod").ZodOptional<import("zod").ZodBoolean>;
136
+ position: import("zod").ZodOptional<import("zod").ZodUnion<[import("zod").ZodLiteral<"bookkeper">, import("zod").ZodLiteral<"customer-experience">, import("zod").ZodLiteral<"customer-experience-head">, import("zod").ZodLiteral<"guest-coordinator">, import("zod").ZodLiteral<"guest-coordinator-head">, import("zod").ZodLiteral<"property-manager">, import("zod").ZodLiteral<"property-manager-head">, import("zod").ZodLiteral<"account-manager">, import("zod").ZodLiteral<"account-manager-head">, import("zod").ZodLiteral<"developer">, import("zod").ZodLiteral<"finance">, import("zod").ZodLiteral<"finance-head">, import("zod").ZodLiteral<"marketing">, import("zod").ZodLiteral<"marketing-head">, import("zod").ZodLiteral<"product">, import("zod").ZodLiteral<"product-head">]>>;
137
+ }, "name" | "id" | "email" | "firstName" | "lastName" | "phone" | "photoUrl" | "userRoleId">, "strip", import("zod").ZodTypeAny, {
138
+ name: string;
139
+ id: string;
140
+ email: string;
141
+ firstName: string;
142
+ lastName: string;
143
+ phone: string;
144
+ userRoleId: number;
145
+ photoUrl?: string | undefined;
146
+ }, {
147
+ name: string;
148
+ id: string;
149
+ email: string;
150
+ firstName: string;
151
+ lastName: string;
152
+ phone: string;
153
+ userRoleId: number;
154
+ photoUrl?: string | undefined;
155
+ }>;
156
+ type: import("zod").ZodUnion<[import("zod").ZodLiteral<"message">, import("zod").ZodLiteral<"attachment">]>;
157
+ attachments: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
158
+ url: import("zod").ZodString;
159
+ ref: import("zod").ZodString;
160
+ name: import("zod").ZodString;
161
+ }, "strip", import("zod").ZodTypeAny, {
162
+ name: string;
163
+ url: string;
164
+ ref: string;
165
+ }, {
166
+ name: string;
167
+ url: string;
168
+ ref: string;
169
+ }>, "many">>;
170
+ source: import("zod").ZodOptional<import("zod").ZodString>;
171
+ }, "strip", import("zod").ZodTypeAny, {
172
+ type: "attachment" | "message";
173
+ createdAt: import("../../helpers").Timestamp;
174
+ author: {
175
+ name: string;
176
+ id: string;
177
+ email: string;
178
+ firstName: string;
179
+ lastName: string;
180
+ phone: string;
181
+ userRoleId: number;
182
+ photoUrl?: string | undefined;
183
+ };
184
+ id?: string | undefined;
185
+ source?: string | undefined;
186
+ content?: string | undefined;
187
+ attachments?: {
188
+ name: string;
189
+ url: string;
190
+ ref: string;
191
+ }[] | undefined;
192
+ authorId?: string | undefined;
193
+ taskId?: string | undefined;
194
+ }, {
195
+ type: "attachment" | "message";
196
+ createdAt: import("../../helpers").Timestamp;
197
+ author: {
198
+ name: string;
199
+ id: string;
200
+ email: string;
201
+ firstName: string;
202
+ lastName: string;
203
+ phone: string;
204
+ userRoleId: number;
205
+ photoUrl?: string | undefined;
206
+ };
207
+ id?: string | undefined;
208
+ source?: string | undefined;
209
+ content?: string | undefined;
210
+ attachments?: {
211
+ name: string;
212
+ url: string;
213
+ ref: string;
214
+ }[] | undefined;
215
+ authorId?: string | undefined;
216
+ taskId?: string | undefined;
217
+ }>>;
218
+ participantIds: import("zod").ZodArray<import("zod").ZodString, "many">;
219
+ lastSeenTimestamps: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>>>;
220
+ }, "strip", import("zod").ZodTypeAny, {
221
+ createdAt: import("../../helpers").Timestamp;
222
+ updatedAt: import("../../helpers").Timestamp;
223
+ participantIds: string[];
224
+ id?: string | undefined;
225
+ lastMessage?: {
226
+ type: "attachment" | "message";
227
+ createdAt: import("../../helpers").Timestamp;
228
+ author: {
229
+ name: string;
230
+ id: string;
231
+ email: string;
232
+ firstName: string;
233
+ lastName: string;
234
+ phone: string;
235
+ userRoleId: number;
236
+ photoUrl?: string | undefined;
237
+ };
238
+ id?: string | undefined;
239
+ source?: string | undefined;
240
+ content?: string | undefined;
241
+ attachments?: {
242
+ name: string;
243
+ url: string;
244
+ ref: string;
245
+ }[] | undefined;
246
+ authorId?: string | undefined;
247
+ taskId?: string | undefined;
248
+ } | undefined;
249
+ taskId?: string | undefined;
250
+ lastSeenTimestamps?: Record<string, import("../../helpers").Timestamp> | undefined;
251
+ }, {
252
+ createdAt: import("../../helpers").Timestamp;
253
+ updatedAt: import("../../helpers").Timestamp;
254
+ participantIds: string[];
255
+ id?: string | undefined;
256
+ lastMessage?: {
257
+ type: "attachment" | "message";
258
+ createdAt: import("../../helpers").Timestamp;
259
+ author: {
260
+ name: string;
261
+ id: string;
262
+ email: string;
263
+ firstName: string;
264
+ lastName: string;
265
+ phone: string;
266
+ userRoleId: number;
267
+ photoUrl?: string | undefined;
268
+ };
269
+ id?: string | undefined;
270
+ source?: string | undefined;
271
+ content?: string | undefined;
272
+ attachments?: {
273
+ name: string;
274
+ url: string;
275
+ ref: string;
276
+ }[] | undefined;
277
+ authorId?: string | undefined;
278
+ taskId?: string | undefined;
279
+ } | undefined;
280
+ taskId?: string | undefined;
281
+ lastSeenTimestamps?: Record<string, import("../../helpers").Timestamp> | undefined;
282
+ }>;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.taskThreadSchema = exports.taskCommentSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const helpers_1 = require("../../helpers");
6
+ const user_1 = require("../user");
7
+ exports.taskCommentSchema = (0, zod_1.object)({
8
+ id: (0, zod_1.string)().optional(),
9
+ taskId: (0, zod_1.string)().optional(),
10
+ content: (0, zod_1.string)().optional(),
11
+ createdAt: helpers_1.firestoreTimestampSchema,
12
+ authorId: (0, zod_1.string)().optional(),
13
+ author: user_1.userSchema.pick({
14
+ id: true,
15
+ email: true,
16
+ firstName: true,
17
+ lastName: true,
18
+ name: true,
19
+ phone: true,
20
+ photoUrl: true,
21
+ userRoleId: true,
22
+ }),
23
+ type: (0, zod_1.union)([(0, zod_1.literal)("message"), (0, zod_1.literal)("attachment")]),
24
+ attachments: (0, zod_1.array)((0, zod_1.object)({
25
+ url: (0, zod_1.string)(),
26
+ ref: (0, zod_1.string)(),
27
+ name: (0, zod_1.string)(),
28
+ })).optional(),
29
+ source: (0, zod_1.string)().optional(),
30
+ });
31
+ exports.taskThreadSchema = (0, zod_1.object)({
32
+ id: (0, zod_1.string)().optional(),
33
+ taskId: (0, zod_1.string)().optional(),
34
+ createdAt: helpers_1.firestoreTimestampSchema,
35
+ updatedAt: helpers_1.firestoreTimestampSchema,
36
+ lastMessage: exports.taskCommentSchema.optional(),
37
+ participantIds: (0, zod_1.array)((0, zod_1.string)()),
38
+ lastSeenTimestamps: (0, zod_1.record)((0, zod_1.string)(), helpers_1.firestoreTimestampSchema).optional(),
39
+ });
@@ -6,6 +6,7 @@ export declare enum ServiceType {
6
6
  export declare enum TaskStatus {
7
7
  PENDING = "PENDING",
8
8
  CONFIRMED = "CONFIRMED",
9
+ IN_PROGRESS = "IN_PROGRESS",
9
10
  COMPLETED = "COMPLETED",
10
11
  CANCELLED = "CANCELLED"
11
12
  }
@@ -11,6 +11,7 @@ var TaskStatus;
11
11
  (function (TaskStatus) {
12
12
  TaskStatus["PENDING"] = "PENDING";
13
13
  TaskStatus["CONFIRMED"] = "CONFIRMED";
14
+ TaskStatus["IN_PROGRESS"] = "IN_PROGRESS";
14
15
  TaskStatus["COMPLETED"] = "COMPLETED";
15
16
  TaskStatus["CANCELLED"] = "CANCELLED";
16
17
  })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
@@ -49,3 +49,4 @@ export * from "./service-provider";
49
49
  export * from "./service-worker";
50
50
  export * from "./task-requirement";
51
51
  export * from "./task-requirement-photo";
52
+ export * from "./task-thread";
@@ -65,3 +65,4 @@ __exportStar(require("./service-provider"), exports);
65
65
  __exportStar(require("./service-worker"), exports);
66
66
  __exportStar(require("./task-requirement"), exports);
67
67
  __exportStar(require("./task-requirement-photo"), exports);
68
+ __exportStar(require("./task-thread"), exports);
@@ -12,6 +12,7 @@ import { Purchase } from "../purchase";
12
12
  import { TaskAutomation } from "../task-automation";
13
13
  import { TaskRequirementPhoto } from "../task-requirement-photo";
14
14
  import { TaskRequirement } from "../task-requirement";
15
+ import { User } from "../user";
15
16
  export interface Task extends infer<typeof taskSchema> {
16
17
  property?: Property;
17
18
  department?: TaskDepartment;
@@ -25,4 +26,8 @@ export interface Task extends infer<typeof taskSchema> {
25
26
  automation?: TaskAutomation;
26
27
  requirements?: TaskRequirement[];
27
28
  requirementPhotos?: TaskRequirementPhoto[];
29
+ startedByUser?: User;
30
+ completedByUser?: User;
31
+ confirmedByUser?: User;
32
+ cancelledByUser?: User;
28
33
  }
@@ -0,0 +1,6 @@
1
+ import { infer } from "zod";
2
+ import { taskCommentSchema, taskThreadSchema } from "../../schemas/task-thread";
3
+ export interface TaskThread extends infer<typeof taskThreadSchema> {
4
+ }
5
+ export interface TaskComment extends infer<typeof taskCommentSchema> {
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,6 +10,7 @@ import { UserPermission } from "../user-permission";
10
10
  import { AccountSetupProgress } from "../account-setup-progress";
11
11
  import { ServiceProvider } from "../service-provider";
12
12
  import { ServiceWorker as ServiceWorkerType } from "../service-worker";
13
+ import { Task } from "../task";
13
14
  export interface User extends infer<typeof userSchema> {
14
15
  tier?: Tier;
15
16
  properties?: Property[];
@@ -21,4 +22,8 @@ export interface User extends infer<typeof userSchema> {
21
22
  accountSetupProgress?: AccountSetupProgress;
22
23
  serviceProvider?: ServiceProvider;
23
24
  workerProfile?: ServiceWorkerType;
25
+ startedTasks?: Task[];
26
+ completedTasks?: Task[];
27
+ confirmedTasks?: Task[];
28
+ cancelledTasks?: Task[];
24
29
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.1.2",
4
+ "version": "1.1.5",
5
5
  "description": "This is a shared package for the hububb saas project",
6
6
  "types": "./dist/index.d.ts",
7
7
  "main": "./dist/index.js",