anchorbrowser 0.8.0 → 0.8.1

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.8.1 (2025-10-27)
4
+
5
+ Full Changelog: [v0.8.0...v0.8.1](https://github.com/anchorbrowser/AnchorBrowser-SDK-Typescript/compare/v0.8.0...v0.8.1)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([39f7d39](https://github.com/anchorbrowser/AnchorBrowser-SDK-Typescript/commit/39f7d3984bab0e9c35a1d844ea53d69432714f54))
10
+
3
11
  ## 0.8.0 (2025-10-21)
4
12
 
5
13
  Full Changelog: [v0.7.0...v0.8.0](https://github.com/anchorbrowser/AnchorBrowser-SDK-Typescript/compare/v0.7.0...v0.8.0)
package/README.md CHANGED
@@ -26,9 +26,9 @@ const client = new Anchorbrowser({
26
26
  apiKey: process.env['ANCHORBROWSER_API_KEY'], // This is the default and can be omitted
27
27
  });
28
28
 
29
- const successResponse = await client.profiles.create({ name: 'REPLACE_ME' });
29
+ const session = await client.sessions.create({ session: { recording: { active: false } } });
30
30
 
31
- console.log(successResponse.data);
31
+ console.log(session.data);
32
32
  ```
33
33
 
34
34
  ### Request & Response types
@@ -43,8 +43,8 @@ const client = new Anchorbrowser({
43
43
  apiKey: process.env['ANCHORBROWSER_API_KEY'], // This is the default and can be omitted
44
44
  });
45
45
 
46
- const params: Anchorbrowser.ProfileCreateParams = { name: 'REPLACE_ME' };
47
- const successResponse: Anchorbrowser.SuccessResponse = await client.profiles.create(params);
46
+ const params: Anchorbrowser.SessionCreateParams = { session: { recording: { active: false } } };
47
+ const session: Anchorbrowser.SessionCreateResponse = await client.sessions.create(params);
48
48
  ```
49
49
 
50
50
  Documentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.
@@ -96,15 +96,17 @@ a subclass of `APIError` will be thrown:
96
96
 
97
97
  <!-- prettier-ignore -->
98
98
  ```ts
99
- const successResponse = await client.profiles.create({ name: 'REPLACE_ME' }).catch(async (err) => {
100
- if (err instanceof Anchorbrowser.APIError) {
101
- console.log(err.status); // 400
102
- console.log(err.name); // BadRequestError
103
- console.log(err.headers); // {server: 'nginx', ...}
104
- } else {
105
- throw err;
106
- }
107
- });
99
+ const session = await client.sessions
100
+ .create({ session: { recording: { active: false } } })
101
+ .catch(async (err) => {
102
+ if (err instanceof Anchorbrowser.APIError) {
103
+ console.log(err.status); // 400
104
+ console.log(err.name); // BadRequestError
105
+ console.log(err.headers); // {server: 'nginx', ...}
106
+ } else {
107
+ throw err;
108
+ }
109
+ });
108
110
  ```
109
111
 
110
112
  Error codes are as follows:
@@ -136,7 +138,7 @@ const client = new Anchorbrowser({
136
138
  });
137
139
 
138
140
  // Or, configure per-request:
139
- await client.profiles.create({ name: 'REPLACE_ME' }, {
141
+ await client.sessions.create({ session: { recording: { active: false } } }, {
140
142
  maxRetries: 5,
141
143
  });
142
144
  ```
@@ -153,7 +155,7 @@ const client = new Anchorbrowser({
153
155
  });
154
156
 
155
157
  // Override per-request:
156
- await client.profiles.create({ name: 'REPLACE_ME' }, {
158
+ await client.sessions.create({ session: { recording: { active: false } } }, {
157
159
  timeout: 5 * 1000,
158
160
  });
159
161
  ```
@@ -176,15 +178,15 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
176
178
  ```ts
177
179
  const client = new Anchorbrowser();
178
180
 
179
- const response = await client.profiles.create({ name: 'REPLACE_ME' }).asResponse();
181
+ const response = await client.sessions.create({ session: { recording: { active: false } } }).asResponse();
180
182
  console.log(response.headers.get('X-My-Header'));
181
183
  console.log(response.statusText); // access the underlying Response object
182
184
 
183
- const { data: successResponse, response: raw } = await client.profiles
184
- .create({ name: 'REPLACE_ME' })
185
+ const { data: session, response: raw } = await client.sessions
186
+ .create({ session: { recording: { active: false } } })
185
187
  .withResponse();
186
188
  console.log(raw.headers.get('X-My-Header'));
187
- console.log(successResponse.data);
189
+ console.log(session.data);
188
190
  ```
189
191
 
190
192
  ### Logging
@@ -264,7 +266,7 @@ parameter. This library doesn't validate at runtime that the request matches the
264
266
  send will be sent as-is.
265
267
 
266
268
  ```ts
267
- client.profiles.create({
269
+ client.sessions.create({
268
270
  // ...
269
271
  // @ts-expect-error baz is not yet public
270
272
  baz: 'undocumented option',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anchorbrowser",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "The official TypeScript library for the Anchorbrowser API",
5
5
  "author": "Anchorbrowser <support@anchorbrowser.io>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.8.0'; // x-release-please-version
1
+ export const VERSION = '0.8.1'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.8.0";
1
+ export declare const VERSION = "0.8.1";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.8.0";
1
+ export declare const VERSION = "0.8.1";
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.8.0'; // x-release-please-version
4
+ exports.VERSION = '0.8.1'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.8.0'; // x-release-please-version
1
+ export const VERSION = '0.8.1'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map