"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TiktokWebhookProcessResponseBodyOmniChannelTiktokWebhookRsp = exports.LaunchRequestVariants = exports.LaunchRequestVariantsOptionValues = exports.GetLoginUserResponseBodyCommodityInfo = exports.ConnectionOmniChannelTiktokMessageResponseBodyOmniChannelTiktokRsp = exports.TiktokWebhookProcessResponse = exports.TiktokWebhookProcessResponseBody = exports.TiktokWebhookProcessRequest = exports.TiktokWebhookProcessHeaders = exports.TiktokShopAuthCallbackResponse = exports.TiktokShopAuthCallbackResponseBody = exports.TiktokShopAuthCallbackRequest = exports.TiktokShopAuthCallbackHeaders = exports.QueryNotableInfoResponse = exports.QueryNotableInfoResponseBody = exports.QueryNotableInfoRequest = exports.QueryNotableInfoHeaders = exports.LaunchResponse = exports.LaunchResponseBody = exports.LaunchRequest = exports.LaunchHeaders = exports.HhoCallBackResponse = exports.HhoCallBackResponseBody = exports.HhoCallBackRequest = exports.HhoCallBackHeaders = exports.GetLoginUserResponse = exports.GetLoginUserResponseBody = exports.GetLoginUserRequest = exports.GetLoginUserHeaders = exports.ConnectionOmniChannelTiktokMessageResponse = exports.ConnectionOmniChannelTiktokMessageResponseBody = exports.ConnectionOmniChannelTiktokMessageRequest = exports.ConnectionOmniChannelTiktokMessageHeaders = void 0;
// This file is auto-generated, don't edit it
/**
 */
