mblabs-roccato-backend-commons 1.0.52 → 1.0.53

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.
@@ -6,8 +6,6 @@ export interface Credentials {
6
6
  clientSecret?: string;
7
7
  redirectUri?: string;
8
8
  apiKey?: string;
9
- accessToken?: string;
10
- refreshToken?: string;
11
9
  }
12
10
  export declare namespace GoogleAuth {
13
11
  namespace RefreshAccess {
@@ -36,7 +34,10 @@ export declare namespace GoogleCalendar {
36
34
  interface Response {
37
35
  events: {
38
36
  title?: string;
37
+ description?: string;
38
+ type?: string;
39
39
  status?: string;
40
+ createdAt?: string | Date;
40
41
  startAt?: string | Date;
41
42
  endAt?: string | Date;
42
43
  organizer?: {
@@ -5,7 +5,7 @@ class GoogleCalendarService {
5
5
  async getEvents({ credentials, data, }) {
6
6
  const client = new googleapis_1.google.auth.OAuth2(credentials.clientId, credentials.clientSecret, credentials.redirectUri);
7
7
  client.setCredentials({
8
- access_token: credentials.accessToken,
8
+ access_token: data.accessToken,
9
9
  refresh_token: data.refreshToken,
10
10
  });
11
11
  const { data: { items } } = await googleapis_1.google
@@ -14,11 +14,14 @@ class GoogleCalendarService {
14
14
  .list();
15
15
  const events = items.map(item => ({
16
16
  title: item.summary,
17
- status: item.status ?? '',
18
- startAt: item.start?.dateTime ?? '',
19
- endAt: item.end?.dateTime ?? '',
17
+ description: item.description,
18
+ type: item.eventType,
19
+ status: item.status,
20
+ createdAt: item.created,
21
+ startAt: item.start?.dateTime,
22
+ endAt: item.end?.dateTime,
20
23
  organizer: {
21
- name: item.organizer?.displayName ?? '',
24
+ name: item.organizer?.displayName,
22
25
  email: item.organizer?.email,
23
26
  },
24
27
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mblabs-roccato-backend-commons",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -55,6 +55,7 @@
55
55
  "@google-cloud/secret-manager": "^6.0.1",
56
56
  "@google-cloud/storage": "^7.16.0",
57
57
  "@keycloak/keycloak-admin-client": "^26.3.1",
58
+ "@microsoft/microsoft-graph-client": "^3.0.7",
58
59
  "@sendgrid/client": "^8.1.5",
59
60
  "@sendgrid/mail": "^8.1.5",
60
61
  "amqplib": "^0.10.8",
@@ -7,8 +7,6 @@ export interface Credentials {
7
7
  clientSecret?: string;
8
8
  redirectUri?: string;
9
9
  apiKey?: string;
10
- accessToken?: string;
11
- refreshToken?: string;
12
10
  }
13
11
 
14
12
  export namespace GoogleAuth {
@@ -41,7 +39,10 @@ export namespace GoogleCalendar {
41
39
  export interface Response {
42
40
  events: {
43
41
  title?: string;
42
+ description?: string;
43
+ type?: string;
44
44
  status?: string;
45
+ createdAt?: string | Date;
45
46
  startAt?: string | Date;
46
47
  endAt?: string | Date;
47
48
  organizer?: {
@@ -14,7 +14,7 @@ class GoogleCalendarService implements IGoogleCalendarService {
14
14
  );
15
15
 
16
16
  client.setCredentials({
17
- access_token: credentials.accessToken,
17
+ access_token: data.accessToken,
18
18
  refresh_token: data.refreshToken,
19
19
  });
20
20
 
@@ -25,11 +25,14 @@ class GoogleCalendarService implements IGoogleCalendarService {
25
25
 
26
26
  const events = items.map(item => ({
27
27
  title: item.summary,
28
- status: item.status ?? '',
29
- startAt: item.start?.dateTime ?? '',
30
- endAt: item.end?.dateTime ?? '',
28
+ description: item.description,
29
+ type: item.eventType,
30
+ status: item.status,
31
+ createdAt: item.created,
32
+ startAt: item.start?.dateTime,
33
+ endAt: item.end?.dateTime,
31
34
  organizer: {
32
- name: item.organizer?.displayName ?? '',
35
+ name: item.organizer?.displayName,
33
36
  email: item.organizer?.email,
34
37
  },
35
38
  }));
@@ -37,7 +40,6 @@ class GoogleCalendarService implements IGoogleCalendarService {
37
40
  return {
38
41
  events,
39
42
  };
40
-
41
43
  }
42
44
  }
43
45
 
package/yarn.lock CHANGED
@@ -1463,6 +1463,11 @@
1463
1463
  resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.27.1.tgz#a7054dcc145a967dd4dc8fee845a57c1316c9df8"
1464
1464
  integrity sha512-D2hP9eA+Sqx1kBZgzxZh0y1trbuU+JoDkiEwqhQ36nodYqJwyEIhPSdMNd7lOm/4io72luTPWH20Yda0xOuUow==
1465
1465
 
1466
+ "@babel/runtime@^7.12.5":
1467
+ version "7.28.4"
1468
+ resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.4.tgz#a70226016fabe25c5783b2f22d3e1c9bc5ca3326"
1469
+ integrity sha512-Q/N6JNWvIvPnLDvjlE1OUBLPQHH6l3CltCEsHIujp45zQUSSh8K+gHnaEX45yAT1nyngnINhvWtzN+Nb9D8RAQ==
1470
+
1466
1471
  "@babel/runtime@^7.27.6":
1467
1472
  version "7.28.3"
1468
1473
  resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.28.3.tgz#75c5034b55ba868121668be5d5bb31cc64e6e61a"
@@ -2080,6 +2085,14 @@
2080
2085
  resolved "https://registry.npmjs.org/@microsoft/applicationinsights-web-snippet/-/applicationinsights-web-snippet-1.2.1.tgz#c158081f8c40ea9ad94475abac15f67182768882"
2081
2086
  integrity sha512-+Cy9zFqdQgdAbMK1dpm7B+3DUnrByai0Tq6XG9v737HJpW6G1EiNNbTuFeXdPWyGaq6FIx9jxm/SUcxA6/Rxxg==
2082
2087
 
2088
+ "@microsoft/microsoft-graph-client@^3.0.7":
2089
+ version "3.0.7"
2090
+ resolved "https://registry.yarnpkg.com/@microsoft/microsoft-graph-client/-/microsoft-graph-client-3.0.7.tgz#535507df2db40bd7ed24a670dc68c87c628177a4"
2091
+ integrity sha512-/AazAV/F+HK4LIywF9C+NYHcJo038zEnWkteilcxC1FM/uK/4NVGDKGrxx7nNq1ybspAroRKT4I1FHfxQzxkUw==
2092
+ dependencies:
2093
+ "@babel/runtime" "^7.12.5"
2094
+ tslib "^2.2.0"
2095
+
2083
2096
  "@nodelib/fs.scandir@2.1.5":
2084
2097
  version "2.1.5"
2085
2098
  resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5"