hububb-saas-shared 1.2.57 → 1.2.58

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.
@@ -1530,6 +1530,22 @@ export declare const ChatThreadSchema: z.ZodObject<{
1530
1530
  propertyTitle: z.ZodOptional<z.ZodString>;
1531
1531
  reservationStatus: z.ZodOptional<z.ZodString>;
1532
1532
  blockAIResponses: z.ZodOptional<z.ZodBoolean>;
1533
+ sentiment: z.ZodOptional<z.ZodObject<{
1534
+ label: z.ZodUnion<[z.ZodLiteral<"positive">, z.ZodLiteral<"neutral">, z.ZodLiteral<"negative">]>;
1535
+ score: z.ZodNumber;
1536
+ messageId: z.ZodOptional<z.ZodString>;
1537
+ updatedAt: z.ZodType<import("../../helpers").Timestamp, z.ZodTypeDef, import("../../helpers").Timestamp>;
1538
+ }, "strip", z.ZodTypeAny, {
1539
+ label: "positive" | "neutral" | "negative";
1540
+ updatedAt: import("../../helpers").Timestamp;
1541
+ score: number;
1542
+ messageId?: string | undefined;
1543
+ }, {
1544
+ label: "positive" | "neutral" | "negative";
1545
+ updatedAt: import("../../helpers").Timestamp;
1546
+ score: number;
1547
+ messageId?: string | undefined;
1548
+ }>>;
1533
1549
  }, "strip", z.ZodTypeAny, {
1534
1550
  type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
1535
1551
  createdAt: import("../../helpers").Timestamp;
@@ -1733,6 +1749,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
1733
1749
  propertyTitle?: string | undefined;
1734
1750
  reservationStatus?: string | undefined;
1735
1751
  blockAIResponses?: boolean | undefined;
1752
+ sentiment?: {
1753
+ label: "positive" | "neutral" | "negative";
1754
+ updatedAt: import("../../helpers").Timestamp;
1755
+ score: number;
1756
+ messageId?: string | undefined;
1757
+ } | undefined;
1736
1758
  }, {
1737
1759
  type: "ONE_TO_ONE" | "GROUP" | "OPERATIONS_GROUP" | "OPERATIONS_ONE_TO_ONE";
1738
1760
  createdAt: import("../../helpers").Timestamp;
@@ -1936,6 +1958,12 @@ export declare const ChatThreadSchema: z.ZodObject<{
1936
1958
  propertyTitle?: string | undefined;
1937
1959
  reservationStatus?: string | undefined;
1938
1960
  blockAIResponses?: boolean | undefined;
1961
+ sentiment?: {
1962
+ label: "positive" | "neutral" | "negative";
1963
+ updatedAt: import("../../helpers").Timestamp;
1964
+ score: number;
1965
+ messageId?: string | undefined;
1966
+ } | undefined;
1939
1967
  }>;
1940
1968
  export declare const MessageAutomationTemplateSchema: z.ZodObject<{
1941
1969
  id: z.ZodOptional<z.ZodString>;
@@ -126,7 +126,20 @@ exports.ChatThreadSchema = (0, zod_1.object)({
126
126
  propertyImage: (0, zod_1.optional)((0, zod_1.string)()),
127
127
  propertyTitle: (0, zod_1.optional)((0, zod_1.string)()),
128
128
  reservationStatus: (0, zod_1.optional)((0, zod_1.string)()),
129
- blockAIResponses: (0, zod_1.optional)((0, zod_1.boolean)())
129
+ blockAIResponses: (0, zod_1.optional)((0, zod_1.boolean)()),
130
+ // Live guest-mood signal. Written by the API SentimentService each time a
131
+ // guest message arrives (latest-message model). Absent on threads scored
132
+ // before the feature shipped — treat missing as "unknown", not neutral.
133
+ sentiment: (0, zod_1.optional)((0, zod_1.object)({
134
+ label: (0, zod_1.union)([
135
+ (0, zod_1.literal)("positive"),
136
+ (0, zod_1.literal)("neutral"),
137
+ (0, zod_1.literal)("negative"),
138
+ ]),
139
+ score: (0, zod_1.number)(), // -1 (very negative) .. 1 (very positive)
140
+ messageId: (0, zod_1.optional)((0, zod_1.string)()), // guest message that produced this
141
+ updatedAt: helpers_1.firestoreTimestampSchema,
142
+ })),
130
143
  });
131
144
  exports.MessageAutomationTemplateSchema = (0, zod_1.object)({
132
145
  id: (0, zod_1.optional)((0, zod_1.string)()),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.2.57",
4
+ "version": "1.2.58",
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,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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import { infer } from "zod";
2
- import { externalSyncRequestSchema } from "../../schemas/external-sync-request";
3
- export interface ExternalSyncRequest extends infer<typeof externalSyncRequestSchema> {
4
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,6 +0,0 @@
1
- import { infer } from "zod";
2
- import { serviceAvailabilitySchema } from "../../schemas/service-availability";
3
- import { Service } from "../service";
4
- export interface ServiceAvailability extends infer<typeof serviceAvailabilitySchema> {
5
- service?: Service;
6
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });