Skip to content

Commit e46d6f4

Browse files
harsh-joshi99kc-ong-taguchi
authored andcommitted
[BING ADS AUDIENCES] Add Action (#3131)
* scaffold new bing ads audiences destination * remove unused tests * Add action boilerplate in new destination
1 parent fd2eae5 commit e46d6f4

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

packages/destination-actions/src/destinations/bing-ads-audiences/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { AudienceDestinationDefinition } from '@segment/actions-core'
22
import type { Settings } from './generated-types'
3+
import syncAudiences from './syncAudiences'
34

45
// For an example audience destination, refer to webhook-audiences. The Readme section is under 'Audience Support'
56
const destination: AudienceDestinationDefinition<Settings> = {
@@ -65,7 +66,9 @@ const destination: AudienceDestinationDefinition<Settings> = {
6566
// // implement this function and should remove it completely.
6667
// },
6768

68-
actions: {}
69+
actions: {
70+
syncAudiences
71+
}
6972
}
7073

7174
export default destination

packages/destination-actions/src/destinations/bing-ads-audiences/syncAudiences/generated-types.ts

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import type { ActionDefinition } from '@segment/actions-core'
2+
import type { Settings } from '../generated-types'
3+
import type { Payload } from './generated-types'
4+
5+
const action: ActionDefinition<Settings, Payload> = {
6+
title: 'Sync Audiences',
7+
description: '',
8+
fields: {},
9+
perform: (request, data) => {
10+
// Make your partner api request here!
11+
return request('https://example.com', {
12+
method: 'post',
13+
json: data.payload
14+
})
15+
}
16+
}
17+
18+
export default action

0 commit comments

Comments
 (0)