Skip to content

Proof Type JSON Format

No-code proof types are stored in a package's /json/proof directory. There should be one .json file in this directory for each proof type that is visible to the Hypersync app user.

Each proof type file exposes a JSON object with these properties:

PropertyRequiredDescription
descriptionYesDescription of the proof type
criteriaYesArray of criteria fields that are required by the proof type
proofSpecYesObject that specifies how the proof type should be rendered
overridesNoProof specs which override the base proof spec based on some condition

criteria

The criteria property is an array of JSON objects. There is one element in the array for each criteria field that the user needs to specify as part of configuring the proof type. If no criteria are required for a given proof type, the criteria property should be an empty array (i.e. []).

Each object in the array has two required properties: name and page.

PropertyDescription
nameidentifies the criteria field in the criteria provider
pageZero-based index of the page on which the criterion should be shown

proofSpec

The proofSpec property in a proof type file is a JSON object that specifies how the proof type should be rendered.

PropertyRequiredDescription
periodYesDefault synchronization schedule. Valid values are daily, weekly, monthly, quarterly and yearly
useVersioningYesWhether or not to use versioning by default
suggestedNameYesSuggested name for new Hypersyncs using this proof type
formatYesFormat of the fields on the page. Valid values are tabular (side by side) or stacked (fields stacked vertically)
orientationYesFor PDF proofs, orientation of the generated PDF. Valid values are portrait and landscape
titleYesTitle to render at the top of the generated proof
subtitleYesSubtitle to render below the title
dataSetYesName of the data set to which the proof type is bound
dataSetParamsNoParameters provided to the data source when retrieving the data set
noResultsMessageNoText to render if no items are found in the data set
fieldsYesArray of fields to include in the generated proof
webPageUrlNoURL shown at the bottom of generated proof
autoLayoutNotrue to automatically layout the fields in the specification. Default: false.
sortNoSort applied after all data processing is complete

overrides

overrides is an optional property that includes proof specs that are used in lieu of the default prooc spec based on some condition. For example, if you have a criteria field that lets the user choose a group by name, and if that select control also includes an "All Groups" option, an override an be used to change the layout of the generated proof when the user chooses "All Groups".

If specified, the overrides property must be formatted as an array of objects. Each of the objects in the array includes two properties: condition and proofSpec.

PropertyDescription
conditionObject which specifies the value that must be matched for the override to be applied
proofSpecThe proofSpec to use if the condition is met

Example

{
  "description": "{{messages.PROOF_TYPE_USER_LIST}}",
  "criteria": [{ "name": "group", "page": 0 }],
  "proofSpec": {
    "period": "monthly",
    "useVersioning": true,
    "suggestedName": "{{messages.PROOF_TYPE_USER_LIST}}",
    "format": "tabular",
    "orientation": "landscape",
    "title": "{{messages.CONNECTOR_NAME}}",
    "subtitle": "{{messages.PROOF_TYPE_USER_LIST}}",
    "dataSet": "users",
    "dataSetParams": {
      "group": "{{criteria.group}}"
    },
    "noResultsMessage": "{{messages.NO_USERS}}",
    "sort": [
      {
        "property": "lastName",
        "direction": "ascending"
      }
    ],
    "fields": [
      {
        "property": "firstName",
        "label": "{{messages.LABEL_FIRST_NAME}}",
        "width": "400px",
        "type": "text"
      },
      {
        "property": "lastName",
        "label": "{{messages.LABEL_LAST_NAME}}",
        "width": "400px",
        "type": "text"
      },
      {
        "property": "email",
        "label": "{{messages.LABEL_EMAIL_ADDRESS}}",
        "width": "200px",
        "type": "text"
      },
      {
        "property": "status",
        "label": "{{messages.LABEL_STATUS}}",
        "width": "200px",
        "type": "text"
      }
    ],
    "webPageUrl": "https://myservice.com/users"
  }
}