@surfrock/factory 1.0.0-alpha.0 → 1.0.0-alpha.2
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/factory.d.ts +3 -16
- package/lib/factory.js +4 -20
- package/lib/index.d.ts +1 -2
- package/lib/index.js +1 -2
- package/lib/{factory/resultStatus.d.ts → resultInfo.d.ts} +9 -0
- package/lib/service/auth/index.d.ts +1 -0
- package/lib/service/auth/index.js +4 -0
- package/lib/{factory → service}/auth/purchaseNumberAuth.d.ts +1 -1
- package/lib/service/index.d.ts +2 -0
- package/lib/service/index.js +5 -0
- package/lib/service/seat/index.d.ts +2 -0
- package/lib/service/seat/index.js +5 -0
- package/lib/{factory → service}/seat/seatInfoSync.d.ts +1 -1
- package/lib/{factory → service}/seat/seatInfoSyncCancel.d.ts +1 -1
- package/lib/soapServiceError.d.ts +34 -0
- package/lib/soapServiceError.js +4 -0
- package/package.json +2 -3
- package/lib/factory/resultInfo.d.ts +0 -10
- package/lib/factory/resultInfo.js +0 -2
- package/lib/factory/soapServiceError.d.ts +0 -9
- package/lib/factory/soapServiceError.js +0 -21
- /package/lib/{factory/resultStatus.js → resultInfo.js} +0 -0
- /package/lib/{factory → service}/auth/purchaseNumberAuth.js +0 -0
- /package/lib/{factory → service}/seat/seatInfoSync.js +0 -0
- /package/lib/{factory → service}/seat/seatInfoSyncCancel.js +0 -0
package/lib/factory.d.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import * as seatInfoSyncFactory from './factory/seat/seatInfoSync';
|
|
5
|
-
import * as seatInfoSyncCancelFactory from './factory/seat/seatInfoSyncCancel';
|
|
6
|
-
import { SurfRockSoapServiceError } from './factory/soapServiceError';
|
|
7
|
-
export declare namespace service {
|
|
8
|
-
namespace auth {
|
|
9
|
-
export import purchaseNumberAuth = PurchaseNumberAuthFactory;
|
|
10
|
-
}
|
|
11
|
-
namespace seat {
|
|
12
|
-
export import seatInfoSync = seatInfoSyncFactory;
|
|
13
|
-
export import seatInfoSyncCancel = seatInfoSyncCancelFactory;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export { IResultInfo, ResultStatus, SurfRockSoapServiceError };
|
|
1
|
+
export * as service from './service/index';
|
|
2
|
+
export * as resultInfo from './resultInfo';
|
|
3
|
+
export * as soapServiceError from './soapServiceError';
|
package/lib/factory.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const seatInfoSyncFactory = require("./factory/seat/seatInfoSync");
|
|
8
|
-
const seatInfoSyncCancelFactory = require("./factory/seat/seatInfoSyncCancel");
|
|
9
|
-
const soapServiceError_1 = require("./factory/soapServiceError");
|
|
10
|
-
Object.defineProperty(exports, "SurfRockSoapServiceError", { enumerable: true, get: function () { return soapServiceError_1.SurfRockSoapServiceError; } });
|
|
11
|
-
var service;
|
|
12
|
-
(function (service) {
|
|
13
|
-
let auth;
|
|
14
|
-
(function (auth) {
|
|
15
|
-
auth.purchaseNumberAuth = PurchaseNumberAuthFactory;
|
|
16
|
-
})(auth = service.auth || (service.auth = {}));
|
|
17
|
-
let seat;
|
|
18
|
-
(function (seat) {
|
|
19
|
-
seat.seatInfoSync = seatInfoSyncFactory;
|
|
20
|
-
seat.seatInfoSyncCancel = seatInfoSyncCancelFactory;
|
|
21
|
-
})(seat = service.seat || (service.seat = {}));
|
|
22
|
-
})(service || (exports.service = service = {}));
|
|
3
|
+
exports.soapServiceError = exports.resultInfo = exports.service = void 0;
|
|
4
|
+
exports.service = require("./service/index");
|
|
5
|
+
exports.resultInfo = require("./resultInfo");
|
|
6
|
+
exports.soapServiceError = require("./soapServiceError");
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { SurfrockFactory };
|
|
1
|
+
export * as SurfrockFactory from './factory';
|
package/lib/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as purchaseNumberAuth from './purchaseNumberAuth';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ResultStatus } from './resultInfo';
|
|
2
|
+
import { ReservationResult } from './service/seat/seatInfoSync';
|
|
3
|
+
import { CancelResult } from './service/seat/seatInfoSyncCancel';
|
|
4
|
+
export type IRawResult = {
|
|
5
|
+
resultInfo: {
|
|
6
|
+
status: ResultStatus;
|
|
7
|
+
message: string;
|
|
8
|
+
};
|
|
9
|
+
zskyykResult: ReservationResult;
|
|
10
|
+
cnclResult?: never;
|
|
11
|
+
} | {
|
|
12
|
+
resultInfo: {
|
|
13
|
+
status: ResultStatus;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
cnclResult: CancelResult;
|
|
17
|
+
zskyykResult?: never;
|
|
18
|
+
};
|
|
19
|
+
export declare const SOAP_SERVER_ERROR_NAME = "MvtkReserveServiceError";
|
|
20
|
+
/**
|
|
21
|
+
* soap-parserの投げるエラー
|
|
22
|
+
*/
|
|
23
|
+
export interface ISoapServiceError {
|
|
24
|
+
message?: string;
|
|
25
|
+
/**
|
|
26
|
+
* httpステータスコード
|
|
27
|
+
*/
|
|
28
|
+
code: number;
|
|
29
|
+
status: ResultStatus;
|
|
30
|
+
/**
|
|
31
|
+
* 着券あるいは着券取消の場合、結果詳細が含まれることがある
|
|
32
|
+
*/
|
|
33
|
+
rawResult?: IRawResult;
|
|
34
|
+
}
|
package/package.json
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"main": "./lib/index.js",
|
|
25
25
|
"types": "./lib/index.d.ts",
|
|
26
26
|
"files": [
|
|
27
|
-
"lib
|
|
27
|
+
"lib"
|
|
28
28
|
],
|
|
29
29
|
"name": "@surfrock/factory",
|
|
30
30
|
"repository": {
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
"build": "tsc",
|
|
36
36
|
"check:all": "npm run clean && npm run build && npm test",
|
|
37
37
|
"clean": "rimraf ./lib \"npm-debug.log*\" ./doc ./coverage ./.nyc_output",
|
|
38
|
-
"doc": "echo \"implementing...\" && exit 0",
|
|
39
38
|
"eslint": "eslint \"src/**/*.ts\"",
|
|
40
39
|
"coverage": "vitest run --coverage",
|
|
41
40
|
"test": "npm run eslint && npm run coverage",
|
|
@@ -45,5 +44,5 @@
|
|
|
45
44
|
"postversion": "git push origin --tags",
|
|
46
45
|
"prepublishOnly": "npm run clean && npm run build"
|
|
47
46
|
},
|
|
48
|
-
"version": "1.0.0-alpha.
|
|
47
|
+
"version": "1.0.0-alpha.2"
|
|
49
48
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SurfRockSoapServiceError = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* SurfRockSoapServiceError
|
|
6
|
-
*/
|
|
7
|
-
class SurfRockSoapServiceError extends Error {
|
|
8
|
-
code;
|
|
9
|
-
status;
|
|
10
|
-
rawResult; // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
11
|
-
constructor(code, status, message, rawResult) {
|
|
12
|
-
super(message);
|
|
13
|
-
this.name = 'MvtkReserveServiceError';
|
|
14
|
-
this.code = code;
|
|
15
|
-
this.status = status;
|
|
16
|
-
if (rawResult !== undefined) {
|
|
17
|
-
this.rawResult = rawResult;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.SurfRockSoapServiceError = SurfRockSoapServiceError;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|