Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2e44473
Initial plan
Copilot Nov 14, 2025
66a7ab2
Fix salesforce API_VERSION export for backward compatibility
Copilot Nov 14, 2025
e392940
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
cda80e1
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
a45fdb7
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
ea44753
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
1ea8386
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
fa17bef
Extract API versions to centralized versioning-info.ts
Copilot Nov 14, 2025
c7ca29f
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
1412136
Add 5 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
ad96810
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
1cb513b
Add 6 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
1f24273
Add 5 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
5867bd2
Add 5 more destinations to centralized versioning-info.ts
Copilot Nov 14, 2025
d9246b9
Add 8 more destinations to centralized versioning-info.ts
Copilot Nov 17, 2025
dcefbec
Add 3 more destinations to centralized versioning-info.ts
Copilot Nov 17, 2025
f63fd5a
Add large batch of 13 destinations to centralized versioning-info.ts
Copilot Nov 17, 2025
c0832df
Add 2 more destinations to centralized versioning-info.ts
Copilot Nov 17, 2025
0849050
Fix duplicate constant declarations in versioning-info.ts
Copilot Nov 17, 2025
6982b88
Remove unused constants from versioning-info.ts
Copilot Nov 17, 2025
1d33e4d
Wire up unused constants to destination source code
Copilot Nov 17, 2025
01090ba
add more destinations
abhandage Nov 18, 2025
1908d05
fix errors
abhandage Nov 18, 2025
5baf0da
update
abhandage Nov 18, 2025
2f10ba4
fix tests
abhandage Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ then
brew install gitleaks
fi

yarn lint-staged -c lint-staged.config.js
yarn lint-staged -c lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ActionDefinition } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'
import { ONEPLUSX_API_VERSION } from '../../versioning-info'
import mapValues from 'lodash/mapValues'

