Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appsemble/types

Package Overview
Dependencies
Maintainers
4
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsemble/types - npm Package Compare versions

Comparing version 0.23.5 to 0.23.6

2

action.d.ts

@@ -46,3 +46,3 @@ import { type HTTPMethods } from './http.js';

*/
export type Action = BaseAction<'analytics'> | BaseAction<'condition'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'team.members'> | BaseAction<'throw'> | BaseAction<'user.login'> | BaseAction<'user.logout'> | BaseAction<'user.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction;
export type Action = BaseAction<'analytics'> | BaseAction<'condition'> | BaseAction<'controller'> | BaseAction<'dialog.error'> | BaseAction<'dialog.ok'> | BaseAction<'dialog'> | BaseAction<'download'> | BaseAction<'each'> | BaseAction<'email'> | BaseAction<'event'> | BaseAction<'flow.back'> | BaseAction<'flow.cancel'> | BaseAction<'flow.finish'> | BaseAction<'flow.next'> | BaseAction<'flow.to'> | BaseAction<'link.back'> | BaseAction<'link.next'> | BaseAction<'match'> | BaseAction<'message'> | BaseAction<'noop'> | BaseAction<'notify'> | BaseAction<'resource.subscription.status'> | BaseAction<'resource.subscription.subscribe'> | BaseAction<'resource.subscription.toggle'> | BaseAction<'resource.subscription.unsubscribe'> | BaseAction<'share'> | BaseAction<'static'> | BaseAction<'storage.append'> | BaseAction<'storage.delete'> | BaseAction<'storage.read'> | BaseAction<'storage.subtract'> | BaseAction<'storage.update'> | BaseAction<'storage.write'> | BaseAction<'team.invite'> | BaseAction<'team.join'> | BaseAction<'team.list'> | BaseAction<'team.members'> | BaseAction<'throw'> | BaseAction<'user.login'> | BaseAction<'user.logout'> | BaseAction<'user.register'> | BaseAction<'user.update'> | LinkAction | LogAction | RequestAction | ResourceCountAction | ResourceCreateAction | ResourceDeleteAction | ResourceGetAction | ResourcePatchAction | ResourceQueryAction | ResourceUpdateAction;
export {};

@@ -39,9 +39,29 @@ import { type IconName } from '@fortawesome/fontawesome-common-types';

