@ingestkorea/client-sens 1.3.0 → 1.4.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 CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![npm (scoped)](https://img.shields.io/npm/v/@ingestkorea/client-sens?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/client-sens)
4
4
  [![NPM downloads](https://img.shields.io/npm/dm/@ingestkorea/client-sens?style=flat-square)](https://www.npmjs.com/package/@ingestkorea/client-sens)
5
+ ![Build Status](https://codebuild.ap-northeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiOTYrKzNDRklOaWJxS2ZoTkZvY05TU2VGVFdxWFlSWE9DZXJTYVBlbCtwc0J5YTcvdUFKRjlSc1RDTHNDV1J4YnhxMmRLaFdIakpSVWN3QzBHQXp0KzdRPSIsIml2UGFyYW1ldGVyU3BlYyI6IjQ1dUtTMlE1UWhmWmFTRGsiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=main)
5
6
 
6
7
  ## Description
7
8
  INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.
@@ -21,13 +22,19 @@ npm install @ingestkorea/client-sens
21
22
  ```
22
23
 
23
24
  ### Support Commands
25
+
26
+ #### Kakao Alimtalk
24
27
  + SendAlimtalk
25
28
  + GetAlimtalkStatus (`GetRequestStatus` is deprecated)
26
29
  + GetAlimtalkResult (`GetRequestResult` is deprecated)
27
30
  + GetAlimtalkTemplate (`GetTemplate` is deprecated)
28
31
  + ListAlimtalkTemplates (`ListTemplates` is deprecated)
29
32
  + ListAlimtalkChannels (`ListChannels` is deprecated)
33
+
34
+ #### SMS(LMS)
30
35
  + SendSMS
36
+ + GetSMSStatus
37
+ + GetSMSResult
31
38
 
32
39
  ### Import
33
40
  ```ts
@@ -0,0 +1,43 @@
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.GetSMSResultCommand = void 0;
13
+ const models_1 = require("../models");
14
+ const GetSMSResult_1 = require("../protocols/GetSMSResult");
15
+ const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
+ ;
17
+ ;
18
+ class GetSMSResultCommand 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.sms)
27
+ throw new util_error_handler_1.IngestkoreaError({
28
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check SMS ServiceId'
29
+ });
30
+ let request = yield (0, GetSMSResult_1.serializeIngestkorea_restJson_GetSMSResultCommand)(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, GetSMSResult_1.deserializeIngestkorea_restJson_GetSMSResultCommand)(response);
38
+ return output;
39
+ });
40
+ }
41
+ ;
42
+ }
43
+ exports.GetSMSResultCommand = GetSMSResultCommand;
@@ -0,0 +1,43 @@
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.GetSMSStatusCommand = void 0;
13
+ const models_1 = require("../models");
14
+ const GetSMSStatus_1 = require("../protocols/GetSMSStatus");
15
+ const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
+ ;
17
+ ;
18
+ class GetSMSStatusCommand 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.sms)
27
+ throw new util_error_handler_1.IngestkoreaError({
28
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check SMS ServiceId'
29
+ });
30
+ let request = yield (0, GetSMSStatus_1.serializeIngestkorea_restJson_GetSMSStatusCommand)(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, GetSMSStatus_1.deserializeIngestkorea_restJson_GetSMSStatusCommand)(response);
38
+ return output;
39
+ });
40
+ }
41
+ ;
42
+ }
43
+ exports.GetSMSStatusCommand = GetSMSStatusCommand;
@@ -21,3 +21,5 @@ __exportStar(require("./GetAlimtalkTemplateCommand"), exports);
21
21
  __exportStar(require("./ListAlimtalkTemplatesCommand"), exports);
22
22
  __exportStar(require("./ListAlimtalkChannelsCommand"), exports);
23
23
  __exportStar(require("./SendSMSCommand"), exports);
