@ingestkorea/client-sens 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +99 -57
  2. package/dist-cjs/SensClient.js +42 -43
  3. package/dist-cjs/commands/GetAlimtalkResultCommand.js +3 -0
  4. package/dist-cjs/commands/GetAlimtalkStatusCommand.js +8 -1
  5. package/dist-cjs/commands/GetAlimtalkTemplateCommand.js +3 -0
  6. package/dist-cjs/commands/GetSMSResultCommand.js +3 -0
  7. package/dist-cjs/commands/GetSMSStatusCommand.js +8 -1
  8. package/dist-cjs/commands/ListAlimtalkChannelsCommand.js +3 -0
  9. package/dist-cjs/commands/ListAlimtalkStatusCommand.js +22 -10
  10. package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +3 -0
  11. package/dist-cjs/commands/ListSMSStatusCommand.js +21 -10
  12. package/dist-cjs/commands/SendAlimtalkCommand.js +15 -14
  13. package/dist-cjs/commands/SendMMSCommand.js +16 -23
  14. package/dist-cjs/commands/SendSMSCommand.js +28 -16
  15. package/dist-cjs/commands/constants.js +8 -19
  16. package/dist-cjs/index.js +1 -0
  17. package/dist-cjs/middleware/constants.js +2 -1
  18. package/dist-cjs/middleware/middleware-metadata.js +7 -12
  19. package/dist-cjs/middleware/middleware-retry.js +48 -38
  20. package/dist-cjs/middleware/middleware-sign.js +8 -12
  21. package/dist-cjs/models/SensApiError.js +21 -0
  22. package/dist-cjs/models/{SensErrorInfo.js → SensClientError.js} +6 -1
  23. package/dist-cjs/models/SensCommand.js +1 -0
  24. package/dist-cjs/models/index.js +2 -1
  25. package/dist-cjs/protocols/GetAlimtalkResult.js +14 -17
  26. package/dist-cjs/protocols/GetAlimtalkStatus.js +21 -17
  27. package/dist-cjs/protocols/GetAlimtalkTemplate.js +29 -17
  28. package/dist-cjs/protocols/GetSMSResult.js +16 -17
  29. package/dist-cjs/protocols/GetSMSStatus.js +10 -16
  30. package/dist-cjs/protocols/ListAlimtalkChannels.js +10 -16
  31. package/dist-cjs/protocols/ListAlimtalkStatus.js +10 -16
  32. package/dist-cjs/protocols/ListAlimtalkTemplates.js +12 -19
  33. package/dist-cjs/protocols/ListSMSStatus.js +10 -16
  34. package/dist-cjs/protocols/SendAlimtalk.js +10 -16
  35. package/dist-cjs/protocols/SendMMS.js +4 -13
  36. package/dist-cjs/protocols/SendSMS.js +11 -17
  37. package/dist-cjs/protocols/constants.js +124 -82
  38. package/dist-es/SensClient.js +37 -31
  39. package/dist-es/commands/GetAlimtalkResultCommand.js +8 -9
  40. package/dist-es/commands/GetAlimtalkStatusCommand.js +8 -9
  41. package/dist-es/commands/GetAlimtalkTemplateCommand.js +8 -9
  42. package/dist-es/commands/GetSMSResultCommand.js +8 -9
  43. package/dist-es/commands/GetSMSStatusCommand.js +8 -9
  44. package/dist-es/commands/ListAlimtalkChannelsCommand.js +8 -9
  45. package/dist-es/commands/ListAlimtalkStatusCommand.js +24 -28
  46. package/dist-es/commands/ListAlimtalkTemplatesCommand.js +8 -9
  47. package/dist-es/commands/ListSMSStatusCommand.js +25 -29
  48. package/dist-es/commands/SendAlimtalkCommand.js +18 -26
  49. package/dist-es/commands/SendMMSCommand.js +37 -48
  50. package/dist-es/commands/SendSMSCommand.js +25 -29
  51. package/dist-es/commands/constants.js +18 -39
  52. package/dist-es/commands/index.js +12 -28
  53. package/dist-es/index.js +3 -18
  54. package/dist-es/middleware/constants.js +8 -10
  55. package/dist-es/middleware/index.js +3 -19
  56. package/dist-es/middleware/middleware-metadata.js +4 -7
  57. package/dist-es/middleware/middleware-retry.js +47 -38
  58. package/dist-es/middleware/middleware-sign.js +9 -13
  59. package/dist-es/models/GetAlimtalkResult.js +1 -2
  60. package/dist-es/models/GetAlimtalkStatus.js +1 -2
  61. package/dist-es/models/GetAlimtalkTemplate.js +1 -2
  62. package/dist-es/models/GetSMSResult.js +1 -2
  63. package/dist-es/models/GetSMSStatus.js +1 -2
  64. package/dist-es/models/ListAlimtalkChannels.js +1 -2
  65. package/dist-es/models/ListAlimtalkStatus.js +1 -2
  66. package/dist-es/models/ListAlimtalkTemplates.js +1 -2
  67. package/dist-es/models/ListSMSStatus.js +1 -2
  68. package/dist-es/models/MetadataBearer.js +1 -2
  69. package/dist-es/models/SendAlimtalk.js +2 -5
  70. package/dist-es/models/SendMMS.js +2 -5
  71. package/dist-es/models/SendSMS.js +1 -2
  72. package/dist-es/models/SensApiError.js +18 -0
  73. package/dist-es/models/SensClient.js +1 -2
  74. package/dist-es/models/SensClientError.js +14 -0
  75. package/dist-es/models/SensCommand.js +2 -5
  76. package/dist-es/models/SensMiddleware.js +1 -2
  77. package/dist-es/models/index.js +18 -33
  78. package/dist-es/protocols/GetAlimtalkResult.js +11 -16
  79. package/dist-es/protocols/GetAlimtalkStatus.js +17 -24
  80. package/dist-es/protocols/GetAlimtalkTemplate.js +12 -17
  81. package/dist-es/protocols/GetSMSResult.js +11 -16
  82. package/dist-es/protocols/GetSMSStatus.js +15 -22
  83. package/dist-es/protocols/ListAlimtalkChannels.js +11 -16
  84. package/dist-es/protocols/ListAlimtalkStatus.js +11 -16
  85. package/dist-es/protocols/ListAlimtalkTemplates.js +15 -22
  86. package/dist-es/protocols/ListSMSStatus.js +11 -16
  87. package/dist-es/protocols/SendAlimtalk.js +12 -18
  88. package/dist-es/protocols/SendMMS.js +5 -10
  89. package/dist-es/protocols/SendSMS.js +12 -18
  90. package/dist-es/protocols/constants.js +126 -88
  91. package/dist-types/SensClient.d.ts +0 -1
  92. package/dist-types/index.d.ts +1 -0
  93. package/dist-types/middleware/constants.d.ts +1 -0
  94. package/dist-types/models/MetadataBearer.d.ts +1 -0
  95. package/dist-types/models/SensApiError.d.ts +55 -0
  96. package/dist-types/models/SensClient.d.ts +8 -1
  97. package/dist-types/models/SensClientError.d.ts +18 -0
  98. package/dist-types/models/index.d.ts +2 -1
  99. package/dist-types/protocols/constants.d.ts +1 -1
  100. package/package.json +4 -5
  101. package/dist-es/models/SensErrorInfo.js +0 -13
  102. package/dist-types/models/SensErrorInfo.d.ts +0 -21
