@turndown/library 0.0.56 → 0.0.57

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.
@@ -6,6 +6,7 @@ export interface ChecklistTemplate {
6
6
  createdBy: string;
7
7
  isActive: boolean;
8
8
  items: ChecklistTemplateItem[];
9
+ deletedAt: Date | null;
9
10
  createdAt: Date;
10
11
  updatedAt: Date;
11
12
  }
@@ -13,9 +14,39 @@ export interface ChecklistTemplateItem {
13
14
  id: string;
14
15
  templateId: string;
15
16
  title: string;
16
- description?: string;
17
+ description: string | null;
17
18
  displayOrder: number;
18
19
  requiresPhoto: boolean;
19
20
  isRequired: boolean;
21
+ estimatedTimeMinutes: number | null;
22
+ deletedAt: Date | null;
23
+ createdAt: Date;
24
+ updatedAt: Date;
25
+ }
26
+ /**
27
+ * Template with items
28
+ */
29
+ export interface ChecklistTemplateWithItems extends ChecklistTemplate {
30
+ items: ChecklistTemplateItem[];
31
+ }
32
+ /**
33
+ * Input for creating a template
34
+ */
35
+ export interface CreateTemplateInput {
36
+ name: string;
37
+ description?: string;
38
+ companyId: string;
39
+ createdBy: string;
40
+ isActive?: boolean;
41
+ }
42
+ /**
43
+ * Input for creating template items
44
+ */
45
+ export interface CreateTemplateItemInput {
46
+ title: string;
47
+ description?: string;
48
+ displayOrder: number;
49
+ requiresPhoto?: boolean;
50
+ isRequired?: boolean;
20
51
  estimatedTimeMinutes?: number;
21
52
  }
@@ -7,7 +7,6 @@ export * from "./api";
7
7
  export * from "./auth";
8
8
  export * from "./base";
9
9
  export * from "./checklist-template";
10
- export * from "./cleaning-session";
11
10
  export * from "./company";
12
11
  export * from "./damage-report";
13
12
  export * from "./errors";
@@ -16,3 +15,4 @@ export * from "./property";
16
15
  export * from "./room";
17
16
  export * from "./room-checklist";
18
17
  export * from "./user";
18
+ export * from "./work-session";
@@ -7,7 +7,6 @@ export * from "./api";
7
7
  export * from "./auth";
8
8
  export * from "./base";
9
9
  export * from "./checklist-template";
10
- export * from "./cleaning-session";
11
10
  export * from "./company";
12
11
  export * from "./damage-report";
13
12
  export * from "./errors";
@@ -16,3 +15,4 @@ export * from "./property";
16
15
  export * from "./room";
17
16
  export * from "./room-checklist";
18
17
  export * from "./user";
18
+ export * from "./work-session";
@@ -6,9 +6,39 @@ export interface RoomChecklist {
6
6
  name: string;
7
7
  isActive: boolean;
8
8
  items: RoomChecklistItem[];
9
+ deletedAt: Date | null;
10
+ createdAt: Date;
11
+ updatedAt: Date;
9
12
  }
10
13
  export interface RoomChecklistItem extends ChecklistTemplateItem {
11
14
  roomChecklistId: string;
12
15
  templateItemId?: string;
13
16
  isCustom: boolean;
14
17
  }
