hububb-saas-shared 1.1.2 → 1.1.4

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) {
@@ -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
  });
@@ -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 = {}));
@@ -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
  }
@@ -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.4",
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",