@ingestkorea/client-sens 1.1.0 → 1.3.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 (62) hide show
  1. package/README.md +33 -9
  2. package/dist-cjs/commands/{GetRequestResultCommand.js → GetAlimtalkResultCommand.js} +6 -6
  3. package/dist-cjs/commands/{GetRequestStatusCommand.js → GetAlimtalkStatusCommand.js} +6 -6
  4. package/dist-cjs/commands/{ListChannelsCommand.js → GetAlimtalkTemplateCommand.js} +6 -6
  5. package/dist-cjs/commands/ListAlimtalkChannelsCommand.js +44 -0
  6. package/dist-cjs/commands/ListAlimtalkTemplatesCommand.js +44 -0
  7. package/dist-cjs/commands/index.js +5 -3
  8. package/dist-cjs/models/{GetRequestResult.js → GetAlimtalkResult.js} +0 -0
  9. package/dist-cjs/models/{GetRequestStatus.js → GetAlimtalkStatus.js} +0 -0
  10. package/dist-cjs/models/GetAlimtalkTemplate.js +4 -0
  11. package/dist-cjs/models/{ListChannels.js → ListAlimtalkChannels.js} +0 -0
  12. package/dist-cjs/models/ListAlimtalkTemplates.js +7 -0
  13. package/dist-cjs/models/index.js +5 -3
  14. package/dist-cjs/protocols/{GetRequestResult.js → GetAlimtalkResult.js} +12 -12
  15. package/dist-cjs/protocols/{GetRequestStatus.js → GetAlimtalkStatus.js} +13 -12
  16. package/dist-cjs/protocols/GetAlimtalkTemplate.js +51 -0
  17. package/dist-cjs/protocols/{ListChannels.js → ListAlimtalkChannels.js} +12 -12
  18. package/dist-cjs/protocols/ListAlimtalkTemplates.js +97 -0
  19. package/dist-cjs/protocols/index.js +5 -3
  20. package/dist-es/commands/{GetRequestStatusCommand.js → GetAlimtalkResultCommand.js} +4 -4
  21. package/dist-es/commands/{ListChannelsCommand.js → GetAlimtalkStatusCommand.js} +4 -4
  22. package/dist-es/commands/{GetRequestResultCommand.js → GetAlimtalkTemplateCommand.js} +4 -4
  23. package/dist-es/commands/ListAlimtalkChannelsCommand.js +29 -0
  24. package/dist-es/commands/ListAlimtalkTemplatesCommand.js +29 -0
  25. package/dist-es/commands/index.js +5 -3
  26. package/dist-es/models/{GetRequestResult.js → GetAlimtalkResult.js} +0 -0
  27. package/dist-es/models/{GetRequestStatus.js → GetAlimtalkStatus.js} +0 -0
  28. package/dist-es/models/GetAlimtalkTemplate.js +3 -0
  29. package/dist-es/models/{ListChannels.js → ListAlimtalkChannels.js} +0 -0
  30. package/dist-es/models/ListAlimtalkTemplates.js +6 -0
  31. package/dist-es/models/index.js +5 -3
  32. package/dist-es/protocols/{GetRequestResult.js → GetAlimtalkResult.js} +7 -7
  33. package/dist-es/protocols/{GetRequestStatus.js → GetAlimtalkStatus.js} +8 -7
  34. package/dist-es/protocols/GetAlimtalkTemplate.js +38 -0
  35. package/dist-es/protocols/{ListChannels.js → ListAlimtalkChannels.js} +7 -7
  36. package/dist-es/protocols/ListAlimtalkTemplates.js +81 -0
  37. package/dist-es/protocols/index.js +5 -3
  38. package/dist-types/commands/GetAlimtalkResultCommand.d.ts +13 -0
  39. package/dist-types/commands/GetAlimtalkStatusCommand.d.ts +13 -0
  40. package/dist-types/commands/GetAlimtalkTemplateCommand.d.ts +13 -0
  41. package/dist-types/commands/ListAlimtalkChannelsCommand.d.ts +13 -0
  42. package/dist-types/commands/ListAlimtalkTemplatesCommand.d.ts +13 -0
  43. package/dist-types/commands/index.d.ts +5 -3
  44. package/dist-types/models/{GetRequestResult.d.ts → GetAlimtalkResult.d.ts} +3 -3
  45. package/dist-types/models/{GetRequestStatus.d.ts → GetAlimtalkStatus.d.ts} +2 -2
  46. package/dist-types/models/GetAlimtalkTemplate.d.ts +6 -0
  47. package/dist-types/models/{ListChannels.d.ts → ListAlimtalkChannels.d.ts} +2 -2
  48. package/dist-types/models/ListAlimtalkTemplates.d.ts +33 -0
  49. package/dist-types/models/index.d.ts +5 -3
  50. package/dist-types/protocols/GetAlimtalkResult.d.ts +8 -0
  51. package/dist-types/protocols/GetAlimtalkStatus.d.ts +8 -0
  52. package/dist-types/protocols/GetAlimtalkTemplate.d.ts +7 -0
  53. package/dist-types/protocols/ListAlimtalkChannels.d.ts +8 -0
  54. package/dist-types/protocols/ListAlimtalkTemplates.d.ts +10 -0
  55. package/dist-types/protocols/index.d.ts +5 -3
  56. package/package.json +10 -3
  57. package/dist-types/commands/GetRequestResultCommand.d.ts +0 -13
  58. package/dist-types/commands/GetRequestStatusCommand.d.ts +0 -13
  59. package/dist-types/commands/ListChannelsCommand.d.ts +0 -13
  60. package/dist-types/protocols/GetRequestResult.d.ts +0 -8
  61. package/dist-types/protocols/GetRequestStatus.d.ts +0 -8
  62. package/dist-types/protocols/ListChannels.d.ts +0 -8
