@chevre/factory 7.0.0-alpha.1 → 7.0.0-alpha.3
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/account/action/moneyTransfer.d.ts +6 -6
- package/lib/account/transaction.d.ts +3 -4
- package/lib/account.js +5 -5
- package/lib/action/accept/coaOffer.d.ts +5 -5
- package/lib/action/accept/pay.d.ts +4 -4
- package/lib/action/accept.d.ts +3 -3
- package/lib/action/authorize/invoice.d.ts +6 -6
- package/lib/action/authorize/offer/any.d.ts +3 -3
- package/lib/action/authorize/offer/eventService.d.ts +4 -4
- package/lib/action/authorize/offer/eventService.js +1 -1
- package/lib/action/authorize/offer/product.d.ts +4 -4
- package/lib/action/authorize/offer/product.js +1 -1
- package/lib/action/authorize/paymentMethod/any.d.ts +6 -6
- package/lib/action/authorize/ticketedObject.d.ts +4 -4
- package/lib/action/authorize.d.ts +4 -4
- package/lib/action/cancel/coaReserve.d.ts +4 -4
- package/lib/action/cancel/reservation.d.ts +4 -4
- package/lib/action/check/paymentMethod/movieTicket.d.ts +4 -4
- package/lib/action/check/thing.d.ts +5 -5
- package/lib/action/consume/use/reservation.d.ts +3 -3
- package/lib/action/consume/use.d.ts +3 -3
- package/lib/action/create.d.ts +3 -3
- package/lib/action/interact/confirm/pay.d.ts +3 -3
- package/lib/action/interact/confirm/registerService.d.ts +3 -3
- package/lib/action/interact/confirm/reservation.d.ts +3 -3
- package/lib/action/interact/confirm.d.ts +4 -4
- package/lib/action/interact/inform.d.ts +7 -7
- package/lib/action/interact/register/service.d.ts +3 -3
- package/lib/action/interact/register.d.ts +5 -5
- package/lib/action/reserve.d.ts +4 -4
- package/lib/action/trade/order.d.ts +5 -5
- package/lib/action/trade/pay.d.ts +5 -5
- package/lib/action/trade/refund.d.ts +5 -5
- package/lib/action/transfer/give/pointAward.d.ts +5 -5
- package/lib/action/transfer/give.d.ts +5 -5
- package/lib/action/transfer/moneyTransfer.d.ts +5 -5
- package/lib/action/transfer/return/invoice.d.ts +6 -6
- package/lib/action/transfer/return/order.d.ts +7 -7
- package/lib/action/transfer/return/pointAward.d.ts +6 -6
- package/lib/action/transfer/return/reserveTransaction.d.ts +6 -6
- package/lib/action/transfer/return.d.ts +3 -3
- package/lib/action/transfer/send/message/email.d.ts +3 -3
- package/lib/action/transfer/send/order.d.ts +3 -3
- package/lib/action/transfer/send.d.ts +6 -6
- package/lib/action/update/add.d.ts +4 -4
- package/lib/action/update/delete.d.ts +5 -5
- package/lib/action/update/replace.d.ts +4 -4
- package/lib/action/update/update.d.ts +4 -4
- package/lib/error/alreadyInUse.js +12 -31
- package/lib/error/argument.js +10 -30
- package/lib/error/argumentNull.js +10 -30
- package/lib/error/chevre.js +7 -26
- package/lib/error/forbidden.js +7 -28
- package/lib/error/gatewayTimeout.js +7 -28
- package/lib/error/internal.js +7 -28
- package/lib/error/notFound.js +10 -30
- package/lib/error/notImplemented.js +7 -28
- package/lib/error/rateLimitExceeded.js +7 -28
- package/lib/error/serviceUnavailable.js +7 -28
- package/lib/error/unauthorized.js +7 -28
- package/lib/error/unknown.js +7 -28
- package/lib/errors.js +13 -13
- package/lib/index.js +216 -216
- package/lib/invoice.d.ts +4 -4
- package/lib/offer.d.ts +2 -2
- package/lib/order.d.ts +19 -19
- package/lib/ownershipInfo.d.ts +7 -7
- package/lib/person.d.ts +3 -3
- package/lib/product.d.ts +3 -3
- package/lib/reservation.d.ts +1 -2
- package/lib/reservedCodeValues.js +24 -24
- package/lib/transaction.d.ts +4 -4
- package/package.json +3 -4
|
@@ -1,40 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.UnauthorizedError = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var chevre_1 = require("./chevre");
|
|
4
|
+
const errorCode_1 = require("../errorCode");
|
|
5
|
+
const chevre_1 = require("./chevre");
|
|
22
6
|
/**
|
|
23
7
|
* UnauthorizedError
|
|
24
8
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _this = this;
|
|
29
|
-
var actualMessage = message;
|
|
9
|
+
class UnauthorizedError extends chevre_1.ChevreError {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
let actualMessage = message;
|
|
30
12
|
if (message === undefined || message.length === 0) {
|
|
31
13
|
actualMessage = 'Unauthorized.';
|
|
32
14
|
}
|
|
33
15
|
/* istanbul ignore next */
|
|
34
|
-
|
|
35
|
-
setPrototypeOf(_this, UnauthorizedError.prototype);
|
|
36
|
-
return _this;
|
|
16
|
+
super(errorCode_1.ErrorCode.Unauthorized, actualMessage);
|
|
37
17
|
}
|
|
38
|
-
|
|
39
|
-
}(chevre_1.ChevreError));
|
|
18
|
+
}
|
|
40
19
|
exports.UnauthorizedError = UnauthorizedError;
|
package/lib/error/unknown.js
CHANGED
|
@@ -1,40 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
if (typeof b !== "function" && b !== null)
|
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
-
extendStatics(d, b);
|
|
13
|
-
function __() { this.constructor = d; }
|
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
-
};
|
|
16
|
-
})();
|
|
17
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
3
|
exports.UnknownError = void 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var chevre_1 = require("./chevre");
|
|
4
|
+
const errorCode_1 = require("../errorCode");
|
|
5
|
+
const chevre_1 = require("./chevre");
|
|
22
6
|
/**
|
|
23
7
|
* UnknownError
|
|
24
8
|
*/
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
var _this = this;
|
|
29
|
-
var actualMessage = message;
|
|
9
|
+
class UnknownError extends chevre_1.ChevreError {
|
|
10
|
+
constructor(message) {
|
|
11
|
+
let actualMessage = message;
|
|
30
12
|
if (message === undefined || message.length === 0) {
|
|
31
13
|
actualMessage = 'Unknown server error.';
|
|
32
14
|
}
|
|
33
15
|
/* istanbul ignore next */
|
|
34
|
-
|
|
35
|
-
setPrototypeOf(_this, UnknownError.prototype);
|
|
36
|
-
return _this;
|
|
16
|
+
super(errorCode_1.ErrorCode.Unknown, actualMessage);
|
|
37
17
|
}
|
|
38
|
-
|
|
39
|
-
}(chevre_1.ChevreError));
|
|
18
|
+
}
|
|
40
19
|
exports.UnknownError = UnknownError;
|
package/lib/errors.js
CHANGED
|
@@ -4,29 +4,29 @@ exports.Unknown = exports.Unauthorized = exports.ServiceUnavailable = exports.Ra
|
|
|
4
4
|
/**
|
|
5
5
|
* errors
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
const alreadyInUse_1 = require("./error/alreadyInUse");
|
|
8
8
|
Object.defineProperty(exports, "AlreadyInUse", { enumerable: true, get: function () { return alreadyInUse_1.AlreadyInUseError; } });
|
|
9
|
-
|
|
9
|
+
const argument_1 = require("./error/argument");
|
|
10
10
|
Object.defineProperty(exports, "Argument", { enumerable: true, get: function () { return argument_1.ArgumentError; } });
|
|
11
|
-
|
|
11
|
+
const argumentNull_1 = require("./error/argumentNull");
|
|
12
12
|
Object.defineProperty(exports, "ArgumentNull", { enumerable: true, get: function () { return argumentNull_1.ArgumentNullError; } });
|
|
13
|
-
|
|
13
|
+
const chevre_1 = require("./error/chevre");
|
|
14
14
|
Object.defineProperty(exports, "Chevre", { enumerable: true, get: function () { return chevre_1.ChevreError; } });
|
|
15
|
-
|
|
15
|
+
const forbidden_1 = require("./error/forbidden");
|
|
16
16
|
Object.defineProperty(exports, "Forbidden", { enumerable: true, get: function () { return forbidden_1.ForbiddenError; } });
|
|
17
|
-
|
|
17
|
+
const gatewayTimeout_1 = require("./error/gatewayTimeout");
|
|
18
18
|
Object.defineProperty(exports, "GatewayTimeout", { enumerable: true, get: function () { return gatewayTimeout_1.GatewayTimeoutError; } });
|
|
19
|
-
|
|
19
|
+
const internal_1 = require("./error/internal");
|
|
20
20
|
Object.defineProperty(exports, "Internal", { enumerable: true, get: function () { return internal_1.InternalError; } });
|
|
21
|
-
|
|
21
|
+
const notFound_1 = require("./error/notFound");
|
|
22
22
|
Object.defineProperty(exports, "NotFound", { enumerable: true, get: function () { return notFound_1.NotFoundError; } });
|
|
23
|
-
|
|
23
|
+
const notImplemented_1 = require("./error/notImplemented");
|
|
24
24
|
Object.defineProperty(exports, "NotImplemented", { enumerable: true, get: function () { return notImplemented_1.NotImplementedError; } });
|
|
25
|
-
|
|
25
|
+
const rateLimitExceeded_1 = require("./error/rateLimitExceeded");
|
|
26
26
|
Object.defineProperty(exports, "RateLimitExceeded", { enumerable: true, get: function () { return rateLimitExceeded_1.RateLimitExceededError; } });
|
|
27
|
-
|
|
27
|
+
const serviceUnavailable_1 = require("./error/serviceUnavailable");
|
|
28
28
|
Object.defineProperty(exports, "ServiceUnavailable", { enumerable: true, get: function () { return serviceUnavailable_1.ServiceUnavailableError; } });
|
|
29
|
-
|
|
29
|
+
const unauthorized_1 = require("./error/unauthorized");
|
|
30
30
|
Object.defineProperty(exports, "Unauthorized", { enumerable: true, get: function () { return unauthorized_1.UnauthorizedError; } });
|
|
31
|
-
|
|
31
|
+
const unknown_1 = require("./error/unknown");
|
|
32
32
|
Object.defineProperty(exports, "Unknown", { enumerable: true, get: function () { return unknown_1.UnknownError; } });
|