@oneblink/sdk
Advanced tools
Comparing version 0.2.8-beta.1 to 0.2.8-beta.2
@@ -7,3 +7,3 @@ # Changelog | ||
- `elementLookupFormId` property to Lookup form elements | ||
- ON-4090 # added `form` and `infoPage` element types | ||
@@ -10,0 +10,0 @@ ## 0.2.7 (2019-05-06) |
@@ -64,5 +64,7 @@ // @flow | ||
'email' | | ||
'file', | ||
name: string, | ||
label: string, | ||
'file' | | ||
'form' | | ||
'infoPage', | ||
name?: string, | ||
label?: string, | ||
required: boolean, | ||
@@ -97,3 +99,4 @@ readOnly: boolean, | ||
isDataLookup?: boolean, | ||
isElementLookup?: boolean | ||
isElementLookup?: boolean, | ||
formId?: number | ||
} | ||
@@ -100,0 +103,0 @@ |
@@ -31,3 +31,5 @@ // @flow | ||
'telephone', | ||
'autocomplete' | ||
'autocomplete', | ||
'form', | ||
'infoPage' | ||
] | ||
@@ -119,4 +121,12 @@ | ||
'type': Joi.string().required().label('Form Element - Type').valid(elementTypes), | ||
'name': Joi.string().required().label('Form Element - Name'), | ||
'label': Joi.string().required().label('Form Element - Label'), | ||
'name': Joi.string().label('Form Element - Name').when('type', { | ||
is: Joi.only(['form', 'infoPage']), | ||
then: Joi.allow(null), | ||
otherwise: Joi.required() | ||
}), | ||
'label': Joi.string().label('Form Element - Label').when('type', { | ||
is: Joi.only(['form', 'infoPage']), | ||
then: Joi.allow(null), | ||
otherwise: Joi.required() | ||
}), | ||
'required': Joi.bool().default(false).label('Form Element - Required'), | ||
@@ -333,3 +343,3 @@ 'readOnly': Joi.bool().default(false).label('Form Element - Read Only'), | ||
is: Joi.only('repeatableSet'), | ||
then: Joi.array().items(Joi.lazy(() => BaseSchema)).required().min(1).unique('name').unique('id'), | ||
then: Joi.array().items(Joi.lazy(() => BaseSchema)).required().min(1).unique('name', { ignoreUndefined: true }).unique('id'), | ||
otherwise: Joi.allow(null) | ||
@@ -394,5 +404,7 @@ }), | ||
}), | ||
'elementLookupFormId': Joi.number().label('Element Lookup Form Id').when('isElementLookup', { | ||
is: true, | ||
then: Joi.number(), | ||
// form and infoPage | ||
'formId': Joi.number().label('Form Id').when('type', { | ||
is: ['form', 'infoPage'], | ||
then: Joi.required(), | ||
otherwise: Joi.allow(null) | ||
@@ -447,3 +459,3 @@ }) | ||
is: false, | ||
then: Joi.array().required().items(BaseSchema).unique('name').unique('id'), | ||
then: Joi.array().required().items(BaseSchema).unique('name', { ignoreUndefined: true }).unique('id'), | ||
otherwise: Joi.array().items(Joi.object().keys({ | ||
@@ -456,3 +468,3 @@ 'id': Joi.string().guid().required().label('Form Element - Id'), | ||
'requiresAllConditionallyShowPredicates': Joi.bool().default(false).label('Form Element - Requires All Conditionally Show Predicates are Met'), | ||
'elements': Joi.array().label('Form Element - Page - Elements').required().items(BaseSchema).min(1).unique('name').unique('id') | ||
'elements': Joi.array().label('Form Element - Page - Elements').required().items(BaseSchema).min(1).unique('name', { ignoreUndefined: true }).unique('id') | ||
})) | ||
@@ -459,0 +471,0 @@ }), |
{ | ||
"name": "@oneblink/sdk", | ||
"description": "OneBlink SDK to serve as an entry point for all OneBlink Services in NodeJS", | ||
"version": "0.2.8-beta.1", | ||
"version": "0.2.8-beta.2", | ||
"bugs": { | ||
@@ -6,0 +6,0 @@ "url": "https://github.com/blinkmobile/oneblink-sdk-js/issues" |
83559
2425