Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
@@ -0,0 +1,4 @@
/** AAMPE_API_VERSION
* Endpoint: /{region}/v1/
*/
export const AAMPE_API_VERSION = 'v1'
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
@@ -0,0 +1,4 @@
/** AGGREGATIONS_IO_API_VERSION
* Endpoint: /api/v1
*/
export const AGGREGATIONS_IO_API_VERSION = 'v1'
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
@@ -0,0 +1,4 @@
/** AMBEE_API_VERSION
* Endpoint: /v1/*
*/
export const AMBEE_API_VERSION = 'v1'
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
import { ANGLER_AI_API_VERSION } from './versioning-info'

export const baseURL = 'https://data.getangler.ai'

export const testEndpoint = () => {
return `/v1/me`
return `/${ANGLER_AI_API_VERSION}/me`
}

export const eventsEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/events`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/events`
}

export const ordersEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/data/orders`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/data/orders`
}

export const customersEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/data/customers`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/data/customers`
}

export const lineItemsEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/data/line_items`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/data/line_items`
}

export const productsEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/data/products`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/data/products`
}

export const privacyEndpoint = (workspaceId: string) => {
return `/v1/workspaces/${workspaceId}/privacy/redact`
return `/${ANGLER_AI_API_VERSION}/workspaces/${workspaceId}/privacy/redact`
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** ANGLER_AI_API_VERSION
* Endpoint: /v1/*
*/
export const ANGLER_AI_API_VERSION = 'v1'
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 { ANTAVO_API_VERSION } from '../versioning-info'

const action: ActionDefinition<Settings, Payload> = {
title: 'Loyalty events',
Expand Down Expand Up @@ -36,7 +37,7 @@ const action: ActionDefinition<Settings, Payload> = {
}
},
perform: (request, data) => {
const url = `https://api.${data.settings.stack}.antavo.com/v1/webhook/segment`
const url = `https://api.${data.settings.stack}.antavo.com/${ANTAVO_API_VERSION}/webhook/segment`
const payload = {
...data.payload,
api_key: data.settings.api_key
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 { ANTAVO_API_VERSION } from '../versioning-info'

const action: ActionDefinition<Settings, Payload> = {
title: 'Profile updates',
Expand Down Expand Up @@ -33,44 +34,44 @@ const action: ActionDefinition<Settings, Payload> = {
properties: {
first_name: {
label: 'First name',
description: 'Customer\'s first name',
description: "Customer's first name",
type: 'string'
},
last_name: {
label: 'Last name',
description: 'Customer\'s last name',
description: "Customer's last name",
type: 'string'
},
email: {
label: 'Email',
description: 'Customer\'s email address',
description: "Customer's email address",
type: 'string'
},
birth_date: {
label: 'Birthdate',
description: 'Customer\'s birth date',
description: "Customer's birth date",
type: 'string'
},
gender: {
label: 'Gender',
description: 'Customer\'s gender',
description: "Customer's gender",
type: 'string'
},
language: {
label: 'Language',
description: 'Customer\'s language',
description: "Customer's language",
type: 'string'
},
phone: {
label: 'Phone',
description: 'Customer\'s phone number',
description: "Customer's phone number",
type: 'string'
},
mobile_phone: {
label: 'Mobile phone',
description: 'Customer\'s mobile phone number',
description: "Customer's mobile phone number",
type: 'string'
},
}
},
default: {
first_name: {
Expand Down Expand Up @@ -98,10 +99,10 @@ const action: ActionDefinition<Settings, Payload> = {
'@path': '$.traits.mobile_phone'
}
}
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Removed trailing comma after the data field's default object, which is inconsistent with the codebase's typical formatting that includes trailing commas.

Suggested change
}
},

Copilot uses AI. Check for mistakes.
},
}
Comment on lines 100 to +102
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Removed trailing comma after the 'mobile_phone' property definition, which is inconsistent with JavaScript/TypeScript conventions that typically include trailing commas for better version control diffs.

Copilot uses AI. Check for mistakes.
},
perform: (request, data) => {
const url = `https://api.${data.settings.stack}.antavo.com/v1/webhook/segment`
const url = `https://api.${data.settings.stack}.antavo.com/${ANTAVO_API_VERSION}/webhook/segment`
const payload = {
...data.payload,
action: 'profile',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** ANTAVO_API_VERSION
* Endpoint: /v1/*
*/
export const ANTAVO_API_VERSION = 'v1'
Loading