aligenie-iap_1_0/main.tea (1,592 lines of code) (raw):
/**
*
*/
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;
extends OpenApi;
init(config: OpenApi.Config){
super(config);
@endpointRule = '';
checkConfig(config);
@endpoint = getEndpoint('aligenie', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}
function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
if (!Util.empty(endpoint)) {
return endpoint;
}
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
return endpointMap[regionId];
}
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}
model AppUseTimeReportHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model AppUseTimeReportRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
action?: string(name='Action', example='start'),
isPrivilege?: int32(name='IsPrivilege', example='1'),
resourceId?: string(name='ResourceId', example='1'),
resourceType?: int32(name='ResourceType', example='1'),
stepCode?: string(name='StepCode', example='2'),
vipType?: int32(name='VipType', example='1'),
originUuid?: string(name='originUuid', example='731D5F********DC3B'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model AppUseTimeReportShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model AppUseTimeReportResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg'),
retValue?: boolean(name='RetValue', example='true'),
}
model AppUseTimeReportResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: AppUseTimeReportResponseBody(name='body'),
}
async function appUseTimeReportWithOptions(tmpReq: AppUseTimeReportRequest, headers: AppUseTimeReportHeaders, runtime: Util.RuntimeOptions): AppUseTimeReportResponse {
Util.validateModel(tmpReq);
var request = new AppUseTimeReportShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
body['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
body['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
body['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'AppUseTimeReport',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/vip/use/time/report`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function appUseTimeReport(request: AppUseTimeReportRequest): AppUseTimeReportResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new AppUseTimeReportHeaders{};
return appUseTimeReportWithOptions(request, headers, runtime);
}
model CallBackThirdRightSendPlanHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model CallBackThirdRightSendPlanRequest {
bizGroup?: string(name='BizGroup', example='cc'),
bizType?: string(name='BizType', example='ailabs'),
cardType?: int32(name='CardType', example='1001'),
errorMsg?: string(name='ErrorMsg', example='领取异常'),
extendInfo?: map[string]any(name='ExtendInfo', example='{}'),
genieOpenId?: string(name='GenieOpenId', example='1dsds2FzCXFGVA1ADS'),
receiveStatus?: int32(name='ReceiveStatus', example='1'),
sn?: string(name='Sn', example='01000019100307010000600'),
supplierId?: long(name='SupplierId', example='1'),
}
model CallBackThirdRightSendPlanShrinkRequest {
bizGroup?: string(name='BizGroup', example='cc'),
bizType?: string(name='BizType', example='ailabs'),
cardType?: int32(name='CardType', example='1001'),
errorMsg?: string(name='ErrorMsg', example='领取异常'),
extendInfoShrink?: string(name='ExtendInfo', example='{}'),
genieOpenId?: string(name='GenieOpenId', example='1dsds2FzCXFGVA1ADS'),
receiveStatus?: int32(name='ReceiveStatus', example='1'),
sn?: string(name='Sn', example='01000019100307010000600'),
supplierId?: long(name='SupplierId', example='1'),
}
model CallBackThirdRightSendPlanResponseBody = {
retCode?: string(name='RetCode', example='400'),
retMsg?: string(name='RetMsg', example='系统异常'),
retValue?: boolean(name='RetValue'),
requestId?: string(name='requestId', example='908FA068-529C-0C20-8DB5-63B0EF7CFF1F'),
}
model CallBackThirdRightSendPlanResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CallBackThirdRightSendPlanResponseBody(name='body'),
}
async function callBackThirdRightSendPlanWithOptions(tmpReq: CallBackThirdRightSendPlanRequest, headers: CallBackThirdRightSendPlanHeaders, runtime: Util.RuntimeOptions): CallBackThirdRightSendPlanResponse {
Util.validateModel(tmpReq);
var request = new CallBackThirdRightSendPlanShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.extendInfo)) {
request.extendInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extendInfo, 'ExtendInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.bizGroup)) {
query['BizGroup'] = request.bizGroup;
}
if (!Util.isUnset(request.bizType)) {
query['BizType'] = request.bizType;
}
if (!Util.isUnset(request.cardType)) {
query['CardType'] = request.cardType;
}
if (!Util.isUnset(request.errorMsg)) {
query['ErrorMsg'] = request.errorMsg;
}
if (!Util.isUnset(request.extendInfoShrink)) {
query['ExtendInfo'] = request.extendInfoShrink;
}
if (!Util.isUnset(request.genieOpenId)) {
query['GenieOpenId'] = request.genieOpenId;
}
if (!Util.isUnset(request.receiveStatus)) {
query['ReceiveStatus'] = request.receiveStatus;
}
if (!Util.isUnset(request.sn)) {
query['Sn'] = request.sn;
}
if (!Util.isUnset(request.supplierId)) {
query['SupplierId'] = request.supplierId;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CallBackThirdRightSendPlan',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/business/CallBackThirdRightSendPlan`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function callBackThirdRightSendPlan(request: CallBackThirdRightSendPlanRequest): CallBackThirdRightSendPlanResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new CallBackThirdRightSendPlanHeaders{};
return callBackThirdRightSendPlanWithOptions(request, headers, runtime);
}
model CheckThirdRightSendPlanHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model CheckThirdRightSendPlanRequest {
bizGroup?: string(name='BizGroup', example='cc'),
bizType?: string(name='BizType', example='ailabs'),
extendInfo?: map[string]any(name='ExtendInfo', example='{}'),
sn?: string(name='Sn', example='01000019100307010000600'),
supplierId?: long(name='SupplierId', example='1'),
}
model CheckThirdRightSendPlanShrinkRequest {
bizGroup?: string(name='BizGroup', example='cc'),
bizType?: string(name='BizType', example='ailabs'),
extendInfoShrink?: string(name='ExtendInfo', example='{}'),
sn?: string(name='Sn', example='01000019100307010000600'),
supplierId?: long(name='SupplierId', example='1'),
}
model CheckThirdRightSendPlanResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg', example='系统异常'),
retValue?: {
activateDate?: string(name='ActivateDate', example='"1713262192005"'),
cardType?: int32(name='CardType', example='1001 日卡 1002 月卡 1003 季卡 1004 年卡'),
channelCode?: string(name='ChannelCode', example='TB'),
channelName?: string(name='ChannelName', example='淘宝'),
extendInfo?: map[string]any(name='ExtendInfo', example='{}'),
requestId?: string(name='RequestId', example='908FA068-529C-0C20-8DB5-63B0EF7CFF1F'),
rightsExpiredDate?: string(name='RightsExpiredDate', example='"1713262192005"'),
}(name='RetValue'),
}
model CheckThirdRightSendPlanResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CheckThirdRightSendPlanResponseBody(name='body'),
}
async function checkThirdRightSendPlanWithOptions(tmpReq: CheckThirdRightSendPlanRequest, headers: CheckThirdRightSendPlanHeaders, runtime: Util.RuntimeOptions): CheckThirdRightSendPlanResponse {
Util.validateModel(tmpReq);
var request = new CheckThirdRightSendPlanShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.extendInfo)) {
request.extendInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extendInfo, 'ExtendInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.bizGroup)) {
query['BizGroup'] = request.bizGroup;
}
if (!Util.isUnset(request.bizType)) {
query['BizType'] = request.bizType;
}
if (!Util.isUnset(request.extendInfoShrink)) {
query['ExtendInfo'] = request.extendInfoShrink;
}
if (!Util.isUnset(request.sn)) {
query['Sn'] = request.sn;
}
if (!Util.isUnset(request.supplierId)) {
query['SupplierId'] = request.supplierId;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'CheckThirdRightSendPlan',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/business/CheckThirdRightSendPlan`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function checkThirdRightSendPlan(request: CheckThirdRightSendPlanRequest): CheckThirdRightSendPlanResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new CheckThirdRightSendPlanHeaders{};
return checkThirdRightSendPlanWithOptions(request, headers, runtime);
}
model CreateReminderHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model CreateReminderRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
content?: string(name='Content', example='提醒内容'),
isDebug?: boolean(name='IsDebug', example='true'),
recurrenceRule?: {
day?: int32(name='Day', example='25'),
daysOfMonth?: [ int32 ](name='DaysOfMonth'),
daysOfWeek?: [ int32 ](name='DaysOfWeek'),
endDateTime?: long(name='EndDateTime', example='1635134700000'),
freq?: string(name='Freq', example='ONCE'),
hour?: int32(name='Hour', example='12'),
minute?: int32(name='Minute', example='3'),
month?: int32(name='Month', example='10'),
second?: int32(name='Second', example='3'),
startDateTime?: long(name='StartDateTime', example='1635134400000'),
year?: int32(name='Year', example='2021'),
}(name='RecurrenceRule'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model CreateReminderShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model CreateReminderResponseBody = {
errorCode?: string(name='ErrorCode', example='400'),
errorMsg?: string(name='ErrorMsg', example='不能设置过去的时间。'),
model?: long(name='Model', example='20****1'),
success?: boolean(name='Success', example='true'),
}
model CreateReminderResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: CreateReminderResponseBody(name='body'),
}
async function createReminderWithOptions(tmpReq: CreateReminderRequest, headers: CreateReminderHeaders, runtime: Util.RuntimeOptions): CreateReminderResponse {
Util.validateModel(tmpReq);
var request = new CreateReminderShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
body['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
body['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
body['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'CreateReminder',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/reminder/create`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function createReminder(request: CreateReminderRequest): CreateReminderResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new CreateReminderHeaders{};
return createReminderWithOptions(request, headers, runtime);
}
model DeleteReminderHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model DeleteReminderRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
id?: long(name='Id', example='20****34'),
isDebug?: boolean(name='IsDebug', example='true'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model DeleteReminderShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model DeleteReminderResponseBody = {
errorCode?: int32(name='ErrorCode', example='400'),
errorMsg?: string(name='ErrorMsg', example='参数错误。'),
success?: boolean(name='Success', example='true'),
}
model DeleteReminderResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: DeleteReminderResponseBody(name='body'),
}
async function deleteReminderWithOptions(tmpReq: DeleteReminderRequest, headers: DeleteReminderHeaders, runtime: Util.RuntimeOptions): DeleteReminderResponse {
Util.validateModel(tmpReq);
var request = new DeleteReminderShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'DeleteReminder',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/reminder/delete`,
method = 'DELETE',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function deleteReminder(request: DeleteReminderRequest): DeleteReminderResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new DeleteReminderHeaders{};
return deleteReminderWithOptions(request, headers, runtime);
}
model GetAccountForAppHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model GetAccountForAppRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
phone?: string(name='Phone', example='188*777'),
originUuid?: string(name='originUuid', example='731D5F********DC3B'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model GetAccountForAppShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model GetAccountForAppResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg'),
retValue?: {
isVip?: boolean(name='IsVip', example='true'),
strVipExpire?: string(name='StrVipExpire', example='2022-05-12 15:22:18'),
vipExpireAt?: long(name='VipExpireAt', example='1652340138347'),
}(name='RetValue'),
}
model GetAccountForAppResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetAccountForAppResponseBody(name='body'),
}
async function getAccountForAppWithOptions(tmpReq: GetAccountForAppRequest, headers: GetAccountForAppHeaders, runtime: Util.RuntimeOptions): GetAccountForAppResponse {
Util.validateModel(tmpReq);
var request = new GetAccountForAppShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetAccountForApp',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/vip/account/get`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getAccountForApp(request: GetAccountForAppRequest): GetAccountForAppResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new GetAccountForAppHeaders{};
return getAccountForAppWithOptions(request, headers, runtime);
}
model GetBusAppConfigHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model GetBusAppConfigRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
originUuid?: string(name='originUuid', example='731D5F********DC3B'),
phone?: string(name='phone', example='136****1111'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model GetBusAppConfigShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model GetBusAppConfigResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg', example='请求异常'),
retValue?: {
cashier?: string(name='Cashier', example='https://******.com/*****/******?appId=xxxxx'),
shoppingBar?: string(name='ShoppingBar', example='https://******.com/design/******?imageId=xxxxx'),
shoppingWindow?: string(name='ShoppingWindow', example='https://******.com/design/******?imageId=xxxxx'),
vipLabel?: string(name='VipLabel', example='https://******.com/design/******?imageId=xxxxx'),
}(name='RetValue'),
}
model GetBusAppConfigResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetBusAppConfigResponseBody(name='body'),
}
async function getBusAppConfigWithOptions(tmpReq: GetBusAppConfigRequest, headers: GetBusAppConfigHeaders, runtime: Util.RuntimeOptions): GetBusAppConfigResponse {
Util.validateModel(tmpReq);
var request = new GetBusAppConfigShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetBusAppConfig',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/app/config/get`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getBusAppConfig(request: GetBusAppConfigRequest): GetBusAppConfigResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new GetBusAppConfigHeaders{};
return getBusAppConfigWithOptions(request, headers, runtime);
}
model GetPhoneNumberHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model GetPhoneNumberRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model GetPhoneNumberShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
userInfoShrink?: string(name='UserInfo'),
}
model GetPhoneNumberResponseBody = {
phoneNumber?: string(name='phoneNumber', example='137****'),
}
model GetPhoneNumberResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetPhoneNumberResponseBody(name='body'),
}
async function getPhoneNumberWithOptions(tmpReq: GetPhoneNumberRequest, headers: GetPhoneNumberHeaders, runtime: Util.RuntimeOptions): GetPhoneNumberResponse {
Util.validateModel(tmpReq);
var request = new GetPhoneNumberShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetPhoneNumber',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/profile/phoneNumber`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getPhoneNumber(request: GetPhoneNumberRequest): GetPhoneNumberResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new GetPhoneNumberHeaders{};
return getPhoneNumberWithOptions(request, headers, runtime);
}
model GetReminderHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model GetReminderRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
id?: long(name='Id', example='20****34'),
isDebug?: boolean(name='IsDebug', example='true'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='SKILL_ID'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model GetReminderShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model GetReminderResponseBody = {
errorCode?: int32(name='ErrorCode', example='400'),
errorMsg?: string(name='ErrorMsg', example='参数不合法。'),
model?: {
remindResponses?: [
{
actionTopic?: string(name='ActionTopic', example='宝宝快去刷牙'),
dayDesc?: string(name='DayDesc', example='每天'),
recurrenceRule?: {
day?: int32(name='Day', example='27'),
daysOfMonth?: [ int32 ](name='DaysOfMonth'),
daysOfWeek?: [ int32 ](name='DaysOfWeek'),
endDateTime?: string(name='EndDateTime', example='1661598000000'),
freq?: string(name='Freq', example='WEEKLY'),
hour?: int32(name='Hour', example='18'),
minute?: int32(name='Minute', example='0'),
month?: int32(name='Month', example='8'),
second?: int32(name='Second', example='0'),
startDateTime?: string(name='StartDateTime', example='1630054800000'),
year?: int32(name='Year', example='2021'),
}(name='RecurrenceRule'),
remindId?: long(name='RemindId', example='20*****1'),
remindTime?: string(name='RemindTime', example='1629850800000'),
repeatCount?: int32(name='RepeatCount', example='1'),
week?: string(name='Week', example='周三'),
}
](name='RemindResponses'),
}(name='Model'),
success?: boolean(name='Success', example='true'),
}
model GetReminderResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: GetReminderResponseBody(name='body'),
}
async function getReminderWithOptions(tmpReq: GetReminderRequest, headers: GetReminderHeaders, runtime: Util.RuntimeOptions): GetReminderResponse {
Util.validateModel(tmpReq);
var request = new GetReminderShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'GetReminder',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/reminder/get`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function getReminder(request: GetReminderRequest): GetReminderResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new GetReminderHeaders{};
return getReminderWithOptions(request, headers, runtime);
}
model ListRemindersHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model ListRemindersRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
isDebug?: boolean(name='IsDebug', example='true'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model ListRemindersShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model ListRemindersResponseBody = {
errorCode?: int32(name='ErrorCode', example='400'),
errorMsg?: string(name='ErrorMsg', example='参数不合法。'),
model?: {
remindResponses?: [
{
actionTopic?: string(name='ActionTopic', example='宝宝快去刷牙'),
dayDesc?: string(name='DayDesc', example='每天'),
recurrenceRule?: {
day?: int32(name='Day', example='27'),
daysOfMonth?: [ int32 ](name='DaysOfMonth'),
daysOfWeek?: [ int32 ](name='DaysOfWeek'),
endDateTime?: string(name='EndDateTime', example='1661598000000'),
freq?: string(name='Freq', example='WEEKLY'),
hour?: int32(name='Hour', example='18'),
minute?: int32(name='Minute', example='0'),
month?: int32(name='Month', example='8'),
second?: int32(name='Second', example='0'),
startDateTime?: string(name='StartDateTime', example='1630054800000'),
year?: int32(name='Year', example='2021'),
}(name='RecurrenceRule'),
remindId?: long(name='RemindId', example='20****1'),
remindTime?: string(name='RemindTime', example='1629850800000'),
repeatCount?: int32(name='RepeatCount', example='1'),
week?: string(name='Week', example='周三'),
}
](name='RemindResponses'),
}(name='Model'),
success?: boolean(name='Success', example='true'),
}
model ListRemindersResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: ListRemindersResponseBody(name='body'),
}
async function listRemindersWithOptions(tmpReq: ListRemindersRequest, headers: ListRemindersHeaders, runtime: Util.RuntimeOptions): ListRemindersResponse {
Util.validateModel(tmpReq);
var request = new ListRemindersShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'ListReminders',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/reminder/list`,
method = 'GET',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function listReminders(request: ListRemindersRequest): ListRemindersResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new ListRemindersHeaders{};
return listRemindersWithOptions(request, headers, runtime);
}
model PullCashierHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model PullCashierRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
originUuid?: string(name='originUuid', example='731D5F********DC3B'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model PullCashierShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model PullCashierResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg'),
retValue?: boolean(name='RetValue', example='true'),
}
model PullCashierResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: PullCashierResponseBody(name='body'),
}
async function pullCashierWithOptions(tmpReq: PullCashierRequest, headers: PullCashierHeaders, runtime: Util.RuntimeOptions): PullCashierResponse {
Util.validateModel(tmpReq);
var request = new PullCashierShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var query : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
query['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
query['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
query['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
query = OpenApiUtil.query(query),
};
var params = new OpenApi.Params{
action = 'PullCashier',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/pull/cashier/`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function pullCashier(request: PullCashierRequest): PullCashierResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new PullCashierHeaders{};
return pullCashierWithOptions(request, headers, runtime);
}
model PushNotificationsHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model PushNotificationsRequest {
notificationUnicastRequest?: {
encodeKey?: string(name='EncodeKey', example='apk包名'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
isDebug?: boolean(name='IsDebug', example='true'),
messageTemplateId?: string(name='MessageTemplateId', example='2iU81*****G9elJ'),
organizationId?: string(name='OrganizationId', example='2'),
placeHolder?: map[string]string(name='PlaceHolder', example='{"nick":"张三"}'),
sendTarget?: {
targetIdentity?: string(name='TargetIdentity', example='2VpiDQ6aMjxz******Eo7r6e08oIVZ3fKrm5TyEfY='),
targetType?: string(name='TargetType', example='DEVICE_OPEN_ID'),
}(name='SendTarget'),
}(name='NotificationUnicastRequest'),
tenantInfo?: {
}(name='TenantInfo'),
}
model PushNotificationsShrinkRequest {
notificationUnicastRequestShrink?: string(name='NotificationUnicastRequest'),
tenantInfoShrink?: string(name='TenantInfo'),
}
model PushNotificationsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
}
async function pushNotificationsWithOptions(tmpReq: PushNotificationsRequest, headers: PushNotificationsHeaders, runtime: Util.RuntimeOptions): PushNotificationsResponse {
Util.validateModel(tmpReq);
var request = new PushNotificationsShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.notificationUnicastRequest)) {
request.notificationUnicastRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.notificationUnicastRequest, 'NotificationUnicastRequest', 'json');
}
if (!Util.isUnset(tmpReq.tenantInfo)) {
request.tenantInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantInfo, 'TenantInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.notificationUnicastRequestShrink)) {
body['NotificationUnicastRequest'] = request.notificationUnicastRequestShrink;
}
if (!Util.isUnset(request.tenantInfoShrink)) {
body['TenantInfo'] = request.tenantInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'PushNotifications',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/notifications`,
method = 'PUT',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'none',
};
return callApi(params, req, runtime);
}
async function pushNotifications(request: PushNotificationsRequest): PushNotificationsResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new PushNotificationsHeaders{};
return pushNotificationsWithOptions(request, headers, runtime);
}
model SendNotificationsHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model SendNotificationsRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
notificationUnicastRequest?: {
isDebug?: boolean(name='IsDebug', example='false'),
messageTemplateId?: string(name='MessageTemplateId', example='2iU81*****G9elJ'),
placeHolder?: map[string]string(name='PlaceHolder', example='{"nick":"张三"}'),
sendTarget?: {
}(name='SendTarget'),
}(name='NotificationUnicastRequest'),
tenantInfo?: {
}(name='TenantInfo'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model SendNotificationsShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
notificationUnicastRequestShrink?: string(name='NotificationUnicastRequest'),
tenantInfoShrink?: string(name='TenantInfo'),
userInfoShrink?: string(name='UserInfo'),
}
model SendNotificationsResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
}
async function sendNotificationsWithOptions(tmpReq: SendNotificationsRequest, headers: SendNotificationsHeaders, runtime: Util.RuntimeOptions): SendNotificationsResponse {
Util.validateModel(tmpReq);
var request = new SendNotificationsShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.notificationUnicastRequest)) {
request.notificationUnicastRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.notificationUnicastRequest, 'NotificationUnicastRequest', 'json');
}
if (!Util.isUnset(tmpReq.tenantInfo)) {
request.tenantInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tenantInfo, 'TenantInfo', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
body['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.notificationUnicastRequestShrink)) {
body['NotificationUnicastRequest'] = request.notificationUnicastRequestShrink;
}
if (!Util.isUnset(request.tenantInfoShrink)) {
body['TenantInfo'] = request.tenantInfoShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
body['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'SendNotifications',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/general/notifications`,
method = 'PUT',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'none',
};
return callApi(params, req, runtime);
}
async function sendNotifications(request: SendNotificationsRequest): SendNotificationsResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new SendNotificationsHeaders{};
return sendNotificationsWithOptions(request, headers, runtime);
}
model UpdateReminderHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model UpdateReminderRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
content?: string(name='Content', example='更新提醒内容'),
id?: long(name='Id', example='20***34'),
isDebug?: boolean(name='IsDebug', example='true'),
recurrenceRule?: {
day?: int32(name='Day', example='25'),
daysOfMonth?: [ int32 ](name='DaysOfMonth'),
daysOfWeek?: [ int32 ](name='DaysOfWeek'),
endDateTime?: long(name='EndDateTime', example='1635134700000'),
freq?: string(name='Freq', example='ONCE'),
hour?: int32(name='Hour', example='12'),
minute?: int32(name='Minute', example='3'),
month?: int32(name='Month', example='10'),
second?: int32(name='Second', example='3'),
startDateTime?: long(name='StartDateTime', example='1635134400000'),
year?: int32(name='Year', example='2021'),
}(name='RecurrenceRule'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model UpdateReminderShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model UpdateReminderResponseBody = {
errorCode?: int32(name='ErrorCode', example='400'),
errorMsg?: string(name='ErrorMsg', example='不能设置过去的时间。'),
model?: long(name='Model', example='20****1'),
success?: boolean(name='Success', example='true'),
}
model UpdateReminderResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: UpdateReminderResponseBody(name='body'),
}
async function updateReminderWithOptions(tmpReq: UpdateReminderRequest, headers: UpdateReminderHeaders, runtime: Util.RuntimeOptions): UpdateReminderResponse {
Util.validateModel(tmpReq);
var request = new UpdateReminderShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
body['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
body['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
body['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'UpdateReminder',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/reminder/update`,
method = 'PUT',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function updateReminder(request: UpdateReminderRequest): UpdateReminderResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new UpdateReminderHeaders{};
return updateReminderWithOptions(request, headers, runtime);
}
model VideoAppReportHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model VideoAppReportRequest {
deviceInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='DAFE****ce3ej='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='DeviceInfo'),
payload?: {
endTime?: long(name='endTime', example='1652337963097'),
isLogin?: boolean(name='isLogin', example='true'),
isVip?: boolean(name='isVip', example='true'),
loginNick?: string(name='loginNick', example='test'),
originUuid?: string(name='originUuid', example='731D5F********DC3B'),
phone?: string(name='phone', example='188*777'),
pkgName?: string(name='pkgName', example='com.***.test'),
startTime?: long(name='startTime', example='1652337963097'),
}(name='Payload'),
userInfo?: {
encodeKey?: string(name='EncodeKey', example='12**45'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
id?: string(name='Id', example='HOFF****my7Iw='),
idType?: string(name='IdType', example='OPEN_ID'),
organizationId?: string(name='OrganizationId', example='1**2'),
}(name='UserInfo'),
}
model VideoAppReportShrinkRequest {
deviceInfoShrink?: string(name='DeviceInfo'),
payloadShrink?: string(name='Payload'),
userInfoShrink?: string(name='UserInfo'),
}
model VideoAppReportResponseBody = {
retCode?: int32(name='RetCode', example='0'),
retMsg?: string(name='RetMsg'),
retValue?: boolean(name='RetValue', example='true'),
}
model VideoAppReportResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
body?: VideoAppReportResponseBody(name='body'),
}
async function videoAppReportWithOptions(tmpReq: VideoAppReportRequest, headers: VideoAppReportHeaders, runtime: Util.RuntimeOptions): VideoAppReportResponse {
Util.validateModel(tmpReq);
var request = new VideoAppReportShrinkRequest{};
OpenApiUtil.convert(tmpReq, request);
if (!Util.isUnset(tmpReq.deviceInfo)) {
request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
}
if (!Util.isUnset(tmpReq.payload)) {
request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
}
if (!Util.isUnset(tmpReq.userInfo)) {
request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
}
var body : map[string]any = {};
if (!Util.isUnset(request.deviceInfoShrink)) {
body['DeviceInfo'] = request.deviceInfoShrink;
}
if (!Util.isUnset(request.payloadShrink)) {
body['Payload'] = request.payloadShrink;
}
if (!Util.isUnset(request.userInfoShrink)) {
body['UserInfo'] = request.userInfoShrink;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'VideoAppReport',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/vip/use/video/report`,
method = 'POST',
authType = 'AK',
style = 'ROA',
reqBodyType = 'formData',
bodyType = 'json',
};
return callApi(params, req, runtime);
}
async function videoAppReport(request: VideoAppReportRequest): VideoAppReportResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new VideoAppReportHeaders{};
return videoAppReportWithOptions(request, headers, runtime);
}
model WakeUpAppHeaders {
commonHeaders?: map[string]string,
xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
authorization?: string(name='Authorization'),
}
model WakeUpAppRequest {
isDebug?: boolean(name='IsDebug', example='true'),
path?: string(name='Path', example='应用拉起路径'),
targetInfo?: {
encodeKey?: string(name='EncodeKey', example='apk包名'),
encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
organizationId?: string(name='OrganizationId', example='11'),
targetIdentity?: string(name='TargetIdentity', example='2VpiDQ6aMjxz******Eo7r6e08oIVZ3fKrm5TyEfY='),
targetType?: string(name='TargetType', example='DEVICE_OPEN_ID'),
}(name='TargetInfo'),
}
model WakeUpAppResponse = {
headers?: map[string]string(name='headers'),
statusCode?: int32(name='statusCode'),
}
async function wakeUpAppWithOptions(request: WakeUpAppRequest, headers: WakeUpAppHeaders, runtime: Util.RuntimeOptions): WakeUpAppResponse {
Util.validateModel(request);
var body : map[string]any = {};
if (!Util.isUnset(request.isDebug)) {
body['IsDebug'] = request.isDebug;
}
if (!Util.isUnset(request.path)) {
body['Path'] = request.path;
}
if (!Util.isUnset(request.targetInfo)) {
body['TargetInfo'] = request.targetInfo;
}
var realHeaders : map[string]string = {};
if (!Util.isUnset(headers.commonHeaders)) {
realHeaders = headers.commonHeaders;
}
if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
}
if (!Util.isUnset(headers.authorization)) {
realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
}
var req = new OpenApi.OpenApiRequest{
headers = realHeaders,
body = OpenApiUtil.parseToMap(body),
};
var params = new OpenApi.Params{
action = 'WakeUpApp',
version = 'iap_1.0',
protocol = 'HTTPS',
pathname = `/v1.0/iap/wakeup`,
method = 'PUT',
authType = 'AK',
style = 'ROA',
reqBodyType = 'json',
bodyType = 'none',
};
return callApi(params, req, runtime);
}
async function wakeUpApp(request: WakeUpAppRequest): WakeUpAppResponse {
var runtime = new Util.RuntimeOptions{};
var headers = new WakeUpAppHeaders{};
return wakeUpAppWithOptions(request, headers, runtime);
}