@unito/integration-api
Version:
The Unito Integration API
346 lines (345 loc) • 14.4 kB
JavaScript
import * as Api from './types.js';
const dateToStringlikeConfiguration = {
locale: {
type: 'enum',
default: 'en-CA',
values: ['en-CA'],
description: 'The locale to use for formatting the date.',
},
timezone: {
type: 'enum',
default: 'UTC',
values: ['UTC'],
description: 'The timezone to use for formatting the date.',
},
};
const htmlToRichTextConfiguration = {
decorator: {
type: 'boolean',
description: 'Decorate the content with author information and optional date.',
default: false,
hidden: true,
},
decoratorTemplate: {
type: 'string',
description: 'Template for the decorator. Use {author} and {date} placeholders.',
default: 'On <strong>{semantic:createdAt}</strong>, <em>{semantic:user.semantic:displayName}</em> commented:',
hidden: true,
},
decoratorPrefix: {
type: 'string',
description: `Prefix for the decorator. Defaults to "➤".`,
default: '➤',
hidden: true,
},
};
const markdownToRichTextConfiguration = {
decorator: {
type: 'boolean',
description: 'Decorate the content with author information and optional date.',
default: false,
hidden: true,
},
decoratorTemplate: {
type: 'string',
description: 'Template for the decorator. Use {author} and {date} placeholders.',
default: 'On **{semantic:createdAt}**, __{semantic:user.semantic:displayName}__ commented:',
hidden: true,
},
decoratorPrefix: {
type: 'string',
description: `Prefix for the decorator. Defaults to "➤".`,
default: '➤',
hidden: true,
},
};
export const fieldTypeCompatibilityMatrix = {
[ ]: {
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: dateToStringlikeConfiguration,
[ ]: dateToStringlikeConfiguration,
[ ]: dateToStringlikeConfiguration,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: dateToStringlikeConfiguration,
[ ]: dateToStringlikeConfiguration,
[ ]: dateToStringlikeConfiguration,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: htmlToRichTextConfiguration,
[ ]: htmlToRichTextConfiguration,
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: markdownToRichTextConfiguration,
[ ]: markdownToRichTextConfiguration,
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: null,
},
[ ]: {
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: null,
[ ]: {},
[ ]: {},
[ ]: {},
[ ]: {},
},
};