Skip to content

Commit d260f8e

Browse files
authored
Changed actions name (#3326)
1 parent d40e964 commit d260f8e

File tree

6 files changed

+21
-19
lines changed

6 files changed

+21
-19
lines changed

packages/browser-destinations/destinations/ms-bing-capi/src/__tests__/index.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('ajs-integration', () => {
5454

5555
const updatedCtx = await msclkidPlugin.track?.(ctx)
5656

57-
const msBingCAPIIntegrationsObj = updatedCtx?.event?.integrations['Ms Bing Capi']
57+
const msBingCAPIIntegrationsObj = updatedCtx?.event?.integrations['Microsoft Bing CAPI (Actions)']
5858

5959
expect(msBingCAPIIntegrationsObj[clickIdIntegrationFieldName]).toEqual('dummyQuerystringValue')
6060
})

packages/browser-destinations/destinations/ms-bing-capi/src/msclkidPlugin/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ const action: BrowserActionDefinition<Settings, {}, Payload> = {
1818
const integrationsData: Record<string, string> = {}
1919
if (msclkid) {
2020
integrationsData[clickIdIntegrationFieldName] = msclkid
21-
if (context.event.integrations?.All !== false || context.event.integrations['Ms Bing Capi']) {
22-
context.updateEvent(`integrations.Ms Bing Capi`, integrationsData)
21+
if (context.event.integrations?.All !== false || context.event.integrations['Microsoft Bing CAPI (Actions)']) {
22+
context.updateEvent(`integrations.Microsoft Bing CAPI (Actions)`, integrationsData)
2323
}
2424
}
2525
return

packages/destination-actions/src/destinations/ms-bing-capi/generated-types.ts

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/destination-actions/src/destinations/ms-bing-capi/index.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Settings } from './generated-types'
33
import sendEvent from './sendEvent'
44

55
const destination: DestinationDefinition<Settings> = {
6-
name: 'Ms Bing Capi',
6+
name: 'Microsoft Bing CAPI (Actions)',
77
slug: 'actions-ms-bing-capi',
88
mode: 'cloud',
99
authentication: {
@@ -17,7 +17,8 @@ const destination: DestinationDefinition<Settings> = {
1717
},
1818
ApiToken: {
1919
label: 'Bing ApiToken',
20-
description: 'Your Bing API Token.',
20+
description:
21+
'Your Bing API Token. API token generation is not generally available. To obtain one, you’ll need to contact Microsoft Support, or alternatively, you can [fill out this form](https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbRwMZAe0PcMxHmZ0AjDaNRmxUM0o5UURRVktCRkxHNEFLTVNYQjI3NDNBUS4u) to request access.',
2122
type: 'password',
2223
required: true
2324
},
@@ -99,7 +100,8 @@ const destination: DestinationDefinition<Settings> = {
99100
},
100101
{
101102
name: 'Send Custom Event',
102-
subscribe: 'type = "track" and event != "Order Completed" and event != "Add to Cart" and event != "Products Searched"',
103+
subscribe:
104+
'type = "track" and event != "Order Completed" and event != "Add to Cart" and event != "Products Searched"',
103105
partnerAction: 'sendEvent',
104106
mapping: defaultValues(sendEvent.fields),
105107
type: 'automatic'

packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/__tests__/sendEvent.test.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function buildTrackEvent(overrides: Record<string, any> = {}) {
3737

3838
const settings: Settings = { UetTag: 'uet-123', ApiToken: 'token-abc', adStorageConsent: 'G' }
3939

40-
describe('Ms Bing Capi - sendEvent (updated)', () => {
40+
describe('Microsoft Bing CAPI (Actions) - sendEvent (updated)', () => {
4141
const testDestination = createTestIntegration(destination)
4242
afterEach(() => nock.cleanAll())
4343

@@ -112,10 +112,10 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
112112
await testDestination.testAction('sendEvent', {
113113
event,
114114
settings,
115-
mapping: {
116-
data: { eventType: 'custom', eventTime: isoEventTime },
115+
mapping: {
116+
data: { eventType: 'custom', eventTime: isoEventTime },
117117
userData: { anonymousId: 'anon-1' },
118-
timestamp: { '@path': '$.timestamp' }
118+
timestamp: { '@path': '$.timestamp' }
119119
}
120120
})
121121
expect(scope.isDone()).toBe(true)
@@ -131,9 +131,9 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
131131
settings,
132132
mapping: {
133133
enable_batching: true,
134-
data: { eventType: 'custom'},
134+
data: { eventType: 'custom' },
135135
userData: { anonymousId: 'anon-1' },
136-
timestamp: { '@path': '$.timestamp'}
136+
timestamp: { '@path': '$.timestamp' }
137137
}
138138
})
139139
expect(responses.length).toBe(2)
@@ -156,9 +156,9 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
156156
settings,
157157
mapping: {
158158
enable_batching: true,
159-
data: { eventType: 'custom'},
159+
data: { eventType: 'custom' },
160160
userData: { anonymousId: 'anon-1' },
161-
timestamp: { '@path': '$.timestamp'}
161+
timestamp: { '@path': '$.timestamp' }
162162
}
163163
})
164164
expect(responses.length).toBe(2)
@@ -181,7 +181,7 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
181181
event,
182182
settings,
183183
mapping: {
184-
data: { eventType: 'custom'},
184+
data: { eventType: 'custom' },
185185
userData: { anonymousId: 'anon-1', em: '[email protected]' },
186186
timestamp: { '@path': '$.timestamp' }
187187
}
@@ -204,7 +204,7 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
204204
data: { eventType: 'custom', eventTime: new Date('2024-01-01T00:00:00.000Z').toISOString() },
205205
customData: { value: 10 },
206206
userData: { anonymousId: 'anon-1' },
207-
timestamp: { '@path': '$.timestamp'}
207+
timestamp: { '@path': '$.timestamp' }
208208
}
209209
})
210210
expect(scope.isDone()).toBe(true)
@@ -250,7 +250,7 @@ describe('Ms Bing Capi - sendEvent (updated)', () => {
250250
mapping: {
251251
data: { eventType: 'custom', eventTime: '2024-01-01T00:00:00.000Z' },
252252
userData: { anonymousId: 'anon-1', ph: rawPhone },
253-
timestamp: { '@path': '$.timestamp'}
253+
timestamp: { '@path': '$.timestamp' }
254254
}
255255
})
256256
expect(scope.isDone()).toBe(true)

packages/destination-actions/src/destinations/ms-bing-capi/sendEvent/fields.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const userData: InputField = {
7878
'@if': {
7979
exists: { '@path': '$.properties.msclkid' },
8080
then: { '@path': '$.properties.msclkid' },
81-
else: { '@path': '$.integrations.Ms Bing Capi.msclkid' }
81+
else: { '@path': '$.integrations.Microsoft Bing CAPI (Actions).msclkid' }
8282
}
8383
}
8484
}

0 commit comments

Comments
 (0)