@3sixty/data-processing-service 0.0.0-stage → 0.20.0-next.1

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 (46) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +24 -2
  3. package/dist/es/dataProcessingRoutes.js +384 -0
  4. package/dist/es/dataProcessingRoutes.js.map +1 -0
  5. package/dist/es/dataProcessingService.js +175 -0
  6. package/dist/es/dataProcessingService.js.map +1 -0
  7. package/dist/es/entities/extractionRule.js +43 -0
  8. package/dist/es/entities/extractionRule.js.map +1 -0
  9. package/dist/es/entities/extractionRuleGroup.js +37 -0
  10. package/dist/es/entities/extractionRuleGroup.js.map +1 -0
  11. package/dist/es/index.js +10 -0
  12. package/dist/es/index.js.map +1 -0
  13. package/dist/es/models/IDataProcessingServiceConstructorOptions.js +4 -0
  14. package/dist/es/models/IDataProcessingServiceConstructorOptions.js.map +1 -0
  15. package/dist/es/restEntryPoints.js +13 -0
  16. package/dist/es/restEntryPoints.js.map +1 -0
  17. package/dist/es/schema.js +13 -0
  18. package/dist/es/schema.js.map +1 -0
  19. package/dist/types/dataProcessingRoutes.d.ts +61 -0
  20. package/dist/types/dataProcessingService.d.ts +73 -0
  21. package/dist/types/entities/extractionRule.d.ts +22 -0
  22. package/dist/types/entities/extractionRuleGroup.d.ts +18 -0
  23. package/dist/types/index.d.ts +7 -0
  24. package/dist/types/models/IDataProcessingServiceConstructorOptions.d.ts +14 -0
  25. package/dist/types/restEntryPoints.d.ts +5 -0
  26. package/dist/types/schema.d.ts +4 -0
  27. package/docs/changelog.md +19 -0
  28. package/docs/examples.md +112 -0
  29. package/docs/open-api/spec.json +894 -0
  30. package/docs/reference/classes/DataProcessingService.md +244 -0
  31. package/docs/reference/classes/ExtractionRule.md +45 -0
  32. package/docs/reference/classes/ExtractionRuleGroup.md +37 -0
  33. package/docs/reference/functions/dataProcessingConvert.md +31 -0
  34. package/docs/reference/functions/dataProcessingExtract.md +31 -0
  35. package/docs/reference/functions/dataProcessingGetRuleGroup.md +31 -0
  36. package/docs/reference/functions/dataProcessingRemoveRuleGroup.md +31 -0
  37. package/docs/reference/functions/dataProcessingSetRuleGroup.md +31 -0
  38. package/docs/reference/functions/generateRestRoutesDataProcessing.md +25 -0
  39. package/docs/reference/functions/initSchema.md +9 -0
  40. package/docs/reference/functions/ruleGroupList.md +31 -0
  41. package/docs/reference/index.md +27 -0
  42. package/docs/reference/interfaces/IDataProcessingServiceConstructorOptions.md +25 -0
  43. package/docs/reference/variables/restEntryPoints.md +5 -0
  44. package/docs/reference/variables/tagsDataProcessing.md +5 -0
  45. package/locales/en.json +10 -0
  46. package/package.json +59 -5
