@abyss-project/tools 1.0.5 → 1.2.0
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.
- package/.eslintrc.js +33 -33
- package/.prettierrc +5 -5
- package/README.md +32 -32
- package/dist/api/beam.api.d.ts +48 -0
- package/dist/api/beam.api.js +104 -0
- package/dist/api/beam.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.d.ts +9 -0
- package/dist/api/extraction-plan-preset.api.js +23 -0
- package/dist/api/extraction-plan-preset.api.js.map +1 -0
- package/dist/api/extraction-plan-preset.api.test.d.ts +1 -0
- package/dist/api/extraction-plan-preset.api.test.js +41 -0
- package/dist/api/extraction-plan-preset.api.test.js.map +1 -0
- package/dist/api/extraction-settings.api.d.ts +4 -0
- package/dist/api/extraction-settings.api.js +22 -0
- package/dist/api/extraction-settings.api.js.map +1 -0
- package/dist/api/extraction.api.d.ts +74 -0
- package/dist/api/extraction.api.js +416 -0
- package/dist/api/extraction.api.js.map +1 -0
- package/dist/api/index.d.ts +4 -1
- package/dist/api/index.js +4 -1
- package/dist/api/index.js.map +1 -1
- package/dist/constants/beam.constants.d.ts +1 -0
- package/dist/constants/beam.constants.js +5 -0
- package/dist/constants/beam.constants.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/index.d.ts +108 -59
- package/dist/index.js +106 -59
- package/dist/index.js.map +1 -1
- package/dist/types/enum/beam.enum.d.ts +12 -0
- package/dist/types/enum/beam.enum.js +18 -0
- package/dist/types/enum/beam.enum.js.map +1 -0
- package/dist/types/enum/combine-strategy.enum.d.ts +5 -0
- package/dist/types/enum/combine-strategy.enum.js +10 -0
- package/dist/types/enum/combine-strategy.enum.js.map +1 -0
- package/dist/types/enum/content-share.enum.d.ts +3 -1
- package/dist/types/enum/content-share.enum.js +2 -0
- package/dist/types/enum/content-share.enum.js.map +1 -1
- package/dist/types/enum/document-type.enum.d.ts +9 -0
- package/dist/types/enum/document-type.enum.js +14 -0
- package/dist/types/enum/document-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.d.ts +8 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js +13 -0
- package/dist/types/enum/extraction-feedback-issue-type.enum.js.map +1 -0
- package/dist/types/enum/extraction-warning.enum.d.ts +7 -0
- package/dist/types/enum/extraction-warning.enum.js +12 -0
- package/dist/types/enum/extraction-warning.enum.js.map +1 -0
- package/dist/types/enum/index.d.ts +7 -0
- package/dist/types/enum/index.js +7 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/interpreter-kind.enum.d.ts +5 -0
- package/dist/types/enum/interpreter-kind.enum.js +10 -0
- package/dist/types/enum/interpreter-kind.enum.js.map +1 -0
- package/dist/types/enum/provider-kind.enum.d.ts +10 -0
- package/dist/types/enum/provider-kind.enum.js +16 -0
- package/dist/types/enum/provider-kind.enum.js.map +1 -0
- package/dist/types/interface/api/requests/beam.request.d.ts +122 -0
- package/dist/types/interface/api/{responses/pdf.response.js → requests/beam.request.js} +1 -1
- package/dist/types/interface/api/requests/beam.request.js.map +1 -0
- package/dist/types/interface/api/requests/{rcb.request.d.ts → extraction.request.d.ts} +81 -52
- package/dist/types/interface/api/requests/{pdf.public.request.js → extraction.request.js} +1 -1
- package/dist/types/interface/api/requests/extraction.request.js.map +1 -0
- package/dist/types/interface/api/requests/index.d.ts +2 -1
- package/dist/types/interface/api/requests/index.js +2 -1
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/responses/beam.response.d.ts +92 -0
- package/dist/types/interface/api/responses/{rcb.response.js → beam.response.js} +1 -1
- package/dist/types/interface/api/responses/beam.response.js.map +1 -0
- package/dist/types/interface/api/responses/extraction.response.d.ts +403 -0
- package/dist/types/interface/api/{requests/user-tag.request.js → responses/extraction.response.js} +1 -1
- package/dist/types/interface/api/responses/extraction.response.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +2 -1
- package/dist/types/interface/api/responses/index.js +2 -1
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/models/beam.dto.d.ts +58 -0
- package/dist/types/interface/{api/requests/pdf.request.js → models/beam.dto.js} +1 -1
- package/dist/types/interface/models/beam.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +159 -0
- package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.d.ts +163 -0
- package/dist/types/interface/models/extraction-plan.dto.js +11 -0
- package/dist/types/interface/models/extraction-plan.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js +35 -0
- package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.d.ts +37 -0
- package/dist/types/interface/{api/requests/rcb.request.js → models/extraction-spatial-template.dto.js} +1 -1
- package/dist/types/interface/models/extraction-spatial-template.dto.js.map +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.d.ts +1 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js +15 -0
- package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -0
- package/dist/types/interface/models/{rcb.dto.d.ts → extraction.dto.d.ts} +64 -48
- package/dist/types/interface/models/extraction.dto.js +28 -0
- package/dist/types/interface/models/extraction.dto.js.map +1 -0
- package/dist/types/interface/models/index.d.ts +4 -1
- package/dist/types/interface/models/index.js +4 -1
- package/dist/types/interface/models/index.js.map +1 -1
- package/dist/types/interface/models/organization.dto.d.ts +2 -0
- package/dist/utils/{rcb-webhook.utils.d.ts → extraction-webhook.utils.d.ts} +2 -2
- package/dist/utils/{rcb-webhook.utils.js → extraction-webhook.utils.js} +4 -4
- package/dist/utils/extraction-webhook.utils.js.map +1 -0
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/shape.utils.js +18 -18
- package/package.json +14 -9
- package/src/api/abyss.admin.api.ts +54 -54
- package/src/api/atlas-document.api.ts +68 -68
- package/src/api/atlas-group.api.ts +69 -69
- package/src/api/atlas-page.api.ts +124 -124
- package/src/api/atlas.api.ts +103 -103
- package/src/api/atlas.public.api.ts +42 -42
- package/src/api/beam.api.ts +300 -0
- package/src/api/board-card-checklist.api.ts +99 -99
- package/src/api/board-card-comment.api.ts +57 -57
- package/src/api/board-card-document.api.ts +57 -57
- package/src/api/board-card.api.ts +137 -137
- package/src/api/board-column.api.ts +54 -54
- package/src/api/board-label.api.ts +87 -87
- package/src/api/board.api.ts +122 -122
- package/src/api/draw.api.ts +97 -97
- package/src/api/draw.public.api.ts +48 -48
- package/src/api/extraction-plan-preset.api.test.ts +24 -0
- package/src/api/extraction-plan-preset.api.ts +51 -0
- package/src/api/extraction-settings.api.ts +59 -0
- package/src/api/extraction.api.ts +899 -0
- package/src/api/index.ts +56 -51
- package/src/api/memo.api.ts +97 -97
- package/src/api/metrics.api.ts +27 -27
- package/src/api/monitor.api.ts +6 -6
- package/src/api/organization.api.ts +14 -14
- package/src/api/retrospective-card.api.ts +74 -74
- package/src/api/retrospective-member.api.ts +54 -54
- package/src/api/retrospective-section.api.ts +74 -74
- package/src/api/retrospective.api.ts +124 -124
- package/src/api/retrospective.public.api.ts +147 -147
- package/src/api/short-link.admin.api.ts +39 -39
- package/src/api/short-link.api.ts +125 -125
- package/src/api/short-link.public.api.ts +60 -60
- package/src/api/tag.api.ts +72 -72
- package/src/api/tests/beam.api.spec.ts +42 -0
- package/src/constants/atlas.constants.ts +2 -2
- package/src/constants/beam.constants.ts +4 -0
- package/src/constants/board.constants.ts +7 -7
- package/src/constants/index.ts +6 -5
- package/src/constants/memo.constants.ts +3 -3
- package/src/constants/short-link.constants.ts +11 -11
- package/src/constants/tag.constants.ts +3 -3
- package/src/index.ts +840 -747
- package/src/server-sent-events/index.ts +13 -13
- package/src/server-sent-events/protocols/atlas/atlas.sse-protocol.ts +90 -90
- package/src/server-sent-events/protocols/atlas/index.ts +1 -1
- package/src/server-sent-events/protocols/board/board.sse-protocol.ts +115 -115
- package/src/server-sent-events/protocols/board/index.ts +1 -1
- package/src/server-sent-events/protocols/board-card/board-card.sse-protocol.ts +26 -26
- package/src/server-sent-events/protocols/board-card/index.ts +1 -1
- package/src/server-sent-events/protocols/index.ts +26 -26
- package/src/server-sent-events/protocols/retrospective/index.ts +1 -1
- package/src/server-sent-events/protocols/retrospective/retrospective.sse-protocol.ts +92 -92
- package/src/server-sent-events/server-sent-events.manager.ts +73 -73
- package/src/types/draw.type.ts +173 -173
- package/src/types/enum/api-error.enum.ts +23 -23
- package/src/types/enum/beam.enum.ts +24 -0
- package/src/types/enum/board-activity.enum.ts +189 -189
- package/src/types/enum/board-column-type.enum.ts +6 -6
- package/src/types/enum/combine-strategy.enum.ts +7 -0
- package/src/types/enum/content-share.enum.ts +38 -36
- package/src/types/enum/document-type.enum.ts +10 -0
- package/src/types/enum/extraction-feedback-issue-type.enum.ts +10 -0
- package/src/types/enum/extraction-warning.enum.ts +21 -0
- package/src/types/enum/index.ts +13 -6
- package/src/types/enum/interpreter-kind.enum.ts +7 -0
- package/src/types/enum/pdf-operation.enum.ts +98 -98
- package/src/types/enum/provider-kind.enum.ts +13 -0
- package/src/types/enum/rcb-bank.enum.ts +137 -137
- package/src/types/index.ts +5 -5
- package/src/types/interface/api/index.ts +5 -5
- package/src/types/interface/api/requests/abyss.admin.request.ts +20 -20
- package/src/types/interface/api/requests/atlas-document.request.ts +32 -32
- package/src/types/interface/api/requests/atlas-group.request.ts +45 -45
- package/src/types/interface/api/requests/atlas-page.request.ts +84 -84
- package/src/types/interface/api/requests/atlas.public.request.ts +21 -21
- package/src/types/interface/api/requests/atlas.request.ts +52 -52
- package/src/types/interface/api/requests/beam.request.ts +152 -0
- package/src/types/interface/api/requests/board-card-checklist.request.ts +61 -61
- package/src/types/interface/api/requests/board-card-comment.request.ts +28 -28
- package/src/types/interface/api/requests/board-card-document.request.ts +29 -29
- package/src/types/interface/api/requests/board-card.request.ts +86 -86
- package/src/types/interface/api/requests/board-column.request.ts +30 -30
- package/src/types/interface/api/requests/board-label.request.ts +42 -42
- package/src/types/interface/api/requests/board.request.ts +61 -61
- package/src/types/interface/api/requests/draw.public.request.ts +20 -20
- package/src/types/interface/api/requests/draw.request.ts +49 -49
- package/src/types/interface/api/requests/extraction.request.ts +366 -0
- package/src/types/interface/api/requests/index.ts +29 -28
- package/src/types/interface/api/requests/memo.request.ts +49 -49
- package/src/types/interface/api/requests/metrics.request.ts +7 -7
- package/src/types/interface/api/requests/retrospective-card.request.ts +38 -38
- package/src/types/interface/api/requests/retrospective-member.request.ts +20 -20
- package/src/types/interface/api/requests/retrospective-section.request.ts +43 -43
- package/src/types/interface/api/requests/retrospective.public.request.ts +84 -84
- package/src/types/interface/api/requests/retrospective.request.ts +59 -59
- package/src/types/interface/api/requests/short-link.admin.request.ts +35 -35
- package/src/types/interface/api/requests/short-link.public.request.ts +40 -40
- package/src/types/interface/api/requests/short-link.request.ts +71 -71
- package/src/types/interface/api/requests/tag.request.ts +54 -54
- package/src/types/interface/api/requests/transfer.request.ts +3 -3
- package/src/types/interface/api/responses/abyss.admin.response.ts +28 -28
- package/src/types/interface/api/responses/atlas-document.response.ts +24 -24
- package/src/types/interface/api/responses/atlas-group.response.ts +23 -23
- package/src/types/interface/api/responses/atlas-page.response.ts +53 -53
- package/src/types/interface/api/responses/atlas.public.response.ts +21 -21
- package/src/types/interface/api/responses/atlas.response.ts +32 -32
- package/src/types/interface/api/responses/beam.response.ts +122 -0
- package/src/types/interface/api/responses/board-card-checklist.response.ts +31 -31
- package/src/types/interface/api/responses/board-card-comment.response.ts +20 -20
- package/src/types/interface/api/responses/board-card-document.response.ts +21 -21
- package/src/types/interface/api/responses/board-card.response.ts +55 -55
- package/src/types/interface/api/responses/board-column.response.ts +20 -20
- package/src/types/interface/api/responses/board-label.response.ts +31 -31
- package/src/types/interface/api/responses/board.response.ts +81 -81
- package/src/types/interface/api/responses/count.response.ts +9 -9
- package/src/types/interface/api/responses/draw.public.response.ts +22 -22
- package/src/types/interface/api/responses/draw.response.ts +32 -32
- package/src/types/interface/api/responses/enriched-paginate.response.ts +11 -11
- package/src/types/interface/api/responses/extraction.response.ts +454 -0
- package/src/types/interface/api/responses/index.ts +33 -32
- package/src/types/interface/api/responses/memo.response.ts +32 -32
- package/src/types/interface/api/responses/metrics.response.ts +22 -22
- package/src/types/interface/api/responses/monitor.response.ts +8 -8
- package/src/types/interface/api/responses/recent.response.ts +18 -18
- package/src/types/interface/api/responses/retrospective-card.response.ts +23 -23
- package/src/types/interface/api/responses/retrospective-member.response.ts +22 -22
- package/src/types/interface/api/responses/retrospective-section.response.ts +23 -23
- package/src/types/interface/api/responses/retrospective.public.response.ts +57 -57
- package/src/types/interface/api/responses/retrospective.response.ts +32 -32
- package/src/types/interface/api/responses/short-link.admin.response.ts +21 -21
- package/src/types/interface/api/responses/short-link.public.response.ts +26 -26
- package/src/types/interface/api/responses/short-link.response.ts +38 -38
- package/src/types/interface/api/responses/tag.response.ts +38 -38
- package/src/types/interface/api/responses/transfer.response.ts +14 -14
- package/src/types/interface/api/type-message/api-error.ts +7 -7
- package/src/types/interface/api/type-message/base-paginate.ts +11 -11
- package/src/types/interface/api/type-message/response.ts +6 -6
- package/src/types/interface/index.ts +2 -2
- package/src/types/interface/models/atlas-document.dto.ts +22 -22
- package/src/types/interface/models/atlas-group.dto.ts +21 -21
- package/src/types/interface/models/atlas-page-content.dto.ts +17 -17
- package/src/types/interface/models/atlas-page.dto.ts +26 -26
- package/src/types/interface/models/atlas.dto.ts +34 -34
- package/src/types/interface/models/beam.dto.ts +67 -0
- package/src/types/interface/models/board-activity.dto.ts +20 -20
- package/src/types/interface/models/board-card-checklist-row.dto.ts +14 -14
- package/src/types/interface/models/board-card-checklist.dto.ts +16 -16
- package/src/types/interface/models/board-card-comment.dto.ts +15 -15
- package/src/types/interface/models/board-card-document.dto.ts +22 -22
- package/src/types/interface/models/board-card-label.dto.ts +14 -14
- package/src/types/interface/models/board-card-member.dto.ts +14 -14
- package/src/types/interface/models/board-card.dto.ts +37 -37
- package/src/types/interface/models/board-column.dto.ts +17 -17
- package/src/types/interface/models/board-label.dto.ts +13 -13
- package/src/types/interface/models/board.dto.ts +33 -33
- package/src/types/interface/models/content-share.dto.ts +16 -16
- package/src/types/interface/models/draw.dto.ts +30 -30
- package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +193 -0
- package/src/types/interface/models/extraction-plan.dto.test.ts +47 -0
- package/src/types/interface/models/extraction-plan.dto.ts +241 -0
- package/src/types/interface/models/extraction-spatial-template.dto.test.ts +27 -0
- package/src/types/interface/models/extraction-spatial-template.dto.ts +48 -0
- package/src/types/interface/models/{rcb.dto.ts → extraction.dto.ts} +317 -267
- package/src/types/interface/models/index.ts +34 -31
- package/src/types/interface/models/memo.dto.ts +23 -23
- package/src/types/interface/models/organization.dto.ts +21 -12
- package/src/types/interface/models/project.dto.ts +25 -25
- package/src/types/interface/models/retrospective-card.dto.ts +17 -17
- package/src/types/interface/models/retrospective-member.dto.ts +15 -15
- package/src/types/interface/models/retrospective-section.dto.ts +16 -16
- package/src/types/interface/models/retrospective.dto.ts +32 -32
- package/src/types/interface/models/short-link-click.dto.ts +33 -33
- package/src/types/interface/models/short-link.dto.ts +49 -49
- package/src/types/interface/models/tag.dto.ts +26 -26
- package/src/types/interface/models/team.dto.ts +12 -12
- package/src/types/interface/models/user.dto.ts +26 -26
- package/src/types/tests/beam-management-types.spec.ts +38 -0
- package/src/types/tests/beam-share-enums.spec.ts +11 -0
- package/src/types/tests/beam.dto.spec.ts +61 -0
- package/src/types/tests/beam.request-response.spec.ts +43 -0
- package/src/utils/board.utils.ts +57 -57
- package/src/utils/enum.utils.ts +5 -5
- package/src/utils/error.utils.ts +30 -30
- package/src/utils/{rcb-webhook.utils.ts → extraction-webhook.utils.ts} +30 -30
- package/src/utils/icons.utils.ts +96 -96
- package/src/utils/index.ts +6 -6
- package/src/utils/shape.utils.ts +292 -292
- package/tsconfig.json +36 -35
- package/dist/api/atlas-page-content.api.d.ts +0 -0
- package/dist/api/atlas-page-content.api.js +0 -2
- package/dist/api/atlas-page-content.api.js.map +0 -1
- package/dist/api/pdf.api.d.ts +0 -15
- package/dist/api/pdf.api.js +0 -61
- package/dist/api/pdf.api.js.map +0 -1
- package/dist/api/pdf.public.api.d.ts +0 -8
- package/dist/api/pdf.public.api.js +0 -33
- package/dist/api/pdf.public.api.js.map +0 -1
- package/dist/api/rcb.api.d.ts +0 -72
- package/dist/api/rcb.api.js +0 -400
- package/dist/api/rcb.api.js.map +0 -1
- package/dist/api/user-tag.api.d.ts +0 -9
- package/dist/api/user-tag.api.js +0 -37
- package/dist/api/user-tag.api.js.map +0 -1
- package/dist/constants/user-tag.constants.d.ts +0 -3
- package/dist/constants/user-tag.constants.js +0 -7
- package/dist/constants/user-tag.constants.js.map +0 -1
- package/dist/types/enum/pdf-session.enum.d.ts +0 -10
- package/dist/types/enum/pdf-session.enum.js +0 -16
- package/dist/types/enum/pdf-session.enum.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.public.request.d.ts +0 -19
- package/dist/types/interface/api/requests/pdf.public.request.js.map +0 -1
- package/dist/types/interface/api/requests/pdf.request.d.ts +0 -50
- package/dist/types/interface/api/requests/pdf.request.js.map +0 -1
- package/dist/types/interface/api/requests/rcb.request.js.map +0 -1
- package/dist/types/interface/api/requests/user-tag.request.d.ts +0 -44
- package/dist/types/interface/api/requests/user-tag.request.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.public.response.d.ts +0 -33
- package/dist/types/interface/api/responses/pdf.public.response.js +0 -3
- package/dist/types/interface/api/responses/pdf.public.response.js.map +0 -1
- package/dist/types/interface/api/responses/pdf.response.d.ts +0 -35
- package/dist/types/interface/api/responses/pdf.response.js.map +0 -1
- package/dist/types/interface/api/responses/rcb.response.d.ts +0 -376
- package/dist/types/interface/api/responses/rcb.response.js.map +0 -1
- package/dist/types/interface/api/responses/user-tag.response.d.ts +0 -32
- package/dist/types/interface/api/responses/user-tag.response.js +0 -3
- package/dist/types/interface/api/responses/user-tag.response.js.map +0 -1
- package/dist/types/interface/models/pdf-session.dto.d.ts +0 -28
- package/dist/types/interface/models/pdf-session.dto.js +0 -3
- package/dist/types/interface/models/pdf-session.dto.js.map +0 -1
- package/dist/types/interface/models/rcb.dto.js +0 -26
- package/dist/types/interface/models/rcb.dto.js.map +0 -1
- package/dist/types/interface/models/user-tag.dto.d.ts +0 -22
- package/dist/types/interface/models/user-tag.dto.js +0 -3
- package/dist/types/interface/models/user-tag.dto.js.map +0 -1
- package/dist/utils/rcb-webhook.utils.js.map +0 -1
- package/src/api/rcb.api.ts +0 -829
- package/src/types/interface/api/requests/rcb.request.ts +0 -267
- package/src/types/interface/api/responses/rcb.response.ts +0 -399
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IBoardCard } from './board-card.dto';
|
|
2
|
-
import { IUser } from './user.dto';
|
|
3
|
-
|
|
4
|
-
export interface IBoardCardComment {
|
|
5
|
-
id: string;
|
|
6
|
-
boardCardId: string;
|
|
7
|
-
content: string;
|
|
8
|
-
userId: string | null;
|
|
9
|
-
updatedAt?: Date;
|
|
10
|
-
createdAt?: Date;
|
|
11
|
-
|
|
12
|
-
// Association
|
|
13
|
-
boardCard?: IBoardCard;
|
|
14
|
-
user?: IUser | null;
|
|
15
|
-
}
|
|
1
|
+
import { IBoardCard } from './board-card.dto';
|
|
2
|
+
import { IUser } from './user.dto';
|
|
3
|
+
|
|
4
|
+
export interface IBoardCardComment {
|
|
5
|
+
id: string;
|
|
6
|
+
boardCardId: string;
|
|
7
|
+
content: string;
|
|
8
|
+
userId: string | null;
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
|
|
12
|
+
// Association
|
|
13
|
+
boardCard?: IBoardCard;
|
|
14
|
+
user?: IUser | null;
|
|
15
|
+
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IBoardCard } from './board-card.dto';
|
|
2
|
-
import { IBoard } from './board.dto';
|
|
3
|
-
|
|
4
|
-
export interface IBoardCardDocument {
|
|
5
|
-
id: string;
|
|
6
|
-
boardCardId: string;
|
|
7
|
-
boardId: string;
|
|
8
|
-
name: string;
|
|
9
|
-
externalId: string;
|
|
10
|
-
publicAccessId: string;
|
|
11
|
-
thumbnailId: string | null;
|
|
12
|
-
thumbnailPublicAccessId: string | null;
|
|
13
|
-
checksum: string;
|
|
14
|
-
mimeType: string;
|
|
15
|
-
sizeOctet: number;
|
|
16
|
-
updatedAt?: Date;
|
|
17
|
-
createdAt?: Date;
|
|
18
|
-
|
|
19
|
-
// Association
|
|
20
|
-
boardCard: IBoardCard;
|
|
21
|
-
board: IBoard;
|
|
22
|
-
}
|
|
1
|
+
import { IBoardCard } from './board-card.dto';
|
|
2
|
+
import { IBoard } from './board.dto';
|
|
3
|
+
|
|
4
|
+
export interface IBoardCardDocument {
|
|
5
|
+
id: string;
|
|
6
|
+
boardCardId: string;
|
|
7
|
+
boardId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
externalId: string;
|
|
10
|
+
publicAccessId: string;
|
|
11
|
+
thumbnailId: string | null;
|
|
12
|
+
thumbnailPublicAccessId: string | null;
|
|
13
|
+
checksum: string;
|
|
14
|
+
mimeType: string;
|
|
15
|
+
sizeOctet: number;
|
|
16
|
+
updatedAt?: Date;
|
|
17
|
+
createdAt?: Date;
|
|
18
|
+
|
|
19
|
+
// Association
|
|
20
|
+
boardCard: IBoardCard;
|
|
21
|
+
board: IBoard;
|
|
22
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IBoardCard } from './board-card.dto';
|
|
2
|
-
import { IBoardLabel } from './board-label.dto';
|
|
3
|
-
|
|
4
|
-
export interface IBoardCardLabel {
|
|
5
|
-
id: string;
|
|
6
|
-
boardLabelId: string;
|
|
7
|
-
boardCardId: string;
|
|
8
|
-
updatedAt?: Date;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
|
|
11
|
-
// Association
|
|
12
|
-
boardLabel?: IBoardLabel;
|
|
13
|
-
boardCard?: IBoardCard;
|
|
14
|
-
}
|
|
1
|
+
import { IBoardCard } from './board-card.dto';
|
|
2
|
+
import { IBoardLabel } from './board-label.dto';
|
|
3
|
+
|
|
4
|
+
export interface IBoardCardLabel {
|
|
5
|
+
id: string;
|
|
6
|
+
boardLabelId: string;
|
|
7
|
+
boardCardId: string;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
|
|
11
|
+
// Association
|
|
12
|
+
boardLabel?: IBoardLabel;
|
|
13
|
+
boardCard?: IBoardCard;
|
|
14
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IBoardCard } from './board-card.dto';
|
|
2
|
-
import { IUser } from './user.dto';
|
|
3
|
-
|
|
4
|
-
export interface IBoardCardMember {
|
|
5
|
-
id: string;
|
|
6
|
-
boardCardId: string;
|
|
7
|
-
userId: string;
|
|
8
|
-
updatedAt?: Date;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
|
|
11
|
-
// Association
|
|
12
|
-
boardCard: IBoardCard;
|
|
13
|
-
user: IUser;
|
|
14
|
-
}
|
|
1
|
+
import { IBoardCard } from './board-card.dto';
|
|
2
|
+
import { IUser } from './user.dto';
|
|
3
|
+
|
|
4
|
+
export interface IBoardCardMember {
|
|
5
|
+
id: string;
|
|
6
|
+
boardCardId: string;
|
|
7
|
+
userId: string;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
|
|
11
|
+
// Association
|
|
12
|
+
boardCard: IBoardCard;
|
|
13
|
+
user: IUser;
|
|
14
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { IBoardActivity } from './board-activity.dto';
|
|
2
|
-
import { IBoardCardChecklist } from './board-card-checklist.dto';
|
|
3
|
-
import { IBoardCardComment } from './board-card-comment.dto';
|
|
4
|
-
import { IBoardCardDocument } from './board-card-document.dto';
|
|
5
|
-
import { IBoardCardLabel } from './board-card-label.dto';
|
|
6
|
-
import { IBoardCardMember } from './board-card-member.dto';
|
|
7
|
-
import { IBoardColumn } from './board-column.dto';
|
|
8
|
-
import { IBoard } from './board.dto';
|
|
9
|
-
|
|
10
|
-
export interface IBoardCard {
|
|
11
|
-
id: string;
|
|
12
|
-
slug: string;
|
|
13
|
-
identifier: number;
|
|
14
|
-
boardColumnId: string | null;
|
|
15
|
-
boardId: string;
|
|
16
|
-
title: string;
|
|
17
|
-
description: string | null;
|
|
18
|
-
weight: number | null;
|
|
19
|
-
position: number;
|
|
20
|
-
startDate: Date | null;
|
|
21
|
-
endDate: Date | null;
|
|
22
|
-
bannerId: string | null;
|
|
23
|
-
updatedAt?: Date;
|
|
24
|
-
createdAt?: Date;
|
|
25
|
-
deletedAt?: Date | null;
|
|
26
|
-
|
|
27
|
-
// Association
|
|
28
|
-
board: IBoard;
|
|
29
|
-
boardColumn: IBoardColumn;
|
|
30
|
-
boardActivities: IBoardActivity[];
|
|
31
|
-
boardCardMembers: IBoardCardMember[];
|
|
32
|
-
boardCardDocuments: IBoardCardDocument[];
|
|
33
|
-
boardCardChecklists: IBoardCardChecklist[];
|
|
34
|
-
boardCardComments?: IBoardCardComment[];
|
|
35
|
-
boardCardLabels?: IBoardCardLabel[];
|
|
36
|
-
banner?: IBoardCardDocument | null;
|
|
37
|
-
}
|
|
1
|
+
import { IBoardActivity } from './board-activity.dto';
|
|
2
|
+
import { IBoardCardChecklist } from './board-card-checklist.dto';
|
|
3
|
+
import { IBoardCardComment } from './board-card-comment.dto';
|
|
4
|
+
import { IBoardCardDocument } from './board-card-document.dto';
|
|
5
|
+
import { IBoardCardLabel } from './board-card-label.dto';
|
|
6
|
+
import { IBoardCardMember } from './board-card-member.dto';
|
|
7
|
+
import { IBoardColumn } from './board-column.dto';
|
|
8
|
+
import { IBoard } from './board.dto';
|
|
9
|
+
|
|
10
|
+
export interface IBoardCard {
|
|
11
|
+
id: string;
|
|
12
|
+
slug: string;
|
|
13
|
+
identifier: number;
|
|
14
|
+
boardColumnId: string | null;
|
|
15
|
+
boardId: string;
|
|
16
|
+
title: string;
|
|
17
|
+
description: string | null;
|
|
18
|
+
weight: number | null;
|
|
19
|
+
position: number;
|
|
20
|
+
startDate: Date | null;
|
|
21
|
+
endDate: Date | null;
|
|
22
|
+
bannerId: string | null;
|
|
23
|
+
updatedAt?: Date;
|
|
24
|
+
createdAt?: Date;
|
|
25
|
+
deletedAt?: Date | null;
|
|
26
|
+
|
|
27
|
+
// Association
|
|
28
|
+
board: IBoard;
|
|
29
|
+
boardColumn: IBoardColumn;
|
|
30
|
+
boardActivities: IBoardActivity[];
|
|
31
|
+
boardCardMembers: IBoardCardMember[];
|
|
32
|
+
boardCardDocuments: IBoardCardDocument[];
|
|
33
|
+
boardCardChecklists: IBoardCardChecklist[];
|
|
34
|
+
boardCardComments?: IBoardCardComment[];
|
|
35
|
+
boardCardLabels?: IBoardCardLabel[];
|
|
36
|
+
banner?: IBoardCardDocument | null;
|
|
37
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { BoardColumnType } from '../../enum';
|
|
2
|
-
import { IBoardCard } from './board-card.dto';
|
|
3
|
-
import { IBoard } from './board.dto';
|
|
4
|
-
|
|
5
|
-
export interface IBoardColumn {
|
|
6
|
-
id: string;
|
|
7
|
-
title: string;
|
|
8
|
-
position: number;
|
|
9
|
-
boardId: string;
|
|
10
|
-
type: BoardColumnType;
|
|
11
|
-
updatedAt?: Date;
|
|
12
|
-
createdAt?: Date;
|
|
13
|
-
|
|
14
|
-
// Association
|
|
15
|
-
board: IBoard;
|
|
16
|
-
boardCards: IBoardCard[];
|
|
17
|
-
}
|
|
1
|
+
import { BoardColumnType } from '../../enum';
|
|
2
|
+
import { IBoardCard } from './board-card.dto';
|
|
3
|
+
import { IBoard } from './board.dto';
|
|
4
|
+
|
|
5
|
+
export interface IBoardColumn {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
position: number;
|
|
9
|
+
boardId: string;
|
|
10
|
+
type: BoardColumnType;
|
|
11
|
+
updatedAt?: Date;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
|
|
14
|
+
// Association
|
|
15
|
+
board: IBoard;
|
|
16
|
+
boardCards: IBoardCard[];
|
|
17
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IBoard } from './board.dto';
|
|
2
|
-
|
|
3
|
-
export interface IBoardLabel {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
color: string;
|
|
7
|
-
boardId: string;
|
|
8
|
-
updatedAt?: Date;
|
|
9
|
-
createdAt?: Date;
|
|
10
|
-
|
|
11
|
-
// Association
|
|
12
|
-
board: IBoard;
|
|
13
|
-
}
|
|
1
|
+
import { IBoard } from './board.dto';
|
|
2
|
+
|
|
3
|
+
export interface IBoardLabel {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
color: string;
|
|
7
|
+
boardId: string;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
createdAt?: Date;
|
|
10
|
+
|
|
11
|
+
// Association
|
|
12
|
+
board: IBoard;
|
|
13
|
+
}
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { IBoardActivity } from './board-activity.dto';
|
|
2
|
-
import { IBoardCardDocument } from './board-card-document.dto';
|
|
3
|
-
import { IBoardCard } from './board-card.dto';
|
|
4
|
-
import { IBoardColumn } from './board-column.dto';
|
|
5
|
-
import { IBoardLabel } from './board-label.dto';
|
|
6
|
-
import { IOrganization } from './organization.dto';
|
|
7
|
-
import { IProject } from './project.dto';
|
|
8
|
-
import { IEntityTag } from './tag.dto';
|
|
9
|
-
import { IUser } from './user.dto';
|
|
10
|
-
|
|
11
|
-
export interface IBoard {
|
|
12
|
-
id: string;
|
|
13
|
-
slug: string;
|
|
14
|
-
title: string;
|
|
15
|
-
userId: string | null;
|
|
16
|
-
projectId: string | null;
|
|
17
|
-
organizationId: string | null;
|
|
18
|
-
createdByUserId: string | null;
|
|
19
|
-
archivedAt: Date | null;
|
|
20
|
-
updatedAt?: Date;
|
|
21
|
-
createdAt?: Date;
|
|
22
|
-
|
|
23
|
-
// Association
|
|
24
|
-
boardColumns?: IBoardColumn[];
|
|
25
|
-
boardActivities?: IBoardActivity[];
|
|
26
|
-
boardCards?: IBoardCard[];
|
|
27
|
-
user?: IUser | null;
|
|
28
|
-
project?: IProject | null;
|
|
29
|
-
organization?: IOrganization | null;
|
|
30
|
-
boardLabels?: IBoardLabel[];
|
|
31
|
-
boardCardDocuments?: IBoardCardDocument[];
|
|
32
|
-
entityTags?: IEntityTag[];
|
|
33
|
-
}
|
|
1
|
+
import { IBoardActivity } from './board-activity.dto';
|
|
2
|
+
import { IBoardCardDocument } from './board-card-document.dto';
|
|
3
|
+
import { IBoardCard } from './board-card.dto';
|
|
4
|
+
import { IBoardColumn } from './board-column.dto';
|
|
5
|
+
import { IBoardLabel } from './board-label.dto';
|
|
6
|
+
import { IOrganization } from './organization.dto';
|
|
7
|
+
import { IProject } from './project.dto';
|
|
8
|
+
import { IEntityTag } from './tag.dto';
|
|
9
|
+
import { IUser } from './user.dto';
|
|
10
|
+
|
|
11
|
+
export interface IBoard {
|
|
12
|
+
id: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
title: string;
|
|
15
|
+
userId: string | null;
|
|
16
|
+
projectId: string | null;
|
|
17
|
+
organizationId: string | null;
|
|
18
|
+
createdByUserId: string | null;
|
|
19
|
+
archivedAt: Date | null;
|
|
20
|
+
updatedAt?: Date;
|
|
21
|
+
createdAt?: Date;
|
|
22
|
+
|
|
23
|
+
// Association
|
|
24
|
+
boardColumns?: IBoardColumn[];
|
|
25
|
+
boardActivities?: IBoardActivity[];
|
|
26
|
+
boardCards?: IBoardCard[];
|
|
27
|
+
user?: IUser | null;
|
|
28
|
+
project?: IProject | null;
|
|
29
|
+
organization?: IOrganization | null;
|
|
30
|
+
boardLabels?: IBoardLabel[];
|
|
31
|
+
boardCardDocuments?: IBoardCardDocument[];
|
|
32
|
+
entityTags?: IEntityTag[];
|
|
33
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { ShareableContentType, SharePermission, ShareTargetType } from '../../enum/content-share.enum';
|
|
2
|
-
|
|
3
|
-
export interface IContentShare {
|
|
4
|
-
id: string;
|
|
5
|
-
contentType: ShareableContentType;
|
|
6
|
-
contentId: string;
|
|
7
|
-
organizationId: string | null;
|
|
8
|
-
targetType: ShareTargetType;
|
|
9
|
-
targetId: string | null;
|
|
10
|
-
permission: SharePermission;
|
|
11
|
-
publicToken: string | null;
|
|
12
|
-
expiresAt: string | null;
|
|
13
|
-
createdByUserId: string;
|
|
14
|
-
createdAt: string;
|
|
15
|
-
updatedAt: string;
|
|
16
|
-
}
|
|
1
|
+
import { ShareableContentType, SharePermission, ShareTargetType } from '../../enum/content-share.enum';
|
|
2
|
+
|
|
3
|
+
export interface IContentShare {
|
|
4
|
+
id: string;
|
|
5
|
+
contentType: ShareableContentType;
|
|
6
|
+
contentId: string;
|
|
7
|
+
organizationId: string | null;
|
|
8
|
+
targetType: ShareTargetType;
|
|
9
|
+
targetId: string | null;
|
|
10
|
+
permission: SharePermission;
|
|
11
|
+
publicToken: string | null;
|
|
12
|
+
expiresAt: string | null;
|
|
13
|
+
createdByUserId: string;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
updatedAt: string;
|
|
16
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { IOrganization } from './organization.dto';
|
|
2
|
-
import { IProject } from './project.dto';
|
|
3
|
-
import { IEntityTag } from './tag.dto';
|
|
4
|
-
import { IUser } from './user.dto';
|
|
5
|
-
|
|
6
|
-
export interface IDraw {
|
|
7
|
-
id: string;
|
|
8
|
-
title: string;
|
|
9
|
-
content: string;
|
|
10
|
-
userId: string | null;
|
|
11
|
-
projectId: string | null;
|
|
12
|
-
organizationId: string | null;
|
|
13
|
-
createdByUserId: string | null;
|
|
14
|
-
fileId: string | null;
|
|
15
|
-
filePublicAccessId: string | null;
|
|
16
|
-
thumbnailId: string | null;
|
|
17
|
-
thumbnailPublicAccessId: string | null;
|
|
18
|
-
sizeOctet: number;
|
|
19
|
-
mimeType: string;
|
|
20
|
-
checksum: string;
|
|
21
|
-
archivedAt?: Date | null;
|
|
22
|
-
updatedAt?: Date;
|
|
23
|
-
createdAt?: Date;
|
|
24
|
-
|
|
25
|
-
// Association
|
|
26
|
-
user?: IUser | null;
|
|
27
|
-
project?: IProject | null;
|
|
28
|
-
organization?: IOrganization | null;
|
|
29
|
-
entityTags?: IEntityTag[];
|
|
30
|
-
}
|
|
1
|
+
import { IOrganization } from './organization.dto';
|
|
2
|
+
import { IProject } from './project.dto';
|
|
3
|
+
import { IEntityTag } from './tag.dto';
|
|
4
|
+
import { IUser } from './user.dto';
|
|
5
|
+
|
|
6
|
+
export interface IDraw {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
userId: string | null;
|
|
11
|
+
projectId: string | null;
|
|
12
|
+
organizationId: string | null;
|
|
13
|
+
createdByUserId: string | null;
|
|
14
|
+
fileId: string | null;
|
|
15
|
+
filePublicAccessId: string | null;
|
|
16
|
+
thumbnailId: string | null;
|
|
17
|
+
thumbnailPublicAccessId: string | null;
|
|
18
|
+
sizeOctet: number;
|
|
19
|
+
mimeType: string;
|
|
20
|
+
checksum: string;
|
|
21
|
+
archivedAt?: Date | null;
|
|
22
|
+
updatedAt?: Date;
|
|
23
|
+
createdAt?: Date;
|
|
24
|
+
|
|
25
|
+
// Association
|
|
26
|
+
user?: IUser | null;
|
|
27
|
+
project?: IProject | null;
|
|
28
|
+
organization?: IOrganization | null;
|
|
29
|
+
entityTags?: IEntityTag[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// Type-level compile test — no jest runner in this package.
|
|
2
|
+
// Verifies the FETCHED-extraction DTO (the GET extraction response / IExtraction)
|
|
3
|
+
// surfaces the additive V2-P1 provenance + manifest fields type-safely, while
|
|
4
|
+
// staying backward-compatible for old readers of value+confidence.
|
|
5
|
+
// Run: npx tsc --noEmit (from packages/abyss_tools_core).
|
|
6
|
+
|
|
7
|
+
import { ProviderKind, InterpreterKind, CombineStrategy } from '../../enum';
|
|
8
|
+
import type { IExtraction } from './extraction.dto';
|
|
9
|
+
import type { IFieldValue, IExecutionManifest, IGlobalConfidence } from './extraction-plan.dto';
|
|
10
|
+
import type { IGetExtractionData } from '../api/responses/extraction.response';
|
|
11
|
+
|
|
12
|
+
// A fully-populated plan-path field value (the IFieldValue superset).
|
|
13
|
+
const fv: IFieldValue = {
|
|
14
|
+
value: 120,
|
|
15
|
+
confidence: 0.95,
|
|
16
|
+
chosen: {
|
|
17
|
+
provider: ProviderKind.TEXT,
|
|
18
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
19
|
+
providerId: 'pdf-auto',
|
|
20
|
+
interpreterId: 'algo-v1',
|
|
21
|
+
},
|
|
22
|
+
sources: [
|
|
23
|
+
{
|
|
24
|
+
mode: {
|
|
25
|
+
provider: ProviderKind.TEXT,
|
|
26
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
27
|
+
providerId: 'pdf-auto',
|
|
28
|
+
interpreterId: 'algo-v1',
|
|
29
|
+
},
|
|
30
|
+
value: 120,
|
|
31
|
+
confidence: 0.95,
|
|
32
|
+
signals: [],
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
agreement: { agreed: false, distinctValues: 1 },
|
|
36
|
+
signals: [],
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
// A field value carrying NON-EMPTY signals — exercises every variant of the
|
|
40
|
+
// ISignal discriminated union so a future drift between the SDK union and the
|
|
41
|
+
// backend `Signal` shape (e.g. re-adding the invented `score` field, or
|
|
42
|
+
// dropping `check`/`passed`/`agreed`/`modes`) fails compilation here.
|
|
43
|
+
const fvWithSignals: IFieldValue = {
|
|
44
|
+
value: 'FR7630001007941234567890185',
|
|
45
|
+
confidence: 0.98,
|
|
46
|
+
chosen: {
|
|
47
|
+
provider: ProviderKind.TEXT,
|
|
48
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
49
|
+
providerId: 'pdf-auto',
|
|
50
|
+
interpreterId: 'algo-v1',
|
|
51
|
+
},
|
|
52
|
+
sources: [
|
|
53
|
+
{
|
|
54
|
+
mode: {
|
|
55
|
+
provider: ProviderKind.TEXT,
|
|
56
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
57
|
+
providerId: 'pdf-auto',
|
|
58
|
+
interpreterId: 'algo-v1',
|
|
59
|
+
},
|
|
60
|
+
value: 'FR7630001007941234567890185',
|
|
61
|
+
confidence: 0.98,
|
|
62
|
+
signals: [
|
|
63
|
+
{ kind: 'format', check: 'iban_mod97', passed: true, weight: 0.2 },
|
|
64
|
+
{ kind: 'anchor', detail: "matched near 'IBAN' label", weight: 0.1 },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
agreement: { agreed: true, distinctValues: 1 },
|
|
69
|
+
signals: [
|
|
70
|
+
{ kind: 'format', check: 'iban_mod97', passed: true, weight: 0.2 },
|
|
71
|
+
{ kind: 'coherence', check: 'balance_reconciliation', passed: true, weight: 0.3 },
|
|
72
|
+
{ kind: 'agreement', agreed: true, modes: 2, weight: 0.1 },
|
|
73
|
+
],
|
|
74
|
+
};
|
|
75
|
+
void fvWithSignals;
|
|
76
|
+
|
|
77
|
+
// A CONSUMER narrows the ISignal union by `kind` and reads the discriminant
|
|
78
|
+
// fields that actually exist on the wire — type-safe, no cast.
|
|
79
|
+
for (const sig of fvWithSignals.signals) {
|
|
80
|
+
if (sig.kind === 'format' || sig.kind === 'coherence') {
|
|
81
|
+
const _check: string = sig.check;
|
|
82
|
+
const _passed: boolean = sig.passed;
|
|
83
|
+
void _check; void _passed;
|
|
84
|
+
} else if (sig.kind === 'anchor') {
|
|
85
|
+
const _detail: string = sig.detail;
|
|
86
|
+
void _detail;
|
|
87
|
+
} else {
|
|
88
|
+
const _agreed: boolean = sig.agreed;
|
|
89
|
+
const _modes: number = sig.modes;
|
|
90
|
+
void _agreed; void _modes;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Mirrors the persisted backend ExecutionManifest shape (resolvedPlan + combine
|
|
95
|
+
// + passes + createdAt) — exactly what GET /extractions/:id surfaces via toJSON().
|
|
96
|
+
const manifest: IExecutionManifest = {
|
|
97
|
+
resolvedPlan: {
|
|
98
|
+
stages: [
|
|
99
|
+
{ runParallel: false, passes: [{ providerId: 'pdf-auto', interpreterId: 'algo-v1' }] },
|
|
100
|
+
],
|
|
101
|
+
combine: CombineStrategy.MAX_CONFIDENCE,
|
|
102
|
+
},
|
|
103
|
+
combine: CombineStrategy.MAX_CONFIDENCE,
|
|
104
|
+
passes: [
|
|
105
|
+
{ providerId: 'pdf-auto', providerVersion: '1.0.0', interpreterId: 'algo-v1', interpreterVersion: '1.0.0' },
|
|
106
|
+
],
|
|
107
|
+
createdAt: '2026-06-28T00:00:00.000Z',
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Mirrors the persisted backend GlobalConfidence shape (stats + method +
|
|
111
|
+
// aggregation + perPass + lowestFields).
|
|
112
|
+
const globalConfidence: IGlobalConfidence = {
|
|
113
|
+
stats: {
|
|
114
|
+
overall: 0.95,
|
|
115
|
+
mean: 0.95,
|
|
116
|
+
highest: 0.95,
|
|
117
|
+
lowest: 0.95,
|
|
118
|
+
median: 0.95,
|
|
119
|
+
belowThreshold: { threshold: 0.7, count: 0 },
|
|
120
|
+
fieldCount: 1,
|
|
121
|
+
},
|
|
122
|
+
method: CombineStrategy.MAX_CONFIDENCE,
|
|
123
|
+
aggregation: 'weighted-by-field-importance',
|
|
124
|
+
perPass: [
|
|
125
|
+
{
|
|
126
|
+
mode: {
|
|
127
|
+
provider: ProviderKind.TEXT,
|
|
128
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
129
|
+
providerId: 'pdf-auto',
|
|
130
|
+
interpreterId: 'algo-v1',
|
|
131
|
+
},
|
|
132
|
+
confidence: 0.95,
|
|
133
|
+
fieldsContributed: 1,
|
|
134
|
+
ocrPageCount: 0,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
lowestFields: [{ fieldKey: 'totalTtc', confidence: 0.95 }],
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
// The fetched-extraction model carries provenance fieldsJson + manifest +
|
|
141
|
+
// globalConfidence + usedOcr/ocrPageCount type-safely.
|
|
142
|
+
const fetched: Partial<IExtraction> = {
|
|
143
|
+
fieldsJson: { totalTtc: fv },
|
|
144
|
+
executionManifest: manifest,
|
|
145
|
+
globalConfidence,
|
|
146
|
+
usedOcr: true,
|
|
147
|
+
ocrPageCount: 3,
|
|
148
|
+
};
|
|
149
|
+
void fetched;
|
|
150
|
+
|
|
151
|
+
// A CONSUMER reading the chosen impl id + sources off the fetched field value —
|
|
152
|
+
// no cast needed (this is the whole point of the surfacing fix).
|
|
153
|
+
const totalTtc = (fetched.fieldsJson ?? {}).totalTtc;
|
|
154
|
+
if (totalTtc) {
|
|
155
|
+
const _chosenId: string = totalTtc.chosen.interpreterId;
|
|
156
|
+
const _sourceCount: number = totalTtc.sources.length;
|
|
157
|
+
void _chosenId; void _sourceCount;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// Backward-compat: an old reader that only knows value+confidence still works.
|
|
161
|
+
const _legacyRead: { value: unknown; confidence: number } | undefined =
|
|
162
|
+
(fetched.fieldsJson ?? {}).totalTtc;
|
|
163
|
+
void _legacyRead;
|
|
164
|
+
|
|
165
|
+
// The GET extraction response data exposes the same superset under `fields`
|
|
166
|
+
// AND inherits manifest + globalConfidence from IExtraction.
|
|
167
|
+
const getData: Partial<IGetExtractionData> = {
|
|
168
|
+
fields: { totalTtc: fv },
|
|
169
|
+
executionManifest: manifest,
|
|
170
|
+
globalConfidence,
|
|
171
|
+
};
|
|
172
|
+
void getData;
|
|
173
|
+
|
|
174
|
+
// usedOcr/ocrPageCount remain readable as before.
|
|
175
|
+
const _usedOcr: boolean | undefined = fetched.usedOcr;
|
|
176
|
+
const _ocrPages: number | undefined = fetched.ocrPageCount;
|
|
177
|
+
void _usedOcr; void _ocrPages;
|
|
178
|
+
|
|
179
|
+
// A CONSUMER reads the manifest + globalConfidence fields that the backend
|
|
180
|
+
// actually persists/surfaces (createdAt — NOT resolvedAt — and the stats block),
|
|
181
|
+
// type-safely off the fetched extraction.
|
|
182
|
+
if (fetched.executionManifest) {
|
|
183
|
+
const _createdAt: string = fetched.executionManifest.createdAt;
|
|
184
|
+
const _passCount: number = fetched.executionManifest.passes.length;
|
|
185
|
+
void _createdAt; void _passCount;
|
|
186
|
+
}
|
|
187
|
+
if (fetched.globalConfidence) {
|
|
188
|
+
const _overall: number = fetched.globalConfidence.stats.overall;
|
|
189
|
+
const _agg: 'weighted-by-field-importance' = fetched.globalConfidence.aggregation;
|
|
190
|
+
void _overall; void _agg;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Type-level compile test — no jest runner in this package.
|
|
2
|
+
// Each block verifies that the SDK types compile correctly.
|
|
3
|
+
// Run: npx tsc --noEmit (from packages/abyss_tools_core).
|
|
4
|
+
|
|
5
|
+
import { ProviderKind, InterpreterKind, CombineStrategy } from '../../enum';
|
|
6
|
+
import type { IExtractionPlan, IFieldValue, IExtractModesData, IPositionedToken } from './extraction-plan.dto';
|
|
7
|
+
|
|
8
|
+
// Verify enum string values match the api side.
|
|
9
|
+
const _pk: string = ProviderKind.TEXT; // 'text'
|
|
10
|
+
const _ik: string = InterpreterKind.TEMPLATE; // 'template'
|
|
11
|
+
const _cs: string = CombineStrategy.MAX_CONFIDENCE; // 'maxConfidence'
|
|
12
|
+
void _pk; void _ik; void _cs;
|
|
13
|
+
|
|
14
|
+
// Verify IFieldValue is a structural superset of {value,confidence}.
|
|
15
|
+
const fv: IFieldValue = {
|
|
16
|
+
value: 1,
|
|
17
|
+
confidence: 0.9,
|
|
18
|
+
chosen: {
|
|
19
|
+
provider: ProviderKind.TEXT,
|
|
20
|
+
interpreter: InterpreterKind.ALGORITHMIC,
|
|
21
|
+
providerId: 'pdf-text',
|
|
22
|
+
interpreterId: 'algo-v1',
|
|
23
|
+
},
|
|
24
|
+
sources: [],
|
|
25
|
+
signals: [],
|
|
26
|
+
};
|
|
27
|
+
// Must be assignable to the legacy shape without cast.
|
|
28
|
+
const _legacy: { value: unknown; confidence: number } = fv;
|
|
29
|
+
void _legacy;
|
|
30
|
+
|
|
31
|
+
// Verify IExtractModesData typing compiles.
|
|
32
|
+
const _modes: IExtractModesData = { providers: [], interpreters: [] };
|
|
33
|
+
void _modes;
|
|
34
|
+
|
|
35
|
+
// Verify IExtractionPlan typing compiles.
|
|
36
|
+
const _plan: IExtractionPlan = {
|
|
37
|
+
stages: [{ runParallel: false, passes: [{ providerId: 'pdf-text', interpreterId: 'algo-v1' }] }],
|
|
38
|
+
combine: CombineStrategy.MAX_CONFIDENCE,
|
|
39
|
+
};
|
|
40
|
+
void _plan;
|
|
41
|
+
|
|
42
|
+
// Verify IPositionedToken is { text, page, bbox{x,y,w,h}, conf? } (conf optional).
|
|
43
|
+
const _tok: IPositionedToken = { text: 'IBAN', page: 1, bbox: { x: 1, y: 2, w: 3, h: 4 }, conf: 95 };
|
|
44
|
+
const _tokNoConf: IPositionedToken = { text: 'x', page: 2, bbox: { x: 0, y: 0, w: 1, h: 1 } };
|
|
45
|
+
void _tok; void _tokNoConf;
|
|
46
|
+
|
|
47
|
+
export {};
|