UNPKG

@ingestkorea/client-sens

Version:

INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.

43 lines (42 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.de_ListAlimtalkStatusCommand = exports.se_ListAlimtalkStatusCommand = void 0; const util_http_handler_1 = require("@ingestkorea/util-http-handler"); const constants_js_1 = require("./constants.js"); const GetAlimtalkStatus_js_1 = require("./GetAlimtalkStatus.js"); const se_ListAlimtalkStatusCommand = async (input, config) => { const hostname = "sens.apigw.ntruss.com"; const path = "/alimtalk/v2/services/" + config.serviceId.kakao + "/messages"; const headers = { host: hostname, }; const query = Object.entries(input).reduce((acc, [key, value]) => { if (value !== undefined && value !== null) { acc[key] = String(value); } return acc; }, {}); return new util_http_handler_1.HttpRequest({ protocol: "https:", method: "GET", hostname: hostname, path: path, headers: headers, query, }); }; exports.se_ListAlimtalkStatusCommand = se_ListAlimtalkStatusCommand; const de_ListAlimtalkStatusCommand = async (response, config) => { if (response.statusCode >= 300) await (0, constants_js_1.parseErrorBody)(response); const data = await (0, constants_js_1.parseBody)(response); const contents = de_ListAlimtalkStatusResult(data); return { $metadata: (0, constants_js_1.deserializeMetadata)(response), ...(0, constants_js_1.compact)(contents), }; }; exports.de_ListAlimtalkStatusCommand = de_ListAlimtalkStatusCommand; const de_ListAlimtalkStatusResult = (output) => { return (0, GetAlimtalkStatus_js_1.de_GetAlimtalkStatusResult)(output); };