src/index.js
import Clinical6 from './Clinical6';
import Client from './Client';
import { HelperFactory, helperFactory } from './utilities/factories/HelperFactory';
import { ServiceFactory, serviceFactory } from './utilities/factories/ServiceFactory';
import Helper from './helpers/Helper';
import Advertisement from './helpers/Advertisement';
import Agreement from './helpers/agreement/Agreement';
import AgreementSignature from './helpers/agreement/AgreementSignature';
import AgreementTemplate from './helpers/agreement/AgreementTemplate';
import AgreementTemplateField from './helpers/agreement/AgreementTemplateField';
import AllowedAction from './helpers/user/AllowedAction';
import AnalyticsMetric from './helpers/AnalyticsMetric';
import ApproverAssignment from './helpers/consent/ApproverAssignment';
import ApproverGroupAssignment from './helpers/consent/ApproverGroupAssignment';
import AppMenu from './helpers/navigation/AppMenu';
import AvailableStrategy from './helpers/consent/AvailableStrategy';
import AwardedBadge from './helpers/gamification/AwardedBadge';
import Badge from './helpers/gamification/Badge';
import BulkImport from './helpers/import/BulkImport';
import Callback from './models/callback/Callback';
import Cohort from './helpers/cohort/Cohort';
import CohortAssignment from './helpers/cohort/CohortAssignment';
import ConsentApprover from './helpers/consent/ConsentApprover';
import ApproverGroup from './helpers/consent/ApproverGroup';
import ConsentForm from './helpers/consent/ConsentForm';
import ConsentFormVersion from './helpers/consent/ConsentFormVersion';
import ConsentGrant from './helpers/consent/ConsentGrant';
import ConsentAdditionalSigner from './helpers/consent/ConsentAdditionalSigner';
import ConsentStrategy from './helpers/consent/ConsentStrategy';
import CsvExampleFile from './helpers/import/CsvExampleFile';
import CustomClass from './helpers/CustomClass';
import Comment from './helpers/discuss/Comment';
import Thread from './helpers/discuss/Thread';
import Content from './helpers/content/Content';
import ContentAttribute from './helpers/content/ContentAttribute';
import ContentType from './helpers/content/ContentType';
import Device from './helpers/Device';
import Entry from './helpers/ediary/Entry';
import EntryGroup from './helpers/ediary/EntryGroup';
import EntryTemplate from './helpers/ediary/EntryTemplate';
import Event from './helpers/reminder/Event';
import Filter from './helpers/filter/Filter';
import FilterGroup from './helpers/filter/FilterGroup';
import Flow from './helpers/flow/Flow';
import FlowContainer from './helpers/flow/FlowContainer';
import FlowData from './helpers/flow/FlowData';
import FlowDataGroup from './helpers/flow/FlowDataGroup';
import FlowInput from './helpers/flow/FlowInput';
import FlowKeyValue from './helpers/flow/FlowKeyValue';
import FlowStep from './helpers/flow/FlowStep';
import GenericFile from './helpers/import/GenericFile';
import Insight from './helpers/Insight';
import Invitation from './helpers/user/Invitation';
import InvitationStatus from './helpers/user/InvitationStatus';
import JobStatus from './helpers/import/JobStatus';
import Language from './helpers/Language';
import Location from './helpers/Location';
import Message from './helpers/Message';
import Notification from './helpers/Notification';
import PaperTemplate from './helpers/agreement/PaperTemplate';
import Permission from './helpers/user/Permission';
import PlatformMenu from './helpers/navigation/PlatformMenu';
import PredefinedScreen from './helpers/navigation/PredefinedScreen';
import Profile from './helpers/user/Profile';
import ProjectContent from './helpers/ProjectContent';
import Query from './helpers/Query';
import RelatedUser from './helpers/user/RelatedUser';
import Role from './helpers/user/Role';
import Rule from './helpers/reminder/Rule';
import Schedule from './helpers/reminder/Schedule';
import Session from './helpers/user/Session';
import Section from './helpers/Section';
import Setting from './helpers/Setting';
import SignAccount from './helpers/esignaccount/SignAccount';
import Site from './helpers/trial/Site';
import SiteContact from './helpers/trial/SiteContact';
import SiteLanguage from './helpers/trial/SiteLanguage';
import SiteMember from './helpers/trial/SiteMember';
import SsoOption from './helpers/sso/SsoOption';
import Storage from './helpers/Storage';
import Status from './helpers/Status';
import TemporaryId from './helpers/identifier/TemporaryId';
import Timezone from './helpers/Timezone';
import User from './helpers/user/User';
import ConsultationParticipant from './helpers/consult/ConsultationParticipant';
import Consultation from './helpers/consult/Consultation';
import Version from './helpers/version/Version';
import VuforiaTarget from './helpers/VuforiaTarget';
import AdvertisementService from './services/AdvertisementService';
import AgreementService from './services/AgreementService';
import AnalyticsService from './services/AnalyticsService';
import AppMenuService from './services/AppMenuService';
import CallbackService from './services/CallbackService';
import ConsultationService from './services/ConsultationService';
import ContentService from './services/ContentService';
import DiscussService from './services/DiscussService';
import DeviceService from './services/DeviceService';
import EDiaryService from './services/EDiaryService';
import EventService from './services/EventService';
import FlowService from './services/FlowService';
import ImportService from './services/ImportService';
import JsonApiService from './services/JsonApiService';
import LanguageService from './services/LanguageService';
import LocationService from './services/LocationService';
import MessageService from './services/MessageService';
import PlatformMenuService from './services/PlatformMenuService';
import ProjectContentService from './services/ProjectContentService';
import RelatedUserService from './services/RelatedUserService';
import RuleService from './services/RuleService';
import RoleService from './services/RoleService';
import StatusService from './services/StatusService';
import SystemService from './services/SystemService';
import TemporaryIdService from './services/TemporaryIdService';
import UserService from './services/UserService';
import Clinical6Error from './utilities/Clinical6Error';
import ArrayUtility, { union, unique, arrayToObject } from './utilities/ArrayUtility';
import ClassUtility, {
aggregate,
fieldsToCamel,
fieldsToSnake,
toJsonApiStub,
} from './utilities/ClassUtility';
import ConditionUtility, { operators, evaluate } from './utilities/ConditionUtility';
import FormatUtility, {
camelToSnake,
isEmail,
kebabToCamel,
kebabToSnake,
objectToURI,
snakeToCamel,
stringToCamel,
stringToSnake,
} from './utilities/FormatUtility';
import JsonApiUtility, { flattenJsonApi, getJsonApiType, isJsonApiFormat } from './utilities/JsonApiUtility';
import StorageUtility from './utilities/StorageUtility';
import LocalStorageUtility from './utilities/StorageUtility.localStorage';
import ValidationUtility from './utilities/ValidationUtility';
/** @type {Clinical6} */
const clinical6 = new Clinical6();
export default clinical6;
/** @type {Client} */
const client = Client.instance;
/** @type {AdvertisementService} */
const advertisementService = new AdvertisementService();
/** @type {AgreementService} */
const agreementService = new AgreementService();
/** @type {AnalyticsService} */
const analyticsService = new AnalyticsService();
/** @type {AppMenuService} */
const appMenuService = new AppMenuService();
/** @type {CallbackService} */
const callbackService = new CallbackService();
/** @type {ConsultationService} */
const consultationService = new ConsultationService();
/** @type {ContentService} */
const contentService = new ContentService();
/** @type {DeviceService} */
const deviceService = new DeviceService();
/** @type {DiscussService} */
const discussService = new DiscussService();
/** @type {EDiaryService} */
const eDiaryService = new EDiaryService();
/** @type {EventService} */
const eventService = new EventService();
/** @type {FlowService} */
const flowService = new FlowService();
/** @type {ImportService} */
const importService = new ImportService();
/** @type {JsonApiService} */
const jsonApiService = new JsonApiService();
/** @type {LanguageService} */
const languageService = new LanguageService();
/** @type {LocationService} */
const locationService = new LocationService();
/** @type {MessageService} */
const messageService = new MessageService();
/** @type {PlatformMenuService} */
const platformMenuService = new PlatformMenuService();
/** @type {ProjectContentService} */
const projectContentService = new ProjectContentService();
/** @type {UserService} */
const userService = new UserService('users');
/** @type {UserService} */
const mobileUserService = new UserService('mobile_users');
/** @type {RelatedUserService} */
const relatedUserService = new RelatedUserService();
/** @type {RoleService} */
const roleService = new RoleService();
/** @type {RuleService} */
const ruleService = new RuleService();
/** @type {StatusService} */
const statusService = new StatusService();
/** @type {SystemService} */
const systemService = new SystemService();
/** @type {TemporaryIdService} */
const temporaryIdService = new TemporaryIdService();
/** @type {StorageUtility} */
// const storageUtility = Client.instance.storageUtility;
/** @type {Storage} */
// const storage = new Storage();
HelperFactory.map = {
adobe_sign__accounts: SignAccount,
agreement__agreements: Agreement,
agreement__paper_templates: PaperTemplate,
agreement__signatures: AgreementSignature,
agreement__template_fields: AgreementTemplateField,
agreement__templates: AgreementTemplate,
allowed_actions: AllowedAction,
analytics__metrics: AnalyticsMetric,
awarded_badges: AwardedBadge,
badges: Badge,
cohorts: Cohort,
cohort_assignments: CohortAssignment,
consent__approver_assignments: ApproverAssignment,
consent__approver_group_assignments: ApproverGroupAssignment,
consent__approvers: ConsentApprover,
consent__approver_groups: ApproverGroup,
consent__available_strategies: AvailableStrategy,
consent__forms: ConsentForm,
consent__form_versions: ConsentFormVersion,
consent__grants: ConsentGrant,
consent__additional_signatures: ConsentAdditionalSigner,
consent__strategies: ConsentStrategy,
commentable__comments: Comment,
commentable__threads: Thread,
csv_example_files: CsvExampleFile,
data_collection__captured_value_groups: FlowDataGroup,
data_collection__captured_values: FlowData,
data_collection__containers: FlowContainer,
data_collection__flow_process_values: FlowKeyValue,
data_collection__flow_processes: Flow,
data_collection__linked_steps: FlowStep,
devices: Device,
dynamic_content__attribute_keys: ContentAttribute,
dynamic_content__contents: Content,
dynamic_content__content_types: ContentType,
ediary__entries: Entry,
ediary__entry_groups: EntryGroup,
ediary__entry_templates: EntryTemplate,
filters: Filter,
filter_groups: FilterGroup,
generic_files: GenericFile,
import_wizard__bulk_imports: BulkImport,
invitations: Invitation,
invitation_validations: InvitationStatus,
job_status: JobStatus,
languages: Language,
locations: Location,
mobile_users: User,
menus: PlatformMenu,
navigation__app_menus: AppMenu,
navigation__predefined_screens: PredefinedScreen,
notification__deliveries: Notification,
permissions: Permission,
profiles: Profile,
related_users: RelatedUser,
reminder__events: Event,
reminder__rules: Rule,
sections: Section,
settings: Setting,
statuses: Status,
scheduler__personalized_rule_schedules: Schedule,
sso_options: SsoOption,
temporary_identifiers: TemporaryId,
timezones: Timezone,
trials__sites: Site,
trials__site_contacts: SiteContact,
trials__site_supported_languages: SiteLanguage,
trials__site_members: SiteMember,
user_roles: Role,
user_sessions: Session,
users: User,
versions: Version,
video_consultations: Consultation,
video_consultation_participants: ConsultationParticipant,
};
// data_collection__containers
// data_collection__captured_values
// statuses
export {
Clinical6,
clinical6,
Client,
client,
HelperFactory,
helperFactory,
ServiceFactory,
serviceFactory,
Helper,
Advertisement,
Agreement,
AgreementSignature,
AgreementTemplate,
AgreementTemplateField,
AllowedAction,
AnalyticsMetric,
ApproverAssignment,
ApproverGroupAssignment,
AppMenu,
AvailableStrategy,
AwardedBadge,
Badge,
BulkImport,
Callback,
Cohort,
CohortAssignment,
ConsentApprover,
ApproverGroup,
ConsentForm,
ConsentFormVersion,
ConsentGrant,
ConsentAdditionalSigner,
ConsentStrategy,
CustomClass,
Comment,
Content,
ContentAttribute,
ContentType,
CsvExampleFile,
Device,
Entry,
EntryGroup,
EntryTemplate,
Event,
Filter,
FilterGroup,
Flow,
FlowContainer,
FlowData,
FlowDataGroup,
FlowInput,
FlowKeyValue,
FlowStep,
GenericFile,
Insight,
Invitation,
InvitationStatus,
JobStatus,
Language,
Location,
Message,
Notification,
PaperTemplate,
Permission,
PlatformMenu,
PredefinedScreen,
Profile,
ProjectContent,
Query,
RelatedUser,
Role,
Rule,
Schedule,
Section,
Session,
Setting,
SignAccount,
Site,
SiteContact,
SiteLanguage,
SiteMember,
SsoOption,
Storage,
// storage,
TemporaryId,
Thread,
Timezone,
User,
Consultation,
ConsultationParticipant,
Version,
VuforiaTarget,
AdvertisementService, advertisementService,
AgreementService, agreementService,
AnalyticsService, analyticsService,
AppMenuService, appMenuService,
CallbackService, callbackService,
ConsultationService, consultationService,
ContentService, contentService,
DiscussService, discussService,
EDiaryService, eDiaryService,
DeviceService, deviceService,
EventService, eventService,
FlowService, flowService,
ImportService, importService,
JsonApiService, jsonApiService,
LanguageService, languageService,
LocationService, locationService,
MessageService, messageService,
PlatformMenuService, platformMenuService,
ProjectContentService, projectContentService,
UserService, mobileUserService, userService,
RelatedUserService, relatedUserService,
RoleService, roleService,
RuleService, ruleService,
StatusService, statusService,
SystemService, systemService,
TemporaryIdService, temporaryIdService,
Clinical6Error,
ArrayUtility, union, unique, arrayToObject,
ClassUtility, aggregate, fieldsToCamel, fieldsToSnake, toJsonApiStub,
ConditionUtility, operators, evaluate,
FormatUtility, isEmail, camelToSnake, kebabToCamel, kebabToSnake, objectToURI, snakeToCamel, stringToCamel, stringToSnake,
JsonApiUtility, flattenJsonApi, getJsonApiType, isJsonApiFormat,
StorageUtility,
LocalStorageUtility,
ValidationUtility,
// storageUtility,
};