Przeglądaj źródła

whatsapp 修改Authentication类型的模板

sdk-team 3 lat temu
rodzic
commit
3dad76444f

+ 1 - 1
VERSION

@@ -1 +1 @@
-1.36.1555
+1.36.1556

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

@@ -41,12 +41,18 @@ public:
 			std::string phoneNumber;
 			std::string phoneNumber;
 			std::string url;
 			std::string url;
 			std::string urlType;
 			std::string urlType;
+			std::string signatureHash;
+			std::string packageName;
+			std::string autofillText;
+			bool isOptOut;
 		};
 		};
 		ButtonsItem buttonsItem;
 		ButtonsItem buttonsItem;
 		std::vector<ButtonsItem> buttons;
 		std::vector<ButtonsItem> buttons;
 		std::string thumbUrl;
 		std::string thumbUrl;
 		int duration;
 		int duration;
 		std::string fileType;
 		std::string fileType;
+		int codeExpirationMinutes;
+		bool addSecretRecommendation;
 	};
 	};
 	CreateChatappTemplateRequest();
 	CreateChatappTemplateRequest();
 	~CreateChatappTemplateRequest();
 	~CreateChatappTemplateRequest();

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

@@ -38,10 +38,23 @@ namespace AlibabaCloud
 					{
 					{
 						struct Button
 						struct Button
 						{
 						{
+							struct ExtendAttrs
+							{
+								std::string action;
+								std::string nextLanguageCode;
+								std::string nextTemplateCode;
+								std::string intentCode;
+								std::string nextTemplateName;
+							};
+							std::string autofillText;
 							std::string type;
 							std::string type;
+							bool isOptOut;
+							std::string signatureHash;
+							std::string packageName;
 							std::string phoneNumber;
 							std::string phoneNumber;
 							std::string text;
 							std::string text;
 							std::string urlType;
 							std::string urlType;
+							ExtendAttrs extendAttrs;
 							std::string url;
 							std::string url;
 						};
 						};
 						std::string thumbUrl;
 						std::string thumbUrl;
@@ -52,9 +65,11 @@ namespace AlibabaCloud
 						std::string longitude;
 						std::string longitude;
 						std::string url;
 						std::string url;
 						std::string caption;
 						std::string caption;
+						bool addSecretRecommendation;
 						std::string locationName;
 						std::string locationName;
 						std::string type;
 						std::string type;
 						std::string format;
 						std::string format;
+						int codeExpirationMinutes;
 						std::string fileType;
 						std::string fileType;
 						std::string locationAddress;
 						std::string locationAddress;
 						std::vector<Component::Button> buttons;
 						std::vector<Component::Button> buttons;

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

@@ -41,12 +41,18 @@ public:
 			std::string phoneNumber;
 			std::string phoneNumber;
 			std::string url;
 			std::string url;
 			std::string urlType;
 			std::string urlType;
+			std::string signatureHash;
+			std::string packageName;
+			std::string autofillText;
+			bool isOptOut;
 		};
 		};
 		ButtonsItem buttonsItem;
 		ButtonsItem buttonsItem;
 		std::vector<ButtonsItem> buttons;
 		std::vector<ButtonsItem> buttons;
 		std::string thumbUrl;
 		std::string thumbUrl;
 		int duration;
 		int duration;
 		std::string fileType;
 		std::string fileType;
+		int codeExpirationMinutes;
+		bool addSecretRecommendation;
 	};
 	};
 	ModifyChatappTemplateRequest();
 	ModifyChatappTemplateRequest();
 	~ModifyChatappTemplateRequest();
 	~ModifyChatappTemplateRequest();

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

@@ -44,10 +44,16 @@ void CreateChatappTemplateRequest::setComponents(const std::vector<CreateChatapp
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PhoneNumber", components[dep1].buttons[dep2].phoneNumber);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PhoneNumber", components[dep1].buttons[dep2].phoneNumber);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".Url", components[dep1].buttons[dep2].url);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".Url", components[dep1].buttons[dep2].url);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".UrlType", components[dep1].buttons[dep2].urlType);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".UrlType", components[dep1].buttons[dep2].urlType);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SignatureHash", components[dep1].buttons[dep2].signatureHash);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PackageName", components[dep1].buttons[dep2].packageName);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".AutofillText", components[dep1].buttons[dep2].autofillText);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".IsOptOut", components[dep1].buttons[dep2].isOptOut ? "true" : "false");
     }
     }
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
     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));
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
+    setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".CodeExpirationMinutes", std::to_string(components[dep1].codeExpirationMinutes));
+    setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".AddSecretRecommendation", components[dep1].addSecretRecommendation ? "true" : "false");
   }
   }
 }
 }
 
 

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

@@ -84,6 +84,10 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
 			componentObject.locationName = dataNodeComponentscomponent["LocationName"].asString();
 			componentObject.locationName = dataNodeComponentscomponent["LocationName"].asString();
 		if(!dataNodeComponentscomponent["LocationAddress"].isNull())
 		if(!dataNodeComponentscomponent["LocationAddress"].isNull())
 			componentObject.locationAddress = dataNodeComponentscomponent["LocationAddress"].asString();
 			componentObject.locationAddress = dataNodeComponentscomponent["LocationAddress"].asString();