@@ -1,19 +1,10 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_GetAlimtalkTemplateCommand = exports.se_GetAlimtalkTemplateCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
6
  const ListAlimtalkTemplates_js_1 = require("./ListAlimtalkTemplates.js");
16
- const se_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
7
+ const se_GetAlimtalkTemplateCommand = async (input, config) => {
17
8
  const hostname = "sens.apigw.ntruss.com";
18
9
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
19
10
  const headers = {
@@ -31,15 +22,18 @@ const se_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void
31
22
  query,
32
23
  headers,
33
24
  });
34
- });
25
+ };
35
26
  exports.se_GetAlimtalkTemplateCommand = se_GetAlimtalkTemplateCommand;
36
- const de_GetAlimtalkTemplateCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
27
+ const de_GetAlimtalkTemplateCommand = async (response, config) => {
37
28
  if (response.statusCode >= 300)
38
- yield (0, constants_js_1.parseErrorBody)(response);
39
- const data = yield (0, constants_js_1.parseBody)(response);
29
+ await (0, constants_js_1.parseErrorBody)(response);
30
+ const data = await (0, constants_js_1.parseBody)(response);
40
31
  const contents = de_GetAlimtalkTemplateResult(data);
41
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
42
- });
32
+ return {
33
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
34
+ ...(0, constants_js_1.compact)(contents),
35
+ };
36
+ };
43
37
  exports.de_GetAlimtalkTemplateCommand = de_GetAlimtalkTemplateCommand;
