totalum-api-sdk 1.0.9 → 1.0.10

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.
Files changed (2) hide show
  1. package/index.js +34 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -37,6 +37,12 @@ const endpoints = {
37
37
  pdfTemplate: {
38
38
  generatePdfByTemplate: 'api/v1/pdf-template/generatePdfByTemplate/:id'
39
39
  },
40
+ googleIntegration: {
41
+ getEmails: 'api/v1/google-integration/get-emails',
42
+ sendEmail: 'api/v1/google-integration/send-email',
43
+ getCalendarEvents: 'api/v1/google-integration/get-calendar-events',
44
+ createCalendarEvent: 'api/v1/google-integration/create-calendar-event',
45
+ }
40
46
  };
41
47
  class TotalumApiSdk {
42
48
  constructor(authOptions) {
@@ -119,6 +125,34 @@ class TotalumApiSdk {
119
125
  return axios_1.default.post(url, body, { params: params, headers: this.headers });
120
126
  });
121
127
  }
128
+ getGoogleAccountEmails(accountEmail) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ const url = this.getUrl(endpoints.googleIntegration.getEmails, {});
131
+ const params = { userEmail: accountEmail };
132
+ return axios_1.default.get(url, { params: params, headers: this.headers });
133
+ });
134
+ }
135
+ googleAccountSendEmail(accountEmail, body) {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ const url = this.getUrl(endpoints.googleIntegration.sendEmail, {});
138
+ const params = { userEmail: accountEmail };
139
+ return axios_1.default.post(url, body, { params: params, headers: this.headers });
140
+ });
141
+ }
142
+ getGoogleCalendarEvents(accountEmail) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const url = this.getUrl(endpoints.googleIntegration.getCalendarEvents, {});
145
+ const params = { userEmail: accountEmail };
146
+ return axios_1.default.get(url, { params: params, headers: this.headers });
147
+ });
148
+ }
149
+ createCalendarEvent(accountEmail, body) {
150
+ return __awaiter(this, void 0, void 0, function* () {
151
+ const url = this.getUrl(endpoints.googleIntegration.createCalendarEvent, {});
152
+ const params = { userEmail: accountEmail };
153
+ return axios_1.default.post(url, body, { params: params, headers: this.headers });
154
+ });
155
+ }
122
156
  lookUpFilter(idPage, query, idsOfMultipleNodesToSearch, returnCount) {
123
157
  return __awaiter(this, void 0, void 0, function* () {
124
158
  const url = this.getUrl(endpoints.filter.lookUpFilter, { idPage });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "totalum-api-sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Totalum sdk wraper of totalum api",
5
5
  "main": "index.js",
6
6
  "scripts": {