WebApps 2


Many utilities are available for import through @sitevision/api.

/* Client */

// Send client requests
import requester from '@sitevision/api/client/requester';

// Pop toast notifications
import toast from '@sitevision/api/client/toast';
/* Server */

// Access Sitevision Public API example
import portletContextUtil from '@sitevision/api/server/PortletContextUtil';

// Get values from the configuration of the module
import appData from '@sitevision/api/server/appData';

// Various data about the WebApp
import appInfo from '@sitevision/api/server/appInfo';

// Get files and images from the resource folder
import appResource from '@sitevision/api/server/appResource';

// Cache API
import cache from '@sitevision/api/server/cache';

// Get values from the global configuration of the module
import globalAppData from '@sitevision/api/server/globalAppData';

// Utility methods for OAuth2
import oauth2 from '@sitevision/api/server/oauth2';

// Run privileged action
import privileged from '@sitevision/api/server/privileged';

// Access to Data Storage
import storage from '@sitevision/api/server/storage';
/* Common */

// Get translated texts
import i18n from '@sitevision/api/common/i18n';

// Get data about the module and manage events within the WebApp
import app from '@sitevision/api/common/app';

// Trigger and listen to events within a page
import events from '@sitevision/api/common/events';

// Configure and get path to routes
import router from '@sitevision/api/common/router';

// Get csrf data
import security from '@sitevision/api/common/security';