const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
const gateway_dingtalk_1 = __importDefault(require("@alicloud/gateway-dingtalk"));
const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
const $tea = __importStar(require("@alicloud/tea-typescript"));
class ConnectionOmniChannelTiktokMessageHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ConnectionOmniChannelTiktokMessageHeaders = ConnectionOmniChannelTiktokMessageHeaders;
class ConnectionOmniChannelTiktokMessageRequest extends $tea.Model {
    static names() {
        return {
            tiktokContentJsonString: 'tiktokContentJsonString',
        };
    }
    static types() {
        return {
            tiktokContentJsonString: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ConnectionOmniChannelTiktokMessageRequest = ConnectionOmniChannelTiktokMessageRequest;
class ConnectionOmniChannelTiktokMessageResponseBody extends $tea.Model {
    static names() {
        return {
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            omniChannelTiktokRsp: 'omniChannelTiktokRsp',
            success: 'success',
        };
    }
    static types() {
        return {
            errorCode: 'string',
            errorMsg: 'string',
            omniChannelTiktokRsp: ConnectionOmniChannelTiktokMessageResponseBodyOmniChannelTiktokRsp,
            success: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ConnectionOmniChannelTiktokMessageResponseBody = ConnectionOmniChannelTiktokMessageResponseBody;
class ConnectionOmniChannelTiktokMessageResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: ConnectionOmniChannelTiktokMessageResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ConnectionOmniChannelTiktokMessageResponse = ConnectionOmniChannelTiktokMessageResponse;
class GetLoginUserHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetLoginUserHeaders = GetLoginUserHeaders;
class GetLoginUserRequest extends $tea.Model {
    static names() {
        return {
            authCode: 'authCode',
        };
    }
    static types() {
        return {
            authCode: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetLoginUserRequest = GetLoginUserRequest;
class GetLoginUserResponseBody extends $tea.Model {
    static names() {
        return {
            commodityInfo: 'commodityInfo',
            corpId: 'corpId',
            openId: 'openId',
            unionId: 'unionId',
        };
    }
    static types() {
        return {
            commodityInfo: GetLoginUserResponseBodyCommodityInfo,
            corpId: 'string',
            openId: 'string',
            unionId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetLoginUserResponseBody = GetLoginUserResponseBody;
class GetLoginUserResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: GetLoginUserResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetLoginUserResponse = GetLoginUserResponse;
class HhoCallBackHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.HhoCallBackHeaders = HhoCallBackHeaders;
class HhoCallBackRequest extends $tea.Model {
    static names() {
        return {
            data: 'data',
            dtNotificationId: 'dtNotificationId',
            shopId: 'shopId',
            timestamp: 'timestamp',
            type: 'type',
        };
    }
    static types() {
        return {
            data: 'string',
            dtNotificationId: 'string',
            shopId: 'string',
            timestamp: 'string',
            type: 'number',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.HhoCallBackRequest = HhoCallBackRequest;
class HhoCallBackResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.HhoCallBackResponseBody = HhoCallBackResponseBody;
class HhoCallBackResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: HhoCallBackResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.HhoCallBackResponse = HhoCallBackResponse;
class LaunchHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchHeaders = LaunchHeaders;
class LaunchRequest extends $tea.Model {
    static names() {
        return {
            description: 'description',
            imageUrls: 'imageUrls',
            platform: 'platform',
            productName: 'productName',
            sellingPoints: 'sellingPoints',
            sourceData: 'sourceData',
            variants: 'variants',
            videoUrls: 'videoUrls',
        };
    }
    static types() {
        return {
            description: 'string',
            imageUrls: { 'type': 'array', 'itemType': 'string' },
            platform: { 'type': 'array', 'itemType': 'string' },
            productName: 'string',
            sellingPoints: { 'type': 'array', 'itemType': 'string' },
            sourceData: 'string',
            variants: { 'type': 'array', 'itemType': LaunchRequestVariants },
            videoUrls: { 'type': 'array', 'itemType': 'string' },
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchRequest = LaunchRequest;
class LaunchResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchResponseBody = LaunchResponseBody;
class LaunchResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: LaunchResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchResponse = LaunchResponse;
class QueryNotableInfoHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryNotableInfoHeaders = QueryNotableInfoHeaders;
class QueryNotableInfoRequest extends $tea.Model {
    static names() {
        return {
            sceneCode: 'sceneCode',
        };
    }
    static types() {
        return {
            sceneCode: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryNotableInfoRequest = QueryNotableInfoRequest;
class QueryNotableInfoResponseBody extends $tea.Model {
    static names() {
        return {
            adminUnionIds: 'adminUnionIds',
            baseId: 'baseId',
        };
    }
    static types() {
        return {
            adminUnionIds: { 'type': 'array', 'itemType': 'string' },
            baseId: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryNotableInfoResponseBody = QueryNotableInfoResponseBody;
class QueryNotableInfoResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: QueryNotableInfoResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.QueryNotableInfoResponse = QueryNotableInfoResponse;
class TiktokShopAuthCallbackHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokShopAuthCallbackHeaders = TiktokShopAuthCallbackHeaders;
class TiktokShopAuthCallbackRequest extends $tea.Model {
    static names() {
        return {
            sellerType: 'sellerType',
            shopId: 'shopId',
            shopName: 'shopName',
            shopRegion: 'shopRegion',
        };
    }
    static types() {
        return {
            sellerType: 'string',
            shopId: 'string',
            shopName: 'string',
            shopRegion: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokShopAuthCallbackRequest = TiktokShopAuthCallbackRequest;
class TiktokShopAuthCallbackResponseBody extends $tea.Model {
    static names() {
        return {
            success: 'success',
        };
    }
    static types() {
        return {
            success: 'boolean',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokShopAuthCallbackResponseBody = TiktokShopAuthCallbackResponseBody;
class TiktokShopAuthCallbackResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: TiktokShopAuthCallbackResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokShopAuthCallbackResponse = TiktokShopAuthCallbackResponse;
class TiktokWebhookProcessHeaders extends $tea.Model {
    static names() {
        return {
            commonHeaders: 'commonHeaders',
            xAcsDingtalkAccessToken: 'x-acs-dingtalk-access-token',
        };
    }
    static types() {
        return {
            commonHeaders: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            xAcsDingtalkAccessToken: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokWebhookProcessHeaders = TiktokWebhookProcessHeaders;
class TiktokWebhookProcessRequest extends $tea.Model {
    static names() {
        return {
            tiktokContentJsonString: 'tiktokContentJsonString',
        };
    }
    static types() {
        return {
            tiktokContentJsonString: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokWebhookProcessRequest = TiktokWebhookProcessRequest;
class TiktokWebhookProcessResponseBody extends $tea.Model {
    static names() {
        return {
            code: 'code',
            errorCode: 'errorCode',
            errorMsg: 'errorMsg',
            omniChannelTiktokWebhookRsp: 'omniChannelTiktokWebhookRsp',
            success: 'success',
        };
    }
    static types() {
        return {
            code: 'number',
            errorCode: 'string',
            errorMsg: 'string',
            omniChannelTiktokWebhookRsp: TiktokWebhookProcessResponseBodyOmniChannelTiktokWebhookRsp,
            success: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokWebhookProcessResponseBody = TiktokWebhookProcessResponseBody;
class TiktokWebhookProcessResponse extends $tea.Model {
    static names() {
        return {
            headers: 'headers',
            statusCode: 'statusCode',
            body: 'body',
        };
    }
    static types() {
        return {
            headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
            statusCode: 'number',
            body: TiktokWebhookProcessResponseBody,
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokWebhookProcessResponse = TiktokWebhookProcessResponse;
class ConnectionOmniChannelTiktokMessageResponseBodyOmniChannelTiktokRsp extends $tea.Model {
    static names() {
        return {
            code: 'code',
        };
    }
    static types() {
        return {
            code: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.ConnectionOmniChannelTiktokMessageResponseBodyOmniChannelTiktokRsp = ConnectionOmniChannelTiktokMessageResponseBodyOmniChannelTiktokRsp;
class GetLoginUserResponseBodyCommodityInfo extends $tea.Model {
    static names() {
        return {
            version: 'version',
        };
    }
    static types() {
        return {
            version: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.GetLoginUserResponseBodyCommodityInfo = GetLoginUserResponseBodyCommodityInfo;
class LaunchRequestVariantsOptionValues extends $tea.Model {
    static names() {
        return {
            name: 'name',
            value: 'value',
        };
    }
    static types() {
        return {
            name: 'string',
            value: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchRequestVariantsOptionValues = LaunchRequestVariantsOptionValues;
class LaunchRequestVariants extends $tea.Model {
    static names() {
        return {
            images: 'images',
            optionValues: 'optionValues',
            price: 'price',
            sku: 'sku',
        };
    }
    static types() {
        return {
            images: { 'type': 'array', 'itemType': 'string' },
            optionValues: { 'type': 'array', 'itemType': LaunchRequestVariantsOptionValues },
            price: 'string',
            sku: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.LaunchRequestVariants = LaunchRequestVariants;
class TiktokWebhookProcessResponseBodyOmniChannelTiktokWebhookRsp extends $tea.Model {
    static names() {
        return {
            code: 'code',
        };
    }
    static types() {
        return {
            code: 'string',
        };
    }
    constructor(map) {
        super(map);
    }
}
exports.TiktokWebhookProcessResponseBodyOmniChannelTiktokWebhookRsp = TiktokWebhookProcessResponseBodyOmniChannelTiktokWebhookRsp;
class Client extends openapi_client_1.default {
    constructor(config) {
        super(config);
        let gatewayClient = new gateway_dingtalk_1.default();
        this._spi = gatewayClient;
        this._endpointRule = "";
        if (tea_util_1.default.empty(this._endpoint)) {
            this._endpoint = "api.dingtalk.com";
        }
    }
    /**
     * 全渠道运营客服tiktok消息接入
     *
     * @param request - ConnectionOmniChannelTiktokMessageRequest
     * @param headers - ConnectionOmniChannelTiktokMessageHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns ConnectionOmniChannelTiktokMessageResponse
     */
    async connectionOmniChannelTiktokMessageWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.tiktokContentJsonString)) {
            body["tiktokContentJsonString"] = request.tiktokContentJsonString;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "ConnectionOmniChannelTiktokMessage",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/omniChannel/tiktok/im/message/process`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new ConnectionOmniChannelTiktokMessageResponse({}));
    }
    /**
     * 全渠道运营客服tiktok消息接入
     *
     * @param request - ConnectionOmniChannelTiktokMessageRequest
     * @returns ConnectionOmniChannelTiktokMessageResponse
     */
    async connectionOmniChannelTiktokMessage(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new ConnectionOmniChannelTiktokMessageHeaders({});
        return await this.connectionOmniChannelTiktokMessageWithOptions(request, headers, runtime);
    }
    /**
     * 获取当前登录用户版本信息
     *
     * @param request - GetLoginUserRequest
     * @param headers - GetLoginUserHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns GetLoginUserResponse
     */
    async getLoginUserWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.authCode)) {
            body["authCode"] = request.authCode;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "GetLoginUser",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/authCode/getLoginUser`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new GetLoginUserResponse({}));
    }
    /**
     * 获取当前登录用户版本信息
     *
     * @param request - GetLoginUserRequest
     * @returns GetLoginUserResponse
     */
    async getLoginUser(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new GetLoginUserHeaders({});
        return await this.getLoginUserWithOptions(request, headers, runtime);
    }
    /**
     * 提供给HHO的异步回调接口
     *
     * @param request - HhoCallBackRequest
     * @param headers - HhoCallBackHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns HhoCallBackResponse
     */
    async hhoCallBackWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.data)) {
            body["data"] = request.data;
        }
        if (!tea_util_1.default.isUnset(request.dtNotificationId)) {
            body["dtNotificationId"] = request.dtNotificationId;
        }
        if (!tea_util_1.default.isUnset(request.shopId)) {
            body["shopId"] = request.shopId;
        }
        if (!tea_util_1.default.isUnset(request.timestamp)) {
            body["timestamp"] = request.timestamp;
        }
        if (!tea_util_1.default.isUnset(request.type)) {
            body["type"] = request.type;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "HhoCallBack",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/hho/callback`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new HhoCallBackResponse({}));
    }
    /**
     * 提供给HHO的异步回调接口
     *
     * @param request - HhoCallBackRequest
     * @returns HhoCallBackResponse
     */
    async hhoCallBack(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new HhoCallBackHeaders({});
        return await this.hhoCallBackWithOptions(request, headers, runtime);
    }
    /**
     * 刊登的对外开放Api
     *
     * @param request - LaunchRequest
     * @param headers - LaunchHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns LaunchResponse
     */
    async launchWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.description)) {
            body["description"] = request.description;
        }
        if (!tea_util_1.default.isUnset(request.imageUrls)) {
            body["imageUrls"] = request.imageUrls;
        }
        if (!tea_util_1.default.isUnset(request.platform)) {
            body["platform"] = request.platform;
        }
        if (!tea_util_1.default.isUnset(request.productName)) {
            body["productName"] = request.productName;
        }
        if (!tea_util_1.default.isUnset(request.sellingPoints)) {
            body["sellingPoints"] = request.sellingPoints;
        }
        if (!tea_util_1.default.isUnset(request.sourceData)) {
            body["sourceData"] = request.sourceData;
        }
        if (!tea_util_1.default.isUnset(request.variants)) {
            body["variants"] = request.variants;
        }
        if (!tea_util_1.default.isUnset(request.videoUrls)) {
            body["videoUrls"] = request.videoUrls;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "Launch",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/launch`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new LaunchResponse({}));
    }
    /**
     * 刊登的对外开放Api
     *
     * @param request - LaunchRequest
     * @returns LaunchResponse
     */
    async launch(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new LaunchHeaders({});
        return await this.launchWithOptions(request, headers, runtime);
    }
    /**
     * 全渠道AI表格业务信息
     *
     * @param request - QueryNotableInfoRequest
     * @param headers - QueryNotableInfoHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns QueryNotableInfoResponse
     */
    async queryNotableInfoWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let query = {};
        if (!tea_util_1.default.isUnset(request.sceneCode)) {
            query["sceneCode"] = request.sceneCode;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            query: openapi_util_1.default.query(query),
        });
        let params = new $OpenApi.Params({
            action: "QueryNotableInfo",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/omniChannel/notable`,
            method: "GET",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new QueryNotableInfoResponse({}));
    }
    /**
     * 全渠道AI表格业务信息
     *
     * @param request - QueryNotableInfoRequest
     * @returns QueryNotableInfoResponse
     */
    async queryNotableInfo(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new QueryNotableInfoHeaders({});
        return await this.queryNotableInfoWithOptions(request, headers, runtime);
    }
    /**
     * 平台店铺授权回调
     *
     * @param request - TiktokShopAuthCallbackRequest
     * @param headers - TiktokShopAuthCallbackHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns TiktokShopAuthCallbackResponse
     */
    async tiktokShopAuthCallbackWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.sellerType)) {
            body["sellerType"] = request.sellerType;
        }
        if (!tea_util_1.default.isUnset(request.shopId)) {
            body["shopId"] = request.shopId;
        }
        if (!tea_util_1.default.isUnset(request.shopName)) {
            body["shopName"] = request.shopName;
        }
        if (!tea_util_1.default.isUnset(request.shopRegion)) {
            body["shopRegion"] = request.shopRegion;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "TiktokShopAuthCallback",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/omniChannel/tiktok/shop/authCallback`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new TiktokShopAuthCallbackResponse({}));
    }
    /**
     * 平台店铺授权回调
     *
     * @param request - TiktokShopAuthCallbackRequest
     * @returns TiktokShopAuthCallbackResponse
     */
    async tiktokShopAuthCallback(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new TiktokShopAuthCallbackHeaders({});
        return await this.tiktokShopAuthCallbackWithOptions(request, headers, runtime);
    }
    /**
     * 全渠道运营Tiktok的Webhook信息写入
     *
     * @param request - TiktokWebhookProcessRequest
     * @param headers - TiktokWebhookProcessHeaders
     * @param runtime - runtime options for this request RuntimeOptions
     * @returns TiktokWebhookProcessResponse
     */
    async tiktokWebhookProcessWithOptions(request, headers, runtime) {
        tea_util_1.default.validateModel(request);
        let body = {};
        if (!tea_util_1.default.isUnset(request.tiktokContentJsonString)) {
            body["tiktokContentJsonString"] = request.tiktokContentJsonString;
        }
        let realHeaders = {};
        if (!tea_util_1.default.isUnset(headers.commonHeaders)) {
            realHeaders = headers.commonHeaders;
        }
        if (!tea_util_1.default.isUnset(headers.xAcsDingtalkAccessToken)) {
            realHeaders["x-acs-dingtalk-access-token"] = tea_util_1.default.toJSONString(headers.xAcsDingtalkAccessToken);
        }
        let req = new $OpenApi.OpenApiRequest({
            headers: realHeaders,
            body: openapi_util_1.default.parseToMap(body),
        });
        let params = new $OpenApi.Params({
            action: "TiktokWebhookProcess",
            version: "aiGlobalEC_1.0",
            protocol: "HTTP",
            pathname: `/v1.0/aiGlobalEC/omniChannel/tiktok/webhook/process`,
            method: "POST",
            authType: "AK",
            style: "ROA",
            reqBodyType: "none",
            bodyType: "json",
        });
        return $tea.cast(await this.execute(params, req, runtime), new TiktokWebhookProcessResponse({}));
    }
    /**
     * 全渠道运营Tiktok的Webhook信息写入
     *
     * @param request - TiktokWebhookProcessRequest
     * @returns TiktokWebhookProcessResponse
     */
    async tiktokWebhookProcess(request) {
        let runtime = new $Util.RuntimeOptions({});
        let headers = new TiktokWebhookProcessHeaders({});
        return await this.tiktokWebhookProcessWithOptions(request, headers, runtime);
    }
}
exports.default = Client;
//# sourceMappingURL=client.js.map