24
+ __exportStar(require("./GetSMSStatusCommand"), exports);
25
+ __exportStar(require("./GetSMSResultCommand"), exports);
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ ;
6
+ ;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ ;
@@ -22,3 +22,5 @@ __exportStar(require("./GetAlimtalkTemplate"), exports);
22
22
  __exportStar(require("./ListAlimtalkTemplates"), exports);
23
23
  __exportStar(require("./ListAlimtalkChannels"), exports);
24
24
  __exportStar(require("./SendSMS"), exports);
25
+ __exportStar(require("./GetSMSStatus"), exports);
26
+ __exportStar(require("./GetSMSResult"), exports);
@@ -0,0 +1,77 @@
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_File = exports.deserializeIngestkorea_restJson_SMSResultMessage = exports.deserializeIngestkorea_restJson_GetSMSResultOutput = exports.deserializeIngestkorea_restJson_GetSMSResultCommand = exports.serializeIngestkorea_restJson_GetSMSResultCommand = void 0;
13
+ const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
+ const constants_1 = require("../protocols/constants");
15
+ const serializeIngestkorea_restJson_GetSMSResultCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const hostname = "sens.apigw.ntruss.com";
17
+ const path = "/sms/v2/services/" + config.serviceId.sms + "/messages" + '/' + input.messageId;
18
+ const headers = {
19
+ "host": hostname
20
+ };
21
+ return new util_http_handler_1.HttpRequest({
22
+ protocol: 'https:',
23
+ method: 'GET',
24
+ hostname: hostname,
25
+ path: path,
26
+ headers: headers,
27
+ });
28
+ });
29
+ exports.serializeIngestkorea_restJson_GetSMSResultCommand = serializeIngestkorea_restJson_GetSMSResultCommand;
30
+ const deserializeIngestkorea_restJson_GetSMSResultCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
31
+ if (output.statusCode > 300)
32
+ yield (0, constants_1.parseErrorBody)(output);
33
+ const data = yield (0, constants_1.parseBody)(output); // GetSMSResultOutput
34
+ let contents = {};
35
+ contents = yield (0, exports.deserializeIngestkorea_restJson_GetSMSResultOutput)(data);
36
+ const response = Object.assign({}, contents);
37
+ return response;
38
+ });
39
+ exports.deserializeIngestkorea_restJson_GetSMSResultCommand = deserializeIngestkorea_restJson_GetSMSResultCommand;
40
+ const deserializeIngestkorea_restJson_GetSMSResultOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
41
+ return {
42
+ statusCode: output.statusCode ? output.statusCode : undefined,
43
+ statusName: output.statusName ? output.statusName : undefined,
44
+ messages: output.messages ? (0, exports.deserializeIngestkorea_restJson_SMSResultMessage)(output.messages) : undefined
45
+ };
46
+ });
47
+ exports.deserializeIngestkorea_restJson_GetSMSResultOutput = deserializeIngestkorea_restJson_GetSMSResultOutput;
48
+ const deserializeIngestkorea_restJson_SMSResultMessage = (outputs) => {
49
+ let result = outputs.map(output => {
50
+ return {
51
+ requestTime: output.requestTime != undefined ? output.requestTime : undefined,
52
+ contentType: output.contentType != undefined ? output.contentType : undefined,
53
+ content: output.content != undefined ? output.content : undefined,
54
+ countryCode: output.countryCode != undefined ? output.countryCode : undefined,
55
+ from: output.from != undefined ? output.from : undefined,
56
+ to: output.to != undefined ? output.to : undefined,
57
+ status: output.status != undefined ? output.status : undefined,
58
+ statusCode: output.statusCode != undefined ? output.statusCode : undefined,
59
+ statusMessage: output.statusMessage != undefined ? output.statusMessage : undefined,
60
+ statusName: output.statusName != undefined ? output.statusName : undefined,
61
+ completeTime: output.completeTime != undefined ? output.completeTime : undefined,
62
+ telcoCode: output.telcoCode != undefined ? output.telcoCode : undefined,
63
+ files: output.files != undefined ? (0, exports.deserializeIngestkorea_restJson_File)(output.files) : undefined
64
+ };
65
+ });
66
+ return result;
67
+ };
68
+ exports.deserializeIngestkorea_restJson_SMSResultMessage = deserializeIngestkorea_restJson_SMSResultMessage;
69
+ const deserializeIngestkorea_restJson_File = (outputs) => {
70
+ let result = outputs.map(output => {
71
+ return {
72
+ name: output.name != undefined ? output.name : undefined
73
+ };
74
+ });
75
+ return result;
76
+ };
77
+ exports.deserializeIngestkorea_restJson_File = deserializeIngestkorea_restJson_File;
@@ -0,0 +1,66 @@
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_SMSStatusMessage = exports.deserializeIngestkorea_restJson_GetSMSStatusOutput = exports.deserializeIngestkorea_restJson_GetSMSStatusCommand = exports.serializeIngestkorea_restJson_GetSMSStatusCommand = void 0;
13
+ const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
+ const constants_1 = require("../protocols/constants");
15
+ const serializeIngestkorea_restJson_GetSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
16
+ const hostname = "sens.apigw.ntruss.com";
17
+ const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
18
+ const headers = {
19
+ "host": hostname
20
+ };
21
+ const query = {
22
+ requestId: input.requestId
23
+ };
24
+ return new util_http_handler_1.HttpRequest({
25
+ protocol: 'https:',
26
+ method: 'GET',
27
+ hostname: hostname,
28
+ path: path,
29
+ query: query,
30
+ headers: headers,
31
+ });
32
+ });
33
+ exports.serializeIngestkorea_restJson_GetSMSStatusCommand = serializeIngestkorea_restJson_GetSMSStatusCommand;
34
+ const deserializeIngestkorea_restJson_GetSMSStatusCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
35
+ if (output.statusCode > 300)
36
+ yield (0, constants_1.parseErrorBody)(output);
37
+ const data = yield (0, constants_1.parseBody)(output); // GetSMSStatusOutput
38
+ let contents = {};
39
+ contents = yield (0, exports.deserializeIngestkorea_restJson_GetSMSStatusOutput)(data);
40
+ const response = Object.assign({}, contents);
41
+ return response;
42
+ });
43
+ exports.deserializeIngestkorea_restJson_GetSMSStatusCommand = deserializeIngestkorea_restJson_GetSMSStatusCommand;
44
+ const deserializeIngestkorea_restJson_GetSMSStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
45
+ return {
46
+ requestId: output.requestId ? output.requestId : undefined,
47
+ statusCode: output.statusCode ? output.statusCode : undefined,
48
+ statusName: output.statusName ? output.statusName : undefined,
49
+ messages: output.messages ? (0, exports.deserializeIngestkorea_restJson_SMSStatusMessage)(output.messages) : undefined
50
+ };
51
+ });
52
+ exports.deserializeIngestkorea_restJson_GetSMSStatusOutput = deserializeIngestkorea_restJson_GetSMSStatusOutput;
53
+ const deserializeIngestkorea_restJson_SMSStatusMessage = (outputs) => {
54
+ let result = outputs.map(output => {
55
+ return {
56
+ messageId: output.messageId != undefined ? output.messageId : undefined,
57
+ requestTime: output.requestTime != undefined ? output.requestTime : undefined,
58
+ contentType: output.contentType != undefined ? output.contentType : undefined,
59
+ countryCode: output.countryCode != undefined ? output.countryCode : undefined,
60
+ from: output.from != undefined ? output.from : undefined,
61
+ to: output.to != undefined ? output.to : undefined
62
+ };
63
+ });
64
+ return result;
65
+ };
66
+ exports.deserializeIngestkorea_restJson_SMSStatusMessage = deserializeIngestkorea_restJson_SMSStatusMessage;
@@ -21,3 +21,5 @@ __exportStar(require("./GetAlimtalkTemplate"), exports);
21
21
  __exportStar(require("./ListAlimtalkTemplates"), exports);
