@deeptable/deeptable 0.1.0-alpha.3 → 0.1.0-alpha.4
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 +9 -0
- package/README.md +6 -6
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +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/files.d.mts +22 -3
- package/resources/files.d.mts.map +1 -1
- package/resources/files.d.ts +22 -3
- package/resources/files.d.ts.map +1 -1
- package/resources/files.js +2 -5
- package/resources/files.js.map +1 -1
- package/resources/files.mjs +2 -5
- package/resources/files.mjs.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/structured-sheets/index.d.mts +2 -2
- package/resources/structured-sheets/index.d.mts.map +1 -1
- package/resources/structured-sheets/index.d.ts +2 -2
- package/resources/structured-sheets/index.d.ts.map +1 -1
- package/resources/structured-sheets/index.js.map +1 -1
- package/resources/structured-sheets/index.mjs.map +1 -1
- package/resources/structured-sheets/structured-sheets.d.mts +45 -25
- package/resources/structured-sheets/structured-sheets.d.mts.map +1 -1
- package/resources/structured-sheets/structured-sheets.d.ts +45 -25
- package/resources/structured-sheets/structured-sheets.d.ts.map +1 -1
- package/resources/structured-sheets/structured-sheets.js +19 -21
- package/resources/structured-sheets/structured-sheets.js.map +1 -1
- package/resources/structured-sheets/structured-sheets.mjs +20 -22
- package/resources/structured-sheets/structured-sheets.mjs.map +1 -1
- package/resources/structured-sheets/tables.d.mts +17 -37
- package/resources/structured-sheets/tables.d.mts.map +1 -1
- package/resources/structured-sheets/tables.d.ts +17 -37
- package/resources/structured-sheets/tables.d.ts.map +1 -1
- package/resources/structured-sheets/tables.js +14 -10
- package/resources/structured-sheets/tables.js.map +1 -1
- package/resources/structured-sheets/tables.mjs +14 -10
- package/resources/structured-sheets/tables.mjs.map +1 -1
- package/src/client.ts +15 -5
- package/src/resources/files.ts +26 -6
- package/src/resources/index.ts +4 -2
- package/src/resources/structured-sheets/index.ts +5 -3
- package/src/resources/structured-sheets/structured-sheets.ts +63 -34
- package/src/resources/structured-sheets/tables.ts +32 -47
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/structured-sheets/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/structured-sheets/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,4DAQ6B;AAP3B,qHAAA,gBAAgB,OAAA;AAQlB,sCAOkB;AANhB,gGAAA,MAAM,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/structured-sheets/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/structured-sheets/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,gBAAgB,GAOjB;OACM,EACL,MAAM,GAMP"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.mjs";
|
|
2
2
|
import * as TablesAPI from "./tables.mjs";
|
|
3
|
-
import { TableDownloadParams,
|
|
3
|
+
import { TableDownloadParams, TableListParams, TableResponse, TableResponsesCursorIDPage, TableRetrieveParams, Tables } from "./tables.mjs";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.mjs";
|
|
5
5
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/pagination.mjs";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.mjs";
|
|
@@ -13,25 +13,25 @@ export declare class StructuredSheets extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const
|
|
16
|
+
* const structuredSheetResponse =
|
|
17
17
|
* await client.structuredSheets.create({
|
|
18
18
|
* file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
|
|
19
19
|
* });
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<
|
|
22
|
+
create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
23
23
|
/**
|
|
24
|
-
* Get the status and details of a structured
|
|
24
|
+
* Get the status and details of a structured sheet conversion.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
28
|
-
* const
|
|
28
|
+
* const structuredSheetResponse =
|
|
29
29
|
* await client.structuredSheets.retrieve(
|
|
30
30
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
31
31
|
* );
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
retrieve(
|
|
34
|
+
retrieve(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
35
35
|
/**
|
|
36
36
|
* List all structured sheets conversions for the authenticated user. Results are
|
|
37
37
|
* paginated using cursor-based pagination.
|
|
@@ -39,37 +39,38 @@ export declare class StructuredSheets extends APIResource {
|
|
|
39
39
|
* @example
|
|
40
40
|
* ```ts
|
|
41
41
|
* // Automatically fetches more pages as needed.
|
|
42
|
-
* for await (const
|
|
42
|
+
* for await (const structuredSheetResponse of client.structuredSheets.list()) {
|
|
43
43
|
* // ...
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
list(query?: StructuredSheetListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
47
|
+
list(query?: StructuredSheetListParams | null | undefined, options?: RequestOptions): PagePromise<StructuredSheetResponsesCursorIDPage, StructuredSheetResponse>;
|
|
48
48
|
/**
|
|
49
|
-
* Delete a structured
|
|
49
|
+
* Delete a structured sheet conversion and its associated exports. This action
|
|
50
50
|
* cannot be undone.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```ts
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* const structuredSheet =
|
|
55
|
+
* await client.structuredSheets.delete(
|
|
56
|
+
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
57
|
+
* );
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
delete(
|
|
60
|
+
delete(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetDeleteResponse>;
|
|
60
61
|
/**
|
|
61
|
-
* Cancel a structured
|
|
62
|
+
* Cancel a structured sheet conversion that is in progress. Only jobs with status
|
|
62
63
|
* 'queued' or 'in_progress' can be cancelled.
|
|
63
64
|
*
|
|
64
65
|
* @example
|
|
65
66
|
* ```ts
|
|
66
|
-
* const
|
|
67
|
+
* const structuredSheetResponse =
|
|
67
68
|
* await client.structuredSheets.cancel(
|
|
68
69
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
69
70
|
* );
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
|
-
cancel(
|
|
73
|
+
cancel(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
73
74
|
/**
|
|
74
75
|
* Download the structured data in the specified format. Only available when
|
|
75
76
|
* conversion status is 'completed'.
|
|
@@ -89,17 +90,17 @@ export declare class StructuredSheets extends APIResource {
|
|
|
89
90
|
* console.log(content);
|
|
90
91
|
* ```
|
|
91
92
|
*/
|
|
92
|
-
download(
|
|
93
|
+
download(structuredSheetID: string, query?: StructuredSheetDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
|
|
93
94
|
}
|
|
94
|
-
export type
|
|
95
|
+
export type StructuredSheetResponsesCursorIDPage = CursorIDPage<StructuredSheetResponse>;
|
|
95
96
|
/**
|
|
96
|
-
* Response representing a structured
|
|
97
|
+
* Response representing a structured sheet conversion job.
|
|
97
98
|
*
|
|
98
99
|
* This is returned from POST (create), GET (retrieve), and list endpoints.
|
|
99
100
|
*/
|
|
100
|
-
export interface
|
|
101
|
+
export interface StructuredSheetResponse {
|
|
101
102
|
/**
|
|
102
|
-
* The unique identifier for this structured
|
|
103
|
+
* The unique identifier for this structured sheet conversion.
|
|
103
104
|
*/
|
|
104
105
|
id: string;
|
|
105
106
|
/**
|
|
@@ -121,7 +122,7 @@ export interface StructuredSheetsResponse {
|
|
|
121
122
|
/**
|
|
122
123
|
* Error information when processing fails.
|
|
123
124
|
*/
|
|
124
|
-
last_error?:
|
|
125
|
+
last_error?: StructuredSheetResponse.LastError | null;
|
|
125
126
|
/**
|
|
126
127
|
* The object type, which is always 'structured_sheet'.
|
|
127
128
|
*/
|
|
@@ -136,7 +137,7 @@ export interface StructuredSheetsResponse {
|
|
|
136
137
|
*/
|
|
137
138
|
table_count?: number | null;
|
|
138
139
|
}
|
|
139
|
-
export declare namespace
|
|
140
|
+
export declare namespace StructuredSheetResponse {
|
|
140
141
|
/**
|
|
141
142
|
* Error information when processing fails.
|
|
142
143
|
*/
|
|
@@ -151,6 +152,25 @@ export declare namespace StructuredSheetsResponse {
|
|
|
151
152
|
message: string;
|
|
152
153
|
}
|
|
153
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Response from deleting a structured sheet.
|
|
157
|
+
*
|
|
158
|
+
* Following the OpenAI API convention for delete responses.
|
|
159
|
+
*/
|
|
160
|
+
export interface StructuredSheetDeleteResponse {
|
|
161
|
+
/**
|
|
162
|
+
* The unique identifier of the deleted structured sheet.
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the structured sheet was successfully deleted.
|
|
167
|
+
*/
|
|
168
|
+
deleted?: true;
|
|
169
|
+
/**
|
|
170
|
+
* The object type, which is always 'structured_sheet'.
|
|
171
|
+
*/
|
|
172
|
+
object?: 'structured_sheet';
|
|
173
|
+
}
|
|
154
174
|
export interface StructuredSheetCreateParams {
|
|
155
175
|
/**
|
|
156
176
|
* The unique identifier of the file to convert.
|
|
@@ -170,7 +190,7 @@ export interface StructuredSheetDownloadParams {
|
|
|
170
190
|
format?: 'sqlite' | 'cell_labels';
|
|
171
191
|
}
|
|
172
192
|
export declare namespace StructuredSheets {
|
|
173
|
-
export { type
|
|
174
|
-
export { Tables as Tables, type TableResponse as TableResponse, type
|
|
193
|
+
export { type StructuredSheetResponse as StructuredSheetResponse, type StructuredSheetDeleteResponse as StructuredSheetDeleteResponse, type StructuredSheetResponsesCursorIDPage as StructuredSheetResponsesCursorIDPage, type StructuredSheetCreateParams as StructuredSheetCreateParams, type StructuredSheetListParams as StructuredSheetListParams, type StructuredSheetDownloadParams as StructuredSheetDownloadParams, };
|
|
194
|
+
export { Tables as Tables, type TableResponse as TableResponse, type TableResponsesCursorIDPage as TableResponsesCursorIDPage, type TableRetrieveParams as TableRetrieveParams, type TableListParams as TableListParams, type TableDownloadParams as TableDownloadParams, };
|
|
175
195
|
}
|
|
176
196
|
//# sourceMappingURL=structured-sheets.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-sheets.d.mts","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,
|
|
1
|
+
{"version":3,"file":"structured-sheets.d.mts","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,MAAM,EACP;OACM,EAA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ACjF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as TablesAPI from "./tables.js";
|
|
3
|
-
import { TableDownloadParams,
|
|
3
|
+
import { TableDownloadParams, TableListParams, TableResponse, TableResponsesCursorIDPage, TableRetrieveParams, Tables } from "./tables.js";
|
|
4
4
|
import { APIPromise } from "../../core/api-promise.js";
|
|
5
5
|
import { CursorIDPage, type CursorIDPageParams, PagePromise } from "../../core/pagination.js";
|
|
6
6
|
import { RequestOptions } from "../../internal/request-options.js";
|
|
@@ -13,25 +13,25 @@ export declare class StructuredSheets extends APIResource {
|
|
|
13
13
|
*
|
|
14
14
|
* @example
|
|
15
15
|
* ```ts
|
|
16
|
-
* const
|
|
16
|
+
* const structuredSheetResponse =
|
|
17
17
|
* await client.structuredSheets.create({
|
|
18
18
|
* file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
|
|
19
19
|
* });
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<
|
|
22
|
+
create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
23
23
|
/**
|
|
24
|
-
* Get the status and details of a structured
|
|
24
|
+
* Get the status and details of a structured sheet conversion.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```ts
|
|
28
|
-
* const
|
|
28
|
+
* const structuredSheetResponse =
|
|
29
29
|
* await client.structuredSheets.retrieve(
|
|
30
30
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
31
31
|
* );
|
|
32
32
|
* ```
|
|
33
33
|
*/
|
|
34
|
-
retrieve(
|
|
34
|
+
retrieve(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
35
35
|
/**
|
|
36
36
|
* List all structured sheets conversions for the authenticated user. Results are
|
|
37
37
|
* paginated using cursor-based pagination.
|
|
@@ -39,37 +39,38 @@ export declare class StructuredSheets extends APIResource {
|
|
|
39
39
|
* @example
|
|
40
40
|
* ```ts
|
|
41
41
|
* // Automatically fetches more pages as needed.
|
|
42
|
-
* for await (const
|
|
42
|
+
* for await (const structuredSheetResponse of client.structuredSheets.list()) {
|
|
43
43
|
* // ...
|
|
44
44
|
* }
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
list(query?: StructuredSheetListParams | null | undefined, options?: RequestOptions): PagePromise<
|
|
47
|
+
list(query?: StructuredSheetListParams | null | undefined, options?: RequestOptions): PagePromise<StructuredSheetResponsesCursorIDPage, StructuredSheetResponse>;
|
|
48
48
|
/**
|
|
49
|
-
* Delete a structured
|
|
49
|
+
* Delete a structured sheet conversion and its associated exports. This action
|
|
50
50
|
* cannot be undone.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```ts
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* const structuredSheet =
|
|
55
|
+
* await client.structuredSheets.delete(
|
|
56
|
+
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
57
|
+
* );
|
|
57
58
|
* ```
|
|
58
59
|
*/
|
|
59
|
-
delete(
|
|
60
|
+
delete(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetDeleteResponse>;
|
|
60
61
|
/**
|
|
61
|
-
* Cancel a structured
|
|
62
|
+
* Cancel a structured sheet conversion that is in progress. Only jobs with status
|
|
62
63
|
* 'queued' or 'in_progress' can be cancelled.
|
|
63
64
|
*
|
|
64
65
|
* @example
|
|
65
66
|
* ```ts
|
|
66
|
-
* const
|
|
67
|
+
* const structuredSheetResponse =
|
|
67
68
|
* await client.structuredSheets.cancel(
|
|
68
69
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
69
70
|
* );
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
|
-
cancel(
|
|
73
|
+
cancel(structuredSheetID: string, options?: RequestOptions): APIPromise<StructuredSheetResponse>;
|
|
73
74
|
/**
|
|
74
75
|
* Download the structured data in the specified format. Only available when
|
|
75
76
|
* conversion status is 'completed'.
|
|
@@ -89,17 +90,17 @@ export declare class StructuredSheets extends APIResource {
|
|
|
89
90
|
* console.log(content);
|
|
90
91
|
* ```
|
|
91
92
|
*/
|
|
92
|
-
download(
|
|
93
|
+
download(structuredSheetID: string, query?: StructuredSheetDownloadParams | null | undefined, options?: RequestOptions): APIPromise<Response>;
|
|
93
94
|
}
|
|
94
|
-
export type
|
|
95
|
+
export type StructuredSheetResponsesCursorIDPage = CursorIDPage<StructuredSheetResponse>;
|
|
95
96
|
/**
|
|
96
|
-
* Response representing a structured
|
|
97
|
+
* Response representing a structured sheet conversion job.
|
|
97
98
|
*
|
|
98
99
|
* This is returned from POST (create), GET (retrieve), and list endpoints.
|
|
99
100
|
*/
|
|
100
|
-
export interface
|
|
101
|
+
export interface StructuredSheetResponse {
|
|
101
102
|
/**
|
|
102
|
-
* The unique identifier for this structured
|
|
103
|
+
* The unique identifier for this structured sheet conversion.
|
|
103
104
|
*/
|
|
104
105
|
id: string;
|
|
105
106
|
/**
|
|
@@ -121,7 +122,7 @@ export interface StructuredSheetsResponse {
|
|
|
121
122
|
/**
|
|
122
123
|
* Error information when processing fails.
|
|
123
124
|
*/
|
|
124
|
-
last_error?:
|
|
125
|
+
last_error?: StructuredSheetResponse.LastError | null;
|
|
125
126
|
/**
|
|
126
127
|
* The object type, which is always 'structured_sheet'.
|
|
127
128
|
*/
|
|
@@ -136,7 +137,7 @@ export interface StructuredSheetsResponse {
|
|
|
136
137
|
*/
|
|
137
138
|
table_count?: number | null;
|
|
138
139
|
}
|
|
139
|
-
export declare namespace
|
|
140
|
+
export declare namespace StructuredSheetResponse {
|
|
140
141
|
/**
|
|
141
142
|
* Error information when processing fails.
|
|
142
143
|
*/
|
|
@@ -151,6 +152,25 @@ export declare namespace StructuredSheetsResponse {
|
|
|
151
152
|
message: string;
|
|
152
153
|
}
|
|
153
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Response from deleting a structured sheet.
|
|
157
|
+
*
|
|
158
|
+
* Following the OpenAI API convention for delete responses.
|
|
159
|
+
*/
|
|
160
|
+
export interface StructuredSheetDeleteResponse {
|
|
161
|
+
/**
|
|
162
|
+
* The unique identifier of the deleted structured sheet.
|
|
163
|
+
*/
|
|
164
|
+
id: string;
|
|
165
|
+
/**
|
|
166
|
+
* Whether the structured sheet was successfully deleted.
|
|
167
|
+
*/
|
|
168
|
+
deleted?: true;
|
|
169
|
+
/**
|
|
170
|
+
* The object type, which is always 'structured_sheet'.
|
|
171
|
+
*/
|
|
172
|
+
object?: 'structured_sheet';
|
|
173
|
+
}
|
|
154
174
|
export interface StructuredSheetCreateParams {
|
|
155
175
|
/**
|
|
156
176
|
* The unique identifier of the file to convert.
|
|
@@ -170,7 +190,7 @@ export interface StructuredSheetDownloadParams {
|
|
|
170
190
|
format?: 'sqlite' | 'cell_labels';
|
|
171
191
|
}
|
|
172
192
|
export declare namespace StructuredSheets {
|
|
173
|
-
export { type
|
|
174
|
-
export { Tables as Tables, type TableResponse as TableResponse, type
|
|
193
|
+
export { type StructuredSheetResponse as StructuredSheetResponse, type StructuredSheetDeleteResponse as StructuredSheetDeleteResponse, type StructuredSheetResponsesCursorIDPage as StructuredSheetResponsesCursorIDPage, type StructuredSheetCreateParams as StructuredSheetCreateParams, type StructuredSheetListParams as StructuredSheetListParams, type StructuredSheetDownloadParams as StructuredSheetDownloadParams, };
|
|
194
|
+
export { Tables as Tables, type TableResponse as TableResponse, type TableResponsesCursorIDPage as TableResponsesCursorIDPage, type TableRetrieveParams as TableRetrieveParams, type TableListParams as TableListParams, type TableDownloadParams as TableDownloadParams, };
|
|
175
195
|
}
|
|
176
196
|
//# sourceMappingURL=structured-sheets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-sheets.d.ts","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,
|
|
1
|
+
{"version":3,"file":"structured-sheets.d.ts","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EACL,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,MAAM,EACP;OACM,EAAE,UAAU,EAAE;OACd,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,WAAW,EAAE;OAEtD,EAAE,cAAc,EAAE;AAGzB,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,MAAM,EAAE,SAAS,CAAC,MAAM,CAAsC;IAE9D;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAI,EAAE,2BAA2B,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIxG;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAIlG;;;;;;;;;;;OAWG;IACH,IAAI,CACF,KAAK,GAAE,yBAAyB,GAAG,IAAI,GAAG,SAAc,EACxD,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oCAAoC,EAAE,uBAAuB,CAAC;IAO7E;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,iB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;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC7B;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CACpC;AAED,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;CAAG;AAExE,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,aAAa,CAAC;CACnC;AAID,MAAM,CAAC,OAAO,WAAW,gBAAgB,CAAC;IACxC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,EAC3D,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;IAEF,OAAO,EACL,MAAM,IAAI,MAAM,EAChB,KAAK,aAAa,IAAI,aAAa,EACnC,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,mBAAmB,IAAI,mBAAmB,GAChD,CAAC;CACH"}
|
|
@@ -21,7 +21,7 @@ class StructuredSheets extends resource_1.APIResource {
|
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```ts
|
|
24
|
-
* const
|
|
24
|
+
* const structuredSheetResponse =
|
|
25
25
|
* await client.structuredSheets.create({
|
|
26
26
|
* file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
|
|
27
27
|
* });
|
|
@@ -31,18 +31,18 @@ class StructuredSheets extends resource_1.APIResource {
|
|
|
31
31
|
return this._client.post('/v1/structured-sheets', { body, ...options });
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* Get the status and details of a structured
|
|
34
|
+
* Get the status and details of a structured sheet conversion.
|
|
35
35
|
*
|
|
36
36
|
* @example
|
|
37
37
|
* ```ts
|
|
38
|
-
* const
|
|
38
|
+
* const structuredSheetResponse =
|
|
39
39
|
* await client.structuredSheets.retrieve(
|
|
40
40
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
41
41
|
* );
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
retrieve(
|
|
45
|
-
return this._client.get((0, path_1.path) `/v1/structured-sheets/${
|
|
44
|
+
retrieve(structuredSheetID, options) {
|
|
45
|
+
return this._client.get((0, path_1.path) `/v1/structured-sheets/${structuredSheetID}`, options);
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
48
48
|
* List all structured sheets conversions for the authenticated user. Results are
|
|
@@ -51,7 +51,7 @@ class StructuredSheets extends resource_1.APIResource {
|
|
|
51
51
|
* @example
|
|
52
52
|
* ```ts
|
|
53
53
|
* // Automatically fetches more pages as needed.
|
|
54
|
-
* for await (const
|
|
54
|
+
* for await (const structuredSheetResponse of client.structuredSheets.list()) {
|
|
55
55
|
* // ...
|
|
56
56
|
* }
|
|
57
57
|
* ```
|
|
@@ -63,36 +63,34 @@ class StructuredSheets extends resource_1.APIResource {
|
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
|
-
* Delete a structured
|
|
66
|
+
* Delete a structured sheet conversion and its associated exports. This action
|
|
67
67
|
* cannot be undone.
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* ```ts
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
71
|
+
* const structuredSheet =
|
|
72
|
+
* await client.structuredSheets.delete(
|
|
73
|
+
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
74
|
+
* );
|
|
74
75
|
* ```
|
|
75
76
|
*/
|
|
76
|
-
delete(
|
|
77
|
-
return this._client.delete((0, path_1.path) `/v1/structured-sheets/${
|
|
78
|
-
...options,
|
|
79
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
80
|
-
});
|
|
77
|
+
delete(structuredSheetID, options) {
|
|
78
|
+
return this._client.delete((0, path_1.path) `/v1/structured-sheets/${structuredSheetID}`, options);
|
|
81
79
|
}
|
|
82
80
|
/**
|
|
83
|
-
* Cancel a structured
|
|
81
|
+
* Cancel a structured sheet conversion that is in progress. Only jobs with status
|
|
84
82
|
* 'queued' or 'in_progress' can be cancelled.
|
|
85
83
|
*
|
|
86
84
|
* @example
|
|
87
85
|
* ```ts
|
|
88
|
-
* const
|
|
86
|
+
* const structuredSheetResponse =
|
|
89
87
|
* await client.structuredSheets.cancel(
|
|
90
88
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
91
89
|
* );
|
|
92
90
|
* ```
|
|
93
91
|
*/
|
|
94
|
-
cancel(
|
|
95
|
-
return this._client.post((0, path_1.path) `/v1/structured-sheets/${
|
|
92
|
+
cancel(structuredSheetID, options) {
|
|
93
|
+
return this._client.post((0, path_1.path) `/v1/structured-sheets/${structuredSheetID}/cancel`, options);
|
|
96
94
|
}
|
|
97
95
|
/**
|
|
98
96
|
* Download the structured data in the specified format. Only available when
|
|
@@ -113,8 +111,8 @@ class StructuredSheets extends resource_1.APIResource {
|
|
|
113
111
|
* console.log(content);
|
|
114
112
|
* ```
|
|
115
113
|
*/
|
|
116
|
-
download(
|
|
117
|
-
return this._client.get((0, path_1.path) `/v1/structured-sheets/${
|
|
114
|
+
download(structuredSheetID, query = {}, options) {
|
|
115
|
+
return this._client.get((0, path_1.path) `/v1/structured-sheets/${structuredSheetID}/download`, {
|
|
118
116
|
query,
|
|
119
117
|
...options,
|
|
120
118
|
headers: (0, headers_1.buildHeaders)([{ Accept: 'application/x-sqlite3' }, options?.headers]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-sheets.js","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,
|
|
1
|
+
{"version":3,"file":"structured-sheets.js","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,+DAAsC;AACtC,wCAOkB;AAElB,yDAA2F;AAC3F,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,gBAAiB,SAAQ,sBAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuHhE,CAAC;IArHC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,iBAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAA,yBAAqC,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,iBAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,yBAAyB,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAAC;IACxF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,iBAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,yBAAyB,iBAAiB,SAAS,EAAE,OAAO,CAAC,CAAC;IAC7F,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CACN,iBAAyB,EACzB,QAA0D,EAAE,EAC5D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,iBAAiB,WAAW,EAAE;YACjF,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9E,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF;AAxHD,4CAwHC;AAqHD,gBAAgB,CAAC,MAAM,GAAG,eAAM,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../../core/resource.mjs";
|
|
3
3
|
import * as TablesAPI from "./tables.mjs";
|
|
4
|
-
import { Tables } from "./tables.mjs";
|
|
4
|
+
import { Tables, } from "./tables.mjs";
|
|
5
5
|
import { CursorIDPage } from "../../core/pagination.mjs";
|
|
6
6
|
import { buildHeaders } from "../../internal/headers.mjs";
|
|
7
7
|
import { path } from "../../internal/utils/path.mjs";
|
|
@@ -17,7 +17,7 @@ export class StructuredSheets extends APIResource {
|
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* ```ts
|
|
20
|
-
* const
|
|
20
|
+
* const structuredSheetResponse =
|
|
21
21
|
* await client.structuredSheets.create({
|
|
22
22
|
* file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
|
|
23
23
|
* });
|
|
@@ -27,18 +27,18 @@ export class StructuredSheets extends APIResource {
|
|
|
27
27
|
return this._client.post('/v1/structured-sheets', { body, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* Get the status and details of a structured
|
|
30
|
+
* Get the status and details of a structured sheet conversion.
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* ```ts
|
|
34
|
-
* const
|
|
34
|
+
* const structuredSheetResponse =
|
|
35
35
|
* await client.structuredSheets.retrieve(
|
|
36
36
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
37
37
|
* );
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
retrieve(
|
|
41
|
-
return this._client.get(path `/v1/structured-sheets/${
|
|
40
|
+
retrieve(structuredSheetID, options) {
|
|
41
|
+
return this._client.get(path `/v1/structured-sheets/${structuredSheetID}`, options);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* List all structured sheets conversions for the authenticated user. Results are
|
|
@@ -47,7 +47,7 @@ export class StructuredSheets extends APIResource {
|
|
|
47
47
|
* @example
|
|
48
48
|
* ```ts
|
|
49
49
|
* // Automatically fetches more pages as needed.
|
|
50
|
-
* for await (const
|
|
50
|
+
* for await (const structuredSheetResponse of client.structuredSheets.list()) {
|
|
51
51
|
* // ...
|
|
52
52
|
* }
|
|
53
53
|
* ```
|
|
@@ -59,36 +59,34 @@ export class StructuredSheets extends APIResource {
|
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Delete a structured
|
|
62
|
+
* Delete a structured sheet conversion and its associated exports. This action
|
|
63
63
|
* cannot be undone.
|
|
64
64
|
*
|
|
65
65
|
* @example
|
|
66
66
|
* ```ts
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
67
|
+
* const structuredSheet =
|
|
68
|
+
* await client.structuredSheets.delete(
|
|
69
|
+
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
70
|
+
* );
|
|
70
71
|
* ```
|
|
71
72
|
*/
|
|
72
|
-
delete(
|
|
73
|
-
return this._client.delete(path `/v1/structured-sheets/${
|
|
74
|
-
...options,
|
|
75
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
76
|
-
});
|
|
73
|
+
delete(structuredSheetID, options) {
|
|
74
|
+
return this._client.delete(path `/v1/structured-sheets/${structuredSheetID}`, options);
|
|
77
75
|
}
|
|
78
76
|
/**
|
|
79
|
-
* Cancel a structured
|
|
77
|
+
* Cancel a structured sheet conversion that is in progress. Only jobs with status
|
|
80
78
|
* 'queued' or 'in_progress' can be cancelled.
|
|
81
79
|
*
|
|
82
80
|
* @example
|
|
83
81
|
* ```ts
|
|
84
|
-
* const
|
|
82
|
+
* const structuredSheetResponse =
|
|
85
83
|
* await client.structuredSheets.cancel(
|
|
86
84
|
* 'ss_01kfxgjd94fn9stqm42nejb627',
|
|
87
85
|
* );
|
|
88
86
|
* ```
|
|
89
87
|
*/
|
|
90
|
-
cancel(
|
|
91
|
-
return this._client.post(path `/v1/structured-sheets/${
|
|
88
|
+
cancel(structuredSheetID, options) {
|
|
89
|
+
return this._client.post(path `/v1/structured-sheets/${structuredSheetID}/cancel`, options);
|
|
92
90
|
}
|
|
93
91
|
/**
|
|
94
92
|
* Download the structured data in the specified format. Only available when
|
|
@@ -109,8 +107,8 @@ export class StructuredSheets extends APIResource {
|
|
|
109
107
|
* console.log(content);
|
|
110
108
|
* ```
|
|
111
109
|
*/
|
|
112
|
-
download(
|
|
113
|
-
return this._client.get(path `/v1/structured-sheets/${
|
|
110
|
+
download(structuredSheetID, query = {}, options) {
|
|
111
|
+
return this._client.get(path `/v1/structured-sheets/${structuredSheetID}/download`, {
|
|
114
112
|
query,
|
|
115
113
|
...options,
|
|
116
114
|
headers: buildHeaders([{ Accept: 'application/x-sqlite3' }, options?.headers]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"structured-sheets.mjs","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,
|
|
1
|
+
{"version":3,"file":"structured-sheets.mjs","sourceRoot":"","sources":["../../src/resources/structured-sheets/structured-sheets.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,SAAS;OACd,EAML,MAAM,GACP;OAEM,EAAE,YAAY,EAAwC;OACtD,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAAjD;;QACE,WAAM,GAAqB,IAAI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAuHhE,CAAC;IArHC;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,IAAiC,EAAE,OAAwB;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,uBAAuB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,iBAAyB,EAAE,OAAwB;QAC1D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yBAAyB,iBAAiB,EAAE,EAAE,OAAO,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,IAAI,CACF,QAAsD,EAAE,EACxD,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAA,YAAqC,CAAA,EAAE;YAC7F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,iBAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAA,yBAAyB,iBAAiB,EAAE,EAAE,OAAO,CA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