@eway-crm/connector 1.0.106 → 1.0.108

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.
@@ -9,18 +9,18 @@ var AnonymousSessionHandler_1 = require("./AnonymousSessionHandler");
9
9
  var ApiMethods_1 = require("./ApiMethods");
10
10
  var OAuthSessionHandler_1 = require("./OAuthSessionHandler");
11
11
  var HttpRequestError_1 = require("./exceptions/HttpRequestError");
12
- var base64url_1 = require("base64url");
12
+ var base64url = require("universal-base64url");
13
13
  var ErrorHelper_1 = require("./helpers/ErrorHelper");
14
14
  var ApiConnection = /** @class */ (function () {
15
15
  function ApiConnection(apiServiceUri, sessionHandler, errorCallback, supportGetItemPreviewMethod) {
16
16
  var _this = this;
17
17
  this.createOpenLink = function (folderName, guid, fileAs) {
18
- var ws = base64url_1.default.encode(_this.baseUri);
18
+ var ws = base64url.encode(_this.baseUri);
19
19
  var legacyLink = "eway://" + folderName;
20
20
  if (guid) {
21
21
  legacyLink += "/" + (guid === null || guid === void 0 ? void 0 : guid.toLowerCase());
22
22
  }
23
- legacyLink = base64url_1.default.encode(legacyLink);
23
+ legacyLink = base64url.encode(legacyLink);
24
24
  var url = "https://open.eway-crm.com/?ws=" + ws + "&l=" + legacyLink;
25
25
  if (fileAs) {
26
26
  url += "&n=" + encodeURIComponent(fileAs);
@@ -0,0 +1,4 @@
1
+ export interface IApiResult {
2
+ ReturnCode: string;
3
+ Description: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export default class EnumTypes {
2
+ static readonly bonusType = "BonusType";
2
3
  static readonly busyStatus = "BusyStatus";
3
4
  static readonly cartType = "CartType";
4
5
  static readonly companyType = "CompanyType";
@@ -8,6 +9,7 @@ export default class EnumTypes {
8
9
  static readonly documentOfflineState = "DocumentOfflineState";
9
10
  static readonly documentType = "DocumentType";
10
11
  static readonly emailOfflineState = "EmailOfflineState";
12
+ static readonly emailType = "EmailType";
11
13
  static readonly globalSettingsCategory = "GlobalSettingsCategory";
12
14
  static readonly goalType = "GoalType";
13
15
  static readonly journalType = "JournalType";
@@ -19,8 +21,11 @@ export default class EnumTypes {
19
21
  static readonly productType = "ProductType";
20
22
  static readonly projectType = "ProjectType";
21
23
  static readonly salaryType = "SalaryType";
24
+ static readonly salePriceType = "SalePriceType";
22
25
  static readonly suffixType = "SuffixType";
23
26
  static readonly taskType = "TaskType";
27
+ static readonly trainingTitle = "TrainingTitle";
28
+ static readonly userType = "UserType";
24
29
  static readonly usStatesDistrictsTerritories = "USStatesDistrictsTerritories";
25
30
  static readonly vacationType = "VacationType";
26
31
  static readonly workReportType = "WorkReportType";
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  var EnumTypes = /** @class */ (function () {
4
4
  function EnumTypes() {
5
5
  }
6
+ EnumTypes.bonusType = 'BonusType';
6
7
  EnumTypes.busyStatus = 'BusyStatus';
7
8
  EnumTypes.cartType = 'CartType';
8
9
  EnumTypes.companyType = 'CompanyType';
@@ -12,6 +13,7 @@ var EnumTypes = /** @class */ (function () {
12
13
  EnumTypes.documentOfflineState = 'DocumentOfflineState';
13
14
  EnumTypes.documentType = 'DocumentType';
14
15
  EnumTypes.emailOfflineState = 'EmailOfflineState';
16
+ EnumTypes.emailType = 'EmailType';
15
17
  EnumTypes.globalSettingsCategory = 'GlobalSettingsCategory';
16
18
  EnumTypes.goalType = 'GoalType';
17
19
  EnumTypes.journalType = 'JournalType';
@@ -23,8 +25,11 @@ var EnumTypes = /** @class */ (function () {
23
25
  EnumTypes.productType = 'ProductType';
24
26
  EnumTypes.projectType = 'ProjectType';
25
27
  EnumTypes.salaryType = 'SalaryType';
28
+ EnumTypes.salePriceType = 'SalePriceType';
26
29
  EnumTypes.suffixType = 'SuffixType';
27
30
  EnumTypes.taskType = 'TaskType';
31
+ EnumTypes.trainingTitle = 'TrainingTitle';
32
+ EnumTypes.userType = 'UserType';
28
33
  EnumTypes.usStatesDistrictsTerritories = 'USStatesDistrictsTerritories';
29
34
  EnumTypes.vacationType = 'VacationType';
30
35
  EnumTypes.workReportType = 'WorkReportType';
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OAuthHelper = void 0;
4
4
  var axios_1 = require("axios");
5
- var base64url_1 = require("base64url");
5
+ var base64url = require("universal-base64url");
6
6
  var jwt_decode_1 = require("jwt-decode");
7
7
  var OAuthHelper = /** @class */ (function () {
8
8
  function OAuthHelper() {
@@ -30,7 +30,7 @@ var OAuthHelper = /** @class */ (function () {
30
30
  if (parts.length !== 2) {
31
31
  throw new Error('Invalid token supplied');
32
32
  }
33
- return base64url_1.default.decode(parts[1]);
33
+ return base64url.decode(parts[1]);
34
34
  };
35
35
  OAuthHelper.getUserName = function (accessToken) {
36
36
  var parts = (0, jwt_decode_1.default)(accessToken);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eway-crm/connector",
3
- "version": "1.0.106",
3
+ "version": "1.0.108",
4
4
  "description": "eWay-CRM API JavaScript connector library.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -48,8 +48,8 @@
48
48
  ],
49
49
  "dependencies": {
50
50
  "axios": "^0.27.2",
51
- "base64url": "^3.0.1",
52
51
  "es6-promise": "^4.2.8",
53
- "jwt-decode": "^3.1.2"
52
+ "jwt-decode": "^3.1.2",
53
+ "universal-base64url": "^1.1.0"
54
54
  }
55
- }
55
+ }