cocobase 1.1.4 → 1.2.1
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/cjs/core/core.d.ts +239 -2
- package/dist/cjs/core/core.d.ts.map +1 -1
- package/dist/cjs/core/core.js +272 -23
- package/dist/cjs/core/core.js.map +1 -1
- package/dist/cjs/core/file.d.ts +27 -1
- package/dist/cjs/core/file.d.ts.map +1 -1
- package/dist/cjs/core/file.js +24 -2
- package/dist/cjs/core/file.js.map +1 -1
- package/dist/cjs/core/functions.d.ts +70 -0
- package/dist/cjs/core/functions.d.ts.map +1 -1
- package/dist/cjs/core/functions.js +55 -0
- package/dist/cjs/core/functions.js.map +1 -1
- package/dist/cjs/index.d.ts +4 -4
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/types.d.ts +98 -0
- package/dist/cjs/types/types.d.ts.map +1 -1
- package/dist/cjs/utils/utils.d.ts +2 -2
- package/dist/cjs/utils/utils.d.ts.map +1 -1
- package/dist/core/core.d.ts +239 -2
- package/dist/core/core.d.ts.map +1 -1
- package/dist/core/core.js +259 -10
- package/dist/core/core.js.map +1 -1
- package/dist/core/file.d.ts +27 -1
- package/dist/core/file.d.ts.map +1 -1
- package/dist/core/file.js +23 -1
- package/dist/core/file.js.map +1 -1
- package/dist/core/functions.d.ts +70 -0
- package/dist/core/functions.d.ts.map +1 -1
- package/dist/core/functions.js +55 -0
- package/dist/core/functions.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/types/types.d.ts +98 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/utils/utils.d.ts +2 -2
- package/dist/utils/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,35 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CloudFunction = void 0;
|
|
4
4
|
const BASEURL = "https://cloud.cocobase.buzz";
|
|
5
|
+
/**
|
|
6
|
+
* CloudFunction client for executing server-side functions.
|
|
7
|
+
*
|
|
8
|
+
* Cloud functions allow you to run custom server-side logic without managing infrastructure.
|
|
9
|
+
* Functions are written in Python and deployed to your Cocobase project.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* // Access via the Cocobase instance
|
|
14
|
+
* const db = new Cocobase({
|
|
15
|
+
* apiKey: 'your-api-key',
|
|
16
|
+
* projectId: 'your-project-id'
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // Execute a function
|
|
20
|
+
* const result = await db.functions.execute('sendEmail', {
|
|
21
|
+
* payload: { to: 'user@example.com', subject: 'Hello' },
|
|
22
|
+
* method: 'POST'
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
5
26
|
class CloudFunction {
|
|
27
|
+
/**
|
|
28
|
+
* Creates a new CloudFunction client.
|
|
29
|
+
*
|
|
30
|
+
* @param projectId - Your Cocobase project ID
|
|
31
|
+
* @param getToken - Function that returns the current authentication token
|
|
32
|
+
* @throws Error if projectId is empty or invalid
|
|
33
|
+
*/
|
|
6
34
|
constructor(projectId, getToken) {
|
|
7
35
|
this.projectId = projectId;
|
|
8
36
|
this.getToken = getToken;
|
|
@@ -11,6 +39,33 @@ class CloudFunction {
|
|
|
11
39
|
throw new Error("CloudFunction requires a valid projectId. Please provide projectId in CocobaseConfig.");
|
|
12
40
|
}
|
|
13
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Executes a cloud function by name.
|
|
44
|
+
*
|
|
45
|
+
* @template T - The expected return type of the function
|
|
46
|
+
* @param functionName - Name of the cloud function to execute
|
|
47
|
+
* @param params - Optional parameters including payload and HTTP method
|
|
48
|
+
* @returns Promise resolving to the function response with result and metadata
|
|
49
|
+
* @throws Error if projectId is invalid
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```typescript
|
|
53
|
+
* // Simple GET request
|
|
54
|
+
* const result = await db.functions.execute('getStats');
|
|
55
|
+
*
|
|
56
|
+
* // POST request with payload
|
|
57
|
+
* const result = await db.functions.execute('processOrder', {
|
|
58
|
+
* payload: {
|
|
59
|
+
* orderId: '12345',
|
|
60
|
+
* items: [{ id: 1, quantity: 2 }]
|
|
61
|
+
* },
|
|
62
|
+
* method: 'POST'
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* console.log(result.result); // Function output
|
|
66
|
+
* console.log(result.execution_time); // Execution time in ms
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
14
69
|
async execute(functionName, params) {
|
|
15
70
|
// Validate projectId again in case it was modified
|
|
16
71
|
if (!this.projectId || this.projectId.trim() === "") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/core/functions.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/core/functions.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG,6BAA6B,CAAC;AA8B9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAa,aAAa;IAIxB;;;;;;OAMG;IACH,YAAY,SAAiB,EAAE,QAAkC;QAC/D,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,qBAAqB;QACrB,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,KAAK,CAAC,OAAO,CACX,YAAoB,EACpB,MAAuB;QAE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, Document, Collection } from "./types/types";
|
|
3
|
-
import { getFromLocalStorage, mergeUserData, setToLocalStorage, buildFilterQuery, parseFilterKey } from "./utils/utils";
|
|
4
|
-
import { uploadFile } from "./core/file";
|
|
1
|
+
import { Cocobase } from "./core/core.js";
|
|
2
|
+
import type { CocobaseConfig, Document, Collection } from "./types/types.js";
|
|
3
|
+
import { getFromLocalStorage, mergeUserData, setToLocalStorage, buildFilterQuery, parseFilterKey } from "./utils/utils.js";
|
|
4
|
+
import { uploadFile } from "./core/file.js";
|
|
5
5
|
export { Cocobase, getFromLocalStorage, mergeUserData, setToLocalStorage, uploadFile, buildFilterQuery, parseFilterKey, };
|
|
6
6
|
export type { TokenResponse, AppUser, Query } from "./types/types";
|
|
7
7
|
export type { CocobaseConfig, Document, Collection };
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,gBAAgB,EAChB,cAAc,GACf,CAAC;AACF,YAAY,EAAE,aAAa,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACnE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AACrD,YAAY,EACV,cAAc,EACd,eAAe,EACf,OAAO,EACP,WAAW,EACX,eAAe,GAChB,MAAM,gBAAgB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.parseFilterKey = exports.buildFilterQuery = exports.uploadFile = exports.setToLocalStorage = exports.mergeUserData = exports.getFromLocalStorage = exports.Cocobase = void 0;
|
|
4
|
-
const
|
|
5
|
-
Object.defineProperty(exports, "Cocobase", { enumerable: true, get: function () { return
|
|
6
|
-
const
|
|
7
|
-
Object.defineProperty(exports, "getFromLocalStorage", { enumerable: true, get: function () { return
|
|
8
|
-
Object.defineProperty(exports, "mergeUserData", { enumerable: true, get: function () { return
|
|
9
|
-
Object.defineProperty(exports, "setToLocalStorage", { enumerable: true, get: function () { return
|
|
10
|
-
Object.defineProperty(exports, "buildFilterQuery", { enumerable: true, get: function () { return
|
|
11
|
-
Object.defineProperty(exports, "parseFilterKey", { enumerable: true, get: function () { return
|
|
12
|
-
const
|
|
13
|
-
Object.defineProperty(exports, "uploadFile", { enumerable: true, get: function () { return
|
|
4
|
+
const core_js_1 = require("./core/core.js");
|
|
5
|
+
Object.defineProperty(exports, "Cocobase", { enumerable: true, get: function () { return core_js_1.Cocobase; } });
|
|
6
|
+
const utils_js_1 = require("./utils/utils.js");
|
|
7
|
+
Object.defineProperty(exports, "getFromLocalStorage", { enumerable: true, get: function () { return utils_js_1.getFromLocalStorage; } });
|
|
8
|
+
Object.defineProperty(exports, "mergeUserData", { enumerable: true, get: function () { return utils_js_1.mergeUserData; } });
|
|
9
|
+
Object.defineProperty(exports, "setToLocalStorage", { enumerable: true, get: function () { return utils_js_1.setToLocalStorage; } });
|
|
10
|
+
Object.defineProperty(exports, "buildFilterQuery", { enumerable: true, get: function () { return utils_js_1.buildFilterQuery; } });
|
|
11
|
+
Object.defineProperty(exports, "parseFilterKey", { enumerable: true, get: function () { return utils_js_1.parseFilterKey; } });
|
|
12
|
+
const file_js_1 = require("./core/file.js");
|
|
13
|
+
Object.defineProperty(exports, "uploadFile", { enumerable: true, get: function () { return file_js_1.uploadFile; } });
|
|
14
14
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAYxC,yFAZO,kBAAQ,OAYP;AAVV,+CAM0B;AAKxB,oGAVA,8BAAmB,OAUA;AACnB,8FAVA,wBAAa,OAUA;AACb,kGAVA,4BAAiB,OAUA;AAEjB,iGAXA,2BAAgB,OAWA;AAChB,+FAXA,yBAAc,OAWA;AAThB,4CAA4C;AAO1C,2FAPO,oBAAU,OAOP"}
|
|
@@ -1,44 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for initializing the Cocobase client.
|
|
3
|
+
*/
|
|
1
4
|
export interface CocobaseConfig {
|
|
5
|
+
/** Your Cocobase API key for authentication */
|
|
2
6
|
apiKey?: string;
|
|
7
|
+
/** Custom base URL (defaults to https://api.cocobase.buzz) */
|
|
3
8
|
baseURL?: string;
|
|
9
|
+
/** Your Cocobase project ID (required for cloud functions) */
|
|
4
10
|
projectId?: string;
|
|
5
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Represents a collection in the database.
|
|
14
|
+
*/
|
|
6
15
|
export interface Collection {
|
|
16
|
+
/** Collection name */
|
|
7
17
|
name: string;
|
|
18
|
+
/** Unique collection ID */
|
|
8
19
|
id: string;
|
|
20
|
+
/** ISO timestamp of when the collection was created */
|
|
9
21
|
created_at: string;
|
|
10
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Response from initiating Google OAuth login.
|
|
25
|
+
*/
|
|
26
|
+
export interface GoogleLoginResponse {
|
|
27
|
+
/** Google OAuth authorization URL to redirect the user to */
|
|
28
|
+
url: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parameters for aggregate operations on documents.
|
|
32
|
+
*/
|
|
33
|
+
export interface AggregateParams {
|
|
34
|
+
/** Field name to perform aggregation on */
|
|
35
|
+
field: string;
|
|
36
|
+
/** Optional query filters to apply before aggregation */
|
|
37
|
+
query?: Query;
|
|
38
|
+
/** Type of aggregation operation to perform */
|
|
39
|
+
operation: "count" | "sum" | "avg" | "min" | "max";
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Results from an aggregate operation.
|
|
43
|
+
*/
|
|
44
|
+
export interface AggregateResults {
|
|
45
|
+
/** Field that was aggregated */
|
|
46
|
+
field: string;
|
|
47
|
+
/** Operation that was performed */
|
|
48
|
+
operation: string;
|
|
49
|
+
/** Aggregated result value */
|
|
50
|
+
result: number;
|
|
51
|
+
/** Collection name */
|
|
52
|
+
collection: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Represents a document in a collection with metadata.
|
|
56
|
+
*
|
|
57
|
+
* @template T - The type of the document's data payload
|
|
58
|
+
*/
|
|
11
59
|
export interface Document<T> {
|
|
60
|
+
/** User-defined document data */
|
|
12
61
|
data: T;
|
|
62
|
+
/** Unique document ID */
|
|
13
63
|
id: string;
|
|
64
|
+
/** ID of the collection this document belongs to */
|
|
14
65
|
collection_id: string;
|
|
66
|
+
/** ISO timestamp of when the document was created */
|
|
15
67
|
created_at: string;
|
|
68
|
+
/** Collection metadata */
|
|
16
69
|
collection: Collection;
|
|
17
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Query parameters for filtering, sorting, and paginating documents.
|
|
73
|
+
*/
|
|
18
74
|
export interface Query {
|
|
75
|
+
/** Filter conditions using field names and operators (e.g., { status: 'active', age_gte: 18 }) */
|
|
19
76
|
filters?: Record<string, string | number | boolean>;
|
|
77
|
+
/** Maximum number of documents to return (default: 100) */
|
|
20
78
|
limit?: number;
|
|
79
|
+
/** Number of documents to skip for pagination (default: 0) */
|
|
21
80
|
offset?: number;
|
|
81
|
+
/** Field name to sort by */
|
|
22
82
|
sort?: string;
|
|
83
|
+
/** Sort direction */
|
|
23
84
|
order?: "asc" | "desc";
|
|
85
|
+
/** Fields to populate (fetch referenced documents) - single field or array of fields */
|
|
24
86
|
populate?: string | string[];
|
|
87
|
+
/** Fields to include in the response - single field or array of fields */
|
|
25
88
|
select?: string | string[];
|
|
26
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Response from authentication operations containing the access token.
|
|
92
|
+
*/
|
|
27
93
|
export interface TokenResponse {
|
|
94
|
+
/** JWT access token for authenticated requests */
|
|
28
95
|
access_token: string;
|
|
29
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Paginated list of users with metadata.
|
|
99
|
+
*/
|
|
100
|
+
export interface AppUserList {
|
|
101
|
+
/** Array of user objects */
|
|
102
|
+
data: AppUser[];
|
|
103
|
+
/** Total number of users matching the query */
|
|
104
|
+
total: number;
|
|
105
|
+
/** Limit used for this query */
|
|
106
|
+
limit: number;
|
|
107
|
+
/** Offset used for this query */
|
|
108
|
+
offset: number;
|
|
109
|
+
/** Whether there are more users beyond this page */
|
|
110
|
+
has_more: boolean;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Represents a user in the authentication system.
|
|
114
|
+
*/
|
|
30
115
|
export interface AppUser {
|
|
116
|
+
/** Unique user ID */
|
|
31
117
|
id: string;
|
|
118
|
+
/** User's email address */
|
|
32
119
|
email: string;
|
|
120
|
+
/** ISO timestamp of when the user account was created */
|
|
33
121
|
created_at: string;
|
|
122
|
+
/** Custom user data fields */
|
|
34
123
|
data: Record<string, any>;
|
|
124
|
+
/** Client/project ID the user belongs to */
|
|
35
125
|
client_id: string;
|
|
126
|
+
/** Array of role names assigned to the user */
|
|
36
127
|
roles: string[];
|
|
37
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Represents an active WebSocket connection for real-time updates.
|
|
131
|
+
*/
|
|
38
132
|
export interface Connection {
|
|
133
|
+
/** The underlying WebSocket instance */
|
|
39
134
|
socket: WebSocket;
|
|
135
|
+
/** Connection identifier name */
|
|
40
136
|
name: string;
|
|
137
|
+
/** Whether the connection has been closed */
|
|
41
138
|
closed: boolean;
|
|
139
|
+
/** Method to close the connection */
|
|
42
140
|
close: () => void;
|
|
43
141
|
}
|
|
44
142
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,QAAQ,CAAC,CAAC;IACzB,IAAI,EAAE,CAAC,CAAC;IACR,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB;AACD,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,MAA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;IAC/C,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,wCAAwC;IACxC,MAAM,EAAE,SAAS,CAAC;IAClB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,MAAM,EAAE,OAAO,CAAC;IAChB,qCAAqC;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Query } from "../types/types";
|
|
2
|
-
import type { ParsedFilterKey } from "../types/filter";
|
|
1
|
+
import { Query } from "../types/types.js";
|
|
2
|
+
import type { ParsedFilterKey } from "../types/filter.js";
|
|
3
3
|
declare function getFromLocalStorage(key: string): string | null;
|
|
4
4
|
declare function setToLocalStorage(key: string, value: string): void;
|
|
5
5
|
declare function mergeUserData(currentData: Record<string, any>, newData: Record<string, any>): Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1E,iBAAS,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAavD;AAED,iBAAS,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAW3D;AAED,iBAAS,aAAa,CACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC3B,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CASrB;AAED;;;;;;;;;GASG;AACH,iBAAS,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAwEpD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AACH,iBAAS,gBAAgB,CAAC,EACxB,OAAY,EACZ,KAAW,EACX,MAAU,EACV,IAAI,EACJ,KAAc,EACd,QAAQ,EACR,MAAM,GACP,GAAE,KAAU,GAAG,MAAM,CA4CrB;AAED,QAAA,MAAM,OAAO,8BAA8B,CAAC;AAC5C,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,cAAc,GACf,CAAC"}
|
package/dist/core/core.d.ts
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
|
-
import { CocobaseConfig, Document, AppUser, Query, Connection } from "../types/types";
|
|
2
|
-
import { CloudFunction } from "./functions";
|
|
1
|
+
import { CocobaseConfig, Document, AppUser, Query, AppUserList, GoogleLoginResponse, Connection, AggregateResults, AggregateParams } from "../types/types.js";
|
|
2
|
+
import { CloudFunction } from "./functions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Main Cocobase client for interacting with the Cocobase backend API.
|
|
5
|
+
*
|
|
6
|
+
* Provides methods for:
|
|
7
|
+
* - Document CRUD operations (Create, Read, Update, Delete)
|
|
8
|
+
* - User authentication and management
|
|
9
|
+
* - File uploads
|
|
10
|
+
* - Real-time data synchronization
|
|
11
|
+
* - Cloud functions execution
|
|
12
|
+
* - Batch operations
|
|
13
|
+
* - Advanced querying and aggregations
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Initialize the client
|
|
18
|
+
* const db = new Cocobase({
|
|
19
|
+
* apiKey: 'your-api-key',
|
|
20
|
+
* projectId: 'your-project-id'
|
|
21
|
+
* });
|
|
22
|
+
*
|
|
23
|
+
* // Create a document
|
|
24
|
+
* await db.createDocument('users', { name: 'John Doe' });
|
|
25
|
+
*
|
|
26
|
+
* // Query documents
|
|
27
|
+
* const users = await db.listDocuments('users', {
|
|
28
|
+
* filters: { status: 'active' },
|
|
29
|
+
* limit: 10
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
3
33
|
export declare class Cocobase {
|
|
4
34
|
private baseURL;
|
|
5
35
|
apiKey?: string;
|
|
@@ -7,11 +37,63 @@ export declare class Cocobase {
|
|
|
7
37
|
projectId?: string;
|
|
8
38
|
user?: AppUser;
|
|
9
39
|
functions: CloudFunction;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a new Cocobase client instance.
|
|
42
|
+
*
|
|
43
|
+
* @param config - Configuration object for the client
|
|
44
|
+
* @param config.apiKey - Your Cocobase API key (required for most operations)
|
|
45
|
+
* @param config.projectId - Your Cocobase project ID (required for cloud functions)
|
|
46
|
+
* @param config.baseURL - Optional custom base URL (defaults to https://api.cocobase.buzz)
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```typescript
|
|
50
|
+
* const db = new Cocobase({
|
|
51
|
+
* apiKey: 'your-api-key',
|
|
52
|
+
* projectId: 'your-project-id'
|
|
53
|
+
* });
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
10
56
|
constructor(config: CocobaseConfig);
|
|
57
|
+
/**
|
|
58
|
+
* Gets the current authentication token.
|
|
59
|
+
*
|
|
60
|
+
* @returns The current JWT token, or undefined if not authenticated
|
|
61
|
+
*/
|
|
11
62
|
getToken(): string | undefined;
|
|
12
63
|
private request;
|
|
13
64
|
private getErrorSuggestion;
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves a single document by ID from a collection.
|
|
67
|
+
*
|
|
68
|
+
* @template T - The type of the document data
|
|
69
|
+
* @param collection - Name of the collection
|
|
70
|
+
* @param docId - Unique ID of the document
|
|
71
|
+
* @returns Promise resolving to the document with metadata
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const user = await db.getDocument('users', 'user-123');
|
|
76
|
+
* console.log(user.data.name);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
14
79
|
getDocument<T = any>(collection: string, docId: string): Promise<Document<T>>;
|
|
80
|
+
/**
|
|
81
|
+
* Creates a new document in a collection.
|
|
82
|
+
*
|
|
83
|
+
* @template T - The type of the document data
|
|
84
|
+
* @param collection - Name of the collection
|
|
85
|
+
* @param data - Document data to store
|
|
86
|
+
* @returns Promise resolving to the created document with metadata
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* const newUser = await db.createDocument('users', {
|
|
91
|
+
* name: 'John Doe',
|
|
92
|
+
* email: 'john@example.com',
|
|
93
|
+
* age: 30
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
15
97
|
createDocument<T = any>(collection: string, data: T): Promise<Document<T>>;
|
|
16
98
|
/**
|
|
17
99
|
* Create a document with file uploads
|
|
@@ -42,6 +124,23 @@ export declare class Cocobase {
|
|
|
42
124
|
* ```
|
|
43
125
|
*/
|
|
44
126
|
createDocumentWithFiles<T = any>(collection: string, data: T, files: Record<string, File | File[]>): Promise<Document<T>>;
|
|
127
|
+
/**
|
|
128
|
+
* Updates an existing document in a collection.
|
|
129
|
+
*
|
|
130
|
+
* @template T - The type of the document data
|
|
131
|
+
* @param collection - Name of the collection
|
|
132
|
+
* @param docId - Unique ID of the document to update
|
|
133
|
+
* @param data - Partial document data to update (only specified fields are updated)
|
|
134
|
+
* @returns Promise resolving to the updated document with metadata
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```typescript
|
|
138
|
+
* await db.updateDocument('users', 'user-123', {
|
|
139
|
+
* age: 31,
|
|
140
|
+
* status: 'active'
|
|
141
|
+
* });
|
|
142
|
+
* ```
|
|
143
|
+
*/
|
|
45
144
|
updateDocument<T = any>(collection: string, docId: string, data: Partial<T>): Promise<Document<T>>;
|
|
46
145
|
/**
|
|
47
146
|
* Update a document with file uploads
|
|
@@ -67,14 +166,125 @@ export declare class Cocobase {
|
|
|
67
166
|
* ```
|
|
68
167
|
*/
|
|
69
168
|
updateDocumentWithFiles<T = any>(collection: string, docId: string, data?: Partial<T>, files?: Record<string, File | File[]>): Promise<Document<T>>;
|
|
169
|
+
/**
|
|
170
|
+
* Deletes a document from a collection.
|
|
171
|
+
*
|
|
172
|
+
* @param collection - Name of the collection
|
|
173
|
+
* @param docId - Unique ID of the document to delete
|
|
174
|
+
* @returns Promise resolving to a success status object
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```typescript
|
|
178
|
+
* await db.deleteDocument('users', 'user-123');
|
|
179
|
+
* ```
|
|
180
|
+
*/
|
|
70
181
|
deleteDocument(collection: string, docId: string): Promise<{
|
|
71
182
|
success: boolean;
|
|
72
183
|
}>;
|
|
184
|
+
/**
|
|
185
|
+
* Lists documents from a collection with optional filtering and pagination.
|
|
186
|
+
*
|
|
187
|
+
* @template T - The type of the document data
|
|
188
|
+
* @param collection - Name of the collection
|
|
189
|
+
* @param query - Optional query parameters for filtering, sorting, and pagination
|
|
190
|
+
* @returns Promise resolving to an array of documents
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```typescript
|
|
194
|
+
* // Simple query
|
|
195
|
+
* const users = await db.listDocuments('users', {
|
|
196
|
+
* filters: { status: 'active' },
|
|
197
|
+
* limit: 10
|
|
198
|
+
* });
|
|
199
|
+
*
|
|
200
|
+
* // Advanced query with sorting
|
|
201
|
+
* const posts = await db.listDocuments('posts', {
|
|
202
|
+
* filters: { published: true },
|
|
203
|
+
* sort: 'createdAt',
|
|
204
|
+
* order: 'desc',
|
|
205
|
+
* limit: 20
|
|
206
|
+
* });
|
|
207
|
+
* ```
|
|
208
|
+
*/
|
|
73
209
|
listDocuments<T = any>(collection: string, query?: Query): Promise<Document<T>[]>;
|
|
210
|
+
/**
|
|
211
|
+
* Initializes authentication by restoring the session from local storage.
|
|
212
|
+
* Call this method when your application loads to restore user sessions.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* ```typescript
|
|
216
|
+
* await db.initAuth();
|
|
217
|
+
* if (db.isAuthenticated()) {
|
|
218
|
+
* console.log('User is logged in:', db.user);
|
|
219
|
+
* }
|
|
220
|
+
* ```
|
|
221
|
+
*/
|
|
74
222
|
initAuth(): Promise<void>;
|
|
223
|
+
/**
|
|
224
|
+
* Sets the authentication token and stores it in local storage.
|
|
225
|
+
*
|
|
226
|
+
* @param token - JWT authentication token
|
|
227
|
+
*/
|
|
75
228
|
setToken(token: string): void;
|
|
229
|
+
/**
|
|
230
|
+
* Authenticates a user with email and password.
|
|
231
|
+
*
|
|
232
|
+
* @param email - User's email address
|
|
233
|
+
* @param password - User's password
|
|
234
|
+
* @returns Promise that resolves when login is complete
|
|
235
|
+
*
|
|
236
|
+
* @example
|
|
237
|
+
* ```typescript
|
|
238
|
+
* await db.login('user@example.com', 'password123');
|
|
239
|
+
* console.log('Logged in as:', db.user.email);
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
76
242
|
login(email: string, password: string): Promise<void>;
|
|
243
|
+
/**
|
|
244
|
+
* Registers a new user with email, password, and optional additional data.
|
|
245
|
+
*
|
|
246
|
+
* @param email - User's email address
|
|
247
|
+
* @param password - User's password
|
|
248
|
+
* @param data - Optional additional user data
|
|
249
|
+
* @returns Promise that resolves when registration is complete
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```typescript
|
|
253
|
+
* await db.register('user@example.com', 'password123', {
|
|
254
|
+
* username: 'johndoe',
|
|
255
|
+
* fullName: 'John Doe'
|
|
256
|
+
* });
|
|
257
|
+
* ```
|
|
258
|
+
*/
|
|
77
259
|
register(email: string, password: string, data?: Record<string, any>): Promise<void>;
|
|
260
|
+
/**
|
|
261
|
+
* Initiates Google OAuth login flow.
|
|
262
|
+
*
|
|
263
|
+
* @returns Promise resolving to an object with the Google OAuth URL
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```typescript
|
|
267
|
+
* const { url } = await db.loginWithGoogle();
|
|
268
|
+
* window.location.href = url; // Redirect to Google login
|
|
269
|
+
* ```
|
|
270
|
+
*/
|
|
271
|
+
loginWithGoogle(): Promise<GoogleLoginResponse>;
|
|
272
|
+
/**
|
|
273
|
+
* Completes the Google OAuth login flow after redirect.
|
|
274
|
+
*
|
|
275
|
+
* @param token - JWT token received from OAuth callback
|
|
276
|
+
* @returns Promise that resolves when login is complete
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```typescript
|
|
280
|
+
* // After Google redirects back to your app with a token
|
|
281
|
+
* const token = new URLSearchParams(window.location.search).get('token');
|
|
282
|
+
* if (token) {
|
|
283
|
+
* await db.completeGoogleLogin(token);
|
|
284
|
+
* }
|
|
285
|
+
* ```
|
|
286
|
+
*/
|
|
287
|
+
completeGoogleLogin(token: string): Promise<void>;
|
|
78
288
|
/**
|
|
79
289
|
* Register a new user with file uploads (avatar, cover photo, etc.)
|
|
80
290
|
*
|
|
@@ -146,5 +356,32 @@ export declare class Cocobase {
|
|
|
146
356
|
}) => void, connectionName?: string, onOpen?: () => void, onError?: () => void): Connection;
|
|
147
357
|
hasRole(role: string): boolean;
|
|
148
358
|
closeConnection(name: string): void;
|
|
359
|
+
listUsers<T = any>(query?: Query): Promise<AppUserList>;
|
|
360
|
+
getUserById<T = any>(userId: string): Promise<AppUser>;
|
|
361
|
+
deleteDocuments(collection: string, docIds: string[]): Promise<{
|
|
362
|
+
status: string;
|
|
363
|
+
message: string;
|
|
364
|
+
count: number;
|
|
365
|
+
}>;
|
|
366
|
+
createDocuments<T = any>(collection: string, documents: T[]): Promise<Document<T>[]>;
|
|
367
|
+
/**
|
|
368
|
+
* Batch update documents
|
|
369
|
+
*
|
|
370
|
+
* @param collection - Collection name
|
|
371
|
+
* @param updates - Object mapping document IDs to partial update objects.
|
|
372
|
+
* Example: { "docId1": { fieldA: "value" }, "docId2": { fieldB: 2 } }
|
|
373
|
+
*/
|
|
374
|
+
updateDocuments<T = any>(collection: string, updates: Record<string, Partial<T>>): Promise<Document<T>[]>;
|
|
375
|
+
/**
|
|
376
|
+
* Count documents matching filters without returning the documents.
|
|
377
|
+
*
|
|
378
|
+
* Example:
|
|
379
|
+
* await db.countDocuments('users', { status: 'active', age_gte: 18 })
|
|
380
|
+
* // returns { count: 42 }
|
|
381
|
+
*/
|
|
382
|
+
countDocuments(collection: string, query?: Query): Promise<{
|
|
383
|
+
count: number;
|
|
384
|
+
}>;
|
|
385
|
+
aggregateDocuments(collection: string, params: AggregateParams): Promise<AggregateResults>;
|
|
149
386
|
}
|
|
150
387
|
//# sourceMappingURL=core.d.ts.map
|
package/dist/core/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,QAAQ,EAER,OAAO,EACP,KAAK,EACL,
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,QAAQ,EAER,OAAO,EACP,KAAK,EACL,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,gBAAgB,EAChB,eAAe,EAChB,MAAM,mBAAmB,CAAC;AAS3B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,qBAAa,QAAQ;IACnB,OAAO,CAAC,OAAO,CAAS;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,aAAa,CAAC;IAEzB;;;;;;;;;;;;;;;OAeG;gBACS,MAAM,EA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