Comparing version 10.0.0-alpha.18 to 10.0.0-alpha.19
@@ -6,2 +6,13 @@ # Change Log | ||
# [10.0.0-alpha.19](https://github.com/wopian/kitsu/compare/v10.0.0-alpha.18...v10.0.0-alpha.19) (2021-12-09) | ||
### Features | ||
* **kitsu:** add axios options for all operations ([#623](https://github.com/wopian/kitsu/issues/623)) ([2e4dc9e](https://github.com/wopian/kitsu/commit/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e)) | ||
# [10.0.0-alpha.18](https://github.com/wopian/kitsu/compare/v10.0.0-alpha.17...v10.0.0-alpha.18) (2021-11-02) | ||
@@ -8,0 +19,0 @@ |
@@ -58,3 +58,4 @@ 'use strict'; | ||
params, | ||
paramsSerializer: p => kitsuCore.query(p) | ||
paramsSerializer: p => kitsuCore.query(p), | ||
...config.axiosOptions | ||
}); | ||
@@ -96,3 +97,4 @@ return responseHeaders ? { ...kitsuCore.deserialise(data), | ||
params, | ||
paramsSerializer: p => kitsuCore.query(p) | ||
paramsSerializer: p => kitsuCore.query(p), | ||
...config.axiosOptions | ||
}); | ||
@@ -132,3 +134,4 @@ return responseHeaders ? { ...kitsuCore.deserialise(data), | ||
params, | ||
paramsSerializer: p => kitsuCore.query(p) | ||
paramsSerializer: p => kitsuCore.query(p), | ||
...config.axiosOptions | ||
}); | ||
@@ -184,3 +187,4 @@ return responseHeaders ? { ...kitsuCore.deserialise(data), | ||
params, | ||
paramsSerializer: p => kitsuCore.query(p) | ||
paramsSerializer: p => kitsuCore.query(p), | ||
...config.axiosOptions | ||
}); | ||
@@ -216,3 +220,4 @@ return responseHeaders ? { ...kitsuCore.deserialise(data), | ||
params | ||
} | ||
}, | ||
...config.axiosOptions | ||
}); | ||
@@ -240,3 +245,4 @@ return res.headers ? { ...{ | ||
url, | ||
headers | ||
headers, | ||
axiosOptions | ||
} = _ref; | ||
@@ -262,3 +268,4 @@ | ||
params, | ||
paramsSerializer: p => kitsuCore.query(p) | ||
paramsSerializer: p => kitsuCore.query(p), | ||
...axiosOptions | ||
}); | ||
@@ -265,0 +272,0 @@ return responseHeaders ? { ...kitsuCore.deserialise(data), |
{ | ||
"version": "10.0.0-alpha.18", | ||
"version": "10.0.0-alpha.19", | ||
"name": "kitsu", | ||
@@ -50,6 +50,5 @@ "description": "A simple, lightweight & framework agnostic JSON:API client using Axios", | ||
}, | ||
"sideEffects": false, | ||
"dependencies": { | ||
"axios": "^0.24.0", | ||
"kitsu-core": "^10.0.0-alpha.18", | ||
"kitsu-core": "^10.0.0-alpha.19", | ||
"pluralize": "^8.0.0" | ||
@@ -65,3 +64,3 @@ }, | ||
"path": "./dist/index.mjs", | ||
"limit": "10 kb", | ||
"limit": "11 kb", | ||
"brotli": true | ||
@@ -72,3 +71,3 @@ } | ||
"devDependencies": { | ||
"@size-limit/preset-small-lib": "~6.0.0" | ||
"@size-limit/preset-small-lib": "~7.0.0" | ||
}, | ||
@@ -75,0 +74,0 @@ "exports": { |
@@ -245,3 +245,3 @@ <h1 align=center>Kitsu</h1> | ||
[packages/kitsu/src/index.js:30-513](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L30-L513 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:30-523](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L30-L523 "Source code on GitHub") | ||
@@ -291,3 +291,3 @@ Creates a new `kitsu` instance | ||
[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:52-53](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L52-L53 "Source code on GitHub") | ||
@@ -311,3 +311,3 @@ * **See**: <https://www.npmjs.com/package/pluralize> for documentation | ||
[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:67-67](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L67-L67 "Source code on GitHub") | ||
@@ -340,3 +340,3 @@ Get the current headers or add additional headers | ||
[packages/kitsu/src/index.js:113-113](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L113-L113 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:113-113](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L113-L113 "Source code on GitHub") | ||
@@ -388,3 +388,3 @@ * **See**: <https://github.com/axios/axios#interceptors> for documentation | ||
[packages/kitsu/src/index.js:210-238](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L210-L238 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:211-240](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L211-L240 "Source code on GitHub") | ||
@@ -413,2 +413,3 @@ Fetch resources (alias `fetch`) | ||
* `config.params.page.after` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* `config.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
@@ -526,3 +527,3 @@ ##### Examples | ||
[packages/kitsu/src/index.js:273-300](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L273-L300 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:276-304](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L276-L304 "Source code on GitHub") | ||
@@ -539,2 +540,3 @@ Update a resource (alias `update`) | ||
* `config.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request | ||
* `config.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
@@ -589,3 +591,3 @@ ##### Examples | ||
[packages/kitsu/src/index.js:330-355](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L330-L355 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:334-360](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L334-L360 "Source code on GitHub") | ||
@@ -634,3 +636,3 @@ Create a new resource (alias `create`) | ||
[packages/kitsu/src/index.js:372-405](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L372-L405 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:378-412](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L378-L412 "Source code on GitHub") | ||
@@ -647,2 +649,3 @@ Remove a resource (alias `remove`) | ||
* `config.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request | ||
* `config.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
@@ -667,3 +670,3 @@ ##### Examples | ||
[packages/kitsu/src/index.js:428-437](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L428-L437 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:436-445](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L436-L445 "Source code on GitHub") | ||
@@ -680,2 +683,3 @@ Get the authenticated user's data | ||
* `config.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request | ||
* `config.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
@@ -706,3 +710,3 @@ ##### Examples | ||
[packages/kitsu/src/index.js:491-512](https://github.com/wopian/kitsu/blob/5163896a3358d83ac419fd43edb92ae123a0f052/packages/kitsu/src/index.js#L491-L512 "Source code on GitHub") | ||
[packages/kitsu/src/index.js:500-522](https://github.com/wopian/kitsu/blob/2e4dc9e70ea5ec183c72193ccc79bf1eabb8e37e/packages/kitsu/src/index.js#L500-L522 "Source code on GitHub") | ||
@@ -723,2 +727,3 @@ Send arbitrary requests | ||
* `config.headers` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional headers to send with the request | ||
* `config.axiosOptions` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?** Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
@@ -725,0 +730,0 @@ ##### Examples |
@@ -61,2 +61,3 @@ /** | ||
}; | ||
axiosOptions?: any; | ||
}) => any; | ||
@@ -66,2 +67,3 @@ update: (model: string, body: any | any[], config?: { | ||
headers?: any; | ||
axiosOptions?: any; | ||
}) => any | any[]; | ||
@@ -75,2 +77,3 @@ create: (model: string, body: any | any[], config?: { | ||
headers?: any; | ||
axiosOptions?: any; | ||
}) => any | any[]; | ||
@@ -131,2 +134,3 @@ /** | ||
* @param {string} [config.params.page.after] Get the next page of resources (Cursor-based) - **Note:** Not Supported on Kitsu.io | ||
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
* @returns {Object} JSON-parsed response | ||
@@ -223,2 +227,3 @@ * @example <caption>Getting a resource with JSON:API parameters</caption> | ||
}; | ||
axiosOptions?: any; | ||
}): any; | ||
@@ -234,2 +239,3 @@ /** | ||
* @param {Object} [config.headers] Additional headers to send with the request | ||
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
* @returns {Object|Object[]} JSON-parsed response | ||
@@ -262,2 +268,3 @@ * @example <caption>Update a resource</caption> | ||
headers?: any; | ||
axiosOptions?: any; | ||
}): any | any[]; | ||
@@ -305,2 +312,3 @@ /** | ||
* @param {Object} [config.headers] Additional headers to send with the request | ||
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
* @returns {Object|Object[]} JSON-parsed response | ||
@@ -315,2 +323,3 @@ * @example <caption>Remove a single resource</caption> | ||
headers?: any; | ||
axiosOptions?: any; | ||
}): any | any[]; | ||
@@ -326,2 +335,3 @@ /** | ||
* @param {Object} [config.headers] Additional headers to send with the request | ||
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
* @returns {Object} JSON-parsed response | ||
@@ -342,2 +352,3 @@ * @example <caption>Get the authenticated user's resource</caption> | ||
headers?: any; | ||
axiosOptions?: any; | ||
}): any; | ||
@@ -357,2 +368,3 @@ /** | ||
* @param {Object} [config.headers] Additional headers to send with the request | ||
* @param {Object} [config.axiosOptions] Additional options for the axios instance (see [axios/axios#request-config](https://github.com/axios/axios#request-config) for details) | ||
* @returns {Object} JSON-parsed response | ||
@@ -397,3 +409,3 @@ * @example <caption>Raw GET request</caption> | ||
*/ | ||
request({ body, method, params, type, url, headers }?: { | ||
request({ body, method, params, type, url, headers, axiosOptions }?: { | ||
url: string; | ||
@@ -405,3 +417,4 @@ type: string; | ||
headers?: any; | ||
axiosOptions?: any; | ||
}): any; | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83584
918
775
Updatedkitsu-core@^10.0.0-alpha.19