-
Notifications
You must be signed in to change notification settings - Fork 898
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
79 changed files
with
4,723 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"firebase": minor | ||
"@firebase/app": patch | ||
"@firebase/data-connect": minor | ||
--- | ||
|
||
Included Data Connect product. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,234 @@ | ||
## API Report File for "@firebase/data-connect" | ||
|
||
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
```ts | ||
|
||
import { AppCheckInternalComponentName } from '@firebase/app-check-interop-types'; | ||
import { FirebaseApp } from '@firebase/app'; | ||
import { FirebaseAuthInternalName } from '@firebase/auth-interop-types'; | ||
import { FirebaseError } from '@firebase/util'; | ||
import { LogLevelString } from '@firebase/logger'; | ||
import { Provider } from '@firebase/component'; | ||
|
||
// @public (undocumented) | ||
export interface CancellableOperation<T> extends PromiseLike<{ | ||
data: T; | ||
}> { | ||
// (undocumented) | ||
cancel: () => void; | ||
} | ||
|
||
// @public | ||
export function connectDataConnectEmulator(dc: DataConnect, host: string, port?: number, sslEnabled?: boolean): void; | ||
|
||
// @public | ||
export interface ConnectorConfig { | ||
// (undocumented) | ||
connector: string; | ||
// (undocumented) | ||
location: string; | ||
// (undocumented) | ||
service: string; | ||
} | ||
|
||
// @public | ||
export class DataConnect { | ||
constructor(app: FirebaseApp, dataConnectOptions: DataConnectOptions, _authProvider: Provider<FirebaseAuthInternalName>, _appCheckProvider: Provider<AppCheckInternalComponentName>); | ||
// (undocumented) | ||
readonly app: FirebaseApp; | ||
// (undocumented) | ||
enableEmulator(transportOptions: TransportOptions): void; | ||
// (undocumented) | ||
getSettings(): ConnectorConfig; | ||
// (undocumented) | ||
isEmulator: boolean; | ||
// (undocumented) | ||
setInitialized(): void; | ||
} | ||
|
||
// @public | ||
export interface DataConnectOptions extends ConnectorConfig { | ||
// (undocumented) | ||
projectId: string; | ||
} | ||
|
||
// @public (undocumented) | ||
export interface DataConnectResult<Data, Variables> extends OpResult<Data> { | ||
// (undocumented) | ||
ref: OperationRef<Data, Variables>; | ||
} | ||
|
||
// @public | ||
export interface DataConnectSubscription<Data, Variables> { | ||
// (undocumented) | ||
errCallback?: (e?: FirebaseError) => void; | ||
// (undocumented) | ||
unsubscribe: () => void; | ||
// (undocumented) | ||
userCallback: OnResultSubscription<Data, Variables>; | ||
} | ||
|
||
// @public (undocumented) | ||
export type DataSource = typeof SOURCE_CACHE | typeof SOURCE_SERVER; | ||
|
||
// @public | ||
export function executeMutation<Data, Variables>(mutationRef: MutationRef<Data, Variables>): MutationPromise<Data, Variables>; | ||
|
||
// @public | ||
export function executeQuery<Data, Variables>(queryRef: QueryRef<Data, Variables>): QueryPromise<Data, Variables>; | ||
|
||
// @public | ||
export function getDataConnect(options: ConnectorConfig): DataConnect; | ||
|
||
// @public | ||
export function getDataConnect(app: FirebaseApp, options: ConnectorConfig): DataConnect; | ||
|
||
// @public (undocumented) | ||
export const MUTATION_STR = "mutation"; | ||
|
||
// @public | ||
export interface MutationPromise<Data, Variables> extends PromiseLike<MutationResult<Data, Variables>> { | ||
} | ||
|
||
// @public (undocumented) | ||
export interface MutationRef<Data, Variables> extends OperationRef<Data, Variables> { | ||
// (undocumented) | ||
refType: typeof MUTATION_STR; | ||
} | ||
|
||
// @public | ||
export function mutationRef<Data>(dcInstance: DataConnect, mutationName: string): MutationRef<Data, undefined>; | ||
|
||
// @public (undocumented) | ||
export function mutationRef<Data, Variables>(dcInstance: DataConnect, mutationName: string, variables: Variables): MutationRef<Data, Variables>; | ||
|
||
// @public | ||
export interface MutationResult<Data, Variables> extends DataConnectResult<Data, Variables> { | ||
// (undocumented) | ||
ref: MutationRef<Data, Variables>; | ||
} | ||
|
||
// @public | ||
export type OnCompleteSubscription = () => void; | ||
|
||
// @public | ||
export type OnErrorSubscription = (err?: FirebaseError) => void; | ||
|
||
// @public | ||
export type OnResultSubscription<Data, Variables> = (res: QueryResult<Data, Variables>) => void; | ||
|
||
// @public (undocumented) | ||
export interface OperationRef<_Data, Variables> { | ||
// (undocumented) | ||
dataConnect: DataConnect; | ||
// (undocumented) | ||
name: string; | ||
// (undocumented) | ||
refType: ReferenceType; | ||
// (undocumented) | ||
variables: Variables; | ||
} | ||
|
||
// @public (undocumented) | ||
export interface OpResult<Data> { | ||
// (undocumented) | ||
data: Data; | ||
// (undocumented) | ||
fetchTime: string; | ||
// (undocumented) | ||
source: DataSource; | ||
} | ||
|
||
// @public (undocumented) | ||
export const QUERY_STR = "query"; | ||
|
||
// @public | ||
export interface QueryPromise<Data, Variables> extends PromiseLike<QueryResult<Data, Variables>> { | ||
} | ||
|
||
// @public | ||
export interface QueryRef<Data, Variables> extends OperationRef<Data, Variables> { | ||
// (undocumented) | ||
refType: typeof QUERY_STR; | ||
} | ||
|
||
// @public | ||
export function queryRef<Data>(dcInstance: DataConnect, queryName: string): QueryRef<Data, undefined>; | ||
|
||
// @public | ||
export function queryRef<Data, Variables>(dcInstance: DataConnect, queryName: string, variables: Variables): QueryRef<Data, Variables>; | ||
|
||
// @public | ||
export interface QueryResult<Data, Variables> extends DataConnectResult<Data, Variables> { | ||
// (undocumented) | ||
ref: QueryRef<Data, Variables>; | ||
// (undocumented) | ||
toJSON: () => SerializedRef<Data, Variables>; | ||
} | ||
|
||
// @public | ||
export type QueryUnsubscribe = () => void; | ||
|
||
// @public (undocumented) | ||
export type ReferenceType = typeof QUERY_STR | typeof MUTATION_STR; | ||
|
||
// @public | ||
export interface RefInfo<Variables> { | ||
// (undocumented) | ||
connectorConfig: DataConnectOptions; | ||
// (undocumented) | ||
name: string; | ||
// (undocumented) | ||
variables: Variables; | ||
} | ||
|
||
// @public | ||
export interface SerializedRef<Data, Variables> extends OpResult<Data> { | ||
// (undocumented) | ||
refInfo: RefInfo<Variables>; | ||
} | ||
|
||
// @public (undocumented) | ||
export function setLogLevel(logLevel: LogLevelString): void; | ||
|
||
// @public (undocumented) | ||
export const SOURCE_CACHE = "CACHE"; | ||
|
||
// @public (undocumented) | ||
export const SOURCE_SERVER = "SERVER"; | ||
|
||
// @public | ||
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, observer: SubscriptionOptions<Data, Variables>): QueryUnsubscribe; | ||
|
||
// @public | ||
export function subscribe<Data, Variables>(queryRefOrSerializedResult: QueryRef<Data, Variables> | SerializedRef<Data, Variables>, onNext: OnResultSubscription<Data, Variables>, onError?: OnErrorSubscription, onComplete?: OnCompleteSubscription): QueryUnsubscribe; | ||
|
||
// @public | ||
export interface SubscriptionOptions<Data, Variables> { | ||
// (undocumented) | ||
onComplete?: OnCompleteSubscription; | ||
// (undocumented) | ||
onErr?: OnErrorSubscription; | ||
// (undocumented) | ||
onNext?: OnResultSubscription<Data, Variables>; | ||
} | ||
|
||
// @public | ||
export function terminate(dataConnect: DataConnect): Promise<void>; | ||
|
||
// @public | ||
export function toQueryRef<Data, Variables>(serializedRef: SerializedRef<Data, Variables>): QueryRef<Data, Variables>; | ||
|
||
// @public | ||
export interface TransportOptions { | ||
// (undocumented) | ||
host: string; | ||
// (undocumented) | ||
port?: number; | ||
// (undocumented) | ||
sslEnabled?: boolean; | ||
} | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -494,5 +494,4 @@ export class WriteBatch { | |
// @public | ||
export function writeBatch(firestore: Firestore): WriteBatch; | ||
|
||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 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. | ||
*/ | ||
|
||
module.exports = { | ||
extends: '../../config/.eslintrc.js', | ||
parserOptions: { | ||
project: 'tsconfig.eslint.json', | ||
// to make vscode-eslint work with monorepo | ||
// https://github.com/typescript-eslint/typescript-eslint/issues/251#issuecomment-463943250 | ||
tsconfigRootDir: __dirname | ||
}, | ||
plugins: ['import'], | ||
ignorePatterns: ['compat/*'], | ||
rules: { | ||
'no-console': ['error', { allow: ['warn', 'error'] }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
varsIgnorePattern: '^_', | ||
args: 'none' | ||
} | ||
], | ||
'import/order': [ | ||
'error', | ||
{ | ||
'groups': [ | ||
'builtin', | ||
'external', | ||
'internal', | ||
'parent', | ||
'sibling', | ||
'index' | ||
], | ||
'newlines-between': 'always', | ||
'alphabetize': { 'order': 'asc', 'caseInsensitive': true } | ||
} | ||
], | ||
'no-restricted-globals': [ | ||
'error', | ||
{ | ||
'name': 'window', | ||
'message': 'Use `PlatformSupport.getPlatform().window` instead.' | ||
}, | ||
{ | ||
'name': 'document', | ||
'message': 'Use `PlatformSupport.getPlatform().document` instead.' | ||
} | ||
] | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*.d.ts'], | ||
rules: { | ||
'camelcase': 'off', | ||
'import/no-duplicates': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off' | ||
} | ||
}, | ||
{ | ||
files: ['**/*.test.ts', '**/test/**/*.ts'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': 'error' | ||
} | ||
}, | ||
{ | ||
files: ['scripts/*.ts'], | ||
rules: { | ||
'import/no-extraneous-dependencies': 'off', | ||
'@typescript-eslint/no-require-imports': 'off' | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
*.tgz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
rollup.config.mjs | ||
package-lock.json | ||
tsconfig.json | ||
src/ |
Oops, something went wrong.