@mixedbread/sdk 0.61.0 → 0.63.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 +48 -0
- package/client.d.mts +28 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +28 -6
- package/client.d.ts.map +1 -1
- package/client.js +33 -0
- package/client.js.map +1 -1
- package/client.mjs +33 -0
- package/client.mjs.map +1 -1
- package/internal/utils/env.js +2 -2
- package/internal/utils/env.js.map +1 -1
- package/internal/utils/env.mjs +2 -2
- package/internal/utils/env.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/api-keys.d.mts +8 -24
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +8 -24
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/data-sources/connectors.d.mts +55 -0
- package/resources/data-sources/connectors.d.mts.map +1 -1
- package/resources/data-sources/connectors.d.ts +55 -0
- package/resources/data-sources/connectors.d.ts.map +1 -1
- package/resources/data-sources/connectors.js +55 -0
- package/resources/data-sources/connectors.js.map +1 -1
- package/resources/data-sources/connectors.mjs +55 -0
- package/resources/data-sources/connectors.mjs.map +1 -1
- package/resources/data-sources/data-sources.d.mts +59 -50
- package/resources/data-sources/data-sources.d.mts.map +1 -1
- package/resources/data-sources/data-sources.d.ts +59 -50
- package/resources/data-sources/data-sources.d.ts.map +1 -1
- package/resources/data-sources/data-sources.js +37 -0
- package/resources/data-sources/data-sources.js.map +1 -1
- package/resources/data-sources/data-sources.mjs +37 -0
- package/resources/data-sources/data-sources.mjs.map +1 -1
- package/resources/data-sources/index.d.mts +1 -1
- package/resources/data-sources/index.d.mts.map +1 -1
- package/resources/data-sources/index.d.ts +1 -1
- package/resources/data-sources/index.d.ts.map +1 -1
- package/resources/data-sources/index.js.map +1 -1
- package/resources/data-sources/index.mjs.map +1 -1
- package/resources/embeddings.d.mts +9 -0
- package/resources/embeddings.d.mts.map +1 -1
- package/resources/embeddings.d.ts +9 -0
- package/resources/embeddings.d.ts.map +1 -1
- package/resources/embeddings.js +9 -0
- package/resources/embeddings.js.map +1 -1
- package/resources/embeddings.mjs +9 -0
- package/resources/embeddings.mjs.map +1 -1
- package/resources/files/files.d.mts +47 -0
- package/resources/files/files.d.mts.map +1 -1
- package/resources/files/files.d.ts +47 -0
- package/resources/files/files.d.ts.map +1 -1
- package/resources/files/files.js +47 -0
- package/resources/files/files.js.map +1 -1
- package/resources/files/files.mjs +47 -0
- package/resources/files/files.mjs.map +1 -1
- package/resources/files/uploads.d.mts +36 -0
- package/resources/files/uploads.d.mts.map +1 -1
- package/resources/files/uploads.d.ts +36 -0
- package/resources/files/uploads.d.ts.map +1 -1
- package/resources/files/uploads.js +36 -0
- package/resources/files/uploads.js.map +1 -1
- package/resources/files/uploads.mjs +36 -0
- package/resources/files/uploads.mjs.map +1 -1
- package/resources/index.d.mts +3 -3
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/parsing/index.d.mts +1 -1
- package/resources/parsing/index.d.mts.map +1 -1
- package/resources/parsing/index.d.ts +1 -1
- package/resources/parsing/index.d.ts.map +1 -1
- package/resources/parsing/index.js.map +1 -1
- package/resources/parsing/index.mjs.map +1 -1
- package/resources/parsing/jobs.d.mts +78 -85
- package/resources/parsing/jobs.d.mts.map +1 -1
- package/resources/parsing/jobs.d.ts +78 -85
- package/resources/parsing/jobs.d.ts.map +1 -1
- package/resources/parsing/jobs.js.map +1 -1
- package/resources/parsing/jobs.mjs.map +1 -1
- package/resources/parsing/parsing.d.mts +2 -2
- package/resources/parsing/parsing.d.mts.map +1 -1
- package/resources/parsing/parsing.d.ts +2 -2
- package/resources/parsing/parsing.d.ts.map +1 -1
- package/resources/parsing/parsing.js.map +1 -1
- package/resources/parsing/parsing.mjs.map +1 -1
- package/resources/stores/files.d.mts +155 -740
- package/resources/stores/files.d.mts.map +1 -1
- package/resources/stores/files.d.ts +155 -740
- package/resources/stores/files.d.ts.map +1 -1
- package/resources/stores/files.js +39 -12
- package/resources/stores/files.js.map +1 -1
- package/resources/stores/files.mjs +39 -12
- package/resources/stores/files.mjs.map +1 -1
- package/resources/stores/index.d.mts +2 -2
- package/resources/stores/index.d.mts.map +1 -1
- package/resources/stores/index.d.ts +2 -2
- package/resources/stores/index.d.ts.map +1 -1
- package/resources/stores/index.js.map +1 -1
- package/resources/stores/index.mjs.map +1 -1
- package/resources/stores/stores.d.mts +294 -532
- package/resources/stores/stores.d.mts.map +1 -1
- package/resources/stores/stores.d.ts +294 -532
- package/resources/stores/stores.d.ts.map +1 -1
- package/resources/stores/stores.js +56 -0
- package/resources/stores/stores.js.map +1 -1
- package/resources/stores/stores.mjs +56 -0
- package/resources/stores/stores.mjs.map +1 -1
- package/src/client.ts +72 -0
- package/src/internal/utils/env.ts +2 -2
- package/src/resources/api-keys.ts +8 -29
- package/src/resources/data-sources/connectors.ts +55 -0
- package/src/resources/data-sources/data-sources.ts +63 -56
- package/src/resources/data-sources/index.ts +2 -0
- package/src/resources/embeddings.ts +9 -0
- package/src/resources/files/files.ts +47 -0
- package/src/resources/files/uploads.ts +36 -0
- package/src/resources/index.ts +19 -0
- package/src/resources/parsing/index.ts +4 -1
- package/src/resources/parsing/jobs.ts +96 -100
- package/src/resources/parsing/parsing.ts +7 -1
- package/src/resources/stores/files.ts +332 -1243
- package/src/resources/stores/index.ts +22 -4
- package/src/resources/stores/stores.ts +433 -851
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-sources.mjs","sourceRoot":"","sources":["../../src/resources/data-sources/data-sources.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,aAAa;OAClB,EAOL,UAAU,GAGX;OAEM,EAAE,MAA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AAmB,EAAE,CAAA,MAAkB,CAAA,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,YAAoB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,oBAAoB,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC9E,CAAC;CACF;AA2SD,WAAW,CAAC,UAAU,GAAG,UAAU,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Connectors, type DataSourceConnector, type ConnectorDeleteResponse, type ConnectorCreateParams, type ConnectorRetrieveParams, type ConnectorUpdateParams, type ConnectorListParams, type ConnectorDeleteParams, type DataSourceConnectorsCursor, } from "./connectors.mjs";
|
|
2
|
-
export { DataSources, type DataSource, type DataSourceOauth2Params, type DataSourceType, type LinearDataSource, type NotionDataSource, type Oauth2Params, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesCursor, } from "./data-sources.mjs";
|
|
2
|
+
export { DataSources, type APIKeyCreateOrUpdateParams, type DataSource, type DataSourceAPIKeyParams, type DataSourceOauth2Params, type DataSourceType, type LinearDataSource, type NotionDataSource, type Oauth2Params, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesCursor, } from "./data-sources.mjs";
|
|
3
3
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Connectors, type DataSourceConnector, type ConnectorDeleteResponse, type ConnectorCreateParams, type ConnectorRetrieveParams, type ConnectorUpdateParams, type ConnectorListParams, type ConnectorDeleteParams, type DataSourceConnectorsCursor, } from "./connectors.js";
|
|
2
|
-
export { DataSources, type DataSource, type DataSourceOauth2Params, type DataSourceType, type LinearDataSource, type NotionDataSource, type Oauth2Params, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesCursor, } from "./data-sources.js";
|
|
2
|
+
export { DataSources, type APIKeyCreateOrUpdateParams, type DataSource, type DataSourceAPIKeyParams, type DataSourceOauth2Params, type DataSourceType, type LinearDataSource, type NotionDataSource, type Oauth2Params, type DataSourceDeleteResponse, type DataSourceCreateParams, type DataSourceUpdateParams, type DataSourceListParams, type DataSourcesCursor, } from "./data-sources.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"OAEO,EACL,UAAU,EACV,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,GAChC;OACM,EACL,WAAW,EACX,KAAK,0BAA0B,EAC/B,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAUsB;AATpB,wGAAA,UAAU,OAAA;AAUZ,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,8CAUsB;AATpB,wGAAA,UAAU,OAAA;AAUZ,kDAewB;AAdtB,2GAAA,WAAW,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,UAAU,GASX;OACM,EACL,WAAW,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/data-sources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,UAAU,GASX;OACM,EACL,WAAW,GAcZ"}
|
|
@@ -10,6 +10,15 @@ export declare class Embeddings extends APIResource {
|
|
|
10
10
|
* Args: params: The parameters for creating embeddings.
|
|
11
11
|
*
|
|
12
12
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const embeddingCreateResponse =
|
|
17
|
+
* await client.embeddings.create({
|
|
18
|
+
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
|
19
|
+
* input: 'x',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
|
|
15
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.mts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"embeddings.d.mts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,uBAAuB,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtG,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;CAC1D;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CACvG"}
|
|
@@ -10,6 +10,15 @@ export declare class Embeddings extends APIResource {
|
|
|
10
10
|
* Args: params: The parameters for creating embeddings.
|
|
11
11
|
*
|
|
12
12
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const embeddingCreateResponse =
|
|
17
|
+
* await client.embeddings.create({
|
|
18
|
+
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
|
19
|
+
* input: 'x',
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
13
22
|
*/
|
|
14
23
|
create(body: EmbeddingCreateParams, options?: RequestOptions): APIPromise<TopLevelAPI.EmbeddingCreateResponse>;
|
|
15
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,WAAW;OAChB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,WAAW,CAAC,uBAAuB,CAAC;CAGnD;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtG,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,eAAe,CAAC,EAAE,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;CAC1D;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EAAE,KAAK,cAAc,IAAI,cAAc,EAAE,KAAK,qBAAqB,IAAI,qBAAqB,EAAE,CAAC;CACvG"}
|
package/resources/embeddings.js
CHANGED
|
@@ -11,6 +11,15 @@ class Embeddings extends resource_1.APIResource {
|
|
|
11
11
|
* Args: params: The parameters for creating embeddings.
|
|
12
12
|
*
|
|
13
13
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const embeddingCreateResponse =
|
|
18
|
+
* await client.embeddings.create({
|
|
19
|
+
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
|
20
|
+
* input: 'x',
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
14
23
|
*/
|
|
15
24
|
create(body, options) {
|
|
16
25
|
return this._client.post('/v1/embeddings', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,MAAa,UAAW,SAAQ,sBAAW;IACzC
|
|
1
|
+
{"version":3,"file":"embeddings.js","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAK/C,MAAa,UAAW,SAAQ,sBAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AAxBD,gCAwBC"}
|
package/resources/embeddings.mjs
CHANGED
|
@@ -8,6 +8,15 @@ export class Embeddings extends APIResource {
|
|
|
8
8
|
* Args: params: The parameters for creating embeddings.
|
|
9
9
|
*
|
|
10
10
|
* Returns: EmbeddingCreateResponse: The response containing the embeddings.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const embeddingCreateResponse =
|
|
15
|
+
* await client.embeddings.create({
|
|
16
|
+
* model: 'mixedbread-ai/mxbai-embed-large-v1',
|
|
17
|
+
* input: 'x',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
11
20
|
*/
|
|
12
21
|
create(body, options) {
|
|
13
22
|
return this._client.post('/v1/embeddings', { body, ...options });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embeddings.mjs","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC
|
|
1
|
+
{"version":3,"file":"embeddings.mjs","sourceRoot":"","sources":["../src/resources/embeddings.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACJ,IAA2B,EAC3B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnE,CAAC;CACF"}
|
|
@@ -14,6 +14,13 @@ export declare class Files extends APIResource {
|
|
|
14
14
|
* Args: file: The file to upload.
|
|
15
15
|
*
|
|
16
16
|
* Returns: FileResponse: The response containing the details of the uploaded file.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const fileObject = await client.files.create({
|
|
21
|
+
* file: fs.createReadStream('path/to/file'),
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
create(body: FileCreateParams, options?: RequestOptions): APIPromise<FileObject>;
|
|
19
26
|
/**
|
|
@@ -22,6 +29,13 @@ export declare class Files extends APIResource {
|
|
|
22
29
|
* Args: file_id: The ID of the file to retrieve.
|
|
23
30
|
*
|
|
24
31
|
* Returns: FileResponse: The response containing the file details.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const fileObject = await client.files.retrieve(
|
|
36
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
25
39
|
*/
|
|
26
40
|
retrieve(fileID: string, options?: RequestOptions): APIPromise<FileObject>;
|
|
27
41
|
/**
|
|
@@ -30,6 +44,14 @@ export declare class Files extends APIResource {
|
|
|
30
44
|
* Args: file_id: The ID of the file to update. file: The new details for the file.
|
|
31
45
|
*
|
|
32
46
|
* Returns: FileObject: The updated file details.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const fileObject = await client.files.update(
|
|
51
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
52
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
33
55
|
*/
|
|
34
56
|
update(fileID: string, body: FileUpdateParams, options?: RequestOptions): APIPromise<FileObject>;
|
|
35
57
|
/**
|
|
@@ -38,6 +60,14 @@ export declare class Files extends APIResource {
|
|
|
38
60
|
* Args: pagination: The pagination options
|
|
39
61
|
*
|
|
40
62
|
* Returns: A list of files belonging to the user.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* // Automatically fetches more pages as needed.
|
|
67
|
+
* for await (const fileObject of client.files.list()) {
|
|
68
|
+
* // ...
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
41
71
|
*/
|
|
42
72
|
list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileObjectsCursor, FileObject>;
|
|
43
73
|
/**
|
|
@@ -46,6 +76,13 @@ export declare class Files extends APIResource {
|
|
|
46
76
|
* Args: file_id: The ID of the file to delete.
|
|
47
77
|
*
|
|
48
78
|
* Returns: FileDeleted: The response containing the details of the deleted file.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const file = await client.files.delete(
|
|
83
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
49
86
|
*/
|
|
50
87
|
delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse>;
|
|
51
88
|
/**
|
|
@@ -54,6 +91,16 @@ export declare class Files extends APIResource {
|
|
|
54
91
|
* Args: file_id: The ID of the file to download.
|
|
55
92
|
*
|
|
56
93
|
* Returns: FileStreamResponse: The response containing the file to be downloaded.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const response = await client.files.content(
|
|
98
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
99
|
+
* );
|
|
100
|
+
*
|
|
101
|
+
* const content = await response.blob();
|
|
102
|
+
* console.log(content);
|
|
103
|
+
* ```
|
|
57
104
|
*/
|
|
58
105
|
content(fileID: string, options?: RequestOptions): APIPromise<Response>;
|
|
59
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.mts","sourceRoot":"","sources":["../../src/resources/files/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,E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AAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;OAIG;IACH,eAAe,CAAC,EAAE,qBAAqB,CAAC;CACzC;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
|
@@ -14,6 +14,13 @@ export declare class Files extends APIResource {
|
|
|
14
14
|
* Args: file: The file to upload.
|
|
15
15
|
*
|
|
16
16
|
* Returns: FileResponse: The response containing the details of the uploaded file.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const fileObject = await client.files.create({
|
|
21
|
+
* file: fs.createReadStream('path/to/file'),
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
17
24
|
*/
|
|
18
25
|
create(body: FileCreateParams, options?: RequestOptions): APIPromise<FileObject>;
|
|
19
26
|
/**
|
|
@@ -22,6 +29,13 @@ export declare class Files extends APIResource {
|
|
|
22
29
|
* Args: file_id: The ID of the file to retrieve.
|
|
23
30
|
*
|
|
24
31
|
* Returns: FileResponse: The response containing the file details.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const fileObject = await client.files.retrieve(
|
|
36
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
37
|
+
* );
|
|
38
|
+
* ```
|
|
25
39
|
*/
|
|
26
40
|
retrieve(fileID: string, options?: RequestOptions): APIPromise<FileObject>;
|
|
27
41
|
/**
|
|
@@ -30,6 +44,14 @@ export declare class Files extends APIResource {
|
|
|
30
44
|
* Args: file_id: The ID of the file to update. file: The new details for the file.
|
|
31
45
|
*
|
|
32
46
|
* Returns: FileObject: The updated file details.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```ts
|
|
50
|
+
* const fileObject = await client.files.update(
|
|
51
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
52
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
53
|
+
* );
|
|
54
|
+
* ```
|
|
33
55
|
*/
|
|
34
56
|
update(fileID: string, body: FileUpdateParams, options?: RequestOptions): APIPromise<FileObject>;
|
|
35
57
|
/**
|
|
@@ -38,6 +60,14 @@ export declare class Files extends APIResource {
|
|
|
38
60
|
* Args: pagination: The pagination options
|
|
39
61
|
*
|
|
40
62
|
* Returns: A list of files belonging to the user.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* // Automatically fetches more pages as needed.
|
|
67
|
+
* for await (const fileObject of client.files.list()) {
|
|
68
|
+
* // ...
|
|
69
|
+
* }
|
|
70
|
+
* ```
|
|
41
71
|
*/
|
|
42
72
|
list(query?: FileListParams | null | undefined, options?: RequestOptions): PagePromise<FileObjectsCursor, FileObject>;
|
|
43
73
|
/**
|
|
@@ -46,6 +76,13 @@ export declare class Files extends APIResource {
|
|
|
46
76
|
* Args: file_id: The ID of the file to delete.
|
|
47
77
|
*
|
|
48
78
|
* Returns: FileDeleted: The response containing the details of the deleted file.
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* ```ts
|
|
82
|
+
* const file = await client.files.delete(
|
|
83
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
49
86
|
*/
|
|
50
87
|
delete(fileID: string, options?: RequestOptions): APIPromise<FileDeleteResponse>;
|
|
51
88
|
/**
|
|
@@ -54,6 +91,16 @@ export declare class Files extends APIResource {
|
|
|
54
91
|
* Args: file_id: The ID of the file to download.
|
|
55
92
|
*
|
|
56
93
|
* Returns: FileStreamResponse: The response containing the file to be downloaded.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* ```ts
|
|
97
|
+
* const response = await client.files.content(
|
|
98
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
99
|
+
* );
|
|
100
|
+
*
|
|
101
|
+
* const content = await response.blob();
|
|
102
|
+
* console.log(content);
|
|
103
|
+
* ```
|
|
57
104
|
*/
|
|
58
105
|
content(fileID: string, options?: RequestOptions): APIPromise<Response>;
|
|
59
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/files/files.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,EACR;OACM,EAAE,UAAU,EAAE;OACd,EAAE,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C/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,cAAe,SAAQ,YAAY;IAClD;;OAEG;IACH,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACnB;AAID,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC7B,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,cAAc,IAAI,cAAc,GACtC,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
package/resources/files/files.js
CHANGED
|
@@ -22,6 +22,13 @@ class Files extends resource_1.APIResource {
|
|
|
22
22
|
* Args: file: The file to upload.
|
|
23
23
|
*
|
|
24
24
|
* Returns: FileResponse: The response containing the details of the uploaded file.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const fileObject = await client.files.create({
|
|
29
|
+
* file: fs.createReadStream('path/to/file'),
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
25
32
|
*/
|
|
26
33
|
create(body, options) {
|
|
27
34
|
return (0, upload_file_1.handleFileCreate)(this._client, body, options);
|
|
@@ -32,6 +39,13 @@ class Files extends resource_1.APIResource {
|
|
|
32
39
|
* Args: file_id: The ID of the file to retrieve.
|
|
33
40
|
*
|
|
34
41
|
* Returns: FileResponse: The response containing the file details.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const fileObject = await client.files.retrieve(
|
|
46
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
47
|
+
* );
|
|
48
|
+
* ```
|
|
35
49
|
*/
|
|
36
50
|
retrieve(fileID, options) {
|
|
37
51
|
return this._client.get((0, path_1.path) `/v1/files/${fileID}`, options);
|
|
@@ -42,6 +56,14 @@ class Files extends resource_1.APIResource {
|
|
|
42
56
|
* Args: file_id: The ID of the file to update. file: The new details for the file.
|
|
43
57
|
*
|
|
44
58
|
* Returns: FileObject: The updated file details.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```ts
|
|
62
|
+
* const fileObject = await client.files.update(
|
|
63
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
64
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
65
|
+
* );
|
|
66
|
+
* ```
|
|
45
67
|
*/
|
|
46
68
|
update(fileID, body, options) {
|
|
47
69
|
return this._client.post((0, path_1.path) `/v1/files/${fileID}`, (0, uploads_2.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
@@ -52,6 +74,14 @@ class Files extends resource_1.APIResource {
|
|
|
52
74
|
* Args: pagination: The pagination options
|
|
53
75
|
*
|
|
54
76
|
* Returns: A list of files belonging to the user.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* // Automatically fetches more pages as needed.
|
|
81
|
+
* for await (const fileObject of client.files.list()) {
|
|
82
|
+
* // ...
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
55
85
|
*/
|
|
56
86
|
list(query = {}, options) {
|
|
57
87
|
return this._client.getAPIList('/v1/files', (pagination_1.Cursor), { query, ...options });
|
|
@@ -62,6 +92,13 @@ class Files extends resource_1.APIResource {
|
|
|
62
92
|
* Args: file_id: The ID of the file to delete.
|
|
63
93
|
*
|
|
64
94
|
* Returns: FileDeleted: The response containing the details of the deleted file.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```ts
|
|
98
|
+
* const file = await client.files.delete(
|
|
99
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
100
|
+
* );
|
|
101
|
+
* ```
|
|
65
102
|
*/
|
|
66
103
|
delete(fileID, options) {
|
|
67
104
|
return this._client.delete((0, path_1.path) `/v1/files/${fileID}`, options);
|
|
@@ -72,6 +109,16 @@ class Files extends resource_1.APIResource {
|
|
|
72
109
|
* Args: file_id: The ID of the file to download.
|
|
73
110
|
*
|
|
74
111
|
* Returns: FileStreamResponse: The response containing the file to be downloaded.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* const response = await client.files.content(
|
|
116
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
117
|
+
* );
|
|
118
|
+
*
|
|
119
|
+
* const content = await response.blob();
|
|
120
|
+
* console.log(content);
|
|
121
|
+
* ```
|
|
75
122
|
*/
|
|
76
123
|
content(fileID, options) {
|
|
77
124
|
return this._client.get((0, path_1.path) `/v1/files/${fileID}/content`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/files/files.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAUmB;AAEnB,yDAA+E;AAE/E,uDAAsD;AAEtD,uDAAqE;AACrE,uDAAiD;AACjD,0DAAqF;AAErF,MAAa,KAAM,SAAQ,sBAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"files.js","sourceRoot":"","sources":["../../src/resources/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AC,MAAM,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,EAAE,EAAE,OAAO,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,MAAc,EAAE,OAAwB;QAC9C,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,aAAa,MAAM,UAAU,EAAE;YACzD,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AA7HD,sBA6HC;AAgHD,KAAK,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -18,6 +18,13 @@ export class Files extends APIResource {
|
|
|
18
18
|
* Args: file: The file to upload.
|
|
19
19
|
*
|
|
20
20
|
* Returns: FileResponse: The response containing the details of the uploaded file.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const fileObject = await client.files.create({
|
|
25
|
+
* file: fs.createReadStream('path/to/file'),
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
21
28
|
*/
|
|
22
29
|
create(body, options) {
|
|
23
30
|
return handleFileCreate(this._client, body, options);
|
|
@@ -28,6 +35,13 @@ export class Files extends APIResource {
|
|
|
28
35
|
* Args: file_id: The ID of the file to retrieve.
|
|
29
36
|
*
|
|
30
37
|
* Returns: FileResponse: The response containing the file details.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* const fileObject = await client.files.retrieve(
|
|
42
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
43
|
+
* );
|
|
44
|
+
* ```
|
|
31
45
|
*/
|
|
32
46
|
retrieve(fileID, options) {
|
|
33
47
|
return this._client.get(path `/v1/files/${fileID}`, options);
|
|
@@ -38,6 +52,14 @@ export class Files extends APIResource {
|
|
|
38
52
|
* Args: file_id: The ID of the file to update. file: The new details for the file.
|
|
39
53
|
*
|
|
40
54
|
* Returns: FileObject: The updated file details.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const fileObject = await client.files.update(
|
|
59
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
60
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
41
63
|
*/
|
|
42
64
|
update(fileID, body, options) {
|
|
43
65
|
return this._client.post(path `/v1/files/${fileID}`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
@@ -48,6 +70,14 @@ export class Files extends APIResource {
|
|
|
48
70
|
* Args: pagination: The pagination options
|
|
49
71
|
*
|
|
50
72
|
* Returns: A list of files belonging to the user.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```ts
|
|
76
|
+
* // Automatically fetches more pages as needed.
|
|
77
|
+
* for await (const fileObject of client.files.list()) {
|
|
78
|
+
* // ...
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
51
81
|
*/
|
|
52
82
|
list(query = {}, options) {
|
|
53
83
|
return this._client.getAPIList('/v1/files', (Cursor), { query, ...options });
|
|
@@ -58,6 +88,13 @@ export class Files extends APIResource {
|
|
|
58
88
|
* Args: file_id: The ID of the file to delete.
|
|
59
89
|
*
|
|
60
90
|
* Returns: FileDeleted: The response containing the details of the deleted file.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```ts
|
|
94
|
+
* const file = await client.files.delete(
|
|
95
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
96
|
+
* );
|
|
97
|
+
* ```
|
|
61
98
|
*/
|
|
62
99
|
delete(fileID, options) {
|
|
63
100
|
return this._client.delete(path `/v1/files/${fileID}`, options);
|
|
@@ -68,6 +105,16 @@ export class Files extends APIResource {
|
|
|
68
105
|
* Args: file_id: The ID of the file to download.
|
|
69
106
|
*
|
|
70
107
|
* Returns: FileStreamResponse: The response containing the file to be downloaded.
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* ```ts
|
|
111
|
+
* const response = await client.files.content(
|
|
112
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
113
|
+
* );
|
|
114
|
+
*
|
|
115
|
+
* const content = await response.blob();
|
|
116
|
+
* console.log(content);
|
|
117
|
+
* ```
|
|
71
118
|
*/
|
|
72
119
|
content(fileID, options) {
|
|
73
120
|
return this._client.get(path `/v1/files/${fileID}/content`, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/files/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EASL,OAAO,GACR;OAEM,EAAE,MAAM,EAAkC;OAE1C,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;OACR,EAAE,gBAAgB,EAA8B;AAEvD,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"files.mjs","sourceRoot":"","sources":["../../src/resources/files/files.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EASL,OAAO,GACR;OAEM,EAAE,MAAM,EAAkC;OAE1C,EAAE,YAAY,EAAE;OAEhB,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;OACR,EAAE,gBAAgB,EAA8B;AAEvD,MAAM,OAAO,KAAM,SAAQ,WAAW;IAAtC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,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AAC,EAAE,MAAM,EAAE,0BAA0B,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACjF,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAgHD,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -6,24 +6,60 @@ export declare class Uploads extends APIResource {
|
|
|
6
6
|
/**
|
|
7
7
|
* Initiate a multipart upload and receive presigned URLs for uploading parts
|
|
8
8
|
* directly to storage.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const upload = await client.files.uploads.create({
|
|
13
|
+
* filename: 'document.pdf',
|
|
14
|
+
* file_size: 10485760,
|
|
15
|
+
* mime_type: 'application/pdf',
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
9
18
|
*/
|
|
10
19
|
create(body: UploadCreateParams, options?: RequestOptions): APIPromise<UploadCreateResponse>;
|
|
11
20
|
/**
|
|
12
21
|
* Get a multipart upload's details with fresh presigned URLs for any parts not yet
|
|
13
22
|
* uploaded.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const upload = await client.files.uploads.retrieve(
|
|
27
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
28
|
+
* );
|
|
29
|
+
* ```
|
|
14
30
|
*/
|
|
15
31
|
retrieve(uploadID: string, options?: RequestOptions): APIPromise<UploadRetrieveResponse>;
|
|
16
32
|
/**
|
|
17
33
|
* List all in-progress multipart uploads for the authenticated organization.
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```ts
|
|
37
|
+
* const uploads = await client.files.uploads.list();
|
|
38
|
+
* ```
|
|
18
39
|
*/
|
|
19
40
|
list(options?: RequestOptions): APIPromise<UploadListResponse>;
|
|
20
41
|
/**
|
|
21
42
|
* Abort a multipart upload and clean up any uploaded parts.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response = await client.files.uploads.abort(
|
|
47
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
22
50
|
*/
|
|
23
51
|
abort(uploadID: string, options?: RequestOptions): APIPromise<UploadAbortResponse>;
|
|
24
52
|
/**
|
|
25
53
|
* Complete a multipart upload after all parts have been uploaded. Creates the file
|
|
26
54
|
* object and returns it.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```ts
|
|
58
|
+
* const fileObject = await client.files.uploads.complete(
|
|
59
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
60
|
+
* { parts: [{ part_number: 1, etag: 'etag' }] },
|
|
61
|
+
* );
|
|
62
|
+
* ```
|
|
27
63
|
*/
|
|
28
64
|
complete(uploadID: string, body: UploadCompleteParams, options?: RequestOptions): APIPromise<FilesAPI.FileObject>;
|
|
29
65
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../../src/resources/files/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC
|
|
1
|
+
{"version":3,"file":"uploads.d.mts","sourceRoot":"","sources":["../../src/resources/files/uploads.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,QAAQ;OACb,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,oBAAoB,CAAC;IAI5F;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM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