Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
refresh_token: string,
login_customer_id?: string,
gads_node_options?: GoogleAdsNodeOptions
) {
const additional_options: any = {}
// Apply google-ads-node options if specified
if(gads_node_options?.prevent_mutations) {
additional_options.preventMutations = gads_node_options.prevent_mutations
}
if(gads_node_options?.logging) {
additional_options.logging = gads_node_options.logging
}
this.client = new GoogleAdsClient({
developer_token,
client_id,
client_secret,
refresh_token,
login_customer_id,
parseResults: true,
async accessTokenGetter(clientId: string, clientSecret: string, refreshToken: string) {
return getAccessToken({
client_id: clientId,
client_secret: clientSecret,
refresh_token: refreshToken,
})
},
...additional_options
})
}