22
22
  __exportStar(require("./ListAlimtalkChannels"), exports);
23
23
  __exportStar(require("./SendSMS"), exports);
24
+ __exportStar(require("./GetSMSStatus"), exports);
25
+ __exportStar(require("./GetSMSResult"), exports);
@@ -0,0 +1,28 @@
1
+ import { SensCommand } from '../models';
2
+ import { serializeIngestkorea_restJson_GetSMSResultCommand, deserializeIngestkorea_restJson_GetSMSResultCommand } from '../protocols/GetSMSResult';
3
+ import { IngestkoreaError } from '@ingestkorea/util-error-handler';
4
+ ;
5
+ ;
6
+ export class GetSMSResultCommand extends SensCommand {
7
+ constructor(input) {
8
+ super(input);
9
+ this.input = {
10
+ ...input
11
+ };
12
+ }
13
+ ;
14
+ async serialize(input, config) {
15
+ if (!config.serviceId.sms)
16
+ throw new IngestkoreaError({
17
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check SMS ServiceId'
18
+ });
19
+ let request = await serializeIngestkorea_restJson_GetSMSResultCommand(input, config);
20
+ return request;
21
+ }
22
+ ;
23
+ async deserialize(response) {
24
+ let output = await deserializeIngestkorea_restJson_GetSMSResultCommand(response);
25
+ return output;
26
+ }
27
+ ;
28
+ }
@@ -0,0 +1,28 @@
1
+ import { SensCommand } from '../models';
2
+ import { serializeIngestkorea_restJson_GetSMSStatusCommand, deserializeIngestkorea_restJson_GetSMSStatusCommand } from '../protocols/GetSMSStatus';
3
+ import { IngestkoreaError } from '@ingestkorea/util-error-handler';
4
+ ;
5
+ ;
6
+ export class GetSMSStatusCommand extends SensCommand {
7
+ constructor(input) {
8
+ super(input);
9
+ this.input = {
10
+ ...input
11
+ };
12
+ }
13
+ ;
14
+ async serialize(input, config) {
15
+ if (!config.serviceId.sms)
16
+ throw new IngestkoreaError({
17
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check SMS ServiceId'
18
+ });
19
+ let request = await serializeIngestkorea_restJson_GetSMSStatusCommand(input, config);
20
+ return request;
21
+ }
22
+ ;
23
+ async deserialize(response) {
24
+ let output = await deserializeIngestkorea_restJson_GetSMSStatusCommand(response);
25
+ return output;
26
+ }
27
+ ;
28
+ }
@@ -5,3 +5,5 @@ export * from './GetAlimtalkTemplateCommand';
5
5
  export * from './ListAlimtalkTemplatesCommand';
