hububb-saas-shared 1.2.56 → 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.
Files changed (32) hide show
  1. package/dist/schemas/price/index.d.ts +3 -0
  2. package/dist/schemas/price/index.js +4 -0
  3. package/dist/schemas/property/index.d.ts +0 -5
  4. package/dist/schemas/property/index.js +0 -1
  5. package/dist/schemas/property-metadata/index.d.ts +0 -3
  6. package/dist/schemas/property-metadata/index.js +0 -1
  7. package/dist/schemas/thread/index.d.ts +28 -0
  8. package/dist/schemas/thread/index.js +14 -1
  9. package/dist/types/enums/index.d.ts +1 -1
  10. package/dist/types/enums/index.js +1 -1
  11. package/dist/types/property/index.d.ts +2 -0
  12. package/package.json +1 -1
  13. package/dist/schemas/api-key/index.d.ts +0 -81
  14. package/dist/schemas/api-key/index.js +0 -33
  15. package/dist/schemas/external-sync-request/index.d.ts +0 -32
  16. package/dist/schemas/external-sync-request/index.js +0 -15
  17. package/dist/schemas/service-availability/index.d.ts +0 -25
  18. package/dist/schemas/service-availability/index.js +0 -13
  19. package/dist/schemas/service-worker-payout/index.d.ts +0 -88
  20. package/dist/schemas/service-worker-payout/index.js +0 -36
  21. package/dist/schemas/webhook/index.d.ts +0 -104
  22. package/dist/schemas/webhook/index.js +0 -41
  23. package/dist/types/api-key/index.d.ts +0 -10
  24. package/dist/types/api-key/index.js +0 -2
  25. package/dist/types/external-sync-request/index.d.ts +0 -4
  26. package/dist/types/external-sync-request/index.js +0 -2
  27. package/dist/types/service-availability/index.d.ts +0 -6
  28. package/dist/types/service-availability/index.js +0 -2
  29. package/dist/types/service-worker-payout/index.d.ts +0 -17
  30. package/dist/types/service-worker-payout/index.js +0 -2
  31. package/dist/types/webhook/index.d.ts +0 -15
  32. package/dist/types/webhook/index.js +0 -2
@@ -24,6 +24,7 @@ export declare const PriceSchema: z.ZodObject<{
24
24
  tripLengthDiscountPct: z.ZodNullable<z.ZodNumber>;
25
25
  newListingPromotionPct: z.ZodNullable<z.ZodNumber>;
26
26
  newListingPromotionEndsAt: z.ZodNullable<z.ZodDate>;
27
+ newListingPromotionStatus: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AVAILABLE", "ONGOING", "EXPIRED"]>>>;
27
28
  additionalDiscounts: z.ZodOptional<z.ZodUnknown>;
28
29
  passThroughTaxesCollectionType: z.ZodOptional<z.ZodEnum<["NO_AIRBNB_COLLECTED_TAX", "OVERRIDE_AIRBNB_COLLECTED_TAX", "STACKED_AIRBNB_COLLECTED_TAX", "INELIGIBLE", "UNDEFINED"]>>;
29
30
  }, "strip", z.ZodTypeAny, {
@@ -51,6 +52,7 @@ export declare const PriceSchema: z.ZodObject<{
51
52
  tripLengthDiscountPct: number | null;
52
53
  newListingPromotionPct: number | null;
53
54
  newListingPromotionEndsAt: Date | null;
55
+ newListingPromotionStatus?: "AVAILABLE" | "ONGOING" | "EXPIRED" | null | undefined;
54
56
  additionalDiscounts?: unknown;
55
57
  passThroughTaxesCollectionType?: "NO_AIRBNB_COLLECTED_TAX" | "OVERRIDE_AIRBNB_COLLECTED_TAX" | "STACKED_AIRBNB_COLLECTED_TAX" | "INELIGIBLE" | "UNDEFINED" | undefined;
56
58
  }, {
@@ -78,6 +80,7 @@ export declare const PriceSchema: z.ZodObject<{
78
80
  tripLengthDiscountPct: number | null;
79
81
  newListingPromotionPct: number | null;
80
82
  newListingPromotionEndsAt: Date | null;
83
+ newListingPromotionStatus?: "AVAILABLE" | "ONGOING" | "EXPIRED" | null | undefined;
81
84
  additionalDiscounts?: unknown;
82
85
  passThroughTaxesCollectionType?: "NO_AIRBNB_COLLECTED_TAX" | "OVERRIDE_AIRBNB_COLLECTED_TAX" | "STACKED_AIRBNB_COLLECTED_TAX" | "INELIGIBLE" | "UNDEFINED" | undefined;
83
86
  }>;
@@ -28,6 +28,10 @@ exports.PriceSchema = (0, zod_1.object)({
28
28
  tripLengthDiscountPct: (0, zod_1.number)().nullable(),
29
29
  newListingPromotionPct: (0, zod_1.number)().nullable(),
30
30
  newListingPromotionEndsAt: (0, zod_1.date)().nullable(),
31
+ newListingPromotionStatus: zod_1.z
32
+ .enum(["AVAILABLE", "ONGOING", "EXPIRED"])
33
+ .nullable()
34
+ .optional(),
31
35
  additionalDiscounts: zod_1.z.unknown().optional(),
32
36
  passThroughTaxesCollectionType: zod_1.z
33
37
  .enum([
@@ -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(),
@@ -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)()),
@@ -314,7 +314,7 @@ export declare enum LTCancellationPolicy {
314
314
  export declare enum PromotionStatus {
315
315
  AVAILABLE = "AVAILABLE",
316
316
  ONGOING = "ONGOING",
317
- ENDED = "ENDED"
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["ENDED"] = "ENDED";
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
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "commonjs",
3
3
  "name": "hububb-saas-shared",
4
- "version": "1.2.56",
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 });