@ingestkorea/client-sens 1.2.0 → 1.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 +33 -10
- package/dist-cjs/commands/{GetRequestResultCommand.js → GetAlimtalkResultCommand.js} +6 -6
- package/dist-cjs/commands/{GetRequestStatusCommand.js → GetAlimtalkStatusCommand.js} +6 -6
- package/dist-cjs/commands/{GetTemplateCommand.js → GetAlimtalkTemplateCommand.js} +6 -6
- package/dist-cjs/commands/{ListChannelsCommand.js → ListAlimtalkChannelsCommand.js} +6 -6
- package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +44 -0
- package/dist-cjs/commands/index.js +5 -5
- package/dist-cjs/models/{GetRequestResult.js → GetAlimtalkResult.js} +0 -0
- package/dist-cjs/models/{GetRequestStatus.js → GetAlimtalkStatus.js} +0 -0
- package/dist-cjs/models/{GetTemplate.js → GetAlimtalkTemplate.js} +0 -0
- package/dist-cjs/models/{ListChannels.js → ListAlimtalkChannels.js} +0 -0
- package/dist-cjs/models/{ListTemplates.js → ListAlimtalkTemplates.js} +0 -0
- package/dist-cjs/models/index.js +5 -5
- package/dist-cjs/protocols/{GetRequestResult.js → GetAlimtalkResult.js} +12 -12
- package/dist-cjs/protocols/{GetRequestStatus.js → GetAlimtalkStatus.js} +13 -12
- package/dist-cjs/protocols/{GetTemplate.js → GetAlimtalkTemplate.js} +11 -11
- package/dist-cjs/protocols/{ListChannels.js → ListAlimtalkChannels.js} +12 -12
- package/dist-cjs/protocols/{ListTemplates.js → ListAlimtalkTemplates.js} +24 -21
- package/dist-cjs/protocols/index.js +5 -5
- package/dist-es/commands/{GetRequestStatusCommand.js → GetAlimtalkResultCommand.js} +4 -4
- package/dist-es/commands/{GetRequestResultCommand.js → GetAlimtalkStatusCommand.js} +4 -4
- package/dist-es/commands/{ListChannelsCommand.js → GetAlimtalkTemplateCommand.js} +4 -4
- package/dist-es/commands/{GetTemplateCommand.js → ListAlimtalkChannelsCommand.js} +4 -4
- package/dist-es/commands/ListAlimtalkTemplatesCommand.js +29 -0
- package/dist-es/commands/index.js +5 -5
- package/dist-es/models/{GetRequestResult.js → GetAlimtalkResult.js} +0 -0
- package/dist-es/models/{GetRequestStatus.js → GetAlimtalkStatus.js} +0 -0
- package/dist-es/models/{GetTemplate.js → GetAlimtalkTemplate.js} +0 -0
- package/dist-es/models/{ListChannels.js → ListAlimtalkChannels.js} +0 -0
- package/dist-es/models/{ListTemplates.js → ListAlimtalkTemplates.js} +0 -0
- package/dist-es/models/index.js +5 -5
- package/dist-es/protocols/{GetRequestResult.js → GetAlimtalkResult.js} +7 -7
- package/dist-es/protocols/{GetRequestStatus.js → GetAlimtalkStatus.js} +8 -7
- package/dist-es/protocols/{GetTemplate.js → GetAlimtalkTemplate.js} +7 -7
- package/dist-es/protocols/{ListChannels.js → ListAlimtalkChannels.js} +7 -7
- package/dist-es/protocols/{ListTemplates.js → ListAlimtalkTemplates.js} +17 -14
- package/dist-es/protocols/index.js +5 -5
- package/dist-types/commands/GetAlimtalkResultCommand.d.ts +13 -0
- package/dist-types/commands/GetAlimtalkStatusCommand.d.ts +13 -0
- package/dist-types/commands/GetAlimtalkTemplateCommand.d.ts +13 -0
- package/dist-types/commands/ListAlimtalkChannelsCommand.d.ts +13 -0
- package/dist-types/commands/ListAlimtalkTemplatesCommand.d.ts +13 -0
- package/dist-types/commands/index.d.ts +5 -5
- package/dist-types/models/{GetRequestResult.d.ts → GetAlimtalkResult.d.ts} +3 -3
- package/dist-types/models/{GetRequestStatus.d.ts → GetAlimtalkStatus.d.ts} +2 -2
- package/dist-types/models/GetAlimtalkTemplate.d.ts +6 -0
- package/dist-types/models/{ListChannels.d.ts → ListAlimtalkChannels.d.ts} +2 -2
- package/dist-types/models/{ListTemplates.d.ts → ListAlimtalkTemplates.d.ts} +2 -2
- package/dist-types/models/index.d.ts +5 -5
- package/dist-types/protocols/GetAlimtalkResult.d.ts +8 -0
- package/dist-types/protocols/GetAlimtalkStatus.d.ts +8 -0
- package/dist-types/protocols/GetAlimtalkTemplate.d.ts +7 -0
- package/dist-types/protocols/ListAlimtalkChannels.d.ts +8 -0
- package/dist-types/protocols/ListAlimtalkTemplates.d.ts +10 -0
- package/dist-types/protocols/index.d.ts +5 -5
- package/package.json +9 -2
- package/dist-cjs/commands/ListTemplatesCommand.js +0 -44
- package/dist-es/commands/ListTemplatesCommand.js +0 -29
- package/dist-types/commands/GetRequestResultCommand.d.ts +0 -13
- package/dist-types/commands/GetRequestStatusCommand.d.ts +0 -13
- package/dist-types/commands/GetTemplateCommand.d.ts +0 -13
- package/dist-types/commands/ListChannelsCommand.d.ts +0 -13
- package/dist-types/commands/ListTemplatesCommand.d.ts +0 -13
- package/dist-types/models/GetTemplate.d.ts +0 -6
- package/dist-types/protocols/GetRequestResult.d.ts +0 -8
- package/dist-types/protocols/GetRequestStatus.d.ts +0 -8
- package/dist-types/protocols/GetTemplate.d.ts +0 -7
- package/dist-types/protocols/ListChannels.d.ts +0 -8
- package/dist-types/protocols/ListTemplates.d.ts +0 -10
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@ingestkorea/client-sens)
|
|
4
4
|
[](https://www.npmjs.com/package/@ingestkorea/client-sens)
|
|
5
|
+

|
|
5
6
|
|
|
6
7
|
## Description
|
|
7
8
|
INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.
|
|
@@ -20,20 +21,21 @@ npm install @ingestkorea/client-sens
|
|
|
20
21
|
npm install -D @types/node # save dev mode
|
|
21
22
|
```
|
|
22
23
|
|
|
23
|
-
### Support
|
|
24
|
+
### Support Commands
|
|
24
25
|
+ SendAlimtalk
|
|
25
|
-
+ GetRequestStatus
|
|
26
|
-
+ GetRequestResult
|
|
27
|
-
+
|
|
26
|
+
+ GetAlimtalkStatus (`GetRequestStatus` is deprecated)
|
|
27
|
+
+ GetAlimtalkResult (`GetRequestResult` is deprecated)
|
|
28
|
+
+ GetAlimtalkTemplate (`GetTemplate` is deprecated)
|
|
29
|
+
+ ListAlimtalkTemplates (`ListTemplates` is deprecated)
|
|
30
|
+
+ ListAlimtalkChannels (`ListChannels` is deprecated)
|
|
28
31
|
+ SendSMS
|
|
29
|
-
+ ListTemplates
|
|
30
|
-
+ GetTemplate
|
|
31
32
|
|
|
32
33
|
### Import
|
|
33
34
|
```ts
|
|
34
35
|
import {
|
|
35
36
|
SensClient,
|
|
36
|
-
SendAlimtalkCommand, SendAlimtalkCommandInput
|
|
37
|
+
SendAlimtalkCommand, SendAlimtalkCommandInput,
|
|
38
|
+
SendSMSCommand, SendSMSCommandInput,
|
|
37
39
|
} from '@ingestkorea/client-sens';
|
|
38
40
|
```
|
|
39
41
|
|
|
@@ -50,13 +52,17 @@ const client = new SensClient({
|
|
|
50
52
|
accessKey: ACCESS_KEY,
|
|
51
53
|
secretKey: SECRET_KEY
|
|
52
54
|
},
|
|
53
|
-
serviceId: {
|
|
55
|
+
serviceId: {
|
|
54
56
|
sms: 'ncp:sms:kr:123456789xxx:your-service-name', // optional
|
|
55
57
|
kakao: 'ncp:kkobizmsg:kr:9876xxx:your-service-name' // optional
|
|
58
|
+
// at least one serviceId required
|
|
56
59
|
// if you call send operation without serviceId, sdk throw error
|
|
57
60
|
}
|
|
58
61
|
});
|
|
62
|
+
```
|
|
59
63
|
|
|
64
|
+
#### SendAlimtalk
|
|
65
|
+
```ts
|
|
60
66
|
let params: SendAlimtalkCommandInput = {
|
|
61
67
|
plusFriendId: PLUS_FRIEND_ID,
|
|
62
68
|
templateCode: TEMPLATE_CODE,
|
|
@@ -67,12 +73,29 @@ let params: SendAlimtalkCommandInput = {
|
|
|
67
73
|
let command = new SendAlimtalkCommand(params);
|
|
68
74
|
```
|
|
69
75
|
|
|
76
|
+
#### SendSMS
|
|
77
|
+
```ts
|
|
78
|
+
/**
|
|
79
|
+
* Automatically set message type('SMS' | 'LMS') according to content-length(euc-kr)
|
|
80
|
+
* SMS: max 80bytes
|
|
81
|
+
* LMS: max 2000bytes
|
|
82
|
+
*/
|
|
83
|
+
let params: SendSMSCommandInput = {
|
|
84
|
+
from: '01012345678',
|
|
85
|
+
content: CONTENT,
|
|
86
|
+
messages: [
|
|
87
|
+
{ to: '01087654321' }
|
|
88
|
+
]
|
|
89
|
+
};
|
|
90
|
+
let command = new SendSMSCommand(params);
|
|
91
|
+
```
|
|
92
|
+
|
|
70
93
|
#### Async/await
|
|
71
94
|
```ts
|
|
72
95
|
(async () => {
|
|
73
96
|
try {
|
|
74
|
-
const
|
|
75
|
-
console.dir(
|
|
97
|
+
const data = await client.send(command);
|
|
98
|
+
console.dir(data, { depth: 4 });
|
|
76
99
|
} catch (err){
|
|
77
100
|
console.dir(err, { depth: 4 });
|
|
78
101
|
};
|
|
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GetAlimtalkResultCommand = void 0;
|
|
13
13
|
const models_1 = require("../models");
|
|
14
|
-
const
|
|
14
|
+
const GetAlimtalkResult_1 = require("../protocols/GetAlimtalkResult");
|
|
15
15
|
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
16
16
|
;
|
|
17
17
|
;
|
|
18
|
-
class
|
|
18
|
+
class GetAlimtalkResultCommand extends models_1.SensCommand {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
21
|
this.input = Object.assign({}, input);
|
|
@@ -27,18 +27,18 @@ class GetRequestResultCommand extends models_1.SensCommand {
|
|
|
27
27
|
throw new util_error_handler_1.IngestkoreaError({
|
|
28
28
|
code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
|
|
29
29
|
});
|
|
30
|
-
let request = yield (0,
|
|
30
|
+
let request = yield (0, GetAlimtalkResult_1.serializeIngestkorea_restJson_GetAlimtalkResultCommand)(input, config);
|
|
31
31
|
return request;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
;
|
|
35
35
|
deserialize(response) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
let output = yield (0,
|
|
37
|
+
let output = yield (0, GetAlimtalkResult_1.deserializeIngestkorea_restJson_GetAlimtalkResultCommand)(response);
|
|
38
38
|
return output;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
;
|
|
42
42
|
}
|
|
43
|
-
exports.
|
|
43
|
+
exports.GetAlimtalkResultCommand = GetAlimtalkResultCommand;
|
|
44
44
|
;
|
|
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GetAlimtalkStatusCommand = void 0;
|
|
13
13
|
const models_1 = require("../models");
|
|
14
|
-
const
|
|
14
|
+
const GetAlimtalkStatus_1 = require("../protocols/GetAlimtalkStatus");
|
|
15
15
|
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
16
16
|
;
|
|
17
17
|
;
|
|
18
|
-
class
|
|
18
|
+
class GetAlimtalkStatusCommand extends models_1.SensCommand {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
21
|
this.input = Object.assign({}, input);
|
|
@@ -27,18 +27,18 @@ class GetRequestStatusCommand extends models_1.SensCommand {
|
|
|
27
27
|
throw new util_error_handler_1.IngestkoreaError({
|
|
28
28
|
code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
|
|
29
29
|
});
|
|
30
|
-
let request = yield (0,
|
|
30
|
+
let request = yield (0, GetAlimtalkStatus_1.serializeIngestkorea_restJson_GetAlimtalkStatusCommand)(input, config);
|
|
31
31
|
return request;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
;
|
|
35
35
|
deserialize(response) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
let output = yield (0,
|
|
37
|
+
let output = yield (0, GetAlimtalkStatus_1.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand)(response);
|
|
38
38
|
return output;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
;
|
|
42
42
|
}
|
|
43
|
-
exports.
|
|
43
|
+
exports.GetAlimtalkStatusCommand = GetAlimtalkStatusCommand;
|
|
44
44
|
;
|
|
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.GetAlimtalkTemplateCommand = void 0;
|
|
13
13
|
const models_1 = require("../models");
|
|
14
|
-
const
|
|
14
|
+
const GetAlimtalkTemplate_1 = require("../protocols/GetAlimtalkTemplate");
|
|
15
15
|
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
16
16
|
;
|
|
17
17
|
;
|
|
18
|
-
class
|
|
18
|
+
class GetAlimtalkTemplateCommand extends models_1.SensCommand {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
21
|
this.input = Object.assign({}, input);
|
|
@@ -27,18 +27,18 @@ class GetTemplateCommand extends models_1.SensCommand {
|
|
|
27
27
|
throw new util_error_handler_1.IngestkoreaError({
|
|
28
28
|
code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
|
|
29
29
|
});
|
|
30
|
-
let request = yield (0,
|
|
30
|
+
let request = yield (0, GetAlimtalkTemplate_1.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand)(input, config);
|
|
31
31
|
return request;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
;
|
|
35
35
|
deserialize(response) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
let output = yield (0,
|
|
37
|
+
let output = yield (0, GetAlimtalkTemplate_1.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand)(response);
|
|
38
38
|
return output;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
;
|
|
42
42
|
}
|
|
43
|
-
exports.
|
|
43
|
+
exports.GetAlimtalkTemplateCommand = GetAlimtalkTemplateCommand;
|
|
44
44
|
;
|
|
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.ListAlimtalkChannelsCommand = void 0;
|
|
13
13
|
const models_1 = require("../models");
|
|
14
|
-
const
|
|
14
|
+
const ListAlimtalkChannels_1 = require("../protocols/ListAlimtalkChannels");
|
|
15
15
|
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
16
16
|
;
|
|
17
17
|
;
|
|
18
|
-
class
|
|
18
|
+
class ListAlimtalkChannelsCommand extends models_1.SensCommand {
|
|
19
19
|
constructor(input) {
|
|
20
20
|
super(input);
|
|
21
21
|
this.input = Object.assign({}, input);
|
|
@@ -27,18 +27,18 @@ class ListChannelsCommand extends models_1.SensCommand {
|
|
|
27
27
|
throw new util_error_handler_1.IngestkoreaError({
|
|
28
28
|
code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
|
|
29
29
|
});
|
|
30
|
-
let request = yield (0,
|
|
30
|
+
let request = yield (0, ListAlimtalkChannels_1.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand)(input, config);
|
|
31
31
|
return request;
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
;
|
|
35
35
|
deserialize(response) {
|
|
36
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
-
let output = yield (0,
|
|
37
|
+
let output = yield (0, ListAlimtalkChannels_1.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand)(response);
|
|
38
38
|
return output;
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
;
|
|
42
42
|
}
|
|
43
|
-
exports.
|
|
43
|
+
exports.ListAlimtalkChannelsCommand = ListAlimtalkChannelsCommand;
|
|
44
44
|
;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ListAlimtalkTemplatesCommand = void 0;
|
|
13
|
+
const models_1 = require("../models");
|
|
14
|
+
const ListAlimtalkTemplates_1 = require("../protocols/ListAlimtalkTemplates");
|
|
15
|
+
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
16
|
+
;
|
|
17
|
+
;
|
|
18
|
+
class ListAlimtalkTemplatesCommand extends models_1.SensCommand {
|
|
19
|
+
constructor(input) {
|
|
20
|
+
super(input);
|
|
21
|
+
this.input = Object.assign({}, input);
|
|
22
|
+
}
|
|
23
|
+
;
|
|
24
|
+
serialize(input, config) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
if (!config.serviceId.kakao)
|
|
27
|
+
throw new util_error_handler_1.IngestkoreaError({
|
|
28
|
+
code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
|
|
29
|
+
});
|
|
30
|
+
let request = yield (0, ListAlimtalkTemplates_1.serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand)(input, config);
|
|
31
|
+
return request;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
;
|
|
35
|
+
deserialize(response) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
let output = yield (0, ListAlimtalkTemplates_1.deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand)(response);
|
|
38
|
+
return output;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
;
|
|
42
|
+
}
|
|
43
|
+
exports.ListAlimtalkTemplatesCommand = ListAlimtalkTemplatesCommand;
|
|
44
|
+
;
|
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./SendAlimtalkCommand"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./GetAlimtalkStatusCommand"), exports);
|
|
19
|
+
__exportStar(require("./GetAlimtalkResultCommand"), exports);
|
|
20
|
+
__exportStar(require("./GetAlimtalkTemplateCommand"), exports);
|
|
21
|
+
__exportStar(require("./ListAlimtalkTemplatesCommand"), exports);
|
|
22
|
+
__exportStar(require("./ListAlimtalkChannelsCommand"), exports);
|
|
21
23
|
__exportStar(require("./SendSMSCommand"), exports);
|
|
22
|
-
__exportStar(require("./ListTemplatesCommand"), exports);
|
|
23
|
-
__exportStar(require("./GetTemplateCommand"), exports);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist-cjs/models/index.js
CHANGED
|
@@ -16,9 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./SensCommand"), exports);
|
|
18
18
|
__exportStar(require("./SendAlimtalk"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
19
|
+
__exportStar(require("./GetAlimtalkStatus"), exports);
|
|
20
|
+
__exportStar(require("./GetAlimtalkResult"), exports);
|
|
21
|
+
__exportStar(require("./GetAlimtalkTemplate"), exports);
|
|
22
|
+
__exportStar(require("./ListAlimtalkTemplates"), exports);
|
|
23
|
+
__exportStar(require("./ListAlimtalkChannels"), exports);
|
|
22
24
|
__exportStar(require("./SendSMS"), exports);
|
|
23
|
-
__exportStar(require("./ListTemplates"), exports);
|
|
24
|
-
__exportStar(require("./GetTemplate"), exports);
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.deserializeIngestkorea_restJson_AlimtalkFailover = exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkResultCommand = exports.serializeIngestkorea_restJson_GetAlimtalkResultCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
14
|
const constants_1 = require("./constants");
|
|
15
|
-
const
|
|
15
|
+
const serializeIngestkorea_restJson_GetAlimtalkResultCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
16
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
17
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages/" + input.messageId;
|
|
18
18
|
const headers = {
|
|
@@ -26,18 +26,18 @@ const serializeIngestkorea_restJson_GetRequestResultCommand = (input, config) =>
|
|
|
26
26
|
headers: headers
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
29
|
+
exports.serializeIngestkorea_restJson_GetAlimtalkResultCommand = serializeIngestkorea_restJson_GetAlimtalkResultCommand;
|
|
30
|
+
const deserializeIngestkorea_restJson_GetAlimtalkResultCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
31
|
if (output.statusCode > 300)
|
|
32
32
|
yield (0, constants_1.parseErrorBody)(output);
|
|
33
|
-
const data = yield (0, constants_1.parseBody)(output); //
|
|
33
|
+
const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkResultOutput
|
|
34
34
|
let contents = {};
|
|
35
|
-
contents = yield (0, exports.
|
|
35
|
+
contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput)(data);
|
|
36
36
|
const response = Object.assign({}, contents);
|
|
37
37
|
return response;
|
|
38
38
|
});
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
39
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkResultCommand = deserializeIngestkorea_restJson_GetAlimtalkResultCommand;
|
|
40
|
+
const deserializeIngestkorea_restJson_GetAlimtalkResultOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
41
|
return {
|
|
42
42
|
requestId: output.requestId != undefined ? output.requestId : undefined,
|
|
43
43
|
messageId: output.messageId != undefined ? output.messageId : undefined,
|
|
@@ -56,11 +56,11 @@ const deserializeIngestkorea_restJson_GetRequestResultOutput = (output) => __awa
|
|
|
56
56
|
messageStatusName: output.messageStatusName != undefined ? output.messageStatusName : undefined,
|
|
57
57
|
messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined,
|
|
58
58
|
failover: output.failover != undefined ?
|
|
59
|
-
(0, exports.
|
|
59
|
+
(0, exports.deserializeIngestkorea_restJson_AlimtalkFailover)(output.failover) : undefined,
|
|
60
60
|
};
|
|
61
61
|
});
|
|
62
|
-
exports.
|
|
63
|
-
const
|
|
62
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput = deserializeIngestkorea_restJson_GetAlimtalkResultOutput;
|
|
63
|
+
const deserializeIngestkorea_restJson_AlimtalkFailover = (output) => {
|
|
64
64
|
return {
|
|
65
65
|
smsServiceId: output.smsServiceId != undefined ? output.smsServiceId : undefined,
|
|
66
66
|
requestId: output.requestId != undefined ? output.requestId : undefined,
|
|
@@ -74,4 +74,4 @@ const deserializeIngestkorea_restJson_GetRequestResultFailover = (output) => {
|
|
|
74
74
|
messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined,
|
|
75
75
|
};
|
|
76
76
|
};
|
|
77
|
-
exports.
|
|
77
|
+
exports.deserializeIngestkorea_restJson_AlimtalkFailover = deserializeIngestkorea_restJson_AlimtalkFailover;
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
14
|
const constants_1 = require("./constants");
|
|
15
|
-
const
|
|
15
|
+
const serializeIngestkorea_restJson_GetAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
16
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
17
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
|
|
18
18
|
const headers = {
|
|
@@ -30,28 +30,29 @@ const serializeIngestkorea_restJson_GetRequestStatusCommand = (input, config) =>
|
|
|
30
30
|
query: query
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
-
exports.
|
|
34
|
-
const
|
|
33
|
+
exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = serializeIngestkorea_restJson_GetAlimtalkStatusCommand;
|
|
34
|
+
const deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
35
|
if (output.statusCode > 300)
|
|
36
36
|
yield (0, constants_1.parseErrorBody)(output);
|
|
37
|
-
const data = yield (0, constants_1.parseBody)(output); //
|
|
37
|
+
const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkStatusOutput
|
|
38
38
|
let contents = {};
|
|
39
|
-
contents = yield (0, exports.
|
|
39
|
+
contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput)(data);
|
|
40
40
|
const response = Object.assign({}, contents);
|
|
41
41
|
return response;
|
|
42
42
|
});
|
|
43
|
-
exports.
|
|
44
|
-
const
|
|
43
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = deserializeIngestkorea_restJson_GetAlimtalkStatusCommand;
|
|
44
|
+
const deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
45
|
const { requestId, statusCode, statusName, messages } = output;
|
|
46
46
|
return {
|
|
47
47
|
requestId: requestId != undefined ? requestId : undefined,
|
|
48
48
|
statusCode: statusCode != undefined ? statusCode : undefined,
|
|
49
49
|
statusName: statusName != undefined ? statusName : undefined,
|
|
50
|
-
messages: messages != undefined
|
|
50
|
+
messages: messages != undefined
|
|
51
|
+
? (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages)(messages) : undefined
|
|
51
52
|
};
|
|
52
53
|
});
|
|
53
|
-
exports.
|
|
54
|
-
const
|
|
54
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = deserializeIngestkorea_restJson_GetAlimtalkStatusOutput;
|
|
55
|
+
const deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = (outputs) => {
|
|
55
56
|
const result = outputs.map(output => {
|
|
56
57
|
return {
|
|
57
58
|
messageId: output.messageId != undefined ? output.messageId : undefined,
|
|
@@ -73,4 +74,4 @@ const deserializeIngestkorea_restJson_GetRequestStatusMessages = (outputs) => {
|
|
|
73
74
|
});
|
|
74
75
|
return result;
|
|
75
76
|
};
|
|
76
|
-
exports.
|
|
77
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = deserializeIngestkorea_restJson_GetAlimtalkStatusMessages;
|
|
@@ -9,11 +9,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
|
-
const
|
|
14
|
+
const ListAlimtalkTemplates_1 = require("./ListAlimtalkTemplates");
|
|
15
15
|
const constants_1 = require("./constants");
|
|
16
|
-
const
|
|
16
|
+
const serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
17
|
const hostname = "sens.apigw.ntruss.com";
|
|
18
18
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
|
|
19
19
|
const headers = {
|
|
@@ -32,20 +32,20 @@ const serializeIngestkorea_restJson_GetTemplateCommand = (input, config) => __aw
|
|
|
32
32
|
headers: headers
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
|
-
exports.
|
|
36
|
-
const
|
|
35
|
+
exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = serializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
|
|
36
|
+
const deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
37
|
if (output.statusCode > 300)
|
|
38
38
|
yield (0, constants_1.parseErrorBody)(output);
|
|
39
|
-
const data = yield (0, constants_1.parseBody)(output); //
|
|
39
|
+
const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkTemplateOutput
|
|
40
40
|
let contents = {};
|
|
41
|
-
contents = yield (0, exports.
|
|
41
|
+
contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput)(data);
|
|
42
42
|
const response = Object.assign({}, contents);
|
|
43
43
|
return response;
|
|
44
44
|
});
|
|
45
|
-
exports.
|
|
46
|
-
const
|
|
45
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
|
|
46
|
+
const deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
47
|
return {
|
|
48
|
-
templates: (0,
|
|
48
|
+
templates: (0, ListAlimtalkTemplates_1.deserializeIngestkorea_restJson_AlimtalkTemplate)(output)
|
|
49
49
|
};
|
|
50
50
|
});
|
|
51
|
-
exports.
|
|
51
|
+
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput;
|
|
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.deserializeIngestkorea_restJson_Channel = exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = exports.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
14
|
const constants_1 = require("./constants");
|
|
15
|
-
const
|
|
15
|
+
const serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
16
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
17
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/channels";
|
|
18
18
|
const headers = {
|
|
@@ -26,24 +26,24 @@ const serializeIngestkorea_restJson_ListChannelsCommand = (input, config) => __a
|
|
|
26
26
|
headers: headers
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
-
exports.
|
|
30
|
-
const
|
|
29
|
+
exports.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = serializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
|
|
30
|
+
const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
31
|
if (output.statusCode > 300)
|
|
32
32
|
yield (0, constants_1.parseErrorBody)(output);
|
|
33
|
-
const data = yield (0, constants_1.parseBody)(output); //
|
|
33
|
+
const data = yield (0, constants_1.parseBody)(output); // ListAlimtalkChannelsOutput
|
|
34
34
|
let contents = {};
|
|
35
|
-
contents = yield (0, exports.
|
|
35
|
+
contents = yield (0, exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput)(data);
|
|
36
36
|
const response = Object.assign({}, contents);
|
|
37
37
|
return response;
|
|
38
38
|
});
|
|
39
|
-
exports.
|
|
40
|
-
const
|
|
39
|
+
exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
|
|
40
|
+
const deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = (outputs) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
41
|
return {
|
|
42
|
-
channels: (0, exports.
|
|
42
|
+
channels: (0, exports.deserializeIngestkorea_restJson_Channel)(outputs)
|
|
43
43
|
};
|
|
44
44
|
});
|
|
45
|
-
exports.
|
|
46
|
-
const
|
|
45
|
+
exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput;
|
|
46
|
+
const deserializeIngestkorea_restJson_Channel = (outputs) => {
|
|
47
47
|
const result = outputs.map(output => {
|
|
48
48
|
return {
|
|
49
49
|
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
@@ -57,4 +57,4 @@ const deserializeIngestkorea_restJson_ListChannelsChannelInfo = (outputs) => {
|
|
|
57
57
|
});
|
|
58
58
|
return result;
|
|
59
59
|
};
|
|
60
|
-
exports.
|
|
60
|
+
exports.deserializeIngestkorea_restJson_Channel = deserializeIngestkorea_restJson_Channel;
|