diff --git a/README.md b/README.md index 0bd0526b..882e0d25 100644 --- a/README.md +++ b/README.md @@ -95,10 +95,7 @@ npm run load-notebooks ## Deploying a notebook -* Set USER_TOKEN in bash `export USER_TOKEN=blah` (from token export in conductor) -* Set public_url `export CONDUCTOR_PUBLIC_URL=https://conductor.fieldmark.app` -* Delete all unwanted tokens from the notebooks folder, then load desired notebook and run `npm run load-notebooks` -* Otherwise, set up environment and `node scripts/loadNotebooks.js path/to/notebook.json` +Notebooks can be uploaded to Conductor via the web interface. ## Development @@ -119,7 +116,6 @@ Then start the services: docker compose -f docker-compose.dev.yml up ``` - ## Tests Run tests inside the conductor instance: diff --git a/public/swagger.json b/public/swagger.json index 616ddb92..df80fbed 100644 --- a/public/swagger.json +++ b/public/swagger.json @@ -127,13 +127,13 @@ }, "put": { "summary": "Update a notebook", - "description": "Update a notebook by id", + "description": "Update a notebook by identifier", "tags": ["Notebooks"], "parameters": [ { "name": "id", "in": "path", - "description": "Notebook id", + "description": "Notebook identifier", "required": true, "type": "string" } @@ -173,7 +173,7 @@ { "name": "id", "in": "path", - "description": "Notebook id", + "description": "Notebook identifier", "required": true, "type": "string" } @@ -196,6 +196,79 @@ } } }, + "/notebooks/{id}/{viewID}.csv": { + "get": { + "summary": "Get a records as CSV", + "description": "Export notebook records as CSV for one form", + "tags": ["Export"], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Notebook identifier", + "required": true, + "type": "string" + }, + { + "name": "viewID", + "in": "path", + "description": "view (form) dentifier", + "required": true, + "type": "string" + } + ], + "produces": ["text/csv"], + "security": {"Auth": []}, + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "string" + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, + "/notebooks/{id}/{viewID}.zip": { + "get": { + "summary": "Get all record attachments as a zip file", + "description": "Export all attachments (photos, files) for a form as a zip file", + "tags": ["Export"], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Notebook id", + "required": true, + "type": "string" + }, + { + "name": "viewID", + "in": "path", + "description": "view (form) dentifier", + "required": true, + "type": "string" + } + ], + "produces": ["application/zip"], + "security": {"Auth": []}, + "responses": { + "200": { + "description": "successful operation", + "schema": { + "type": "string", + "format": "binary" + } + }, + "401": { + "$ref": "#/components/responses/UnauthorizedError" + } + } + } + }, "/notebooks/{id}/users": { "get": { "summary": "Get users for a notebook",