@squidcloud/client 1.0.33 → 1.0.34
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.
|
@@ -17,6 +17,8 @@ export declare class CollectionReference<T extends DocumentData> {
|
|
|
17
17
|
private readonly documentReferenceFactory;
|
|
18
18
|
private readonly queryBuilderFactory;
|
|
19
19
|
private readonly joinQueryBuilderFactory;
|
|
20
|
+
/** A string that uniquely identifies this collection reference. */
|
|
21
|
+
refId: string;
|
|
20
22
|
private readonly documents;
|
|
21
23
|
/**
|
|
22
24
|
* Returns a document reference for the given document id.
|
|
@@ -15,6 +15,8 @@ export declare class DocumentReference<T extends DocumentData = any> {
|
|
|
15
15
|
private _squidDocId;
|
|
16
16
|
private readonly dataManager;
|
|
17
17
|
private readonly queryBuilderFactory;
|
|
18
|
+
/** A string that uniquely identifies this document reference. */
|
|
19
|
+
refId: string;
|
|
18
20
|
/**
|
|
19
21
|
* Returns the document data. Throws an error if the document does not exist.
|
|
20
22
|
*
|
|
@@ -22,6 +24,14 @@ export declare class DocumentReference<T extends DocumentData = any> {
|
|
|
22
24
|
* @throws Error if the document does not exist.
|
|
23
25
|
*/
|
|
24
26
|
get data(): T;
|
|
27
|
+
/**
|
|
28
|
+
* Returns whether data has been populated for this document reference. Data
|
|
29
|
+
* will not present if a document has not been queried, does not exist, or
|
|
30
|
+
* has been deleted.
|
|
31
|
+
*
|
|
32
|
+
* @returns Whether the document has data.
|
|
33
|
+
*/
|
|
34
|
+
get hasData(): boolean;
|
|
25
35
|
/**
|
|
26
36
|
* Returns a document reference with the latest data from the server or undefined if the document does not exist on
|
|
27
37
|
* the server.
|
|
@@ -41,6 +41,13 @@ export declare class QueryBuilder<DocumentType extends DocumentData> extends Sim
|
|
|
41
41
|
* @returns An observable for the query changes.
|
|
42
42
|
*/
|
|
43
43
|
changes(): Observable<Changes<DocumentType>>;
|
|
44
|
+
/**
|
|
45
|
+
* A unique hash for the query. Identical queries should return the same hash
|
|
46
|
+
* value.
|
|
47
|
+
*
|
|
48
|
+
* @returns The query's hash string.
|
|
49
|
+
*/
|
|
50
|
+
get hash(): string;
|
|
44
51
|
}
|
|
45
52
|
/** Describes the changes to a query result. */
|
|
46
53
|
export interface Changes<DocumentType extends DocumentData> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.34",
|
|
4
4
|
"description": "A typescript implementation of the Squid client",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/typescript-client/src/index.d.ts",
|
|
@@ -10,17 +10,15 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"prebuild": "rimraf dist",
|
|
12
12
|
"build": "webpack --mode=production",
|
|
13
|
-
"postbuild": "npm run copy-files",
|
|
14
13
|
"build:dev": "webpack --mode=development",
|
|
15
14
|
"build:prod": "webpack --mode=production",
|
|
16
|
-
"copy-files": "cpx package.json dist",
|
|
17
15
|
"watch": "webpack --watch",
|
|
18
16
|
"test": "jest --detectOpenHandles",
|
|
19
17
|
"test:watch": "jest --watch",
|
|
20
18
|
"test:cov": "jest --coverage",
|
|
21
19
|
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
22
20
|
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
23
|
-
"publish:public": "npm
|
|
21
|
+
"publish:public": "npm run build && npm version patch && npm publish --access public"
|
|
24
22
|
},
|
|
25
23
|
"keywords": [
|
|
26
24
|
"typescript",
|
package/dist/package.json
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@squidcloud/client",
|
|
3
|
-
"version": "1.0.33",
|
|
4
|
-
"description": "A typescript implementation of the Squid client",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/typescript-client/src/index.d.ts",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist/**/*"
|
|
9
|
-
],
|
|
10
|
-
"scripts": {
|
|
11
|
-
"prebuild": "rimraf dist",
|
|
12
|
-
"build": "webpack --mode=production",
|
|
13
|
-
"postbuild": "npm run copy-files",
|
|
14
|
-
"build:dev": "webpack --mode=development",
|
|
15
|
-
"build:prod": "webpack --mode=production",
|
|
16
|
-
"copy-files": "cpx package.json dist",
|
|
17
|
-
"watch": "webpack --watch",
|
|
18
|
-
"test": "jest --detectOpenHandles",
|
|
19
|
-
"test:watch": "jest --watch",
|
|
20
|
-
"test:cov": "jest --coverage",
|
|
21
|
-
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
|
|
22
|
-
"test:e2e": "jest --config ./test/jest-e2e.json",
|
|
23
|
-
"publish:public": "npm version patch && npm run build && npm publish --access public"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"typescript",
|
|
27
|
-
"javascript",
|
|
28
|
-
"squid",
|
|
29
|
-
"squid cloud",
|
|
30
|
-
"realtime",
|
|
31
|
-
"database"
|
|
32
|
-
],
|
|
33
|
-
"author": "",
|
|
34
|
-
"license": "ISC",
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@apollo/client": "^3.7.4",
|
|
37
|
-
"@squidcloud/common": "^1.0.10",
|
|
38
|
-
"@supercharge/promise-pool": "^2.3.2",
|
|
39
|
-
"cross-fetch": "^3.1.5",
|
|
40
|
-
"lodash": "^4.17.21",
|
|
41
|
-
"socket.io-client": "^4.5.2"
|
|
42
|
-
},
|
|
43
|
-
"peerDependencies": {
|
|
44
|
-
"rxjs": ">=7.5.7 <8.0.0"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@types/lodash": "^4.14.186",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
49
|
-
"@typescript-eslint/parser": "^5.0.0",
|
|
50
|
-
"@webpack-cli/generators": "^3.0.0",
|
|
51
|
-
"copy-webpack-plugin": "^11.0.0",
|
|
52
|
-
"cpx": "^1.5.0",
|
|
53
|
-
"eslint": "8.22.0",
|
|
54
|
-
"eslint-config-prettier": "^8.3.0",
|
|
55
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
56
|
-
"generate-package-json-webpack-plugin": "^2.6.0",
|
|
57
|
-
"prettier": "^2.8.0",
|
|
58
|
-
"tsconfig-paths-webpack-plugin": "^4.0.0",
|
|
59
|
-
"tscpaths": "^0.0.9",
|
|
60
|
-
"webpack": "^5.75.0",
|
|
61
|
-
"webpack-cli": "^5.0.0"
|
|
62
|
-
}
|
|
63
|
-
}
|