@oursprivacy/server-sdk 0.7.1 → 0.7.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.7.2 (2026-01-07)
4
+
5
+ Full Changelog: [v0.7.1...v0.7.2](https://github.com/with-ours/ingest-sdk-nodejs/compare/v0.7.1...v0.7.2)
6
+
7
+ ### Chores
8
+
9
+ * break long lines in snippets into multiline ([ef4799c](https://github.com/with-ours/ingest-sdk-nodejs/commit/ef4799ce7a2315b1c097d3362e2d77c461bfcae8))
10
+
3
11
  ## 0.7.1 (2026-01-06)
4
12
 
5
13
  Full Changelog: [v0.7.0...v0.7.1](https://github.com/with-ours/ingest-sdk-nodejs/compare/v0.7.0...v0.7.1)
package/README.md CHANGED
@@ -53,15 +53,17 @@ a subclass of `APIError` will be thrown:
53
53
 
54
54
  <!-- prettier-ignore -->
55
55
  ```ts
56
- const response = await client.track.event({ token: 'REPLACE_ME', event: 'REPLACE_ME' }).catch(async (err) => {
57
- if (err instanceof OursPrivacy.APIError) {
58
- console.log(err.status); // 400
59
- console.log(err.name); // BadRequestError
60
- console.log(err.headers); // {server: 'nginx', ...}
61
- } else {
62
- throw err;
63
- }
64
- });
56
+ const response = await client.track
57
+ .event({ token: 'REPLACE_ME', event: 'REPLACE_ME' })
58
+ .catch(async (err) => {
59
+ if (err instanceof OursPrivacy.APIError) {
60
+ console.log(err.status); // 400
61
+ console.log(err.name); // BadRequestError
62
+ console.log(err.headers); // {server: 'nginx', ...}
63
+ } else {
64
+ throw err;
65
+ }
66
+ });
65
67
  ```
66
68
 
67
69
  Error codes are as follows:
@@ -133,7 +135,9 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
133
135
  ```ts
134
136
  const client = new OursPrivacy();
135
137
 
136
- const response = await client.track.event({ token: 'REPLACE_ME', event: 'REPLACE_ME' }).asResponse();
138
+ const response = await client.track
139
+ .event({ token: 'REPLACE_ME', event: 'REPLACE_ME' })
140
+ .asResponse();
137
141
  console.log(response.headers.get('X-My-Header'));
138
142
  console.log(response.statusText); // access the underlying Response object
139
143
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oursprivacy/server-sdk",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "The official TypeScript library for the Ours Privacy API",
5
5
  "author": "Ours Privacy <support@oursprivacy.com>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.7.1'; // x-release-please-version
1
+ export const VERSION = '0.7.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.1";
1
+ export declare const VERSION = "0.7.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.7.1";
1
+ export declare const VERSION = "0.7.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.7.1'; // x-release-please-version
4
+ exports.VERSION = '0.7.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.7.1'; // x-release-please-version
1
+ export const VERSION = '0.7.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map