extend-ai 1.5.0 → 1.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/BaseClient.js CHANGED
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
44
44
  const headers = (0, headers_1.mergeHeaders)({
45
45
  "X-Fern-Language": "JavaScript",
46
46
  "X-Fern-SDK-Name": "extend-ai",
47
- "X-Fern-SDK-Version": "1.5.0",
48
- "User-Agent": "extend-ai/1.5.0",
47
+ "X-Fern-SDK-Version": "1.6.0",
48
+ "User-Agent": "extend-ai/1.6.0",
49
49
  "X-Fern-Runtime": core.RUNTIME.type,
50
50
  "X-Fern-Runtime-Version": core.RUNTIME.version,
51
51
  "x-extend-api-version": (_a = options === null || options === void 0 ? void 0 : options.extendApiVersion) !== null && _a !== void 0 ? _a : "2026-02-09",
@@ -323,6 +323,9 @@ class FilesClient {
323
323
  };
324
324
  const _body = yield core.newFormData();
325
325
  yield _body.appendFile("file", file);
326
+ if (request.password != null) {
327
+ _body.append("password", request.password);
328
+ }
326
329
  const _maybeEncodedRequest = yield _body.getRequest();
327
330
  const _authRequest = yield this._options.authProvider.getAuthRequest();
328
331
  const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2026-02-09" }, _maybeEncodedRequest.headers)), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
@@ -5,4 +5,6 @@
5
5
  export interface FilesUploadRequest {
6
6
  /** When true, converts the uploaded file to PDF. Supported file types include images (JPEG, PNG, TIFF, GIF, BMP, WebP, HEIC/HEIF), Word documents, PowerPoint, Excel, and HTML. */
7
7
  convertToPdf?: boolean;
8
+ /** The password to unlock a password-protected PDF. */
9
+ password?: string;
8
10
  }
@@ -1,3 +1,4 @@
1
+ import type * as Extend from "../index";
1
2
  export interface FileFromUrl {
2
3
  /**
3
4
  * A URL to download the file. For production use cases, we recommend using presigned URLs with a 5-15 minute expiration time.
@@ -7,4 +8,6 @@ export interface FileFromUrl {
7
8
  url: string;
8
9
  /** The name of the file. If not set, the file name is taken from the URL. */
9
10
  name?: string;
11
+ /** Optional settings for the file, such as a password for password-protected PDFs. */
12
+ settings?: Extend.FileFromUrlSettings;
10
13
  }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Optional settings for the file, such as a password for password-protected PDFs.
3
+ */
4
+ export interface FileFromUrlSettings {
5
+ /** The password to unlock a password-protected PDF. */
6
+ password?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -141,6 +141,7 @@ export * from "./FileContentsSheetsItem";
141
141
  export * from "./FileFromId";
142
142
  export * from "./FileFromText";
143
143
  export * from "./FileFromUrl";
144
+ export * from "./FileFromUrlSettings";
144
145
  export * from "./FileMetadata";
145
146
  export * from "./FileSummary";
146
147
  export * from "./FileType";
@@ -157,6 +157,7 @@ __exportStar(require("./FileContentsSheetsItem"), exports);
157
157
  __exportStar(require("./FileFromId"), exports);
158
158
  __exportStar(require("./FileFromText"), exports);
159
159
  __exportStar(require("./FileFromUrl"), exports);
160
+ __exportStar(require("./FileFromUrlSettings"), exports);
160
161
  __exportStar(require("./FileMetadata"), exports);
161
162
  __exportStar(require("./FileSummary"), exports);
162
163
  __exportStar(require("./FileType"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extend-ai",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.5.0";
1
+ export declare const SDK_VERSION = "1.6.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.5.0";
4
+ exports.SDK_VERSION = "1.6.0";