From 09ce3a588fbd3f5dd1dff5ff4ef066ce58c2e7ad Mon Sep 17 00:00:00 2001 From: Subash Pradhan Date: Fri, 25 Oct 2024 15:25:19 +0200 Subject: [PATCH 1/3] Add support for masterEventId on Event class (#592) * Add support for masterEventID on Events * Add details to changelog * Fix lint --------- Co-authored-by: Subash Pradhan --- CHANGELOG.md | 3 +++ src/models/events.ts | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcfe02c..de014b7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +### Unreleased +* Add support for filtering events by masterEventID + ### 7.6.0 / 2024-10-18 * Add support for filtering events by attendee email * Add buffer support for file attachments diff --git a/src/models/events.ts b/src/models/events.ts index bb8aad3c..439c9779 100644 --- a/src/models/events.ts +++ b/src/models/events.ts @@ -1,7 +1,7 @@ -import { ListQueryParams } from './listQueryParams.js'; import { Subset } from '../utils.js'; -import { NylasBaseResponse } from './response.js'; import { NylasApiErrorResponseData } from './error.js'; +import { ListQueryParams } from './listQueryParams.js'; +import { NylasBaseResponse } from './response.js'; /** * Interface representing a Nylas Event object. @@ -284,6 +284,10 @@ export interface ListEventQueryParams extends ListQueryParams { * Not supported for virtual calendars. */ attendees?: string[]; + /** + * Master event id if recurring events. + */ + masterEventId?: string; } /** From 5ef4b139530cd6bc1407660d46c8ec9669c261e9 Mon Sep 17 00:00:00 2001 From: Subash Pradhan Date: Wed, 30 Oct 2024 15:38:51 +0100 Subject: [PATCH 2/3] v7.6.1 release (#593) * Update changelog.md * 7.6.1 --------- Co-authored-by: Subash Pradhan --- CHANGELOG.md | 3 ++- package-lock.json | 4 ++-- package.json | 2 +- src/version.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de014b7c..eb90870b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog -### Unreleased +### 7.6.1 / 2024-10-30 * Add support for filtering events by masterEventID +* Add support for gzip compression ### 7.6.0 / 2024-10-18 * Add support for filtering events by attendee email diff --git a/package-lock.json b/package-lock.json index 4203f51b..78ce4021 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nylas", - "version": "7.6.0", + "version": "7.6.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nylas", - "version": "7.6.0", + "version": "7.6.1", "license": "MIT", "dependencies": { "change-case": "^4.1.2", diff --git a/package.json b/package.json index fffe5253..7abb47f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nylas", - "version": "7.6.0", + "version": "7.6.1", "description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.", "main": "lib/cjs/nylas.js", "types": "lib/types/nylas.d.ts", diff --git a/src/version.ts b/src/version.ts index 1a5842a9..f4f8815c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // This file is generated by scripts/exportVersion.js -export const SDK_VERSION = '7.6.0'; +export const SDK_VERSION = '7.6.1'; From 0d1402ca0a5d4ca38c46abd94a7756713d36f439 Mon Sep 17 00:00:00 2001 From: Subash Pradhan Date: Wed, 30 Oct 2024 17:54:48 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"Adding=20gzip=20headers=20to=20re?= =?UTF-8?q?duce=20payload=20sizes=20and=20enable=20compression=20(#?= =?UTF-8?q?=E2=80=A6"=20(#594)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 214cb589c964165272fc0b12bd8c49dc98791324. --- src/apiClient.ts | 1 - tests/apiClient.spec.ts | 13 +------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/apiClient.ts b/src/apiClient.ts index e07d56cc..408c14d1 100644 --- a/src/apiClient.ts +++ b/src/apiClient.ts @@ -207,7 +207,6 @@ export default class APIClient { objKeysToSnakeCase(optionParams.body, ['metadata']) // metadata should remain as is ); requestOptions.headers['Content-Type'] = 'application/json'; - requestOptions.headers['Accept-Encoding'] = 'gzip'; } if (optionParams.form) { diff --git a/tests/apiClient.spec.ts b/tests/apiClient.spec.ts index b2756365..b2f6b478 100644 --- a/tests/apiClient.spec.ts +++ b/tests/apiClient.spec.ts @@ -20,7 +20,6 @@ describe('APIClient', () => { timeout: 30, headers: { 'X-SDK-Test-Header': 'This is a test', - 'Accept-Encoding': 'gzip', }, }); @@ -29,7 +28,6 @@ describe('APIClient', () => { expect(client.timeout).toBe(30000); expect(client.headers).toEqual({ 'X-SDK-Test-Header': 'This is a test', - 'Accept-Encoding': 'gzip', }); }); }); @@ -51,10 +49,7 @@ describe('APIClient', () => { const options = client.requestOptions({ path: '/test', method: 'GET', - headers: { - 'X-SDK-Test-Header': 'This is a test', - 'Accept-Encoding': 'gzip', - }, + headers: { 'X-SDK-Test-Header': 'This is a test' }, queryParams: { param: 'value' }, body: { id: 'abc123' }, overrides: { apiUri: 'https://test.api.nylas.com' }, @@ -65,7 +60,6 @@ describe('APIClient', () => { Accept: 'application/json', Authorization: 'Bearer testApiKey', 'Content-Type': 'application/json', - 'Accept-Encoding': 'gzip', 'User-Agent': `Nylas Node SDK v${SDK_VERSION}`, 'X-SDK-Test-Header': 'This is a test', }); @@ -79,16 +73,12 @@ describe('APIClient', () => { const options = client.requestOptions({ path: '/test', method: 'POST', - headers: { - 'Accept-Encoding': 'gzip', - }, }); expect(options.method).toBe('POST'); expect(options.headers).toEqual({ Accept: 'application/json', Authorization: 'Bearer testApiKey', - 'Accept-Encoding': 'gzip', 'User-Agent': `Nylas Node SDK v${SDK_VERSION}`, }); expect(options.url).toEqual(new URL('https://api.us.nylas.com/test')); @@ -177,7 +167,6 @@ describe('APIClient', () => { Accept: ['application/json'], Authorization: ['Bearer testApiKey'], 'Content-Type': ['application/json'], - 'Accept-Encoding': ['gzip'], 'User-Agent': [`Nylas Node SDK v${SDK_VERSION}`], 'X-SDK-Test-Header': ['This is a test'], 'global-header': ['global-value'],