@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,93 +0,0 @@
|
|
|
1
|
-
import { schemaExample } from '../../examples.js';
|
|
2
|
-
export const stringRemappers = {
|
|
3
|
-
'string.case': {
|
|
4
|
-
enum: ['lower', 'upper'],
|
|
5
|
-
description: `Convert a string to upper or lower case.
|
|
6
|
-
|
|
7
|
-
${schemaExample('string.case')}
|
|
8
|
-
`,
|
|
9
|
-
},
|
|
10
|
-
'string.startsWith': {
|
|
11
|
-
type: 'string',
|
|
12
|
-
description: `Check if the initial characters of the string matches with the input string,
|
|
13
|
-
this remapper is case-sensitive.
|
|
14
|
-
${schemaExample('string.startsWith')}
|
|
15
|
-
`,
|
|
16
|
-
},
|
|
17
|
-
'string.endsWith': {
|
|
18
|
-
oneOf: [
|
|
19
|
-
{
|
|
20
|
-
type: 'string',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
type: 'object',
|
|
24
|
-
description: 'Alternative way to define input to facilitate the case-insensitive matching',
|
|
25
|
-
required: ['substring'],
|
|
26
|
-
additionalProperties: false,
|
|
27
|
-
properties: {
|
|
28
|
-
substring: {
|
|
29
|
-
type: 'string',
|
|
30
|
-
},
|
|
31
|
-
strict: {
|
|
32
|
-
type: 'boolean',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
description: `Check if the last characters of the string matches with the input string,
|
|
38
|
-
this remapper is case-sensitive unless specified explicitly,
|
|
39
|
-
To make the remapper ignore casing of the input and passed string, use the following example
|
|
40
|
-
${schemaExample('string.endsWith')}
|
|
41
|
-
`,
|
|
42
|
-
},
|
|
43
|
-
'string.format': {
|
|
44
|
-
type: 'object',
|
|
45
|
-
additionalProperties: false,
|
|
46
|
-
properties: {
|
|
47
|
-
messageId: {
|
|
48
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
49
|
-
description: 'The message id pointing to the template string to format.',
|
|
50
|
-
},
|
|
51
|
-
template: {
|
|
52
|
-
type: 'string',
|
|
53
|
-
description: 'The template default string to format.',
|
|
54
|
-
},
|
|
55
|
-
values: {
|
|
56
|
-
description: 'A set of remappers to convert the input to usable values.',
|
|
57
|
-
additionalProperties: {
|
|
58
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
description: `Format a string using remapped input variables.
|
|
63
|
-
Useful for replacing static text with generated values.
|
|
64
|
-
|
|
65
|
-
${schemaExample('string.format')}
|
|
66
|
-
|
|
67
|
-
> **Tip:** Considering this can be inserted anywhere a remapper is accepted. You can also use this
|
|
68
|
-
> to choose specific URL’s more accurately.
|
|
69
|
-
|
|
70
|
-
`,
|
|
71
|
-
},
|
|
72
|
-
'string.replace': {
|
|
73
|
-
type: 'object',
|
|
74
|
-
minProperties: 1,
|
|
75
|
-
maxProperties: 1,
|
|
76
|
-
additionalProperties: {
|
|
77
|
-
type: 'string',
|
|
78
|
-
},
|
|
79
|
-
description: `
|
|
80
|
-
Uses RegEx to find a value in a string and replace it with a given value.
|
|
81
|
-
|
|
82
|
-
${schemaExample('string.replace')}
|
|
83
|
-
`,
|
|
84
|
-
},
|
|
85
|
-
'string.contains': {
|
|
86
|
-
type: 'string',
|
|
87
|
-
description: `
|
|
88
|
-
Checks if the provided string is a substring of the input string.
|
|
89
|
-
${schemaExample('string.contains')}
|
|
90
|
-
`,
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=strings.js.map
|
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { schemaExample } from '../../examples.js';
|
|
2
|
-
export const unsortedRemappers = {
|
|
3
|
-
ics: {
|
|
4
|
-
type: 'object',
|
|
5
|
-
description: `Create a calendar event. This event can be downloaded as an \`.ics\` file and
|
|
6
|
-
uploaded to your agenda using the [download](../reference/action#download) action.
|
|
7
|
-
|
|
8
|
-
For example, the following input:
|
|
9
|
-
\`\`\`yaml
|
|
10
|
-
ics:
|
|
11
|
-
coordinates
|
|
12
|
-
object.from:
|
|
13
|
-
latitude: 38.897700545442646
|
|
14
|
-
longitude: -77.03655660152435
|
|
15
|
-
description: "Sprint planning meeting"
|
|
16
|
-
duration: 1d
|
|
17
|
-
end: 2023-07-19
|
|
18
|
-
location: The Oval Office.
|
|
19
|
-
start: 2023-07-18
|
|
20
|
-
title: Important Meeting
|
|
21
|
-
url: https://google.nl
|
|
22
|
-
\`\`\`
|
|
23
|
-
|
|
24
|
-
Creates the following ICS-formatted object:
|
|
25
|
-
\`\`\`
|
|
26
|
-
BEGIN:VCALENDAR
|
|
27
|
-
VERSION:2.0
|
|
28
|
-
CALSCALE:GREGORIAN
|
|
29
|
-
PRODID:http://remappers.appsemble.localhost:9999
|
|
30
|
-
METHOD:PUBLISH
|
|
31
|
-
X-PUBLISHED-TTL:PT1H
|
|
32
|
-
BEGIN:VEVENT
|
|
33
|
-
UID:b8TsbczhfpIxPM-3lNHQz
|
|
34
|
-
SUMMARY:Important Meeting
|
|
35
|
-
DTSTAMP:20230703T102029Z
|
|
36
|
-
DTSTART:20230717T220000Z
|
|
37
|
-
DTEND:20230718T220000Z
|
|
38
|
-
DESCRIPTION:Sprint planning meeting
|
|
39
|
-
URL:https://google.nl
|
|
40
|
-
GEO:38.897700545442646;-77.03655123710632
|
|
41
|
-
LOCATION:The Oval Office.
|
|
42
|
-
END:VEVENT
|
|
43
|
-
END:VCALENDAR
|
|
44
|
-
\`\`\`
|
|
45
|
-
`,
|
|
46
|
-
additionalProperties: false,
|
|
47
|
-
required: ['start', 'title'],
|
|
48
|
-
properties: {
|
|
49
|
-
start: {
|
|
50
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
51
|
-
description: 'The start of the icalendar event.',
|
|
52
|
-
},
|
|
53
|
-
end: {
|
|
54
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
55
|
-
description: 'The end of the icalendar event.',
|
|
56
|
-
},
|
|
57
|
-
duration: {
|
|
58
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
59
|
-
description: 'The duration of the event.',
|
|
60
|
-
example: '1w 3d 10h 30m',
|
|
61
|
-
},
|
|
62
|
-
title: {
|
|
63
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
64
|
-
description: 'The title of the event.',
|
|
65
|
-
},
|
|
66
|
-
description: {
|
|
67
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
68
|
-
description: 'An optional description of the event.',
|
|
69
|
-
},
|
|
70
|
-
url: {
|
|
71
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
72
|
-
description: 'An optional link to attach to the event.',
|
|
73
|
-
},
|
|
74
|
-
location: {
|
|
75
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
76
|
-
description: 'An optional location description to attach to the event.',
|
|
77
|
-
},
|
|
78
|
-
coordinates: {
|
|
79
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
80
|
-
description: `An optional geolocation description to attach to the event.
|
|
81
|
-
|
|
82
|
-
This must be an object with the properties \`lat\` or \`latitude\`, and \`lon\`, \`lng\` or \`longitude\`.`,
|
|
83
|
-
},
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
'null.strip': {
|
|
87
|
-
description: `Strip all null, undefined, and empty array values from an object or array.
|
|
88
|
-
For example, with the following input value:
|
|
89
|
-
\`\`\`json
|
|
90
|
-
[0, 4, null, null, "Peter", 0.4234, null]
|
|
91
|
-
\`\`\`
|
|
92
|
-
\`\`\`yaml
|
|
93
|
-
null.strip: null
|
|
94
|
-
\`\`\`
|
|
95
|
-
|
|
96
|
-
The null values will be removed, leaving a dense array:
|
|
97
|
-
\`\`\`json
|
|
98
|
-
[0, 4, "Peter", 0.4234]
|
|
99
|
-
\`\`\`
|
|
100
|
-
|
|
101
|
-
Instead of giving it \`null\` as option, you can also provide a \`depth\` property to specify how
|
|
102
|
-
deep to recurse into the object or array to remove null values.
|
|
103
|
-
|
|
104
|
-
For example, with the following input:
|
|
105
|
-
\`\`\`json
|
|
106
|
-
{
|
|
107
|
-
0: [0, null, "Peter"],
|
|
108
|
-
1: {
|
|
109
|
-
"array1": [4, null, 0.4234, null]
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
\`\`\`
|
|
113
|
-
|
|
114
|
-
You can specify to which degree of depth you want the null values to be removed.
|
|
115
|
-
With this remapper definition:
|
|
116
|
-
\`\`\`yaml
|
|
117
|
-
null.strip:
|
|
118
|
-
depth: 2
|
|
119
|
-
\`\`\`
|
|
120
|
-
|
|
121
|
-
It will only check two objects in for any null values. That means only the first array within the
|
|
122
|
-
object will be checked. The result looks like this:
|
|
123
|
-
\`\`\`json
|
|
124
|
-
{
|
|
125
|
-
0: [0, "Peter"],
|
|
126
|
-
1: {
|
|
127
|
-
"array1": [4, null, 0.4234, null]
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
\`\`\`
|
|
131
|
-
`,
|
|
132
|
-
anyOf: [
|
|
133
|
-
{ enum: [null] },
|
|
134
|
-
{
|
|
135
|
-
type: 'object',
|
|
136
|
-
required: ['depth'],
|
|
137
|
-
additionalProperties: false,
|
|
138
|
-
description: 'Options for the null.strip remapper.',
|
|
139
|
-
properties: {
|
|
140
|
-
depth: {
|
|
141
|
-
type: 'integer',
|
|
142
|
-
minimum: 1,
|
|
143
|
-
description: 'How deep to recurse into objects and arrays to remove null values.',
|
|
144
|
-
},
|
|
145
|
-
},
|
|
146
|
-
},
|
|
147
|
-
],
|
|
148
|
-
},
|
|
149
|
-
type: {
|
|
150
|
-
enum: [null],
|
|
151
|
-
description: `Returns the type of the input object
|
|
152
|
-
|
|
153
|
-
For example, with the following input value:
|
|
154
|
-
\`\`\`json
|
|
155
|
-
[0, 5, 7, 8]
|
|
156
|
-
\`\`\`
|
|
157
|
-
\`\`\`yaml
|
|
158
|
-
type: null
|
|
159
|
-
\`\`\`
|
|
160
|
-
|
|
161
|
-
The result will be:
|
|
162
|
-
\`\`\`json
|
|
163
|
-
"array"
|
|
164
|
-
\`\`\`
|
|
165
|
-
`,
|
|
166
|
-
},
|
|
167
|
-
log: {
|
|
168
|
-
enum: ['info', 'warn', 'error'],
|
|
169
|
-
description: `Logs in the browser's console and returns the incoming data and the remapper function's context.
|
|
170
|
-
|
|
171
|
-
The context contains relevant info about the app, like the URL and locale, but also contains the
|
|
172
|
-
remapper’s history.
|
|
173
|
-
|
|
174
|
-
The options represent the level of logging that will show in the console.
|
|
175
|
-
|
|
176
|
-
- \`input\`: The input data going into this remapper,
|
|
177
|
-
- \`context\`:
|
|
178
|
-
- \`root\`: The input data going into this remapper,
|
|
179
|
-
- \`appId\`: ID of the application,
|
|
180
|
-
- \`url\`: Absolute URL of the page where the remapper was fired,
|
|
181
|
-
- \`appUrl\`: Base URL of the application,
|
|
182
|
-
- \`pageData\`: Current page data of a FlowPage (See [page remapper](./data#page)),
|
|
183
|
-
- \`userInfo\`: User's information if they are logged in (See [user remapper](./data#user)),
|
|
184
|
-
- \`context\`: Internal context
|
|
185
|
-
- \`history\`: Complete list of this remapper’s history (See [history remapper](./history))
|
|
186
|
-
- \`locale\`: The user’s locale,
|
|
187
|
-
- \`stepRef\`: In a loop page, gives the properties from the loop’s current data index (See [step remapper](./data#step))
|
|
188
|
-
|
|
189
|
-
For example:
|
|
190
|
-
|
|
191
|
-
\`\`\`json
|
|
192
|
-
{
|
|
193
|
-
"input": {
|
|
194
|
-
"name": "Peter",
|
|
195
|
-
"age": 49,
|
|
196
|
-
"birthday": "07-08-2023"
|
|
197
|
-
},
|
|
198
|
-
"context": {
|
|
199
|
-
"root": {
|
|
200
|
-
"name": "Peter",
|
|
201
|
-
"age": 49,
|
|
202
|
-
"birthday": "07-08-2023"
|
|
203
|
-
},
|
|
204
|
-
"appId": 49,
|
|
205
|
-
"url": "http://remappers.appsemble.localhost:9999/en/other",
|
|
206
|
-
"appUrl": "http://remappers.appsemble.localhost:9999",
|
|
207
|
-
"pageData": {
|
|
208
|
-
"triedAppsemble": false
|
|
209
|
-
},
|
|
210
|
-
"userInfo": {
|
|
211
|
-
"email": "example@hotmail.com",
|
|
212
|
-
"email_verified": true,
|
|
213
|
-
"name": "Example User 1",
|
|
214
|
-
"picture": "https://www.gravatar.com/avatar/f46b82357ce29bcd1099915946cda468?s=128&d=mp",
|
|
215
|
-
"sub": "0000-0000-0000-0000",
|
|
216
|
-
"locale": "en",
|
|
217
|
-
"zoneinfo": "Europe/Amsterdam"
|
|
218
|
-
},
|
|
219
|
-
"context": {},
|
|
220
|
-
"history": [
|
|
221
|
-
[
|
|
222
|
-
0,
|
|
223
|
-
4,
|
|
224
|
-
null,
|
|
225
|
-
null,
|
|
226
|
-
"Peter",
|
|
227
|
-
0.4234,
|
|
228
|
-
null
|
|
229
|
-
],
|
|
230
|
-
{
|
|
231
|
-
"name": "Peter",
|
|
232
|
-
"age": 49
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
"name": "Peter",
|
|
236
|
-
"age": 49,
|
|
237
|
-
"birthday": "07-08-2023"
|
|
238
|
-
}
|
|
239
|
-
],
|
|
240
|
-
"locale": "en",
|
|
241
|
-
"stepRef": {
|
|
242
|
-
"current": {
|
|
243
|
-
"answerType": "multiple choice",
|
|
244
|
-
"question": "How much do you enjoy working here?"
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
\`\`\`
|
|
250
|
-
`,
|
|
251
|
-
},
|
|
252
|
-
'xml.parse': {
|
|
253
|
-
description: `This can be used to parse an xml string into an object
|
|
254
|
-
|
|
255
|
-
For example:
|
|
256
|
-
|
|
257
|
-
${schemaExample('xml.parse', { result: 'pretty' })}`,
|
|
258
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
259
|
-
},
|
|
260
|
-
maths: {
|
|
261
|
-
description: `This can be used to perform a mathematical operation on two numbers
|
|
262
|
-
|
|
263
|
-
For example:
|
|
264
|
-
|
|
265
|
-
${schemaExample('maths', { result: 'pretty' })}`,
|
|
266
|
-
additionalProperties: false,
|
|
267
|
-
properties: {
|
|
268
|
-
a: { $ref: '#/components/schemas/RemapperDefinition' },
|
|
269
|
-
b: { $ref: '#/components/schemas/RemapperDefinition' },
|
|
270
|
-
operation: {
|
|
271
|
-
enum: ['add', 'divide', 'mod', 'multiply', 'subtract'],
|
|
272
|
-
},
|
|
273
|
-
},
|
|
274
|
-
},
|
|
275
|
-
};
|
|
276
|
-
//# sourceMappingURL=unsorted.js.map
|
package/remap.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { type AppMemberInfo, type Remapper, type ValueFromProcess } from '@appsemble/types';
|
|
2
|
-
import { type IntlMessageFormat } from 'intl-messageformat';
|
|
3
|
-
export interface IntlMessage {
|
|
4
|
-
id?: string;
|
|
5
|
-
defaultMessage?: string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Get a message format instance based on a message id and default message.
|
|
9
|
-
*
|
|
10
|
-
* @param msg The message to get the message format instance for.
|
|
11
|
-
* @returns A message format instance.
|
|
12
|
-
*/
|
|
13
|
-
export type MessageGetter = (msg: IntlMessage) => IntlMessageFormat;
|
|
14
|
-
export type AppConfigEntryGetter = (name: string) => ValueFromProcess;
|
|
15
|
-
export interface RemapperContext {
|
|
16
|
-
/**
|
|
17
|
-
* The id of the app whose context the remapper is run in.
|
|
18
|
-
*/
|
|
19
|
-
appId: number;
|
|
20
|
-
/**
|
|
21
|
-
* The current URL.
|
|
22
|
-
*/
|
|
23
|
-
url: string;
|
|
24
|
-
/**
|
|
25
|
-
* The base URL of the app.
|
|
26
|
-
*/
|
|
27
|
-
appUrl: string;
|
|
28
|
-
/**
|
|
29
|
-
* @see MessageGetter
|
|
30
|
-
*/
|
|
31
|
-
getMessage: MessageGetter;
|
|
32
|
-
/**
|
|
33
|
-
* @see VariableGetter
|
|
34
|
-
*/
|
|
35
|
-
getVariable: AppConfigEntryGetter;
|
|
36
|
-
/**
|
|
37
|
-
* The history stack containing the states before an action was called.
|
|
38
|
-
*/
|
|
39
|
-
history?: unknown[];
|
|
40
|
-
/**
|
|
41
|
-
* The current locale of the app.
|
|
42
|
-
*/
|
|
43
|
-
locale: string;
|
|
44
|
-
/**
|
|
45
|
-
* Custom data that is available in the page.
|
|
46
|
-
*/
|
|
47
|
-
pageData?: unknown;
|
|
48
|
-
/**
|
|
49
|
-
* The OpenID compatible userinfo object for the current app member.
|
|
50
|
-
*/
|
|
51
|
-
appMemberInfo: AppMemberInfo;
|
|
52
|
-
/**
|
|
53
|
-
* A custom context passed to the remap function.
|
|
54
|
-
*/
|
|
55
|
-
context: Record<string, any>;
|
|
56
|
-
}
|
|
57
|
-
interface InternalContext extends RemapperContext {
|
|
58
|
-
root?: unknown;
|
|
59
|
-
array?: {
|
|
60
|
-
index: number;
|
|
61
|
-
length: number;
|
|
62
|
-
item: unknown;
|
|
63
|
-
prevItem: unknown;
|
|
64
|
-
nextItem: unknown;
|
|
65
|
-
};
|
|
66
|
-
stepRef?: {
|
|
67
|
-
current: Record<string, any>;
|
|
68
|
-
};
|
|
69
|
-
tabRef?: {
|
|
70
|
-
current: Record<string, any>;
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
export declare function remap(remapper: Remapper, input: unknown, context: InternalContext | RemapperContext): unknown;
|
|
74
|
-
export {};
|