-
Notifications
You must be signed in to change notification settings - Fork 292
destination-upgrade-analyzer: extract out API versions from code (batch 1) #3431
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
abhandage
wants to merge
1
commit into
main
Choose a base branch
from
batch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 4 additions & 3 deletions
7
packages/destination-actions/src/destinations/aampe/constants.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -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}/` |
4 changes: 4 additions & 0 deletions
4
packages/destination-actions/src/destinations/aampe/versioning-info.ts
This file contains hidden or 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,4 @@ | ||
| /** AAMPE_API_VERSION | ||
| * Endpoint: /{region}/v1/ | ||
| */ | ||
| export const AAMPE_API_VERSION = 'v1' |
This file contains hidden or 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: 4 additions & 0 deletions
4
packages/destination-actions/src/destinations/aggregations-io/versioning-info.ts
This file contains hidden or 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,4 @@ | ||
| /** AGGREGATIONS_IO_API_VERSION | ||
| * Endpoint: /api/v1 | ||
| */ | ||
| export const AGGREGATIONS_IO_API_VERSION = 'v1' |
This file contains hidden or 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
This file contains hidden or 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: 4 additions & 0 deletions
4
packages/destination-actions/src/destinations/ambee/versioning-info.ts
This file contains hidden or 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,4 @@ | ||
| /** AMBEE_API_VERSION | ||
| * Endpoint: /v1/* | ||
| */ | ||
| export const AMBEE_API_VERSION = 'v1' |
16 changes: 9 additions & 7 deletions
16
packages/destination-actions/src/destinations/angler-ai/routes.ts
This file contains hidden or 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 |
|---|---|---|
| @@ -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` | ||
| } |
4 changes: 4 additions & 0 deletions
4
packages/destination-actions/src/destinations/angler-ai/versioning-info.ts
This file contains hidden or 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,4 @@ | ||
| /** ANGLER_AI_API_VERSION | ||
| * Endpoint: /v1/* | ||
| */ | ||
| export const ANGLER_AI_API_VERSION = 'v1' |
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
| @@ -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', | ||
|
|
@@ -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: { | ||
|
|
@@ -98,10 +99,10 @@ const action: ActionDefinition<Settings, Payload> = { | |
| '@path': '$.traits.mobile_phone' | ||
| } | ||
| } | ||
| }, | ||
| } | ||
|
Comment on lines
100
to
+102
|
||
| }, | ||
| 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', | ||
|
|
||
4 changes: 4 additions & 0 deletions
4
packages/destination-actions/src/destinations/antavo/versioning-info.ts
This file contains hidden or 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,4 @@ | ||
| /** ANTAVO_API_VERSION | ||
| * Endpoint: /v1/* | ||
| */ | ||
| export const ANTAVO_API_VERSION = 'v1' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.