Skip to content

Commit 93c2f13

Browse files
markzegarelliKakeJopulskytcgilbertbcaudilloslavivanov
authored
20230621 one off (#4916)
* Iterable (Action) Destination Documentation (#4868) * Creates Iterable Action Destination Docs Adds documentation for Iterable's new Action destination * Remove comment block * Adds add'l info on project types and user creation * edits * Add metadata * Revert "Add metadata" This reverts commit 5125ca7. * remove 'private' frontmatter * metadata update --------- Co-authored-by: markzegarelli <[email protected]> Co-authored-by: Thomas Gilbert <[email protected]> * remove and filter demo sources (#4914) * Update Server link to GitHub repo * Removed link to Server * Publish Encharge docs * Updated link to Totango repository * edits * slug override, rename folder to match app redirect * remove duplicate folder * remove and filter demo sources --------- Co-authored-by: Brandon Caudillo <[email protected]> Co-authored-by: Slav Ivanov <[email protected]> Co-authored-by: rchinn-segment <[email protected]> Co-authored-by: rchinn-segment <[email protected]> Co-authored-by: forstisabella <[email protected]> * re-add iterable actions private metadata --------- Co-authored-by: Jake Kopulsky <[email protected]> Co-authored-by: Thomas Gilbert <[email protected]> Co-authored-by: Brandon Caudillo <[email protected]> Co-authored-by: Slav Ivanov <[email protected]> Co-authored-by: rchinn-segment <[email protected]> Co-authored-by: rchinn-segment <[email protected]> Co-authored-by: forstisabella <[email protected]>
1 parent 94dc675 commit 93c2f13

File tree

39 files changed

+819
-788
lines changed

39 files changed

+819
-788
lines changed

scripts/catalog_papi.js

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ PAPI_URL = "https://api.segmentapis.com"
1313

1414
const regionalSupport = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/regional-support.yml`)))
1515
const slugOverrides = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/catalog/slugs.yml`)))
16-
16+
const testSources = yaml.load(fs.readFileSync(path.resolve(__dirname, `../src/_data/catalog/test_sources.yml`)))
1717

1818
const slugify = (displayName, type) => {
1919
let slug = displayName
@@ -27,11 +27,11 @@ const slugify = (displayName, type) => {
2727
let overrides = ""
2828
if (type == "sources") {
2929
overrides = slugOverrides.sources
30-
}
30+
}
3131

3232
if (type == "destinations") {
3333
overrides = slugOverrides.destinations
34-
}
34+
}
3535

