capture-runtime-client 0.4.0__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.
Files changed (48) hide show
  1. capture_runtime_client/__init__.py +41 -0
  2. capture_runtime_client/client.py +852 -0
  3. capture_runtime_client/codec.py +124 -0
  4. capture_runtime_client/contracts.py +272 -0
  5. capture_runtime_client/errors.py +170 -0
  6. capture_runtime_client/private/__init__.py +1 -0
  7. capture_runtime_client/private/assets/__init__.py +1 -0
  8. capture_runtime_client/private/assets/contract-set.json +1 -0
  9. capture_runtime_client/private/assets/contract-set.sha256 +1 -0
  10. capture_runtime_client/private/generated_models.py +627 -0
  11. capture_runtime_client/private/schemas/__init__.py +1 -0
  12. capture_runtime_client/private/schemas/capture-block.schema.json +151 -0
  13. capture_runtime_client/private/schemas/capture-document.schema.json +356 -0
  14. capture_runtime_client/private/schemas/capture-engine.schema.json +40 -0
  15. capture_runtime_client/private/schemas/capture-event-v2.schema.json +301 -0
  16. capture_runtime_client/private/schemas/capture-failure-v2.schema.json +40 -0
  17. capture_runtime_client/private/schemas/capture-operation-v2.schema.json +207 -0
  18. capture_runtime_client/private/schemas/capture-source.schema.json +34 -0
  19. capture_runtime_client/private/schemas/error-body-v2.schema.json +34 -0
  20. capture_runtime_client/private/schemas/error-envelope-v2.schema.json +49 -0
  21. capture_runtime_client/private/schemas/finalize-ingestion-v2.schema.json +27 -0
  22. capture_runtime_client/private/schemas/ingestion-v2.schema.json +127 -0
  23. capture_runtime_client/private/schemas/open-ingestion-v2.schema.json +79 -0
  24. capture_runtime_client/private/schemas/page-locator.schema.json +49 -0
  25. capture_runtime_client/private/schemas/partial-capture-v2.schema.json +267 -0
  26. capture_runtime_client/private/schemas/raw-capture-segment.schema.json +125 -0
  27. capture_runtime_client/private/schemas/raw-capture.schema.json +260 -0
  28. capture_runtime_client/private/schemas/report-structuring-failure-v2.schema.json +28 -0
  29. capture_runtime_client/private/schemas/runtime-artifact-descriptor-v2.schema.json +34 -0
  30. capture_runtime_client/private/schemas/runtime-installation-v2.schema.json +126 -0
  31. capture_runtime_client/private/schemas/runtime-installations-v2.schema.json +143 -0
  32. capture_runtime_client/private/schemas/runtime-model-installation-v2.schema.json +121 -0
  33. capture_runtime_client/private/schemas/runtime-model-installations-v2.schema.json +138 -0
  34. capture_runtime_client/private/schemas/runtime-model-option-v2.schema.json +80 -0
  35. capture_runtime_client/private/schemas/runtime-model-options-v2.schema.json +103 -0
  36. capture_runtime_client/private/schemas/runtime-ready.schema.json +88 -0
  37. capture_runtime_client/private/schemas/runtime-requirement-v2.schema.json +120 -0
  38. capture_runtime_client/private/schemas/runtime-requirements-v2.schema.json +137 -0
  39. capture_runtime_client/private/schemas/runtime-streaming-capabilities-v2.schema.json +64 -0
  40. capture_runtime_client/private/schemas/start-capture-v2.schema.json +59 -0
  41. capture_runtime_client/private/schemas/start-runtime-installation-v2.schema.json +26 -0
  42. capture_runtime_client/private/schemas/start-runtime-model-installation-v2.schema.json +21 -0
  43. capture_runtime_client/private/schemas/time-locator.schema.json +27 -0
  44. capture_runtime_client/py.typed +1 -0
  45. capture_runtime_client/transport.py +158 -0
  46. capture_runtime_client-0.4.0.dist-info/METADATA +18 -0
  47. capture_runtime_client-0.4.0.dist-info/RECORD +48 -0
  48. capture_runtime_client-0.4.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,127 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureSourceKind": {
