hububb-saas-shared 1.2.55 → 1.2.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.
- package/dist/schemas/api-key/index.d.ts +81 -0
- package/dist/schemas/api-key/index.js +33 -0
- package/dist/schemas/channex/booking.d.ts +2 -2
- package/dist/schemas/channex/thread.d.ts +2 -2
- package/dist/schemas/external-sync-request/index.d.ts +32 -0
- package/dist/schemas/external-sync-request/index.js +15 -0
- package/dist/schemas/price/index.d.ts +6 -4
- package/dist/schemas/price/index.js +11 -2
- package/dist/schemas/property/index.d.ts +0 -5
- package/dist/schemas/property/index.js +0 -1
- package/dist/schemas/property-metadata/index.d.ts +0 -3
- package/dist/schemas/property-metadata/index.js +0 -1
- package/dist/schemas/service-availability/index.d.ts +25 -0
- package/dist/schemas/service-availability/index.js +13 -0
- package/dist/schemas/service-worker-payout/index.d.ts +88 -0
- package/dist/schemas/service-worker-payout/index.js +36 -0
- package/dist/schemas/task-checklist-item/index.d.ts +2 -2
- package/dist/schemas/thread/index.d.ts +6 -6
- package/dist/schemas/webhook/index.d.ts +104 -0
- package/dist/schemas/webhook/index.js +41 -0
- package/dist/types/api-key/index.d.ts +10 -0
- package/dist/types/enums/index.d.ts +1 -1
- package/dist/types/enums/index.js +1 -1
- package/dist/types/external-sync-request/index.d.ts +4 -0
- package/dist/types/external-sync-request/index.js +2 -0
- package/dist/types/property/index.d.ts +2 -0
- package/dist/types/reservation/index.d.ts +2 -3
- package/dist/types/service-availability/index.d.ts +6 -0
- package/dist/types/service-availability/index.js +2 -0
- package/dist/types/service-worker-payout/index.d.ts +17 -0
- package/dist/types/service-worker-payout/index.js +2 -0
- package/dist/types/webhook/index.d.ts +15 -0
- package/dist/types/webhook/index.js +2 -0
- package/package.json +1 -1
- package/dist/schemas/enums/index.d.ts +0 -45
- package/dist/schemas/enums/index.js +0 -56
- package/dist/schemas/service-property/index.d.ts +0 -19
- package/dist/schemas/service-property/index.js +0 -11
- package/dist/types/service-property/index.d.ts +0 -8
- /package/dist/types/{service-property → api-key}/index.js +0 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { ApiKeyStatus } from "../../types/enums";
|
|
2
|
+
export declare const apiKeySchema: import("zod").ZodObject<{
|
|
3
|
+
id: import("zod").ZodString;
|
|
4
|
+
name: import("zod").ZodString;
|
|
5
|
+
prefix: import("zod").ZodString;
|
|
6
|
+
keyHash: import("zod").ZodString;
|
|
7
|
+
email: import("zod").ZodString;
|
|
8
|
+
userId: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
9
|
+
scopes: import("zod").ZodArray<import("zod").ZodString, "many">;
|
|
10
|
+
status: import("zod").ZodNativeEnum<typeof ApiKeyStatus>;
|
|
11
|
+
expiresAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
12
|
+
lastUsedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
13
|
+
revokedAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
14
|
+
revokedBy: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
15
|
+
createdBy: import("zod").ZodString;
|
|
16
|
+
createdAt: import("zod").ZodDate;
|
|
17
|
+
updatedAt: import("zod").ZodDate;
|
|
18
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
19
|
+
name: string;
|
|
20
|
+
id: string;
|
|
21
|
+
prefix: string;
|
|
22
|
+
email: string;
|
|
23
|
+
status: ApiKeyStatus;
|
|
24
|
+
createdAt: Date;
|
|
25
|
+
updatedAt: Date;
|
|
26
|
+
createdBy: string;
|
|
27
|
+
keyHash: string;
|
|
28
|
+
scopes: string[];
|
|
29
|
+
userId?: string | null | undefined;
|
|
30
|
+
expiresAt?: Date | null | undefined;
|
|
31
|
+
lastUsedAt?: Date | null | undefined;
|
|
32
|
+
revokedAt?: Date | null | undefined;
|
|
33
|
+
revokedBy?: string | null | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
name: string;
|
|
36
|
+
id: string;
|
|
37
|
+
prefix: string;
|
|
38
|
+
email: string;
|
|
39
|
+
status: ApiKeyStatus;
|
|
40
|
+
createdAt: Date;
|
|
41
|
+
updatedAt: Date;
|
|
42
|
+
createdBy: string;
|
|
43
|
+
keyHash: string;
|
|
44
|
+
scopes: string[];
|
|
45
|
+
userId?: string | null | undefined;
|
|
46
|
+
expiresAt?: Date | null | undefined;
|
|
47
|
+
lastUsedAt?: Date | null | undefined;
|
|
48
|
+
revokedAt?: Date | null | undefined;
|
|
49
|
+
revokedBy?: string | null | undefined;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const apiKeyUsageLogSchema: import("zod").ZodObject<{
|
|
52
|
+
id: import("zod").ZodString;
|
|
53
|
+
apiKeyId: import("zod").ZodString;
|
|
54
|
+
endpoint: import("zod").ZodString;
|
|
55
|
+
method: import("zod").ZodString;
|
|
56
|
+
statusCode: import("zod").ZodNumber;
|
|
57
|
+
responseTime: import("zod").ZodNumber;
|
|
58
|
+
ipAddress: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
59
|
+
userAgent: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
60
|
+
createdAt: import("zod").ZodDate;
|
|
61
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
62
|
+
id: string;
|
|
63
|
+
statusCode: number;
|
|
64
|
+
method: string;
|
|
65
|
+
createdAt: Date;
|
|
66
|
+
apiKeyId: string;
|
|
67
|
+
endpoint: string;
|
|
68
|
+
responseTime: number;
|
|
69
|
+
ipAddress?: string | null | undefined;
|
|
70
|
+
userAgent?: string | null | undefined;
|
|
71
|
+
}, {
|
|
72
|
+
id: string;
|
|
73
|
+
statusCode: number;
|
|
74
|
+
method: string;
|
|
75
|
+
createdAt: Date;
|
|
76
|
+
apiKeyId: string;
|
|
77
|
+
endpoint: string;
|
|
78
|
+
responseTime: number;
|
|
79
|
+
ipAddress?: string | null | undefined;
|
|
80
|
+
userAgent?: string | null | undefined;
|
|
81
|
+
}>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.apiKeyUsageLogSchema = exports.apiKeySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../../types/enums");
|
|
6
|
+
exports.apiKeySchema = (0, zod_1.object)({
|
|
7
|
+
id: (0, zod_1.string)(),
|
|
8
|
+
name: (0, zod_1.string)(),
|
|
9
|
+
prefix: (0, zod_1.string)(),
|
|
10
|
+
keyHash: (0, zod_1.string)(),
|
|
11
|
+
email: (0, zod_1.string)(),
|
|
12
|
+
userId: (0, zod_1.string)().nullish(),
|
|
13
|
+
scopes: (0, zod_1.string)().array(),
|
|
14
|
+
status: (0, zod_1.nativeEnum)(enums_1.ApiKeyStatus),
|
|
15
|
+
expiresAt: (0, zod_1.date)().nullish(),
|
|
16
|
+
lastUsedAt: (0, zod_1.date)().nullish(),
|
|
17
|
+
revokedAt: (0, zod_1.date)().nullish(),
|
|
18
|
+
revokedBy: (0, zod_1.string)().nullish(),
|
|
19
|
+
createdBy: (0, zod_1.string)(),
|
|
20
|
+
createdAt: (0, zod_1.date)(),
|
|
21
|
+
updatedAt: (0, zod_1.date)(),
|
|
22
|
+
});
|
|
23
|
+
exports.apiKeyUsageLogSchema = (0, zod_1.object)({
|
|
24
|
+
id: (0, zod_1.string)(),
|
|
25
|
+
apiKeyId: (0, zod_1.string)(),
|
|
26
|
+
endpoint: (0, zod_1.string)(),
|
|
27
|
+
method: (0, zod_1.string)(),
|
|
28
|
+
statusCode: (0, zod_1.number)().int(),
|
|
29
|
+
responseTime: (0, zod_1.number)().int(),
|
|
30
|
+
ipAddress: (0, zod_1.string)().nullish(),
|
|
31
|
+
userAgent: (0, zod_1.string)().nullish(),
|
|
32
|
+
createdAt: (0, zod_1.date)(),
|
|
33
|
+
});
|
|
@@ -1086,9 +1086,9 @@ export declare const WebhookChannexBookingSchema: import("zod").ZodObject<{
|
|
|
1086
1086
|
}>;
|
|
1087
1087
|
property_id: import("zod").ZodString;
|
|
1088
1088
|
}, "strip", import("zod").ZodTypeAny, {
|
|
1089
|
+
timestamp: string;
|
|
1089
1090
|
event: string;
|
|
1090
1091
|
property_id: string;
|
|
1091
|
-
timestamp: string;
|
|
1092
1092
|
payload: {
|
|
1093
1093
|
property_id: string;
|
|
1094
1094
|
revision_id: string;
|
|
@@ -1096,9 +1096,9 @@ export declare const WebhookChannexBookingSchema: import("zod").ZodObject<{
|
|
|
1096
1096
|
};
|
|
1097
1097
|
user_id?: string | null | undefined;
|
|
1098
1098
|
}, {
|
|
1099
|
+
timestamp: string;
|
|
1099
1100
|
event: string;
|
|
1100
1101
|
property_id: string;
|
|
1101
|
-
timestamp: string;
|
|
1102
1102
|
payload: {
|
|
1103
1103
|
property_id: string;
|
|
1104
1104
|
revision_id: string;
|
|
@@ -277,9 +277,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
|
277
277
|
}>;
|
|
278
278
|
property_id: import("zod").ZodString;
|
|
279
279
|
}, "strip", import("zod").ZodTypeAny, {
|
|
280
|
+
timestamp: string;
|
|
280
281
|
event: string;
|
|
281
282
|
property_id: string;
|
|
282
|
-
timestamp: string;
|
|
283
283
|
payload: {
|
|
284
284
|
message: string;
|
|
285
285
|
id: string;
|
|
@@ -294,9 +294,9 @@ export declare const WebhookChannexMessageSchema: import("zod").ZodObject<{
|
|
|
294
294
|
};
|
|
295
295
|
user_id?: string | null | undefined;
|
|
296
296
|
}, {
|
|
297
|
+
timestamp: string;
|
|
297
298
|
event: string;
|
|
298
299
|
property_id: string;
|
|
299
|
-
timestamp: string;
|
|
300
300
|
payload: {
|
|
301
301
|
message: string;
|
|
302
302
|
id: string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const externalSyncRequestSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
userId: z.ZodString;
|
|
5
|
+
apiKeyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
idempotencyKey: z.ZodString;
|
|
7
|
+
method: z.ZodString;
|
|
8
|
+
endpoint: z.ZodString;
|
|
9
|
+
responseStatus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10
|
+
responseBody: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
|
|
11
|
+
createdAt: z.ZodDate;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
id: string;
|
|
14
|
+
method: string;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
userId: string;
|
|
17
|
+
endpoint: string;
|
|
18
|
+
idempotencyKey: string;
|
|
19
|
+
apiKeyId?: string | null | undefined;
|
|
20
|
+
responseStatus?: number | null | undefined;
|
|
21
|
+
responseBody?: unknown;
|
|
22
|
+
}, {
|
|
23
|
+
id: string;
|
|
24
|
+
method: string;
|
|
25
|
+
createdAt: Date;
|
|
26
|
+
userId: string;
|
|
27
|
+
endpoint: string;
|
|
28
|
+
idempotencyKey: string;
|
|
29
|
+
apiKeyId?: string | null | undefined;
|
|
30
|
+
responseStatus?: number | null | undefined;
|
|
31
|
+
responseBody?: unknown;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.externalSyncRequestSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.externalSyncRequestSchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.string)(),
|
|
7
|
+
userId: (0, zod_1.string)(),
|
|
8
|
+
apiKeyId: (0, zod_1.string)().nullish(),
|
|
9
|
+
idempotencyKey: (0, zod_1.string)(),
|
|
10
|
+
method: (0, zod_1.string)(),
|
|
11
|
+
endpoint: (0, zod_1.string)(),
|
|
12
|
+
responseStatus: (0, zod_1.number)().int().nullish(),
|
|
13
|
+
responseBody: zod_1.z.unknown().nullish(),
|
|
14
|
+
createdAt: (0, zod_1.date)(),
|
|
15
|
+
});
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { PassThroughTaxesCollectionType } from "../../types/enums";
|
|
3
2
|
export declare const PriceSchema: z.ZodObject<{
|
|
4
3
|
id: z.ZodNumber;
|
|
5
4
|
propertyId: z.ZodNumber;
|
|
@@ -25,8 +24,9 @@ export declare const PriceSchema: z.ZodObject<{
|
|
|
25
24
|
tripLengthDiscountPct: z.ZodNullable<z.ZodNumber>;
|
|
26
25
|
newListingPromotionPct: z.ZodNullable<z.ZodNumber>;
|
|
27
26
|
newListingPromotionEndsAt: z.ZodNullable<z.ZodDate>;
|
|
27
|
+
newListingPromotionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AVAILABLE", "ONGOING", "EXPIRED"]>>>;
|
|
28
28
|
additionalDiscounts: z.ZodOptional<z.ZodUnknown>;
|
|
29
|
-
passThroughTaxesCollectionType: z.ZodOptional<z.
|
|
29
|
+
passThroughTaxesCollectionType: z.ZodOptional<z.ZodEnum<["NO_AIRBNB_COLLECTED_TAX", "OVERRIDE_AIRBNB_COLLECTED_TAX", "STACKED_AIRBNB_COLLECTED_TAX", "INELIGIBLE", "UNDEFINED"]>>;
|
|
30
30
|
}, "strip", z.ZodTypeAny, {
|
|
31
31
|
currency: string;
|
|
32
32
|
id: number;
|
|
@@ -52,8 +52,9 @@ export declare const PriceSchema: z.ZodObject<{
|
|
|
52
52
|
tripLengthDiscountPct: number | null;
|
|
53
53
|
newListingPromotionPct: number | null;
|
|
54
54
|
newListingPromotionEndsAt: Date | null;
|
|
55
|
+
newListingPromotionStatus?: "AVAILABLE" | "ONGOING" | "EXPIRED" | null | undefined;
|
|
55
56
|
additionalDiscounts?: unknown;
|
|
56
|
-
passThroughTaxesCollectionType?:
|
|
57
|
+
passThroughTaxesCollectionType?: "NO_AIRBNB_COLLECTED_TAX" | "OVERRIDE_AIRBNB_COLLECTED_TAX" | "STACKED_AIRBNB_COLLECTED_TAX" | "INELIGIBLE" | "UNDEFINED" | undefined;
|
|
57
58
|
}, {
|
|
58
59
|
currency: string;
|
|
59
60
|
id: number;
|
|
@@ -79,6 +80,7 @@ export declare const PriceSchema: z.ZodObject<{
|
|
|
79
80
|
tripLengthDiscountPct: number | null;
|
|
80
81
|
newListingPromotionPct: number | null;
|
|
81
82
|
newListingPromotionEndsAt: Date | null;
|
|
83
|
+
newListingPromotionStatus?: "AVAILABLE" | "ONGOING" | "EXPIRED" | null | undefined;
|
|
82
84
|
additionalDiscounts?: unknown;
|
|
83
|
-
passThroughTaxesCollectionType?:
|
|
85
|
+
passThroughTaxesCollectionType?: "NO_AIRBNB_COLLECTED_TAX" | "OVERRIDE_AIRBNB_COLLECTED_TAX" | "STACKED_AIRBNB_COLLECTED_TAX" | "INELIGIBLE" | "UNDEFINED" | undefined;
|
|
84
86
|
}>;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PriceSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const enums_1 = require("../../types/enums");
|
|
6
5
|
exports.PriceSchema = (0, zod_1.object)({
|
|
7
6
|
id: (0, zod_1.number)(),
|
|
8
7
|
propertyId: (0, zod_1.number)(),
|
|
@@ -29,8 +28,18 @@ exports.PriceSchema = (0, zod_1.object)({
|
|
|
29
28
|
tripLengthDiscountPct: (0, zod_1.number)().nullable(),
|
|
30
29
|
newListingPromotionPct: (0, zod_1.number)().nullable(),
|
|
31
30
|
newListingPromotionEndsAt: (0, zod_1.date)().nullable(),
|
|
31
|
+
newListingPromotionStatus: zod_1.z
|
|
32
|
+
.enum(["AVAILABLE", "ONGOING", "EXPIRED"])
|
|
33
|
+
.nullable()
|
|
34
|
+
.optional(),
|
|
32
35
|
additionalDiscounts: zod_1.z.unknown().optional(),
|
|
33
36
|
passThroughTaxesCollectionType: zod_1.z
|
|
34
|
-
.
|
|
37
|
+
.enum([
|
|
38
|
+
"NO_AIRBNB_COLLECTED_TAX",
|
|
39
|
+
"OVERRIDE_AIRBNB_COLLECTED_TAX",
|
|
40
|
+
"STACKED_AIRBNB_COLLECTED_TAX",
|
|
41
|
+
"INELIGIBLE",
|
|
42
|
+
"UNDEFINED",
|
|
43
|
+
])
|
|
35
44
|
.optional(),
|
|
36
45
|
});
|
|
@@ -201,7 +201,6 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
201
201
|
checkInInstructions: z.ZodOptional<z.ZodString>;
|
|
202
202
|
checkOutInstructions: z.ZodOptional<z.ZodString>;
|
|
203
203
|
checkInAgent: z.ZodOptional<z.ZodString>;
|
|
204
|
-
checkInMethod: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
205
204
|
rubbishCollection: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
206
205
|
noSmokingFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
207
206
|
noPartyingFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -235,7 +234,6 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
235
234
|
checkInInstructions?: string | undefined;
|
|
236
235
|
checkOutInstructions?: string | undefined;
|
|
237
236
|
checkInAgent?: string | undefined;
|
|
238
|
-
checkInMethod?: string | null | undefined;
|
|
239
237
|
rubbishCollection?: string | null | undefined;
|
|
240
238
|
noSmokingFee?: string | null | undefined;
|
|
241
239
|
noPartyingFee?: string | null | undefined;
|
|
@@ -267,7 +265,6 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
267
265
|
checkInInstructions?: string | undefined;
|
|
268
266
|
checkOutInstructions?: string | undefined;
|
|
269
267
|
checkInAgent?: string | undefined;
|
|
270
|
-
checkInMethod?: string | null | undefined;
|
|
271
268
|
rubbishCollection?: string | null | undefined;
|
|
272
269
|
noSmokingFee?: string | null | undefined;
|
|
273
270
|
noPartyingFee?: string | null | undefined;
|
|
@@ -447,7 +444,6 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
447
444
|
checkInInstructions?: string | undefined;
|
|
448
445
|
checkOutInstructions?: string | undefined;
|
|
449
446
|
checkInAgent?: string | undefined;
|
|
450
|
-
checkInMethod?: string | null | undefined;
|
|
451
447
|
rubbishCollection?: string | null | undefined;
|
|
452
448
|
noSmokingFee?: string | null | undefined;
|
|
453
449
|
noPartyingFee?: string | null | undefined;
|
|
@@ -557,7 +553,6 @@ export declare const updatePropertySchema: z.ZodObject<{
|
|
|
557
553
|
checkInInstructions?: string | undefined;
|
|
558
554
|
checkOutInstructions?: string | undefined;
|
|
559
555
|
checkInAgent?: string | undefined;
|
|
560
|
-
checkInMethod?: string | null | undefined;
|
|
561
556
|
rubbishCollection?: string | null | undefined;
|
|
562
557
|
noSmokingFee?: string | null | undefined;
|
|
563
558
|
noPartyingFee?: string | null | undefined;
|
|
@@ -111,7 +111,6 @@ exports.updatePropertySchema = (0, zod_1.object)({
|
|
|
111
111
|
checkInInstructions: (0, zod_1.string)().optional(),
|
|
112
112
|
checkOutInstructions: (0, zod_1.string)().optional(),
|
|
113
113
|
checkInAgent: (0, zod_1.string)().optional(),
|
|
114
|
-
checkInMethod: (0, zod_1.string)().nullish(),
|
|
115
114
|
rubbishCollection: (0, zod_1.string)().nullish(),
|
|
116
115
|
noSmokingFee: (0, zod_1.string)().nullish(),
|
|
117
116
|
noPartyingFee: (0, zod_1.string)().nullish(),
|
|
@@ -8,7 +8,6 @@ export declare const propertyMetadataSchema: z.ZodObject<{
|
|
|
8
8
|
checkInAgent: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
9
|
checkInInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
10
10
|
checkOutInstructions: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
-
checkInMethod: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
11
|
rubbishCollection: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
12
|
noSmokingFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
13
|
noPartyingFee: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -74,7 +73,6 @@ export declare const propertyMetadataSchema: z.ZodObject<{
|
|
|
74
73
|
checkInInstructions?: string | null | undefined;
|
|
75
74
|
checkOutInstructions?: string | null | undefined;
|
|
76
75
|
checkInAgent?: string | null | undefined;
|
|
77
|
-
checkInMethod?: string | null | undefined;
|
|
78
76
|
rubbishCollection?: string | null | undefined;
|
|
79
77
|
noSmokingFee?: string | null | undefined;
|
|
80
78
|
noPartyingFee?: string | null | undefined;
|
|
@@ -108,7 +106,6 @@ export declare const propertyMetadataSchema: z.ZodObject<{
|
|
|
108
106
|
checkInInstructions?: string | null | undefined;
|
|
109
107
|
checkOutInstructions?: string | null | undefined;
|
|
110
108
|
checkInAgent?: string | null | undefined;
|
|
111
|
-
checkInMethod?: string | null | undefined;
|
|
112
109
|
rubbishCollection?: string | null | undefined;
|
|
113
110
|
noSmokingFee?: string | null | undefined;
|
|
114
111
|
noPartyingFee?: string | null | undefined;
|
|
@@ -15,7 +15,6 @@ exports.propertyMetadataSchema = (0, zod_1.object)({
|
|
|
15
15
|
checkInAgent: (0, zod_1.string)().nullish(),
|
|
16
16
|
checkInInstructions: (0, zod_1.string)().nullish(),
|
|
17
17
|
checkOutInstructions: (0, zod_1.string)().nullish(),
|
|
18
|
-
checkInMethod: (0, zod_1.string)().nullish(),
|
|
19
18
|
rubbishCollection: (0, zod_1.string)().nullish(),
|
|
20
19
|
noSmokingFee: (0, zod_1.string)().nullish(),
|
|
21
20
|
noPartyingFee: (0, zod_1.string)().nullish(),
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const serviceAvailabilitySchema: import("zod").ZodObject<{
|
|
2
|
+
id: import("zod").ZodNumber;
|
|
3
|
+
serviceId: import("zod").ZodNumber;
|
|
4
|
+
dayOfWeek: import("zod").ZodNumber;
|
|
5
|
+
startTime: import("zod").ZodString;
|
|
6
|
+
endTime: import("zod").ZodString;
|
|
7
|
+
createdAt: import("zod").ZodDate;
|
|
8
|
+
updatedAt: import("zod").ZodDate;
|
|
9
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
10
|
+
endTime: string;
|
|
11
|
+
startTime: string;
|
|
12
|
+
id: number;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
updatedAt: Date;
|
|
15
|
+
serviceId: number;
|
|
16
|
+
dayOfWeek: number;
|
|
17
|
+
}, {
|
|
18
|
+
endTime: string;
|
|
19
|
+
startTime: string;
|
|
20
|
+
id: number;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
updatedAt: Date;
|
|
23
|
+
serviceId: number;
|
|
24
|
+
dayOfWeek: number;
|
|
25
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serviceAvailabilitySchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.serviceAvailabilitySchema = (0, zod_1.object)({
|
|
6
|
+
id: (0, zod_1.number)().int(),
|
|
7
|
+
serviceId: (0, zod_1.number)().int(),
|
|
8
|
+
dayOfWeek: (0, zod_1.number)().int(),
|
|
9
|
+
startTime: (0, zod_1.string)(),
|
|
10
|
+
endTime: (0, zod_1.string)(),
|
|
11
|
+
createdAt: (0, zod_1.date)(),
|
|
12
|
+
updatedAt: (0, zod_1.date)(),
|
|
13
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ServiceWorkerPayoutStatus } from "../../types/enums";
|
|
2
|
+
export declare const serviceWorkerPayoutInfoSchema: import("zod").ZodObject<{
|
|
3
|
+
id: import("zod").ZodNumber;
|
|
4
|
+
serviceWorkerId: import("zod").ZodNumber;
|
|
5
|
+
fullName: import("zod").ZodString;
|
|
6
|
+
sortCode: import("zod").ZodString;
|
|
7
|
+
accountNumber: import("zod").ZodString;
|
|
8
|
+
createdAt: import("zod").ZodDate;
|
|
9
|
+
updatedAt: import("zod").ZodDate;
|
|
10
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
11
|
+
id: number;
|
|
12
|
+
createdAt: Date;
|
|
13
|
+
updatedAt: Date;
|
|
14
|
+
accountNumber: string;
|
|
15
|
+
fullName: string;
|
|
16
|
+
sortCode: string;
|
|
17
|
+
serviceWorkerId: number;
|
|
18
|
+
}, {
|
|
19
|
+
id: number;
|
|
20
|
+
createdAt: Date;
|
|
21
|
+
updatedAt: Date;
|
|
22
|
+
accountNumber: string;
|
|
23
|
+
fullName: string;
|
|
24
|
+
sortCode: string;
|
|
25
|
+
serviceWorkerId: number;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const serviceWorkerPayoutSchema: import("zod").ZodObject<{
|
|
28
|
+
id: import("zod").ZodNumber;
|
|
29
|
+
createdAt: import("zod").ZodDate;
|
|
30
|
+
updatedAt: import("zod").ZodDate;
|
|
31
|
+
total: import("zod").ZodNumber;
|
|
32
|
+
status: import("zod").ZodNativeEnum<typeof ServiceWorkerPayoutStatus>;
|
|
33
|
+
payoutDate: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
34
|
+
opsSeenAt: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodDate>>;
|
|
35
|
+
currency: import("zod").ZodString;
|
|
36
|
+
payoutInfoId: import("zod").ZodNumber;
|
|
37
|
+
invoiceUrl: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodString>>;
|
|
38
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
39
|
+
currency: string;
|
|
40
|
+
id: number;
|
|
41
|
+
total: number;
|
|
42
|
+
status: ServiceWorkerPayoutStatus;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
updatedAt: Date;
|
|
45
|
+
payoutInfoId: number;
|
|
46
|
+
payoutDate?: Date | null | undefined;
|
|
47
|
+
opsSeenAt?: Date | null | undefined;
|
|
48
|
+
invoiceUrl?: string | null | undefined;
|
|
49
|
+
}, {
|
|
50
|
+
currency: string;
|
|
51
|
+
id: number;
|
|
52
|
+
total: number;
|
|
53
|
+
status: ServiceWorkerPayoutStatus;
|
|
54
|
+
createdAt: Date;
|
|
55
|
+
updatedAt: Date;
|
|
56
|
+
payoutInfoId: number;
|
|
57
|
+
payoutDate?: Date | null | undefined;
|
|
58
|
+
opsSeenAt?: Date | null | undefined;
|
|
59
|
+
invoiceUrl?: string | null | undefined;
|
|
60
|
+
}>;
|
|
61
|
+
export declare const serviceWorkerWorkingHoursSchema: import("zod").ZodObject<{
|
|
62
|
+
id: import("zod").ZodNumber;
|
|
63
|
+
serviceWorkerId: import("zod").ZodNumber;
|
|
64
|
+
dayOfWeek: import("zod").ZodNumber;
|
|
65
|
+
isEnabled: import("zod").ZodBoolean;
|
|
66
|
+
startTime: import("zod").ZodString;
|
|
67
|
+
endTime: import("zod").ZodString;
|
|
68
|
+
createdAt: import("zod").ZodDate;
|
|
69
|
+
updatedAt: import("zod").ZodDate;
|
|
70
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
71
|
+
endTime: string;
|
|
72
|
+
startTime: string;
|
|
73
|
+
id: number;
|
|
74
|
+
createdAt: Date;
|
|
75
|
+
updatedAt: Date;
|
|
76
|
+
serviceWorkerId: number;
|
|
77
|
+
dayOfWeek: number;
|
|
78
|
+
isEnabled: boolean;
|
|
79
|
+
}, {
|
|
80
|
+
endTime: string;
|
|
81
|
+
startTime: string;
|
|
82
|
+
id: number;
|
|
83
|
+
createdAt: Date;
|
|
84
|
+
updatedAt: Date;
|
|
85
|
+
serviceWorkerId: number;
|
|
86
|
+
dayOfWeek: number;
|
|
87
|
+
isEnabled: boolean;
|
|
88
|
+
}>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serviceWorkerWorkingHoursSchema = exports.serviceWorkerPayoutSchema = exports.serviceWorkerPayoutInfoSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../../types/enums");
|
|
6
|
+
exports.serviceWorkerPayoutInfoSchema = (0, zod_1.object)({
|
|
7
|
+
id: (0, zod_1.number)().int(),
|
|
8
|
+
serviceWorkerId: (0, zod_1.number)().int(),
|
|
9
|
+
fullName: (0, zod_1.string)(),
|
|
10
|
+
sortCode: (0, zod_1.string)(),
|
|
11
|
+
accountNumber: (0, zod_1.string)(),
|
|
12
|
+
createdAt: (0, zod_1.date)(),
|
|
13
|
+
updatedAt: (0, zod_1.date)(),
|
|
14
|
+
});
|
|
15
|
+
exports.serviceWorkerPayoutSchema = (0, zod_1.object)({
|
|
16
|
+
id: (0, zod_1.number)().int(),
|
|
17
|
+
createdAt: (0, zod_1.date)(),
|
|
18
|
+
updatedAt: (0, zod_1.date)(),
|
|
19
|
+
total: (0, zod_1.number)(),
|
|
20
|
+
status: (0, zod_1.nativeEnum)(enums_1.ServiceWorkerPayoutStatus),
|
|
21
|
+
payoutDate: (0, zod_1.date)().nullish(),
|
|
22
|
+
opsSeenAt: (0, zod_1.date)().nullish(),
|
|
23
|
+
currency: (0, zod_1.string)(),
|
|
24
|
+
payoutInfoId: (0, zod_1.number)().int(),
|
|
25
|
+
invoiceUrl: (0, zod_1.string)().nullish(),
|
|
26
|
+
});
|
|
27
|
+
exports.serviceWorkerWorkingHoursSchema = (0, zod_1.object)({
|
|
28
|
+
id: (0, zod_1.number)().int(),
|
|
29
|
+
serviceWorkerId: (0, zod_1.number)().int(),
|
|
30
|
+
dayOfWeek: (0, zod_1.number)().int(),
|
|
31
|
+
isEnabled: (0, zod_1.boolean)(),
|
|
32
|
+
startTime: (0, zod_1.string)(),
|
|
33
|
+
endTime: (0, zod_1.string)(),
|
|
34
|
+
createdAt: (0, zod_1.date)(),
|
|
35
|
+
updatedAt: (0, zod_1.date)(),
|
|
36
|
+
});
|
|
@@ -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
|
}>;
|
|
@@ -961,7 +961,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
961
961
|
} | undefined;
|
|
962
962
|
}>>;
|
|
963
963
|
participantIds: z.ZodArray<z.ZodString, "many">;
|
|
964
|
-
participants: z.ZodOptional<z.ZodArray<z.ZodObject<
|
|
964
|
+
participants: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
965
965
|
id: z.ZodString;
|
|
966
966
|
name: z.ZodString;
|
|
967
967
|
email: z.ZodString;
|
|
@@ -995,7 +995,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
995
995
|
isKlevioAvailable: z.ZodOptional<z.ZodBoolean>;
|
|
996
996
|
stripeTrialSubscriptionId: z.ZodOptional<z.ZodString>;
|
|
997
997
|
publicHostSlug: z.ZodOptional<z.ZodString>;
|
|
998
|
-
}
|
|
998
|
+
} & {
|
|
999
999
|
userRole: z.ZodOptional<z.ZodObject<{
|
|
1000
1000
|
id: z.ZodNumber;
|
|
1001
1001
|
name: z.ZodString;
|
|
@@ -1012,7 +1012,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1012
1012
|
createdAt: Date;
|
|
1013
1013
|
updatedAt: Date;
|
|
1014
1014
|
}>>;
|
|
1015
|
-
}
|
|
1015
|
+
}, "strip", z.ZodTypeAny, {
|
|
1016
1016
|
name: string;
|
|
1017
1017
|
id: string;
|
|
1018
1018
|
email: string;
|
|
@@ -1104,7 +1104,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1104
1104
|
needsAttentionMap: z.ZodRecord<z.ZodString, z.ZodBoolean>;
|
|
1105
1105
|
propertyId: z.ZodOptional<z.ZodNumber>;
|
|
1106
1106
|
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
1107
|
-
reservation: z.ZodOptional<z.ZodObject<
|
|
1107
|
+
reservation: z.ZodOptional<z.ZodObject<Pick<{
|
|
1108
1108
|
id: z.ZodNumber;
|
|
1109
1109
|
status: z.ZodEnum<["CONFIRMED", "CANCELLED", "PENDING"]>;
|
|
1110
1110
|
currency: z.ZodString;
|
|
@@ -1237,7 +1237,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1237
1237
|
}[] | undefined;
|
|
1238
1238
|
}>>;
|
|
1239
1239
|
isUnitChanged: z.ZodBoolean;
|
|
1240
|
-
}, "id" | "status" | "propertyId" | "otaName" | "checkIn" | "checkOut"
|
|
1240
|
+
}, "id" | "status" | "propertyId" | "otaName" | "checkIn" | "checkOut"> & {
|
|
1241
1241
|
propertyNickname: z.ZodOptional<z.ZodString>;
|
|
1242
1242
|
property: z.ZodOptional<z.ZodObject<{
|
|
1243
1243
|
id: z.ZodNumber;
|
|
@@ -1336,7 +1336,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1336
1336
|
hasAvailability?: boolean | undefined;
|
|
1337
1337
|
publicListingSlug?: string | null | undefined;
|
|
1338
1338
|
}>>;
|
|
1339
|
-
}
|
|
1339
|
+
}, "strip", z.ZodTypeAny, {
|
|
1340
1340
|
id: number;
|
|
1341
1341
|
status: "PENDING" | "CONFIRMED" | "CANCELLED";
|
|
1342
1342
|
propertyId: number;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { WebhookDeliveryStatus, WebhookEndpointStatus } from "../../types/enums";
|
|
3
|
+
export declare const webhookEndpointSchema: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
userId: z.ZodString;
|
|
6
|
+
url: z.ZodString;
|
|
7
|
+
secret: z.ZodString;
|
|
8
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
|
+
events: z.ZodArray<z.ZodString, "many">;
|
|
10
|
+
status: z.ZodNativeEnum<typeof WebhookEndpointStatus>;
|
|
11
|
+
apiKeyId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
12
|
+
createdAt: z.ZodDate;
|
|
13
|
+
updatedAt: z.ZodDate;
|
|
14
|
+
}, "strip", z.ZodTypeAny, {
|
|
15
|
+
id: string;
|
|
16
|
+
url: string;
|
|
17
|
+
secret: string;
|
|
18
|
+
status: WebhookEndpointStatus;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
updatedAt: Date;
|
|
21
|
+
userId: string;
|
|
22
|
+
events: string[];
|
|
23
|
+
description?: string | null | undefined;
|
|
24
|
+
apiKeyId?: string | null | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
id: string;
|
|
27
|
+
url: string;
|
|
28
|
+
secret: string;
|
|
29
|
+
status: WebhookEndpointStatus;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
userId: string;
|
|
33
|
+
events: string[];
|
|
34
|
+
description?: string | null | undefined;
|
|
35
|
+
apiKeyId?: string | null | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
export declare const webhookEventSchema: z.ZodObject<{
|
|
38
|
+
id: z.ZodString;
|
|
39
|
+
userId: z.ZodString;
|
|
40
|
+
type: z.ZodString;
|
|
41
|
+
payload: z.ZodUnknown;
|
|
42
|
+
propertyId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
43
|
+
roomId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
44
|
+
source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
45
|
+
createdAt: z.ZodDate;
|
|
46
|
+
}, "strip", z.ZodTypeAny, {
|
|
47
|
+
type: string;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
userId: string;
|
|
51
|
+
source?: string | null | undefined;
|
|
52
|
+
propertyId?: number | null | undefined;
|
|
53
|
+
roomId?: number | null | undefined;
|
|
54
|
+
payload?: unknown;
|
|
55
|
+
}, {
|
|
56
|
+
type: string;
|
|
57
|
+
id: string;
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
userId: string;
|
|
60
|
+
source?: string | null | undefined;
|
|
61
|
+
propertyId?: number | null | undefined;
|
|
62
|
+
roomId?: number | null | undefined;
|
|
63
|
+
payload?: unknown;
|
|
64
|
+
}>;
|
|
65
|
+
export declare const webhookDeliverySchema: z.ZodObject<{
|
|
66
|
+
id: z.ZodString;
|
|
67
|
+
endpointId: z.ZodString;
|
|
68
|
+
eventId: z.ZodString;
|
|
69
|
+
status: z.ZodNativeEnum<typeof WebhookDeliveryStatus>;
|
|
70
|
+
attemptCount: z.ZodNumber;
|
|
71
|
+
maxAttempts: z.ZodNumber;
|
|
72
|
+
lastAttemptAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
73
|
+
responseStatus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
74
|
+
responseBody: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
createdAt: z.ZodDate;
|
|
77
|
+
updatedAt: z.ZodDate;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
id: string;
|
|
80
|
+
status: WebhookDeliveryStatus;
|
|
81
|
+
createdAt: Date;
|
|
82
|
+
updatedAt: Date;
|
|
83
|
+
eventId: string;
|
|
84
|
+
endpointId: string;
|
|
85
|
+
attemptCount: number;
|
|
86
|
+
maxAttempts: number;
|
|
87
|
+
error?: string | null | undefined;
|
|
88
|
+
lastAttemptAt?: Date | null | undefined;
|
|
89
|
+
responseStatus?: number | null | undefined;
|
|
90
|
+
responseBody?: string | null | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
id: string;
|
|
93
|
+
status: WebhookDeliveryStatus;
|
|
94
|
+
createdAt: Date;
|
|
95
|
+
updatedAt: Date;
|
|
96
|
+
eventId: string;
|
|
97
|
+
endpointId: string;
|
|
98
|
+
attemptCount: number;
|
|
99
|
+
maxAttempts: number;
|
|
100
|
+
error?: string | null | undefined;
|
|
101
|
+
lastAttemptAt?: Date | null | undefined;
|
|
102
|
+
responseStatus?: number | null | undefined;
|
|
103
|
+
responseBody?: string | null | undefined;
|
|
104
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webhookDeliverySchema = exports.webhookEventSchema = exports.webhookEndpointSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const enums_1 = require("../../types/enums");
|
|
6
|
+
exports.webhookEndpointSchema = (0, zod_1.object)({
|
|
7
|
+
id: (0, zod_1.string)(),
|
|
8
|
+
userId: (0, zod_1.string)(),
|
|
9
|
+
url: (0, zod_1.string)(),
|
|
10
|
+
secret: (0, zod_1.string)(),
|
|
11
|
+
description: (0, zod_1.string)().nullish(),
|
|
12
|
+
events: (0, zod_1.string)().array(),
|
|
13
|
+
status: (0, zod_1.nativeEnum)(enums_1.WebhookEndpointStatus),
|
|
14
|
+
apiKeyId: (0, zod_1.string)().nullish(),
|
|
15
|
+
createdAt: (0, zod_1.date)(),
|
|
16
|
+
updatedAt: (0, zod_1.date)(),
|
|
17
|
+
});
|
|
18
|
+
exports.webhookEventSchema = (0, zod_1.object)({
|
|
19
|
+
id: (0, zod_1.string)(),
|
|
20
|
+
userId: (0, zod_1.string)(),
|
|
21
|
+
type: (0, zod_1.string)(),
|
|
22
|
+
payload: zod_1.z.unknown(),
|
|
23
|
+
propertyId: (0, zod_1.number)().int().nullish(),
|
|
24
|
+
roomId: (0, zod_1.number)().int().nullish(),
|
|
25
|
+
source: (0, zod_1.string)().nullish(),
|
|
26
|
+
createdAt: (0, zod_1.date)(),
|
|
27
|
+
});
|
|
28
|
+
exports.webhookDeliverySchema = (0, zod_1.object)({
|
|
29
|
+
id: (0, zod_1.string)(),
|
|
30
|
+
endpointId: (0, zod_1.string)(),
|
|
31
|
+
eventId: (0, zod_1.string)(),
|
|
32
|
+
status: (0, zod_1.nativeEnum)(enums_1.WebhookDeliveryStatus),
|
|
33
|
+
attemptCount: (0, zod_1.number)().int(),
|
|
34
|
+
maxAttempts: (0, zod_1.number)().int(),
|
|
35
|
+
lastAttemptAt: (0, zod_1.date)().nullish(),
|
|
36
|
+
responseStatus: (0, zod_1.number)().int().nullish(),
|
|
37
|
+
responseBody: (0, zod_1.string)().nullish(),
|
|
38
|
+
error: (0, zod_1.string)().nullish(),
|
|
39
|
+
createdAt: (0, zod_1.date)(),
|
|
40
|
+
updatedAt: (0, zod_1.date)(),
|
|
41
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { apiKeySchema, apiKeyUsageLogSchema } from "../../schemas/api-key";
|
|
3
|
+
import { User } from "../user";
|
|
4
|
+
export interface ApiKey extends infer<typeof apiKeySchema> {
|
|
5
|
+
user?: User | null;
|
|
6
|
+
usageLogs?: ApiKeyUsageLog[];
|
|
7
|
+
}
|
|
8
|
+
export interface ApiKeyUsageLog extends infer<typeof apiKeyUsageLogSchema> {
|
|
9
|
+
apiKey?: ApiKey;
|
|
10
|
+
}
|
|
@@ -314,7 +314,7 @@ export declare enum LTCancellationPolicy {
|
|
|
314
314
|
export declare enum PromotionStatus {
|
|
315
315
|
AVAILABLE = "AVAILABLE",
|
|
316
316
|
ONGOING = "ONGOING",
|
|
317
|
-
|
|
317
|
+
EXPIRED = "EXPIRED"
|
|
318
318
|
}
|
|
319
319
|
export declare enum ListingExpectationType {
|
|
320
320
|
requires_stairs = "requires_stairs",
|
|
@@ -375,7 +375,7 @@ var PromotionStatus;
|
|
|
375
375
|
(function (PromotionStatus) {
|
|
376
376
|
PromotionStatus["AVAILABLE"] = "AVAILABLE";
|
|
377
377
|
PromotionStatus["ONGOING"] = "ONGOING";
|
|
378
|
-
PromotionStatus["
|
|
378
|
+
PromotionStatus["EXPIRED"] = "EXPIRED";
|
|
379
379
|
})(PromotionStatus || (exports.PromotionStatus = PromotionStatus = {}));
|
|
380
380
|
var ListingExpectationType;
|
|
381
381
|
(function (ListingExpectationType) {
|
|
@@ -39,6 +39,7 @@ import { AvailabilitySettings } from "../availability-settings";
|
|
|
39
39
|
import { BookingSettings } from "../booking-settings";
|
|
40
40
|
import { Notification } from "../notification";
|
|
41
41
|
import { TaskExpenseFact } from "../task-expense-fact";
|
|
42
|
+
import { PropertyGuide } from "../property-guide";
|
|
42
43
|
export interface Property extends infer<typeof propertySchema> {
|
|
43
44
|
user?: User;
|
|
44
45
|
rooms?: Room[];
|
|
@@ -84,6 +85,7 @@ export interface Property extends infer<typeof propertySchema> {
|
|
|
84
85
|
bookingSettings?: BookingSettings;
|
|
85
86
|
notifications?: Notification[];
|
|
86
87
|
taskExpenseFacts?: TaskExpenseFact[];
|
|
88
|
+
guides?: PropertyGuide[];
|
|
87
89
|
}
|
|
88
90
|
export interface UpdatePropertySchema extends infer<typeof updatePropertySchema> {
|
|
89
91
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { infer } from "zod";
|
|
1
|
+
import { infer, z } from "zod";
|
|
2
2
|
import { Property } from "../property";
|
|
3
3
|
import { ReservationCustomerSchema, ReservationFinanceSchema, ReservationSchema, ReservationServiceSchema, ReservationUnitAssignmentSchema } from "../../schemas";
|
|
4
4
|
import { ReservationRoom } from "../room-reservation";
|
|
@@ -39,5 +39,4 @@ export interface ReservationService extends infer<typeof ReservationServiceSchem
|
|
|
39
39
|
export interface ReservationCustomer extends infer<typeof ReservationCustomerSchema> {
|
|
40
40
|
reservation?: Reservation;
|
|
41
41
|
}
|
|
42
|
-
export
|
|
43
|
-
}
|
|
42
|
+
export type UpdateReservationSchema = Partial<Omit<z.infer<typeof ReservationSchema>, "id" | "createdAt" | "updatedAt">>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { serviceWorkerPayoutInfoSchema, serviceWorkerPayoutSchema, serviceWorkerWorkingHoursSchema } from "../../schemas/service-worker-payout";
|
|
3
|
+
import { ServiceWorker } from "../service-worker";
|
|
4
|
+
import { Task } from "../task";
|
|
5
|
+
import { ServiceProviderPayout } from "../service-provider-payout";
|
|
6
|
+
export interface ServiceWorkerPayoutInfo extends infer<typeof serviceWorkerPayoutInfoSchema> {
|
|
7
|
+
serviceWorker?: ServiceWorker;
|
|
8
|
+
payouts?: ServiceWorkerPayout[];
|
|
9
|
+
}
|
|
10
|
+
export interface ServiceWorkerPayout extends infer<typeof serviceWorkerPayoutSchema> {
|
|
11
|
+
payoutInfo?: ServiceWorkerPayoutInfo;
|
|
12
|
+
tasks?: Task[];
|
|
13
|
+
providerPayout?: ServiceProviderPayout | null;
|
|
14
|
+
}
|
|
15
|
+
export interface ServiceWorkerWorkingHours extends infer<typeof serviceWorkerWorkingHoursSchema> {
|
|
16
|
+
serviceWorker?: ServiceWorker;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { infer } from "zod";
|
|
2
|
+
import { webhookDeliverySchema, webhookEndpointSchema, webhookEventSchema } from "../../schemas/webhook";
|
|
3
|
+
import { User } from "../user";
|
|
4
|
+
export interface WebhookEndpoint extends infer<typeof webhookEndpointSchema> {
|
|
5
|
+
user?: User;
|
|
6
|
+
deliveries?: WebhookDelivery[];
|
|
7
|
+
}
|
|
8
|
+
export interface WebhookEvent extends infer<typeof webhookEventSchema> {
|
|
9
|
+
user?: User;
|
|
10
|
+
deliveries?: WebhookDelivery[];
|
|
11
|
+
}
|
|
12
|
+
export interface WebhookDelivery extends infer<typeof webhookDeliverySchema> {
|
|
13
|
+
endpoint?: WebhookEndpoint;
|
|
14
|
+
event?: WebhookEvent;
|
|
15
|
+
}
|
package/package.json
CHANGED
|
@@ -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
|
-
}
|
|
File without changes
|