recal-sdk 0.1.0 → 0.2.0
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/README.md +927 -0
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +66 -20
- package/dist/services/calendar.service.d.ts +81 -34
- package/dist/services/calendar.service.d.ts.map +1 -1
- package/dist/services/oauth.service.d.ts +2 -1
- package/dist/services/oauth.service.d.ts.map +1 -1
- package/dist/services/scheduling.service.d.ts +30 -27
- package/dist/services/scheduling.service.d.ts.map +1 -1
- package/dist/typebox/calendar.tb.d.ts +2 -2
- package/dist/typebox/calendar.tb.d.ts.map +1 -1
- package/dist/typebox/oauth.tb.d.ts +2 -2
- package/dist/typebox/user.tb.d.ts +1 -1
- package/dist/types/calendar.types.d.ts +3 -3
- package/dist/types/calendar.types.d.ts.map +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -20,9 +20,14 @@ export declare class RecalClient {
|
|
|
20
20
|
users: UsersService;
|
|
21
21
|
calendar: CalendarService;
|
|
22
22
|
scheduling: SchedulingService;
|
|
23
|
-
constructor(options
|
|
23
|
+
constructor(options?: RecalOptions);
|
|
24
24
|
}
|
|
25
25
|
export * from './entities/organization';
|
|
26
26
|
export * from './entities/user';
|
|
27
27
|
export * from './errors';
|
|
28
|
+
export * from './types/calendar.types';
|
|
29
|
+
export * from './types/scheduling.types';
|
|
30
|
+
export * from './types/oauth.types';
|
|
31
|
+
export type { RecalOptions } from './types/internal.types';
|
|
32
|
+
export type { RecalOptions as RecalClientOptions } from './types/internal.types';
|
|
28
33
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,EAAE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AA;gBAEV,OAAO,CAAC,EAAE,YAAY;CAe5C;AAED,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,UAAU,CAAA;AAExB,cAAc,wBAAwB,CAAA;AACtC,cAAc,0BAA0B,CAAA;AACxC,cAAc,qBAAqB,CAAA;AACnC,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,YAAY,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2754,6 +2754,13 @@ var Provider;
|
|
|
2754
2754
|
Provider2["GOOGLE"] = "google";
|
|
2755
2755
|
Provider2["MICROSOFT"] = "microsoft";
|
|
2756
2756
|
})(Provider ||= {});
|
|
2757
|
+
var CalendarAccessRoles;
|
|
2758
|
+
((CalendarAccessRoles2) => {
|
|
2759
|
+
CalendarAccessRoles2["FreeBusyReader"] = "freeBusyReader";
|
|
2760
|
+
CalendarAccessRoles2["Reader"] = "reader";
|
|
2761
|
+
CalendarAccessRoles2["Writer"] = "writer";
|
|
2762
|
+
CalendarAccessRoles2["Owner"] = "owner";
|
|
2763
|
+
})(CalendarAccessRoles ||= {});
|
|
2757
2764
|
var AttendeeResponseStatus;
|
|
2758
2765
|
((AttendeeResponseStatus2) => {
|
|
2759
2766
|
AttendeeResponseStatus2["NeedsAction"] = "needsAction";
|
|
@@ -2810,7 +2817,7 @@ var createEventSchema = Type.Object({
|
|
|
2810
2817
|
end: Type.Optional(Type.Date()),
|
|
2811
2818
|
location: Type.Optional(Type.String()),
|
|
2812
2819
|
attendees: Type.Optional(Type.Array(createAttendeeSchema)),
|
|
2813
|
-
sendNotifications: Type.Boolean(),
|
|
2820
|
+
sendNotifications: Type.Optional(Type.Boolean()),
|
|
2814
2821
|
meeting: Type.Optional(Type.Union([Type.Boolean(), meetingSchema]))
|
|
2815
2822
|
});
|
|
2816
2823
|
var createEventAcrossCalendarsSchema = Type.Object({
|
|
@@ -2850,7 +2857,7 @@ var timeRangeSchema = Type.Object({
|
|
|
2850
2857
|
start: Type.Date(),
|
|
2851
2858
|
end: Type.Date()
|
|
2852
2859
|
});
|
|
2853
|
-
var
|
|
2860
|
+
var busySchema = Type.Array(timeRangeSchema);
|
|
2854
2861
|
|
|
2855
2862
|
// node_modules/@sinclair/typebox/build/esm/errors/function.mjs
|
|
2856
2863
|
function DefaultErrorFunction(error) {
|
|
@@ -6317,20 +6324,22 @@ class CalendarService {
|
|
|
6317
6324
|
constructor(fetchHelper) {
|
|
6318
6325
|
this.fetchHelper = fetchHelper;
|
|
6319
6326
|
}
|
|
6320
|
-
async
|
|
6321
|
-
|
|
6322
|
-
|
|
6327
|
+
async getBusy(userId, minDate, maxDate, options) {
|
|
6328
|
+
const { provider, timeZone } = options || {};
|
|
6329
|
+
return this.fetchHelper.get(`/v1/users/${userId}/calendar/busy`, {
|
|
6330
|
+
schema: busySchema,
|
|
6323
6331
|
searchParams: { minDate, maxDate, provider },
|
|
6324
6332
|
headers: timeZone ? { "x-timezone": timeZone } : undefined
|
|
6325
6333
|
}).catch(errorHandler([
|
|
6326
6334
|
{
|
|
6327
6335
|
code: 400,
|
|
6328
|
-
error: new OAuthConnectionNotFoundError(userId, Array.isArray(provider) ? provider.join(",") : provider || "
|
|
6336
|
+
error: new OAuthConnectionNotFoundError(userId, Array.isArray(provider) ? provider.join(",") : provider || "all")
|
|
6329
6337
|
},
|
|
6330
6338
|
{ code: 404, error: new UserNotFoundError(userId) }
|
|
6331
6339
|
]));
|
|
6332
6340
|
}
|
|
6333
|
-
async getEvents(userId, minDate, maxDate,
|
|
6341
|
+
async getEvents(userId, minDate, maxDate, options) {
|
|
6342
|
+
const { provider, timeZone } = options || {};
|
|
6334
6343
|
return this.fetchHelper.get(`/v1/users/${userId}/calendar/events`, {
|
|
6335
6344
|
schema: Type.Array(eventSchema),
|
|
6336
6345
|
searchParams: { minDate, maxDate, provider },
|
|
@@ -6344,7 +6353,8 @@ class CalendarService {
|
|
|
6344
6353
|
{ code: 404, error: new UserNotFoundError(userId) }
|
|
6345
6354
|
]));
|
|
6346
6355
|
}
|
|
6347
|
-
async getEventByMetaId(userId, metaId,
|
|
6356
|
+
async getEventByMetaId(userId, metaId, options) {
|
|
6357
|
+
const { provider, timeZone } = options || {};
|
|
6348
6358
|
return this.fetchHelper.get(`/v1/users/${userId}/calendar/events/meta/${metaId}`, {
|
|
6349
6359
|
schema: eventSchema,
|
|
6350
6360
|
searchParams: { provider },
|
|
@@ -6358,7 +6368,8 @@ class CalendarService {
|
|
|
6358
6368
|
{ code: 404, error: new EventNotFoundError(metaId) }
|
|
6359
6369
|
]));
|
|
6360
6370
|
}
|
|
6361
|
-
async createEventByMetaId(userId, event,
|
|
6371
|
+
async createEventByMetaId(userId, event, options) {
|
|
6372
|
+
const { provider, timeZone } = options || {};
|
|
6362
6373
|
return this.fetchHelper.post(`/v1/users/${userId}/calendar/events/meta`, {
|
|
6363
6374
|
schema: eventSchema,
|
|
6364
6375
|
searchParams: { provider },
|
|
@@ -6372,7 +6383,8 @@ class CalendarService {
|
|
|
6372
6383
|
{ code: 404, error: new UserNotFoundError(userId) }
|
|
6373
6384
|
]));
|
|
6374
6385
|
}
|
|
6375
|
-
async updateEventByMetaId(userId, metaId, event,
|
|
6386
|
+
async updateEventByMetaId(userId, metaId, event, options) {
|
|
6387
|
+
const { provider, timeZone } = options || {};
|
|
6376
6388
|
return this.fetchHelper.put(`/v1/users/${userId}/calendar/events/meta/${metaId}`, {
|
|
6377
6389
|
schema: eventSchema,
|
|
6378
6390
|
searchParams: { provider },
|
|
@@ -6387,7 +6399,8 @@ class CalendarService {
|
|
|
6387
6399
|
{ code: 404, error: new EventNotFoundError(metaId) }
|
|
6388
6400
|
]));
|
|
6389
6401
|
}
|
|
6390
|
-
async deleteEventByMetaId(userId, metaId,
|
|
6402
|
+
async deleteEventByMetaId(userId, metaId, options) {
|
|
6403
|
+
const { provider, timeZone } = options || {};
|
|
6391
6404
|
return this.fetchHelper.delete(`/v1/users/${userId}/calendar/events/meta/${metaId}`, {
|
|
6392
6405
|
searchParams: { provider },
|
|
6393
6406
|
headers: timeZone ? { "x-timezone": timeZone } : undefined,
|
|
@@ -6400,7 +6413,14 @@ class CalendarService {
|
|
|
6400
6413
|
{ code: 404, error: new UserNotFoundError(userId) }
|
|
6401
6414
|
]));
|
|
6402
6415
|
}
|
|
6403
|
-
async getEvent(
|
|
6416
|
+
async getEvent({
|
|
6417
|
+
userId,
|
|
6418
|
+
provider,
|
|
6419
|
+
calendarId = "primary",
|
|
6420
|
+
eventId,
|
|
6421
|
+
options
|
|
6422
|
+
}) {
|
|
6423
|
+
const { timeZone } = options || {};
|
|
6404
6424
|
return this.fetchHelper.get(`/v1/users/${userId}/calendar/events/${provider}/${calendarId}/${eventId}`, {
|
|
6405
6425
|
schema: eventSchema,
|
|
6406
6426
|
headers: timeZone ? { "x-timezone": timeZone } : undefined
|
|
@@ -6415,7 +6435,14 @@ class CalendarService {
|
|
|
6415
6435
|
{ code: 404, error: new ProviderCredentialsNotSetError(provider) }
|
|
6416
6436
|
]));
|
|
6417
6437
|
}
|
|
6418
|
-
async createEvent(
|
|
6438
|
+
async createEvent({
|
|
6439
|
+
userId,
|
|
6440
|
+
provider,
|
|
6441
|
+
calendarId = "primary",
|
|
6442
|
+
event,
|
|
6443
|
+
options
|
|
6444
|
+
}) {
|
|
6445
|
+
const { timeZone } = options || {};
|
|
6419
6446
|
return this.fetchHelper.post(`/v1/users/${userId}/calendar/events/${provider}/${calendarId}`, {
|
|
6420
6447
|
schema: eventSchema,
|
|
6421
6448
|
headers: timeZone ? { "x-timezone": timeZone } : undefined,
|
|
@@ -6430,7 +6457,15 @@ class CalendarService {
|
|
|
6430
6457
|
{ code: 404, error: new ProviderCredentialsNotSetError(provider) }
|
|
6431
6458
|
]));
|
|
6432
6459
|
}
|
|
6433
|
-
async updateEvent(
|
|
6460
|
+
async updateEvent({
|
|
6461
|
+
userId,
|
|
6462
|
+
provider,
|
|
6463
|
+
calendarId = "primary",
|
|
6464
|
+
eventId,
|
|
6465
|
+
event,
|
|
6466
|
+
options
|
|
6467
|
+
}) {
|
|
6468
|
+
const { timeZone } = options || {};
|
|
6434
6469
|
return this.fetchHelper.put(`/v1/users/${userId}/calendar/events/${provider}/${calendarId}/${eventId}`, {
|
|
6435
6470
|
schema: eventSchema,
|
|
6436
6471
|
headers: timeZone ? { "x-timezone": timeZone } : undefined,
|
|
@@ -6445,7 +6480,14 @@ class CalendarService {
|
|
|
6445
6480
|
{ code: 404, error: new ProviderCredentialsNotSetError(provider) }
|
|
6446
6481
|
]));
|
|
6447
6482
|
}
|
|
6448
|
-
async deleteEvent(
|
|
6483
|
+
async deleteEvent({
|
|
6484
|
+
userId,
|
|
6485
|
+
provider,
|
|
6486
|
+
calendarId = "primary",
|
|
6487
|
+
eventId,
|
|
6488
|
+
options
|
|
6489
|
+
}) {
|
|
6490
|
+
const { timeZone } = options || {};
|
|
6449
6491
|
return this.fetchHelper.delete(`/v1/users/${userId}/calendar/events/${provider}/${calendarId}/${eventId}`, {
|
|
6450
6492
|
headers: timeZone ? { "x-timezone": timeZone } : undefined,
|
|
6451
6493
|
schema: Type.Void()
|
|
@@ -6459,8 +6501,9 @@ class CalendarService {
|
|
|
6459
6501
|
{ code: 404, error: new EventNotFoundError(eventId) }
|
|
6460
6502
|
]));
|
|
6461
6503
|
}
|
|
6462
|
-
async
|
|
6463
|
-
|
|
6504
|
+
async getOrgWideBusy(slug, minDate, maxDate, primaryOnly, options) {
|
|
6505
|
+
const { provider, timeZone } = options || {};
|
|
6506
|
+
return this.fetchHelper.get(`/v1/organizations/${slug}/calendar/busy`, {
|
|
6464
6507
|
schema: Type.Array(timeRangeSchema),
|
|
6465
6508
|
searchParams: { minDate, maxDate, primaryOnly, provider },
|
|
6466
6509
|
headers: timeZone ? { "x-timezone": timeZone } : undefined
|
|
@@ -7017,8 +7060,8 @@ class RecalClient {
|
|
|
7017
7060
|
calendar;
|
|
7018
7061
|
scheduling;
|
|
7019
7062
|
constructor(options) {
|
|
7020
|
-
const _token = functionize(options
|
|
7021
|
-
this.baseUrl = functionize(options
|
|
7063
|
+
const _token = functionize(options?.token) || process.env.RECAL_TOKEN;
|
|
7064
|
+
this.baseUrl = functionize(options?.url) || process.env.RECAL_URL || "https://api.recal.dev";
|
|
7022
7065
|
if (!_token)
|
|
7023
7066
|
console.error("[Recal] No token provided");
|
|
7024
7067
|
else if (!_token.startsWith("recal_"))
|
|
@@ -7038,9 +7081,12 @@ export {
|
|
|
7038
7081
|
User,
|
|
7039
7082
|
RecalClient,
|
|
7040
7083
|
ProviderCredentialsNotSetError,
|
|
7084
|
+
Provider,
|
|
7041
7085
|
OrganizationNotFoundError,
|
|
7042
7086
|
OrganizationAlreadyExistsError,
|
|
7043
7087
|
Organization,
|
|
7044
7088
|
OAuthConnectionNotFoundError,
|
|
7045
|
-
EventNotFoundError
|
|
7089
|
+
EventNotFoundError,
|
|
7090
|
+
CalendarAccessRoles,
|
|
7091
|
+
AttendeeResponseStatus
|
|
7046
7092
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CreateEvent, CreateEventAcrossCalendars, Event,
|
|
1
|
+
import type { Busy, CreateEvent, CreateEventAcrossCalendars, Event, Provider, TimeRange, UpdateEvent, UpdateEventAcrossCalendars } from 'src/types/calendar.types';
|
|
2
2
|
import type { FetchHelper } from 'src/utils/fetch.helper';
|
|
3
3
|
export declare class CalendarService {
|
|
4
4
|
private fetchHelper;
|
|
@@ -7,100 +7,147 @@ export declare class CalendarService {
|
|
|
7
7
|
* @param userId The ID of the user
|
|
8
8
|
* @param minDate The start date of the free/busy period
|
|
9
9
|
* @param maxDate The end date of the free/busy period
|
|
10
|
-
* @param
|
|
11
|
-
* @param timeZone The time zone of the calendar (optional)
|
|
10
|
+
* @param options The options for the free/busy query (optional)
|
|
12
11
|
* @returns The free/busy period
|
|
13
12
|
*/
|
|
14
|
-
|
|
13
|
+
getBusy(userId: string, minDate: Date, maxDate: Date, options?: {
|
|
14
|
+
provider?: Provider | Provider[];
|
|
15
|
+
timeZone?: string;
|
|
16
|
+
}): Promise<Busy>;
|
|
15
17
|
/**
|
|
16
18
|
* @param userId The ID of the user
|
|
17
19
|
* @param minDate The start date of the events
|
|
18
20
|
* @param maxDate The end date of the events
|
|
19
|
-
* @param
|
|
20
|
-
* @param timeZone The time zone of the calendar (optional)
|
|
21
|
+
* @param options The options for the events query (optional)
|
|
21
22
|
* @returns The events
|
|
22
23
|
*/
|
|
23
|
-
getEvents(userId: string, minDate: Date, maxDate: Date,
|
|
24
|
+
getEvents(userId: string, minDate: Date, maxDate: Date, options?: {
|
|
25
|
+
provider?: Provider | Provider[];
|
|
26
|
+
timeZone?: string;
|
|
27
|
+
}): Promise<Event[]>;
|
|
24
28
|
/**
|
|
25
29
|
* @param userId The ID of the user
|
|
26
30
|
* @param metaId The meta ID of the event
|
|
27
|
-
* @param
|
|
28
|
-
* @param timeZone The time zone of the calendar (optional)
|
|
31
|
+
* @param options The options for the event query (optional)
|
|
29
32
|
* @returns The event
|
|
30
33
|
*/
|
|
31
|
-
getEventByMetaId(userId: string, metaId: string,
|
|
34
|
+
getEventByMetaId(userId: string, metaId: string, options?: {
|
|
35
|
+
provider?: Provider | Provider[];
|
|
36
|
+
timeZone?: string;
|
|
37
|
+
}): Promise<Event>;
|
|
32
38
|
/**
|
|
33
39
|
* @param userId The ID of the user
|
|
34
40
|
* @param event The event to create
|
|
35
|
-
* @param
|
|
36
|
-
* @param timeZone The time zone of the calendar (optional)
|
|
41
|
+
* @param options The options for the event creation (optional)
|
|
37
42
|
* @returns The created event
|
|
38
43
|
*/
|
|
39
|
-
createEventByMetaId(userId: string, event: CreateEventAcrossCalendars,
|
|
44
|
+
createEventByMetaId(userId: string, event: CreateEventAcrossCalendars, options?: {
|
|
45
|
+
provider?: Provider | Provider[];
|
|
46
|
+
timeZone?: string;
|
|
47
|
+
}): Promise<Event>;
|
|
40
48
|
/**
|
|
41
49
|
* @param userId The ID of the user
|
|
42
50
|
* @param metaId The meta ID of the event
|
|
43
51
|
* @param event The updated event
|
|
44
|
-
* @param
|
|
45
|
-
* @param timeZone The time zone of the calendar (optional)
|
|
52
|
+
* @param options The options for the event update (optional)
|
|
46
53
|
* @returns The updated event
|
|
47
54
|
*/
|
|
48
|
-
updateEventByMetaId(userId: string, metaId: string, event: UpdateEventAcrossCalendars,
|
|
55
|
+
updateEventByMetaId(userId: string, metaId: string, event: UpdateEventAcrossCalendars, options?: {
|
|
56
|
+
provider?: Provider | Provider[];
|
|
57
|
+
timeZone?: string;
|
|
58
|
+
}): Promise<Event>;
|
|
49
59
|
/**
|
|
50
60
|
* @param userId The ID of the user
|
|
51
61
|
* @param metaId The meta ID of the event
|
|
52
|
-
* @param
|
|
53
|
-
* @
|
|
54
|
-
* @returns The deleted event
|
|
62
|
+
* @param options The options for the event deletion (optional)
|
|
63
|
+
* @returns void
|
|
55
64
|
*/
|
|
56
|
-
deleteEventByMetaId(userId: string, metaId: string,
|
|
65
|
+
deleteEventByMetaId(userId: string, metaId: string, options?: {
|
|
66
|
+
provider?: Provider | Provider[];
|
|
67
|
+
timeZone?: string;
|
|
68
|
+
}): Promise<void>;
|
|
57
69
|
/**
|
|
58
70
|
* @param userId The ID of the user
|
|
59
71
|
* @param provider The provider of the calendar
|
|
60
72
|
* @param calendarId The ID of the calendar
|
|
61
73
|
* @param eventId The ID of the event
|
|
62
|
-
* @param
|
|
74
|
+
* @param options The options for the event query (optional)
|
|
63
75
|
* @returns The event
|
|
64
76
|
*/
|
|
65
|
-
getEvent(userId
|
|
77
|
+
getEvent({ userId, provider, calendarId, eventId, options, }: {
|
|
78
|
+
userId: string;
|
|
79
|
+
provider: Provider;
|
|
80
|
+
calendarId?: string;
|
|
81
|
+
eventId: string;
|
|
82
|
+
options?: {
|
|
83
|
+
timeZone?: string;
|
|
84
|
+
};
|
|
85
|
+
}): Promise<Event>;
|
|
66
86
|
/**
|
|
67
87
|
* @param userId The ID of the user
|
|
68
88
|
* @param provider The provider of the calendar
|
|
69
89
|
* @param calendarId The ID of the calendar
|
|
70
90
|
* @param event The event to create
|
|
71
|
-
* @param
|
|
91
|
+
* @param options The options for the event creation (optional)
|
|
72
92
|
* @returns The created event
|
|
73
93
|
*/
|
|
74
|
-
createEvent(userId
|
|
94
|
+
createEvent({ userId, provider, calendarId, event, options, }: {
|
|
95
|
+
userId: string;
|
|
96
|
+
provider: Provider;
|
|
97
|
+
calendarId?: string;
|
|
98
|
+
event: CreateEvent;
|
|
99
|
+
options?: {
|
|
100
|
+
timeZone?: string;
|
|
101
|
+
};
|
|
102
|
+
}): Promise<Event>;
|
|
75
103
|
/**
|
|
76
104
|
* @param userId The ID of the user
|
|
77
105
|
* @param provider The provider of the calendar
|
|
78
106
|
* @param calendarId The ID of the calendar
|
|
79
107
|
* @param eventId The ID of the event
|
|
80
108
|
* @param event The updated event
|
|
81
|
-
* @param
|
|
109
|
+
* @param options The options for the event update (optional)
|
|
82
110
|
* @returns The updated event
|
|
83
111
|
*/
|
|
84
|
-
updateEvent(userId
|
|
112
|
+
updateEvent({ userId, provider, calendarId, eventId, event, options, }: {
|
|
113
|
+
userId: string;
|
|
114
|
+
provider: Provider;
|
|
115
|
+
calendarId?: string;
|
|
116
|
+
eventId: string;
|
|
117
|
+
event: UpdateEvent;
|
|
118
|
+
options?: {
|
|
119
|
+
timeZone?: string;
|
|
120
|
+
};
|
|
121
|
+
}): Promise<Event>;
|
|
85
122
|
/**
|
|
86
123
|
* @param userId The ID of the user
|
|
87
124
|
* @param provider The provider of the calendar
|
|
88
125
|
* @param calendarId The ID of the calendar
|
|
89
126
|
* @param eventId The ID of the event
|
|
90
|
-
* @param
|
|
91
|
-
* @returns
|
|
127
|
+
* @param options The options for the event deletion (optional)
|
|
128
|
+
* @returns void
|
|
92
129
|
*/
|
|
93
|
-
deleteEvent(userId
|
|
130
|
+
deleteEvent({ userId, provider, calendarId, eventId, options, }: {
|
|
131
|
+
userId: string;
|
|
132
|
+
provider: Provider;
|
|
133
|
+
calendarId?: string;
|
|
134
|
+
eventId: string;
|
|
135
|
+
options?: {
|
|
136
|
+
timeZone?: string;
|
|
137
|
+
};
|
|
138
|
+
}): Promise<void>;
|
|
94
139
|
/**
|
|
95
|
-
* Get the org-wide
|
|
140
|
+
* Get the org-wide busy period
|
|
96
141
|
* @param slug The slug of the organization
|
|
97
142
|
* @param minDate The minimum date
|
|
98
143
|
* @param maxDate The maximum date
|
|
99
|
-
* @param primaryOnly Whether to only include the primary calendar
|
|
100
|
-
* @param
|
|
101
|
-
* @param timeZone The time zone
|
|
144
|
+
* @param primaryOnly Whether to only include the primary calendar (default: true)
|
|
145
|
+
* @param options The options for the org-wide free/busy query (optional)
|
|
102
146
|
* @returns The org-wide free/busy period
|
|
103
147
|
*/
|
|
104
|
-
|
|
148
|
+
getOrgWideBusy(slug: string, minDate: Date, maxDate: Date, primaryOnly?: boolean, options?: {
|
|
149
|
+
provider?: Provider | Provider[];
|
|
150
|
+
timeZone?: string;
|
|
151
|
+
}): Promise<TimeRange[]>;
|
|
105
152
|
}
|
|
106
153
|
//# sourceMappingURL=calendar.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.service.d.ts","sourceRoot":"","sources":["../../src/services/calendar.service.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACR,WAAW,EACX,0BAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"calendar.service.d.ts","sourceRoot":"","sources":["../../src/services/calendar.service.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACR,IAAI,EACJ,WAAW,EACX,0BAA0B,EAC1B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,WAAW,EACX,0BAA0B,EAC7B,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAGzD,qBAAa,eAAe;IACZ,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,WA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AAQ,CAAC,EAAE,MAAM,CAAA;SACpB,CAAA;KACJ,GAAG,OAAO,CAAC,KAAK,CAAC;IAqBlB;;;;;;;OAOG;IACU,WAAW,CAAC,EACrB,MAAM,EACN,QAAQ,EACR,UAAsB,EACtB,OAAO,EACP,OAAO,GACV,EAAE;QACC,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,QAAQ,CAAA;QAClB,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,MAAM,CAAA;QACf,OAAO,CAAC,EAAE;YACN,QAAQ,CAAC,EAAE,MAAM,CAAA;SACpB,CAAA;KACJ,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBjB;;;;;;;;OAQG;IACU,cAAc,CACvB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,IAAI,EACb,WAAW,CAAC,EAAE,OAAO,EACrB,OAAO,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAA;QAChC,QAAQ,CAAC,EAAE,MAAM,CAAA;KACpB,GACF,OAAO,CAAC,SAAS,EAAE,CAAC;CAkB1B"}
|
|
@@ -67,11 +67,12 @@ export declare class OAuthService {
|
|
|
67
67
|
* Verify OAuth code (used in OAuth callback flow)
|
|
68
68
|
* @param provider The provider of the OAuth connection
|
|
69
69
|
* @param code The OAuth code
|
|
70
|
+
* @param scope The OAuth scope (free-busy or edit)
|
|
70
71
|
* @param state The OAuth state
|
|
71
72
|
* @param redirectUrl The redirect URL
|
|
72
73
|
* @returns The OAuth verification result
|
|
73
74
|
*/
|
|
74
|
-
verify(provider: Provider, code: string, scope:
|
|
75
|
+
verify(provider: Provider, code: string, scope: 'edit' | 'free-busy', state: string, redirectUrl?: string): Promise<{
|
|
75
76
|
success: boolean;
|
|
76
77
|
}>;
|
|
77
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth.service.d.ts","sourceRoot":"","sources":["../../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EAAE;QACN,KAAK,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;QAC5B,UAAU,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAA;QACjC,WAAW,CAAC,EAAE,MAAM,CAAA;KACvB,GACF,OAAO,CAAC,SAAS,CAAC;IAuBrB;;;;;;OAMG;IACU,aAAa,CACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE;QACR,WAAW,EAAE,MAAM,CAAA;QACnB,YAAY,CAAC,EAAE,MAAM,CAAA;QACrB,KAAK,EAAE,MAAM,EAAE,CAAA;QACf,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAA;QAClC,KAAK,CAAC,EAAE,MAAM,CAAA;KACjB,GACF,OAAO,CAAC,eAAe,CAAC;IAkB3B;;;;;OAKG;IACU,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAiB1E;;;;;;;;OAQG;IACU,MAAM,CACf,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GAAG,WAAW,EAC3B,KAAK,EAAE,MAAM,EACb,WAAW,CAAC,EAAE,MAAM,GACrB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CA2BnC"}
|
|
@@ -4,44 +4,47 @@ export declare class SchedulingService {
|
|
|
4
4
|
private fetchHelper;
|
|
5
5
|
constructor(fetchHelper: FetchHelper);
|
|
6
6
|
/**
|
|
7
|
-
* Get available time slots based on
|
|
7
|
+
* Get available time slots based on busy data with basic parameters
|
|
8
8
|
* @param userId The ID of the user
|
|
9
|
-
* @param
|
|
10
|
-
* @param
|
|
11
|
-
* @param
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
9
|
+
* @param startDate The start date for availability search
|
|
10
|
+
* @param endDate The end date for availability search
|
|
11
|
+
* @param options Scheduling options (all fields optional):
|
|
12
|
+
* - provider: Calendar provider(s) to check (optional)
|
|
13
|
+
* - padding: Minutes of padding between slots (optional)
|
|
14
|
+
* - slotDuration: Duration of each slot in minutes (optional)
|
|
15
|
+
* - earliestTimeEachDay: Earliest time each day (HH:mm format) (optional)
|
|
16
|
+
* - latestTimeEachDay: Latest time each day (HH:mm format) (optional)
|
|
17
|
+
* - timeZone: Time zone for the request (optional)
|
|
17
18
|
* @returns Available time slots with basic scheduling options
|
|
18
19
|
*/
|
|
19
20
|
userSchedulingBasic(userId: string, startDate: Date, endDate: Date, options: UserSchedulingBasicParams): Promise<SchedulingResponse>;
|
|
20
21
|
/**
|
|
21
|
-
* Get available time slots based on
|
|
22
|
+
* Get available time slots based on busy data with advanced parameters
|
|
22
23
|
* @param userId The ID of the user
|
|
23
|
-
* @param schedules
|
|
24
|
-
* @param
|
|
25
|
-
* @param
|
|
26
|
-
* @param
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* @param schedules Array of schedule rules defining availability windows
|
|
25
|
+
* @param startDate The start date for availability search
|
|
26
|
+
* @param endDate The end date for availability search
|
|
27
|
+
* @param options Advanced scheduling options (all fields optional):
|
|
28
|
+
* - provider: Calendar provider(s) to check (optional)
|
|
29
|
+
* - padding: Minutes of padding between slots (optional)
|
|
30
|
+
* - slotDuration: Duration of each slot in minutes (optional)
|
|
31
|
+
* - timeZone: Time zone for the request (optional)
|
|
30
32
|
* @returns Available time slots with advanced scheduling options
|
|
31
33
|
*/
|
|
32
34
|
userSchedulingAdvanced(userId: string, schedules: Schedule[], startDate: Date, endDate: Date, options: UserSchedulingAdvancedParams): Promise<AdvancedSchedulingResponse>;
|
|
33
35
|
/**
|
|
34
|
-
* Get available time slots based on
|
|
36
|
+
* Get available time slots based on busy data for an organization
|
|
35
37
|
* @param orgSlug The slug of the organization
|
|
36
|
-
* @param
|
|
37
|
-
* @param
|
|
38
|
-
* @param
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
38
|
+
* @param startDate The start date for availability search
|
|
39
|
+
* @param endDate The end date for availability search
|
|
40
|
+
* @param options Organization scheduling options (all fields optional):
|
|
41
|
+
* - provider: Calendar provider(s) to check (optional)
|
|
42
|
+
* - padding: Minutes of padding between slots (optional)
|
|
43
|
+
* - slotDuration: Duration of each slot in minutes (optional)
|
|
44
|
+
* - earliestTimeEachDay: Earliest time each day (HH:mm format) (optional)
|
|
45
|
+
* - latestTimeEachDay: Latest time each day (HH:mm format) (optional)
|
|
46
|
+
* - timeZone: Time zone for the request (optional)
|
|
47
|
+
* @returns Available time slots for the organization
|
|
45
48
|
*/
|
|
46
49
|
getOrgWideAvailability(orgSlug: string, startDate: Date, endDate: Date, options: OrgSchedulingParams): Promise<SubOrgSchedulingResponse>;
|
|
47
50
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scheduling.service.d.ts","sourceRoot":"","sources":["../../src/services/scheduling.service.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,0BAA0B,EAC1B,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIvE,qBAAa,iBAAiB;IACd,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAE5C
|
|
1
|
+
{"version":3,"file":"scheduling.service.d.ts","sourceRoot":"","sources":["../../src/services/scheduling.service.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACR,0BAA0B,EAC1B,mBAAmB,EACnB,QAAQ,EACR,kBAAkB,EAClB,wBAAwB,EACxB,4BAA4B,EAC5B,yBAAyB,EAC5B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAgB,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAIvE,qBAAa,iBAAiB;IACd,OAAO,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAE5C;;;;;;;;;;;;;OAaG;IACU,mBAAmB,CAC5B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,yBAAyB,GACnC,OAAO,CAAC,kBAAkB,CAAC;IA0B9B;;;;;;;;;;;;OAYG;IACU,sBAAsB,CAC/B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EAAE,EACrB,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,4BAA4B,GACtC,OAAO,CAAC,0BAA0B,CAAC;IA2BtC;;;;;;;;;;;;;OAaG;IACU,sBAAsB,CAC/B,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,mBAAmB,GAC7B,OAAO,CAAC,wBAAwB,CAAC;CAkCvC"}
|
|
@@ -51,7 +51,7 @@ export declare const createEventSchema: import("@sinclair/typebox").TObject<{
|
|
|
51
51
|
attendees: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
52
52
|
email: import("@sinclair/typebox").TString;
|
|
53
53
|
}>>>;
|
|
54
|
-
sendNotifications: import("@sinclair/typebox").TBoolean
|
|
54
|
+
sendNotifications: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
55
55
|
meeting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TObject<{
|
|
56
56
|
url: import("@sinclair/typebox").TString;
|
|
57
57
|
}>]>>;
|
|
@@ -105,7 +105,7 @@ export declare const timeRangeSchema: import("@sinclair/typebox").TObject<{
|
|
|
105
105
|
start: import("@sinclair/typebox").TDate;
|
|
106
106
|
end: import("@sinclair/typebox").TDate;
|
|
107
107
|
}>;
|
|
108
|
-
export declare const
|
|
108
|
+
export declare const busySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
109
109
|
start: import("@sinclair/typebox").TDate;
|
|
110
110
|
end: import("@sinclair/typebox").TDate;
|
|
111
111
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.tb.d.ts","sourceRoot":"","sources":["../../src/typebox/calendar.tb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAE1E,eAAO,MAAM,cAAc,oDAAmB,CAAA;AAE9C,eAAO,MAAM,4BAA4B,kEAAiC,CAAA;AAE1E,eAAO,MAAM,cAAc;;;;;;;;;EASzB,CAAA;AAEF,eAAO,MAAM,aAAa;;EAExB,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;IASzB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;EAE/B,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAUtB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAU5B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;EAU3C,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAU5B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;EAU3C,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAG1B,CAAA;AAEF,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"calendar.tb.d.ts","sourceRoot":"","sources":["../../src/typebox/calendar.tb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAE1E,eAAO,MAAM,cAAc,oDAAmB,CAAA;AAE9C,eAAO,MAAM,4BAA4B,kEAAiC,CAAA;AAE1E,eAAO,MAAM,cAAc;;;;;;;;;EASzB,CAAA;AAEF,eAAO,MAAM,aAAa;;EAExB,CAAA;AAEF,eAAO,MAAM,cAAc;;;;;;IASzB,CAAA;AAEF,eAAO,MAAM,oBAAoB;;EAE/B,CAAA;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;EAUtB,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAU5B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;EAU3C,CAAA;AAEF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;EAU5B,CAAA;AAEF,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;EAU3C,CAAA;AAEF,eAAO,MAAM,eAAe;;;EAG1B,CAAA;AAEF,eAAO,MAAM,UAAU;;;GAA2B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const oauthConnectionSchema: import("@sinclair/typebox").TObject<{
|
|
2
2
|
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
3
|
-
provider: import("@sinclair/typebox").TEnum<typeof import("
|
|
3
|
+
provider: import("@sinclair/typebox").TEnum<typeof import("..").Provider>;
|
|
4
4
|
accessToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
5
5
|
refreshToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
6
6
|
email: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
@@ -8,7 +8,7 @@ export declare const oauthConnectionSchema: import("@sinclair/typebox").TObject<
|
|
|
8
8
|
alive: import("@sinclair/typebox").TBoolean;
|
|
9
9
|
}>;
|
|
10
10
|
export declare const oauthLinkSchema: import("@sinclair/typebox").TObject<{
|
|
11
|
-
provider: import("@sinclair/typebox").TEnum<typeof import("
|
|
11
|
+
provider: import("@sinclair/typebox").TEnum<typeof import("..").Provider>;
|
|
12
12
|
url: import("@sinclair/typebox").TString;
|
|
13
13
|
}>;
|
|
14
14
|
//# sourceMappingURL=oauth.tb.d.ts.map
|
|
@@ -6,7 +6,7 @@ export declare const userSchema: import("@sinclair/typebox").TObject<{
|
|
|
6
6
|
}>>>;
|
|
7
7
|
oauthConnections: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
8
8
|
expiresAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TNull]>;
|
|
9
|
-
provider: import("@sinclair/typebox").TEnum<typeof import("
|
|
9
|
+
provider: import("@sinclair/typebox").TEnum<typeof import("..").Provider>;
|
|
10
10
|
accessToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
11
|
refreshToken: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>>;
|
|
12
12
|
email: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Static } from '@sinclair/typebox';
|
|
2
|
-
import type { attendeeSchema,
|
|
2
|
+
import type { attendeeSchema, busySchema, eventSchema, timeRangeSchema } from '../typebox/calendar.tb';
|
|
3
3
|
/**
|
|
4
4
|
* Provider enum
|
|
5
5
|
*/
|
|
@@ -119,7 +119,7 @@ export interface UpdateEventAcrossCalendars {
|
|
|
119
119
|
*/
|
|
120
120
|
export type TimeRange = Static<typeof timeRangeSchema>;
|
|
121
121
|
/**
|
|
122
|
-
*
|
|
122
|
+
* Busy response interface
|
|
123
123
|
*/
|
|
124
|
-
export type
|
|
124
|
+
export type Busy = Static<typeof busySchema>;
|
|
125
125
|
//# sourceMappingURL=calendar.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.types.d.ts","sourceRoot":"","sources":["../../src/types/calendar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"calendar.types.d.ts","sourceRoot":"","sources":["../../src/types/calendar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAItG;;GAEG;AACH,oBAAY,QAAQ;IAChB,MAAM,WAAW;IACjB,SAAS,cAAc;CAC1B;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC3B,cAAc,mBAAmB;IACjC,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED;;GAEG;AACH,oBAAY,sBAAsB;IAC9B,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,QAAQ,aAAa;CACxB;AAGD;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,mBAAmB,CAAA;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB,GAAG,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAE,MAAM,CAAA;CAChB;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