package/README.md CHANGED
@@ -4,7 +4,7 @@
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
5
 
6
6
  ## Description
7
- INGESTKOREA SDK NCP SENS Client for Node.js.
7
+ INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.
8
8
 
9
9
  ## Installing
10
10
  ```sh
@@ -20,18 +20,21 @@ npm install @ingestkorea/client-sens
20
20
  npm install -D @types/node # save dev mode
21
21
  ```
22
22
 
23
- ### Support Methods
23
+ ### Support Commands
24
24
  + SendAlimtalk
25
- + GetRequestStatus
26
- + GetRequestResult
27
- + ListChannels
25
+ + GetAlimtalkStatus (`GetRequestStatus` is deprecated)
26
+ + GetAlimtalkResult (`GetRequestResult` is deprecated)
27
+ + GetAlimtalkTemplate (`GetTemplate` is deprecated)
28
+ + ListAlimtalkTemplates (`ListTemplates` is deprecated)
29
+ + ListAlimtalkChannels (`ListChannels` is deprecated)
28
30
  + SendSMS
29
31
 
30
32
  ### Import
31
33
  ```ts
32
34
  import {
33
35
  SensClient,
34
- SendAlimtalkCommand, SendAlimtalkCommandInput
36
+ SendAlimtalkCommand, SendAlimtalkCommandInput,
37
+ SendSMSCommand, SendSMSCommandInput,
35
38
  } from '@ingestkorea/client-sens';
36
39
  ```
37
40
 
@@ -48,13 +51,17 @@ const client = new SensClient({
48
51
  accessKey: ACCESS_KEY,
49
52
  secretKey: SECRET_KEY
50
53
  },
51
- serviceId: { // at least one serviceId required
54
+ serviceId: {
52
55
  sms: 'ncp:sms:kr:123456789xxx:your-service-name', // optional
53
56
  kakao: 'ncp:kkobizmsg:kr:9876xxx:your-service-name' // optional
57
+ // at least one serviceId required
54
58
  // if you call send operation without serviceId, sdk throw error
55
59
  }
56
60
  });
