{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"V7 Hypersync SDK migration guide","description":"Hyperproof developer resources for custom integrations.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"v7-hypersync-sdk-migration-guide","__idx":0},"children":["V7 Hypersync SDK migration guide"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"version-6x-to-version-70","__idx":1},"children":["Version 6.x to version 7.0"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Hypersync SDK version 7.0 includes security improvements and internal updates that may require small changes to Hypersync apps that use version 6.x."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["This is an optional upgrade."]}," Hypersyncs built with version 6.x of the SDK will continue to function normally. Version 7 introduces an SSRF guard on all outbound requests and upgrades several core dependencies. Apps that only target publicly resolvable hosts can usually upgrade with minimal effort."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"package-versions","__idx":2},"children":["Package versions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All three packages are released together at the same version. Update the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["dependencies"]}," section of your app's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["package.json"]}," file as follows:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"dependencies\": {\n    \"@hyperproof/hypersync-models\": \"^7.0.1\",\n    \"@hyperproof/hypersync-sdk\": \"^7.0.1\",\n    \"@hyperproof/integration-sdk\": \"^7.0.1\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"install-the-updated-packages","__idx":3},"children":["Install the updated packages"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ensure the package dependencies are installed:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"yarn install\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify that the build is error free, correct any issues, and rebuild if necessary."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"build-and-deploy-your-hypersync","__idx":4},"children":["Build and deploy your Hypersync"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Build your updated Hypersync:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"yarn build\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Make sure you are signed into your Hyperproof organization:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"hp signin\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Deploy your updated Hypersync:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"hp customapps import -d .\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"required-code-updates","__idx":5},"children":["Required code updates"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"outbound-requests-are-now-ssrf-guarded","__idx":6},"children":["Outbound requests are now SSRF-guarded"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All requests made through the SDK's HTTP layer (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ApiClient"]}," and therefore every ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestDataSourceBase"]}," data set) now pass through a guarded agent. The guard:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Allows only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["http:"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https:"]}," schemes"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Resolves hostnames using a public DNS-over-HTTPS resolver"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Rejects private, reserved, or link-local IP ranges"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Rejects IP-literal hosts (e.g. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://10.0.0.5/api"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Pins sockets to validated public IPs on every redirect"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A blocked request fails with HTTP ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," and error code ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EGRESS_BLOCKED"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["If your app targets a host that is not publicly resolvable, it may stop working."]}," There is no environment-variable opt-out. Contact Hyperproof if your integration legitimately requires a private-network target."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No code changes are needed for apps that only reach public endpoints."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"logger-is-now-synchronous","__idx":7},"children":["Logger is now synchronous"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All logger methods (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Logger.info"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Logger.warn"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Logger.error"]},", etc.) now return ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["void"]}," instead of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Promise<void>"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Remove any ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["await"]}," calls on logger methods:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"// Before (v6)\nawait Logger.info('Fetching users');\n\n// After (v7)\nLogger.info('Fetching users');\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Logger.init()"]}," has been removed and is no longer needed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"jsonata-upgraded-to-222","__idx":8},"children":["JSONata upgraded to 2.2.2"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["jsonata"]}," library was upgraded from 1.8.7 to 2.2.2. All JSONata evaluations now return promises."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update any direct or indirect calls that use JSONata expressions (commonly inside ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transformObject"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getPropertyValue"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isPredicateMatch"]}," overrides):"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"ts","header":{"controls":{"copy":{}}},"source":"// Before (v6)\nconst result = jsonata(expr).evaluate(data);\n\n// After (v7)\nconst result = await jsonata(expr).evaluate(data);\n","lang":"ts"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestDataSourceBase"]}," methods are now ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["async"]}," because they internally use JSONata:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transformObject"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getPropertyValue"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["isPredicateMatch"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update any overrides of these methods to be ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["async"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["await"]}," their results where necessary."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"renamed-types","__idx":9},"children":["Renamed types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ICriteriaPageMessage"]}," has been replaced by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IInfoMessage"]},"."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace all references to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ICriteriaPageMessage"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IInfoMessage"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["info"]}," property on criteria pages is now typed as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IInfoMessage[]"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IInfoMessage"]}," adds an optional ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["action"]}," field that can render an actionable prompt."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"updated-method-signatures","__idx":10},"children":["Updated method signatures"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"hypersyncapponlastuserdeleted","__idx":11},"children":["HypersyncApp.onLastUserDeleted"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The signature changed to support custom-auth Hypersyncs:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"diff","header":{"controls":{"copy":{}}},"source":"- public async onLastUserDeleted(user: TUserProfile, accessToken: string): Promise<void>\n+ public async onLastUserDeleted(user: TUserProfile, credentials?: string | CustomAuthCredentials): Promise<void>\n","lang":"diff"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update any implementation of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["onLastUserDeleted"]}," to accept the new second parameter."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"syncpage-type-change","__idx":12},"children":["Sync.page type change"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Sync.page"]}," is now a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}," (opaque page token) instead of a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["number"]},". Update any code that treats the page value as numeric."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"credential-field-validation","__idx":13},"children":["Credential field validation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credentialsMetadata"]}," schema is now enforced server-side. Values that are not in the defined options will be rejected with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," error."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your code programmatically sets a credential field to a value that is not one of the offered select options (for example, an auto-discovered region), add that value to the field's options using the new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hidden: true"]}," flag:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"value\": \"us-gov-west-1\",\n  \"label\": \"US Gov West\",\n  \"hidden\": true\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"layout-is-now-automatic","__idx":14},"children":["Layout is now automatic"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every proof now receives a central layout pass. You no longer need to call ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["calcLayoutInfo"]}," yourself. Explicit widths you set on fields are preserved; orientation and zoom are computed automatically."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Remove any manual calls to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["calcLayoutInfo"]}," and delete the now-removed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IProofSpec.autoLayout"]}," flag from your proof specifications."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"optional-new-capabilities","__idx":15},"children":["Optional new capabilities"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These features are additive and do not require changes, but may allow you to simplify your code:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Override ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filterProofFields(fields, proofType, criteriaValues)"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["filterProofCriteria(criteria, proofType)"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HypersyncApp"]}," to dynamically shape proofs based on criteria."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Implement ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["applyAdditionalAuthorizationConfig"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HypersyncApp"]}," to add fields to the authorization config."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HypersyncPeriod.YearToDate"]}," proof period."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IProofSpec.sourceDateTimeZone"]}," to format date-only fields correctly."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDataSet.keepEmptyRows = true"]}," to preserve all-empty rows when they are meaningful."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use the new ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RestDataSourceBase.getBaseUrl()"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["getAdditionalContext()"]}," helpers."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"finishing-up","__idx":16},"children":["Finishing up"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After making the changes above:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yarn install"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Run ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["yarn build"]}," and resolve any TypeScript or compilation errors"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Deploy with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hp customapps import -d ."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Test connecting to your Hypersync and run existing syncs to verify behavior"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Version 6 Hypersyncs remain fully supported. Upgrade to version 7 only when you are ready to take advantage of the security improvements and new capabilities.  Contact support with any additional questions."]},{"$$mdtype":"Tag","name":"div","attributes":{},"children":[]}]},"headings":[{"value":"V7 Hypersync SDK migration guide","id":"v7-hypersync-sdk-migration-guide","depth":1},{"value":"Version 6.x to version 7.0","id":"version-6x-to-version-70","depth":2},{"value":"Package versions","id":"package-versions","depth":3},{"value":"Install the updated packages","id":"install-the-updated-packages","depth":3},{"value":"Build and deploy your Hypersync","id":"build-and-deploy-your-hypersync","depth":3},{"value":"Required code updates","id":"required-code-updates","depth":2},{"value":"Outbound requests are now SSRF-guarded","id":"outbound-requests-are-now-ssrf-guarded","depth":3},{"value":"Logger is now synchronous","id":"logger-is-now-synchronous","depth":3},{"value":"JSONata upgraded to 2.2.2","id":"jsonata-upgraded-to-222","depth":3},{"value":"Renamed types","id":"renamed-types","depth":3},{"value":"Updated method signatures","id":"updated-method-signatures","depth":3},{"value":"HypersyncApp.onLastUserDeleted","id":"hypersyncapponlastuserdeleted","depth":4},{"value":"Sync.page type change","id":"syncpage-type-change","depth":4},{"value":"Credential field validation","id":"credential-field-validation","depth":3},{"value":"Layout is now automatic","id":"layout-is-now-automatic","depth":3},{"value":"Optional new capabilities","id":"optional-new-capabilities","depth":2},{"value":"Finishing up","id":"finishing-up","depth":2}],"frontmatter":{"seo":{"title":"V7 Hypersync SDK migration guide"}},"lastModified":"2026-08-27T13:38:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/hypersync-sdk/migration-v6-to-v7","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}