44
38
  const de_GetAlimtalkTemplateResult = (output) => {
45
39
  return {
@@ -50,7 +44,25 @@ const de_TemplateDetailList = (output) => {
50
44
  return (output || []).filter((e) => e != null).map((entry) => de_TemplateDetail(entry));
51
45
  };
52
46
  const de_TemplateDetail = (output) => {
53
- return Object.assign(Object.assign({}, (0, ListAlimtalkTemplates_js_1.de_Template)(output)), { categoryCode: output.categoryCode != undefined ? output.categoryCode : undefined, categoryName: output.categoryName != undefined ? output.categoryName : undefined, messageType: output.messageType != undefined ? output.messageType : undefined, emphasizeType: output.emphasizeType != undefined ? output.emphasizeType : undefined, content: output.content != undefined ? output.content : undefined, adContent: output.adContent != undefined ? output.adContent : undefined, extraContent: output.extraContent != undefined ? output.extraContent : undefined, title: output.title != undefined ? output.title : undefined, additionalTitle: output.additionalTitle != undefined ? output.additionalTitle : undefined, comments: output.comments != undefined ? de_CommentList(output.comments) : [], templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined, templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined, buttons: output.buttons != undefined ? de_TemplateButtonExtendList(output.buttons) : [], securityFlag: output.securityFlag !== undefined ? output.securityFlag : undefined, isBlock: output.isBlock !== undefined ? output.isBlock : undefined, isDormant: output.isDormant !== undefined ? output.isDormant : undefined });
47
+ return {
48
+ ...(0, ListAlimtalkTemplates_js_1.de_Template)(output),
49
+ categoryCode: output.categoryCode != undefined ? output.categoryCode : undefined,
50
+ categoryName: output.categoryName != undefined ? output.categoryName : undefined,
51
+ messageType: output.messageType != undefined ? output.messageType : undefined,
52
+ emphasizeType: output.emphasizeType != undefined ? output.emphasizeType : undefined,
53
+ content: output.content != undefined ? output.content : undefined,
54
+ adContent: output.adContent != undefined ? output.adContent : undefined,
55
+ extraContent: output.extraContent != undefined ? output.extraContent : undefined,
56
+ title: output.title != undefined ? output.title : undefined,
57
+ additionalTitle: output.additionalTitle != undefined ? output.additionalTitle : undefined,
58
+ comments: output.comments != undefined ? de_CommentList(output.comments) : [],
59
+ templateInspectionStatus: output.templateInspectionStatus != undefined ? output.templateInspectionStatus : undefined,
60
+ templateStatus: output.templateStatus != undefined ? output.templateStatus : undefined,
61
+ buttons: output.buttons != undefined ? de_TemplateButtonExtendList(output.buttons) : [],
62
+ securityFlag: output.securityFlag !== undefined ? output.securityFlag : undefined,
63
+ isBlock: output.isBlock !== undefined ? output.isBlock : undefined,
64
+ isDormant: output.isDormant !== undefined ? output.isDormant : undefined,
65
+ };
54
66
  };
55
67
  const de_CommentList = (output) => {
56
68
  return (output || []).filter((e) => e != null).map((entry) => de_Comment(entry));
@@ -1,19 +1,10 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_GetSMSResultCommand = exports.se_GetSMSResultCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
6
  const GetSMSStatus_js_1 = require("./GetSMSStatus.js");
16
- const se_GetSMSResultCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
7
+ const se_GetSMSResultCommand = async (input, config) => {
17
8
  const hostname = "sens.apigw.ntruss.com";
18
9
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages" + "/" + input.messageId;
19
10
  const headers = {
@@ -26,15 +17,18 @@ const se_GetSMSResultCommand = (input, config) => __awaiter(void 0, void 0, void
26
17
  path,
27
18
  headers,
28
19
  });
29
- });
20
+ };
30
21
  exports.se_GetSMSResultCommand = se_GetSMSResultCommand;
31
- const de_GetSMSResultCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
22
+ const de_GetSMSResultCommand = async (response, config) => {
32
23
  if (response.statusCode >= 300)
33
- yield (0, constants_js_1.parseErrorBody)(response);
34
- const data = yield (0, constants_js_1.parseBody)(response);
24
+ await (0, constants_js_1.parseErrorBody)(response);
25
+ const data = await (0, constants_js_1.parseBody)(response);
35
26
  const contents = de_GetSMSResultResult(data);
36
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
37
- });
27
+ return {
28
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
29
+ ...(0, constants_js_1.compact)(contents),
30
+ };
31
+ };
38
32
  exports.de_GetSMSResultCommand = de_GetSMSResultCommand;
