Skip to content

Commit

Permalink
Merge branch 'main' into SS-769-node-scheduler-sdk-support
Browse files Browse the repository at this point in the history
  • Loading branch information
SubashPradhan authored Oct 31, 2024
2 parents 812777d + 0d1402c commit 707e91f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 19 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

### 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
* Add buffer support for file attachments
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 0 additions & 1 deletion src/apiClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 6 additions & 2 deletions src/models/events.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -284,6 +284,10 @@ export interface ListEventQueryParams extends ListQueryParams {
* Not supported for virtual calendars.
*/
attendees?: string[];
/**
* Master event id if recurring events.
*/
masterEventId?: string;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -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';
13 changes: 1 addition & 12 deletions tests/apiClient.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ describe('APIClient', () => {
timeout: 30,
headers: {
'X-SDK-Test-Header': 'This is a test',
'Accept-Encoding': 'gzip',
},
});

Expand All @@ -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',
});
});
});
Expand All @@ -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' },
Expand All @@ -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',
});
Expand All @@ -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'));
Expand Down Expand Up @@ -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'],
Expand Down

0 comments on commit 707e91f

Please sign in to comment.