@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,120 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { type Uploadable } from '../../core/uploads';
|
|
6
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
7
|
+
import { multipartFormRequestOptions } from '../../internal/uploads';
|
|
8
|
+
import { path } from '../../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class User extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* List all dataset files scoped to a specific user.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const users = await client.datasets.user.list('user_123');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
list(userIdentifier: string, options?: RequestOptions): APIPromise<UserListResponse> {
|
|
20
|
+
return this._client.get(path`/datasets/user/${userIdentifier}`, options);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Delete a dataset file scoped to a specific user.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const user = await client.datasets.user.delete('data.csv', {
|
|
29
|
+
* userIdentifier: 'user_123',
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
delete(
|
|
34
|
+
filename: string,
|
|
35
|
+
params: UserDeleteParams,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): APIPromise<UserDeleteResponse> {
|
|
38
|
+
const { userIdentifier } = params;
|
|
39
|
+
return this._client.delete(path`/datasets/user/${userIdentifier}/${filename}`, options);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Upload a dataset file scoped to a specific user.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```ts
|
|
47
|
+
* const response = await client.datasets.user.upload(
|
|
48
|
+
* 'user_123',
|
|
49
|
+
* { file: fs.createReadStream('path/to/file') },
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
upload(
|
|
54
|
+
userIdentifier: string,
|
|
55
|
+
body: UserUploadParams,
|
|
56
|
+
options?: RequestOptions,
|
|
57
|
+
): APIPromise<UserUploadResponse> {
|
|
58
|
+
return this._client.post(
|
|
59
|
+
path`/datasets/user/${userIdentifier}`,
|
|
60
|
+
multipartFormRequestOptions({ body, ...options }, this._client),
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface UserListResponse {
|
|
66
|
+
files: Array<string>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface UserDeleteResponse {
|
|
70
|
+
file: string;
|
|
71
|
+
|
|
72
|
+
success: boolean;
|
|
73
|
+
|
|
74
|
+
error?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface UserUploadResponse {
|
|
78
|
+
file: UserUploadResponse.File;
|
|
79
|
+
|
|
80
|
+
error?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export namespace UserUploadResponse {
|
|
84
|
+
export interface File {
|
|
85
|
+
name: string;
|
|
86
|
+
|
|
87
|
+
path: string;
|
|
88
|
+
|
|
89
|
+
size: number;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface UserDeleteParams {
|
|
94
|
+
/**
|
|
95
|
+
* The user identifier
|
|
96
|
+
*/
|
|
97
|
+
userIdentifier: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface UserUploadParams {
|
|
101
|
+
/**
|
|
102
|
+
* The file to upload (CSV or JSON, max 10MB)
|
|
103
|
+
*/
|
|
104
|
+
file: Uploadable;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Optional notes or description for the dataset
|
|
108
|
+
*/
|
|
109
|
+
notes?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export declare namespace User {
|
|
113
|
+
export {
|
|
114
|
+
type UserListResponse as UserListResponse,
|
|
115
|
+
type UserDeleteResponse as UserDeleteResponse,
|
|
116
|
+
type UserUploadResponse as UserUploadResponse,
|
|
117
|
+
type UserDeleteParams as UserDeleteParams,
|
|
118
|
+
type UserUploadParams as UserUploadParams,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -1,102 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { type Uploadable } from '../core/uploads';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { multipartFormRequestOptions } from '../internal/uploads';
|
|
8
|
-
import { path } from '../internal/utils/path';
|
|
9
|
-
|
|
10
|
-
export class Datasets extends APIResource {
|
|
11
|
-
/**
|
|
12
|
-
* List dataset files
|
|
13
|
-
*/
|
|
14
|
-
list(query: DatasetListParams, options?: RequestOptions): APIPromise<DatasetListResponse> {
|
|
15
|
-
return this._client.get('/datasets', { query, ...options });
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Delete dataset file
|
|
20
|
-
*/
|
|
21
|
-
delete(
|
|
22
|
-
filename: string,
|
|
23
|
-
params: DatasetDeleteParams,
|
|
24
|
-
options?: RequestOptions,
|
|
25
|
-
): APIPromise<DatasetDeleteResponse> {
|
|
26
|
-
const { userContext } = params;
|
|
27
|
-
return this._client.delete(path`/datasets/${filename}`, { query: { userContext }, ...options });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Upload dataset file
|
|
32
|
-
*/
|
|
33
|
-
upload(body: DatasetUploadParams, options?: RequestOptions): APIPromise<DatasetUploadResponse> {
|
|
34
|
-
return this._client.post('/datasets', multipartFormRequestOptions({ body, ...options }, this._client));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export interface DatasetListResponse {
|
|
39
|
-
files: Array<string>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface DatasetDeleteResponse {
|
|
43
|
-
file: string;
|
|
44
|
-
|
|
45
|
-
success: boolean;
|
|
46
|
-
|
|
47
|
-
error?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export interface DatasetUploadResponse {
|
|
51
|
-
file: DatasetUploadResponse.File;
|
|
52
|
-
|
|
53
|
-
error?: string;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export namespace DatasetUploadResponse {
|
|
57
|
-
export interface File {
|
|
58
|
-
name: string;
|
|
59
|
-
|
|
60
|
-
path: string;
|
|
61
|
-
|
|
62
|
-
size: number;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export interface DatasetListParams {
|
|
67
|
-
userContext: { [key: string]: string | number };
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export interface DatasetDeleteParams {
|
|
71
|
-
userContext: { [key: string]: string | number };
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export interface DatasetUploadParams {
|
|
75
|
-
/**
|
|
76
|
-
* The file to upload
|
|
77
|
-
*/
|
|
78
|
-
file: Uploadable;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Request context for scoping the file, as a JSON-encoded string. Pass your
|
|
82
|
-
* context object through JSON.stringify() before sending. Example:
|
|
83
|
-
* JSON.stringify({ userId: 123, orgId: 456 })
|
|
84
|
-
*/
|
|
85
|
-
userContext: string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Optional notes or description for the dataset
|
|
89
|
-
*/
|
|
90
|
-
notes?: string;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export declare namespace Datasets {
|
|
94
|
-
export {
|
|
95
|
-
type DatasetListResponse as DatasetListResponse,
|
|
96
|
-
type DatasetDeleteResponse as DatasetDeleteResponse,
|
|
97
|
-
type DatasetUploadResponse as DatasetUploadResponse,
|
|
98
|
-
type DatasetListParams as DatasetListParams,
|
|
99
|
-
type DatasetDeleteParams as DatasetDeleteParams,
|
|
100
|
-
type DatasetUploadParams as DatasetUploadParams,
|
|
101
|
-
};
|
|
102
|
-
}
|
|
3
|
+
export * from './datasets/index';
|
package/src/resources/index.ts
CHANGED
|
@@ -10,13 +10,5 @@ export {
|
|
|
10
10
|
type ConversationListParams,
|
|
11
11
|
type ConversationListResponsesConversationsCursor,
|
|
12
12
|
} from './conversations/conversations';
|
|
13
|
-
export {
|
|
14
|
-
Datasets,
|
|
15
|
-
type DatasetListResponse,
|
|
16
|
-
type DatasetDeleteResponse,
|
|
17
|
-
type DatasetUploadResponse,
|
|
18
|
-
type DatasetListParams,
|
|
19
|
-
type DatasetDeleteParams,
|
|
20
|
-
type DatasetUploadParams,
|
|
21
|
-
} from './datasets';
|
|
13
|
+
export { Datasets } from './datasets/datasets';
|
|
22
14
|
export { McpServers } from './mcp-servers/mcp-servers';
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.4.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.4.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|