@deeptable/deeptable 0.1.0-alpha.1 → 0.1.0-alpha.2

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +6 -6
  3. package/client.d.mts +2 -2
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +2 -2
  6. package/client.d.ts.map +1 -1
  7. package/client.js.map +1 -1
  8. package/client.mjs.map +1 -1
  9. package/package.json +1 -1
  10. package/resources/files.d.mts +16 -2
  11. package/resources/files.d.mts.map +1 -1
  12. package/resources/files.d.ts +16 -2
  13. package/resources/files.d.ts.map +1 -1
  14. package/resources/files.js +25 -2
  15. package/resources/files.js.map +1 -1
  16. package/resources/files.mjs +25 -2
  17. package/resources/files.mjs.map +1 -1
  18. package/resources/index.d.mts +1 -1
  19. package/resources/index.d.mts.map +1 -1
  20. package/resources/index.d.ts +1 -1
  21. package/resources/index.d.ts.map +1 -1
  22. package/resources/index.js.map +1 -1
  23. package/resources/index.mjs.map +1 -1
  24. package/resources/structured-sheets/index.d.mts +2 -2
  25. package/resources/structured-sheets/index.d.mts.map +1 -1
  26. package/resources/structured-sheets/index.d.ts +2 -2
  27. package/resources/structured-sheets/index.d.ts.map +1 -1
  28. package/resources/structured-sheets/index.js +3 -3
  29. package/resources/structured-sheets/index.js.map +1 -1
  30. package/resources/structured-sheets/index.mjs +1 -1
  31. package/resources/structured-sheets/index.mjs.map +1 -1
  32. package/resources/structured-sheets/structured-sheets.d.mts +62 -22
  33. package/resources/structured-sheets/structured-sheets.d.mts.map +1 -1
  34. package/resources/structured-sheets/structured-sheets.d.ts +62 -22
  35. package/resources/structured-sheets/structured-sheets.d.ts.map +1 -1
  36. package/resources/structured-sheets/structured-sheets.js +51 -9
  37. package/resources/structured-sheets/structured-sheets.js.map +1 -1
  38. package/resources/structured-sheets/structured-sheets.mjs +51 -9
  39. package/resources/structured-sheets/structured-sheets.mjs.map +1 -1
  40. package/resources/structured-sheets/tables.d.mts +144 -0
  41. package/resources/structured-sheets/tables.d.mts.map +1 -0
  42. package/resources/structured-sheets/tables.d.ts +144 -0
  43. package/resources/structured-sheets/tables.d.ts.map +1 -0
  44. package/resources/structured-sheets/tables.js +75 -0
  45. package/resources/structured-sheets/tables.js.map +1 -0
  46. package/resources/structured-sheets/tables.mjs +71 -0
  47. package/resources/structured-sheets/tables.mjs.map +1 -0
  48. package/src/client.ts +6 -4
  49. package/src/resources/files.ts +26 -2
  50. package/src/resources/index.ts +3 -2
  51. package/src/resources/structured-sheets/index.ts +10 -3
  52. package/src/resources/structured-sheets/structured-sheets.ts +89 -26
  53. package/src/resources/structured-sheets/tables.ts +189 -0
  54. package/src/version.ts +1 -1
  55. package/version.d.mts +1 -1
  56. package/version.d.ts +1 -1
  57. package/version.js +1 -1
  58. package/version.mjs +1 -1
  59. package/resources/structured-sheets/exports.d.mts +0 -22
  60. package/resources/structured-sheets/exports.d.mts.map +0 -1
  61. package/resources/structured-sheets/exports.d.ts +0 -22
  62. package/resources/structured-sheets/exports.d.ts.map +0 -1
  63. package/resources/structured-sheets/exports.js +0 -33
  64. package/resources/structured-sheets/exports.js.map +0 -1
  65. package/resources/structured-sheets/exports.mjs +0 -29
  66. package/resources/structured-sheets/exports.mjs.map +0 -1
  67. package/src/resources/structured-sheets/exports.ts +0 -32
@@ -1,8 +1,8 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  import { APIResource } from '../../core/resource';
4
- import * as ExportsAPI from './exports';
5
- import { Exports } from './exports';
4
+ import * as TablesAPI from './tables';
5
+ import { TableDownloadParams, TableListResponse, TableResponse, TableRetrieveParams, Tables } from './tables';
6
6
  import { APIPromise } from '../../core/api-promise';