6
6
  export * from './ListAlimtalkChannelsCommand';
7
7
  export * from './SendSMSCommand';
8
+ export * from './GetSMSStatusCommand';
9
+ export * from './GetSMSResultCommand';
@@ -0,0 +1,5 @@
1
+ ;
2
+ ;
3
+ ;
4
+ ;
5
+ export {};
@@ -0,0 +1,4 @@
1
+ ;
2
+ ;
3
+ ;
4
+ export {};
@@ -6,3 +6,5 @@ export * from './GetAlimtalkTemplate';
6
6
  export * from './ListAlimtalkTemplates';
7
7
  export * from './ListAlimtalkChannels';
8
8
  export * from './SendSMS';
9
+ export * from './GetSMSStatus';
10
+ export * from './GetSMSResult';
@@ -0,0 +1,62 @@
1
+ import { HttpRequest } from '@ingestkorea/util-http-handler';
2
+ import { parseBody, parseErrorBody } from '../protocols/constants';
3
+ export const serializeIngestkorea_restJson_GetSMSResultCommand = async (input, config) => {
4
+ const hostname = "sens.apigw.ntruss.com";
5
+ const path = "/sms/v2/services/" + config.serviceId.sms + "/messages" + '/' + input.messageId;
6
+ const headers = {
7
+ "host": hostname
8
+ };
9
+ return new HttpRequest({
10
+ protocol: 'https:',
11
+ method: 'GET',
12
+ hostname: hostname,
13
+ path: path,
14
+ headers: headers,
15
+ });
16
+ };
17
+ export const deserializeIngestkorea_restJson_GetSMSResultCommand = async (output) => {
18
+ if (output.statusCode > 300)
19
+ await parseErrorBody(output);
20
+ const data = await parseBody(output); // GetSMSResultOutput
21
+ let contents = {};
22
+ contents = await deserializeIngestkorea_restJson_GetSMSResultOutput(data);
23
+ const response = {
24
+ ...contents
25
+ };
26
+ return response;
27
+ };
28
+ export const deserializeIngestkorea_restJson_GetSMSResultOutput = async (output) => {
29
+ return {
30
+ statusCode: output.statusCode ? output.statusCode : undefined,
31
+ statusName: output.statusName ? output.statusName : undefined,
32
+ messages: output.messages ? deserializeIngestkorea_restJson_SMSResultMessage(output.messages) : undefined
33
+ };
34
+ };
35
+ export const deserializeIngestkorea_restJson_SMSResultMessage = (outputs) => {
36
+ let result = outputs.map(output => {
37
+ return {
38
+ requestTime: output.requestTime != undefined ? output.requestTime : undefined,
39
+ contentType: output.contentType != undefined ? output.contentType : undefined,
40
+ content: output.content != undefined ? output.content : undefined,
41
+ countryCode: output.countryCode != undefined ? output.countryCode : undefined,
42
+ from: output.from != undefined ? output.from : undefined,
43
+ to: output.to != undefined ? output.to : undefined,
44
+ status: output.status != undefined ? output.status : undefined,
45
+ statusCode: output.statusCode != undefined ? output.statusCode : undefined,
46
+ statusMessage: output.statusMessage != undefined ? output.statusMessage : undefined,
47
+ statusName: output.statusName != undefined ? output.statusName : undefined,
48
+ completeTime: output.completeTime != undefined ? output.completeTime : undefined,
49
+ telcoCode: output.telcoCode != undefined ? output.telcoCode : undefined,
50
+ files: output.files != undefined ? deserializeIngestkorea_restJson_File(output.files) : undefined
51
+ };
52
+ });
53
+ return result;
54
+ };
55
+ export const deserializeIngestkorea_restJson_File = (outputs) => {
56
+ let result = outputs.map(output => {
57
+ return {
58
+ name: output.name != undefined ? output.name : undefined
59
+ };
60
+ });
61
+ return result;
62
+ };
@@ -0,0 +1,52 @@
1
+ import { HttpRequest } from '@ingestkorea/util-http-handler';
2
+ import { parseBody, parseErrorBody } from '../protocols/constants';
3
+ export const serializeIngestkorea_restJson_GetSMSStatusCommand = async (input, config) => {
4
+ const hostname = "sens.apigw.ntruss.com";
5
+ const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
6
+ const headers = {
7
+ "host": hostname
8
+ };
9
+ const query = {
10
+ requestId: input.requestId
11
+ };
12
+ return new HttpRequest({
13
+ protocol: 'https:',
14
+ method: 'GET',
15
+ hostname: hostname,
16
+ path: path,
17
+ query: query,
18
+ headers: headers,
19
+ });
20
+ };
21
+ export const deserializeIngestkorea_restJson_GetSMSStatusCommand = async (output) => {
22
+ if (output.statusCode > 300)
23
+ await parseErrorBody(output);
24
+ const data = await parseBody(output); // GetSMSStatusOutput
25
+ let contents = {};
26
+ contents = await deserializeIngestkorea_restJson_GetSMSStatusOutput(data);
27
+ const response = {
28
+ ...contents
29
+ };
30
+ return response;
31
+ };
32
+ export const deserializeIngestkorea_restJson_GetSMSStatusOutput = async (output) => {
33
+ return {
34
+ requestId: output.requestId ? output.requestId : undefined,
35
+ statusCode: output.statusCode ? output.statusCode : undefined,
36
+ statusName: output.statusName ? output.statusName : undefined,
37
+ messages: output.messages ? deserializeIngestkorea_restJson_SMSStatusMessage(output.messages) : undefined
38
+ };
39
+ };
40
+ export const deserializeIngestkorea_restJson_SMSStatusMessage = (outputs) => {
41
+ let result = outputs.map(output => {
42
+ return {
43
+ messageId: output.messageId != undefined ? output.messageId : undefined,
44
+ requestTime: output.requestTime != undefined ? output.requestTime : undefined,
45
+ contentType: output.contentType != undefined ? output.contentType : undefined,
46
+ countryCode: output.countryCode != undefined ? output.countryCode : undefined,
47
+ from: output.from != undefined ? output.from : undefined,
48
+ to: output.to != undefined ? output.to : undefined
49
+ };
50
+ });
51
+ return result;
52
+ };
@@ -5,3 +5,5 @@ export * from './GetAlimtalkTemplate';
5
5
  export * from './ListAlimtalkTemplates';
