Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
HassanBahati committed Dec 17, 2024
1 parent 522217e commit 5d91f04
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 157 deletions.
Binary file added .DS_Store
Binary file not shown.
6 changes: 0 additions & 6 deletions react/firebase-dataconnect-movies/.env

This file was deleted.

6 changes: 6 additions & 0 deletions react/firebase-dataconnect-movies/.env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VITE_FIREBASE_API_KEY="your-firebase-apiKey"
VITE_FIREBASE_AUTH_DOMAIN="your-firebase-authDomain"
VITE_FIREBASE_PROJECT_ID="your-firebase-projectId"
VITE_FIREBASE_STORAGE_BUCKET="your-firebase-storageBucket"
VITE_FIREBASE_MESSAGING_SENDER_ID="your-firebase-messagingSenderId"
VITE_FIREBASE_APP_ID="your-firebase-appId"
7 changes: 4 additions & 3 deletions react/firebase-dataconnect-movies/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ dist
dist-ssr
*.local

.env
.env.local
.firebase

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand All @@ -22,6 +26,3 @@ dist-ssr
*.njsproj
*.sln
*.sw?

.env
.firebase
Original file line number Diff line number Diff line change
Expand Up @@ -6,123 +6,123 @@ 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 upsertUserRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
export function listUsersRef(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, 'UpsertUser', inputVars);
return queryRef(dcInstance, 'ListUsers');
}
export function upsertUser(dcOrVars, vars) {
return executeMutation(upsertUserRef(dcOrVars, vars));
export function listUsers(dc) {
return executeQuery(listUsersRef(dc));
}
export function deleteMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
export function listUserReviewsRef(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, 'DeleteMovie', inputVars);
return queryRef(dcInstance, 'ListUserReviews');
}
export function deleteMovie(dcOrVars, vars) {
return executeMutation(deleteMovieRef(dcOrVars, vars));
export function listUserReviews(dc) {
return executeQuery(listUserReviewsRef(dc));
}
export function addReviewRef(dcOrVars, vars) {
export function getMovieByIdRef(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 mutationRef(dcInstance, 'AddReview', inputVars);
return queryRef(dcInstance, 'GetMovieById', inputVars);
}
export function addReview(dcOrVars, vars) {
return executeMutation(addReviewRef(dcOrVars, vars));
export function getMovieById(dcOrVars, vars) {
return executeQuery(getMovieByIdRef(dcOrVars, vars));
}
export function deleteReviewRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
export function searchMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars);
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, 'DeleteReview', inputVars);
return queryRef(dcInstance, 'SearchMovie', inputVars);
}
export function deleteReview(dcOrVars, vars) {
return executeMutation(deleteReviewRef(dcOrVars, vars));
export function searchMovie(dcOrVars, vars) {
return executeQuery(searchMovieRef(dcOrVars, vars));
}
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));
}
export function listUsersRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
export function upsertUserRef(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, 'ListUsers');
return mutationRef(dcInstance, 'UpsertUser', inputVars);
}
export function listUsers(dc) {
return executeQuery(listUsersRef(dc));
export function upsertUser(dcOrVars, vars) {
return executeMutation(upsertUserRef(dcOrVars, vars));
}
export function listUserReviewsRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
export function deleteMovieRef(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, 'ListUserReviews');
return mutationRef(dcInstance, 'DeleteMovie', inputVars);
}
export function listUserReviews(dc) {
return executeQuery(listUserReviewsRef(dc));
export function deleteMovie(dcOrVars, vars) {
return executeMutation(deleteMovieRef(dcOrVars, vars));
}
export function getMovieByIdRef(dcOrVars, vars) {
export function addReviewRef(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, 'GetMovieById', inputVars);
return mutationRef(dcInstance, 'AddReview', inputVars);
}
export function getMovieById(dcOrVars, vars) {
return executeQuery(getMovieByIdRef(dcOrVars, vars));
export function addReview(dcOrVars, vars) {
return executeMutation(addReviewRef(dcOrVars, vars));
}
export function searchMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars);
export function deleteReviewRef(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, 'SearchMovie', inputVars);
return mutationRef(dcInstance, 'DeleteReview', inputVars);
}
export function searchMovie(dcOrVars, vars) {
return executeQuery(searchMovieRef(dcOrVars, vars));
export function deleteReview(dcOrVars, vars) {
return executeMutation(deleteReviewRef(dcOrVars, vars));
}
Loading

0 comments on commit 5d91f04

Please sign in to comment.