@appsemble/lang-sdk
Version:
Language SDK for Appsemble
127 lines (98 loc) • 2.64 kB
Markdown
#  Appsemble Lang SDK
> Appsemble Language SDK.
[](https://www.npmjs.com/package/@appsemble/lang-sdk)
[](https://gitlab.com/appsemble/appsemble/-/releases/0.32.1-test.14)
[](https://prettier.io)
## Table of Contents
- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
## Installation
```sh
npm install @appsemble/lang-sdk
```
## Usage
This package provides utilities and tools for working with the language DSL used in Appsemble.
It also includes helpers for working with app page definitions, translated page labels, and
canonical page path segments.
## Exports
### 1. **Validators**
- `AppValidator`
- `BlockExampleValidator`
- `BlockParamInstanceValidator`
- `BlockParamSchemaValidator`
- `RemapperValidator`
- `BaseValidatorFactory`
### 2. **Constants and Patterns**
- `blockNamePattern`
- `domainPattern`
- `googleAnalyticsIDPattern`
- `hexColor`
- `ISODateTimePattern`
- `jwtPattern`
- `uuid4Pattern`
### 3. **Utilities**
- `normalize`
- `normalizeBlockName`
- `stripBlockName`
- `combineSchemas`
- `generateDataFromSchema`
- `remap`
- `createExampleContext`
- `prefixBlockURL`
- `getAppBlocks`
- `camelToHyphen`
- `decodeJSONRef`
- `normalized`
- `parseBlockName`
- `partialNormalized`
- `partialSemver`
- `toUpperCase`
### 4. **Iterators**
- `iterApp`
- `iterPage`
- `iterBlock`
- `iterBlockList`
- `iterAction`
- `iterController`
- `iterJSONSchema`
### 5. **Authorization**
- `getAppRoles`
- `getAppRolePermissions`
- `getGuestAppPermissions`
- `checkAppRoleAppPermissions`
- `checkGuestAppPermissions`
- `getAppPossiblePermissions`
- `getAppPossibleGuestPermissions`
- `getAppRolesByPermissions`
- `getAppInheritedRoles`
- `PredefinedAppRole`
- `predefinedAppRolePermissions`
- `predefinedAppRoles`
### 6. **Miscellaneous**
- `findPageByName`
- `findPageById`
- `getPageDisplayName`
- `getPageMessageId`
- `getPagePathSegment`
- `examples`
- `noop`
- `schemaExample`
### 7. **Schemas**
- `schemas`
- `referenceSchemas`
### 8. **Other**
- `ActionError`
- `allActions`
- `AppPermission`
- `assignAppMemberProperties`
- `baseTheme`
- `defaultLocale`
- `googleFonts`
- `isAppLink`
- `serverActions`
- `validateAppDefinition`
- `referenceSchemas`
## License
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.32.1-test.14/LICENSE.md) ©
[Appsemble](https://appsemble.com)