nylas 6.3.1 → 6.3.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/lib/models/calendar-restful-model-collection.js +2 -2
- package/lib/models/draft.d.ts +1 -0
- package/lib/models/model-collection.d.ts +1 -0
- package/lib/models/model-collection.js +3 -0
- package/lib/models/restful-model-collection.d.ts +0 -1
- package/lib/models/scheduler-restful-model-collection.d.ts +1 -0
- package/package.json +1 -1
|
@@ -67,8 +67,8 @@ var CalendarRestfulModelCollection = /** @class */ (function (_super) {
|
|
|
67
67
|
callback(null, json);
|
|
68
68
|
}
|
|
69
69
|
var freeBusy = [];
|
|
70
|
-
for (var _i = 0,
|
|
71
|
-
var fb =
|
|
70
|
+
for (var _i = 0, json_1 = json; _i < json_1.length; _i++) {
|
|
71
|
+
var fb = json_1[_i];
|
|
72
72
|
freeBusy.push(new free_busy_1.default().fromJSON(fb));
|
|
73
73
|
}
|
|
74
74
|
return Promise.resolve(freeBusy);
|
package/lib/models/draft.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export default class ModelCollection<T extends Model> {
|
|
|
5
5
|
connection: NylasConnection;
|
|
6
6
|
modelClass: any;
|
|
7
7
|
_path: string;
|
|
8
|
+
baseUrl?: string;
|
|
8
9
|
constructor(modelClass: any, connection: NylasConnection, path: string);
|
|
9
10
|
forEach(params: Record<string, unknown> | undefined, eachCallback: (item: T) => void, completeCallback?: (err?: Error | null | undefined) => void): void;
|
|
10
11
|
list(params?: Record<string, unknown>, callback?: (error: Error | null, obj?: T[]) => void): Promise<T[]>;
|
|
@@ -157,6 +157,7 @@ var ModelCollection = /** @class */ (function () {
|
|
|
157
157
|
method: 'GET',
|
|
158
158
|
path: path,
|
|
159
159
|
qs: __assign(__assign({}, params), { offset: offset, limit: limit }),
|
|
160
|
+
baseUrl: this.baseUrl,
|
|
160
161
|
});
|
|
161
162
|
}
|
|
162
163
|
return this.getModelCollection(params, offset, limit, path);
|
|
@@ -172,6 +173,7 @@ var ModelCollection = /** @class */ (function () {
|
|
|
172
173
|
method: 'GET',
|
|
173
174
|
path: this.path() + "/" + id,
|
|
174
175
|
qs: params,
|
|
176
|
+
baseUrl: this.baseUrl,
|
|
175
177
|
})
|
|
176
178
|
.then(function (json) {
|
|
177
179
|
var model = _this.createModel(json);
|
|
@@ -185,6 +187,7 @@ var ModelCollection = /** @class */ (function () {
|
|
|
185
187
|
method: 'GET',
|
|
186
188
|
path: path,
|
|
187
189
|
qs: __assign(__assign({}, params), { offset: offset, limit: limit }),
|
|
190
|
+
baseUrl: this.baseUrl,
|
|
188
191
|
})
|
|
189
192
|
.then(function (jsonArray) {
|
|
190
193
|
var models = jsonArray.map(function (json) {
|
|
@@ -4,7 +4,6 @@ import ModelCollection from './model-collection';
|
|
|
4
4
|
export declare type GetCallback = (error: Error | null, result?: RestfulModel) => void;
|
|
5
5
|
export default class RestfulModelCollection<T extends RestfulModel> extends ModelCollection<any> {
|
|
6
6
|
modelClass: typeof RestfulModel;
|
|
7
|
-
baseUrl?: string;
|
|
8
7
|
constructor(modelClass: typeof RestfulModel, connection: NylasConnection);
|
|
9
8
|
count(params?: Record<string, unknown>, callback?: (err: Error | null, num?: number) => void): Promise<number>;
|
|
10
9
|
first(params?: Record<string, unknown>, callback?: (error: Error | null, model?: T) => void): Promise<T>;
|
|
@@ -14,6 +14,7 @@ export declare type ProviderAvailability = {
|
|
|
14
14
|
export default class SchedulerRestfulModelCollection extends RestfulModelCollection<Scheduler> {
|
|
15
15
|
connection: NylasConnection;
|
|
16
16
|
modelClass: typeof Scheduler;
|
|
17
|
+
baseUrl: string;
|
|
17
18
|
constructor(connection: NylasConnection);
|
|
18
19
|
getGoogleAvailability(): Promise<ProviderAvailability>;
|
|
19
20
|
getOffice365Availability(): Promise<ProviderAvailability>;
|