6
6
  export * from './ListAlimtalkChannels';
7
7
  export * from './SendSMS';
8
+ export * from './GetSMSStatus';
9
+ export * from './GetSMSResult';
@@ -0,0 +1,13 @@
1
+ import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
+ import { SensCommand, GetSMSResultInput, GetSMSResultOutput } from '../models';
3
+ import { SensClientResolvedConfig } from '../SensClient';
4
+ export interface GetSMSResultCommandInput extends GetSMSResultInput {
5
+ }
6
+ export interface GetSMSResultCommandOutput extends GetSMSResultOutput {
7
+ }
8
+ export declare class GetSMSResultCommand extends SensCommand<GetSMSResultCommandInput, GetSMSResultCommandOutput, SensClientResolvedConfig> {
9
+ input: GetSMSResultCommandInput;
10
+ constructor(input: GetSMSResultCommandInput);
11
+ serialize(input: GetSMSResultCommandInput, config: SensClientResolvedConfig): Promise<HttpRequest>;
12
+ deserialize(response: HttpResponse): Promise<GetSMSResultCommandOutput>;
13
+ }
@@ -0,0 +1,13 @@
1
+ import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
+ import { SensCommand, GetSMSStatusInput, GetSMSStatusOutput } from '../models';
3
+ import { SensClientResolvedConfig } from '../SensClient';
4
+ export interface GetSMSStatusCommandInput extends GetSMSStatusInput {
5
+ }
6
+ export interface GetSMSStatusCommandOutput extends GetSMSStatusOutput {
7
+ }
8
+ export declare class GetSMSStatusCommand extends SensCommand<GetSMSStatusCommandInput, GetSMSStatusCommandOutput, SensClientResolvedConfig> {
9
+ input: GetSMSStatusCommandInput;
10
+ constructor(input: GetSMSStatusCommandInput);
11
+ serialize(input: GetSMSStatusCommandInput, config: SensClientResolvedConfig): Promise<HttpRequest>;
12
+ deserialize(response: HttpResponse): Promise<GetSMSStatusCommandOutput>;
13
+ }
@@ -5,3 +5,5 @@ export * from './GetAlimtalkTemplateCommand';
5
5
  export * from './ListAlimtalkTemplatesCommand';
