@pallasoft/ps-mail 1.3.0 → 1.4.1
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.
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GraphMailBodyType, GraphMailErrorReason, GraphMailFolder, GraphMailLifecycleEvent, } from './constants';
|
|
2
|
-
export { GraphMailErrorService, GraphMailService } from './services';
|
|
2
|
+
export { GraphMailErrorService, GraphMailService, GraphTokenService } from './services';
|
|
3
3
|
export type { GraphCredentials, GraphMailBodyData, GraphMailConnection, GraphMailDeltaData, GraphMailDeltaOptions, GraphMailDeltaPageData, GraphMailDraftData, GraphMailErrorData, GraphMailFileData, GraphMailHeaderData, GraphMailLocatedData, GraphMailMessageData, GraphMailNotificationData, GraphMailNotificationPayloadData, GraphMailRecipientData, GraphMailRemovedData, GraphMailReplyData, GraphMailSubscriptionData, GraphMailSubscriptionOptions, GraphMailUploadSessionData, } from './models';
|
package/dist/microsoft/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GraphMailService = exports.GraphMailErrorService = exports.GraphMailLifecycleEvent = exports.GraphMailFolder = exports.GraphMailErrorReason = exports.GraphMailBodyType = void 0;
|
|
3
|
+
exports.GraphTokenService = exports.GraphMailService = exports.GraphMailErrorService = exports.GraphMailLifecycleEvent = exports.GraphMailFolder = exports.GraphMailErrorReason = exports.GraphMailBodyType = void 0;
|
|
4
4
|
var constants_1 = require("./constants");
|
|
5
5
|
Object.defineProperty(exports, "GraphMailBodyType", { enumerable: true, get: function () { return constants_1.GraphMailBodyType; } });
|
|
6
6
|
Object.defineProperty(exports, "GraphMailErrorReason", { enumerable: true, get: function () { return constants_1.GraphMailErrorReason; } });
|
|
@@ -9,3 +9,4 @@ Object.defineProperty(exports, "GraphMailLifecycleEvent", { enumerable: true, ge
|
|
|
9
9
|
var services_1 = require("./services");
|
|
10
10
|
Object.defineProperty(exports, "GraphMailErrorService", { enumerable: true, get: function () { return services_1.GraphMailErrorService; } });
|
|
11
11
|
Object.defineProperty(exports, "GraphMailService", { enumerable: true, get: function () { return services_1.GraphMailService; } });
|
|
12
|
+
Object.defineProperty(exports, "GraphTokenService", { enumerable: true, get: function () { return services_1.GraphTokenService; } });
|
|
@@ -96,22 +96,21 @@ var GraphRequestService = /** @class */ (function () {
|
|
|
96
96
|
return [4 /*yield*/, this._attempt(credentials, request, url, body)];
|
|
97
97
|
case 2:
|
|
98
98
|
outcome = _b.sent();
|
|
99
|
-
if (outcome
|
|
99
|
+
if (!graph_mail_error_service_1.GraphMailErrorService.isGraphMailError(outcome) && outcome.ok)
|
|
100
100
|
return [2 /*return*/, outcome];
|
|
101
|
-
if (outcome
|
|
101
|
+
if (!graph_mail_error_service_1.GraphMailErrorService.isGraphMailError(outcome) &&
|
|
102
102
|
outcome.status === Attributes.Common.Response.ErrorCodes.Unauthorized &&
|
|
103
103
|
!refreshed) {
|
|
104
104
|
refreshed = true;
|
|
105
105
|
graph_token_service_1.GraphTokenService.clear(credentials);
|
|
106
106
|
return [3 /*break*/, 1];
|
|
107
107
|
}
|
|
108
|
-
if (!(outcome
|
|
109
|
-
|
|
110
|
-
case 3:
|
|
111
|
-
_a = _b.sent();
|
|
108
|
+
if (!graph_mail_error_service_1.GraphMailErrorService.isGraphMailError(outcome)) return [3 /*break*/, 3];
|
|
109
|
+
_a = outcome;
|
|
112
110
|
return [3 /*break*/, 5];
|
|
111
|
+
case 3: return [4 /*yield*/, graph_mail_error_service_1.GraphMailErrorService.fromResponse(outcome)];
|
|
113
112
|
case 4:
|
|
114
|
-
_a =
|
|
113
|
+
_a = _b.sent();
|
|
115
114
|
_b.label = 5;
|
|
116
115
|
case 5:
|
|
117
116
|
error = _a;
|