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,151 @@
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
+ "blockId": {
83
+ "minLength": 1,
84
+ "title": "Blockid",
85
+ "type": "string"
86
+ },
87
+ "order": {
88
+ "minimum": 0,
89
+ "title": "Order",
90
+ "type": "integer"
91
+ },
92
+ "type": {
93
+ "enum": [
94
+ "heading",
95
+ "paragraph",
96
+ "list-item",
97
+ "table",
98
+ "quote",
99
+ "transcript"
100
+ ],
101
+ "title": "Type",
102
+ "type": "string"
103
+ },
104
+ "sourceSegmentId": {
105
+ "minLength": 1,
106
+ "title": "Sourcesegmentid",
107
+ "type": "string"
108
+ },
109
+ "locator": {
110
+ "discriminator": {
111
+ "mapping": {
112
+ "page": "#/$defs/PageLocator",
113
+ "time": "#/$defs/TimeLocator"
114
+ },
115
+ "propertyName": "kind"
116
+ },
117
+ "oneOf": [
118
+ {
119
+ "$ref": "#/$defs/PageLocator"
120
+ },
121
+ {
122
+ "$ref": "#/$defs/TimeLocator"
123
+ }
124
+ ],
125
+ "title": "Locator"
126
+ },
127
+ "sourceText": {
128
+ "maxLength": 2000000,
129
+ "minLength": 1,
130
+ "title": "Sourcetext",
131
+ "type": "string"
132
+ },
133
+ "targetText": {
134
+ "maxLength": 2000000,
135
+ "minLength": 1,
136
+ "title": "Targettext",
137
+ "type": "string"
138
+ }
139
+ },
140
+ "required": [
141
+ "blockId",
142
+ "order",
143
+ "type",
144
+ "sourceSegmentId",
145
+ "locator",
146
+ "sourceText",
147
+ "targetText"
148
+ ],
149
+ "title": "CaptureBlock",
150
+ "type": "object"
151
+ }
@@ -0,0 +1,356 @@
1
+ {
2
+ "$defs": {
3
+ "CaptureBlock": {
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "blockId": {
7
+ "minLength": 1,
8
+ "title": "Blockid",
9
+ "type": "string"
10
+ },
11
+ "locator": {
12
+ "discriminator": {
13
+ "mapping": {
14
+ "page": "#/$defs/PageLocator",
15
+ "time": "#/$defs/TimeLocator"
16
+ },
17
+ "propertyName": "kind"
18
+ },
19
+ "oneOf": [
20
+ {
21
+ "$ref": "#/$defs/PageLocator"
22
+ },
23
+ {
24
+ "$ref": "#/$defs/TimeLocator"
25
+ }
26
+ ],
27
+ "title": "Locator"
28
+ },
29
+ "order": {
30
+ "minimum": 0,
31
+ "title": "Order",
32
+ "type": "integer"
33
+ },
34
+ "sourceSegmentId": {
35
+ "minLength": 1,
36
+ "title": "Sourcesegmentid",
37
+ "type": "string"
38
+ },
39
+ "sourceText": {
40
+ "maxLength": 2000000,
41
+ "minLength": 1,
42
+ "title": "Sourcetext",
43
+ "type": "string"
44
+ },
45
+ "targetText": {
46
+ "maxLength": 2000000,
47
+ "minLength": 1,
48
+ "title": "Targettext",
49
+ "type": "string"
50
+ },
51
+ "type": {
52
+ "enum": [
53
+ "heading",
54
+ "paragraph",
55
+ "list-item",
56
+ "table",
57
+ "quote",
58
+ "transcript"
59
+ ],
60
+ "title": "Type",
61
+ "type": "string"
62
+ }
63
+ },
64
+ "required": [
65
+ "blockId",
66
+ "order",
67
+ "type",
68
+ "sourceSegmentId",
69
+ "locator",
70
+ "sourceText",
71
+ "targetText"
72
+ ],
73
+ "title": "CaptureBlock",
74
+ "type": "object"
75
+ },
76
+ "CaptureEngine": {
77
+ "additionalProperties": false,
78
+ "properties": {
79
+ "device": {
80
+ "anyOf": [
81
+ {
82
+ "minLength": 1,
83
+ "type": "string"
84
+ },
85
+ {
86
+ "type": "null"
87
+ }
88
+ ],
89
+ "default": null,
90
+ "title": "Device"
91
+ },
92
+ "digest": {
93
+ "pattern": "^sha256:[0-9a-f]{64}$",
94
+ "title": "Digest",
95
+ "type": "string"
96
+ },
97
+ "engine": {
98
+ "minLength": 1,
99
+ "title": "Engine",
100
+ "type": "string"
101
+ },
102
+ "model": {
103
+ "minLength": 1,
104
+ "title": "Model",
105
+ "type": "string"
106
+ }
107
+ },
108
+ "required": [
109
+ "engine",
110
+ "model",
111
+ "digest"
112
+ ],
113
+ "title": "CaptureEngine",
114
+ "type": "object"
115
+ },
116
+ "CaptureSource": {
117
+ "additionalProperties": false,
118
+ "properties": {
119
+ "bytes": {
120
+ "minimum": 1,
121
+ "title": "Bytes",
122
+ "type": "integer"
123
+ },
124
+ "fileName": {
125
+ "maxLength": 255,
126
+ "minLength": 1,
127
+ "title": "Filename",
128
+ "type": "string"
129
+ },
130
+ "mediaType": {
131
+ "minLength": 1,
132
+ "title": "Mediatype",
133
+ "type": "string"
134
+ },
135
+ "sha256": {
136
+ "pattern": "^[0-9a-f]{64}$",
137
+ "title": "Sha256",
138
+ "type": "string"
139
+ }
140
+ },
141
+ "required": [
142
+ "sha256",
143
+ "fileName",
144
+ "mediaType",
145
+ "bytes"
146
+ ],
147
+ "title": "CaptureSource",
148
+ "type": "object"
149
+ },
150
+ "PageLocator": {
151
+ "additionalProperties": false,
152
+ "properties": {
153
+ "boundingBox": {
154
+ "anyOf": [
155
+ {
156
+ "maxItems": 4,
157
+ "minItems": 4,
158
+ "prefixItems": [
159
+ {
160
+ "type": "number"
161
+ },
162
+ {
163
+ "type": "number"
164
+ },
165
+ {
166
+ "type": "number"
167
+ },
168
+ {
169
+ "type": "number"
170
+ }
171
+ ],
172
+ "type": "array"
173
+ },
174
+ {
175
+ "type": "null"
176
+ }
177
+ ],
178
+ "default": null,
179
+ "title": "Boundingbox"
180
+ },
181
+ "kind": {
182
+ "const": "page",
183
+ "default": "page",
184
+ "title": "Kind",
185
+ "type": "string"
186
+ },
187
+ "page": {
188
+ "minimum": 1,
189
+ "title": "Page",
190
+ "type": "integer"
191
+ }
192
+ },
193
+ "required": [
194
+ "page"
195
+ ],
196
+ "title": "PageLocator",
197
+ "type": "object"
198
+ },
199
+ "RawCaptureSegment": {
200
+ "additionalProperties": false,
201
+ "properties": {
202
+ "locator": {
203
+ "discriminator": {
204
+ "mapping": {
205
+ "page": "#/$defs/PageLocator",
206
+ "time": "#/$defs/TimeLocator"
207
+ },
208
+ "propertyName": "kind"
209
+ },
210
+ "oneOf": [
211
+ {
212
+ "$ref": "#/$defs/PageLocator"
213
+ },
214
+ {
215
+ "$ref": "#/$defs/TimeLocator"
216
+ }
217
+ ],
218
+ "title": "Locator"
219
+ },
220
+ "order": {
221
+ "minimum": 0,
222
+ "title": "Order",
223
+ "type": "integer"
224
+ },
225
+ "segmentId": {
226
+ "minLength": 1,
227
+ "title": "Segmentid",
228
+ "type": "string"
229
+ },
230
+ "text": {
231
+ "maxLength": 2000000,
232
+ "minLength": 1,
233
+ "title": "Text",
234
+ "type": "string"
235
+ }
236
+ },
237
+ "required": [
238
+ "segmentId",
239
+ "order",
240
+ "locator",
241
+ "text"
242
+ ],
243
+ "title": "RawCaptureSegment",
244
+ "type": "object"
245
+ },
246
+ "TimeLocator": {
247
+ "additionalProperties": false,
248
+ "properties": {
249
+ "endMs": {
250
+ "exclusiveMinimum": 0,
251
+ "title": "Endms",
252
+ "type": "integer"
253
+ },
254
+ "kind": {
255
+ "const": "time",
256
+ "default": "time",
257
+ "title": "Kind",
258
+ "type": "string"
259
+ },
260
+ "startMs": {
261
+ "minimum": 0,
262
+ "title": "Startms",
263
+ "type": "integer"
264
+ }
265
+ },
266
+ "required": [
267
+ "startMs",
268
+ "endMs"
269
+ ],
270
+ "title": "TimeLocator",
271
+ "type": "object"
272
+ }
273
+ },
274
+ "$id": "https://github.com/gx-capture/capture-workbench/schema/capture-document-v2.schema.json",
275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
276
+ "additionalProperties": false,
277
+ "properties": {
278
+ "blocks": {
279
+ "items": {
280
+ "$ref": "#/$defs/CaptureBlock"
281
+ },
282
+ "maxItems": 10000,
283
+ "minItems": 1,
284
+ "title": "Blocks",
285
+ "type": "array"
286
+ },
287
+ "completedAt": {
288
+ "format": "date-time",
289
+ "title": "Completedat",
290
+ "type": "string"
291
+ },
292
+ "createdAt": {
293
+ "format": "date-time",
294
+ "title": "Createdat",
295
+ "type": "string"
296
+ },
297
+ "extractionEngine": {
298
+ "$ref": "#/$defs/CaptureEngine"
299
+ },
300
+ "rawSegments": {
301
+ "items": {
302
+ "$ref": "#/$defs/RawCaptureSegment"
303
+ },
304
+ "maxItems": 10000,
305
+ "minItems": 1,
306
+ "title": "Rawsegments",
307
+ "type": "array"
308
+ },
309
+ "schemaVersion": {
310
+ "const": "2",
311
+ "default": "2",
312
+ "title": "Schemaversion",
313
+ "type": "string"
314
+ },
315
+ "source": {
316
+ "$ref": "#/$defs/CaptureSource"
317
+ },
318
+ "sourceText": {
319
+ "maxLength": 8000000,
320
+ "minLength": 1,
321
+ "title": "Sourcetext",
322
+ "type": "string"
323
+ },
324
+ "structuringEngine": {
325
+ "$ref": "#/$defs/CaptureEngine"
326
+ },
327
+ "targetText": {
328
+ "maxLength": 8000000,
329
+ "minLength": 1,
330
+ "title": "Targettext",
331
+ "type": "string"
332
+ },
333
+ "warnings": {
334
+ "items": {
335
+ "maxLength": 500,
336
+ "type": "string"
337
+ },
338
+ "maxItems": 1000,
339
+ "title": "Warnings",
340
+ "type": "array"
341
+ }
342
+ },
343
+ "required": [
344
+ "source",
345
+ "rawSegments",
346
+ "blocks",
347
+ "sourceText",
348
+ "targetText",
349
+ "extractionEngine",
350
+ "structuringEngine",
351
+ "createdAt",
352
+ "completedAt"
353
+ ],
354
+ "title": "CaptureDocument",
355
+ "type": "object"
356
+ }
@@ -0,0 +1,40 @@
1
+ {
2
+ "additionalProperties": false,
3
+ "properties": {
4
+ "engine": {
5
+ "minLength": 1,
6
+ "title": "Engine",
7
+ "type": "string"
8
+ },
9
+ "model": {
10
+ "minLength": 1,
11
+ "title": "Model",
12
+ "type": "string"
13
+ },
14
+ "digest": {
15
+ "pattern": "^sha256:[0-9a-f]{64}$",
16
+ "title": "Digest",
17
+ "type": "string"
18
+ },
19
+ "device": {
20
+ "anyOf": [
21
+ {
22
+ "minLength": 1,
23
+ "type": "string"
24
+ },
25
+ {
26
+ "type": "null"
27
+ }
28
+ ],
29
+ "default": null,
30
+ "title": "Device"
31
+ }
32
+ },
33
+ "required": [
34
+ "engine",
35
+ "model",
36
+ "digest"
37
+ ],
38
+ "title": "CaptureEngine",
39
+ "type": "object"
40
+ }