203 Commits

Author SHA1 Message Date
rijkvanzanten
a47b9cec0f v9.4.0 2021-12-23 22:46:18 -05:00
rijkvanzanten
4b444baf5b v9.3.0 2021-12-16 18:48:10 -05:00
rijkvanzanten
546d525175 v9.2.2 2021-12-10 15:53:08 -05:00
rijkvanzanten
1d4e9c425c v9.2.1 2021-12-06 14:31:01 -05:00
rijkvanzanten
776c105aac v9.2.0 2021-12-03 16:16:38 -05:00
Nicola Krumschmidt
a3cbbfd237 Apply the cleaned up build config to the sdk (#10230) 2021-12-02 17:01:10 -05:00
NilsBaumgartner1994
fd93b850e0 Update BaseStorage (#9985)
* Update BaseStorage

remove dublicate strings into variables

* Apply suggestions from code review

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>

* Use enum types in keys

Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com>
2021-12-01 20:20:27 +00:00
José Varela
de978798a4 SDK: Fix bundles (#10053)
* Fix bundles
The problem was coming from rollup building only for browsers.
The solution is to specify build for browsers and Node.js.
This configuration is inherited from format-title package,
but with the slight difference that exports .mjs files

* fix types folder
2021-12-01 14:23:25 -05:00
José Varela
2fa2a75b60 SDK: Fix type arrays on filter (#10133)
* support arrays as types for _in, _nin, etc.

* improve type definition on filters
2021-12-01 14:04:55 -05:00
rijkvanzanten
9bf033c18d v9.1.2 2021-11-25 12:36:24 -05:00
rijkvanzanten
5d3a630fe6 v9.1.1 2021-11-24 21:09:22 -05:00
rijkvanzanten
7a1c534b36 v9.1.0 2021-11-24 17:56:26 -05:00
Oreille
f920196c18 Add logical operators to the SDK's Filter type (#9965)
* Add logical filter operator to the Filter type

* Removed unnecessary ?

* Reverted import from `@directus/shared`

* Handle many-to-many field filters
2021-11-22 13:05:22 -05:00
Joe Innes
ff002443f0 SDK: Start auth refresh job when constructor is initialised (#9777)
* Refresh auth when SDK is initialised 

If autorefresh is enabled, then this will cause the SDK to refresh tokens whenever it's loaded. This fixes bug #9639 (discussion #9720)

* start autoRefreshJob on constructor and on refresh

* preserve refresh_token before clear it on refresh

Co-authored-by: Jose Varela <joselcvarela@gmail.com>
2021-11-22 11:11:09 -05:00
renovate[bot]
241dc13c65 Update NPM dependencies (non-major) (#9968)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-22 10:05:40 -05:00
rijkvanzanten
ba72d2cfd0 v9.0.1 2021-11-11 16:45:31 -05:00
José Varela
da0676fefc Fix pass options to transport (#9725) 2021-11-11 15:34:14 +00:00
renovate[bot]
ad3a503f25 Update NPM dependencies (non-major) (#9585)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-09 11:18:41 -05:00
Nicola Krumschmidt
eeb78b96cc Include the ESM entrypoint when publishing to npm (#9535) 2021-11-05 12:06:33 -04:00
rijkvanzanten
c95add08ef v9.0.0 2021-11-04 22:03:10 -04:00
Nicola Krumschmidt
13b479ad49 Fix importing the SDK from a Node ESM environment (#9502) 2021-11-04 21:01:12 -04:00
José Varela
23f6baa4db SDK: refactor constructors (#9080)
* refactor: more intuitive interfaces

* refactor: simpler refresh
before: on every request we were debouncing a refresh request
after: call refresh only once before now() + 'expires'

* refactor: prefix on base storage

* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'

* refactor: simpler axios transport
before: handle auth headers
after: auth headers are handled on directus instance

* refactor: simpler usage of Directus constructor

* fixup! refactor: simpler refresh before: on every request we were debouncing a refresh request after: call refresh only once before now() + 'expires'

* refactor: fix tests based on previous changes

* refactor: better auth constructor
before: depends on SDK instance
after: depends on Transport and Storage instance

* accept staticToken from auth

* make transport and storage as optional on options

* fix type auth refresh

* simplify transport

* fix test for previous changes

* improve auth class

* revert some IAuth props because tests

* allow to force memory of localstorage on storage

* add tests for previous change

* document everything and simplify some things

* fix override headers on request

* better name typing

* fix private axios

* removed boolean from CLI auth.refresh()

* fix missing url in some examples

* soem grammar updates

Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-11-04 13:30:30 -04:00
rijkvanzanten
37cf80e0fe v9.0.0-rc.101 2021-11-03 19:29:41 -04:00
Nicola Krumschmidt
69d893123e Add exports fields to all packages (#9443) 2021-11-03 18:59:45 -04:00
renovate[bot]
a85460c0f2 Update dependency rollup to v2.59.0 (#9293)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-11-01 14:21:26 -04:00
rijkvanzanten
7e1034d9d4 v9.0.0-rc.100 2021-10-29 14:40:05 -04:00
renovate[bot]
1d2f139bb6 Update dependency ts-node to v10.4.0 (#9083)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-26 03:25:06 +00:00
renovate[bot]
24bbe3114c Update dependency axios to v0.24.0 (#9132)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-25 20:52:06 -04:00
renovate[bot]
a257f324c0 Update dependency rollup to v2.58.3 (#9114)
* Update dependency rollup to v2.58.3

* node version

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jay Cammarano <jay.cammarano@gmail.com>
2021-10-25 18:45:12 -04:00
rijkvanzanten
7c88f03884 v9.0.0-rc.99 2021-10-21 19:52:37 -04:00
renovate[bot]
f8587497d8 Update dependency ts-node to v10.3.1 (#9025)
* Update dependency ts-node to v10.3.1

* Update package-lock

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-21 15:10:39 -04:00
renovate[bot]
71093f5d2e Update dependency @rollup/plugin-commonjs to v21.0.1 (#8958)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:53:04 -04:00
renovate[bot]
a9432b6db3 Update dependency @rollup/plugin-node-resolve to v13.0.6 (#8959)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:52:51 -04:00
renovate[bot]
8c6a7b1b3e Update jest monorepo to v27.3.1 (#8967)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 09:23:55 -04:00
renovate[bot]
9d137af1a0 Update dependency nock to v13.1.4 (#8961)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-20 18:03:20 +08:00
renovate[bot]
6e3a63df2b Update jest monorepo to v27.3.0 (#8918)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-18 15:33:32 +00:00
renovate[bot]
f3400bb54d Update dependency ts-jest to v27.0.7 (#8915)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-18 11:02:42 -04:00
Daniil Yastremskiy
752689d32a Add geo operators to FilterOperators type (#8863) 2021-10-16 21:38:58 +00:00
rijkvanzanten
0dd0e1b1c1 v9.0.0-rc.98 2021-10-15 20:13:07 -04:00
rijkvanzanten
392d8bd1df v9.0.0-rc.97 2021-10-14 21:47:50 -04:00
renovate[bot]
4fb2dcc9a9 Update dependency ts-jest to v27.0.6 (#8803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-14 16:53:18 -04:00
renovate[bot]
2429d30917 Update dependency typescript to v4.4.4 (#8749)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-12 16:51:36 -04:00
renovate[bot]
b9a2a3a18b Update dependency axios to v0.23.0 (#8744) 2021-10-12 14:45:16 -04:00
renovate[bot]
b2ec182493 Update typescript-eslint monorepo to v5 (major) (#8702)
* Update typescript-eslint monorepo to v5

* Fix linter warnings

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-12 11:07:46 -04:00
renovate[bot]
86861ecb8d Update dependency ts-node to v10.3.0 (#8700)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-12 10:46:18 +08:00
renovate[bot]
b4bb1071f2 Update jest monorepo to v27.2.5 (#8656)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-08 11:45:56 -04:00
rijkvanzanten
435cc0cc67 v9.0.0-rc.96 2021-10-07 18:39:54 -04:00
renovate[bot]
06a52d10e6 Update dependency @rollup/plugin-commonjs to v21 (#8494)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-04 12:44:49 -04:00
renovate[bot]
b8d4a24958 Update dependency axios to v0.22.0 (#8483)
* Update dependency axios to v0.22.0

* Fix shared type

* Use any type in axios

* Adjust for axios type breaking change

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
2021-10-01 12:41:18 -04:00
renovate[bot]
a9dd90c03d Update dependency rollup to v2.58.0 (#8484)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2021-10-01 11:42:32 -04:00