+		if(!dataNodeComponentscomponent["AddSecretRecommendation"].isNull())
+			componentObject.addSecretRecommendation = dataNodeComponentscomponent["AddSecretRecommendation"].asString() == "true";
+		if(!dataNodeComponentscomponent["CodeExpirationMinutes"].isNull())
+			componentObject.codeExpirationMinutes = std::stoi(dataNodeComponentscomponent["CodeExpirationMinutes"].asString());
 		auto allButtonsNode = dataNodeComponentscomponent["Buttons"]["button"];
 		auto allButtonsNode = dataNodeComponentscomponent["Buttons"]["button"];
 		for (auto dataNodeComponentscomponentButtonsbutton : allButtonsNode)
 		for (auto dataNodeComponentscomponentButtonsbutton : allButtonsNode)
 		{
 		{
@@ -98,6 +102,25 @@ void GetChatappTemplateDetailResult::parse(const std::string &payload)
 				buttonsObject.url = dataNodeComponentscomponentButtonsbutton["Url"].asString();
 				buttonsObject.url = dataNodeComponentscomponentButtonsbutton["Url"].asString();
 			if(!dataNodeComponentscomponentButtonsbutton["UrlType"].isNull())
 			if(!dataNodeComponentscomponentButtonsbutton["UrlType"].isNull())
 				buttonsObject.urlType = dataNodeComponentscomponentButtonsbutton["UrlType"].asString();
 				buttonsObject.urlType = dataNodeComponentscomponentButtonsbutton["UrlType"].asString();
+			if(!dataNodeComponentscomponentButtonsbutton["SignatureHash"].isNull())
+				buttonsObject.signatureHash = dataNodeComponentscomponentButtonsbutton["SignatureHash"].asString();
+			if(!dataNodeComponentscomponentButtonsbutton["PackageName"].isNull())
+				buttonsObject.packageName = dataNodeComponentscomponentButtonsbutton["PackageName"].asString();
+			if(!dataNodeComponentscomponentButtonsbutton["AutofillText"].isNull())
+				buttonsObject.autofillText = dataNodeComponentscomponentButtonsbutton["AutofillText"].asString();
+			if(!dataNodeComponentscomponentButtonsbutton["IsOptOut"].isNull())
+				buttonsObject.isOptOut = dataNodeComponentscomponentButtonsbutton["IsOptOut"].asString() == "true";
+			auto extendAttrsNode = value["ExtendAttrs"];
+			if(!extendAttrsNode["NextTemplateCode"].isNull())
+				buttonsObject.extendAttrs.nextTemplateCode = extendAttrsNode["NextTemplateCode"].asString();
+			if(!extendAttrsNode["NextTemplateName"].isNull())
+				buttonsObject.extendAttrs.nextTemplateName = extendAttrsNode["NextTemplateName"].asString();
+			if(!extendAttrsNode["NextLanguageCode"].isNull())
+				buttonsObject.extendAttrs.nextLanguageCode = extendAttrsNode["NextLanguageCode"].asString();
+			if(!extendAttrsNode["Action"].isNull())
+				buttonsObject.extendAttrs.action = extendAttrsNode["Action"].asString();
+			if(!extendAttrsNode["IntentCode"].isNull())
+				buttonsObject.extendAttrs.intentCode = extendAttrsNode["IntentCode"].asString();
 			componentObject.buttons.push_back(buttonsObject);
 			componentObject.buttons.push_back(buttonsObject);
 		}
 		}
 		data_.components.push_back(componentObject);
 		data_.components.push_back(componentObject);

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

@@ -44,10 +44,16 @@ void ModifyChatappTemplateRequest::setComponents(const std::vector<ModifyChatapp
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PhoneNumber", components[dep1].buttons[dep2].phoneNumber);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PhoneNumber", components[dep1].buttons[dep2].phoneNumber);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".Url", components[dep1].buttons[dep2].url);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".Url", components[dep1].buttons[dep2].url);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".UrlType", components[dep1].buttons[dep2].urlType);
       setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".UrlType", components[dep1].buttons[dep2].urlType);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".SignatureHash", components[dep1].buttons[dep2].signatureHash);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".PackageName", components[dep1].buttons[dep2].packageName);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".AutofillText", components[dep1].buttons[dep2].autofillText);
+      setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Buttons." + std::to_string(dep2 + 1) + ".IsOptOut", components[dep1].buttons[dep2].isOptOut ? "true" : "false");
     }
     }
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".ThumbUrl", components[dep1].thumbUrl);
     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));
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".Duration", std::to_string(components[dep1].duration));
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
     setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".FileType", components[dep1].fileType);
+    setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".CodeExpirationMinutes", std::to_string(components[dep1].codeExpirationMinutes));
+    setBodyParameter(std::string("Components") + "." + std::to_string(dep1 + 1) + ".AddSecretRecommendation", components[dep1].addSecretRecommendation ? "true" : "false");
   }
   }
 }
 }