@appsemble/lang-sdk
Version:
Language SDK for Appsemble
35 lines (34 loc) • 1.25 kB
JavaScript
import { BaseActionDefinition } from './BaseActionDefinition.js';
import { extendJSONSchema } from '../utils/extendJSONSchema.js';
export const MatchActionDefinition = extendJSONSchema(BaseActionDefinition, {
type: 'object',
additionalProperties: false,
required: ['type', 'match'],
properties: {
type: {
enum: ['match'],
description: `Run another action if one of the cases is true.
Only the first case that equals true is called.`,
},
match: {
type: 'array',
items: {
type: 'object',
additionalProperties: false,
required: ['case', 'action'],
description: '',
properties: {
case: {
$ref: '#/components/schemas/RemapperDefinition',
description: 'The case to be matched.',
},
action: {
$ref: '#/components/schemas/ActionDefinition',
description: 'Action to be called if the case equals true.',
},
},
},
},
},
});
//# sourceMappingURL=MatchActionDefinition.js.map