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.
- package/dist/lib/client.d.ts +214 -209
- package/dist/lib/models.d.ts +3 -2
- package/dist/lib/models.js +12 -12
- package/dist/src/modules/calendar-mappings/calendar-mappings.domain.d.ts +184 -0
- package/dist/src/modules/event-mappings/event-mappings.domain.d.ts +122 -0
- package/dist/src/shared/schemas/audit.models.d.ts +6 -0
- package/dist/src/shared/schemas/date-time.models.d.ts +28 -0
- package/dist/src/shared/schemas/external-providers.models.d.ts +14 -0
- package/dist/src/shared/schemas/id.models.d.ts +9 -0
- package/dist/src/shared/schemas/pagination.models.d.ts +13 -0
- package/package.json +3 -2
- package/dist/src/modules/external-calendars/external-calendars.domain.d.ts +0 -367
- package/dist/src/modules/external-events/external-events.domain.d.ts +0 -137
package/dist/lib/client.d.ts
CHANGED
|
@@ -60,15 +60,25 @@ export declare function createBalendar(config: BalendarConfig): {
|
|
|
60
60
|
}>>;
|
|
61
61
|
};
|
|
62
62
|
api: {
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
calendars: {
|
|
64
|
+
connections: ((params: {
|
|
65
|
+
provider: string | number;
|
|
66
|
+
}) => {
|
|
65
67
|
callback: {
|
|
66
|
-
get: (options
|
|
68
|
+
get: (options: {
|
|
67
69
|
headers?: Record<string, unknown> | undefined;
|
|
68
|
-
query
|
|
70
|
+
query: {
|
|
71
|
+
code: string;
|
|
72
|
+
state: string;
|
|
73
|
+
};
|
|
69
74
|
fetch?: RequestInit | undefined;
|
|
70
|
-
}
|
|
71
|
-
|
|
75
|
+
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
76
|
+
500: {
|
|
77
|
+
success: boolean;
|
|
78
|
+
};
|
|
79
|
+
200: {
|
|
80
|
+
success: boolean;
|
|
81
|
+
};
|
|
72
82
|
422: {
|
|
73
83
|
type: "validation";
|
|
74
84
|
on: string;
|
|
@@ -80,92 +90,22 @@ export declare function createBalendar(config: BalendarConfig): {
|
|
|
80
90
|
};
|
|
81
91
|
}>>;
|
|
82
92
|
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}) => {
|
|
89
|
-
oauth: {
|
|
90
|
-
url: {
|
|
91
|
-
get: (options: {
|
|
92
|
-
headers?: Record<string, unknown> | undefined;
|
|
93
|
-
query: {
|
|
94
|
-
externalProvider: "apple" | "google" | "microsoft";
|
|
95
|
-
redirectUri: string;
|
|
96
|
-
scopes?: string | undefined;
|
|
97
|
-
state?: string | undefined;
|
|
98
|
-
};
|
|
99
|
-
fetch?: RequestInit | undefined;
|
|
100
|
-
}) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
101
|
-
200: {
|
|
102
|
-
url: string;
|
|
103
|
-
};
|
|
104
|
-
400: {
|
|
105
|
-
error: string;
|
|
106
|
-
};
|
|
107
|
-
422: {
|
|
108
|
-
type: "validation";
|
|
109
|
-
on: string;
|
|
110
|
-
summary?: string;
|
|
111
|
-
message?: string;
|
|
112
|
-
found?: unknown;
|
|
113
|
-
property?: string;
|
|
114
|
-
expected?: string;
|
|
115
|
-
};
|
|
116
|
-
}>>;
|
|
117
|
-
};
|
|
118
|
-
};
|
|
119
|
-
"is-connected-google": {
|
|
120
|
-
get: (options?: {
|
|
121
|
-
headers?: Record<string, unknown> | undefined;
|
|
122
|
-
query?: Record<string, unknown> | undefined;
|
|
123
|
-
fetch?: RequestInit | undefined;
|
|
124
|
-
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
125
|
-
200: {
|
|
126
|
-
isConnected: boolean;
|
|
127
|
-
};
|
|
128
|
-
422: {
|
|
129
|
-
type: "validation";
|
|
130
|
-
on: string;
|
|
131
|
-
summary?: string;
|
|
132
|
-
message?: string;
|
|
133
|
-
found?: unknown;
|
|
134
|
-
property?: string;
|
|
135
|
-
expected?: string;
|
|
136
|
-
};
|
|
137
|
-
}>>;
|
|
138
|
-
};
|
|
139
|
-
} & ((params: {
|
|
140
|
-
externalCalendarId: string | number;
|
|
141
|
-
}) => {
|
|
93
|
+
} & ((params: {
|
|
94
|
+
userId: string | number;
|
|
95
|
+
}) => {
|
|
96
|
+
oauth: {
|
|
97
|
+
url: {
|
|
142
98
|
get: (options?: {
|
|
143
99
|
headers?: Record<string, unknown> | undefined;
|
|
144
100
|
query?: Record<string, unknown> | undefined;
|
|
145
101
|
fetch?: RequestInit | undefined;
|
|
146
102
|
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
147
|
-
|
|
148
|
-
externalCalendar: {
|
|
149
|
-
lastSyncedAt: string | null;
|
|
150
|
-
syncStatus: "error" | "pending" | "syncing" | "synced";
|
|
151
|
-
syncError: string | null;
|
|
152
|
-
retryCount: number;
|
|
153
|
-
externalProvider: "apple" | "google" | "microsoft";
|
|
154
|
-
externalId: string;
|
|
155
|
-
connectionId: string;
|
|
156
|
-
accessToken: string;
|
|
157
|
-
expiresAt: string;
|
|
158
|
-
createdAt: string;
|
|
159
|
-
updatedAt: string;
|
|
160
|
-
externalCalendarId: number;
|
|
161
|
-
userId: number;
|
|
162
|
-
status: "error" | "active" | "expired" | "revoked";
|
|
163
|
-
refreshToken?: string | undefined;
|
|
164
|
-
};
|
|
165
|
-
};
|
|
166
|
-
404: {
|
|
103
|
+
500: {
|
|
167
104
|
error: string;
|
|
168
105
|
};
|
|
106
|
+
200: {
|
|
107
|
+
url: string;
|
|
108
|
+
};
|
|
169
109
|
422: {
|
|
170
110
|
type: "validation";
|
|
171
111
|
on: string;
|
|
@@ -176,8 +116,196 @@ export declare function createBalendar(config: BalendarConfig): {
|
|
|
176
116
|
expected?: string;
|
|
177
117
|
};
|
|
178
118
|
}>>;
|
|
179
|
-
}
|
|
119
|
+
};
|
|
180
120
|
};
|
|
121
|
+
})) & {};
|
|
122
|
+
webhooks: ((params: {
|
|
123
|
+
userId: string | number;
|
|
124
|
+
}) => {
|
|
125
|
+
handle: {
|
|
126
|
+
post: (body?: any, options?: {
|
|
127
|
+
headers?: Record<string, unknown> | undefined;
|
|
128
|
+
query?: Record<string, unknown> | undefined;
|
|
129
|
+
fetch?: RequestInit | undefined;
|
|
130
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
131
|
+
500: {
|
|
132
|
+
error: string;
|
|
133
|
+
};
|
|
134
|
+
200: {
|
|
135
|
+
success: boolean;
|
|
136
|
+
calendarExternalId?: string | undefined;
|
|
137
|
+
resourceId?: string | undefined;
|
|
138
|
+
error?: string | undefined;
|
|
139
|
+
};
|
|
140
|
+
400: {
|
|
141
|
+
error: string;
|
|
142
|
+
};
|
|
143
|
+
404: {
|
|
144
|
+
error: string;
|
|
145
|
+
};
|
|
146
|
+
422: {
|
|
147
|
+
type: "validation";
|
|
148
|
+
on: string;
|
|
149
|
+
summary?: string;
|
|
150
|
+
message?: string;
|
|
151
|
+
found?: unknown;
|
|
152
|
+
property?: string;
|
|
153
|
+
expected?: string;
|
|
154
|
+
};
|
|
155
|
+
}>>;
|
|
156
|
+
};
|
|
157
|
+
}) & {
|
|
158
|
+
google: {
|
|
159
|
+
post: (body?: any, options?: {
|
|
160
|
+
headers?: Record<string, unknown> | undefined;
|
|
161
|
+
query?: Record<string, unknown> | undefined;
|
|
162
|
+
fetch?: RequestInit | undefined;
|
|
163
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
164
|
+
500: {
|
|
165
|
+
error: string;
|
|
166
|
+
};
|
|
167
|
+
200: {
|
|
168
|
+
success: boolean;
|
|
169
|
+
message?: string | undefined;
|
|
170
|
+
error?: string | undefined;
|
|
171
|
+
};
|
|
172
|
+
400: {
|
|
173
|
+
error: string;
|
|
174
|
+
};
|
|
175
|
+
422: {
|
|
176
|
+
type: "validation";
|
|
177
|
+
on: string;
|
|
178
|
+
summary?: string;
|
|
179
|
+
message?: string;
|
|
180
|
+
found?: unknown;
|
|
181
|
+
property?: string;
|
|
182
|
+
expected?: string;
|
|
183
|
+
};
|
|
184
|
+
}>>;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
events: ((params: {
|
|
188
|
+
eventId: string | number;
|
|
189
|
+
}) => {
|
|
190
|
+
patch: (body: {
|
|
191
|
+
userId: number;
|
|
192
|
+
status?: "confirmed" | "cancelled" | "tentative" | undefined;
|
|
193
|
+
title?: string | undefined;
|
|
194
|
+
description?: string | null | undefined;
|
|
195
|
+
startTime?: string | undefined;
|
|
196
|
+
endTime?: string | undefined;
|
|
197
|
+
location?: string | null | undefined;
|
|
198
|
+
busyStatus?: "busy" | "free" | undefined;
|
|
199
|
+
}, options?: {
|
|
200
|
+
headers?: Record<string, unknown> | undefined;
|
|
201
|
+
query?: Record<string, unknown> | undefined;
|
|
202
|
+
fetch?: RequestInit | undefined;
|
|
203
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
204
|
+
500: {
|
|
205
|
+
error: string;
|
|
206
|
+
};
|
|
207
|
+
200: {
|
|
208
|
+
userId: number;
|
|
209
|
+
title: string;
|
|
210
|
+
startTime: string;
|
|
211
|
+
endTime: string;
|
|
212
|
+
status: "confirmed" | "cancelled" | "tentative";
|
|
213
|
+
busyStatus: "busy" | "free";
|
|
214
|
+
createdAt: string;
|
|
215
|
+
updatedAt: string;
|
|
216
|
+
eventId: number;
|
|
217
|
+
bookingId: number | null;
|
|
218
|
+
description: string | null;
|
|
219
|
+
location: string | null;
|
|
220
|
+
};
|
|
221
|
+
400: {
|
|
222
|
+
error: string;
|
|
223
|
+
};
|
|
224
|
+
404: {
|
|
225
|
+
error: string;
|
|
226
|
+
};
|
|
227
|
+
422: {
|
|
228
|
+
type: "validation";
|
|
229
|
+
on: string;
|
|
230
|
+
summary?: string;
|
|
231
|
+
message?: string;
|
|
232
|
+
found?: unknown;
|
|
233
|
+
property?: string;
|
|
234
|
+
expected?: string;
|
|
235
|
+
};
|
|
236
|
+
}>>;
|
|
237
|
+
delete: (body: {
|
|
238
|
+
userId: number;
|
|
239
|
+
}, options?: {
|
|
240
|
+
headers?: Record<string, unknown> | undefined;
|
|
241
|
+
query?: Record<string, unknown> | undefined;
|
|
242
|
+
fetch?: RequestInit | undefined;
|
|
243
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
244
|
+
500: {
|
|
245
|
+
error: string;
|
|
246
|
+
};
|
|
247
|
+
200: {
|
|
248
|
+
success: boolean;
|
|
249
|
+
};
|
|
250
|
+
404: {
|
|
251
|
+
error: string;
|
|
252
|
+
};
|
|
253
|
+
422: {
|
|
254
|
+
type: "validation";
|
|
255
|
+
on: string;
|
|
256
|
+
summary?: string;
|
|
257
|
+
message?: string;
|
|
258
|
+
found?: unknown;
|
|
259
|
+
property?: string;
|
|
260
|
+
expected?: string;
|
|
261
|
+
};
|
|
262
|
+
}>>;
|
|
263
|
+
}) & {
|
|
264
|
+
post: (body: {
|
|
265
|
+
userId: number;
|
|
266
|
+
bookingId: number | null;
|
|
267
|
+
title: string;
|
|
268
|
+
description: string | null;
|
|
269
|
+
location: string | null;
|
|
270
|
+
startTime: string;
|
|
271
|
+
endTime: string;
|
|
272
|
+
status: "confirmed" | "cancelled" | "tentative";
|
|
273
|
+
busyStatus: "busy" | "free";
|
|
274
|
+
}, options?: {
|
|
275
|
+
headers?: Record<string, unknown> | undefined;
|
|
276
|
+
query?: Record<string, unknown> | undefined;
|
|
277
|
+
fetch?: RequestInit | undefined;
|
|
278
|
+
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
279
|
+
500: {
|
|
280
|
+
error: string;
|
|
281
|
+
};
|
|
282
|
+
200: {
|
|
283
|
+
userId: number;
|
|
284
|
+
title: string;
|
|
285
|
+
startTime: string;
|
|
286
|
+
endTime: string;
|
|
287
|
+
status: "confirmed" | "cancelled" | "tentative";
|
|
288
|
+
busyStatus: "busy" | "free";
|
|
289
|
+
createdAt: string;
|
|
290
|
+
updatedAt: string;
|
|
291
|
+
eventId: number;
|
|
292
|
+
bookingId: number | null;
|
|
293
|
+
description: string | null;
|
|
294
|
+
location: string | null;
|
|
295
|
+
};
|
|
296
|
+
400: {
|
|
297
|
+
error: string;
|
|
298
|
+
};
|
|
299
|
+
422: {
|
|
300
|
+
type: "validation";
|
|
301
|
+
on: string;
|
|
302
|
+
summary?: string;
|
|
303
|
+
message?: string;
|
|
304
|
+
found?: unknown;
|
|
305
|
+
property?: string;
|
|
306
|
+
expected?: string;
|
|
307
|
+
};
|
|
308
|
+
}>>;
|
|
181
309
|
};
|
|
182
310
|
};
|
|
183
311
|
events: ((params: {
|
|
@@ -680,129 +808,6 @@ export declare function createBalendar(config: BalendarConfig): {
|
|
|
680
808
|
}>>;
|
|
681
809
|
};
|
|
682
810
|
};
|
|
683
|
-
"event-sync": {
|
|
684
|
-
event: ((params: {
|
|
685
|
-
eventId: string | number;
|
|
686
|
-
}) => {
|
|
687
|
-
patch: (body?: {
|
|
688
|
-
userId?: number | undefined;
|
|
689
|
-
status?: "confirmed" | "cancelled" | "tentative" | undefined;
|
|
690
|
-
title?: string | undefined;
|
|
691
|
-
description?: string | null | undefined;
|
|
692
|
-
startTime?: string | undefined;
|
|
693
|
-
endTime?: string | undefined;
|
|
694
|
-
location?: string | null | undefined;
|
|
695
|
-
busyStatus?: "busy" | "free" | undefined;
|
|
696
|
-
} | undefined, options?: {
|
|
697
|
-
headers?: Record<string, unknown> | undefined;
|
|
698
|
-
query?: Record<string, unknown> | undefined;
|
|
699
|
-
fetch?: RequestInit | undefined;
|
|
700
|
-
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
701
|
-
500: {
|
|
702
|
-
error: string;
|
|
703
|
-
};
|
|
704
|
-
200: {
|
|
705
|
-
userId: number;
|
|
706
|
-
title: string;
|
|
707
|
-
startTime: string;
|
|
708
|
-
endTime: string;
|
|
709
|
-
status: "confirmed" | "cancelled" | "tentative";
|
|
710
|
-
busyStatus: "busy" | "free";
|
|
711
|
-
createdAt: string;
|
|
712
|
-
updatedAt: string;
|
|
713
|
-
eventId: number;
|
|
714
|
-
bookingId: number | null;
|
|
715
|
-
description: string | null;
|
|
716
|
-
location: string | null;
|
|
717
|
-
};
|
|
718
|
-
400: {
|
|
719
|
-
error: string;
|
|
720
|
-
};
|
|
721
|
-
404: {
|
|
722
|
-
error: string;
|
|
723
|
-
};
|
|
724
|
-
422: {
|
|
725
|
-
type: "validation";
|
|
726
|
-
on: string;
|
|
727
|
-
summary?: string;
|
|
728
|
-
message?: string;
|
|
729
|
-
found?: unknown;
|
|
730
|
-
property?: string;
|
|
731
|
-
expected?: string;
|
|
732
|
-
};
|
|
733
|
-
}>>;
|
|
734
|
-
delete: (body?: unknown, options?: {
|
|
735
|
-
headers?: Record<string, unknown> | undefined;
|
|
736
|
-
query?: Record<string, unknown> | undefined;
|
|
737
|
-
fetch?: RequestInit | undefined;
|
|
738
|
-
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
739
|
-
500: {
|
|
740
|
-
error: string;
|
|
741
|
-
};
|
|
742
|
-
200: {
|
|
743
|
-
success: boolean;
|
|
744
|
-
};
|
|
745
|
-
404: {
|
|
746
|
-
error: string;
|
|
747
|
-
};
|
|
748
|
-
422: {
|
|
749
|
-
type: "validation";
|
|
750
|
-
on: string;
|
|
751
|
-
summary?: string;
|
|
752
|
-
message?: string;
|
|
753
|
-
found?: unknown;
|
|
754
|
-
property?: string;
|
|
755
|
-
expected?: string;
|
|
756
|
-
};
|
|
757
|
-
}>>;
|
|
758
|
-
}) & {
|
|
759
|
-
post: (body: {
|
|
760
|
-
userId: number;
|
|
761
|
-
bookingId: number | null;
|
|
762
|
-
title: string;
|
|
763
|
-
description: string | null;
|
|
764
|
-
location: string | null;
|
|
765
|
-
startTime: string;
|
|
766
|
-
endTime: string;
|
|
767
|
-
status: "confirmed" | "cancelled" | "tentative";
|
|
768
|
-
busyStatus: "busy" | "free";
|
|
769
|
-
}, options?: {
|
|
770
|
-
headers?: Record<string, unknown> | undefined;
|
|
771
|
-
query?: Record<string, unknown> | undefined;
|
|
772
|
-
fetch?: RequestInit | undefined;
|
|
773
|
-
} | undefined) => Promise<import("@elysiajs/eden").Treaty.TreatyResponse<{
|
|
774
|
-
500: {
|
|
775
|
-
error: string;
|
|
776
|
-
};
|
|
777
|
-
200: {
|
|
778
|
-
userId: number;
|
|
779
|
-
title: string;
|
|
780
|
-
startTime: string;
|
|
781
|
-
endTime: string;
|
|
782
|
-
status: "confirmed" | "cancelled" | "tentative";
|
|
783
|
-
busyStatus: "busy" | "free";
|
|
784
|
-
createdAt: string;
|
|
785
|
-
updatedAt: string;
|
|
786
|
-
eventId: number;
|
|
787
|
-
bookingId: number | null;
|
|
788
|
-
description: string | null;
|
|
789
|
-
location: string | null;
|
|
790
|
-
};
|
|
791
|
-
400: {
|
|
792
|
-
error: string;
|
|
793
|
-
};
|
|
794
|
-
422: {
|
|
795
|
-
type: "validation";
|
|
796
|
-
on: string;
|
|
797
|
-
summary?: string;
|
|
798
|
-
message?: string;
|
|
799
|
-
found?: unknown;
|
|
800
|
-
property?: string;
|
|
801
|
-
expected?: string;
|
|
802
|
-
};
|
|
803
|
-
}>>;
|
|
804
|
-
};
|
|
805
|
-
};
|
|
806
811
|
};
|
|
807
812
|
};
|
|
808
813
|
export type Balendar = ReturnType<typeof createBalendar>;
|
package/dist/lib/models.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from '../src/modules/availability-rules/availability-rules.domain.ts';
|
|
2
|
+
export * from '../src/modules/calendar-mappings/calendar-mappings.domain.ts';
|
|
3
|
+
export * from '../src/modules/event-mappings/event-mappings.domain.ts';
|
|
2
4
|
export * from '../src/modules/events/events.domain.ts';
|
|
3
|
-
export * from '../src/modules/external-calendars/external-calendars.domain.ts';
|
|
4
|
-
export * from '../src/modules/external-events/external-events.domain.ts';
|
|
5
5
|
export * from '../src/orchestrators/availability/availability.domain.ts';
|
|
6
|
+
export * from '../src/shared/schemas/index.ts';
|