@inconvoai/node 0.3.0 → 0.4.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 +18 -0
- package/README.md +37 -22
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/conversations/conversations.d.mts +40 -2
- package/resources/conversations/conversations.d.mts.map +1 -1
- package/resources/conversations/conversations.d.ts +40 -2
- package/resources/conversations/conversations.d.ts.map +1 -1
- package/resources/conversations/conversations.js +21 -0
- package/resources/conversations/conversations.js.map +1 -1
- package/resources/conversations/conversations.mjs +21 -0
- package/resources/conversations/conversations.mjs.map +1 -1
- package/resources/conversations/response/feedback.d.mts +18 -0
- package/resources/conversations/response/feedback.d.mts.map +1 -1
- package/resources/conversations/response/feedback.d.ts +18 -0
- package/resources/conversations/response/feedback.d.ts.map +1 -1
- package/resources/conversations/response/feedback.js +18 -0
- package/resources/conversations/response/feedback.js.map +1 -1
- package/resources/conversations/response/feedback.mjs +18 -0
- package/resources/conversations/response/feedback.mjs.map +1 -1
- package/resources/conversations/response/response.d.mts +17 -0
- package/resources/conversations/response/response.d.mts.map +1 -1
- package/resources/conversations/response/response.d.ts +17 -0
- package/resources/conversations/response/response.d.ts.map +1 -1
- package/resources/conversations/response/response.js +9 -0
- package/resources/conversations/response/response.js.map +1 -1
- package/resources/conversations/response/response.mjs +9 -0
- package/resources/conversations/response/response.mjs.map +1 -1
- package/resources/datasets/context.d.mts +100 -0
- package/resources/datasets/context.d.mts.map +1 -0
- package/resources/datasets/context.d.ts +100 -0
- package/resources/datasets/context.d.ts.map +1 -0
- package/resources/datasets/context.js +61 -0
- package/resources/datasets/context.js.map +1 -0
- package/resources/datasets/context.mjs +57 -0
- package/resources/datasets/context.mjs.map +1 -0
- package/resources/datasets/datasets.d.mts +14 -0
- package/resources/datasets/datasets.d.mts.map +1 -0
- package/resources/datasets/datasets.d.ts +14 -0
- package/resources/datasets/datasets.d.ts.map +1 -0
- package/resources/datasets/datasets.js +21 -0
- package/resources/datasets/datasets.js.map +1 -0
- package/resources/datasets/datasets.mjs +16 -0
- package/resources/datasets/datasets.mjs.map +1 -0
- package/resources/datasets/index.d.mts +4 -0
- package/resources/datasets/index.d.mts.map +1 -0
- package/resources/datasets/index.d.ts +4 -0
- package/resources/datasets/index.d.ts.map +1 -0
- package/resources/datasets/index.js +11 -0
- package/resources/datasets/index.js.map +1 -0
- package/resources/datasets/index.mjs +5 -0
- package/resources/datasets/index.mjs.map +1 -0
- package/resources/datasets/user.d.mts +77 -0
- package/resources/datasets/user.d.mts.map +1 -0
- package/resources/datasets/user.d.ts +77 -0
- package/resources/datasets/user.d.ts.map +1 -0
- package/resources/datasets/user.js +50 -0
- package/resources/datasets/user.js.map +1 -0
- package/resources/datasets/user.mjs +46 -0
- package/resources/datasets/user.mjs.map +1 -0
- package/resources/datasets.d.mts +1 -66
- package/resources/datasets.d.mts.map +1 -1
- package/resources/datasets.d.ts +1 -66
- package/resources/datasets.d.ts.map +1 -1
- package/resources/datasets.js +2 -26
- package/resources/datasets.js.map +1 -1
- package/resources/datasets.mjs +1 -24
- package/resources/datasets.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/src/client.ts +2 -18
- package/src/resources/conversations/conversations.ts +44 -2
- package/src/resources/conversations/response/feedback.ts +18 -0
- package/src/resources/conversations/response/response.ts +17 -0
- package/src/resources/datasets/context.ts +153 -0
- package/src/resources/datasets/datasets.ts +51 -0
- package/src/resources/datasets/index.ts +20 -0
- package/src/resources/datasets/user.ts +120 -0
- package/src/resources/datasets.ts +1 -100
- package/src/resources/index.ts +1 -9
- 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
|
@@ -0,0 +1,61 @@
|
|
|
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.Context = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const uploads_1 = require("../../internal/uploads.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class Context extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List all dataset files scoped to a context value. These files are shared with
|
|
11
|
+
* all users who have this context value.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const contexts = await client.datasets.context.list(
|
|
16
|
+
* 'org_456',
|
|
17
|
+
* { contextKey: 'orgId' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
list(contextValue, params, options) {
|
|
22
|
+
const { contextKey } = params;
|
|
23
|
+
return this._client.get((0, path_1.path) `/datasets/context/${contextKey}/${contextValue}`, options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Delete a dataset file scoped to a context value.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const context = await client.datasets.context.delete(
|
|
31
|
+
* 'shared_data.csv',
|
|
32
|
+
* { contextKey: 'orgId', contextValue: 'org_456' },
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
delete(filename, params, options) {
|
|
37
|
+
const { contextKey, contextValue } = params;
|
|
38
|
+
return this._client.delete((0, path_1.path) `/datasets/context/${contextKey}/${contextValue}/${filename}`, options);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Upload a dataset file scoped to a context value. This file will be shared with
|
|
42
|
+
* all users who have this context value.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const response = await client.datasets.context.upload(
|
|
47
|
+
* 'org_456',
|
|
48
|
+
* {
|
|
49
|
+
* contextKey: 'orgId',
|
|
50
|
+
* file: fs.createReadStream('path/to/file'),
|
|
51
|
+
* },
|
|
52
|
+
* );
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
upload(contextValue, params, options) {
|
|
56
|
+
const { contextKey, ...body } = params;
|
|
57
|
+
return this._client.post((0, path_1.path) `/datasets/context/${contextKey}/${contextValue}`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.Context = Context;
|
|
61
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/resources/datasets/context.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,YAAoB,EACpB,MAAyB,EACzB,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,IAAI,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,UAAU,IAAI,YAAY,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,qBAAqB,UAAU,IAAI,YAAY,EAAE,EACrD,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AApED,0BAoEC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class Context extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List all dataset files scoped to a context value. These files are shared with
|
|
8
|
+
* all users who have this context value.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* const contexts = await client.datasets.context.list(
|
|
13
|
+
* 'org_456',
|
|
14
|
+
* { contextKey: 'orgId' },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
list(contextValue, params, options) {
|
|
19
|
+
const { contextKey } = params;
|
|
20
|
+
return this._client.get(path `/datasets/context/${contextKey}/${contextValue}`, options);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Delete a dataset file scoped to a context value.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const context = await client.datasets.context.delete(
|
|
28
|
+
* 'shared_data.csv',
|
|
29
|
+
* { contextKey: 'orgId', contextValue: 'org_456' },
|
|
30
|
+
* );
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
delete(filename, params, options) {
|
|
34
|
+
const { contextKey, contextValue } = params;
|
|
35
|
+
return this._client.delete(path `/datasets/context/${contextKey}/${contextValue}/${filename}`, options);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Upload a dataset file scoped to a context value. This file will be shared with
|
|
39
|
+
* all users who have this context value.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```ts
|
|
43
|
+
* const response = await client.datasets.context.upload(
|
|
44
|
+
* 'org_456',
|
|
45
|
+
* {
|
|
46
|
+
* contextKey: 'orgId',
|
|
47
|
+
* file: fs.createReadStream('path/to/file'),
|
|
48
|
+
* },
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
upload(contextValue, params, options) {
|
|
53
|
+
const { contextKey, ...body } = params;
|
|
54
|
+
return this._client.post(path `/datasets/context/${contextKey}/${contextValue}`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=context.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.mjs","sourceRoot":"","sources":["../../src/resources/datasets/context.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,IAAI,CACF,YAAoB,EACpB,MAAyB,EACzB,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,qBAAqB,UAAU,IAAI,YAAY,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,QAAgB,EAChB,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAAC;QAC5C,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,qBAAqB,UAAU,IAAI,YAAY,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IACzG,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CACJ,YAAoB,EACpB,MAA2B,EAC3B,OAAwB;QAExB,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,qBAAqB,UAAU,IAAI,YAAY,EAAE,EACrD,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import * as ContextAPI from "./context.mjs";
|
|
3
|
+
import { Context, ContextDeleteParams, ContextDeleteResponse, ContextListParams, ContextListResponse, ContextUploadParams, ContextUploadResponse } from "./context.mjs";
|
|
4
|
+
import * as UserAPI from "./user.mjs";
|
|
5
|
+
import { User, UserDeleteParams, UserDeleteResponse, UserListResponse, UserUploadParams, UserUploadResponse } from "./user.mjs";
|
|
6
|
+
export declare class Datasets extends APIResource {
|
|
7
|
+
user: UserAPI.User;
|
|
8
|
+
context: ContextAPI.Context;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace Datasets {
|
|
11
|
+
export { User as User, type UserListResponse as UserListResponse, type UserDeleteResponse as UserDeleteResponse, type UserUploadResponse as UserUploadResponse, type UserDeleteParams as UserDeleteParams, type UserUploadParams as UserUploadParams, };
|
|
12
|
+
export { Context as Context, type ContextListResponse as ContextListResponse, type ContextDeleteResponse as ContextDeleteResponse, type ContextUploadResponse as ContextUploadResponse, type ContextListParams as ContextListParams, type ContextDeleteParams as ContextDeleteParams, type ContextUploadParams as ContextUploadParams, };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=datasets.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasets.d.mts","sourceRoot":"","sources":["../../src/resources/datasets/datasets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB;OACM,KAAK,OAAO;OACZ,EACL,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import * as ContextAPI from "./context.js";
|
|
3
|
+
import { Context, ContextDeleteParams, ContextDeleteResponse, ContextListParams, ContextListResponse, ContextUploadParams, ContextUploadResponse } from "./context.js";
|
|
4
|
+
import * as UserAPI from "./user.js";
|
|
5
|
+
import { User, UserDeleteParams, UserDeleteResponse, UserListResponse, UserUploadParams, UserUploadResponse } from "./user.js";
|
|
6
|
+
export declare class Datasets extends APIResource {
|
|
7
|
+
user: UserAPI.User;
|
|
8
|
+
context: ContextAPI.Context;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace Datasets {
|
|
11
|
+
export { User as User, type UserListResponse as UserListResponse, type UserDeleteResponse as UserDeleteResponse, type UserUploadResponse as UserUploadResponse, type UserDeleteParams as UserDeleteParams, type UserUploadParams as UserUploadParams, };
|
|
12
|
+
export { Context as Context, type ContextListResponse as ContextListResponse, type ContextDeleteResponse as ContextDeleteResponse, type ContextUploadResponse as ContextUploadResponse, type ContextListParams as ContextListParams, type ContextDeleteParams as ContextDeleteParams, type ContextUploadParams as ContextUploadParams, };
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=datasets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasets.d.ts","sourceRoot":"","sources":["../../src/resources/datasets/datasets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB;OACM,KAAK,OAAO;OACZ,EACL,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB;AAED,qBAAa,QAAS,SAAQ,WAAW;IACvC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAkC;IACpD,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAKD,MAAM,CAAC,OAAO,WAAW,QAAQ,CAAC;IAChC,OAAO,EACL,IAAI,IAAI,IAAI,EACZ,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;IAEF,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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.Datasets = void 0;
|
|
5
|
+
const tslib_1 = require("../../internal/tslib.js");
|
|
6
|
+
const resource_1 = require("../../core/resource.js");
|
|
7
|
+
const ContextAPI = tslib_1.__importStar(require("./context.js"));
|
|
8
|
+
const context_1 = require("./context.js");
|
|
9
|
+
const UserAPI = tslib_1.__importStar(require("./user.js"));
|
|
10
|
+
const user_1 = require("./user.js");
|
|
11
|
+
class Datasets extends resource_1.APIResource {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments);
|
|
14
|
+
this.user = new UserAPI.User(this._client);
|
|
15
|
+
this.context = new ContextAPI.Context(this._client);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.Datasets = Datasets;
|
|
19
|
+
Datasets.User = user_1.User;
|
|
20
|
+
Datasets.Context = context_1.Context;
|
|
21
|
+
//# sourceMappingURL=datasets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasets.js","sourceRoot":"","sources":["../../src/resources/datasets/datasets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAQmB;AACnB,2DAAkC;AAClC,oCAOgB;AAEhB,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAHD,4BAGC;AAED,QAAQ,CAAC,IAAI,GAAG,WAAI,CAAC;AACrB,QAAQ,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import * as ContextAPI from "./context.mjs";
|
|
4
|
+
import { Context, } from "./context.mjs";
|
|
5
|
+
import * as UserAPI from "./user.mjs";
|
|
6
|
+
import { User, } from "./user.mjs";
|
|
7
|
+
export class Datasets extends APIResource {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.user = new UserAPI.User(this._client);
|
|
11
|
+
this.context = new ContextAPI.Context(this._client);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
Datasets.User = User;
|
|
15
|
+
Datasets.Context = Context;
|
|
16
|
+
//# sourceMappingURL=datasets.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"datasets.mjs","sourceRoot":"","sources":["../../src/resources/datasets/datasets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,GAOR;OACM,KAAK,OAAO;OACZ,EACL,IAAI,GAML;AAED,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,SAAI,GAAiB,IAAI,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpD,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,QAAQ,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Context, type ContextListResponse, type ContextDeleteResponse, type ContextUploadResponse, type ContextListParams, type ContextDeleteParams, type ContextUploadParams, } from "./context.mjs";
|
|
2
|
+
export { Datasets } from "./datasets.mjs";
|
|
3
|
+
export { User, type UserListResponse, type UserDeleteResponse, type UserUploadResponse, type UserDeleteParams, type UserUploadParams, } from "./user.mjs";
|
|
4
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/datasets/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EAAE,QAAQ,EAAE;OACZ,EACL,IAAI,EACJ,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Context, type ContextListResponse, type ContextDeleteResponse, type ContextUploadResponse, type ContextListParams, type ContextDeleteParams, type ContextUploadParams, } from "./context.js";
|
|
2
|
+
export { Datasets } from "./datasets.js";
|
|
3
|
+
export { User, type UserListResponse, type UserDeleteResponse, type UserUploadResponse, type UserDeleteParams, type UserUploadParams, } from "./user.js";
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/datasets/index.ts"],"names":[],"mappings":"OAEO,EACL,OAAO,EACP,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB;OACM,EAAE,QAAQ,EAAE;OACZ,EACL,IAAI,EACJ,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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.User = exports.Datasets = exports.Context = void 0;
|
|
5
|
+
var context_1 = require("./context.js");
|
|
6
|
+
Object.defineProperty(exports, "Context", { enumerable: true, get: function () { return context_1.Context; } });
|
|
7
|
+
var datasets_1 = require("./datasets.js");
|
|
8
|
+
Object.defineProperty(exports, "Datasets", { enumerable: true, get: function () { return datasets_1.Datasets; } });
|
|
9
|
+
var user_1 = require("./user.js");
|
|
10
|
+
Object.defineProperty(exports, "User", { enumerable: true, get: function () { return user_1.User; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/datasets/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,0CAAsC;AAA7B,oGAAA,QAAQ,OAAA;AACjB,kCAOgB;AANd,4FAAA,IAAI,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/datasets/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,OAAO,GAOR;OACM,EAAE,QAAQ,EAAE;OACZ,EACL,IAAI,GAML"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.mjs";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.mjs";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
5
|
+
export declare class User extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List all dataset files scoped to a specific user.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const users = await client.datasets.user.list('user_123');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(userIdentifier: string, options?: RequestOptions): APIPromise<UserListResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a dataset file scoped to a specific user.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const user = await client.datasets.user.delete('data.csv', {
|
|
21
|
+
* userIdentifier: 'user_123',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
delete(filename: string, params: UserDeleteParams, options?: RequestOptions): APIPromise<UserDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Upload a dataset file scoped to a specific user.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.datasets.user.upload(
|
|
32
|
+
* 'user_123',
|
|
33
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
upload(userIdentifier: string, body: UserUploadParams, options?: RequestOptions): APIPromise<UserUploadResponse>;
|
|
38
|
+
}
|
|
39
|
+
export interface UserListResponse {
|
|
40
|
+
files: Array<string>;
|
|
41
|
+
}
|
|
42
|
+
export interface UserDeleteResponse {
|
|
43
|
+
file: string;
|
|
44
|
+
success: boolean;
|
|
45
|
+
error?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface UserUploadResponse {
|
|
48
|
+
file: UserUploadResponse.File;
|
|
49
|
+
error?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare namespace UserUploadResponse {
|
|
52
|
+
interface File {
|
|
53
|
+
name: string;
|
|
54
|
+
path: string;
|
|
55
|
+
size: number;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export interface UserDeleteParams {
|
|
59
|
+
/**
|
|
60
|
+
* The user identifier
|
|
61
|
+
*/
|
|
62
|
+
userIdentifier: string;
|
|
63
|
+
}
|
|
64
|
+
export interface UserUploadParams {
|
|
65
|
+
/**
|
|
66
|
+
* The file to upload (CSV or JSON, max 10MB)
|
|
67
|
+
*/
|
|
68
|
+
file: Uploadable;
|
|
69
|
+
/**
|
|
70
|
+
* Optional notes or description for the dataset
|
|
71
|
+
*/
|
|
72
|
+
notes?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare namespace User {
|
|
75
|
+
export { type UserListResponse as UserListResponse, type UserDeleteResponse as UserDeleteResponse, type UserUploadResponse as UserUploadResponse, type UserDeleteParams as UserDeleteParams, type UserUploadParams as UserUploadParams, };
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=user.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.mts","sourceRoot":"","sources":["../../src/resources/datasets/user.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIpF;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAKjC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAMlC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,OAAO,CAAC;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;IAE9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { APIResource } from "../../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../../core/api-promise.js";
|
|
3
|
+
import { type Uploadable } from "../../core/uploads.js";
|
|
4
|
+
import { RequestOptions } from "../../internal/request-options.js";
|
|
5
|
+
export declare class User extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List all dataset files scoped to a specific user.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const users = await client.datasets.user.list('user_123');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(userIdentifier: string, options?: RequestOptions): APIPromise<UserListResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete a dataset file scoped to a specific user.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const user = await client.datasets.user.delete('data.csv', {
|
|
21
|
+
* userIdentifier: 'user_123',
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
delete(filename: string, params: UserDeleteParams, options?: RequestOptions): APIPromise<UserDeleteResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Upload a dataset file scoped to a specific user.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const response = await client.datasets.user.upload(
|
|
32
|
+
* 'user_123',
|
|
33
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
34
|
+
* );
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
upload(userIdentifier: string, body: UserUploadParams, options?: RequestOptions): APIPromise<UserUploadResponse>;
|
|
38
|
+
}
|
|
39
|
+
export interface UserListResponse {
|
|
40
|
+
files: Array<string>;
|
|
41
|
+
}
|
|
42
|
+
export interface UserDeleteResponse {
|
|
43
|
+
file: string;
|
|
44
|
+
success: boolean;
|
|
45
|
+
error?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface UserUploadResponse {
|
|
48
|
+
file: UserUploadResponse.File;
|
|
49
|
+
error?: string;
|
|
50
|
+
}
|
|
51
|
+
export declare namespace UserUploadResponse {
|
|
52
|
+
interface File {
|
|
53
|
+
name: string;
|
|
54
|
+
path: string;
|
|
55
|
+
size: number;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export interface UserDeleteParams {
|
|
59
|
+
/**
|
|
60
|
+
* The user identifier
|
|
61
|
+
*/
|
|
62
|
+
userIdentifier: string;
|
|
63
|
+
}
|
|
64
|
+
export interface UserUploadParams {
|
|
65
|
+
/**
|
|
66
|
+
* The file to upload (CSV or JSON, max 10MB)
|
|
67
|
+
*/
|
|
68
|
+
file: Uploadable;
|
|
69
|
+
/**
|
|
70
|
+
* Optional notes or description for the dataset
|
|
71
|
+
*/
|
|
72
|
+
notes?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare namespace User {
|
|
75
|
+
export { type UserListResponse as UserListResponse, type UserDeleteResponse as UserDeleteResponse, type UserUploadResponse as UserUploadResponse, type UserDeleteParams as UserDeleteParams, type UserUploadParams as UserUploadParams, };
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/resources/datasets/user.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OACd,EAAE,KAAK,UAAU,EAAE;OACnB,EAAE,cAAc,EAAE;AAIzB,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAIpF;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,gBAAgB,EACxB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;IAKjC;;;;;;;;;;OAUG;IACH,MAAM,CACJ,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,gBAAgB,EACtB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,kBAAkB,CAAC;CAMlC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,OAAO,EAAE,OAAO,CAAC;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC;IAE9B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,yBAAiB,kBAAkB,CAAC;IAClC,UAAiB,IAAI;QACnB,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;QAEb,IAAI,EAAE,MAAM,CAAC;KACd;CACF;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,gBAAgB,IAAI,gBAAgB,EACzC,KAAK,gBAAgB,IAAI,gBAAgB,GAC1C,CAAC;CACH"}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.User = void 0;
|
|
5
|
+
const resource_1 = require("../../core/resource.js");
|
|
6
|
+
const uploads_1 = require("../../internal/uploads.js");
|
|
7
|
+
const path_1 = require("../../internal/utils/path.js");
|
|
8
|
+
class User extends resource_1.APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* List all dataset files scoped to a specific user.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const users = await client.datasets.user.list('user_123');
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
list(userIdentifier, options) {
|
|
18
|
+
return this._client.get((0, path_1.path) `/datasets/user/${userIdentifier}`, options);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Delete a dataset file scoped to a specific user.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* const user = await client.datasets.user.delete('data.csv', {
|
|
26
|
+
* userIdentifier: 'user_123',
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
delete(filename, params, options) {
|
|
31
|
+
const { userIdentifier } = params;
|
|
32
|
+
return this._client.delete((0, path_1.path) `/datasets/user/${userIdentifier}/${filename}`, options);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Upload a dataset file scoped to a specific user.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const response = await client.datasets.user.upload(
|
|
40
|
+
* 'user_123',
|
|
41
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
42
|
+
* );
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
upload(userIdentifier, body, options) {
|
|
46
|
+
return this._client.post((0, path_1.path) `/datasets/user/${userIdentifier}`, (0, uploads_1.multipartFormRequestOptions)({ body, ...options }, this._client));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.User = User;
|
|
50
|
+
//# sourceMappingURL=user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/resources/datasets/user.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAIlD,uDAAqE;AACrE,uDAAiD;AAEjD,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;OAOG;IACH,IAAI,CAAC,cAAsB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAgB,EAChB,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,kBAAkB,cAAc,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAA,WAAI,EAAA,kBAAkB,cAAc,EAAE,EACtC,IAAA,qCAA2B,EAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF;AArDD,oBAqDC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../core/resource.mjs";
|
|
3
|
+
import { multipartFormRequestOptions } from "../../internal/uploads.mjs";
|
|
4
|
+
import { path } from "../../internal/utils/path.mjs";
|
|
5
|
+
export class User extends APIResource {
|
|
6
|
+
/**
|
|
7
|
+
* List all dataset files scoped to a specific user.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const users = await client.datasets.user.list('user_123');
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
list(userIdentifier, options) {
|
|
15
|
+
return this._client.get(path `/datasets/user/${userIdentifier}`, options);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Delete a dataset file scoped to a specific user.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```ts
|
|
22
|
+
* const user = await client.datasets.user.delete('data.csv', {
|
|
23
|
+
* userIdentifier: 'user_123',
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
delete(filename, params, options) {
|
|
28
|
+
const { userIdentifier } = params;
|
|
29
|
+
return this._client.delete(path `/datasets/user/${userIdentifier}/${filename}`, options);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Upload a dataset file scoped to a specific user.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```ts
|
|
36
|
+
* const response = await client.datasets.user.upload(
|
|
37
|
+
* 'user_123',
|
|
38
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
39
|
+
* );
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
upload(userIdentifier, body, options) {
|
|
43
|
+
return this._client.post(path `/datasets/user/${userIdentifier}`, multipartFormRequestOptions({ body, ...options }, this._client));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=user.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.mjs","sourceRoot":"","sources":["../../src/resources/datasets/user.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAIf,EAAE,2BAA2B,EAAE;OAC/B,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,IAAK,SAAQ,WAAW;IACnC;;;;;;;OAOG;IACH,IAAI,CAAC,cAAsB,EAAE,OAAwB;QACnD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,kBAAkB,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;OASG;IACH,MAAM,CACJ,QAAgB,EAChB,MAAwB,EACxB,OAAwB;QAExB,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAAC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAkB,cAAc,IAAI,QAAQ,EAAE,EAAE,OAAO,CAAC,CAAC;IAC1F,CAAC;IAED;;;;;;;;;;OAUG;IACH,MAAM,CACJ,cAAsB,EACtB,IAAsB,EACtB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,IAAI,CAAA,kBAAkB,cAAc,EAAE,EACtC,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
|
package/resources/datasets.d.mts
CHANGED
|
@@ -1,67 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
|
-
import { type Uploadable } from "../core/uploads.mjs";
|
|
4
|
-
import { RequestOptions } from "../internal/request-options.mjs";
|
|
5
|
-
export declare class Datasets extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* List dataset files
|
|
8
|
-
*/
|
|
9
|
-
list(query: DatasetListParams, options?: RequestOptions): APIPromise<DatasetListResponse>;
|
|
10
|
-
/**
|
|
11
|
-
* Delete dataset file
|
|
12
|
-
*/
|
|
13
|
-
delete(filename: string, params: DatasetDeleteParams, options?: RequestOptions): APIPromise<DatasetDeleteResponse>;
|
|
14
|
-
/**
|
|
15
|
-
* Upload dataset file
|
|
16
|
-
*/
|
|
17
|
-
upload(body: DatasetUploadParams, options?: RequestOptions): APIPromise<DatasetUploadResponse>;
|
|
18
|
-
}
|
|
19
|
-
export interface DatasetListResponse {
|
|
20
|
-
files: Array<string>;
|
|
21
|
-
}
|
|
22
|
-
export interface DatasetDeleteResponse {
|
|
23
|
-
file: string;
|
|
24
|
-
success: boolean;
|
|
25
|
-
error?: string;
|
|
26
|
-
}
|
|
27
|
-
export interface DatasetUploadResponse {
|
|
28
|
-
file: DatasetUploadResponse.File;
|
|
29
|
-
error?: string;
|
|
30
|
-
}
|
|
31
|
-
export declare namespace DatasetUploadResponse {
|
|
32
|
-
interface File {
|
|
33
|
-
name: string;
|
|
34
|
-
path: string;
|
|
35
|
-
size: number;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
export interface DatasetListParams {
|
|
39
|
-
userContext: {
|
|
40
|
-
[key: string]: string | number;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export interface DatasetDeleteParams {
|
|
44
|
-
userContext: {
|
|
45
|
-
[key: string]: string | number;
|
|
46
|
-
};
|
|
47
|
-
}
|
|
48
|
-
export interface DatasetUploadParams {
|
|
49
|
-
/**
|
|
50
|
-
* The file to upload
|
|
51
|
-
*/
|
|
52
|
-
file: Uploadable;
|
|
53
|
-
/**
|
|
54
|
-
* Request context for scoping the file, as a JSON-encoded string. Pass your
|
|
55
|
-
* context object through JSON.stringify() before sending. Example:
|
|
56
|
-
* JSON.stringify({ userId: 123, orgId: 456 })
|
|
57
|
-
*/
|
|
58
|
-
userContext: string;
|
|
59
|
-
/**
|
|
60
|
-
* Optional notes or description for the dataset
|
|
61
|
-
*/
|
|
62
|
-
notes?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare namespace Datasets {
|
|
65
|
-
export { type DatasetListResponse as DatasetListResponse, type DatasetDeleteResponse as DatasetDeleteResponse, type DatasetUploadResponse as DatasetUploadResponse, type DatasetListParams as DatasetListParams, type DatasetDeleteParams as DatasetDeleteParams, type DatasetUploadParams as DatasetUploadParams, };
|
|
66
|
-
}
|
|
1
|
+
export * from "./datasets/index.mjs";
|
|
67
2
|
//# sourceMappingURL=datasets.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datasets.d.mts","sourceRoot":"","sources":["../src/resources/datasets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"datasets.d.mts","sourceRoot":"","sources":["../src/resources/datasets.ts"],"names":[],"mappings":""}
|