6
6
  export * from './ListAlimtalkChannelsCommand';
7
7
  export * from './SendSMSCommand';
8
+ export * from './GetSMSStatusCommand';
9
+ export * from './GetSMSResultCommand';
@@ -0,0 +1,26 @@
1
+ export interface GetSMSResultInput {
2
+ messageId: string;
3
+ }
4
+ export interface GetSMSResultOutput {
5
+ statusCode?: string;
6
+ statusName?: string;
7
+ messages?: SMSResultMessage[];
8
+ }
9
+ export interface SMSResultMessage {
10
+ requestTime?: string;
11
+ contentType?: string;
12
+ content?: string;
13
+ countryCode?: string;
14
+ from?: string;
15
+ to?: string;
16
+ status?: string;
17
+ statusCode?: string;
18
+ statusMessage?: string;
19
+ statusName?: string;
20
+ completeTime?: string;
21
+ telcoCode?: string;
22
+ files?: File[];
23
+ }
24
+ export interface File {
25
+ name?: string;
26
+ }
@@ -0,0 +1,17 @@
1
+ export interface GetSMSStatusInput {
2
+ requestId: string;
3
+ }
4
+ export interface GetSMSStatusOutput {
5
+ requestId?: string;
6
+ statusCode?: string;
7
+ statusName?: string;
8
+ messages?: SMSStatusMessage[];
9
+ }
10
+ export interface SMSStatusMessage {
11
+ messageId?: string;
12
+ requestTime?: string;
13
+ contentType?: string;
14
+ countryCode?: string;
15
+ from?: string;
16
+ to?: string;
17
+ }
@@ -6,3 +6,5 @@ export * from './GetAlimtalkTemplate';
6
6
  export * from './ListAlimtalkTemplates';