39
33
  const de_GetSMSResultResult = (output) => {
40
34
  return {
@@ -47,7 +41,12 @@ const de_SMSMessageStatusList = (output) => {
47
41
  return (output || []).filter((e) => e != null).map((entry) => de_SMSMessageStatus(entry));
48
42
  };
49
43
  const de_SMSMessageStatus = (output) => {
50
- return Object.assign(Object.assign({}, (0, GetSMSStatus_js_1.de_SMSMessageRequestStatus)(output)), { subject: output.subject ? output.subject : undefined, content: output.content ? output.content : undefined, files: output.files ? de_FileList(output.files) : [] });
44
+ return {
45
+ ...(0, GetSMSStatus_js_1.de_SMSMessageRequestStatus)(output),
46
+ subject: output.subject ? output.subject : undefined,
47
+ content: output.content ? output.content : undefined,
48
+ files: output.files ? de_FileList(output.files) : [],
49
+ };
51
50
  };
52
51
  const de_FileList = (output) => {
53
52
  return (output || []).filter((e) => e != null).map((entry) => de_File(entry));
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_SMSMessageRequestStatus = exports.de_GetSMSStatusResult = exports.de_GetSMSStatusCommand = exports.se_GetSMSStatusCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
- const se_GetSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const se_GetSMSStatusCommand = async (input, config) => {
16
7
  const hostname = "sens.apigw.ntruss.com";
17
8
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
18
9
  const headers = {
@@ -32,15 +23,18 @@ const se_GetSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, void
32
23
  query,
33
24
  headers,
34
25
  });
35
- });
26
+ };
36
27
  exports.se_GetSMSStatusCommand = se_GetSMSStatusCommand;
37
- const de_GetSMSStatusCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
28
+ const de_GetSMSStatusCommand = async (response, config) => {
38
29
  if (response.statusCode >= 300)
39
- yield (0, constants_js_1.parseErrorBody)(response);
40
- const data = yield (0, constants_js_1.parseBody)(response);
30
+ await (0, constants_js_1.parseErrorBody)(response);
31
+ const data = await (0, constants_js_1.parseBody)(response);
41
32
  const contents = (0, exports.de_GetSMSStatusResult)(data);
42
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
43
- });
33
+ return {
34
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
35
+ ...(0, constants_js_1.compact)(contents),
36
+ };
37
+ };
44
38
  exports.de_GetSMSStatusCommand = de_GetSMSStatusCommand;
