@ingestkorea/client-sens 1.5.3 → 1.7.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 +38 -27
- package/dist-cjs/SensClient.js +17 -18
- package/dist-cjs/commands/GetAlimtalkResultCommand.js +3 -1
- package/dist-cjs/commands/GetAlimtalkStatusCommand.js +3 -1
- package/dist-cjs/commands/GetAlimtalkTemplateCommand.js +4 -1
- package/dist-cjs/commands/ListAlimtalkStatusCommand.js +43 -0
- package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +3 -1
- package/dist-cjs/commands/SendAlimtalkCommand.js +14 -10
- package/dist-cjs/commands/constants.js +12 -1
- package/dist-cjs/commands/index.js +1 -0
- package/dist-cjs/middleware/index.js +4 -2
- package/dist-cjs/middleware/{metadata-ingestkorea.js → middleware-metadata.js} +3 -12
- package/dist-cjs/middleware/middleware-retry.js +58 -0
- package/dist-cjs/middleware/middleware-sort-headers.js +25 -0
- package/dist-cjs/models/ListAlimtalkStatus.js +2 -0
- package/dist-cjs/models/MetadataBearer.js +2 -0
- package/dist-cjs/models/Middleware.js +2 -0
- package/dist-cjs/models/SendAlimtalk.js +2 -0
- package/dist-cjs/models/index.js +3 -0
- package/dist-cjs/protocols/GetAlimtalkResult.js +8 -28
- package/dist-cjs/protocols/GetAlimtalkStatus.js +22 -33
- package/dist-cjs/protocols/GetAlimtalkTemplate.js +81 -9
- package/dist-cjs/protocols/GetSMSResult.js +7 -9
- package/dist-cjs/protocols/GetSMSStatus.js +7 -9
- package/dist-cjs/protocols/ListAlimtalkChannels.js +6 -6
- package/dist-cjs/protocols/ListAlimtalkStatus.js +45 -0
- package/dist-cjs/protocols/ListAlimtalkTemplates.js +20 -54
- package/dist-cjs/protocols/SendAlimtalk.js +22 -22
- package/dist-cjs/protocols/SendMMS.js +6 -6
- package/dist-cjs/protocols/SendSMS.js +6 -6
- package/dist-cjs/protocols/constants.js +7 -1
- package/dist-cjs/protocols/index.js +2 -0
- package/dist-es/SensClient.js +20 -21
- package/dist-es/commands/GetAlimtalkResultCommand.js +1 -1
- package/dist-es/commands/GetAlimtalkStatusCommand.js +1 -1
- package/dist-es/commands/GetAlimtalkTemplateCommand.js +2 -1
- package/dist-es/commands/ListAlimtalkStatusCommand.js +38 -0
- package/dist-es/commands/ListAlimtalkTemplatesCommand.js +1 -1
- package/dist-es/commands/SendAlimtalkCommand.js +18 -14
- package/dist-es/commands/SendMMSCommand.js +1 -1
- package/dist-es/commands/SendSMSCommand.js +1 -1
- package/dist-es/commands/constants.js +10 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/index.js +2 -2
- package/dist-es/middleware/index.js +4 -2
- package/dist-es/middleware/middleware-metadata.js +6 -0
- package/dist-es/middleware/middleware-retry.js +51 -0
- package/dist-es/middleware/middleware-sort-headers.js +12 -0
- package/dist-es/models/ListAlimtalkStatus.js +1 -0
- package/dist-es/models/MetadataBearer.js +1 -0
- package/dist-es/models/Middleware.js +1 -0
- package/dist-es/models/SendAlimtalk.js +2 -0
- package/dist-es/models/index.js +3 -0
- package/dist-es/protocols/GetAlimtalkResult.js +13 -26
- package/dist-es/protocols/GetAlimtalkStatus.js +34 -32
- package/dist-es/protocols/GetAlimtalkTemplate.js +81 -9
- package/dist-es/protocols/GetSMSResult.js +12 -10
- package/dist-es/protocols/GetSMSStatus.js +12 -10
- package/dist-es/protocols/ListAlimtalkChannels.js +11 -7
- package/dist-es/protocols/ListAlimtalkStatus.js +48 -0
- package/dist-es/protocols/ListAlimtalkTemplates.js +22 -51
- package/dist-es/protocols/SendAlimtalk.js +25 -22
- package/dist-es/protocols/SendMMS.js +11 -7
- package/dist-es/protocols/SendSMS.js +11 -7
- package/dist-es/protocols/constants.js +5 -0
- package/dist-es/protocols/index.js +2 -0
- package/dist-types/SensClient.d.ts +2 -2
- package/dist-types/commands/GetAlimtalkResultCommand.d.ts +6 -3
- package/dist-types/commands/GetAlimtalkStatusCommand.d.ts +6 -3
- package/dist-types/commands/GetAlimtalkTemplateCommand.d.ts +6 -3
- package/dist-types/commands/GetSMSResultCommand.d.ts +6 -3
- package/dist-types/commands/GetSMSStatusCommand.d.ts +6 -3
- package/dist-types/commands/ListAlimtalkChannelsCommand.d.ts +6 -3
- package/dist-types/commands/ListAlimtalkStatusCommand.d.ts +16 -0
- package/dist-types/commands/ListAlimtalkTemplatesCommand.d.ts +6 -3
- package/dist-types/commands/SendAlimtalkCommand.d.ts +6 -3
- package/dist-types/commands/SendMMSCommand.d.ts +6 -3
- package/dist-types/commands/SendSMSCommand.d.ts +6 -3
- package/dist-types/commands/constants.d.ts +4 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/index.d.ts +2 -2
- package/dist-types/middleware/index.d.ts +4 -2
- package/dist-types/middleware/middleware-metadata.d.ts +2 -0
- package/dist-types/middleware/middleware-retry.d.ts +2 -0
- package/dist-types/middleware/middleware-sign.d.ts +2 -0
- package/dist-types/middleware/middleware-sort-headers.d.ts +2 -0
- package/dist-types/models/GetAlimtalkResult.d.ts +0 -1
- package/dist-types/models/GetAlimtalkStatus.d.ts +5 -0
- package/dist-types/models/GetAlimtalkTemplate.d.ts +42 -3
- package/dist-types/models/ListAlimtalkStatus.d.ts +16 -0
- package/dist-types/models/ListAlimtalkTemplates.d.ts +0 -20
- package/dist-types/models/MetadataBearer.d.ts +8 -0
- package/dist-types/models/Middleware.d.ts +12 -0
- package/dist-types/models/SendAlimtalk.d.ts +13 -6
- package/dist-types/models/SensCommand.d.ts +5 -1
- package/dist-types/models/index.d.ts +3 -0
- package/dist-types/protocols/GetAlimtalkResult.d.ts +5 -2
- package/dist-types/protocols/GetAlimtalkStatus.d.ts +6 -2
- package/dist-types/protocols/GetAlimtalkTemplate.d.ts +10 -3
- package/dist-types/protocols/GetSMSResult.d.ts +5 -2
- package/dist-types/protocols/GetSMSStatus.d.ts +5 -2
- package/dist-types/protocols/ListAlimtalkChannels.d.ts +5 -2
- package/dist-types/protocols/ListAlimtalkStatus.d.ts +10 -0
- package/dist-types/protocols/ListAlimtalkTemplates.d.ts +8 -6
- package/dist-types/protocols/SendAlimtalk.d.ts +6 -2
- package/dist-types/protocols/SendMMS.d.ts +5 -2
- package/dist-types/protocols/SendSMS.d.ts +5 -2
- package/dist-types/protocols/constants.d.ts +2 -0
- package/dist-types/protocols/index.d.ts +2 -0
- package/package.json +3 -2
- package/.prettierignore +0 -3
- package/dist-es/middleware/metadata-ingestkorea.js +0 -19
- package/dist-types/middleware/metadata-ingestkorea.d.ts +0 -3
- package/dist-types/middleware/signer-ncp.d.ts +0 -3
- /package/dist-cjs/middleware/{signer-ncp.js → middleware-sign.js} +0 -0
- /package/dist-es/middleware/{signer-ncp.js → middleware-sign.js} +0 -0
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = void 0;
|
|
12
|
+
exports.parseStatusMessage = 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
|
-
const
|
|
14
|
+
const _1 = require("./");
|
|
15
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";
|
|
@@ -31,48 +31,37 @@ const serializeIngestkorea_restJson_GetAlimtalkStatusCommand = (input, config) =
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = serializeIngestkorea_restJson_GetAlimtalkStatusCommand;
|
|
34
|
-
const deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const { response: httpResponse, output } = response;
|
|
36
|
+
if (httpResponse.statusCode > 300)
|
|
37
|
+
yield (0, _1.parseErrorBody)(httpResponse);
|
|
38
|
+
const data = yield (0, _1.parseBody)(httpResponse);
|
|
38
39
|
let contents = {};
|
|
39
40
|
contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput)(data);
|
|
40
|
-
|
|
41
|
-
return response;
|
|
41
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, _1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
42
42
|
});
|
|
43
43
|
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = deserializeIngestkorea_restJson_GetAlimtalkStatusCommand;
|
|
44
44
|
const deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
-
const { requestId, statusCode, statusName, messages } = output;
|
|
46
45
|
return {
|
|
47
|
-
requestId: requestId != undefined ? requestId : undefined,
|
|
48
|
-
statusCode: statusCode != undefined ? statusCode : undefined,
|
|
49
|
-
statusName: statusName != undefined ? statusName : undefined,
|
|
50
|
-
messages: messages != undefined
|
|
51
|
-
? (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages)(messages)
|
|
46
|
+
requestId: output.requestId != undefined ? output.requestId : undefined,
|
|
47
|
+
statusCode: output.statusCode != undefined ? output.statusCode : undefined,
|
|
48
|
+
statusName: output.statusName != undefined ? output.statusName : undefined,
|
|
49
|
+
messages: output.messages != undefined
|
|
50
|
+
? (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages)(output.messages)
|
|
52
51
|
: undefined,
|
|
52
|
+
pageSize: output.pageSize != undefined ? output.pageSize : undefined,
|
|
53
|
+
pageIndex: output.pageIndex != undefined ? output.pageIndex : undefined,
|
|
54
|
+
itemCount: output.itemCount != undefined ? output.itemCount : undefined,
|
|
55
|
+
hasMore: output.hasMore != undefined ? output.hasMore : undefined,
|
|
53
56
|
};
|
|
54
57
|
});
|
|
55
58
|
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = deserializeIngestkorea_restJson_GetAlimtalkStatusOutput;
|
|
56
59
|
const deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = (outputs) => {
|
|
57
|
-
const result = outputs.map(
|
|
58
|
-
return {
|
|
59
|
-
messageId: output.messageId != undefined ? output.messageId : undefined,
|
|
60
|
-
to: output.to != undefined ? output.to : undefined,
|
|
61
|
-
countryCode: output.countryCode != undefined ? output.countryCode : undefined,
|
|
62
|
-
content: output.content != undefined ? output.content : undefined,
|
|
63
|
-
requestStatusCode: output.requestStatusCode != undefined ? output.requestStatusCode : undefined,
|
|
64
|
-
requestStatusName: output.requestStatusName != undefined ? output.requestStatusName : undefined,
|
|
65
|
-
requestStatusDesc: output.requestStatusDesc != undefined ? output.requestStatusDesc : undefined,
|
|
66
|
-
useSmsFailover: output.useSmsFailover != undefined ? output.useSmsFailover : undefined,
|
|
67
|
-
requestTime: output.requestTime != undefined ? output.requestTime : undefined,
|
|
68
|
-
plusFriendId: output.plusFriendId != undefined ? output.plusFriendId : undefined,
|
|
69
|
-
templateCode: output.templateCode != undefined ? output.templateCode : undefined,
|
|
70
|
-
completeTime: output.completeTime != undefined ? output.completeTime : undefined,
|
|
71
|
-
messageStatusCode: output.messageStatusCode != undefined ? output.messageStatusCode : undefined,
|
|
72
|
-
messageStatusName: output.messageStatusName != undefined ? output.messageStatusName : undefined,
|
|
73
|
-
messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined,
|
|
74
|
-
};
|
|
75
|
-
});
|
|
60
|
+
const result = outputs.map(exports.parseStatusMessage);
|
|
76
61
|
return result;
|
|
77
62
|
};
|
|
78
63
|
exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = deserializeIngestkorea_restJson_GetAlimtalkStatusMessages;
|
|
64
|
+
const parseStatusMessage = (output) => {
|
|
65
|
+
return Object.assign(Object.assign({}, (0, _1.parseReceivedMessage)(output)), { requestId: output.requestId != undefined ? output.requestId : undefined, requestTime: output.requestTime != undefined ? output.requestTime : undefined, plusFriendId: output.plusFriendId != undefined ? output.plusFriendId : undefined, templateCode: output.templateCode != undefined ? output.templateCode : undefined, completeTime: output.completeTime != undefined ? output.completeTime : undefined, messageStatusCode: output.messageStatusCode != undefined ? output.messageStatusCode : undefined, messageStatusName: output.messageStatusName != undefined ? output.messageStatusName : undefined, messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined });
|
|
66
|
+
};
|
|
67
|
+
exports.parseStatusMessage = parseStatusMessage;
|
|
@@ -9,9 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = void 0;
|
|
12
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplateButton = exports.deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment = exports.deserializeIngestkorea_restJson_AlimtalkTemplateComment = exports.deserializeIngestkorea_restJson_AlimtalkTemplateDetail = 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 ListAlimtalkTemplates_1 = require("./ListAlimtalkTemplates");
|
|
15
14
|
const constants_1 = require("./constants");
|
|
16
15
|
const serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
16
|
const hostname = "sens.apigw.ntruss.com";
|
|
@@ -33,19 +32,92 @@ const serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (input, config)
|
|
|
33
32
|
});
|
|
34
33
|
});
|
|
35
34
|
exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = serializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
|
|
36
|
-
const deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
const deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
|
+
const { response: httpResponse, output } = response;
|
|
37
|
+
if (httpResponse.statusCode > 300)
|
|
38
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
39
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // GetAlimtalkTemplateOutput
|
|
40
40
|
let contents = {};
|
|
41
41
|
contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput)(data);
|
|
42
|
-
|
|
43
|
-
return response;
|
|
42
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
44
43
|
});
|
|
45
44
|
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
|
|
46
45
|
const deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
47
46
|
return {
|
|
48
|
-
templates: (0,
|
|
47
|
+
templates: (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateDetail)(output),
|
|
49
48
|
};
|
|
50
49
|
});
|
|
51
50
|
exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput;
|
|
51
|
+
const deserializeIngestkorea_restJson_AlimtalkTemplateDetail = (outputs) => {
|
|
52
|
+
let result = outputs.map((output) => {
|
|
53
|
+
return {
|
|
54
|
+
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
55
|
+
updateTime: output.updateTime != undefined ? output.updateTime : undefined,
|
|
56
|
+
channelId: output.channelId != undefined ? output.channelId : undefined,
|
|
57
|
+
templateCode: output.templateCode != undefined ? output.templateCode : undefined,
|
|
58
|
+
templateName: output.templateName != undefined ? output.templateName : undefined,
|
|
59
|
+
categoryCode: output.categoryCode != undefined ? output.categoryCode : undefined,
|
|
60
|
+
categoryName: output.categoryName != undefined ? output.categoryName : undefined,
|
|
61
|
+
messageType: output.messageType != undefined ? output.messageType : undefined,
|
|
62
|
+
emphasizeType: output.emphasizeType != undefined ? output.emphasizeType : undefined,
|
|
63
|
+
content: output.content != undefined ? output.content : undefined,
|
|
64
|
+
adContent: output.adContent != undefined ? output.adContent : undefined,
|
|
65
|
+
extraContent: output.extraContent != undefined ? output.extraContent : undefined,
|
|
66
|
+
title: output.title != undefined ? output.title : undefined,
|
|
67
|
+
additionalTitle: output.additionalTitle != undefined ? output.additionalTitle : undefined,
|
|
68
|
+
comments: output.comments != undefined
|
|
69
|
+
? (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateComment)(output.comments)
|
|
70
|
+
: undefined,
|
|
71
|
+
templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined,
|
|
72
|
+
templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined,
|
|
73
|
+
buttons: output.buttons != undefined
|
|
74
|
+
? (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateButton)(output.buttons)
|
|
75
|
+
: undefined,
|
|
76
|
+
securityFlag: output.securityFlag != null ? output.securityFlag : undefined,
|
|
77
|
+
isBlock: output.isBlock != null ? output.isBlock : undefined,
|
|
78
|
+
isDormant: output.isDormant != null ? output.isDormant : undefined,
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
return result;
|
|
82
|
+
};
|
|
83
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplateDetail = deserializeIngestkorea_restJson_AlimtalkTemplateDetail;
|
|
84
|
+
const deserializeIngestkorea_restJson_AlimtalkTemplateComment = (outputs) => {
|
|
85
|
+
let result = outputs.map((output) => {
|
|
86
|
+
return {
|
|
87
|
+
commentId: output.commentId != undefined ? output.commentId : undefined,
|
|
88
|
+
content: output.content != undefined ? output.content : undefined,
|
|
89
|
+
status: output.status != undefined ? output.status : undefined,
|
|
90
|
+
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
91
|
+
attachment: output.attachment != undefined
|
|
92
|
+
? (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment)(output.attachment)
|
|
93
|
+
: undefined,
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
return result;
|
|
97
|
+
};
|
|
98
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplateComment = deserializeIngestkorea_restJson_AlimtalkTemplateComment;
|
|
99
|
+
const deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment = (outputs) => {
|
|
100
|
+
let result = outputs.map((output) => {
|
|
101
|
+
return {
|
|
102
|
+
fileName: output.fileName != undefined ? output.fileName : undefined,
|
|
103
|
+
fileUrl: output.fileUrl != undefined ? output.fileUrl : undefined,
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
return result;
|
|
107
|
+
};
|
|
108
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment = deserializeIngestkorea_restJson_AlimtalkTemplateCommentAttachment;
|
|
109
|
+
const deserializeIngestkorea_restJson_AlimtalkTemplateButton = (outputs) => {
|
|
110
|
+
let result = outputs.map((output) => {
|
|
111
|
+
return {
|
|
112
|
+
order: output.order != undefined ? output.order : undefined,
|
|
113
|
+
type: output.type != undefined ? output.type : undefined,
|
|
114
|
+
name: output.name != undefined ? output.name : undefined,
|
|
115
|
+
linkMobile: output.linkMobile != undefined ? output.linkMobile : undefined,
|
|
116
|
+
linkPc: output.linkPc != undefined ? output.linkPc : undefined,
|
|
117
|
+
schemeIos: output.schemeIos != undefined ? output.schemeIos : undefined,
|
|
118
|
+
schemeAndroid: output.schemeAndroid != undefined ? output.schemeAndroid : undefined,
|
|
119
|
+
};
|
|
120
|
+
});
|
|
121
|
+
return result;
|
|
122
|
+
};
|
|
123
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplateButton = deserializeIngestkorea_restJson_AlimtalkTemplateButton;
|
|
@@ -27,23 +27,21 @@ const serializeIngestkorea_restJson_GetSMSResultCommand = (input, config) => __a
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
exports.serializeIngestkorea_restJson_GetSMSResultCommand = serializeIngestkorea_restJson_GetSMSResultCommand;
|
|
30
|
-
const deserializeIngestkorea_restJson_GetSMSResultCommand = (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const deserializeIngestkorea_restJson_GetSMSResultCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
const { response: httpResponse, output } = response;
|
|
32
|
+
if (httpResponse.statusCode > 300)
|
|
33
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
34
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // GetSMSResultOutput
|
|
34
35
|
let contents = {};
|
|
35
36
|
contents = yield (0, exports.deserializeIngestkorea_restJson_GetSMSResultOutput)(data);
|
|
36
|
-
|
|
37
|
-
return response;
|
|
37
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
38
38
|
});
|
|
39
39
|
exports.deserializeIngestkorea_restJson_GetSMSResultCommand = deserializeIngestkorea_restJson_GetSMSResultCommand;
|
|
40
40
|
const deserializeIngestkorea_restJson_GetSMSResultOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
41
41
|
return {
|
|
42
42
|
statusCode: output.statusCode ? output.statusCode : undefined,
|
|
43
43
|
statusName: output.statusName ? output.statusName : undefined,
|
|
44
|
-
messages: output.messages
|
|
45
|
-
? (0, exports.deserializeIngestkorea_restJson_SMSResultMessage)(output.messages)
|
|
46
|
-
: undefined,
|
|
44
|
+
messages: output.messages ? (0, exports.deserializeIngestkorea_restJson_SMSResultMessage)(output.messages) : undefined,
|
|
47
45
|
};
|
|
48
46
|
});
|
|
49
47
|
exports.deserializeIngestkorea_restJson_GetSMSResultOutput = deserializeIngestkorea_restJson_GetSMSResultOutput;
|
|
@@ -31,14 +31,14 @@ const serializeIngestkorea_restJson_GetSMSStatusCommand = (input, config) => __a
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
exports.serializeIngestkorea_restJson_GetSMSStatusCommand = serializeIngestkorea_restJson_GetSMSStatusCommand;
|
|
34
|
-
const deserializeIngestkorea_restJson_GetSMSStatusCommand = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const deserializeIngestkorea_restJson_GetSMSStatusCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const { response: httpResponse, output } = response;
|
|
36
|
+
if (httpResponse.statusCode > 300)
|
|
37
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
38
|
+
const data = yield (0, constants_1.parseBody)(httpResponse);
|
|
38
39
|
let contents = {};
|
|
39
40
|
contents = yield (0, exports.deserializeIngestkorea_restJson_GetSMSStatusOutput)(data);
|
|
40
|
-
|
|
41
|
-
return response;
|
|
41
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
42
42
|
});
|
|
43
43
|
exports.deserializeIngestkorea_restJson_GetSMSStatusCommand = deserializeIngestkorea_restJson_GetSMSStatusCommand;
|
|
44
44
|
const deserializeIngestkorea_restJson_GetSMSStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -46,9 +46,7 @@ const deserializeIngestkorea_restJson_GetSMSStatusOutput = (output) => __awaiter
|
|
|
46
46
|
requestId: output.requestId ? output.requestId : undefined,
|
|
47
47
|
statusCode: output.statusCode ? output.statusCode : undefined,
|
|
48
48
|
statusName: output.statusName ? output.statusName : undefined,
|
|
49
|
-
messages: output.messages
|
|
50
|
-
? (0, exports.deserializeIngestkorea_restJson_SMSStatusMessage)(output.messages)
|
|
51
|
-
: undefined,
|
|
49
|
+
messages: output.messages ? (0, exports.deserializeIngestkorea_restJson_SMSStatusMessage)(output.messages) : undefined,
|
|
52
50
|
};
|
|
53
51
|
});
|
|
54
52
|
exports.deserializeIngestkorea_restJson_GetSMSStatusOutput = deserializeIngestkorea_restJson_GetSMSStatusOutput;
|
|
@@ -27,14 +27,14 @@ const serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (input, config
|
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
29
|
exports.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = serializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
|
|
30
|
-
const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
31
|
+
const { response: httpResponse, output } = response;
|
|
32
|
+
if (httpResponse.statusCode > 300)
|
|
33
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
34
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // ListAlimtalkChannelsOutput
|
|
34
35
|
let contents = {};
|
|
35
36
|
contents = yield (0, exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput)(data);
|
|
36
|
-
|
|
37
|
-
return response;
|
|
37
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
38
38
|
});
|
|
39
39
|
exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
|
|
40
40
|
const deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = (outputs) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -0,0 +1,45 @@
|
|
|
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.deserializeIngestkorea_restJson_ListAlimtalkStatusOutput = exports.deserializeIngestkorea_restJson_ListAlimtalkStatusCommand = exports.serializeIngestkorea_restJson_ListAlimtalkStatusCommand = void 0;
|
|
13
|
+
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
|
+
const _1 = require("./");
|
|
15
|
+
const serializeIngestkorea_restJson_ListAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
16
|
+
const hostname = "sens.apigw.ntruss.com";
|
|
17
|
+
const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
|
|
18
|
+
const headers = {
|
|
19
|
+
host: hostname,
|
|
20
|
+
};
|
|
21
|
+
const query = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ plusFriendId: input.plusFriendId }, (input.requestId && { requestId: input.requestId })), (input.messageId && { messageId: input.messageId })), (input.requestStatusName && { requestStatusName: input.requestStatusName })), (input.messageStatusName && { messageStatusName: input.messageStatusName })), (input.templateCode && { templateCode: input.templateCode })), (input.to && { to: input.to.replace(/\-/gi, "") })), (input.requestStartTime && { requestStartTime: input.requestStartTime })), (input.requestEndTime && { requestEndTime: input.requestEndTime })), (input.pageIndex != null && { pageIndex: input.pageIndex.toString() })), (input.pageSize && { pageSize: input.pageSize.toString() }));
|
|
22
|
+
return new util_http_handler_1.HttpRequest({
|
|
23
|
+
protocol: "https:",
|
|
24
|
+
method: "GET",
|
|
25
|
+
hostname: hostname,
|
|
26
|
+
path: path,
|
|
27
|
+
headers: headers,
|
|
28
|
+
query: query,
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
exports.serializeIngestkorea_restJson_ListAlimtalkStatusCommand = serializeIngestkorea_restJson_ListAlimtalkStatusCommand;
|
|
32
|
+
const deserializeIngestkorea_restJson_ListAlimtalkStatusCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
33
|
+
const { response: httpResponse, output } = response;
|
|
34
|
+
if (httpResponse.statusCode > 300)
|
|
35
|
+
yield (0, _1.parseErrorBody)(httpResponse);
|
|
36
|
+
const data = yield (0, _1.parseBody)(httpResponse);
|
|
37
|
+
let contents = {};
|
|
38
|
+
contents = yield (0, exports.deserializeIngestkorea_restJson_ListAlimtalkStatusOutput)(data);
|
|
39
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, _1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
40
|
+
});
|
|
41
|
+
exports.deserializeIngestkorea_restJson_ListAlimtalkStatusCommand = deserializeIngestkorea_restJson_ListAlimtalkStatusCommand;
|
|
42
|
+
const deserializeIngestkorea_restJson_ListAlimtalkStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
43
|
+
return (0, _1.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput)(output);
|
|
44
|
+
});
|
|
45
|
+
exports.deserializeIngestkorea_restJson_ListAlimtalkStatusOutput = deserializeIngestkorea_restJson_ListAlimtalkStatusOutput;
|
|
@@ -9,7 +9,7 @@ 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.parseTemplate = exports.deserializeIngestkorea_restJson_AlimtalkTemplates = exports.deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput = exports.deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = exports.serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
14
|
const constants_1 = require("./constants");
|
|
15
15
|
const serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -31,68 +31,34 @@ const serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = (input, confi
|
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
exports.serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand;
|
|
34
|
-
const deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
35
|
+
const { response: httpResponse, output } = response;
|
|
36
|
+
if (httpResponse.statusCode > 300)
|
|
37
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
38
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // ListAlimtalkTemplatesOutput
|
|
38
39
|
let contents = {};
|
|
39
40
|
contents = yield (0, exports.deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput)(data);
|
|
40
|
-
|
|
41
|
-
return response;
|
|
41
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
42
42
|
});
|
|
43
43
|
exports.deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand;
|
|
44
44
|
const deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
45
|
return {
|
|
46
|
-
templates: (0, exports.
|
|
46
|
+
templates: (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplates)(output),
|
|
47
47
|
};
|
|
48
48
|
});
|
|
49
49
|
exports.deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput = deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput;
|
|
50
|
-
const
|
|
51
|
-
let result = outputs.map(
|
|
52
|
-
return {
|
|
53
|
-
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
54
|
-
updateTime: output.updateTime != undefined ? output.updateTime : undefined,
|
|
55
|
-
channelId: output.channelId != undefined ? output.channelId : undefined,
|
|
56
|
-
templateCode: output.templateCode != undefined ? output.templateCode : undefined,
|
|
57
|
-
templateName: output.templateName != undefined ? output.templateName : undefined,
|
|
58
|
-
content: output.content != undefined ? output.content : undefined,
|
|
59
|
-
comments: output.comments != undefined
|
|
60
|
-
? (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateComment)(output.comments)
|
|
61
|
-
: undefined,
|
|
62
|
-
templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined,
|
|
63
|
-
templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined,
|
|
64
|
-
buttons: output.buttons != undefined
|
|
65
|
-
? (0, exports.deserializeIngestkorea_restJson_AlimtalkTemplateButton)(output.buttons)
|
|
66
|
-
: undefined,
|
|
67
|
-
};
|
|
68
|
-
});
|
|
69
|
-
return result;
|
|
70
|
-
};
|
|
71
|
-
exports.deserializeIngestkorea_restJson_AlimtalkTemplate = deserializeIngestkorea_restJson_AlimtalkTemplate;
|
|
72
|
-
const deserializeIngestkorea_restJson_AlimtalkTemplateComment = (outputs) => {
|
|
73
|
-
let result = outputs.map((output) => {
|
|
74
|
-
return {
|
|
75
|
-
commentId: output.commentId != undefined ? output.commentId : undefined,
|
|
76
|
-
content: output.content != undefined ? output.content : undefined,
|
|
77
|
-
status: output.status != undefined ? output.status : undefined,
|
|
78
|
-
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
79
|
-
};
|
|
80
|
-
});
|
|
50
|
+
const deserializeIngestkorea_restJson_AlimtalkTemplates = (outputs) => {
|
|
51
|
+
let result = outputs.map(exports.parseTemplate);
|
|
81
52
|
return result;
|
|
82
53
|
};
|
|
83
|
-
exports.
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
schemeIos: output.schemeIos != undefined ? output.schemeIos : undefined,
|
|
93
|
-
schemeAndroid: output.schemeAndroid != undefined ? output.schemeAndroid : undefined,
|
|
94
|
-
};
|
|
95
|
-
});
|
|
96
|
-
return result;
|
|
54
|
+
exports.deserializeIngestkorea_restJson_AlimtalkTemplates = deserializeIngestkorea_restJson_AlimtalkTemplates;
|
|
55
|
+
const parseTemplate = (output) => {
|
|
56
|
+
return {
|
|
57
|
+
createTime: output.createTime != undefined ? output.createTime : undefined,
|
|
58
|
+
updateTime: output.updateTime != undefined ? output.updateTime : undefined,
|
|
59
|
+
channelId: output.channelId != undefined ? output.channelId : undefined,
|
|
60
|
+
templateCode: output.templateCode != undefined ? output.templateCode : undefined,
|
|
61
|
+
templateName: output.templateName != undefined ? output.templateName : undefined,
|
|
62
|
+
};
|
|
97
63
|
};
|
|
98
|
-
exports.
|
|
64
|
+
exports.parseTemplate = parseTemplate;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.deserializeIngestkorea_restJson_ReceivedMessages = exports.deserializeIngestkorea_restJson_SendMessageOutput = exports.deserializeIngestkorea_restJson_SendAlimtalkCommand = exports.serializeIngestkorea_restJson_SendAlimtalkCommand = void 0;
|
|
12
|
+
exports.parseReceivedMessage = exports.deserializeIngestkorea_restJson_ReceivedMessages = exports.deserializeIngestkorea_restJson_SendMessageOutput = exports.deserializeIngestkorea_restJson_SendAlimtalkCommand = exports.serializeIngestkorea_restJson_SendAlimtalkCommand = void 0;
|
|
13
13
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
14
14
|
const constants_1 = require("./constants");
|
|
15
15
|
const serializeIngestkorea_restJson_SendAlimtalkCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -34,14 +34,14 @@ const serializeIngestkorea_restJson_SendAlimtalkCommand = (input, config) => __a
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
exports.serializeIngestkorea_restJson_SendAlimtalkCommand = serializeIngestkorea_restJson_SendAlimtalkCommand;
|
|
37
|
-
const deserializeIngestkorea_restJson_SendAlimtalkCommand = (
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
const deserializeIngestkorea_restJson_SendAlimtalkCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const { response: httpResponse, output } = response;
|
|
39
|
+
if (httpResponse.statusCode > 300)
|
|
40
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
41
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // SendAlimtalkCommandOutput
|
|
41
42
|
let contents = {};
|
|
42
43
|
contents = yield (0, exports.deserializeIngestkorea_restJson_SendMessageOutput)(data);
|
|
43
|
-
|
|
44
|
-
return response;
|
|
44
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
45
45
|
});
|
|
46
46
|
exports.deserializeIngestkorea_restJson_SendAlimtalkCommand = deserializeIngestkorea_restJson_SendAlimtalkCommand;
|
|
47
47
|
const deserializeIngestkorea_restJson_SendMessageOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -50,25 +50,25 @@ const deserializeIngestkorea_restJson_SendMessageOutput = (output) => __awaiter(
|
|
|
50
50
|
requestTime: output.requestTime != undefined ? output.requestTime : undefined,
|
|
51
51
|
statusCode: output.statusCode != undefined ? output.statusCode : undefined,
|
|
52
52
|
statusName: output.statusName != undefined ? output.statusName : undefined,
|
|
53
|
-
messages: output.messages != undefined
|
|
54
|
-
? (0, exports.deserializeIngestkorea_restJson_ReceivedMessages)(output.messages)
|
|
55
|
-
: undefined,
|
|
53
|
+
messages: output.messages != undefined ? (0, exports.deserializeIngestkorea_restJson_ReceivedMessages)(output.messages) : undefined,
|
|
56
54
|
};
|
|
57
55
|
});
|
|
58
56
|
exports.deserializeIngestkorea_restJson_SendMessageOutput = deserializeIngestkorea_restJson_SendMessageOutput;
|
|
59
57
|
const deserializeIngestkorea_restJson_ReceivedMessages = (outputs) => {
|
|
60
|
-
const result = outputs.map(
|
|
61
|
-
return {
|
|
62
|
-
messageId: output.messageId != undefined ? output.messageId : undefined,
|
|
63
|
-
to: output.to != undefined ? output.to : undefined,
|
|
64
|
-
countryCode: output.countryCode != undefined ? output.countryCode : undefined,
|
|
65
|
-
content: output.content != undefined ? output.content : undefined,
|
|
66
|
-
requestStatusCode: output.requestStatusCode != undefined ? output.requestStatusCode : undefined,
|
|
67
|
-
requestStatusName: output.requestStatusName != undefined ? output.requestStatusName : undefined,
|
|
68
|
-
requestStatusDesc: output.requestStatusDesc != undefined ? output.requestStatusDesc : undefined,
|
|
69
|
-
useSmsFailover: output.useSmsFailover != undefined ? output.useSmsFailover : undefined,
|
|
70
|
-
};
|
|
71
|
-
});
|
|
58
|
+
const result = outputs.map(exports.parseReceivedMessage);
|
|
72
59
|
return result;
|
|
73
60
|
};
|
|
74
61
|
exports.deserializeIngestkorea_restJson_ReceivedMessages = deserializeIngestkorea_restJson_ReceivedMessages;
|
|
62
|
+
const parseReceivedMessage = (output) => {
|
|
63
|
+
return {
|
|
64
|
+
messageId: output.messageId != undefined ? output.messageId : undefined,
|
|
65
|
+
to: output.to != undefined ? output.to : undefined,
|
|
66
|
+
countryCode: output.countryCode != undefined ? output.countryCode : undefined,
|
|
67
|
+
content: output.content != undefined ? output.content : undefined,
|
|
68
|
+
requestStatusCode: output.requestStatusCode != undefined ? output.requestStatusCode : undefined,
|
|
69
|
+
requestStatusName: output.requestStatusName != undefined ? output.requestStatusName : undefined,
|
|
70
|
+
requestStatusDesc: output.requestStatusDesc != undefined ? output.requestStatusDesc : undefined,
|
|
71
|
+
useSmsFailover: output.useSmsFailover != undefined ? output.useSmsFailover : undefined,
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
exports.parseReceivedMessage = parseReceivedMessage;
|
|
@@ -30,14 +30,14 @@ const serializeIngestkorea_restJson_SendMMSCommand = (input, config) => __awaite
|
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
exports.serializeIngestkorea_restJson_SendMMSCommand = serializeIngestkorea_restJson_SendMMSCommand;
|
|
33
|
-
const deserializeIngestkorea_restJson_SendMMSCommand = (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const deserializeIngestkorea_restJson_SendMMSCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const { response: httpResponse, output } = response;
|
|
35
|
+
if (httpResponse.statusCode > 300)
|
|
36
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
37
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // SendSMSOutput
|
|
37
38
|
let contents = {};
|
|
38
39
|
contents = yield (0, exports.deserializeIngestkorea_restJson_SendMMSOutput)(data);
|
|
39
|
-
|
|
40
|
-
return response;
|
|
40
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
41
41
|
});
|
|
42
42
|
exports.deserializeIngestkorea_restJson_SendMMSCommand = deserializeIngestkorea_restJson_SendMMSCommand;
|
|
43
43
|
const deserializeIngestkorea_restJson_SendMMSOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -30,14 +30,14 @@ const serializeIngestkorea_restJson_SendSMSCommand = (input, config) => __awaite
|
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
exports.serializeIngestkorea_restJson_SendSMSCommand = serializeIngestkorea_restJson_SendSMSCommand;
|
|
33
|
-
const deserializeIngestkorea_restJson_SendSMSCommand = (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
const deserializeIngestkorea_restJson_SendSMSCommand = (response) => __awaiter(void 0, void 0, void 0, function* () {
|
|
34
|
+
const { response: httpResponse, output } = response;
|
|
35
|
+
if (httpResponse.statusCode > 300)
|
|
36
|
+
yield (0, constants_1.parseErrorBody)(httpResponse);
|
|
37
|
+
const data = yield (0, constants_1.parseBody)(httpResponse); // SendSMSOutput
|
|
37
38
|
let contents = {};
|
|
38
39
|
contents = yield (0, exports.deserializeIngestkorea_restJson_SendSMSOutput)(data);
|
|
39
|
-
|
|
40
|
-
return response;
|
|
40
|
+
return Object.assign({ $metadata: Object.assign(Object.assign({}, (0, constants_1.deserializeMetadata)(httpResponse)), output.$metadata) }, contents);
|
|
41
41
|
});
|
|
42
42
|
exports.deserializeIngestkorea_restJson_SendSMSCommand = deserializeIngestkorea_restJson_SendSMSCommand;
|
|
43
43
|
const deserializeIngestkorea_restJson_SendSMSOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.parseErrorBody = exports.parseBody = void 0;
|
|
12
|
+
exports.deserializeMetadata = exports.parseErrorBody = exports.parseBody = void 0;
|
|
13
13
|
const util_error_handler_1 = require("@ingestkorea/util-error-handler");
|
|
14
14
|
const util_http_handler_1 = require("@ingestkorea/util-http-handler");
|
|
15
15
|
const parseBody = (output) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -56,3 +56,9 @@ exports.parseErrorBody = parseErrorBody;
|
|
|
56
56
|
const verifyJsonHeader = (contentType) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
57
|
return /application\/json/gi.exec(contentType) ? true : false;
|
|
58
58
|
});
|
|
59
|
+
const deserializeMetadata = (response) => {
|
|
60
|
+
return {
|
|
61
|
+
httpStatusCode: response.statusCode,
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
exports.deserializeMetadata = deserializeMetadata;
|
|
@@ -18,9 +18,11 @@ __exportStar(require("./SendAlimtalk"), exports);
|
|
|
18
18
|
__exportStar(require("./GetAlimtalkStatus"), exports);
|
|
19
19
|
__exportStar(require("./GetAlimtalkResult"), exports);
|
|
20
20
|
__exportStar(require("./GetAlimtalkTemplate"), exports);
|
|
21
|
+
__exportStar(require("./ListAlimtalkStatus"), exports);
|
|
21
22
|
__exportStar(require("./ListAlimtalkTemplates"), exports);
|
|
22
23
|
__exportStar(require("./ListAlimtalkChannels"), exports);
|
|
23
24
|
__exportStar(require("./SendSMS"), exports);
|
|
24
25
|
__exportStar(require("./SendMMS"), exports);
|
|
25
26
|
__exportStar(require("./GetSMSStatus"), exports);
|
|
26
27
|
__exportStar(require("./GetSMSResult"), exports);
|
|
28
|
+
__exportStar(require("./constants"), exports);
|