7
7
  export * from './ListAlimtalkChannels';
8
8
  export * from './SendSMS';
9
+ export * from './GetSMSStatus';
10
+ export * from './GetSMSResult';
@@ -0,0 +1,9 @@
1
+ import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
+ import { GetSMSResultOutput, SMSResultMessage, File } from '../models/GetSMSResult';
3
+ import { SensClientResolvedConfig } from '../SensClient';
4
+ import { GetSMSResultCommandInput, GetSMSResultCommandOutput } from '../commands/GetSMSResultCommand';
5
+ export declare const serializeIngestkorea_restJson_GetSMSResultCommand: (input: GetSMSResultCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
+ export declare const deserializeIngestkorea_restJson_GetSMSResultCommand: (output: HttpResponse) => Promise<GetSMSResultCommandOutput>;
7
+ export declare const deserializeIngestkorea_restJson_GetSMSResultOutput: (output: any) => Promise<GetSMSResultOutput>;
8
+ export declare const deserializeIngestkorea_restJson_SMSResultMessage: (outputs: any[]) => SMSResultMessage[];
9
+ export declare const deserializeIngestkorea_restJson_File: (outputs: any[]) => File[];
@@ -0,0 +1,8 @@
1
+ import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
+ import { GetSMSStatusOutput, SMSStatusMessage } from '../models/GetSMSStatus';
3
+ import { SensClientResolvedConfig } from '../SensClient';
4
+ import { GetSMSStatusCommandInput, GetSMSStatusCommandOutput } from '../commands/GetSMSStatusCommand';
5
+ export declare const serializeIngestkorea_restJson_GetSMSStatusCommand: (input: GetSMSStatusCommandInput, config: SensClientResolvedConfig) => Promise<HttpRequest>;
6
+ export declare const deserializeIngestkorea_restJson_GetSMSStatusCommand: (output: HttpResponse) => Promise<GetSMSStatusCommandOutput>;
7
+ export declare const deserializeIngestkorea_restJson_GetSMSStatusOutput: (output: any) => Promise<GetSMSStatusOutput>;
8
+ export declare const deserializeIngestkorea_restJson_SMSStatusMessage: (outputs: any[]) => SMSStatusMessage[];
@@ -5,3 +5,5 @@ export * from './GetAlimtalkTemplate';
5
5
  export * from './ListAlimtalkTemplates';
6
6
  export * from './ListAlimtalkChannels';
7
7
  export * from './SendSMS';
8
+ export * from './GetSMSStatus';
9
+ export * from './GetSMSResult';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ingestkorea/client-sens",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "description": "INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",