Преглед на файлове

Authentication template add SupportApps

sdk-team преди 2 години
родител
ревизия
5d8d514785

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1938
+1.36.1939

+ 6 - 0
cams/include/alibabacloud/cams/model/CreateChatappTemplateRequest.h

@@ -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;

+ 6 - 0
cams/include/alibabacloud/cams/model/GetChatappTemplateDetailResult.h

@@ -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 轮播卡片列表

+ 6 - 0
cams/include/alibabacloud/cams/model/ModifyChatappTemplateRequest.h

@@ -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;

+ 4 - 0
cams/src/model/CreateChatappTemplateRequest.cc

@@ -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));

+ 10 - 0
cams/src/model/GetChatappTemplateDetailResult.cc

@@ -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();

+ 4 - 0
cams/src/model/ModifyChatappTemplateRequest.cc

@@ -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));