@ingestkorea/client-sens 1.5.2 → 1.5.3

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.
Files changed (112) hide show
  1. package/.github/pull_request_template.md +6 -1
  2. package/.prettierignore +3 -0
  3. package/LICENSE +2 -2
  4. package/README.md +56 -38
  5. package/dist-cjs/commands/GetAlimtalkResultCommand.js +4 -7
  6. package/dist-cjs/commands/GetAlimtalkStatusCommand.js +4 -7
  7. package/dist-cjs/commands/GetAlimtalkTemplateCommand.js +4 -7
  8. package/dist-cjs/commands/GetSMSResultCommand.js +4 -6
  9. package/dist-cjs/commands/GetSMSStatusCommand.js +4 -6
  10. package/dist-cjs/commands/ListAlimtalkChannelsCommand.js +4 -7
  11. package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +4 -7
  12. package/dist-cjs/commands/SendAlimtalkCommand.js +8 -9
  13. package/dist-cjs/commands/SendMMSCommand.js +40 -30
  14. package/dist-cjs/commands/SendSMSCommand.js +19 -18
  15. package/dist-cjs/commands/constants.js +2 -2
  16. package/dist-cjs/middleware/metadata-ingestkorea.js +2 -2
  17. package/dist-cjs/middleware/signer-ncp.js +3 -7
  18. package/dist-cjs/models/GetAlimtalkResult.js +0 -3
  19. package/dist-cjs/models/GetAlimtalkStatus.js +0 -3
  20. package/dist-cjs/models/GetAlimtalkTemplate.js +0 -2
  21. package/dist-cjs/models/GetSMSResult.js +0 -4
  22. package/dist-cjs/models/GetSMSStatus.js +0 -3
  23. package/dist-cjs/models/ListAlimtalkChannels.js +0 -3
  24. package/dist-cjs/models/ListAlimtalkTemplates.js +0 -5
  25. package/dist-cjs/models/SendAlimtalk.js +0 -5
  26. package/dist-cjs/models/SendMMS.js +0 -2
  27. package/dist-cjs/models/SendSMS.js +0 -2
  28. package/dist-cjs/models/SensCommand.js +0 -2
  29. package/dist-cjs/protocols/GetAlimtalkResult.js +7 -6
  30. package/dist-cjs/protocols/GetAlimtalkStatus.js +8 -7
  31. package/dist-cjs/protocols/GetAlimtalkTemplate.js +6 -6
  32. package/dist-cjs/protocols/GetSMSResult.js +11 -9
  33. package/dist-cjs/protocols/GetSMSStatus.js +9 -7
  34. package/dist-cjs/protocols/ListAlimtalkChannels.js +7 -7
  35. package/dist-cjs/protocols/ListAlimtalkTemplates.js +16 -15
  36. package/dist-cjs/protocols/SendAlimtalk.js +9 -8
  37. package/dist-cjs/protocols/SendMMS.js +5 -5
  38. package/dist-cjs/protocols/SendSMS.js +5 -5
  39. package/dist-cjs/protocols/constants.js +10 -7
  40. package/dist-es/commands/GetAlimtalkResultCommand.js +8 -11
  41. package/dist-es/commands/GetAlimtalkStatusCommand.js +8 -11
  42. package/dist-es/commands/GetAlimtalkTemplateCommand.js +8 -11
  43. package/dist-es/commands/GetSMSResultCommand.js +8 -10
  44. package/dist-es/commands/GetSMSStatusCommand.js +8 -10
  45. package/dist-es/commands/ListAlimtalkChannelsCommand.js +8 -11
  46. package/dist-es/commands/ListAlimtalkTemplatesCommand.js +8 -11
  47. package/dist-es/commands/SendAlimtalkCommand.js +13 -14
  48. package/dist-es/commands/SendMMSCommand.js +48 -38
  49. package/dist-es/commands/SendSMSCommand.js +23 -22
  50. package/dist-es/commands/constants.js +2 -2
  51. package/dist-es/commands/index.js +10 -10
  52. package/dist-es/middleware/index.js +2 -2
  53. package/dist-es/middleware/metadata-ingestkorea.js +3 -3
  54. package/dist-es/middleware/signer-ncp.js +7 -11
  55. package/dist-es/models/GetAlimtalkResult.js +0 -3
  56. package/dist-es/models/GetAlimtalkStatus.js +0 -3
  57. package/dist-es/models/GetAlimtalkTemplate.js +0 -2
  58. package/dist-es/models/GetSMSResult.js +0 -4
  59. package/dist-es/models/GetSMSStatus.js +0 -3
  60. package/dist-es/models/ListAlimtalkChannels.js +0 -3
  61. package/dist-es/models/ListAlimtalkTemplates.js +0 -5
  62. package/dist-es/models/SendAlimtalk.js +0 -5
  63. package/dist-es/models/SendMMS.js +0 -2
  64. package/dist-es/models/SendSMS.js +0 -2
  65. package/dist-es/models/SensCommand.js +0 -2
  66. package/dist-es/models/index.js +11 -11
  67. package/dist-es/protocols/GetAlimtalkResult.js +10 -9
  68. package/dist-es/protocols/GetAlimtalkStatus.js +11 -10
  69. package/dist-es/protocols/GetAlimtalkTemplate.js +10 -10
  70. package/dist-es/protocols/GetSMSResult.js +14 -12
  71. package/dist-es/protocols/GetSMSStatus.js +12 -10
  72. package/dist-es/protocols/ListAlimtalkChannels.js +10 -10
  73. package/dist-es/protocols/ListAlimtalkTemplates.js +19 -18
  74. package/dist-es/protocols/SendAlimtalk.js +12 -11
  75. package/dist-es/protocols/SendMMS.js +8 -8
  76. package/dist-es/protocols/SendSMS.js +9 -9
  77. package/dist-es/protocols/constants.js +12 -9
  78. package/dist-es/protocols/index.js +10 -10
  79. package/dist-types/commands/GetAlimtalkResultCommand.d.ts +3 -3
  80. package/dist-types/commands/GetAlimtalkStatusCommand.d.ts +3 -3
  81. package/dist-types/commands/GetAlimtalkTemplateCommand.d.ts +3 -3
  82. package/dist-types/commands/GetSMSResultCommand.d.ts +3 -3
  83. package/dist-types/commands/GetSMSStatusCommand.d.ts +3 -3
  84. package/dist-types/commands/ListAlimtalkChannelsCommand.d.ts +3 -3
  85. package/dist-types/commands/ListAlimtalkTemplatesCommand.d.ts +3 -3
  86. package/dist-types/commands/SendAlimtalkCommand.d.ts +3 -3
  87. package/dist-types/commands/SendMMSCommand.d.ts +3 -3
  88. package/dist-types/commands/SendSMSCommand.d.ts +3 -3
  89. package/dist-types/commands/index.d.ts +10 -10
  90. package/dist-types/middleware/index.d.ts +2 -2
  91. package/dist-types/middleware/metadata-ingestkorea.d.ts +2 -2
  92. package/dist-types/middleware/signer-ncp.d.ts +2 -2
  93. package/dist-types/models/GetAlimtalkResult.d.ts +1 -1
  94. package/dist-types/models/GetAlimtalkStatus.d.ts +1 -1
  95. package/dist-types/models/GetAlimtalkTemplate.d.ts +1 -1
  96. package/dist-types/models/SendMMS.d.ts +1 -1
  97. package/dist-types/models/SendSMS.d.ts +3 -3
  98. package/dist-types/models/SensCommand.d.ts +1 -1
  99. package/dist-types/models/index.d.ts +11 -11
  100. package/dist-types/protocols/GetAlimtalkResult.d.ts +4 -4
  101. package/dist-types/protocols/GetAlimtalkStatus.d.ts +4 -4
  102. package/dist-types/protocols/GetAlimtalkTemplate.d.ts +4 -4
  103. package/dist-types/protocols/GetSMSResult.d.ts +4 -4
  104. package/dist-types/protocols/GetSMSStatus.d.ts +4 -4
  105. package/dist-types/protocols/ListAlimtalkChannels.d.ts +4 -4
  106. package/dist-types/protocols/ListAlimtalkTemplates.d.ts +4 -4
  107. package/dist-types/protocols/SendAlimtalk.d.ts +4 -4
  108. package/dist-types/protocols/SendMMS.d.ts +4 -4
  109. package/dist-types/protocols/SendSMS.d.ts +4 -4
  110. package/dist-types/protocols/constants.d.ts +1 -1
  111. package/dist-types/protocols/index.d.ts +10 -10
  112. package/package.json +4 -3