61
+ ```
57
62
 
63
+ #### SendAlimtalk
64
+ ```ts
58
65
  let params: SendAlimtalkCommandInput = {
59
66
  plusFriendId: PLUS_FRIEND_ID,
60
67
  templateCode: TEMPLATE_CODE,
@@ -65,12 +72,29 @@ let params: SendAlimtalkCommandInput = {
65
72
  let command = new SendAlimtalkCommand(params);
66
73
  ```
67
74
 
75
+ #### SendSMS
76
+ ```ts
77
+ /**
78
+ * Automatically set message type('SMS' | 'LMS') according to content-length(euc-kr)
79
+ * SMS: max 80bytes
80
+ * LMS: max 2000bytes
81
+ */
82
+ let params: SendSMSCommandInput = {
83
+ from: '01012345678',
84
+ content: CONTENT,
85
+ messages: [
86
+ { to: '01087654321' }
87
+ ]
88
+ };
89
+ let command = new SendSMSCommand(params);
90
+ ```
91
+
68
92
  #### Async/await
69
93
  ```ts
70
94
  (async () => {
71
95
  try {
72
- const data1 = await client.send(command);
73
- console.dir(data1, { depth: 4 });
96
+ const data = await client.send(command);
97
+ console.dir(data, { depth: 4 });
74
98
  } catch (err){
75
99
  console.dir(err, { depth: 4 });
76
100
  };
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GetRequestResultCommand = void 0;
12
+ exports.GetAlimtalkResultCommand = void 0;
13
13
  const models_1 = require("../models");
14
- const GetRequestResult_1 = require("../protocols/GetRequestResult");
14
+ const GetAlimtalkResult_1 = require("../protocols/GetAlimtalkResult");
15
15
  const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
16
  ;
17
17
  ;
18
- class GetRequestResultCommand extends models_1.SensCommand {
18
+ class GetAlimtalkResultCommand extends models_1.SensCommand {
19
19
  constructor(input) {
20
20
  super(input);
21
21
  this.input = Object.assign({}, input);
@@ -27,18 +27,18 @@ class GetRequestResultCommand extends models_1.SensCommand {
27
27
  throw new util_error_handler_1.IngestkoreaError({
28
28
  code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
29
29
  });
30
- let request = yield (0, GetRequestResult_1.serializeIngestkorea_restJson_GetRequestResultCommand)(input, config);
30
+ let request = yield (0, GetAlimtalkResult_1.serializeIngestkorea_restJson_GetAlimtalkResultCommand)(input, config);
31
31
  return request;
32
32
  });
33
33
  }
34
34
  ;
35
35
  deserialize(response) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
- let output = yield (0, GetRequestResult_1.deserializeIngestkorea_restJson_GetRequestResultCommand)(response);
37
+ let output = yield (0, GetAlimtalkResult_1.deserializeIngestkorea_restJson_GetAlimtalkResultCommand)(response);
38
38
  return output;
39
39
  });
40
40
  }
41
41
  ;
42
42
  }
43
- exports.GetRequestResultCommand = GetRequestResultCommand;
43
+ exports.GetAlimtalkResultCommand = GetAlimtalkResultCommand;
44
44
  ;
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.GetRequestStatusCommand = void 0;
12
+ exports.GetAlimtalkStatusCommand = void 0;
13
13
  const models_1 = require("../models");
14
- const GetRequestStatus_1 = require("../protocols/GetRequestStatus");
14
+ const GetAlimtalkStatus_1 = require("../protocols/GetAlimtalkStatus");
15
15
  const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
16
  ;
17
17
  ;
18
- class GetRequestStatusCommand extends models_1.SensCommand {
18
+ class GetAlimtalkStatusCommand extends models_1.SensCommand {
19
19
  constructor(input) {
20
20
  super(input);
21
21
  this.input = Object.assign({}, input);
@@ -27,18 +27,18 @@ class GetRequestStatusCommand extends models_1.SensCommand {
27
27
  throw new util_error_handler_1.IngestkoreaError({
28
28
  code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
29
29
  });
30
- let request = yield (0, GetRequestStatus_1.serializeIngestkorea_restJson_GetRequestStatusCommand)(input, config);
30
+ let request = yield (0, GetAlimtalkStatus_1.serializeIngestkorea_restJson_GetAlimtalkStatusCommand)(input, config);
31
31
  return request;
32
32
  });
33
33
  }
34
34
  ;
35
35
  deserialize(response) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
- let output = yield (0, GetRequestStatus_1.deserializeIngestkorea_restJson_GetRequestStatusCommand)(response);
37
+ let output = yield (0, GetAlimtalkStatus_1.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand)(response);
38
38
  return output;
39
39
  });
