balendar 0.0.6 → 0.0.8
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/src/modules/availability-rules/availability-rules.domain.d.ts +574 -0
- package/dist/src/modules/events/events.domain.d.ts +165 -0
- package/dist/src/modules/external-calendars/external-calendars.domain.d.ts +367 -0
- package/dist/src/modules/external-events/external-events.domain.d.ts +137 -0
- package/dist/src/orchestrators/availability/availability.domain.d.ts +143 -0
- package/package.json +2 -2
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
declare const TimeSlotsSchema: z.ZodArray<z.ZodObject<{
|
|
3
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
4
|
+
time: z.ZodArray<z.ZodString>;
|
|
5
|
+
}, z.core.$strip>>;
|
|
6
|
+
export type TimeSlots = z.infer<typeof TimeSlotsSchema>;
|
|
7
|
+
/**
|
|
8
|
+
* BookingLocationFilter
|
|
9
|
+
*/
|
|
10
|
+
declare const BookingLocationFilterSchema: z.ZodObject<{
|
|
11
|
+
bookingLocationId: z.ZodNumber;
|
|
12
|
+
bufferMinutes: z.ZodNumber;
|
|
13
|
+
leadMinutes: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export type BookingLocationFilter = z.infer<typeof BookingLocationFilterSchema>;
|
|
16
|
+
declare const BookingLocationsAvailabilitySchema: z.ZodArray<z.ZodObject<{
|
|
17
|
+
bookingLocationId: z.ZodNumber;
|
|
18
|
+
timeSlotCount: z.ZodNumber;
|
|
19
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
20
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
21
|
+
time: z.ZodArray<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>>;
|
|
23
|
+
}, z.core.$strip>>;
|
|
24
|
+
export type BookingLocationsAvailability = z.infer<typeof BookingLocationsAvailabilitySchema>;
|
|
25
|
+
/**
|
|
26
|
+
* BaseAvailabilitySearchFilters
|
|
27
|
+
* Shared filters applied to all users in multi-user searches
|
|
28
|
+
*/
|
|
29
|
+
export declare const BaseAvailabilitySearchFiltersSchema: z.ZodObject<{
|
|
30
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
31
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
32
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type BaseAvailabilitySearchFilters = z.infer<typeof BaseAvailabilitySearchFiltersSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* PerUserAvailabilitySearchFilters
|
|
38
|
+
* Per-user filters that extend the base filters
|
|
39
|
+
*/
|
|
40
|
+
declare const PerUserAvailabilitySearchFiltersSchema: z.ZodObject<{
|
|
41
|
+
userId: z.ZodNumber;
|
|
42
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
43
|
+
bookingLocationId: z.ZodNumber;
|
|
44
|
+
bufferMinutes: z.ZodNumber;
|
|
45
|
+
leadMinutes: z.ZodNumber;
|
|
46
|
+
}, z.core.$strip>>;
|
|
47
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
timeZone: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
export type PerUserAvailabilitySearchFilters = z.infer<typeof PerUserAvailabilitySearchFiltersSchema>;
|
|
52
|
+
export declare const UserAvailabilitySearchInputSchema: z.ZodObject<{
|
|
53
|
+
filters: z.ZodObject<{
|
|
54
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
55
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
56
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
57
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
58
|
+
userId: z.ZodNumber;
|
|
59
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
60
|
+
bookingLocationId: z.ZodNumber;
|
|
61
|
+
bufferMinutes: z.ZodNumber;
|
|
62
|
+
leadMinutes: z.ZodNumber;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
65
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
66
|
+
timeZone: z.ZodString;
|
|
67
|
+
}, z.core.$strip>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type UserAvailabilitySearchInput = z.infer<typeof UserAvailabilitySearchInputSchema>;
|
|
70
|
+
export declare const UserAvailabilitySchema: z.ZodObject<{
|
|
71
|
+
userId: z.ZodNumber;
|
|
72
|
+
timeZone: z.ZodString;
|
|
73
|
+
bookingLocationAvailability: z.ZodArray<z.ZodObject<{
|
|
74
|
+
bookingLocationId: z.ZodNumber;
|
|
75
|
+
timeSlotCount: z.ZodNumber;
|
|
76
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
77
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
78
|
+
time: z.ZodArray<z.ZodString>;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strip>>;
|
|
81
|
+
}, z.core.$strip>;
|
|
82
|
+
export type UserAvailability = z.infer<typeof UserAvailabilitySchema>;
|
|
83
|
+
/**
|
|
84
|
+
* MultiUserAvailabilitySearchInput
|
|
85
|
+
* Search for availability across multiple users
|
|
86
|
+
*/
|
|
87
|
+
export declare const MultiUserAvailabilitySearchInputSchema: z.ZodObject<{
|
|
88
|
+
baseFilters: z.ZodObject<{
|
|
89
|
+
dateFrom: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
90
|
+
dateTo: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
91
|
+
timeFrom: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
92
|
+
timeTo: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
93
|
+
}, z.core.$strip>;
|
|
94
|
+
userFilters: z.ZodArray<z.ZodObject<{
|
|
95
|
+
userId: z.ZodNumber;
|
|
96
|
+
bookingLocations: z.ZodArray<z.ZodObject<{
|
|
97
|
+
bookingLocationId: z.ZodNumber;
|
|
98
|
+
bufferMinutes: z.ZodNumber;
|
|
99
|
+
leadMinutes: z.ZodNumber;
|
|
100
|
+
}, z.core.$strip>>;
|
|
101
|
+
bookingDurationMinutes: z.ZodDefault<z.ZodNumber>;
|
|
102
|
+
slotGapMinutes: z.ZodDefault<z.ZodNumber>;
|
|
103
|
+
timeZone: z.ZodString;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type MultiUserAvailabilitySearchInput = z.infer<typeof MultiUserAvailabilitySearchInputSchema>;
|
|
107
|
+
/**
|
|
108
|
+
* MultiUserAvailability
|
|
109
|
+
* Output for multi-user availability search, sorted by availability
|
|
110
|
+
*/
|
|
111
|
+
export declare const MultiUserAvailabilitySchema: z.ZodArray<z.ZodObject<{
|
|
112
|
+
userId: z.ZodNumber;
|
|
113
|
+
timeZone: z.ZodString;
|
|
114
|
+
bookingLocationAvailability: z.ZodArray<z.ZodObject<{
|
|
115
|
+
bookingLocationId: z.ZodNumber;
|
|
116
|
+
timeSlotCount: z.ZodNumber;
|
|
117
|
+
timeSlots: z.ZodArray<z.ZodObject<{
|
|
118
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
119
|
+
time: z.ZodArray<z.ZodString>;
|
|
120
|
+
}, z.core.$strip>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
export type MultiUserAvailability = z.infer<typeof MultiUserAvailabilitySchema>;
|
|
124
|
+
/**
|
|
125
|
+
* UserDateCheckOutput
|
|
126
|
+
* The output schema for a high level availability check for a user.
|
|
127
|
+
* This is used for quickly checking the availability of a user for a given date/date range.
|
|
128
|
+
*
|
|
129
|
+
* Example: We have a calendar picker UI where the user can select a date to check the availability for.
|
|
130
|
+
* We want to indicate whether a specific date has any availability or not.
|
|
131
|
+
* We don't need to know the exact availability times, just whether it's available or not.
|
|
132
|
+
*/
|
|
133
|
+
export declare const UserDateCheckOutputSchema: z.ZodObject<{
|
|
134
|
+
userId: z.ZodNumber;
|
|
135
|
+
timeZone: z.ZodString;
|
|
136
|
+
anyAvailability: z.ZodBoolean;
|
|
137
|
+
availability: z.ZodObject<{
|
|
138
|
+
date: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
|
|
139
|
+
isAvailable: z.ZodBoolean;
|
|
140
|
+
}, z.core.$strip>;
|
|
141
|
+
bookingLocationId: z.ZodNumber;
|
|
142
|
+
}, z.core.$strip>;
|
|
143
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balendar",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.8",
|
|
4
4
|
"module": "client.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist/lib",
|
|
19
|
-
"src/**/*.domain.ts"
|
|
19
|
+
"dist/src/**/*.domain.d.ts"
|
|
20
20
|
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"lib.build": "rm -rf dist && tsc --project tsconfig.json && bun build --minify --outdir=dist/lib client.ts models.ts",
|