7
7
  import { CursorIDPage, type CursorIDPageParams, PagePromise } from '../../core/pagination';
8
8
  import { buildHeaders } from '../../internal/headers';
@@ -10,7 +10,7 @@ import { RequestOptions } from '../../internal/request-options';
10
10
  import { path } from '../../internal/utils/path';
11
11
 
12
12
  export class StructuredSheets extends APIResource {
13
- exports: ExportsAPI.Exports = new ExportsAPI.Exports(this._client);
13
+ tables: TablesAPI.Tables = new TablesAPI.Tables(this._client);
14
14
 
15
15
  /**
16
16
  * Start converting a spreadsheet workbook into structured data. This initiates an
@@ -19,13 +19,13 @@ export class StructuredSheets extends APIResource {
19
19
  *
20
20
  * @example
21
21
  * ```ts
22
- * const structuredSheetResponse =
22
+ * const structuredSheetsResponse =
23
23
  * await client.structuredSheets.create({
24
24
  * file_id: 'file_01h45ytscbebyvny4gc8cr8ma2',
25
25
  * });
26
26
  * ```
27
27
  */
28
- create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<StructuredSheetResponse> {
28
+ create(body: StructuredSheetCreateParams, options?: RequestOptions): APIPromise<StructuredSheetsResponse> {
29
29
  return this._client.post('/v1/structured-sheets', { body, ...options });
30
30
  }
31
31
 
@@ -34,13 +34,13 @@ export class StructuredSheets extends APIResource {
34
34
  *
35
35
  * @example
36
36
  * ```ts
37
- * const structuredSheetResponse =
37
+ * const structuredSheetsResponse =
38
38
  * await client.structuredSheets.retrieve(
39
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
39
+ * 'ss_01kfxgjd94fn9stqm42nejb627',
40
40
  * );
41
41
  * ```
42
42
  */
43
- retrieve(structuredSheetsID: string, options?: RequestOptions): APIPromise<StructuredSheetResponse> {
43
+ retrieve(structuredSheetsID: string, options?: RequestOptions): APIPromise<StructuredSheetsResponse> {
44
44
  return this._client.get(path`/v1/structured-sheets/${structuredSheetsID}`, options);
45
45
  }
46
46
 
@@ -51,7 +51,7 @@ export class StructuredSheets extends APIResource {
51
51
  * @example
52
52
  * ```ts
53
53
  * // Automatically fetches more pages as needed.
54
- * for await (const structuredSheetResponse of client.structuredSheets.list()) {
54
+ * for await (const structuredSheetsResponse of client.structuredSheets.list()) {
55
55
  * // ...
56
56
  * }
57
57
  * ```
@@ -59,8 +59,8 @@ export class StructuredSheets extends APIResource {
59
59
  list(
60
60
  query: StructuredSheetListParams | null | undefined = {},
61
61
  options?: RequestOptions,
62
- ): PagePromise<StructuredSheetResponsesCursorIDPage, StructuredSheetResponse> {
63
- return this._client.getAPIList('/v1/structured-sheets', CursorIDPage<StructuredSheetResponse>, {
62
+ ): PagePromise<StructuredSheetsResponsesCursorIDPage, StructuredSheetsResponse> {
63
+ return this._client.getAPIList('/v1/structured-sheets', CursorIDPage<StructuredSheetsResponse>, {
64
64
  query,
65
65
  ...options,
66
66
  });
@@ -73,7 +73,7 @@ export class StructuredSheets extends APIResource {
73
73
  * @example
74
74
  * ```ts
75
75
  * await client.structuredSheets.delete(
76
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
76
+ * 'ss_01kfxgjd94fn9stqm42nejb627',
77
77
  * );
78
78
  * ```
79
79
  */
@@ -83,16 +83,64 @@ export class StructuredSheets extends APIResource {
83
83
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
84
84
  });
85
85
  }
86
+
87
+ /**
88
+ * Cancel a structured sheets conversion that is in progress. Only jobs with status
89
+ * 'queued' or 'in_progress' can be cancelled.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const structuredSheetsResponse =
94
+ * await client.structuredSheets.cancel(
95
+ * 'ss_01kfxgjd94fn9stqm42nejb627',
96
+ * );
97
+ * ```
98
+ */
99
+ cancel(structuredSheetsID: string, options?: RequestOptions): APIPromise<StructuredSheetsResponse> {
100
+ return this._client.post(path`/v1/structured-sheets/${structuredSheetsID}/cancel`, options);
101
+ }
102
+
103
+ /**
104
+ * Download the structured data in the specified format. Only available when
105
+ * conversion status is 'completed'.
106
+ *
107
+ * Available formats:
108
+ *
109
+ * - `sqlite`: SQLite database containing all extracted tables
110
+ * - `cell_labels`: CSV file with cell-level semantic labels
111
+ *
112
+ * @example
113
+ * ```ts
114
+ * const response = await client.structuredSheets.download(
115
+ * 'ss_01kfxgjd94fn9stqm42nejb627',
116
+ * );
117
+ *
118
+ * const content = await response.blob();
119
+ * console.log(content);
120
+ * ```
121
+ */
122
+ download(
123
+ structuredSheetsID: string,
124
+ query: StructuredSheetDownloadParams | null | undefined = {},
125
+ options?: RequestOptions,
126
+ ): APIPromise<Response> {
127
+ return this._client.get(path`/v1/structured-sheets/${structuredSheetsID}/download`, {
128
+ query,
129
+ ...options,
130
+ headers: buildHeaders([{ Accept: 'application/x-sqlite3' }, options?.headers]),
131
+ __binaryResponse: true,
132
+ });
133
+ }
86
134
  }
87
135
 
88
- export type StructuredSheetResponsesCursorIDPage = CursorIDPage<StructuredSheetResponse>;
136
+ export type StructuredSheetsResponsesCursorIDPage = CursorIDPage<StructuredSheetsResponse>;
89
137
 
90
138
  /**
91
139
  * Response representing a structured sheets conversion job.
92
140
  *
93
141
  * This is returned from POST (create), GET (retrieve), and list endpoints.
94
142
  */
95
- export interface StructuredSheetResponse {
143
+ export interface StructuredSheetsResponse {
96
144
  /**
97
145
  * The unique identifier for this structured sheets conversion.
98
146
  */
@@ -111,22 +159,17 @@ export interface StructuredSheetResponse {
111
159
  /**
112
160
  * The current processing status.
113
161
  */
114
- status: 'pending' | 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled';
162
+ status: 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled';
115
163
 
116
164
  /**
117
165
  * The timestamp when the conversion was last updated.
118
166
  */
119
167
  updated_at: string;
120
168
 
121
- /**
122
- * List of export formats available for download (e.g., ['sqlite']).
123
- */
124
- exports_available?: Array<string>;
125
-
126
169
  /**
127
170
  * Error information when processing fails.
128
171
  */
129
- last_error?: StructuredSheetResponse.LastError | null;
172
+ last_error?: StructuredSheetsResponse.LastError | null;
130
173
 
131
174
  /**
132
175
  * The object type, which is always 'structured_sheet'.
@@ -137,9 +180,15 @@ export interface StructuredSheetResponse {
137
180
  * List of sheet names included in this conversion.
138
181
  */
139
182
  sheet_names?: Array<string>;
183
+
184
+ /**
185
+ * Number of tables extracted from the workbook. Only present when status is
186
+ * 'completed'.
187
+ */
188
+ table_count?: number | null;
140
189
  }
141
190
 
142
- export namespace StructuredSheetResponse {
191
+ export namespace StructuredSheetsResponse {
143
192
  /**
144
193
  * Error information when processing fails.
145
194
  */
@@ -170,15 +219,29 @@ export interface StructuredSheetCreateParams {
170
219
 
171
220
  export interface StructuredSheetListParams extends CursorIDPageParams {}
172
221
 
173
- StructuredSheets.Exports = Exports;
222
+ export interface StructuredSheetDownloadParams {
223
+ /**
224
+ * The export format to download.
225
+ */
226
+ format?: 'sqlite' | 'cell_labels';
227
+ }
228
+
229
+ StructuredSheets.Tables = Tables;
174
230
 
175
231
  export declare namespace StructuredSheets {
176
232
  export {
177
- type StructuredSheetResponse as StructuredSheetResponse,
178
- type StructuredSheetResponsesCursorIDPage as StructuredSheetResponsesCursorIDPage,
233
+ type StructuredSheetsResponse as StructuredSheetsResponse,
234
+ type StructuredSheetsResponsesCursorIDPage as StructuredSheetsResponsesCursorIDPage,
179
235
  type StructuredSheetCreateParams as StructuredSheetCreateParams,
180
236
  type StructuredSheetListParams as StructuredSheetListParams,
237
+ type StructuredSheetDownloadParams as StructuredSheetDownloadParams,
181
238
  };
182
239
 
183
- export { Exports as Exports };
240
+ export {
241
+ Tables as Tables,
242
+ type TableResponse as TableResponse,
243
+ type TableListResponse as TableListResponse,
244
+ type TableRetrieveParams as TableRetrieveParams,
245
+ type TableDownloadParams as TableDownloadParams,
246
+ };
184
247
  }
@@ -0,0 +1,189 @@
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 { buildHeaders } from '../../internal/headers';
6
+ import { RequestOptions } from '../../internal/request-options';
7
+ import { path } from '../../internal/utils/path';
8
+
9
+ export class Tables extends APIResource {
10
+ /**
11
+ * Get details of a specific table extracted from the structured sheet. Only
12
+ * available when conversion status is 'completed'.
13
+ *
14
+ * @example
15
+ * ```ts
16
+ * const tableResponse =
17
+ * await client.structuredSheets.tables.retrieve(
18
+ * 'tbl_01kfxgjd94fn9stqm45rqr2pnz',
19
+ * {
20
+ * structured_sheets_id: 'ss_01kfxgjd94fn9stqm42nejb627',
21
+ * },
22
+ * );
23
+ * ```
24
+ */
25
+ retrieve(
26
+ tableID: string,
27
+ params: TableRetrieveParams,
28
+ options?: RequestOptions,
29
+ ): APIPromise<TableResponse> {
30
+ const { structured_sheets_id } = params;
31
+ return this._client.get(path`/v1/structured-sheets/${structured_sheets_id}/tables/${tableID}`, options);
32
+ }
33
+
34
+ /**
35
+ * List all tables extracted from the structured sheet. Only available when
36
+ * conversion status is 'completed'.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const tables = await client.structuredSheets.tables.list(
41
+ * 'ss_01kfxgjd94fn9stqm42nejb627',
42
+ * );
43
+ * ```
44
+ */
45
+ list(structuredSheetsID: string, options?: RequestOptions): APIPromise<TableListResponse> {
46
+ return this._client.get(path`/v1/structured-sheets/${structuredSheetsID}/tables`, options);
47
+ }
48
+
49
+ /**
50
+ * Download the table data in the specified format.
51
+ *
52
+ * Available formats:
53
+ *
54
+ * - `parquet`: Apache Parquet columnar format (recommended for data analysis)
55
+ * - `csv`: Comma-separated values (compatible with any spreadsheet application)
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const response =
60
+ * await client.structuredSheets.tables.download(
61
+ * 'tbl_01kfxgjd94fn9stqm45rqr2pnz',
62
+ * {
63
+ * structured_sheets_id: 'ss_01kfxgjd94fn9stqm42nejb627',
64
+ * },
65
+ * );
66
+ *
67
+ * const content = await response.blob();
68
+ * console.log(content);
69
+ * ```
70
+ */
71
+ download(tableID: string, params: TableDownloadParams, options?: RequestOptions): APIPromise<Response> {
72
+ const { structured_sheets_id, ...query } = params;
73
+ return this._client.get(path`/v1/structured-sheets/${structured_sheets_id}/tables/${tableID}/download`, {
74
+ query,
75
+ ...options,
76
+ headers: buildHeaders([{ Accept: 'application/vnd.apache.parquet' }, options?.headers]),
77
+ __binaryResponse: true,
78
+ });
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Response representing a table extracted from a structured sheet.
84
+ *
85
+ * This is returned from GET (retrieve) and list table endpoints. Table names use
86
+ * SQL naming conventions (e.g., monthly_head_count).
87
+ */
88
+ export interface TableResponse {
89
+ /**
90
+ * The unique identifier for this table.
91
+ */
92
+ id: string;
93
+
94
+ /**
95
+ * The timestamp when this table was created.
96
+ */
97
+ created_at: string;
98
+
99
+ /**
100
+ * The name of the table using SQL naming conventions.
101
+ */
102
+ name: string;
103
+
104
+ /**
105
+ * The original Excel sheet name this table came from.
106
+ */
107
+ sheet_name: string;
108
+
109
+ /**
110
+ * Normalized sheet name for use in SQLite table names and export filenames
111
+ * (lowercase, snake_case).
112
+ */
113
+ sheet_name_normalized: string;
114
+
115
+ /**
116
+ * The ID of the structured sheet this table belongs to.
117
+ */
118
+ structured_sheet_id: string;
119
+
120
+ /**
121
+ * The type of table (relational, aggregation, or tableless).
122
+ */
123
+ type: 'relational' | 'aggregation' | 'tableless';
124
+
125
+ /**
126
+ * The object type, which is always 'table'.
127
+ */
128
+ object?: 'table';
129
+ }
130
+
131
+ /**
132
+ * Paginated response for listing tables from a structured sheet.
133
+ *
134
+ * Uses cursor-based pagination for efficient iteration through results.
135
+ */
136
+ export interface TableListResponse {
137
+ /**
138
+ * List of tables.
139
+ */
140
+ data: Array<TableResponse>;
141
+
142
+ /**
143
+ * Whether there are more results available after this page.
144
+ */
145
+ has_more: boolean;
146
+
147
+ /**
148
+ * Unique identifier for a table.
149
+ */
150
+ first_id?: string | null;
151
+
152
+ /**
153
+ * Unique identifier for a table.
154
+ */
155
+ last_id?: string | null;
156
+
157
+ /**
158
+ * The object type, which is always 'list'.
159
+ */
160
+ object?: 'list';
161
+ }
162
+
163
+ export interface TableRetrieveParams {
164
+ /**
165
+ * The unique identifier of the structured sheets conversion.
166
+ */
167
+ structured_sheets_id: string;
168
+ }
169
+
170
+ export interface TableDownloadParams {
171
+ /**
172
+ * Path param: The unique identifier of the structured sheets conversion.
173
+ */
174
+ structured_sheets_id: string;
175
+
176
+ /**
177
+ * Query param: The format to download the table data in.
178
+ */
179
+ format?: 'parquet' | 'csv';
180
+ }
181
+
182
+ export declare namespace Tables {
183
+ export {
184
+ type TableResponse as TableResponse,
185
+ type TableListResponse as TableListResponse,
186
+ type TableRetrieveParams as TableRetrieveParams,
187
+ type TableDownloadParams as TableDownloadParams,
188
+ };
189
+ }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.1.0-alpha.1'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.2'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.1";
1
+ export declare const VERSION = "0.1.0-alpha.2";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.1.0-alpha.1";
1
+ export declare const VERSION = "0.1.0-alpha.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.1.0-alpha.1'; // x-release-please-version
4
+ exports.VERSION = '0.1.0-alpha.2'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.1.0-alpha.1'; // x-release-please-version
1
+ export const VERSION = '0.1.0-alpha.2'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map
@@ -1,22 +0,0 @@
1
- import { APIResource } from "../../core/resource.mjs";
2
- import { APIPromise } from "../../core/api-promise.mjs";
3
- import { RequestOptions } from "../../internal/request-options.mjs";
4
- export declare class Exports extends APIResource {
5
- /**
6
- * Download the structured data as a SQLite database file. Only available when
7
- * conversion status is 'completed'.
8
- *
9
- * @example
10
- * ```ts
11
- * const response =
12
- * await client.structuredSheets.exports.downloadSqlite(
13
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
14
- * );
15
- *
16
- * const content = await response.blob();
17
- * console.log(content);
18
- * ```
19
- */
20
- downloadSqlite(structuredSheetsID: string, options?: RequestOptions): APIPromise<Response>;
21
- }
22
- //# sourceMappingURL=exports.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.mts","sourceRoot":"","sources":["../../src/resources/structured-sheets/exports.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CAO3F"}
@@ -1,22 +0,0 @@
1
- import { APIResource } from "../../core/resource.js";
2
- import { APIPromise } from "../../core/api-promise.js";
3
- import { RequestOptions } from "../../internal/request-options.js";
4
- export declare class Exports extends APIResource {
5
- /**
6
- * Download the structured data as a SQLite database file. Only available when
7
- * conversion status is 'completed'.
8
- *
9
- * @example
10
- * ```ts
11
- * const response =
12
- * await client.structuredSheets.exports.downloadSqlite(
13
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
14
- * );
15
- *
16
- * const content = await response.blob();
17
- * console.log(content);
18
- * ```
19
- */
20
- downloadSqlite(structuredSheetsID: string, options?: RequestOptions): APIPromise<Response>;
21
- }
22
- //# sourceMappingURL=exports.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../src/resources/structured-sheets/exports.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,kBAAkB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,QAAQ,CAAC;CAO3F"}
@@ -1,33 +0,0 @@
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.Exports = void 0;
5
- const resource_1 = require("../../core/resource.js");
6
- const headers_1 = require("../../internal/headers.js");
7
- const path_1 = require("../../internal/utils/path.js");
8
- class Exports extends resource_1.APIResource {
9
- /**
10
- * Download the structured data as a SQLite database file. Only available when
11
- * conversion status is 'completed'.
12
- *
13
- * @example
14
- * ```ts
15
- * const response =
16
- * await client.structuredSheets.exports.downloadSqlite(
17
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
18
- * );
19
- *
20
- * const content = await response.blob();
21
- * console.log(content);
22
- * ```
23
- */
24
- downloadSqlite(structuredSheetsID, options) {
25
- return this._client.get((0, path_1.path) `/v1/structured-sheets/${structuredSheetsID}/exports/sqlite`, {
26
- ...options,
27
- headers: (0, headers_1.buildHeaders)([{ Accept: 'application/x-sqlite3' }, options?.headers]),
28
- __binaryResponse: true,
29
- });
30
- }
31
- }
32
- exports.Exports = Exports;
33
- //# sourceMappingURL=exports.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../src/resources/structured-sheets/exports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,qDAAkD;AAElD,uDAAsD;AAEtD,uDAAiD;AAEjD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,kBAA0B,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAA,WAAI,EAAA,yBAAyB,kBAAkB,iBAAiB,EAAE;YACxF,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;AAvBD,0BAuBC"}
@@ -1,29 +0,0 @@
1
- // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
- import { APIResource } from "../../core/resource.mjs";
3
- import { buildHeaders } from "../../internal/headers.mjs";
4
- import { path } from "../../internal/utils/path.mjs";
5
- export class Exports extends APIResource {
6
- /**
7
- * Download the structured data as a SQLite database file. Only available when
8
- * conversion status is 'completed'.
9
- *
10
- * @example
11
- * ```ts
12
- * const response =
13
- * await client.structuredSheets.exports.downloadSqlite(
14
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
15
- * );
16
- *
17
- * const content = await response.blob();
18
- * console.log(content);
19
- * ```
20
- */
21
- downloadSqlite(structuredSheetsID, options) {
22
- return this._client.get(path `/v1/structured-sheets/${structuredSheetsID}/exports/sqlite`, {
23
- ...options,
24
- headers: buildHeaders([{ Accept: 'application/x-sqlite3' }, options?.headers]),
25
- __binaryResponse: true,
26
- });
27
- }
28
- }
29
- //# sourceMappingURL=exports.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"exports.mjs","sourceRoot":"","sources":["../../src/resources/structured-sheets/exports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;OAEhB,EAAE,IAAI,EAAE;AAEf,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,kBAA0B,EAAE,OAAwB;QACjE,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,yBAAyB,kBAAkB,iBAAiB,EAAE;YACxF,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAC9E,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,32 +0,0 @@
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 { buildHeaders } from '../../internal/headers';
6
- import { RequestOptions } from '../../internal/request-options';
7
- import { path } from '../../internal/utils/path';
8
-
9
- export class Exports extends APIResource {
10
- /**
11
- * Download the structured data as a SQLite database file. Only available when
12
- * conversion status is 'completed'.
13
- *
14
- * @example
15
- * ```ts
16
- * const response =
17
- * await client.structuredSheets.exports.downloadSqlite(
18
- * 'ss_01abc2def3ghjkmnpqrs4uvwxy',
19
- * );
20
- *
21
- * const content = await response.blob();
22
- * console.log(content);
23
- * ```
24
- */
25
- downloadSqlite(structuredSheetsID: string, options?: RequestOptions): APIPromise<Response> {
26
- return this._client.get(path`/v1/structured-sheets/${structuredSheetsID}/exports/sqlite`, {
27
- ...options,
28
- headers: buildHeaders([{ Accept: 'application/x-sqlite3' }, options?.headers]),
29
- __binaryResponse: true,
30
- });
31
- }
32
- }