hububb-saas-shared 1.2.43 → 1.2.44

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.
Files changed (41) hide show
  1. package/dist/helpers/index.d.ts +1 -0
  2. package/dist/helpers/index.js +3 -1
  3. package/dist/helpers/reservation-xero.d.ts +15 -0
  4. package/dist/helpers/reservation-xero.js +14 -0
  5. package/dist/schemas/ai-agent/property-manager-session.d.ts +2 -2
  6. package/dist/schemas/ai-agent/revenue-manager-config.d.ts +2 -2
  7. package/dist/schemas/ai-agent/revenue-manager-run-log.d.ts +4 -4
  8. package/dist/schemas/bank-account/index.d.ts +4 -4
  9. package/dist/schemas/channex/booking.d.ts +2 -2
  10. package/dist/schemas/channex/thread.d.ts +2 -2
  11. package/dist/schemas/custom-bundle/index.d.ts +2 -2
  12. package/dist/schemas/index.d.ts +1 -0
  13. package/dist/schemas/index.js +1 -0
  14. package/dist/schemas/invoice/index.d.ts +2 -2
  15. package/dist/schemas/payment-method/index.d.ts +2 -2
  16. package/dist/schemas/property-room-bed/index.d.ts +2 -2
  17. package/dist/schemas/reservation/index.d.ts +154 -1
  18. package/dist/schemas/reservation/index.js +10 -8
  19. package/dist/schemas/reservation-xero/index.d.ts +136 -0
  20. package/dist/schemas/reservation-xero/index.js +36 -0
  21. package/dist/schemas/restriction/index.d.ts +2 -2
  22. package/dist/schemas/seam/index.d.ts +6 -6
  23. package/dist/schemas/service-provider/index.d.ts +2 -2
  24. package/dist/schemas/service-provider-service/index.d.ts +2 -2
  25. package/dist/schemas/subscription-service/index.d.ts +2 -2
  26. package/dist/schemas/task/index.d.ts +2 -2
  27. package/dist/schemas/task-assignment/index.d.ts +2 -2
  28. package/dist/schemas/task-checklist-item/index.d.ts +2 -2
  29. package/dist/schemas/task-checklist-space/index.d.ts +2 -2
  30. package/dist/schemas/task-thread/index.d.ts +8 -8
  31. package/dist/schemas/thread/index.d.ts +103 -6
  32. package/dist/types/index.d.ts +1 -0
  33. package/dist/types/index.js +1 -0
  34. package/dist/types/reservation-xero/index.d.ts +7 -0
  35. package/package.json +1 -1
  36. package/dist/schemas/enums/index.d.ts +0 -45
  37. package/dist/schemas/enums/index.js +0 -56
  38. package/dist/schemas/service-property/index.d.ts +0 -19
  39. package/dist/schemas/service-property/index.js +0 -11
  40. package/dist/types/service-property/index.d.ts +0 -8
  41. /package/dist/types/{service-property → reservation-xero}/index.js +0 -0
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReservationXeroSchema = exports.ReservationXeroInvoiceSchema = exports.XeroSyncStatusEnum = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.XeroSyncStatusEnum = zod_1.z.enum([
6
+ "PENDING",
7
+ "SUCCESS",
8
+ "FAILED",
9
+ "SKIPPED",
10
+ ]);
11
+ exports.ReservationXeroInvoiceSchema = zod_1.z.object({
12
+ id: zod_1.z.number(),
13
+ reservationXeroId: zod_1.z.number(),
14
+ xeroInvoiceId: zod_1.z.string(),
15
+ xeroInvoiceNumber: zod_1.z.string().optional().nullable(),
16
+ reference: zod_1.z.string().optional().nullable(),
17
+ invoiceDate: zod_1.z.date().optional().nullable(),
18
+ dueDate: zod_1.z.date().optional().nullable(),
19
+ unitAmount: zod_1.z.number().optional().nullable(),
20
+ status: zod_1.z.string().optional().nullable(),
21
+ createdAt: zod_1.z.date(),
22
+ updatedAt: zod_1.z.date(),
23
+ });
24
+ exports.ReservationXeroSchema = zod_1.z.object({
25
+ id: zod_1.z.number(),
26
+ reservationId: zod_1.z.number(),
27
+ syncStatus: exports.XeroSyncStatusEnum.optional().nullable(),
28
+ lastAttemptAt: zod_1.z.date().optional().nullable(),
29
+ lastSuccessAt: zod_1.z.date().optional().nullable(),
30
+ lastError: zod_1.z.string().optional().nullable(),
31
+ retryCount: zod_1.z.number(),
32
+ xeroContactId: zod_1.z.string().optional().nullable(),
33
+ createdAt: zod_1.z.date(),
34
+ updatedAt: zod_1.z.date(),
35
+ invoices: zod_1.z.array(exports.ReservationXeroInvoiceSchema).optional(),
36
+ });
@@ -20,8 +20,8 @@ export declare const restrictionSchema: import("zod").ZodObject<{
20
20
  updatedAt: Date;
21
21
  propertyId: number;
22
22
  rate: string;
23
- ratePlanId: number;
24
23
  dateString: string;
24
+ ratePlanId: number;
25
25
  minStayArrival: number;
26
26
  maxStay: number;
27
27
  closedToArrival: number;
@@ -35,8 +35,8 @@ export declare const restrictionSchema: import("zod").ZodObject<{
35
35
  updatedAt: Date;
36
36
  propertyId: number;
37
37
  rate: string;
38
- ratePlanId: number;
39
38
  dateString: string;
39
+ ratePlanId: number;
40
40
  minStayArrival: number;
41
41
  maxStay: number;
42
42
  closedToArrival: number;
@@ -36,11 +36,11 @@ export declare const seamAccountSchema: z.ZodObject<{
36
36
  createdAt: Date;
37
37
  updatedAt: Date;
38
38
  userId: string;
39
- isActive: boolean;
40
39
  accountType: string;
40
+ isActive: boolean;
41
41
  accountTypeDisplayName: string;
42
- imageUrl?: string | null | undefined;
43
42
  accountName?: string | null | undefined;
43
+ imageUrl?: string | null | undefined;
44
44
  workspaceId?: string | null | undefined;
45
45
  customMetadata?: {} | null | undefined;
46
46
  lastSyncedAt?: Date | null | undefined;
@@ -49,11 +49,11 @@ export declare const seamAccountSchema: z.ZodObject<{
49
49
  createdAt: Date;
50
50
  updatedAt: Date;
51
51
  userId: string;
52
- isActive: boolean;
53
52
  accountType: string;
53
+ isActive: boolean;
54
54
  accountTypeDisplayName: string;
55
- imageUrl?: string | null | undefined;
56
55
  accountName?: string | null | undefined;
56
+ imageUrl?: string | null | undefined;
57
57
  workspaceId?: string | null | undefined;
58
58
  customMetadata?: {} | null | undefined;
59
59
  lastSyncedAt?: Date | null | undefined;
@@ -178,10 +178,10 @@ export declare const seamAccessCodeSchema: z.ZodObject<{
178
178
  code?: string | null | undefined;
179
179
  type?: string | null | undefined;
180
180
  reservationId?: number | null | undefined;
181
+ syncStatus?: string | null | undefined;
181
182
  taskId?: number | null | undefined;
182
183
  startsAt?: Date | null | undefined;
183
184
  endsAt?: Date | null | undefined;
184
- syncStatus?: string | null | undefined;
185
185
  errorMessage?: string | null | undefined;
186
186
  }, {
187
187
  name: string;
@@ -193,10 +193,10 @@ export declare const seamAccessCodeSchema: z.ZodObject<{
193
193
  code?: string | null | undefined;
194
194
  type?: string | null | undefined;
195
195
  reservationId?: number | null | undefined;
196
+ syncStatus?: string | null | undefined;
196
197
  taskId?: number | null | undefined;
197
198
  startsAt?: Date | null | undefined;
198
199
  endsAt?: Date | null | undefined;
199
- syncStatus?: string | null | undefined;
200
200
  errorMessage?: string | null | undefined;
201
201
  }>;
202
202
  export declare const seamEventSchema: z.ZodObject<{
@@ -105,8 +105,8 @@ export declare const ServiceProviderDocumentSchema: import("zod").ZodObject<{
105
105
  url: string;
106
106
  createdAt: Date;
107
107
  updatedAt: Date;
108
- isVerified: boolean | null;
109
108
  serviceProviderId: number;
109
+ isVerified: boolean | null;
110
110
  expiryDate: Date | null;
111
111
  }, {
112
112
  type: string;
@@ -114,8 +114,8 @@ export declare const ServiceProviderDocumentSchema: import("zod").ZodObject<{
114
114
  url: string;
115
115
  createdAt: Date;
116
116
  updatedAt: Date;
117
- isVerified: boolean | null;
118
117
  serviceProviderId: number;
118
+ isVerified: boolean | null;
119
119
  expiryDate: Date | null;
120
120
  }>;
121
121
  export declare const ServiceProviderBankInfoSchema: import("zod").ZodObject<{
@@ -12,8 +12,8 @@ export declare const ServiceProviderServiceSchema: import("zod").ZodObject<{
12
12
  createdAt: Date;
13
13
  updatedAt: Date;
14
14
  serviceId: number;
15
- isActive: boolean;
16
15
  serviceProviderId: number;
16
+ isActive: boolean;
17
17
  customPrice: number | null;
18
18
  customDescription: string | null;
19
19
  }, {
@@ -21,8 +21,8 @@ export declare const ServiceProviderServiceSchema: import("zod").ZodObject<{
21
21
  createdAt: Date;
22
22
  updatedAt: Date;
23
23
  serviceId: number;
24
- isActive: boolean;
25
24
  serviceProviderId: number;
25
+ isActive: boolean;
26
26
  customPrice: number | null;
27
27
  customDescription: string | null;
28
28
  }>;
@@ -27,8 +27,8 @@ export declare const subscriptionServiceSchema: import("zod").ZodObject<{
27
27
  subscriptionId: string;
28
28
  display?: boolean | undefined;
29
29
  customBundleId?: string | undefined;
30
- accountName?: string | undefined;
31
30
  canceledAt?: Date | undefined;
31
+ accountName?: string | undefined;
32
32
  lastBilledAt?: Date | undefined;
33
33
  nextBillingDate?: Date | undefined;
34
34
  }, {
@@ -43,8 +43,8 @@ export declare const subscriptionServiceSchema: import("zod").ZodObject<{
43
43
  subscriptionId: string;
44
44
  display?: boolean | undefined;
45
45
  customBundleId?: string | undefined;
46
- accountName?: string | undefined;
47
46
  canceledAt?: Date | undefined;
47
+ accountName?: string | undefined;
48
48
  lastBilledAt?: Date | undefined;
49
49
  nextBillingDate?: Date | undefined;
50
50
  }>;
@@ -52,8 +52,8 @@ export declare const taskSchema: import("zod").ZodObject<{
52
52
  departmentId: number;
53
53
  subdepartmentId: number;
54
54
  propertyId: number;
55
- paymentStatus: "PENDING" | "PAID" | "FAILED";
56
55
  dueDate: Date;
56
+ paymentStatus: "PENDING" | "PAID" | "FAILED";
57
57
  description?: string | undefined;
58
58
  internalNotes?: string | undefined;
59
59
  assignedWorkerId?: number | undefined;
@@ -95,8 +95,8 @@ export declare const taskSchema: import("zod").ZodObject<{
95
95
  departmentId: number;
96
96
  subdepartmentId: number;
97
97
  propertyId: number;
98
- paymentStatus: "PENDING" | "PAID" | "FAILED";
99
98
  dueDate: Date;
99
+ paymentStatus: "PENDING" | "PAID" | "FAILED";
100
100
  description?: string | undefined;
101
101
  internalNotes?: string | undefined;
102
102
  assignedWorkerId?: number | undefined;
@@ -14,9 +14,9 @@ export declare const taskAssignmentSchema: import("zod").ZodObject<{
14
14
  createdAt: Date;
15
15
  updatedAt: Date;
16
16
  taskId: number;
17
- acceptedAt: Date;
18
17
  workerId: number;
19
18
  assignedAt: Date;
19
+ acceptedAt: Date;
20
20
  rejectedAt: Date;
21
21
  }, {
22
22
  id: number;
@@ -24,8 +24,8 @@ export declare const taskAssignmentSchema: import("zod").ZodObject<{
24
24
  createdAt: Date;
25
25
  updatedAt: Date;
26
26
  taskId: number;
27
- acceptedAt: Date;
28
27
  workerId: number;
29
28
  assignedAt: Date;
29
+ acceptedAt: Date;
30
30
  rejectedAt: Date;
31
31
  }>;
@@ -11,15 +11,15 @@ export declare const taskChecklistItemSchema: import("zod").ZodObject<{
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  taskChecklistSpaceId: number;
14
- content?: string | undefined;
15
14
  completed?: boolean | undefined;
15
+ content?: string | undefined;
16
16
  completedAt?: Date | undefined;
17
17
  }, {
18
18
  id: number;
19
19
  createdAt: Date;
20
20
  updatedAt: Date;
21
21
  taskChecklistSpaceId: number;
22
- content?: string | undefined;
23
22
  completed?: boolean | undefined;
23
+ content?: string | undefined;
24
24
  completedAt?: Date | undefined;
25
25
  }>;
@@ -11,15 +11,15 @@ export declare const taskChecklistSpaceSchema: import("zod").ZodObject<{
11
11
  createdAt: Date;
12
12
  updatedAt: Date;
13
13
  propertyRoomId: number;
14
- taskChecklistId: number;
15
14
  roomName: string;
16
15
  roomType: "BEDROOM" | "BATHROOM" | "LIVING_ROOM" | "KITCHEN" | "BALCONY" | "TOILET" | "OTHER" | "DINING_ROOM" | "OUTDOOR" | "WORKSPACE" | "STORAGE" | "COMMON_SPACE";
16
+ taskChecklistId: number;
17
17
  }, {
18
18
  id: number;
19
19
  createdAt: Date;
20
20
  updatedAt: Date;
21
21
  propertyRoomId: number;
22
- taskChecklistId: number;
23
22
  roomName: string;
24
23
  roomType: "BEDROOM" | "BATHROOM" | "LIVING_ROOM" | "KITCHEN" | "BALCONY" | "TOILET" | "OTHER" | "DINING_ROOM" | "OUTDOOR" | "WORKSPACE" | "STORAGE" | "COMMON_SPACE";
24
+ taskChecklistId: number;
25
25
  }>;
@@ -90,8 +90,8 @@ export declare const taskCommentSchema: import("zod").ZodObject<{
90
90
  url: string;
91
91
  ref: string;
92
92
  }[] | undefined;
93
- authorId?: string | undefined;
94
93
  taskId?: string | undefined;
94
+ authorId?: string | undefined;
95
95
  }, {
96
96
  type: "attachment" | "message";
97
97
  createdAt: import("../../helpers").Timestamp;
@@ -113,8 +113,8 @@ export declare const taskCommentSchema: import("zod").ZodObject<{
113
113
  url: string;
114
114
  ref: string;
115
115
  }[] | undefined;
116
- authorId?: string | undefined;
117
116
  taskId?: string | undefined;
117
+ authorId?: string | undefined;
118
118
  }>;
119
119
  export declare const taskThreadSchema: import("zod").ZodObject<{
120
120
  id: import("zod").ZodOptional<import("zod").ZodString>;
@@ -213,8 +213,8 @@ export declare const taskThreadSchema: import("zod").ZodObject<{
213
213
  url: string;
214
214
  ref: string;
215
215
  }[] | undefined;
216
- authorId?: string | undefined;
217
216
  taskId?: string | undefined;
217
+ authorId?: string | undefined;
218
218
  }, {
219
219
  type: "attachment" | "message";
220
220
  createdAt: import("../../helpers").Timestamp;
@@ -236,8 +236,8 @@ export declare const taskThreadSchema: import("zod").ZodObject<{
236
236
  url: string;
237
237
  ref: string;
238
238
  }[] | undefined;
239
- authorId?: string | undefined;
240
239
  taskId?: string | undefined;
240
+ authorId?: string | undefined;
241
241
  }>>;
242
242
  participantIds: import("zod").ZodArray<import("zod").ZodString, "many">;
243
243
  lastSeenTimestamps: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodType<import("../../helpers").Timestamp, import("zod").ZodTypeDef, import("../../helpers").Timestamp>>>;
@@ -246,6 +246,7 @@ export declare const taskThreadSchema: import("zod").ZodObject<{
246
246
  updatedAt: import("../../helpers").Timestamp;
247
247
  participantIds: string[];
248
248
  id?: string | undefined;
249
+ taskId?: string | undefined;
249
250
  lastMessage?: {
250
251
  type: "attachment" | "message";
251
252
  createdAt: import("../../helpers").Timestamp;
@@ -267,16 +268,16 @@ export declare const taskThreadSchema: import("zod").ZodObject<{
267
268
  url: string;
268
269
  ref: string;
269
270
  }[] | undefined;
270
- authorId?: string | undefined;
271
271
  taskId?: string | undefined;
272
+ authorId?: string | undefined;
272
273
  } | undefined;
273
- taskId?: string | undefined;
274
274
  lastSeenTimestamps?: Record<string, import("../../helpers").Timestamp> | undefined;
275
275
  }, {
276
276
  createdAt: import("../../helpers").Timestamp;
277
277
  updatedAt: import("../../helpers").Timestamp;
278
278
  participantIds: string[];
279
279
  id?: string | undefined;
280
+ taskId?: string | undefined;
280
281
  lastMessage?: {
281
282
  type: "attachment" | "message";
282
283
  createdAt: import("../../helpers").Timestamp;
@@ -298,9 +299,8 @@ export declare const taskThreadSchema: import("zod").ZodObject<{
298
299
  url: string;
299
300
  ref: string;
300
301
  }[] | undefined;
301
- authorId?: string | undefined;
302
302
  taskId?: string | undefined;
303
+ authorId?: string | undefined;
303
304
  } | undefined;
304
- taskId?: string | undefined;
305
305
  lastSeenTimestamps?: Record<string, import("../../helpers").Timestamp> | undefined;
306
306
  }>;
@@ -931,7 +931,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
931
931
  } | undefined;
932
932
  }>>;
933
933
  participantIds: z.ZodArray<z.ZodString, "many">;
934
- participants: z.ZodOptional<z.ZodArray<z.ZodObject<z.objectUtil.extendShape<{
934
+ participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
935
935
  id: z.ZodString;
936
936
  name: z.ZodString;
937
937
  email: z.ZodString;
@@ -962,7 +962,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
962
962
  hasActiveBookingAccount: z.ZodOptional<z.ZodBoolean>;
963
963
  hasPendingPaymentAction: z.ZodOptional<z.ZodBoolean>;
964
964
  isKlevioAvailable: z.ZodOptional<z.ZodBoolean>;
965
- }, {
965
+ } & {
966
966
  userRole: z.ZodOptional<z.ZodObject<{
967
967
  id: z.ZodNumber;
968
968
  name: z.ZodString;
@@ -979,7 +979,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
979
979
  createdAt: Date;
980
980
  updatedAt: Date;
981
981
  }>>;
982
- }>, "strip", z.ZodTypeAny, {
982
+ }, "strip", z.ZodTypeAny, {
983
983
  name: string;
984
984
  id: string;
985
985
  email: string;
@@ -1065,7 +1065,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
1065
1065
  needsAttentionMap: z.ZodRecord<z.ZodString, z.ZodBoolean>;
1066
1066
  propertyId: z.ZodOptional<z.ZodNumber>;
1067
1067
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1068
- reservation: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<Pick<{
1068
+ reservation: z.ZodOptional<z.ZodObject<Pick<{
1069
1069
  id: z.ZodNumber;
1070
1070
  status: z.ZodEnum<["CONFIRMED", "CANCELLED", "PENDING"]>;
1071
1071
  currency: z.ZodString;
@@ -1099,8 +1099,105 @@ export declare const ChatThreadSchema: z.ZodObject<{
1099
1099
  xeroLastSuccessAt: z.ZodOptional<z.ZodDate>;
1100
1100
  xeroLastError: z.ZodOptional<z.ZodString>;
1101
1101
  xeroRetryCount: z.ZodOptional<z.ZodNumber>;
1102
+ xero: z.ZodOptional<z.ZodObject<{
1103
+ id: z.ZodNumber;
1104
+ reservationId: z.ZodNumber;
1105
+ syncStatus: z.ZodNullable<z.ZodOptional<z.ZodEnum<["PENDING", "SUCCESS", "FAILED", "SKIPPED"]>>>;
1106
+ lastAttemptAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
1107
+ lastSuccessAt: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
1108
+ lastError: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1109
+ retryCount: z.ZodNumber;
1110
+ xeroContactId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1111
+ createdAt: z.ZodDate;
1112
+ updatedAt: z.ZodDate;
1113
+ invoices: z.ZodOptional<z.ZodArray<z.ZodObject<{
1114
+ id: z.ZodNumber;
1115
+ reservationXeroId: z.ZodNumber;
1116
+ xeroInvoiceId: z.ZodString;
1117
+ xeroInvoiceNumber: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1118
+ reference: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1119
+ invoiceDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
1120
+ dueDate: z.ZodNullable<z.ZodOptional<z.ZodDate>>;
1121
+ unitAmount: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1122
+ status: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1123
+ createdAt: z.ZodDate;
1124
+ updatedAt: z.ZodDate;
1125
+ }, "strip", z.ZodTypeAny, {
1126
+ id: number;
1127
+ createdAt: Date;
1128
+ updatedAt: Date;
1129
+ reservationXeroId: number;
1130
+ xeroInvoiceId: string;
1131
+ status?: string | null | undefined;
1132
+ xeroInvoiceNumber?: string | null | undefined;
1133
+ reference?: string | null | undefined;
1134
+ invoiceDate?: Date | null | undefined;
1135
+ dueDate?: Date | null | undefined;
1136
+ unitAmount?: number | null | undefined;
1137
+ }, {
1138
+ id: number;
1139
+ createdAt: Date;
1140
+ updatedAt: Date;
1141
+ reservationXeroId: number;
1142
+ xeroInvoiceId: string;
1143
+ status?: string | null | undefined;
1144
+ xeroInvoiceNumber?: string | null | undefined;
1145
+ reference?: string | null | undefined;
1146
+ invoiceDate?: Date | null | undefined;
1147
+ dueDate?: Date | null | undefined;
1148
+ unitAmount?: number | null | undefined;
1149
+ }>, "many">>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ id: number;
1152
+ createdAt: Date;
1153
+ updatedAt: Date;
1154
+ reservationId: number;
1155
+ retryCount: number;
1156
+ syncStatus?: "PENDING" | "FAILED" | "SKIPPED" | "SUCCESS" | null | undefined;
1157
+ lastAttemptAt?: Date | null | undefined;
1158
+ lastSuccessAt?: Date | null | undefined;
1159
+ lastError?: string | null | undefined;
1160
+ xeroContactId?: string | null | undefined;
1161
+ invoices?: {
1162
+ id: number;
1163
+ createdAt: Date;
1164
+ updatedAt: Date;
1165
+ reservationXeroId: number;
1166
+ xeroInvoiceId: string;
1167
+ status?: string | null | undefined;
1168
+ xeroInvoiceNumber?: string | null | undefined;
1169
+ reference?: string | null | undefined;
1170
+ invoiceDate?: Date | null | undefined;
1171
+ dueDate?: Date | null | undefined;
1172
+ unitAmount?: number | null | undefined;
1173
+ }[] | undefined;
1174
+ }, {
1175
+ id: number;
1176
+ createdAt: Date;
1177
+ updatedAt: Date;
1178
+ reservationId: number;
1179
+ retryCount: number;
1180
+ syncStatus?: "PENDING" | "FAILED" | "SKIPPED" | "SUCCESS" | null | undefined;
1181
+ lastAttemptAt?: Date | null | undefined;
1182
+ lastSuccessAt?: Date | null | undefined;
1183
+ lastError?: string | null | undefined;
1184
+ xeroContactId?: string | null | undefined;
1185
+ invoices?: {
1186
+ id: number;
1187
+ createdAt: Date;
1188
+ updatedAt: Date;
1189
+ reservationXeroId: number;
1190
+ xeroInvoiceId: string;
1191
+ status?: string | null | undefined;
1192
+ xeroInvoiceNumber?: string | null | undefined;
1193
+ reference?: string | null | undefined;
1194
+ invoiceDate?: Date | null | undefined;
1195
+ dueDate?: Date | null | undefined;
1196
+ unitAmount?: number | null | undefined;
1197
+ }[] | undefined;
1198
+ }>>;
1102
1199
  isUnitChanged: z.ZodBoolean;
1103
- }, "id" | "status" | "propertyId" | "otaName" | "checkIn" | "checkOut">, {
1200
+ }, "id" | "status" | "propertyId" | "otaName" | "checkIn" | "checkOut"> & {
1104
1201
  propertyNickname: z.ZodOptional<z.ZodString>;
1105
1202
  property: z.ZodOptional<z.ZodObject<{
1106
1203
  id: z.ZodNumber;
@@ -1193,7 +1290,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
1193
1290
  customBundleId?: number | null | undefined;
1194
1291
  onboardingPlanChoice?: "HANDS_FREE_PRO" | "CUSTOM_BUILD" | undefined;
1195
1292
  }>>;
1196
- }>, "strip", z.ZodTypeAny, {
1293
+ }, "strip", z.ZodTypeAny, {
1197
1294
  id: number;
1198
1295
  status: "PENDING" | "CONFIRMED" | "CANCELLED";
1199
1296
  propertyId: number;
@@ -6,6 +6,7 @@ export * from "./rate-plan";
6
6
  export * from "./tier-pricing";
7
7
  export * from "./service";
8
8
  export * from "./reservation";
9
+ export * from "./reservation-xero";
9
10
  export * from "./reservation-original-unit";
10
11
  export * from "./tier-service";
11
12
  export * from "./image";
@@ -22,6 +22,7 @@ __exportStar(require("./rate-plan"), exports);
22
22
  __exportStar(require("./tier-pricing"), exports);
23
23
  __exportStar(require("./service"), exports);
24
24
  __exportStar(require("./reservation"), exports);
25
+ __exportStar(require("./reservation-xero"), exports);
25
26
  __exportStar(require("./reservation-original-unit"), exports);
26
27
  __exportStar(require("./tier-service"), exports);
27
28
  __exportStar(require("./image"), exports);
@@ -0,0 +1,7 @@
1
+ import { infer } from "zod";
2
+ import { ReservationXeroInvoiceSchema, ReservationXeroSchema } from "../../schemas/reservation-xero";
3
+ export interface ReservationXeroInvoice extends infer<typeof ReservationXeroInvoiceSchema> {
4
+ }
5
+ export interface ReservationXero extends infer<typeof ReservationXeroSchema> {
6
+ invoices?: ReservationXeroInvoice[];
7
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.2.43",
4
+ "version": "1.2.44",
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",
@@ -1,45 +0,0 @@
1
- export declare enum ServiceType {
2
- INTEGRATION = "INTEGRATION",
3
- ON_DEMAND = "ON_DEMAND",
4
- RECURRING = "RECURRING"
5
- }
6
- export declare enum TaskStatus {
7
- PENDING = "PENDING",
8
- CONFIRMED = "CONFIRMED",
9
- COMPLETED = "COMPLETED",
10
- CANCELLED = "CANCELLED"
11
- }
12
- export declare enum TaskPriority {
13
- LOW = "LOW",
14
- MEDIUM = "MEDIUM",
15
- HIGH = "HIGH"
16
- }
17
- export declare enum InvoiceType {
18
- SUBSCRIPTION = "SUBSCRIPTION",
19
- PURCHASE = "PURCHASE"
20
- }
21
- export declare enum InvoiceStatus {
22
- PENDING = "PENDING",
23
- PAID = "PAID",
24
- CANCELLED = "CANCELLED",
25
- FAILED = "FAILED"
26
- }
27
- export declare enum PriceType {
28
- PRORATED = "PRORATED",
29
- FULL = "FULL"
30
- }
31
- export declare enum PurchaseStatus {
32
- ACTIVE = "ACTIVE",
33
- CANCELLED = "CANCELLED",
34
- FAILED = "FAILED"
35
- }
36
- export declare enum SubscriptionStatus {
37
- INCOMPLETE = "INCOMPLETE",
38
- INCOMPLETE_EXPIRED = "INCOMPLETE_EXPIRED",
39
- TRIALING = "TRIALING",
40
- ACTIVE = "ACTIVE",
41
- PAST_DUE = "PAST_DUE",
42
- CANCELED = "CANCELED",
43
- UNPAID = "UNPAID",
44
- PAUSED = "PAUSED"
45
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SubscriptionStatus = exports.PurchaseStatus = exports.PriceType = exports.InvoiceStatus = exports.InvoiceType = exports.TaskPriority = exports.TaskStatus = exports.ServiceType = void 0;
4
- var ServiceType;
5
- (function (ServiceType) {
6
- ServiceType["INTEGRATION"] = "INTEGRATION";
7
- ServiceType["ON_DEMAND"] = "ON_DEMAND";
8
- ServiceType["RECURRING"] = "RECURRING";
9
- })(ServiceType || (exports.ServiceType = ServiceType = {}));
10
- var TaskStatus;
11
- (function (TaskStatus) {
12
- TaskStatus["PENDING"] = "PENDING";
13
- TaskStatus["CONFIRMED"] = "CONFIRMED";
14
- TaskStatus["COMPLETED"] = "COMPLETED";
15
- TaskStatus["CANCELLED"] = "CANCELLED";
16
- })(TaskStatus || (exports.TaskStatus = TaskStatus = {}));
17
- var TaskPriority;
18
- (function (TaskPriority) {
19
- TaskPriority["LOW"] = "LOW";
20
- TaskPriority["MEDIUM"] = "MEDIUM";
21
- TaskPriority["HIGH"] = "HIGH";
22
- })(TaskPriority || (exports.TaskPriority = TaskPriority = {}));
23
- var InvoiceType;
24
- (function (InvoiceType) {
25
- InvoiceType["SUBSCRIPTION"] = "SUBSCRIPTION";
26
- InvoiceType["PURCHASE"] = "PURCHASE";
27
- })(InvoiceType || (exports.InvoiceType = InvoiceType = {}));
28
- var InvoiceStatus;
29
- (function (InvoiceStatus) {
30
- InvoiceStatus["PENDING"] = "PENDING";
31
- InvoiceStatus["PAID"] = "PAID";
32
- InvoiceStatus["CANCELLED"] = "CANCELLED";
33
- InvoiceStatus["FAILED"] = "FAILED";
34
- })(InvoiceStatus || (exports.InvoiceStatus = InvoiceStatus = {}));
35
- var PriceType;
36
- (function (PriceType) {
37
- PriceType["PRORATED"] = "PRORATED";
38
- PriceType["FULL"] = "FULL";
39
- })(PriceType || (exports.PriceType = PriceType = {}));
40
- var PurchaseStatus;
41
- (function (PurchaseStatus) {
42
- PurchaseStatus["ACTIVE"] = "ACTIVE";
43
- PurchaseStatus["CANCELLED"] = "CANCELLED";
44
- PurchaseStatus["FAILED"] = "FAILED";
45
- })(PurchaseStatus || (exports.PurchaseStatus = PurchaseStatus = {}));
46
- var SubscriptionStatus;
47
- (function (SubscriptionStatus) {
48
- SubscriptionStatus["INCOMPLETE"] = "INCOMPLETE";
49
- SubscriptionStatus["INCOMPLETE_EXPIRED"] = "INCOMPLETE_EXPIRED";
50
- SubscriptionStatus["TRIALING"] = "TRIALING";
51
- SubscriptionStatus["ACTIVE"] = "ACTIVE";
52
- SubscriptionStatus["PAST_DUE"] = "PAST_DUE";
53
- SubscriptionStatus["CANCELED"] = "CANCELED";
54
- SubscriptionStatus["UNPAID"] = "UNPAID";
55
- SubscriptionStatus["PAUSED"] = "PAUSED";
56
- })(SubscriptionStatus || (exports.SubscriptionStatus = SubscriptionStatus = {}));
@@ -1,19 +0,0 @@
1
- export declare const servicePropertySchema: import("zod").ZodObject<{
2
- propertyId: import("zod").ZodNumber;
3
- serviceId: import("zod").ZodNumber;
4
- status: import("zod").ZodString;
5
- createdAt: import("zod").ZodDate;
6
- updatedAt: import("zod").ZodDate;
7
- }, "strip", import("zod").ZodTypeAny, {
8
- status: string;
9
- createdAt: Date;
10
- updatedAt: Date;
11
- serviceId: number;
12
- propertyId: number;
13
- }, {
14
- status: string;
15
- createdAt: Date;
16
- updatedAt: Date;
17
- serviceId: number;
18
- propertyId: number;
19
- }>;
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.servicePropertySchema = void 0;
4
- const zod_1 = require("zod");
5
- exports.servicePropertySchema = (0, zod_1.object)({
6
- propertyId: (0, zod_1.number)().int(),
7
- serviceId: (0, zod_1.number)().int(),
8
- status: (0, zod_1.string)(),
9
- createdAt: (0, zod_1.date)(),
10
- updatedAt: (0, zod_1.date)(),
11
- });
@@ -1,8 +0,0 @@
1
- import { infer } from "zod";
2
- import { servicePropertySchema } from "../../schemas/service-property";
3
- import { Property } from "../property";
4
- import { Service } from "../service";
5
- export interface ServiceProperty extends infer<typeof servicePropertySchema> {
6
- property?: Property;
7
- service?: Service;
8
- }