@ingestkorea/client-sens 1.9.0 → 1.11.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.
- package/README.md +99 -57
- package/dist-cjs/SensClient.js +42 -43
- package/dist-cjs/commands/GetAlimtalkResultCommand.js +3 -0
- package/dist-cjs/commands/GetAlimtalkStatusCommand.js +8 -1
- package/dist-cjs/commands/GetAlimtalkTemplateCommand.js +3 -0
- package/dist-cjs/commands/GetSMSResultCommand.js +3 -0
- package/dist-cjs/commands/GetSMSStatusCommand.js +8 -1
- package/dist-cjs/commands/ListAlimtalkChannelsCommand.js +3 -0
- package/dist-cjs/commands/ListAlimtalkStatusCommand.js +22 -10
- package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +3 -0
- package/dist-cjs/commands/ListSMSStatusCommand.js +21 -10
- package/dist-cjs/commands/SendAlimtalkCommand.js +15 -14
- package/dist-cjs/commands/SendMMSCommand.js +16 -23
- package/dist-cjs/commands/SendSMSCommand.js +28 -16
- package/dist-cjs/commands/constants.js +8 -19
- package/dist-cjs/index.js +1 -0
- package/dist-cjs/middleware/constants.js +2 -1
- package/dist-cjs/middleware/middleware-metadata.js +7 -12
- package/dist-cjs/middleware/middleware-retry.js +48 -38
- package/dist-cjs/middleware/middleware-sign.js +8 -12
- package/dist-cjs/models/SensApiError.js +21 -0
- package/dist-cjs/models/{SensErrorInfo.js → SensClientError.js} +6 -1
- package/dist-cjs/models/SensCommand.js +1 -0
- package/dist-cjs/models/index.js +2 -1
- package/dist-cjs/protocols/GetAlimtalkResult.js +14 -17
- package/dist-cjs/protocols/GetAlimtalkStatus.js +21 -17
- package/dist-cjs/protocols/GetAlimtalkTemplate.js +29 -17
- package/dist-cjs/protocols/GetSMSResult.js +16 -17
- package/dist-cjs/protocols/GetSMSStatus.js +10 -16
- package/dist-cjs/protocols/ListAlimtalkChannels.js +10 -16
- package/dist-cjs/protocols/ListAlimtalkStatus.js +10 -16
- package/dist-cjs/protocols/ListAlimtalkTemplates.js +12 -19
- package/dist-cjs/protocols/ListSMSStatus.js +10 -16
- package/dist-cjs/protocols/SendAlimtalk.js +10 -16
- package/dist-cjs/protocols/SendMMS.js +4 -13
- package/dist-cjs/protocols/SendSMS.js +11 -17
- package/dist-cjs/protocols/constants.js +124 -82
- package/dist-es/SensClient.js +37 -31
- package/dist-es/commands/GetAlimtalkResultCommand.js +8 -9
- package/dist-es/commands/GetAlimtalkStatusCommand.js +8 -9
- package/dist-es/commands/GetAlimtalkTemplateCommand.js +8 -9
- package/dist-es/commands/GetSMSResultCommand.js +8 -9
- package/dist-es/commands/GetSMSStatusCommand.js +8 -9
- package/dist-es/commands/ListAlimtalkChannelsCommand.js +8 -9
- package/dist-es/commands/ListAlimtalkStatusCommand.js +24 -28
- package/dist-es/commands/ListAlimtalkTemplatesCommand.js +8 -9
- package/dist-es/commands/ListSMSStatusCommand.js +25 -29
- package/dist-es/commands/SendAlimtalkCommand.js +18 -26
- package/dist-es/commands/SendMMSCommand.js +37 -48
- package/dist-es/commands/SendSMSCommand.js +25 -29
- package/dist-es/commands/constants.js +18 -39
- package/dist-es/commands/index.js +12 -28
- package/dist-es/index.js +3 -18
- package/dist-es/middleware/constants.js +8 -10
- package/dist-es/middleware/index.js +3 -19
- package/dist-es/middleware/middleware-metadata.js +4 -7
- package/dist-es/middleware/middleware-retry.js +47 -38
- package/dist-es/middleware/middleware-sign.js +9 -13
- package/dist-es/models/GetAlimtalkResult.js +1 -2
- package/dist-es/models/GetAlimtalkStatus.js +1 -2
- package/dist-es/models/GetAlimtalkTemplate.js +1 -2
- package/dist-es/models/GetSMSResult.js +1 -2
- package/dist-es/models/GetSMSStatus.js +1 -2
- package/dist-es/models/ListAlimtalkChannels.js +1 -2
- package/dist-es/models/ListAlimtalkStatus.js +1 -2
- package/dist-es/models/ListAlimtalkTemplates.js +1 -2
- package/dist-es/models/ListSMSStatus.js +1 -2
- package/dist-es/models/MetadataBearer.js +1 -2
- package/dist-es/models/SendAlimtalk.js +2 -5
- package/dist-es/models/SendMMS.js +2 -5
- package/dist-es/models/SendSMS.js +1 -2
- package/dist-es/models/SensApiError.js +18 -0
- package/dist-es/models/SensClient.js +1 -2
- package/dist-es/models/SensClientError.js +14 -0
- package/dist-es/models/SensCommand.js +2 -5
- package/dist-es/models/SensMiddleware.js +1 -2
- package/dist-es/models/index.js +18 -33
- package/dist-es/protocols/GetAlimtalkResult.js +11 -16
- package/dist-es/protocols/GetAlimtalkStatus.js +17 -24
- package/dist-es/protocols/GetAlimtalkTemplate.js +12 -17
- package/dist-es/protocols/GetSMSResult.js +11 -16
- package/dist-es/protocols/GetSMSStatus.js +15 -22
- package/dist-es/protocols/ListAlimtalkChannels.js +11 -16
- package/dist-es/protocols/ListAlimtalkStatus.js +11 -16
- package/dist-es/protocols/ListAlimtalkTemplates.js +15 -22
- package/dist-es/protocols/ListSMSStatus.js +11 -16
- package/dist-es/protocols/SendAlimtalk.js +12 -18
- package/dist-es/protocols/SendMMS.js +5 -10
- package/dist-es/protocols/SendSMS.js +12 -18
- package/dist-es/protocols/constants.js +126 -88
- package/dist-types/SensClient.d.ts +0 -1
- package/dist-types/index.d.ts +1 -0
- package/dist-types/middleware/constants.d.ts +1 -0
- package/dist-types/models/MetadataBearer.d.ts +1 -0
- package/dist-types/models/SensApiError.d.ts +55 -0
- package/dist-types/models/SensClient.d.ts +8 -1
- package/dist-types/models/SensClientError.d.ts +18 -0
- package/dist-types/models/index.d.ts +2 -1
- package/dist-types/protocols/constants.d.ts +1 -1
- package/package.json +4 -5
- package/dist-es/models/SensErrorInfo.js +0 -13
- package/dist-types/models/SensErrorInfo.d.ts +0 -21
|
@@ -1,19 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_GetAlimtalkTemplateCommand = exports.se_GetAlimtalkTemplateCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
6
|
const ListAlimtalkTemplates_js_1 = require("./ListAlimtalkTemplates.js");
|
|
16
|
-
const se_GetAlimtalkTemplateCommand = (input, config) =>
|
|
7
|
+
const se_GetAlimtalkTemplateCommand = async (input, config) => {
|
|
17
8
|
const hostname = "sens.apigw.ntruss.com";
|
|
18
9
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
|
|
19
10
|
const headers = {
|
|
@@ -31,15 +22,18 @@ const se_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void
|
|
|
31
22
|
query,
|
|
32
23
|
headers,
|
|
33
24
|
});
|
|
34
|
-
}
|
|
25
|
+
};
|
|
35
26
|
exports.se_GetAlimtalkTemplateCommand = se_GetAlimtalkTemplateCommand;
|
|
36
|
-
const de_GetAlimtalkTemplateCommand = (response, config) =>
|
|
27
|
+
const de_GetAlimtalkTemplateCommand = async (response, config) => {
|
|
37
28
|
if (response.statusCode >= 300)
|
|
38
|
-
|
|
39
|
-
const data =
|
|
29
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
30
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
40
31
|
const contents = de_GetAlimtalkTemplateResult(data);
|
|
41
|
-
return
|
|
42
|
-
|
|
32
|
+
return {
|
|
33
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
34
|
+
...(0, constants_js_1.compact)(contents),
|
|
35
|
+
};
|
|
36
|
+
};
|
|
43
37
|
exports.de_GetAlimtalkTemplateCommand = de_GetAlimtalkTemplateCommand;
|
|
44
38
|
const de_GetAlimtalkTemplateResult = (output) => {
|
|
45
39
|
return {
|
|
@@ -50,7 +44,25 @@ const de_TemplateDetailList = (output) => {
|
|
|
50
44
|
return (output || []).filter((e) => e != null).map((entry) => de_TemplateDetail(entry));
|
|
51
45
|
};
|
|
52
46
|
const de_TemplateDetail = (output) => {
|
|
53
|
-
return
|
|
47
|
+
return {
|
|
48
|
+
...(0, ListAlimtalkTemplates_js_1.de_Template)(output),
|
|
49
|
+
categoryCode: output.categoryCode != undefined ? output.categoryCode : undefined,
|
|
50
|
+
categoryName: output.categoryName != undefined ? output.categoryName : undefined,
|
|
51
|
+
messageType: output.messageType != undefined ? output.messageType : undefined,
|
|
52
|
+
emphasizeType: output.emphasizeType != undefined ? output.emphasizeType : undefined,
|
|
53
|
+
content: output.content != undefined ? output.content : undefined,
|
|
54
|
+
adContent: output.adContent != undefined ? output.adContent : undefined,
|
|
55
|
+
extraContent: output.extraContent != undefined ? output.extraContent : undefined,
|
|
56
|
+
title: output.title != undefined ? output.title : undefined,
|
|
57
|
+
additionalTitle: output.additionalTitle != undefined ? output.additionalTitle : undefined,
|
|
58
|
+
comments: output.comments != undefined ? de_CommentList(output.comments) : [],
|
|
59
|
+
templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined,
|
|
60
|
+
templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined,
|
|
61
|
+
buttons: output.buttons != undefined ? de_TemplateButtonExtendList(output.buttons) : [],
|
|
62
|
+
securityFlag: output.securityFlag !== undefined ? output.securityFlag : undefined,
|
|
63
|
+
isBlock: output.isBlock !== undefined ? output.isBlock : undefined,
|
|
64
|
+
isDormant: output.isDormant !== undefined ? output.isDormant : undefined,
|
|
65
|
+
};
|
|
54
66
|
};
|
|
55
67
|
const de_CommentList = (output) => {
|
|
56
68
|
return (output || []).filter((e) => e != null).map((entry) => de_Comment(entry));
|
|
@@ -1,19 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_GetSMSResultCommand = exports.se_GetSMSResultCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
6
|
const GetSMSStatus_js_1 = require("./GetSMSStatus.js");
|
|
16
|
-
const se_GetSMSResultCommand = (input, config) =>
|
|
7
|
+
const se_GetSMSResultCommand = async (input, config) => {
|
|
17
8
|
const hostname = "sens.apigw.ntruss.com";
|
|
18
9
|
const path = "/sms/v2/services/" + config.serviceId.sms + "/messages" + "/" + input.messageId;
|
|
19
10
|
const headers = {
|
|
@@ -26,15 +17,18 @@ const se_GetSMSResultCommand = (input, config) => __awaiter(void 0, void 0, void
|
|
|
26
17
|
path,
|
|
27
18
|
headers,
|
|
28
19
|
});
|
|
29
|
-
}
|
|
20
|
+
};
|
|
30
21
|
exports.se_GetSMSResultCommand = se_GetSMSResultCommand;
|
|
31
|
-
const de_GetSMSResultCommand = (response, config) =>
|
|
22
|
+
const de_GetSMSResultCommand = async (response, config) => {
|
|
32
23
|
if (response.statusCode >= 300)
|
|
33
|
-
|
|
34
|
-
const data =
|
|
24
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
25
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
35
26
|
const contents = de_GetSMSResultResult(data);
|
|
36
|
-
return
|
|
37
|
-
|
|
27
|
+
return {
|
|
28
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
29
|
+
...(0, constants_js_1.compact)(contents),
|
|
30
|
+
};
|
|
31
|
+
};
|
|
38
32
|
exports.de_GetSMSResultCommand = de_GetSMSResultCommand;
|
|
39
33
|
const de_GetSMSResultResult = (output) => {
|
|
40
34
|
return {
|
|
@@ -47,7 +41,12 @@ const de_SMSMessageStatusList = (output) => {
|
|
|
47
41
|
return (output || []).filter((e) => e != null).map((entry) => de_SMSMessageStatus(entry));
|
|
48
42
|
};
|
|
49
43
|
const de_SMSMessageStatus = (output) => {
|
|
50
|
-
return
|
|
44
|
+
return {
|
|
45
|
+
...(0, GetSMSStatus_js_1.de_SMSMessageRequestStatus)(output),
|
|
46
|
+
subject: output.subject ? output.subject : undefined,
|
|
47
|
+
content: output.content ? output.content : undefined,
|
|
48
|
+
files: output.files ? de_FileList(output.files) : [],
|
|
49
|
+
};
|
|
51
50
|
};
|
|
52
51
|
const de_FileList = (output) => {
|
|
53
52
|
return (output || []).filter((e) => e != null).map((entry) => de_File(entry));
|
|
@@ -1,18 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_SMSMessageRequestStatus = exports.de_GetSMSStatusResult = exports.de_GetSMSStatusCommand = exports.se_GetSMSStatusCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
|
-
const se_GetSMSStatusCommand = (input, config) =>
|
|
6
|
+
const se_GetSMSStatusCommand = async (input, config) => {
|
|
16
7
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
8
|
const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
|
|
18
9
|
const headers = {
|
|
@@ -32,15 +23,18 @@ const se_GetSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, void
|
|
|
32
23
|
query,
|
|
33
24
|
headers,
|
|
34
25
|
});
|
|
35
|
-
}
|
|
26
|
+
};
|
|
36
27
|
exports.se_GetSMSStatusCommand = se_GetSMSStatusCommand;
|
|
37
|
-
const de_GetSMSStatusCommand = (response, config) =>
|
|
28
|
+
const de_GetSMSStatusCommand = async (response, config) => {
|
|
38
29
|
if (response.statusCode >= 300)
|
|
39
|
-
|
|
40
|
-
const data =
|
|
30
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
31
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
41
32
|
const contents = (0, exports.de_GetSMSStatusResult)(data);
|
|
42
|
-
return
|
|
43
|
-
|
|
33
|
+
return {
|
|
34
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
35
|
+
...(0, constants_js_1.compact)(contents),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
44
38
|
exports.de_GetSMSStatusCommand = de_GetSMSStatusCommand;
|
|
45
39
|
const de_GetSMSStatusResult = (output) => {
|
|
46
40
|
return {
|
|
@@ -1,18 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_ListAlimtalkChannelsCommand = exports.se_ListAlimtalkChannelsCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
|
-
const se_ListAlimtalkChannelsCommand = (input, config) =>
|
|
6
|
+
const se_ListAlimtalkChannelsCommand = async (input, config) => {
|
|
16
7
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
8
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/channels";
|
|
18
9
|
const headers = {
|
|
@@ -25,15 +16,18 @@ const se_ListAlimtalkChannelsCommand = (input, config) => __awaiter(void 0, void
|
|
|
25
16
|
path: path,
|
|
26
17
|
headers: headers,
|
|
27
18
|
});
|
|
28
|
-
}
|
|
19
|
+
};
|
|
29
20
|
exports.se_ListAlimtalkChannelsCommand = se_ListAlimtalkChannelsCommand;
|
|
30
|
-
const de_ListAlimtalkChannelsCommand = (response, config) =>
|
|
21
|
+
const de_ListAlimtalkChannelsCommand = async (response, config) => {
|
|
31
22
|
if (response.statusCode >= 300)
|
|
32
|
-
|
|
33
|
-
const data =
|
|
23
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
24
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
34
25
|
const contents = de_ListAlimtalkChannelsResult(data);
|
|
35
|
-
return
|
|
36
|
-
|
|
26
|
+
return {
|
|
27
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
28
|
+
...(0, constants_js_1.compact)(contents),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
37
31
|
exports.de_ListAlimtalkChannelsCommand = de_ListAlimtalkChannelsCommand;
|
|
38
32
|
const de_ListAlimtalkChannelsResult = (output) => {
|
|
39
33
|
return {
|
|
@@ -1,19 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_ListAlimtalkStatusCommand = exports.se_ListAlimtalkStatusCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
6
|
const GetAlimtalkStatus_js_1 = require("./GetAlimtalkStatus.js");
|
|
16
|
-
const se_ListAlimtalkStatusCommand = (input, config) =>
|
|
7
|
+
const se_ListAlimtalkStatusCommand = async (input, config) => {
|
|
17
8
|
const hostname = "sens.apigw.ntruss.com";
|
|
18
9
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
|
|
19
10
|
const headers = {
|
|
@@ -33,15 +24,18 @@ const se_ListAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0
|
|
|
33
24
|
headers: headers,
|
|
34
25
|
query,
|
|
35
26
|
});
|
|
36
|
-
}
|
|
27
|
+
};
|
|
37
28
|
exports.se_ListAlimtalkStatusCommand = se_ListAlimtalkStatusCommand;
|
|
38
|
-
const de_ListAlimtalkStatusCommand = (response, config) =>
|
|
29
|
+
const de_ListAlimtalkStatusCommand = async (response, config) => {
|
|
39
30
|
if (response.statusCode >= 300)
|
|
40
|
-
|
|
41
|
-
const data =
|
|
31
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
32
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
42
33
|
const contents = de_ListAlimtalkStatusResult(data);
|
|
43
|
-
return
|
|
44
|
-
|
|
34
|
+
return {
|
|
35
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
36
|
+
...(0, constants_js_1.compact)(contents),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
45
39
|
exports.de_ListAlimtalkStatusCommand = de_ListAlimtalkStatusCommand;
|
|
46
40
|
const de_ListAlimtalkStatusResult = (output) => {
|
|
47
41
|
return (0, GetAlimtalkStatus_js_1.de_GetAlimtalkStatusResult)(output);
|
|
@@ -1,18 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_Template = exports.de_ListAlimtalkTemplatesCommand = exports.se_ListAlimtalkTemplatesCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
|
-
const se_ListAlimtalkTemplatesCommand = (input, config) =>
|
|
6
|
+
const se_ListAlimtalkTemplatesCommand = async (input, config) => {
|
|
16
7
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
8
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
|
|
18
9
|
const headers = {
|
|
@@ -29,15 +20,18 @@ const se_ListAlimtalkTemplatesCommand = (input, config) => __awaiter(void 0, voi
|
|
|
29
20
|
query: query,
|
|
30
21
|
headers: headers,
|
|
31
22
|
});
|
|
32
|
-
}
|
|
23
|
+
};
|
|
33
24
|
exports.se_ListAlimtalkTemplatesCommand = se_ListAlimtalkTemplatesCommand;
|
|
34
|
-
const de_ListAlimtalkTemplatesCommand = (response, config) =>
|
|
25
|
+
const de_ListAlimtalkTemplatesCommand = async (response, config) => {
|
|
35
26
|
if (response.statusCode >= 300)
|
|
36
|
-
|
|
37
|
-
const data =
|
|
27
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
28
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
38
29
|
const contents = de_ListAlimtalkTemplatesResult(data);
|
|
39
|
-
return
|
|
40
|
-
|
|
30
|
+
return {
|
|
31
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
32
|
+
...(0, constants_js_1.compact)(contents),
|
|
33
|
+
};
|
|
34
|
+
};
|
|
41
35
|
exports.de_ListAlimtalkTemplatesCommand = de_ListAlimtalkTemplatesCommand;
|
|
42
36
|
const de_ListAlimtalkTemplatesResult = (output) => {
|
|
43
37
|
return {
|
|
@@ -49,10 +43,9 @@ const de_TemplateList = (output) => {
|
|
|
49
43
|
.filter((e) => e != null)
|
|
50
44
|
.map((entry) => (0, exports.de_Template)(entry))
|
|
51
45
|
.sort((a, b) => {
|
|
52
|
-
var _a, _b;
|
|
53
46
|
// 생성 날짜 기준 내림차순
|
|
54
|
-
const dateA = (
|
|
55
|
-
const dateB = (
|
|
47
|
+
const dateA = (a.createTime ?? "").replace(/\.\d{3}Z?$/, "");
|
|
48
|
+
const dateB = (b.createTime ?? "").replace(/\.\d{3}Z?$/, "");
|
|
56
49
|
if (dateB < dateA)
|
|
57
50
|
return -1;
|
|
58
51
|
if (dateB > dateA)
|
|
@@ -1,19 +1,10 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_ListSMSStatusCommand = exports.se_ListSMSStatusCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
6
|
const GetSMSStatus_js_1 = require("./GetSMSStatus.js");
|
|
16
|
-
const se_ListSMSStatusCommand = (input, config) =>
|
|
7
|
+
const se_ListSMSStatusCommand = async (input, config) => {
|
|
17
8
|
const hostname = "sens.apigw.ntruss.com";
|
|
18
9
|
const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
|
|
19
10
|
const headers = {
|
|
@@ -33,15 +24,18 @@ const se_ListSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, voi
|
|
|
33
24
|
query,
|
|
34
25
|
headers,
|
|
35
26
|
});
|
|
36
|
-
}
|
|
27
|
+
};
|
|
37
28
|
exports.se_ListSMSStatusCommand = se_ListSMSStatusCommand;
|
|
38
|
-
const de_ListSMSStatusCommand = (response, config) =>
|
|
29
|
+
const de_ListSMSStatusCommand = async (response, config) => {
|
|
39
30
|
if (response.statusCode >= 300)
|
|
40
|
-
|
|
41
|
-
const data =
|
|
31
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
32
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
42
33
|
const contents = de_ListSMSStatusResult(data);
|
|
43
|
-
return
|
|
44
|
-
|
|
34
|
+
return {
|
|
35
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
36
|
+
...(0, constants_js_1.compact)(contents),
|
|
37
|
+
};
|
|
38
|
+
};
|
|
45
39
|
exports.de_ListSMSStatusCommand = de_ListSMSStatusCommand;
|
|
46
40
|
const de_ListSMSStatusResult = (output) => {
|
|
47
41
|
return (0, GetSMSStatus_js_1.de_GetSMSStatusResult)(output);
|
|
@@ -1,18 +1,9 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_AlimtalkMessageRequestStatus = exports.de_SendAlimtalkCommand = exports.se_SendAlimtalkCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
|
-
const se_SendAlimtalkCommand = (input, config) =>
|
|
6
|
+
const se_SendAlimtalkCommand = async (input, config) => {
|
|
16
7
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
8
|
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
|
|
18
9
|
const headers = {
|
|
@@ -32,15 +23,18 @@ const se_SendAlimtalkCommand = (input, config) => __awaiter(void 0, void 0, void
|
|
|
32
23
|
headers,
|
|
33
24
|
body,
|
|
34
25
|
});
|
|
35
|
-
}
|
|
26
|
+
};
|
|
36
27
|
exports.se_SendAlimtalkCommand = se_SendAlimtalkCommand;
|
|
37
|
-
const de_SendAlimtalkCommand = (response, config) =>
|
|
28
|
+
const de_SendAlimtalkCommand = async (response, config) => {
|
|
38
29
|
if (response.statusCode >= 300)
|
|
39
|
-
|
|
40
|
-
const data =
|
|
30
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
31
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
41
32
|
const contents = de_SendAlimtalkResult(data);
|
|
42
|
-
return
|
|
43
|
-
|
|
33
|
+
return {
|
|
34
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
35
|
+
...(0, constants_js_1.compact)(contents),
|
|
36
|
+
};
|
|
37
|
+
};
|
|
44
38
|
exports.de_SendAlimtalkCommand = de_SendAlimtalkCommand;
|
|
45
39
|
const de_SendAlimtalkResult = (output) => {
|
|
46
40
|
return {
|
|
@@ -1,21 +1,12 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_SendMMSCommand = exports.se_SendMMSCommand = void 0;
|
|
13
4
|
const SendSMS_js_1 = require("./SendSMS.js");
|
|
14
|
-
const se_SendMMSCommand = (input, config) =>
|
|
5
|
+
const se_SendMMSCommand = async (input, config) => {
|
|
15
6
|
return (0, SendSMS_js_1.se_SendSMSCommand)(input, config);
|
|
16
|
-
}
|
|
7
|
+
};
|
|
17
8
|
exports.se_SendMMSCommand = se_SendMMSCommand;
|
|
18
|
-
const de_SendMMSCommand = (response, config) =>
|
|
9
|
+
const de_SendMMSCommand = async (response, config) => {
|
|
19
10
|
return (0, SendSMS_js_1.de_SendSMSCommand)(response, config);
|
|
20
|
-
}
|
|
11
|
+
};
|
|
21
12
|
exports.de_SendMMSCommand = de_SendMMSCommand;
|
|
@@ -1,25 +1,16 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.de_SendSMSResult = exports.de_SendSMSCommand = exports.se_SendSMSCommand = void 0;
|
|
13
4
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
5
|
const constants_js_1 = require("./constants.js");
|
|
15
|
-
const se_SendSMSCommand = (input, config) =>
|
|
6
|
+
const se_SendSMSCommand = async (input, config) => {
|
|
16
7
|
const hostname = "sens.apigw.ntruss.com";
|
|
17
8
|
const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
|
|
18
9
|
const headers = {
|
|
19
10
|
"content-type": "application/json; charset=utf-8",
|
|
20
11
|
host: hostname,
|
|
21
12
|
};
|
|
22
|
-
const body = JSON.stringify(
|
|
13
|
+
const body = JSON.stringify({ ...input });
|
|
23
14
|
return new util_http_handler_1.HttpRequest({
|
|
24
15
|
protocol: "https:",
|
|
25
16
|
method: "POST",
|
|
@@ -28,15 +19,18 @@ const se_SendSMSCommand = (input, config) => __awaiter(void 0, void 0, void 0, f
|
|
|
28
19
|
headers,
|
|
29
20
|
body,
|
|
30
21
|
});
|
|
31
|
-
}
|
|
22
|
+
};
|
|
32
23
|
exports.se_SendSMSCommand = se_SendSMSCommand;
|
|
33
|
-
const de_SendSMSCommand = (response, config) =>
|
|
24
|
+
const de_SendSMSCommand = async (response, config) => {
|
|
34
25
|
if (response.statusCode >= 300)
|
|
35
|
-
|
|
36
|
-
const data =
|
|
26
|
+
await (0, constants_js_1.parseErrorBody)(response);
|
|
27
|
+
const data = await (0, constants_js_1.parseBody)(response);
|
|
37
28
|
const contents = (0, exports.de_SendSMSResult)(data);
|
|
38
|
-
return
|
|
39
|
-
|
|
29
|
+
return {
|
|
30
|
+
$metadata: (0, constants_js_1.deserializeMetadata)(response),
|
|
31
|
+
...(0, constants_js_1.compact)(contents),
|
|
32
|
+
};
|
|
33
|
+
};
|
|
40
34
|
exports.de_SendSMSCommand = de_SendSMSCommand;
|
|
41
35
|
const de_SendSMSResult = (output) => {
|
|
42
36
|
return {
|