@finsys/core 4.8.0 → 4.9.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/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +81 -2
- package/dist/index.d.ts +81 -2
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -1
- package/dist/schema/adapter-manifest.schema.json +10 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1534,8 +1534,18 @@ interface AdapterManifest {
|
|
|
1534
1534
|
* records the adapter runs itself; the manifest exists purely as
|
|
1535
1535
|
* the declaration plane (produces, cardinality,
|
|
1536
1536
|
* fieldAuthorizations) for data the host was already producing.
|
|
1537
|
+
* - `external-assertion` — SYS-3036 (ownership moved here from a
|
|
1538
|
+
* host-local extension): declaration-only adapter that is executed
|
|
1539
|
+
* entirely OUTSIDE the host. An externally-orchestrated process
|
|
1540
|
+
* completes its own ceremony/extraction and PUSHES the result to
|
|
1541
|
+
* the host's assertion-ingest surface. No code is loaded and
|
|
1542
|
+
* neither fetch() nor extract() ever runs — the same
|
|
1543
|
+
* declaration-only shape as `form-intake`/`manual-override`/
|
|
1544
|
+
* `extraction-pipeline`, but data arrives via an external push
|
|
1545
|
+
* rather than the host's own pipeline, form submission, or a
|
|
1546
|
+
* dynamic-imported/declarative extract() call.
|
|
1537
1547
|
*/
|
|
1538
|
-
readonly implementation: DeclarativeImplementation | TypescriptImplementation | FormIntakeImplementation | ManualOverrideImplementation | ExtractionPipelineImplementation;
|
|
1548
|
+
readonly implementation: DeclarativeImplementation | TypescriptImplementation | FormIntakeImplementation | ManualOverrideImplementation | ExtractionPipelineImplementation | ExternalAssertionImplementation;
|
|
1539
1549
|
/**
|
|
1540
1550
|
* SYS-2502: explicit instance cardinality.
|
|
1541
1551
|
*
|
|
@@ -1671,6 +1681,17 @@ interface AdapterManifest {
|
|
|
1671
1681
|
* never silent data drift. Clients (form-spec and eval-model
|
|
1672
1682
|
* editors) read these sets through the registry-metadata surface to
|
|
1673
1683
|
* offer the labels without hardcoding any vendor's vocabulary.
|
|
1684
|
+
*
|
|
1685
|
+
* Matching is EXACT-STRING — case and whitespace variations from a
|
|
1686
|
+
* declared label are treated as distinct (and therefore out-of-set),
|
|
1687
|
+
* deliberately. `uniqueItems` at the schema layer is likewise
|
|
1688
|
+
* exact-match, so e.g. `["High", "high"]` is a legal (if unusual)
|
|
1689
|
+
* two-label set; nothing here folds case or reconciles near-miss
|
|
1690
|
+
* spelling. Silently normalizing would band-aid over a vendor-side
|
|
1691
|
+
* inconsistency instead of surfacing it — a vendor emitting `"high"`
|
|
1692
|
+
* when its manifest declares `"High"` is a vendor bug that should be
|
|
1693
|
+
* refused loudly, not coerced into matching. Vendors own their exact
|
|
1694
|
+
* label byte-for-byte; hosts never guess at reconciliation.
|
|
1674
1695
|
*/
|
|
1675
1696
|
readonly enumValues?: Readonly<Record<CanonicalFieldName, ReadonlyArray<string>>>;
|
|
1676
1697
|
/**
|
|
@@ -1789,6 +1810,64 @@ interface ManualOverrideImplementation {
|
|
|
1789
1810
|
interface ExtractionPipelineImplementation {
|
|
1790
1811
|
readonly type: "extraction-pipeline";
|
|
1791
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* SYS-3036: declaration-only implementation for adapters that are
|
|
1815
|
+
* executed entirely OUTSIDE the host application. An externally-
|
|
1816
|
+
* orchestrated process (a partner-run ceremony, an out-of-band
|
|
1817
|
+
* verification flow, etc.) completes its own extraction and PUSHES the
|
|
1818
|
+
* result to the host's assertion-ingest surface, rather than the host
|
|
1819
|
+
* pulling it via `fetch()`/`extract()` or a form submission. No code,
|
|
1820
|
+
* no fetch(), no extract(); like `manual-override` and
|
|
1821
|
+
* `extraction-pipeline`, the discriminator alone carries the meaning —
|
|
1822
|
+
* the shape is intentionally empty beyond `type`.
|
|
1823
|
+
*
|
|
1824
|
+
* Ownership note: this type + its schema branch were previously a
|
|
1825
|
+
* host-local extension (a runtime clone of the compiled schema with one
|
|
1826
|
+
* extra `oneOf` branch bolted on) because core hadn't yet published the
|
|
1827
|
+
* concept. Publishing it here means every host validates the SAME
|
|
1828
|
+
* schema — no more per-host schema patches for this discriminator.
|
|
1829
|
+
*/
|
|
1830
|
+
interface ExternalAssertionImplementation {
|
|
1831
|
+
readonly type: "external-assertion";
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* SYS-3036: how a registered adapter participates at execution time,
|
|
1835
|
+
* derived purely from `implementation.type`. Published here (rather than
|
|
1836
|
+
* re-derived per host) so every host classifies manifests identically:
|
|
1837
|
+
*
|
|
1838
|
+
* - `Runnable` — the host loads (declarative) or dynamic-imports
|
|
1839
|
+
* (typescript) a `SourceAdapter`; the host's run loop executes it.
|
|
1840
|
+
* - `DeclarationOnly` — the manifest is pure declaration plane
|
|
1841
|
+
* (`form-intake`, `manual-override`, `extraction-pipeline`). No code
|
|
1842
|
+
* exists to load; the entry is registered so `list()`-style
|
|
1843
|
+
* consumers (field-authorization gating, provenance rendering,
|
|
1844
|
+
* diagnostics) see the manifest, and every execution path skips it.
|
|
1845
|
+
* - `ExternallyAsserted` — the manifest declares
|
|
1846
|
+
* `implementation.type: "external-assertion"`. Same "no code, host
|
|
1847
|
+
* never calls fetch()/extract()" shape as `DeclarationOnly`, but data
|
|
1848
|
+
* arrives via an external push rather than the host's own
|
|
1849
|
+
* extraction pipeline or form intake. Hosts that used to fork on
|
|
1850
|
+
* this case separately can safely fold it into the same "not
|
|
1851
|
+
* Runnable" branch that already skips `DeclarationOnly` entries.
|
|
1852
|
+
*
|
|
1853
|
+
* String values mirror the discriminators they classify so a logged
|
|
1854
|
+
* `executionMode` reads naturally alongside `implementation.type`.
|
|
1855
|
+
*/
|
|
1856
|
+
declare enum AdapterExecutionMode {
|
|
1857
|
+
Runnable = "runnable",
|
|
1858
|
+
DeclarationOnly = "declaration-only",
|
|
1859
|
+
ExternallyAsserted = "externally-asserted"
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* SYS-3036: classify a manifest's `implementation.type` into its
|
|
1863
|
+
* `AdapterExecutionMode`. Exhaustive over every discriminator this
|
|
1864
|
+
* version of `@finsys/core` publishes — the switch has an explicit case
|
|
1865
|
+
* per type and THROWS on anything else (Ajv should already have refused
|
|
1866
|
+
* an unrecognized discriminator at validation time, but a schema/host
|
|
1867
|
+
* version skew must surface as a loud refusal here too, never as a
|
|
1868
|
+
* silently-guessed mode; no fallback branch assigns one).
|
|
1869
|
+
*/
|
|
1870
|
+
declare function executionModeOf(manifest: Pick<AdapterManifest, "implementation">): AdapterExecutionMode;
|
|
1792
1871
|
interface FieldMapEntry {
|
|
1793
1872
|
/**
|
|
1794
1873
|
* JSONPath expression into the raw payload. E.g.
|
|
@@ -1816,4 +1895,4 @@ interface FieldMapEntry {
|
|
|
1816
1895
|
readonly transform?: "identity" | "pct_to_ratio01" | "to_boolean" | "to_integer";
|
|
1817
1896
|
}
|
|
1818
1897
|
|
|
1819
|
-
export { ADAPTER_CATEGORY_IDS, ALL_AGGREGATION_OPS, type AdapterCategory, AdapterError, type AdapterErrorReason, type AdapterExtraction, type AdapterManifest, type AggregationOp, type ApplicantIdentity, BASE_FIELD_SPECS, BasicFormField, type CanonicalFieldName, type CanonicalFieldSpec, type CanonicalFieldValue, type CanonicalFieldValues, type Category, type CategorySchema, type CategorySpec, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DeclarativeImplementation, type DocExtractionResult, DocExtractionStatus, type DocumentFileMetadata, type DocumentRow, type DocumentRowCapabilities, type DocumentTypeGroup, type DropdownOption, type EditorValidator, type ExtractionFileType, type ExtractionJobRecord, ExtractionJobStatus, type ExtractionPipelineImplementation, type ExtractionStatusResult, FIELD_TYPE_DEFINITIONS, type FieldAuthorization, type FieldData, type FieldGroup, type FieldMapEntry, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, type FormIntakeFieldMapEntry, type FormIntakeImplementation, FormSpec, type FormValidatorDefinitions, IHS_FAILURE_STATUSES, IHS_FIELD_ORIGINS, IHS_TERMINAL_STATUSES, IHS_VALID_STATUSES, type IhsDetailCategory, type IhsFieldDetail, type IhsFieldOrigin, type IhsFieldProvenance, IhsStatus, IhsValueFormat, type InstanceRow, type InstanceValue, type ManualOverrideImplementation, type PageConfig, type PeriodDeclaration, type PeriodValues, type RHFSchemaOutput, type RHFStep, type RawPayload, type ResolvedField, Role, type SourceAdapter, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type TaggedFieldData, type TimePeriodUnit, type TypescriptImplementation, type UnifiedFormConfig, type Validator, type WireFormat, allCategories, applyAggregation, applyDynamicTitles, assertAdapterCategory, assertDocumentType, buildDocumentRows, buildFileFieldTables, buildFileFieldTablesFromInstances, categoriesAttestingFact, categoryFieldsOf, categoryForField, categorySchemaOf, evaluateExpression, extractTimePeriods, factOf, formatDocumentSize, formatDocumentType, formatDocumentUploaded, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getDocDisplayNames, getDocumentTypeGroups, getExtractableDocTypes, getGroupDisplayNames, getPastMonthLabel, getPastYearLabel, getReuploadableDocTypes, getStepDefaultValues, getStepSchema, groupColumnsByInstance, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, isAdapterCategory, isDocumentType, isFailureIhsStatus, isTerminalIhsStatus, isValidIhsFieldOrigin, isValidIhsStatus, parseFileField, processIhsDetails, resolveExtractionStatus, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
|
|
1898
|
+
export { ADAPTER_CATEGORY_IDS, ALL_AGGREGATION_OPS, type AdapterCategory, AdapterError, type AdapterErrorReason, AdapterExecutionMode, type AdapterExtraction, type AdapterManifest, type AggregationOp, type ApplicantIdentity, BASE_FIELD_SPECS, BasicFormField, type CanonicalFieldName, type CanonicalFieldSpec, type CanonicalFieldValue, type CanonicalFieldValues, type Category, type CategorySchema, type CategorySpec, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DeclarativeImplementation, type DocExtractionResult, DocExtractionStatus, type DocumentFileMetadata, type DocumentRow, type DocumentRowCapabilities, type DocumentTypeGroup, type DropdownOption, type EditorValidator, type ExternalAssertionImplementation, type ExtractionFileType, type ExtractionJobRecord, ExtractionJobStatus, type ExtractionPipelineImplementation, type ExtractionStatusResult, FIELD_TYPE_DEFINITIONS, type FieldAuthorization, type FieldData, type FieldGroup, type FieldMapEntry, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, type FormIntakeFieldMapEntry, type FormIntakeImplementation, FormSpec, type FormValidatorDefinitions, IHS_FAILURE_STATUSES, IHS_FIELD_ORIGINS, IHS_TERMINAL_STATUSES, IHS_VALID_STATUSES, type IhsDetailCategory, type IhsFieldDetail, type IhsFieldOrigin, type IhsFieldProvenance, IhsStatus, IhsValueFormat, type InstanceRow, type InstanceValue, type ManualOverrideImplementation, type PageConfig, type PeriodDeclaration, type PeriodValues, type RHFSchemaOutput, type RHFStep, type RawPayload, type ResolvedField, Role, type SourceAdapter, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type TaggedFieldData, type TimePeriodUnit, type TypescriptImplementation, type UnifiedFormConfig, type Validator, type WireFormat, allCategories, applyAggregation, applyDynamicTitles, assertAdapterCategory, assertDocumentType, buildDocumentRows, buildFileFieldTables, buildFileFieldTablesFromInstances, categoriesAttestingFact, categoryFieldsOf, categoryForField, categorySchemaOf, evaluateExpression, executionModeOf, extractTimePeriods, factOf, formatDocumentSize, formatDocumentType, formatDocumentUploaded, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getDocDisplayNames, getDocumentTypeGroups, getExtractableDocTypes, getGroupDisplayNames, getPastMonthLabel, getPastYearLabel, getReuploadableDocTypes, getStepDefaultValues, getStepSchema, groupColumnsByInstance, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, isAdapterCategory, isDocumentType, isFailureIhsStatus, isTerminalIhsStatus, isValidIhsFieldOrigin, isValidIhsStatus, parseFileField, processIhsDetails, resolveExtractionStatus, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1534,8 +1534,18 @@ interface AdapterManifest {
|
|
|
1534
1534
|
* records the adapter runs itself; the manifest exists purely as
|
|
1535
1535
|
* the declaration plane (produces, cardinality,
|
|
1536
1536
|
* fieldAuthorizations) for data the host was already producing.
|
|
1537
|
+
* - `external-assertion` — SYS-3036 (ownership moved here from a
|
|
1538
|
+
* host-local extension): declaration-only adapter that is executed
|
|
1539
|
+
* entirely OUTSIDE the host. An externally-orchestrated process
|
|
1540
|
+
* completes its own ceremony/extraction and PUSHES the result to
|
|
1541
|
+
* the host's assertion-ingest surface. No code is loaded and
|
|
1542
|
+
* neither fetch() nor extract() ever runs — the same
|
|
1543
|
+
* declaration-only shape as `form-intake`/`manual-override`/
|
|
1544
|
+
* `extraction-pipeline`, but data arrives via an external push
|
|
1545
|
+
* rather than the host's own pipeline, form submission, or a
|
|
1546
|
+
* dynamic-imported/declarative extract() call.
|
|
1537
1547
|
*/
|
|
1538
|
-
readonly implementation: DeclarativeImplementation | TypescriptImplementation | FormIntakeImplementation | ManualOverrideImplementation | ExtractionPipelineImplementation;
|
|
1548
|
+
readonly implementation: DeclarativeImplementation | TypescriptImplementation | FormIntakeImplementation | ManualOverrideImplementation | ExtractionPipelineImplementation | ExternalAssertionImplementation;
|
|
1539
1549
|
/**
|
|
1540
1550
|
* SYS-2502: explicit instance cardinality.
|
|
1541
1551
|
*
|
|
@@ -1671,6 +1681,17 @@ interface AdapterManifest {
|
|
|
1671
1681
|
* never silent data drift. Clients (form-spec and eval-model
|
|
1672
1682
|
* editors) read these sets through the registry-metadata surface to
|
|
1673
1683
|
* offer the labels without hardcoding any vendor's vocabulary.
|
|
1684
|
+
*
|
|
1685
|
+
* Matching is EXACT-STRING — case and whitespace variations from a
|
|
1686
|
+
* declared label are treated as distinct (and therefore out-of-set),
|
|
1687
|
+
* deliberately. `uniqueItems` at the schema layer is likewise
|
|
1688
|
+
* exact-match, so e.g. `["High", "high"]` is a legal (if unusual)
|
|
1689
|
+
* two-label set; nothing here folds case or reconciles near-miss
|
|
1690
|
+
* spelling. Silently normalizing would band-aid over a vendor-side
|
|
1691
|
+
* inconsistency instead of surfacing it — a vendor emitting `"high"`
|
|
1692
|
+
* when its manifest declares `"High"` is a vendor bug that should be
|
|
1693
|
+
* refused loudly, not coerced into matching. Vendors own their exact
|
|
1694
|
+
* label byte-for-byte; hosts never guess at reconciliation.
|
|
1674
1695
|
*/
|
|
1675
1696
|
readonly enumValues?: Readonly<Record<CanonicalFieldName, ReadonlyArray<string>>>;
|
|
1676
1697
|
/**
|
|
@@ -1789,6 +1810,64 @@ interface ManualOverrideImplementation {
|
|
|
1789
1810
|
interface ExtractionPipelineImplementation {
|
|
1790
1811
|
readonly type: "extraction-pipeline";
|
|
1791
1812
|
}
|
|
1813
|
+
/**
|
|
1814
|
+
* SYS-3036: declaration-only implementation for adapters that are
|
|
1815
|
+
* executed entirely OUTSIDE the host application. An externally-
|
|
1816
|
+
* orchestrated process (a partner-run ceremony, an out-of-band
|
|
1817
|
+
* verification flow, etc.) completes its own extraction and PUSHES the
|
|
1818
|
+
* result to the host's assertion-ingest surface, rather than the host
|
|
1819
|
+
* pulling it via `fetch()`/`extract()` or a form submission. No code,
|
|
1820
|
+
* no fetch(), no extract(); like `manual-override` and
|
|
1821
|
+
* `extraction-pipeline`, the discriminator alone carries the meaning —
|
|
1822
|
+
* the shape is intentionally empty beyond `type`.
|
|
1823
|
+
*
|
|
1824
|
+
* Ownership note: this type + its schema branch were previously a
|
|
1825
|
+
* host-local extension (a runtime clone of the compiled schema with one
|
|
1826
|
+
* extra `oneOf` branch bolted on) because core hadn't yet published the
|
|
1827
|
+
* concept. Publishing it here means every host validates the SAME
|
|
1828
|
+
* schema — no more per-host schema patches for this discriminator.
|
|
1829
|
+
*/
|
|
1830
|
+
interface ExternalAssertionImplementation {
|
|
1831
|
+
readonly type: "external-assertion";
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* SYS-3036: how a registered adapter participates at execution time,
|
|
1835
|
+
* derived purely from `implementation.type`. Published here (rather than
|
|
1836
|
+
* re-derived per host) so every host classifies manifests identically:
|
|
1837
|
+
*
|
|
1838
|
+
* - `Runnable` — the host loads (declarative) or dynamic-imports
|
|
1839
|
+
* (typescript) a `SourceAdapter`; the host's run loop executes it.
|
|
1840
|
+
* - `DeclarationOnly` — the manifest is pure declaration plane
|
|
1841
|
+
* (`form-intake`, `manual-override`, `extraction-pipeline`). No code
|
|
1842
|
+
* exists to load; the entry is registered so `list()`-style
|
|
1843
|
+
* consumers (field-authorization gating, provenance rendering,
|
|
1844
|
+
* diagnostics) see the manifest, and every execution path skips it.
|
|
1845
|
+
* - `ExternallyAsserted` — the manifest declares
|
|
1846
|
+
* `implementation.type: "external-assertion"`. Same "no code, host
|
|
1847
|
+
* never calls fetch()/extract()" shape as `DeclarationOnly`, but data
|
|
1848
|
+
* arrives via an external push rather than the host's own
|
|
1849
|
+
* extraction pipeline or form intake. Hosts that used to fork on
|
|
1850
|
+
* this case separately can safely fold it into the same "not
|
|
1851
|
+
* Runnable" branch that already skips `DeclarationOnly` entries.
|
|
1852
|
+
*
|
|
1853
|
+
* String values mirror the discriminators they classify so a logged
|
|
1854
|
+
* `executionMode` reads naturally alongside `implementation.type`.
|
|
1855
|
+
*/
|
|
1856
|
+
declare enum AdapterExecutionMode {
|
|
1857
|
+
Runnable = "runnable",
|
|
1858
|
+
DeclarationOnly = "declaration-only",
|
|
1859
|
+
ExternallyAsserted = "externally-asserted"
|
|
1860
|
+
}
|
|
1861
|
+
/**
|
|
1862
|
+
* SYS-3036: classify a manifest's `implementation.type` into its
|
|
1863
|
+
* `AdapterExecutionMode`. Exhaustive over every discriminator this
|
|
1864
|
+
* version of `@finsys/core` publishes — the switch has an explicit case
|
|
1865
|
+
* per type and THROWS on anything else (Ajv should already have refused
|
|
1866
|
+
* an unrecognized discriminator at validation time, but a schema/host
|
|
1867
|
+
* version skew must surface as a loud refusal here too, never as a
|
|
1868
|
+
* silently-guessed mode; no fallback branch assigns one).
|
|
1869
|
+
*/
|
|
1870
|
+
declare function executionModeOf(manifest: Pick<AdapterManifest, "implementation">): AdapterExecutionMode;
|
|
1792
1871
|
interface FieldMapEntry {
|
|
1793
1872
|
/**
|
|
1794
1873
|
* JSONPath expression into the raw payload. E.g.
|
|
@@ -1816,4 +1895,4 @@ interface FieldMapEntry {
|
|
|
1816
1895
|
readonly transform?: "identity" | "pct_to_ratio01" | "to_boolean" | "to_integer";
|
|
1817
1896
|
}
|
|
1818
1897
|
|
|
1819
|
-
export { ADAPTER_CATEGORY_IDS, ALL_AGGREGATION_OPS, type AdapterCategory, AdapterError, type AdapterErrorReason, type AdapterExtraction, type AdapterManifest, type AggregationOp, type ApplicantIdentity, BASE_FIELD_SPECS, BasicFormField, type CanonicalFieldName, type CanonicalFieldSpec, type CanonicalFieldValue, type CanonicalFieldValues, type Category, type CategorySchema, type CategorySpec, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DeclarativeImplementation, type DocExtractionResult, DocExtractionStatus, type DocumentFileMetadata, type DocumentRow, type DocumentRowCapabilities, type DocumentTypeGroup, type DropdownOption, type EditorValidator, type ExtractionFileType, type ExtractionJobRecord, ExtractionJobStatus, type ExtractionPipelineImplementation, type ExtractionStatusResult, FIELD_TYPE_DEFINITIONS, type FieldAuthorization, type FieldData, type FieldGroup, type FieldMapEntry, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, type FormIntakeFieldMapEntry, type FormIntakeImplementation, FormSpec, type FormValidatorDefinitions, IHS_FAILURE_STATUSES, IHS_FIELD_ORIGINS, IHS_TERMINAL_STATUSES, IHS_VALID_STATUSES, type IhsDetailCategory, type IhsFieldDetail, type IhsFieldOrigin, type IhsFieldProvenance, IhsStatus, IhsValueFormat, type InstanceRow, type InstanceValue, type ManualOverrideImplementation, type PageConfig, type PeriodDeclaration, type PeriodValues, type RHFSchemaOutput, type RHFStep, type RawPayload, type ResolvedField, Role, type SourceAdapter, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type TaggedFieldData, type TimePeriodUnit, type TypescriptImplementation, type UnifiedFormConfig, type Validator, type WireFormat, allCategories, applyAggregation, applyDynamicTitles, assertAdapterCategory, assertDocumentType, buildDocumentRows, buildFileFieldTables, buildFileFieldTablesFromInstances, categoriesAttestingFact, categoryFieldsOf, categoryForField, categorySchemaOf, evaluateExpression, extractTimePeriods, factOf, formatDocumentSize, formatDocumentType, formatDocumentUploaded, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getDocDisplayNames, getDocumentTypeGroups, getExtractableDocTypes, getGroupDisplayNames, getPastMonthLabel, getPastYearLabel, getReuploadableDocTypes, getStepDefaultValues, getStepSchema, groupColumnsByInstance, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, isAdapterCategory, isDocumentType, isFailureIhsStatus, isTerminalIhsStatus, isValidIhsFieldOrigin, isValidIhsStatus, parseFileField, processIhsDetails, resolveExtractionStatus, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
|
|
1898
|
+
export { ADAPTER_CATEGORY_IDS, ALL_AGGREGATION_OPS, type AdapterCategory, AdapterError, type AdapterErrorReason, AdapterExecutionMode, type AdapterExtraction, type AdapterManifest, type AggregationOp, type ApplicantIdentity, BASE_FIELD_SPECS, BasicFormField, type CanonicalFieldName, type CanonicalFieldSpec, type CanonicalFieldValue, type CanonicalFieldValues, type Category, type CategorySchema, type CategorySpec, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DeclarativeImplementation, type DocExtractionResult, DocExtractionStatus, type DocumentFileMetadata, type DocumentRow, type DocumentRowCapabilities, type DocumentTypeGroup, type DropdownOption, type EditorValidator, type ExternalAssertionImplementation, type ExtractionFileType, type ExtractionJobRecord, ExtractionJobStatus, type ExtractionPipelineImplementation, type ExtractionStatusResult, FIELD_TYPE_DEFINITIONS, type FieldAuthorization, type FieldData, type FieldGroup, type FieldMapEntry, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, type FormIntakeFieldMapEntry, type FormIntakeImplementation, FormSpec, type FormValidatorDefinitions, IHS_FAILURE_STATUSES, IHS_FIELD_ORIGINS, IHS_TERMINAL_STATUSES, IHS_VALID_STATUSES, type IhsDetailCategory, type IhsFieldDetail, type IhsFieldOrigin, type IhsFieldProvenance, IhsStatus, IhsValueFormat, type InstanceRow, type InstanceValue, type ManualOverrideImplementation, type PageConfig, type PeriodDeclaration, type PeriodValues, type RHFSchemaOutput, type RHFStep, type RawPayload, type ResolvedField, Role, type SourceAdapter, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type TaggedFieldData, type TimePeriodUnit, type TypescriptImplementation, type UnifiedFormConfig, type Validator, type WireFormat, allCategories, applyAggregation, applyDynamicTitles, assertAdapterCategory, assertDocumentType, buildDocumentRows, buildFileFieldTables, buildFileFieldTablesFromInstances, categoriesAttestingFact, categoryFieldsOf, categoryForField, categorySchemaOf, evaluateExpression, executionModeOf, extractTimePeriods, factOf, formatDocumentSize, formatDocumentType, formatDocumentUploaded, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getDocDisplayNames, getDocumentTypeGroups, getExtractableDocTypes, getGroupDisplayNames, getPastMonthLabel, getPastYearLabel, getReuploadableDocTypes, getStepDefaultValues, getStepSchema, groupColumnsByInstance, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, isAdapterCategory, isDocumentType, isFailureIhsStatus, isTerminalIhsStatus, isValidIhsFieldOrigin, isValidIhsStatus, parseFileField, processIhsDetails, resolveExtractionStatus, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
|
package/dist/index.js
CHANGED
|
@@ -11941,10 +11941,37 @@ function assertAdapterCategory(id) {
|
|
|
11941
11941
|
}
|
|
11942
11942
|
return id;
|
|
11943
11943
|
}
|
|
11944
|
+
|
|
11945
|
+
// src/adapter-manifest.ts
|
|
11946
|
+
var AdapterExecutionMode = /* @__PURE__ */ ((AdapterExecutionMode2) => {
|
|
11947
|
+
AdapterExecutionMode2["Runnable"] = "runnable";
|
|
11948
|
+
AdapterExecutionMode2["DeclarationOnly"] = "declaration-only";
|
|
11949
|
+
AdapterExecutionMode2["ExternallyAsserted"] = "externally-asserted";
|
|
11950
|
+
return AdapterExecutionMode2;
|
|
11951
|
+
})(AdapterExecutionMode || {});
|
|
11952
|
+
function executionModeOf(manifest) {
|
|
11953
|
+
const implementationType = manifest.implementation.type;
|
|
11954
|
+
switch (implementationType) {
|
|
11955
|
+
case "declarative":
|
|
11956
|
+
case "typescript":
|
|
11957
|
+
return "runnable" /* Runnable */;
|
|
11958
|
+
case "form-intake":
|
|
11959
|
+
case "manual-override":
|
|
11960
|
+
case "extraction-pipeline":
|
|
11961
|
+
return "declaration-only" /* DeclarationOnly */;
|
|
11962
|
+
case "external-assertion":
|
|
11963
|
+
return "externally-asserted" /* ExternallyAsserted */;
|
|
11964
|
+
default: {
|
|
11965
|
+
const unhandled = implementationType;
|
|
11966
|
+
throw new Error(`unknown adapter implementation type: ${String(unhandled)}`);
|
|
11967
|
+
}
|
|
11968
|
+
}
|
|
11969
|
+
}
|
|
11944
11970
|
export {
|
|
11945
11971
|
ADAPTER_CATEGORY_IDS,
|
|
11946
11972
|
ALL_AGGREGATION_OPS,
|
|
11947
11973
|
AdapterError,
|
|
11974
|
+
AdapterExecutionMode,
|
|
11948
11975
|
BASE_FIELD_SPECS,
|
|
11949
11976
|
BasicFormField,
|
|
11950
11977
|
DEFAULT_VALIDATOR_DEFINITIONS,
|
|
@@ -11978,6 +12005,7 @@ export {
|
|
|
11978
12005
|
categoryForField,
|
|
11979
12006
|
categorySchemaOf,
|
|
11980
12007
|
evaluateExpression,
|
|
12008
|
+
executionModeOf,
|
|
11981
12009
|
extractTimePeriods,
|
|
11982
12010
|
factOf,
|
|
11983
12011
|
formatDocumentSize,
|