balendar 0.0.8 → 0.0.9

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.
@@ -0,0 +1,184 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Calendar Mapping Status
4
+ */
5
+ export declare const CalendarMappingStatuses: readonly ["active", "expired", "revoked", "error"];
6
+ export declare const CalendarMappingStatusSchema: z.ZodEnum<{
7
+ error: "error";
8
+ active: "active";
9
+ expired: "expired";
10
+ revoked: "revoked";
11
+ }>;
12
+ export type CalendarMappingStatus = z.infer<typeof CalendarMappingStatusSchema>;
13
+ /**
14
+ * Create Calendar Mapping Input
15
+ */
16
+ export declare const CreateCalendarMappingInputSchema: z.ZodObject<{
17
+ userId: z.ZodNumber;
18
+ externalProvider: z.ZodEnum<{
19
+ apple: "apple";
20
+ google: "google";
21
+ microsoft: "microsoft";
22
+ }>;
23
+ connectionId: z.ZodString;
24
+ accessToken: z.ZodString;
25
+ refreshToken: z.ZodOptional<z.ZodString>;
26
+ expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
27
+ }, z.core.$strip>;
28
+ export type CreateCalendarMappingInput = z.infer<typeof CreateCalendarMappingInputSchema>;
29
+ /**
30
+ * Calendar Mapping
31
+ */
32
+ export declare const CalendarMappingSchema: z.ZodObject<{
33
+ userId: z.ZodNumber;
34
+ externalProvider: z.ZodEnum<{
35
+ apple: "apple";
36
+ google: "google";
37
+ microsoft: "microsoft";
38
+ }>;
39
+ connectionId: z.ZodString;
40
+ accessToken: z.ZodString;
41
+ refreshToken: z.ZodOptional<z.ZodString>;
42
+ expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
43
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
44
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
45
+ calendarMappingId: z.ZodNumber;
46
+ status: z.ZodEnum<{
47
+ error: "error";
48
+ active: "active";
49
+ expired: "expired";
50
+ revoked: "revoked";
51
+ }>;
52
+ syncToken: z.ZodNullable<z.ZodString>;
53
+ webhookId: z.ZodNullable<z.ZodString>;
54
+ webhookResourceId: z.ZodNullable<z.ZodString>;
55
+ webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
56
+ }, z.core.$strip>;
57
+ export type CalendarMapping = z.infer<typeof CalendarMappingSchema>;
58
+ export declare const CalendarMappingsSchema: z.ZodArray<z.ZodObject<{
59
+ userId: z.ZodNumber;
60
+ externalProvider: z.ZodEnum<{
61
+ apple: "apple";
62
+ google: "google";
63
+ microsoft: "microsoft";
64
+ }>;
65
+ connectionId: z.ZodString;
66
+ accessToken: z.ZodString;
67
+ refreshToken: z.ZodOptional<z.ZodString>;
68
+ expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
69
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
70
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
71
+ calendarMappingId: z.ZodNumber;
72
+ status: z.ZodEnum<{
73
+ error: "error";
74
+ active: "active";
75
+ expired: "expired";
76
+ revoked: "revoked";
77
+ }>;
78
+ syncToken: z.ZodNullable<z.ZodString>;
79
+ webhookId: z.ZodNullable<z.ZodString>;
80
+ webhookResourceId: z.ZodNullable<z.ZodString>;
81
+ webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
82
+ }, z.core.$strip>>;
83
+ export type CalendarMappings = z.infer<typeof CalendarMappingsSchema>;
84
+ /**
85
+ * Update Calendar Mapping Input
86
+ */
87
+ export declare const UpdateCalendarMappingInputSchema: z.ZodObject<{
88
+ userId: z.ZodOptional<z.ZodNumber>;
89
+ expiresAt: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
90
+ accessToken: z.ZodOptional<z.ZodString>;
91
+ refreshToken: z.ZodOptional<z.ZodOptional<z.ZodString>>;
92
+ syncToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ webhookId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
94
+ webhookResourceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
95
+ webhookExpiresAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>>;
96
+ }, z.core.$strip>;
97
+ export type UpdateCalendarMappingInput = z.infer<typeof UpdateCalendarMappingInputSchema>;
98
+ /**
99
+ * PaginatedCalendarMappings
100
+ */
101
+ export declare const PaginatedCalendarMappingsSchema: z.ZodObject<{
102
+ items: z.ZodArray<z.ZodObject<{
103
+ userId: z.ZodNumber;
104
+ externalProvider: z.ZodEnum<{
105
+ apple: "apple";
106
+ google: "google";
107
+ microsoft: "microsoft";
108
+ }>;
109
+ connectionId: z.ZodString;
110
+ accessToken: z.ZodString;
111
+ refreshToken: z.ZodOptional<z.ZodString>;
112
+ expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
113
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
114
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
115
+ calendarMappingId: z.ZodNumber;
116
+ status: z.ZodEnum<{
117
+ error: "error";
118
+ active: "active";
119
+ expired: "expired";
120
+ revoked: "revoked";
121
+ }>;
122
+ syncToken: z.ZodNullable<z.ZodString>;
123
+ webhookId: z.ZodNullable<z.ZodString>;
124
+ webhookResourceId: z.ZodNullable<z.ZodString>;
125
+ webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
126
+ }, z.core.$strip>>;
127
+ pagination: z.ZodObject<{
128
+ total: z.ZodCoercedNumber<unknown>;
129
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
130
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
131
+ hasMore: z.ZodBoolean;
132
+ }, z.core.$strip>;
133
+ }, z.core.$strip>;
134
+ export type PaginatedCalendarMappings = z.infer<typeof PaginatedCalendarMappingsSchema>;
135
+ /**
136
+ * SearchCalendarMappingsInput
137
+ */
138
+ export declare const SearchCalendarMappingsInputSchema: z.ZodObject<{
139
+ userId: z.ZodOptional<z.ZodNumber>;
140
+ connectionId: z.ZodOptional<z.ZodString>;
141
+ webhookResourceId: z.ZodOptional<z.ZodString>;
142
+ pagination: z.ZodDefault<z.ZodObject<{
143
+ limit: z.ZodDefault<z.ZodNumber>;
144
+ offset: z.ZodDefault<z.ZodNumber>;
145
+ }, z.core.$strip>>;
146
+ }, z.core.$strip>;
147
+ export type SearchCalendarMappingsInput = z.infer<typeof SearchCalendarMappingsInputSchema>;
148
+ /**
149
+ * SearchCalendarMappingsOutput
150
+ */
151
+ export declare const SearchCalendarMappingsOutputSchema: z.ZodObject<{
152
+ items: z.ZodArray<z.ZodObject<{
153
+ userId: z.ZodNumber;
154
+ externalProvider: z.ZodEnum<{
155
+ apple: "apple";
156
+ google: "google";
157
+ microsoft: "microsoft";
158
+ }>;
159
+ connectionId: z.ZodString;
160
+ accessToken: z.ZodString;
161
+ refreshToken: z.ZodOptional<z.ZodString>;
162
+ expiresAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
163
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
164
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
165
+ calendarMappingId: z.ZodNumber;
166
+ status: z.ZodEnum<{
167
+ error: "error";
168
+ active: "active";
169
+ expired: "expired";
170
+ revoked: "revoked";
171
+ }>;
172
+ syncToken: z.ZodNullable<z.ZodString>;
173
+ webhookId: z.ZodNullable<z.ZodString>;
174
+ webhookResourceId: z.ZodNullable<z.ZodString>;
175
+ webhookExpiresAt: z.ZodNullable<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>>;
176
+ }, z.core.$strip>>;
177
+ pagination: z.ZodObject<{
178
+ total: z.ZodCoercedNumber<unknown>;
179
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
180
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
181
+ hasMore: z.ZodBoolean;
182
+ }, z.core.$strip>;
183
+ }, z.core.$strip>;
184
+ export type SearchCalendarMappingsOutput = z.infer<typeof SearchCalendarMappingsOutputSchema>;
@@ -0,0 +1,122 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Create event mapping input schema
4
+ */
5
+ export declare const CreateEventMappingInputSchema: z.ZodObject<{
6
+ eventId: z.ZodNumber;
7
+ calendarConnectionId: z.ZodString;
8
+ externalId: z.ZodNullable<z.ZodString>;
9
+ externalProvider: z.ZodEnum<{
10
+ apple: "apple";
11
+ google: "google";
12
+ microsoft: "microsoft";
13
+ }>;
14
+ }, z.core.$strip>;
15
+ export type CreateEventMappingInput = z.infer<typeof CreateEventMappingInputSchema>;
16
+ /**
17
+ * Event mapping schema
18
+ */
19
+ export declare const EventMappingSchema: z.ZodObject<{
20
+ eventId: z.ZodNumber;
21
+ calendarConnectionId: z.ZodString;
22
+ externalId: z.ZodNullable<z.ZodString>;
23
+ externalProvider: z.ZodEnum<{
24
+ apple: "apple";
25
+ google: "google";
26
+ microsoft: "microsoft";
27
+ }>;
28
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
29
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
30
+ eventMappingId: z.ZodNumber;
31
+ }, z.core.$strip>;
32
+ export declare const EventMappingsSchema: z.ZodArray<z.ZodObject<{
33
+ eventId: z.ZodNumber;
34
+ calendarConnectionId: z.ZodString;
35
+ externalId: z.ZodNullable<z.ZodString>;
36
+ externalProvider: z.ZodEnum<{
37
+ apple: "apple";
38
+ google: "google";
39
+ microsoft: "microsoft";
40
+ }>;
41
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
42
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
43
+ eventMappingId: z.ZodNumber;
44
+ }, z.core.$strip>>;
45
+ export type EventMapping = z.infer<typeof EventMappingSchema>;
46
+ export type EventMappings = z.infer<typeof EventMappingsSchema>;
47
+ /**
48
+ * Update event mapping input schema
49
+ */
50
+ export declare const UpdateEventMappingInputSchema: z.ZodObject<{
51
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
+ }, z.core.$strip>;
53
+ export type UpdateEventMappingInput = z.infer<typeof UpdateEventMappingInputSchema>;
54
+ /**
55
+ * Paginated event mappings schema
56
+ */
57
+ export declare const PaginatedEventMappingsSchema: z.ZodObject<{
58
+ items: z.ZodArray<z.ZodObject<{
59
+ eventId: z.ZodNumber;
60
+ calendarConnectionId: z.ZodString;
61
+ externalId: z.ZodNullable<z.ZodString>;
62
+ externalProvider: z.ZodEnum<{
63
+ apple: "apple";
64
+ google: "google";
65
+ microsoft: "microsoft";
66
+ }>;
67
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
68
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
69
+ eventMappingId: z.ZodNumber;
70
+ }, z.core.$strip>>;
71
+ pagination: z.ZodObject<{
72
+ total: z.ZodCoercedNumber<unknown>;
73
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
74
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
75
+ hasMore: z.ZodBoolean;
76
+ }, z.core.$strip>;
77
+ }, z.core.$strip>;
78
+ export type PaginatedEventMappings = z.infer<typeof PaginatedEventMappingsSchema>;
79
+ /**
80
+ * SearchEventMappingsInput
81
+ */
82
+ export declare const SearchEventMappingsInputSchema: z.ZodObject<{
83
+ eventId: z.ZodOptional<z.ZodNumber>;
84
+ eventMappingId: z.ZodOptional<z.ZodNumber>;
85
+ calendarConnectionId: z.ZodOptional<z.ZodString>;
86
+ externalId: z.ZodOptional<z.ZodString>;
87
+ externalProvider: z.ZodOptional<z.ZodEnum<{
88
+ apple: "apple";
89
+ google: "google";
90
+ microsoft: "microsoft";
91
+ }>>;
92
+ pagination: z.ZodDefault<z.ZodObject<{
93
+ limit: z.ZodDefault<z.ZodNumber>;
94
+ offset: z.ZodDefault<z.ZodNumber>;
95
+ }, z.core.$strip>>;
96
+ }, z.core.$strip>;
97
+ export type SearchEventMappingsInput = z.infer<typeof SearchEventMappingsInputSchema>;
98
+ /**
99
+ * SearchEventMappingsOutput
100
+ */
101
+ export declare const SearchEventMappingsOutputSchema: z.ZodObject<{
102
+ items: z.ZodArray<z.ZodObject<{
103
+ eventId: z.ZodNumber;
104
+ calendarConnectionId: z.ZodString;
105
+ externalId: z.ZodNullable<z.ZodString>;
106
+ externalProvider: z.ZodEnum<{
107
+ apple: "apple";
108
+ google: "google";
109
+ microsoft: "microsoft";
110
+ }>;
111
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
112
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
113
+ eventMappingId: z.ZodNumber;
114
+ }, z.core.$strip>>;
115
+ pagination: z.ZodObject<{
116
+ total: z.ZodCoercedNumber<unknown>;
117
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
118
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
119
+ hasMore: z.ZodBoolean;
120
+ }, z.core.$strip>;
121
+ }, z.core.$strip>;
122
+ export type SearchEventMappingsOutput = z.infer<typeof SearchEventMappingsOutputSchema>;
@@ -0,0 +1,6 @@
1
+ import { z } from 'zod';
2
+ export declare const AuditColumnsSchema: z.ZodObject<{
3
+ createdAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
4
+ updatedAt: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
5
+ }, z.core.$strip>;
6
+ export type AuditColumns = z.infer<typeof AuditColumnsSchema>;
@@ -0,0 +1,28 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * DateTime in ISO 8601 format
4
+ * Used for all rule types to specify date and time
5
+ * Examples: "2025-01-01T09:00:00Z", "2025-01-01T17:30:00Z"
6
+ */
7
+ export declare const DateTimeSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
8
+ export type DateTime = z.infer<typeof DateTimeSchema>;
9
+ /**
10
+ * Date only in YYYY-MM-DD format
11
+ * Used for all rule types to specify date
12
+ * Examples: "2025-01-01", "2025-12-31"
13
+ */
14
+ export declare const DateOnlySchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodString>;
15
+ export type DateOnly = z.infer<typeof DateOnlySchema>;
16
+ /**
17
+ * Time of day in 24-hour format (HH:mm)
18
+ * Used for all rule types to specify daily time windows
19
+ * Examples: "09:00", "17:30", "00:00"
20
+ */
21
+ export declare const Time24HourSchema: z.ZodString;
22
+ export type Time24Hour = z.infer<typeof Time24HourSchema>;
23
+ /**
24
+ * TimeZone
25
+ * TODO: Implement time zone validation. Static list?
26
+ */
27
+ export declare const TimeZoneSchema: z.ZodString;
28
+ export type TimeZone = z.infer<typeof TimeZoneSchema>;
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * External providers
4
+ */
5
+ export declare const APPLE = "apple";
6
+ export declare const GOOGLE = "google";
7
+ export declare const MICROSOFT = "microsoft";
8
+ export declare const ExternalProviders: readonly ["apple", "google", "microsoft"];
9
+ export declare const ExternalProvidersSchema: z.ZodEnum<{
10
+ apple: "apple";
11
+ google: "google";
12
+ microsoft: "microsoft";
13
+ }>;
14
+ export type ExternalProvider = z.infer<typeof ExternalProvidersSchema>;
@@ -0,0 +1,9 @@
1
+ import { z } from 'zod';
2
+ export declare const IDSchema: z.ZodNumber;
3
+ export type ID = z.infer<typeof IDSchema>;
4
+ export declare const IDsSchema: z.ZodArray<z.ZodNumber>;
5
+ export type IDs = z.infer<typeof IDsSchema>;
6
+ export declare const IDParamSchema: z.ZodCoercedNumber<unknown>;
7
+ export type IDParam = z.infer<typeof IDParamSchema>;
8
+ export declare const ExternalIDSchema: z.ZodString;
9
+ export type ExternalID = z.infer<typeof ExternalIDSchema>;
@@ -0,0 +1,13 @@
1
+ import { z } from 'zod';
2
+ export declare const PaginationInputSchema: z.ZodDefault<z.ZodObject<{
3
+ limit: z.ZodDefault<z.ZodNumber>;
4
+ offset: z.ZodDefault<z.ZodNumber>;
5
+ }, z.core.$strip>>;
6
+ export type PaginationInput = z.infer<typeof PaginationInputSchema>;
7
+ export declare const PaginationOutputSchema: z.ZodObject<{
8
+ total: z.ZodCoercedNumber<unknown>;
9
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
10
+ offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
11
+ hasMore: z.ZodBoolean;
12
+ }, z.core.$strip>;
13
+ export type PaginationOutput = z.infer<typeof PaginationOutputSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "balendar",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "module": "client.ts",
5
5
  "type": "module",
6
6
  "private": false,
@@ -16,7 +16,8 @@
16
16
  },
17
17
  "files": [
18
18
  "dist/lib",
19
- "dist/src/**/*.domain.d.ts"
19
+ "dist/src/**/*.domain.d.ts",
20
+ "dist/src/**/*.models.d.ts"
20
21
  ],
21
22
  "scripts": {
22
23
  "lib.build": "rm -rf dist && tsc --project tsconfig.json && bun build --minify --outdir=dist/lib client.ts models.ts",