@firebase/data-connect 0.3.2 → 0.3.3-canary.0cbff6bc7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +30 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm2017.js +28 -20
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.node.cjs.js +30 -19
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/internal.d.ts +38 -21
- package/dist/node-esm/index.node.esm.js +28 -20
- package/dist/node-esm/index.node.esm.js.map +1 -1
- package/dist/node-esm/src/api/index.d.ts +1 -0
- package/dist/node-esm/src/core/error.d.ts +21 -19
- package/dist/private.d.ts +35 -21
- package/dist/public.d.ts +33 -2
- package/dist/src/api/index.d.ts +1 -0
- package/dist/src/core/error.d.ts +21 -19
- package/package.json +7 -7
package/dist/public.d.ts
CHANGED
|
@@ -24,6 +24,16 @@ export declare const CallerSdkTypeEnum: {
|
|
|
24
24
|
readonly TanstackAngularCore: "TanstackAngularCore";
|
|
25
25
|
readonly GeneratedAngular: "GeneratedAngular";
|
|
26
26
|
};
|
|
27
|
+
export declare type Code = DataConnectErrorCode;
|
|
28
|
+
export declare const Code: {
|
|
29
|
+
OTHER: DataConnectErrorCode;
|
|
30
|
+
ALREADY_INITIALIZED: DataConnectErrorCode;
|
|
31
|
+
NOT_INITIALIZED: DataConnectErrorCode;
|
|
32
|
+
NOT_SUPPORTED: DataConnectErrorCode;
|
|
33
|
+
INVALID_ARGUMENT: DataConnectErrorCode;
|
|
34
|
+
PARTIAL_ERROR: DataConnectErrorCode;
|
|
35
|
+
UNAUTHORIZED: DataConnectErrorCode;
|
|
36
|
+
};
|
|
27
37
|
/**
|
|
28
38
|
* Connect to the DataConnect Emulator
|
|
29
39
|
* @param dc Data Connect instance
|
|
@@ -52,6 +62,27 @@ export declare class DataConnect {
|
|
|
52
62
|
setInitialized(): void;
|
|
53
63
|
enableEmulator(transportOptions: TransportOptions): void;
|
|
54
64
|
}
|
|
65
|
+
/** An error returned by a DataConnect operation. */
|
|
66
|
+
export declare class DataConnectError extends FirebaseError {
|
|
67
|
+
/* Excluded from this release type: name */
|
|
68
|
+
constructor(code: Code, message: string);
|
|
69
|
+
}
|
|
70
|
+
export declare type DataConnectErrorCode = 'other' | 'already-initialized' | 'not-initialized' | 'not-supported' | 'invalid-argument' | 'partial-error' | 'unauthorized';
|
|
71
|
+
/** An error returned by a DataConnect operation. */
|
|
72
|
+
export declare class DataConnectOperationError extends DataConnectError {
|
|
73
|
+
/* Excluded from this release type: name */
|
|
74
|
+
/** The response received from the backend. */
|
|
75
|
+
readonly response: DataConnectOperationFailureResponse;
|
|
76
|
+
private constructor();
|
|
77
|
+
}
|
|
78
|
+
export declare interface DataConnectOperationFailureResponse {
|
|
79
|
+
readonly data?: Record<string, unknown> | null;
|
|
80
|
+
readonly errors: DataConnectOperationFailureResponseErrorInfo[];
|
|
81
|
+
}
|
|
82
|
+
export declare interface DataConnectOperationFailureResponseErrorInfo {
|
|
83
|
+
readonly message: string;
|
|
84
|
+
readonly path: Array<string | number>;
|
|
85
|
+
}
|
|
55
86
|
/**
|
|
56
87
|
* DataConnectOptions including project id
|
|
57
88
|
*/
|
|
@@ -66,7 +97,7 @@ export declare interface DataConnectResult<Data, Variables> extends OpResult<Dat
|
|
|
66
97
|
*/
|
|
67
98
|
export declare interface DataConnectSubscription<Data, Variables> {
|
|
68
99
|
userCallback: OnResultSubscription<Data, Variables>;
|
|
69
|
-
errCallback?: (e?:
|
|
100
|
+
errCallback?: (e?: DataConnectError) => void;
|
|
70
101
|
unsubscribe: () => void;
|
|
71
102
|
}
|
|
72
103
|
/* Excluded from this release type: DataConnectTransport */
|
|
@@ -130,7 +161,7 @@ export declare type OnCompleteSubscription = () => void;
|
|
|
130
161
|
/**
|
|
131
162
|
* Signature for `OnErrorSubscription` for `subscribe`
|
|
132
163
|
*/
|
|
133
|
-
export declare type OnErrorSubscription = (err?:
|
|
164
|
+
export declare type OnErrorSubscription = (err?: DataConnectError) => void;
|
|
134
165
|
/**
|
|
135
166
|
* Signature for `OnResultSubscription` for `subscribe`
|
|
136
167
|
*/
|
package/dist/src/api/index.d.ts
CHANGED
|
@@ -21,3 +21,4 @@ export * from './Mutation';
|
|
|
21
21
|
export * from './query';
|
|
22
22
|
export { setLogLevel } from '../logger';
|
|
23
23
|
export { validateArgs } from '../util/validateArgs';
|
|
24
|
+
export { DataConnectErrorCode, Code, DataConnectError, DataConnectOperationError, DataConnectOperationFailureResponse, DataConnectOperationFailureResponseErrorInfo } from '../core/error';
|
package/dist/src/core/error.d.ts
CHANGED
|
@@ -28,24 +28,26 @@ export declare const Code: {
|
|
|
28
28
|
};
|
|
29
29
|
/** An error returned by a DataConnect operation. */
|
|
30
30
|
export declare class DataConnectError extends FirebaseError {
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
readonly
|
|
31
|
+
/** @internal */
|
|
32
|
+
readonly name: string;
|
|
33
|
+
constructor(code: Code, message: string);
|
|
34
|
+
/** @internal */
|
|
35
|
+
toString(): string;
|
|
36
|
+
}
|
|
37
|
+
/** An error returned by a DataConnect operation. */
|
|
38
|
+
export declare class DataConnectOperationError extends DataConnectError {
|
|
39
|
+
/** @internal */
|
|
40
|
+
readonly name: string;
|
|
41
|
+
/** The response received from the backend. */
|
|
42
|
+
readonly response: DataConnectOperationFailureResponse;
|
|
41
43
|
/** @hideconstructor */
|
|
42
|
-
constructor(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
constructor(message: string, response: DataConnectOperationFailureResponse);
|
|
45
|
+
}
|
|
46
|
+
export interface DataConnectOperationFailureResponse {
|
|
47
|
+
readonly data?: Record<string, unknown> | null;
|
|
48
|
+
readonly errors: DataConnectOperationFailureResponseErrorInfo[];
|
|
49
|
+
}
|
|
50
|
+
export interface DataConnectOperationFailureResponseErrorInfo {
|
|
51
|
+
readonly message: string;
|
|
52
|
+
readonly path: Array<string | number>;
|
|
51
53
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/data-connect",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3-canary.0cbff6bc7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/index.node.cjs.js",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
},
|
|
46
46
|
"license": "Apache-2.0",
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@firebase/app": "0.
|
|
48
|
+
"@firebase/app": "0.11.4-canary.0cbff6bc7"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@firebase/auth-interop-types": "0.2.4",
|
|
52
|
-
"@firebase/component": "0.6.13",
|
|
53
|
-
"@firebase/logger": "0.4.4",
|
|
54
|
-
"@firebase/util": "1.11.0",
|
|
51
|
+
"@firebase/auth-interop-types": "0.2.4-canary.0cbff6bc7",
|
|
52
|
+
"@firebase/component": "0.6.13-canary.0cbff6bc7",
|
|
53
|
+
"@firebase/logger": "0.4.4-canary.0cbff6bc7",
|
|
54
|
+
"@firebase/util": "1.11.0-canary.0cbff6bc7",
|
|
55
55
|
"tslib": "^2.1.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@firebase/app": "0.11.
|
|
58
|
+
"@firebase/app": "0.11.4-canary.0cbff6bc7",
|
|
59
59
|
"rollup": "2.79.2",
|
|
60
60
|
"rollup-plugin-typescript2": "0.36.0",
|
|
61
61
|
"typescript": "5.5.4"
|