4
+ "enum": [
5
+ "pdf",
6
+ "image",
7
+ "audio"
8
+ ],
9
+ "title": "CaptureSourceKind",
10
+ "type": "string"
11
+ },
12
+ "StreamingIngestionStatus": {
13
+ "enum": [
14
+ "open",
15
+ "finalizing",
16
+ "ready",
17
+ "cancelled",
18
+ "failed",
19
+ "expired"
20
+ ],
21
+ "title": "StreamingIngestionStatus",
22
+ "type": "string"
23
+ }
24
+ },
25
+ "additionalProperties": false,
26
+ "properties": {
27
+ "protocolVersion": {
28
+ "const": "2",
29
+ "default": "2",
30
+ "title": "Protocolversion",
31
+ "type": "string"
32
+ },
33
+ "kind": {
34
+ "$ref": "#/$defs/CaptureSourceKind",
35
+ "default": "audio"
36
+ },
37
+ "ingestionId": {
38
+ "minLength": 1,
39
+ "title": "Ingestionid",
40
+ "type": "string"
41
+ },
42
+ "status": {
43
+ "$ref": "#/$defs/StreamingIngestionStatus"
44
+ },
45
+ "fileName": {
46
+ "maxLength": 255,
47
+ "minLength": 1,
48
+ "title": "Filename",
49
+ "type": "string"
50
+ },
51
+ "mediaType": {
52
+ "minLength": 1,
53
+ "title": "Mediatype",
54
+ "type": "string"
55
+ },
56
+ "totalBytes": {
57
+ "exclusiveMinimum": 0,
58
+ "title": "Totalbytes",
59
+ "type": "integer"
60
+ },
61
+ "receivedBytes": {
62
+ "minimum": 0,
63
+ "title": "Receivedbytes",
64
+ "type": "integer"
65
+ },
66
+ "contiguousBytes": {
67
+ "minimum": 0,
68
+ "title": "Contiguousbytes",
69
+ "type": "integer"
70
+ },
71
+ "nextChunkIndex": {
72
+ "minimum": 0,
73
+ "title": "Nextchunkindex",
74
+ "type": "integer"
75
+ },
76
+ "nextOffset": {
77
+ "minimum": 0,
78
+ "title": "Nextoffset",
79
+ "type": "integer"
80
+ },
81
+ "sourceSha256": {
82
+ "anyOf": [
83
+ {
84
+ "pattern": "^[0-9a-f]{64}$",
85
+ "type": "string"
86
+ },
87
+ {
88
+ "type": "null"
89
+ }
90
+ ],
91
+ "default": null,
92
+ "title": "Sourcesha256"
93
+ },
94
+ "finalizedSha256": {
95
+ "anyOf": [
96
+ {
97
+ "pattern": "^[0-9a-f]{64}$",
98
+ "type": "string"
99
+ },
100
+ {
101
+ "type": "null"
102
+ }
103
+ ],
104
+ "default": null,
105
+ "title": "Finalizedsha256"
106
+ },
107
+ "expiresAt": {
108
+ "format": "date-time",
109
+ "title": "Expiresat",
110
+ "type": "string"
111
+ }
112
+ },
113
+ "required": [
114
+ "ingestionId",
115
+ "status",
116
+ "fileName",
117
+ "mediaType",
118
+ "totalBytes",
119
+ "receivedBytes",
120
+ "contiguousBytes",
121
+ "nextChunkIndex",
122
+ "nextOffset",
123
+ "expiresAt"
124
+ ],
125
+ "title": "IngestionV2",
126
+ "type": "object"
127
+ }
@@ -0,0 +1,79 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureSourceKind": {
4
+ "enum": [
5
+ "pdf",
6
+ "image",
7
+ "audio"
8
+ ],
9
+ "title": "CaptureSourceKind",
10
+ "type": "string"
11
+ },
12
+ "StreamingIngestionMode": {
13
+ "enum": [
14
+ "file"
15
+ ],
16
+ "title": "StreamingIngestionMode",
17
+ "type": "string"
18
+ }
19
+ },
20
+ "additionalProperties": false,
21
+ "properties": {
22
+ "protocolVersion": {
23
+ "const": "2",
24
+ "default": "2",
25
+ "title": "Protocolversion",
26
+ "type": "string"
27
+ },
28
+ "kind": {
29
+ "$ref": "#/$defs/CaptureSourceKind",
30
+ "default": "audio"
31
+ },
32
+ "mode": {
33
+ "$ref": "#/$defs/StreamingIngestionMode",
34
+ "default": "file"
35
+ },
36
+ "clientRequestId": {
37
+ "minLength": 1,
38
+ "title": "Clientrequestid",
39
+ "type": "string"
40
+ },
41
+ "fileName": {
42
+ "maxLength": 255,
43
+ "minLength": 1,
44
+ "title": "Filename",
45
+ "type": "string"
46
+ },
47
+ "mediaType": {
48
+ "minLength": 1,
49
+ "title": "Mediatype",
50
+ "type": "string"
51
+ },
52
+ "totalBytes": {
53
+ "exclusiveMinimum": 0,
54
+ "title": "Totalbytes",
55
+ "type": "integer"
56
+ },
57
+ "sourceSha256": {
58
+ "anyOf": [
59
+ {
60
+ "pattern": "^[0-9a-f]{64}$",
61
+ "type": "string"
62
+ },
63
+ {
64
+ "type": "null"
65
+ }
66
+ ],
67
+ "default": null,
68
+ "title": "Sourcesha256"
69
+ }
70
+ },
71
+ "required": [
72
+ "clientRequestId",
73
+ "fileName",
74
+ "mediaType",
75
+ "totalBytes"
76
+ ],
77
+ "title": "OpenIngestionV2",
78
+ "type": "object"
79
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "properties": {
4
+ "kind": {
5
+ "const": "page",
6
+ "default": "page",
7
+ "title": "Kind",
8
+ "type": "string"
9
+ },
10
+ "page": {
11
+ "minimum": 1,
12
+ "title": "Page",
13
+ "type": "integer"
14
+ },
15
+ "boundingBox": {
16
+ "anyOf": [
17
+ {
18
+ "maxItems": 4,
19
+ "minItems": 4,
20
+ "prefixItems": [
21
+ {
22
+ "type": "number"
23
+ },
24
+ {
25
+ "type": "number"
26
+ },
27
+ {
28
+ "type": "number"
29
+ },
30
+ {
31
+ "type": "number"
32
+ }
33
+ ],
34
+ "type": "array"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ],
40
+ "default": null,
41
+ "title": "Boundingbox"
42
+ }
43
+ },
44
+ "required": [
45
+ "page"
46
+ ],
47
+ "title": "PageLocator",
48
+ "type": "object"
49
+ }
@@ -0,0 +1,267 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureEngine": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "engine": {
7
+ "minLength": 1,
8
+ "title": "Engine",
9
+ "type": "string"
10
+ },
11
+ "model": {
12
+ "minLength": 1,
13
+ "title": "Model",
14
+ "type": "string"
15
+ },
16
+ "digest": {
17
+ "pattern": "^sha256:[0-9a-f]{64}$",
18
+ "title": "Digest",
19
+ "type": "string"
20
+ },
21
+ "device": {
22
+ "anyOf": [
23
+ {
24
+ "minLength": 1,
25
+ "type": "string"
26
+ },
27
+ {
28
+ "type": "null"
29
+ }
30
+ ],
31
+ "default": null,
32
+ "title": "Device"
33
+ }
34
+ },
35
+ "required": [
36
+ "engine",
37
+ "model",
38
+ "digest"
39
+ ],
40
+ "title": "CaptureEngine",
41
+ "type": "object"
42
+ },
43
+ "CaptureSource": {
44
+ "additionalProperties": false,
45
+ "properties": {
46
+ "sha256": {
47
+ "pattern": "^[0-9a-f]{64}$",
48
+ "title": "Sha256",
49
+ "type": "string"
50
+ },
51
+ "fileName": {
52
+ "maxLength": 255,
53
+ "minLength": 1,
54
+ "title": "Filename",
55
+ "type": "string"
56
+ },
57
+ "mediaType": {
58
+ "minLength": 1,
59
+ "title": "Mediatype",
60
+ "type": "string"
61
+ },
62
+ "bytes": {
63
+ "minimum": 1,
64
+ "title": "Bytes",
65
+ "type": "integer"
66
+ }
67
+ },
68
+ "required": [
69
+ "sha256",
70
+ "fileName",
71
+ "mediaType",
72
+ "bytes"
73
+ ],
74
+ "title": "CaptureSource",
75
+ "type": "object"
76
+ },
77
+ "PageLocator": {
78
+ "additionalProperties": false,
79
+ "properties": {
80
+ "kind": {
81
+ "const": "page",
82
+ "default": "page",
83
+ "title": "Kind",
84
+ "type": "string"
85
+ },
86
+ "page": {
87
+ "minimum": 1,
88
+ "title": "Page",
89
+ "type": "integer"
90
+ },
91
+ "boundingBox": {
92
+ "anyOf": [
93
+ {
94
+ "maxItems": 4,
95
+ "minItems": 4,
96
+ "prefixItems": [
97
+ {
98
+ "type": "number"
99
+ },
100
+ {
101
+ "type": "number"
102
+ },
103
+ {
104
+ "type": "number"
105
+ },
106
+ {
107
+ "type": "number"
108
+ }
109
+ ],
110
+ "type": "array"
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ],
116
+ "default": null,
117
+ "title": "Boundingbox"
118
+ }
119
+ },
120
+ "required": [
121
+ "page"
122
+ ],
123
+ "title": "PageLocator",
124
+ "type": "object"
125
+ },
126
+ "RawCaptureSegment": {
127
+ "additionalProperties": false,
128
+ "properties": {
129
+ "segmentId": {
130
+ "minLength": 1,
131
+ "title": "Segmentid",
132
+ "type": "string"
133
+ },
134
+ "order": {
135
+ "minimum": 0,
136
+ "title": "Order",
137
+ "type": "integer"
138
+ },
139
+ "locator": {
140
+ "discriminator": {
141
+ "mapping": {
142
+ "page": "#/$defs/PageLocator",
143
+ "time": "#/$defs/TimeLocator"
144
+ },
145
+ "propertyName": "kind"
146
+ },
147
+ "oneOf": [
148
+ {
149
+ "$ref": "#/$defs/PageLocator"
150
+ },
151
+ {
152
+ "$ref": "#/$defs/TimeLocator"
153
+ }
154
+ ],
155
+ "title": "Locator"
156
+ },
157
+ "text": {
158
+ "maxLength": 2000000,
159
+ "minLength": 1,
160
+ "title": "Text",
161
+ "type": "string"
162
+ }
163
+ },
164
+ "required": [
165
+ "segmentId",
166
+ "order",
167
+ "locator",
168
+ "text"
169
+ ],
170
+ "title": "RawCaptureSegment",
171
+ "type": "object"
172
+ },
173
+ "TimeLocator": {
174
+ "additionalProperties": false,
175
+ "properties": {
176
+ "kind": {
177
+ "const": "time",
178
+ "default": "time",
179
+ "title": "Kind",
180
+ "type": "string"
181
+ },
182
+ "startMs": {
183
+ "minimum": 0,
184
+ "title": "Startms",
185
+ "type": "integer"
186
+ },
187
+ "endMs": {
188
+ "exclusiveMinimum": 0,
189
+ "title": "Endms",
190
+ "type": "integer"
191
+ }
192
+ },
193
+ "required": [
194
+ "startMs",
195
+ "endMs"
196
+ ],
197
+ "title": "TimeLocator",
198
+ "type": "object"
199
+ }
200
+ },
201
+ "additionalProperties": false,
202
+ "properties": {
203
+ "protocolVersion": {
204
+ "const": "2",
205
+ "default": "2",
206
+ "title": "Protocolversion",
207
+ "type": "string"
208
+ },
209
+ "captureId": {
210
+ "minLength": 1,
211
+ "title": "Captureid",
212
+ "type": "string"
213
+ },
214
+ "source": {
215
+ "$ref": "#/$defs/CaptureSource"
216
+ },
217
+ "revision": {
218
+ "minimum": 0,
219
+ "title": "Revision",
220
+ "type": "integer"
221
+ },
222
+ "coveredUntilMs": {
223
+ "minimum": 0,
224
+ "title": "Covereduntilms",
225
+ "type": "integer"
226
+ },
227
+ "segments": {
228
+ "items": {
229
+ "$ref": "#/$defs/RawCaptureSegment"
230
+ },
231
+ "maxItems": 10000,
232
+ "title": "Segments",
233
+ "type": "array"
234
+ },
235
+ "sourceText": {
236
+ "default": "",
237
+ "maxLength": 8000000,
238
+ "title": "Sourcetext",
239
+ "type": "string"
240
+ },
241
+ "extractionEngine": {
242
+ "anyOf": [
243
+ {
244
+ "$ref": "#/$defs/CaptureEngine"
245
+ },
246
+ {
247
+ "type": "null"
248
+ }
249
+ ],
250
+ "default": null
251
+ },
252
+ "updatedAt": {
253
+ "format": "date-time",
254
+ "title": "Updatedat",
255
+ "type": "string"
256
+ }
257
+ },
258
+ "required": [
259
+ "captureId",
260
+ "source",
261
+ "revision",
262
+ "coveredUntilMs",
263
+ "updatedAt"
264
+ ],
265
+ "title": "PartialCaptureV2",
266
+ "type": "object"
267
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "$defs": {
3
+ "PageLocator": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "kind": {
7
+ "const": "page",
8
+ "default": "page",
9
+ "title": "Kind",
10
+ "type": "string"
11
+ },
12
+ "page": {
13
+ "minimum": 1,
14
+ "title": "Page",
15
+ "type": "integer"
16
+ },
17
+ "boundingBox": {
18
+ "anyOf": [
19
+ {
20
+ "maxItems": 4,
21
+ "minItems": 4,
22
+ "prefixItems": [
23
+ {
24
+ "type": "number"
25
+ },
26
+ {
27
+ "type": "number"
28
+ },
29
+ {
30
+ "type": "number"
31
+ },
32
+ {
33
+ "type": "number"
34
+ }
35
+ ],
36
+ "type": "array"
37
+ },
38
+ {
39
+ "type": "null"
40
+ }
41
+ ],
42
+ "default": null,
43
+ "title": "Boundingbox"
44
+ }
45
+ },
46
+ "required": [
47
+ "page"
48
+ ],
49
+ "title": "PageLocator",
50
+ "type": "object"
51
+ },
52
+ "TimeLocator": {
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "kind": {
56
+ "const": "time",
57
+ "default": "time",
58
+ "title": "Kind",
59
+ "type": "string"
60
+ },
61
+ "startMs": {
62
+ "minimum": 0,
63
+ "title": "Startms",
64
+ "type": "integer"
65
+ },
66
+ "endMs": {
67
+ "exclusiveMinimum": 0,
68
+ "title": "Endms",
69
+ "type": "integer"
70
+ }
71
+ },
72
+ "required": [
73
+ "startMs",
74
+ "endMs"
75
+ ],
76
+ "title": "TimeLocator",
77
+ "type": "object"
78
+ }
79
+ },
80
+ "additionalProperties": false,
81
+ "properties": {
82
+ "segmentId": {
83
+ "minLength": 1,
84
+ "title": "Segmentid",
85
+ "type": "string"
86
+ },
87
+ "order": {
88
+ "minimum": 0,
89
+ "title": "Order",
90
+ "type": "integer"
91
+ },
92
+ "locator": {
93
+ "discriminator": {
94
+ "mapping": {
95
+ "page": "#/$defs/PageLocator",
96
+ "time": "#/$defs/TimeLocator"
97
+ },
98
+ "propertyName": "kind"
99
+ },
100
+ "oneOf": [
101
+ {
102
+ "$ref": "#/$defs/PageLocator"
103
+ },
104
+ {
105
+ "$ref": "#/$defs/TimeLocator"
106
+ }
107
+ ],
108
+ "title": "Locator"
109
+ },
110
+ "text": {
111
+ "maxLength": 2000000,
112
+ "minLength": 1,
113
+ "title": "Text",
114
+ "type": "string"
115
+ }
116
+ },
117
+ "required": [
118
+ "segmentId",
119
+ "order",
120
+ "locator",
121
+ "text"
122
+ ],
123
+ "title": "RawCaptureSegment",
124
+ "type": "object"
125
+ }