Releases: dabbu-knowledge-platform/files-api-server
Dabbu Files API Server v3.0.2
Bug fixes
Google Drive and Gmail
- Remove forward slashes from file names, replace them with pipes [04bdf0b]
- otherwise while copying to other providers like hard drive or one drive that use forward slashes to separate file and folder names, an error would occur
- fixes #42
Documentation
- Make readme more consice, update links [4cd9bf7, c376093, 0c6b2ea]
- documentation now moved to github pages site
Builds/CI
Maintenance
Dabbu Files API Server v3.0.1
Features added
Google Drive
- Add support for handling shortcut files [23935cc]
- If a request is made with exportType = 'view', then the shortcut name, the target file's mime type and a link to open the shortcut with Google Drive in the web browser will be returned
- If a request is made with exportType = 'media', or a mime type to export a file, then the target file's name, the target file's mime type and an export/download link for the target file will be returned (Access token required to export/download file)
- Auto-append extension (docx, xlsx, pptx, etc.) if the file is a Google Workspace file [d7593ba]
Fixes
Google Drive
- Google Drive returns wrong export link for Google Workspace files [673b352]
Dabbu Files API Server v3.0.0
Features
- Added Basic HTTP Authentication
- all clients need to 'register' themselves with the server by making a
POST
request to the/clients
endpoint- this returns a client ID - API key pair that must be sent in all subsequent requests in the
X-Credentials
header encoded as follows:base64(<client id>:<api key>)
- provider-specific credentials like access tokens can be sent in the
X-Provider-Credentials
header
- this returns a client ID - API key pair that must be sent in all subsequent requests in the
- API keys can be replaced by making a
POST
request with the current API key to the/clients/:clientId
endpoint- this returns the current client ID and a new API key
- The client can be deleted by making a
DELETE
request to/clients/:clientId
endpoint
- all clients need to 'register' themselves with the server by making a
Changes
- Typescript rewrite
- Provider ID (
googledrive
,gmail
oronedrive
) is now to be specified as a query parameter (providerId
) - Don't lazy load providers, load them once and use them as required
- Use ISO timestamp strings instead of epoch timestamps
- Add helmet middleware for basic security
- Add a logger
- Logs are stored locally ONLY, in the config directory
- Windows:
%APPDATA%\Dabbu Files API Server\logs\files-api-server.log
- MacOS:
/Users/<username>/Library/Dabbu Files API Server/logs/files-api-server.log
- Linux:
($HOME OR $XDG_CONFIG_HOME)/.config/Dabbu Files API Server/logs/files-api-server.log
- Windows:
- These logs contain sensitive information, please be careful to remove sensitive information while posting them publicly. Work is underway to mask this sensitive information.
- Logs are stored locally ONLY, in the config directory
Fixes
- Improved error messages are returned
- Google Drive provider now returns proper export links for Google Workspace files
- One Drive provider returns an error if attempting to download OneNote files. A parser for OneNote files is in progress
Docs
- Add API docs and provider-specific docs
- Add guide for running server on your own
- WIP: getting started guide for using the APIs in your own client
Builds/CI
- Automatic releases only from the develop branch
- Add bash scripts for all jobs
Tests
- Use jest for tests
- Add unit tests for all providers and routes.
- Tests for controllers and utils are not yet implemented, PRs welcome.
Style/Format
- Add ts files to .editorconfig
- Use ESLint to lint typescript files
Dabbu Files API Server v2.1.2
Bug Fixes
- fix(gmail): crash when trying to access labels [19228b6]
Dabbu Files API Server v2.1.1
Bug fixes
- fix(gmail): crash when trying to access ALL_MAIL [4f686f9]
Dabbu Files API Server v2.1.0
Features added
- feat(list api): implement pagination [601bd83]
- all providers (except hard drive) now return a nextSetToken in
the response - the maximum number of results at once is 50, can be changed using
the limit query parameter (recommended is default, 50) - they also accept a nextSetToken in the query parameters to get
results from a certain point
- all providers (except hard drive) now return a nextSetToken in
- fix(arg parsing): cast port to integer if specified [2a22d3e]
Provider specific changes
Gmail
- feat(gmail): add ability to list all mail using ALL_MAIL label [f6950f3]
Builds/CI
-
fix(scripts): copy bump version script from cli repo [f8f8a67]
-
ci: change method for detecting prereleases [cff5bc0]
- delete CHANGELOG.md, as it is no longer used
-
style: rename readme, contributing, release notes to have .md ext [7afd270]
-
style: rename readme, contributing, release notes to lower case [d7c3867]
Features added
- feat(list api): implement pagination [601bd83]
- all providers (except hard drive) now return a nextSetToken in
the response - the maximum number of results at once is 50, can be changed using
the limit query parameter (recommended is default, 50) - they also accept a nextSetToken in the query parameters to get
results from a certain point
- all providers (except hard drive) now return a nextSetToken in
- fix(arg parsing): cast port to integer if specified [2a22d3e]
Provider specific changes
Gmail
- feat(gmail): add ability to list all mail using ALL_MAIL label [f6950f3]
Builds/CI
-
fix(scripts): copy bump version script from cli repo [f8f8a67]
-
ci: change method for detecting prereleases [cff5bc0]
- delete CHANGELOG.md, as it is no longer used
-
style: rename readme, contributing, release notes to have .md ext [7afd270]
-
style: rename readme, contributing, release notes to lower case [d7c3867]
Dabbu Files API Server v2.0.0
Changes to server
-
refactor(server): separate server from arg parsing [fcda907]
- server is now created in app.js: it exposes a function to create
a server on the given port with the given providers - server.js was renamed to index.js, handles arg parsing
- axios imports modified to import axios.default
- add option to disable console output
- store port in env variable DABBU_FILES_API_SERVER_PORT
- correct case of 400 error (malformedURL => malformedUrl)
- server is now created in app.js: it exposes a function to create
-
feat: change provider IDs from snake case to normal case [a02bd81]
- BREAKING CHANGE: provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words instead of underscores
- URL changed to /files-api/v2
Bug fixes
- fix(google drive, one drive): return null if nothing is updated on PUT call [31281ed]
- fix(hard drive): return 404 if file was not found [73c6d28]
- previously it returned a 500, relying on native fs api to return an error if the file didn't exist
- moved check for base_path to the top, it is now checked before the folder path
- fix(errors): change unauthorized status code to 401 [c5209d6]
- fix(hard drive): throw error if base path is missing [c210a81]
- fix(utils): ordering function in sortFiles [52b7d30]
- it was returning asc for desc and desc for asc
Build/CI changes
- ci: create prereleases on push to develop [f707e46, a829516]
- the prereleases will only be created when version number is changed
- it will contain a dash if it is a prerelease, i.e., 3.0.0-alpha.1
- ci: use release notes from RELEASE-NOTES instead of CHANGELOG [54f5a50]
- build: add scripts to bump version, generate release notes and push to git [4ec58f8]
- usage: scripts/bump-version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]
- to be run from project root
Code format/style changes
- style: add editorconfig file [92474cc]
- style: run prettier through xo [84b4196, b11a58c]
- style: switch from prettier to xo [0ac7e22]
- xo adds its own linter, had to disable a few rules
to accomodate our conventions - switched from 2 spaces to tabs
- disabled complexity, no-unused-vars, max-params,
max-depth, unicorn/no-nested-ternary and accepted snake
case for file names - changed docs to mention use of xo
- xo adds its own linter, had to disable a few rules
Documentation
- docs(contributing): add instructions for tests [dbe6f22]
- docs(contributing): add instructions regarding branch naming and merging [caf8079]
- docs(readme): add badges for code style, supported platforms (ci was already there) [b11a58c]
Testing
- test(util): add test for sortFiles function [52b7d30]
- test: add framework for testing server [0c70860]
- add ava, form-data as dev dependencies
- add basic tests for server, utils and each provider module
- add sample files to test get, post, put, etc.
- modify npm test to run tests using ava
- modify ci to run tests before building
- remove dev deps from executable
- add test instructions to CONTRIBUTING.md
Changes to server
-
refactor(server): separate server from arg parsing [fcda907]
- server is now created in app.js: it exposes a function to create
a server on the given port with the given providers - server.js was renamed to index.js, handles arg parsing
- axios imports modified to import axios.default
- add option to disable console output
- store port in env variable DABBU_FILES_API_SERVER_PORT
- correct case of 400 error (malformedURL => malformedUrl)
- server is now created in app.js: it exposes a function to create
-
feat: change provider IDs from snake case to normal case [a02bd81]
- BREAKING CHANGE: provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words instead of underscores
- URL changed to /files-api/v2
Bug fixes
- fix(google drive, one drive): return null if nothing is updated on PUT call [31281ed]
- fix(hard drive): return 404 if file was not found [73c6d28]
- previously it returned a 500, relying on native fs api to return an error if the file didn't exist
- moved check for base_path to the top, it is now checked before the folder path
- fix(errors): change unauthorized status code to 401 [c5209d6]
- fix(hard drive): throw error if base path is missing [c210a81]
- fix(utils): ordering function in sortFiles [52b7d30]
- it was returning asc for desc and desc for asc
Build/CI changes
- ci: create prereleases on push to develop [f707e46, a829516]
- the prereleases will only be created when version number is changed
- it will contain a dash if it is a prerelease, i.e., 3.0.0-alpha.1
- ci: use release notes from RELEASE-NOTES instead of CHANGELOG [54f5a50]
- build: add scripts to bump version, generate release notes and push to git [4ec58f8]
- usage: scripts/bump-version [ | major | minor | patch | premajor | preminor | prepatch | prerelease]
- to be run from project root
Code format/style changes
- style: add editorconfig file [92474cc]
- style: run prettier through xo [84b4196, b11a58c]
- style: switch from prettier to xo [0ac7e22]
- xo adds its own linter, had to disable a few rules
to accomodate our conventions - switched from 2 spaces to tabs
- disabled complexity, no-unused-vars, max-params,
max-depth, unicorn/no-nested-ternary and accepted snake
case for file names - changed docs to mention use of xo
- xo adds its own linter, had to disable a few rules
Documentation
- docs(contributing): add instructions for tests [dbe6f22]
- docs(contributing): add instructions regarding branch naming and merging [caf8079]
- docs(readme): add badges for code style, supported platforms (ci was already there) [b11a58c]
Testing
- test(util): add test for sortFiles function [52b7d30]
- test: add framework for testing server [0c70860]
- add ava, form-data as dev dependencies
- add basic tests for server, utils and each provider module
- add sample files to test get, post, put, etc.
- modify npm test to run tests using ava
- modify ci to run tests before building
- remove dev deps from executable
- add test instructions to CONTRIBUTING.md
Dabbu Files API Server v2.0.0-2
Changes to server (BREAKING) (PRERELEASE)
- provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words
instead of underscores - URL changed to /files-api/v2
Changes to server (BREAKING)
- provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words
instead of underscores - URL changed to /files-api/v2
Changes to server (BREAKING)
- provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words
instead of underscores - URL changed to /files-api/v2
Changes to server (BREAKING)
- provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words
instead of underscores - URL changed to /files-api/v2
Dabbu Files API Server v2.0.0-1
Changes to server (BREAKING) (PRERELEASE)
- provider IDs now have dashes separating words instead of underscores
- all JSON variables are now expected to have dashes separating words
instead of underscores - URL changed to /files-api/v2
Dabbu Files API Server v1.9.0-pre1
Changes to server
- Separate server code from argument parsing
Provider specific changes
Hard Drive
Bug fixes:
Code Style
Testing
- Add test framework (
ava
) 0c70860
Builds and CI
- Add support for prereleases from the
develop
branch f707e46
Documentation
- Add badges to README
- Update CONTRIBUTING instructions
Commits since last release:
- chore(release): prerelease v1.9.0-pre1 109146e
- fix(routes): request to data apis crashing server e8654fd
- test(util): add test for sortFiles function 52b7d30
- style: run prettier through xo to format code b11a58c
- docs(contributing): add details about linting process 7a4e7af
- ci: create prereleases on push to develop f707e46
- git: merge branch 'style/use-xo' into develop f156eeb
- style: switch from prettier to xo 0ac7e22
- git: merge branch 'test/add-test-framework' into develop 9784e77
- docs(contributing): make langauge clear with regards to tests dbe6f22
- test: add framework for testing server 0c70860
- docs(contributing): add instructions regarding branch naming and merging caf8079
- git: merge branch 'fix/api-compliance' into develop 5d6f962
- fix(hard drive): return 404 if file was not found 73c6d28
- fix(errors): change unauthorized status code to 401 c5209d6
- fix(hard drive): throw error if base path is missing c210a81
- refactor(server): separate server from arg parsing fcda907