@digipair/skill-microsoft 0.48.1 → 0.49.0

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 (3) hide show
  1. package/index.cjs.js +20 -13
  2. package/index.esm.js +20 -13
  3. package/package.json +1 -1
package/index.cjs.js CHANGED
@@ -24953,9 +24953,10 @@ let MicrosoftService = class MicrosoftService {
24953
24953
  throw error;
24954
24954
  }
24955
24955
  }
24956
- async call(url, method, version, data = null, headers = {}) {
24956
+ async call(url, method, version, data, headers, signal) {
24957
24957
  const accessToken = await this.getAccessToken();
24958
24958
  const response = await fetch(`${API_ENDPOINT}/${version}/${url}`, {
24959
+ signal,
24959
24960
  method,
24960
24961
  headers: _extends({
24961
24962
  Authorization: `Bearer ${accessToken}`,
@@ -24967,29 +24968,35 @@ let MicrosoftService = class MicrosoftService {
24967
24968
  if (!response.ok) throw new Error('[SKILL-MICROSOFT] REQUEST FAILED: ' + response.status);
24968
24969
  return !response.headers.has('content-length') || response.headers.get('content-length') > 0 ? await response.json() : {};
24969
24970
  }
24970
- async create(params, _pinsSettingsList, _context) {
24971
+ async create(params, _pinsSettingsList, context) {
24972
+ var _context_protected;
24971
24973
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24972
- return await this.call(path, 'POST', version, body, headers);
24974
+ return await this.call(path, 'POST', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24973
24975
  }
24974
- async read(params, _pinsSettingsList, _context) {
24976
+ async read(params, _pinsSettingsList, context) {
24977
+ var _context_protected;
24975
24978
  const { path, version = 'v1.0', headers = {} } = params;
24976
- return await this.call(path, 'GET', version, null, headers);
24979
+ return await this.call(path, 'GET', version, null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24977
24980
  }
24978
- async update(params, _pinsSettingsList, _context) {
24981
+ async update(params, _pinsSettingsList, context) {
24982
+ var _context_protected;
24979
24983
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24980
- return await this.call(path, 'PUT', version, body, headers);
24984
+ return await this.call(path, 'PUT', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24981
24985
  }
24982
- async partialUpdate(params, _pinsSettingsList, _context) {
24986
+ async partialUpdate(params, _pinsSettingsList, context) {
24987
+ var _context_protected;
24983
24988
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24984
- return await this.call(path, 'PATCH', version, body, headers);
24989
+ return await this.call(path, 'PATCH', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24985
24990
  }
24986
- async remove(params, _pinsSettingsList, _context) {
24991
+ async remove(params, _pinsSettingsList, context) {
24992
+ var _context_protected;
24987
24993
  const { path, version = 'v1.0', headers = {} } = params;
24988
- return await this.call(path, 'DELETE', version, null, headers);
24994
+ return await this.call(path, 'DELETE', version, null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24989
24995
  }
24990
- async request(params, _pinsSettingsList, _context) {
24996
+ async request(params, _pinsSettingsList, context) {
24997
+ var _context_protected;
24991
24998
  const { path, method = 'GET', body = null, version = 'v1.0', headers = {} } = params;
24992
- return await this.call(path, method, version, body, headers);
24999
+ return await this.call(path, method, version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24993
25000
  }
24994
25001
  constructor(context, params){
24995
25002
  var _context_privates_MICROSOFT_OAUTH_CLIENT_ID, _ref;
package/index.esm.js CHANGED
@@ -24940,9 +24940,10 @@ let MicrosoftService = class MicrosoftService {
24940
24940
  throw error;
24941
24941
  }
24942
24942
  }
24943
- async call(url, method, version, data = null, headers = {}) {
24943
+ async call(url, method, version, data, headers, signal) {
24944
24944
  const accessToken = await this.getAccessToken();
24945
24945
  const response = await fetch(`${API_ENDPOINT}/${version}/${url}`, {
24946
+ signal,
24946
24947
  method,
24947
24948
  headers: _extends({
24948
24949
  Authorization: `Bearer ${accessToken}`,
@@ -24954,29 +24955,35 @@ let MicrosoftService = class MicrosoftService {
24954
24955
  if (!response.ok) throw new Error('[SKILL-MICROSOFT] REQUEST FAILED: ' + response.status);
24955
24956
  return !response.headers.has('content-length') || response.headers.get('content-length') > 0 ? await response.json() : {};
24956
24957
  }
24957
- async create(params, _pinsSettingsList, _context) {
24958
+ async create(params, _pinsSettingsList, context) {
24959
+ var _context_protected;
24958
24960
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24959
- return await this.call(path, 'POST', version, body, headers);
24961
+ return await this.call(path, 'POST', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24960
24962
  }
24961
- async read(params, _pinsSettingsList, _context) {
24963
+ async read(params, _pinsSettingsList, context) {
24964
+ var _context_protected;
24962
24965
  const { path, version = 'v1.0', headers = {} } = params;
24963
- return await this.call(path, 'GET', version, null, headers);
24966
+ return await this.call(path, 'GET', version, null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24964
24967
  }
24965
- async update(params, _pinsSettingsList, _context) {
24968
+ async update(params, _pinsSettingsList, context) {
24969
+ var _context_protected;
24966
24970
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24967
- return await this.call(path, 'PUT', version, body, headers);
24971
+ return await this.call(path, 'PUT', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24968
24972
  }
24969
- async partialUpdate(params, _pinsSettingsList, _context) {
24973
+ async partialUpdate(params, _pinsSettingsList, context) {
24974
+ var _context_protected;
24970
24975
  const { path, body = {}, version = 'v1.0', headers = {} } = params;
24971
- return await this.call(path, 'PATCH', version, body, headers);
24976
+ return await this.call(path, 'PATCH', version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24972
24977
  }
24973
- async remove(params, _pinsSettingsList, _context) {
24978
+ async remove(params, _pinsSettingsList, context) {
24979
+ var _context_protected;
24974
24980
  const { path, version = 'v1.0', headers = {} } = params;
24975
- return await this.call(path, 'DELETE', version, null, headers);
24981
+ return await this.call(path, 'DELETE', version, null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24976
24982
  }
24977
- async request(params, _pinsSettingsList, _context) {
24983
+ async request(params, _pinsSettingsList, context) {
24984
+ var _context_protected;
24978
24985
  const { path, method = 'GET', body = null, version = 'v1.0', headers = {} } = params;
24979
- return await this.call(path, method, version, body, headers);
24986
+ return await this.call(path, method, version, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
24980
24987
  }
24981
24988
  constructor(context, params){
24982
24989
  var _context_privates_MICROSOFT_OAUTH_CLIENT_ID, _ref;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-microsoft",
3
- "version": "0.48.1",
3
+ "version": "0.49.0",
4
4
  "dependencies": {},
5
5
  "main": "./index.cjs.js",
6
6
  "module": "./index.esm.js"