@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,36 +0,0 @@
|
|
|
1
|
-
export const SubPage = {
|
|
2
|
-
type: 'object',
|
|
3
|
-
description: 'This describes what a sub page will look like in the app.',
|
|
4
|
-
required: ['blocks'],
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
properties: {
|
|
7
|
-
name: {
|
|
8
|
-
$ref: '#/components/schemas/RemapperDefinition',
|
|
9
|
-
description: 'The name of the sub page.',
|
|
10
|
-
},
|
|
11
|
-
roles: {
|
|
12
|
-
type: 'array',
|
|
13
|
-
description: `The list of roles that are allowed to view this page.
|
|
14
|
-
|
|
15
|
-
If the user doesn’t have any of the roles in the list the page will be unavailable to them. An empty
|
|
16
|
-
list can be used to specify that users need to log in but do not need a specific role.
|
|
17
|
-
|
|
18
|
-
Users trying to visit a page without having the correct roles will be redirected to the first page
|
|
19
|
-
that they are allowed to view. If there aren’t any accessible pages, the user will be logged out and
|
|
20
|
-
instructed to contact the app owner to get permissions.
|
|
21
|
-
`,
|
|
22
|
-
items: {
|
|
23
|
-
type: 'string',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
blocks: {
|
|
27
|
-
type: 'array',
|
|
28
|
-
minItems: 1,
|
|
29
|
-
description: 'The blocks that make up a page.',
|
|
30
|
-
items: {
|
|
31
|
-
$ref: '#/components/schemas/BlockDefinition',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=SubPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TabsPageDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BasePageDefinition } from './BasePageDefinition.js';
|
|
2
|
-
import { extendJSONSchema } from './utils.js';
|
|
3
|
-
export const TabsPageDefinition = extendJSONSchema(BasePageDefinition, {
|
|
4
|
-
type: 'object',
|
|
5
|
-
description: 'Shows a set of subpages as tabs at the top of the page.',
|
|
6
|
-
oneOf: [
|
|
7
|
-
{
|
|
8
|
-
required: ['type', 'tabs'],
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
required: ['type', 'definition'],
|
|
12
|
-
},
|
|
13
|
-
],
|
|
14
|
-
additionalProperties: true,
|
|
15
|
-
properties: {
|
|
16
|
-
type: {
|
|
17
|
-
enum: ['tabs'],
|
|
18
|
-
},
|
|
19
|
-
tabs: {
|
|
20
|
-
type: 'array',
|
|
21
|
-
minItems: 1,
|
|
22
|
-
description: 'Each of the available tabs for the tabs page.',
|
|
23
|
-
items: {
|
|
24
|
-
$ref: '#/components/schemas/SubPage',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
definition: {
|
|
28
|
-
type: 'object',
|
|
29
|
-
additionalProperties: false,
|
|
30
|
-
description: 'Generate tabs dynamically',
|
|
31
|
-
required: ['events', 'foreach'],
|
|
32
|
-
properties: {
|
|
33
|
-
events: {
|
|
34
|
-
$ref: '#/components/schemas/EventsDefinition',
|
|
35
|
-
},
|
|
36
|
-
foreach: {
|
|
37
|
-
$ref: '#/components/schemas/SubPage',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
actions: {
|
|
42
|
-
$ref: '#/components/schemas/PageActionsDefinition',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=TabsPageDefinition.js.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { baseTheme, hexColor } from '../../../constants/index.js';
|
|
2
|
-
export const Theme = {
|
|
3
|
-
type: 'object',
|
|
4
|
-
description: 'A generic theme definition.',
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
minProperties: 1,
|
|
7
|
-
properties: {
|
|
8
|
-
themeColor: {
|
|
9
|
-
type: 'string',
|
|
10
|
-
pattern: hexColor.source,
|
|
11
|
-
default: baseTheme.themeColor,
|
|
12
|
-
description: `The generic theme color of the app.
|
|
13
|
-
|
|
14
|
-
This is used for example in the URL bar on Android.
|
|
15
|
-
`,
|
|
16
|
-
},
|
|
17
|
-
splashColor: {
|
|
18
|
-
type: 'string',
|
|
19
|
-
pattern: hexColor.source,
|
|
20
|
-
default: baseTheme.splashColor,
|
|
21
|
-
description: `The background color of the PWA splash screen.
|
|
22
|
-
|
|
23
|
-
This defaults to the theme color.
|
|
24
|
-
`,
|
|
25
|
-
},
|
|
26
|
-
primaryColor: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
pattern: hexColor.source,
|
|
29
|
-
default: baseTheme.primaryColor,
|
|
30
|
-
description: `The primary color used within the app.
|
|
31
|
-
|
|
32
|
-
This is used in various elements like the navbar.
|
|
33
|
-
`,
|
|
34
|
-
},
|
|
35
|
-
linkColor: {
|
|
36
|
-
type: 'string',
|
|
37
|
-
pattern: hexColor.source,
|
|
38
|
-
default: baseTheme.linkColor,
|
|
39
|
-
description: 'The color used for links.',
|
|
40
|
-
},
|
|
41
|
-
infoColor: {
|
|
42
|
-
type: 'string',
|
|
43
|
-
pattern: hexColor.source,
|
|
44
|
-
default: baseTheme.infoColor,
|
|
45
|
-
description: 'The color used for informational messages.',
|
|
46
|
-
},
|
|
47
|
-
successColor: {
|
|
48
|
-
type: 'string',
|
|
49
|
-
pattern: hexColor.source,
|
|
50
|
-
default: baseTheme.successColor,
|
|
51
|
-
description: 'The color used for successful actions.',
|
|
52
|
-
},
|
|
53
|
-
warningColor: {
|
|
54
|
-
type: 'string',
|
|
55
|
-
pattern: hexColor.source,
|
|
56
|
-
default: baseTheme.warningColor,
|
|
57
|
-
description: 'The color used for warning messages.',
|
|
58
|
-
},
|
|
59
|
-
dangerColor: {
|
|
60
|
-
type: 'string',
|
|
61
|
-
pattern: hexColor.source,
|
|
62
|
-
default: baseTheme.dangerColor,
|
|
63
|
-
description: 'The color used for error messages.',
|
|
64
|
-
},
|
|
65
|
-
tileLayer: {
|
|
66
|
-
type: 'string',
|
|
67
|
-
format: 'uri',
|
|
68
|
-
default: baseTheme.tileLayer,
|
|
69
|
-
description: 'The tileLayer to use for Leaflet maps.',
|
|
70
|
-
},
|
|
71
|
-
font: {
|
|
72
|
-
description: 'The font to use in the app.',
|
|
73
|
-
anyOf: [
|
|
74
|
-
{ $ref: '#/components/schemas/CustomFontDefinition' },
|
|
75
|
-
{ $ref: '#/components/schemas/GoogleFontDefinition' },
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
},
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=Theme.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ThrowActionDefinition: import("openapi-types").OpenAPIV3.SchemaObject;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BaseActionDefinition } from './BaseActionDefinition.js';
|
|
2
|
-
import { extendJSONSchema } from './utils.js';
|
|
3
|
-
export const ThrowActionDefinition = extendJSONSchema(BaseActionDefinition, {
|
|
4
|
-
type: 'object',
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
required: ['type'],
|
|
7
|
-
properties: {
|
|
8
|
-
type: {
|
|
9
|
-
enum: ['throw'],
|
|
10
|
-
description: `This action throws a new exception based on the data that is passed through.
|
|
11
|
-
|
|
12
|
-
This can be used to create a custom error that ends up in the error action handler.
|
|
13
|
-
`,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=ThrowActionDefinition.js.map
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export const WebhookDefinition = {
|
|
2
|
-
type: 'object',
|
|
3
|
-
required: ['schema', 'action'],
|
|
4
|
-
description: 'A webhook definition defines app specific callable endpoints that Appsemble can handle.',
|
|
5
|
-
additionalProperties: false,
|
|
6
|
-
properties: {
|
|
7
|
-
schema: {
|
|
8
|
-
$ref: '#/components/schemas/JSONSchemaRoot',
|
|
9
|
-
description: 'JSON schema definition of the payload.',
|
|
10
|
-
},
|
|
11
|
-
action: {
|
|
12
|
-
description: 'The action to run when the webhook is triggered.',
|
|
13
|
-
$ref: '#/components/schemas/ActionDefinition',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=WebhookDefinition.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type OpenAPIV3 } from 'openapi-types';
|
|
2
|
-
/**
|
|
3
|
-
* Extend a JSON schema by copying its properties.
|
|
4
|
-
*
|
|
5
|
-
* This creates a new schema based on the input schema, where `required` and `properties` are
|
|
6
|
-
* inherited from the `base` schema.
|
|
7
|
-
*
|
|
8
|
-
* @param base The base schema whose properties to inherit.
|
|
9
|
-
* @param schema The schema overriding the base schema.
|
|
10
|
-
* @param omit Properties to omit from the base schema.
|
|
11
|
-
* @returns The schema which extends the base schema.
|
|
12
|
-
*/
|
|
13
|
-
export declare function extendJSONSchema(base: OpenAPIV3.SchemaObject, schema: OpenAPIV3.SchemaObject, omit?: string[]): OpenAPIV3.SchemaObject;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { has } from '../../../has.js';
|
|
2
|
-
/**
|
|
3
|
-
* Extend a JSON schema by copying its properties.
|
|
4
|
-
*
|
|
5
|
-
* This creates a new schema based on the input schema, where `required` and `properties` are
|
|
6
|
-
* inherited from the `base` schema.
|
|
7
|
-
*
|
|
8
|
-
* @param base The base schema whose properties to inherit.
|
|
9
|
-
* @param schema The schema overriding the base schema.
|
|
10
|
-
* @param omit Properties to omit from the base schema.
|
|
11
|
-
* @returns The schema which extends the base schema.
|
|
12
|
-
*/
|
|
13
|
-
export function extendJSONSchema(base, schema, omit = []) {
|
|
14
|
-
const result = { ...schema };
|
|
15
|
-
const required = Array.isArray(schema.required) ? [...schema.required] : [];
|
|
16
|
-
if (Array.isArray(base.required)) {
|
|
17
|
-
for (const name of base.required) {
|
|
18
|
-
if (!required.includes(name) && !omit.includes(name)) {
|
|
19
|
-
required.push(name);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (required.length) {
|
|
24
|
-
result.required = required;
|
|
25
|
-
}
|
|
26
|
-
result.properties = { ...schema.properties };
|
|
27
|
-
for (const [name, property] of Object.entries(base.properties ?? {})) {
|
|
28
|
-
if (!omit.includes(name) && !has(result.properties, name)) {
|
|
29
|
-
result.properties[name] = property;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=utils.js.map
|
package/appMembers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function assignAppMemberProperties(properties: any, formData: FormData): void;
|
package/appMembers.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export function assignAppMemberProperties(properties, formData) {
|
|
2
|
-
if (properties && typeof properties === 'object' && !Array.isArray(properties)) {
|
|
3
|
-
formData.append('properties', JSON.stringify(Object.fromEntries(Object.entries(properties).map(([key, value]) => [
|
|
4
|
-
key,
|
|
5
|
-
typeof value === 'string' ? value : JSON.stringify(value),
|
|
6
|
-
]))));
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=appMembers.js.map
|
package/blockUtils.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { type AppDefinition, type BlockDefinition } from '@appsemble/types';
|
|
2
|
-
export type IdentifiableBlock = Pick<BlockDefinition, 'type' | 'version'>;
|
|
3
|
-
/**
|
|
4
|
-
* Normalize a block name by prefixing it with `@appsemble` if necessary.
|
|
5
|
-
*
|
|
6
|
-
* @param name The input block name.
|
|
7
|
-
* @returns The normalized block name.
|
|
8
|
-
*/
|
|
9
|
-
export declare function normalizeBlockName(name: string): string;
|
|
10
|
-
/**
|
|
11
|
-
* Return a block name without the organization prefix.
|
|
12
|
-
*
|
|
13
|
-
* @param name The input block name.
|
|
14
|
-
* @returns The prettified block name.
|
|
15
|
-
*/
|
|
16
|
-
export declare function stripBlockName(name: string): string;
|
|
17
|
-
/**
|
|
18
|
-
* Parse a block name into a tuple of organization id and block id.
|
|
19
|
-
*
|
|
20
|
-
* @param name The block name to parse.
|
|
21
|
-
* @returns A tuple containing the organization id and block id.
|
|
22
|
-
*/
|
|
23
|
-
export declare function parseBlockName(name: string): [string, string] | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* Find unique block types in an app.
|
|
26
|
-
*
|
|
27
|
-
* @param definition The app definition to find unique blocks for.
|
|
28
|
-
* @returns Partial unique blocks. Only the type and version are returned.
|
|
29
|
-
*/
|
|
30
|
-
export declare function getAppBlocks(definition: AppDefinition): IdentifiableBlock[];
|
|
31
|
-
export declare function prefixBlockURL(block: IdentifiableBlock, url: string): string;
|
package/blockUtils.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { blockNamePattern } from './constants/index.js';
|
|
2
|
-
import { iterApp } from './iterApp.js';
|
|
3
|
-
const prefix = '@appsemble/';
|
|
4
|
-
/**
|
|
5
|
-
* Normalize a block name by prefixing it with `@appsemble` if necessary.
|
|
6
|
-
*
|
|
7
|
-
* @param name The input block name.
|
|
8
|
-
* @returns The normalized block name.
|
|
9
|
-
*/
|
|
10
|
-
export function normalizeBlockName(name) {
|
|
11
|
-
if (name.startsWith('@')) {
|
|
12
|
-
return name;
|
|
13
|
-
}
|
|
14
|
-
return `${prefix}${name}`;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Return a block name without the organization prefix.
|
|
18
|
-
*
|
|
19
|
-
* @param name The input block name.
|
|
20
|
-
* @returns The prettified block name.
|
|
21
|
-
*/
|
|
22
|
-
export function stripBlockName(name) {
|
|
23
|
-
if (name.startsWith(prefix)) {
|
|
24
|
-
return name.slice(prefix.length);
|
|
25
|
-
}
|
|
26
|
-
return name;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Parse a block name into a tuple of organization id and block id.
|
|
30
|
-
*
|
|
31
|
-
* @param name The block name to parse.
|
|
32
|
-
* @returns A tuple containing the organization id and block id.
|
|
33
|
-
*/
|
|
34
|
-
export function parseBlockName(name) {
|
|
35
|
-
// TODO: should this not throw an error? Most call sites are not well-prepared for undefined.
|
|
36
|
-
const match = blockNamePattern.exec(normalizeBlockName(name));
|
|
37
|
-
if (match) {
|
|
38
|
-
return match.slice(1, 3);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Find unique block types in an app.
|
|
43
|
-
*
|
|
44
|
-
* @param definition The app definition to find unique blocks for.
|
|
45
|
-
* @returns Partial unique blocks. Only the type and version are returned.
|
|
46
|
-
*/
|
|
47
|
-
export function getAppBlocks(definition) {
|
|
48
|
-
const visited = new Set();
|
|
49
|
-
const result = [];
|
|
50
|
-
iterApp(definition, {
|
|
51
|
-
onBlock({ type, version }) {
|
|
52
|
-
const name = normalizeBlockName(type);
|
|
53
|
-
const asString = `${name}@${version}`;
|
|
54
|
-
if (!visited.has(asString)) {
|
|
55
|
-
result.push({ type: name, version });
|
|
56
|
-
}
|
|
57
|
-
visited.add(asString);
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
export function prefixBlockURL(block, url) {
|
|
63
|
-
return `/api/blocks/${normalizeBlockName(block.type)}/versions/${block.version}/${url}`;
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=blockUtils.js.map
|
package/constants/baseTheme.d.ts
DELETED
package/constants/baseTheme.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export const baseTheme = {
|
|
2
|
-
primaryColor: '#5393ff',
|
|
3
|
-
linkColor: '#0440ad',
|
|
4
|
-
infoColor: '#a7d0ff',
|
|
5
|
-
successColor: '#1fd25b',
|
|
6
|
-
warningColor: '#fed719',
|
|
7
|
-
dangerColor: '#ff2800',
|
|
8
|
-
splashColor: '#ffffff',
|
|
9
|
-
themeColor: '#ffffff',
|
|
10
|
-
tileLayer: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
11
|
-
font: {
|
|
12
|
-
family: 'Open Sans',
|
|
13
|
-
source: 'google',
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=baseTheme.js.map
|