hububb-saas-shared 1.2.53 → 1.2.55
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/channex/booking.d.ts +2 -2
- package/dist/schemas/channex/thread.d.ts +2 -2
- package/dist/schemas/enums/index.d.ts +45 -0
- package/dist/schemas/enums/index.js +56 -0
- package/dist/schemas/property-guide/body.d.ts +1 -1
- package/dist/schemas/property-guide/body.js +6 -2
- package/dist/schemas/property-guide/index.d.ts +1 -0
- package/dist/schemas/property-guide/index.js +4 -1
- package/dist/schemas/property-guide/links.d.ts +2 -0
- package/dist/schemas/property-guide/links.js +22 -0
- package/dist/schemas/service-property/index.d.ts +19 -0
- package/dist/schemas/service-property/index.js +11 -0
- package/dist/schemas/task-checklist-item/index.d.ts +2 -2
- package/dist/schemas/thread/index.d.ts +9 -6
- package/dist/schemas/thread/index.js +2 -1
- package/dist/types/service-property/index.d.ts +8 -0
- package/package.json +1 -1
- package/dist/schemas/api-key/index.d.ts +0 -81
- package/dist/schemas/api-key/index.js +0 -33
- package/dist/schemas/external-sync-request/index.d.ts +0 -32
- package/dist/schemas/external-sync-request/index.js +0 -15
- package/dist/schemas/service-availability/index.d.ts +0 -25
- package/dist/schemas/service-availability/index.js +0 -13
- package/dist/schemas/service-worker-payout/index.d.ts +0 -88
- package/dist/schemas/service-worker-payout/index.js +0 -36
- package/dist/schemas/webhook/index.d.ts +0 -104
- package/dist/schemas/webhook/index.js +0 -41
- package/dist/types/api-key/index.d.ts +0 -10
- package/dist/types/external-sync-request/index.d.ts +0 -4
- package/dist/types/external-sync-request/index.js +0 -2
- package/dist/types/service-availability/index.d.ts +0 -6
- package/dist/types/service-availability/index.js +0 -2
- package/dist/types/service-worker-payout/index.d.ts +0 -17
- package/dist/types/service-worker-payout/index.js +0 -2
- package/dist/types/webhook/index.d.ts +0 -15
- package/dist/types/webhook/index.js +0 -2
- /package/dist/types/{api-key → service-property}/index.js +0 -0
|
@@ -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;
|
|
1090
1089
|
event: string;
|
|
1091
1090
|
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;
|
|
1100
1099
|
event: string;
|
|
1101
1100
|
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;
|
|
281
280
|
event: string;
|
|
282
281
|
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;
|
|
298
297
|
event: string;
|
|
299
298
|
property_id: string;
|
|
299
|
+
timestamp: string;
|
|
300
300
|
payload: {
|
|
301
301
|
message: string;
|
|
302
302
|
id: string;
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 = {}));
|
|
@@ -9,7 +9,7 @@ export declare function htmlToMarkdown(html: string): string;
|
|
|
9
9
|
export declare function normalizeGuideBodyMarkdown(body: string | null | undefined): string;
|
|
10
10
|
/** @deprecated Use normalizeGuideBodyMarkdown */
|
|
11
11
|
export declare function normalizeGuideBodyForDisplay(body: string | null | undefined): string;
|
|
12
|
-
/** Prepares stored guide body for markdown editors. */
|
|
12
|
+
/** Prepares stored guide body for markdown editors — preserves newlines while typing. */
|
|
13
13
|
export declare function guideBodyToEditorMarkdown(body: string | null | undefined): string;
|
|
14
14
|
/** @deprecated Use guideBodyToEditorMarkdown */
|
|
15
15
|
export declare function guideBodyToEditorHtml(body: string | null | undefined): string;
|
|
@@ -65,9 +65,13 @@ function normalizeGuideBodyMarkdown(body) {
|
|
|
65
65
|
function normalizeGuideBodyForDisplay(body) {
|
|
66
66
|
return normalizeGuideBodyMarkdown(body);
|
|
67
67
|
}
|
|
68
|
-
/** Prepares stored guide body for markdown editors. */
|
|
68
|
+
/** Prepares stored guide body for markdown editors — preserves newlines while typing. */
|
|
69
69
|
function guideBodyToEditorMarkdown(body) {
|
|
70
|
-
|
|
70
|
+
if (body == null || body === '')
|
|
71
|
+
return '';
|
|
72
|
+
if (isGuideBodyHtml(body))
|
|
73
|
+
return htmlToMarkdown(body);
|
|
74
|
+
return body;
|
|
71
75
|
}
|
|
72
76
|
/** @deprecated Use guideBodyToEditorMarkdown */
|
|
73
77
|
function guideBodyToEditorHtml(body) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { GUIDE_ICON_KEYS, GUIDE_ICON_LABELS, GUIDE_ICON_PHOSPHOR_NAMES, type GuideIconKey } from './icons';
|
|
2
2
|
export { GUIDE_BODY_ALLOWED_TAGS, escapeGuideHtml, guideBodyToEditorHtml, guideBodyToEditorMarkdown, htmlToMarkdown, isGuideBodyEmpty, isGuideBodyHtml, normalizeGuideBodyForDisplay, normalizeGuideBodyMarkdown, plainTextToGuideHtml, stripGuideBodyPreview, } from './body';
|
|
3
|
+
export { isExternalGuideMarkdownLink, normalizeGuideMarkdownLinkHref, } from './links';
|
|
3
4
|
export declare const propertyGuideSchema: import("zod").ZodObject<{
|
|
4
5
|
id: import("zod").ZodNumber;
|
|
5
6
|
propertyId: import("zod").ZodNumber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.propertyGuideSchema = exports.stripGuideBodyPreview = exports.plainTextToGuideHtml = exports.normalizeGuideBodyMarkdown = exports.normalizeGuideBodyForDisplay = exports.isGuideBodyHtml = exports.isGuideBodyEmpty = exports.htmlToMarkdown = exports.guideBodyToEditorMarkdown = exports.guideBodyToEditorHtml = exports.escapeGuideHtml = exports.GUIDE_BODY_ALLOWED_TAGS = exports.GUIDE_ICON_PHOSPHOR_NAMES = exports.GUIDE_ICON_LABELS = exports.GUIDE_ICON_KEYS = void 0;
|
|
3
|
+
exports.propertyGuideSchema = exports.normalizeGuideMarkdownLinkHref = exports.isExternalGuideMarkdownLink = exports.stripGuideBodyPreview = exports.plainTextToGuideHtml = exports.normalizeGuideBodyMarkdown = exports.normalizeGuideBodyForDisplay = exports.isGuideBodyHtml = exports.isGuideBodyEmpty = exports.htmlToMarkdown = exports.guideBodyToEditorMarkdown = exports.guideBodyToEditorHtml = exports.escapeGuideHtml = exports.GUIDE_BODY_ALLOWED_TAGS = exports.GUIDE_ICON_PHOSPHOR_NAMES = exports.GUIDE_ICON_LABELS = exports.GUIDE_ICON_KEYS = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const icons_1 = require("./icons");
|
|
6
6
|
var icons_2 = require("./icons");
|
|
@@ -19,6 +19,9 @@ Object.defineProperty(exports, "normalizeGuideBodyForDisplay", { enumerable: tru
|
|
|
19
19
|
Object.defineProperty(exports, "normalizeGuideBodyMarkdown", { enumerable: true, get: function () { return body_1.normalizeGuideBodyMarkdown; } });
|
|
20
20
|
Object.defineProperty(exports, "plainTextToGuideHtml", { enumerable: true, get: function () { return body_1.plainTextToGuideHtml; } });
|
|
21
21
|
Object.defineProperty(exports, "stripGuideBodyPreview", { enumerable: true, get: function () { return body_1.stripGuideBodyPreview; } });
|
|
22
|
+
var links_1 = require("./links");
|
|
23
|
+
Object.defineProperty(exports, "isExternalGuideMarkdownLink", { enumerable: true, get: function () { return links_1.isExternalGuideMarkdownLink; } });
|
|
24
|
+
Object.defineProperty(exports, "normalizeGuideMarkdownLinkHref", { enumerable: true, get: function () { return links_1.normalizeGuideMarkdownLinkHref; } });
|
|
22
25
|
exports.propertyGuideSchema = (0, zod_1.object)({
|
|
23
26
|
id: (0, zod_1.number)().int(),
|
|
24
27
|
propertyId: (0, zod_1.number)().int(),
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.normalizeGuideMarkdownLinkHref = normalizeGuideMarkdownLinkHref;
|
|
4
|
+
exports.isExternalGuideMarkdownLink = isExternalGuideMarkdownLink;
|
|
5
|
+
function normalizeGuideMarkdownLinkHref(href) {
|
|
6
|
+
const trimmed = href.trim();
|
|
7
|
+
if (!trimmed)
|
|
8
|
+
return href;
|
|
9
|
+
if (/^(https?:|mailto:|tel:|#)/i.test(trimmed)) {
|
|
10
|
+
return trimmed;
|
|
11
|
+
}
|
|
12
|
+
if (trimmed.startsWith('//')) {
|
|
13
|
+
return `https:${trimmed}`;
|
|
14
|
+
}
|
|
15
|
+
if (trimmed.startsWith('/') || trimmed.startsWith('./') || trimmed.startsWith('../')) {
|
|
16
|
+
return trimmed;
|
|
17
|
+
}
|
|
18
|
+
return `https://${trimmed}`;
|
|
19
|
+
}
|
|
20
|
+
function isExternalGuideMarkdownLink(href) {
|
|
21
|
+
return /^https?:\/\//i.test(href);
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
});
|
|
@@ -11,15 +11,15 @@ export declare const taskChecklistItemSchema: import("zod").ZodObject<{
|
|
|
11
11
|
createdAt: Date;
|
|
12
12
|
updatedAt: Date;
|
|
13
13
|
taskChecklistSpaceId: number;
|
|
14
|
-
completed?: boolean | undefined;
|
|
15
14
|
content?: string | undefined;
|
|
15
|
+
completed?: boolean | 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
|
-
completed?: boolean | undefined;
|
|
23
22
|
content?: string | undefined;
|
|
23
|
+
completed?: boolean | 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<z.objectUtil.extendShape<{
|
|
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<Pick<{
|
|
1107
|
+
reservation: z.ZodOptional<z.ZodObject<z.objectUtil.extendShape<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;
|
|
@@ -1529,6 +1529,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1529
1529
|
propertyImage: z.ZodOptional<z.ZodString>;
|
|
1530
1530
|
propertyTitle: z.ZodOptional<z.ZodString>;
|
|
1531
1531
|
reservationStatus: z.ZodOptional<z.ZodString>;
|
|
1532
|
+
blockAIResponses: z.ZodOptional<z.ZodBoolean>;
|
|
1532
1533
|
}, "strip", z.ZodTypeAny, {
|
|
1533
1534
|
type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
|
|
1534
1535
|
createdAt: import("../../helpers").Timestamp;
|
|
@@ -1731,6 +1732,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1731
1732
|
propertyImage?: string | undefined;
|
|
1732
1733
|
propertyTitle?: string | undefined;
|
|
1733
1734
|
reservationStatus?: string | undefined;
|
|
1735
|
+
blockAIResponses?: boolean | undefined;
|
|
1734
1736
|
}, {
|
|
1735
1737
|
type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
|
|
1736
1738
|
createdAt: import("../../helpers").Timestamp;
|
|
@@ -1933,6 +1935,7 @@ export declare const ChatThreadSchema: z.ZodObject<{
|
|
|
1933
1935
|
propertyImage?: string | undefined;
|
|
1934
1936
|
propertyTitle?: string | undefined;
|
|
1935
1937
|
reservationStatus?: string | undefined;
|
|
1938
|
+
blockAIResponses?: boolean | undefined;
|
|
1936
1939
|
}>;
|
|
1937
1940
|
export declare const MessageAutomationTemplateSchema: z.ZodObject<{
|
|
1938
1941
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -125,7 +125,8 @@ exports.ChatThreadSchema = (0, zod_1.object)({
|
|
|
125
125
|
checkOut: (0, zod_1.optional)(helpers_1.firestoreTimestampSchema),
|
|
126
126
|
propertyImage: (0, zod_1.optional)((0, zod_1.string)()),
|
|
127
127
|
propertyTitle: (0, zod_1.optional)((0, zod_1.string)()),
|
|
128
|
-
reservationStatus: (0, zod_1.optional)((0, zod_1.string)())
|
|
128
|
+
reservationStatus: (0, zod_1.optional)((0, zod_1.string)()),
|
|
129
|
+
blockAIResponses: (0, zod_1.optional)((0, zod_1.boolean)())
|
|
129
130
|
});
|
|
130
131
|
exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
|
|
131
132
|
id: (0, zod_1.optional)((0, zod_1.string)()),
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,81 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,15 +0,0 @@
|
|
|
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,25 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,88 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,104 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,41 +0,0 @@
|
|
|
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
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|
-
}
|
|
File without changes
|