mirror of
https://github.com/hanzoai/firebase-js-sdk.git
synced 2026-09-24 16:59:10 +00:00
94 lines
2.4 KiB
TypeScript
94 lines
2.4 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2026 Google LLC
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import {
|
|
ConnectorConfig,
|
|
DataConnect,
|
|
QueryRef,
|
|
QueryPromise,
|
|
MutationRef,
|
|
MutationPromise
|
|
} from 'firebase/data-connect';
|
|
|
|
export const connectorConfig: ConnectorConfig;
|
|
|
|
export type TimestampString = string;
|
|
export type UUIDString = string;
|
|
export type Int64String = string;
|
|
export type DateString = string;
|
|
|
|
export interface CreateMovieData {
|
|
movie_insert: Movie_Key;
|
|
}
|
|
|
|
export interface CreateMovieVariables {
|
|
title: string;
|
|
genre: string;
|
|
imageUrl: string;
|
|
}
|
|
|
|
export interface ListMoviesData {
|
|
movies: ({
|
|
id: UUIDString;
|
|
title: string;
|
|
imageUrl: string;
|
|
genre?: string | null;
|
|
} & Movie_Key)[];
|
|
}
|
|
|
|
export interface Movie_Key {
|
|
id: UUIDString;
|
|
__typename?: 'Movie_Key';
|
|
}
|
|
|
|
interface CreateMovieRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(vars: CreateMovieVariables): MutationRef<
|
|
CreateMovieData,
|
|
CreateMovieVariables
|
|
>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect, vars: CreateMovieVariables): MutationRef<
|
|
CreateMovieData,
|
|
CreateMovieVariables
|
|
>;
|
|
operationName: string;
|
|
}
|
|
export const createMovieRef: CreateMovieRef;
|
|
|
|
export function createMovie(
|
|
vars: CreateMovieVariables
|
|
): MutationPromise<CreateMovieData, CreateMovieVariables>;
|
|
export function createMovie(
|
|
dc: DataConnect,
|
|
vars: CreateMovieVariables
|
|
): MutationPromise<CreateMovieData, CreateMovieVariables>;
|
|
|
|
interface ListMoviesRef {
|
|
/* Allow users to create refs without passing in DataConnect */
|
|
(): QueryRef<ListMoviesData, undefined>;
|
|
/* Allow users to pass in custom DataConnect instances */
|
|
(dc: DataConnect): QueryRef<ListMoviesData, undefined>;
|
|
operationName: string;
|
|
}
|
|
export const listMoviesRef: ListMoviesRef;
|
|
|
|
export function listMovies(): QueryPromise<ListMoviesData, undefined>;
|
|
export function listMovies(
|
|
dc: DataConnect
|
|
): QueryPromise<ListMoviesData, undefined>;
|