@mixedbread/sdk 0.1.0-alpha.10
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 +230 -0
- package/LICENSE +201 -0
- package/README.md +360 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +241 -0
- package/core.d.ts.map +1 -0
- package/core.js +915 -0
- package/core.js.map +1 -0
- package/core.mjs +883 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +113 -0
- package/error.js.map +1 -0
- package/error.mjs +97 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +169 -0
- package/index.d.ts +169 -0
- package/index.d.ts.map +1 -0
- package/index.js +175 -0
- package/index.js.map +1 -0
- package/index.mjs +132 -0
- package/index.mjs.map +1 -0
- package/lib/polling.d.ts +48 -0
- package/lib/polling.d.ts.map +1 -0
- package/lib/polling.js +75 -0
- package/lib/polling.js.map +1 -0
- package/lib/polling.mjs +71 -0
- package/lib/polling.mjs.map +1 -0
- package/package.json +124 -0
- package/pagination.d.ts +30 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +45 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +41 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/embeddings.d.ts +177 -0
- package/resources/embeddings.d.ts.map +1 -0
- package/resources/embeddings.js +20 -0
- package/resources/embeddings.js.map +1 -0
- package/resources/embeddings.mjs +16 -0
- package/resources/embeddings.mjs.map +1 -0
- package/resources/extractions/content.d.ts +33 -0
- package/resources/extractions/content.d.ts.map +1 -0
- package/resources/extractions/content.js +19 -0
- package/resources/extractions/content.js.map +1 -0
- package/resources/extractions/content.mjs +15 -0
- package/resources/extractions/content.mjs.map +1 -0
- package/resources/extractions/extractions.d.ts +18 -0
- package/resources/extractions/extractions.d.ts.map +1 -0
- package/resources/extractions/extractions.js +47 -0
- package/resources/extractions/extractions.js.map +1 -0
- package/resources/extractions/extractions.mjs +20 -0
- package/resources/extractions/extractions.mjs.map +1 -0
- package/resources/extractions/index.d.ts +5 -0
- package/resources/extractions/index.d.ts.map +1 -0
- package/resources/extractions/index.js +13 -0
- package/resources/extractions/index.js.map +1 -0
- package/resources/extractions/index.mjs +6 -0
- package/resources/extractions/index.mjs.map +1 -0
- package/resources/extractions/jobs.d.ts +84 -0
- package/resources/extractions/jobs.d.ts.map +1 -0
- package/resources/extractions/jobs.js +29 -0
- package/resources/extractions/jobs.js.map +1 -0
- package/resources/extractions/jobs.mjs +25 -0
- package/resources/extractions/jobs.mjs.map +1 -0
- package/resources/extractions/schema.d.ts +85 -0
- package/resources/extractions/schema.d.ts.map +1 -0
- package/resources/extractions/schema.js +39 -0
- package/resources/extractions/schema.js.map +1 -0
- package/resources/extractions/schema.mjs +35 -0
- package/resources/extractions/schema.mjs.map +1 -0
- package/resources/files.d.ts +125 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +99 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +71 -0
- package/resources/files.mjs.map +1 -0
- package/resources/index.d.ts +8 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +32 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +8 -0
- package/resources/index.mjs.map +1 -0
- package/resources/parsing/index.d.ts +3 -0
- package/resources/parsing/index.d.ts.map +1 -0
- package/resources/parsing/index.js +10 -0
- package/resources/parsing/index.js.map +1 -0
- package/resources/parsing/index.mjs +4 -0
- package/resources/parsing/index.mjs.map +1 -0
- package/resources/parsing/jobs.d.ts +290 -0
- package/resources/parsing/jobs.d.ts.map +1 -0
- package/resources/parsing/jobs.js +147 -0
- package/resources/parsing/jobs.js.map +1 -0
- package/resources/parsing/jobs.mjs +119 -0
- package/resources/parsing/jobs.mjs.map +1 -0
- package/resources/parsing/parsing.d.ts +10 -0
- package/resources/parsing/parsing.d.ts.map +1 -0
- package/resources/parsing/parsing.js +40 -0
- package/resources/parsing/parsing.js.map +1 -0
- package/resources/parsing/parsing.mjs +13 -0
- package/resources/parsing/parsing.mjs.map +1 -0
- package/resources/shared.d.ts +35 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/top-level.d.ts +165 -0
- package/resources/top-level.d.ts.map +1 -0
- package/resources/top-level.js +4 -0
- package/resources/top-level.js.map +1 -0
- package/resources/top-level.mjs +3 -0
- package/resources/top-level.mjs.map +1 -0
- package/resources/vector-stores/files.d.ts +284 -0
- package/resources/vector-stores/files.d.ts.map +1 -0
- package/resources/vector-stores/files.js +167 -0
- package/resources/vector-stores/files.js.map +1 -0
- package/resources/vector-stores/files.mjs +139 -0
- package/resources/vector-stores/files.mjs.map +1 -0
- package/resources/vector-stores/index.d.ts +3 -0
- package/resources/vector-stores/index.d.ts.map +1 -0
- package/resources/vector-stores/index.js +11 -0
- package/resources/vector-stores/index.js.map +1 -0
- package/resources/vector-stores/index.mjs +4 -0
- package/resources/vector-stores/index.mjs.map +1 -0
- package/resources/vector-stores/vector-stores.d.ts +425 -0
- package/resources/vector-stores/vector-stores.d.ts.map +1 -0
- package/resources/vector-stores/vector-stores.js +121 -0
- package/resources/vector-stores/vector-stores.js.map +1 -0
- package/resources/vector-stores/vector-stores.mjs +93 -0
- package/resources/vector-stores/vector-stores.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1208 -0
- package/src/error.ts +130 -0
- package/src/index.ts +346 -0
- package/src/lib/.keep +4 -0
- package/src/lib/polling.ts +115 -0
- package/src/pagination.ts +82 -0
- package/src/resource.ts +11 -0
- package/src/resources/embeddings.ts +248 -0
- package/src/resources/extractions/content.ts +42 -0
- package/src/resources/extractions/extractions.ts +47 -0
- package/src/resources/extractions/index.ts +14 -0
- package/src/resources/extractions/jobs.ts +105 -0
- package/src/resources/extractions/schema.ts +111 -0
- package/src/resources/files.ts +181 -0
- package/src/resources/index.ts +39 -0
- package/src/resources/parsing/index.ts +12 -0
- package/src/resources/parsing/jobs.ts +453 -0
- package/src/resources/parsing/parsing.ts +32 -0
- package/src/resources/shared.ts +41 -0
- package/src/resources/top-level.ts +231 -0
- package/src/resources/vector-stores/files.ts +439 -0
- package/src/resources/vector-stores/index.ts +31 -0
- package/src/resources/vector-stores/vector-stores.ts +592 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
@@ -0,0 +1,15 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
3
|
+
export class Content extends APIResource {
|
4
|
+
/**
|
5
|
+
* Extract content from a string using the provided schema.
|
6
|
+
*
|
7
|
+
* Args: params: The parameters for extracting content from a string.
|
8
|
+
*
|
9
|
+
* Returns: The extracted content.
|
10
|
+
*/
|
11
|
+
create(body, options) {
|
12
|
+
return this._client.post('/v1/extractions/content', { body, ...options });
|
13
|
+
}
|
14
|
+
}
|
15
|
+
//# sourceMappingURL=content.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"content.mjs","sourceRoot":"","sources":["../../src/resources/extractions/content.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;OAMG;IACH,MAAM,CAAC,IAAyB,EAAE,OAA6B;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,yBAAyB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
2
|
+
import * as ContentAPI from "./content.js";
|
3
|
+
import { Content, ContentCreateParams, ExtractionResult } from "./content.js";
|
4
|
+
import * as JobsAPI from "./jobs.js";
|
5
|
+
import { ExtractionJob, JobCreateParams, Jobs } from "./jobs.js";
|
6
|
+
import * as SchemaAPI from "./schema.js";
|
7
|
+
import { CreatedJsonSchema, EnhancedJsonSchema, Schema, SchemaCreateParams, SchemaEnhanceParams, SchemaValidateParams, ValidatedJsonSchema } from "./schema.js";
|
8
|
+
export declare class Extractions extends APIResource {
|
9
|
+
jobs: JobsAPI.Jobs;
|
10
|
+
schema: SchemaAPI.Schema;
|
11
|
+
content: ContentAPI.Content;
|
12
|
+
}
|
13
|
+
export declare namespace Extractions {
|
14
|
+
export { Jobs as Jobs, type ExtractionJob as ExtractionJob, type JobCreateParams as JobCreateParams };
|
15
|
+
export { Schema as Schema, type CreatedJsonSchema as CreatedJsonSchema, type EnhancedJsonSchema as EnhancedJsonSchema, type ValidatedJsonSchema as ValidatedJsonSchema, type SchemaCreateParams as SchemaCreateParams, type SchemaEnhanceParams as SchemaEnhanceParams, type SchemaValidateParams as SchemaValidateParams, };
|
16
|
+
export { Content as Content, type ExtractionResult as ExtractionResult, type ContentCreateParams as ContentCreateParams, };
|
17
|
+
}
|
18
|
+
//# sourceMappingURL=extractions.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extractions.d.ts","sourceRoot":"","sources":["../../src/resources/extractions/extractions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC3E,OAAO,KAAK,OAAO,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,UAAU,CAAC;AACtC,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,EACN,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAElB,qBAAa,WAAY,SAAQ,WAAW;IAC1C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAC9D,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAMD,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;IAEtG,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
4
|
+
if (k2 === undefined) k2 = k;
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
8
|
+
}
|
9
|
+
Object.defineProperty(o, k2, desc);
|
10
|
+
}) : (function(o, m, k, k2) {
|
11
|
+
if (k2 === undefined) k2 = k;
|
12
|
+
o[k2] = m[k];
|
13
|
+
}));
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
16
|
+
}) : function(o, v) {
|
17
|
+
o["default"] = v;
|
18
|
+
});
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
20
|
+
if (mod && mod.__esModule) return mod;
|
21
|
+
var result = {};
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
23
|
+
__setModuleDefault(result, mod);
|
24
|
+
return result;
|
25
|
+
};
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
27
|
+
exports.Extractions = void 0;
|
28
|
+
const resource_1 = require("../../resource.js");
|
29
|
+
const ContentAPI = __importStar(require("./content.js"));
|
30
|
+
const content_1 = require("./content.js");
|
31
|
+
const JobsAPI = __importStar(require("./jobs.js"));
|
32
|
+
const jobs_1 = require("./jobs.js");
|
33
|
+
const SchemaAPI = __importStar(require("./schema.js"));
|
34
|
+
const schema_1 = require("./schema.js");
|
35
|
+
class Extractions extends resource_1.APIResource {
|
36
|
+
constructor() {
|
37
|
+
super(...arguments);
|
38
|
+
this.jobs = new JobsAPI.Jobs(this._client);
|
39
|
+
this.schema = new SchemaAPI.Schema(this._client);
|
40
|
+
this.content = new ContentAPI.Content(this._client);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
exports.Extractions = Extractions;
|
44
|
+
Extractions.Jobs = jobs_1.Jobs;
|
45
|
+
Extractions.Schema = schema_1.Schema;
|
46
|
+
Extractions.Content = content_1.Content;
|
47
|
+
//# sourceMappingURL=extractions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extractions.js","sourceRoot":"","sources":["../../src/resources/extractions/extractions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAC7C,yDAAwC;AACxC,0CAA2E;AAC3E,mDAAkC;AAClC,oCAA8D;AAC9D,uDAAsC;AACtC,wCAQkB;AAElB,MAAa,WAAY,SAAQ,sBAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAJD,kCAIC;AAED,WAAW,CAAC,IAAI,GAAG,WAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,eAAM,CAAC;AAC5B,WAAW,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
3
|
+
import * as ContentAPI from "./content.mjs";
|
4
|
+
import { Content } from "./content.mjs";
|
5
|
+
import * as JobsAPI from "./jobs.mjs";
|
6
|
+
import { Jobs } from "./jobs.mjs";
|
7
|
+
import * as SchemaAPI from "./schema.mjs";
|
8
|
+
import { Schema, } from "./schema.mjs";
|
9
|
+
export class Extractions extends APIResource {
|
10
|
+
constructor() {
|
11
|
+
super(...arguments);
|
12
|
+
this.jobs = new JobsAPI.Jobs(this._client);
|
13
|
+
this.schema = new SchemaAPI.Schema(this._client);
|
14
|
+
this.content = new ContentAPI.Content(this._client);
|
15
|
+
}
|
16
|
+
}
|
17
|
+
Extractions.Jobs = Jobs;
|
18
|
+
Extractions.Schema = Schema;
|
19
|
+
Extractions.Content = Content;
|
20
|
+
//# sourceMappingURL=extractions.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"extractions.mjs","sourceRoot":"","sources":["../../src/resources/extractions/extractions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EAAE,OAAO,EAAyC;OAClD,KAAK,OAAO;OACZ,EAAkC,IAAI,EAAE;OACxC,KAAK,SAAS;OACd,EAGL,MAAM,GAKP;AAED,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC9D,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC;AACxB,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC;AAC5B,WAAW,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { Content, type ExtractionResult, type ContentCreateParams } from "./content.js";
|
2
|
+
export { Extractions } from "./extractions.js";
|
3
|
+
export { Jobs, type ExtractionJob, type JobCreateParams } from "./jobs.js";
|
4
|
+
export { Schema, type CreatedJsonSchema, type EnhancedJsonSchema, type ValidatedJsonSchema, type SchemaCreateParams, type SchemaEnhanceParams, type SchemaValidateParams, } from "./schema.js";
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/extractions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,QAAQ,CAAC;AACxE,OAAO,EACL,MAAM,EACN,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,UAAU,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.Schema = exports.Jobs = exports.Extractions = exports.Content = void 0;
|
5
|
+
var content_1 = require("./content.js");
|
6
|
+
Object.defineProperty(exports, "Content", { enumerable: true, get: function () { return content_1.Content; } });
|
7
|
+
var extractions_1 = require("./extractions.js");
|
8
|
+
Object.defineProperty(exports, "Extractions", { enumerable: true, get: function () { return extractions_1.Extractions; } });
|
9
|
+
var jobs_1 = require("./jobs.js");
|
10
|
+
Object.defineProperty(exports, "Jobs", { enumerable: true, get: function () { return jobs_1.Jobs; } });
|
11
|
+
var schema_1 = require("./schema.js");
|
12
|
+
Object.defineProperty(exports, "Schema", { enumerable: true, get: function () { return schema_1.Schema; } });
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/extractions/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAAqF;AAA5E,kGAAA,OAAO,OAAA;AAChB,gDAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,kCAAwE;AAA/D,4FAAA,IAAI,OAAA;AACb,sCAQkB;AAPhB,gGAAA,MAAM,OAAA"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
export { Content } from "./content.mjs";
|
3
|
+
export { Extractions } from "./extractions.mjs";
|
4
|
+
export { Jobs } from "./jobs.mjs";
|
5
|
+
export { Schema, } from "./schema.mjs";
|
6
|
+
//# sourceMappingURL=index.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/extractions/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAAmD;OAC5D,EAAE,WAAW,EAAE;OACf,EAAE,IAAI,EAA4C;OAClD,EACL,MAAM,GAOP"}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
2
|
+
import * as Core from "../../core.js";
|
3
|
+
import * as ContentAPI from "./content.js";
|
4
|
+
export declare class Jobs extends APIResource {
|
5
|
+
/**
|
6
|
+
* Start an extraction job for the provided file and schema.
|
7
|
+
*
|
8
|
+
* Args: params: The parameters for creating an extraction job.
|
9
|
+
*
|
10
|
+
* Returns: The created extraction job.
|
11
|
+
*/
|
12
|
+
create(body: JobCreateParams, options?: Core.RequestOptions): Core.APIPromise<ExtractionJob>;
|
13
|
+
/**
|
14
|
+
* Get detailed information about a specific extraction job.
|
15
|
+
*
|
16
|
+
* Args: job_id: The ID of the extraction job.
|
17
|
+
*
|
18
|
+
* Returns: Detailed information about the extraction job.
|
19
|
+
*/
|
20
|
+
retrieve(jobId: string, options?: Core.RequestOptions): Core.APIPromise<ExtractionJob>;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* A job for extracting structured data from documents.
|
24
|
+
*/
|
25
|
+
export interface ExtractionJob {
|
26
|
+
/**
|
27
|
+
* Unique identifier for the extraction job
|
28
|
+
*/
|
29
|
+
id: string;
|
30
|
+
/**
|
31
|
+
* ID of the organization that owns this job
|
32
|
+
*/
|
33
|
+
organization_id: string;
|
34
|
+
/**
|
35
|
+
* ID of the file being extracted
|
36
|
+
*/
|
37
|
+
file_id: string;
|
38
|
+
/**
|
39
|
+
* When the job was created
|
40
|
+
*/
|
41
|
+
created_at: string;
|
42
|
+
/**
|
43
|
+
* When the job was last updated
|
44
|
+
*/
|
45
|
+
updated_at: string;
|
46
|
+
/**
|
47
|
+
* When the job started processing
|
48
|
+
*/
|
49
|
+
started_at: string | null;
|
50
|
+
/**
|
51
|
+
* When the job finished processing
|
52
|
+
*/
|
53
|
+
finished_at: string | null;
|
54
|
+
/**
|
55
|
+
* Current status of the job
|
56
|
+
*/
|
57
|
+
status: 'pending' | 'in_progress' | 'cancelled' | 'completed' | 'failed';
|
58
|
+
/**
|
59
|
+
* The result of an extraction job.
|
60
|
+
*/
|
61
|
+
result: ContentAPI.ExtractionResult | null;
|
62
|
+
/**
|
63
|
+
* Error information if failed
|
64
|
+
*/
|
65
|
+
error: unknown | null;
|
66
|
+
/**
|
67
|
+
* The JSON schema used for extraction
|
68
|
+
*/
|
69
|
+
json_schema: unknown;
|
70
|
+
}
|
71
|
+
export interface JobCreateParams {
|
72
|
+
/**
|
73
|
+
* The ID of the file to extract from
|
74
|
+
*/
|
75
|
+
file_id: string;
|
76
|
+
/**
|
77
|
+
* The JSON schema to use for extraction
|
78
|
+
*/
|
79
|
+
json_schema: unknown;
|
80
|
+
}
|
81
|
+
export declare namespace Jobs {
|
82
|
+
export { type ExtractionJob as ExtractionJob, type JobCreateParams as JobCreateParams };
|
83
|
+
}
|
84
|
+
//# sourceMappingURL=jobs.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jobs.d.ts","sourceRoot":"","sources":["../../src/resources/extractions/jobs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AAExC,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;IAI5F;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;CAGvF;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;OAEG;IACH,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAC;IAEzE;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAE3C;;OAEG;IACH,KAAK,EAAE,OAAO,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EAAE,KAAK,aAAa,IAAI,aAAa,EAAE,KAAK,eAAe,IAAI,eAAe,EAAE,CAAC;CACzF"}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.Jobs = void 0;
|
5
|
+
const resource_1 = require("../../resource.js");
|
6
|
+
class Jobs extends resource_1.APIResource {
|
7
|
+
/**
|
8
|
+
* Start an extraction job for the provided file and schema.
|
9
|
+
*
|
10
|
+
* Args: params: The parameters for creating an extraction job.
|
11
|
+
*
|
12
|
+
* Returns: The created extraction job.
|
13
|
+
*/
|
14
|
+
create(body, options) {
|
15
|
+
return this._client.post('/v1/extractions/jobs', { body, ...options });
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* Get detailed information about a specific extraction job.
|
19
|
+
*
|
20
|
+
* Args: job_id: The ID of the extraction job.
|
21
|
+
*
|
22
|
+
* Returns: Detailed information about the extraction job.
|
23
|
+
*/
|
24
|
+
retrieve(jobId, options) {
|
25
|
+
return this._client.get(`/v1/extractions/jobs/${jobId}`, options);
|
26
|
+
}
|
27
|
+
}
|
28
|
+
exports.Jobs = Jobs;
|
29
|
+
//# sourceMappingURL=jobs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jobs.js","sourceRoot":"","sources":["../../src/resources/extractions/jobs.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAI7C,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,IAAqB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF;AAtBD,oBAsBC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
3
|
+
export class Jobs extends APIResource {
|
4
|
+
/**
|
5
|
+
* Start an extraction job for the provided file and schema.
|
6
|
+
*
|
7
|
+
* Args: params: The parameters for creating an extraction job.
|
8
|
+
*
|
9
|
+
* Returns: The created extraction job.
|
10
|
+
*/
|
11
|
+
create(body, options) {
|
12
|
+
return this._client.post('/v1/extractions/jobs', { body, ...options });
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Get detailed information about a specific extraction job.
|
16
|
+
*
|
17
|
+
* Args: job_id: The ID of the extraction job.
|
18
|
+
*
|
19
|
+
* Returns: Detailed information about the extraction job.
|
20
|
+
*/
|
21
|
+
retrieve(jobId, options) {
|
22
|
+
return this._client.get(`/v1/extractions/jobs/${jobId}`, options);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
//# sourceMappingURL=jobs.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"jobs.mjs","sourceRoot":"","sources":["../../src/resources/extractions/jobs.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAItB,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;OAMG;IACH,MAAM,CAAC,IAAqB,EAAE,OAA6B;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,KAAa,EAAE,OAA6B;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,KAAK,EAAE,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;CACF"}
|
@@ -0,0 +1,85 @@
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
2
|
+
import * as Core from "../../core.js";
|
3
|
+
export declare class Schema extends APIResource {
|
4
|
+
/**
|
5
|
+
* Create a schema with the provided parameters.
|
6
|
+
*
|
7
|
+
* Args: params: The parameters for creating a schema.
|
8
|
+
*
|
9
|
+
* Returns: The created schema.
|
10
|
+
*/
|
11
|
+
create(body: SchemaCreateParams, options?: Core.RequestOptions): Core.APIPromise<CreatedJsonSchema>;
|
12
|
+
/**
|
13
|
+
* Enhance a schema by enriching the descriptions to aid extraction.
|
14
|
+
*
|
15
|
+
* Args: params: The parameters for enhancing a schema.
|
16
|
+
*
|
17
|
+
* Returns: The enhanced schema.
|
18
|
+
*/
|
19
|
+
enhance(body: SchemaEnhanceParams, options?: Core.RequestOptions): Core.APIPromise<EnhancedJsonSchema>;
|
20
|
+
/**
|
21
|
+
* Validate a schema.
|
22
|
+
*
|
23
|
+
* Args: params: The parameters for validating a schema.
|
24
|
+
*
|
25
|
+
* Returns: The validation result.
|
26
|
+
*/
|
27
|
+
validate(body: SchemaValidateParams, options?: Core.RequestOptions): Core.APIPromise<ValidatedJsonSchema>;
|
28
|
+
}
|
29
|
+
/**
|
30
|
+
* Result of creating a JSON schema.
|
31
|
+
*/
|
32
|
+
export interface CreatedJsonSchema {
|
33
|
+
/**
|
34
|
+
* The created JSON schema
|
35
|
+
*/
|
36
|
+
json_schema: unknown;
|
37
|
+
}
|
38
|
+
/**
|
39
|
+
* Result of enhancing a JSON schema.
|
40
|
+
*/
|
41
|
+
export interface EnhancedJsonSchema {
|
42
|
+
/**
|
43
|
+
* The enhanced JSON schema
|
44
|
+
*/
|
45
|
+
json_schema: unknown;
|
46
|
+
}
|
47
|
+
/**
|
48
|
+
* Result of validating a JSON schema.
|
49
|
+
*/
|
50
|
+
export interface ValidatedJsonSchema {
|
51
|
+
/**
|
52
|
+
* Whether the schema is valid
|
53
|
+
*/
|
54
|
+
is_valid: boolean;
|
55
|
+
/**
|
56
|
+
* List of validation errors
|
57
|
+
*/
|
58
|
+
errors: Array<string>;
|
59
|
+
/**
|
60
|
+
* The validated JSON schema
|
61
|
+
*/
|
62
|
+
json_schema: unknown;
|
63
|
+
}
|
64
|
+
export interface SchemaCreateParams {
|
65
|
+
/**
|
66
|
+
* Description of the data to extract
|
67
|
+
*/
|
68
|
+
description: string;
|
69
|
+
}
|
70
|
+
export interface SchemaEnhanceParams {
|
71
|
+
/**
|
72
|
+
* The JSON schema to enhance
|
73
|
+
*/
|
74
|
+
json_schema: unknown;
|
75
|
+
}
|
76
|
+
export interface SchemaValidateParams {
|
77
|
+
/**
|
78
|
+
* The JSON schema to validate
|
79
|
+
*/
|
80
|
+
json_schema: unknown;
|
81
|
+
}
|
82
|
+
export declare namespace Schema {
|
83
|
+
export { type CreatedJsonSchema as CreatedJsonSchema, type EnhancedJsonSchema as EnhancedJsonSchema, type ValidatedJsonSchema as ValidatedJsonSchema, type SchemaCreateParams as SchemaCreateParams, type SchemaEnhanceParams as SchemaEnhanceParams, type SchemaValidateParams as SchemaValidateParams, };
|
84
|
+
}
|
85
|
+
//# sourceMappingURL=schema.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/resources/extractions/schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AAEnC,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AAkB,EAC7C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
exports.Schema = void 0;
|
5
|
+
const resource_1 = require("../../resource.js");
|
6
|
+
class Schema extends resource_1.APIResource {
|
7
|
+
/**
|
8
|
+
* Create a schema with the provided parameters.
|
9
|
+
*
|
10
|
+
* Args: params: The parameters for creating a schema.
|
11
|
+
*
|
12
|
+
* Returns: The created schema.
|
13
|
+
*/
|
14
|
+
create(body, options) {
|
15
|
+
return this._client.post('/v1/extractions/schema', { body, ...options });
|
16
|
+
}
|
17
|
+
/**
|
18
|
+
* Enhance a schema by enriching the descriptions to aid extraction.
|
19
|
+
*
|
20
|
+
* Args: params: The parameters for enhancing a schema.
|
21
|
+
*
|
22
|
+
* Returns: The enhanced schema.
|
23
|
+
*/
|
24
|
+
enhance(body, options) {
|
25
|
+
return this._client.post('/v1/extractions/schema/enhance', { body, ...options });
|
26
|
+
}
|
27
|
+
/**
|
28
|
+
* Validate a schema.
|
29
|
+
*
|
30
|
+
* Args: params: The parameters for validating a schema.
|
31
|
+
*
|
32
|
+
* Returns: The validation result.
|
33
|
+
*/
|
34
|
+
validate(body, options) {
|
35
|
+
return this._client.post('/v1/extractions/schema/validate', { body, ...options });
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Schema = Schema;
|
39
|
+
//# sourceMappingURL=schema.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/resources/extractions/schema.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;OAMG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAyB,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF;AAjCD,wBAiCC"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
3
|
+
export class Schema extends APIResource {
|
4
|
+
/**
|
5
|
+
* Create a schema with the provided parameters.
|
6
|
+
*
|
7
|
+
* Args: params: The parameters for creating a schema.
|
8
|
+
*
|
9
|
+
* Returns: The created schema.
|
10
|
+
*/
|
11
|
+
create(body, options) {
|
12
|
+
return this._client.post('/v1/extractions/schema', { body, ...options });
|
13
|
+
}
|
14
|
+
/**
|
15
|
+
* Enhance a schema by enriching the descriptions to aid extraction.
|
16
|
+
*
|
17
|
+
* Args: params: The parameters for enhancing a schema.
|
18
|
+
*
|
19
|
+
* Returns: The enhanced schema.
|
20
|
+
*/
|
21
|
+
enhance(body, options) {
|
22
|
+
return this._client.post('/v1/extractions/schema/enhance', { body, ...options });
|
23
|
+
}
|
24
|
+
/**
|
25
|
+
* Validate a schema.
|
26
|
+
*
|
27
|
+
* Args: params: The parameters for validating a schema.
|
28
|
+
*
|
29
|
+
* Returns: The validation result.
|
30
|
+
*/
|
31
|
+
validate(body, options) {
|
32
|
+
return this._client.post('/v1/extractions/schema/validate', { body, ...options });
|
33
|
+
}
|
34
|
+
}
|
35
|
+
//# sourceMappingURL=schema.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"schema.mjs","sourceRoot":"","sources":["../../src/resources/extractions/schema.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;OAMG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wBAAwB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAyB,EAAE,OAA6B;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;OAMG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpF,CAAC;CACF"}
|
@@ -0,0 +1,125 @@
|
|
1
|
+
import { APIResource } from "../resource.js";
|
2
|
+
import * as Core from "../core.js";
|
3
|
+
import { LimitOffset, type LimitOffsetParams } from "../pagination.js";
|
4
|
+
import { type Response } from "../_shims/index.js";
|
5
|
+
export declare class Files extends APIResource {
|
6
|
+
/**
|
7
|
+
* Upload a new file.
|
8
|
+
*
|
9
|
+
* Args: file: The file to upload.
|
10
|
+
*
|
11
|
+
* Returns: FileResponse: The response containing the details of the uploaded file.
|
12
|
+
*/
|
13
|
+
create(body: FileCreateParams, options?: Core.RequestOptions): Core.APIPromise<FileObject>;
|
14
|
+
/**
|
15
|
+
* Retrieve details of a specific file by its ID.
|
16
|
+
*
|
17
|
+
* Args: file_id: The ID of the file to retrieve.
|
18
|
+
*
|
19
|
+
* Returns: FileResponse: The response containing the file details.
|
20
|
+
*/
|
21
|
+
retrieve(fileId: string, options?: Core.RequestOptions): Core.APIPromise<FileObject>;
|
22
|
+
/**
|
23
|
+
* Update the details of a specific file.
|
24
|
+
*
|
25
|
+
* Args: file_id: The ID of the file to update. file: The new details for the file.
|
26
|
+
*
|
27
|
+
* Returns: FileObject: The updated file details.
|
28
|
+
*/
|
29
|
+
update(fileId: string, body: FileUpdateParams, options?: Core.RequestOptions): Core.APIPromise<FileObject>;
|
30
|
+
/**
|
31
|
+
* List all files for the authenticated user.
|
32
|
+
*
|
33
|
+
* Args: pagination: The pagination options
|
34
|
+
*
|
35
|
+
* Returns: A list of files belonging to the user.
|
36
|
+
*/
|
37
|
+
list(query?: FileListParams, options?: Core.RequestOptions): Core.PagePromise<FileObjectsLimitOffset, FileObject>;
|
38
|
+
list(options?: Core.RequestOptions): Core.PagePromise<FileObjectsLimitOffset, FileObject>;
|
39
|
+
/**
|
40
|
+
* Delete a specific file by its ID.
|
41
|
+
*
|
42
|
+
* Args: file_id: The ID of the file to delete.
|
43
|
+
*
|
44
|
+
* Returns: FileDeleted: The response containing the details of the deleted file.
|
45
|
+
*/
|
46
|
+
delete(fileId: string, options?: Core.RequestOptions): Core.APIPromise<FileDeleteResponse>;
|
47
|
+
/**
|
48
|
+
* Download a specific file by its ID.
|
49
|
+
*
|
50
|
+
* Args: file_id: The ID of the file to download.
|
51
|
+
*
|
52
|
+
* Returns: FileStreamResponse: The response containing the file to be downloaded.
|
53
|
+
*/
|
54
|
+
content(fileId: string, options?: Core.RequestOptions): Core.APIPromise<Response>;
|
55
|
+
}
|
56
|
+
export declare class FileObjectsLimitOffset extends LimitOffset<FileObject> {
|
57
|
+
}
|
58
|
+
/**
|
59
|
+
* A model representing a file object in the system.
|
60
|
+
*
|
61
|
+
* This model contains metadata about files stored in the system, including
|
62
|
+
* identifiers, size information, and timestamps.
|
63
|
+
*/
|
64
|
+
export interface FileObject {
|
65
|
+
/**
|
66
|
+
* Unique identifier for the file
|
67
|
+
*/
|
68
|
+
id: string;
|
69
|
+
/**
|
70
|
+
* Name of the file including extension
|
71
|
+
*/
|
72
|
+
filename: string;
|
73
|
+
/**
|
74
|
+
* Size of the file in bytes
|
75
|
+
*/
|
76
|
+
bytes: number;
|
77
|
+
/**
|
78
|
+
* MIME type of the file
|
79
|
+
*/
|
80
|
+
mime_type: string;
|
81
|
+
/**
|
82
|
+
* Version of the file
|
83
|
+
*/
|
84
|
+
version: number;
|
85
|
+
/**
|
86
|
+
* Timestamp when the file was created
|
87
|
+
*/
|
88
|
+
created_at: string;
|
89
|
+
/**
|
90
|
+
* Timestamp when the file was last updated
|
91
|
+
*/
|
92
|
+
updated_at: string;
|
93
|
+
}
|
94
|
+
export interface FileDeleteResponse {
|
95
|
+
/**
|
96
|
+
* The ID of the deleted file
|
97
|
+
*/
|
98
|
+
id: string;
|
99
|
+
/**
|
100
|
+
* Whether the file was deleted
|
101
|
+
*/
|
102
|
+
deleted?: boolean;
|
103
|
+
/**
|
104
|
+
* The type of the deleted object
|
105
|
+
*/
|
106
|
+
object?: 'file';
|
107
|
+
}
|
108
|
+
export interface FileCreateParams {
|
109
|
+
/**
|
110
|
+
* The file to upload
|
111
|
+
*/
|
112
|
+
file: Core.Uploadable;
|
113
|
+
}
|
114
|
+
export interface FileUpdateParams {
|
115
|
+
/**
|
116
|
+
* The file to update
|
117
|
+
*/
|
118
|
+
file: Core.Uploadable;
|
119
|
+
}
|
120
|
+
export interface FileListParams extends LimitOffsetParams {
|
121
|
+
}
|
122
|
+
export declare namespace Files {
|
123
|
+
export { type FileObject as FileObject, type FileDeleteResponse as FileDeleteResponse, FileObjectsLimitOffset as FileObjectsLimitOffset, type FileCreateParams as FileCreateParams, type FileUpdateParams as FileUpdateParams, type FileListParams as FileListParams, };
|
124
|
+
}
|
125
|
+
//# sourceMappingURL=files.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