From cd8b3bd7c7bc7c8245cb1f37606a419660737978 Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Fri, 9 Jan 2026 14:07:59 -0800 Subject: [PATCH 1/7] Sync from integrations monorepo --- .eslintrc.js | 37 ++++++++++++------------------------- src/credentials.ts | 12 ------------ src/criteria.ts | 6 ++++++ src/dataSource.ts | 1 + src/proofTypes.ts | 28 ++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 37 deletions(-) delete mode 100644 src/credentials.ts diff --git a/.eslintrc.js b/.eslintrc.js index 5ec21e0..bb161a9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,32 +1,19 @@ +/* eslint-env node */ + module.exports = { - env: { - browser: false, - commonjs: true, - es2021: true, - node: true - }, - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier' - ], - parserOptions: { - ecmaVersion: 'latest' - }, - plugins: ['@typescript-eslint'], - rules: { - '@typescript-eslint/no-non-null-assertion': 0, - '@typescript-eslint/ban-types': 0, - '@typescript-eslint/explicit-module-boundary-types': ['off'], - '@typescript-eslint/no-explicit-any': ['off'] - }, overrides: [ { - files: ['*.js'], + files: ['*.ts'], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: 'latest', + project: `${__dirname}/tsconfig.json` + }, rules: { - '@typescript-eslint/no-var-requires': 'off' + 'max-lines-per-function': ['error', { max: 80, skipBlankLines: true }], + 'max-depth': ['error', 6], + complexity: ['error', 20] } } - ], - ignorePatterns: ['**/build/*'] + ] }; diff --git a/src/credentials.ts b/src/credentials.ts deleted file mode 100644 index f52565e..0000000 --- a/src/credentials.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Enumeration of the types of fields that are available during the - * provide credentials step of connecting a Hypersync app. - */ -export enum CredentialFieldType { - Group = 'group', - Hidden = 'hidden', - Password = 'password', - Select = 'select', - Text = 'text', - TextArea = 'textArea' -} diff --git a/src/criteria.ts b/src/criteria.ts index bef06ba..31a691b 100644 --- a/src/criteria.ts +++ b/src/criteria.ts @@ -72,6 +72,7 @@ export interface ICriteriaFieldConfig { schemaCategory?: SchemaCategory; isMulti?: boolean; validation?: IValidation; + savedCriteriaSettings?: DataValueMap; } /** @@ -89,6 +90,11 @@ export interface IProofCriterionRef { name: string; page: number; } + +export interface ICriteriaSearchInput { + [criterion: string]: { value: string; offset: string }; +} + export enum ValidationTypes { alphaNumeric = 'alphaNumeric', email = 'email', diff --git a/src/dataSource.ts b/src/dataSource.ts index f591eb1..f8c5cff 100644 --- a/src/dataSource.ts +++ b/src/dataSource.ts @@ -38,6 +38,7 @@ export interface IDataSetLookup { dataSet: string; dataSetParams?: DataValueMap; delaySeconds?: number; + continueOnError?: boolean; } export enum PagingType { diff --git a/src/proofTypes.ts b/src/proofTypes.ts index 34d587e..2d37c49 100644 --- a/src/proofTypes.ts +++ b/src/proofTypes.ts @@ -72,6 +72,33 @@ export interface IHypersyncField { format?: HypersyncFieldFormat; } +export enum IteratorSource { + DataSet = 'dataSet', + Criteria = 'criteria' +} + +export interface BaseIteratorDefinition { + layer: number; + iterandKey: string; + subArraySize?: number; +} + +export interface DataSetSourcedIterator extends BaseIteratorDefinition { + source: IteratorSource.DataSet; + dataSet: string; + dataSetParams?: DataValueMap; +} + +export interface CriteriaSourcedIterator extends BaseIteratorDefinition { + source: IteratorSource.Criteria; + criteriaProperty: string; + criteriaTransformer: string; +} + +export type DataSetIteratorDefinition = + | DataSetSourcedIterator + | CriteriaSourcedIterator; + export interface IProofSpec { period: HypersyncPeriod; useVersioning: boolean; @@ -82,6 +109,7 @@ export interface IProofSpec { subtitle: string; dataSet: string; dataSetParams?: DataValueMap; + dataSetIterator?: DataSetIteratorDefinition[]; noResultsMessage?: string; lookups?: IProofSpecLookup[]; fields: IHypersyncField[]; From 56b52d27abd9303de7f5721c91a0f45a515f64bf Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Fri, 9 Jan 2026 14:55:07 -0800 Subject: [PATCH 2/7] README and package update --- README.md | 8 ++++++++ package.json | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e47dd67..74c8d76 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,14 @@ Models, types and enumerations used by Hypersyncs. ## Release Notes +### 6.0.0 + +- **Breaking:** Updated to Node.js 22 +- **Breaking:** Moved `CredentialFieldType` enum to `@hyperproof/integration-sdk` +- Added `IteratorSource` enum and iterator definition types for iterative proof generation +- Added `savedCriteriaSettings` and `ICriteriaSearchInput` for criteria search functionality +- Added `continueOnError` property to `IDataSetLookup` + ### 5.2.0 - Update Criteria and DataSource models diff --git a/package.json b/package.json index 47e302c..46fae59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hyperproof/hypersync-models", - "version": "5.2.0", + "version": "6.0.0", "description": "Hypersync Models", "license": "MIT", "repository": { @@ -14,7 +14,7 @@ "lint": "./node_modules/eslint/bin/eslint.js 'src/**/*.{js,ts}' --max-warnings 0" }, "engines": { - "node": "^16.19.1 || ^18.17.1" + "node": "22" }, "dependencies": {}, "devDependencies": { From b51bcbc2b1a9c3b9226241284251ba774d55aea4 Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Fri, 9 Jan 2026 17:11:04 -0800 Subject: [PATCH 3/7] Use yarn --- .github/workflows/build.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..54c982d --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'yarn' + + - name: Install dependencies + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build From 7826b1325ee2289a355f62b74ce9a0de9ea47b6f Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Mon, 12 Jan 2026 15:23:48 -0800 Subject: [PATCH 4/7] semver engines.node --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 46fae59..142c989 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "lint": "./node_modules/eslint/bin/eslint.js 'src/**/*.{js,ts}' --max-warnings 0" }, "engines": { - "node": "22" + "node": "^22.0.0" }, "dependencies": {}, "devDependencies": { From 96fe8bb57ea6ac540145ebd4d748433219d007d4 Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Tue, 20 Jan 2026 23:04:35 -0800 Subject: [PATCH 5/7] Remove 6.0.0 release notes from readme --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index 74c8d76..e47dd67 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,6 @@ Models, types and enumerations used by Hypersyncs. ## Release Notes -### 6.0.0 - -- **Breaking:** Updated to Node.js 22 -- **Breaking:** Moved `CredentialFieldType` enum to `@hyperproof/integration-sdk` -- Added `IteratorSource` enum and iterator definition types for iterative proof generation -- Added `savedCriteriaSettings` and `ICriteriaSearchInput` for criteria search functionality -- Added `continueOnError` property to `IDataSetLookup` - ### 5.2.0 - Update Criteria and DataSource models From 2cf83b82f4ff9613ab788ed45cfce1b8d4da0d08 Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Tue, 20 Jan 2026 23:06:58 -0800 Subject: [PATCH 6/7] Use version 6.0.0-beta --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 142c989..3b89a70 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hyperproof/hypersync-models", - "version": "6.0.0", + "version": "6.0.0-beta", "description": "Hypersync Models", "license": "MIT", "repository": { From 11d90b9bd85b0214c8b01723c662f66b7de48750 Mon Sep 17 00:00:00 2001 From: "trent.hashimoto" Date: Tue, 20 Jan 2026 23:26:45 -0800 Subject: [PATCH 7/7] Add declarative sort to IProofSpec --- src/proofTypes.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/proofTypes.ts b/src/proofTypes.ts index 2d37c49..13d4dc9 100644 --- a/src/proofTypes.ts +++ b/src/proofTypes.ts @@ -1,5 +1,6 @@ import { IProofCriterionRef } from './criteria'; import { DataValueMap } from './data'; +import { SortClause } from './dataSource'; export enum HypersyncDataFormat { Stacked = 'stacked', @@ -115,6 +116,7 @@ export interface IProofSpec { fields: IHypersyncField[]; webPageUrl?: string; autoLayout?: boolean; + sort?: SortClause[]; } export interface IProofSpecOverride {