@expandai/sdk 0.5.1 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (2025-12-11)
4
+
5
+ Full Changelog: [v0.5.1...v0.6.0](https://github.com/expandai/expandai-node/compare/v0.5.1...v0.6.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** manual updates ([9502cd0](https://github.com/expandai/expandai-node/commit/9502cd0afd989496cb5813207f6714b9a204b444))
10
+
3
11
  ## 0.5.1 (2025-12-11)
4
12
 
5
13
  Full Changelog: [v0.5.0...v0.5.1](https://github.com/expandai/expandai-node/compare/v0.5.0...v0.5.1)
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # Expand TypeScript API Library
1
+ # expand.ai TypeScript API Library
2
2
 
3
3
  [![NPM version](<https://img.shields.io/npm/v/@expandai/sdk.svg?label=npm%20(stable)>)](https://npmjs.org/package/@expandai/sdk) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@expandai/sdk)
4
4
 
5
- This library provides convenient access to the Expand REST API from server-side TypeScript or JavaScript.
5
+ This library provides convenient access to the expand.ai REST API from server-side TypeScript or JavaScript.
6
6
 
7
7
  The REST API documentation can be found on [expand.ai](https://expand.ai/docs). The full API of this library can be found in [api.md](api.md).
8
8
 
@@ -26,7 +26,7 @@ const client = new Expand({
26
26
  apiKey: process.env['EXPAND_API_KEY'], // This is the default and can be omitted
27
27
  });
28
28
 
29
- const response = await client.fetch({ url: 'https://news.ycombinator.com/' });
29
+ const response = await client.fetch({ url: 'https://news.ycombinator.com' });
30
30
 
31
31
  console.log(response.data);
32
32
  ```
@@ -43,7 +43,7 @@ const client = new Expand({
43
43
  apiKey: process.env['EXPAND_API_KEY'], // This is the default and can be omitted
44
44
  });
45
45
 
46
- const params: Expand.FetchParams = { url: 'https://news.ycombinator.com/' };
46
+ const params: Expand.FetchParams = { url: 'https://news.ycombinator.com' };
47
47
  const response: Expand.FetchResponse = await client.fetch(params);
48
48
  ```
49
49
 
@@ -57,7 +57,7 @@ a subclass of `APIError` will be thrown:
57
57
 
58
58
  <!-- prettier-ignore -->
59
59
  ```ts
60
- const response = await client.fetch({ url: 'https://news.ycombinator.com/' }).catch(async (err) => {
60
+ const response = await client.fetch({ url: 'https://news.ycombinator.com' }).catch(async (err) => {
61
61
  if (err instanceof Expand.APIError) {
62
62
  console.log(err.status); // 400
63
63
  console.log(err.name); // BadRequestError
@@ -97,7 +97,7 @@ const client = new Expand({
97
97
  });
98
98
 
99
99
  // Or, configure per-request:
100
- await client.fetch({ url: 'https://news.ycombinator.com/' }, {
100
+ await client.fetch({ url: 'https://news.ycombinator.com' }, {
101
101
  maxRetries: 5,
102
102
  });
103
103
  ```
@@ -114,7 +114,7 @@ const client = new Expand({
114
114
  });
115
115
 
116
116
  // Override per-request:
117
- await client.fetch({ url: 'https://news.ycombinator.com/' }, {
117
+ await client.fetch({ url: 'https://news.ycombinator.com' }, {
118
118
  timeout: 5 * 1000,
119
119
  });
120
120
  ```
@@ -137,12 +137,12 @@ Unlike `.asResponse()` this method consumes the body, returning once it is parse
137
137
  ```ts
138
138
  const client = new Expand();
139
139
 
140
- const response = await client.fetch({ url: 'https://news.ycombinator.com/' }).asResponse();
140
+ const response = await client.fetch({ url: 'https://news.ycombinator.com' }).asResponse();
141
141
  console.log(response.headers.get('X-My-Header'));
142
142
  console.log(response.statusText); // access the underlying Response object
143
143
 
144
144
  const { data: response, response: raw } = await client
145
- .fetch({ url: 'https://news.ycombinator.com/' })
145
+ .fetch({ url: 'https://news.ycombinator.com' })
146
146
  .withResponse();
147
147
  console.log(raw.headers.get('X-My-Header'));
148
148
  console.log(response.data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expandai/sdk",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "description": "The official TypeScript library for the Expand API",
5
5
  "author": "Expand <support@expand.ai>",
6
6
  "types": "./index.d.ts",
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.5.1'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.1";
1
+ export declare const VERSION = "0.6.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.5.1";
1
+ export declare const VERSION = "0.6.0";
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.5.1'; // x-release-please-version
4
+ exports.VERSION = '0.6.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.5.1'; // x-release-please-version
1
+ export const VERSION = '0.6.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map