Skip to content

Commit

Permalink
chore(dataconnect): update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanBahati committed Dec 7, 2024
1 parent a1a3811 commit 068ba9e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 30 deletions.
20 changes: 10 additions & 10 deletions dataconnect-sdk/js/default-connector/esm/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ export const connectorConfig = {
location: 'us-central1'
};

export function createMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
export function listMoviesRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
if('_useGeneratedSdk' in dcInstance) {
dcInstance._useGeneratedSdk();
} else {
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
}
return mutationRef(dcInstance, 'CreateMovie', inputVars);
return queryRef(dcInstance, 'ListMovies');
}
export function createMovie(dcOrVars, vars) {
return executeMutation(createMovieRef(dcOrVars, vars));
export function listMovies(dc) {
return executeQuery(listMoviesRef(dc));
}
export function listMoviesRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
export function createMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
if('_useGeneratedSdk' in dcInstance) {
dcInstance._useGeneratedSdk();
} else {
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
}
return queryRef(dcInstance, 'ListMovies');
return mutationRef(dcInstance, 'CreateMovie', inputVars);
}
export function listMovies(dc) {
return executeQuery(listMoviesRef(dc));
export function createMovie(dcOrVars, vars) {
return executeMutation(createMovieRef(dcOrVars, vars));
}
24 changes: 12 additions & 12 deletions dataconnect-sdk/js/default-connector/index.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ const connectorConfig = {
};
exports.connectorConfig = connectorConfig;

function createMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
function listMoviesRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
if('_useGeneratedSdk' in dcInstance) {
dcInstance._useGeneratedSdk();
} else {
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
}
return mutationRef(dcInstance, 'CreateMovie', inputVars);
return queryRef(dcInstance, 'ListMovies');
}
exports.createMovieRef = createMovieRef;
exports.createMovie = function createMovie(dcOrVars, vars) {
return executeMutation(createMovieRef(dcOrVars, vars));
exports.listMoviesRef = listMoviesRef;
exports.listMovies = function listMovies(dc) {
return executeQuery(listMoviesRef(dc));
};

function listMoviesRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
function createMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
if('_useGeneratedSdk' in dcInstance) {
dcInstance._useGeneratedSdk();
} else {
console.error('Please update to the latest version of the Data Connect SDK by running `npm install firebase@dataconnect-preview`.');
}
return queryRef(dcInstance, 'ListMovies');
return mutationRef(dcInstance, 'CreateMovie', inputVars);
}
exports.listMoviesRef = listMoviesRef;
exports.listMovies = function listMovies(dc) {
return executeQuery(listMoviesRef(dc));
exports.createMovieRef = createMovieRef;
exports.createMovie = function createMovie(dcOrVars, vars) {
return executeMutation(createMovieRef(dcOrVars, vars));
};

16 changes: 8 additions & 8 deletions dataconnect-sdk/js/default-connector/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ export interface Movie_Key {



/* Allow users to create refs without passing in DataConnect */
export function listMoviesRef(): QueryRef<ListMoviesData, undefined>;/* Allow users to pass in custom DataConnect instances */
export function listMoviesRef(dc: DataConnect): QueryRef<ListMoviesData,undefined>;

export function listMovies(): QueryPromise<ListMoviesData, undefined>;
export function listMovies(dc: DataConnect): QueryPromise<ListMoviesData,undefined>;


/* Allow users to create refs without passing in DataConnect */
export function createMovieRef(vars: CreateMovieVariables): MutationRef<CreateMovieData, CreateMovieVariables>;
/* Allow users to pass in custom DataConnect instances */
Expand All @@ -51,11 +59,3 @@ export function createMovie(vars: CreateMovieVariables): MutationPromise<CreateM
export function createMovie(dc: DataConnect, vars: CreateMovieVariables): MutationPromise<CreateMovieData,CreateMovieVariables>;


/* Allow users to create refs without passing in DataConnect */
export function listMoviesRef(): QueryRef<ListMoviesData, undefined>;/* Allow users to pass in custom DataConnect instances */
export function listMoviesRef(dc: DataConnect): QueryRef<ListMoviesData,undefined>;

export function listMovies(): QueryPromise<ListMoviesData, undefined>;
export function listMovies(dc: DataConnect): QueryPromise<ListMoviesData,undefined>;


0 comments on commit 068ba9e

Please sign in to comment.