@oneblink/sdk-core
Advanced tools
Comparing version 0.1.0 to 0.1.1-beta.1
@@ -10,4 +10,8 @@ # Changelog | ||
### Added | ||
- `previousApprovalId` to `replaceCustomValues` | ||
## [0.1.0] - 2021-07-20 | ||
Initial release |
@@ -9,6 +9,7 @@ import { FormTypes, SubmissionTypes } from '@oneblink/types'; | ||
formatTime: (value: string) => string; | ||
previousApprovalId?: string; | ||
}; | ||
export default function replaceCustomValues(text: string, { form, submission, externalId, submissionId, submissionTimestamp, formatDate, formatTime, }: CustomValuesOptions & { | ||
export default function replaceCustomValues(text: string, { form, submission, externalId, submissionId, submissionTimestamp, formatDate, formatTime, previousApprovalId, }: CustomValuesOptions & { | ||
submission: SubmissionTypes.S3SubmissionData['submission']; | ||
}): string; | ||
export {}; |
@@ -42,5 +42,9 @@ "use strict"; | ||
}, | ||
{ | ||
string: '{PREVIOUS_APPROVAL_ID}', | ||
value: ({ previousApprovalId }) => previousApprovalId || '', | ||
}, | ||
]; | ||
function getElementSubmissionValue({ propertyName, submission, form, formatDate, formatTime, }) { | ||
const formElement = formElementsService_1.findFormElement(form.elements, (element) => element.type !== 'page' && | ||
const formElement = (0, formElementsService_1.findFormElement)(form.elements, (element) => element.type !== 'page' && | ||
element.type !== 'section' && | ||
@@ -84,3 +88,3 @@ element.name === propertyName); | ||
} | ||
function replaceCustomValues(text, { form, submission, externalId, submissionId, submissionTimestamp, formatDate, formatTime, }) { | ||
function replaceCustomValues(text, { form, submission, externalId, submissionId, submissionTimestamp, formatDate, formatTime, previousApprovalId, }) { | ||
const string = replaceElementValues(text, { | ||
@@ -100,2 +104,3 @@ form, | ||
formatTime, | ||
previousApprovalId, | ||
})); | ||
@@ -102,0 +107,0 @@ }, string); |
{ | ||
"name": "@oneblink/sdk-core", | ||
"description": "OneBlink SDK for JavaScript (works in Browsers and NodeJS)", | ||
"version": "0.1.0", | ||
"version": "0.1.1-beta.1", | ||
"author": "OneBlink <developers@oneblink.io> (https://oneblink.io)", | ||
@@ -13,14 +13,14 @@ "bugs": { | ||
"@oneblink/types": "github:oneblink/types", | ||
"@types/jest": "^26.0.23", | ||
"@typescript-eslint/eslint-plugin": "^4.28.1", | ||
"@typescript-eslint/parser": "^4.28.1", | ||
"eslint": "^7.29.0", | ||
"@types/jest": "^27.0.1", | ||
"@typescript-eslint/eslint-plugin": "^4.30.0", | ||
"@typescript-eslint/parser": "^4.30.0", | ||
"eslint": "^7.32.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-prettier": "^3.4.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"fixpack": "^4.0.0", | ||
"jest": "^27.0.6", | ||
"jest": "^27.1.0", | ||
"prettier": "^2.3.2", | ||
"ts-jest": "^27.0.3", | ||
"tsc-watch": "^4.4.0", | ||
"typescript": "^4.3.5" | ||
"ts-jest": "^27.0.5", | ||
"tsc-watch": "^4.5.0", | ||
"typescript": "^4.4.2" | ||
}, | ||
@@ -27,0 +27,0 @@ "directories": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
87936
569
0