@appsemble/utils 0.33.5 → 0.33.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/api/components/schemas/App.js +5 -1
- package/api/components/schemas/BlockVersion.js +6 -1
- package/api/components/schemas/index.d.ts +0 -118
- package/api/components/schemas/index.js +0 -118
- package/api/paths/appTemplates.js +12 -3
- package/appMessages.d.ts +2 -2
- package/appMessages.js +1 -1
- package/authorization.d.ts +1 -11
- package/authorization.js +1 -163
- package/constants/index.d.ts +0 -2
- package/constants/index.js +0 -2
- package/formatRequestAction.d.ts +1 -1
- package/index.d.ts +2 -14
- package/index.js +2 -14
- package/miscellaneous.d.ts +5 -13
- package/miscellaneous.js +6 -33
- package/package.json +3 -2
- package/theme.d.ts +1 -1
- package/theme.js +1 -1
- package/types.d.ts +1 -1
- package/validateAppMessages.d.ts +2 -1
- package/validateAppMessages.js +2 -2
- package/allActions.d.ts +0 -3
- package/allActions.js +0 -11
- package/api/components/schemas/ActionDefinition.d.ts +0 -2
- package/api/components/schemas/ActionDefinition.js +0 -95
- package/api/components/schemas/AnalyticsActionDefinition.d.ts +0 -1
- package/api/components/schemas/AnalyticsActionDefinition.js +0 -25
- package/api/components/schemas/AppDefinition.d.ts +0 -2
- package/api/components/schemas/AppDefinition.js +0 -126
- package/api/components/schemas/AppLayoutDefinition.d.ts +0 -2
- package/api/components/schemas/AppLayoutDefinition.js +0 -46
- package/api/components/schemas/AppMemberCurrentPatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberCurrentPatchActionDefinition.js +0 -30
- package/api/components/schemas/AppMemberDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberDeleteActionDefinition.js +0 -20
- package/api/components/schemas/AppMemberInviteActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberInviteActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberLoginActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberLoginActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberLogoutActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberLogoutActionDefinition.js +0 -14
- package/api/components/schemas/AppMemberPropertiesPatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberPropertiesPatchActionDefinition.js +0 -26
- package/api/components/schemas/AppMemberPropertyDefinition.d.ts +0 -2
- package/api/components/schemas/AppMemberPropertyDefinition.js +0 -49
- package/api/components/schemas/AppMemberQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberQueryActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberRegisterActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberRegisterActionDefinition.js +0 -43
- package/api/components/schemas/AppMemberRoleUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberRoleUpdateActionDefinition.js +0 -27
- package/api/components/schemas/AppMembersDefinition.d.ts +0 -2
- package/api/components/schemas/AppMembersDefinition.js +0 -17
- package/api/components/schemas/ArrayRemapperDefinition.d.ts +0 -2
- package/api/components/schemas/ArrayRemapperDefinition.js +0 -22
- package/api/components/schemas/BaseActionDefinition.d.ts +0 -2
- package/api/components/schemas/BaseActionDefinition.js +0 -10
- package/api/components/schemas/BaseJSONSchema.d.ts +0 -2
- package/api/components/schemas/BaseJSONSchema.js +0 -24
- package/api/components/schemas/BasePageDefinition.d.ts +0 -2
- package/api/components/schemas/BasePageDefinition.js +0 -92
- package/api/components/schemas/BlockDefinition.d.ts +0 -2
- package/api/components/schemas/BlockDefinition.js +0 -94
- package/api/components/schemas/ConditionActionDefinition.d.ts +0 -1
- package/api/components/schemas/ConditionActionDefinition.js +0 -30
- package/api/components/schemas/ContainerDefinition.d.ts +0 -2
- package/api/components/schemas/ContainerDefinition.js +0 -52
- package/api/components/schemas/ContainerPageDefinition.d.ts +0 -1
- package/api/components/schemas/ContainerPageDefinition.js +0 -56
- package/api/components/schemas/ControllerActionDefinition.d.ts +0 -1
- package/api/components/schemas/ControllerActionDefinition.js +0 -18
- package/api/components/schemas/ControllerDefinition.d.ts +0 -2
- package/api/components/schemas/ControllerDefinition.js +0 -17
- package/api/components/schemas/CronDefinition.d.ts +0 -2
- package/api/components/schemas/CronDefinition.js +0 -20
- package/api/components/schemas/CsvParseActionDefinition.d.ts +0 -1
- package/api/components/schemas/CsvParseActionDefinition.js +0 -22
- package/api/components/schemas/CustomFontDefinition.d.ts +0 -2
- package/api/components/schemas/CustomFontDefinition.js +0 -20
- package/api/components/schemas/DialogActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogActionDefinition.js +0 -40
- package/api/components/schemas/DialogErrorActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogErrorActionDefinition.js +0 -17
- package/api/components/schemas/DialogOkActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogOkActionDefinition.js +0 -17
- package/api/components/schemas/DownloadActionDefinition.d.ts +0 -1
- package/api/components/schemas/DownloadActionDefinition.js +0 -19
- package/api/components/schemas/EachActionDefinition.d.ts +0 -1
- package/api/components/schemas/EachActionDefinition.js +0 -26
- package/api/components/schemas/EmailActionDefinition.d.ts +0 -1
- package/api/components/schemas/EmailActionDefinition.js +0 -54
- package/api/components/schemas/EventActionDefinition.d.ts +0 -1
- package/api/components/schemas/EventActionDefinition.js +0 -27
- package/api/components/schemas/EventsDefinition.d.ts +0 -2
- package/api/components/schemas/EventsDefinition.js +0 -29
- package/api/components/schemas/FilterParametersDefinition.d.ts +0 -2
- package/api/components/schemas/FilterParametersDefinition.js +0 -15
- package/api/components/schemas/FlowBackActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowBackActionDefinition.js +0 -16
- package/api/components/schemas/FlowCancelActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowCancelActionDefinition.js +0 -14
- package/api/components/schemas/FlowFinishActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowFinishActionDefinition.js +0 -16
- package/api/components/schemas/FlowNextActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowNextActionDefinition.js +0 -17
- package/api/components/schemas/FlowPageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/FlowPageActionsDefinition.js +0 -23
- package/api/components/schemas/FlowPageDefinition.d.ts +0 -1
- package/api/components/schemas/FlowPageDefinition.js +0 -37
- package/api/components/schemas/FlowToActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowToActionDefinition.js +0 -21
- package/api/components/schemas/GoogleFontDefinition.d.ts +0 -2
- package/api/components/schemas/GoogleFontDefinition.js +0 -22
- package/api/components/schemas/GroupMemberDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberDeleteActionDefinition.js +0 -18
- package/api/components/schemas/GroupMemberInviteActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberInviteActionDefinition.js +0 -26
- package/api/components/schemas/GroupMemberQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberQueryActionDefinition.js +0 -18
- package/api/components/schemas/GroupMemberRoleUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberRoleUpdateActionDefinition.js +0 -22
- package/api/components/schemas/GroupQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupQueryActionDefinition.js +0 -14
- package/api/components/schemas/JSONPointer.d.ts +0 -1
- package/api/components/schemas/JSONPointer.js +0 -20
- package/api/components/schemas/JSONSchema.d.ts +0 -2
- package/api/components/schemas/JSONSchema.js +0 -20
- package/api/components/schemas/JSONSchemaAnyOf.d.ts +0 -1
- package/api/components/schemas/JSONSchemaAnyOf.js +0 -26
- package/api/components/schemas/JSONSchemaArray.d.ts +0 -1
- package/api/components/schemas/JSONSchemaArray.js +0 -47
- package/api/components/schemas/JSONSchemaBoolean.d.ts +0 -1
- package/api/components/schemas/JSONSchemaBoolean.js +0 -37
- package/api/components/schemas/JSONSchemaConst.d.ts +0 -1
- package/api/components/schemas/JSONSchemaConst.js +0 -16
- package/api/components/schemas/JSONSchemaEnum.d.ts +0 -1
- package/api/components/schemas/JSONSchemaEnum.js +0 -36
- package/api/components/schemas/JSONSchemaInteger.d.ts +0 -1
- package/api/components/schemas/JSONSchemaInteger.js +0 -55
- package/api/components/schemas/JSONSchemaMultiType.d.ts +0 -1
- package/api/components/schemas/JSONSchemaMultiType.js +0 -48
- package/api/components/schemas/JSONSchemaNot.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNot.js +0 -23
- package/api/components/schemas/JSONSchemaNull.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNull.js +0 -16
- package/api/components/schemas/JSONSchemaNumber.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNumber.js +0 -63
- package/api/components/schemas/JSONSchemaObject.d.ts +0 -1
- package/api/components/schemas/JSONSchemaObject.js +0 -74
- package/api/components/schemas/JSONSchemaOneOf.d.ts +0 -1
- package/api/components/schemas/JSONSchemaOneOf.js +0 -24
- package/api/components/schemas/JSONSchemaRemapper.d.ts +0 -1
- package/api/components/schemas/JSONSchemaRemapper.js +0 -19
- package/api/components/schemas/JSONSchemaRoot.d.ts +0 -1
- package/api/components/schemas/JSONSchemaRoot.js +0 -21
- package/api/components/schemas/JSONSchemaString.d.ts +0 -1
- package/api/components/schemas/JSONSchemaString.js +0 -107
- package/api/components/schemas/LinkActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkActionDefinition.js +0 -29
- package/api/components/schemas/LinkBackActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkBackActionDefinition.js +0 -14
- package/api/components/schemas/LinkNextActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkNextActionDefinition.js +0 -14
- package/api/components/schemas/LogActionDefinition.d.ts +0 -1
- package/api/components/schemas/LogActionDefinition.js +0 -22
- package/api/components/schemas/LoopPageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/LoopPageActionsDefinition.js +0 -24
- package/api/components/schemas/LoopPageDefinition.d.ts +0 -1
- package/api/components/schemas/LoopPageDefinition.js +0 -32
- package/api/components/schemas/MatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/MatchActionDefinition.js +0 -35
- package/api/components/schemas/MessageActionDefinition.d.ts +0 -1
- package/api/components/schemas/MessageActionDefinition.js +0 -40
- package/api/components/schemas/NoopActionDefinition.d.ts +0 -1
- package/api/components/schemas/NoopActionDefinition.js +0 -17
- package/api/components/schemas/NotificationHookDataDefinition.d.ts +0 -2
- package/api/components/schemas/NotificationHookDataDefinition.js +0 -24
- package/api/components/schemas/NotificationHookDefinition.d.ts +0 -2
- package/api/components/schemas/NotificationHookDefinition.js +0 -32
- package/api/components/schemas/NotifyActionDefinition.d.ts +0 -1
- package/api/components/schemas/NotifyActionDefinition.js +0 -32
- package/api/components/schemas/ObjectRemapperDefinition.d.ts +0 -2
- package/api/components/schemas/ObjectRemapperDefinition.js +0 -17
- package/api/components/schemas/PageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/PageActionsDefinition.js +0 -12
- package/api/components/schemas/PageDefinition.d.ts +0 -1
- package/api/components/schemas/PageDefinition.js +0 -26
- package/api/components/schemas/RemapperDefinition.d.ts +0 -2
- package/api/components/schemas/RemapperDefinition.js +0 -27
- package/api/components/schemas/RequestActionDefinition.d.ts +0 -1
- package/api/components/schemas/RequestActionDefinition.js +0 -75
- package/api/components/schemas/ResourceCountActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceCountActionDefinition.js +0 -22
- package/api/components/schemas/ResourceCreateActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceCreateActionDefinition.js +0 -18
- package/api/components/schemas/ResourceDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceDefinition.js +0 -263
- package/api/components/schemas/ResourceDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteActionDefinition.js +0 -18
- package/api/components/schemas/ResourceDeleteAllActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteAllActionDefinition.js +0 -21
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.js +0 -18
- package/api/components/schemas/ResourceGetActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceGetActionDefinition.js +0 -25
- package/api/components/schemas/ResourceHistoryDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceHistoryDefinition.js +0 -14
- package/api/components/schemas/ResourceHistoryGetActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceHistoryGetActionDefinition.js +0 -18
- package/api/components/schemas/ResourceHooksDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceHooksDefinition.js +0 -10
- package/api/components/schemas/ResourcePatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourcePatchActionDefinition.js +0 -21
- package/api/components/schemas/ResourceQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceQueryActionDefinition.js +0 -26
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.js +0 -23
- package/api/components/schemas/ResourceUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceUpdateActionDefinition.js +0 -18
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.js +0 -21
- package/api/components/schemas/ResourceViewDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceViewDefinition.js +0 -24
- package/api/components/schemas/SecurityCronDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityCronDefinition.js +0 -26
- package/api/components/schemas/SecurityDefaultDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityDefaultDefinition.js +0 -34
- package/api/components/schemas/SecurityDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityDefinition.js +0 -17
- package/api/components/schemas/SecurityGuestDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityGuestDefinition.js +0 -26
- package/api/components/schemas/SecurityRoleDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityRoleDefinition.js +0 -35
- package/api/components/schemas/ShareActionDefinition.d.ts +0 -1
- package/api/components/schemas/ShareActionDefinition.js +0 -30
- package/api/components/schemas/StaticActionDefinition.d.ts +0 -1
- package/api/components/schemas/StaticActionDefinition.js +0 -20
- package/api/components/schemas/StorageAppendActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageAppendActionDefinition.js +0 -43
- package/api/components/schemas/StorageDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageDeleteActionDefinition.js +0 -31
- package/api/components/schemas/StorageReadActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageReadActionDefinition.js +0 -32
- package/api/components/schemas/StorageSubtractActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageSubtractActionDefinition.js +0 -35
- package/api/components/schemas/StorageUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageUpdateActionDefinition.js +0 -46
- package/api/components/schemas/StorageWriteActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageWriteActionDefinition.js +0 -46
- package/api/components/schemas/SubPage.d.ts +0 -2
- package/api/components/schemas/SubPage.js +0 -36
- package/api/components/schemas/TabsPageDefinition.d.ts +0 -1
- package/api/components/schemas/TabsPageDefinition.js +0 -46
- package/api/components/schemas/Theme.d.ts +0 -2
- package/api/components/schemas/Theme.js +0 -80
- package/api/components/schemas/ThrowActionDefinition.d.ts +0 -1
- package/api/components/schemas/ThrowActionDefinition.js +0 -17
- package/api/components/schemas/WebhookDefinition.d.ts +0 -2
- package/api/components/schemas/WebhookDefinition.js +0 -17
- package/api/components/schemas/utils.d.ts +0 -13
- package/api/components/schemas/utils.js +0 -34
- package/appMembers.d.ts +0 -1
- package/appMembers.js +0 -9
- package/blockUtils.d.ts +0 -31
- package/blockUtils.js +0 -65
- package/constants/baseTheme.d.ts +0 -2
- package/constants/baseTheme.js +0 -16
- package/constants/fonts.d.ts +0 -6
- package/constants/fonts.js +0 -1607
- package/examples.d.ts +0 -23
- package/examples.js +0 -975
- package/findPageByName.d.ts +0 -2
- package/findPageByName.js +0 -15
- package/has.d.ts +0 -8
- package/has.js +0 -11
- package/ics.d.ts +0 -3
- package/ics.js +0 -41
- package/iterApp.d.ts +0 -64
- package/iterApp.js +0 -150
- package/jsonschema.d.ts +0 -54
- package/jsonschema.js +0 -185
- package/reference-schemas/actions/appMember.d.ts +0 -2
- package/reference-schemas/actions/appMember.js +0 -21
- package/reference-schemas/actions/flow.d.ts +0 -2
- package/reference-schemas/actions/flow.js +0 -13
- package/reference-schemas/actions/group.d.ts +0 -2
- package/reference-schemas/actions/group.js +0 -13
- package/reference-schemas/actions/index.d.ts +0 -7
- package/reference-schemas/actions/index.js +0 -8
- package/reference-schemas/actions/link.d.ts +0 -2
- package/reference-schemas/actions/link.js +0 -9
- package/reference-schemas/actions/miscellaneous.d.ts +0 -2
- package/reference-schemas/actions/miscellaneous.js +0 -43
- package/reference-schemas/actions/resources.d.ts +0 -2
- package/reference-schemas/actions/resources.js +0 -19
- package/reference-schemas/actions/storage.d.ts +0 -2
- package/reference-schemas/actions/storage.js +0 -15
- package/reference-schemas/remappers/arrays.d.ts +0 -2
- package/reference-schemas/remappers/arrays.js +0 -297
- package/reference-schemas/remappers/conditionals.d.ts +0 -2
- package/reference-schemas/remappers/conditionals.js +0 -167
- package/reference-schemas/remappers/config.d.ts +0 -2
- package/reference-schemas/remappers/config.js +0 -13
- package/reference-schemas/remappers/data.d.ts +0 -2
- package/reference-schemas/remappers/data.js +0 -394
- package/reference-schemas/remappers/dates.d.ts +0 -2
- package/reference-schemas/remappers/dates.js +0 -94
- package/reference-schemas/remappers/history.d.ts +0 -2
- package/reference-schemas/remappers/history.js +0 -246
- package/reference-schemas/remappers/index.d.ts +0 -12
- package/reference-schemas/remappers/index.js +0 -13
- package/reference-schemas/remappers/numbers.d.ts +0 -2
- package/reference-schemas/remappers/numbers.js +0 -30
- package/reference-schemas/remappers/objects.d.ts +0 -2
- package/reference-schemas/remappers/objects.js +0 -127
- package/reference-schemas/remappers/odata.d.ts +0 -2
- package/reference-schemas/remappers/odata.js +0 -95
- package/reference-schemas/remappers/randoms.d.ts +0 -2
- package/reference-schemas/remappers/randoms.js +0 -82
- package/reference-schemas/remappers/strings.d.ts +0 -2
- package/reference-schemas/remappers/strings.js +0 -93
- package/reference-schemas/remappers/unsorted.d.ts +0 -2
- package/reference-schemas/remappers/unsorted.js +0 -276
- package/remap.d.ts +0 -74
- package/remap.js +0 -692
- package/serverActions.d.ts +0 -2
- package/serverActions.js +0 -21
- package/string.d.ts +0 -23
- package/string.js +0 -30
- package/validation.d.ts +0 -25
- package/validation.js +0 -1231
package/examples.js
DELETED
|
@@ -1,975 +0,0 @@
|
|
|
1
|
-
import { IntlMessageFormat } from 'intl-messageformat';
|
|
2
|
-
import { stringify } from 'yaml';
|
|
3
|
-
export const examples = {
|
|
4
|
-
None: {
|
|
5
|
-
input: null,
|
|
6
|
-
remapper: '',
|
|
7
|
-
result: '',
|
|
8
|
-
},
|
|
9
|
-
'app.id': {
|
|
10
|
-
input: null,
|
|
11
|
-
remapper: {
|
|
12
|
-
app: 'id',
|
|
13
|
-
},
|
|
14
|
-
result: 0,
|
|
15
|
-
},
|
|
16
|
-
'app.locale': {
|
|
17
|
-
input: null,
|
|
18
|
-
remapper: {
|
|
19
|
-
app: 'locale',
|
|
20
|
-
},
|
|
21
|
-
result: 'en',
|
|
22
|
-
},
|
|
23
|
-
'app.url': {
|
|
24
|
-
input: null,
|
|
25
|
-
remapper: {
|
|
26
|
-
app: 'url',
|
|
27
|
-
},
|
|
28
|
-
result: 'https://example-app.example-organization.example.com',
|
|
29
|
-
},
|
|
30
|
-
'app.member': {
|
|
31
|
-
input: null,
|
|
32
|
-
remapper: {},
|
|
33
|
-
result: {},
|
|
34
|
-
skip: true,
|
|
35
|
-
},
|
|
36
|
-
type: {
|
|
37
|
-
input: [1, 2, 3],
|
|
38
|
-
remapper: { type: null },
|
|
39
|
-
result: 'array',
|
|
40
|
-
},
|
|
41
|
-
array: {
|
|
42
|
-
input: ['a', 'b', 'c'],
|
|
43
|
-
remapper: {
|
|
44
|
-
'array.map': {
|
|
45
|
-
'object.from': {
|
|
46
|
-
index: {
|
|
47
|
-
array: 'index',
|
|
48
|
-
},
|
|
49
|
-
length: {
|
|
50
|
-
array: 'length',
|
|
51
|
-
},
|
|
52
|
-
item: {
|
|
53
|
-
array: 'item',
|
|
54
|
-
},
|
|
55
|
-
prevItem: {
|
|
56
|
-
array: 'prevItem',
|
|
57
|
-
},
|
|
58
|
-
nextItem: {
|
|
59
|
-
array: 'nextItem',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
result: [
|
|
65
|
-
{
|
|
66
|
-
index: 0,
|
|
67
|
-
length: 3,
|
|
68
|
-
item: 'a',
|
|
69
|
-
prevItem: undefined,
|
|
70
|
-
nextItem: 'b',
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
index: 1,
|
|
74
|
-
length: 3,
|
|
75
|
-
item: 'b',
|
|
76
|
-
prevItem: 'a',
|
|
77
|
-
nextItem: 'c',
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
index: 2,
|
|
81
|
-
length: 3,
|
|
82
|
-
item: 'c',
|
|
83
|
-
prevItem: 'b',
|
|
84
|
-
nextItem: undefined,
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
'array.contains': {
|
|
89
|
-
input: [1, 2, 3, 4, 5],
|
|
90
|
-
remapper: { 'array.contains': { static: 6 } },
|
|
91
|
-
result: false,
|
|
92
|
-
},
|
|
93
|
-
'string.contains': {
|
|
94
|
-
input: 'Input string',
|
|
95
|
-
remapper: { 'string.contains': 'string' },
|
|
96
|
-
result: true,
|
|
97
|
-
},
|
|
98
|
-
len: {
|
|
99
|
-
input: 'string',
|
|
100
|
-
remapper: { len: null },
|
|
101
|
-
result: 6,
|
|
102
|
-
},
|
|
103
|
-
'array.append': {
|
|
104
|
-
input: [
|
|
105
|
-
{
|
|
106
|
-
name: 'Peter',
|
|
107
|
-
occupation: 'Delivery driver',
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
name: 'Otto',
|
|
111
|
-
occupation: 'Scientist',
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
name: 'Harry',
|
|
115
|
-
occupation: 'CEO',
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
remapper: {
|
|
119
|
-
'array.append': [
|
|
120
|
-
{
|
|
121
|
-
'object.from': {
|
|
122
|
-
name: 'James',
|
|
123
|
-
occupation: 'News reporter',
|
|
124
|
-
},
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
},
|
|
128
|
-
result: [
|
|
129
|
-
{
|
|
130
|
-
name: 'Peter',
|
|
131
|
-
occupation: 'Delivery driver',
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
name: 'Otto',
|
|
135
|
-
occupation: 'Scientist',
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
name: 'Harry',
|
|
139
|
-
occupation: 'CEO',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
name: 'James',
|
|
143
|
-
occupation: 'News reporter',
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
'array.filter': {
|
|
148
|
-
input: [
|
|
149
|
-
{
|
|
150
|
-
name: 'Peter',
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
name: 'Louis',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
name: 'Brian',
|
|
157
|
-
},
|
|
158
|
-
],
|
|
159
|
-
remapper: {
|
|
160
|
-
'array.filter': {
|
|
161
|
-
equals: [
|
|
162
|
-
{
|
|
163
|
-
prop: 'name',
|
|
164
|
-
},
|
|
165
|
-
'Louis',
|
|
166
|
-
],
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
result: [{ name: 'Louis' }],
|
|
170
|
-
},
|
|
171
|
-
'array.find': {
|
|
172
|
-
input: [
|
|
173
|
-
{
|
|
174
|
-
name: 'Craig',
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
name: 'Joey',
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
name: 'Stuart',
|
|
181
|
-
},
|
|
182
|
-
],
|
|
183
|
-
remapper: {
|
|
184
|
-
'array.find': {
|
|
185
|
-
equals: [
|
|
186
|
-
{
|
|
187
|
-
prop: 'name',
|
|
188
|
-
},
|
|
189
|
-
'Craig',
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
result: {
|
|
194
|
-
name: 'Craig',
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
'array.from': {
|
|
198
|
-
input: null,
|
|
199
|
-
remapper: {
|
|
200
|
-
'array.from': ['Peter', 'Otto', 'Harry'],
|
|
201
|
-
},
|
|
202
|
-
result: ['Peter', 'Otto', 'Harry'],
|
|
203
|
-
},
|
|
204
|
-
'array.map': {
|
|
205
|
-
input: [
|
|
206
|
-
{
|
|
207
|
-
name: 'Peter',
|
|
208
|
-
occupation: 'Delivery driver',
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
name: 'Otto',
|
|
212
|
-
occupation: 'Scientist',
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
name: 'Harry',
|
|
216
|
-
occupation: 'CEO',
|
|
217
|
-
},
|
|
218
|
-
],
|
|
219
|
-
remapper: {
|
|
220
|
-
'array.map': {
|
|
221
|
-
'object.omit': ['name'],
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
result: [
|
|
225
|
-
{
|
|
226
|
-
occupation: 'Delivery driver',
|
|
227
|
-
},
|
|
228
|
-
{
|
|
229
|
-
occupation: 'Scientist',
|
|
230
|
-
},
|
|
231
|
-
{
|
|
232
|
-
occupation: 'CEO',
|
|
233
|
-
},
|
|
234
|
-
],
|
|
235
|
-
},
|
|
236
|
-
'array.map.1': {
|
|
237
|
-
input: [
|
|
238
|
-
{
|
|
239
|
-
name: 'Peter',
|
|
240
|
-
occupation: 'Delivery driver',
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
name: 'Otto',
|
|
244
|
-
occupation: 'Scientist',
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
name: 'Harry',
|
|
248
|
-
occupation: 'CEO',
|
|
249
|
-
},
|
|
250
|
-
],
|
|
251
|
-
remapper: [
|
|
252
|
-
{
|
|
253
|
-
'array.map': {
|
|
254
|
-
if: {
|
|
255
|
-
condition: {
|
|
256
|
-
equals: [
|
|
257
|
-
{
|
|
258
|
-
prop: 'occupation',
|
|
259
|
-
},
|
|
260
|
-
'Scientist',
|
|
261
|
-
],
|
|
262
|
-
},
|
|
263
|
-
else: null,
|
|
264
|
-
then: {
|
|
265
|
-
'object.from': {
|
|
266
|
-
name: {
|
|
267
|
-
prop: 'name',
|
|
268
|
-
},
|
|
269
|
-
occupation: {
|
|
270
|
-
prop: 'occupation',
|
|
271
|
-
},
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
'null.strip': null,
|
|
279
|
-
},
|
|
280
|
-
],
|
|
281
|
-
result: [
|
|
282
|
-
{
|
|
283
|
-
name: 'Otto',
|
|
284
|
-
occupation: 'Scientist',
|
|
285
|
-
},
|
|
286
|
-
],
|
|
287
|
-
},
|
|
288
|
-
'array.omit': {
|
|
289
|
-
input: [
|
|
290
|
-
{
|
|
291
|
-
name: 'Peter',
|
|
292
|
-
occupation: 'Delivery driver',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
name: 'Otto',
|
|
296
|
-
occupation: 'Scientist',
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
name: 'Harry',
|
|
300
|
-
occupation: 'CEO',
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
name: 'James',
|
|
304
|
-
occupation: 'News reporter',
|
|
305
|
-
},
|
|
306
|
-
],
|
|
307
|
-
remapper: {
|
|
308
|
-
'array.omit': [3],
|
|
309
|
-
},
|
|
310
|
-
result: [
|
|
311
|
-
{
|
|
312
|
-
name: 'Peter',
|
|
313
|
-
occupation: 'Delivery driver',
|
|
314
|
-
},
|
|
315
|
-
{
|
|
316
|
-
name: 'Otto',
|
|
317
|
-
occupation: 'Scientist',
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
name: 'Harry',
|
|
321
|
-
occupation: 'CEO',
|
|
322
|
-
},
|
|
323
|
-
],
|
|
324
|
-
},
|
|
325
|
-
'array.unique': {
|
|
326
|
-
input: [1, 1, 2, 3],
|
|
327
|
-
remapper: {
|
|
328
|
-
'array.unique': null,
|
|
329
|
-
},
|
|
330
|
-
result: [1, 2, 3],
|
|
331
|
-
},
|
|
332
|
-
'array.flatten': {
|
|
333
|
-
input: [['Milka', 'Sven'], 'Goldie'],
|
|
334
|
-
remapper: {
|
|
335
|
-
'array.flatten': null,
|
|
336
|
-
},
|
|
337
|
-
result: ['Milka', 'Sven', 'Goldie'],
|
|
338
|
-
},
|
|
339
|
-
'assign.history': {
|
|
340
|
-
input: null,
|
|
341
|
-
remapper: {},
|
|
342
|
-
result: {},
|
|
343
|
-
skip: true,
|
|
344
|
-
},
|
|
345
|
-
context: {
|
|
346
|
-
input: null,
|
|
347
|
-
remapper: {},
|
|
348
|
-
result: {},
|
|
349
|
-
skip: true,
|
|
350
|
-
},
|
|
351
|
-
variable: {
|
|
352
|
-
input: null,
|
|
353
|
-
remapper: { variable: 'MY_VARIABLE' },
|
|
354
|
-
result: 'variable value',
|
|
355
|
-
skip: true,
|
|
356
|
-
},
|
|
357
|
-
'number.parse': {
|
|
358
|
-
input: '42',
|
|
359
|
-
remapper: { 'number.parse': null },
|
|
360
|
-
result: 42,
|
|
361
|
-
skip: true,
|
|
362
|
-
},
|
|
363
|
-
'date.add': {
|
|
364
|
-
input: '2023-06-30T14:50:19.601Z',
|
|
365
|
-
remapper: [
|
|
366
|
-
{
|
|
367
|
-
'date.now': null,
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
'date.add': '1w',
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
'date.format': null,
|
|
374
|
-
},
|
|
375
|
-
],
|
|
376
|
-
result: '2023-07-07T14:50:19.601Z',
|
|
377
|
-
skip: true,
|
|
378
|
-
},
|
|
379
|
-
'date.format': {
|
|
380
|
-
input: '2023-07-03',
|
|
381
|
-
remapper: {
|
|
382
|
-
'date.format': null,
|
|
383
|
-
},
|
|
384
|
-
result: '2023-07-02T22:00:00.000Z',
|
|
385
|
-
skip: true,
|
|
386
|
-
},
|
|
387
|
-
'date.now': {
|
|
388
|
-
input: null,
|
|
389
|
-
remapper: {
|
|
390
|
-
'date.now': null,
|
|
391
|
-
},
|
|
392
|
-
result: 'Mon Jul 03 2023 11:47:18 GMT+0200 (Midden-Europese zomertijd)',
|
|
393
|
-
skip: true,
|
|
394
|
-
},
|
|
395
|
-
'date.parse': {
|
|
396
|
-
input: '02/11/2014',
|
|
397
|
-
remapper: {
|
|
398
|
-
'date.parse': 'MM/dd/yyyy',
|
|
399
|
-
},
|
|
400
|
-
result: 'Tue Feb 11 2014 00:00:00',
|
|
401
|
-
skip: true,
|
|
402
|
-
},
|
|
403
|
-
equals: {
|
|
404
|
-
input: { inputValue: 'example', expectedValue: 'example' },
|
|
405
|
-
remapper: {
|
|
406
|
-
equals: [{ prop: 'inputValue' }, { prop: 'expectedValue' }],
|
|
407
|
-
},
|
|
408
|
-
result: true,
|
|
409
|
-
},
|
|
410
|
-
'from.history': {
|
|
411
|
-
input: null,
|
|
412
|
-
remapper: {},
|
|
413
|
-
result: {},
|
|
414
|
-
skip: true,
|
|
415
|
-
},
|
|
416
|
-
gt: {
|
|
417
|
-
input: { stock: 100 },
|
|
418
|
-
remapper: { gt: [{ prop: 'stock' }, 5] },
|
|
419
|
-
result: true,
|
|
420
|
-
},
|
|
421
|
-
history: {
|
|
422
|
-
input: null,
|
|
423
|
-
remapper: {},
|
|
424
|
-
result: {},
|
|
425
|
-
skip: true,
|
|
426
|
-
},
|
|
427
|
-
ics: {
|
|
428
|
-
input: null,
|
|
429
|
-
remapper: {},
|
|
430
|
-
result: {},
|
|
431
|
-
skip: true,
|
|
432
|
-
},
|
|
433
|
-
'if.then': {
|
|
434
|
-
input: { guess: 4 },
|
|
435
|
-
remapper: {
|
|
436
|
-
if: {
|
|
437
|
-
condition: {
|
|
438
|
-
equals: [
|
|
439
|
-
{
|
|
440
|
-
prop: 'guess',
|
|
441
|
-
},
|
|
442
|
-
4,
|
|
443
|
-
],
|
|
444
|
-
},
|
|
445
|
-
then: {
|
|
446
|
-
static: 'You guessed right!',
|
|
447
|
-
},
|
|
448
|
-
else: {
|
|
449
|
-
static: 'You guessed wrong!',
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
},
|
|
453
|
-
result: 'You guessed right!',
|
|
454
|
-
},
|
|
455
|
-
'if.else': {
|
|
456
|
-
input: { guess: 5 },
|
|
457
|
-
remapper: {
|
|
458
|
-
if: {
|
|
459
|
-
condition: {
|
|
460
|
-
equals: [
|
|
461
|
-
{
|
|
462
|
-
prop: 'guess',
|
|
463
|
-
},
|
|
464
|
-
4,
|
|
465
|
-
],
|
|
466
|
-
},
|
|
467
|
-
then: {
|
|
468
|
-
static: 'You guessed right!',
|
|
469
|
-
},
|
|
470
|
-
else: {
|
|
471
|
-
static: 'You guessed wrong!',
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
},
|
|
475
|
-
result: 'You guessed wrong!',
|
|
476
|
-
},
|
|
477
|
-
log: {
|
|
478
|
-
input: null,
|
|
479
|
-
remapper: {},
|
|
480
|
-
result: {},
|
|
481
|
-
skip: true,
|
|
482
|
-
},
|
|
483
|
-
lt: {
|
|
484
|
-
input: { stock: 4 },
|
|
485
|
-
remapper: { lt: [{ prop: 'stock' }, 5] },
|
|
486
|
-
result: true,
|
|
487
|
-
},
|
|
488
|
-
match: {
|
|
489
|
-
input: { Gem: 'Ruby' },
|
|
490
|
-
remapper: {
|
|
491
|
-
match: [
|
|
492
|
-
{
|
|
493
|
-
case: {
|
|
494
|
-
equals: [
|
|
495
|
-
{
|
|
496
|
-
prop: 'Gem',
|
|
497
|
-
},
|
|
498
|
-
'Diamond',
|
|
499
|
-
],
|
|
500
|
-
},
|
|
501
|
-
value: 100,
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
case: {
|
|
505
|
-
equals: [
|
|
506
|
-
{
|
|
507
|
-
prop: 'Gem',
|
|
508
|
-
},
|
|
509
|
-
'Ruby',
|
|
510
|
-
],
|
|
511
|
-
},
|
|
512
|
-
value: 75,
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
case: {
|
|
516
|
-
equals: [
|
|
517
|
-
{
|
|
518
|
-
prop: 'Gem',
|
|
519
|
-
},
|
|
520
|
-
'Gold',
|
|
521
|
-
],
|
|
522
|
-
},
|
|
523
|
-
value: 50,
|
|
524
|
-
},
|
|
525
|
-
{
|
|
526
|
-
case: {
|
|
527
|
-
equals: [
|
|
528
|
-
{
|
|
529
|
-
prop: 'Gem',
|
|
530
|
-
},
|
|
531
|
-
'Sapphire',
|
|
532
|
-
],
|
|
533
|
-
},
|
|
534
|
-
value: 25,
|
|
535
|
-
result: {},
|
|
536
|
-
},
|
|
537
|
-
],
|
|
538
|
-
},
|
|
539
|
-
result: 75,
|
|
540
|
-
},
|
|
541
|
-
not: {
|
|
542
|
-
input: { number: 3 },
|
|
543
|
-
remapper: { not: [{ prop: 'number' }, 4] },
|
|
544
|
-
result: true,
|
|
545
|
-
},
|
|
546
|
-
and: {
|
|
547
|
-
input: { foo: true },
|
|
548
|
-
remapper: { and: [{ prop: 'foo' }, true] },
|
|
549
|
-
result: true,
|
|
550
|
-
},
|
|
551
|
-
or: {
|
|
552
|
-
input: { foo: true },
|
|
553
|
-
remapper: { or: [{ prop: 'foo' }, false] },
|
|
554
|
-
result: true,
|
|
555
|
-
},
|
|
556
|
-
'null.strip': {
|
|
557
|
-
input: null,
|
|
558
|
-
remapper: {},
|
|
559
|
-
result: {},
|
|
560
|
-
skip: true,
|
|
561
|
-
},
|
|
562
|
-
'object.assign': {
|
|
563
|
-
input: {
|
|
564
|
-
title: 'Weekly fishing 21',
|
|
565
|
-
},
|
|
566
|
-
remapper: {
|
|
567
|
-
'object.assign': {
|
|
568
|
-
author: 'John Doe',
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
result: {
|
|
572
|
-
author: 'John Doe',
|
|
573
|
-
title: 'Weekly fishing 21',
|
|
574
|
-
},
|
|
575
|
-
},
|
|
576
|
-
'object.from': {
|
|
577
|
-
input: null,
|
|
578
|
-
remapper: {
|
|
579
|
-
'object.from': {
|
|
580
|
-
email: 'example@hotmail.com',
|
|
581
|
-
username: 'Chris Taub',
|
|
582
|
-
},
|
|
583
|
-
},
|
|
584
|
-
result: {
|
|
585
|
-
email: 'example@hotmail.com',
|
|
586
|
-
username: 'Chris Taub',
|
|
587
|
-
},
|
|
588
|
-
},
|
|
589
|
-
'object.omit': {
|
|
590
|
-
input: {
|
|
591
|
-
author: 'John Doe',
|
|
592
|
-
content: {
|
|
593
|
-
interview: '...',
|
|
594
|
-
introduction: 'This is the introduction for the new weekly fishing issue',
|
|
595
|
-
paragraph1: '...',
|
|
596
|
-
},
|
|
597
|
-
title: 'Weekly fishing 21',
|
|
598
|
-
},
|
|
599
|
-
remapper: {
|
|
600
|
-
'object.omit': ['author', ['content', 'interview']],
|
|
601
|
-
},
|
|
602
|
-
result: {
|
|
603
|
-
content: {
|
|
604
|
-
introduction: 'This is the introduction for the new weekly fishing issue',
|
|
605
|
-
paragraph1: '...',
|
|
606
|
-
},
|
|
607
|
-
title: 'Weekly fishing 21',
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
|
-
'object.compare': {
|
|
611
|
-
input: { name: 'Alice' },
|
|
612
|
-
remapper: {
|
|
613
|
-
'object.compare': [
|
|
614
|
-
{
|
|
615
|
-
'object.from': {
|
|
616
|
-
name: { prop: 'name' },
|
|
617
|
-
age: 25,
|
|
618
|
-
address: {
|
|
619
|
-
'object.from': {
|
|
620
|
-
city: 'Paris',
|
|
621
|
-
zip: 7500,
|
|
622
|
-
},
|
|
623
|
-
},
|
|
624
|
-
favoriteColors: {
|
|
625
|
-
'array.from': ['blue', 'green'],
|
|
626
|
-
},
|
|
627
|
-
},
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
'object.from': {
|
|
631
|
-
name: 'Alice',
|
|
632
|
-
age: 26,
|
|
633
|
-
address: {
|
|
634
|
-
'object.from': {
|
|
635
|
-
city: 'Lyon',
|
|
636
|
-
country: 'France',
|
|
637
|
-
},
|
|
638
|
-
},
|
|
639
|
-
favoriteColors: { 'array.from': ['red', 'green', 'blue'] },
|
|
640
|
-
},
|
|
641
|
-
},
|
|
642
|
-
],
|
|
643
|
-
},
|
|
644
|
-
result: [
|
|
645
|
-
{ path: ['age'], type: 'changed', from: 25, to: 26 },
|
|
646
|
-
{
|
|
647
|
-
path: ['favoriteColors'],
|
|
648
|
-
type: 'changed',
|
|
649
|
-
from: ['blue', 'green'],
|
|
650
|
-
to: ['red', 'green', 'blue'],
|
|
651
|
-
},
|
|
652
|
-
{ path: ['address', 'city'], type: 'changed', from: 'Paris', to: 'Lyon' },
|
|
653
|
-
{ path: ['address', 'zip'], type: 'removed', value: 7500 },
|
|
654
|
-
{ path: ['address', 'country'], type: 'added', value: 'France' },
|
|
655
|
-
],
|
|
656
|
-
},
|
|
657
|
-
'object.explode': {
|
|
658
|
-
input: {
|
|
659
|
-
ownerName: 'John',
|
|
660
|
-
country: 'USA',
|
|
661
|
-
pets: [
|
|
662
|
-
{ name: 'Milka' },
|
|
663
|
-
{ name: 'Sven', country: 'Sweden' },
|
|
664
|
-
{ name: 'Tom', likes: ['mice', 'fish'] },
|
|
665
|
-
{ name: 'Jerry', looks: { color: 'brown' } },
|
|
666
|
-
],
|
|
667
|
-
},
|
|
668
|
-
remapper: {
|
|
669
|
-
'object.explode': 'pets',
|
|
670
|
-
},
|
|
671
|
-
result: [
|
|
672
|
-
{ ownerName: 'John', name: 'Milka', country: 'USA' },
|
|
673
|
-
{ ownerName: 'John', name: 'Sven', country: 'Sweden' },
|
|
674
|
-
{ ownerName: 'John', name: 'Tom', country: 'USA', likes: ['mice', 'fish'] },
|
|
675
|
-
{ ownerName: 'John', name: 'Jerry', country: 'USA', looks: { color: 'brown' } },
|
|
676
|
-
],
|
|
677
|
-
},
|
|
678
|
-
'omit.history': {
|
|
679
|
-
input: null,
|
|
680
|
-
remapper: {},
|
|
681
|
-
result: {},
|
|
682
|
-
skip: true,
|
|
683
|
-
},
|
|
684
|
-
page: {
|
|
685
|
-
input: null,
|
|
686
|
-
remapper: {},
|
|
687
|
-
result: {},
|
|
688
|
-
skip: true,
|
|
689
|
-
},
|
|
690
|
-
prop: {
|
|
691
|
-
input: {
|
|
692
|
-
age: 52,
|
|
693
|
-
name: 'John',
|
|
694
|
-
},
|
|
695
|
-
remapper: {
|
|
696
|
-
prop: 'name',
|
|
697
|
-
},
|
|
698
|
-
result: 'John',
|
|
699
|
-
},
|
|
700
|
-
'random.choice': {
|
|
701
|
-
input: null,
|
|
702
|
-
remapper: {},
|
|
703
|
-
result: {},
|
|
704
|
-
skip: true,
|
|
705
|
-
},
|
|
706
|
-
'random.float': {
|
|
707
|
-
input: null,
|
|
708
|
-
remapper: {},
|
|
709
|
-
result: {},
|
|
710
|
-
skip: true,
|
|
711
|
-
},
|
|
712
|
-
'random.integer': {
|
|
713
|
-
input: null,
|
|
714
|
-
remapper: {},
|
|
715
|
-
result: {},
|
|
716
|
-
skip: true,
|
|
717
|
-
},
|
|
718
|
-
'random.string': {
|
|
719
|
-
input: null,
|
|
720
|
-
remapper: {},
|
|
721
|
-
result: {},
|
|
722
|
-
skip: true,
|
|
723
|
-
},
|
|
724
|
-
root: {
|
|
725
|
-
input: 'input',
|
|
726
|
-
remapper: { root: null },
|
|
727
|
-
result: 'input',
|
|
728
|
-
},
|
|
729
|
-
static: {
|
|
730
|
-
input: null,
|
|
731
|
-
remapper: {
|
|
732
|
-
static: 'Hello!',
|
|
733
|
-
},
|
|
734
|
-
result: 'Hello!',
|
|
735
|
-
},
|
|
736
|
-
step: {
|
|
737
|
-
input: null,
|
|
738
|
-
remapper: {},
|
|
739
|
-
result: {},
|
|
740
|
-
skip: true,
|
|
741
|
-
},
|
|
742
|
-
'tab.name': {
|
|
743
|
-
input: null,
|
|
744
|
-
remapper: {},
|
|
745
|
-
result: {},
|
|
746
|
-
skip: true,
|
|
747
|
-
},
|
|
748
|
-
'string.case': {
|
|
749
|
-
input: 'Patrick',
|
|
750
|
-
remapper: {
|
|
751
|
-
'string.case': 'upper',
|
|
752
|
-
},
|
|
753
|
-
result: 'PATRICK',
|
|
754
|
-
},
|
|
755
|
-
'string.startsWith': {
|
|
756
|
-
input: 'Random string here',
|
|
757
|
-
remapper: {
|
|
758
|
-
'string.startsWith': 'Random',
|
|
759
|
-
},
|
|
760
|
-
result: true,
|
|
761
|
-
},
|
|
762
|
-
'string.endsWith': {
|
|
763
|
-
input: 'Random string here',
|
|
764
|
-
remapper: {
|
|
765
|
-
'string.endsWith': {
|
|
766
|
-
substring: 'Here',
|
|
767
|
-
strict: false,
|
|
768
|
-
},
|
|
769
|
-
},
|
|
770
|
-
result: true,
|
|
771
|
-
},
|
|
772
|
-
slice: {
|
|
773
|
-
input: 'Laziness',
|
|
774
|
-
remapper: {
|
|
775
|
-
slice: [3, 6],
|
|
776
|
-
},
|
|
777
|
-
result: 'ine',
|
|
778
|
-
},
|
|
779
|
-
'string.format': {
|
|
780
|
-
input: {
|
|
781
|
-
lotteryPrize: '5000',
|
|
782
|
-
},
|
|
783
|
-
remapper: {
|
|
784
|
-
'string.format': {
|
|
785
|
-
template: 'You have won €{lotteryAmount} in the lottery!!',
|
|
786
|
-
values: {
|
|
787
|
-
lotteryAmount: {
|
|
788
|
-
prop: 'lotteryPrize',
|
|
789
|
-
},
|
|
790
|
-
},
|
|
791
|
-
},
|
|
792
|
-
},
|
|
793
|
-
result: 'You have won €5000 in the lottery!!',
|
|
794
|
-
},
|
|
795
|
-
'string.replace': {
|
|
796
|
-
input: 'Eindhoven is the best city in the Netherlands',
|
|
797
|
-
remapper: {
|
|
798
|
-
'string.replace': {
|
|
799
|
-
'(best*)\\w+': 'cleanest',
|
|
800
|
-
},
|
|
801
|
-
},
|
|
802
|
-
result: 'Eindhoven is the cleanest city in the Netherlands',
|
|
803
|
-
},
|
|
804
|
-
translate: {
|
|
805
|
-
input: null,
|
|
806
|
-
remapper: {},
|
|
807
|
-
result: {},
|
|
808
|
-
skip: true,
|
|
809
|
-
},
|
|
810
|
-
container: {
|
|
811
|
-
input: null,
|
|
812
|
-
remapper: {},
|
|
813
|
-
result: {},
|
|
814
|
-
skip: true,
|
|
815
|
-
},
|
|
816
|
-
'filter.from': {
|
|
817
|
-
input: { exclude: 'Peter' },
|
|
818
|
-
remapper: {
|
|
819
|
-
'filter.from': {
|
|
820
|
-
name: { type: 'String', comparator: 'ne', value: { prop: 'exclude' } },
|
|
821
|
-
age: { type: 'Number', comparator: 'lt', value: 10 },
|
|
822
|
-
height: { type: 'Number', comparator: 'le', value: 1.75 },
|
|
823
|
-
heightString: { type: 'Number', comparator: 'le', value: '1.75' },
|
|
824
|
-
birthday: { type: 'Date', comparator: 'ge', value: '2000-01-01' },
|
|
825
|
-
friendsSince: { type: 'Date', comparator: 'ge', value: '2014-01-01T00:00:00Z' },
|
|
826
|
-
job: { type: 'String', comparator: 'eq', value: null },
|
|
827
|
-
employed: { type: 'Boolean', comparator: 'eq', value: false },
|
|
828
|
-
id: { type: 'Guid', comparator: 'eq', value: '03a0a47b-e3a2-e311-9402-00155d104c24' },
|
|
829
|
-
undefined: { type: 'String', comparator: 'eq', value: undefined },
|
|
830
|
-
special: {
|
|
831
|
-
type: 'String',
|
|
832
|
-
comparator: 'eq',
|
|
833
|
-
value: 'Special character\'s "test" \\%&+?^/',
|
|
834
|
-
},
|
|
835
|
-
},
|
|
836
|
-
},
|
|
837
|
-
result: "name ne 'Peter' and age lt 10 and height le 1.75 and heightString le 1.75 and birthday ge 2000-01-01 and friendsSince ge 2014-01-01T00:00:00Z and job eq null and employed eq false and id eq 03a0a47b-e3a2-e311-9402-00155d104c24 and undefined eq null and special eq 'Special character''s \"test\" \\\\%&+?^/'",
|
|
838
|
-
},
|
|
839
|
-
'order.from': {
|
|
840
|
-
input: null,
|
|
841
|
-
remapper: {
|
|
842
|
-
'order.from': {
|
|
843
|
-
name: 'asc',
|
|
844
|
-
age: 'desc',
|
|
845
|
-
},
|
|
846
|
-
},
|
|
847
|
-
result: 'name asc,age desc',
|
|
848
|
-
},
|
|
849
|
-
'xml.parse': {
|
|
850
|
-
input: {
|
|
851
|
-
xml: `
|
|
852
|
-
<obj>
|
|
853
|
-
<foo>bar</foo>
|
|
854
|
-
<item foo="bar">
|
|
855
|
-
<item foo="bar">
|
|
856
|
-
<text>text</text>
|
|
857
|
-
</item>
|
|
858
|
-
</item>
|
|
859
|
-
<item bar="baz">
|
|
860
|
-
<item bar="baz">
|
|
861
|
-
<text>text 2</text>
|
|
862
|
-
</item>
|
|
863
|
-
</item>
|
|
864
|
-
<item>
|
|
865
|
-
<item foo="bar">
|
|
866
|
-
<item foo="bar">
|
|
867
|
-
<text>text</text>
|
|
868
|
-
</item>
|
|
869
|
-
</item>
|
|
870
|
-
<item bar="baz">
|
|
871
|
-
<item bar="baz">
|
|
872
|
-
<text>text 2</text>
|
|
873
|
-
</item>
|
|
874
|
-
</item>
|
|
875
|
-
</item>
|
|
876
|
-
</obj>
|
|
877
|
-
`,
|
|
878
|
-
},
|
|
879
|
-
remapper: { 'xml.parse': { prop: 'xml' } },
|
|
880
|
-
result: {
|
|
881
|
-
obj: {
|
|
882
|
-
foo: 'bar',
|
|
883
|
-
item: [
|
|
884
|
-
{
|
|
885
|
-
foo: 'bar',
|
|
886
|
-
item: { foo: 'bar', text: 'text' },
|
|
887
|
-
},
|
|
888
|
-
{
|
|
889
|
-
bar: 'baz',
|
|
890
|
-
item: { bar: 'baz', text: 'text 2' },
|
|
891
|
-
},
|
|
892
|
-
{
|
|
893
|
-
item: [
|
|
894
|
-
{
|
|
895
|
-
foo: 'bar',
|
|
896
|
-
item: { foo: 'bar', text: 'text' },
|
|
897
|
-
},
|
|
898
|
-
{
|
|
899
|
-
bar: 'baz',
|
|
900
|
-
item: { bar: 'baz', text: 'text 2' },
|
|
901
|
-
},
|
|
902
|
-
],
|
|
903
|
-
},
|
|
904
|
-
],
|
|
905
|
-
},
|
|
906
|
-
},
|
|
907
|
-
},
|
|
908
|
-
defined: {
|
|
909
|
-
input: [0, '', false, undefined, null],
|
|
910
|
-
remapper: {
|
|
911
|
-
'array.map': {
|
|
912
|
-
defined: { array: 'item' },
|
|
913
|
-
},
|
|
914
|
-
},
|
|
915
|
-
result: [true, true, true, false, false],
|
|
916
|
-
},
|
|
917
|
-
maths: {
|
|
918
|
-
input: { version: 0 },
|
|
919
|
-
remapper: {
|
|
920
|
-
maths: {
|
|
921
|
-
a: { prop: 'version' },
|
|
922
|
-
b: { static: 1 },
|
|
923
|
-
operation: 'add',
|
|
924
|
-
},
|
|
925
|
-
},
|
|
926
|
-
result: 1,
|
|
927
|
-
},
|
|
928
|
-
};
|
|
929
|
-
/**
|
|
930
|
-
* @param remapper The remapper example to use.
|
|
931
|
-
* @param options The options specifying how to display the example.
|
|
932
|
-
* @returns Example based on the input options.
|
|
933
|
-
*/
|
|
934
|
-
export function schemaExample(remapper, options) {
|
|
935
|
-
const { exclude = [], input = 'inline', result } = options ?? {};
|
|
936
|
-
let example = '';
|
|
937
|
-
if (!exclude.includes('input')) {
|
|
938
|
-
const spacing = input === 'pretty' && 2;
|
|
939
|
-
example += `Input:\n\n\`\`\`json\n${JSON.stringify(examples[remapper].input, null, spacing || undefined)}\n\`\`\`\n`;
|
|
940
|
-
}
|
|
941
|
-
if (!exclude.includes('remapper')) {
|
|
942
|
-
example += `\`\`\`yaml\n${stringify(examples[remapper].remapper)}\n\`\`\`\n`;
|
|
943
|
-
}
|
|
944
|
-
if (!exclude.includes('result')) {
|
|
945
|
-
const spacing = result === 'pretty' && 2;
|
|
946
|
-
example += `Result:\n\n\`\`\`json\n${JSON.stringify(examples[remapper].result, null, spacing || undefined)}\n\`\`\`\n`;
|
|
947
|
-
}
|
|
948
|
-
return example;
|
|
949
|
-
}
|
|
950
|
-
export function createExampleContext(url, lang, userInfo, history) {
|
|
951
|
-
return {
|
|
952
|
-
getMessage: ({ defaultMessage }) => new IntlMessageFormat(defaultMessage ?? [], lang, undefined),
|
|
953
|
-
getVariable: (name) => (name === 'MY_VARIABLE' ? 'variable value' : undefined),
|
|
954
|
-
url: String(url),
|
|
955
|
-
appUrl: `${url.protocol}//example-app.example-organization.${url.host}`,
|
|
956
|
-
context: {},
|
|
957
|
-
history: history ?? ['Default example value'],
|
|
958
|
-
appId: 0,
|
|
959
|
-
locale: 'en',
|
|
960
|
-
pageData: { default: 'Page data' },
|
|
961
|
-
appMemberInfo: {
|
|
962
|
-
sub: 'default-example-id',
|
|
963
|
-
email: 'default-app-member@example.com',
|
|
964
|
-
email_verified: true,
|
|
965
|
-
name: 'default-example-name',
|
|
966
|
-
demo: false,
|
|
967
|
-
role: 'Member',
|
|
968
|
-
zoneinfo: 'Europe/Amsterdam',
|
|
969
|
-
properties: {
|
|
970
|
-
completedExamples: [],
|
|
971
|
-
},
|
|
972
|
-
},
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
//# sourceMappingURL=examples.js.map
|