@@ -0,0 +1,894 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "3Sixty - Test Endpoints",
5
+ "description": "REST API for 3Sixty - Test Endpoints.",
6
+ "version": "1.0.0",
7
+ "license": {
8
+ "name": "Apache 2.0 License",
9
+ "url": "https://opensource.org/licenses/Apache-2.0"
10
+ }
11
+ },
12
+ "servers": [
13
+ {
14
+ "url": "https://localhost"
15
+ }
16
+ ],
17
+ "tags": [
18
+ {
19
+ "name": "Data Processing",
20
+ "description": "Endpoints which are modelled to access a data processing contract."
21
+ }
22
+ ],
23
+ "paths": {
24
+ "/data-processing/rule-group/{id}": {
25
+ "put": {
26
+ "operationId": "dataProcessingSetRuleGroup",
27
+ "summary": "Store a rule group for extraction.",
28
+ "tags": [
29
+ "Data Processing"
30
+ ],
31
+ "parameters": [
32
+ {
33
+ "name": "id",
34
+ "description": "The id of the rule group to set.",
35
+ "in": "path",
36
+ "required": true,
37
+ "schema": {
38
+ "type": "string"
39
+ },
40
+ "style": "simple",
41
+ "example": "my-rule-group"
42
+ }
43
+ ],
44
+ "security": [
45
+ {
46
+ "jwtBearerAuthScheme": []
47
+ }
48
+ ],
49
+ "requestBody": {
50
+ "description": "Set a rule group.",
51
+ "required": true,
52
+ "content": {
53
+ "application/json": {
54
+ "schema": {
55
+ "$ref": "#/components/schemas/DataProcessingRuleGroupSetRequest"
56
+ },
57
+ "examples": {
58
+ "dataProcessingRuleGroupSetRequestExample": {
59
+ "value": {
60
+ "label": "My Rule Group",
61
+ "rules": [
62
+ {
63
+ "source": "$.foo",
64
+ "target": "goo",
65
+ "coerce": "bigint"
66
+ }
67
+ ]
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ },
74
+ "responses": {
75
+ "204": {
76
+ "description": "The rest request ended in success with no data."
77
+ },
78
+ "400": {
79
+ "description": "The server cannot process the request, see the content for more details.",
80
+ "content": {
81
+ "application/json": {
82
+ "schema": {
83
+ "$ref": "#/components/schemas/Error"
84
+ },
85
+ "examples": {
86
+ "exampleResponse": {
87
+ "value": {
88
+ "name": "GeneralError",
89
+ "message": "errorMessage",
90
+ "properties": {
91
+ "foo": "bar"
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ },
99
+ "401": {
100
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
101
+ "content": {
102
+ "application/json": {
103
+ "schema": {
104
+ "$ref": "#/components/schemas/Error"
105
+ },
106
+ "examples": {
107
+ "exampleResponse": {
108
+ "value": {
109
+ "name": "UnauthorizedError",
110
+ "message": "errorMessage"
111
+ }
112
+ }
113
+ }
114
+ }
115
+ }
116
+ },
117
+ "500": {
118
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
119
+ "content": {
120
+ "application/json": {
121
+ "schema": {
122
+ "$ref": "#/components/schemas/Error"
123
+ },
124
+ "examples": {
125
+ "exampleResponse": {
126
+ "value": {
127
+ "name": "InternalServerError",
128
+ "message": "errorMessage"
129
+ }
130
+ }
131
+ }
132
+ }
133
+ }
134
+ }
135
+ }
136
+ },
137
+ "get": {
138
+ "operationId": "dataProcessingGetRuleGroup",
139
+ "summary": "Get a rule group for extraction.",
140
+ "tags": [
141
+ "Data Processing"
142
+ ],
143
+ "parameters": [
144
+ {
145
+ "name": "id",
146
+ "description": "The id of the rule group to retrieve.",
147
+ "in": "path",
148
+ "required": true,
149
+ "schema": {
150
+ "type": "string"
151
+ },
152
+ "style": "simple",
153
+ "example": "my-rule-group"
154
+ }
155
+ ],
156
+ "security": [
157
+ {
158
+ "jwtBearerAuthScheme": []
159
+ }
160
+ ],
161
+ "responses": {
162
+ "200": {
163
+ "description": "Get a rule group response.",
164
+ "content": {
165
+ "application/json": {
166
+ "schema": {
167
+ "$ref": "#/components/schemas/RuleGroup"
168
+ },
169
+ "examples": {
170
+ "dataProcessingRuleGroupSetResponseExample": {
171
+ "value": {
172
+ "id": "my-rule-group",
173
+ "label": "My Rule Group",
174
+ "rules": [
175
+ {
176
+ "source": "$.foo",
177
+ "target": "goo",
178
+ "coerce": "bigint"
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "400": {
188
+ "description": "The server cannot process the request, see the content for more details.",
189
+ "content": {
190
+ "application/json": {
191
+ "schema": {
192
+ "$ref": "#/components/schemas/Error"
193
+ },
194
+ "examples": {
195
+ "exampleResponse": {
196
+ "value": {
197
+ "name": "GeneralError",
198
+ "message": "errorMessage",
199
+ "properties": {
200
+ "foo": "bar"
201
+ }
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ },
208
+ "401": {
209
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
210
+ "content": {
211
+ "application/json": {
212
+ "schema": {
213
+ "$ref": "#/components/schemas/Error"
214
+ },
215
+ "examples": {
216
+ "exampleResponse": {
217
+ "value": {
218
+ "name": "UnauthorizedError",
219
+ "message": "errorMessage"
220
+ }
221
+ }
222
+ }
223
+ }
224
+ }
225
+ },
226
+ "500": {
227
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
228
+ "content": {
229
+ "application/json": {
230
+ "schema": {
231
+ "$ref": "#/components/schemas/Error"
232
+ },
233
+ "examples": {
234
+ "exampleResponse": {
235
+ "value": {
236
+ "name": "InternalServerError",
237
+ "message": "errorMessage"
238
+ }
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ }
245
+ },
246
+ "delete": {
247
+ "operationId": "dataProcessingRemoveRuleGroup",
248
+ "summary": "Remove an extraction rule group.",
249
+ "tags": [
250
+ "Data Processing"
251
+ ],
252
+ "parameters": [
253
+ {
254
+ "name": "id",
255
+ "description": "The id of the rule group to remove.",
256
+ "in": "path",
257
+ "required": true,
258
+ "schema": {
259
+ "type": "string"
260
+ },
261
+ "style": "simple",
262
+ "example": "my-rule-group"
263
+ }
264
+ ],
265
+ "security": [
266
+ {
267
+ "jwtBearerAuthScheme": []
268
+ }
269
+ ],
270
+ "responses": {
271
+ "204": {
272
+ "description": "The rest request ended in success with no data."
273
+ },
274
+ "400": {
275
+ "description": "The server cannot process the request, see the content for more details.",
276
+ "content": {
277
+ "application/json": {
278
+ "schema": {
279
+ "$ref": "#/components/schemas/Error"
280
+ },
281
+ "examples": {
282
+ "exampleResponse": {
283
+ "value": {
284
+ "name": "GeneralError",
285
+ "message": "errorMessage",
286
+ "properties": {
287
+ "foo": "bar"
288
+ }
289
+ }
290
+ }
291
+ }
292
+ }
293
+ }
294
+ },
295
+ "401": {
296
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
297
+ "content": {
298
+ "application/json": {
299
+ "schema": {
300
+ "$ref": "#/components/schemas/Error"
301
+ },
302
+ "examples": {
303
+ "exampleResponse": {
304
+ "value": {
305
+ "name": "UnauthorizedError",
306
+ "message": "errorMessage"
307
+ }
308
+ }
309
+ }
310
+ }
311
+ }
312
+ },
313
+ "500": {
314
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
315
+ "content": {
316
+ "application/json": {
317
+ "schema": {
318
+ "$ref": "#/components/schemas/Error"
319
+ },
320
+ "examples": {
321
+ "exampleResponse": {
322
+ "value": {
323
+ "name": "InternalServerError",
324
+ "message": "errorMessage"
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+ }
331
+ }
332
+ }
333
+ },
334
+ "/data-processing/extract": {
335
+ "post": {
336
+ "operationId": "dataProcessingExtract",
337
+ "summary": "Extract data from a binary source using the specified rule group.",
338
+ "tags": [
339
+ "Data Processing"
340
+ ],
341
+ "security": [
342
+ {
343
+ "jwtBearerAuthScheme": []
344
+ }
345
+ ],
346
+ "requestBody": {
347
+ "description": "Perform an extraction on the data with the specified ruleset.",
348
+ "required": true,
349
+ "content": {
350
+ "application/json": {
351
+ "schema": {
352
+ "$ref": "#/components/schemas/DataProcessingExtractRequest"
353
+ },
354
+ "examples": {
355
+ "dataProcessingExtractRequestExample": {
356
+ "value": {
357
+ "ruleGroupId": "my-rule-group",
358
+ "data": "eyJmb28iOiAiYmFyIn0="
359
+ }
360
+ }
361
+ }
362
+ }
363
+ }
364
+ },
365
+ "responses": {
366
+ "200": {
367
+ "description": "Response to extracting data.",
368
+ "content": {
369
+ "application/json": {
370
+ "schema": {
371
+ "$ref": "#/components/schemas/DataProcessingExtractResponse"
372
+ },
373
+ "examples": {
374
+ "dataProcessingExtractResponseExample": {
375
+ "value": {
376
+ "foo": "bar"
377
+ }
378
+ }
379
+ }
380
+ }
381
+ }
382
+ },
383
+ "400": {
384
+ "description": "The server cannot process the request, see the content for more details.",
385
+ "content": {
386
+ "application/json": {
387
+ "schema": {
388
+ "$ref": "#/components/schemas/Error"
389
+ },
390
+ "examples": {
391
+ "exampleResponse": {
392
+ "value": {
393
+ "name": "GeneralError",
394
+ "message": "errorMessage",
395
+ "properties": {
396
+ "foo": "bar"
397
+ }
398
+ }
399
+ }
400
+ }
401
+ }
402
+ }
403
+ },
404
+ "401": {
405
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
406
+ "content": {
407
+ "application/json": {
408
+ "schema": {
409
+ "$ref": "#/components/schemas/Error"
410
+ },
411
+ "examples": {
412
+ "exampleResponse": {
413
+ "value": {
414
+ "name": "UnauthorizedError",
415
+ "message": "errorMessage"
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ },
422
+ "500": {
423
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
424
+ "content": {
425
+ "application/json": {
426
+ "schema": {
427
+ "$ref": "#/components/schemas/Error"
428
+ },
429
+ "examples": {
430
+ "exampleResponse": {
431
+ "value": {
432
+ "name": "InternalServerError",
433
+ "message": "errorMessage"
434
+ }
435
+ }
436
+ }
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "/data-processing/convert": {
444
+ "post": {
445
+ "operationId": "dataProcessingConvert",
446
+ "summary": "Convert data from a binary source and return structured object.",
447
+ "tags": [
448
+ "Data Processing"
449
+ ],
450
+ "security": [
451
+ {
452
+ "jwtBearerAuthScheme": []
453
+ }
454
+ ],
455
+ "requestBody": {
456
+ "description": "Perform a conversion on the data.",
457
+ "required": true,
458
+ "content": {
459
+ "application/json": {
460
+ "schema": {
461
+ "$ref": "#/components/schemas/DataProcessingConvertRequest"
462
+ },
463
+ "examples": {
464
+ "dataProcessingConvertRequestExample": {
465
+ "value": {
466
+ "data": "eyJmb28iOiAiYmFyIn0="
467
+ }
468
+ }
469
+ }
470
+ }
471
+ }
472
+ },
473
+ "responses": {
474
+ "200": {
475
+ "description": "Response to converting data.",
476
+ "content": {
477
+ "application/json": {
478
+ "schema": {
479
+ "$ref": "#/components/schemas/DataProcessingConvertResponse"
480
+ },
481
+ "examples": {
482
+ "dataProcessingConvertResponseExample": {
483
+ "value": {
484
+ "foo": "bar"
485
+ }
486
+ }
487
+ }
488
+ }
489
+ }
490
+ },
491
+ "400": {
492
+ "description": "The server cannot process the request, see the content for more details.",
493
+ "content": {
494
+ "application/json": {
495
+ "schema": {
496
+ "$ref": "#/components/schemas/Error"
497
+ },
498
+ "examples": {
499
+ "exampleResponse": {
500
+ "value": {
501
+ "name": "GeneralError",
502
+ "message": "errorMessage",
503
+ "properties": {
504
+ "foo": "bar"
505
+ }
506
+ }
507
+ }
508
+ }
509
+ }
510
+ }
511
+ },
512
+ "401": {
513
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
514
+ "content": {
515
+ "application/json": {
516
+ "schema": {
517
+ "$ref": "#/components/schemas/Error"
518
+ },
519
+ "examples": {
520
+ "exampleResponse": {
521
+ "value": {
522
+ "name": "UnauthorizedError",
523
+ "message": "errorMessage"
524
+ }
525
+ }
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "500": {
531
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
532
+ "content": {
533
+ "application/json": {
534
+ "schema": {
535
+ "$ref": "#/components/schemas/Error"
536
+ },
537
+ "examples": {
538
+ "exampleResponse": {
539
+ "value": {
540
+ "name": "InternalServerError",
541
+ "message": "errorMessage"
542
+ }
543
+ }
544
+ }
545
+ }
546
+ }
547
+ }
548
+ }
549
+ }
550
+ },
551
+ "/data-processing/rule-group": {
552
+ "get": {
553
+ "operationId": "dataProcessingListRuleGroup",
554
+ "summary": "Get a list with rule groups for extraction.",
555
+ "tags": [
556
+ "Data Processing"
557
+ ],
558
+ "security": [
559
+ {
560
+ "jwtBearerAuthScheme": []
561
+ }
562
+ ],
563
+ "responses": {
564
+ "200": {
565
+ "description": "Response for rule group entry list request.",
566
+ "content": {
567
+ "application/json": {
568
+ "schema": {
569
+ "$ref": "#/components/schemas/DataProcessingRuleGroupListResponse"
570
+ },
571
+ "examples": {
572
+ "ruleGroupListResponseExample": {
573
+ "value": {
574
+ "entities": [
575
+ {
576
+ "id": "my-rule-group",
577
+ "label": "My Rule Group",
578
+ "rules": [
579
+ {
580
+ "source": "$.foo",
581
+ "target": "goo",
582
+ "coerce": "bigint"
583
+ }
584
+ ]
585
+ }
586
+ ],
587
+ "cursor": "1"
588
+ }
589
+ }
590
+ }
591
+ }
592
+ }
593
+ },
594
+ "400": {
595
+ "description": "The server cannot process the request, see the content for more details.",
596
+ "content": {
597
+ "application/json": {
598
+ "schema": {
599
+ "$ref": "#/components/schemas/Error"
600
+ },
601
+ "examples": {
602
+ "exampleResponse": {
603
+ "value": {
604
+ "name": "GeneralError",
605
+ "message": "errorMessage",
606
+ "properties": {
607
+ "foo": "bar"
608
+ }
609
+ }
610
+ }
611
+ }
612
+ }
613
+ }
614
+ },
615
+ "401": {
616
+ "description": "You are not authorized to use the API or no credentials were supplied, see the content for more details.",
617
+ "content": {
618
+ "application/json": {
619
+ "schema": {
620
+ "$ref": "#/components/schemas/Error"
621
+ },
622
+ "examples": {
623
+ "exampleResponse": {
624
+ "value": {
625
+ "name": "UnauthorizedError",
626
+ "message": "errorMessage"
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ },
633
+ "500": {
634
+ "description": "The server has encountered a situation it does not know how to handle, see the content for more details.",
635
+ "content": {
636
+ "application/json": {
637
+ "schema": {
638
+ "$ref": "#/components/schemas/Error"
639
+ },
640
+ "examples": {
641
+ "exampleResponse": {
642
+ "value": {
643
+ "name": "InternalServerError",
644
+ "message": "errorMessage"
645
+ }
646
+ }
647
+ }
648
+ }
649
+ }
650
+ }
651
+ }
652
+ }
653
+ }
654
+ },
655
+ "components": {
656
+ "schemas": {
657
+ "CoerceType": {
658
+ "description": "The types the extracted data can be coerced to.",
659
+ "anyOf": [
660
+ {
661
+ "const": "string",
662
+ "description": "String."
663
+ },
664
+ {
665
+ "const": "number",
666
+ "description": "Number."
667
+ },
668
+ {
669
+ "const": "integer",
670
+ "description": "Integer."
671
+ },
672
+ {
673
+ "const": "boolean",
674
+ "description": "Boolean."
675
+ },
676
+ {
677
+ "const": "bigint",
678
+ "description": "Big Integer."
679
+ },
680
+ {
681
+ "const": "date",
682
+ "description": "Date."
683
+ },
684
+ {
685
+ "const": "datetime",
686
+ "description": "Date Time."
687
+ },
688
+ {
689
+ "const": "time",
690
+ "description": "Time."
691
+ },
692
+ {
693
+ "const": "object",
694
+ "description": "Object."
695
+ },
696
+ {
697
+ "const": "uint8array",
698
+ "description": "Uint8Array."
699
+ },
700
+ {
701
+ "const": "duration",
702
+ "description": "Duration in seconds."
703
+ },
704
+ {
705
+ "const": "array",
706
+ "description": "Array."
707
+ }
708
+ ]
709
+ },
710
+ "DataProcessingConvertRequest": {
711
+ "type": "object",
712
+ "properties": {
713
+ "data": {
714
+ "type": "string",
715
+ "description": "The binary data to convert in base64."
716
+ },
717
+ "overrideMimeType": {
718
+ "type": "string",
719
+ "description": "Use the specified mime type for conversion, will auto detect if undefined."
720
+ }
721
+ },
722
+ "required": [
723
+ "data"
724
+ ],
725
+ "description": "The request body containing the data to convert."
726
+ },
727
+ "DataProcessingConvertResponse": {
728
+ "description": "The converted data as an object."
729
+ },
730
+ "DataProcessingExtractRequest": {
731
+ "type": "object",
732
+ "properties": {
733
+ "ruleGroupId": {
734
+ "type": "string",
735
+ "description": "The rule group id to use for the extraction."
736
+ },
737
+ "data": {
738
+ "type": "string",
739
+ "description": "The binary data to extract from in base64."
740
+ },
741
+ "overrideExtractorType": {
742
+ "type": "string",
743
+ "description": "The default extractor connector will be used if not specified."
744
+ },
745
+ "overrideMimeType": {
746
+ "type": "string",
747
+ "description": "An optional override for the mime type for conversion, will auto detect if not provided."
748
+ }
749
+ },
750
+ "required": [
751
+ "ruleGroupId",
752
+ "data"
753
+ ],
754
+ "description": "The request body containing the data and rule group to use for extraction."
755
+ },
756
+ "DataProcessingExtractResponse": {
757
+ "description": "The extracted data in extended JSON format, preserving types such as bigint, dates, and Uint8Array."
758
+ },
759
+ "DataProcessingRuleGroupListResponse": {
760
+ "type": "object",
761
+ "properties": {
762
+ "entities": {
763
+ "type": "array",
764
+ "items": {
765
+ "$ref": "#/components/schemas/RuleGroup"
766
+ },
767
+ "description": "The entities, which can be partial if a limited keys list was provided."
768
+ },
769
+ "cursor": {
770
+ "type": "string",
771
+ "description": "An optional cursor, when defined can be used to call find to get more entities."
772
+ }
773
+ },
774
+ "required": [
775
+ "entities"
776
+ ],
777
+ "description": "The response body containing the list of rule groups and optional pagination cursor."
778
+ },
779
+ "DataProcessingRuleGroupSetRequest": {
780
+ "type": "object",
781
+ "properties": {
782
+ "label": {
783
+ "type": "string",
784
+ "description": "The label for the rule group."
785
+ },
786
+ "rules": {
787
+ "type": "array",
788
+ "items": {
789
+ "$ref": "#/components/schemas/Rule"
790
+ },
791
+ "description": "The rules."
792
+ }
793
+ },
794
+ "required": [
795
+ "label",
796
+ "rules"
797
+ ],
798
+ "description": "The rule group data to store."
799
+ },
800
+ "Error": {
801
+ "description": "Model to describe serialized error.",
802
+ "type": "object",
803
+ "properties": {
804
+ "name": {
805
+ "type": "string",
806
+ "description": "The name for the error."
807
+ },
808
+ "message": {
809
+ "type": "string",
810
+ "description": "The message for the error as an i18n key."
811
+ },
812
+ "source": {
813
+ "type": "string",
814
+ "description": "The source of the error."
815
+ },
816
+ "properties": {
817
+ "type": "object",
818
+ "additionalProperties": {},
819
+ "description": "Any additional information for the error."
820
+ },
821
+ "stack": {
822
+ "type": "string",
823
+ "description": "The stack trace for the error."
824
+ },
825
+ "cause": {
826
+ "$ref": "#/components/schemas/Error"
827
+ }
828
+ },
829
+ "required": [
830
+ "name",
831
+ "message"
832
+ ]
833
+ },
834
+ "Rule": {
835
+ "description": "Rule defining how to extract data from an object.",
836
+ "type": "object",
837
+ "properties": {
838
+ "source": {
839
+ "type": "string",
840
+ "description": "The JSONPath expression identifying the data to extract from the document."
841
+ },
842
+ "target": {
843
+ "type": "string",
844
+ "description": "The target path of where to store the extracted data, using dotted or numeric index notation."
845
+ },
846
+ "retainPathDepth": {
847
+ "type": "number",
848
+ "description": "When extracting objects, how much of the original path should be maintained in the target object."
849
+ },
850
+ "coerce": {
851
+ "$ref": "#/components/schemas/CoerceType"
852
+ }
853
+ },
854
+ "required": [
855
+ "source",
856
+ "target"
857
+ ]
858
+ },
859
+ "RuleGroup": {
860
+ "description": "Group of rules for extraction.",
861
+ "type": "object",
862
+ "properties": {
863
+ "id": {
864
+ "type": "string",
865
+ "description": "The id for the rule group."
866
+ },
867
+ "label": {
868
+ "type": "string",
869
+ "description": "The label for the rule group."
870
+ },
871
+ "rules": {
872
+ "type": "array",
873
+ "items": {
874
+ "$ref": "#/components/schemas/Rule"
875
+ },
876
+ "description": "The rules."
877
+ }
878
+ },
879
+ "required": [
880
+ "id",
881
+ "label",
882
+ "rules"
883
+ ]
884
+ }
885
+ },
886
+ "securitySchemes": {
887
+ "jwtBearerAuthScheme": {
888
+ "type": "http",
889
+ "scheme": "bearer",
890
+ "bearerFormat": "JWT"
891
+ }
892
+ }
893
+ }
894
+ }