targeting_optimization_types has wrong type
Checklist
- [x] I've updated to the latest released version
- [x] I've searched for existing GitHub issues
- [x] I've looked for existing answers on Stack Overflow and the Facebook Developers Group
- [x] I've read the Code of Conduct
- [x] This issue is not security related and can safely be disclosed publicly on GitHub
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
- Node Version:
16.16.0 - NPM Version:
8.11.0
Goals
What do you want to achieve?
Get correct type for targeting_optimization_types
Expected Results
What do you expect to happen?
According to documentation, targeting_optimization_types has type listKeyValue:string,int32, so type in codegen specs should be list
There are 3 objects that uses this field:
- AdSet https://developers.facebook.com/docs/marketing-api/reference/ad-campaign/
- AdAccountDeliveryEstimate (no documentation found)
- AdCampaignDeliveryEstimate https://developers.facebook.com/docs/marketing-api/reference/ad-campaign-delivery-estimate/
Actual Results
What actually happened?
Current type for targeting_optimization_types is map<string, int>
Because of that, targeting_optimization_types could not be mapped properly. For example, one issue was reported in python sdk project link
Code Samples & Details
Please provide a code sample, as well as any additional details, to help us track down the issue. If you can provide a link to a test project that allows us to reproduce the issue, this helps us immensely in both the speed and quality of the fix.
{
"name": "targeting_optimization_types",
"type": "map<string, int>"
}
should be changed to:
{
"name": "targeting_optimization_types",
"type": "list<map>"
}
I see that API spec jsons are auto-generated. Should I create pull request with type fix or it should be fixed elsewhere?
thanks for the pull request, we're aware of this issue. we'll try to address this asap.