@vansite/ts-sharetribe-flex-sdk 3.0.6 → 3.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-axios-instance.d.ts","sourceRoot":"","sources":["../../../src/utils/prepare-axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAQjG,OAAO,aAAa,MAAM,QAAQ,CAAC;AAEnC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAgI/C,eAAO,MAAM,gBAAgB,UAO5B,CAAC;AAiBF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,YAA2B,CAAC;AAC9E,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,YAAgC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,GAAI,OAAO,UAAU,wBAC0D,CAAA;AAEnH,eAAO,MAAM,qBAAqB,GAChC,eAAe,0BAA0B,EACzC,KAAK,aAAa,GAAG,cAAc,wBAepC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,MAAM,GAAG,WACT,CAAC;AAG5C,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,IACrC,UAAU,aAAa,KAAG,OAAO,CAAC,aAAa,CAAC,CA2BnF;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,KAAK,EAAE,UAAU,GAAG,GAAG,oBAqIxB;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,aAAa,EAAE,0BAA0B,GACxC,OAAO,CAAC,0BAA0B,CAAC,CAsHrC;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,MAAM,EAAE,kBAAkB,2BAY3B;AAGD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,QAqBvE"}
1
+ {"version":3,"file":"prepare-axios-instance.d.ts","sourceRoot":"","sources":["../../../src/utils/prepare-axios-instance.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,OAAO,CAAC;AAQjG,OAAO,aAAa,MAAM,QAAQ,CAAC;AAEnC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAgI/C,eAAO,MAAM,gBAAgB,UAO5B,CAAC;AAiBF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,YAA2B,CAAC;AAC9E,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,YAAgC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,GAAI,OAAO,UAAU,wBAC0D,CAAA;AAEnH,eAAO,MAAM,qBAAqB,GAChC,eAAe,0BAA0B,EACzC,KAAK,aAAa,GAAG,cAAc,wBAepC,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,MAAM,GAAG,WACT,CAAC;AAG5C,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,IACrC,UAAU,aAAa,KAAG,OAAO,CAAC,aAAa,CAAC,CA+BnF;AAED,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,KAAK,EAAE,UAAU,GAAG,GAAG,oBAyIxB;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,aAAa,EAAE,0BAA0B,GACxC,OAAO,CAAC,0BAA0B,CAAC,CAsHrC;AAED,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,aAAa,GAAG,cAAc,EACnC,MAAM,EAAE,kBAAkB,2BAY3B;AAGD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,aAAa,GAAG,cAAc,QAqBvE"}
@@ -28,8 +28,9 @@ export type BrowserStoreOptions = {
28
28
  /**
29
29
  * `BrowserStore` is an implementation of the `TokenStore` interface for storing authentication tokens in browser cookies.
30
30
  *
31
- * **Security Note:** This store uses JavaScript-accessible cookies. For maximum security in production,
32
- * consider using `ExpressStore` with `httpOnly: true` which prevents JavaScript access to tokens.
31
+ * **Note:** This store shares the same cookie key as `ExpressStore` (using the `st` namespace).
32
+ * The `ExpressStore` must NOT use `httpOnly: true` when both stores are used together,
33
+ * as that would prevent this store from reading or writing the shared cookie.
33
34
  */
34
35
  declare class BrowserStore implements TokenStore {
35
36
  expiration: number;
@@ -1 +1 @@
1
- {"version":3,"file":"BrowserStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/BrowserStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;GAKG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,UAAU,EAAE,MAAM,CAAM;IACxB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK5B;IAEF;;;OAGG;gBACS,EACV,QAAQ,EACR,MAAc,EACd,QAAgB,EAChB,IAAU,EACV,MAAM,GACP,EAAE,mBAAmB;IAkBtB;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAc5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAOhC;;OAEG;IACH,WAAW,IAAI,IAAI;CAGpB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"BrowserStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/BrowserStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;GAMG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,UAAU,EAAE,MAAM,CAAM;IACxB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,QAAQ,CAAC,aAAa,CAK5B;IAEF;;;OAGG;gBACS,EACV,QAAQ,EACR,MAAc,EACd,QAAgB,EAChB,IAAU,EACV,MAAM,GACP,EAAE,mBAAmB;IAkBtB;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAc5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAOhC;;OAEG;IACH,WAAW,IAAI,IAAI;CAGpB;AAED,eAAe,YAAY,CAAC"}
@@ -14,7 +14,10 @@ export type ExpressStoreOptions = {
14
14
  secure?: boolean;
15
15
  /**
16
16
  * Whether to set httpOnly flag (prevents JavaScript access).
17
- * Defaults to true for security. This is the recommended setting for server-side token storage.
17
+ * Defaults to false to match the original Sharetribe SDK behavior and allow
18
+ * the BrowserStore to share the same cookie. Setting to true will prevent
19
+ * client-side JavaScript from reading or writing the token cookie, which
20
+ * breaks the shared session model between server and client SDK instances.
18
21
  */
19
22
  httpOnly?: boolean;
20
23
  /**
@@ -26,8 +29,9 @@ export type ExpressStoreOptions = {
26
29
  /**
27
30
  * `ExpressStore` is an implementation of the `TokenStore` interface for managing authentication tokens via cookies in an Express application.
28
31
  *
29
- * **Security Note:** This store supports `httpOnly` cookies (default: true), which prevents JavaScript access to tokens
30
- * and is the recommended approach for production server-side token storage.
32
+ * **Note:** This store defaults to `httpOnly: false` to match the original Sharetribe SDK behavior.
33
+ * Server and client SDK instances share the same cookie, so httpOnly must be false
34
+ * for the BrowserStore to read/write the token set by the server.
31
35
  */
32
36
  declare class ExpressStore implements TokenStore {
33
37
  expiration: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ExpressStore.d.ts","sourceRoot":"","sources":["../../../../src/utils/stores/ExpressStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE1C,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAElD;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,OAAO,CAAC;IACb,GAAG,EAAE,QAAQ,CAAC;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC,CAAC;AAEF;;;;;GAKG;AACH,cAAM,YAAa,YAAW,UAAU;IACtC,UAAU,EAAE,MAAM,CAAO;IACzB,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,aAAa,CAInB;IACF,OAAO,CAAC,GAAG,CAAU;IACrB,OAAO,CAAC,GAAG,CAAW;IACtB,OAAO,CAAC,YAAY,CAA0B;IAE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AC,EAAE,mBAAmB;IAqBzG;;;OAGG;IACH,QAAQ,IAAI,SAAS,GAAG,IAAI;IAK5B;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAQhC;;OAEG;IACH,WAAW,IAAI,IAAI;IAKnB;;;OAGG;IACH,OAAO,CAAC,UAAU;CAanB;AAED,eAAe,YAAY,CAAC"}
@@ -28,8 +28,9 @@ export type BrowserStoreOptions = {
28
28
  /**
29
29
  * `BrowserStore` is an implementation of the `TokenStore` interface for storing authentication tokens in browser cookies.
30
30
  *
31
- * **Security Note:** This store uses JavaScript-accessible cookies. For maximum security in production,
32
- * consider using `ExpressStore` with `httpOnly: true` which prevents JavaScript access to tokens.
31
+ * **Note:** This store shares the same cookie key as `ExpressStore` (using the `st` namespace).
32
+ * The `ExpressStore` must NOT use `httpOnly: true` when both stores are used together,
33
+ * as that would prevent this store from reading or writing the shared cookie.
33
34
  */
34
35
  declare class BrowserStore implements TokenStore {
35
36
  expiration: number;
@@ -14,7 +14,10 @@ export type ExpressStoreOptions = {
14
14
  secure?: boolean;
15
15
  /**
16
16
  * Whether to set httpOnly flag (prevents JavaScript access).
17
- * Defaults to true for security. This is the recommended setting for server-side token storage.
17
+ * Defaults to false to match the original Sharetribe SDK behavior and allow
18
+ * the BrowserStore to share the same cookie. Setting to true will prevent
19
+ * client-side JavaScript from reading or writing the token cookie, which
20
+ * breaks the shared session model between server and client SDK instances.
18
21
  */
19
22
  httpOnly?: boolean;
20
23
  /**
@@ -26,8 +29,9 @@ export type ExpressStoreOptions = {
26
29
  /**
27
30
  * `ExpressStore` is an implementation of the `TokenStore` interface for managing authentication tokens via cookies in an Express application.
28
31
  *
29
- * **Security Note:** This store supports `httpOnly` cookies (default: true), which prevents JavaScript access to tokens
30
- * and is the recommended approach for production server-side token storage.
32
+ * **Note:** This store defaults to `httpOnly: false` to match the original Sharetribe SDK behavior.
33
+ * Server and client SDK instances share the same cookie, so httpOnly must be false
34
+ * for the BrowserStore to read/write the token set by the server.
31
35
  */
32
36
  declare class ExpressStore implements TokenStore {
33
37
  expiration: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vansite/ts-sharetribe-flex-sdk",
3
- "version": "3.0.6",
3
+ "version": "3.0.8",
4
4
  "description": "This is a TypeScript SDK for Sharetribe Flex API. It reduces the complexity of the API and provides a more user-friendly interface.",
5
5
  "keywords": [
6
6
  "sharetribe",