45
39
  const de_GetSMSStatusResult = (output) => {
46
40
  return {
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_ListAlimtalkChannelsCommand = exports.se_ListAlimtalkChannelsCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
- const se_ListAlimtalkChannelsCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const se_ListAlimtalkChannelsCommand = async (input, config) => {
16
7
  const hostname = "sens.apigw.ntruss.com";
17
8
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/channels";
18
9
  const headers = {
@@ -25,15 +16,18 @@ const se_ListAlimtalkChannelsCommand = (input, config) => __awaiter(void 0, void
25
16
  path: path,
26
17
  headers: headers,
27
18
  });
28
- });
19
+ };
29
20
  exports.se_ListAlimtalkChannelsCommand = se_ListAlimtalkChannelsCommand;
30
- const de_ListAlimtalkChannelsCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
21
+ const de_ListAlimtalkChannelsCommand = async (response, config) => {
31
22
  if (response.statusCode >= 300)
32
- yield (0, constants_js_1.parseErrorBody)(response);
33
- const data = yield (0, constants_js_1.parseBody)(response);
23
+ await (0, constants_js_1.parseErrorBody)(response);
24
+ const data = await (0, constants_js_1.parseBody)(response);
34
25
  const contents = de_ListAlimtalkChannelsResult(data);
35
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
36
- });
26
+ return {
27
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
28
+ ...(0, constants_js_1.compact)(contents),
29
+ };
30
+ };
37
31
  exports.de_ListAlimtalkChannelsCommand = de_ListAlimtalkChannelsCommand;
38
32
  const de_ListAlimtalkChannelsResult = (output) => {
39
33
  return {
@@ -1,19 +1,10 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_ListAlimtalkStatusCommand = exports.se_ListAlimtalkStatusCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
6
  const GetAlimtalkStatus_js_1 = require("./GetAlimtalkStatus.js");
16
- const se_ListAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
7
+ const se_ListAlimtalkStatusCommand = async (input, config) => {
17
8
  const hostname = "sens.apigw.ntruss.com";
18
9
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
19
10
  const headers = {
@@ -33,15 +24,18 @@ const se_ListAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0
33
24
  headers: headers,
34
25
  query,
35
26
  });
36
- });
27
+ };
37
28
  exports.se_ListAlimtalkStatusCommand = se_ListAlimtalkStatusCommand;
38
- const de_ListAlimtalkStatusCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
29
+ const de_ListAlimtalkStatusCommand = async (response, config) => {
39
30
  if (response.statusCode >= 300)
40
- yield (0, constants_js_1.parseErrorBody)(response);
41
- const data = yield (0, constants_js_1.parseBody)(response);
31
+ await (0, constants_js_1.parseErrorBody)(response);
32
+ const data = await (0, constants_js_1.parseBody)(response);
42
33
  const contents = de_ListAlimtalkStatusResult(data);
43
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
44
- });
34
+ return {
35
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
36
+ ...(0, constants_js_1.compact)(contents),
37
+ };
38
+ };
45
39
  exports.de_ListAlimtalkStatusCommand = de_ListAlimtalkStatusCommand;
46
40
  const de_ListAlimtalkStatusResult = (output) => {
47
41
  return (0, GetAlimtalkStatus_js_1.de_GetAlimtalkStatusResult)(output);
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_Template = exports.de_ListAlimtalkTemplatesCommand = exports.se_ListAlimtalkTemplatesCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
- const se_ListAlimtalkTemplatesCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const se_ListAlimtalkTemplatesCommand = async (input, config) => {
16
7
  const hostname = "sens.apigw.ntruss.com";
17
8
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
18
9
  const headers = {
@@ -29,15 +20,18 @@ const se_ListAlimtalkTemplatesCommand = (input, config) => __awaiter(void 0, voi
29
20
  query: query,
30
21
  headers: headers,
31
22
  });
32
- });
23
+ };
33
24
  exports.se_ListAlimtalkTemplatesCommand = se_ListAlimtalkTemplatesCommand;
