@appsemble/utils 0.33.5 → 0.33.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/api/components/schemas/App.js +5 -1
- package/api/components/schemas/BlockVersion.js +6 -1
- package/api/components/schemas/index.d.ts +0 -118
- package/api/components/schemas/index.js +0 -118
- package/api/paths/appTemplates.js +12 -3
- package/appMessages.d.ts +2 -2
- package/appMessages.js +1 -1
- package/authorization.d.ts +1 -11
- package/authorization.js +1 -163
- package/constants/index.d.ts +0 -2
- package/constants/index.js +0 -2
- package/formatRequestAction.d.ts +1 -1
- package/index.d.ts +2 -14
- package/index.js +2 -14
- package/miscellaneous.d.ts +5 -13
- package/miscellaneous.js +6 -33
- package/package.json +3 -2
- package/theme.d.ts +1 -1
- package/theme.js +1 -1
- package/types.d.ts +1 -1
- package/validateAppMessages.d.ts +2 -1
- package/validateAppMessages.js +2 -2
- package/allActions.d.ts +0 -3
- package/allActions.js +0 -11
- package/api/components/schemas/ActionDefinition.d.ts +0 -2
- package/api/components/schemas/ActionDefinition.js +0 -95
- package/api/components/schemas/AnalyticsActionDefinition.d.ts +0 -1
- package/api/components/schemas/AnalyticsActionDefinition.js +0 -25
- package/api/components/schemas/AppDefinition.d.ts +0 -2
- package/api/components/schemas/AppDefinition.js +0 -126
- package/api/components/schemas/AppLayoutDefinition.d.ts +0 -2
- package/api/components/schemas/AppLayoutDefinition.js +0 -46
- package/api/components/schemas/AppMemberCurrentPatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberCurrentPatchActionDefinition.js +0 -30
- package/api/components/schemas/AppMemberDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberDeleteActionDefinition.js +0 -20
- package/api/components/schemas/AppMemberInviteActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberInviteActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberLoginActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberLoginActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberLogoutActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberLogoutActionDefinition.js +0 -14
- package/api/components/schemas/AppMemberPropertiesPatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberPropertiesPatchActionDefinition.js +0 -26
- package/api/components/schemas/AppMemberPropertyDefinition.d.ts +0 -2
- package/api/components/schemas/AppMemberPropertyDefinition.js +0 -49
- package/api/components/schemas/AppMemberQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberQueryActionDefinition.js +0 -24
- package/api/components/schemas/AppMemberRegisterActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberRegisterActionDefinition.js +0 -43
- package/api/components/schemas/AppMemberRoleUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/AppMemberRoleUpdateActionDefinition.js +0 -27
- package/api/components/schemas/AppMembersDefinition.d.ts +0 -2
- package/api/components/schemas/AppMembersDefinition.js +0 -17
- package/api/components/schemas/ArrayRemapperDefinition.d.ts +0 -2
- package/api/components/schemas/ArrayRemapperDefinition.js +0 -22
- package/api/components/schemas/BaseActionDefinition.d.ts +0 -2
- package/api/components/schemas/BaseActionDefinition.js +0 -10
- package/api/components/schemas/BaseJSONSchema.d.ts +0 -2
- package/api/components/schemas/BaseJSONSchema.js +0 -24
- package/api/components/schemas/BasePageDefinition.d.ts +0 -2
- package/api/components/schemas/BasePageDefinition.js +0 -92
- package/api/components/schemas/BlockDefinition.d.ts +0 -2
- package/api/components/schemas/BlockDefinition.js +0 -94
- package/api/components/schemas/ConditionActionDefinition.d.ts +0 -1
- package/api/components/schemas/ConditionActionDefinition.js +0 -30
- package/api/components/schemas/ContainerDefinition.d.ts +0 -2
- package/api/components/schemas/ContainerDefinition.js +0 -52
- package/api/components/schemas/ContainerPageDefinition.d.ts +0 -1
- package/api/components/schemas/ContainerPageDefinition.js +0 -56
- package/api/components/schemas/ControllerActionDefinition.d.ts +0 -1
- package/api/components/schemas/ControllerActionDefinition.js +0 -18
- package/api/components/schemas/ControllerDefinition.d.ts +0 -2
- package/api/components/schemas/ControllerDefinition.js +0 -17
- package/api/components/schemas/CronDefinition.d.ts +0 -2
- package/api/components/schemas/CronDefinition.js +0 -20
- package/api/components/schemas/CsvParseActionDefinition.d.ts +0 -1
- package/api/components/schemas/CsvParseActionDefinition.js +0 -22
- package/api/components/schemas/CustomFontDefinition.d.ts +0 -2
- package/api/components/schemas/CustomFontDefinition.js +0 -20
- package/api/components/schemas/DialogActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogActionDefinition.js +0 -40
- package/api/components/schemas/DialogErrorActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogErrorActionDefinition.js +0 -17
- package/api/components/schemas/DialogOkActionDefinition.d.ts +0 -1
- package/api/components/schemas/DialogOkActionDefinition.js +0 -17
- package/api/components/schemas/DownloadActionDefinition.d.ts +0 -1
- package/api/components/schemas/DownloadActionDefinition.js +0 -19
- package/api/components/schemas/EachActionDefinition.d.ts +0 -1
- package/api/components/schemas/EachActionDefinition.js +0 -26
- package/api/components/schemas/EmailActionDefinition.d.ts +0 -1
- package/api/components/schemas/EmailActionDefinition.js +0 -54
- package/api/components/schemas/EventActionDefinition.d.ts +0 -1
- package/api/components/schemas/EventActionDefinition.js +0 -27
- package/api/components/schemas/EventsDefinition.d.ts +0 -2
- package/api/components/schemas/EventsDefinition.js +0 -29
- package/api/components/schemas/FilterParametersDefinition.d.ts +0 -2
- package/api/components/schemas/FilterParametersDefinition.js +0 -15
- package/api/components/schemas/FlowBackActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowBackActionDefinition.js +0 -16
- package/api/components/schemas/FlowCancelActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowCancelActionDefinition.js +0 -14
- package/api/components/schemas/FlowFinishActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowFinishActionDefinition.js +0 -16
- package/api/components/schemas/FlowNextActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowNextActionDefinition.js +0 -17
- package/api/components/schemas/FlowPageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/FlowPageActionsDefinition.js +0 -23
- package/api/components/schemas/FlowPageDefinition.d.ts +0 -1
- package/api/components/schemas/FlowPageDefinition.js +0 -37
- package/api/components/schemas/FlowToActionDefinition.d.ts +0 -1
- package/api/components/schemas/FlowToActionDefinition.js +0 -21
- package/api/components/schemas/GoogleFontDefinition.d.ts +0 -2
- package/api/components/schemas/GoogleFontDefinition.js +0 -22
- package/api/components/schemas/GroupMemberDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberDeleteActionDefinition.js +0 -18
- package/api/components/schemas/GroupMemberInviteActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberInviteActionDefinition.js +0 -26
- package/api/components/schemas/GroupMemberQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberQueryActionDefinition.js +0 -18
- package/api/components/schemas/GroupMemberRoleUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupMemberRoleUpdateActionDefinition.js +0 -22
- package/api/components/schemas/GroupQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/GroupQueryActionDefinition.js +0 -14
- package/api/components/schemas/JSONPointer.d.ts +0 -1
- package/api/components/schemas/JSONPointer.js +0 -20
- package/api/components/schemas/JSONSchema.d.ts +0 -2
- package/api/components/schemas/JSONSchema.js +0 -20
- package/api/components/schemas/JSONSchemaAnyOf.d.ts +0 -1
- package/api/components/schemas/JSONSchemaAnyOf.js +0 -26
- package/api/components/schemas/JSONSchemaArray.d.ts +0 -1
- package/api/components/schemas/JSONSchemaArray.js +0 -47
- package/api/components/schemas/JSONSchemaBoolean.d.ts +0 -1
- package/api/components/schemas/JSONSchemaBoolean.js +0 -37
- package/api/components/schemas/JSONSchemaConst.d.ts +0 -1
- package/api/components/schemas/JSONSchemaConst.js +0 -16
- package/api/components/schemas/JSONSchemaEnum.d.ts +0 -1
- package/api/components/schemas/JSONSchemaEnum.js +0 -36
- package/api/components/schemas/JSONSchemaInteger.d.ts +0 -1
- package/api/components/schemas/JSONSchemaInteger.js +0 -55
- package/api/components/schemas/JSONSchemaMultiType.d.ts +0 -1
- package/api/components/schemas/JSONSchemaMultiType.js +0 -48
- package/api/components/schemas/JSONSchemaNot.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNot.js +0 -23
- package/api/components/schemas/JSONSchemaNull.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNull.js +0 -16
- package/api/components/schemas/JSONSchemaNumber.d.ts +0 -1
- package/api/components/schemas/JSONSchemaNumber.js +0 -63
- package/api/components/schemas/JSONSchemaObject.d.ts +0 -1
- package/api/components/schemas/JSONSchemaObject.js +0 -74
- package/api/components/schemas/JSONSchemaOneOf.d.ts +0 -1
- package/api/components/schemas/JSONSchemaOneOf.js +0 -24
- package/api/components/schemas/JSONSchemaRemapper.d.ts +0 -1
- package/api/components/schemas/JSONSchemaRemapper.js +0 -19
- package/api/components/schemas/JSONSchemaRoot.d.ts +0 -1
- package/api/components/schemas/JSONSchemaRoot.js +0 -21
- package/api/components/schemas/JSONSchemaString.d.ts +0 -1
- package/api/components/schemas/JSONSchemaString.js +0 -107
- package/api/components/schemas/LinkActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkActionDefinition.js +0 -29
- package/api/components/schemas/LinkBackActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkBackActionDefinition.js +0 -14
- package/api/components/schemas/LinkNextActionDefinition.d.ts +0 -1
- package/api/components/schemas/LinkNextActionDefinition.js +0 -14
- package/api/components/schemas/LogActionDefinition.d.ts +0 -1
- package/api/components/schemas/LogActionDefinition.js +0 -22
- package/api/components/schemas/LoopPageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/LoopPageActionsDefinition.js +0 -24
- package/api/components/schemas/LoopPageDefinition.d.ts +0 -1
- package/api/components/schemas/LoopPageDefinition.js +0 -32
- package/api/components/schemas/MatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/MatchActionDefinition.js +0 -35
- package/api/components/schemas/MessageActionDefinition.d.ts +0 -1
- package/api/components/schemas/MessageActionDefinition.js +0 -40
- package/api/components/schemas/NoopActionDefinition.d.ts +0 -1
- package/api/components/schemas/NoopActionDefinition.js +0 -17
- package/api/components/schemas/NotificationHookDataDefinition.d.ts +0 -2
- package/api/components/schemas/NotificationHookDataDefinition.js +0 -24
- package/api/components/schemas/NotificationHookDefinition.d.ts +0 -2
- package/api/components/schemas/NotificationHookDefinition.js +0 -32
- package/api/components/schemas/NotifyActionDefinition.d.ts +0 -1
- package/api/components/schemas/NotifyActionDefinition.js +0 -32
- package/api/components/schemas/ObjectRemapperDefinition.d.ts +0 -2
- package/api/components/schemas/ObjectRemapperDefinition.js +0 -17
- package/api/components/schemas/PageActionsDefinition.d.ts +0 -2
- package/api/components/schemas/PageActionsDefinition.js +0 -12
- package/api/components/schemas/PageDefinition.d.ts +0 -1
- package/api/components/schemas/PageDefinition.js +0 -26
- package/api/components/schemas/RemapperDefinition.d.ts +0 -2
- package/api/components/schemas/RemapperDefinition.js +0 -27
- package/api/components/schemas/RequestActionDefinition.d.ts +0 -1
- package/api/components/schemas/RequestActionDefinition.js +0 -75
- package/api/components/schemas/ResourceCountActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceCountActionDefinition.js +0 -22
- package/api/components/schemas/ResourceCreateActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceCreateActionDefinition.js +0 -18
- package/api/components/schemas/ResourceDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceDefinition.js +0 -263
- package/api/components/schemas/ResourceDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteActionDefinition.js +0 -18
- package/api/components/schemas/ResourceDeleteAllActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteAllActionDefinition.js +0 -21
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceDeleteBulkActionDefinition.js +0 -18
- package/api/components/schemas/ResourceGetActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceGetActionDefinition.js +0 -25
- package/api/components/schemas/ResourceHistoryDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceHistoryDefinition.js +0 -14
- package/api/components/schemas/ResourceHistoryGetActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceHistoryGetActionDefinition.js +0 -18
- package/api/components/schemas/ResourceHooksDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceHooksDefinition.js +0 -10
- package/api/components/schemas/ResourcePatchActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourcePatchActionDefinition.js +0 -21
- package/api/components/schemas/ResourceQueryActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceQueryActionDefinition.js +0 -26
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionStatusActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionSubscribeActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionToggleActionDefinition.js +0 -23
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceSubscriptionUnsubscribeActionDefinition.js +0 -23
- package/api/components/schemas/ResourceUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceUpdateActionDefinition.js +0 -18
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.d.ts +0 -1
- package/api/components/schemas/ResourceUpdatePositionsActionDefinition.js +0 -21
- package/api/components/schemas/ResourceViewDefinition.d.ts +0 -2
- package/api/components/schemas/ResourceViewDefinition.js +0 -24
- package/api/components/schemas/SecurityCronDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityCronDefinition.js +0 -26
- package/api/components/schemas/SecurityDefaultDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityDefaultDefinition.js +0 -34
- package/api/components/schemas/SecurityDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityDefinition.js +0 -17
- package/api/components/schemas/SecurityGuestDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityGuestDefinition.js +0 -26
- package/api/components/schemas/SecurityRoleDefinition.d.ts +0 -2
- package/api/components/schemas/SecurityRoleDefinition.js +0 -35
- package/api/components/schemas/ShareActionDefinition.d.ts +0 -1
- package/api/components/schemas/ShareActionDefinition.js +0 -30
- package/api/components/schemas/StaticActionDefinition.d.ts +0 -1
- package/api/components/schemas/StaticActionDefinition.js +0 -20
- package/api/components/schemas/StorageAppendActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageAppendActionDefinition.js +0 -43
- package/api/components/schemas/StorageDeleteActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageDeleteActionDefinition.js +0 -31
- package/api/components/schemas/StorageReadActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageReadActionDefinition.js +0 -32
- package/api/components/schemas/StorageSubtractActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageSubtractActionDefinition.js +0 -35
- package/api/components/schemas/StorageUpdateActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageUpdateActionDefinition.js +0 -46
- package/api/components/schemas/StorageWriteActionDefinition.d.ts +0 -1
- package/api/components/schemas/StorageWriteActionDefinition.js +0 -46
- package/api/components/schemas/SubPage.d.ts +0 -2
- package/api/components/schemas/SubPage.js +0 -36
- package/api/components/schemas/TabsPageDefinition.d.ts +0 -1
- package/api/components/schemas/TabsPageDefinition.js +0 -46
- package/api/components/schemas/Theme.d.ts +0 -2
- package/api/components/schemas/Theme.js +0 -80
- package/api/components/schemas/ThrowActionDefinition.d.ts +0 -1
- package/api/components/schemas/ThrowActionDefinition.js +0 -17
- package/api/components/schemas/WebhookDefinition.d.ts +0 -2
- package/api/components/schemas/WebhookDefinition.js +0 -17
- package/api/components/schemas/utils.d.ts +0 -13
- package/api/components/schemas/utils.js +0 -34
- package/appMembers.d.ts +0 -1
- package/appMembers.js +0 -9
- package/blockUtils.d.ts +0 -31
- package/blockUtils.js +0 -65
- package/constants/baseTheme.d.ts +0 -2
- package/constants/baseTheme.js +0 -16
- package/constants/fonts.d.ts +0 -6
- package/constants/fonts.js +0 -1607
- package/examples.d.ts +0 -23
- package/examples.js +0 -975
- package/findPageByName.d.ts +0 -2
- package/findPageByName.js +0 -15
- package/has.d.ts +0 -8
- package/has.js +0 -11
- package/ics.d.ts +0 -3
- package/ics.js +0 -41
- package/iterApp.d.ts +0 -64
- package/iterApp.js +0 -150
- package/jsonschema.d.ts +0 -54
- package/jsonschema.js +0 -185
- package/reference-schemas/actions/appMember.d.ts +0 -2
- package/reference-schemas/actions/appMember.js +0 -21
- package/reference-schemas/actions/flow.d.ts +0 -2
- package/reference-schemas/actions/flow.js +0 -13
- package/reference-schemas/actions/group.d.ts +0 -2
- package/reference-schemas/actions/group.js +0 -13
- package/reference-schemas/actions/index.d.ts +0 -7
- package/reference-schemas/actions/index.js +0 -8
- package/reference-schemas/actions/link.d.ts +0 -2
- package/reference-schemas/actions/link.js +0 -9
- package/reference-schemas/actions/miscellaneous.d.ts +0 -2
- package/reference-schemas/actions/miscellaneous.js +0 -43
- package/reference-schemas/actions/resources.d.ts +0 -2
- package/reference-schemas/actions/resources.js +0 -19
- package/reference-schemas/actions/storage.d.ts +0 -2
- package/reference-schemas/actions/storage.js +0 -15
- package/reference-schemas/remappers/arrays.d.ts +0 -2
- package/reference-schemas/remappers/arrays.js +0 -297
- package/reference-schemas/remappers/conditionals.d.ts +0 -2
- package/reference-schemas/remappers/conditionals.js +0 -167
- package/reference-schemas/remappers/config.d.ts +0 -2
- package/reference-schemas/remappers/config.js +0 -13
- package/reference-schemas/remappers/data.d.ts +0 -2
- package/reference-schemas/remappers/data.js +0 -394
- package/reference-schemas/remappers/dates.d.ts +0 -2
- package/reference-schemas/remappers/dates.js +0 -94
- package/reference-schemas/remappers/history.d.ts +0 -2
- package/reference-schemas/remappers/history.js +0 -246
- package/reference-schemas/remappers/index.d.ts +0 -12
- package/reference-schemas/remappers/index.js +0 -13
- package/reference-schemas/remappers/numbers.d.ts +0 -2
- package/reference-schemas/remappers/numbers.js +0 -30
- package/reference-schemas/remappers/objects.d.ts +0 -2
- package/reference-schemas/remappers/objects.js +0 -127
- package/reference-schemas/remappers/odata.d.ts +0 -2
- package/reference-schemas/remappers/odata.js +0 -95
- package/reference-schemas/remappers/randoms.d.ts +0 -2
- package/reference-schemas/remappers/randoms.js +0 -82
- package/reference-schemas/remappers/strings.d.ts +0 -2
- package/reference-schemas/remappers/strings.js +0 -93
- package/reference-schemas/remappers/unsorted.d.ts +0 -2
- package/reference-schemas/remappers/unsorted.js +0 -276
- package/remap.d.ts +0 -74
- package/remap.js +0 -692
- package/serverActions.d.ts +0 -2
- package/serverActions.js +0 -21
- package/string.d.ts +0 -23
- package/string.js +0 -30
- package/validation.d.ts +0 -25
- package/validation.js +0 -1231
package/findPageByName.d.ts
DELETED
package/findPageByName.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export function findPageByName(pages, name) {
|
|
2
|
-
for (const page of pages) {
|
|
3
|
-
if (page.name === name) {
|
|
4
|
-
return page;
|
|
5
|
-
}
|
|
6
|
-
if (page.type === 'container' && page.pages) {
|
|
7
|
-
const found = findPageByName(page.pages, name);
|
|
8
|
-
if (found) {
|
|
9
|
-
return found;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
return undefined;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=findPageByName.js.map
|
package/has.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the target has an own property named after the key.
|
|
3
|
-
*
|
|
4
|
-
* @param target The target that should have the key. Null values are also accepted.
|
|
5
|
-
* @param key The key to check for on the target.
|
|
6
|
-
* @returns Whether or not the key exists on the target.
|
|
7
|
-
*/
|
|
8
|
-
export declare function has(target: object | null | undefined, key: string): boolean;
|
package/has.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the target has an own property named after the key.
|
|
3
|
-
*
|
|
4
|
-
* @param target The target that should have the key. Null values are also accepted.
|
|
5
|
-
* @param key The key to check for on the target.
|
|
6
|
-
* @returns Whether or not the key exists on the target.
|
|
7
|
-
*/
|
|
8
|
-
export function has(target, key) {
|
|
9
|
-
return target != null && target !== undefined && Object.hasOwnProperty.call(target, key);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=has.js.map
|
package/ics.d.ts
DELETED
package/ics.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import parseDuration from 'parse-duration';
|
|
2
|
-
const secondLength = 1000;
|
|
3
|
-
const minuteLength = 60 * secondLength;
|
|
4
|
-
const hourLength = 60 * minuteLength;
|
|
5
|
-
const dayLength = 24 * hourLength;
|
|
6
|
-
const weekLength = 7 * dayLength;
|
|
7
|
-
export function getDuration(duration) {
|
|
8
|
-
let milliseconds = typeof duration === 'string' ? (parseDuration(duration) ?? 0) : duration;
|
|
9
|
-
const weeks = Math.floor(milliseconds / weekLength);
|
|
10
|
-
milliseconds %= weekLength;
|
|
11
|
-
const days = Math.floor(milliseconds / dayLength);
|
|
12
|
-
milliseconds %= dayLength;
|
|
13
|
-
const hours = Math.floor(milliseconds / hourLength);
|
|
14
|
-
milliseconds %= hourLength;
|
|
15
|
-
const minutes = Math.floor(milliseconds / minuteLength);
|
|
16
|
-
milliseconds %= minuteLength;
|
|
17
|
-
const seconds = Math.floor(milliseconds / secondLength);
|
|
18
|
-
return {
|
|
19
|
-
weeks,
|
|
20
|
-
days,
|
|
21
|
-
hours,
|
|
22
|
-
minutes,
|
|
23
|
-
seconds,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export function processLocation(location) {
|
|
27
|
-
if (typeof location !== 'object' || !location) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const lat = location.latitude ?? location.lat ?? location[0];
|
|
31
|
-
if (typeof lat !== 'number' || !Number.isFinite(lat) || lat < -90 || lat > 90) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
let lon = location.longitude ?? location.lon ?? location.lng ?? location[1];
|
|
35
|
-
if (typeof lon !== 'number' || !Number.isFinite(lon)) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
lon = (((lon % 360) + 540) % 360) - 180;
|
|
39
|
-
return { lat, lon };
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=ics.js.map
|
package/iterApp.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { type ActionDefinition, type AppDefinition, type BlockDefinition, type ControllerDefinition, type PageDefinition } from '@appsemble/types';
|
|
2
|
-
export type Prefix = (number | string)[];
|
|
3
|
-
type IterCallback<T> = (item: T, path: Prefix) => boolean | void;
|
|
4
|
-
interface IterCallbacks {
|
|
5
|
-
onPage?: IterCallback<PageDefinition>;
|
|
6
|
-
onBlockList?: IterCallback<BlockDefinition[]>;
|
|
7
|
-
onBlock?: IterCallback<BlockDefinition>;
|
|
8
|
-
onAction?: IterCallback<ActionDefinition>;
|
|
9
|
-
onController?: IterCallback<ControllerDefinition>;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Iterate over an action definition and call each callback if relevant.
|
|
13
|
-
*
|
|
14
|
-
* If a callback returns true, the iteration is aborted.
|
|
15
|
-
*
|
|
16
|
-
* @param action The action definition to iterate over.
|
|
17
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
18
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
19
|
-
* @returns True if any callback returns true, false otherwise.
|
|
20
|
-
*/
|
|
21
|
-
export declare function iterAction(action: ActionDefinition, callbacks: IterCallbacks, prefix?: Prefix): boolean;
|
|
22
|
-
export declare function iterController(controller: ControllerDefinition, callbacks: IterCallbacks, prefix?: Prefix): boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Iterate over a block definition and call each callback if relevant.
|
|
25
|
-
*
|
|
26
|
-
* If a callback returns true, the iteration is aborted.
|
|
27
|
-
*
|
|
28
|
-
* @param block The block definition to iterate over.
|
|
29
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
30
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
31
|
-
* @returns True if any callback returns true, false otherwise.
|
|
32
|
-
*/
|
|
33
|
-
export declare function iterBlock(block: BlockDefinition, callbacks: IterCallbacks, prefix?: Prefix): boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Iterate over a block definition list and call each callback if relevant.
|
|
36
|
-
*
|
|
37
|
-
* If a callback returns true, the iteration is aborted.
|
|
38
|
-
*
|
|
39
|
-
* @param blockList The block definition list to iterate over.
|
|
40
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
41
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
42
|
-
* @returns True if any callback returns true, false otherwise.
|
|
43
|
-
*/
|
|
44
|
-
export declare function iterBlockList(blockList: BlockDefinition[], callbacks: IterCallbacks, prefix?: Prefix): boolean;
|
|
45
|
-
/**
|
|
46
|
-
* Iterate over a page definition and call each callback if relevant.
|
|
47
|
-
*
|
|
48
|
-
* If a callback returns true, the iteration is aborted.
|
|
49
|
-
*
|
|
50
|
-
* @param page The page definition to iterate over.
|
|
51
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
52
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
53
|
-
* @returns True if any callback returns true, false otherwise.
|
|
54
|
-
*/
|
|
55
|
-
export declare function iterPage(page: PageDefinition, callbacks: IterCallbacks, prefix?: Prefix): boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Iterate over an app definition and call each callback if relevant.
|
|
58
|
-
*
|
|
59
|
-
* @param app The app definition to iterate over.
|
|
60
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
61
|
-
* @returns True if any callback returns true, false otherwise.
|
|
62
|
-
*/
|
|
63
|
-
export declare function iterApp(app: AppDefinition, callbacks: IterCallbacks): boolean;
|
|
64
|
-
export {};
|
package/iterApp.js
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Iterate over an action definition and call each callback if relevant.
|
|
3
|
-
*
|
|
4
|
-
* If a callback returns true, the iteration is aborted.
|
|
5
|
-
*
|
|
6
|
-
* @param action The action definition to iterate over.
|
|
7
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
8
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
9
|
-
* @returns True if any callback returns true, false otherwise.
|
|
10
|
-
*/
|
|
11
|
-
export function iterAction(action, callbacks, prefix = []) {
|
|
12
|
-
if (callbacks.onAction?.(action, prefix)) {
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
if (action.onSuccess && iterAction(action.onSuccess, callbacks, [...prefix, 'onSuccess'])) {
|
|
16
|
-
return true;
|
|
17
|
-
}
|
|
18
|
-
if (action.onError && iterAction(action.onError, callbacks, [...prefix, 'onError'])) {
|
|
19
|
-
return true;
|
|
20
|
-
}
|
|
21
|
-
if (action.type === 'condition') {
|
|
22
|
-
return Boolean(iterAction(action.then ?? { type: 'noop' }, callbacks, [...prefix, 'then']) ||
|
|
23
|
-
iterAction(action.else ?? { type: 'noop' }, callbacks, [...prefix, 'else']));
|
|
24
|
-
}
|
|
25
|
-
if (action.type === 'each') {
|
|
26
|
-
return iterAction(action.do, callbacks, [...prefix, 'do']);
|
|
27
|
-
}
|
|
28
|
-
if ('blocks' in action) {
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
30
|
-
return iterBlockList(action.blocks, callbacks, [...prefix, 'blocks']);
|
|
31
|
-
}
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
export function iterController(controller, callbacks, prefix = []) {
|
|
35
|
-
if (callbacks.onController?.(controller, prefix)) {
|
|
36
|
-
return true;
|
|
37
|
-
}
|
|
38
|
-
if (controller.actions) {
|
|
39
|
-
return Object.entries(controller.actions).some(([key, action]) => iterAction(action, callbacks, [...prefix, 'actions', key]));
|
|
40
|
-
}
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Iterate over a block definition and call each callback if relevant.
|
|
45
|
-
*
|
|
46
|
-
* If a callback returns true, the iteration is aborted.
|
|
47
|
-
*
|
|
48
|
-
* @param block The block definition to iterate over.
|
|
49
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
50
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
51
|
-
* @returns True if any callback returns true, false otherwise.
|
|
52
|
-
*/
|
|
53
|
-
export function iterBlock(block, callbacks, prefix = []) {
|
|
54
|
-
if (callbacks.onBlock?.(block, prefix)) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
if (block.actions) {
|
|
58
|
-
return Object.entries(block.actions).some(([key, action]) => iterAction(action, callbacks, [...prefix, 'actions', key]));
|
|
59
|
-
}
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Iterate over a block definition list and call each callback if relevant.
|
|
64
|
-
*
|
|
65
|
-
* If a callback returns true, the iteration is aborted.
|
|
66
|
-
*
|
|
67
|
-
* @param blockList The block definition list to iterate over.
|
|
68
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
69
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
70
|
-
* @returns True if any callback returns true, false otherwise.
|
|
71
|
-
*/
|
|
72
|
-
export function iterBlockList(blockList, callbacks, prefix = []) {
|
|
73
|
-
if (callbacks.onBlockList?.(blockList, prefix)) {
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
return blockList.some((block, index) => iterBlock(block, callbacks, [...prefix, index]));
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Iterate over a page definition and call each callback if relevant.
|
|
80
|
-
*
|
|
81
|
-
* If a callback returns true, the iteration is aborted.
|
|
82
|
-
*
|
|
83
|
-
* @param page The page definition to iterate over.
|
|
84
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
85
|
-
* @param prefix The initial path prefix. This is mainly used for nested iteration.
|
|
86
|
-
* @returns True if any callback returns true, false otherwise.
|
|
87
|
-
*/
|
|
88
|
-
export function iterPage(page, callbacks, prefix = []) {
|
|
89
|
-
if (callbacks.onPage?.(page, prefix)) {
|
|
90
|
-
return true;
|
|
91
|
-
}
|
|
92
|
-
if (page.type === 'flow' || page.type === 'tabs') {
|
|
93
|
-
let result = false;
|
|
94
|
-
if ('actions' in page) {
|
|
95
|
-
result = Object.entries(page.actions ?? {}).some(([key, action]) => iterAction(action, callbacks, [...prefix, 'actions', key]));
|
|
96
|
-
}
|
|
97
|
-
return (result ||
|
|
98
|
-
(page.type === 'flow'
|
|
99
|
-
? page.steps.some((step, index) => iterBlockList(step.blocks, callbacks, [...prefix, 'steps', index, 'blocks']))
|
|
100
|
-
: page.tabs
|
|
101
|
-
? page.tabs.some((tab, index) => iterBlockList(tab.blocks, callbacks, [...prefix, 'tabs', index, 'blocks']))
|
|
102
|
-
: iterBlockList(page.definition?.foreach.blocks ?? [], callbacks, [
|
|
103
|
-
...prefix,
|
|
104
|
-
'tabs',
|
|
105
|
-
0,
|
|
106
|
-
'blocks',
|
|
107
|
-
])));
|
|
108
|
-
}
|
|
109
|
-
if (page.type === 'loop') {
|
|
110
|
-
let result = false;
|
|
111
|
-
if ('actions' in page) {
|
|
112
|
-
result = Object.entries(page.actions ?? {}).some(([key, action]) => iterAction(action, callbacks, [...prefix, 'actions', key]));
|
|
113
|
-
}
|
|
114
|
-
return (result ||
|
|
115
|
-
['steps.first', 'steps', 'steps.last'].some((suffix) => iterBlockList(page.foreach.blocks, callbacks, [...prefix, suffix, 'blocks'])));
|
|
116
|
-
}
|
|
117
|
-
if (page.type === 'container') {
|
|
118
|
-
let result = false;
|
|
119
|
-
for (const containerPage of page.pages) {
|
|
120
|
-
result = iterPage(containerPage, callbacks, prefix);
|
|
121
|
-
}
|
|
122
|
-
return result;
|
|
123
|
-
}
|
|
124
|
-
return iterBlockList(page.blocks, callbacks, [...prefix, 'blocks']);
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Iterate over an app definition and call each callback if relevant.
|
|
128
|
-
*
|
|
129
|
-
* @param app The app definition to iterate over.
|
|
130
|
-
* @param callbacks The callbacks to call if a sub definition is found.
|
|
131
|
-
* @returns True if any callback returns true, false otherwise.
|
|
132
|
-
*/
|
|
133
|
-
export function iterApp(app, callbacks) {
|
|
134
|
-
if (Array.isArray(app.pages) &&
|
|
135
|
-
app.pages.some((page, index) => iterPage(page, callbacks, ['pages', index]))) {
|
|
136
|
-
return true;
|
|
137
|
-
}
|
|
138
|
-
if (app.controller && iterController(app.controller, callbacks, ['controller'])) {
|
|
139
|
-
return true;
|
|
140
|
-
}
|
|
141
|
-
if (app.cron) {
|
|
142
|
-
for (const [name, job] of Object.entries(app.cron)) {
|
|
143
|
-
if (job?.action && iterAction(job.action, callbacks, ['cron', name, 'action'])) {
|
|
144
|
-
return true;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
//# sourceMappingURL=iterApp.js.map
|
package/jsonschema.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { type Schema } from 'jsonschema';
|
|
2
|
-
import { type JsonArray, type JsonValue } from 'type-fest';
|
|
3
|
-
declare module 'jsonschema' {
|
|
4
|
-
/**
|
|
5
|
-
* See https://github.com/tdegrunt/jsonschema/pull/335
|
|
6
|
-
*/
|
|
7
|
-
interface Schema {
|
|
8
|
-
default?: JsonValue;
|
|
9
|
-
examples?: JsonArray;
|
|
10
|
-
/**
|
|
11
|
-
* Descriptions for enum values.
|
|
12
|
-
*
|
|
13
|
-
* This is a JSON schema extension that’s supported by Monaco editor, and also used in Appsemble
|
|
14
|
-
* Studio.
|
|
15
|
-
*/
|
|
16
|
-
enumDescriptions?: string[];
|
|
17
|
-
/**
|
|
18
|
-
* If true, Appsemble renders a textarea in the graphical JSON editor.
|
|
19
|
-
*
|
|
20
|
-
* This is a custom property used by Appsemble.
|
|
21
|
-
*/
|
|
22
|
-
multiline?: boolean;
|
|
23
|
-
}
|
|
24
|
-
interface SchemaContext {
|
|
25
|
-
path: (number | string)[];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Generate data based on a JSON schema.
|
|
30
|
-
*
|
|
31
|
-
* The generated data doesn’t necessarily conform to the JSON schema. This is useful to prefill
|
|
32
|
-
* forms that are based on a JSON schema, but where user input is still needed to verify the data.
|
|
33
|
-
*
|
|
34
|
-
* @param schema The JSON schema to generate data from.
|
|
35
|
-
* @returns A JSON value estimated from the schema.
|
|
36
|
-
*/
|
|
37
|
-
export declare function generateDataFromSchema(schema?: Schema): JsonValue;
|
|
38
|
-
/**
|
|
39
|
-
* Combine a list of schemas into one schema matching all of them.
|
|
40
|
-
*
|
|
41
|
-
* The main purpose of this function is to combine a schema using `allOf` into one schema that can
|
|
42
|
-
* be rendered. Do not use this for actual validation. Use the original `allOf` schema instead.
|
|
43
|
-
*
|
|
44
|
-
* @param schemas The schemas to combine.
|
|
45
|
-
* @returns The combined schema.
|
|
46
|
-
*/
|
|
47
|
-
export declare function combineSchemas(...schemas: Schema[]): Schema;
|
|
48
|
-
/**
|
|
49
|
-
* Recursively iterate over a JSON schema and call the callback with every sub schema found.
|
|
50
|
-
*
|
|
51
|
-
* @param schema The JSON schema to iterate.
|
|
52
|
-
* @param onSchema The callback to call with the found JSON schema.
|
|
53
|
-
*/
|
|
54
|
-
export declare function iterJSONSchema(schema: Schema, onSchema: (schema: Schema) => void): void;
|
package/jsonschema.js
DELETED
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
import lcm from 'lcm';
|
|
2
|
-
import { mapValues } from './mapValues.js';
|
|
3
|
-
/**
|
|
4
|
-
* Generate data based on a JSON schema.
|
|
5
|
-
*
|
|
6
|
-
* The generated data doesn’t necessarily conform to the JSON schema. This is useful to prefill
|
|
7
|
-
* forms that are based on a JSON schema, but where user input is still needed to verify the data.
|
|
8
|
-
*
|
|
9
|
-
* @param schema The JSON schema to generate data from.
|
|
10
|
-
* @returns A JSON value estimated from the schema.
|
|
11
|
-
*/
|
|
12
|
-
export function generateDataFromSchema(schema) {
|
|
13
|
-
if (!schema) {
|
|
14
|
-
return null;
|
|
15
|
-
}
|
|
16
|
-
// Let’s assume the default conforms to the schema, although this might not be true.
|
|
17
|
-
if ('default' in schema) {
|
|
18
|
-
return schema.default ?? null;
|
|
19
|
-
}
|
|
20
|
-
// If no predefined value exists, generate something based on its type.
|
|
21
|
-
switch (schema.type) {
|
|
22
|
-
case 'array':
|
|
23
|
-
return Array.from({ length: schema.minItems ?? 0 }, (empty, index) => generateDataFromSchema(Array.isArray(schema.items)
|
|
24
|
-
? schema.items[index] ||
|
|
25
|
-
(typeof schema.additionalItems === 'object' && schema.additionalItems)
|
|
26
|
-
: schema.items));
|
|
27
|
-
case 'boolean':
|
|
28
|
-
return false;
|
|
29
|
-
case 'integer':
|
|
30
|
-
case 'number': {
|
|
31
|
-
const { maximum = 0, minimum = 0, multipleOf = schema.type === 'integer' ? 1 : undefined, } = schema;
|
|
32
|
-
if (minimum > 0) {
|
|
33
|
-
return multipleOf ? minimum + multipleOf - (minimum % multipleOf) : minimum;
|
|
34
|
-
}
|
|
35
|
-
if (maximum < 0) {
|
|
36
|
-
return multipleOf ? maximum - multipleOf + (-maximum % multipleOf) : maximum;
|
|
37
|
-
}
|
|
38
|
-
return 0;
|
|
39
|
-
}
|
|
40
|
-
case 'null':
|
|
41
|
-
return null;
|
|
42
|
-
case 'object':
|
|
43
|
-
return mapValues(schema.properties || {}, generateDataFromSchema);
|
|
44
|
-
case 'string':
|
|
45
|
-
return '';
|
|
46
|
-
default:
|
|
47
|
-
break;
|
|
48
|
-
}
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Combine a list of schemas into one schema matching all of them.
|
|
53
|
-
*
|
|
54
|
-
* The main purpose of this function is to combine a schema using `allOf` into one schema that can
|
|
55
|
-
* be rendered. Do not use this for actual validation. Use the original `allOf` schema instead.
|
|
56
|
-
*
|
|
57
|
-
* @param schemas The schemas to combine.
|
|
58
|
-
* @returns The combined schema.
|
|
59
|
-
*/
|
|
60
|
-
export function combineSchemas(...schemas) {
|
|
61
|
-
const result = {};
|
|
62
|
-
for (const schema of schemas) {
|
|
63
|
-
if ('type' in schema) {
|
|
64
|
-
result.type || (result.type = schema.type);
|
|
65
|
-
}
|
|
66
|
-
if ('format' in schema) {
|
|
67
|
-
result.format || (result.format = schema.format);
|
|
68
|
-
}
|
|
69
|
-
if ('minimum' in schema) {
|
|
70
|
-
result.minimum =
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
72
|
-
// @ts-ignore 2345 argument of type is not assignable to parameter of type
|
|
73
|
-
// (strictNullChecks)
|
|
74
|
-
'minimum' in result ? Math.max(result.minimum, schema.minimum) : schema.minimum;
|
|
75
|
-
}
|
|
76
|
-
if ('minLength' in schema) {
|
|
77
|
-
result.minLength =
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
79
|
-
// @ts-ignore 2345 argument of type is not assignable to parameter of type
|
|
80
|
-
// (strictNullChecks)
|
|
81
|
-
'minLength' in result ? Math.max(result.minLength, schema.minLength) : schema.minLength;
|
|
82
|
-
}
|
|
83
|
-
if ('maximum' in schema) {
|
|
84
|
-
result.maximum =
|
|
85
|
-
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
86
|
-
// @ts-ignore 2345 argument of type is not assignable to parameter of type
|
|
87
|
-
// (strictNullChecks)
|
|
88
|
-
'maximum' in result ? Math.min(result.maximum, schema.maximum) : schema.maximum;
|
|
89
|
-
}
|
|
90
|
-
if ('maxLength' in schema) {
|
|
91
|
-
result.maxLength =
|
|
92
|
-
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
|
|
93
|
-
// @ts-ignore 2345 argument of type is not assignable to parameter of type
|
|
94
|
-
// (strictNullChecks)
|
|
95
|
-
'maxLength' in result ? Math.min(result.maxLength, schema.maxLength) : schema.maxLength;
|
|
96
|
-
}
|
|
97
|
-
if (schema.multipleOf) {
|
|
98
|
-
result.multipleOf = result.multipleOf
|
|
99
|
-
? lcm(result.multipleOf, schema.multipleOf)
|
|
100
|
-
: schema.multipleOf;
|
|
101
|
-
}
|
|
102
|
-
if ('default' in schema) {
|
|
103
|
-
result.default ?? (result.default = schema.default);
|
|
104
|
-
}
|
|
105
|
-
if (schema.description) {
|
|
106
|
-
result.description || (result.description = schema.description);
|
|
107
|
-
}
|
|
108
|
-
if (schema.pattern) {
|
|
109
|
-
result.pattern || (result.pattern = schema.pattern);
|
|
110
|
-
}
|
|
111
|
-
if (schema.title) {
|
|
112
|
-
result.title || (result.title = schema.title);
|
|
113
|
-
}
|
|
114
|
-
if ('uniqueItems' in schema) {
|
|
115
|
-
result.uniqueItems || (result.uniqueItems = schema.uniqueItems);
|
|
116
|
-
}
|
|
117
|
-
if (Array.isArray(schema.required)) {
|
|
118
|
-
result.required || (result.required = []);
|
|
119
|
-
if (Array.isArray(result.required)) {
|
|
120
|
-
result.required.push(...schema.required);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
else if (schema.required) {
|
|
124
|
-
result.required = true;
|
|
125
|
-
}
|
|
126
|
-
if (schema.properties) {
|
|
127
|
-
result.properties || (result.properties = {});
|
|
128
|
-
for (const [key, property] of Object.entries(schema.properties)) {
|
|
129
|
-
result.properties[key] = result.properties[key]
|
|
130
|
-
? combineSchemas(result.properties[key], property)
|
|
131
|
-
: property;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
return result;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Recursively iterate over a JSON schema and call the callback with every sub schema found.
|
|
139
|
-
*
|
|
140
|
-
* @param schema The JSON schema to iterate.
|
|
141
|
-
* @param onSchema The callback to call with the found JSON schema.
|
|
142
|
-
*/
|
|
143
|
-
export function iterJSONSchema(schema, onSchema) {
|
|
144
|
-
if (!schema) {
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
onSchema(schema);
|
|
148
|
-
if (schema.properties) {
|
|
149
|
-
for (const property of Object.values(schema.properties)) {
|
|
150
|
-
iterJSONSchema(property, onSchema);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
if (typeof schema.additionalProperties === 'object') {
|
|
154
|
-
iterJSONSchema(schema.additionalProperties, onSchema);
|
|
155
|
-
}
|
|
156
|
-
if (schema.items) {
|
|
157
|
-
if (Array.isArray(schema.items)) {
|
|
158
|
-
for (const item of schema.items) {
|
|
159
|
-
iterJSONSchema(item, onSchema);
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
else {
|
|
163
|
-
iterJSONSchema(schema.items, onSchema);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
if (typeof schema.additionalItems === 'object') {
|
|
167
|
-
iterJSONSchema(schema.additionalItems, onSchema);
|
|
168
|
-
}
|
|
169
|
-
if (schema.anyOf) {
|
|
170
|
-
for (const anyOf of schema.anyOf) {
|
|
171
|
-
iterJSONSchema(anyOf, onSchema);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (schema.oneOf) {
|
|
175
|
-
for (const oneOf of schema.oneOf) {
|
|
176
|
-
iterJSONSchema(oneOf, onSchema);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
if (schema.allOf) {
|
|
180
|
-
for (const allOf of schema.allOf) {
|
|
181
|
-
iterJSONSchema(allOf, onSchema);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
//# sourceMappingURL=jsonschema.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { AppMemberCurrentPatchActionDefinition } from '../../api/components/schemas/AppMemberCurrentPatchActionDefinition.js';
|
|
2
|
-
import { AppMemberDeleteActionDefinition } from '../../api/components/schemas/AppMemberDeleteActionDefinition.js';
|
|
3
|
-
import { AppMemberInviteActionDefinition } from '../../api/components/schemas/AppMemberInviteActionDefinition.js';
|
|
4
|
-
import { AppMemberLoginActionDefinition } from '../../api/components/schemas/AppMemberLoginActionDefinition.js';
|
|
5
|
-
import { AppMemberLogoutActionDefinition } from '../../api/components/schemas/AppMemberLogoutActionDefinition.js';
|
|
6
|
-
import { AppMemberPropertiesPatchActionDefinition } from '../../api/components/schemas/AppMemberPropertiesPatchActionDefinition.js';
|
|
7
|
-
import { AppMemberQueryActionDefinition } from '../../api/components/schemas/AppMemberQueryActionDefinition.js';
|
|
8
|
-
import { AppMemberRegisterActionDefinition } from '../../api/components/schemas/AppMemberRegisterActionDefinition.js';
|
|
9
|
-
import { AppMemberRoleUpdateActionDefinition } from '../../api/components/schemas/AppMemberRoleUpdateActionDefinition.js';
|
|
10
|
-
export const appMemberActions = {
|
|
11
|
-
'app.member.register': AppMemberRegisterActionDefinition,
|
|
12
|
-
'app.member.invite': AppMemberInviteActionDefinition,
|
|
13
|
-
'app.member.login': AppMemberLoginActionDefinition,
|
|
14
|
-
'app.member.logout': AppMemberLogoutActionDefinition,
|
|
15
|
-
'app.member.query': AppMemberQueryActionDefinition,
|
|
16
|
-
'app.member.current.patch': AppMemberCurrentPatchActionDefinition,
|
|
17
|
-
'app.member.role.update': AppMemberRoleUpdateActionDefinition,
|
|
18
|
-
'app.member.properties.patch': AppMemberPropertiesPatchActionDefinition,
|
|
19
|
-
'app.member.delete': AppMemberDeleteActionDefinition,
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=appMember.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FlowBackActionDefinition } from '../../api/components/schemas/FlowBackActionDefinition.js';
|
|
2
|
-
import { FlowCancelActionDefinition } from '../../api/components/schemas/FlowCancelActionDefinition.js';
|
|
3
|
-
import { FlowFinishActionDefinition } from '../../api/components/schemas/FlowFinishActionDefinition.js';
|
|
4
|
-
import { FlowNextActionDefinition } from '../../api/components/schemas/FlowNextActionDefinition.js';
|
|
5
|
-
import { FlowToActionDefinition } from '../../api/components/schemas/FlowToActionDefinition.js';
|
|
6
|
-
export const flowActions = {
|
|
7
|
-
'flow.next': FlowNextActionDefinition,
|
|
8
|
-
'flow.finish': FlowFinishActionDefinition,
|
|
9
|
-
'flow.back': FlowBackActionDefinition,
|
|
10
|
-
'flow.cancel': FlowCancelActionDefinition,
|
|
11
|
-
'flow.to': FlowToActionDefinition,
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=flow.js.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { GroupMemberDeleteActionDefinition } from '../../api/components/schemas/GroupMemberDeleteActionDefinition.js';
|
|
2
|
-
import { GroupMemberInviteActionDefinition } from '../../api/components/schemas/GroupMemberInviteActionDefinition.js';
|
|
3
|
-
import { GroupMemberQueryActionDefinition } from '../../api/components/schemas/GroupMemberQueryActionDefinition.js';
|
|
4
|
-
import { GroupMemberRoleUpdateActionDefinition } from '../../api/components/schemas/GroupMemberRoleUpdateActionDefinition.js';
|
|
5
|
-
import { GroupQueryActionDefinition } from '../../api/components/schemas/GroupQueryActionDefinition.js';
|
|
6
|
-
export const groupActions = {
|
|
7
|
-
'group.query': GroupQueryActionDefinition,
|
|
8
|
-
'group.member.invite': GroupMemberInviteActionDefinition,
|
|
9
|
-
'group.member.query': GroupMemberQueryActionDefinition,
|
|
10
|
-
'group.member.delete': GroupMemberDeleteActionDefinition,
|
|
11
|
-
'group.member.role.update': GroupMemberRoleUpdateActionDefinition,
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=group.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { LinkActionDefinition } from '../../api/components/schemas/LinkActionDefinition.js';
|
|
2
|
-
import { LinkBackActionDefinition } from '../../api/components/schemas/LinkBackActionDefinition.js';
|
|
3
|
-
import { LinkNextActionDefinition } from '../../api/components/schemas/LinkNextActionDefinition.js';
|
|
4
|
-
export const linkActions = {
|
|
5
|
-
link: LinkActionDefinition,
|
|
6
|
-
'link.back': LinkBackActionDefinition,
|
|
7
|
-
'link.next': LinkNextActionDefinition,
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=link.js.map
|