chunkr-ai 0.1.0a2__py3-none-any.whl → 0.1.0a4__py3-none-any.whl

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.
@@ -1,13 +1,5 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from .task import (
4
- TaskResource,
5
- AsyncTaskResource,
6
- TaskResourceWithRawResponse,
7
- AsyncTaskResourceWithRawResponse,
8
- TaskResourceWithStreamingResponse,
9
- AsyncTaskResourceWithStreamingResponse,
10
- )
11
3
  from .parse import (
12
4
  ParseResource,
13
5
  AsyncParseResource,
@@ -16,6 +8,14 @@ from .parse import (
16
8
  ParseResourceWithStreamingResponse,
17
9
  AsyncParseResourceWithStreamingResponse,
18
10
  )
11
+ from .tasks import (
12
+ TasksResource,
13
+ AsyncTasksResource,
14
+ TasksResourceWithRawResponse,
15
+ AsyncTasksResourceWithRawResponse,
16
+ TasksResourceWithStreamingResponse,
17
+ AsyncTasksResourceWithStreamingResponse,
18
+ )
19
19
 
20
20
  __all__ = [
21
21
  "ParseResource",
@@ -24,10 +24,10 @@ __all__ = [
24
24
  "AsyncParseResourceWithRawResponse",
25
25
  "ParseResourceWithStreamingResponse",
26
26
  "AsyncParseResourceWithStreamingResponse",
27
- "TaskResource",
28
- "AsyncTaskResource",
29
- "TaskResourceWithRawResponse",
30
- "AsyncTaskResourceWithRawResponse",
31
- "TaskResourceWithStreamingResponse",
32
- "AsyncTaskResourceWithStreamingResponse",
27
+ "TasksResource",
28
+ "AsyncTasksResource",
29
+ "TasksResourceWithRawResponse",
30
+ "AsyncTasksResourceWithRawResponse",
31
+ "TasksResourceWithStreamingResponse",
32
+ "AsyncTasksResourceWithStreamingResponse",
33
33
  ]
@@ -17,9 +17,9 @@ from ..._response import (
17
17
  async_to_raw_response_wrapper,
18
18
  async_to_streamed_response_wrapper,
19
19
  )
20
- from ...types.task import parse_create_params, parse_update_params
20
+ from ...types.task import Task
21
+ from ...types.tasks import parse_create_params, parse_update_params
21
22
  from ..._base_client import make_request_options
22
- from ...types.task.task import Task
23
23
 
24
24
  __all__ = ["ParseResource", "AsyncParseResource"]
25
25
 
@@ -75,10 +75,16 @@ class ParseResource(SyncAPIResource):
75
75
  - Presigned URLs for file access
76
76
 
77
77
  The returned task will typically be in a `Starting` or `Processing` state. Use
78
- the `GET /task/{task_id}` endpoint to poll for completion.
78
+ the `GET /tasks/{task_id}` endpoint to poll for completion.
79
79
 
80
80
  Args:
81
- file: The file to be uploaded. Can be a URL or a base64 encoded file.
81
+ file:
82
+ The file to be uploaded. Supported inputs:
83
+
84
+ - `ch://files/{file_id}`: References a previously uploaded file you own
85
+ (authorization enforced)
86
+ - `http(s)://...`: Remote URL to fetch
87
+ - `data:*;base64,...` or raw base64 string
82
88
 
83
89
  chunk_processing: Controls the setting for the chunking and post-processing of each chunk.
84
90
 
@@ -113,18 +119,14 @@ class ParseResource(SyncAPIResource):
113
119
  content is produced (rule-based vs. LLM). • The output format (`Html` or
114
120
  `Markdown`).
115
121
 
116
- Optional flags such as image **cropping**, **extended context**, and **LLM
117
- descriptions** further refine behaviour.
118
-
119
- ---
122
+ Optional flags such as image **cropping**, **extended context**, and
123
+ **descriptions** further refine behaviour.
120
124
 
121
125
  **Default strategy per segment** • `Title`, `SectionHeader`, `Text`, `ListItem`,
122
- `Caption`, `Footnote` → **Auto** (Markdown) • `Table` → **LLM** (HTML,
123
- description on) • `Picture` → **LLM** (Markdown, description off, cropping
124
- _All_) • `Formula`, `Page` → **LLM** (Markdown) • `PageHeader`, `PageFooter` →
125
- **Ignore** (removed from output)
126
-
127
- ---
126
+ `Caption`, `Footnote` → **Auto** (Markdown, description off) • `Table` → **LLM**
127
+ (HTML, description on) • `Picture` → **LLM** (Markdown, description off,
128
+ cropping _All_) • `Formula`, `Page` → **LLM** (Markdown, description off) •
129
+ `PageHeader`, `PageFooter` → **Ignore** (removed from output)
128
130
 
129
131
  **Strategy reference** • **Auto** – rule-based content generation. • **LLM** –
130
132
  generate content with an LLM. • **Ignore** – exclude the segment entirely.
@@ -147,7 +149,7 @@ class ParseResource(SyncAPIResource):
147
149
  timeout: Override the client-level default timeout for this request, in seconds
148
150
  """
149
151
  return self._post(
150
- "/task/parse",
152
+ "/tasks/parse",
151
153
  body=maybe_transform(
152
154
  {
153
155
  "file": file,
@@ -201,7 +203,7 @@ class ParseResource(SyncAPIResource):
201
203
  - New configuration must be different from the current one
202
204
 
203
205
  The returned task will typically be in a `Starting` or `Processing` state. Use
204
- the `GET /task/{task_id}` endpoint to poll for completion.
206
+ the `GET /tasks/{task_id}` endpoint to poll for completion.
205
207
 
206
208
  Args:
207
209
  chunk_processing: Controls the setting for the chunking and post-processing of each chunk.
@@ -238,18 +240,14 @@ class ParseResource(SyncAPIResource):
238
240
  content is produced (rule-based vs. LLM). • The output format (`Html` or
239
241
  `Markdown`).
240
242
 
241
- Optional flags such as image **cropping**, **extended context**, and **LLM
242
- descriptions** further refine behaviour.
243
-
244
- ---
243
+ Optional flags such as image **cropping**, **extended context**, and
244
+ **descriptions** further refine behaviour.
245
245
 
246
246
  **Default strategy per segment** • `Title`, `SectionHeader`, `Text`, `ListItem`,
247
- `Caption`, `Footnote` → **Auto** (Markdown) • `Table` → **LLM** (HTML,
248
- description on) • `Picture` → **LLM** (Markdown, description off, cropping
249
- _All_) • `Formula`, `Page` → **LLM** (Markdown) • `PageHeader`, `PageFooter` →
250
- **Ignore** (removed from output)
251
-
252
- ---
247
+ `Caption`, `Footnote` → **Auto** (Markdown, description off) • `Table` → **LLM**
248
+ (HTML, description on) • `Picture` → **LLM** (Markdown, description off,
249
+ cropping _All_) • `Formula`, `Page` → **LLM** (Markdown, description off) •
250
+ `PageHeader`, `PageFooter` → **Ignore** (removed from output)
253
251
 
254
252
  **Strategy reference** • **Auto** – rule-based content generation. • **LLM** –
255
253
  generate content with an LLM. • **Ignore** – exclude the segment entirely.
@@ -274,7 +272,7 @@ class ParseResource(SyncAPIResource):
274
272
  if not task_id:
275
273
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
276
274
  return self._patch(
277
- f"/task/{task_id}/parse",
275
+ f"/tasks/parse/{task_id}",
278
276
  body=maybe_transform(
279
277
  {
280
278
  "chunk_processing": chunk_processing,
@@ -347,10 +345,16 @@ class AsyncParseResource(AsyncAPIResource):
347
345
  - Presigned URLs for file access
348
346
 
349
347
  The returned task will typically be in a `Starting` or `Processing` state. Use
350
- the `GET /task/{task_id}` endpoint to poll for completion.
348
+ the `GET /tasks/{task_id}` endpoint to poll for completion.
351
349
 
352
350
  Args:
353
- file: The file to be uploaded. Can be a URL or a base64 encoded file.
351
+ file:
352
+ The file to be uploaded. Supported inputs:
353
+
354
+ - `ch://files/{file_id}`: References a previously uploaded file you own
355
+ (authorization enforced)
356
+ - `http(s)://...`: Remote URL to fetch
357
+ - `data:*;base64,...` or raw base64 string
354
358
 
355
359
  chunk_processing: Controls the setting for the chunking and post-processing of each chunk.
356
360
 
@@ -385,18 +389,14 @@ class AsyncParseResource(AsyncAPIResource):
385
389
  content is produced (rule-based vs. LLM). • The output format (`Html` or
386
390
  `Markdown`).
387
391
 
388
- Optional flags such as image **cropping**, **extended context**, and **LLM
389
- descriptions** further refine behaviour.
390
-
391
- ---
392
+ Optional flags such as image **cropping**, **extended context**, and
393
+ **descriptions** further refine behaviour.
392
394
 
393
395
  **Default strategy per segment** • `Title`, `SectionHeader`, `Text`, `ListItem`,
394
- `Caption`, `Footnote` → **Auto** (Markdown) • `Table` → **LLM** (HTML,
395
- description on) • `Picture` → **LLM** (Markdown, description off, cropping
396
- _All_) • `Formula`, `Page` → **LLM** (Markdown) • `PageHeader`, `PageFooter` →
397
- **Ignore** (removed from output)
398
-
399
- ---
396
+ `Caption`, `Footnote` → **Auto** (Markdown, description off) • `Table` → **LLM**
397
+ (HTML, description on) • `Picture` → **LLM** (Markdown, description off,
398
+ cropping _All_) • `Formula`, `Page` → **LLM** (Markdown, description off) •
399
+ `PageHeader`, `PageFooter` → **Ignore** (removed from output)
400
400
 
401
401
  **Strategy reference** • **Auto** – rule-based content generation. • **LLM** –
402
402
  generate content with an LLM. • **Ignore** – exclude the segment entirely.
@@ -419,7 +419,7 @@ class AsyncParseResource(AsyncAPIResource):
419
419
  timeout: Override the client-level default timeout for this request, in seconds
420
420
  """
421
421
  return await self._post(
422
- "/task/parse",
422
+ "/tasks/parse",
423
423
  body=await async_maybe_transform(
424
424
  {
425
425
  "file": file,
@@ -473,7 +473,7 @@ class AsyncParseResource(AsyncAPIResource):
473
473
  - New configuration must be different from the current one
474
474
 
475
475
  The returned task will typically be in a `Starting` or `Processing` state. Use
476
- the `GET /task/{task_id}` endpoint to poll for completion.
476
+ the `GET /tasks/{task_id}` endpoint to poll for completion.
477
477
 
478
478
  Args:
479
479
  chunk_processing: Controls the setting for the chunking and post-processing of each chunk.
@@ -510,18 +510,14 @@ class AsyncParseResource(AsyncAPIResource):
510
510
  content is produced (rule-based vs. LLM). • The output format (`Html` or
511
511
  `Markdown`).
512
512
 
513
- Optional flags such as image **cropping**, **extended context**, and **LLM
514
- descriptions** further refine behaviour.
515
-
516
- ---
513
+ Optional flags such as image **cropping**, **extended context**, and
514
+ **descriptions** further refine behaviour.
517
515
 
518
516
  **Default strategy per segment** • `Title`, `SectionHeader`, `Text`, `ListItem`,
519
- `Caption`, `Footnote` → **Auto** (Markdown) • `Table` → **LLM** (HTML,
520
- description on) • `Picture` → **LLM** (Markdown, description off, cropping
521
- _All_) • `Formula`, `Page` → **LLM** (Markdown) • `PageHeader`, `PageFooter` →
522
- **Ignore** (removed from output)
523
-
524
- ---
517
+ `Caption`, `Footnote` → **Auto** (Markdown, description off) • `Table` → **LLM**
518
+ (HTML, description on) • `Picture` → **LLM** (Markdown, description off,
519
+ cropping _All_) • `Formula`, `Page` → **LLM** (Markdown, description off) •
520
+ `PageHeader`, `PageFooter` → **Ignore** (removed from output)
525
521
 
526
522
  **Strategy reference** • **Auto** – rule-based content generation. • **LLM** –
527
523
  generate content with an LLM. • **Ignore** – exclude the segment entirely.
@@ -546,7 +542,7 @@ class AsyncParseResource(AsyncAPIResource):
546
542
  if not task_id:
547
543
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
548
544
  return await self._patch(
549
- f"/task/{task_id}/parse",
545
+ f"/tasks/parse/{task_id}",
550
546
  body=await async_maybe_transform(
551
547
  {
552
548
  "chunk_processing": chunk_processing,
@@ -28,35 +28,35 @@ from ..._response import (
28
28
  async_to_streamed_response_wrapper,
29
29
  )
30
30
  from ...pagination import SyncTasksPage, AsyncTasksPage
31
+ from ...types.task import Task
31
32
  from ..._base_client import AsyncPaginator, make_request_options
32
- from ...types.task.task import Task
33
33
 
34
- __all__ = ["TaskResource", "AsyncTaskResource"]
34
+ __all__ = ["TasksResource", "AsyncTasksResource"]
35
35
 
36
36
 
37
- class TaskResource(SyncAPIResource):
37
+ class TasksResource(SyncAPIResource):
38
38
  @cached_property
39
39
  def parse(self) -> ParseResource:
40
40
  return ParseResource(self._client)
41
41
 
42
42
  @cached_property
43
- def with_raw_response(self) -> TaskResourceWithRawResponse:
43
+ def with_raw_response(self) -> TasksResourceWithRawResponse:
44
44
  """
45
45
  This property can be used as a prefix for any HTTP method call to return
46
46
  the raw response object instead of the parsed content.
47
47
 
48
48
  For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#accessing-raw-response-data-eg-headers
49
49
  """
50
- return TaskResourceWithRawResponse(self)
50
+ return TasksResourceWithRawResponse(self)
51
51
 
52
52
  @cached_property
53
- def with_streaming_response(self) -> TaskResourceWithStreamingResponse:
53
+ def with_streaming_response(self) -> TasksResourceWithStreamingResponse:
54
54
  """
55
55
  An alternative to `.with_raw_response` that doesn't eagerly read the response body.
56
56
 
57
57
  For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#with_streaming_response
58
58
  """
59
- return TaskResourceWithStreamingResponse(self)
59
+ return TasksResourceWithStreamingResponse(self)
60
60
 
61
61
  def list(
62
62
  self,
@@ -75,44 +75,10 @@ class TaskResource(SyncAPIResource):
75
75
  extra_body: Body | None = None,
76
76
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
77
77
  ) -> SyncTasksPage[Task]:
78
- """Retrieves a list of tasks with cursor-based pagination.
79
-
80
- By default, tasks are
81
- returned in descending order (newest first).
82
-
83
- ## Default Behaviors:
84
-
85
- - **limit**: Returns all tasks if not specified
86
- - **start**: No start date filter (returns from beginning of time)
87
- - **end**: No end date filter (returns up to current time)
88
- - **cursor**: Starts from most recent tasks (no pagination offset)
89
- - **sort**: 'desc' (descending order, newest first)
90
- - **include_chunks**: false (excludes chunks for better performance)
91
- - **base64_urls**: false (returns presigned URLs instead of base64)
92
-
93
- ## Common Usage Patterns:
94
-
95
- **Basic usage (get all tasks):** `GET /api/v1/tasks`
96
-
97
- **Get first 10 tasks:** `GET /api/v1/tasks?limit=10`
98
-
99
- **Paginate through results:**
100
-
101
- 1. First request: `GET /api/v1/tasks?limit=10`
102
- 2. Use next_cursor from response for subsequent pages:
103
- `GET /api/v1/tasks?limit=10&cursor=<timestamp>`
104
-
105
- **Filter by date range:**
106
- `GET /api/v1/tasks?start=2025-01-01T00:00:00Z&end=2025-12-31T23:59:59Z`
107
-
108
- **Get detailed results with chunks:** `GET /api/v1/tasks?include_chunks=true`
109
-
110
- **Get base64 encoded content:** `GET /api/v1/tasks?base64_urls=true`
111
-
112
- **Get tasks in ascending order (oldest first):** `GET /api/v1/tasks?sort=asc`
113
-
114
- **Get tasks in descending order (newest first, default):**
115
- `GET /api/v1/tasks?sort=desc`
78
+ """
79
+ Lists tasks for the authenticated user with cursor-based pagination and optional
80
+ filtering by date range. Supports ascending or descending sort order and
81
+ optional inclusion of chunks/base64 URLs.
116
82
 
117
83
  Args:
118
84
  base64_urls: Whether to return base64 encoded URLs. If false, the URLs will be returned as
@@ -193,7 +159,7 @@ class TaskResource(SyncAPIResource):
193
159
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
194
160
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
195
161
  return self._delete(
196
- f"/task/{task_id}",
162
+ f"/tasks/{task_id}",
197
163
  options=make_request_options(
198
164
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
199
165
  ),
@@ -234,7 +200,7 @@ class TaskResource(SyncAPIResource):
234
200
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
235
201
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
236
202
  return self._get(
237
- f"/task/{task_id}/cancel",
203
+ f"/tasks/{task_id}/cancel",
238
204
  options=make_request_options(
239
205
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
240
206
  ),
@@ -287,7 +253,7 @@ class TaskResource(SyncAPIResource):
287
253
  if not task_id:
288
254
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
289
255
  return self._get(
290
- f"/task/{task_id}",
256
+ f"/tasks/{task_id}",
291
257
  options=make_request_options(
292
258
  extra_headers=extra_headers,
293
259
  extra_query=extra_query,
@@ -305,29 +271,29 @@ class TaskResource(SyncAPIResource):
305
271
  )
306
272
 
307
273
 
308
- class AsyncTaskResource(AsyncAPIResource):
274
+ class AsyncTasksResource(AsyncAPIResource):
309
275
  @cached_property
310
276
  def parse(self) -> AsyncParseResource:
311
277
  return AsyncParseResource(self._client)
312
278
 
313
279
  @cached_property
314
- def with_raw_response(self) -> AsyncTaskResourceWithRawResponse:
280
+ def with_raw_response(self) -> AsyncTasksResourceWithRawResponse:
315
281
  """
316
282
  This property can be used as a prefix for any HTTP method call to return
317
283
  the raw response object instead of the parsed content.
318
284
 
319
285
  For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#accessing-raw-response-data-eg-headers
320
286
  """
321
- return AsyncTaskResourceWithRawResponse(self)
287
+ return AsyncTasksResourceWithRawResponse(self)
322
288
 
323
289
  @cached_property
324
- def with_streaming_response(self) -> AsyncTaskResourceWithStreamingResponse:
290
+ def with_streaming_response(self) -> AsyncTasksResourceWithStreamingResponse:
325
291
  """
326
292
  An alternative to `.with_raw_response` that doesn't eagerly read the response body.
327
293
 
328
294
  For more information, see https://www.github.com/lumina-ai-inc/chunkr-python#with_streaming_response
329
295
  """
330
- return AsyncTaskResourceWithStreamingResponse(self)
296
+ return AsyncTasksResourceWithStreamingResponse(self)
331
297
 
332
298
  def list(
333
299
  self,
@@ -346,44 +312,10 @@ class AsyncTaskResource(AsyncAPIResource):
346
312
  extra_body: Body | None = None,
347
313
  timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
348
314
  ) -> AsyncPaginator[Task, AsyncTasksPage[Task]]:
349
- """Retrieves a list of tasks with cursor-based pagination.
350
-
351
- By default, tasks are
352
- returned in descending order (newest first).
353
-
354
- ## Default Behaviors:
355
-
356
- - **limit**: Returns all tasks if not specified
357
- - **start**: No start date filter (returns from beginning of time)
358
- - **end**: No end date filter (returns up to current time)
359
- - **cursor**: Starts from most recent tasks (no pagination offset)
360
- - **sort**: 'desc' (descending order, newest first)
361
- - **include_chunks**: false (excludes chunks for better performance)
362
- - **base64_urls**: false (returns presigned URLs instead of base64)
363
-
364
- ## Common Usage Patterns:
365
-
366
- **Basic usage (get all tasks):** `GET /api/v1/tasks`
367
-
368
- **Get first 10 tasks:** `GET /api/v1/tasks?limit=10`
369
-
370
- **Paginate through results:**
371
-
372
- 1. First request: `GET /api/v1/tasks?limit=10`
373
- 2. Use next_cursor from response for subsequent pages:
374
- `GET /api/v1/tasks?limit=10&cursor=<timestamp>`
375
-
376
- **Filter by date range:**
377
- `GET /api/v1/tasks?start=2025-01-01T00:00:00Z&end=2025-12-31T23:59:59Z`
378
-
379
- **Get detailed results with chunks:** `GET /api/v1/tasks?include_chunks=true`
380
-
381
- **Get base64 encoded content:** `GET /api/v1/tasks?base64_urls=true`
382
-
383
- **Get tasks in ascending order (oldest first):** `GET /api/v1/tasks?sort=asc`
384
-
385
- **Get tasks in descending order (newest first, default):**
386
- `GET /api/v1/tasks?sort=desc`
315
+ """
316
+ Lists tasks for the authenticated user with cursor-based pagination and optional
317
+ filtering by date range. Supports ascending or descending sort order and
318
+ optional inclusion of chunks/base64 URLs.
387
319
 
388
320
  Args:
389
321
  base64_urls: Whether to return base64 encoded URLs. If false, the URLs will be returned as
@@ -464,7 +396,7 @@ class AsyncTaskResource(AsyncAPIResource):
464
396
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
465
397
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
466
398
  return await self._delete(
467
- f"/task/{task_id}",
399
+ f"/tasks/{task_id}",
468
400
  options=make_request_options(
469
401
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
470
402
  ),
@@ -505,7 +437,7 @@ class AsyncTaskResource(AsyncAPIResource):
505
437
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
506
438
  extra_headers = {"Accept": "*/*", **(extra_headers or {})}
507
439
  return await self._get(
508
- f"/task/{task_id}/cancel",
440
+ f"/tasks/{task_id}/cancel",
509
441
  options=make_request_options(
510
442
  extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
511
443
  ),
@@ -558,7 +490,7 @@ class AsyncTaskResource(AsyncAPIResource):
558
490
  if not task_id:
559
491
  raise ValueError(f"Expected a non-empty value for `task_id` but received {task_id!r}")
560
492
  return await self._get(
561
- f"/task/{task_id}",
493
+ f"/tasks/{task_id}",
562
494
  options=make_request_options(
563
495
  extra_headers=extra_headers,
564
496
  extra_query=extra_query,
@@ -576,89 +508,89 @@ class AsyncTaskResource(AsyncAPIResource):
576
508
  )
577
509
 
578
510
 
579
- class TaskResourceWithRawResponse:
580
- def __init__(self, task: TaskResource) -> None:
581
- self._task = task
511
+ class TasksResourceWithRawResponse:
512
+ def __init__(self, tasks: TasksResource) -> None:
513
+ self._tasks = tasks
582
514
 
583
515
  self.list = to_raw_response_wrapper(
584
- task.list,
516
+ tasks.list,
585
517
  )
586
518
  self.delete = to_raw_response_wrapper(
587
- task.delete,
519
+ tasks.delete,
588
520
  )
589
521
  self.cancel = to_raw_response_wrapper(
590
- task.cancel,
522
+ tasks.cancel,
591
523
  )
592
524
  self.get = to_raw_response_wrapper(
593
- task.get,
525
+ tasks.get,
594
526
  )
595
527
 
596
528
  @cached_property
597
529
  def parse(self) -> ParseResourceWithRawResponse:
598
- return ParseResourceWithRawResponse(self._task.parse)
530
+ return ParseResourceWithRawResponse(self._tasks.parse)
599
531
 
600
532
 
601
- class AsyncTaskResourceWithRawResponse:
602
- def __init__(self, task: AsyncTaskResource) -> None:
603
- self._task = task
533
+ class AsyncTasksResourceWithRawResponse:
534
+ def __init__(self, tasks: AsyncTasksResource) -> None:
535
+ self._tasks = tasks
604
536
 
605
537
  self.list = async_to_raw_response_wrapper(
606
- task.list,
538
+ tasks.list,
607
539
  )
608
540
  self.delete = async_to_raw_response_wrapper(
609
- task.delete,
541
+ tasks.delete,
610
542
  )
611
543
  self.cancel = async_to_raw_response_wrapper(
612
- task.cancel,
544
+ tasks.cancel,
613
545
  )
614
546
  self.get = async_to_raw_response_wrapper(
615
- task.get,
547
+ tasks.get,
616
548
  )
617
549
 
618
550
  @cached_property
619
551
  def parse(self) -> AsyncParseResourceWithRawResponse:
620
- return AsyncParseResourceWithRawResponse(self._task.parse)
552
+ return AsyncParseResourceWithRawResponse(self._tasks.parse)
621
553
 
622
554
 
623
- class TaskResourceWithStreamingResponse:
624
- def __init__(self, task: TaskResource) -> None:
625
- self._task = task
555
+ class TasksResourceWithStreamingResponse:
556
+ def __init__(self, tasks: TasksResource) -> None:
557
+ self._tasks = tasks
626
558
 
627
559
  self.list = to_streamed_response_wrapper(
628
- task.list,
560
+ tasks.list,
629
561
  )
630
562
  self.delete = to_streamed_response_wrapper(
631
- task.delete,
563
+ tasks.delete,
632
564
  )
633
565
  self.cancel = to_streamed_response_wrapper(
634
- task.cancel,
566
+ tasks.cancel,
635
567
  )
636
568
  self.get = to_streamed_response_wrapper(
637
- task.get,
569
+ tasks.get,
638
570
  )
639
571
 
640
572
  @cached_property
641
573
  def parse(self) -> ParseResourceWithStreamingResponse:
642
- return ParseResourceWithStreamingResponse(self._task.parse)
574
+ return ParseResourceWithStreamingResponse(self._tasks.parse)
643
575
 
644
576
 
645
- class AsyncTaskResourceWithStreamingResponse:
646
- def __init__(self, task: AsyncTaskResource) -> None:
647
- self._task = task
577
+ class AsyncTasksResourceWithStreamingResponse:
578
+ def __init__(self, tasks: AsyncTasksResource) -> None:
579
+ self._tasks = tasks
648
580
 
649
581
  self.list = async_to_streamed_response_wrapper(
650
- task.list,
582
+ tasks.list,
651
583
  )
652
584
  self.delete = async_to_streamed_response_wrapper(
653
- task.delete,
585
+ tasks.delete,
654
586
  )
655
587
  self.cancel = async_to_streamed_response_wrapper(
656
- task.cancel,
588
+ tasks.cancel,
657
589
  )
658
590
  self.get = async_to_streamed_response_wrapper(
659
- task.get,
591
+ tasks.get,
660
592
  )
661
593
 
662
594
  @cached_property
663
595
  def parse(self) -> AsyncParseResourceWithStreamingResponse:
664
- return AsyncParseResourceWithStreamingResponse(self._task.parse)
596
+ return AsyncParseResourceWithStreamingResponse(self._tasks.parse)
@@ -2,7 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .file import File as File
5
6
  from .task import Task as Task
7
+ from .delete import Delete as Delete
8
+ from .file_url import FileURL as FileURL
9
+ from .file_url_params import FileURLParams as FileURLParams
6
10
  from .task_get_params import TaskGetParams as TaskGetParams
11
+ from .file_list_params import FileListParams as FileListParams
7
12
  from .task_list_params import TaskListParams as TaskListParams
13
+ from .file_create_params import FileCreateParams as FileCreateParams
14
+ from .files_list_response import FilesListResponse as FilesListResponse
8
15
  from .health_check_response import HealthCheckResponse as HealthCheckResponse
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from .._models import BaseModel
4
+
5
+ __all__ = ["Delete"]
6
+
7
+
8
+ class Delete(BaseModel):
9
+ deleted: bool
10
+ """Whether the file was deleted"""
@@ -0,0 +1,30 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from datetime import datetime
4
+
5
+ from .._models import BaseModel
6
+
7
+ __all__ = ["File"]
8
+
9
+
10
+ class File(BaseModel):
11
+ content_type: str
12
+ """MIME type detected or provided for the file."""
13
+
14
+ created_at: datetime
15
+ """Timestamp when the file was created."""
16
+
17
+ file_id: str
18
+ """Unique identifier for the file."""
19
+
20
+ file_name: str
21
+ """The original filename supplied by the client."""
22
+
23
+ file_size: int
24
+ """Size of the stored file in bytes."""
25
+
26
+ metadata: object
27
+ """Arbitrary JSON metadata associated with the file."""
28
+
29
+ url: str
30
+ """Permanent Chunkr URL. Use directly with other chunkr API requests."""
@@ -0,0 +1,17 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing_extensions import Required, TypedDict
6
+
7
+ from .._types import FileTypes
8
+
9
+ __all__ = ["FileCreateParams"]
10
+
11
+
12
+ class FileCreateParams(TypedDict, total=False):
13
+ file: Required[FileTypes]
14
+ """The file to upload"""
15
+
16
+ file_metadata: Required[str]
17
+ """Arbitrary JSON metadata associated with the file."""