const action: ActionDefinition<Settings, Payload> = {
Expand Down Expand Up @@ -60,7 +61,7 @@ const action: ActionDefinition<Settings, Payload> = {
})
// Encoding asset_uri
const encoded_asset_uri = encodeURIComponent(payload.asset_uri)
const endpoint = `https://${settings.client_id}.assets.tagger.opecloud.com/v2/native/asset/${encoded_asset_uri}`
const endpoint = `https://${settings.client_id}.assets.tagger.opecloud.com/${ONEPLUSX_API_VERSION}/native/asset/${encoded_asset_uri}`
return request(endpoint, {
method: 'put',
json: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { ActionDefinition } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'
import mapValues from 'lodash/mapValues'
import { ONEPLUSX_API_VERSION } from '../../versioning-info'

const action: ActionDefinition<Settings, Payload> = {
title: 'Send Event',
Expand Down Expand Up @@ -117,8 +118,8 @@ const action: ActionDefinition<Settings, Payload> = {
})

const endpoint = settings.use_test_endpoint
? `https://tagger-test.opecloud.com/${settings.client_id}/v2/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/v2/native/event`
? `https://tagger-test.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`

return request(endpoint, {
method: 'post',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ActionDefinition } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'
import { ONEPLUSX_API_VERSION } from '../../versioning-info'
import mapValues from 'lodash/mapValues'

const action: ActionDefinition<Settings, Payload> = {
Expand Down Expand Up @@ -115,8 +116,8 @@ const action: ActionDefinition<Settings, Payload> = {
})

const endpoint = settings.use_test_endpoint
? `https://tagger-test.opecloud.com/${settings.client_id}/v2/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/v2/native/event`
? `https://tagger-test.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`

return request(endpoint, {
method: 'post',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { ActionDefinition } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'
import { ONEPLUSX_API_VERSION } from '../../versioning-info'
import mapValues from 'lodash/mapValues'

const action: ActionDefinition<Settings, Payload> = {
Expand Down Expand Up @@ -116,8 +117,8 @@ const action: ActionDefinition<Settings, Payload> = {
})

const endpoint = settings.use_test_endpoint
? `https://tagger-test.opecloud.com/${settings.client_id}/v2/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/v2/native/event`
? `https://tagger-test.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`
: `https://${settings.client_id}.tagger.opecloud.com/${settings.client_id}/${ONEPLUSX_API_VERSION}/native/event`

return request(endpoint, {
method: 'post',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AAMPE_API_VERSION } from '../versioning-info'

export const SingaporeURL = 'https://ingestion-service-asia-southeast1-toqowp62ka-as.a.run.app/v1/'
export const GermanyURL = 'https://ingestion-service-europe-west3-toqowp62ka-ey.a.run.app/v1/'
export const FranceURL = 'https://ingestion-service-europe-west9-toqowp62ka-ey.a.run.app/v1/'
export const SingaporeURL = `https://ingestion-service-asia-southeast1-toqowp62ka-as.a.run.app/${AAMPE_API_VERSION}/`
export const GermanyURL = `https://ingestion-service-europe-west3-toqowp62ka-ey.a.run.app/${AAMPE_API_VERSION}/`
export const FranceURL = `https://ingestion-service-europe-west9-toqowp62ka-ey.a.run.app/${AAMPE_API_VERSION}/`
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nock from 'nock'
import { createTestIntegration, createTestEvent, RetryableError, APIError } from '@segment/actions-core'
import Definition from '../index'
import { PARDOT_API_VERSION } from '../pa-operations'
import { ACTIONS_PARDOT_API_VERSION } from '../../versioning-info'

const testDestination = createTestIntegration(Definition)

Expand Down Expand Up @@ -29,7 +29,9 @@ const sandboxUrl = 'https://pi.demo.pardot.com'
describe('Pardot', () => {
describe('Prospects', () => {
it('should create prospects record', async () => {
nock(`${sandboxUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do`).post('/upsertLatestByEmail').reply(201, {})
nock(`${sandboxUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do`)
.post('/upsertLatestByEmail')
.reply(201, {})

const event = createTestEvent({
type: 'identify',
Expand Down Expand Up @@ -86,7 +88,9 @@ describe('Pardot', () => {
})

it('should create prospects record with default mappings', async () => {
nock(`${baseUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do`).post('/upsertLatestByEmail').reply(201, {})
nock(`${baseUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do`)
.post('/upsertLatestByEmail')
.reply(201, {})

const event = createTestEvent({
type: 'identify',
Expand Down Expand Up @@ -148,7 +152,9 @@ describe('Pardot', () => {
})

it('should create prospects record with custom fields', async () => {
nock(`${baseUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do`).post('/upsertLatestByEmail').reply(201, {})
nock(`${baseUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do`)
.post('/upsertLatestByEmail')
.reply(201, {})

const event = createTestEvent({
type: 'identify',
Expand Down Expand Up @@ -215,7 +221,9 @@ describe('Pardot', () => {
})

it('[duplicate field] should prioritize with custom fields', async () => {
nock(`${baseUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do`).post('/upsertLatestByEmail').reply(201, {})
nock(`${baseUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do`)
.post('/upsertLatestByEmail')
.reply(201, {})

const event = createTestEvent({
type: 'identify',
Expand Down Expand Up @@ -279,7 +287,9 @@ describe('Pardot', () => {
)
})
it('should throw an error for missing required field: email', async () => {
nock(`${baseUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do`).post('/upsertLatestByEmail').reply(201, {})
nock(`${baseUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do`)
.post('/upsertLatestByEmail')
.reply(201, {})

const event = createTestEvent({
type: 'identify',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { RequestClient } from '@segment/actions-core'
import type { Payload as ProspectsPayload } from './prospects/generated-types'
import { ProspectsType } from './pa-type'

export const PARDOT_API_VERSION = 'v5'
import { ACTIONS_PARDOT_API_VERSION } from '../versioning-info'

interface ProspectUpsertResponseData {
id: string
Expand All @@ -24,7 +23,7 @@ export default class Pardot {
const prospect = this.buildProspectJSON(payload)

return this.request<ProspectUpsertResponseData>(
`${this.baseUrl}/api/${PARDOT_API_VERSION}/objects/prospects/do/upsertLatestByEmail`,
`${this.baseUrl}/api/${ACTIONS_PARDOT_API_VERSION}/objects/prospects/do/upsertLatestByEmail`,
{
method: 'post',
headers: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { RequestClient, IntegrationError, APIError } from '@segment/actions-core'
import { StatsContext } from '@segment/actions-core/destination-kit'
import { ADOBE_TARGET_API_VERSION } from '../versioning-info'

function getNestedObjects(obj: { [x: string]: any }, objectPath = '', attributes: { [x: string]: string } = {}) {
// Do not run on null or undefined
Expand Down Expand Up @@ -60,7 +61,7 @@ export default class AdobeTarget {
): Promise<IntegrationError | undefined> => {
try {
await this.request(
`https://${clientCode}.tt.omtrdc.net/rest/v1/profiles/thirdPartyId/${userId}?client=${clientCode}`,
`https://${clientCode}.tt.omtrdc.net/rest/${ADOBE_TARGET_API_VERSION}/profiles/thirdPartyId/${userId}?client=${clientCode}`,
{ method: 'get', skipResponseCloning: true }
)
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { InvalidAuthenticationError } from '@segment/actions-core'
import type { Settings } from './generated-types'
import send from './send'
import { AggregationsAuthError } from './types'
import { AGGREGATIONS_IO_API_VERSION } from '../versioning-info'

const AGGREGATIONS_BASE_URL = `https://app.aggregations.io/api/${AGGREGATIONS_IO_API_VERSION}`

const destination: DestinationDefinition<Settings> = {
name: 'Aggregations.io (Actions)',
Expand All @@ -29,7 +32,7 @@ const destination: DestinationDefinition<Settings> = {
testAuthentication: async (request, { settings }) => {
try {
return await request(
`https://app.aggregations.io/api/v1/organization/ping-w?ingest_id=${settings.ingest_id}&schema=ARRAY_OF_EVENTS`,
`${AGGREGATIONS_BASE_URL}/organization/ping-w?ingest_id=${settings.ingest_id}&schema=ARRAY_OF_EVENTS`,
{
method: 'get',
headers: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { DestinationDefinition, defaultValues } from '@segment/actions-core'
import type { Settings } from './generated-types'
import { AIRSHIP_API_VERSION } from '../versioning-info'

import customEvents from './customEvents'

Expand Down Expand Up @@ -91,7 +92,7 @@ const destination: DestinationDefinition<Settings> = {
headers: {
Authorization: `Bearer ${settings.access_token}`,
'X-UA-Appkey': `${settings.app_key}`,
Accept: 'application/vnd.urbanairship+json; version=3',
Accept: `application/vnd.urbanairship+json; version=${AIRSHIP_API_VERSION}`,
'Content-Type': 'application/json'
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import type { Settings } from './generated-types'
import { ALGOLIA_INSIGHTS_API_VERSION } from '../versioning-info'

export const BaseAlgoliaInsightsURL = 'https://insights.algolia.io'
export const AlgoliaBehaviourURL = BaseAlgoliaInsightsURL + '/1/events'
export const AlgoliaBehaviourURL = BaseAlgoliaInsightsURL + `/${ALGOLIA_INSIGHTS_API_VERSION}/events`
export const algoliaApiPermissionsUrl = (settings: Settings) =>
`https://${settings.appId}.algolia.net/1/keys/${settings.apiKey}`
`https://${settings.appId}.algolia.net/${ALGOLIA_INSIGHTS_API_VERSION}/keys/${settings.apiKey}`

export type AlgoliaEventType = 'view' | 'click' | 'conversion'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { Payload } from './syncAudiencesToDSP/generated-types'
import { AudienceRecord, HashedPIIObject } from './types'
import { CONSTANTS, RecordsResponseType, REGEX_EXTERNALUSERID } from './utils'
import { processHashing } from '../../lib/hashing-utils'
import { AMAZON_AMC_API_VERSION } from '../versioning-info'

export async function processPayload(
request: RequestClient,
Expand All @@ -20,7 +21,7 @@ export async function processPayload(
method: 'POST',
body: payloadString,
headers: {
'Content-Type': 'application/vnd.amcaudiences.v1+json'
'Content-Type': `application/vnd.amcaudiences.${AMAZON_AMC_API_VERSION}+json`
},
timeout: 15000
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
REGEX_AUDIENCEID,
TTL_MAX_VALUE
} from './utils'
import { AMAZON_AMC_AUTH_API_VERSION } from '../versioning-info'

import syncAudiencesToDSP from './syncAudiencesToDSP'

Expand Down Expand Up @@ -44,7 +45,7 @@ const destination: AudienceDestinationDefinition<Settings, AudienceSettings> = {
}

try {
await request<RefreshTokenResponse>(`${settings.region}/v2/profiles`, {
await request<RefreshTokenResponse>(`${settings.region}/${AMAZON_AMC_AUTH_API_VERSION}/profiles`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Region } from './types'
import { defaultValues, InvalidAuthenticationError } from '@segment/actions-core'
import { getAuthToken } from './utils'
import trackConversion from './trackConversion'
import { AMAZON_CONVERSIONS_API_PROFILES_VERSION } from '../versioning-info'

const destination: DestinationDefinition<Settings> = {
name: 'Amazon Conversions Api',
Expand Down Expand Up @@ -40,7 +41,7 @@ const destination: DestinationDefinition<Settings> = {
throw new InvalidAuthenticationError('Please authenticate via Oauth before enabling the destination.')
}

return await request<RefreshTokenResponse>(`${settings.region}/v2/profiles`, {
return await request<RefreshTokenResponse>(`${settings.region}/${AMAZON_CONVERSIONS_API_PROFILES_VERSION}/profiles`, {
method: 'GET',
headers: {
'Content-Type': 'application/json'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import type {
} from '../types'
import { MatchKeyTypeV1, Region, ConversionTypeV2 } from '../types'
import type { Payload } from './generated-types'
import { AMAZON_CONVERSIONS_API_EVENTS_VERSION } from '../../versioning-info'

/**
* Helper function to validate if a string value exists and is not empty
Expand Down Expand Up @@ -142,7 +143,7 @@ export async function sendEventsRequest<ImportConversionEventsResponse>(
// Ensure eventData is always an array
const events = Array.isArray(eventData) ? eventData : [eventData]

return await request<ImportConversionEventsResponse>(`${settings.region}/events/v1`, {
return await request<ImportConversionEventsResponse>(`${settings.region}/events/${AMAZON_CONVERSIONS_API_EVENTS_VERSION}`, {
method: 'POST',
json: {
eventData: events,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import type { DestinationDefinition } from '@segment/actions-core'
import type { Settings } from './generated-types'
import { AMBEE_API_VERSION } from '../versioning-info'

import subscribeUserToCampaign from './subscribeUserToCampaign'

const AMBEE_BASE_URL = `https://segment-api.ambeedata.com/${AMBEE_API_VERSION}`

const destination: DestinationDefinition<Settings> = {
name: 'Ambee (Actions)',
slug: 'actions-ambee',
Expand Down Expand Up @@ -51,7 +54,7 @@ const destination: DestinationDefinition<Settings> = {
}
},
testAuthentication: (request, { settings }) => {
return request('https://segment-api.ambeedata.com/v1/company-info', {
return request(`${AMBEE_BASE_URL}/company-info`, {
method: 'post',
json: settings
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { ActionDefinition, PayloadValidationError } from '@segment/actions-core'
import type { Settings } from '../generated-types'
import type { Payload } from './generated-types'
import { AMBEE_API_VERSION } from '../../versioning-info'

const AMBEE_BASE_URL = `https://segment-api.ambeedata.com/${AMBEE_API_VERSION}`

const action: ActionDefinition<Settings, Payload> = {
title: 'Subscribe to Campaign',
Expand Down Expand Up @@ -87,7 +90,7 @@ const action: ActionDefinition<Settings, Payload> = {
)

if (payload.segmentLibrary)
return request('https://segment-api.ambeedata.com/v1/campaign-info', {
return request(`${AMBEE_BASE_URL}/campaign-info`, {
method: 'post',
json: {
...payload,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { AMPLITUDE_API_VERSION } from '../versioning-info'

export const endpoints = {
batch: {
north_america: 'https://api2.amplitude.com/batch',
europe: 'https://api.eu.amplitude.com/batch'
},
deletions: {
north_america: 'https://amplitude.com/api/2/deletions/users',
europe: 'https://analytics.eu.amplitude.com/api/2/deletions/users'
north_america: `https://amplitude.com/api/${AMPLITUDE_API_VERSION}/deletions/users`,
europe: `https://analytics.eu.amplitude.com/api/${AMPLITUDE_API_VERSION}/deletions/users`
},
httpapi: {
north_america: 'https://api2.amplitude.com/2/httpapi',
europe: 'https://api.eu.amplitude.com/2/httpapi'
north_america: `https://api2.amplitude.com/${AMPLITUDE_API_VERSION}/httpapi`,
europe: `https://api.eu.amplitude.com/${AMPLITUDE_API_VERSION}/httpapi`
},
identify: {
north_america: 'https://api2.amplitude.com/identify',
Expand All @@ -24,8 +26,8 @@ export const endpoints = {
europe: 'https://api.eu.amplitude.com/usermap'
},
usersearch: {
north_america: 'https://amplitude.com/api/2/usersearch',
europe: 'https://analytics.eu.amplitude.com/api/2/usersearch'
north_america: `https://amplitude.com/api/${AMPLITUDE_API_VERSION}/usersearch`,
europe: `https://analytics.eu.amplitude.com/api/${AMPLITUDE_API_VERSION}/usersearch`
}
}

Expand Down
Loading
Loading