3636
for (key in overrides) {
3737
let original = overrides[key].original
@@ -223,6 +223,7 @@ const updateSources = async () => {
223223
let endpoints = ['us']
224224
let mainCategory = source.categories[0] ? source.categories[0].toLowerCase() : ''
225225

226+
226227
// determine the doc url based on the source's main category
227228
if (libraryCategories.includes(mainCategory)) {
228229
url = `connections/sources/catalog/libraries/${mainCategory}/${slug}`
@@ -256,27 +257,37 @@ const updateSources = async () => {
256257
}
257258

258259
// create the catalog metadata
259-
let updatedSource = {
260-
id: source.id,
261-
display_name: source.name,
262-
isCloudEventSource: source.isCloudEventSource,
263-
slug,
264-
url,
265-
hidden: isCatalogItemHidden(url),
266-
regions,
267-
endpoints,
268-
source_type: mainCategory,
269-
description: source.description,
270-
logo: {
271-
url: source.logos.default
272-
},
273-
// mark: {
274-
// url: source.logos.mark
275-
// },
276-
categories: source.categories,
260+
// A lot of test sources are visible in the catalog. We filter them out here.
261+
// If they aren't in the testSources array, we add them to the catalog.
262+
if (testSources.includes(source.id)) {
263+
console.log(`skipped ${source.name}`)
264+
} else {
265+
let updatedSource = {
266+
id: source.id,
267+
display_name: source.name,
268+
isCloudEventSource: source.isCloudEventSource,
269+
slug,
270+
url,
271+
hidden: isCatalogItemHidden(url),
272+
regions,
273+
endpoints,
274+
source_type: mainCategory,
275+
description: source.description,
276+
logo: {
277+
url: source.logos.default
278+
},
279+
// mark: {
280+
// url: source.logos.mark
281+
// },
282+
categories: source.categories,
283+
}
284+
sourcesUpdated.push(updatedSource)
285+
doesCatalogItemExist(updatedSource)
286+
277287
}
278-
sourcesUpdated.push(updatedSource)
279-
doesCatalogItemExist(updatedSource)
288+
289+
290+
280291
source.categories.reduce((s, e) => s.add(e), categories);
281292

282293
let updatedRegional = {

src/_data/catalog/destination_categories.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination categories last updated 2023-06-20
2+
# destination categories last updated 2023-06-21
33
items:
44
- display_name: A/B Testing
55
slug: a-b-testing

src/_data/catalog/destinations.yml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT
2-
# destination data last updated 2023-06-20
2+
# destination data last updated 2023-06-21
33
items:
44
- id: 637e8d185e2dec264895ea89
55
display_name: 1Flow
@@ -2516,7 +2516,7 @@ items:
25162516
hidden: false
25172517
defaultTrigger: type = "track" and event = "Order Completed"
25182518
fields:
2519-
- id: 91zUTx8Pucm4Cx36vTaXuz
2519+
- id: 6Y2Vu5UPTHVsZXL3YgR3Xf
25202520
sortOrder: 0
25212521
fieldKey: products
25222522
label: Product Details
@@ -2532,7 +2532,7 @@ items:
25322532
choices: null
25332533
dynamic: false
25342534
allowNull: false
2535-
- id: 58hrcTBk3W3gUS5Yh68ztH
2535+
- id: oQ6BxMFoVaFqcqtd6DQmhu
25362536
sortOrder: 1
25372537
fieldKey: index
25382538
label: Index
@@ -2546,21 +2546,21 @@ items:
25462546
choices: null
25472547
dynamic: false
25482548
allowNull: false
2549-
- id: 3nyog9c7XbwwNxgxcgM7MP
2549+
- id: sRCJVLPAezqENQ1uBSczSt
25502550
sortOrder: 2
25512551
fieldKey: queryID
25522552
label: Query ID
25532553
type: STRING
2554-
description: Query ID of the list on which the item was clicked.
2554+
description: Query ID of the list on which the item was purchased.
25552555
placeholder: ''
25562556
defaultValue:
25572557
'@path': $.properties.query_id
2558-
required: true
2558+
required: false
25592559
multiple: false
25602560
choices: null
25612561
dynamic: false
25622562
allowNull: false
2563-
- id: nZycyEDG7nRckPuzrwjweq
2563+
- id: 65dKtpwE16SAV4FUTevyJ2
25642564
sortOrder: 3
25652565
fieldKey: userToken
25662566
label: userToken
@@ -2580,7 +2580,7 @@ items:
25802580
choices: null
25812581
dynamic: false
25822582
allowNull: false
2583-
- id: gEwSFGTVnspz8Xihr5UBBt
2583+
- id: 2bL9DMtvdauJxUQXbcggBr
25842584
sortOrder: 4
25852585
fieldKey: timestamp
25862586
label: timestamp
@@ -2604,7 +2604,7 @@ items:
26042604
hidden: false
26052605
defaultTrigger: type = "track" and event = "Product Viewed"
26062606
fields:
2607-
- id: c7x6vKNS1cT7imeGm3z3Ph
2607+
- id: ue928DD4aiQwQ7n3ntySBV
26082608
sortOrder: 0
26092609
fieldKey: objectID
26102610
label: Product ID
@@ -2618,7 +2618,7 @@ items:
26182618
choices: null
26192619
dynamic: false
26202620
allowNull: false
2621-
- id: k2nrW9E8Zs9hv6DUKbFr3d
2621+
- id: ebzXSNhcvM8eo4ppFTG53q
26222622
sortOrder: 1
26232623
fieldKey: index
26242624
label: Index
@@ -2632,21 +2632,21 @@ items:
26322632
choices: null
26332633
dynamic: false
26342634
allowNull: false
2635-
- id: 3DKpaKUwfuGuGLtwLf6Zru
2635+
- id: atNJTs6zkQrwbLdJDVZQbj
26362636
sortOrder: 2
26372637
fieldKey: queryID
26382638
label: Query ID
26392639
type: STRING
2640-
description: Query ID of the list on which the item was clicked.
2640+
description: Query ID of the list on which the item was viewed.
26412641
placeholder: ''
26422642
defaultValue:
26432643
'@path': $.properties.query_id
2644-
required: true
2644+
required: false
26452645
multiple: false
26462646
choices: null
26472647
dynamic: false
26482648
allowNull: false
2649-
- id: 4eeEYryvmcjNgbhsoUejPT
2649+
- id: 2EtPdFjDRN8AeuR4m6u8kV
26502650
sortOrder: 3
26512651
fieldKey: userToken
26522652
label: userToken
@@ -2666,7 +2666,7 @@ items:
26662666
choices: null
26672667
dynamic: false
26682668
allowNull: false
2669-
- id: mS1xrkWjjmdGJctXnQwmyV
2669+
- id: M4Pxu4EpEjQEMn3FpcfSn
26702670
sortOrder: 4
26712671
fieldKey: timestamp
26722672
label: timestamp
@@ -2690,7 +2690,7 @@ items:
26902690
hidden: false
26912691
defaultTrigger: type = "track" and event = "Product Clicked"
26922692
fields:
2693-
- id: iA4e4kYfVNbBBLaUPppeez
2693+
- id: wwUxF1WQeqakzxjdztWX8R
26942694
sortOrder: 0
26952695
fieldKey: objectID
26962696
label: Product ID
@@ -2704,7 +2704,7 @@ items:
27042704
choices: null
27052705
dynamic: false
27062706
allowNull: false
2707-
- id: bmcmTvDGm6PYCT1Cpjxswb
2707+
- id: wum7sucEh48stZaoBevimg
27082708
sortOrder: 1
27092709
fieldKey: index
27102710
label: Index
@@ -2718,7 +2718,7 @@ items:
27182718
choices: null
27192719
dynamic: false
27202720
allowNull: false
2721-
- id: nhSyWXa4cMyry4a8Wwpyzr
2721+
- id: 5nMEd1NDuVF6P85mco737b
27222722
sortOrder: 2
27232723
fieldKey: queryID
27242724
label: Query ID
@@ -2727,12 +2727,12 @@ items:
27272727
placeholder: ''
27282728
defaultValue:
27292729
'@path': $.properties.query_id
2730-
required: true
2730+
required: false
27312731
multiple: false
27322732
choices: null
27332733
dynamic: false
27342734
allowNull: false
2735-
- id: fNicKuYosAWs5dU935H5Uo
2735+
- id: rVgrHxaKfL98dPeF9edDpY
27362736
sortOrder: 3
27372737
fieldKey: position
27382738
label: Position
@@ -2746,7 +2746,7 @@ items:
27462746
choices: null
27472747
dynamic: false
27482748
allowNull: false
2749-
- id: dBiRUY4uyXvZ2cS6CVziyi
2749+
- id: hRMh4bvLEDv9azmeVfW9nY
27502750
sortOrder: 4
27512751
fieldKey: userToken
27522752
label: userToken
@@ -2766,7 +2766,7 @@ items:
27662766
choices: null
27672767
dynamic: false
27682768
allowNull: false
2769-
- id: saNymZv98QNEmSy7KX4iL5
2769+
- id: awRytSEJVirLWncGMPTi45
27702770
sortOrder: 5
27712771
fieldKey: timestamp
27722772
label: timestamp
@@ -2781,15 +2781,17 @@ items:
27812781
dynamic: false
27822782
allowNull: false
27832783
presets:
2784-
- actionId: 63BBDy2TNprpH9uExRJKop
2785-
name: Send product viewed events to Algolia
2784+
- actionId: etbKXm8QsQyQAo83znMszn
2785+
name: Send product clicked events to Algolia
27862786
fields:
27872787
objectID:
27882788
'@path': $.properties.product_id
27892789
index:
27902790
'@path': $.properties.search_index
27912791
queryID:
27922792
'@path': $.properties.query_id
2793+
position:
2794+
'@path': $.properties.position
27932795
userToken:
27942796
'@if':
27952797
exists:
@@ -2800,18 +2802,16 @@ items:
28002802
'@path': $.anonymousId
28012803
timestamp:
28022804
'@path': $.timestamp
2803-
trigger: type = "track" and event = "Product Viewed"
2804-
- actionId: etbKXm8QsQyQAo83znMszn
2805-
name: Send product clicked events to Algolia
2805+
trigger: type = "track" and event = "Product Clicked"
2806+
- actionId: 63BBDy2TNprpH9uExRJKop
2807+
name: Send product viewed events to Algolia
28062808
fields:
28072809
objectID:
28082810
'@path': $.properties.product_id
28092811
index:
28102812
'@path': $.properties.search_index
28112813
queryID:
28122814
'@path': $.properties.query_id
2813-
position:
2814-
'@path': $.properties.position
28152815
userToken:
28162816
'@if':
28172817
exists:
@@ -2822,7 +2822,7 @@ items:
28222822
'@path': $.anonymousId
28232823
timestamp:
28242824
'@path': $.timestamp
2825-
trigger: type = "track" and event = "Product Clicked"
2825+
trigger: type = "track" and event = "Product Viewed"
28262826
- actionId: 2KEUSgKKYG2W82DdaBGsF4
28272827
name: Send conversion events to Algolia
28282828
fields:
@@ -17369,14 +17369,14 @@ items:
1736917369
- id: 642440d46b66b3eeac42b581
1737017370
display_name: Encharge (Actions)
1737117371
name: Encharge (Actions)
17372-
slug: encharge-actions
17373-
hidden: true
17372+
slug: encharge-cloud-actions
17373+
hidden: false
1737417374
endpoints:
1737517375
- US
1737617376
regions:
1737717377
- us-west-2
1737817378
- eu-west-1
17379-
url: connections/destinations/catalog/encharge-actions
17379+
url: connections/destinations/catalog/encharge-cloud-actions
1738017380
previous_names:
1738117381
- Encharge Cloud (Actions)
1738217382
- Encharge (Actions)

0 commit comments

Comments
 (0)