Skip to content

Commit d7d3408

Browse files
committed
_
1 parent 4a6b315 commit d7d3408

File tree

4 files changed

+31
-31
lines changed

4 files changed

+31
-31
lines changed

dataconnect-sdk/js/default-connector/esm/index.esm.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ export const connectorConfig = {
66
location: 'us-central1'
77
};
88

9-
export function listMoviesRef(dc) {
10-
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
9+
export function createMovieRef(dcOrVars, vars) {
10+
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
1111
if('_useGeneratedSdk' in dcInstance) {
1212
dcInstance._useGeneratedSdk();
1313
} else {
1414
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
1515
}
16-
return queryRef(dcInstance, 'ListMovies');
16+
return mutationRef(dcInstance, 'CreateMovie', inputVars);
1717
}
18-
export function listMovies(dc) {
19-
return executeQuery(listMoviesRef(dc));
18+
export function createMovie(dcOrVars, vars) {
19+
return executeMutation(createMovieRef(dcOrVars, vars));
2020
}
21-
export function createMovieRef(dcOrVars, vars) {
22-
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
21+
export function listMoviesRef(dc) {
22+
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
2323
if('_useGeneratedSdk' in dcInstance) {
2424
dcInstance._useGeneratedSdk();
2525
} else {
2626
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
2727
}
28-
return mutationRef(dcInstance, 'CreateMovie', inputVars);
28+
return queryRef(dcInstance, 'ListMovies');
2929
}
30-
export function createMovie(dcOrVars, vars) {
31-
return executeMutation(createMovieRef(dcOrVars, vars));
30+
export function listMovies(dc) {
31+
return executeQuery(listMoviesRef(dc));
3232
}

dataconnect-sdk/js/default-connector/index.cjs.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@ const connectorConfig = {
77
};
88
exports.connectorConfig = connectorConfig;
99

10-
function listMoviesRef(dc) {
11-
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
10+
function createMovieRef(dcOrVars, vars) {
11+
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
1212
if('_useGeneratedSdk' in dcInstance) {
1313
dcInstance._useGeneratedSdk();
1414
} else {
1515
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
1616
}
17-
return queryRef(dcInstance, 'ListMovies');
17+
return mutationRef(dcInstance, 'CreateMovie', inputVars);
1818
}
19-
exports.listMoviesRef = listMoviesRef;
20-
exports.listMovies = function listMovies(dc) {
21-
return executeQuery(listMoviesRef(dc));
19+
exports.createMovieRef = createMovieRef;
20+
exports.createMovie = function createMovie(dcOrVars, vars) {
21+
return executeMutation(createMovieRef(dcOrVars, vars));
2222
};
2323

24-
function createMovieRef(dcOrVars, vars) {
25-
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
24+
function listMoviesRef(dc) {
25+
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
2626
if('_useGeneratedSdk' in dcInstance) {
2727
dcInstance._useGeneratedSdk();
2828
} else {
2929
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
3030
}
31-
return mutationRef(dcInstance, 'CreateMovie', inputVars);
31+
return queryRef(dcInstance, 'ListMovies');
3232
}
33-
exports.createMovieRef = createMovieRef;
34-
exports.createMovie = function createMovie(dcOrVars, vars) {
35-
return executeMutation(createMovieRef(dcOrVars, vars));
33+
exports.listMoviesRef = listMoviesRef;
34+
exports.listMovies = function listMovies(dc) {
35+
return executeQuery(listMoviesRef(dc));
3636
};
3737

dataconnect-sdk/js/default-connector/index.d.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ export interface Movie_Key {
4242

4343

4444

45-
/* Allow users to create refs without passing in DataConnect */
46-
export function listMoviesRef(): QueryRef<ListMoviesData, undefined>;/* Allow users to pass in custom DataConnect instances */
47-
export function listMoviesRef(dc: DataConnect): QueryRef<ListMoviesData,undefined>;
48-
49-
export function listMovies(): QueryPromise<ListMoviesData, undefined>;
50-
export function listMovies(dc: DataConnect): QueryPromise<ListMoviesData,undefined>;
51-
52-
5345
/* Allow users to create refs without passing in DataConnect */
5446
export function createMovieRef(vars: CreateMovieVariables): MutationRef<CreateMovieData, CreateMovieVariables>;
5547
/* Allow users to pass in custom DataConnect instances */
@@ -59,3 +51,11 @@ export function createMovie(vars: CreateMovieVariables): MutationPromise<CreateM
5951
export function createMovie(dc: DataConnect, vars: CreateMovieVariables): MutationPromise<CreateMovieData,CreateMovieVariables>;
6052

6153

54+
/* Allow users to create refs without passing in DataConnect */
55+
export function listMoviesRef(): QueryRef<ListMoviesData, undefined>;/* Allow users to pass in custom DataConnect instances */
56+
export function listMoviesRef(dc: DataConnect): QueryRef<ListMoviesData,undefined>;
57+
58+
export function listMovies(): QueryPromise<ListMoviesData, undefined>;
59+
export function listMovies(dc: DataConnect): QueryPromise<ListMoviesData,undefined>;
60+
61+

dataconnect-sdk/js/default-connector/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
"./package.json": "./package.json"
2121
},
2222
"peerDependencies": {
23-
"firebase": "^10.14.0"
23+
"firebase": "^10.14.0 || ^11.0.0"
2424
}
2525
}

0 commit comments

Comments
 (0)