-
Notifications
You must be signed in to change notification settings - Fork 938
Data Connect Product #8480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Data Connect Product #8480
Changes from all commits
Commits
Show all changes
91 commits
Select commit
Hold shift + click to select a range
cc9e33b
Created data-connect package
maneesht 2fbfba2
Added debug logs
maneesht 144e9e4
Added licensing to logger file
maneesht 8581bf0
Updated licensing years
maneesht b8e015c
Removed function from type
maneesht f2a1a4b
Added token to release files
maneesht 4f89ef7
Made data-connect public
maneesht d8cc9ea
Merge remote-tracking branch 'public/master' into dataconnect
maneesht f2ddc3d
Pulled in publish file from vertexai branch
maneesht 42eb5e5
Trigger release
maneesht 323fdc1
Squashed commit of the following:
maneesht ed9123d
Removed emulator provider
maneesht 81ee516
Fixed removal of database emulatortokenprovider
maneesht aa08c92
Addressed comments (#8244)
maneesht 3bf4ab2
0.0.2 release
maneesht 5c04c85
Merge remote-tracking branch 'origin/master' into dataconnect
maneesht 877f8b7
Trigger 0.0.2 real release
maneesht 0427a28
Updated comments
maneesht 388b61c
Updated comments in api report
maneesht 7347e23
Merge remote-tracking branch 'public/master' into dataconnect
maneesht 01ca9df
Updated deps
maneesht ceed056
Began reporting client sdk information (#8271)
maneesht 40bf140
Merge branch 'master' into dataconnect
maneesht 842463d
Modified reporting name (#8283)
maneesht 5eedc9a
Merge branch 'dataconnect' of github.com:Firebase/firebase-js-sdk int…
maneesht 4254b10
Removed unnecessary rtdb changes (#8350)
maneesht 3426039
Validated whether connector information is passed in correctly
maneesht 35b425d
Merge remote-tracking branch 'public/master' into dataconnect
maneesht ebbb191
Updated package.json
maneesht c6d5f3a
Completed app check integration
maneesht 7681448
Added missing files
maneesht 45e969b
Updated formatting
maneesht 7cc2b9c
Added ability to retry unauthorized requests (#8351)
maneesht 92caa93
Fix linting for Data Connect (#8380)
maneesht 608cebf
Better JSON messages (#8379)
maneesht ea5c6fa
Merge branch 'master' into dataconnect
maneesht c060e2e
Updated package.json
maneesht f48864c
Merge branch 'main' into dataconnect
maneesht 6aae5f5
Moved validateArgs to core SDK (#8370)
maneesht e58bf6b
Add logging capability to track whether the user is using Core or Gen…
maneesht d986d4b
0.0.3 release
maneesht 3d880c8
Merge branch 'main' into dataconnect
maneesht 44c0f63
Merge branch 'mtewani/add-appcheck' into dataconnect
maneesht 93e9d8b
Merge branch 'dataconnect' of github.com:Firebase/firebase-js-sdk int…
maneesht 994892c
Fixed appcheck implementation
maneesht 50ef920
Revert "Fixed appcheck implementation"
maneesht 74ad85b
Fixed appcheck implementation
maneesht 5290061
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht 8677c74
Merge remote-tracking branch 'origin/main' into dataconnect
maneesht dc15ecc
Updated formatting
maneesht 0c46097
Updated yarn file
maneesht f45f6b2
Fixed tests
maneesht 4d279f7
Added new docs
maneesht e5e3acd
Fix linter
maneesht 0e8cdfb
Fixed linting
maneesht fb42200
Create cold-chairs-fold.md
maneesht 6660f98
Addressed comments
maneesht 97194ae
Update API reports
maneesht a65a247
Removed unnecessary exports
maneesht af35c2f
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht 1cc1f2a
Updated license years
maneesht f8b5857
removed internal
maneesht cedd651
Replaced minor with major
maneesht 64eff34
Removed auth changes
maneesht 629d70b
Removed repo-scripts changes
maneesht f1c1e64
Made emulator changes more scalable
maneesht 9a5b1b9
Fixed formatting
maneesht 6aabfc4
Removed fetch provider
maneesht 310b235
Removed repo-scripts changes
maneesht 8191859
Updated data connect product
maneesht 86456bd
Update API reports
maneesht b482715
Trigger Build
maneesht f45096e
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht a25716f
Fixed linting issues
maneesht a7b6922
Updated docsite
maneesht 87d8a11
Replaced node-fetch with fetch
maneesht 44fa9c6
Removed runtest
maneesht 57ffcf6
Changed firebase to minor release
maneesht 7273df7
Merge remote-tracking branch 'origin/main' into dataconnect
maneesht c23f54e
FDC: Implement GMPID (#8486)
maneesht ac13c80
Fixed component error
maneesht 13abf2d
FDC: Upgrade to v1beta (#8485)
maneesht a96720a
Excluded data connect
maneesht 54d8e54
Merge branch 'dataconnect' of https://github.com/firebase/firebase-js…
maneesht 51d433c
Removed data connect reference docs
maneesht 24c3c49
Changed data connect to minor
maneesht c7590a1
Fixed formatting
maneesht b4a27c8
Fixed tests
maneesht 5ae1bcc
Addressed comments
maneesht f563ae8
Addressed comments
maneesht 9809b39
Removed unnecessary files
maneesht File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.