Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into chore/upgrade-axios
Browse files Browse the repository at this point in the history
  • Loading branch information
KenLSM committed Nov 17, 2023
2 parents 680cedd + 9cd2b71 commit d234ea8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
jobs:
build:
name: build
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: 18
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand All @@ -27,13 +27,13 @@ jobs:
- run: npm run build
test:
name: test
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '10.x'
node-version: 18
- name: Cache Node.js modules
uses: actions/cache@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ of the returned object.
Note that due to end-to-end encryption, FormSG servers are unable to verify the data format.

However, the `decrypt` function exposed by this library [validates](https://github.com/opengovsg/formsg-javascript-sdk/blob/master/src/util/validate.ts) the decrypted content and will **return `null` if the
decrypted content does not fit the schema displayed below.**
decrypted content does not contain all of the fields displayed in the schema below.**

| Key | Type | Description |
| ----------- | -------- | -------------------------------------------------------------------------------------------------------- |
Expand All @@ -146,6 +146,9 @@ decrypted content does not fit the schema displayed below.**
| fieldType | string | The type of field for the question. |
| \_id | string | A unique identifier of the form field. WARNING: Changes when new fields are created/removed in the form. |

**Important Note: **
Additional internal fields may be included in webhooks from time to time, which will then be published as part of our official schema once it is stable for public consumption. If you are applying your own validation, you should account for this e.g. by not rejecting the webhook if there are additional fields included.

The full schema can be viewed in
[`validate.ts`](https://github.com/opengovsg/formsg-javascript-sdk/tree/master/src/util/validate.ts).

Expand Down

0 comments on commit d234ea8

Please sign in to comment.