recal-sdk 0.3.2 → 1.0.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 +24 -792
- package/dist/client/client/client.gen.d.ts +3 -0
- package/dist/client/client/client.gen.d.ts.map +1 -0
- package/dist/client/client/client.gen.js +205 -0
- package/dist/client/client/client.gen.js.map +1 -0
- package/dist/client/client/index.d.ts +9 -0
- package/dist/client/client/index.d.ts.map +1 -0
- package/dist/client/client/index.js +7 -0
- package/dist/client/client/index.js.map +1 -0
- package/dist/client/client/types.gen.d.ts +125 -0
- package/dist/client/client/types.gen.d.ts.map +1 -0
- package/dist/client/client/types.gen.js +3 -0
- package/dist/client/client/types.gen.js.map +1 -0
- package/dist/client/client/utils.gen.d.ts +34 -0
- package/dist/client/client/utils.gen.d.ts.map +1 -0
- package/dist/client/client/utils.gen.js +232 -0
- package/dist/client/client/utils.gen.js.map +1 -0
- package/dist/client/client.gen.d.ts +13 -0
- package/dist/client/client.gen.d.ts.map +1 -0
- package/dist/client/client.gen.js +6 -0
- package/dist/client/client.gen.js.map +1 -0
- package/dist/client/core/auth.gen.d.ts +19 -0
- package/dist/client/core/auth.gen.d.ts.map +1 -0
- package/dist/client/core/auth.gen.js +15 -0
- package/dist/client/core/auth.gen.js.map +1 -0
- package/dist/client/core/bodySerializer.gen.d.ts +26 -0
- package/dist/client/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/client/core/bodySerializer.gen.js +58 -0
- package/dist/client/core/bodySerializer.gen.js.map +1 -0
- package/dist/client/core/params.gen.d.ts +34 -0
- package/dist/client/core/params.gen.d.ts.map +1 -0
- package/dist/client/core/params.gen.js +89 -0
- package/dist/client/core/params.gen.js.map +1 -0
- package/dist/client/core/pathSerializer.gen.d.ts +34 -0
- package/dist/client/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/client/core/pathSerializer.gen.js +115 -0
- package/dist/client/core/pathSerializer.gen.js.map +1 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/client/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/client/core/queryKeySerializer.gen.js +100 -0
- package/dist/client/core/queryKeySerializer.gen.js.map +1 -0
- package/dist/client/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/client/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/client/core/serverSentEvents.gen.js +136 -0
- package/dist/client/core/serverSentEvents.gen.js.map +1 -0
- package/dist/client/core/types.gen.d.ts +79 -0
- package/dist/client/core/types.gen.d.ts.map +1 -0
- package/dist/client/core/types.gen.js +3 -0
- package/dist/client/core/types.gen.js.map +1 -0
- package/dist/client/core/utils.gen.d.ts +20 -0
- package/dist/client/core/utils.gen.d.ts.map +1 -0
- package/dist/client/core/utils.gen.js +88 -0
- package/dist/client/core/utils.gen.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/sdk.gen.d.ts +170 -0
- package/dist/client/sdk.gen.d.ts.map +1 -0
- package/dist/client/sdk.gen.js +884 -0
- package/dist/client/sdk.gen.js.map +1 -0
- package/dist/client/transformers.gen.d.ts +31 -0
- package/dist/client/transformers.gen.d.ts.map +1 -0
- package/dist/client/transformers.gen.js +263 -0
- package/dist/client/transformers.gen.js.map +1 -0
- package/dist/client/types.gen.d.ts +1765 -0
- package/dist/client/types.gen.d.ts.map +1 -0
- package/dist/client/types.gen.js +3 -0
- package/dist/client/types.gen.js.map +1 -0
- package/dist/client/zod.gen.d.ts +1457 -0
- package/dist/client/zod.gen.d.ts.map +1 -0
- package/dist/client/zod.gen.js +1214 -0
- package/dist/client/zod.gen.js.map +1 -0
- package/dist/index.d.ts +5 -33
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -55
- package/dist/index.js.map +1 -1
- package/dist/recal.d.ts +64 -0
- package/dist/recal.d.ts.map +1 -0
- package/dist/recal.js +81 -0
- package/dist/recal.js.map +1 -0
- package/dist/services/calendar.service.d.ts +55 -167
- package/dist/services/calendar.service.d.ts.map +1 -1
- package/dist/services/calendar.service.js +68 -301
- package/dist/services/calendar.service.js.map +1 -1
- package/dist/services/events.service.d.ts +167 -0
- package/dist/services/events.service.d.ts.map +1 -0
- package/dist/services/events.service.js +215 -0
- package/dist/services/events.service.js.map +1 -0
- package/dist/services/oauth.service.d.ts +123 -60
- package/dist/services/oauth.service.d.ts.map +1 -1
- package/dist/services/oauth.service.js +166 -142
- package/dist/services/oauth.service.js.map +1 -1
- package/dist/services/organizations.service.d.ts +137 -36
- package/dist/services/organizations.service.d.ts.map +1 -1
- package/dist/services/organizations.service.js +164 -90
- package/dist/services/organizations.service.js.map +1 -1
- package/dist/services/scheduling.service.d.ts +121 -58
- package/dist/services/scheduling.service.d.ts.map +1 -1
- package/dist/services/scheduling.service.js +98 -140
- package/dist/services/scheduling.service.js.map +1 -1
- package/dist/services/users.service.d.ts +87 -27
- package/dist/services/users.service.d.ts.map +1 -1
- package/dist/services/users.service.js +94 -69
- package/dist/services/users.service.js.map +1 -1
- package/dist/types.d.ts +68 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/response.d.ts +33 -0
- package/dist/utils/response.d.ts.map +1 -0
- package/dist/utils/response.js +54 -0
- package/dist/utils/response.js.map +1 -0
- package/package.json +5 -2
- package/dist/entities/organization.d.ts +0 -21
- package/dist/entities/organization.d.ts.map +0 -1
- package/dist/entities/organization.js +0 -32
- package/dist/entities/organization.js.map +0 -1
- package/dist/entities/user.d.ts +0 -23
- package/dist/entities/user.d.ts.map +0 -1
- package/dist/entities/user.js +0 -45
- package/dist/entities/user.js.map +0 -1
- package/dist/errors.d.ts +0 -22
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -36
- package/dist/errors.js.map +0 -1
- package/dist/typebox/calendar.tb.d.ts +0 -113
- package/dist/typebox/calendar.tb.d.ts.map +0 -1
- package/dist/typebox/calendar.tb.js +0 -92
- package/dist/typebox/calendar.tb.js.map +0 -1
- package/dist/typebox/oauth.tb.d.ts +0 -14
- package/dist/typebox/oauth.tb.d.ts.map +0 -1
- package/dist/typebox/oauth.tb.js +0 -16
- package/dist/typebox/oauth.tb.js.map +0 -1
- package/dist/typebox/organization.stripped.tb.d.ts +0 -6
- package/dist/typebox/organization.stripped.tb.d.ts.map +0 -1
- package/dist/typebox/organization.stripped.tb.js +0 -7
- package/dist/typebox/organization.stripped.tb.js.map +0 -1
- package/dist/typebox/organization.tb.d.ts +0 -10
- package/dist/typebox/organization.tb.d.ts.map +0 -1
- package/dist/typebox/organization.tb.js +0 -8
- package/dist/typebox/organization.tb.js.map +0 -1
- package/dist/typebox/scheduling.tb.d.ts +0 -107
- package/dist/typebox/scheduling.tb.d.ts.map +0 -1
- package/dist/typebox/scheduling.tb.js +0 -105
- package/dist/typebox/scheduling.tb.js.map +0 -1
- package/dist/typebox/timeString.tb.d.ts +0 -3
- package/dist/typebox/timeString.tb.d.ts.map +0 -1
- package/dist/typebox/timeString.tb.js +0 -7
- package/dist/typebox/timeString.tb.js.map +0 -1
- package/dist/typebox/user.stripped.tb.d.ts +0 -5
- package/dist/typebox/user.stripped.tb.d.ts.map +0 -1
- package/dist/typebox/user.stripped.tb.js +0 -6
- package/dist/typebox/user.stripped.tb.js.map +0 -1
- package/dist/typebox/user.tb.d.ts +0 -19
- package/dist/typebox/user.tb.d.ts.map +0 -1
- package/dist/typebox/user.tb.js +0 -10
- package/dist/typebox/user.tb.js.map +0 -1
- package/dist/types/calendar.types.d.ts +0 -124
- package/dist/types/calendar.types.d.ts.map +0 -1
- package/dist/types/calendar.types.js +0 -27
- package/dist/types/calendar.types.js.map +0 -1
- package/dist/types/internal.types.d.ts +0 -7
- package/dist/types/internal.types.d.ts.map +0 -1
- package/dist/types/internal.types.js +0 -2
- package/dist/types/internal.types.js.map +0 -1
- package/dist/types/oauth.types.d.ts +0 -22
- package/dist/types/oauth.types.d.ts.map +0 -1
- package/dist/types/oauth.types.js +0 -2
- package/dist/types/oauth.types.js.map +0 -1
- package/dist/types/organization.types.d.ts +0 -18
- package/dist/types/organization.types.d.ts.map +0 -1
- package/dist/types/organization.types.js +0 -2
- package/dist/types/organization.types.js.map +0 -1
- package/dist/types/scheduling.types.d.ts +0 -50
- package/dist/types/scheduling.types.d.ts.map +0 -1
- package/dist/types/scheduling.types.js +0 -2
- package/dist/types/scheduling.types.js.map +0 -1
- package/dist/types/user.types.d.ts +0 -11
- package/dist/types/user.types.d.ts.map +0 -1
- package/dist/types/user.types.js +0 -2
- package/dist/types/user.types.js.map +0 -1
- package/dist/utils/fetch.helper.d.ts +0 -62
- package/dist/utils/fetch.helper.d.ts.map +0 -1
- package/dist/utils/fetch.helper.js +0 -116
- package/dist/utils/fetch.helper.js.map +0 -1
- package/dist/utils/fetchErrorHandler.d.ts +0 -22
- package/dist/utils/fetchErrorHandler.d.ts.map +0 -1
- package/dist/utils/fetchErrorHandler.js +0 -35
- package/dist/utils/fetchErrorHandler.js.map +0 -1
- package/dist/utils/includes.helper.d.ts +0 -4
- package/dist/utils/includes.helper.d.ts.map +0 -1
- package/dist/utils/includes.helper.js +0 -10
- package/dist/utils/includes.helper.js.map +0 -1
- package/dist/utils/omit.d.ts +0 -2
- package/dist/utils/omit.d.ts.map +0 -1
- package/dist/utils/omit.js +0 -4
- package/dist/utils/omit.js.map +0 -1
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simplified type exports for better developer experience
|
|
3
|
+
*
|
|
4
|
+
* These types are re-exported from the HeyAPI generated types
|
|
5
|
+
* for easier access and better discoverability.
|
|
6
|
+
*/
|
|
7
|
+
export type {
|
|
8
|
+
/**
|
|
9
|
+
* OAuth connection details
|
|
10
|
+
*/
|
|
11
|
+
AuthConnection,
|
|
12
|
+
/**
|
|
13
|
+
* Calendar entity
|
|
14
|
+
*/
|
|
15
|
+
Calendar,
|
|
16
|
+
/**
|
|
17
|
+
* Create event payload
|
|
18
|
+
*/
|
|
19
|
+
CreateEvent,
|
|
20
|
+
/**
|
|
21
|
+
* Create event across calendars payload
|
|
22
|
+
*/
|
|
23
|
+
CreateMetaEvent, DeleteV1OrganizationsOrgSlugData, DeleteV1OrganizationsOrgSlugResponse, DeleteV1UsersUserIdCalendarEventsMetaMetaIdData, DeleteV1UsersUserIdCalendarEventsMetaMetaIdResponses, DeleteV1UsersUserIdData, DeleteV1UsersUserIdResponse,
|
|
24
|
+
/**
|
|
25
|
+
* Event entity
|
|
26
|
+
*/
|
|
27
|
+
Event, GetV1OrganizationsOrgSlugData, GetV1OrganizationsOrgSlugResponse, GetV1OrganizationsOrgSlugSchedulingData, GetV1OrganizationsOrgSlugSchedulingResponse, GetV1OrganizationsResponse, GetV1UsersResponse, GetV1UsersUserIdCalendarBusyData, GetV1UsersUserIdCalendarBusyResponse, GetV1UsersUserIdCalendarData, GetV1UsersUserIdCalendarEventsData, GetV1UsersUserIdCalendarEventsMetaMetaIdData, GetV1UsersUserIdCalendarEventsMetaMetaIdResponse, GetV1UsersUserIdCalendarEventsResponse, GetV1UsersUserIdCalendarResponse, GetV1UsersUserIdData, GetV1UsersUserIdOauthData, GetV1UsersUserIdOauthLinksData, GetV1UsersUserIdOauthLinksResponse, GetV1UsersUserIdOauthProviderLinkData, GetV1UsersUserIdOauthProviderLinkResponse, GetV1UsersUserIdOauthProviderTokenData, GetV1UsersUserIdOauthProviderTokenResponse, GetV1UsersUserIdOauthResponse, GetV1UsersUserIdResponse, GetV1UsersUserIdSchedulingData, GetV1UsersUserIdSchedulingResponse,
|
|
28
|
+
/**
|
|
29
|
+
* Organization entity
|
|
30
|
+
*/
|
|
31
|
+
Organization, PostV1OrganizationsData, PostV1OrganizationsResponse, PostV1UsersData, PostV1UsersOauthProviderVerifyData, PostV1UsersResponse, PostV1UsersSchedulingData, PostV1UsersSchedulingResponse, PostV1UsersUserIdCalendarEventsMetaData, PostV1UsersUserIdCalendarEventsMetaResponse, PostV1UsersUserIdOauthProviderData, PostV1UsersUserIdOauthProviderResponse, PostV1UsersUserIdSchedulingData, PostV1UsersUserIdSchedulingResponse, PutV1OrganizationsOrgSlugData, PutV1OrganizationsOrgSlugResponse, PutV1UsersUserIdCalendarEventsMetaMetaIdData, PutV1UsersUserIdCalendarEventsMetaMetaIdResponse, PutV1UsersUserIdData, PutV1UsersUserIdResponse,
|
|
32
|
+
/**
|
|
33
|
+
* Time range with start and end dates
|
|
34
|
+
*/
|
|
35
|
+
TimeRange,
|
|
36
|
+
/**
|
|
37
|
+
* Update event payload
|
|
38
|
+
*/
|
|
39
|
+
UpdateEvent,
|
|
40
|
+
/**
|
|
41
|
+
* User entity
|
|
42
|
+
*/
|
|
43
|
+
User, } from './client/types.gen';
|
|
44
|
+
/**
|
|
45
|
+
* Provider type - Google or Microsoft
|
|
46
|
+
*/
|
|
47
|
+
export type Provider = 'google' | 'microsoft';
|
|
48
|
+
/**
|
|
49
|
+
* Calendar access roles
|
|
50
|
+
*/
|
|
51
|
+
export type CalendarAccessRole = 'freeBusyReader' | 'owner' | 'reader' | 'writer';
|
|
52
|
+
/**
|
|
53
|
+
* Days of the week
|
|
54
|
+
*/
|
|
55
|
+
export type DayOfWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
|
|
56
|
+
/**
|
|
57
|
+
* OAuth access type
|
|
58
|
+
*/
|
|
59
|
+
export type OAuthAccessType = 'online' | 'offline';
|
|
60
|
+
/**
|
|
61
|
+
* OAuth scope presets
|
|
62
|
+
*/
|
|
63
|
+
export type OAuthScope = 'edit' | 'free-busy';
|
|
64
|
+
/**
|
|
65
|
+
* Attendee response status
|
|
66
|
+
*/
|
|
67
|
+
export type AttendeeResponseStatus = 'accepted' | 'declined' | 'needsAction' | 'tentative';
|
|
68
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY;AACR;;GAEG;AACH,cAAc;AACd;;GAEG;AACH,QAAQ;AACR;;GAEG;AACH,WAAW;AACX;;GAEG;AACH,eAAe,EACf,gCAAgC,EAChC,oCAAoC,EACpC,+CAA+C,EAC/C,oDAAoD,EACpD,uBAAuB,EACvB,2BAA2B;AAC3B;;GAEG;AACH,KAAK,EAEL,6BAA6B,EAC7B,iCAAiC,EACjC,uCAAuC,EACvC,2CAA2C,EAE3C,0BAA0B,EAI1B,kBAAkB,EAClB,gCAAgC,EAChC,oCAAoC,EAEpC,4BAA4B,EAC5B,kCAAkC,EAClC,4CAA4C,EAC5C,gDAAgD,EAChD,sCAAsC,EAEtC,gCAAgC,EAIhC,oBAAoB,EAEpB,yBAAyB,EACzB,8BAA8B,EAC9B,kCAAkC,EAClC,qCAAqC,EACrC,yCAAyC,EACzC,sCAAsC,EACtC,0CAA0C,EAE1C,6BAA6B,EAC7B,wBAAwB,EAExB,8BAA8B,EAE9B,kCAAkC;AAClC;;GAEG;AACH,YAAY,EACZ,uBAAuB,EACvB,2BAA2B,EAC3B,eAAe,EACf,kCAAkC,EAClC,mBAAmB,EACnB,yBAAyB,EACzB,6BAA6B,EAE7B,uCAAuC,EAEvC,2CAA2C,EAC3C,kCAAkC,EAClC,sCAAsC,EACtC,+BAA+B,EAC/B,mCAAmC,EACnC,6BAA6B,EAC7B,iCAAiC,EACjC,4CAA4C,EAC5C,gDAAgD,EAChD,oBAAoB,EACpB,wBAAwB;AACxB;;GAEG;AACH,SAAS;AACT;;GAEG;AACH,WAAW;AAGX;;GAEG;AACH,IAAI,GACP,MAAM,oBAAoB,CAAA;AAE3B;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEjF;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE1G;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAA;AAElD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,WAAW,CAAA;AAE7C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAA"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response unwrapping utilities for HeyAPI SDK responses
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* HeyAPI SDK response structure
|
|
6
|
+
* Can contain either nested data ({ data: T }) or direct data (T)
|
|
7
|
+
*/
|
|
8
|
+
export interface HeyApiResponse<T> {
|
|
9
|
+
data?: {
|
|
10
|
+
data: T;
|
|
11
|
+
} | T;
|
|
12
|
+
error?: unknown;
|
|
13
|
+
request?: Request;
|
|
14
|
+
response?: Response;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Custom error class for Recal API errors
|
|
18
|
+
*/
|
|
19
|
+
export declare class RecalError extends Error {
|
|
20
|
+
readonly statusCode?: number;
|
|
21
|
+
readonly details?: unknown;
|
|
22
|
+
constructor(message: string, statusCode?: number, details?: unknown);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Unwraps HeyAPI response structure to extract clean data
|
|
26
|
+
* Throws RecalError if the response contains an error or no data
|
|
27
|
+
*
|
|
28
|
+
* @param response - The HeyAPI response object
|
|
29
|
+
* @returns The extracted data of type T
|
|
30
|
+
* @throws RecalError if response contains an error or no data
|
|
31
|
+
*/
|
|
32
|
+
export declare function unwrapResponse<T>(response: HeyApiResponse<T>): T;
|
|
33
|
+
//# sourceMappingURL=response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.d.ts","sourceRoot":"","sources":["../../src/utils/response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,GAAG,CAAC,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACtB;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;IACjC,SAAgB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnC,SAAgB,OAAO,CAAC,EAAE,OAAO,CAAA;gBAErB,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAQtE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,CA6BhE"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response unwrapping utilities for HeyAPI SDK responses
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Custom error class for Recal API errors
|
|
6
|
+
*/
|
|
7
|
+
export class RecalError extends Error {
|
|
8
|
+
statusCode;
|
|
9
|
+
details;
|
|
10
|
+
constructor(message, statusCode, details) {
|
|
11
|
+
// Add red [RECAL] prefix to error message
|
|
12
|
+
const formattedMessage = `\x1b[31m[RECAL]\x1b[0m ${message}`;
|
|
13
|
+
super(formattedMessage);
|
|
14
|
+
this.name = 'RecalError';
|
|
15
|
+
this.statusCode = statusCode;
|
|
16
|
+
this.details = details;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Unwraps HeyAPI response structure to extract clean data
|
|
21
|
+
* Throws RecalError if the response contains an error or no data
|
|
22
|
+
*
|
|
23
|
+
* @param response - The HeyAPI response object
|
|
24
|
+
* @returns The extracted data of type T
|
|
25
|
+
* @throws RecalError if response contains an error or no data
|
|
26
|
+
*/
|
|
27
|
+
export function unwrapResponse(response) {
|
|
28
|
+
// Check if error object has actual content (not just empty {})
|
|
29
|
+
if (response.error && typeof response.error === 'object' && Object.keys(response.error).length > 0) {
|
|
30
|
+
const statusCode = response.response?.status;
|
|
31
|
+
// Extract error message safely from unknown type
|
|
32
|
+
let errorMessage = 'Unknown API error';
|
|
33
|
+
if (typeof response.error === 'string') {
|
|
34
|
+
errorMessage = response.error;
|
|
35
|
+
}
|
|
36
|
+
else if (response.error && typeof response.error === 'object' && 'message' in response.error) {
|
|
37
|
+
errorMessage = String(response.error.message);
|
|
38
|
+
}
|
|
39
|
+
else if (response.error && typeof response.error === 'object' && 'error' in response.error) {
|
|
40
|
+
errorMessage = String(response.error.error);
|
|
41
|
+
}
|
|
42
|
+
throw new RecalError(errorMessage, statusCode, response.error);
|
|
43
|
+
}
|
|
44
|
+
if (!response.data) {
|
|
45
|
+
throw new RecalError('No data in response', response.response?.status, response);
|
|
46
|
+
}
|
|
47
|
+
// Check if data is nested ({ data: T }) or direct (T)
|
|
48
|
+
if (typeof response.data === 'object' && response.data !== null && 'data' in response.data) {
|
|
49
|
+
return response.data.data;
|
|
50
|
+
}
|
|
51
|
+
// Return direct data
|
|
52
|
+
return response.data;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=response.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.js","sourceRoot":"","sources":["../../src/utils/response.ts"],"names":[],"mappings":"AAAA;;GAEG;AAaH;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,KAAK;IACjB,UAAU,CAAS;IACnB,OAAO,CAAU;IAEjC,YAAY,OAAe,EAAE,UAAmB,EAAE,OAAiB;QAC/D,0CAA0C;QAC1C,MAAM,gBAAgB,GAAG,0BAA0B,OAAO,EAAE,CAAA;QAC5D,KAAK,CAAC,gBAAgB,CAAC,CAAA;QACvB,IAAI,CAAC,IAAI,GAAG,YAAY,CAAA;QACxB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAA;QAC5B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;CACJ;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAI,QAA2B;IACzD,+DAA+D;IAC/D,IAAI,QAAQ,CAAC,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACjG,MAAM,UAAU,GAAG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;QAE5C,iDAAiD;QACjD,IAAI,YAAY,GAAG,mBAAmB,CAAA;QACtC,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,YAAY,GAAG,QAAQ,CAAC,KAAK,CAAA;QACjC,CAAC;aAAM,IAAI,QAAQ,CAAC,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YAC7F,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QACjD,CAAC;aAAM,IAAI,QAAQ,CAAC,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,QAAQ,CAAC,KAAK,EAAE,CAAC;YAC3F,YAAY,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAC/C,CAAC;QAED,MAAM,IAAI,UAAU,CAAC,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAA;IAClE,CAAC;IAED,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,IAAI,UAAU,CAAC,qBAAqB,EAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAA;IACpF,CAAC;IAED,sDAAsD;IACtD,IAAI,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,IAAI,IAAI,MAAM,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC;QACzF,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAA;IAC7B,CAAC;IAED,qBAAqB;IACrB,OAAO,QAAQ,CAAC,IAAI,CAAA;AACxB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recal-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Recal SDK",
|
|
5
5
|
"author": "Recal <team@recal.dev>",
|
|
6
6
|
"contributors": ["tkoehlerlg", "jschwxrz"],
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
20
20
|
"test": "bun test tests",
|
|
21
|
+
"generate": "bun run openapi-ts.ts",
|
|
21
22
|
"typecheck": "tsc --noEmit",
|
|
22
23
|
"format": "biome format --fix",
|
|
23
24
|
"lint": "biome lint",
|
|
@@ -38,11 +39,13 @@
|
|
|
38
39
|
"keywords": ["recal", "calendar"],
|
|
39
40
|
"devDependencies": {
|
|
40
41
|
"@biomejs/biome": "2.1.2",
|
|
42
|
+
"@hey-api/openapi-ts": "0.86.8",
|
|
41
43
|
"@types/bun": "latest",
|
|
44
|
+
"knip": "^5.69.1",
|
|
42
45
|
"tsc-alias": "^1.8.16",
|
|
43
46
|
"typescript": "^5.8.3"
|
|
44
47
|
},
|
|
45
48
|
"dependencies": {
|
|
46
|
-
"
|
|
49
|
+
"zod": "^4.0.0"
|
|
47
50
|
}
|
|
48
51
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Static } from '@sinclair/typebox';
|
|
2
|
-
import type { organizationSchema } from '../typebox/organization.tb.js';
|
|
3
|
-
import type { FetchHelper } from '../utils/fetch.helper.js';
|
|
4
|
-
import { User } from './user.js';
|
|
5
|
-
export declare class Organization {
|
|
6
|
-
private readonly fetchHelper;
|
|
7
|
-
slug: string;
|
|
8
|
-
name: string | null;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
members?: User[];
|
|
11
|
-
constructor({ slug, name, createdAt, members, fetchHelper, }: {
|
|
12
|
-
slug: string;
|
|
13
|
-
name: string | null;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
members?: User[];
|
|
16
|
-
fetchHelper: FetchHelper;
|
|
17
|
-
});
|
|
18
|
-
static fromJson(json: Static<typeof organizationSchema>, fetchHelper: FetchHelper): Organization;
|
|
19
|
-
getMembers(refetch?: boolean): Promise<User[]>;
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/entities/organization.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAA;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,IAAI,CAAA;IACf,OAAO,CAAC,EAAE,IAAI,EAAE,CAAA;gBAEX,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,OAAO,EACP,WAAW,GACd,EAAE;QACC,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,SAAS,EAAE,IAAI,CAAA;QACf,OAAO,CAAC,EAAE,IAAI,EAAE,CAAA;QAChB,WAAW,EAAE,WAAW,CAAA;KAC3B;IAQD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,kBAAkB,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,YAAY;IAQnF,UAAU,CAAC,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;CAQ5D"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { OrganizationsService } from '../services/organizations.service.js';
|
|
2
|
-
import { User } from './user.js';
|
|
3
|
-
export class Organization {
|
|
4
|
-
fetchHelper;
|
|
5
|
-
slug;
|
|
6
|
-
name;
|
|
7
|
-
createdAt;
|
|
8
|
-
members;
|
|
9
|
-
constructor({ slug, name, createdAt, members, fetchHelper, }) {
|
|
10
|
-
this.slug = slug;
|
|
11
|
-
this.name = name;
|
|
12
|
-
this.createdAt = createdAt;
|
|
13
|
-
this.members = members;
|
|
14
|
-
this.fetchHelper = fetchHelper;
|
|
15
|
-
}
|
|
16
|
-
static fromJson(json, fetchHelper) {
|
|
17
|
-
return new Organization({
|
|
18
|
-
...json,
|
|
19
|
-
members: json.members?.map((member) => User.fromJson(member, fetchHelper)),
|
|
20
|
-
fetchHelper,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
async getMembers(refetch = false) {
|
|
24
|
-
if (refetch) {
|
|
25
|
-
const organizationsService = new OrganizationsService(this.fetchHelper);
|
|
26
|
-
const newData = await organizationsService.getMembers(this.slug);
|
|
27
|
-
this.members = newData;
|
|
28
|
-
}
|
|
29
|
-
return this.members ?? [];
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=organization.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../src/entities/organization.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAG1E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,MAAM,OAAO,YAAY;IACJ,WAAW,CAAa;IAClC,IAAI,CAAQ;IACZ,IAAI,CAAe;IACnB,SAAS,CAAM;IACf,OAAO,CAAS;IAEvB,YAAY,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,OAAO,EACP,WAAW,GAOd;QACG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAuC,EAAE,WAAwB;QAC7E,OAAO,IAAI,YAAY,CAAC;YACpB,GAAG,IAAI;YACP,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;YAC1E,WAAW;SACd,CAAC,CAAA;IACN,CAAC;IAEM,KAAK,CAAC,UAAU,CAAC,OAAO,GAAG,KAAK;QACnC,IAAI,OAAO,EAAE,CAAC;YACV,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YACvE,MAAM,OAAO,GAAG,MAAM,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAChE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QAC1B,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,IAAI,EAAE,CAAA;IAC7B,CAAC;CACJ"}
|
package/dist/entities/user.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { Static } from '@sinclair/typebox';
|
|
2
|
-
import type { userSchema } from '../typebox/user.tb.js';
|
|
3
|
-
import type { OAuthConnection } from '../types/oauth.types.js';
|
|
4
|
-
import type { FetchHelper } from '../utils/fetch.helper.js';
|
|
5
|
-
import { Organization } from './organization.js';
|
|
6
|
-
export declare class User {
|
|
7
|
-
private readonly fetchHelper;
|
|
8
|
-
id: string;
|
|
9
|
-
createdAt: Date;
|
|
10
|
-
organizations?: Organization[];
|
|
11
|
-
oauthConnections?: OAuthConnection[];
|
|
12
|
-
constructor({ id, createdAt, organizations, oauthConnections, fetchHelper, }: {
|
|
13
|
-
id: string;
|
|
14
|
-
createdAt: Date;
|
|
15
|
-
organizations?: Organization[];
|
|
16
|
-
oauthConnections?: OAuthConnection[];
|
|
17
|
-
fetchHelper: FetchHelper;
|
|
18
|
-
});
|
|
19
|
-
static fromJson(json: Static<typeof userSchema>, fetchHelper: FetchHelper): User;
|
|
20
|
-
getOrganizations(refetch?: boolean): Promise<Organization[]>;
|
|
21
|
-
getOAuthConnections(refetch?: boolean): Promise<OAuthConnection[]>;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/entities/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAI/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,qBAAa,IAAI;IACb,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAa;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAA;gBAE/B,EACR,EAAE,EACF,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,GACd,EAAE;QACC,EAAE,EAAE,MAAM,CAAA;QACV,SAAS,EAAE,IAAI,CAAA;QACf,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;QAC9B,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAA;QACpC,WAAW,EAAE,WAAW,CAAA;KAC3B;IAQD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,UAAU,CAAC,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IASnE,gBAAgB,CAAC,OAAO,UAAQ,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAU1D,mBAAmB,CAAC,OAAO,UAAQ,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAQhF"}
|
package/dist/entities/user.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { UserNotFoundError } from '../errors.js';
|
|
2
|
-
import { OAuthService } from '../services/oauth.service.js';
|
|
3
|
-
import { OrganizationsService } from '../services/organizations.service.js';
|
|
4
|
-
import { Organization } from './organization.js';
|
|
5
|
-
export class User {
|
|
6
|
-
fetchHelper;
|
|
7
|
-
id;
|
|
8
|
-
createdAt;
|
|
9
|
-
organizations;
|
|
10
|
-
oauthConnections;
|
|
11
|
-
constructor({ id, createdAt, organizations, oauthConnections, fetchHelper, }) {
|
|
12
|
-
this.id = id;
|
|
13
|
-
this.createdAt = createdAt;
|
|
14
|
-
this.organizations = organizations;
|
|
15
|
-
this.oauthConnections = oauthConnections;
|
|
16
|
-
this.fetchHelper = fetchHelper;
|
|
17
|
-
}
|
|
18
|
-
static fromJson(json, fetchHelper) {
|
|
19
|
-
return new User({
|
|
20
|
-
...json,
|
|
21
|
-
organizations: json.organizations?.map((org) => Organization.fromJson(org, fetchHelper)),
|
|
22
|
-
oauthConnections: json.oauthConnections,
|
|
23
|
-
fetchHelper,
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
async getOrganizations(refetch = false) {
|
|
27
|
-
if (this.organizations === undefined || refetch) {
|
|
28
|
-
const organizationsService = new OrganizationsService(this.fetchHelper);
|
|
29
|
-
const orgs = await organizationsService.listAllFromUser(this.id);
|
|
30
|
-
if (!orgs)
|
|
31
|
-
throw new UserNotFoundError(this.id);
|
|
32
|
-
this.organizations = orgs;
|
|
33
|
-
}
|
|
34
|
-
return this.organizations ?? [];
|
|
35
|
-
}
|
|
36
|
-
async getOAuthConnections(refetch = false) {
|
|
37
|
-
if (this.oauthConnections === undefined || refetch) {
|
|
38
|
-
const oauthService = new OAuthService(this.fetchHelper);
|
|
39
|
-
const connections = await oauthService.getAllConnections(this.id);
|
|
40
|
-
this.oauthConnections = connections;
|
|
41
|
-
}
|
|
42
|
-
return this.oauthConnections ?? [];
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/entities/user.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AAI1E,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,MAAM,OAAO,IAAI;IACI,WAAW,CAAa;IAClC,EAAE,CAAQ;IACV,SAAS,CAAM;IACf,aAAa,CAAiB;IAC9B,gBAAgB,CAAoB;IAE3C,YAAY,EACR,EAAE,EACF,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,WAAW,GAOd;QACG,IAAI,CAAC,EAAE,GAAG,EAAE,CAAA;QACZ,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QAClC,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAA;QACxC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAA+B,EAAE,WAAwB;QACrE,OAAO,IAAI,IAAI,CAAC;YACZ,GAAG,IAAI;YACP,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;YACxF,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,WAAW;SACd,CAAC,CAAA;IACN,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,OAAO,GAAG,KAAK;QACzC,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,IAAI,OAAO,EAAE,CAAC;YAC9C,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YACvE,MAAM,IAAI,GAAG,MAAM,oBAAoB,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAChE,IAAI,CAAC,IAAI;gBAAE,MAAM,IAAI,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAC/C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAA;QAC7B,CAAC;QACD,OAAO,IAAI,CAAC,aAAa,IAAI,EAAE,CAAA;IACnC,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,OAAO,GAAG,KAAK;QAC5C,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,IAAI,OAAO,EAAE,CAAC;YACjD,MAAM,YAAY,GAAG,IAAI,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;YACvD,MAAM,WAAW,GAAG,MAAM,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACjE,IAAI,CAAC,gBAAgB,GAAG,WAAW,CAAA;QACvC,CAAC;QACD,OAAO,IAAI,CAAC,gBAAgB,IAAI,EAAE,CAAA;IACtC,CAAC;CACJ"}
|
package/dist/errors.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare class OrganizationNotFoundError extends Error {
|
|
2
|
-
constructor(slug: string);
|
|
3
|
-
}
|
|
4
|
-
export declare class OrganizationAlreadyExistsError extends Error {
|
|
5
|
-
constructor(slug: string);
|
|
6
|
-
}
|
|
7
|
-
export declare class UserAlreadyExistsError extends Error {
|
|
8
|
-
constructor(userId: string);
|
|
9
|
-
}
|
|
10
|
-
export declare class UserNotFoundError extends Error {
|
|
11
|
-
constructor(userId: string);
|
|
12
|
-
}
|
|
13
|
-
export declare class ProviderCredentialsNotSetError extends Error {
|
|
14
|
-
constructor(provider: string);
|
|
15
|
-
}
|
|
16
|
-
export declare class OAuthConnectionNotFoundError extends Error {
|
|
17
|
-
constructor(userId: string, provider: string);
|
|
18
|
-
}
|
|
19
|
-
export declare class EventNotFoundError extends Error {
|
|
20
|
-
constructor(eventId: string);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,yBAA0B,SAAQ,KAAK;gBAC7B,IAAI,EAAE,MAAM;CAGlC;AAED,qBAAa,8BAA+B,SAAQ,KAAK;gBAClC,IAAI,EAAE,MAAM;CAGlC;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBAC1B,MAAM,EAAE,MAAM;CAGpC;AAED,qBAAa,iBAAkB,SAAQ,KAAK;gBACrB,MAAM,EAAE,MAAM;CAGpC;AAED,qBAAa,8BAA+B,SAAQ,KAAK;gBAClC,QAAQ,EAAE,MAAM;CAGtC;AAED,qBAAa,4BAA6B,SAAQ,KAAK;gBAChC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;CAGtD;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBACtB,OAAO,EAAE,MAAM;CAGrC"}
|
package/dist/errors.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export class OrganizationNotFoundError extends Error {
|
|
2
|
-
constructor(slug) {
|
|
3
|
-
super(`[Recal] Organization ${slug} not found`);
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
export class OrganizationAlreadyExistsError extends Error {
|
|
7
|
-
constructor(slug) {
|
|
8
|
-
super(`[Recal] Organization ${slug} already exists`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export class UserAlreadyExistsError extends Error {
|
|
12
|
-
constructor(userId) {
|
|
13
|
-
super(`[Recal] User ${userId} already exists`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export class UserNotFoundError extends Error {
|
|
17
|
-
constructor(userId) {
|
|
18
|
-
super(`[Recal] User ${userId} not found`);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
export class ProviderCredentialsNotSetError extends Error {
|
|
22
|
-
constructor(provider) {
|
|
23
|
-
super(`[Recal] Provider ${provider} credentials not set`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export class OAuthConnectionNotFoundError extends Error {
|
|
27
|
-
constructor(userId, provider) {
|
|
28
|
-
super(`[Recal] OAuth connection not found for user ${userId} and provider ${provider}`);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export class EventNotFoundError extends Error {
|
|
32
|
-
constructor(eventId) {
|
|
33
|
-
super(`[Recal] Event ${eventId} not found`);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAChD,YAAmB,IAAY;QAC3B,KAAK,CAAC,wBAAwB,IAAI,YAAY,CAAC,CAAA;IACnD,CAAC;CACJ;AAED,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACrD,YAAmB,IAAY;QAC3B,KAAK,CAAC,wBAAwB,IAAI,iBAAiB,CAAC,CAAA;IACxD,CAAC;CACJ;AAED,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IAC7C,YAAmB,MAAc;QAC7B,KAAK,CAAC,gBAAgB,MAAM,iBAAiB,CAAC,CAAA;IAClD,CAAC;CACJ;AAED,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IACxC,YAAmB,MAAc;QAC7B,KAAK,CAAC,gBAAgB,MAAM,YAAY,CAAC,CAAA;IAC7C,CAAC;CACJ;AAED,MAAM,OAAO,8BAA+B,SAAQ,KAAK;IACrD,YAAmB,QAAgB;QAC/B,KAAK,CAAC,oBAAoB,QAAQ,sBAAsB,CAAC,CAAA;IAC7D,CAAC;CACJ;AAED,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACnD,YAAmB,MAAc,EAAE,QAAgB;QAC/C,KAAK,CAAC,+CAA+C,MAAM,iBAAiB,QAAQ,EAAE,CAAC,CAAA;IAC3F,CAAC;CACJ;AAED,MAAM,OAAO,kBAAmB,SAAQ,KAAK;IACzC,YAAmB,OAAe;QAC9B,KAAK,CAAC,iBAAiB,OAAO,YAAY,CAAC,CAAA;IAC/C,CAAC;CACJ"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { AttendeeResponseStatus } from '../types/calendar.types.js';
|
|
2
|
-
export declare const providerSchema: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"google" | "microsoft">[]>;
|
|
3
|
-
export declare const attendeeResponseStatusSchema: import("@sinclair/typebox").TEnum<typeof AttendeeResponseStatus>;
|
|
4
|
-
export declare const calendarSchema: import("@sinclair/typebox").TObject<{
|
|
5
|
-
id: import("@sinclair/typebox").TString;
|
|
6
|
-
timeZone: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
7
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
-
backgroundColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
-
foregroundColor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
-
selected: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
11
|
-
accessRole: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
-
original: import("@sinclair/typebox").TAny;
|
|
13
|
-
}>;
|
|
14
|
-
export declare const meetingSchema: import("@sinclair/typebox").TObject<{
|
|
15
|
-
url: import("@sinclair/typebox").TString;
|
|
16
|
-
}>;
|
|
17
|
-
export declare const attendeeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
18
|
-
email: import("@sinclair/typebox").TString;
|
|
19
|
-
responseStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof AttendeeResponseStatus>>;
|
|
20
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
21
|
-
email: import("@sinclair/typebox").TString;
|
|
22
|
-
self: import("@sinclair/typebox").TBoolean;
|
|
23
|
-
}>]>;
|
|
24
|
-
export declare const createAttendeeSchema: import("@sinclair/typebox").TObject<{
|
|
25
|
-
email: import("@sinclair/typebox").TString;
|
|
26
|
-
}>;
|
|
27
|
-
export declare const eventSchema: import("@sinclair/typebox").TObject<{
|
|
28
|
-
id: import("@sinclair/typebox").TString;
|
|
29
|
-
metaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
-
calendarId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
32
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
33
|
-
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
34
|
-
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
35
|
-
location: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
36
|
-
attendees: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
|
|
37
|
-
email: import("@sinclair/typebox").TString;
|
|
38
|
-
responseStatus: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof AttendeeResponseStatus>>;
|
|
39
|
-
}>, import("@sinclair/typebox").TObject<{
|
|
40
|
-
email: import("@sinclair/typebox").TString;
|
|
41
|
-
self: import("@sinclair/typebox").TBoolean;
|
|
42
|
-
}>]>>;
|
|
43
|
-
original: import("@sinclair/typebox").TAny;
|
|
44
|
-
}>;
|
|
45
|
-
export declare const createEventSchema: import("@sinclair/typebox").TObject<{
|
|
46
|
-
metaId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
47
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
48
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
49
|
-
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
50
|
-
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
51
|
-
location: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
52
|
-
attendees: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
53
|
-
email: import("@sinclair/typebox").TString;
|
|
54
|
-
}>>>;
|
|
55
|
-
sendNotifications: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
56
|
-
meeting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TObject<{
|
|
57
|
-
url: import("@sinclair/typebox").TString;
|
|
58
|
-
}>]>>;
|
|
59
|
-
}>;
|
|
60
|
-
export declare const createEventAcrossCalendarsSchema: import("@sinclair/typebox").TObject<{
|
|
61
|
-
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
62
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
63
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
64
|
-
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
65
|
-
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
66
|
-
location: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
67
|
-
attendees: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
68
|
-
email: import("@sinclair/typebox").TString;
|
|
69
|
-
}>>>;
|
|
70
|
-
sendNotificationsFor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"google" | "microsoft">[]>>>;
|
|
71
|
-
meeting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TObject<{
|
|
72
|
-
url: import("@sinclair/typebox").TString;
|
|
73
|
-
}>]>>;
|
|
74
|
-
}>;
|
|
75
|
-
export declare const updateEventSchema: import("@sinclair/typebox").TObject<{
|
|
76
|
-
id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
77
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
78
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
79
|
-
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
80
|
-
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
81
|
-
location: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
82
|
-
attendees: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
83
|
-
email: import("@sinclair/typebox").TString;
|
|
84
|
-
}>>>;
|
|
85
|
-
sendNotifications: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
86
|
-
meeting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TObject<{
|
|
87
|
-
url: import("@sinclair/typebox").TString;
|
|
88
|
-
}>]>>;
|
|
89
|
-
}>;
|
|
90
|
-
export declare const updateEventAcrossCalendarsSchema: import("@sinclair/typebox").TObject<{
|
|
91
|
-
metaId: import("@sinclair/typebox").TString;
|
|
92
|
-
subject: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
93
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
94
|
-
start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
95
|
-
end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TDate>;
|
|
96
|
-
location: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
97
|
-
attendees: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
98
|
-
email: import("@sinclair/typebox").TString;
|
|
99
|
-
}>>>;
|
|
100
|
-
sendNotificationsFor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"google" | "microsoft">[]>>>;
|
|
101
|
-
meeting: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TObject<{
|
|
102
|
-
url: import("@sinclair/typebox").TString;
|
|
103
|
-
}>]>>;
|
|
104
|
-
}>;
|
|
105
|
-
export declare const timeRangeSchema: import("@sinclair/typebox").TObject<{
|
|
106
|
-
start: import("@sinclair/typebox").TDate;
|
|
107
|
-
end: import("@sinclair/typebox").TDate;
|
|
108
|
-
}>;
|
|
109
|
-
export declare const busySchema: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
110
|
-
start: import("@sinclair/typebox").TDate;
|
|
111
|
-
end: import("@sinclair/typebox").TDate;
|
|
112
|
-
}>>;
|
|
113
|
-
//# sourceMappingURL=calendar.tb.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.tb.d.ts","sourceRoot":"","sources":["../../src/typebox/calendar.tb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAa,MAAM,4BAA4B,CAAA;AAE9E,eAAO,MAAM,cAAc,oGAA4D,CAAA;AAEvF,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;;;;;;;;;;;;;;;;;EAWtB,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,92 +0,0 @@
|
|
|
1
|
-
import { Type as T } from '@sinclair/typebox';
|
|
2
|
-
import { AttendeeResponseStatus, providers } from '../types/calendar.types.js';
|
|
3
|
-
export const providerSchema = T.Union(providers.map((provider) => T.Literal(provider)));
|
|
4
|
-
export const attendeeResponseStatusSchema = T.Enum(AttendeeResponseStatus);
|
|
5
|
-
export const calendarSchema = T.Object({
|
|
6
|
-
id: T.String(),
|
|
7
|
-
timeZone: T.Optional(T.String()),
|
|
8
|
-
subject: T.Optional(T.String()),
|
|
9
|
-
backgroundColor: T.Optional(T.String()),
|
|
10
|
-
foregroundColor: T.Optional(T.String()),
|
|
11
|
-
selected: T.Optional(T.Boolean()),
|
|
12
|
-
accessRole: T.Optional(T.String()),
|
|
13
|
-
original: T.Any(),
|
|
14
|
-
});
|
|
15
|
-
export const meetingSchema = T.Object({
|
|
16
|
-
url: T.String(),
|
|
17
|
-
});
|
|
18
|
-
export const attendeeSchema = T.Union([
|
|
19
|
-
T.Object({
|
|
20
|
-
email: T.String(),
|
|
21
|
-
responseStatus: T.Optional(attendeeResponseStatusSchema),
|
|
22
|
-
}),
|
|
23
|
-
T.Object({
|
|
24
|
-
email: T.String(),
|
|
25
|
-
self: T.Boolean(),
|
|
26
|
-
}),
|
|
27
|
-
]);
|
|
28
|
-
export const createAttendeeSchema = T.Object({
|
|
29
|
-
email: T.String(),
|
|
30
|
-
});
|
|
31
|
-
export const eventSchema = T.Object({
|
|
32
|
-
id: T.String(),
|
|
33
|
-
metaId: T.Optional(T.String()),
|
|
34
|
-
calendarId: T.Optional(T.String()),
|
|
35
|
-
subject: T.Optional(T.String()),
|
|
36
|
-
description: T.Optional(T.String()),
|
|
37
|
-
start: T.Optional(T.Date()),
|
|
38
|
-
end: T.Optional(T.Date()),
|
|
39
|
-
location: T.Optional(T.String()),
|
|
40
|
-
attendees: T.Array(attendeeSchema),
|
|
41
|
-
original: T.Any(),
|
|
42
|
-
});
|
|
43
|
-
export const createEventSchema = T.Object({
|
|
44
|
-
metaId: T.Optional(T.String()),
|
|
45
|
-
subject: T.Optional(T.String()),
|
|
46
|
-
description: T.Optional(T.String()),
|
|
47
|
-
start: T.Optional(T.Date()),
|
|
48
|
-
end: T.Optional(T.Date()),
|
|
49
|
-
location: T.Optional(T.String()),
|
|
50
|
-
attendees: T.Optional(T.Array(createAttendeeSchema)),
|
|
51
|
-
sendNotifications: T.Optional(T.Boolean()),
|
|
52
|
-
meeting: T.Optional(T.Union([T.Boolean(), meetingSchema])),
|
|
53
|
-
});
|
|
54
|
-
export const createEventAcrossCalendarsSchema = T.Object({
|
|
55
|
-
id: T.Optional(T.String()),
|
|
56
|
-
subject: T.Optional(T.String()),
|
|
57
|
-
description: T.Optional(T.String()),
|
|
58
|
-
start: T.Optional(T.Date()),
|
|
59
|
-
end: T.Optional(T.Date()),
|
|
60
|
-
location: T.Optional(T.String()),
|
|
61
|
-
attendees: T.Optional(T.Array(createAttendeeSchema)),
|
|
62
|
-
sendNotificationsFor: T.Optional(T.Array(providerSchema)),
|
|
63
|
-
meeting: T.Optional(T.Union([T.Boolean(), meetingSchema])),
|
|
64
|
-
});
|
|
65
|
-
export const updateEventSchema = T.Object({
|
|
66
|
-
id: T.Optional(T.String()),
|
|
67
|
-
subject: T.Optional(T.String()),
|
|
68
|
-
description: T.Optional(T.String()),
|
|
69
|
-
start: T.Optional(T.Date()),
|
|
70
|
-
end: T.Optional(T.Date()),
|
|
71
|
-
location: T.Optional(T.String()),
|
|
72
|
-
attendees: T.Optional(T.Array(createAttendeeSchema)),
|
|
73
|
-
sendNotifications: T.Optional(T.Boolean()),
|
|
74
|
-
meeting: T.Optional(T.Union([T.Boolean(), meetingSchema])),
|
|
75
|
-
});
|
|
76
|
-
export const updateEventAcrossCalendarsSchema = T.Object({
|
|
77
|
-
metaId: T.String(),
|
|
78
|
-
subject: T.Optional(T.String()),
|
|
79
|
-
description: T.Optional(T.String()),
|
|
80
|
-
start: T.Optional(T.Date()),
|
|
81
|
-
end: T.Optional(T.Date()),
|
|
82
|
-
location: T.Optional(T.String()),
|
|
83
|
-
attendees: T.Optional(T.Array(createAttendeeSchema)),
|
|
84
|
-
sendNotificationsFor: T.Optional(T.Array(providerSchema)),
|
|
85
|
-
meeting: T.Optional(T.Union([T.Boolean(), meetingSchema])),
|
|
86
|
-
});
|
|
87
|
-
export const timeRangeSchema = T.Object({
|
|
88
|
-
start: T.Date(),
|
|
89
|
-
end: T.Date(),
|
|
90
|
-
});
|
|
91
|
-
export const busySchema = T.Array(timeRangeSchema);
|
|
92
|
-
//# sourceMappingURL=calendar.tb.js.map
|