@@ -1,17 +1,17 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_GetSMSStatusCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
6
6
  const headers = {
7
- "host": hostname
7
+ host: hostname,
8
8
  };
9
9
  const query = {
10
- requestId: input.requestId
10
+ requestId: input.requestId,
11
11
  };
12
12
  return new HttpRequest({
13
- protocol: 'https:',
14
- method: 'GET',
13
+ protocol: "https:",
14
+ method: "GET",
15
15
  hostname: hostname,
16
16
  path: path,
17
17
  query: query,
@@ -25,7 +25,7 @@ export const deserializeIngestkorea_restJson_GetSMSStatusCommand = async (output
25
25
  let contents = {};
26
26
  contents = await deserializeIngestkorea_restJson_GetSMSStatusOutput(data);
27
27
  const response = {
28
- ...contents
28
+ ...contents,
29
29
  };
30
30
  return response;
31
31
  };
@@ -34,18 +34,20 @@ export const deserializeIngestkorea_restJson_GetSMSStatusOutput = async (output)
34
34
  requestId: output.requestId ? output.requestId : undefined,
35
35
  statusCode: output.statusCode ? output.statusCode : undefined,
36
36
  statusName: output.statusName ? output.statusName : undefined,
37
- messages: output.messages ? deserializeIngestkorea_restJson_SMSStatusMessage(output.messages) : undefined
37
+ messages: output.messages
38
+ ? deserializeIngestkorea_restJson_SMSStatusMessage(output.messages)
39
+ : undefined,
38
40
  };
39
41
  };