40
40
  }
41
41
  ;
42
42
  }
43
- exports.GetRequestStatusCommand = GetRequestStatusCommand;
43
+ exports.GetAlimtalkStatusCommand = GetAlimtalkStatusCommand;
44
44
  ;
@@ -9,13 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ListChannelsCommand = void 0;
12
+ exports.GetAlimtalkTemplateCommand = void 0;
13
13
  const models_1 = require("../models");
14
- const ListChannels_1 = require("../protocols/ListChannels");
14
+ const GetAlimtalkTemplate_1 = require("../protocols/GetAlimtalkTemplate");
15
15
  const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
16
  ;
17
17
  ;
18
- class ListChannelsCommand extends models_1.SensCommand {
18
+ class GetAlimtalkTemplateCommand extends models_1.SensCommand {
19
19
  constructor(input) {
20
20
  super(input);
21
21
  this.input = Object.assign({}, input);
@@ -27,18 +27,18 @@ class ListChannelsCommand extends models_1.SensCommand {
27
27
  throw new util_error_handler_1.IngestkoreaError({
28
28
  code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
29
29
  });
30
- let request = yield (0, ListChannels_1.serializeIngestkorea_restJson_ListChannelsCommand)(input, config);
30
+ let request = yield (0, GetAlimtalkTemplate_1.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand)(input, config);
31
31
  return request;
32
32
  });
33
33
  }
34
34
  ;
35
35
  deserialize(response) {
36
36
  return __awaiter(this, void 0, void 0, function* () {
37
- let output = yield (0, ListChannels_1.deserializeIngestkorea_restJson_ListChannelsCommand)(response);
37
+ let output = yield (0, GetAlimtalkTemplate_1.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand)(response);
38
38
  return output;
39
39
  });
40
40
  }
41
41
  ;
42
42
  }
43
- exports.ListChannelsCommand = ListChannelsCommand;
43
+ exports.GetAlimtalkTemplateCommand = GetAlimtalkTemplateCommand;
44
44
  ;
