Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/ocsdk

Package Overview
Dependencies
Maintainers
5
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/ocsdk - npm Package Compare versions

Comparing version 0.3.4-main.097f56a to 0.3.4-main.2ef485a

lib/Utils/setAuthCodeNonce.d.ts

2

CHANGELOG.md

@@ -9,2 +9,4 @@ # Changelog

- Stop retry when the error is related to out of office hours.
- Send and receive `AuthCodeNonce` header in order to be compliant with Omnichannel's OAuth 2.0 requirement
- Increasing request timeout and add error handling for OAuth 2.0

@@ -11,0 +13,0 @@ ## [0.3.3] - 2023-01-09

@@ -7,2 +7,3 @@ export default class OmnichannelHTTPHeaders {

static readonly requestId = "Request-Id";
static readonly authCodeNonce = "AuthCodeNonce";
}

3

lib/Common/OmnichannelHTTPHeaders.js

@@ -24,2 +24,3 @@ "use strict";

(0, _defineProperty2["default"])(OmnichannelHTTPHeaders, "requestId", "Request-Id");
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vT21uaWNoYW5uZWxIVFRQSGVhZGVycy50cyJdLCJuYW1lcyI6WyJPbW5pY2hhbm5lbEhUVFBIZWFkZXJzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0lBQXFCQSxzQjs7Ozs7aUNBQUFBLHNCO2lDQUFBQSxzQjtpQ0FBQUEsc0I7aUNBQUFBLHNCO2lDQUFBQSxzQiIsInNvdXJjZVJvb3QiOiJvY3NkazovLy8iLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZGVmYXVsdCBjbGFzcyBPbW5pY2hhbm5lbEhUVFBIZWFkZXJzIHtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBhdXRoZW50aWNhdGVkVXNlclRva2VuID0gYEF1dGhlbnRpY2F0ZWRVc2VyVG9rZW5gO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IGF1dGhvcml6YXRpb24gPSBgQXV0aG9yaXphdGlvbmA7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgb3JnYW5pemF0aW9uSWQgPSBgT3JnYW5pemF0aW9uSWRgO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IHdpZGdldEFwcElkID0gYHdpZGdldEFwcElkYDtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSByZXF1ZXN0SWQgPSBgUmVxdWVzdC1JZGA7XG59XG4iXX0=
(0, _defineProperty2["default"])(OmnichannelHTTPHeaders, "authCodeNonce", "AuthCodeNonce");
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9Db21tb24vT21uaWNoYW5uZWxIVFRQSGVhZGVycy50cyJdLCJuYW1lcyI6WyJPbW5pY2hhbm5lbEhUVFBIZWFkZXJzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7O0lBQXFCQSxzQjs7Ozs7aUNBQUFBLHNCO2lDQUFBQSxzQjtpQ0FBQUEsc0I7aUNBQUFBLHNCO2lDQUFBQSxzQjtpQ0FBQUEsc0IiLCJzb3VyY2VSb290Ijoib2NzZGs6Ly8vIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGRlZmF1bHQgY2xhc3MgT21uaWNoYW5uZWxIVFRQSGVhZGVycyB7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgYXV0aGVudGljYXRlZFVzZXJUb2tlbiA9IGBBdXRoZW50aWNhdGVkVXNlclRva2VuYDtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSBhdXRob3JpemF0aW9uID0gYEF1dGhvcml6YXRpb25gO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IG9yZ2FuaXphdGlvbklkID0gYE9yZ2FuaXphdGlvbklkYDtcbiAgcHVibGljIHN0YXRpYyByZWFkb25seSB3aWRnZXRBcHBJZCA9IGB3aWRnZXRBcHBJZGA7XG4gIHB1YmxpYyBzdGF0aWMgcmVhZG9ubHkgcmVxdWVzdElkID0gYFJlcXVlc3QtSWRgO1xuICBwdWJsaWMgc3RhdGljIHJlYWRvbmx5IGF1dGhDb2RlTm9uY2UgPSBgQXV0aENvZGVOb25jZWA7XG59XG4iXX0=

