Authentication template add SupportApps
This commit is contained in:
@@ -49,6 +49,12 @@ public:
|
||||
std::string flowId;
|
||||
std::string flowAction;
|
||||
std::string navigateScreen;
|
||||
struct SupportedAppsItem {
|
||||
std::string signatureHash;
|
||||
std::string packageName;
|
||||
};
|
||||
SupportedAppsItem supportedAppsItem;
|
||||
std::vector<SupportedAppsItem> supportedApps;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
|
||||
@@ -46,6 +46,11 @@ namespace AlibabaCloud
|
||||
std::string intentCode;
|
||||
std::string nextTemplateName;
|
||||
};
|
||||
struct SupportedAppsItem
|
||||
{
|
||||
std::string signatureHash;
|
||||
std::string packageName;
|
||||
};
|
||||
std::string autofillText;
|
||||
std::string packageName;
|
||||
std::string text;
|
||||
@@ -59,6 +64,7 @@ namespace AlibabaCloud
|
||||
std::string signatureHash;
|
||||
std::string navigateScreen;
|
||||
std::string phoneNumber;
|
||||
std::vector<Button::SupportedAppsItem> supportedApps;
|
||||
std::string urlType;
|
||||
};
|
||||
struct 轮播卡片列表
|
||||
|
||||
@@ -49,6 +49,12 @@ public:
|
||||
std::string flowId;
|
||||
std::string flowAction;
|
||||
std::string navigateScreen;
|
||||
struct SupportedAppsItem {
|
||||
std::string signatureHash;
|
||||
std::string packageName;
|
||||
};
|
||||
SupportedAppsItem supportedAppsItem;
|
||||
std::vector<SupportedAppsItem> supportedApps;
|
||||
};
|
||||
ButtonsItem buttonsItem;
|
||||
std::vector<ButtonsItem> buttons;
|
||||
|
||||
@@ -52,6 +52,10 @@ void CreateChatappTemplateRequest::setComponents(const std::vector<CreateChatapp
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".FlowId", components[dep1].buttons[dep2].flowId);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".FlowAction", components[dep1].buttons[dep2].flowAction);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".NavigateScreen", components[dep1].buttons[dep2].navigateScreen);
|
||||
for(int dep3 = 0; dep3 != components[dep1].buttons[dep2].supportedApps.size(); dep3++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SupportedApps." + std::to_string(dep3 + 1) + ".SignatureHash", components[dep1].buttons[dep2].supportedApps[dep3].signatureHash);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SupportedApps." + std::to_string(dep3 + 1) + ".PackageName", components[dep1].buttons[dep2].supportedApps[dep3].packageName);
|
||||
}
|
||||
}
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
|
||||
|
||||
@@ -128,6 +128,16 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
|
||||
buttonsObject.flowAction = dataNodeComponentscomponentButtonsbutton["FlowAction"].asString();
|
||||
if(!dataNodeComponentscomponentButtonsbutton["NavigateScreen"].isNull())
|
||||
buttonsObject.navigateScreen = dataNodeComponentscomponentButtonsbutton["NavigateScreen"].asString();
|
||||
auto allSupportedAppsNode = dataNodeComponentscomponentButtonsbutton["SupportedApps"]["supportedAppsItem"];
|
||||
for (auto dataNodeComponentscomponentButtonsbuttonSupportedAppssupportedAppsItem : allSupportedAppsNode)
|
||||
{
|
||||
Data::Component::Button::SupportedAppsItem supportedAppsObject;
|
||||
if(!dataNodeComponentscomponentButtonsbuttonSupportedAppssupportedAppsItem["SignatureHash"].isNull())
|
||||
supportedAppsObject.signatureHash = dataNodeComponentscomponentButtonsbuttonSupportedAppssupportedAppsItem["SignatureHash"].asString();
|
||||
if(!dataNodeComponentscomponentButtonsbuttonSupportedAppssupportedAppsItem["PackageName"].isNull())
|
||||
supportedAppsObject.packageName = dataNodeComponentscomponentButtonsbuttonSupportedAppssupportedAppsItem["PackageName"].asString();
|
||||
buttonsObject.supportedApps.push_back(supportedAppsObject);
|
||||
}
|
||||
auto extendAttrsNode = value["ExtendAttrs"];
|
||||
if(!extendAttrsNode["NextTemplateCode"].isNull())
|
||||
buttonsObject.extendAttrs.nextTemplateCode = extendAttrsNode["NextTemplateCode"].asString();
|
||||
|
||||
@@ -52,6 +52,10 @@ void ModifyChatappTemplateRequest::setComponents(const std::vector<ModifyChatapp
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".FlowId", components[dep1].buttons[dep2].flowId);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".FlowAction", components[dep1].buttons[dep2].flowAction);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".NavigateScreen", components[dep1].buttons[dep2].navigateScreen);
|
||||
for(int dep3 = 0; dep3 != components[dep1].buttons[dep2].supportedApps.size(); dep3++) {
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SupportedApps." + std::to_string(dep3 + 1) + ".SignatureHash", components[dep1].buttons[dep2].supportedApps[dep3].signatureHash);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SupportedApps." + std::to_string(dep3 + 1) + ".PackageName", components[dep1].buttons[dep2].supportedApps[dep3].packageName);
|
||||
}
|
||||
}
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
|
||||
setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
|
||||
|
||||
Reference in New Issue
Block a user