@ingestkorea/client-sens
Version:
INGESTKOREA SDK Naver Cloud Platform SENS Client for Node.js.
27 lines (26 loc) • 1.07 kB
JavaScript
import { SensCommand } from "../models";
import { serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand, deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand, } from "../protocols/ListAlimtalkTemplates";
import { IngestkoreaError } from "@ingestkorea/util-error-handler";
export class ListAlimtalkTemplatesCommand extends SensCommand {
constructor(input) {
super(input);
this.input = {
channelId: input.channelId,
};
}
async serialize(input, config) {
if (!config.serviceId.kakao)
throw new IngestkoreaError({
code: 400,
type: "Bad Request",
message: "Invalid Params",
description: "Please Check Kakao ServiceId",
});
let request = await serializeIngestkorea_restJson_ListAlimtalkTemplatesCommand(input, config);
return request;
}
async deserialize(response) {
let output = await deserializeIngestkorea_restJson_ListAlimtalkTemplatesCommand(response);
return output;
}
}