@@ -0,0 +1,44 @@
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.ListAlimtalkChannelsCommand = void 0;
13
+ const models_1 = require("../models");
14
+ const ListAlimtalkChannels_1 = require("../protocols/ListAlimtalkChannels");
15
+ const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
+ ;
17
+ ;
18
+ class ListAlimtalkChannelsCommand 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.kakao)
27
+ throw new util_error_handler_1.IngestkoreaError({
28
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
29
+ });
30
+ let request = yield (0, ListAlimtalkChannels_1.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand)(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, ListAlimtalkChannels_1.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand)(response);
38
+ return output;
39
+ });
40
+ }
41
+ ;
42
+ }
43
+ exports.ListAlimtalkChannelsCommand = ListAlimtalkChannelsCommand;
44
+ ;
@@ -0,0 +1,44 @@
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.ListAlimtalkTemplatesCommand = void 0;
13
+ const models_1 = require("../models");
14
+ const ListAlimtalkTemplates_1 = require("../protocols/ListAlimtalkTemplates");
15
+ const util_error_handler_1 = require("@ingestkorea/util-error-handler");
16
+ ;
17
+ ;
18
+ class ListAlimtalkTemplatesCommand 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.kakao)
27
+ throw new util_error_handler_1.IngestkoreaError({
28
+ code: 400, type: 'Bad Request', message: 'Invalid Params', description: 'Please Check Kakao ServiceId'
29
+ });
30
+ let request = yield (0, ListAlimtalkTemplates_1.serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand)(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, ListAlimtalkTemplates_1.deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand)(response);
38
+ return output;
39
+ });
40
+ }
41
+ ;
42
+ }
43
+ exports.ListAlimtalkTemplatesCommand = ListAlimtalkTemplatesCommand;
44
+ ;
@@ -15,7 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./SendAlimtalkCommand"), exports);
18
- __exportStar(require("./GetRequestStatusCommand"), exports);
19
- __exportStar(require("./GetRequestResultCommand"), exports);
20
- __exportStar(require("./ListChannelsCommand"), exports);
18
+ __exportStar(require("./GetAlimtalkStatusCommand"), exports);
19
+ __exportStar(require("./GetAlimtalkResultCommand"), exports);
20
+ __exportStar(require("./GetAlimtalkTemplateCommand"), exports);
21
+ __exportStar(require("./ListAlimtalkTemplatesCommand"), exports);
22
+ __exportStar(require("./ListAlimtalkChannelsCommand"), exports);
21
23
  __exportStar(require("./SendSMSCommand"), exports);
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ ;
4
+ ;
5
+ ;
6
+ ;
7
+ ;
@@ -16,7 +16,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./SensCommand"), exports);
18
18
  __exportStar(require("./SendAlimtalk"), exports);
19
- __exportStar(require("./GetRequestStatus"), exports);
20
- __exportStar(require("./GetRequestResult"), exports);
21
- __exportStar(require("./ListChannels"), exports);
19
+ __exportStar(require("./GetAlimtalkStatus"), exports);
20
+ __exportStar(require("./GetAlimtalkResult"), exports);
21
+ __exportStar(require("./GetAlimtalkTemplate"), exports);
22
+ __exportStar(require("./ListAlimtalkTemplates"), exports);
23
+ __exportStar(require("./ListAlimtalkChannels"), exports);
22
24
  __exportStar(require("./SendSMS"), exports);
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.deserializeIngestkorea_restJson_GetRequestResultFailover = exports.deserializeIngestkorea_restJson_GetRequestResultOutput = exports.deserializeIngestkorea_restJson_GetRequestResultCommand = exports.serializeIngestkorea_restJson_GetRequestResultCommand = void 0;
12
+ exports.deserializeIngestkorea_restJson_AlimtalkFailover = exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkResultCommand = exports.serializeIngestkorea_restJson_GetAlimtalkResultCommand = void 0;
13
13
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
14
  const constants_1 = require("./constants");
15
- const serializeIngestkorea_restJson_GetRequestResultCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
15
+ const serializeIngestkorea_restJson_GetAlimtalkResultCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
16
16
  const hostname = "sens.apigw.ntruss.com";
17
17
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages/" + input.messageId;
18
18
  const headers = {
@@ -26,18 +26,18 @@ const serializeIngestkorea_restJson_GetRequestResultCommand = (input, config) =>
26
26
  headers: headers
27
27
  });
28
28
  });
29
- exports.serializeIngestkorea_restJson_GetRequestResultCommand = serializeIngestkorea_restJson_GetRequestResultCommand;
30
- const deserializeIngestkorea_restJson_GetRequestResultCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
29
+ exports.serializeIngestkorea_restJson_GetAlimtalkResultCommand = serializeIngestkorea_restJson_GetAlimtalkResultCommand;
30
+ const deserializeIngestkorea_restJson_GetAlimtalkResultCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  if (output.statusCode > 300)
32
32
  yield (0, constants_1.parseErrorBody)(output);
33
- const data = yield (0, constants_1.parseBody)(output); // GetRequestResultOutput
33
+ const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkResultOutput
34
34
  let contents = {};
35
- contents = yield (0, exports.deserializeIngestkorea_restJson_GetRequestResultOutput)(data);
35
+ contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput)(data);
36
36
  const response = Object.assign({}, contents);
37
37
  return response;
38
38
  });
