minif_node
Version:
各类平台的对接的一个sdk
114 lines (113 loc) • 6.04 kB
TypeScript
/***
* 关于抖音移动和网站应用的
*/
import { Base } from "./base";
import { pubmini } from './interface/in_public';
import { inter_get_poi_query, inter_get_trade_order_query, inter_check_ticket_start, inter_get_merchandise_online_data, inter_get_merchandise_online_data_list, inter_check_ticket_open, inter_check_ticket_cancel, inter_check_ticket_history_list, check_ticket_detailed_query, inter_query_record_by_cert } from './interface/inter_tik_tok';
export declare class tik_tok extends Base {
private appid;
private appSecret;
private redisconfig?;
/**
* 构造器
* @param obj object类型 包括下面参数
* @param appid 抖音生活的appid
* @param appSecret 抖音生活的appSecret
* @param redis_options redis的配置信息
*/
constructor(obj: pubmini);
/***
* 获取这次的请求的token信息
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/dop/develop/openapi/account-permission/client-token
*/
getAccessToken(): Promise<string>;
/**
* 验券准备
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.fulfilment/certificate.prepare
* @param encrypted_data 从二维码解析出来的标识(传参前需要先进行URL编码)(encrypted_data/code必须二选一)
* @param code 原始的抖音团购券码 (encrypted_data/code必须二选一)
*
*/
check_ticket_start(data: inter_check_ticket_start): Promise<Record<string, any>>;
/**
* 验券
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.fulfilment/certificate.verify
* @param data 包含一下的信息
* @param verify_token 一次验券的标识 在验券准备中获取~
* @param poi_id 核销的抖音门店id
* 还有一些信息可以看文档
*
*/
check_ticket_open(data: inter_check_ticket_open): Promise<Record<string, any>>;
/**
* 撤销核销
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.fulfilment/certificate.cancel
* @param data 包含一下的信息
* @param verify_id 代表券码一次核销的唯一标识(验券时返回)(次卡撤销多次时请填0)
* @param certificate_id 代表一张券码的标识(验券时返回)
* 还有一些信息可以看文档
*/
check_ticket_cancel(data: inter_check_ticket_cancel): Promise<Record<string, any>>;
/**
* 券状态查询
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.fulfilment/certificate.get
* @param encrypted_code 验券准备接口返回的加密券码(传参前需要先进行URL编码)
*/
check_ticket_certificateget(encrypted_code: string): Promise<Record<string, any>>;
/**
* 验券历史查询
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.billing/certificate.verifyrecord.query
* @param data 参数
*/
check_ticket_history_list(data: inter_check_ticket_history_list): Promise<Record<string, any>>;
/**
* 账单详细查询
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.billing/detailedquery
* @param data 参数
*/
check_ticket_detailed_query(data: check_ticket_detailed_query): Promise<Record<string, any>>;
/**
* 账单查询
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.billing/merchantquery
* @param data 参数
*/
check_ticket_merchantquery(data: check_ticket_detailed_query): Promise<Record<string, any>>;
/**
* 分账明细查询
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.billing/ledger.query-record-by-cert
* @param data 参数
*/
query_record_by_cert(data: inter_query_record_by_cert): Promise<Record<string, any>>;
/**
* 获取门店的信息
* 文档地址:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/life.capacity.shop/shop.query
* @param poi_id poi_id 抖音门店POI_ID
* @param third_id 三方ID
* @param account_id 本地生活账户ID inter_get_poi_query
*/
get_poi_query(data: inter_get_poi_query): Promise<Record<string, any>>;
/**
* 获取商品的数据 (注意这里还有一个是商品列表的)
*文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/goods/draft.get
* @param product_ids 商品ID列表,多个值使用,拼接
* @param out_ids 外部商品ID列表,多个值使用,拼接
* @param account_id 商家ID,传入时服务商须与该商家满足授权关系
*/
get_merchandise_online_data(data: inter_get_merchandise_online_data): Promise<Record<string, any>>;
/**
* 获取商品的数据列表 (注意这里还有一个是商品的)
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/goods/query
* @param product_ids 商品ID列表,多个值使用,拼接
* @param out_ids 外部商品ID列表,多个值使用,拼接
* @param account_id 商家ID,传入时服务商须与该商家满足授权关系
*/
get_merchandise_online_data_list(data: inter_get_merchandise_online_data_list): Promise<Record<string, any>>;
/**
* 查询订单
* 文档位置:https://partner.open-douyin.com/docs/resource/zh-CN/local-life/develop/OpenAPI/order.query/query
* @param poi_id poi_id 抖音门店POI_ID
* @param third_id 三方ID
* @param account_id 本地生活账户ID
*/
get_trade_order_query(data: inter_get_trade_order_query): Promise<Record<string, any>>;
}