Skip to content

Commit ded94fb

Browse files
committed
docs: document storage APIs and environments
Add JSDoc public API, visibility, and runtime environment metadata for the storage package exports.
1 parent 46bf48c commit ded94fb

4 files changed

Lines changed: 18 additions & 3 deletions

File tree

‎src/array.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ import {
2525

2626
/**
2727
* Isolated CRUD Processor for Array/Collection Management.
28-
*
28+
*
2929
* @param {string} method - Operation targeting database collections (read, create, update, delete)
3030
* @param {Object} data - Context query details containing database and collection matrices
31+
* @private
32+
* @environment server
3133
*/
3234
function array(method, data) {
3335
const storageName = data.storageConfig?.name;

‎src/database.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ import {
2424

2525
/**
2626
* Isolated CRUD Processor for Database Management.
27-
*
27+
*
2828
* @param {string} method - Operation targeting database layers (read, delete)
2929
* @param {Object} data - Context query details and transactional metrics
30+
* @private
31+
* @environment server
3032
*/
3133
function database(method, data) {
3234
const storageName = data.storageConfig?.name;

‎src/index.js‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ import object from "./object.js";
2323
* Routes CRUD requests to appropriate database, array, or object modules.
2424
* @param {Object} data - CRUD request payload containing method, database, array, organization_id, etc.
2525
* @returns {Promise<Object>} Execution result from database layer
26+
* @public
27+
* @environment server
2628
*/
2729
export async function send(data) {
2830
if (!data || !data.method) {
@@ -37,4 +39,11 @@ export async function send(data) {
3739
throw new Error(`Unsupported query target type: "${type}" in method "${data.method}"`);
3840
}
3941

40-
export default { send };
42+
export default { send };
43+
44+
/**
45+
* Lightweight, real-time MongoDB CRUD wrapper and multi-tenant state routing client for the collaborative CoCreate ecosystem.
46+
*
47+
* @module mongodb
48+
* @environment server
49+
*/

‎src/utilities.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ const organizations = {};
2323
* Dynamically resolves or caches a long-lived MongoDB Client instance using modern driver syntax.
2424
* @param {Object} data - Context parameters containing credentials and storage URL
2525
* @returns {Promise<MongoClient>} Resolved MongoDB Client connection
26+
* @private
27+
* @environment server
2628
*/
2729
async function dbClient(data) {
2830
const storageUrl = data.storageConfig?.connectionString || data.storageConfig?.url;

0 commit comments

Comments
 (0)