/**
* A project that is loaded in an app
*/
export interface ControllerDefinition {
/**
* A mapping of actions that can be fired by the project to action handlers.
*
* The exact meaning of the parameters depends on the project.
*/
actions?: Record<string, ActionDefinition>;
/**
* Mapping of the events the project can listen to and emit.
*
* The exact meaning of the parameters depends on the project.
*/
events?: {
listen?: Record<string, string>;
emit?: Record<string, string>;
};
}
/**
* A block that is displayed on a page.
*/
export interface BlockDefinition {
export interface BlockDefinition extends ControllerDefinition {
/**
* The type of the block.
* The type of the controller.
*
* A block type follow the format `@organization/name`.
* A block type follow the format `@organization/project`.
* If the organization is _appsemble_, it may be omitted.

@@ -53,8 +73,8 @@ *

* Examples:
* - `form`
* - `@amsterdam/splash`
* - `empty`
* - `@amsterdam/empty`
*/
type: string;
/**
* A [semver](https://semver.org) representation of the block version.
* A [semver](https://semver.org) representation of the project version.
*

@@ -82,26 +102,11 @@ * Pattern:

/**
* A list of roles that are allowed to view this block.
*/
roles?: string[];
/**
* A free form mapping of named parameters.
*
* The exact meaning of the parameters depends on the block type.
* The exact meaning of the parameters depends on the project type.
*/
parameters?: JsonObject;
/**
* A mapping of actions that can be fired by the block to action handlers.
*
* The exact meaning of the parameters depends on the block type.
*/
actions?: Record<string, ActionDefinition>;
/**
* Mapping of the events the block can listen to and emit.
*
* The exact meaning of the parameters depends on the block type.
*/
events?: {
listen?: Record<string, string>;
emit?: Record<string, string>;
};
/**
* A list of roles that are allowed to view this block.
*/
roles?: string[];
}

@@ -1138,2 +1143,5 @@ /**

}
export interface ControllerActionDefinition extends BaseActionDefinition<'controller'> {
handler: string;
}
export type RequestActionDefinition = RequestLikeActionDefinition<'request'>;

@@ -1212,3 +1220,3 @@ export type ResourceCreateActionDefinition = ResourceActionDefinition<'resource.create'>;

};
export type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MatchActionDefinition | MessageActionDefinition | NotifyActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourcePatchActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | TeamMembersActionDefinition | UserLoginAction | UserLogoutAction | UserRegisterAction | UserUpdateAction;
export type ActionDefinition = AnalyticsAction | BaseActionDefinition<'dialog.error'> | BaseActionDefinition<'dialog.ok'> | BaseActionDefinition<'flow.back'> | BaseActionDefinition<'flow.cancel'> | BaseActionDefinition<'flow.finish'> | BaseActionDefinition<'flow.next'> | BaseActionDefinition<'link.back'> | BaseActionDefinition<'link.next'> | BaseActionDefinition<'noop'> | BaseActionDefinition<'team.join'> | BaseActionDefinition<'team.list'> | BaseActionDefinition<'throw'> | ConditionActionDefinition | ControllerActionDefinition | DialogActionDefinition | DownloadActionDefinition | EachActionDefinition | EmailActionDefinition | EventActionDefinition | FlowToActionDefinition | LinkActionDefinition | LogActionDefinition | MatchActionDefinition | MessageActionDefinition | NotifyActionDefinition | RequestActionDefinition | ResourceCountActionDefinition | ResourceCreateActionDefinition | ResourceDeleteActionDefinition | ResourceGetActionDefinition | ResourcePatchActionDefinition | ResourceQueryActionDefinition | ResourceSubscriptionStatusActionDefinition | ResourceSubscriptionSubscribeActionDefinition | ResourceSubscriptionToggleActionDefinition | ResourceSubscriptionUnsubscribeActionDefinition | ResourceUpdateActionDefinition | ShareActionDefinition | StaticActionDefinition | StorageAppendActionDefinition | StorageDeleteActionDefinition | StorageReadActionDefinition | StorageSubtractActionDefinition | StorageUpdateActionDefinition | StorageWriteActionDefinition | TeamInviteActionDefinition | TeamMembersActionDefinition | UserLoginAction | UserLogoutAction | UserRegisterAction | UserUpdateAction;
export interface ActionType {

@@ -1230,78 +1238,2 @@ /**

}
export interface BlockManifest {
/**
* A block manifest as it is available to the app and in the SDK.
* pattern: ^@[a-z]([a-z\d-]{0,30}[a-z\d])?\/[a-z]([a-z\d-]{0,30}[a-z\d])$
* The name of a block.
*/
name: string;
/**
* The description of the block.
*/
description?: string;
/**
* The long description of the block.
*
* This is displayed when rendering block documentation and supports Markdown.
*/
longDescription?: string;
/**
* A [semver](https://semver.org) representation of the block version.
*
* Pattern:
* ^\d+\.\d+\.\d+$
*/
version: string;
/**
* The type of layout to be used for the block.
*/
layout?: 'float' | 'grow' | 'hidden' | 'static' | null;
/**
* Array of urls associated to the files of the block.
*/
files: string[];
/**
* The actions that are supported by a block.
*/
actions?: Record<string, ActionType>;
/**
* The messages that are supported by a block.
*/
messages?: Record<string, Record<string, any> | never>;
/**
* The events that are supported by a block.
*/
events?: {
listen?: Record<string, EventType>;
emit?: Record<string, EventType>;
};
/**
* A JSON schema to validate block parameters.
*/
parameters?: Schema;
/**
* The URL that can be used to fetch this block’s icon.
*/
iconUrl?: string;
/**
* The languages that are supported by the block by default.
*
* If the block has no messages, this property is `null`.
*/
languages: string[] | null;
examples?: string[];
/**
* Whether the block should be listed publicly
* for users who aren’t part of the block’s organization.
*
* - **`public`**: The block is visible for everyone.
* - **`unlisted`**: The block will only be visible if the user is
* logged in and is part of the block’s organization.
*/
visibility?: 'public' | 'unlisted';
/**
* Whether action validation for wildcard action is skipped.
*/
wildcardActions?: boolean;
}
/**

@@ -1504,2 +1436,3 @@ * This describes what a page will look like in the app.

pages: PageDefinition[];
controller?: ControllerDefinition;
/**

@@ -1649,2 +1582,10 @@ * Resource definitions that may be used by the app.

/**
* The build app controller's code
*/
controllerCode?: string;
/**
* The build app controller's manifest
*/
controllerImplementations?: ProjectImplementations;
/**
* Any app styles that are shared.

@@ -1736,3 +1677,3 @@ */

