Skip to content

Commit b8eb32b

Browse files
authored
Merge pull request #6915 from segmentio/thomas/betatags-partnerowned
Remove beta tags frontmatter and and autopopulate partner owned for sources
2 parents f552619 + fa724c2 commit b8eb32b

File tree

165 files changed

+88
-247
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+88
-247
lines changed

scripts/catalog/updateSources.js

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,28 @@ const PAPI_URL = "https://api.segmentapis.com";
1414

1515
const regionalSupport = yaml.load(fs.readFileSync(path.resolve(__dirname, `../../src/_data/regional-support.yml`)));
1616

17-
// This file keeps a list of known test sources that show up in the system.
17+
// This file keeps a list of known test sources that show up in the system.
1818
// Because we don't have a status value for sources, they end up showing in our catalog.
1919
// We use this below to prevent them from being written to yaml.
2020
const testSources = yaml.load(fs.readFileSync(path.resolve(__dirname, `../../src/_data/catalog/test_sources.yml`)));
2121

2222

2323
const updateSources = async () => {
24-
let sources = []; // Initialize an empty array to hold all sources
25-
let sourcesUpdated = []; // Initialize an empty array to hold all sources that have been updated
26-
let regionalSourcesUpdated = []; // Initialize an empty array to hold updated source regional information
27-
let nextPageToken = "MA=="; // Set the initial page token to the first page
28-
let categories = new Set(); // Initialize an empty set to hold all categories
29-
let sourceCategories = []; // Initialize an empty array to hold all source categories
30-
31-
24+
let sources = []; // Initialize an empty array to hold all sources
25+
let sourcesUpdated = []; // Initialize an empty array to hold all sources that have been updated
26+
let regionalSourcesUpdated = []; // Initialize an empty array to hold updated source regional information
27+
let nextPageToken = "MA=="; // Set the initial page token to the first page
28+
let categories = new Set(); // Initialize an empty set to hold all categories
29+
let sourceCategories = []; // Initialize an empty array to hold all source categories
30+
31+
3232
// Get all sources from the catalog
3333
while (nextPageToken !== undefined) {
3434
const res = await getCatalog(`${PAPI_URL}/catalog/sources/`, nextPageToken);
3535
sources = sources.concat(res.data.sourcesCatalog);
3636
nextPageToken = res.data.pagination.next;
3737
}
38-
38+
3939
// Sort the sources alphabetically
4040
sources.sort((a, b) => {
4141
if (a.name.toLowerCase() < b.name.toLowerCase()) {
@@ -46,7 +46,7 @@ const updateSources = async () => {
4646
}
4747
return 0;
4848
});
49-
49+
5050
// Set the list of categories for libraries
5151
const libraryCategories = [
5252
'server',
@@ -55,20 +55,20 @@ const updateSources = async () => {
5555
'roku',
5656
'website'
5757
];
58-
58+
5959
// Here, define some sources that are real, but that we want to hide.
6060
const hiddenSources = [
6161
'amp',
6262
'factual-engine',
6363
'twilio-event-streams-beta',
6464
'ibm-watson-assistant'
6565
];
66-
66+
6767
// More regional stuff
6868
const regionalSourceEndpoint = regionalSupport.sources.endpoint;
6969
const regionalSourceRegion = regionalSupport.sources.region;
70-
71-
70+
71+
7272
// Loop through all sources and create a new object with the data we want
7373
sources.forEach(source => {
7474
let slug = slugify(source.name, "sources");
@@ -77,14 +77,14 @@ const updateSources = async () => {
7777
let regions = ['us'];
7878
let endpoints = ['us'];
7979
let mainCategory = source.categories[0] ? source.categories[0].toLowerCase() : '';
80-
80+
8181
if (libraryCategories.includes(mainCategory)) {
8282
url = `connections/sources/catalog/libraries/${mainCategory}/${slug}`;
8383
} else {
8484
url = `connections/sources/catalog/cloud-apps/${slug}`;
8585
mainCategory = 'cloud-app';
8686
}
87-
87+
8888
// Sort the settings alphabetically
8989
settings.sort((a, b) => {
9090
if (a.name.toLowerCase() < b.name.toLowerCase()) {
@@ -95,19 +95,19 @@ const updateSources = async () => {
9595
}
9696
return 0;
9797
});
98-
98+
9999
if (hiddenSources.includes(slug)) {
100100
hidden = true;
101101
}
102-
102+
103103
if (regionalSourceEndpoint.includes(slug)) {
104104
endpoints.push('eu');
105105
}
106-
106+
107107
if (regionalSourceRegion.includes(slug)) {
108108
regions.push('eu');
109109
}
110-
110+
111111
// If the source ID is in the list of test sources, skip it.
112112
// If it's not, add it to the list of sources to be written to yaml.
113113
if (testSources.includes(source.id)) {
@@ -128,13 +128,15 @@ const updateSources = async () => {
128128
url: source.logos.default
129129
},
130130
categories: source.categories,
131+
status: source.status,
132+
partnerOwned: source.partnerOwned
131133
};
132134
sourcesUpdated.push(updatedSource);
133135
doesCatalogItemExist(updatedSource);
134136
}
135-
137+
136138
source.categories.reduce((s, e) => s.add(e), categories);
137-
139+
138140
// Sources don't yet have regional information in the Public API, so we write that info here.
139141
let updatedRegional = {
140142
id: source.id,
@@ -147,7 +149,7 @@ const updateSources = async () => {
147149
};
148150
regionalSourcesUpdated.push(updatedRegional);
149151
});
150-
152+
151153
const sourceArray = Array.from(categories);
152154
sourceArray.forEach(category => {
153155
sourceCategories.push({
@@ -164,36 +166,36 @@ const updateSources = async () => {
164166
return 0;
165167
});
166168
});
167-
169+
168170
const options = {
169171
noArrayIndent: false
170172
};
171173
const todayDate = new Date().toISOString().slice(0, 10);
172-
174+
173175
// Create source catalog YAML file
174176
let output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n";
175177
output += "# sources last updated " + todayDate + " \n";
176178
output += yaml.dump({
177179
items: sourcesUpdated
178180
}, options);
179181
fs.writeFileSync(path.resolve(__dirname, `../../src/_data/catalog/sources.yml`), output);
180-
182+
181183
// Create source-category mapping YAML file
182184
output = "# AUTOGENERATED FROM PUBLIC API. DO NOT EDIT\n";
183185
output += "# source categories last updated " + todayDate + " \n";
184186
output += yaml.dump({
185187
items: sourceCategories
186188
}, options);
187189
fs.writeFileSync(path.resolve(__dirname, `../../src/_data/catalog/source_categories.yml`), output);
188-
190+
189191
// Create regional support YAML file
190192
output = yaml.dump({
191193
sources: regionalSourcesUpdated
192194
}, options);
193195
fs.writeFileSync(path.resolve(__dirname, `../../src/_data/catalog/regional-supported.yml`), output);
194-
196+
195197
console.log("sources done");
196198
};
197199

198200

199-
exports.updateSources = updateSources;
201+
exports.updateSources = updateSources;

scripts/catalog/utilities.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,7 @@ const doesCatalogItemExist = (item) => {
133133
let content = `---\ntitle: '${item.display_name} Source'\nhidden: true\n---`;
134134

135135
if (!docsPath.includes('/sources/')) {
136-
let betaFlag = '';
137-
if (item.status === 'PUBLIC_BETA') {
138-
betaFlag = 'beta: true\n';
139-
}
140-
content = `---\ntitle: '${item.display_name} Destination'\nhidden: true\nid: ${item.id}\npublished: false\n${betaFlag}---\n`;
136+
content = `---\ntitle: '${item.display_name} Destination'\nhidden: true\nid: ${item.id}\npublished: false\n`;
141137
}
142138

143139
fs.mkdirSync(docsPath);
@@ -172,4 +168,4 @@ exports.getCatalog = getCatalog;
172168
exports.getConnectionModes = getConnectionModes;
173169
exports.isCatalogItemHidden = isCatalogItemHidden;
174170
exports.sanitize = sanitize;
175-
exports.doesCatalogItemExist = doesCatalogItemExist;
171+
exports.doesCatalogItemExist = doesCatalogItemExist;

src/_data/catalog/beta_sources.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/_includes/content/cloud-app-note.md

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,40 @@
22
{% assign currentIntegration = site.data.catalog.sources.items | where: "slug", currentSlug | first %}
33
{% if currentIntegration.url contains "cloud-apps" or page.path contains "cloud-apps" %}
44
{% if currentIntegration.isCloudEventSource %}
5-
<div class="premonition success"><div class="fa fa-check-square"></div><div class="content"><p class="header">Good to know: Event Cloud source</p>
6-
<p markdown=1>The {{ page.title }} is an **event** source. This means that it sends data as events, which are behaviors or occurrences tied to a user and a point in time. Data from these sources can be loaded into your Segment warehouses, and **also** sent to Segment streaming destinations. [Learn more about cloud sources.](/docs/connections/sources/#cloud-apps)</p>
7-
</div></div>
8-
{% else %}
95

10-
<div class="premonition success"><div class="fa fa-check-square"></div><div class="content"><p class="header">Good to know: Object Cloud source</p><p markdown=1>The {{ page.title }} is an **object** source. This means that it sends information (traits) about a thing that exists and persists over time, such as a person or company, and which can be updated over time. Data from this source can only be exported directly to a warehouse, but it can then be used for further analysis. [Learn more about cloud sources.](/docs/connections/sources/#cloud-apps)</p></div></div>
6+
<div class="quick-info">
7+
<div class="qi-content">
8+
<h6>Source Info</h6>
9+
<ul class="qi">
10+
<li><p markdown=1>The {{ page.title }} is an **Event Cloud** source. This means that it sends data as events, which are behaviors or occurrences tied to a user and a point in time. Data from these sources can be loaded into your Segment warehouses, and **also** sent to Segment streaming destinations. [Learn more about cloud sources.](/docs/connections/sources/#cloud-apps)</p></li>
11+
{% if currentIntegration.status == "PUBLIC_BETA" %}<li>This source is in <span class="release-pill">Beta</span></li>{%endif%}
12+
</ul>
13+
{% if currentIntegration.partnerOwned %}
14+
<h6>Partner Owned</h6>
15+
<ul class="qi">
16+
<li>This integration is partner owned. Please reach out to the partner's support for any issues.</li>
17+
</ul>
18+
{% endif %}
19+
</div>
20+
</div>
21+
22+
{% else %}
23+
<div class="quick-info">
24+
<div class="qi-content">
25+
<h6>Source Info</h6>
26+
<ul class="qi">
27+
<li><p markdown=1>The {{ page.title }} is an **Object Cloud** source. This means that it sends information (traits) about a thing that exists and persists over time, such as a person or company, and which can be updated over time. Data from this source can only be exported directly to a warehouse, but it can then be used for further analysis. [Learn more about cloud sources.](/docs/connections/sources/#cloud-apps)</p></li>
28+
{% if currentIntegration.status == "PUBLIC_BETA" %}<li>This source is in <span class="release-pill">Beta</span></li>{%endif%}
29+
</ul>
30+
{% if currentIntegration.partnerOwned %}
31+
<h6>Partner Owned</h6>
32+
<ul class="qi">
33+
<li>This integration is partner owned. Please reach out to the partner's support for any issues.</li>
34+
</ul>
35+
{% endif %}
36+
</div>
37+
</div>
1138
{% endif %}
1239
{% endif %}
40+
41+

src/connections/destinations/catalog/1flow-mobile-plugin/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 1Flow Mobile Plugin Destination
33
id: 64dd07c1fed86b6866cd93f5
4-
beta: true
54
---
65

76
[1Flow](https://1flow.ai/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank"} is a leading in-app user survey and messaging platform for Mobile app and SaaS businesses.

src/connections/destinations/catalog/ab-tasty-client-side/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
rewrite: true
33
title: AB Tasty Destination
44
id: 6214f1347a49cda426260372
5-
beta: true
65
---
76

87
# AB Tasty Destination

src/connections/destinations/catalog/action-rokt-audiences/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ hide-boilerplate: true
55
hide-dossier: false
66
private: true
77
hidden: true
8-
beta: true
98
id: 643697130067c2f408ff28ca
109
redirect_from:
1110
- "/connections/destinations/catalog/actions-rokt-audiences"
@@ -69,4 +68,4 @@ Your Rokt Audiences (Actions) destination is now ready to receive audiences, and
6968
> warning ""
7069
> You can only connect **one** Engage audience to a single instance of the Rokt Audience (Actions) destination. If you have multiple audiences, repeat the above process to create a new Rokt Audience (Actions) destination and connect the audience to a new destination each time.
7170
72-
{% include components/actions-fields.html %}
71+
{% include components/actions-fields.html %}

src/connections/destinations/catalog/actions-1flow/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: 1Flow Web (Actions) Destination
33
id: 656773f0bd79a3676ab2733d
4-
beta: true
54
---
65

76
{% include content/plan-grid.md name="actions" %}
@@ -47,4 +46,4 @@ The 1Flow destination automatically ingests any user actions tracked over your T
4746
If you are seeing 404 responses in your browser's network tab, you've likely encountered one of two issues:
4847

4948
- You set the wrong App ID on the 1Flow Actions (Web) destination settings page.
50-
- You set the wrong Regional Data Hosting value on the 1Flow Actions (Web) destination settings page. 1Flow gates regional endpoints by plan level, so you may not have access to EU data hosting.
49+
- You set the wrong Regional Data Hosting value on the 1Flow Actions (Web) destination settings page. 1Flow gates regional endpoints by plan level, so you may not have access to EU data hosting.

src/connections/destinations/catalog/actions-aggregations-io/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Aggregations.io (Actions) Destination
33
id: 659eb601f8f615dac18db564
4-
beta: true
54
---
65

76
{% include content/plan-grid.md name="actions" %}
@@ -18,4 +17,4 @@ This destination is maintained by Aggregations.io. For any issues with the desti
1817
4. Select an existing Source to connect to Aggregations.io (Actions).
1918
5. In the destination settings, enter your Aggregations.io API Key and Ingest ID. Your ingestion on the Aggregations.io dashboard should be set up using `Array of JSON Objects` and the API Key requires `Write` permission. For more information, see the [Aggregation.io docs](https://aggregations.io/docs/ingesting-data/create-an-ingest){:target="_blank"}.
2019

21-
{% include components/actions-fields.html %}
20+
{% include components/actions-fields.html %}

src/connections/destinations/catalog/actions-amazon-amc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Amazon Ads DSP and AMC Destination
33
id: 66543798b2fb3cb3e9ff992c
4-
beta: true
54
---
65

76
{% include content/plan-grid.md name="actions" %}

0 commit comments

Comments
 (0)