endpoints-sdk-cli 2.1.3 → 2.3.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.
- package/README.md +11 -11
- package/lib/classes/Config.js +3 -3
- package/lib/classes/Repository.d.ts +1 -0
- package/lib/classes/Repository.js +8 -7
- package/lib/commands/add.js +2 -1
- package/lib/commands/install.js +8 -7
- package/lib/commands/update.js +6 -5
- package/lib/endpoints/lab.hoge.d.ts +4 -0
- package/lib/endpoints/lab.hoge.js +7 -0
- package/lib/endpoints/lab.hoge.v1.d.ts +123 -0
- package/lib/endpoints/lab.hoge.v1.js +219 -0
- package/lib/endpoints/lab.poyo.d.ts +4 -0
- package/lib/endpoints/lab.poyo.js +7 -0
- package/lib/endpoints/lab.poyo.v1.d.ts +123 -0
- package/lib/endpoints/lab.poyo.v1.js +219 -0
- package/lib/endpoints/m2m-core.js +1 -1
- package/lib/endpoints/m2m-core.v1.d.ts +371 -252
- package/lib/endpoints/m2m-core.v1.js +532 -696
- package/lib/makeFiles.js +8 -7
- package/lib/templates/files/endpoints.js +4 -3
- package/lib/templates/files/indexFile.js +5 -4
- package/lib/templates/functions/endpoint.js +9 -7
- package/lib/templates/functions/root.js +4 -3
- package/lib/utils/camelCase.js +3 -2
- package/lib/utils/format.js +2 -1
- package/lib/utils/unique.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
- package/CHANGELOG.md +0 -2618
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ $ npm install -g endpoints-sdk-cli
|
|
|
17
17
|
$ mes COMMAND
|
|
18
18
|
running command...
|
|
19
19
|
$ mes (-v|--version|version)
|
|
20
|
-
endpoints-sdk-cli/2.1
|
|
20
|
+
endpoints-sdk-cli/2.3.1 darwin-x64 node-v16.15.1
|
|
21
21
|
$ mes --help [COMMAND]
|
|
22
22
|
USAGE
|
|
23
23
|
$ mes COMMAND
|
|
@@ -49,12 +49,12 @@ DESCRIPTION
|
|
|
49
49
|
1. make endpoints.config.json for version control.
|
|
50
50
|
|
|
51
51
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"service-name": {
|
|
54
|
+
"version": "26177ed7e673daf0cc5a69e9793dd863424d272f",
|
|
55
|
+
"repository": "git@github.com:[username/repository].git"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
> service name is inferred from Repository name.
|
|
@@ -74,7 +74,7 @@ EXAMPLES
|
|
|
74
74
|
$ mes add https://github.com/[username/repository].git
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
_See code: [src/commands/add.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.1
|
|
77
|
+
_See code: [src/commands/add.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.3.1/src/commands/add.ts)_
|
|
78
78
|
|
|
79
79
|
## `mes help [COMMAND]`
|
|
80
80
|
|
|
@@ -91,7 +91,7 @@ OPTIONS
|
|
|
91
91
|
--all see all commands in CLI
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.
|
|
94
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v3.3.1/src/commands/help.ts)_
|
|
95
95
|
|
|
96
96
|
## `mes install`
|
|
97
97
|
|
|
@@ -102,7 +102,7 @@ USAGE
|
|
|
102
102
|
$ mes install
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
_See code: [src/commands/install.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.1
|
|
105
|
+
_See code: [src/commands/install.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.3.1/src/commands/install.ts)_
|
|
106
106
|
|
|
107
107
|
## `mes update [SERVICE]`
|
|
108
108
|
|
|
@@ -113,7 +113,7 @@ USAGE
|
|
|
113
113
|
$ mes update [SERVICE]
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
-
_See code: [src/commands/update.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.1
|
|
116
|
+
_See code: [src/commands/update.ts](https://github.com/matsuri-tech/endpoints-sdk-cli/blob/v2.3.1/src/commands/update.ts)_
|
|
117
117
|
<!-- commandsstop -->
|
|
118
118
|
|
|
119
119
|
|
package/lib/classes/Config.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Config = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
6
|
-
const path = tslib_1.__importStar(require("path"));
|
|
5
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
6
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
7
7
|
const prettier = tslib_1.__importStar(require("prettier"));
|
|
8
8
|
const unique_1 = require("../utils/unique");
|
|
9
9
|
class Config {
|
|
@@ -30,7 +30,7 @@ class Config {
|
|
|
30
30
|
}
|
|
31
31
|
push({ name, path, version, workspace }) {
|
|
32
32
|
var _a, _b;
|
|
33
|
-
const workspaces = unique_1.unique([
|
|
33
|
+
const workspaces = (0, unique_1.unique)([
|
|
34
34
|
...(((_b = (_a = this.dependencies) === null || _a === void 0 ? void 0 : _a[name]) === null || _b === void 0 ? void 0 : _b.workspaces) || []),
|
|
35
35
|
workspace,
|
|
36
36
|
]).filter((w) => Boolean(w));
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Repository = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const path = tslib_1.__importStar(require("path"));
|
|
6
|
-
const
|
|
7
|
-
const fs = tslib_1.__importStar(require("fs"));
|
|
5
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
6
|
+
const node_child_process_1 = require("node:child_process");
|
|
7
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
8
8
|
const rimraf_1 = tslib_1.__importDefault(require("rimraf"));
|
|
9
9
|
class Repository {
|
|
10
10
|
constructor(str) {
|
|
@@ -15,25 +15,26 @@ class Repository {
|
|
|
15
15
|
this.cache = path.resolve(`./node_modules/.endpoints-tmp/${Math.random().toString(36).slice(-8)}`);
|
|
16
16
|
}
|
|
17
17
|
clone({ version, workspace = '' }) {
|
|
18
|
-
|
|
18
|
+
(0, node_child_process_1.execSync)(`git clone --no-checkout --quiet ${this.path} ${this.cache}`);
|
|
19
19
|
this.reset(version);
|
|
20
20
|
this.hash = this.revParse();
|
|
21
21
|
this.data = this.checkout(workspace);
|
|
22
22
|
}
|
|
23
23
|
checkout(workspace) {
|
|
24
24
|
const file = path.resolve(this.cache, workspace, '.endpoints.json');
|
|
25
|
-
|
|
25
|
+
const mainBranch = (0, node_child_process_1.execSync)(`cd ${this.cache}; git rev-parse --abbrev-ref origin/HEAD`).toString().trim();
|
|
26
|
+
(0, node_child_process_1.execSync)(`cd ${this.cache}; git checkout ${mainBranch} -- ${file}`);
|
|
26
27
|
return JSON.parse(fs.readFileSync(file).toString());
|
|
27
28
|
}
|
|
28
29
|
revParse() {
|
|
29
|
-
const hash =
|
|
30
|
+
const hash = (0, node_child_process_1.execSync)(`cd ${this.cache}; git rev-parse HEAD`)
|
|
30
31
|
.toString()
|
|
31
32
|
.trim();
|
|
32
33
|
return hash;
|
|
33
34
|
}
|
|
34
35
|
reset(version) {
|
|
35
36
|
if (version && version !== 'latest') {
|
|
36
|
-
|
|
37
|
+
(0, node_child_process_1.execSync)(`cd ${this.cache}; git reset --hard ${version}`);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
clean() {
|
package/lib/commands/add.js
CHANGED
|
@@ -12,7 +12,7 @@ class Add extends command_1.Command {
|
|
|
12
12
|
try {
|
|
13
13
|
repository.clone({ version, workspace });
|
|
14
14
|
const config = new Config_1.Config();
|
|
15
|
-
makeFiles_1.makeFiles({ repository, config, workspace });
|
|
15
|
+
(0, makeFiles_1.makeFiles)({ repository, config, workspace });
|
|
16
16
|
config.push({
|
|
17
17
|
name: repository.name,
|
|
18
18
|
path: repository.path,
|
|
@@ -23,6 +23,7 @@ class Add extends command_1.Command {
|
|
|
23
23
|
this.log(`${color_1.color.green('success')}: ${repository.name} updated!`);
|
|
24
24
|
}
|
|
25
25
|
catch (error) {
|
|
26
|
+
// @ts-expect-error
|
|
26
27
|
this.error(color_1.color.red(error.stack));
|
|
27
28
|
}
|
|
28
29
|
finally {
|
package/lib/commands/install.js
CHANGED
|
@@ -13,22 +13,23 @@ class Install extends command_1.Command {
|
|
|
13
13
|
if (!config.dependencies) {
|
|
14
14
|
throw new Error('Dependencies property of the endpoints.config.json does not exist. Use the add command to add dependencies before installing');
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
for (const { repository: path, version, workspaces = [''] } of Object.values(config.dependencies)) {
|
|
17
|
+
for (const workspace of workspaces) {
|
|
18
18
|
const repository = new Repository_1.Repository(path);
|
|
19
19
|
repositories.push(repository);
|
|
20
20
|
repository.clone({ version, workspace });
|
|
21
|
-
makeFiles_1.makeFiles({ repository, workspace, config });
|
|
22
|
-
}
|
|
23
|
-
}
|
|
21
|
+
(0, makeFiles_1.makeFiles)({ repository, workspace, config });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
24
|
}
|
|
25
25
|
catch (error) {
|
|
26
|
+
// @ts-expect-error
|
|
26
27
|
this.error(color_1.color.red(error.message));
|
|
27
28
|
}
|
|
28
29
|
finally {
|
|
29
|
-
|
|
30
|
+
for (const repository of repositories) {
|
|
30
31
|
repository.clean();
|
|
31
|
-
}
|
|
32
|
+
}
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
}
|
package/lib/commands/update.js
CHANGED
|
@@ -18,10 +18,10 @@ class Update extends command_1.Command {
|
|
|
18
18
|
throw new Error('The service does not exist in the dependency. Check dependencies property of the endpoints.config.json. Or use the add command to add dependencies before installing');
|
|
19
19
|
}
|
|
20
20
|
const { repository: path, version, workspaces = [''] } = config.dependencies[args.service];
|
|
21
|
-
|
|
21
|
+
for (const workspace of workspaces) {
|
|
22
22
|
const repository = new Repository_1.Repository(path);
|
|
23
23
|
repository.clone({ version, workspace });
|
|
24
|
-
makeFiles_1.makeFiles({ repository, config, workspace });
|
|
24
|
+
(0, makeFiles_1.makeFiles)({ repository, config, workspace });
|
|
25
25
|
config.push({
|
|
26
26
|
name: repository.name,
|
|
27
27
|
path: repository.path,
|
|
@@ -29,16 +29,17 @@ class Update extends command_1.Command {
|
|
|
29
29
|
workspace,
|
|
30
30
|
});
|
|
31
31
|
repositories.push(repository);
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
config.publish();
|
|
34
34
|
}
|
|
35
35
|
catch (error) {
|
|
36
|
+
// @ts-expect-error
|
|
36
37
|
this.error(color_1.color.red(error.message));
|
|
37
38
|
}
|
|
38
39
|
finally {
|
|
39
|
-
|
|
40
|
+
for (const repository of repositories) {
|
|
40
41
|
repository.clean();
|
|
41
|
-
}
|
|
42
|
+
}
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A function that returns the URL part common to the endpoints.
|
|
3
|
+
*/
|
|
4
|
+
export declare const root: () => string;
|
|
5
|
+
/**
|
|
6
|
+
* ヘルスチェック
|
|
7
|
+
* @version v1
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare const healthCheck: () => string;
|
|
11
|
+
/**
|
|
12
|
+
* ログインする
|
|
13
|
+
* @version v1
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
export declare const login: () => string;
|
|
17
|
+
/**
|
|
18
|
+
* 認証が必要なゲストの情報を取得する
|
|
19
|
+
* @version v1
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export declare const guestFindForAuth: () => string;
|
|
23
|
+
/**
|
|
24
|
+
* パスポート情報を手動でアップロードする
|
|
25
|
+
* @version v1
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare const guestPrepareUploadPassportManually: ({ id }: {
|
|
29
|
+
id: string;
|
|
30
|
+
}) => string;
|
|
31
|
+
/**
|
|
32
|
+
* 指定したIDのゲストのパスポート情報を取得する
|
|
33
|
+
* @version v1
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
export declare const guestGetPassport: ({ id }: {
|
|
37
|
+
id: string;
|
|
38
|
+
}) => string;
|
|
39
|
+
/**
|
|
40
|
+
* 指定したIDのゲストのパスポート情報を取得する(認証オペレータ用)
|
|
41
|
+
* @version v1
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
export declare const guestGetPassportForAuth: ({ id }: {
|
|
45
|
+
id: string;
|
|
46
|
+
}) => string;
|
|
47
|
+
/**
|
|
48
|
+
* ゲスト情報が認証オペレータ用画面に最後に表示された時刻を更新する
|
|
49
|
+
* @version v1
|
|
50
|
+
*
|
|
51
|
+
*/
|
|
52
|
+
export declare const guestUpdateGuestsDisplayedTimeInOperatorPage: () => string;
|
|
53
|
+
/**
|
|
54
|
+
* 指定したIDのリスティングのKeycafe連携状況を取得する
|
|
55
|
+
* @version v1
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export declare const listingGetKeycafeProfile: ({ id }: {
|
|
59
|
+
id: string;
|
|
60
|
+
}) => string;
|
|
61
|
+
/**
|
|
62
|
+
* 指定したIDのリスティングをKeycafe連携する
|
|
63
|
+
* @version v1
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
export declare const listingAssociateToKeycafe: ({ id }: {
|
|
67
|
+
id: string;
|
|
68
|
+
}) => string;
|
|
69
|
+
/**
|
|
70
|
+
* 指定したIDのリスティングのKeycafe連携を解除する
|
|
71
|
+
* @version v1
|
|
72
|
+
*
|
|
73
|
+
*/
|
|
74
|
+
export declare const listingDetachFromKeycafe: ({ id }: {
|
|
75
|
+
id: string;
|
|
76
|
+
}) => string;
|
|
77
|
+
/**
|
|
78
|
+
* チェックイン端末からゲスト用のKeycafe解錠コードを取得する
|
|
79
|
+
* @version v1
|
|
80
|
+
* @param {string} code M2M17955DZ875ZY
|
|
81
|
+
*/
|
|
82
|
+
export declare const keycafeGetAccessForGuest: ({ code }: {
|
|
83
|
+
code?: string | undefined;
|
|
84
|
+
}) => string;
|
|
85
|
+
/**
|
|
86
|
+
* Keycafeの鍵情報をキーワード検索する
|
|
87
|
+
* @version v1
|
|
88
|
+
* @param {string} keyword elm501
|
|
89
|
+
*/
|
|
90
|
+
export declare const keycafeSearchKeys: ({ keyword }: {
|
|
91
|
+
keyword?: string | undefined;
|
|
92
|
+
}) => string;
|
|
93
|
+
export declare const lab_v1: {
|
|
94
|
+
root: () => string;
|
|
95
|
+
healthCheck: () => string;
|
|
96
|
+
login: () => string;
|
|
97
|
+
guestFindForAuth: () => string;
|
|
98
|
+
guestPrepareUploadPassportManually: ({ id }: {
|
|
99
|
+
id: string;
|
|
100
|
+
}) => string;
|
|
101
|
+
guestGetPassport: ({ id }: {
|
|
102
|
+
id: string;
|
|
103
|
+
}) => string;
|
|
104
|
+
guestGetPassportForAuth: ({ id }: {
|
|
105
|
+
id: string;
|
|
106
|
+
}) => string;
|
|
107
|
+
guestUpdateGuestsDisplayedTimeInOperatorPage: () => string;
|
|
108
|
+
listingGetKeycafeProfile: ({ id }: {
|
|
109
|
+
id: string;
|
|
110
|
+
}) => string;
|
|
111
|
+
listingAssociateToKeycafe: ({ id }: {
|
|
112
|
+
id: string;
|
|
113
|
+
}) => string;
|
|
114
|
+
listingDetachFromKeycafe: ({ id }: {
|
|
115
|
+
id: string;
|
|
116
|
+
}) => string;
|
|
117
|
+
keycafeGetAccessForGuest: ({ code }: {
|
|
118
|
+
code?: string | undefined;
|
|
119
|
+
}) => string;
|
|
120
|
+
keycafeSearchKeys: ({ keyword }: {
|
|
121
|
+
keyword?: string | undefined;
|
|
122
|
+
}) => string;
|
|
123
|
+
};
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.lab_v1 = exports.keycafeSearchKeys = exports.keycafeGetAccessForGuest = exports.listingDetachFromKeycafe = exports.listingAssociateToKeycafe = exports.listingGetKeycafeProfile = exports.guestUpdateGuestsDisplayedTimeInOperatorPage = exports.guestGetPassportForAuth = exports.guestGetPassport = exports.guestPrepareUploadPassportManually = exports.guestFindForAuth = exports.login = exports.healthCheck = exports.root = void 0;
|
|
4
|
+
/* eslint-disable */
|
|
5
|
+
/**
|
|
6
|
+
* A function that returns the URL part common to the endpoints.
|
|
7
|
+
*/
|
|
8
|
+
const root = () => {
|
|
9
|
+
let __root = "";
|
|
10
|
+
if (process.env.NODE_ENV === "local") {
|
|
11
|
+
__root = "http://localhost:8080";
|
|
12
|
+
}
|
|
13
|
+
if (process.env.NODE_ENV === "localDev") {
|
|
14
|
+
__root = "https://api-checkin.dev.m2msystems.cloud";
|
|
15
|
+
}
|
|
16
|
+
if (process.env.NODE_ENV === "development") {
|
|
17
|
+
__root = "https://api-checkin.dev.m2msystems.cloud";
|
|
18
|
+
}
|
|
19
|
+
if (process.env.NODE_ENV === "production") {
|
|
20
|
+
__root = "https://api-checkin.m2msystems.cloud";
|
|
21
|
+
}
|
|
22
|
+
return __root;
|
|
23
|
+
};
|
|
24
|
+
exports.root = root;
|
|
25
|
+
/**
|
|
26
|
+
* ヘルスチェック
|
|
27
|
+
* @version v1
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
const healthCheck = () => {
|
|
31
|
+
const __root = (0, exports.root)();
|
|
32
|
+
const __queries = Object.entries({})
|
|
33
|
+
.filter(([_, value]) => value !== undefined)
|
|
34
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
35
|
+
.join("&");
|
|
36
|
+
const __path = `${__root}/${`/health_check`}`;
|
|
37
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
38
|
+
};
|
|
39
|
+
exports.healthCheck = healthCheck;
|
|
40
|
+
/**
|
|
41
|
+
* ログインする
|
|
42
|
+
* @version v1
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
const login = () => {
|
|
46
|
+
const __root = (0, exports.root)();
|
|
47
|
+
const __queries = Object.entries({})
|
|
48
|
+
.filter(([_, value]) => value !== undefined)
|
|
49
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
50
|
+
.join("&");
|
|
51
|
+
const __path = `${__root}/${`/login/user/`}`;
|
|
52
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
53
|
+
};
|
|
54
|
+
exports.login = login;
|
|
55
|
+
/**
|
|
56
|
+
* 認証が必要なゲストの情報を取得する
|
|
57
|
+
* @version v1
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
const guestFindForAuth = () => {
|
|
61
|
+
const __root = (0, exports.root)();
|
|
62
|
+
const __queries = Object.entries({})
|
|
63
|
+
.filter(([_, value]) => value !== undefined)
|
|
64
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
65
|
+
.join("&");
|
|
66
|
+
const __path = `${__root}/${`/api/guests/search/findForAuth`}`;
|
|
67
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
68
|
+
};
|
|
69
|
+
exports.guestFindForAuth = guestFindForAuth;
|
|
70
|
+
/**
|
|
71
|
+
* パスポート情報を手動でアップロードする
|
|
72
|
+
* @version v1
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
const guestPrepareUploadPassportManually = ({ id }) => {
|
|
76
|
+
const __root = (0, exports.root)();
|
|
77
|
+
const __queries = Object.entries({})
|
|
78
|
+
.filter(([_, value]) => value !== undefined)
|
|
79
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
80
|
+
.join("&");
|
|
81
|
+
const __path = `${__root}/${`/guests/${id}/passport/prepare`}`;
|
|
82
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
83
|
+
};
|
|
84
|
+
exports.guestPrepareUploadPassportManually = guestPrepareUploadPassportManually;
|
|
85
|
+
/**
|
|
86
|
+
* 指定したIDのゲストのパスポート情報を取得する
|
|
87
|
+
* @version v1
|
|
88
|
+
*
|
|
89
|
+
*/
|
|
90
|
+
const guestGetPassport = ({ id }) => {
|
|
91
|
+
const __root = (0, exports.root)();
|
|
92
|
+
const __queries = Object.entries({})
|
|
93
|
+
.filter(([_, value]) => value !== undefined)
|
|
94
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
95
|
+
.join("&");
|
|
96
|
+
const __path = `${__root}/${`/guests/${id}/passport_image`}`;
|
|
97
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
98
|
+
};
|
|
99
|
+
exports.guestGetPassport = guestGetPassport;
|
|
100
|
+
/**
|
|
101
|
+
* 指定したIDのゲストのパスポート情報を取得する(認証オペレータ用)
|
|
102
|
+
* @version v1
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
const guestGetPassportForAuth = ({ id }) => {
|
|
106
|
+
const __root = (0, exports.root)();
|
|
107
|
+
const __queries = Object.entries({})
|
|
108
|
+
.filter(([_, value]) => value !== undefined)
|
|
109
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
110
|
+
.join("&");
|
|
111
|
+
const __path = `${__root}/${`/guests/${id}/passport_image_auth`}`;
|
|
112
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
113
|
+
};
|
|
114
|
+
exports.guestGetPassportForAuth = guestGetPassportForAuth;
|
|
115
|
+
/**
|
|
116
|
+
* ゲスト情報が認証オペレータ用画面に最後に表示された時刻を更新する
|
|
117
|
+
* @version v1
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
const guestUpdateGuestsDisplayedTimeInOperatorPage = () => {
|
|
121
|
+
const __root = (0, exports.root)();
|
|
122
|
+
const __queries = Object.entries({})
|
|
123
|
+
.filter(([_, value]) => value !== undefined)
|
|
124
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
125
|
+
.join("&");
|
|
126
|
+
const __path = `${__root}/${`/guests/displayed_in_operator_page`}`;
|
|
127
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
128
|
+
};
|
|
129
|
+
exports.guestUpdateGuestsDisplayedTimeInOperatorPage = guestUpdateGuestsDisplayedTimeInOperatorPage;
|
|
130
|
+
/**
|
|
131
|
+
* 指定したIDのリスティングのKeycafe連携状況を取得する
|
|
132
|
+
* @version v1
|
|
133
|
+
*
|
|
134
|
+
*/
|
|
135
|
+
const listingGetKeycafeProfile = ({ id }) => {
|
|
136
|
+
const __root = (0, exports.root)();
|
|
137
|
+
const __queries = Object.entries({})
|
|
138
|
+
.filter(([_, value]) => value !== undefined)
|
|
139
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
140
|
+
.join("&");
|
|
141
|
+
const __path = `${__root}/${`/listings/${id}/keycafe`}`;
|
|
142
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
143
|
+
};
|
|
144
|
+
exports.listingGetKeycafeProfile = listingGetKeycafeProfile;
|
|
145
|
+
/**
|
|
146
|
+
* 指定したIDのリスティングをKeycafe連携する
|
|
147
|
+
* @version v1
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
150
|
+
const listingAssociateToKeycafe = ({ id }) => {
|
|
151
|
+
const __root = (0, exports.root)();
|
|
152
|
+
const __queries = Object.entries({})
|
|
153
|
+
.filter(([_, value]) => value !== undefined)
|
|
154
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
155
|
+
.join("&");
|
|
156
|
+
const __path = `${__root}/${`/listings/${id}/keycafe`}`;
|
|
157
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
158
|
+
};
|
|
159
|
+
exports.listingAssociateToKeycafe = listingAssociateToKeycafe;
|
|
160
|
+
/**
|
|
161
|
+
* 指定したIDのリスティングのKeycafe連携を解除する
|
|
162
|
+
* @version v1
|
|
163
|
+
*
|
|
164
|
+
*/
|
|
165
|
+
const listingDetachFromKeycafe = ({ id }) => {
|
|
166
|
+
const __root = (0, exports.root)();
|
|
167
|
+
const __queries = Object.entries({})
|
|
168
|
+
.filter(([_, value]) => value !== undefined)
|
|
169
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
170
|
+
.join("&");
|
|
171
|
+
const __path = `${__root}/${`/listings/${id}/keycafe`}`;
|
|
172
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
173
|
+
};
|
|
174
|
+
exports.listingDetachFromKeycafe = listingDetachFromKeycafe;
|
|
175
|
+
/**
|
|
176
|
+
* チェックイン端末からゲスト用のKeycafe解錠コードを取得する
|
|
177
|
+
* @version v1
|
|
178
|
+
* @param {string} code M2M17955DZ875ZY
|
|
179
|
+
*/
|
|
180
|
+
const keycafeGetAccessForGuest = ({ code }) => {
|
|
181
|
+
const __root = (0, exports.root)();
|
|
182
|
+
const __queries = Object.entries({ code })
|
|
183
|
+
.filter(([_, value]) => value !== undefined)
|
|
184
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
185
|
+
.join("&");
|
|
186
|
+
const __path = `${__root}/${`/stay/keycafe/accesses`}`;
|
|
187
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
188
|
+
};
|
|
189
|
+
exports.keycafeGetAccessForGuest = keycafeGetAccessForGuest;
|
|
190
|
+
/**
|
|
191
|
+
* Keycafeの鍵情報をキーワード検索する
|
|
192
|
+
* @version v1
|
|
193
|
+
* @param {string} keyword elm501
|
|
194
|
+
*/
|
|
195
|
+
const keycafeSearchKeys = ({ keyword }) => {
|
|
196
|
+
const __root = (0, exports.root)();
|
|
197
|
+
const __queries = Object.entries({ keyword })
|
|
198
|
+
.filter(([_, value]) => value !== undefined)
|
|
199
|
+
.map(([key, value]) => `${key}=${value}`)
|
|
200
|
+
.join("&");
|
|
201
|
+
const __path = `${__root}/${`/keycafe/keys`}`;
|
|
202
|
+
return __queries ? `${__path}?${__queries}` : __path;
|
|
203
|
+
};
|
|
204
|
+
exports.keycafeSearchKeys = keycafeSearchKeys;
|
|
205
|
+
exports.lab_v1 = {
|
|
206
|
+
root: exports.root,
|
|
207
|
+
healthCheck: exports.healthCheck,
|
|
208
|
+
login: exports.login,
|
|
209
|
+
guestFindForAuth: exports.guestFindForAuth,
|
|
210
|
+
guestPrepareUploadPassportManually: exports.guestPrepareUploadPassportManually,
|
|
211
|
+
guestGetPassport: exports.guestGetPassport,
|
|
212
|
+
guestGetPassportForAuth: exports.guestGetPassportForAuth,
|
|
213
|
+
guestUpdateGuestsDisplayedTimeInOperatorPage: exports.guestUpdateGuestsDisplayedTimeInOperatorPage,
|
|
214
|
+
listingGetKeycafeProfile: exports.listingGetKeycafeProfile,
|
|
215
|
+
listingAssociateToKeycafe: exports.listingAssociateToKeycafe,
|
|
216
|
+
listingDetachFromKeycafe: exports.listingDetachFromKeycafe,
|
|
217
|
+
keycafeGetAccessForGuest: exports.keycafeGetAccessForGuest,
|
|
218
|
+
keycafeSearchKeys: exports.keycafeSearchKeys
|
|
219
|
+
};
|