Skip to content

Commit 18a0b5d

Browse files
committed
Merge branch 'STRATCONN-6646/other-trait-groups-support' into staging
2 parents 241d98b + 01339c6 commit 18a0b5d

File tree

12 files changed

+43
-33
lines changed

12 files changed

+43
-33
lines changed
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
export const SingaporeURL = 'https://ingestion-service-asia-southeast1-toqowp62ka-as.a.run.app/v1/'
32
export const GermanyURL = 'https://ingestion-service-europe-west3-toqowp62ka-ey.a.run.app/v1/'
4-
export const FranceURL = 'https://ingestion-service-europe-west9-toqowp62ka-ey.a.run.app/v1/'
3+
export const UsURL = 'https://ingestion.us-east1.api.aampe.com/v1/'

packages/destination-actions/src/destinations/aampe/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DestinationDefinition, defaultValues } from '@segment/actions-core'
22
import type { Settings } from './generated-types'
33
import sendEvent from './sendEvent'
44
import upsertUserProfile from './upsertUserProfile'
5-
import { SingaporeURL, GermanyURL, FranceURL } from './constants'
5+
import { SingaporeURL, GermanyURL, UsURL } from './constants'
66

77
const destination: DestinationDefinition<Settings> = {
88
name: 'Aampe (Actions)',
@@ -26,7 +26,7 @@ const destination: DestinationDefinition<Settings> = {
2626
choices: [
2727
{ label: 'Singapore', value: SingaporeURL },
2828
{ label: 'Germany', value: GermanyURL },
29-
{ label: 'France', value: FranceURL }
29+
{ label: 'US', value: UsURL }
3030
],
3131
default: SingaporeURL
3232
}

packages/destination-actions/src/destinations/display-video-360/__tests__/index.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import nock from 'nock'
22
import { createTestIntegration, IntegrationError } from '@segment/actions-core'
33
import Destination from '../index'
4+
import { enable_batching } from '../properties'
45
import { GET_AUDIENCE_URL, CREATE_AUDIENCE_URL, OAUTH_URL } from '../constants'
56

67
const advertiserId = '424242'
@@ -48,6 +49,12 @@ const getAudienceResponse = [
4849
]
4950

5051
describe('Display Video 360', () => {
52+
describe('field definitions', () => {
53+
it('enable_batching description should reference Display & Video 360', () => {
54+
expect(enable_batching.description).toContain('Display & Video 360')
55+
})
56+
})
57+
5158
beforeEach(() => {
5259
process.env.ACTIONS_DISPLAY_VIDEO_360_CLIENT_ID = 'Clientz'
5360
process.env.ACTIONS_DISPLAY_VIDEO_360_CLIENT_SECRET = 'Scretz'

packages/destination-actions/src/destinations/display-video-360/addToAudience/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/display-video-360/properties.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const partner_provided_id: InputField = {
3434

3535
export const enable_batching: InputField = {
3636
label: 'Enable Batching',
37-
description: 'Enable batching of requests to the TikTok Audiences.',
37+
description: 'Enable batching of requests to the Display & Video 360.',
3838
type: 'boolean',
3939
default: true,
4040
required: true,

packages/destination-actions/src/destinations/display-video-360/removeFromAudience/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/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ register('699d98d1efa22d864e451400', './klime')
235235
register('699d9cfc7ddca5bfc98344dc', './amplitude-cohorts')
236236
register('69a6caedee3c3617ae42dde8', './pendo-audiences')
237237
register('69a6cb5fda60c0bec5994df4', './avo-v2')
238+
register('69b9249b38dabe2f2f1f528a', './youappi-audiences')
238239

239240
function register(id: MetadataId, destinationPath: string) {
240241
// eslint-disable-next-line @typescript-eslint/no-var-requires

packages/destination-actions/src/destinations/memora/upsertProfile/__tests__/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,7 +1033,7 @@ describe('Memora.upsertProfile', () => {
10331033
it('should fetch and return traits from all trait groups', async () => {
10341034
// Mock listing trait groups (includes traits in response)
10351035
nock(BASE_URL)
1036-
.get(`/${API_VERSION}/ControlPlane/Stores/test-store-id/TraitGroups?pageSize=100`)
1036+
.get(`/${API_VERSION}/ControlPlane/Stores/test-store-id/TraitGroups?pageSize=100&includeTraits=true`)
10371037
.matchHeader('X-Pre-Auth-Context', 'AC1234567890')
10381038
.reply(200, {
10391039
traitGroups: [
@@ -1146,7 +1146,7 @@ describe('Memora.upsertProfile', () => {
11461146

11471147
it('should return error message when API call fails', async () => {
11481148
nock(BASE_URL)
1149-
.get(`/${API_VERSION}/ControlPlane/Stores/test-store-id/TraitGroups?pageSize=100`)
1149+
.get(`/${API_VERSION}/ControlPlane/Stores/test-store-id/TraitGroups?pageSize=100&includeTraits=true`)
11501150
.reply(500, { message: 'Internal server error' })
11511151

11521152
const result = (await testDestination.testDynamicField('upsertProfile', 'profile_traits.__keys__', {

packages/destination-actions/src/destinations/memora/upsertProfile/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ async function fetchAllTraits(request: RequestClient, settings: Settings, storeI
268268
try {
269269
// Fetch list of all trait groups (includes traits in the response)
270270
const traitGroupsResponse = await request<TraitGroupsListResponse>(
271-
`${BASE_URL}/${API_VERSION}/ControlPlane/Stores/${storeId}/TraitGroups?pageSize=100`,
271+
`${BASE_URL}/${API_VERSION}/ControlPlane/Stores/${storeId}/TraitGroups?pageSize=100&includeTraits=true`,
272272
{
273273
method: 'GET',
274274
headers: {

packages/destination-actions/src/destinations/sendgrid-audiences/syncAudience/fields.ts

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export const fields: Record<string, InputField> = {
1212
default: {
1313
'@path': '$.context.personas.computation_class'
1414
},
15-
choices: [{ label: 'audience', value: 'audience' },{ label: 'journey_step', value: 'journey_step' }]
15+
choices: [
16+
{ label: 'audience', value: 'audience' },
17+
{ label: 'journey_step', value: 'journey_step' }
18+
]
1619
},
1720
external_audience_id: {
1821
type: 'string',
@@ -130,7 +133,7 @@ export const fields: Record<string, InputField> = {
130133
description: `The contact's city.`,
131134
type: 'string'
132135
},
133-
state_province_region: {
136+
state_province_region: {
134137
label: 'State/Province/Region',
135138
description: `The contact's state, province, or region.`,
136139
type: 'string'
@@ -147,68 +150,68 @@ export const fields: Record<string, InputField> = {
147150
}
148151
},
149152
default: {
150-
first_name: {
153+
first_name: {
151154
'@if': {
152155
exists: { '@path': '$.traits.first_name' },
153156
then: { '@path': '$.traits.first_name' },
154157
else: { '@path': '$.properties.first_name' }
155-
}
158+
}
156159
},
157-
last_name: {
160+
last_name: {
158161
'@if': {
159162
exists: { '@path': '$.traits.last_name' },
160163
then: { '@path': '$.traits.last_name' },
161164
else: { '@path': '$.properties.last_name' }
162-
}
165+
}
163166
},
164-
phone_number: {
167+
phone_number: {
165168
'@if': {
166169
exists: { '@path': '$.traits.phone' },
167170
then: { '@path': '$.traits.phone' },
168171
else: { '@path': '$.properties.phone' }
169-
}
172+
}
170173
},
171-
address_line_1: {
174+
address_line_1: {
172175
'@if': {
173176
exists: { '@path': '$.traits.street' },
174177
then: { '@path': '$.traits.street' },
175178
else: { '@path': '$.properties.street' }
176-
}
179+
}
177180
},
178-
address_line_2: {
181+
address_line_2: {
179182
'@if': {
180183
exists: { '@path': '$.traits.address_line_2' },
181184
then: { '@path': '$.traits.address_line_2' },
182185
else: { '@path': '$.properties.address_line_2' }
183-
}
186+
}
184187
},
185-
city: {
188+
city: {
186189
'@if': {
187190
exists: { '@path': '$.traits.city' },
188191
then: { '@path': '$.traits.city' },
189192
else: { '@path': '$.properties.city' }
190-
}
193+
}
191194
},
192-
state_province_region: {
195+
state_province_region: {
193196
'@if': {
194197
exists: { '@path': '$.traits.state' },
195198
then: { '@path': '$.traits.state' },
196199
else: { '@path': '$.properties.state' }
197-
}
200+
}
198201
},
199-
country: {
202+
country: {
200203
'@if': {
201204
exists: { '@path': '$.traits.country' },
202205
then: { '@path': '$.traits.country' },
203206
else: { '@path': '$.properties.country' }
204-
}
207+
}
205208
},
206-
postal_code: {
209+
postal_code: {
207210
'@if': {
208211
exists: { '@path': '$.traits.postal_code' },
209212
then: { '@path': '$.traits.postal_code' },
210213
else: { '@path': '$.properties.postal_code' }
211-
}
214+
}
212215
}
213216
}
214217
},
@@ -253,7 +256,7 @@ export const fields: Record<string, InputField> = {
253256
batch_size: {
254257
type: 'number',
255258
label: 'Max batch size',
256-
description: 'The maximum number of events to batch when sending data to Reddit.',
259+
description: 'The maximum number of events to batch when sending data to SendGrid.',
257260
unsafe_hidden: true,
258261
required: false,
259262
default: MAX_BATCH_SIZE

0 commit comments

Comments
 (0)