Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import { BrandingDetails } from './BrandingDetails';
- export enum TargetPlatform {
- Android = 1,
- iOS = 2,
- Win10 = 4
- }
- export enum StartupOption {
- StartWithDemo,
- StartWithSync,
- RequireSync
- }
- export type CodeBase = 11.0 | 10.3 | 10.2 | 10.1;
- export const CodeBases = [
- 11.0,
- 10.3,
- 10.2,
- 10.1
- ]
- export interface ImageData {
- name: string,
- image: Blob
- }
- export interface ImageConfiguration {
- label: string,
- description: string,
- minWidth: number,
- minHeight: number,
- appStore: boolean,
- multiInput?: boolean,
- minCount?: number,
- maxCount?: number,
- notExact?: boolean,
- maxWidth?: number,
- maxHeight?: number,
- }
- export interface BrandingPortalConfigFeatures {
- disableTutorial: boolean,
- disableiCloud: boolean,
- disableLocationTracking: boolean
- disableOfflineMaps: boolean
- openSyncDialogOnFirstStart: boolean
- forceInitialSync: boolean
- organizationPicker: string
- preFillOrgDataInSyncDialog: boolean
- orgURL: string,
- userMode: UserMode,
- domain: string,
- homeRealm: string,
- ADFSUsername: string,
- sharePointServerType: SharepointServerType,
- sharePointUserName: string,
- sharePointPassword: string,
- exchangeUrl: string,
- exchangeEmail: string,
- exchangeUserName: string,
- exchangePassword: string,
- savePassword: string,
- useCustomDemoData: boolean
- }
- export enum SharepointServerType {
- SameAsCRM = 0,
- ActiveDirectory = 1,
- "Online(MS Office 365)" = 2,
- ADFS = 3
- }
- export enum UserMode {
- Standard,
- External,
- Anonymous,
- OAuth
- }
- export interface PlatformImages {
- [key: string]: ImageConfiguration
- }
- export class BrandingPortalConfig {
- appName: string = '';
- rescoContact: string = '';
- codeBase: CodeBase = 11.0;
- appStoreDeployment: boolean = true;
- appEdition: string = '';
- packageName: string = '';
- backgroundColor: string = '#0064CF';
- targetPlatform: TargetPlatform = TargetPlatform.Android | TargetPlatform.iOS | TargetPlatform.Win10;
- brandingDetails: BrandingDetails = {
- aboutLogo: null,
- appSubTitle: "",
- appTitle: "",
- manufacturer: ""
- };
- brandingFeatures = {
- disableTutorial: true, // "Hides the tutorial shown during the first start and from About window."
- disableSyncWizard: true, // "Disables the wizard shown before the first synchronization which guides user through the sync details (including the Resco CRM organization registration)."
- disableiCloud: true, // "Disables function loading document from iCloud. Enable this option if the iOS provisioning profile is linked to App ID having active iCloud container."
- disableGlympse: true, // "Disables the background GPS position monitoring via Glympse service.Enabling requires special entitlements on iOS and significantly increases the installation size."
- disableLocationTracking: false, // "Disables the background GPS position monitoring via Resco service.Enabling requires special entitlements on iOS."
- disableOfflineMaps: true, // "Disables the MapBox provider implementing the offline maps function. Enabling significantly increases the installation size."
- openSyncDialogOnFirstStart: false, // "Forces the app to start the sync dialog on the very first start (after installation)."
- forceInitialSync: false, // [only if Sync on 1st start is enabled], "Prevents user to closed initial sync dialog."
- organizationPicker: '', //[input box with comma - delimited alphanumeric names], "Sync dialog will contain a combo-box for choosing organization URL from instead of typing it manually."
- preFillOrgDataInSyncDialog: false, // it should automatically disable "Sync Wizard" option User Mode(Standard/ External / Anonymous / OAuth)
- orgURL: '',
- userMode: UserMode.Standard,
- domain: '',
- homeRealm: '',
- ADFSUsername: '',
- sharePointServerType: SharepointServerType.SameAsCRM,
- sharePointUserName: '',
- sharePointPassword: '',
- exchangeUrl: '',
- exchangeEmail: '',
- exchangeUserName: '',
- exchangePassword: '',
- savePassword: '',
- useCustomDemoData: false, // "Overrides default app data and configuration. The legacy (demo) configuration is applied immediately after the app is launched for the very first time (after installation). When user synchronizes with the target organization (Resco CRM/Dynamics 365/SalesForce), this configuration is thrown away and the app automatically takes the configuration from the server (as it was configured for that organization with Woodford)."
- demoDataOrgURL: '',
- demoDataUserMode: UserMode.Standard,
- demoDataUserName: '',
- demoDataPassword: '',
- };
- androidImages?: ImageData[];
- googlePlayImages?: ImageData[];
- googlePayTexts?: Blob;
- iOSImages?: ImageData[];
- appStoreImages?: ImageData[];
- appStoreTexts?: Blob;
- appStoreDemoAccount?: Blob;
- winImages?: ImageData[];
- winStoreTexts?: Blob;
- winStoreScreenshots?: ImageData[];
- // Features:
- turnOffWizard: boolean = true;
- turnOffTutorial: boolean = true
- excludeSpacyLibs: boolean = true; //Label: "Exclude spacy libs", Desc:"Switch on to reduce the app size by removing MapBox (offline maps), Glympse (position tracking) and support for Apple Watch"
- prefillOrganizationUrl: string = ''; // [Optional] Desc:"URL of the organization that has to be pre-filled in synchronization dialog."
- startupOptions: StartupOption; // Desc:"Determines hot the app should start during the first run. It can either start with demo data, it can show the sync dialog or it can force the sync dialog preventing user to close it."
- linkWithAppConnect = false;
- // defaultCustomization: ZIP (in the future)
- // pushServiceConfig - TBD
- // iOS Signing resources
- iOSSigningCert: string = ''; // [Optional] binary<.P12 file> only if (this.platforms & iOS) != 0 && this.appStoreDeployment == false
- iOSSigningCertPassword: string = ''; // [Optional] Password for signing certificate
- iOSProvisioningProfile: string = ''; // [Optional] binary<.mobilprovision file> only if (this.platforms & iOS) != 0 && this.appStoreDeployment == false
- public get urlScheme(): string {
- return this.packageName.replace(/\./g, '').toLowerCase() + '://';
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement