@finteqhub/sdk-js 0.12.0-beta.5 → 0.13.0
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.
- package/README.md +10 -2
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,6 +23,14 @@ const processing = new FinteqHubProcessing('api-url', 'fingerprint-visitor-id',
|
|
|
23
23
|
});
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
To disable retries entirely, pass `retryCount: 0` — every request is then sent exactly once, as in 0.11.0. Error diagnostics (`RequestError`, the `console.error` dump) are still collected:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
const processing = new FinteqHubProcessing('api-url', 'fingerprint-visitor-id', 'merchant-id', 'session-id', false, {
|
|
30
|
+
retryCount: 0,
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
26
34
|
The constructor throws a `TypeError` when `retryOptions` is not an object, `retryCount` is not a non-negative integer, or `retryStatusCode` is not a function.
|
|
27
35
|
|
|
28
36
|
Network errors (the browser could not reach the server at all, e.g. `TypeError: Failed to fetch`, or the connection dropped while the response body was being read) are always retried too.
|
|
@@ -48,7 +56,7 @@ Diagnostics are collected regardless of whether retries are enabled.
|
|
|
48
56
|
Every request the SDK makes carries an extra header:
|
|
49
57
|
|
|
50
58
|
```
|
|
51
|
-
|
|
59
|
+
x-pgw-sdk: sdk-js/<version>
|
|
52
60
|
```
|
|
53
61
|
|
|
54
62
|
The value contains the SDK name and version (kept in sync with `package.json` by a test) — for example `sdk-js/0.11.0`. FinteqHub uses this header to identify traffic coming from the official SDK integration — for example to notify affected merchants when a security fix is released. It does not affect authentication or request routing.
|
|
@@ -101,7 +109,7 @@ processing
|
|
|
101
109
|
|
|
102
110
|
## Releasing
|
|
103
111
|
|
|
104
|
-
On every version bump update **both** `package.json` `version` and `SDK_VERSION` in `src/version.ts` — they must stay in sync so the `
|
|
112
|
+
On every version bump update **both** `package.json` `version` and `SDK_VERSION` in `src/version.ts` — they must stay in sync so the `x-pgw-sdk` header reports the right version. `src/version.test.ts` fails CI if they drift (`node scripts/sync-version.js` updates `src/version.ts` from `package.json`). Describe the release in [CHANGELOG.md](CHANGELOG.md), including migration notes for breaking changes.
|
|
105
113
|
|
|
106
114
|
### Beta releases
|
|
107
115
|
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const SDK_HEADER_NAME = "
|
|
2
|
-
export declare const SDK_VERSION = "0.
|
|
1
|
+
export declare const SDK_HEADER_NAME = "x-pgw-sdk";
|
|
2
|
+
export declare const SDK_VERSION = "0.13.0";
|
|
3
3
|
export declare const SDK_HEADER_VALUE: string;
|
package/dist/src/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export const SDK_HEADER_NAME = "
|
|
2
|
-
export const SDK_VERSION = "0.
|
|
1
|
+
export const SDK_HEADER_NAME = "x-pgw-sdk";
|
|
2
|
+
export const SDK_VERSION = "0.13.0";
|
|
3
3
|
export const SDK_HEADER_VALUE = `sdk-js/${SDK_VERSION}`;
|