18
+ /**
19
+ * Room checklist with items
20
+ */
21
+ export interface RoomChecklistWithItems extends RoomChecklist {
22
+ items: RoomChecklistItem[];
23
+ }
24
+ /**
25
+ * Input for creating a room checklist
26
+ */
27
+ export interface CreateRoomChecklistInput {
28
+ roomId: string;
29
+ templateId?: string;
30
+ name: string;
31
+ isActive?: boolean;
32
+ }
33
+ /**
34
+ * Input for creating room checklist items
35
+ */
36
+ export interface CreateRoomChecklistItemInput {
37
+ title: string;
38
+ description?: string;
39
+ displayOrder: number;
40
+ requiresPhoto?: boolean;
41
+ isRequired?: boolean;
42
+ estimatedTimeMinutes?: number;
43
+ isCustom?: boolean;
44
+ }
@@ -0,0 +1,96 @@
1
+ import { ObjectValues } from "../base";
2
+ /**
3
+ * Work session status enum
4
+ */
5
+ export declare const WORK_SESSION_STATUS: {
6
+ IN_PROGRESS: string;
7
+ COMPLETED: string;
8
+ CANCELLED: string;
9
+ };
10
+ export type WorkSessionStatus = ObjectValues<typeof WORK_SESSION_STATUS>;
11
+ /**
12
+ * Checklist execution status enum
13
+ */
14
+ export declare const CHECKLIST_EXECUTION_STATUS: {
15
+ PENDING: string;
16
+ IN_PROGRESS: string;
17
+ COMPLETED: string;
18
+ SKIPPED: string;
19
+ };
20
+ export type ChecklistExecutionStatus = ObjectValues<typeof CHECKLIST_EXECUTION_STATUS>;
21
+ /**
22
+ * Work session
23
+ */
24
+ export interface WorkSession {
25
+ id: string;
26
+ propertyId: string;
27
+ serviceProviderCompanyId: string;
28
+ performedBy: string;
29
+ status: WorkSessionStatus;
30
+ scheduledDate: Date | null;
31
+ startedAt: Date;
32
+ completedAt: Date | null;
33
+ totalTimeMinutes: number | null;
34
+ notes: string | null;
35
+ createdAt: Date;
36
+ updatedAt: Date;
37
+ }
38
+ /**
39
+ * Checklist execution
40
+ */
41
+ export interface ChecklistExecution {
42
+ id: string;
43
+ workSessionId: string;
44
+ roomChecklistId: string;
45
+ roomId: string;
46
+ workerId: string;
47
+ status: ChecklistExecutionStatus;
48
+ startedAt: Date | null;
49
+ completedAt: Date | null;
50
+ timeSpentMinutes: number | null;
51
+ notes: string | null;
52
+ createdAt: Date;
53
+ updatedAt: Date;
54
+ }
55
+ /**
56
+ * Checklist item completion
57
+ */
58
+ export interface ChecklistItemCompletion {
59
+ id: string;
60
+ checklistExecutionId: string;
61
+ roomChecklistItemId: string;
62
+ completedBy: string;
63
+ completedAt: Date;
64
+ photoId: string | null;
65
+ notes: string | null;
66
+ skipped: boolean;
67
+ skipReason: string | null;
68
+ createdAt: Date;
69
+ }
70
+ /**
71
+ * Work session with executions
72
+ */
73
+ export interface WorkSessionWithExecutions extends WorkSession {
74
+ executions: ChecklistExecution[];
75
+ }
76
+ /**
77
+ * Input for creating a work session
78
+ */
79
+ export interface CreateWorkSessionInput {
80
+ propertyId: string;
81
+ serviceProviderCompanyId: string;
82
+ performedBy: string;
83
+ scheduledDate?: Date;
84
+ notes?: string;
85
+ }
86
+ /**
87
+ * Input for completing a checklist item
88
+ */
89
+ export interface CompleteChecklistItemInput {
90
+ roomChecklistItemId: string;
91
+ completedBy: string;
92
+ photoId?: string;
93
+ notes?: string;
94
+ skipped?: boolean;
95
+ skipReason?: string;
96
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Work session status enum
3
+ */
4
+ export const WORK_SESSION_STATUS = {
5
+ IN_PROGRESS: "IN_PROGRESS",
6
+ COMPLETED: "COMPLETED",
7
+ CANCELLED: "CANCELLED",
8
+ };
9
+ /**
10
+ * Checklist execution status enum
11
+ */
12
+ export const CHECKLIST_EXECUTION_STATUS = {
13
+ PENDING: "PENDING",
14
+ IN_PROGRESS: "IN_PROGRESS",
15
+ COMPLETED: "COMPLETED",
16
+ SKIPPED: "SKIPPED",
17
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turndown/library",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "description": "Shared TypeScript library for the Turndown suite.",
5
5
  "keywords": [
6
6
  "types",
@@ -1,38 +0,0 @@
1
- export type CleaningStatus = "IN_PROGRESS" | "COMPLETED" | "CANCELLED";
2
- export type ChecklistExecutionStatus = "PENDING" | "IN_PROGRESS" | "COMPLETED" | "SKIPPED";
3
- export interface CleaningSession {
4
- id: string;
5
- propertyId: string;
6
- cleanerId: string;
7
- status: CleaningStatus;
8
- scheduledDate?: Date;
9
- startedAt: Date;
10
- completedAt?: Date;
11
- totalTimeMinutes?: number;
12
- notes?: string;
13
- executions: ChecklistExecution[];
14
- }
15
- export interface ChecklistExecution {
16
- id: string;
17
- cleaningSessionId: string;
18
- roomChecklistId: string;
19
- roomId: string;
20
- cleanerId: string;
21
- status: ChecklistExecutionStatus;
22
- startedAt?: Date;
23
- completedAt?: Date;
24
- timeSpentMinutes?: number;
25
- completions: ItemCompletion[];
26
- }
27
- export interface ItemCompletion {
28
- id: string;
29
- checklistExecutionId: string;
30
- roomChecklistItemId: string;
31
- completedBy: string;
32
- completedAt: Date;
33
- photoId?: string;
34
- photoUrl?: string;
35
- notes?: string;
36
- skipped: boolean;
37
- skipReason?: string;
38
- }
@@ -1 +0,0 @@
1
- export {};