Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/tricky-actors-exercise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/data-connect': patch
---

Update requests to point to v1 backend endpoints instead of v1beta
2 changes: 1 addition & 1 deletion packages/data-connect/src/util/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function urlBuilder(
'Incorrect type for port passed in!'
);
}
return `${baseUrl}/v1beta/projects/${project}/locations/${location}/services/${service}/connectors/${connector}`;
return `${baseUrl}/v1/projects/${project}/locations/${location}/services/${service}/connectors/${connector}`;
}
export function addToken(url: string, apiKey?: string): string {
if (!apiKey) {
Expand Down
2 changes: 1 addition & 1 deletion packages/data-connect/test/dataconnect/dataconnect.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
specVersion: "v1beta"
specVersion: "v1"
serviceId: "fdc-service"
location: "us-west2"
schema:
Expand Down
4 changes: 2 additions & 2 deletions packages/data-connect/test/unit/gmpid.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ describe('GMPID Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['x-firebase-gmpid']: APPID
Expand All @@ -71,7 +71,7 @@ describe('GMPID Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc2, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['x-firebase-gmpid']: APPID
Expand Down
4 changes: 2 additions & 2 deletions packages/data-connect/test/unit/userAgent.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('User Agent Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION + ' js/gen'
Expand All @@ -66,7 +66,7 @@ describe('User Agent Tests', () => {
// @ts-ignore
await executeQuery(queryRef(dc, '')).catch(() => {});
expect(fakeFetchImpl).to.be.calledWithMatch(
'https://firebasedataconnect.googleapis.com/v1beta/projects/p/locations/l/services/s/connectors/c:executeQuery',
'https://firebasedataconnect.googleapis.com/v1/projects/p/locations/l/services/s/connectors/c:executeQuery',
{
headers: {
['X-Goog-Api-Client']: 'gl-js/ fire/' + SDK_VERSION
Expand Down
Loading