34
- const de_ListAlimtalkTemplatesCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
25
+ const de_ListAlimtalkTemplatesCommand = async (response, config) => {
35
26
  if (response.statusCode >= 300)
36
- yield (0, constants_js_1.parseErrorBody)(response);
37
- const data = yield (0, constants_js_1.parseBody)(response);
27
+ await (0, constants_js_1.parseErrorBody)(response);
28
+ const data = await (0, constants_js_1.parseBody)(response);
38
29
  const contents = de_ListAlimtalkTemplatesResult(data);
39
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
40
- });
30
+ return {
31
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
32
+ ...(0, constants_js_1.compact)(contents),
33
+ };
34
+ };
41
35
  exports.de_ListAlimtalkTemplatesCommand = de_ListAlimtalkTemplatesCommand;
42
36
  const de_ListAlimtalkTemplatesResult = (output) => {
43
37
  return {
@@ -49,10 +43,9 @@ const de_TemplateList = (output) => {
49
43
  .filter((e) => e != null)
50
44
  .map((entry) => (0, exports.de_Template)(entry))
51
45
  .sort((a, b) => {
52
- var _a, _b;
53
46
  // 생성 날짜 기준 내림차순
54
- const dateA = ((_a = a.createTime) !== null && _a !== void 0 ? _a : "").replace(/\.\d{3}Z?$/, "");
55
- const dateB = ((_b = b.createTime) !== null && _b !== void 0 ? _b : "").replace(/\.\d{3}Z?$/, "");
47
+ const dateA = (a.createTime ?? "").replace(/\.\d{3}Z?$/, "");
48
+ const dateB = (b.createTime ?? "").replace(/\.\d{3}Z?$/, "");
56
49
  if (dateB < dateA)
57
50
  return -1;
58
51
  if (dateB > dateA)
@@ -1,19 +1,10 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_ListSMSStatusCommand = exports.se_ListSMSStatusCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
6
  const GetSMSStatus_js_1 = require("./GetSMSStatus.js");
16
- const se_ListSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
7
+ const se_ListSMSStatusCommand = async (input, config) => {
17
8
  const hostname = "sens.apigw.ntruss.com";
18
9
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
19
10
  const headers = {
@@ -33,15 +24,18 @@ const se_ListSMSStatusCommand = (input, config) => __awaiter(void 0, void 0, voi
33
24
  query,
34
25
  headers,
35
26
  });
36
- });
27
+ };
37
28
  exports.se_ListSMSStatusCommand = se_ListSMSStatusCommand;
38
- const de_ListSMSStatusCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
29
+ const de_ListSMSStatusCommand = async (response, config) => {
39
30
  if (response.statusCode >= 300)
40
- yield (0, constants_js_1.parseErrorBody)(response);
41
- const data = yield (0, constants_js_1.parseBody)(response);
31
+ await (0, constants_js_1.parseErrorBody)(response);
32
+ const data = await (0, constants_js_1.parseBody)(response);
42
33
  const contents = de_ListSMSStatusResult(data);
43
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
44
- });
34
+ return {
35
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
36
+ ...(0, constants_js_1.compact)(contents),
37
+ };
38
+ };
45
39
  exports.de_ListSMSStatusCommand = de_ListSMSStatusCommand;
46
40
  const de_ListSMSStatusResult = (output) => {
47
41
  return (0, GetSMSStatus_js_1.de_GetSMSStatusResult)(output);
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_AlimtalkMessageRequestStatus = exports.de_SendAlimtalkCommand = exports.se_SendAlimtalkCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
- const se_SendAlimtalkCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const se_SendAlimtalkCommand = async (input, config) => {
16
7
  const hostname = "sens.apigw.ntruss.com";
17
8
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
18
9
  const headers = {
@@ -32,15 +23,18 @@ const se_SendAlimtalkCommand = (input, config) => __awaiter(void 0, void 0, void
32
23
  headers,
33
24
  body,
34
25
  });
35
- });
26
+ };
36
27
  exports.se_SendAlimtalkCommand = se_SendAlimtalkCommand;