@@ -15,2 +15,6 @@ export default interface IAxiosRetryOptions {

shouldRetry?(response?: any, axiosRetryOptions?: IAxiosRetryOptions): boolean;
/**
* Overwrite request headers on demand based on response headers of the same name
*/
headerOverwrites?: string[];
}

@@ -28,2 +28,6 @@ import { RequestTimeoutConfig } from "../Common/RequestTimeoutConfig";

requestTimeoutConfig: RequestTimeoutConfig;
/**
* Nonce for Auth V2 requests
*/
authCodeNonce: string;
}

@@ -143,2 +143,3 @@ import FetchChatTokenResponse from "./Model/FetchChatTokenResponse";

private logWithLogger;
private setAuthCodeNonce;
}

@@ -14,2 +14,8 @@ "use strict";

function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
/**

@@ -30,3 +36,4 @@ * Custom handler for HTTP calls with Axios. Handler allows to retry HTTP calls if failed.

var retries = axiosRetryOptions.retries;
var retries = axiosRetryOptions.retries,
headerOverwrites = axiosRetryOptions.headerOverwrites;
var currentTry = 1; // Executed as soon as after 1st try

@@ -66,2 +73,24 @@ // Method to intercepts responses within range of 2xx

currentTry++;
if (headerOverwrites && response !== null && response !== void 0 && response.headers) {
var _iterator = _createForOfIteratorHelper(headerOverwrites),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var headerName = _step.value;
var responseHeader = response === null || response === void 0 ? void 0 : response.headers[headerName.toLocaleLowerCase()];
if (responseHeader) {
// eslint-disable-next-line security/detect-object-injection
config.headers[headerName] = responseHeader;
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
}
return new Promise(function (resolve) {

@@ -82,2 +111,2 @@ return (0, _sleep["default"])(retryInterval).then(function () {

exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9VdGlscy9heGlvc1JldHJ5LnRzIl0sIm5hbWVzIjpbImF4aW9zUmV0cnkiLCJheGlvcyIsImF4aW9zUmV0cnlPcHRpb25zIiwicmV0cnlJbnRlcnZhbCIsInJldHJ5T240MjkiLCJ1bmRlZmluZWQiLCJyZXRyaWVzIiwiY3VycmVudFRyeSIsIm9uU3VjY2VzcyIsInNob3VsZFJldHJ5IiwicmVzcG9uc2UiLCJzdGF0dXMiLCJDb25zdGFudHMiLCJ0b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WRpc2FibGUtbmV4dC1saW5lIHNlY3VyaXR5L2RldGVjdC1vYmplY3QtaW5qZWN0aW9uXG4gICAgICAgICAgICBjb25maWcuaGVhZGVyc1toZWFkZXJOYW1lXSA9IHJlc3BvbnNlSGVhZGVyO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICByZXR1cm4gbmV3IFByb21pc2UoKHJlc29sdmUpID0+IHNsZWVwKHJldHJ5SW50ZXJ2YWwgYXMgbnVtYmVyIHwgMTAwMCkudGhlbigoKSA9PiByZXNvbHZlKGF4aW9zKGNvbmZpZykpKSk7XG4gICAgfVxuICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnJvcik7XG4gIH07XG5cbiAgYXhpb3MuaW50ZXJjZXB0b3JzLnJlc3BvbnNlLnVzZShvblN1Y2Nlc3MsIG9uRXJyb3IpOyAvLyBJbnRlcmNlcHQgcmVzcG9uc2UgYmVmb3JlIHJldHVybmluZ1xufTtcbmV4cG9ydCBkZWZhdWx0IGF4aW9zUmV0cnk7Il19
{
"name": "@microsoft/ocsdk",
"version": "0.3.4-main.097f56a",
"version": "0.3.4-main.2ef485a",
"description": "Microsoft Omnichannel SDK",

@@ -5,0 +5,0 @@ "files": [

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc