-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathindex.cjs.js
88 lines (71 loc) · 2.99 KB
/
index.cjs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
const { queryRef, executeQuery, mutationRef, executeMutation, validateArgs } = require('firebase/data-connect');
const connectorConfig = {
connector: 'default',
service: 'tanstack-query-firebase',
location: 'us-central1'
};
exports.connectorConfig = connectorConfig;
exports.createMovieRef = function createMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
dcInstance._useGeneratedSdk();
return mutationRef(dcInstance, 'CreateMovie', inputVars);
}
exports.createMovie = function createMovie(dcOrVars, vars) {
return executeMutation(createMovieRef(dcOrVars, vars));
};
exports.upsertMovieRef = function upsertMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
dcInstance._useGeneratedSdk();
return mutationRef(dcInstance, 'UpsertMovie', inputVars);
}
exports.upsertMovie = function upsertMovie(dcOrVars, vars) {
return executeMutation(upsertMovieRef(dcOrVars, vars));
};
exports.deleteMovieRef = function deleteMovieRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
dcInstance._useGeneratedSdk();
return mutationRef(dcInstance, 'DeleteMovie', inputVars);
}
exports.deleteMovie = function deleteMovie(dcOrVars, vars) {
return executeMutation(deleteMovieRef(dcOrVars, vars));
};
exports.addMetaRef = function addMetaRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
dcInstance._useGeneratedSdk();
return mutationRef(dcInstance, 'AddMeta');
}
exports.addMeta = function addMeta(dc) {
return executeMutation(addMetaRef(dc));
};
exports.deleteMetaRef = function deleteMetaRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
dcInstance._useGeneratedSdk();
return mutationRef(dcInstance, 'DeleteMeta', inputVars);
}
exports.deleteMeta = function deleteMeta(dcOrVars, vars) {
return executeMutation(deleteMetaRef(dcOrVars, vars));
};
exports.listMoviesRef = function listMoviesRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
dcInstance._useGeneratedSdk();
return queryRef(dcInstance, 'ListMovies');
}
exports.listMovies = function listMovies(dc) {
return executeQuery(listMoviesRef(dc));
};
exports.getMovieByIdRef = function getMovieByIdRef(dcOrVars, vars) {
const { dc: dcInstance, vars: inputVars} = validateArgs(connectorConfig, dcOrVars, vars, true);
dcInstance._useGeneratedSdk();
return queryRef(dcInstance, 'GetMovieById', inputVars);
}
exports.getMovieById = function getMovieById(dcOrVars, vars) {
return executeQuery(getMovieByIdRef(dcOrVars, vars));
};
exports.getMetaRef = function getMetaRef(dc) {
const { dc: dcInstance} = validateArgs(connectorConfig, dc, undefined);
dcInstance._useGeneratedSdk();
return queryRef(dcInstance, 'GetMeta');
}
exports.getMeta = function getMeta(dc) {
return executeQuery(getMetaRef(dc));
};