-
Notifications
You must be signed in to change notification settings - Fork 257
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
553 additions
and
52 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...tion-actions/src/destinations/first-party-dv360/addToAudMobileDeviceId/generated-types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
...es/destination-actions/src/destinations/first-party-dv360/addToAudMobileDeviceId/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import type { ActionDefinition } from '@segment/actions-core' | ||
import type { AudienceSettings, Settings } from '../generated-types' | ||
import type { Payload } from './generated-types' | ||
import { advertiser_id, external_id, mobileDeviceIds } from '../properties' | ||
import { editDeviceMobileIds } from '../functions' | ||
|
||
const action: ActionDefinition<Settings, Payload, AudienceSettings> = { | ||
title: 'Edit Customer Match Members - Mobile Device Id List', | ||
description: 'Add or update customer match members in Google Display & Video 360 Mobile Device Id List Audience.', | ||
defaultSubscription: 'event = "Audience Entered', | ||
fields: { | ||
mobileDeviceIds: { ...mobileDeviceIds }, | ||
external_id: { ...external_id }, | ||
advertiser_id: { ...advertiser_id } | ||
}, | ||
perform: async (request, { payload, statsContext }) => { | ||
statsContext?.statsClient?.incr('editCustomerMatchMembers', 1, statsContext?.tags) | ||
return editDeviceMobileIds(request, [payload], 'add', statsContext) | ||
}, | ||
performBatch: async (request, { payload, statsContext }) => { | ||
statsContext?.statsClient?.incr('editCustomerMatchMembers.batch', 1, statsContext?.tags) | ||
return editDeviceMobileIds(request, payload, 'add', statsContext) | ||
} | ||
} | ||
|
||
export default action |
3 changes: 0 additions & 3 deletions
3
packages/destination-actions/src/destinations/first-party-dv360/addToList/generated-types.ts
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/destination-actions/src/destinations/first-party-dv360/addToList/index.ts
This file was deleted.
Oops, something went wrong.
36 changes: 36 additions & 0 deletions
36
...ination-actions/src/destinations/first-party-dv360/addtoAudContactInfo/generated-types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
packages/destination-actions/src/destinations/first-party-dv360/addtoAudContactInfo/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import type { ActionDefinition } from '@segment/actions-core' | ||
import type { AudienceSettings, Settings } from '../generated-types' | ||
import type { Payload } from './generated-types' | ||
import { | ||
emails, | ||
phoneNumbers, | ||
zipCodes, | ||
firstName, | ||
lastName, | ||
countryCode, | ||
external_id, | ||
advertiser_id | ||
} from '../properties' | ||
import { editContactInfo } from '../functions' | ||
|
||
const action: ActionDefinition<Settings, Payload, AudienceSettings> = { | ||
title: 'Edit Customer Match Members - Contact Info List', | ||
description: 'Add or update customer match members in Google Display & Video 360 Contact Info List Audience.', | ||
defaultSubscription: 'event = "Audience Entered"', | ||
fields: { | ||
emails: { ...emails }, | ||
phoneNumbers: { ...phoneNumbers }, | ||
zipCodes: { ...zipCodes }, | ||
firstName: { ...firstName }, | ||
lastName: { ...lastName }, | ||
countryCode: { ...countryCode }, | ||
external_id: { ...external_id }, | ||
advertiser_id: { ...advertiser_id } | ||
}, | ||
perform: async (request, { payload, statsContext }) => { | ||
statsContext?.statsClient?.incr('editCustomerMatchMembers', 1, statsContext?.tags) | ||
return editContactInfo(request, [payload], 'add', statsContext) | ||
}, | ||
performBatch: async (request, { payload, statsContext }) => { | ||
statsContext?.statsClient?.incr('editCustomerMatchMembers.batch', 1, statsContext?.tags) | ||
return editContactInfo(request, payload, 'add', statsContext) | ||
} | ||
} | ||
|
||
export default action |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
packages/destination-actions/src/destinations/first-party-dv360/generated-types.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.