/**
* A member of an app.
* The controller of an app.
*/

@@ -2004,20 +1945,92 @@ export interface AppMember {

export type SAMLStatus = 'badsignature' | 'emailconflict' | 'invalidrelaystate' | 'invalidsecret' | 'invalidstatuscode' | 'invalidsubjectconfirmation' | 'missingnameid' | 'missingsubject';
/**
* The block configuration that’s used by the CLI when building a block.
*
* This configuration is also passed to the Webpack configuration function as the `env` variable.
*/
export interface BlockConfig extends Pick<BlockManifest, 'actions' | 'description' | 'events' | 'layout' | 'longDescription' | 'messages' | 'name' | 'parameters' | 'version' | 'visibility' | 'wildcardActions'> {
export interface ProjectConfig {
/**
* The path to the webpack configuration file relative to the block project directory.
* The name of the project.
*/
webpack: string;
name: string;
/**
* The build output directory relative to the block project directory.
* The description of the project.
*/
output: string;
description?: string;
/**
* The absolute directory of the block project.
* The long description of the project.
*
* This is displayed when rendering documentation and supports Markdown.
*/
longDescription?: string;
/**
* A [semver](https://semver.org) representation of the project version.
*
* Pattern:
* ^\d+\.\d+\.\d+$
*/
version: string;
[key: string]: any;
}
export interface ProjectBuildConfig extends ProjectConfig {
/**
* The build output directory relative to the project directory.
*/
output?: string;
/**
* The absolute directory of the project.
*/
dir: string;
}
export interface ProjectImplementations {
/**
* The actions that are supported by a project.
*/
actions?: Record<string, ActionType>;
/**
* The events that are supported by a project.
*/
events?: {
listen?: Record<string, EventType>;
emit?: Record<string, EventType>;
};
/**
* The messages that are supported by a project.
*/
messages?: Record<string, Record<string, any> | never>;
/**
* A JSON schema to validate project parameters.
*/
parameters?: Schema;
}
export interface ProjectManifest extends ProjectConfig, ProjectImplementations {
/**
* Array of urls associated to the files of the project.
*/
files: string[];
}
export interface BlockManifest extends ProjectManifest {
/**
* The URL that can be used to fetch this block’s icon.
*/
iconUrl?: string;
/**
* The languages that are supported by the block by default.
*
* If the block has no messages, this property is `null`.
*/
languages: string[] | null;
examples?: string[];
/**
* Whether the block should be listed publicly
* for users who aren’t part of the block’s organization.
*
* - **`public`**: The block is visible for everyone.
* - **`unlisted`**: The block will only be visible if the user is
* logged in and is part of the block’s organization.
*/
visibility?: 'public' | 'unlisted';
/**
* Whether action validation for wildcard action is skipped.
*/
wildcardActions?: boolean;
/**
* The type of layout to be used for the block.
*/
layout?: 'float' | 'grow' | 'hidden' | 'static' | null;
}
{
"name": "@appsemble/types",
"version": "0.23.5",
"version": "0.23.6",
"description": "TypeScript definitions reused within Appsemble internally",

@@ -5,0 +5,0 @@ "keywords": [

@@ -1,2 +0,2 @@

# ![](https://gitlab.com/appsemble/appsemble/-/raw/0.23.5/config/assets/logo.svg) Appsemble Types
# ![](https://gitlab.com/appsemble/appsemble/-/raw/0.23.6/config/assets/logo.svg) Appsemble Types

@@ -6,3 +6,3 @@ > Reusable TypeScript types

[![npm](https://img.shields.io/npm/v/@appsemble/types)](https://www.npmjs.com/package/@appsemble/types)
[![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.23.5/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.5)
[![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.23.6/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.23.6)
[![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)

@@ -30,3 +30,3 @@

[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.23.5/LICENSE.md) ©
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.23.6/LICENSE.md) ©
[Appsemble](https://appsemble.com)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc