pocketbase
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -478,3 +478,3 @@ declare abstract class BaseModel { | ||
* If the `subscription` argument is not set, | ||
* then the client will unsubscibe from all registered subscriptions. | ||
* then the client will unsubscribe from all registered subscriptions. | ||
* | ||
@@ -511,3 +511,3 @@ * The related sse connection will be autoclosed if after the | ||
* client.beforeSend = function (url, reqConfig) { | ||
* reqConfig.headers = Object.assign(reqConfig.headers, { | ||
* reqConfig.headers = Object.assign({}, reqConfig.headers, { | ||
* 'X-Custom-Header': 'example', | ||
@@ -514,0 +514,0 @@ * }); |
@@ -478,3 +478,3 @@ declare abstract class BaseModel { | ||
* If the `subscription` argument is not set, | ||
* then the client will unsubscibe from all registered subscriptions. | ||
* then the client will unsubscribe from all registered subscriptions. | ||
* | ||
@@ -511,3 +511,3 @@ * The related sse connection will be autoclosed if after the | ||
* client.beforeSend = function (url, reqConfig) { | ||
* reqConfig.headers = Object.assign(reqConfig.headers, { | ||
* reqConfig.headers = Object.assign({}, reqConfig.headers, { | ||
* 'X-Custom-Header': 'example', | ||
@@ -514,0 +514,0 @@ * }); |
@@ -478,3 +478,3 @@ declare abstract class BaseModel { | ||
* If the `subscription` argument is not set, | ||
* then the client will unsubscibe from all registered subscriptions. | ||
* then the client will unsubscribe from all registered subscriptions. | ||
* | ||
@@ -511,3 +511,3 @@ * The related sse connection will be autoclosed if after the | ||
* client.beforeSend = function (url, reqConfig) { | ||
* reqConfig.headers = Object.assign(reqConfig.headers, { | ||
* reqConfig.headers = Object.assign({}, reqConfig.headers, { | ||
* 'X-Custom-Header': 'example', | ||
@@ -514,0 +514,0 @@ * }); |
{ | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"name": "pocketbase", | ||
@@ -16,3 +16,3 @@ "description": "PocketBase JavaScript SDK", | ||
}, | ||
"main": "./dist/pocketbase.cjs.js", | ||
"main": "./dist/pocketbase.es.mjs", | ||
"module": "./dist/pocketbase.es.mjs", | ||
@@ -19,0 +19,0 @@ "types": "./dist/pocketbase.es.d.mts", |
@@ -232,2 +232,5 @@ PocketBase JavaScript SDK | ||
> If you want to completelly disable the auto cancellation behavior, you could use the `client.beforeSend` hook and | ||
delete the `reqConfig.signal` property. | ||
#### Send hooks | ||
@@ -246,3 +249,3 @@ | ||
// https://developer.mozilla.org/en-US/docs/Web/API/fetch#options | ||
reqConfig.headers = Object.assign(reqConfig.headers, { | ||
reqConfig.headers = Object.assign({}, reqConfig.headers, { | ||
'X-Custom-Header': 'example', | ||
@@ -331,3 +334,3 @@ }); | ||
| 🔓`client.realtime.subscribe(subscription, callback)` | Inits the sse connection (if not already) and register the subscription. | | ||
| 🔓`client.realtime.unsubscribe(subscription = "")` | Unsubscribe from a subscription (if empty - unsubscibe from all registered subscriptions). | | ||
| 🔓`client.realtime.unsubscribe(subscription = "")` | Unsubscribe from a subscription (if empty - unsubscribe from all registered subscriptions). | | ||
| **[Collections](https://pocketbase.io/docs/api-collections)** | | | ||
@@ -334,0 +337,0 @@ | 🔐`client.collections.getList(page = 1, perPage = 30, queryParams = {})` | Returns paginated collections list. | |
Sorry, the diff of this file is not supported yet
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
363682
13
365