@chevre/factory 4.375.0 → 4.376.0-alpha.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.
@@ -0,0 +1,7 @@
1
+ import { ChevreError } from './chevre';
2
+ /**
3
+ * InternalError
4
+ */
5
+ export declare class InternalError extends ChevreError {
6
+ constructor(message?: string);
7
+ }
@@ -0,0 +1,42 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.InternalError = void 0;
19
+ // tslint:disable-next-line:no-require-imports
20
+ var setPrototypeOf = require("setprototypeof");
21
+ var errorCode_1 = require("../errorCode");
22
+ var chevre_1 = require("./chevre");
23
+ /**
24
+ * InternalError
25
+ */
26
+ var InternalError = /** @class */ (function (_super) {
27
+ __extends(InternalError, _super);
28
+ function InternalError(message) {
29
+ var _this = this;
30
+ var actualMessage = message;
31
+ if (message === undefined || message.length === 0) {
32
+ actualMessage = 'Internal server error.';
33
+ }
34
+ // tslint:disable-next-line:no-single-line-block-comment
35
+ /* istanbul ignore next */
36
+ _this = _super.call(this, errorCode_1.ErrorCode.Internal, actualMessage) || this;
37
+ setPrototypeOf(_this, InternalError.prototype);
38
+ return _this;
39
+ }
40
+ return InternalError;
41
+ }(chevre_1.ChevreError));
42
+ exports.InternalError = InternalError;
@@ -7,6 +7,7 @@ export declare enum ErrorCode {
7
7
  ArgumentNull = "ArgumentNull",
8
8
  Forbidden = "Forbidden",
9
9
  GatewayTimeout = "GatewayTimeout",
10
+ Internal = "Internal",
10
11
  NotFound = "NotFound",
11
12
  NotImplemented = "NotImplemented",
12
13
  RateLimitExceeded = "RateLimitExceeded",
package/lib/errorCode.js CHANGED
@@ -11,6 +11,7 @@ var ErrorCode;
11
11
  ErrorCode["ArgumentNull"] = "ArgumentNull";
12
12
  ErrorCode["Forbidden"] = "Forbidden";
13
13
  ErrorCode["GatewayTimeout"] = "GatewayTimeout";
14
+ ErrorCode["Internal"] = "Internal";
14
15
  ErrorCode["NotFound"] = "NotFound";
15
16
  ErrorCode["NotImplemented"] = "NotImplemented";
16
17
  ErrorCode["RateLimitExceeded"] = "RateLimitExceeded";
package/lib/errors.d.ts CHANGED
@@ -7,9 +7,10 @@ import { ArgumentNullError as ArgumentNull } from './error/argumentNull';
7
7
  import { ChevreError as Chevre } from './error/chevre';
8
8
  import { ForbiddenError as Forbidden } from './error/forbidden';
9
9
  import { GatewayTimeoutError as GatewayTimeout } from './error/gatewayTimeout';
10
+ import { InternalError as Internal } from './error/internal';
10
11
  import { NotFoundError as NotFound } from './error/notFound';
11
12
  import { NotImplementedError as NotImplemented } from './error/notImplemented';
12
13
  import { RateLimitExceededError as RateLimitExceeded } from './error/rateLimitExceeded';
13
14
  import { ServiceUnavailableError as ServiceUnavailable } from './error/serviceUnavailable';
14
15
  import { UnauthorizedError as Unauthorized } from './error/unauthorized';
15
- export { AlreadyInUse, Argument, ArgumentNull, Chevre, Forbidden, GatewayTimeout, NotFound, NotImplemented, RateLimitExceeded, ServiceUnavailable, Unauthorized };
16
+ export { AlreadyInUse, Argument, ArgumentNull, Chevre, Forbidden, GatewayTimeout, Internal, NotFound, NotImplemented, RateLimitExceeded, ServiceUnavailable, Unauthorized };
package/lib/errors.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Unauthorized = exports.ServiceUnavailable = exports.RateLimitExceeded = exports.NotImplemented = exports.NotFound = exports.GatewayTimeout = exports.Forbidden = exports.Chevre = exports.ArgumentNull = exports.Argument = exports.AlreadyInUse = void 0;
3
+ exports.Unauthorized = exports.ServiceUnavailable = exports.RateLimitExceeded = exports.NotImplemented = exports.NotFound = exports.Internal = exports.GatewayTimeout = exports.Forbidden = exports.Chevre = exports.ArgumentNull = exports.Argument = exports.AlreadyInUse = void 0;
4
4
  /**
5
5
  * errors
6
6
  */
@@ -16,6 +16,8 @@ var forbidden_1 = require("./error/forbidden");
16
16
  Object.defineProperty(exports, "Forbidden", { enumerable: true, get: function () { return forbidden_1.ForbiddenError; } });
17
17
  var gatewayTimeout_1 = require("./error/gatewayTimeout");
18
18
  Object.defineProperty(exports, "GatewayTimeout", { enumerable: true, get: function () { return gatewayTimeout_1.GatewayTimeoutError; } });
19
+ var internal_1 = require("./error/internal");
20
+ Object.defineProperty(exports, "Internal", { enumerable: true, get: function () { return internal_1.InternalError; } });
19
21
  var notFound_1 = require("./error/notFound");
20
22
  Object.defineProperty(exports, "NotFound", { enumerable: true, get: function () { return notFound_1.NotFoundError; } });
21
23
  var notImplemented_1 = require("./error/notImplemented");
@@ -7,7 +7,8 @@ import * as TransactionFactory from '../transaction';
7
7
  import { TransactionType } from '../transactionType';
8
8
  export type IAgent = TransactionFactory.IAgent;
9
9
  export import ISeller = TransactionFactory.ISeller;
10
- export type IResult = any;
10
+ export interface IResult {
11
+ }
11
12
  export type IError = any;
12
13
  /**
13
14
  * 返品理由
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chevre/factory",
3
- "version": "4.375.0",
3
+ "version": "4.376.0-alpha.0",
4
4
  "description": "Chevre Factory Library for Javascript",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",