39
- exports.deserializeIngestkorea_restJson_GetRequestResultCommand = deserializeIngestkorea_restJson_GetRequestResultCommand;
40
- const deserializeIngestkorea_restJson_GetRequestResultOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
39
+ exports.deserializeIngestkorea_restJson_GetAlimtalkResultCommand = deserializeIngestkorea_restJson_GetAlimtalkResultCommand;
40
+ const deserializeIngestkorea_restJson_GetAlimtalkResultOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
41
41
  return {
42
42
  requestId: output.requestId != undefined ? output.requestId : undefined,
43
43
  messageId: output.messageId != undefined ? output.messageId : undefined,
@@ -56,11 +56,11 @@ const deserializeIngestkorea_restJson_GetRequestResultOutput = (output) => __awa
56
56
  messageStatusName: output.messageStatusName != undefined ? output.messageStatusName : undefined,
57
57
  messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined,
58
58
  failover: output.failover != undefined ?
59
- (0, exports.deserializeIngestkorea_restJson_GetRequestResultFailover)(output.failover) : undefined,
59
+ (0, exports.deserializeIngestkorea_restJson_AlimtalkFailover)(output.failover) : undefined,
60
60
  };
61
61
  });
62
- exports.deserializeIngestkorea_restJson_GetRequestResultOutput = deserializeIngestkorea_restJson_GetRequestResultOutput;
63
- const deserializeIngestkorea_restJson_GetRequestResultFailover = (output) => {
62
+ exports.deserializeIngestkorea_restJson_GetAlimtalkResultOutput = deserializeIngestkorea_restJson_GetAlimtalkResultOutput;
63
+ const deserializeIngestkorea_restJson_AlimtalkFailover = (output) => {
64
64
  return {
65
65
  smsServiceId: output.smsServiceId != undefined ? output.smsServiceId : undefined,
66
66
  requestId: output.requestId != undefined ? output.requestId : undefined,
@@ -74,4 +74,4 @@ const deserializeIngestkorea_restJson_GetRequestResultFailover = (output) => {
74
74
  messageStatusDesc: output.messageStatusDesc != undefined ? output.messageStatusDesc : undefined,
75
75
  };
76
76
  };
77
- exports.deserializeIngestkorea_restJson_GetRequestResultFailover = deserializeIngestkorea_restJson_GetRequestResultFailover;
77
+ exports.deserializeIngestkorea_restJson_AlimtalkFailover = deserializeIngestkorea_restJson_AlimtalkFailover;
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.deserializeIngestkorea_restJson_GetRequestStatusMessages = exports.deserializeIngestkorea_restJson_GetRequestStatusOutput = exports.deserializeIngestkorea_restJson_GetRequestStatusCommand = exports.serializeIngestkorea_restJson_GetRequestStatusCommand = void 0;
12
+ exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = void 0;
13
13
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
14
  const constants_1 = require("./constants");
15
- const serializeIngestkorea_restJson_GetRequestStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
15
+ const serializeIngestkorea_restJson_GetAlimtalkStatusCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
16
16
  const hostname = "sens.apigw.ntruss.com";
17
17
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages";
18
18
  const headers = {
@@ -30,28 +30,29 @@ const serializeIngestkorea_restJson_GetRequestStatusCommand = (input, config) =>
30
30
  query: query
31
31
  });
32
32
  });
33
- exports.serializeIngestkorea_restJson_GetRequestStatusCommand = serializeIngestkorea_restJson_GetRequestStatusCommand;
34
- const deserializeIngestkorea_restJson_GetRequestStatusCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
33
+ exports.serializeIngestkorea_restJson_GetAlimtalkStatusCommand = serializeIngestkorea_restJson_GetAlimtalkStatusCommand;
34
+ const deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
35
35
  if (output.statusCode > 300)
36
36
  yield (0, constants_1.parseErrorBody)(output);
37
- const data = yield (0, constants_1.parseBody)(output); // GetRequestStatusOutput
37
+ const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkStatusOutput
38
38
  let contents = {};
