recal-sdk 0.2.0 → 0.2.2
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 +27 -27
- package/dist/entities/organization.d.ts +4 -4
- package/dist/entities/organization.d.ts.map +1 -1
- package/dist/entities/organization.js +32 -0
- package/dist/entities/organization.js.map +1 -0
- package/dist/entities/user.d.ts +5 -5
- package/dist/entities/user.d.ts.map +1 -1
- package/dist/entities/user.js +45 -0
- package/dist/entities/user.js.map +1 -0
- package/dist/errors.js +36 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +10 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -7092
- package/dist/index.js.map +1 -1
- package/dist/services/calendar.service.d.ts +2 -2
- package/dist/services/calendar.service.d.ts.map +1 -1
- package/dist/services/calendar.service.js +292 -0
- package/dist/services/calendar.service.js.map +1 -0
- package/dist/services/oauth.service.d.ts +1 -1
- package/dist/services/oauth.service.d.ts.map +1 -1
- package/dist/services/oauth.service.js +168 -0
- package/dist/services/oauth.service.js.map +1 -0
- package/dist/services/organizations.service.d.ts +3 -3
- package/dist/services/organizations.service.d.ts.map +1 -1
- package/dist/services/organizations.service.js +132 -0
- package/dist/services/organizations.service.js.map +1 -0
- package/dist/services/scheduling.service.d.ts +2 -2
- package/dist/services/scheduling.service.d.ts.map +1 -1
- package/dist/services/scheduling.service.js +122 -0
- package/dist/services/scheduling.service.js.map +1 -0
- package/dist/services/users.service.d.ts +2 -2
- package/dist/services/users.service.d.ts.map +1 -1
- package/dist/services/users.service.js +93 -0
- package/dist/services/users.service.js.map +1 -0
- package/dist/typebox/calendar.tb.d.ts +5 -4
- package/dist/typebox/calendar.tb.d.ts.map +1 -1
- package/dist/typebox/calendar.tb.js +92 -0
- package/dist/typebox/calendar.tb.js.map +1 -0
- package/dist/typebox/oauth.tb.d.ts +2 -2
- package/dist/typebox/oauth.tb.js +16 -0
- package/dist/typebox/oauth.tb.js.map +1 -0
- package/dist/typebox/organization.stripped.tb.js +7 -0
- package/dist/typebox/organization.stripped.tb.js.map +1 -0
- package/dist/typebox/organization.tb.js +8 -0
- package/dist/typebox/organization.tb.js.map +1 -0
- package/dist/typebox/scheduling.tb.js +118 -0
- package/dist/typebox/scheduling.tb.js.map +1 -0
- package/dist/typebox/timeString.tb.d.ts +1 -1
- package/dist/typebox/timeString.tb.d.ts.map +1 -1
- package/dist/typebox/timeString.tb.js +7 -0
- package/dist/typebox/timeString.tb.js.map +1 -0
- package/dist/typebox/user.stripped.tb.js +6 -0
- package/dist/typebox/user.stripped.tb.js.map +1 -0
- package/dist/typebox/user.tb.d.ts +1 -1
- package/dist/typebox/user.tb.js +10 -0
- package/dist/typebox/user.tb.js.map +1 -0
- package/dist/types/calendar.types.d.ts +3 -5
- package/dist/types/calendar.types.d.ts.map +1 -1
- package/dist/types/calendar.types.js +27 -56
- package/dist/types/calendar.types.js.map +1 -1
- package/dist/types/internal.types.d.ts +1 -1
- package/dist/types/internal.types.d.ts.map +1 -1
- package/dist/types/internal.types.js +2 -0
- package/dist/types/internal.types.js.map +1 -0
- package/dist/types/oauth.types.d.ts +2 -2
- package/dist/types/oauth.types.d.ts.map +1 -1
- package/dist/types/oauth.types.js +2 -0
- package/dist/types/oauth.types.js.map +1 -0
- package/dist/types/scheduling.types.js +2 -0
- package/dist/types/scheduling.types.js.map +1 -0
- package/dist/utils/fetch.helper.d.ts +1 -1
- package/dist/utils/fetch.helper.d.ts.map +1 -1
- package/dist/utils/fetch.helper.js +93 -0
- package/dist/utils/fetch.helper.js.map +1 -0
- package/dist/utils/fetchErrorHandler.d.ts +1 -1
- package/dist/utils/fetchErrorHandler.d.ts.map +1 -1
- package/dist/utils/fetchErrorHandler.js +32 -0
- package/dist/utils/fetchErrorHandler.js.map +1 -0
- package/dist/utils/functionize.js +6 -0
- package/dist/utils/functionize.js.map +1 -0
- package/dist/utils/includes.helper.js +10 -0
- package/dist/utils/includes.helper.js.map +1 -0
- package/dist/utils/omit.js +4 -0
- package/dist/utils/omit.js.map +1 -0
- package/package.json +9 -6
- package/dist/index.d.mts +0 -55
- package/dist/index.mjs +0 -99
- package/dist/index.mjs.map +0 -1
- package/dist/typedi.d.ts +0 -3
- package/dist/typedi.d.ts.map +0 -1
- package/dist/types/calendar.types.d.mts +0 -72
- package/dist/types/calendar.types.mjs +0 -22
- package/dist/types/calendar.types.mjs.map +0 -1
- package/dist/types/entity.types.d.mts +0 -11
- package/dist/types/entity.types.d.ts +0 -11
- package/dist/types/entity.types.js +0 -22
- package/dist/types/entity.types.js.map +0 -1
- package/dist/types/entity.types.mjs +0 -1
- package/dist/types/entity.types.mjs.map +0 -1
- package/dist/types/index.d.mts +0 -12
- package/dist/types/index.d.ts +0 -12
- package/dist/types/index.js +0 -58
- package/dist/types/index.js.map +0 -1
- package/dist/types/index.mjs +0 -22
- package/dist/types/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "recal-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Recal SDK",
|
|
5
5
|
"author": "Recal <team@recal.dev>",
|
|
6
6
|
"contributors": ["tkoehlerlg", "jschwxrz"],
|
|
@@ -13,24 +13,27 @@
|
|
|
13
13
|
"types": "./dist/index.d.ts"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
+
"type": "module",
|
|
16
17
|
"files": ["dist"],
|
|
17
18
|
"scripts": {
|
|
18
|
-
"build": "tsc --
|
|
19
|
+
"build": "tsc --project tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
19
20
|
"test": "bun test tests",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
20
22
|
"format": "biome format --fix",
|
|
21
23
|
"lint": "biome lint",
|
|
22
24
|
"lint:fix": "biome lint --fix",
|
|
23
25
|
"lint:fix:all": "biome lint --fix --unsafe",
|
|
24
26
|
"check": "biome check",
|
|
25
27
|
"check:fix": "biome check --fix",
|
|
26
|
-
"prepublishOnly": "NODE_ENV=production bun run build"
|
|
28
|
+
"prepublishOnly": "NODE_ENV=production bun run build",
|
|
29
|
+
"postpublish": "echo 'Successfully published recal-sdk@'$npm_package_version"
|
|
27
30
|
},
|
|
28
31
|
"keywords": ["recal", "calendar"],
|
|
29
32
|
"devDependencies": {
|
|
30
33
|
"@biomejs/biome": "2.1.2",
|
|
31
|
-
"@types/
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
+
"@types/bun": "latest",
|
|
35
|
+
"tsc-alias": "^1.8.16",
|
|
36
|
+
"typescript": "^5.8.3"
|
|
34
37
|
},
|
|
35
38
|
"dependencies": {
|
|
36
39
|
"@sinclair/typebox": "^0.34.38"
|
package/dist/index.d.mts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Organization } from './types/entity.types.mjs'
|
|
2
|
-
export { OrganizationMember } from './types/entity.types.mjs'
|
|
3
|
-
export {
|
|
4
|
-
Attendee,
|
|
5
|
-
AttendeeResponseStatus,
|
|
6
|
-
Calendar,
|
|
7
|
-
CalendarAccessRoles,
|
|
8
|
-
Event,
|
|
9
|
-
FreeBusy,
|
|
10
|
-
Meeting,
|
|
11
|
-
Provider,
|
|
12
|
-
TimeRange,
|
|
13
|
-
} from './types/calendar.types.mjs'
|
|
14
|
-
|
|
15
|
-
interface RecalOptions {
|
|
16
|
-
token?: string
|
|
17
|
-
baseURL?: string
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Recal SDK
|
|
21
|
-
* @description Recal SDK for Node.js
|
|
22
|
-
* @version 0.1.0
|
|
23
|
-
* @author Recal <team@recal.dev>
|
|
24
|
-
* @license MIT
|
|
25
|
-
*/
|
|
26
|
-
declare class Recal {
|
|
27
|
-
private token
|
|
28
|
-
private baseURL
|
|
29
|
-
/**
|
|
30
|
-
* Recal SDK constructor
|
|
31
|
-
* @param token Recal API token
|
|
32
|
-
*/
|
|
33
|
-
constructor(options?: RecalOptions)
|
|
34
|
-
/**
|
|
35
|
-
* Fetch function with Recal authentication
|
|
36
|
-
* @param input Request input
|
|
37
|
-
* @param init Request init
|
|
38
|
-
* @returns Promise<Response>
|
|
39
|
-
*/
|
|
40
|
-
private _fetch
|
|
41
|
-
private fetch
|
|
42
|
-
/**
|
|
43
|
-
* Get all organizations
|
|
44
|
-
* @returns Promise<PublicOrganization[]>
|
|
45
|
-
*/
|
|
46
|
-
listOrganizations(): Promise<Organization[]>
|
|
47
|
-
/**
|
|
48
|
-
* Get organization by slug
|
|
49
|
-
* @param slug Organization slug
|
|
50
|
-
* @returns Promise<Organization>
|
|
51
|
-
*/
|
|
52
|
-
getOrganization(slug: string): Promise<Organization>
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { Organization, Recal, Recal as default }
|
package/dist/index.mjs
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// src/types/calendar.types.ts
|
|
2
|
-
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
3
|
-
Provider2.GOOGLE = 'google'
|
|
4
|
-
Provider2.MICROSOFT = 'microsoft'
|
|
5
|
-
return Provider2
|
|
6
|
-
})(Provider || {})
|
|
7
|
-
var CalendarAccessRoles = /* @__PURE__ */ ((CalendarAccessRoles2) => {
|
|
8
|
-
CalendarAccessRoles2.FreeBusyReader = 'freeBusyReader'
|
|
9
|
-
CalendarAccessRoles2.Reader = 'reader'
|
|
10
|
-
CalendarAccessRoles2.Writer = 'writer'
|
|
11
|
-
CalendarAccessRoles2.Owner = 'owner'
|
|
12
|
-
return CalendarAccessRoles2
|
|
13
|
-
})(CalendarAccessRoles || {})
|
|
14
|
-
var AttendeeResponseStatus = /* @__PURE__ */ ((AttendeeResponseStatus2) => {
|
|
15
|
-
AttendeeResponseStatus2.NeedsAction = 'needsAction'
|
|
16
|
-
AttendeeResponseStatus2.Accepted = 'accepted'
|
|
17
|
-
AttendeeResponseStatus2.Tentative = 'tentative'
|
|
18
|
-
AttendeeResponseStatus2.Declined = 'declined'
|
|
19
|
-
return AttendeeResponseStatus2
|
|
20
|
-
})(AttendeeResponseStatus || {})
|
|
21
|
-
|
|
22
|
-
// src/index.ts
|
|
23
|
-
var Recal = class {
|
|
24
|
-
/**
|
|
25
|
-
* Recal SDK constructor
|
|
26
|
-
* @param token Recal API token
|
|
27
|
-
*/
|
|
28
|
-
constructor(options) {
|
|
29
|
-
// MARK: Functions
|
|
30
|
-
/**
|
|
31
|
-
* Fetch function with Recal authentication
|
|
32
|
-
* @param input Request input
|
|
33
|
-
* @param init Request init
|
|
34
|
-
* @returns Promise<Response>
|
|
35
|
-
*/
|
|
36
|
-
this._fetch = async (input, init) => {
|
|
37
|
-
const url = new URL(`${this.baseURL}/v1${input.startsWith('/') ? '' : '/'}${input}`)
|
|
38
|
-
return await fetch(url, {
|
|
39
|
-
method: init?.method || 'GET',
|
|
40
|
-
headers: {
|
|
41
|
-
...init?.headers,
|
|
42
|
-
Authorization: `Bearer ${this.token}`,
|
|
43
|
-
'Content-Type': 'application/json',
|
|
44
|
-
},
|
|
45
|
-
credentials: 'include',
|
|
46
|
-
mode: 'cors',
|
|
47
|
-
...init,
|
|
48
|
-
}).catch((error) => {
|
|
49
|
-
throw new Error(`[Recal] Fetch error: ${error}`)
|
|
50
|
-
})
|
|
51
|
-
}
|
|
52
|
-
this.fetch = (input, init) => {
|
|
53
|
-
return this._fetch(input, init)
|
|
54
|
-
}
|
|
55
|
-
let envToken
|
|
56
|
-
if (!options?.token) {
|
|
57
|
-
const _envToken = process.env.RECAL_TOKEN
|
|
58
|
-
if (!_envToken)
|
|
59
|
-
throw new Error('[Recal] No token provided by constructor or environment variable (RECAL_TOKEN)')
|
|
60
|
-
envToken = _envToken
|
|
61
|
-
}
|
|
62
|
-
this.token = options?.token || envToken
|
|
63
|
-
this.baseURL = options?.baseURL || process.env.RECAL_BASE_URL || 'https://api.recal.dev'
|
|
64
|
-
}
|
|
65
|
-
// Organization
|
|
66
|
-
/**
|
|
67
|
-
* Get all organizations
|
|
68
|
-
* @returns Promise<PublicOrganization[]>
|
|
69
|
-
*/
|
|
70
|
-
async listOrganizations() {
|
|
71
|
-
const response = await this.fetch('/organizations')
|
|
72
|
-
if (!response.ok) throw new Error(`[Recal] HTTP error! status: ${response.status}`)
|
|
73
|
-
return response.json()
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Get organization by slug
|
|
77
|
-
* @param slug Organization slug
|
|
78
|
-
* @returns Promise<Organization>
|
|
79
|
-
*/
|
|
80
|
-
async getOrganization(slug) {
|
|
81
|
-
const response = await this.fetch(`/organizations/${slug}`)
|
|
82
|
-
if (!response.ok) throw new Error(`[Recal] HTTP error! status: ${response.status}`)
|
|
83
|
-
return response.json()
|
|
84
|
-
}
|
|
85
|
-
// Member
|
|
86
|
-
// Calendar
|
|
87
|
-
}
|
|
88
|
-
var index_default = Recal
|
|
89
|
-
var test = new Recal()
|
|
90
|
-
test.listOrganizations().then((organizations) => console.log(organizations))
|
|
91
|
-
export { AttendeeResponseStatus, CalendarAccessRoles, Provider, Recal, index_default as default }
|
|
92
|
-
/**
|
|
93
|
-
* Recal SDK
|
|
94
|
-
* @description Recal SDK for Node.js
|
|
95
|
-
* @version 0.1.0
|
|
96
|
-
* @author Recal <team@recal.dev>
|
|
97
|
-
* @license MIT
|
|
98
|
-
*/
|
|
99
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/calendar.types.ts","../src/index.ts"],"sourcesContent":["// Enums\nexport enum Provider {\n GOOGLE = 'google',\n MICROSOFT = 'microsoft',\n}\n\nexport enum CalendarAccessRoles {\n FreeBusyReader = 'freeBusyReader',\n Reader = 'reader',\n Writer = 'writer',\n Owner = 'owner',\n}\n\nexport enum AttendeeResponseStatus {\n NeedsAction = 'needsAction',\n Accepted = 'accepted',\n Tentative = 'tentative',\n Declined = 'declined',\n}\n\n// Types\n\nexport type Calendar = {\n id: string\n timeZone?: string\n subject?: string\n backgroundColor?: string\n foregroundColor?: string\n selected?: boolean\n accessRole?: CalendarAccessRoles\n original?: unknown\n}\n\nexport type Meeting = {\n url: string\n}\n\nexport type Attendee = {\n email: string\n original: unknown\n} & (\n | {\n responseStatus?: AttendeeResponseStatus\n }\n | {\n self: true\n }\n)\n\nexport type Event = {\n id: string\n metaId?: string\n subject?: string\n description?: string\n start?: Date\n end?: Date\n location?: string\n attendees: Attendee[]\n meeting?: Meeting\n original: unknown\n}\n\nexport type TimeRange = {\n start: Date\n end: Date\n}\n\nexport type FreeBusy = {\n calendarId: string\n busy: TimeRange[]\n}\n","import type { Organization } from './types/entity.types'\n\ninterface RecalOptions {\n token?: string\n baseURL?: string\n}\n\n/**\n * Recal SDK\n * @description Recal SDK for Node.js\n * @version 0.1.0\n * @author Recal <team@recal.dev>\n * @license MIT\n */\nexport class Recal {\n // MARK: States\n private token: string\n private baseURL: string\n\n /**\n * Recal SDK constructor\n * @param token Recal API token\n */\n constructor(options?: RecalOptions) {\n let envToken: string\n if (!options?.token) {\n const _envToken = process.env.RECAL_TOKEN\n if (!_envToken)\n throw new Error('[Recal] No token provided by constructor or environment variable (RECAL_TOKEN)')\n envToken = _envToken\n }\n this.token = options?.token || envToken!\n this.baseURL = options?.baseURL || process.env.RECAL_BASE_URL || 'https://api.recal.dev'\n }\n\n // MARK: Functions\n /**\n * Fetch function with Recal authentication\n * @param input Request input\n * @param init Request init\n * @returns Promise<Response>\n */\n private _fetch = async (input: string, init?: RequestInit): Promise<Response> => {\n const url = new URL(`${this.baseURL}/v1${input.startsWith('/') ? '' : '/'}${input}`)\n return await fetch(url, {\n method: init?.method || 'GET',\n headers: {\n ...init?.headers,\n Authorization: `Bearer ${this.token}`,\n 'Content-Type': 'application/json',\n },\n credentials: 'include',\n mode: 'cors',\n ...init,\n }).catch((error) => {\n throw new Error(`[Recal] Fetch error: ${error}`)\n })\n }\n\n private fetch = (input: string, init?: RequestInit): Promise<Response> => {\n return this._fetch(input, init)\n }\n\n // Organization\n /**\n * Get all organizations\n * @returns Promise<PublicOrganization[]>\n */\n async listOrganizations(): Promise<Organization[]> {\n const response = await this.fetch('/organizations')\n if (!response.ok) throw new Error(`[Recal] HTTP error! status: ${response.status}`)\n return response.json() as Promise<Organization[]>\n }\n\n /**\n * Get organization by slug\n * @param slug Organization slug\n * @returns Promise<Organization>\n */\n async getOrganization(slug: string): Promise<Organization> {\n const response = await this.fetch(`/organizations/${slug}`)\n if (!response.ok) throw new Error(`[Recal] HTTP error! status: ${response.status}`)\n return response.json() as Promise<Organization>\n }\n\n // Member\n\n // Calendar\n}\n\nexport * from './types'\nexport default Recal\n\nconst test = new Recal()\ntest.listOrganizations().then((organizations) => console.log(organizations))\n"],"mappings":";AACO,IAAK,WAAL,kBAAKA,cAAL;AACH,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AAJA,SAAAA;AAAA,GAAA;AAOL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,cAAW;AAJH,SAAAA;AAAA,GAAA;;;ACCL,IAAM,QAAN,MAAY;AAAA;AAAA;AAAA;AAAA;AAAA,EASf,YAAY,SAAwB;AAmBpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAQ,SAAS,OAAO,OAAe,SAA0C;AAC7E,YAAM,MAAM,IAAI,IAAI,GAAG,KAAK,OAAO,MAAM,MAAM,WAAW,GAAG,IAAI,KAAK,GAAG,GAAG,KAAK,EAAE;AACnF,aAAO,MAAM,MAAM,KAAK;AAAA,QACpB,QAAQ,MAAM,UAAU;AAAA,QACxB,SAAS;AAAA,UACL,GAAG,MAAM;AAAA,UACT,eAAe,UAAU,KAAK,KAAK;AAAA,UACnC,gBAAgB;AAAA,QACpB;AAAA,QACA,aAAa;AAAA,QACb,MAAM;AAAA,QACN,GAAG;AAAA,MACP,CAAC,EAAE,MAAM,CAAC,UAAU;AAChB,cAAM,IAAI,MAAM,wBAAwB,KAAK,EAAE;AAAA,MACnD,CAAC;AAAA,IACL;AAEA,SAAQ,QAAQ,CAAC,OAAe,SAA0C;AACtE,aAAO,KAAK,OAAO,OAAO,IAAI;AAAA,IAClC;AArCI,QAAI;AACJ,QAAI,CAAC,SAAS,OAAO;AACjB,YAAM,YAAY,QAAQ,IAAI;AAC9B,UAAI,CAAC;AACD,cAAM,IAAI,MAAM,gFAAgF;AACpG,iBAAW;AAAA,IACf;AACA,SAAK,QAAQ,SAAS,SAAS;AAC/B,SAAK,UAAU,SAAS,WAAW,QAAQ,IAAI,kBAAkB;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAmCA,MAAM,oBAA6C;AAC/C,UAAM,WAAW,MAAM,KAAK,MAAM,gBAAgB;AAClD,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,+BAA+B,SAAS,MAAM,EAAE;AAClF,WAAO,SAAS,KAAK;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,gBAAgB,MAAqC;AACvD,UAAM,WAAW,MAAM,KAAK,MAAM,kBAAkB,IAAI,EAAE;AAC1D,QAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,+BAA+B,SAAS,MAAM,EAAE;AAClF,WAAO,SAAS,KAAK;AAAA,EACzB;AAAA;AAAA;AAKJ;AAGA,IAAO,gBAAQ;AAEf,IAAM,OAAO,IAAI,MAAM;AACvB,KAAK,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,QAAQ,IAAI,aAAa,CAAC;","names":["Provider","CalendarAccessRoles","AttendeeResponseStatus"]}
|
package/dist/typedi.d.ts
DELETED
package/dist/typedi.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typedi.d.ts","sourceRoot":"","sources":["../src/typedi.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,WAA0C,CAAA;AAClE,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,QAAwC,CAAA"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
declare enum Provider {
|
|
2
|
-
GOOGLE = 'google',
|
|
3
|
-
MICROSOFT = 'microsoft',
|
|
4
|
-
}
|
|
5
|
-
declare enum CalendarAccessRoles {
|
|
6
|
-
FreeBusyReader = 'freeBusyReader',
|
|
7
|
-
Reader = 'reader',
|
|
8
|
-
Writer = 'writer',
|
|
9
|
-
Owner = 'owner',
|
|
10
|
-
}
|
|
11
|
-
declare enum AttendeeResponseStatus {
|
|
12
|
-
NeedsAction = 'needsAction',
|
|
13
|
-
Accepted = 'accepted',
|
|
14
|
-
Tentative = 'tentative',
|
|
15
|
-
Declined = 'declined',
|
|
16
|
-
}
|
|
17
|
-
type Calendar = {
|
|
18
|
-
id: string
|
|
19
|
-
timeZone?: string
|
|
20
|
-
subject?: string
|
|
21
|
-
backgroundColor?: string
|
|
22
|
-
foregroundColor?: string
|
|
23
|
-
selected?: boolean
|
|
24
|
-
accessRole?: CalendarAccessRoles
|
|
25
|
-
original?: unknown
|
|
26
|
-
}
|
|
27
|
-
type Meeting = {
|
|
28
|
-
url: string
|
|
29
|
-
}
|
|
30
|
-
type Attendee = {
|
|
31
|
-
email: string
|
|
32
|
-
original: unknown
|
|
33
|
-
} & (
|
|
34
|
-
| {
|
|
35
|
-
responseStatus?: AttendeeResponseStatus
|
|
36
|
-
}
|
|
37
|
-
| {
|
|
38
|
-
self: true
|
|
39
|
-
}
|
|
40
|
-
)
|
|
41
|
-
type Event = {
|
|
42
|
-
id: string
|
|
43
|
-
metaId?: string
|
|
44
|
-
subject?: string
|
|
45
|
-
description?: string
|
|
46
|
-
start?: Date
|
|
47
|
-
end?: Date
|
|
48
|
-
location?: string
|
|
49
|
-
attendees: Attendee[]
|
|
50
|
-
meeting?: Meeting
|
|
51
|
-
original: unknown
|
|
52
|
-
}
|
|
53
|
-
type TimeRange = {
|
|
54
|
-
start: Date
|
|
55
|
-
end: Date
|
|
56
|
-
}
|
|
57
|
-
type FreeBusy = {
|
|
58
|
-
calendarId: string
|
|
59
|
-
busy: TimeRange[]
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export {
|
|
63
|
-
type Attendee,
|
|
64
|
-
AttendeeResponseStatus,
|
|
65
|
-
type Calendar,
|
|
66
|
-
CalendarAccessRoles,
|
|
67
|
-
type Event,
|
|
68
|
-
type FreeBusy,
|
|
69
|
-
type Meeting,
|
|
70
|
-
Provider,
|
|
71
|
-
type TimeRange,
|
|
72
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/types/calendar.types.ts
|
|
2
|
-
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
3
|
-
Provider2.GOOGLE = 'google'
|
|
4
|
-
Provider2.MICROSOFT = 'microsoft'
|
|
5
|
-
return Provider2
|
|
6
|
-
})(Provider || {})
|
|
7
|
-
var CalendarAccessRoles = /* @__PURE__ */ ((CalendarAccessRoles2) => {
|
|
8
|
-
CalendarAccessRoles2.FreeBusyReader = 'freeBusyReader'
|
|
9
|
-
CalendarAccessRoles2.Reader = 'reader'
|
|
10
|
-
CalendarAccessRoles2.Writer = 'writer'
|
|
11
|
-
CalendarAccessRoles2.Owner = 'owner'
|
|
12
|
-
return CalendarAccessRoles2
|
|
13
|
-
})(CalendarAccessRoles || {})
|
|
14
|
-
var AttendeeResponseStatus = /* @__PURE__ */ ((AttendeeResponseStatus2) => {
|
|
15
|
-
AttendeeResponseStatus2.NeedsAction = 'needsAction'
|
|
16
|
-
AttendeeResponseStatus2.Accepted = 'accepted'
|
|
17
|
-
AttendeeResponseStatus2.Tentative = 'tentative'
|
|
18
|
-
AttendeeResponseStatus2.Declined = 'declined'
|
|
19
|
-
return AttendeeResponseStatus2
|
|
20
|
-
})(AttendeeResponseStatus || {})
|
|
21
|
-
export { AttendeeResponseStatus, CalendarAccessRoles, Provider }
|
|
22
|
-
//# sourceMappingURL=calendar.types.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/calendar.types.ts"],"sourcesContent":["// Enums\nexport enum Provider {\n GOOGLE = 'google',\n MICROSOFT = 'microsoft',\n}\n\nexport enum CalendarAccessRoles {\n FreeBusyReader = 'freeBusyReader',\n Reader = 'reader',\n Writer = 'writer',\n Owner = 'owner',\n}\n\nexport enum AttendeeResponseStatus {\n NeedsAction = 'needsAction',\n Accepted = 'accepted',\n Tentative = 'tentative',\n Declined = 'declined',\n}\n\n// Types\n\nexport type Calendar = {\n id: string\n timeZone?: string\n subject?: string\n backgroundColor?: string\n foregroundColor?: string\n selected?: boolean\n accessRole?: CalendarAccessRoles\n original?: unknown\n}\n\nexport type Meeting = {\n url: string\n}\n\nexport type Attendee = {\n email: string\n original: unknown\n} & (\n | {\n responseStatus?: AttendeeResponseStatus\n }\n | {\n self: true\n }\n)\n\nexport type Event = {\n id: string\n metaId?: string\n subject?: string\n description?: string\n start?: Date\n end?: Date\n location?: string\n attendees: Attendee[]\n meeting?: Meeting\n original: unknown\n}\n\nexport type TimeRange = {\n start: Date\n end: Date\n}\n\nexport type FreeBusy = {\n calendarId: string\n busy: TimeRange[]\n}\n"],"mappings":";AACO,IAAK,WAAL,kBAAKA,cAAL;AACH,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AAJA,SAAAA;AAAA,GAAA;AAOL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,cAAW;AAJH,SAAAA;AAAA,GAAA;","names":["Provider","CalendarAccessRoles","AttendeeResponseStatus"]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if ((from && typeof from === 'object') || typeof from === 'function') {
|
|
8
|
-
for (const key of __getOwnPropNames(from))
|
|
9
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
13
|
-
})
|
|
14
|
-
}
|
|
15
|
-
return to
|
|
16
|
-
}
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', { value: true }), mod)
|
|
18
|
-
|
|
19
|
-
// src/types/entity.types.ts
|
|
20
|
-
var entity_types_exports = {}
|
|
21
|
-
module.exports = __toCommonJS(entity_types_exports)
|
|
22
|
-
//# sourceMappingURL=entity.types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/entity.types.ts"],"sourcesContent":["export type Organization = {\n name: string | null\n createdAt: Date\n slug: string\n}\n\nexport type OrganizationMember = {\n createdAt: Date\n userId: string\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=entity.types.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/types/index.d.mts
DELETED
package/dist/types/index.d.ts
DELETED
package/dist/types/index.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all) __defProp(target, name, { get: all[name], enumerable: true })
|
|
8
|
-
}
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if ((from && typeof from === 'object') || typeof from === 'function') {
|
|
11
|
-
for (const key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: () => from[key],
|
|
15
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
16
|
-
})
|
|
17
|
-
}
|
|
18
|
-
return to
|
|
19
|
-
}
|
|
20
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, '__esModule', { value: true }), mod)
|
|
21
|
-
|
|
22
|
-
// src/types/index.ts
|
|
23
|
-
var types_exports = {}
|
|
24
|
-
__export(types_exports, {
|
|
25
|
-
AttendeeResponseStatus: () => AttendeeResponseStatus,
|
|
26
|
-
CalendarAccessRoles: () => CalendarAccessRoles,
|
|
27
|
-
Provider: () => Provider,
|
|
28
|
-
})
|
|
29
|
-
module.exports = __toCommonJS(types_exports)
|
|
30
|
-
|
|
31
|
-
// src/types/calendar.types.ts
|
|
32
|
-
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
33
|
-
Provider2.GOOGLE = 'google'
|
|
34
|
-
Provider2.MICROSOFT = 'microsoft'
|
|
35
|
-
return Provider2
|
|
36
|
-
})(Provider || {})
|
|
37
|
-
var CalendarAccessRoles = /* @__PURE__ */ ((CalendarAccessRoles2) => {
|
|
38
|
-
CalendarAccessRoles2.FreeBusyReader = 'freeBusyReader'
|
|
39
|
-
CalendarAccessRoles2.Reader = 'reader'
|
|
40
|
-
CalendarAccessRoles2.Writer = 'writer'
|
|
41
|
-
CalendarAccessRoles2.Owner = 'owner'
|
|
42
|
-
return CalendarAccessRoles2
|
|
43
|
-
})(CalendarAccessRoles || {})
|
|
44
|
-
var AttendeeResponseStatus = /* @__PURE__ */ ((AttendeeResponseStatus2) => {
|
|
45
|
-
AttendeeResponseStatus2.NeedsAction = 'needsAction'
|
|
46
|
-
AttendeeResponseStatus2.Accepted = 'accepted'
|
|
47
|
-
AttendeeResponseStatus2.Tentative = 'tentative'
|
|
48
|
-
AttendeeResponseStatus2.Declined = 'declined'
|
|
49
|
-
return AttendeeResponseStatus2
|
|
50
|
-
})(AttendeeResponseStatus || {})
|
|
51
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
-
0 &&
|
|
53
|
-
(module.exports = {
|
|
54
|
-
AttendeeResponseStatus,
|
|
55
|
-
CalendarAccessRoles,
|
|
56
|
-
Provider,
|
|
57
|
-
})
|
|
58
|
-
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/index.ts","../../src/types/calendar.types.ts"],"sourcesContent":["export * from './calendar.types'\nexport * from './entity.types'\n","// Enums\nexport enum Provider {\n GOOGLE = 'google',\n MICROSOFT = 'microsoft',\n}\n\nexport enum CalendarAccessRoles {\n FreeBusyReader = 'freeBusyReader',\n Reader = 'reader',\n Writer = 'writer',\n Owner = 'owner',\n}\n\nexport enum AttendeeResponseStatus {\n NeedsAction = 'needsAction',\n Accepted = 'accepted',\n Tentative = 'tentative',\n Declined = 'declined',\n}\n\n// Types\n\nexport type Calendar = {\n id: string\n timeZone?: string\n subject?: string\n backgroundColor?: string\n foregroundColor?: string\n selected?: boolean\n accessRole?: CalendarAccessRoles\n original?: unknown\n}\n\nexport type Meeting = {\n url: string\n}\n\nexport type Attendee = {\n email: string\n original: unknown\n} & (\n | {\n responseStatus?: AttendeeResponseStatus\n }\n | {\n self: true\n }\n)\n\nexport type Event = {\n id: string\n metaId?: string\n subject?: string\n description?: string\n start?: Date\n end?: Date\n location?: string\n attendees: Attendee[]\n meeting?: Meeting\n original: unknown\n}\n\nexport type TimeRange = {\n start: Date\n end: Date\n}\n\nexport type FreeBusy = {\n calendarId: string\n busy: TimeRange[]\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAK,WAAL,kBAAKA,cAAL;AACH,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AAJA,SAAAA;AAAA,GAAA;AAOL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,cAAW;AAJH,SAAAA;AAAA,GAAA;","names":["Provider","CalendarAccessRoles","AttendeeResponseStatus"]}
|
package/dist/types/index.mjs
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/types/calendar.types.ts
|
|
2
|
-
var Provider = /* @__PURE__ */ ((Provider2) => {
|
|
3
|
-
Provider2.GOOGLE = 'google'
|
|
4
|
-
Provider2.MICROSOFT = 'microsoft'
|
|
5
|
-
return Provider2
|
|
6
|
-
})(Provider || {})
|
|
7
|
-
var CalendarAccessRoles = /* @__PURE__ */ ((CalendarAccessRoles2) => {
|
|
8
|
-
CalendarAccessRoles2.FreeBusyReader = 'freeBusyReader'
|
|
9
|
-
CalendarAccessRoles2.Reader = 'reader'
|
|
10
|
-
CalendarAccessRoles2.Writer = 'writer'
|
|
11
|
-
CalendarAccessRoles2.Owner = 'owner'
|
|
12
|
-
return CalendarAccessRoles2
|
|
13
|
-
})(CalendarAccessRoles || {})
|
|
14
|
-
var AttendeeResponseStatus = /* @__PURE__ */ ((AttendeeResponseStatus2) => {
|
|
15
|
-
AttendeeResponseStatus2.NeedsAction = 'needsAction'
|
|
16
|
-
AttendeeResponseStatus2.Accepted = 'accepted'
|
|
17
|
-
AttendeeResponseStatus2.Tentative = 'tentative'
|
|
18
|
-
AttendeeResponseStatus2.Declined = 'declined'
|
|
19
|
-
return AttendeeResponseStatus2
|
|
20
|
-
})(AttendeeResponseStatus || {})
|
|
21
|
-
export { AttendeeResponseStatus, CalendarAccessRoles, Provider }
|
|
22
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/types/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/types/calendar.types.ts"],"sourcesContent":["// Enums\nexport enum Provider {\n GOOGLE = 'google',\n MICROSOFT = 'microsoft',\n}\n\nexport enum CalendarAccessRoles {\n FreeBusyReader = 'freeBusyReader',\n Reader = 'reader',\n Writer = 'writer',\n Owner = 'owner',\n}\n\nexport enum AttendeeResponseStatus {\n NeedsAction = 'needsAction',\n Accepted = 'accepted',\n Tentative = 'tentative',\n Declined = 'declined',\n}\n\n// Types\n\nexport type Calendar = {\n id: string\n timeZone?: string\n subject?: string\n backgroundColor?: string\n foregroundColor?: string\n selected?: boolean\n accessRole?: CalendarAccessRoles\n original?: unknown\n}\n\nexport type Meeting = {\n url: string\n}\n\nexport type Attendee = {\n email: string\n original: unknown\n} & (\n | {\n responseStatus?: AttendeeResponseStatus\n }\n | {\n self: true\n }\n)\n\nexport type Event = {\n id: string\n metaId?: string\n subject?: string\n description?: string\n start?: Date\n end?: Date\n location?: string\n attendees: Attendee[]\n meeting?: Meeting\n original: unknown\n}\n\nexport type TimeRange = {\n start: Date\n end: Date\n}\n\nexport type FreeBusy = {\n calendarId: string\n busy: TimeRange[]\n}\n"],"mappings":";AACO,IAAK,WAAL,kBAAKA,cAAL;AACH,EAAAA,UAAA,YAAS;AACT,EAAAA,UAAA,eAAY;AAFJ,SAAAA;AAAA,GAAA;AAKL,IAAK,sBAAL,kBAAKC,yBAAL;AACH,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,YAAS;AACT,EAAAA,qBAAA,WAAQ;AAJA,SAAAA;AAAA,GAAA;AAOL,IAAK,yBAAL,kBAAKC,4BAAL;AACH,EAAAA,wBAAA,iBAAc;AACd,EAAAA,wBAAA,cAAW;AACX,EAAAA,wBAAA,eAAY;AACZ,EAAAA,wBAAA,cAAW;AAJH,SAAAA;AAAA,GAAA;","names":["Provider","CalendarAccessRoles","AttendeeResponseStatus"]}
|