40
42
  export const deserializeIngestkorea_restJson_SMSStatusMessage = (outputs) => {
41
- let result = outputs.map(output => {
43
+ let result = outputs.map((output) => {
42
44
  return {
43
45
  messageId: output.messageId != undefined ? output.messageId : undefined,
44
46
  requestTime: output.requestTime != undefined ? output.requestTime : undefined,
45
47
  contentType: output.contentType != undefined ? output.contentType : undefined,
46
48
  countryCode: output.countryCode != undefined ? output.countryCode : undefined,
47
49
  from: output.from != undefined ? output.from : undefined,
48
- to: output.to != undefined ? output.to : undefined
50
+ to: output.to != undefined ? output.to : undefined,
49
51
  };
50
52
  });
51
53
  return result;
@@ -1,17 +1,17 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/channels";
6
6
  const headers = {
7
- "host": hostname
7
+ host: hostname,
8
8
  };
9
9
  return new HttpRequest({
10
- protocol: 'https:',
11
- method: 'GET',
10
+ protocol: "https:",
11
+ method: "GET",
12
12
  hostname: hostname,
13
13
  path: path,
14
- headers: headers
14
+ headers: headers,
15
15
  });
16
16
  };
17
17
  export const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = async (output) => {
@@ -21,17 +21,17 @@ export const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = async
21
21
  let contents = {};
22
22
  contents = await deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput(data);
23
23
  const response = {
24
- ...contents
24
+ ...contents,
25
25
  };
26
26
  return response;
27
27
  };
28
28
  export const deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = async (outputs) => {
29
29
  return {
30
- channels: deserializeIngestkorea_restJson_Channel(outputs)
30
+ channels: deserializeIngestkorea_restJson_Channel(outputs),
31
31
  };
32
32
  };
33
33
  export const deserializeIngestkorea_restJson_Channel = (outputs) => {
34
- const result = outputs.map(output => {
34
+ const result = outputs.map((output) => {
35
35
  return {
36
36
  createTime: output.createTime != undefined ? output.createTime : undefined,
37
37
  updateTime: output.updateTime != undefined ? output.updateTime : undefined,
@@ -39,7 +39,7 @@ export const deserializeIngestkorea_restJson_Channel = (outputs) => {
39
39
  channelId: output.channelId != undefined ? output.channelId : undefined,
40
40
  channelName: output.channelName != undefined ? output.channelName : undefined,
41
41
  channelStatus: output.channelStatus != undefined ? output.channelStatus : undefined,
42
- useSmsFailover: output.useSmsFailover != undefined ? output.useSmsFailover : undefined
42
+ useSmsFailover: output.useSmsFailover != undefined ? output.useSmsFailover : undefined,
43
43
  };
44
44
  });
45
45
  return result;
@@ -1,21 +1,21 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
6
6
  const headers = {
7
- "host": hostname
7
+ host: hostname,
8
8
  };
9
9
  const query = {
10
- channelId: input.channelId
10
+ channelId: input.channelId,
11
11
  };
12
12
  return new HttpRequest({
13
- protocol: 'https:',
14
- method: 'GET',
13
+ protocol: "https:",
14
+ method: "GET",
15
15
  hostname: hostname,
16
16
  path: path,
17
17
  query: query,
18
- headers: headers
18
+ headers: headers,
19
19
  });
20
20
  };
21
21
  export const deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = async (output) => {
@@ -25,17 +25,17 @@ export const deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand = asyn
25
25
  let contents = {};
26
26
  contents = await deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput(data);
27
27
  const response = {
28
- ...contents
28
+ ...contents,
29
29
  };
30
30
  return response;
31
31
  };
32
32
  export const deserializeIngestkorea_restJson_ListAlimtalkTemplatesOutput = async (output) => {
33
33
  return {
34
- templates: deserializeIngestkorea_restJson_AlimtalkTemplate(output)
34
+ templates: deserializeIngestkorea_restJson_AlimtalkTemplate(output),
35
35
  };
36
36
  };
37
37
  export const deserializeIngestkorea_restJson_AlimtalkTemplate = (outputs) => {
38
- let result = outputs.map(output => {
38
+ let result = outputs.map((output) => {
39
39
  return {
40
40
  createTime: output.createTime != undefined ? output.createTime : undefined,
41
41
  updateTime: output.updateTime != undefined ? output.updateTime : undefined,
@@ -44,29 +44,30 @@ export const deserializeIngestkorea_restJson_AlimtalkTemplate = (outputs) => {
44
44
  templateName: output.templateName != undefined ? output.templateName : undefined,
45
45
  content: output.content != undefined ? output.content : undefined,
46
46
  comments: output.comments != undefined
47
- ? deserializeIngestkorea_restJson_AlimtalkTemplateComment(output.comments) : undefined,
48
- templateInspectionStatus: output.templateInspectionStatus != undefined
49
- ? output.templateInspectionStatus : undefined,
47
+ ? deserializeIngestkorea_restJson_AlimtalkTemplateComment(output.comments)
48
+ : undefined,
49
+ templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined,
50
50
  templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined,
51
51
  buttons: output.buttons != undefined
52
- ? deserializeIngestkorea_restJson_AlimtalkTemplateButton(output.buttons) : undefined
52
+ ? deserializeIngestkorea_restJson_AlimtalkTemplateButton(output.buttons)
53
+ : undefined,
53
54
  };
54
55
  });
55
56
  return result;
56
57
  };
57
58
  export const deserializeIngestkorea_restJson_AlimtalkTemplateComment = (outputs) => {
58
- let result = outputs.map(output => {
59
+ let result = outputs.map((output) => {
59
60
  return {
60
61
  commentId: output.commentId != undefined ? output.commentId : undefined,
61
62
  content: output.content != undefined ? output.content : undefined,
62
63
  status: output.status != undefined ? output.status : undefined,
63
- createTime: output.createTime != undefined ? output.createTime : undefined
64
+ createTime: output.createTime != undefined ? output.createTime : undefined,
64
65
  };
65
66
  });
66
67
  return result;
67
68
  };
68
69
  export const deserializeIngestkorea_restJson_AlimtalkTemplateButton = (outputs) => {
69
- let result = outputs.map(output => {
70
+ let result = outputs.map((output) => {
70
71
  return {
71
72
  order: output.order != undefined ? output.order : undefined,
72
73
  type: output.type != undefined ? output.type : undefined,
@@ -74,7 +75,7 @@ export const deserializeIngestkorea_restJson_AlimtalkTemplateButton = (outputs)
74
75
  linkMobile: output.linkMobile != undefined ? output.linkMobile : undefined,
75
76
  linkPc: output.linkPc != undefined ? output.linkPc : undefined,
76
77
  schemeIos: output.schemeIos != undefined ? output.schemeIos : undefined,
77
- schemeAndroid: output.schemeAndroid != undefined ? output.schemeAndroid : undefined
78
+ schemeAndroid: output.schemeAndroid != undefined ? output.schemeAndroid : undefined,
78
79
  };
79
80
  });
80
81
  return result;
@@ -1,24 +1,24 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_SendAlimtalkCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
6
6
  const headers = {
7
7
  "content-type": "application/json; charset=utf-8",
8
- "host": hostname
8
+ host: hostname,
9
9
  };
10
10
  const body = JSON.stringify({
11
11
  plusFriendId: input.plusFriendId,
12
12
  templateCode: input.templateCode,
13
- messages: input.messages
13
+ messages: input.messages,
14
14
  });
15
15
  return new HttpRequest({
16
- protocol: 'https:',
17
- method: 'POST',
16
+ protocol: "https:",
17
+ method: "POST",
18
18
  hostname: hostname,
19
19
  path: path,
20
20
  headers: headers,
21
- body: body
21
+ body: body,
22
22
  });
23
23
  };
24
24
  export const deserializeIngestkorea_restJson_SendAlimtalkCommand = async (output) => {
@@ -28,7 +28,7 @@ export const deserializeIngestkorea_restJson_SendAlimtalkCommand = async (output
28
28
  let contents = {};
29
29
  contents = await deserializeIngestkorea_restJson_SendMessageOutput(data);
30
30
  const response = {
31
- ...contents
31
+ ...contents,
32
32
  };
33
33
  return response;
34
34
  };
@@ -38,12 +38,13 @@ export const deserializeIngestkorea_restJson_SendMessageOutput = async (output)
38
38
  requestTime: output.requestTime != undefined ? output.requestTime : undefined,
39
39
  statusCode: output.statusCode != undefined ? output.statusCode : undefined,
40
40
  statusName: output.statusName != undefined ? output.statusName : undefined,
41
- messages: output.messages != undefined ?
42
- deserializeIngestkorea_restJson_ReceivedMessages(output.messages) : undefined,
41
+ messages: output.messages != undefined
42
+ ? deserializeIngestkorea_restJson_ReceivedMessages(output.messages)
43
+ : undefined,
43
44
  };
44
45
  };
45
46
  export const deserializeIngestkorea_restJson_ReceivedMessages = (outputs) => {
46
- const result = outputs.map(output => {
47
+ const result = outputs.map((output) => {
47
48
  return {
48
49
  messageId: output.messageId != undefined ? output.messageId : undefined,
49
50
  to: output.to != undefined ? output.to : undefined,
@@ -1,29 +1,29 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_SendMMSCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
6
6
  const headers = {
7
7
  "content-type": "application/json; charset=utf-8",
8
- "host": hostname
8
+ host: hostname,
9
9
  };
10
10
  const body = JSON.stringify({
11
11
  from: input.from,
12
12
  content: input.content,
13
13
  messages: input.messages,
14
- type: input.type != undefined ? input.type : 'MMS',
14
+ type: input.type != undefined ? input.type : "MMS",
15
15
  files: input.files,
16
16
  ...(input.contentType != undefined && { contentType: input.contentType }),
17
17
  ...(input.countryCode != undefined && { countryCode: input.countryCode }),
18
18
  ...(input.subject != undefined && { subject: input.subject }),
19
19
  });
20
20
  return new HttpRequest({
21
- protocol: 'https:',
22
- method: 'POST',
21
+ protocol: "https:",
22
+ method: "POST",
23
23
  hostname: hostname,
24
24
  path: path,
25
25
  headers: headers,
26
- body: body
26
+ body: body,
27
27
  });
28
28
  };
29
29
  export const deserializeIngestkorea_restJson_SendMMSCommand = async (output) => {
@@ -33,7 +33,7 @@ export const deserializeIngestkorea_restJson_SendMMSCommand = async (output) =>
33
33
  let contents = {};
34
34
  contents = await deserializeIngestkorea_restJson_SendMMSOutput(data);
35
35
  const response = {
36
- ...contents
36
+ ...contents,
37
37
  };
38
38
  return response;
39
39
  };
@@ -1,28 +1,28 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { parseBody, parseErrorBody } from './constants';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { parseBody, parseErrorBody } from "./constants";
3
3
  export const serializeIngestkorea_restJson_SendSMSCommand = async (input, config) => {
4
4
  const hostname = "sens.apigw.ntruss.com";
5
5
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
6
6
  const headers = {
7
7
  "content-type": "application/json; charset=utf-8",
8
- "host": hostname
8
+ host: hostname,
9
9
  };
10
10
  const body = JSON.stringify({
11
11
  from: input.from,
12
12
  content: input.content,
13
13
  messages: input.messages,
14
- type: input.type != undefined ? input.type : 'SMS',
14
+ type: input.type != undefined ? input.type : "SMS",
15
15
  ...(input.contentType != undefined && { contentType: input.contentType }),
16
16
  ...(input.countryCode != undefined && { countryCode: input.countryCode }),
17
- ...(input.subject != undefined && input.type === 'LMS' && { subject: input.subject }),
17
+ ...(input.subject != undefined && input.type === "LMS" && { subject: input.subject }),
18
18
  });
19
19
  return new HttpRequest({
20
- protocol: 'https:',
21
- method: 'POST',
20
+ protocol: "https:",
21
+ method: "POST",
22
22
  hostname: hostname,
23
23
  path: path,
24
24
  headers: headers,
25
- body: body
25
+ body: body,
26
26
  });
27
27
  };
28
28
  export const deserializeIngestkorea_restJson_SendSMSCommand = async (output) => {
@@ -32,7 +32,7 @@ export const deserializeIngestkorea_restJson_SendSMSCommand = async (output) =>
32
32
  let contents = {};
33
33
  contents = await deserializeIngestkorea_restJson_SendSMSOutput(data);
34
34
  const response = {
35
- ...contents
35
+ ...contents,
36
36
  };
37
37
  return response;
38
38
  };
@@ -1,19 +1,20 @@
1
- import { IngestkoreaError, ingestkoreaErrorCodeChecker } from '@ingestkorea/util-error-handler';
2
- import { collectBodyString, destroyStream } from '@ingestkorea/util-http-handler';
1
+ import { IngestkoreaError, ingestkoreaErrorCodeChecker } from "@ingestkorea/util-error-handler";
2
+ import { collectBodyString, destroyStream } from "@ingestkorea/util-http-handler";
3
3
  export const parseBody = async (output) => {
4
4
  const { statusCode, headers, body: streamBody } = output;
5
- const isValid = await verifyJsonHeader(headers['content-type']);
5
+ const isValid = await verifyJsonHeader(headers["content-type"]);
6
6
  if (!isValid) {
7
7
  await destroyStream(streamBody);
8
8
  let customError = new IngestkoreaError({
9
- code: 400, type: 'Bad Request',
10
- message: 'Invalid Request', description: 'content-type is not application/json'
9
+ code: 400,
10
+ type: "Bad Request",
11
+ message: "Invalid Request",
12
+ description: "content-type is not application/json",
11
13
  });
12
14
  if (ingestkoreaErrorCodeChecker(statusCode))
13
15
  customError.error.code = statusCode;
14
16
  throw customError;
15
17
  }
16
- ;
17
18
  const data = await collectBodyString(streamBody);
18
19
  if (data.length)
19
20
  return JSON.parse(data);
@@ -21,11 +22,13 @@ export const parseBody = async (output) => {
21
22
  };
22
23
  export const parseErrorBody = async (output) => {
23
24
  const { statusCode, headers, body: streamBody } = output;
24
- const isValid = await verifyJsonHeader(headers['content-type']);
25
+ const isValid = await verifyJsonHeader(headers["content-type"]);
25
26
  await destroyStream(streamBody);
26
27
  let customError = new IngestkoreaError({
27
- code: 400, type: 'Bad Request',
28
- message: 'Invalid Request', description: 'content-type is not application/json'
28
+ code: 400,
29
+ type: "Bad Request",
30
+ message: "Invalid Request",
31
+ description: "content-type is not application/json",
29
32
  });
30
33
  if (ingestkoreaErrorCodeChecker(statusCode))
31
34
  customError.error.code = statusCode;
@@ -1,10 +1,10 @@
1
- export * from './SendAlimtalk';
2
- export * from './GetAlimtalkStatus';
3
- export * from './GetAlimtalkResult';
4
- export * from './GetAlimtalkTemplate';
5
- export * from './ListAlimtalkTemplates';
6
- export * from './ListAlimtalkChannels';
7
- export * from './SendSMS';
8
- export * from './SendMMS';
9
- export * from './GetSMSStatus';
10
- export * from './GetSMSResult';
1
+ export * from "./SendAlimtalk";
2
+ export * from "./GetAlimtalkStatus";
3
+ export * from "./GetAlimtalkResult";
4
+ export * from "./GetAlimtalkTemplate";
5
+ export * from "./ListAlimtalkTemplates";
6
+ export * from "./ListAlimtalkChannels";
7
+ export * from "./SendSMS";
8
+ export * from "./SendMMS";
9
+ export * from "./GetSMSStatus";
10
+ export * from "./GetSMSResult";
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, GetAlimtalkResultInput, GetAlimtalkResultOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, GetAlimtalkResultInput, GetAlimtalkResultOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface GetAlimtalkResultCommandInput extends GetAlimtalkResultInput {
5
5
  }
6
6
  export interface GetAlimtalkResultCommandOutput extends GetAlimtalkResultOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, GetAlimtalkStatusInput, GetAlimtalkStatusOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, GetAlimtalkStatusInput, GetAlimtalkStatusOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface GetAlimtalkStatusCommandInput extends GetAlimtalkStatusInput {
5
5
  }
6
6
  export interface GetAlimtalkStatusCommandOutput extends GetAlimtalkStatusOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, GetAlimtalkTemplateInput, GetAlimtalkTemplateOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, GetAlimtalkTemplateInput, GetAlimtalkTemplateOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface GetAlimtalkTemplateCommandInput extends GetAlimtalkTemplateInput {
5
5
  }
6
6
  export interface GetAlimtalkTemplateCommandOutput extends GetAlimtalkTemplateOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, GetSMSResultInput, GetSMSResultOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, GetSMSResultInput, GetSMSResultOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface GetSMSResultCommandInput extends GetSMSResultInput {
5
5
  }
6
6
  export interface GetSMSResultCommandOutput extends GetSMSResultOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, GetSMSStatusInput, GetSMSStatusOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, GetSMSStatusInput, GetSMSStatusOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface GetSMSStatusCommandInput extends GetSMSStatusInput {
5
5
  }
6
6
  export interface GetSMSStatusCommandOutput extends GetSMSStatusOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, ListAlimtalkChannelsInput, ListAlimtalkChannelsOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, ListAlimtalkChannelsInput, ListAlimtalkChannelsOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface ListAlimtalkChannelsCommandInput extends ListAlimtalkChannelsInput {
5
5
  }
6
6
  export interface ListAlimtalkChannelsCommandOutput extends ListAlimtalkChannelsOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, ListAlimtalkTemplatesInput, ListAlimtalkTemplatesOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, ListAlimtalkTemplatesInput, ListAlimtalkTemplatesOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface ListAlimtalkTemplatesCommandInput extends ListAlimtalkTemplatesInput {
5
5
  }
6
6
  export interface ListAlimtalkTemplatesCommandOutput extends ListAlimtalkTemplatesOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, SendAlimtalkInput, SendAlimtalkOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, SendAlimtalkInput, SendAlimtalkOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface SendAlimtalkCommandInput extends SendAlimtalkInput {
5
5
  }
6
6
  export interface SendAlimtalkCommandOutput extends SendAlimtalkOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, SendMMSInput, SendMMSOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, SendMMSInput, SendMMSOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface SendMMSCommandInput extends SendMMSInput {
5
5
  }
6
6
  export interface SendMMSCommandOutput extends SendMMSOutput {
@@ -1,6 +1,6 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
2
- import { SensCommand, SendSMSInput, SendSMSOutput } from '../models';
3
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
+ import { SensCommand, SendSMSInput, SendSMSOutput } from "../models";
3
+ import { SensClientResolvedConfig } from "../SensClient";
4
4
  export interface SendSMSCommandInput extends SendSMSInput {
5
5
  }
6
6
  export interface SendSMSCommandOutput extends SendSMSOutput {
@@ -1,10 +1,10 @@
1
- export * from './SendAlimtalkCommand';
2
- export * from './GetAlimtalkStatusCommand';
3
- export * from './GetAlimtalkResultCommand';
4
- export * from './GetAlimtalkTemplateCommand';
5
- export * from './ListAlimtalkTemplatesCommand';
6
- export * from './ListAlimtalkChannelsCommand';
7
- export * from './SendSMSCommand';
8
- export * from './SendMMSCommand';
9
- export * from './GetSMSStatusCommand';
10
- export * from './GetSMSResultCommand';
1
+ export * from "./SendAlimtalkCommand";
2
+ export * from "./GetAlimtalkStatusCommand";
3
+ export * from "./GetAlimtalkResultCommand";
4
+ export * from "./GetAlimtalkTemplateCommand";
5
+ export * from "./ListAlimtalkTemplatesCommand";
6
+ export * from "./ListAlimtalkChannelsCommand";
7
+ export * from "./SendSMSCommand";
8
+ export * from "./SendMMSCommand";
9
+ export * from "./GetSMSStatusCommand";
10
+ export * from "./GetSMSResultCommand";
@@ -1,2 +1,2 @@
1
- export * from './signer-ncp';
2
- export * from './metadata-ingestkorea';
1
+ export * from "./signer-ncp";
2
+ export * from "./metadata-ingestkorea";
@@ -1,3 +1,3 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { SensClientResolvedConfig } from "../SensClient";
3
3
  export declare const middlewareIngestkoreaMetadata: (request: HttpRequest, config: SensClientResolvedConfig) => Promise<HttpRequest>;
@@ -1,3 +1,3 @@
1
- import { HttpRequest } from '@ingestkorea/util-http-handler';
2
- import { SensClientResolvedConfig } from '../SensClient';
1
+ import { HttpRequest } from "@ingestkorea/util-http-handler";
2
+ import { SensClientResolvedConfig } from "../SensClient";
3
3
  export declare const middlewareNcpSigner: (request: HttpRequest, config: SensClientResolvedConfig) => Promise<HttpRequest>;
@@ -1,4 +1,4 @@
1
- import { StatusMessage } from './GetAlimtalkStatus';
1
+ import { StatusMessage } from "./GetAlimtalkStatus";
2
2
  export interface GetAlimtalkResultInput {
3
3
  messageId: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { ReceivedMessage } from './SendAlimtalk';
1
+ import { ReceivedMessage } from "./SendAlimtalk";
2
2
  export interface GetAlimtalkStatusInput {
3
3
  requestId: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { ListAlimtalkTemplatesInput, ListAlimtalkTemplatesOutput } from './ListAlimtalkTemplates';
1
+ import { ListAlimtalkTemplatesInput, ListAlimtalkTemplatesOutput } from "./ListAlimtalkTemplates";
2
2
  export interface GetAlimtalkTemplateInput extends ListAlimtalkTemplatesInput {
3
3
  templateCode: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import { SendSMSInput, SendSMSOutput } from './SendSMS';
1
+ import { SendSMSInput, SendSMSOutput } from "./SendSMS";
2
2
  export type SendFile = {
3
3
  name: string;
4
4
  body?: string;
@@ -1,6 +1,6 @@
1
- export type MessageType = 'SMS' | 'LMS' | 'MMS';
2
- export type MessageContentType = 'COMM' | 'AD';
3
- export type CountryCode = '1' | '886' | '81' | '86' | '65' | '852' | '82';
1
+ export type MessageType = "SMS" | "LMS" | "MMS";
2
+ export type MessageContentType = "COMM" | "AD";
3
+ export type CountryCode = "1" | "886" | "81" | "86" | "65" | "852" | "82";
4
4
  export type SMSMessage = {
5
5
  to: string;
6
6
  subject?: string;
@@ -1,4 +1,4 @@
1
- import { HttpRequest, HttpResponse } from '@ingestkorea/util-http-handler';
1
+ import { HttpRequest, HttpResponse } from "@ingestkorea/util-http-handler";
2
2
  export declare abstract class SensCommand<ClientInput, ClientOutput, ClientResolvedConfig> {
3
3
  input: ClientInput;
4
4
  constructor(input: ClientInput);