37
- const de_SendAlimtalkCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
28
+ const de_SendAlimtalkCommand = async (response, config) => {
38
29
  if (response.statusCode >= 300)
39
- yield (0, constants_js_1.parseErrorBody)(response);
40
- const data = yield (0, constants_js_1.parseBody)(response);
30
+ await (0, constants_js_1.parseErrorBody)(response);
31
+ const data = await (0, constants_js_1.parseBody)(response);
41
32
  const contents = de_SendAlimtalkResult(data);
42
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
43
- });
33
+ return {
34
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
35
+ ...(0, constants_js_1.compact)(contents),
36
+ };
37
+ };
44
38
  exports.de_SendAlimtalkCommand = de_SendAlimtalkCommand;
45
39
  const de_SendAlimtalkResult = (output) => {
46
40
  return {
@@ -1,21 +1,12 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_SendMMSCommand = exports.se_SendMMSCommand = void 0;
13
4
  const SendSMS_js_1 = require("./SendSMS.js");
14
- const se_SendMMSCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
5
+ const se_SendMMSCommand = async (input, config) => {
15
6
  return (0, SendSMS_js_1.se_SendSMSCommand)(input, config);
16
- });
7
+ };
17
8
  exports.se_SendMMSCommand = se_SendMMSCommand;
18
- const de_SendMMSCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
9
+ const de_SendMMSCommand = async (response, config) => {
19
10
  return (0, SendSMS_js_1.de_SendSMSCommand)(response, config);
20
- });
11
+ };
21
12
  exports.de_SendMMSCommand = de_SendMMSCommand;
@@ -1,25 +1,16 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.de_SendSMSResult = exports.de_SendSMSCommand = exports.se_SendSMSCommand = void 0;
13
4
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
5
  const constants_js_1 = require("./constants.js");
15
- const se_SendSMSCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
6
+ const se_SendSMSCommand = async (input, config) => {
16
7
  const hostname = "sens.apigw.ntruss.com";
17
8
  const path = "/sms/v2/services/" + config.serviceId.sms + "/messages";
18
9
  const headers = {
19
10
  "content-type": "application/json; charset=utf-8",
20
11
  host: hostname,
21
12
  };
22
- const body = JSON.stringify(Object.assign({}, input));
13
+ const body = JSON.stringify({ ...input });
23
14
  return new util_http_handler_1.HttpRequest({
24
15
  protocol: "https:",
25
16
  method: "POST",
@@ -28,15 +19,18 @@ const se_SendSMSCommand = (input, config) => __awaiter(void 0, void 0, void 0, f
28
19
  headers,
29
20
  body,
30
21
  });
31
- });
22
+ };
32
23
  exports.se_SendSMSCommand = se_SendSMSCommand;
33
- const de_SendSMSCommand = (response, config) => __awaiter(void 0, void 0, void 0, function* () {
24
+ const de_SendSMSCommand = async (response, config) => {
34
25
  if (response.statusCode >= 300)
35
- yield (0, constants_js_1.parseErrorBody)(response);
36
- const data = yield (0, constants_js_1.parseBody)(response);
26
+ await (0, constants_js_1.parseErrorBody)(response);
27
+ const data = await (0, constants_js_1.parseBody)(response);
37
28
  const contents = (0, exports.de_SendSMSResult)(data);
38
- return Object.assign({ $metadata: (0, constants_js_1.deserializeMetadata)(response) }, (0, constants_js_1.compact)(contents));
39
- });
29
+ return {
30
+ $metadata: (0, constants_js_1.deserializeMetadata)(response),
31
+ ...(0, constants_js_1.compact)(contents),
32
+ };
33
+ };
40
34
  exports.de_SendSMSCommand = de_SendSMSCommand;
41
35
  const de_SendSMSResult = (output) => {
42
36
  return {