39
- contents = yield (0, exports.deserializeIngestkorea_restJson_GetRequestStatusOutput)(data);
39
+ contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput)(data);
40
40
  const response = Object.assign({}, contents);
41
41
  return response;
42
42
  });
43
- exports.deserializeIngestkorea_restJson_GetRequestStatusCommand = deserializeIngestkorea_restJson_GetRequestStatusCommand;
44
- const deserializeIngestkorea_restJson_GetRequestStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
43
+ exports.deserializeIngestkorea_restJson_GetAlimtalkStatusCommand = deserializeIngestkorea_restJson_GetAlimtalkStatusCommand;
44
+ const deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
45
45
  const { requestId, statusCode, statusName, messages } = output;
46
46
  return {
47
47
  requestId: requestId != undefined ? requestId : undefined,
48
48
  statusCode: statusCode != undefined ? statusCode : undefined,
49
49
  statusName: statusName != undefined ? statusName : undefined,
50
- messages: messages != undefined ? (0, exports.deserializeIngestkorea_restJson_GetRequestStatusMessages)(messages) : undefined
50
+ messages: messages != undefined
51
+ ? (0, exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages)(messages) : undefined
51
52
  };
52
53
  });
53
- exports.deserializeIngestkorea_restJson_GetRequestStatusOutput = deserializeIngestkorea_restJson_GetRequestStatusOutput;
54
- const deserializeIngestkorea_restJson_GetRequestStatusMessages = (outputs) => {
54
+ exports.deserializeIngestkorea_restJson_GetAlimtalkStatusOutput = deserializeIngestkorea_restJson_GetAlimtalkStatusOutput;
55
+ const deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = (outputs) => {
55
56
  const result = outputs.map(output => {
56
57
  return {
57
58
  messageId: output.messageId != undefined ? output.messageId : undefined,
@@ -73,4 +74,4 @@ const deserializeIngestkorea_restJson_GetRequestStatusMessages = (outputs) => {
73
74
  });
74
75
  return result;
75
76
  };
76
- exports.deserializeIngestkorea_restJson_GetRequestStatusMessages = deserializeIngestkorea_restJson_GetRequestStatusMessages;
77
+ exports.deserializeIngestkorea_restJson_GetAlimtalkStatusMessages = deserializeIngestkorea_restJson_GetAlimtalkStatusMessages;
@@ -0,0 +1,51 @@
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_GetAlimtalkTemplateOutput = exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = void 0;
13
+ const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
+ const ListAlimtalkTemplates_1 = require("./ListAlimtalkTemplates");
15
+ const constants_1 = require("./constants");
16
+ const serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
17
+ const hostname = "sens.apigw.ntruss.com";
18
+ const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/templates";
19
+ const headers = {
20
+ "host": hostname
21
+ };
22
+ const query = {
23
+ channelId: input.channelId,
24
+ templateCode: input.templateCode
25
+ };
26
+ return new util_http_handler_1.HttpRequest({
27
+ protocol: 'https:',
28
+ method: 'GET',
29
+ hostname: hostname,
30
+ path: path,
31
+ query: query,
32
+ headers: headers
33
+ });
34
+ });
35
+ exports.serializeIngestkorea_restJson_GetAlimtalkTemplateCommand = serializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
36
+ const deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
37
+ if (output.statusCode > 300)
38
+ yield (0, constants_1.parseErrorBody)(output);
39
+ const data = yield (0, constants_1.parseBody)(output); // GetAlimtalkTemplateOutput
40
+ let contents = {};
41
+ contents = yield (0, exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput)(data);
42
+ const response = Object.assign({}, contents);
43
+ return response;
44
+ });
45
+ exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand = deserializeIngestkorea_restJson_GetAlimtalkTemplateCommand;
46
+ const deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = (output) => __awaiter(void 0, void 0, void 0, function* () {
47
+ return {
48
+ templates: (0, ListAlimtalkTemplates_1.deserializeIngestkorea_restJson_AlimtalkTemplate)(output)
49
+ };
50
+ });
51
+ exports.deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput = deserializeIngestkorea_restJson_GetAlimtalkTemplateOutput;
@@ -9,10 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.deserializeIngestkorea_restJson_ListChannelsChannelInfo = exports.deserializeIngestkorea_restJson_ListChannelsOutput = exports.deserializeIngestkorea_restJson_ListChannelsCommand = exports.serializeIngestkorea_restJson_ListChannelsCommand = void 0;
12
+ exports.deserializeIngestkorea_restJson_Channel = exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = exports.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = void 0;
13
13
  const util_http_handler_1 = require("@ingestkorea/util-http-handler");
