@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
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
import { schemaExample } from '../../examples.js';
|
|
2
|
-
export const dataRemappers = {
|
|
3
|
-
array: {
|
|
4
|
-
enum: ['index', 'length', 'item', 'prevItem', 'nextItem'],
|
|
5
|
-
description: `Get the current array.map’s index, length, the current item, previous item or next item.
|
|
6
|
-
|
|
7
|
-
Returns nothing when not in the context of \`array.map’s\`.
|
|
8
|
-
|
|
9
|
-
For example:
|
|
10
|
-
|
|
11
|
-
${schemaExample('array', { result: 'pretty' })}
|
|
12
|
-
`,
|
|
13
|
-
},
|
|
14
|
-
app: {
|
|
15
|
-
enum: ['id', 'locale', 'url'],
|
|
16
|
-
description: `Gives information about the current app. Using this remapper you can get access to the
|
|
17
|
-
following information:
|
|
18
|
-
|
|
19
|
-
- \`id\`: App ID
|
|
20
|
-
- \`locale\`: Current locale (user selected language) of the app
|
|
21
|
-
- \`url\`: Base URL of the app
|
|
22
|
-
|
|
23
|
-
Example:
|
|
24
|
-
|
|
25
|
-
${schemaExample('app.url', { result: 'pretty', exclude: ['input'] })}
|
|
26
|
-
`,
|
|
27
|
-
},
|
|
28
|
-
context: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
description: `Gets a property from custom context passed by blocks. This property is specific to each block. To
|
|
31
|
-
understand what the context of a certain block does, check the block’s description.
|
|
32
|
-
|
|
33
|
-
For this example, we will take the [\`table\`](/blocks/@appsemble/table/0.20.39) block. As of now,
|
|
34
|
-
this block provides two options for context: \`index\` and \`repeatedIndex\`. Whenever you click on an
|
|
35
|
-
item in the table, it gives the index of that table row in the associated action.
|
|
36
|
-
|
|
37
|
-
So with the following example:
|
|
38
|
-
|
|
39
|
-
\`\`\`yaml
|
|
40
|
-
type: table
|
|
41
|
-
version: 0.20.39
|
|
42
|
-
events:
|
|
43
|
-
listen:
|
|
44
|
-
data: contextData
|
|
45
|
-
parameters:
|
|
46
|
-
fields:
|
|
47
|
-
- label: Name
|
|
48
|
-
value: { prop: name }
|
|
49
|
-
onClick: clickName
|
|
50
|
-
- label: Age
|
|
51
|
-
value: { prop: age }
|
|
52
|
-
actions:
|
|
53
|
-
clickName:
|
|
54
|
-
remapBefore:
|
|
55
|
-
context: index
|
|
56
|
-
type: log
|
|
57
|
-
\`\`\`
|
|
58
|
-
|
|
59
|
-
Clicking on the first item would log \`0\`, the second item \`1\` and so on.
|
|
60
|
-
`,
|
|
61
|
-
},
|
|
62
|
-
history: {
|
|
63
|
-
type: 'integer',
|
|
64
|
-
description: `> **Note:** This remapper is explained more in depth in the [History](/docs/remappers/history) page
|
|
65
|
-
|
|
66
|
-
Gives the data at the history entry at the specified history index. The history at specified index
|
|
67
|
-
is the data that is passed to that action.
|
|
68
|
-
|
|
69
|
-
\`\`\`yaml
|
|
70
|
-
remapBefore:
|
|
71
|
-
object.from:
|
|
72
|
-
title: Most influential bands of all time
|
|
73
|
-
content: ...
|
|
74
|
-
type: noop # history 0
|
|
75
|
-
onSuccess:
|
|
76
|
-
type: resource.query # history 1
|
|
77
|
-
resource: people
|
|
78
|
-
onSuccess:
|
|
79
|
-
type: noop # history 2
|
|
80
|
-
onSuccess:
|
|
81
|
-
remapBefore:
|
|
82
|
-
history: 1
|
|
83
|
-
type: log # history 3
|
|
84
|
-
\`\`\`
|
|
85
|
-
|
|
86
|
-
Result:
|
|
87
|
-
|
|
88
|
-
\`\`\`json
|
|
89
|
-
{
|
|
90
|
-
"title": "Most influential bands of all time",
|
|
91
|
-
"content": ...
|
|
92
|
-
}
|
|
93
|
-
\`\`\`
|
|
94
|
-
`,
|
|
95
|
-
},
|
|
96
|
-
'tab.name': {
|
|
97
|
-
enum: [null],
|
|
98
|
-
description: `
|
|
99
|
-
|
|
100
|
-
Returns the name of the current tab in a \`tabs\` page.
|
|
101
|
-
|
|
102
|
-
\`\`\`yaml
|
|
103
|
-
name: Example Page A
|
|
104
|
-
type: tabs
|
|
105
|
-
tabs:
|
|
106
|
-
- name: Tab2
|
|
107
|
-
blocks:
|
|
108
|
-
- type: action-button
|
|
109
|
-
version: "0.27.12"
|
|
110
|
-
parameters:
|
|
111
|
-
icon: chevron-right
|
|
112
|
-
actions:
|
|
113
|
-
onClick:
|
|
114
|
-
type: log
|
|
115
|
-
remapBefore:
|
|
116
|
-
{ tab.name: null }
|
|
117
|
-
\`\`\`
|
|
118
|
-
`,
|
|
119
|
-
},
|
|
120
|
-
step: {
|
|
121
|
-
type: 'string',
|
|
122
|
-
description: `
|
|
123
|
-
|
|
124
|
-
While in a loop page, this remapper allows you to get properties from the data at the current index.
|
|
125
|
-
|
|
126
|
-
\`\`\`yaml
|
|
127
|
-
name: Survey
|
|
128
|
-
type: loop
|
|
129
|
-
actions:
|
|
130
|
-
onLoad:
|
|
131
|
-
type: resource.query
|
|
132
|
-
resource: questions
|
|
133
|
-
foreach:
|
|
134
|
-
blocks:
|
|
135
|
-
- type: detail-viewer
|
|
136
|
-
version: 0.20.39
|
|
137
|
-
parameters:
|
|
138
|
-
fields:
|
|
139
|
-
- label: { step: title }
|
|
140
|
-
\`\`\`
|
|
141
|
-
|
|
142
|
-
With this example, we load an array of questions that have the \`title\` property. What the \`step\`
|
|
143
|
-
remapper does in this case is show the title of the current question in the loop.
|
|
144
|
-
|
|
145
|
-
The result of this is a flow page where each page shows the question’s title.
|
|
146
|
-
|
|
147
|
-
`,
|
|
148
|
-
},
|
|
149
|
-
page: {
|
|
150
|
-
enum: ['data', 'url'],
|
|
151
|
-
description: `Gives actual information about the current page. This remapper gives access to the following
|
|
152
|
-
information:
|
|
153
|
-
|
|
154
|
-
- \`data\`: Current page data (FlowPage)
|
|
155
|
-
- \`url\`: Full URL of the current page
|
|
156
|
-
|
|
157
|
-
Example:
|
|
158
|
-
|
|
159
|
-
\`\`\`json
|
|
160
|
-
{
|
|
161
|
-
"data": {
|
|
162
|
-
"name": "Peter"
|
|
163
|
-
},
|
|
164
|
-
"url": "https://example-app.examplecompany.appsemble.app/en/example-page-a"
|
|
165
|
-
}
|
|
166
|
-
\`\`\`
|
|
167
|
-
|
|
168
|
-
The page data only works in the context of a flow page. Let’s say you have a
|
|
169
|
-
[“FlowPage”](/docs/reference/app#-flow-page-definition) type with multiple subpages. Whenever you
|
|
170
|
-
navigate to the next page it adds the data from that page to the flow page’s data. The page remapper
|
|
171
|
-
allows you to access this cumulative data.
|
|
172
|
-
|
|
173
|
-
The following page definition shows a page definition for a flow page where the user has to fill in
|
|
174
|
-
some user information. For each subpage the result of \`page: data\` is shown.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
\`\`\`yaml
|
|
178
|
-
name: PageDataFlow
|
|
179
|
-
type: flow
|
|
180
|
-
steps:
|
|
181
|
-
# page: data = {}
|
|
182
|
-
- blocks:
|
|
183
|
-
- type: form
|
|
184
|
-
version: 0.20.39
|
|
185
|
-
parameters:
|
|
186
|
-
fields:
|
|
187
|
-
- name: name
|
|
188
|
-
type: string
|
|
189
|
-
actions:
|
|
190
|
-
onSubmit:
|
|
191
|
-
type: flow.next
|
|
192
|
-
# page: data = { name: "Peter" }
|
|
193
|
-
- blocks:
|
|
194
|
-
- type: form
|
|
195
|
-
version: 0.20.39
|
|
196
|
-
parameters:
|
|
197
|
-
fields:
|
|
198
|
-
- name: age
|
|
199
|
-
type: string
|
|
200
|
-
actions:
|
|
201
|
-
onSubmit:
|
|
202
|
-
type: flow.next
|
|
203
|
-
# page: data = { name: "Peter", age: "47" }
|
|
204
|
-
- blocks:
|
|
205
|
-
- type: data-loader
|
|
206
|
-
version: 0.20.39
|
|
207
|
-
actions:
|
|
208
|
-
onLoad:
|
|
209
|
-
remapBefore:
|
|
210
|
-
page: data
|
|
211
|
-
type: log
|
|
212
|
-
\`\`\`
|
|
213
|
-
|
|
214
|
-
The result of the final page’s log would then be:
|
|
215
|
-
|
|
216
|
-
\`\`\`json
|
|
217
|
-
{
|
|
218
|
-
"name": "Peter",
|
|
219
|
-
"age": "47"
|
|
220
|
-
}
|
|
221
|
-
\`\`\`
|
|
222
|
-
|
|
223
|
-
`,
|
|
224
|
-
},
|
|
225
|
-
prop: {
|
|
226
|
-
anyOf: [
|
|
227
|
-
{ type: 'string' },
|
|
228
|
-
{ type: 'integer' },
|
|
229
|
-
{ type: 'array', minItems: 1, items: { anyOf: [{ type: 'string' }, { type: 'integer' }] } },
|
|
230
|
-
{
|
|
231
|
-
type: 'array',
|
|
232
|
-
minItems: 1,
|
|
233
|
-
items: { $ref: '#/components/schemas/ObjectRemapperDefinition' },
|
|
234
|
-
},
|
|
235
|
-
{ $ref: '#/components/schemas/ObjectRemapperDefinition' },
|
|
236
|
-
],
|
|
237
|
-
description: `Gets the chosen property from an object.
|
|
238
|
-
|
|
239
|
-
${schemaExample('prop')}
|
|
240
|
-
`,
|
|
241
|
-
},
|
|
242
|
-
len: {
|
|
243
|
-
enum: [null],
|
|
244
|
-
description: `
|
|
245
|
-
Returns the length of an input array or an input string, unlike { array: length } remapper this remapper does not require
|
|
246
|
-
an array to be in the context. This can be very useful when working with nested arrays.
|
|
247
|
-
${schemaExample('len')}
|
|
248
|
-
`,
|
|
249
|
-
},
|
|
250
|
-
root: {
|
|
251
|
-
enum: [null],
|
|
252
|
-
description: `Gets the input data as it was initially passed to the remapper function.
|
|
253
|
-
|
|
254
|
-
\`\`\`yaml
|
|
255
|
-
type: resource.query
|
|
256
|
-
resource: people
|
|
257
|
-
query:
|
|
258
|
-
object.from:
|
|
259
|
-
$filter: city eq 'Eindhoven'
|
|
260
|
-
onSuccess:
|
|
261
|
-
remapBefore:
|
|
262
|
-
object.from:
|
|
263
|
-
name: Residents of Eindhoven
|
|
264
|
-
people:
|
|
265
|
-
root: null
|
|
266
|
-
\`\`\`
|
|
267
|
-
|
|
268
|
-
Result:
|
|
269
|
-
|
|
270
|
-
\`\`\`json
|
|
271
|
-
{
|
|
272
|
-
"name": "Residents of Eindhoven",
|
|
273
|
-
"people": [
|
|
274
|
-
{
|
|
275
|
-
"name": ...,
|
|
276
|
-
"city": "Eindhoven"
|
|
277
|
-
},
|
|
278
|
-
...
|
|
279
|
-
]
|
|
280
|
-
}
|
|
281
|
-
\`\`\`
|
|
282
|
-
`,
|
|
283
|
-
},
|
|
284
|
-
static: {
|
|
285
|
-
description: `Create a static value
|
|
286
|
-
|
|
287
|
-
${schemaExample('static', { exclude: ['input'] })}
|
|
288
|
-
`,
|
|
289
|
-
},
|
|
290
|
-
translate: {
|
|
291
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
292
|
-
description: `> **Note:** This is explained much more in depth at [Translating](/docs/guides/translating)
|
|
293
|
-
|
|
294
|
-
This remapper allows you to easily add translations to your app. To make this remapper work, replace
|
|
295
|
-
any static text with \`translate: {name}\`. Then, in your app’s Translations page pick the language
|
|
296
|
-
you want to translate. You will see a list of names with input text below. Translations you manually
|
|
297
|
-
put in the app using the \`translate\` remapper are found under “Custom messages”.
|
|
298
|
-
|
|
299
|
-
After putting the translation in, any user that logs in with that language selected will see the
|
|
300
|
-
translated message.
|
|
301
|
-
|
|
302
|
-
Example:
|
|
303
|
-
|
|
304
|
-
\`\`\`yaml
|
|
305
|
-
type: detail-viewer
|
|
306
|
-
version: 0.20.39
|
|
307
|
-
parameters:
|
|
308
|
-
fields:
|
|
309
|
-
- label: { translate: weatherTitle }
|
|
310
|
-
value: { translate: weatherBody }
|
|
311
|
-
\`\`\`
|
|
312
|
-
|
|
313
|
-
`,
|
|
314
|
-
},
|
|
315
|
-
'app.member': {
|
|
316
|
-
enum: [
|
|
317
|
-
'sub',
|
|
318
|
-
'name',
|
|
319
|
-
'email',
|
|
320
|
-
'email_verified',
|
|
321
|
-
'picture',
|
|
322
|
-
'locale',
|
|
323
|
-
'zoneinfo',
|
|
324
|
-
'role',
|
|
325
|
-
'properties',
|
|
326
|
-
],
|
|
327
|
-
description: `
|
|
328
|
-
> **Note:** For this remapper to work, the app member that activated the remapper has to be logged in to
|
|
329
|
-
> the app
|
|
330
|
-
|
|
331
|
-
Provides some fields of app member information taken from the OpenID user info. These fields are:
|
|
332
|
-
|
|
333
|
-
- \`sub\`: The app member’s identifier
|
|
334
|
-
- \`name\`: The app member’s name
|
|
335
|
-
- \`email\`: The app member’s **primary** email address
|
|
336
|
-
- \`email_verified\`: Whether the app member’s primary email address is verified or not (\`boolean\`)
|
|
337
|
-
- \`picture\`: Full URL to the app member’s profile picture web address
|
|
338
|
-
- \`locale\`: The app member’s default language [\`BCP47\`](https://en.wikipedia.org/wiki/IETF_language_tag)
|
|
339
|
-
language tag (ex. \`en\`) (Broken)
|
|
340
|
-
- \`zoneinfo\`: The app member’s timezone
|
|
341
|
-
- \`role\`: The role of the app member in the app
|
|
342
|
-
- \`properties\`: Custom properties defined on the app member
|
|
343
|
-
|
|
344
|
-
Example:
|
|
345
|
-
|
|
346
|
-
\`\`\`json
|
|
347
|
-
{
|
|
348
|
-
"email": "example@hotmail.nl",
|
|
349
|
-
"email_verified": true,
|
|
350
|
-
"locale": "en",
|
|
351
|
-
"name": "Test User",
|
|
352
|
-
"picture": "https://www.gravatar.com/avatar/f46b82357ce29bcd1099915946cda468?s=128&d=mp",
|
|
353
|
-
"sub": "5c6270e2-ad31-414f-bcab-6752a2c4dcfd",
|
|
354
|
-
"properties": {}
|
|
355
|
-
}
|
|
356
|
-
\`\`\`
|
|
357
|
-
`,
|
|
358
|
-
},
|
|
359
|
-
container: {
|
|
360
|
-
type: 'string',
|
|
361
|
-
description: `
|
|
362
|
-
> **Note:** For this remapper to work, the application needs to define a companion container.
|
|
363
|
-
|
|
364
|
-
This remapper provides a short way to access a companion container for the purpose of making http requests.
|
|
365
|
-
When using the 'request' action, the url can be provided by using the 'container' remapper, and providing a string.
|
|
366
|
-
The string should contain the name of the companion container, followed by the API endpoint path.
|
|
367
|
-
|
|
368
|
-
Example:
|
|
369
|
-
\`\`\`yaml
|
|
370
|
-
type: request
|
|
371
|
-
url: { container: my-container/api/endpoint }
|
|
372
|
-
proxy: true
|
|
373
|
-
method: get
|
|
374
|
-
\`\`\`
|
|
375
|
-
`,
|
|
376
|
-
},
|
|
377
|
-
slice: {
|
|
378
|
-
description: `Extract characters from a string, or items from an array
|
|
379
|
-
accepts either an array of two numbers (indexes of starting point and ending point)
|
|
380
|
-
or a number (index of the starting point).
|
|
381
|
-
startIndex is inclusive whereas the endIndex is not.
|
|
382
|
-
${schemaExample('slice')}`,
|
|
383
|
-
oneOf: [
|
|
384
|
-
{
|
|
385
|
-
type: 'array',
|
|
386
|
-
items: {
|
|
387
|
-
type: 'number',
|
|
388
|
-
},
|
|
389
|
-
},
|
|
390
|
-
{ type: 'number' },
|
|
391
|
-
],
|
|
392
|
-
},
|
|
393
|
-
};
|
|
394
|
-
//# sourceMappingURL=data.js.map
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { schemaExample } from '../../examples.js';
|
|
2
|
-
export const dateRemappers = {
|
|
3
|
-
'date.add': {
|
|
4
|
-
type: 'string',
|
|
5
|
-
description: `Adds a specified date value to the provided date.
|
|
6
|
-
|
|
7
|
-
The value to add should be specified according to the
|
|
8
|
-
[parse-duration](https://www.npmjs.com/package/parse-duration) API. If you want to add a day to a
|
|
9
|
-
date for example, the syntax would be \`date.add: 1d\`.
|
|
10
|
-
|
|
11
|
-
Full list of supported unit types:
|
|
12
|
-
- nanoseconds (ns)
|
|
13
|
-
- microseconds (μs)
|
|
14
|
-
- milliseconds (ms)
|
|
15
|
-
- seconds (s, sec)
|
|
16
|
-
- minutes (m, min)
|
|
17
|
-
- hours (h, hr)
|
|
18
|
-
- days (d)
|
|
19
|
-
- weeks (w, wk)
|
|
20
|
-
- months
|
|
21
|
-
- years (y, yr)
|
|
22
|
-
|
|
23
|
-
For example:
|
|
24
|
-
|
|
25
|
-
${schemaExample('date.add')}
|
|
26
|
-
`,
|
|
27
|
-
},
|
|
28
|
-
'date.format': {
|
|
29
|
-
oneOf: [
|
|
30
|
-
{ enum: [null] },
|
|
31
|
-
{
|
|
32
|
-
type: 'string',
|
|
33
|
-
},
|
|
34
|
-
],
|
|
35
|
-
description: `Format a date according to the RFC3339 format.
|
|
36
|
-
|
|
37
|
-
Here is an example of a RFC3339 complicit date:
|
|
38
|
-
\`2002-10-02T15:00:00Z\`
|
|
39
|
-
|
|
40
|
-
In an app definition, it’s best to use this when you want to display a date in a specific format.
|
|
41
|
-
For example, if your app has a form with a Datepicker field the incoming data will be formatted
|
|
42
|
-
as a simple date format. If you want to format it to the RFC3339 format, you can use this remapper.
|
|
43
|
-
|
|
44
|
-
When you submit a form with a DateField, the internal output looks like the following. You can then format the date so that it uses the RFC3339 format.
|
|
45
|
-
|
|
46
|
-
${schemaExample('date.format')}
|
|
47
|
-
|
|
48
|
-
The remapper can also be used to format a date or timestamp using a custom format.
|
|
49
|
-
|
|
50
|
-
\`\`\`js
|
|
51
|
-
"2023-07-02T22:00:00.000Z"
|
|
52
|
-
\`\`\`
|
|
53
|
-
|
|
54
|
-
You can then format the date with any supported pattern, please refer to https://date-fns.org/docs/format for the supported patterns.
|
|
55
|
-
|
|
56
|
-
\`\`\`yaml
|
|
57
|
-
date.format: yyyy-MM-dd
|
|
58
|
-
\`\`\`
|
|
59
|
-
|
|
60
|
-
Result:
|
|
61
|
-
\`\`\`js
|
|
62
|
-
2023-07-03
|
|
63
|
-
\`\`\`
|
|
64
|
-
`,
|
|
65
|
-
},
|
|
66
|
-
'date.now': {
|
|
67
|
-
enum: [null],
|
|
68
|
-
description: `Returns the current date as a JavaScript Date object.
|
|
69
|
-
|
|
70
|
-
${schemaExample('date.now', { exclude: ['input'] })}
|
|
71
|
-
`,
|
|
72
|
-
},
|
|
73
|
-
'date.parse': {
|
|
74
|
-
type: 'string',
|
|
75
|
-
description: `Convert a string to a date using a given format.
|
|
76
|
-
|
|
77
|
-
For example:
|
|
78
|
-
|
|
79
|
-
${schemaExample('date.parse', { exclude: ['input'] })}
|
|
80
|
-
|
|
81
|
-
See [date-fns](https://date-fns.org/v2.29.3/docs/parse) for the supported formats.
|
|
82
|
-
|
|
83
|
-
Leaving the format empty will try to parse the date using the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
84
|
-
For example:
|
|
85
|
-
\`\`\`yaml
|
|
86
|
-
date.parse:
|
|
87
|
-
- static: 2014-02-11T11:30:30 # The date string to parse
|
|
88
|
-
- date.parse: '' # The given format to parse the date with
|
|
89
|
-
# => Tue Feb 11 2014 11:30:30
|
|
90
|
-
\`\`\`
|
|
91
|
-
`,
|
|
92
|
-
},
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=dates.js.map
|