UNPKG

@line/bot-sdk

Version:
134 lines 6.59 kB
/** * LIFF server API * LIFF Server API. * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { AddLiffAppRequest } from "../model/addLiffAppRequest.js"; import { AddLiffAppResponse } from "../model/addLiffAppResponse.js"; import { GetAllLiffAppsResponse } from "../model/getAllLiffAppsResponse.js"; import { UpdateLiffAppRequest } from "../model/updateLiffAppRequest.js"; import * as Types from "../../types.js"; interface httpClientConfig { /** * Base URL for requests. * Defaults to 'https://api.line.me'. * You can override this for testing or to use a mock server. */ baseURL?: string; /** * Channel access token used for authorization. */ channelAccessToken: string; /** * Extra headers merged into every request. */ defaultHeaders?: Record<string, string>; } /** * @see {@link LineBotClient} for a unified interface that wraps this client. */ export declare class LiffClient { private httpClient; /** * Initializes a new `LiffClient`. * * @param config Configuration for this API client. * @param config.baseURL The base URL for requests. Defaults to `https://api.line.me`. * @param config.channelAccessToken The channel access token used for authorization. * @param config.defaultHeaders Extra headers merged into every request. * * @example * const client = new LiffClient({ * channelAccessToken: process.env.LINE_CHANNEL_ACCESS_TOKEN!, * }); */ constructor(config: httpClientConfig); /** * Adding the LIFF app to a channel * Calls `POST https://api.line.me/liff/v1/apps`. * To inspect the HTTP status code or response headers, use {@link addLIFFAppWithHttpInfo}. * @summary Create LIFF app * @param addLiffAppRequest * @returns A promise resolving to the response body. * @see <a href="https://developers.line.biz/en/reference/liff-server/#add-liff-app">LINE Developers documentation</a> */ addLIFFApp(addLiffAppRequest: AddLiffAppRequest): Promise<AddLiffAppResponse>; /** * Adding the LIFF app to a channel * Calls `POST https://api.line.me/liff/v1/apps`. * This method returns the response body together with the underlying `httpResponse`. * @summary Create LIFF app * @param addLiffAppRequest * @returns A promise resolving to the response body together with the underlying `httpResponse`. * @see <a href="https://developers.line.biz/en/reference/liff-server/#add-liff-app">LINE Developers documentation</a> */ addLIFFAppWithHttpInfo(addLiffAppRequest: AddLiffAppRequest): Promise<Types.ApiResponseType<AddLiffAppResponse>>; /** * Deletes a LIFF app from a channel. * Calls `DELETE https://api.line.me/liff/v1/apps/{liffId}`. * To inspect the HTTP status code or response headers, use {@link deleteLIFFAppWithHttpInfo}. * @summary Delete LIFF app from a channel * @param liffId ID of the LIFF app to be updated * @returns A promise resolving to the response body. * @see <a href="https://developers.line.biz/en/reference/liff-server/#delete-liff-app">LINE Developers documentation</a> */ deleteLIFFApp(liffId: string): Promise<Types.MessageAPIResponseBase>; /** * Deletes a LIFF app from a channel. * Calls `DELETE https://api.line.me/liff/v1/apps/{liffId}`. * This method returns the response body together with the underlying `httpResponse`. * @summary Delete LIFF app from a channel * @param liffId ID of the LIFF app to be updated * @returns A promise resolving to the response body together with the underlying `httpResponse`. * @see <a href="https://developers.line.biz/en/reference/liff-server/#delete-liff-app">LINE Developers documentation</a> */ deleteLIFFAppWithHttpInfo(liffId: string): Promise<Types.ApiResponseType<Types.MessageAPIResponseBase>>; /** * Gets information on all the LIFF apps added to the channel. * Calls `GET https://api.line.me/liff/v1/apps`. * To inspect the HTTP status code or response headers, use {@link getAllLIFFAppsWithHttpInfo}. * @summary Get all LIFF apps * @returns A promise resolving to the response body. * @see <a href="https://developers.line.biz/en/reference/liff-server/#get-all-liff-apps">LINE Developers documentation</a> */ getAllLIFFApps(): Promise<GetAllLiffAppsResponse>; /** * Gets information on all the LIFF apps added to the channel. * Calls `GET https://api.line.me/liff/v1/apps`. * This method returns the response body together with the underlying `httpResponse`. * @summary Get all LIFF apps * @returns A promise resolving to the response body together with the underlying `httpResponse`. * @see <a href="https://developers.line.biz/en/reference/liff-server/#get-all-liff-apps">LINE Developers documentation</a> */ getAllLIFFAppsWithHttpInfo(): Promise<Types.ApiResponseType<GetAllLiffAppsResponse>>; /** * Update LIFF app settings * Calls `PUT https://api.line.me/liff/v1/apps/{liffId}`. * To inspect the HTTP status code or response headers, use {@link updateLIFFAppWithHttpInfo}. * @summary Update LIFF app from a channel * @param liffId ID of the LIFF app to be updated * @param updateLiffAppRequest * @returns A promise resolving to the response body. * @see <a href="https://developers.line.biz/en/reference/liff-server/#update-liff-app">LINE Developers documentation</a> */ updateLIFFApp(liffId: string, updateLiffAppRequest: UpdateLiffAppRequest): Promise<Types.MessageAPIResponseBase>; /** * Update LIFF app settings * Calls `PUT https://api.line.me/liff/v1/apps/{liffId}`. * This method returns the response body together with the underlying `httpResponse`. * @summary Update LIFF app from a channel * @param liffId ID of the LIFF app to be updated * @param updateLiffAppRequest * @returns A promise resolving to the response body together with the underlying `httpResponse`. * @see <a href="https://developers.line.biz/en/reference/liff-server/#update-liff-app">LINE Developers documentation</a> */ updateLIFFAppWithHttpInfo(liffId: string, updateLiffAppRequest: UpdateLiffAppRequest): Promise<Types.ApiResponseType<Types.MessageAPIResponseBase>>; } export {}; //# sourceMappingURL=liffClient.d.ts.map