14
14
  const constants_1 = require("./constants");
15
- const serializeIngestkorea_restJson_ListChannelsCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
15
+ const serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (input, config) => __awaiter(void 0, void 0, void 0, function* () {
16
16
  const hostname = "sens.apigw.ntruss.com";
17
17
  const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/channels";
18
18
  const headers = {
@@ -26,24 +26,24 @@ const serializeIngestkorea_restJson_ListChannelsCommand = (input, config) => __a
26
26
  headers: headers
27
27
  });
28
28
  });
29
- exports.serializeIngestkorea_restJson_ListChannelsCommand = serializeIngestkorea_restJson_ListChannelsCommand;
30
- const deserializeIngestkorea_restJson_ListChannelsCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
29
+ exports.serializeIngestkorea_restJson_ListAlimtalkChannelsCommand = serializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
30
+ const deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = (output) => __awaiter(void 0, void 0, void 0, function* () {
31
31
  if (output.statusCode > 300)
32
32
  yield (0, constants_1.parseErrorBody)(output);
33
- const data = yield (0, constants_1.parseBody)(output); // ListChannelsOutput
33
+ const data = yield (0, constants_1.parseBody)(output); // ListAlimtalkChannelsOutput
34
34
  let contents = {};
35
- contents = yield (0, exports.deserializeIngestkorea_restJson_ListChannelsOutput)(data);
35
+ contents = yield (0, exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput)(data);
36
36
  const response = Object.assign({}, contents);
37
37
  return response;
38
38
  });
39
- exports.deserializeIngestkorea_restJson_ListChannelsCommand = deserializeIngestkorea_restJson_ListChannelsCommand;
40
- const deserializeIngestkorea_restJson_ListChannelsOutput = (outputs) => __awaiter(void 0, void 0, void 0, function* () {
39
+ exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand = deserializeIngestkorea_restJson_ListAlimtalkChannelsCommand;
40
+ const deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = (outputs) => __awaiter(void 0, void 0, void 0, function* () {
41
41
  return {
42
- channels: (0, exports.deserializeIngestkorea_restJson_ListChannelsChannelInfo)(outputs)
42
+ channels: (0, exports.deserializeIngestkorea_restJson_Channel)(outputs)
43
43
  };
44
44
  });
45
- exports.deserializeIngestkorea_restJson_ListChannelsOutput = deserializeIngestkorea_restJson_ListChannelsOutput;
46
- const deserializeIngestkorea_restJson_ListChannelsChannelInfo = (outputs) => {
45
+ exports.deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput = deserializeIngestkorea_restJson_ListAlimtalkChannelsOutput;
46
+ const deserializeIngestkorea_restJson_Channel = (outputs) => {
47
47
  const result = outputs.map(output => {
48
48
  return {
49
49
  createTime: output.createTime != undefined ? output.createTime : undefined,
@@ -57,4 +57,4 @@ const deserializeIngestkorea_restJson_ListChannelsChannelInfo = (outputs) => {
57
57
  });
58
58
  return result;
59
59
  };
60
- exports.deserializeIngestkorea_restJson_ListChannelsChannelInfo = deserializeIngestkorea_restJson_ListChannelsChannelInfo;
60
+ exports.deserializeIngestkorea_restJson_Channel = deserializeIngestkorea_restJson_Channel;