@resconet/jsbridge 15.2.0 → 15.3.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/JSBridge.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  // JSBridge.js TypeScript definition file
2
- // v15.2
3
2
  // (c) 2022 Resco
4
3
 
5
4
  declare module MobileCRM {
@@ -50,191 +49,191 @@ declare module MobileCRM {
50
49
 
51
50
  public static requestObject(callback: (config: Configuration) => void, erroCallback?: (error: string) => void, scope?: any);
52
51
  }
53
-
54
- class Settings {
55
- /**Gets the absolute URL (including the CrmOrganization).*/
52
+
53
+ class Settings {
54
+ /**Gets the absolute URL (including the CrmOrganization).*/
56
55
  absoluteUrl: string;
57
56
  /**Gets or sets the currently selected Application ID.*/
58
57
  activeAppID: string;
59
- /**Gets or sets the last active entity in the ActivityList.*/
60
- activityListInitialEntity: number;
61
- /**Gets or sets the application lock state (0=None, 1=Soft, 2=Permanent).*/
62
- applicationLock: number;
63
- /**Gets or sets the last active view mode in Calendar view.*/
64
- appointmentViewMode: number;
65
- /**Gets or sets the CRM server authentication method (0=ActiveDirectory, 1=CRM Online, 2=Internet facing., 3=CRM Online EMEA, 4=CRM Online APAC).*/
66
- authenticationType: number;
67
- /**Gets or sets when the application starts to sync on the background (0=Never, 1=OnStart, 2=OnChange, 3=OnStartAndChange).*/
68
- autoSync: number;
69
- /**Gets the number of seconds to wait before syncing after data change. Negative to disable.*/
70
- autoSyncAfterChange: number;
71
- /**Gets the number of seconds to wait before syncing after data change in online mode. 0 or negative to disable, default is 1.*/
72
- autoSyncAfterStart: number;
73
- /**Gets or sets the automatic sync delay in seconds.*/
74
- autoSyncDelay: number;
58
+ /**Gets or sets the last active entity in the ActivityList.*/
59
+ activityListInitialEntity: number;
60
+ /**Gets or sets the application lock state (0=None, 1=Soft, 2=Permanent).*/
61
+ applicationLock: number;
62
+ /**Gets or sets the last active view mode in Calendar view.*/
63
+ appointmentViewMode: number;
64
+ /**Gets or sets the CRM server authentication method (0=ActiveDirectory, 1=CRM Online, 2=Internet facing., 3=CRM Online EMEA, 4=CRM Online APAC).*/
65
+ authenticationType: number;
66
+ /**Gets or sets when the application starts to sync on the background (0=Never, 1=OnStart, 2=OnChange, 3=OnStartAndChange).*/
67
+ autoSync: number;
68
+ /**Gets the number of seconds to wait before syncing after data change. Negative to disable.*/
69
+ autoSyncAfterChange: number;
70
+ /**Gets the number of seconds to wait before syncing after data change in online mode. 0 or negative to disable, default is 1.*/
71
+ autoSyncAfterStart: number;
72
+ /**Gets or sets the automatic sync delay in seconds.*/
73
+ autoSyncDelay: number;
75
74
  /** Indicates whether the password can be used. All DB operations are forbidden until this flag is set.*/
76
75
  canUsePassword: boolean;
77
- /**Gets or sets whether entities can be disabled on the client.*/
78
- clientCustomize: boolean;
79
- /**Gets or sets whether to create the call entity after a call has been made from MobileCRM.*/
80
- createCallEntity: boolean;
81
- /**Gets or sets the discovered CRM service authentication server url.*/
82
- crm2011AuthUrl: string;
83
- /**Gets or sets the discovered CRM service authentication type.*/
84
- crm2011AuthType: string;
85
- /**Gets or sets the token (cookie) issued by LiveId services identifying this device.*/
86
- crmOnlineDeviceToken: Date;
87
- /**Gets or sets when the "CrmOnlineDeviceToken" expires (in UTC).*/
88
- crmOnlineDeviceTokenExpires: Date;
89
- /**Gets or sets the CRM organization (Absolute path in org url).*/
90
- crmOrganization: string;
91
- /**Gets or sets the discovered CRM service version (4 or 5).*/
92
- crmWebServiceVersion: number;
93
- /**Gets or sets the the discovered CRM service minor version (13 - for CRM 2011 Rollup 13 and up).*/
94
- crmWebServiceMinorVersion: number;
95
- /**Gets or sets the organization Pricing Decimal Precision configuration option (0..4).*/
96
- currencyDecimalPrecision: number;
97
- /**Gets or sets the currency field display option 0- Symbol ($), 1 - Code (USD).*/
98
- currencyDisplayOption: string;
99
- /**Gets or sets the customization directory.*/
100
- customizationDirectory: string;
101
- /**Gets or sets the database local language (for case-insensitive and language dependent compare). E.g. "en-US".*/
102
- databaseLocale: string;
103
- /**Gets the database schema hash.*/
104
- databaseSchemaHash: string;
105
- /**(Android only) Gets or sets the application Density (120=Low, 160=Medium, 240=High, 320=ExtraHigh, 480=ExtraExtraHigh).*/
106
- density: number;
107
- /**Gets or sets the device friendly name (Steve's iPhone).*/
108
- deviceFriendlyName: string;
109
- /**Gets or sets the hardware unique id.*/
110
- deviceIdentifier: string;
111
- /**Gets or sets the device system an hw information (OS, etc.)*/
112
- deviceInfo: string;
113
- /**Gets or sets the device name (Base64 encoded "InternalDeviceId").*/
114
- deviceName: string;
115
- /**Gets the names of the disabled entities. Use for limited runtime customization.*/
116
- disabledEntities: boolean;
117
- /**Gets or sets the user domain.*/
118
- domain: string;
119
- /**Gets or sets the email signature.*/
120
- emailSignature: string;
121
- /**(Android, WIndows Mobile)Enables the Call Import form (appears on the Home form)*/
122
- enableCallImport: boolean;
123
- /**Enables the Dashboard form (appears on the Home form).*/
124
- enableDashboard: boolean;
125
- enableListButtons: boolean;
126
- /**Enables the Map form (appears on the Home form).*/
127
- forcedFullSyncDate: Date;
128
- /**Prevents remembered password to be used for next login.*/
129
- forgetPassword: boolean;
130
- /**Gets or sets the option for generating the entity full name (contact, lead)
131
- e.g. how to combine the first, middle and last name (0="L,F", 1="F L", 2="L,F m", 3="F m L", 4="L,F M", 5="F M L", 6="L F", 7="LF").*/
132
- fullNameConventionCode: number;
133
- /**Gets whether there were any synchronization errors encountered.*/
134
- hasSyncErrors: boolean;
135
- /**Gets whether reminders should be scheduled for tasks.*/
136
- hasTaskReminder: boolean;
137
- /**Gets or sets the URL of the authentication server (ADFS) in case of multi domain deployment.*/
138
- homeRealm: string;
139
- /**Gets or sets whether to ignore HTTPS certificate errors. (Should be used for evaluation and DEBUG only!)*/
140
- ignoreCertificateErrors: boolean;
141
- /**Gets or sets the invalid login count.*/
142
- invalidLoginCount: number;
143
- /**Gets or sets the device id (GUID).*/
144
- internalDeviceId: string;
145
- /**(WP7 only)Gets or sets the UI theme (Dark or Light).*/
146
- isDarkTheme: boolean;
147
- /**Gets or sets whether the current database contains demo data and should not be synced.*/
148
- isDemoDatabase: boolean;
76
+ /**Gets or sets whether entities can be disabled on the client.*/
77
+ clientCustomize: boolean;
78
+ /**Gets or sets whether to create the call entity after a call has been made from MobileCRM.*/
79
+ createCallEntity: boolean;
80
+ /**Gets or sets the discovered CRM service authentication server url.*/
81
+ crm2011AuthUrl: string;
82
+ /**Gets or sets the discovered CRM service authentication type.*/
83
+ crm2011AuthType: string;
84
+ /**Gets or sets the token (cookie) issued by LiveId services identifying this device.*/
85
+ crmOnlineDeviceToken: Date;
86
+ /**Gets or sets when the "CrmOnlineDeviceToken" expires (in UTC).*/
87
+ crmOnlineDeviceTokenExpires: Date;
88
+ /**Gets or sets the CRM organization (Absolute path in org url).*/
89
+ crmOrganization: string;
90
+ /**Gets or sets the discovered CRM service version (4 or 5).*/
91
+ crmWebServiceVersion: number;
92
+ /**Gets or sets the the discovered CRM service minor version (13 - for CRM 2011 Rollup 13 and up).*/
93
+ crmWebServiceMinorVersion: number;
94
+ /**Gets or sets the organization Pricing Decimal Precision configuration option (0..4).*/
95
+ currencyDecimalPrecision: number;
96
+ /**Gets or sets the currency field display option 0- Symbol ($), 1 - Code (USD).*/
97
+ currencyDisplayOption: string;
98
+ /**Gets or sets the customization directory.*/
99
+ customizationDirectory: string;
100
+ /**Gets or sets the database local language (for case-insensitive and language dependent compare). E.g. "en-US".*/
101
+ databaseLocale: string;
102
+ /**Gets the database schema hash.*/
103
+ databaseSchemaHash: string;
104
+ /**(Android only) Gets or sets the application Density (120=Low, 160=Medium, 240=High, 320=ExtraHigh, 480=ExtraExtraHigh).*/
105
+ density: number;
106
+ /**Gets or sets the device friendly name (Steve's iPhone).*/
107
+ deviceFriendlyName: string;
108
+ /**Gets or sets the hardware unique id.*/
109
+ deviceIdentifier: string;
110
+ /**Gets or sets the device system an hw information (OS, etc.)*/
111
+ deviceInfo: string;
112
+ /**Gets or sets the device name (Base64 encoded "InternalDeviceId").*/
113
+ deviceName: string;
114
+ /**Gets the names of the disabled entities. Use for limited runtime customization.*/
115
+ disabledEntities: boolean;
116
+ /**Gets or sets the user domain.*/
117
+ domain: string;
118
+ /**Gets or sets the email signature.*/
119
+ emailSignature: string;
120
+ /**(Android, WIndows Mobile)Enables the Call Import form (appears on the Home form)*/
121
+ enableCallImport: boolean;
122
+ /**Enables the Dashboard form (appears on the Home form).*/
123
+ enableDashboard: boolean;
124
+ enableListButtons: boolean;
125
+ /**Enables the Map form (appears on the Home form).*/
126
+ forcedFullSyncDate: Date;
127
+ /**Prevents remembered password to be used for next login.*/
128
+ forgetPassword: boolean;
129
+ /**Gets or sets the option for generating the entity full name (contact, lead)
130
+ e.g. how to combine the first, middle and last name (0="L,F", 1="F L", 2="L,F m", 3="F m L", 4="L,F M", 5="F M L", 6="L F", 7="LF").*/
131
+ fullNameConventionCode: number;
132
+ /**Gets whether there were any synchronization errors encountered.*/
133
+ hasSyncErrors: boolean;
134
+ /**Gets whether reminders should be scheduled for tasks.*/
135
+ hasTaskReminder: boolean;
136
+ /**Gets or sets the URL of the authentication server (ADFS) in case of multi domain deployment.*/
137
+ homeRealm: string;
138
+ /**Gets or sets whether to ignore HTTPS certificate errors. (Should be used for evaluation and DEBUG only!)*/
139
+ ignoreCertificateErrors: boolean;
140
+ /**Gets or sets the invalid login count.*/
141
+ invalidLoginCount: number;
142
+ /**Gets or sets the device id (GUID).*/
143
+ internalDeviceId: string;
144
+ /**(WP7 only)Gets or sets the UI theme (Dark or Light).*/
145
+ isDarkTheme: boolean;
146
+ /**Gets or sets whether the current database contains demo data and should not be synced.*/
147
+ isDemoDatabase: boolean;
149
148
  /**Gets or sets whether the current user is demo user. */
150
149
  isDemoUser: boolean;
151
- /**Gets whether the login is for a CRM Online instance.*/
152
- isCrmOnline: boolean
153
- /**Gets whether the login information is valid and complete.
154
- Indicates whether the user name and password are non-empty.
155
- Whether they are correct is up to the we service. Also checks whether the web service url is non-empty.*/
156
- isValid: boolean;
157
- /**Gets or sets the UI text language.*/
158
- language: string;
159
- /**Gets or sets the time of the last processed call history entry.(Android, WM)*/
160
- lastProcessedCallTime: Date;
161
- /**Gets or sets the time of the last server contact (either sync or security policy).*/
162
- lastServerContact: Date;
163
- /**Gets or sets the last synchronization end date.*/
164
- lastSyncDate: Date;
165
- /**Gets or sets the last user interaction time.*/
166
- lastUserInteraction: Date;
167
- /**Gets or sets the synchronization service password.*/
168
- legacyPassword: string;
169
- /**Gets or sets the reason of the application lock.*/
170
- lockReason: string;
171
- /**Gets or sets the time in seconds after which the password expires and application login is required.*/
172
- loginTimeout: number;
173
- /**Gets or sets the maximum attachment size to sync (in KB).*/
174
- maxAttachmentSize: number;
175
- /**Gets or sets the maximum number of records (per entity) to download.*/
176
- maxSyncCount: number;
177
- /**Gets or sets whether to use multi-threaded synchronization. Default true.*/
178
- multiThreadSync: boolean;
179
- /**Gets or sets when and how the application is switched to online mode (0=Always, 1=WifiOnly, 2=Manual, 3=Never).*/
180
- onlineMode: number;
181
- /**Gets or sets the organization name. Obsolete, only for compatibility.*/
182
- organization: string;
183
- /** Gets or sets the current user's organization GUID (given by the server).*/
184
- organizationId: string;
185
- /**Gets or sets the synchronization service password.*/
186
- password: string;
187
- /**Gets or sets the password hash.*/
188
- passwordHash: string;
189
- /**Gets or sets the URL scheme of application used for making calls.*/
190
- phoneApplication: string;
191
- /**Gets or sets the push id used for push notification send to this device.(Android, iOS)*/
192
- pushId: string;
193
- /**Gets the list of read-only settings.*/
194
- readonlySettings: Array<string>;
195
- /**Gets or sets whether the user must login at sync start.*/
196
- requireSyncLogin: boolean;
197
- /**Gets or sets whether to store the encrypted password in the config file.*/
198
- savePassword: boolean;
199
- /**Gets or sets whether to store signature attachments as SVG (vector) or PNG (image).*/
200
- saveSignatureAsImage: boolean;
201
- /**Gets or sets the hash code of the last downloaded security policy (zero for no policy).*/
202
- secRulesHash: number;
203
- /**Gets the CRM server host name.*/
204
- serverHostName: string;
205
- /**Gets or sets the version of the settings file as send with the customization.*/
206
- serverSettingsVersion: string;
207
- /**Gets or sets the server version, either 4 for CRM 4.0 or 5 for CRM 2011.*/
208
- serverVersion: number;
209
- /**Gets or sets the number of incremental synchronizations performed so far.*/
210
- syncCount: number;
211
- /**Gets or sets the sync filter file hash code.*/
212
- syncFilterHash: string;
213
- /**Gets or sets the current user GUID (given by the server).*/
214
- systemUserId: string;
215
- /**Gets or sets the last active entity in the Tourplan (Calendar).*/
216
- tourplanInitialEntity: string;
217
- /**Gets or sets whether to update entity objectypecodes on first sync.*/
218
- updateObjectTypeCodes: boolean;
219
- /**Gets or sets whether to create a CRM email entity or use the platform email service.*/
220
- useCrmEmail: boolean;
221
- /**Gets or sets whether to store attachment blobs in database or in files. If you change this setting you must perform a full sync!*/
222
- useDatabaseBlobStore: boolean;
223
- /**Gets or sets whether the database is encrypted. Only used when the database is created (full sync). Default true.*/
224
- useDatabaseEncryption: boolean;
225
- /**Gets or sets the user's default currency GUID. If not set use the organization default.*/
226
- userDefaultCurrencyId: string;
227
- /**Gets or sets the full user name (domain slash name).*/
228
- userLogin: string;
229
- /**Gets or sets the user name.*/
230
- userName: string;
231
- /**Gets or sets whether to use RowVersion or ModifiedOn based sync. Default is true.*/
232
- useRowVersionChangeTracking: boolean;
233
- /**Gets or sets the web service URL used for synchronization.*/
234
- url: string;
235
- /**Gets or sets whether to verify server SSL certificate. Since 6.3, default false (don't verify SSL).*/
236
- verifyServerCertificate: boolean;
237
- }
150
+ /**Gets whether the login is for a CRM Online instance.*/
151
+ isCrmOnline: boolean
152
+ /**Gets whether the login information is valid and complete.
153
+ Indicates whether the user name and password are non-empty.
154
+ Whether they are correct is up to the we service. Also checks whether the web service url is non-empty.*/
155
+ isValid: boolean;
156
+ /**Gets or sets the UI text language.*/
157
+ language: string;
158
+ /**Gets or sets the time of the last processed call history entry.(Android, WM)*/
159
+ lastProcessedCallTime: Date;
160
+ /**Gets or sets the time of the last server contact (either sync or security policy).*/
161
+ lastServerContact: Date;
162
+ /**Gets or sets the last synchronization end date.*/
163
+ lastSyncDate: Date;
164
+ /**Gets or sets the last user interaction time.*/
165
+ lastUserInteraction: Date;
166
+ /**Gets or sets the synchronization service password.*/
167
+ legacyPassword: string;
168
+ /**Gets or sets the reason of the application lock.*/
169
+ lockReason: string;
170
+ /**Gets or sets the time in seconds after which the password expires and application login is required.*/
171
+ loginTimeout: number;
172
+ /**Gets or sets the maximum attachment size to sync (in KB).*/
173
+ maxAttachmentSize: number;
174
+ /**Gets or sets the maximum number of records (per entity) to download.*/
175
+ maxSyncCount: number;
176
+ /**Gets or sets whether to use multi-threaded synchronization. Default true.*/
177
+ multiThreadSync: boolean;
178
+ /**Gets or sets when and how the application is switched to online mode (0=Always, 1=WifiOnly, 2=Manual, 3=Never).*/
179
+ onlineMode: number;
180
+ /**Gets or sets the organization name. Obsolete, only for compatibility.*/
181
+ organization: string;
182
+ /** Gets or sets the current user's organization GUID (given by the server).*/
183
+ organizationId: string;
184
+ /**Gets or sets the synchronization service password.*/
185
+ password: string;
186
+ /**Gets or sets the password hash.*/
187
+ passwordHash: string;
188
+ /**Gets or sets the URL scheme of application used for making calls.*/
189
+ phoneApplication: string;
190
+ /**Gets or sets the push id used for push notification send to this device.(Android, iOS)*/
191
+ pushId: string;
192
+ /**Gets the list of read-only settings.*/
193
+ readonlySettings: Array<string>;
194
+ /**Gets or sets whether the user must login at sync start.*/
195
+ requireSyncLogin: boolean;
196
+ /**Gets or sets whether to store the encrypted password in the config file.*/
197
+ savePassword: boolean;
198
+ /**Gets or sets whether to store signature attachments as SVG (vector) or PNG (image).*/
199
+ saveSignatureAsImage: boolean;
200
+ /**Gets or sets the hash code of the last downloaded security policy (zero for no policy).*/
201
+ secRulesHash: number;
202
+ /**Gets the CRM server host name.*/
203
+ serverHostName: string;
204
+ /**Gets or sets the version of the settings file as send with the customization.*/
205
+ serverSettingsVersion: string;
206
+ /**Gets or sets the server version, either 4 for CRM 4.0 or 5 for CRM 2011.*/
207
+ serverVersion: number;
208
+ /**Gets or sets the number of incremental synchronizations performed so far.*/
209
+ syncCount: number;
210
+ /**Gets or sets the sync filter file hash code.*/
211
+ syncFilterHash: string;
212
+ /**Gets or sets the current user GUID (given by the server).*/
213
+ systemUserId: string;
214
+ /**Gets or sets the last active entity in the Tourplan (Calendar).*/
215
+ tourplanInitialEntity: string;
216
+ /**Gets or sets whether to update entity objectypecodes on first sync.*/
217
+ updateObjectTypeCodes: boolean;
218
+ /**Gets or sets whether to create a CRM email entity or use the platform email service.*/
219
+ useCrmEmail: boolean;
220
+ /**Gets or sets whether to store attachment blobs in database or in files. If you change this setting you must perform a full sync!*/
221
+ useDatabaseBlobStore: boolean;
222
+ /**Gets or sets whether the database is encrypted. Only used when the database is created (full sync). Default true.*/
223
+ useDatabaseEncryption: boolean;
224
+ /**Gets or sets the user's default currency GUID. If not set use the organization default.*/
225
+ userDefaultCurrencyId: string;
226
+ /**Gets or sets the full user name (domain slash name).*/
227
+ userLogin: string;
228
+ /**Gets or sets the user name.*/
229
+ userName: string;
230
+ /**Gets or sets whether to use RowVersion or ModifiedOn based sync. Default is true.*/
231
+ useRowVersionChangeTracking: boolean;
232
+ /**Gets or sets the web service URL used for synchronization.*/
233
+ url: string;
234
+ /**Gets or sets whether to verify server SSL certificate. Since 6.3, default false (don't verify SSL).*/
235
+ verifyServerCertificate: boolean;
236
+ }
238
237
 
239
238
  class Localization {
240
239
  public static stringTable: { [key: string]: string };
@@ -381,7 +380,7 @@ declare module MobileCRM {
381
380
  /**
382
381
  * Class for managing many to many relations.
383
382
  */
384
- class ManyToManyReference {
383
+ class ManyToManyReference {
385
384
  /**
386
385
  * [Obsolete]Adds or removes an N-N relationship record between the two passed entities.
387
386
  * @param entityName The relationship entity name.
@@ -464,7 +463,7 @@ declare module MobileCRM {
464
463
  getEntity(name: string): MobileCRM.MetaEntity;
465
464
  /**
466
465
  * Gets the MetaEntity object describing the entity attributes
467
- * @requires required to request the Metadata object prior to using this object. See @see MobileCRM.Metadata.requestObject .
466
+ * @requires required to request the Metadata object prior to using this object. See @see MobileCRM.Metadata.requestObject .
468
467
  * @param name logical name of entity.
469
468
  */
470
469
  static getEntity(name: string): MobileCRM.MetaEntity;
@@ -480,6 +479,8 @@ declare module MobileCRM {
480
479
  * Represents an entity metadata.
481
480
  */
482
481
  class MetaEntity {
482
+ attributes: EntityAttributes;
483
+
483
484
  canRead(): boolean;
484
485
  canWrite(): boolean;
485
486
  canCreate(): boolean;
@@ -536,6 +537,67 @@ declare module MobileCRM {
536
537
  isSingularParty: boolean;
537
538
  }
538
539
 
540
+ enum EntityAttributes {
541
+ /** No additional attributes. */
542
+ None = 0,
543
+ /** Entity is an activity. */
544
+ IsActivity = 0x0001,
545
+ /** Entity is a child. */
546
+ IsChild = 0x0002,
547
+ /** Custom entity. */
548
+ IsCustom = 0x0004,
549
+ /** Intersection entity (Many to Many). */
550
+ IsIntersect = 0x0008,
551
+ /** Entity is an regular activity. */
552
+ IsRegularActivity = 0x0010,
553
+ /** Entity is only available in online mode. */
554
+ IsOnlineOnly = 0x0020,
555
+ /** Disable read permission. */
556
+ NoRead = 0x0040,
557
+ /** Disable write permission. */
558
+ NoWrite = 0x0080,
559
+ /** Disable create permission. */
560
+ NoCreate = 0x0100,
561
+ /** Disable delete permission. */
562
+ NoDelete = 0x0200,
563
+ /** Disable append permission. */
564
+ NoAppend = 0x0400,
565
+ /** Disable appendTo permission. */
566
+ NoAppendTo = 0x0800,
567
+ /** Disable assign permission. */
568
+ NoAssign = 0x1000,
569
+ /** Disable share permission. */
570
+ NoShare = 0x2000,
571
+ /** Resolves conflict by letting the device win. */
572
+ ConflictDeviceWins = 0x4000,
573
+ /** Resolves conflict by taking no action. User must decide; only changed entity properties are uploaded to the server. */
574
+ ConflictUserAction = 0x8000,
575
+ /** Resolves conflict by letting the device win; all entity properties are uploaded to the server. */
576
+ ConflictDeviceWinsFullUpload = 0x10000,
577
+ /** The database table has labels for lookup fields. */
578
+ HasLookupLabels = 0x100000,
579
+ /** Incremental sync uses linked entities. */
580
+ SyncLinked = 0x200000,
581
+ /** Incremental sync does not use linked entities. */
582
+ NoSyncLinked = 0x400000,
583
+ /** Always force full sync for this entity (Upload. */
584
+ FullSync = 0x800000,
585
+ /** Audit database operations. */
586
+ DatabaseAudit = 0x1000000,
587
+ /** Incremental sync filter uses normal sync filter. */
588
+ IncrementalSyncFilter = 0x2000000,
589
+ /** Salesforce only - Sync will perform additional scanning to ensure all linked ContentDocuments visible to users are download for offline usage. */
590
+ DownloadAllLinkedSalesforceFiles = 0x4000000,
591
+ /** Dynamics only - Server Entity does not have VersionNumber (RowVersion) field. This flag is set if AppSettings.CustomizationLevel>0. */
592
+ NoVersionNumber = 0x8000000,
593
+ /** Salesforce only - Feed items for this entity should be synced */
594
+ SyncSalesforceEntityFeed = 0x10000000,
595
+ /** Sync uploader does not leave status update for 2nd pass, but uploads it with the data. */
596
+ UploadStatusWithData = 0x20000000,
597
+ /** Salesforce only - Shared records for this entity should be synced */
598
+ SyncSharedSalesforce = 0x40000000,
599
+ }
600
+
539
601
  class _DeviceInfo {
540
602
  name: string;
541
603
  oSVersion: string;
@@ -549,7 +611,7 @@ declare module MobileCRM {
549
611
  screenWidth: number;
550
612
  screenHeight: number;
551
613
  screenDensity: number;
552
- isMultiPanel: boolean;
614
+ isMultiPanel: boolean;
553
615
  customImagePath: string;
554
616
 
555
617
  public static openUrl(url: string);
@@ -585,24 +647,24 @@ declare module MobileCRM {
585
647
  * @returns Promise resolved with Location object.
586
648
  */
587
649
  public static getLocationAsync(age?: number, precision?: number, timeout?: number): Promise<Location>;
588
- public static requestObject(callback: (platform: Platform) => void, errorCallback: () => void, scope?: any);
589
- /**
590
- * @since 8.1
591
- * Opens the platform-specific call application with specified phone number.
592
- * @param phoneNumber Phone number.
593
- * @param failed A callback function for command failure. The <b>error</b> argument will carry the error message.
650
+ public static requestObject(callback: (platform: Platform) => void, errorCallback: () => void, scope?: any);
651
+ /**
652
+ * @since 8.1
653
+ * Opens the platform-specific call application with specified phone number.
654
+ * @param phoneNumber Phone number.
655
+ * @param failed A callback function for command failure. The <b>error</b> argument will carry the error message.
594
656
  * @param scope A scope for calling the callbacks; set &quot;null&quot; to call the callbacks in global scope.
595
- */
596
- public static makeCall(phoneNumber: string, failed?: (error: string) => void, scope?: any);
597
- /**
598
- * @since 11.2.3
599
- * Opens the platform-specific sms application with specified phone number and pre-fill text.
600
- * @param phoneNumber Phone number.
601
- * @param text SMS text.
602
- * @param failed A callback function for command failure. The <b>error</b> argument will carry the error message.
657
+ */
658
+ public static makeCall(phoneNumber: string, failed?: (error: string) => void, scope?: any);
659
+ /**
660
+ * @since 11.2.3
661
+ * Opens the platform-specific sms application with specified phone number and pre-fill text.
662
+ * @param phoneNumber Phone number.
663
+ * @param text SMS text.
664
+ * @param failed A callback function for command failure. The <b>error</b> argument will carry the error message.
603
665
  * @param scope A scope for calling the callbacks; set &quot;null&quot; to call the callbacks in global scope.
604
- */
605
- public static sendSMS(phoneNumber: string, text: string, failed?: (error: string) => void, scope?: any);
666
+ */
667
+ public static sendSMS(phoneNumber: string, text: string, failed?: (error: string) => void, scope?: any);
606
668
  /**
607
669
  * @since 8.1
608
670
  * Opens the platform-specific e-mail message form with pre-filled data.
@@ -619,7 +681,7 @@ declare module MobileCRM {
619
681
  * @param address Recipients email address.
620
682
  * @param subject An e-mail subject.
621
683
  * @param body A string with email body.
622
- * @param mimeType Body content MIME type.
684
+ * @param mimeType Body content MIME type.
623
685
  * @param errorCallback The errorCallback which is called asynchronously in case of error.
624
686
  * @param scope The scope for errorCallback.
625
687
  */
@@ -661,12 +723,12 @@ declare module MobileCRM {
661
723
  }
662
724
 
663
725
  class Application {
664
- public static synchronize(backgroundOnly: boolean, ifNotSyncedBefore: Date);
665
- public static synchronizeOnForeground(forceLogin: boolean);
666
- public static getAppColor(colName: string, success: (url: string) => void, failed?: (err: string) => void, scope?: any);
667
- public static getAppImage(imageName: string, colorize: string, success: (url: string) => void, failed?: (err: string) => void, scope?: any);
726
+ static synchronize(backgroundOnly: boolean, ifNotSyncedBefore: Date);
727
+ static synchronizeOnForeground(forceLogin: boolean);
728
+ static getAppColor(colName: string, success: (url: string) => void, failed?: (err: string) => void, scope?: any);
729
+ static getAppImage(imageName: string, colorize: string, success: (url: string) => void, failed?: (err: string) => void, scope?: any);
668
730
  /** Display application login form. */
669
- public static showAppLogin();
731
+ static showAppLogin();
670
732
  /**
671
733
  * Sets the application colors.
672
734
  * @since 11.2.2
@@ -675,7 +737,7 @@ declare module MobileCRM {
675
737
  * @param failed The error callback which is called asynchronously in case of error.
676
738
  * @param scope The scope for callbacks.
677
739
  */
678
- public static setAppColors(colors: { [colorName: string]: number | string }, success?: () => void, failed?: (err: string) => void, scope?: any);
740
+ static setAppColors(colors: { [colorName: string]: number | string }, success?: () => void, failed?: (err: string) => void, scope?: any);
679
741
  /**
680
742
  * Gets the last detected time change.
681
743
  * @since 13.3.1
@@ -683,19 +745,42 @@ declare module MobileCRM {
683
745
  * @param failed The error callback which is called asynchronously in case of error.
684
746
  * @param scope Optional scope for callbacks.
685
747
  */
686
- public static getLastSignificantTimeChange(success: (timeChange: ITimeChange) => void, failed?: (err: string) => void, scope?: any);
687
- public static fileExists(path: string, success: (exist: boolean) => void, failed?: (err: string) => void, scope?: any);
688
- public static directoryExists(path: string, success: (exist: boolean) => void, failed?: (err: string) => void, scope?: any);
689
- public static createDirectory(path: string, success?: () => void, failed?: (err: string) => void, scope?: any);
690
- public static deleteDirectory(path: string, success?: () => void, failed?: (err: string) => void, scope?: any);
691
- public static getDirectories(path: string, success: (directoriesList: Array<string>) => void, failed?: (err: string) => void, scope?: any);
692
- public static deleteFile(path: string, success?: () => void, failed?: (error: string) => void, scope?: any);
693
- public static getFiles(path: string, success: (filesList: Array<string>) => void, failed?: (err: string) => void, scope?: any);
694
- public static moveFile(src: string, dst: string, success?: () => void, failed?: (err: string) => void, scope?: any);
695
- public static readFile(path: string, success: (fileContent: string) => void, failed?: (err: string) => void, scope?: any);
696
- public static writeFile(path: string, text: string, append: boolean, success?: () => void, failed?: (err: string) => void, scope?: any);
697
- public static readFileAsBase64(path: string, success: (base64: string) => void, failed?: (err: string) => void, scope?: any);
698
- public static writeFileFromBase64(path: string, base64: string, success?: () => void, failed?: (err: string) => void, scope?: any);
748
+ static getLastSignificantTimeChange(success: (timeChange: ITimeChange) => void, failed?: (err: string) => void, scope?: any);
749
+ static fileExists(path: string, success: (exist: boolean) => void, failed?: (err: string) => void, scope?: any);
750
+ static fileExistsAsync(path: string): Promise<boolean>;
751
+ static directoryExists(path: string, success: (exist: boolean) => void, failed?: (err: string) => void, scope?: any);
752
+ static directoryExistsAsync(path: string): Promise<boolean>;
753
+ static createDirectory(path: string, success?: () => void, failed?: (err: string) => void, scope?: any);
754
+ static createDirectoryAsync(path: string): Promise<void>;
755
+ static deleteDirectory(path: string, success?: () => void, failed?: (err: string) => void, scope?: any);
756
+ static deleteDirectoryAsync(path: string): Promise<void>;
757
+ static getDirectories(path: string, success: (directoriesList: Array<string>) => void, failed?: (err: string) => void, scope?: any);
758
+ static getDirectoriesAsync(path: string): Promise<string[]>;
759
+ static deleteFile(path: string, success?: () => void, failed?: (error: string) => void, scope?: any);
760
+ static deleteFileAsync(path: string): Promise<void>;
761
+ static getFiles(path: string, success: (filesList: Array<string>) => void, failed?: (err: string) => void, scope?: any);
762
+ static getFilesAsync(path: string): Promise<string[]>;
763
+ static moveFile(src: string, dst: string, success?: () => void, failed?: (err: string) => void, scope?: any);
764
+ static moveFileAsync(src: string, dst: string): Promise<void>;
765
+ static readFile(path: string, success: (fileContent: string) => void, failed?: (err: string) => void, scope?: any);
766
+ /**
767
+ * @since 15.3
768
+ * Reads the file from the application local data and asynchronously gets its content.
769
+ * @param path Defines the relative path of the file in the application local data.
770
+ * @param encoding Defines the text encoding for file content (default is UTF8). Use base64 for binary files. Supported values: UTF8, UTF16 ASCII, BASE64.
771
+ */
772
+ static readFileAsync(path: string, encoding?: "UTF8" | "UTF16" | "ASCII" | "base64"): Promise<string>;
773
+ static writeFile(path: string, text: string, append: boolean, success?: () => void, failed?: (err: string) => void, scope?: any);
774
+ /**
775
+ * @since 15.3
776
+ * Asynchronously writes data into the file from the application local data.
777
+ * @param path Defines the relative path of the file in the application local data.
778
+ * @param text Defines the file content (in corresponding text encoding) to be written.
779
+ * @param encoding Defines the text encoding for file content (default is UTF8). Use base64 for binary files. Supported values: UTF8, UTF16 ASCII, BASE64.
780
+ */
781
+ static writeFileAsync(path: string, text: string, encoding?: "UTF8" | "UTF16" | "ASCII" | "base64"): Promise<void>;
782
+ static readFileAsBase64(path: string, success: (base64: string) => void, failed?: (err: string) => void, scope?: any);
783
+ static writeFileFromBase64(path: string, base64: string, success?: () => void, failed?: (err: string) => void, scope?: any);
699
784
  /**
700
785
  * @since 9.0.2
701
786
  * Asynchronously writes the text into the file from the application local data.
@@ -707,7 +792,7 @@ declare module MobileCRM {
707
792
  * @param errorCallback The errorCallback which is called asynchronously in case of error.
708
793
  * @param scope The scope for callback.
709
794
  */
710
- public static writeFileWithEncoding(path: string, text: string, encoding: string, append: boolean, success: () => void, failed?: (err: string) => void, scope?: any);
795
+ static writeFileWithEncoding(path: string, text: string, encoding: string, append: boolean, success: () => void, failed?: (err: string) => void, scope?: any);
711
796
  /**
712
797
  * @since 12.1
713
798
  * Asynchronously refresh access token using saved token in protected settings and send serialized token to success callback
@@ -716,7 +801,7 @@ declare module MobileCRM {
716
801
  * @param errorCallback The errorCallback which is called asynchronously in case of error.
717
802
  * @param scope The scope for callback.
718
803
  */
719
- public static getAccessToken(resource, success: (textAccessToken: string) => void, failed?: (err: string) => void, scope?: any);
804
+ static getAccessToken(resource, success: (textAccessToken: string) => void, failed?: (err: string) => void, scope?: any);
720
805
  /**
721
806
  * Checks whether the current user is member of the passed roles. Role can be either the Guid (aeb33d0f-89b4-e111-9c9a-00155d0b710a) or the role Name.
722
807
  * @param roles Defines the roles to check.
@@ -724,7 +809,7 @@ declare module MobileCRM {
724
809
  * @param failed A callback function for command failure. The error argument will carry the error message.
725
810
  * @param scope A scope for calling the callback.
726
811
  */
727
- public static checkUserRoles(roles: [string], success?: (roles: number) => void, failed?: (err: string) => void, scope?: any);
812
+ static checkUserRoles(roles: [string], success?: (roles: number) => void, failed?: (err: string) => void, scope?: any);
728
813
  }
729
814
 
730
815
  class AboutInfo {
@@ -742,13 +827,13 @@ declare module MobileCRM {
742
827
 
743
828
  /**
744
829
  * @since 13.0
745
- * Encapsulate methods and properties what can be used for integration.
830
+ * Encapsulate methods and properties what can be used for integration.
746
831
  */
747
832
  class Integration {
748
833
  /**
749
834
  * @since 13.0
750
835
  * Asynchronously gets the token using passed OAuth settings and parameters. Configuration name is used to find already settings.
751
- * @param configurationName Define the name of oauth configuration, what is key for saved setting if any.
836
+ * @param configurationName Define the name of oauth configuration, what is key for saved setting if any.
752
837
  * @param oauthSettings Defines the OAuth settings for authentication.
753
838
  * @param prompt Whether to force the user to enter credentials again.
754
839
  * @param success A callback function for successful asynchronous result. The <b>result</b> will carry a string with the access token.
@@ -759,8 +844,8 @@ declare module MobileCRM {
759
844
  }
760
845
 
761
846
  /**
762
- * @since 13.0
763
- * Represents the settings what are used to authenticate using OAuth server account
847
+ * @since 13.0
848
+ * Represents the settings what are used to authenticate using OAuth server account
764
849
  */
765
850
  class OAuthSettings {
766
851
  /**
@@ -768,7 +853,6 @@ declare module MobileCRM {
768
853
  * @param configName The Configuration name.
769
854
  */
770
855
  constructor();
771
-
772
856
  /** Gets or sets the OAuth token url. */
773
857
  public authorityEndPoint: string;
774
858
  /** Gets or sets the authorization url to get authorization code. */
@@ -816,7 +900,16 @@ declare module MobileCRM {
816
900
  * @returns The file path to successfully created report.
817
901
  */
818
902
  static runReportAsync(fetch: string, reportXML: string, reportFormat: string, isExportOnly: boolean, isOnline: boolean, outputFile: string): Promise<string>;
819
- static showForm(entityName: string, source: Array<MobileCRM.Reference>, fetchXml: string, failed?: (err: string) => void, scope?: any);
903
+ /**
904
+ * @since 10.1
905
+ * Shows new MobileReport form. Source for the report can be defined either as list of MobileCRM.Reference objects or as FetchXML query.
906
+ * @param report Optional reference to the resco_mobilereport entity that will be pre-selected.
907
+ * @param source The list of entity references used as report input.
908
+ * @param fetchXml The fetch XML defining the entity (entities) query used as report input.
909
+ * @param failed A callback which is called in case of error.
910
+ * @param scope The scope for callbacks.
911
+ */
912
+ static showForm(report: MobileCRM.Reference, source: Array<MobileCRM.Reference>, fetchXml: string, failed?: (err: string) => void, scope?: any);
820
913
  }
821
914
  class Questionnaire {
822
915
  static getQuestionName(name: string, repeatIndex: number): string;
@@ -1111,12 +1204,12 @@ declare module MobileCRM.Services {
1111
1204
  address: string;
1112
1205
  public static getCompanyInfoFromVat(vat: string | number, success: (result: MobileCRM.Services.CompanyInformation) => void, failed?: (err: string) => void, scope?: any);
1113
1206
  }
1114
- class FileInfo {
1115
- filePath: string;
1116
- url: string;
1207
+ class FileInfo {
1208
+ filePath: string;
1209
+ url: string;
1117
1210
  mimeType: string;
1118
1211
  nextInfo: FileInfo;
1119
- }
1212
+ }
1120
1213
  class DocumentService {
1121
1214
  /**Gets or sets the maximum captured image size. If captured image size is greater, the image is resized to specified maximum size. [640x480,1024x768,1600x1200,2048x1536,2592x1936].*/
1122
1215
  maxImageSize: string;
@@ -1131,16 +1224,16 @@ declare module MobileCRM.Services {
1131
1224
  /**Indicates whether to allow handling of cancel event. Callback will pass the null argument in this case.*/
1132
1225
  allowCancelHandler: boolean;
1133
1226
 
1134
- capturePhoto(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1135
- selectPhoto(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1227
+ capturePhoto(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1228
+ selectPhoto(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1136
1229
  selectMultiplePhotos(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1137
1230
  loadFrom(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1138
1231
  loadFromMultiple(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1139
1232
  selectFile(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1140
1233
  selectMultipleFiles(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1141
- recordAudio(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1142
- recordVideo(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1143
- pasteFile(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1234
+ recordAudio(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1235
+ recordVideo(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1236
+ pasteFile(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1144
1237
  resizeImage(filePath: string, maxWidth: number, maxHeight: number, callback: (result: boolean) => void, scope?: any);
1145
1238
  /**
1146
1239
  * @since 11.2
@@ -1152,22 +1245,22 @@ declare module MobileCRM.Services {
1152
1245
  * @param scope A scope for calling the callbacks. Set to call the callbacks in global scope.
1153
1246
  */
1154
1247
  saveFileDialog(fileName: string, fileData: string, success: (result: boolean) => void, failed?: (err: string) => void, scope?: any)
1155
- }
1248
+ }
1156
1249
  /** Represents the synchronization result.
1157
1250
  * @property newCustomizationReady {boolean} Indicates whether the new customization is ready.
1158
- * @property customizationDownloaded {boolean} Indicates whether the new customization was applied.
1159
- * @property dataErrorsEncountered {boolean} Indicates whether some data errors were encountered during sync (cannot upload, delete, change status, owner, etc.).
1160
- * @property appWasLocked {boolean} Application was locked.
1161
- * @property syncAborted {boolean} Sync was aborted.
1162
- * @property adminFullSync {boolean} Full sync was requested so background sync was aborted.
1163
- * @property wasBackgroundSync {boolean} Indicates whether the last sync was background sync or foreground sync.
1164
- * @property connectFailed {boolean} Indicates whether sync could not start because of a connection failure.
1165
- * @property webError {boolean} Indicates whether sync failed due to a communication error (HttpException, for example).
1166
- * @property OAuthError {boolean} Sync failed because the OAuth access token can't be acquired or refreshed.
1167
- * @property syncDownloadRestartedOnBackground {boolean} New customization was downloaded. Sync is still downloading data on background.
1168
- * @property warning {boolean} Sync result contains some warnings that are not critical.
1251
+ * @property customizationDownloaded {boolean} Indicates whether the new customization was applied.
1252
+ * @property dataErrorsEncountered {boolean} Indicates whether some data errors were encountered during sync (cannot upload, delete, change status, owner, etc.).
1253
+ * @property appWasLocked {boolean} Application was locked.
1254
+ * @property syncAborted {boolean} Sync was aborted.
1255
+ * @property adminFullSync {boolean} Full sync was requested so background sync was aborted.
1256
+ * @property wasBackgroundSync {boolean} Indicates whether the last sync was background sync or foreground sync.
1257
+ * @property connectFailed {boolean} Indicates whether sync could not start because of a connection failure.
1258
+ * @property webError {boolean} Indicates whether sync failed due to a communication error (HttpException, for example).
1259
+ * @property OAuthError {boolean} Sync failed because the OAuth access token can't be acquired or refreshed.
1260
+ * @property syncDownloadRestartedOnBackground {boolean} New customization was downloaded. Sync is still downloading data on background.
1261
+ * @property warning {boolean} Sync result contains some warnings that are not critical.
1169
1262
  */
1170
- class SynchronizationResult {
1263
+ class SynchronizationResult {
1171
1264
  constructor(synchronizationResult?: number);
1172
1265
  newCustomizationReady: boolean;
1173
1266
  customizationDownloaded: boolean;
@@ -1181,77 +1274,77 @@ declare module MobileCRM.Services {
1181
1274
  OAuthError: boolean;
1182
1275
  syncDownloadRestartedOnBackground: boolean;
1183
1276
  warning: boolean;
1184
- }
1185
- class AddressBookService {
1186
- public static getService(errorCallback?: (error: string) => void, scope?: any): AddressBookService;
1187
- getContact(id: string, callback: (addressBookRecord: MobileCRM.Services.AddressBookService.AddressBookRecord) => void, errorCallback?: (error: string) => void, scope?: any);
1188
- }
1189
- class ChatService {
1190
- chatUser: MobileCRM.DynamicEntity;
1191
- userEntity: string;
1192
- userId: string;
1193
-
1194
- static getService(callback: (res: MobileCRM.Services.ChatService) => void, errorCallback?: (error: string) => void, scope?: any);
1195
- postMessage(regardingEntity: MobileCRM.Reference, text: string, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1196
- attachNoteToPost(postId: string, filePath: string, mimeType: string, subject: string, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1197
- subscribeToEntityChannel(regardingEntity: MobileCRM.Reference, subscribe: boolean, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1198
- }
1199
-
1200
- class GeoAddress {
1201
- streetNumber: string;
1202
- street: string;
1203
- city: string;
1204
- zip: string;
1205
- stateOrProvince: string;
1206
- country: string;
1207
- isValid: string;
1208
-
1209
- public static fromLocation(latitude: number, longitude: number, success: (res: MobileCRM.Services.GeoAddress) => void, failed?: (error: string) => void, scope?: any);
1210
- public toLocation(success: (res: Location) => void, failed?: (error: string) => void, scope?: any);
1211
- }
1212
- class HttpWebRequest {
1213
- /**The HTTP method to use for the request (e.g. "POST", "GET", "PUT")*/
1214
- public method: string;
1215
- /**An object of additional header key/value pairs to send along with requests using the HttpWebRequest.*/
1216
- public headers: any;
1217
- /**The body content of HttpWebRequest.*/
1218
- private body: string;
1219
- /**ending data content type.*/
1220
- public contentType: string;
1221
- /**The encoding (default: UTF-8), e.g. UTF-8, ASCII, Base64*/
1222
- private encoding: number;
1223
- /**The HttpWebResponse content type.*/
1224
- private responseType: string;
1225
- /**
1226
- * Allow to send http web request against an HTTP server.
1227
- * @param url Url of server where HTTP request will be sent.
1228
- * @param callback A callback function which will obtain the web response. @see IWebResponse.
1229
- * @param scope The scope for callbacks.
1230
- */
1277
+ }
1278
+ class AddressBookService {
1279
+ public static getService(errorCallback?: (error: string) => void, scope?: any): AddressBookService;
1280
+ getContact(id: string, callback: (addressBookRecord: MobileCRM.Services.AddressBookService.AddressBookRecord) => void, errorCallback?: (error: string) => void, scope?: any);
1281
+ }
1282
+ class ChatService {
1283
+ chatUser: MobileCRM.DynamicEntity;
1284
+ userEntity: string;
1285
+ userId: string;
1286
+
1287
+ static getService(callback: (res: MobileCRM.Services.ChatService) => void, errorCallback?: (error: string) => void, scope?: any);
1288
+ postMessage(regardingEntity: MobileCRM.Reference, text: string, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1289
+ attachNoteToPost(postId: string, filePath: string, mimeType: string, subject: string, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1290
+ subscribeToEntityChannel(regardingEntity: MobileCRM.Reference, subscribe: boolean, callback?: (res: MobileCRM.DynamicEntity) => void, errorCallback?: (error: string) => void, scope?: any);
1291
+ }
1292
+
1293
+ class GeoAddress {
1294
+ streetNumber: string;
1295
+ street: string;
1296
+ city: string;
1297
+ zip: string;
1298
+ stateOrProvince: string;
1299
+ country: string;
1300
+ isValid: string;
1301
+
1302
+ public static fromLocation(latitude: number, longitude: number, success: (res: MobileCRM.Services.GeoAddress) => void, failed?: (error: string) => void, scope?: any);
1303
+ public toLocation(success: (res: Location) => void, failed?: (error: string) => void, scope?: any);
1304
+ }
1305
+ class HttpWebRequest {
1306
+ /**The HTTP method to use for the request (e.g. "POST", "GET", "PUT")*/
1307
+ public method: string;
1308
+ /**An object of additional header key/value pairs to send along with requests using the HttpWebRequest.*/
1309
+ public headers: any;
1310
+ /**The body content of HttpWebRequest.*/
1311
+ private body: string;
1312
+ /**ending data content type.*/
1313
+ public contentType: string;
1314
+ /**The encoding (default: UTF-8), e.g. UTF-8, ASCII, Base64*/
1315
+ private encoding: number;
1316
+ /**The HttpWebResponse content type.*/
1317
+ private responseType: string;
1318
+ /**
1319
+ * Allow to send http web request against an HTTP server.
1320
+ * @param url Url of server where HTTP request will be sent.
1321
+ * @param callback A callback function which will obtain the web response. @see IWebResponse.
1322
+ * @param scope The scope for callbacks.
1323
+ */
1231
1324
  public send(url: string, callback: (res: IWebResponse) => void, scope?: any);
1232
1325
  /**
1233
- * Allow to send http web request against an HTTP server.
1234
- * @param url Url of server where HTTP request will be sent.
1326
+ * Allow to send http web request against an HTTP server.
1327
+ * @param url Url of server where HTTP request will be sent.
1235
1328
  * @returns A Promise object which is asynchronously resolved with the web response object, or rejected with the web response object, where responseText contains error message. @see IWebResponse.
1236
- */
1329
+ */
1237
1330
  public sendAsync(url: string): Promise<IWebResponse>;
1238
- /**
1239
- * Set content body of http web request.
1240
- * @param body The body content.
1241
- * @param encoding The encoding (e.g. UTF-8, ASCII, Base64. Binary)
1242
- */
1243
- public setBody(body: string, encoding: string);
1244
- /**
1245
- * Set Network credentials information.
1246
- * @param userName The authentication user name.
1247
- * @param password The authentication password.
1248
- */
1249
- public setCredentials(userName: string, password: string);
1250
- /**
1251
- * Set encoding for content type of http web response
1252
- * @param encoding The encoding (e.g. UTF-8, ASCII, Base64)
1253
- */
1254
- public setResponseEncoding(encoding: string);
1331
+ /**
1332
+ * Set content body of http web request.
1333
+ * @param body The body content.
1334
+ * @param encoding The encoding (e.g. UTF-8, ASCII, Base64. Binary)
1335
+ */
1336
+ public setBody(body: string, encoding: string);
1337
+ /**
1338
+ * Set Network credentials information.
1339
+ * @param userName The authentication user name.
1340
+ * @param password The authentication password.
1341
+ */
1342
+ public setCredentials(userName: string, password: string);
1343
+ /**
1344
+ * Set encoding for content type of http web response
1345
+ * @param encoding The encoding (e.g. UTF-8, ASCII, Base64)
1346
+ */
1347
+ public setResponseEncoding(encoding: string);
1255
1348
  }
1256
1349
  class AIVision {
1257
1350
  /**
@@ -1279,7 +1372,7 @@ declare module MobileCRM.Services {
1279
1372
  */
1280
1373
  recognizeSelectedPicture(success: (res: MobileCRM.Services.IAIVisionResult) => void, failed?: (error: string) => void, scope?: any);
1281
1374
  }
1282
- /** Represents the settings for AI image recognition service.</summary> */
1375
+ /** Represents the settings for AI image recognition service. */
1283
1376
  class AIVisionSettings {
1284
1377
  /** Gets or sets the model name. */
1285
1378
  public modelName: string;
@@ -1300,11 +1393,11 @@ declare module MobileCRM.Services {
1300
1393
  probability: string;
1301
1394
  }
1302
1395
 
1303
- interface IWebResponse {
1304
- responseCode: number;
1305
- responseText: string;
1306
- responseType: string;
1307
- }
1396
+ interface IWebResponse {
1397
+ responseCode: number;
1398
+ responseText: string;
1399
+ responseType: string;
1400
+ }
1308
1401
 
1309
1402
  }
1310
1403
  declare module MobileCRM.Services.AddressBookService {
@@ -1398,13 +1491,13 @@ declare module MobileCRM.UI {
1398
1491
  value: MobileCRM.Reference | string;
1399
1492
  }
1400
1493
 
1401
- class _DetailView {
1402
- items: Array<DetailViewItems.Item>;
1494
+ class _DetailView {
1495
+ items: Array<DetailViewItems.Item>;
1403
1496
  getItemByName(name: string): MobileCRM.UI._DetailItem;
1404
- getItemIndex(name: string): number;
1497
+ getItemIndex(name: string): number;
1405
1498
  insertItem(item: MobileCRM.UI._DetailItem, index: number);
1406
- insertItems(items: Array<MobileCRM.UI._DetailItem>, index: number);
1407
- removeItem(index: number);
1499
+ insertItems(items: Array<MobileCRM.UI._DetailItem>, index: number);
1500
+ removeItem(index: number);
1408
1501
  removeItems(indexes: Array<number>);
1409
1502
  isDirty: boolean;
1410
1503
  /**
@@ -1485,8 +1578,8 @@ declare module MobileCRM.UI {
1485
1578
  canClose: boolean;
1486
1579
  /** Gets the specific context object for onChange and onSave handlers. The onChange context contains single property 'changedItem' with the name of the changed detail item and the onSave context contains property 'errorMessage' which can be used to break the save process with certain error message.*/
1487
1580
  context?: IFormSaveContext | IFormChangeContext | IFormDetailCollectionChangeContext;
1488
- /** Gets the current view of entity list.*/
1489
- currentView: string;
1581
+ /** Gets the current view of entity list.*/
1582
+ currentView: string;
1490
1583
  /** Gets the form controllers (map, web) as an array of { MobileCRM.UI._Controller } objects.*/
1491
1584
  controllers: Array<_Controller>;
1492
1585
  /** Gets the detailView controls as an array of { MobileCRM.UI._DetailView } objects.*/
@@ -1538,21 +1631,21 @@ declare module MobileCRM.UI {
1538
1631
  */
1539
1632
  cancelValidation(errorMsg: string);
1540
1633
  /**
1541
- * @since 8.0
1634
+ * @since 8.0
1542
1635
  * Selects the form tab by its name.
1543
1636
  * @param tabName The name of the tab.
1544
1637
  * @param errorCallback The errorCallback which is called asynchronously in case of error.
1545
1638
  * @param scope The scope for callback.
1546
1639
  */
1547
- selectTab(tabName: string, errorCallback?: (err: string) => void, scope?: any);
1548
- /**
1549
- * @since 8.0
1550
- * Selects the form tab by its name using static method.
1551
- * @param tabName The name of the tab.
1552
- * @param errorCallback The errorCallback which is called asynchronously in case of error.
1553
- * @param scope The scope for callback.
1554
- */
1555
- public static selectTabEx(tabName: string, errorCallback?: (err: string) => void, scope?: any);
1640
+ selectTab(tabName: string, errorCallback?: (err: string) => void, scope?: any);
1641
+ /**
1642
+ * @since 8.0
1643
+ * Selects the form tab by its name using static method.
1644
+ * @param tabName The name of the tab.
1645
+ * @param errorCallback The errorCallback which is called asynchronously in case of error.
1646
+ * @param scope The scope for callback.
1647
+ */
1648
+ public static selectTabEx(tabName: string, errorCallback?: (err: string) => void, scope?: any);
1556
1649
  /**
1557
1650
  * The name of the associated entity list tab.
1558
1651
  * @param tabName The name of the associated entity list tab.
@@ -1582,14 +1675,14 @@ declare module MobileCRM.UI {
1582
1675
  * A request object with single function 'resumePostSave'; which has to be called after all necessary operations completed.
1583
1676
  */
1584
1677
  suspendPostSave(): IFormPostSaveHandler;
1585
- /**
1678
+ /**
1586
1679
  * @since 9.1
1587
1680
  * Reactivates inactive entity and reloads the form.
1588
1681
  * @param statuscode Activation status code.
1589
1682
  */
1590
- reactivateEntity(statuscode: number);
1683
+ reactivateEntity(statuscode: number);
1591
1684
 
1592
- /**
1685
+ /**
1593
1686
  * Requests the managed EntityForm object.
1594
1687
  * @description Method initiates an asynchronous request which either ends with calling the errorCallback or with calling the callback with Javascript version of EntityForm object. See { MobileCRM.Bridge.requestObject } for further details.
1595
1688
  * @param callback The callback function that is called asynchronously with serialized EntityForm object as argument. Callback should return true to apply changed properties.
@@ -1604,7 +1697,7 @@ declare module MobileCRM.UI {
1604
1697
  /**
1605
1698
  * Binds or unbinds the handler for onSave event on EntityForm.
1606
1699
  * @param handler The handler function that has to be bound or unbound.
1607
- * @param bind Determines whether to bind or unbind the handler.
1700
+ * @param bind Determines whether to bind or unbind the handler.
1608
1701
  * @param scope The scope for callbacks.
1609
1702
  */
1610
1703
  public static onSave(handler: (entityForm: EntityForm) => void, bind: boolean, scope?: any);
@@ -1624,9 +1717,9 @@ declare module MobileCRM.UI {
1624
1717
  */
1625
1718
  public static onProcessLoaded(handler: (entityForm: EntityForm) => void, bind: boolean, scope?: any);
1626
1719
  /**
1627
- * @since 11.2
1720
+ * @since 11.2
1628
1721
  * Binds or unbinds the handler for specific item change event on EntityForm.
1629
- * @param itemName The name of desired detail item (mostly logical name of the field).
1722
+ * @param itemName The name of desired detail item (mostly logical name of the field).
1630
1723
  * @param handler The handler function that has to be bound or unbound.
1631
1724
  * @param bind Determines whether to bind or unbind the handler.
1632
1725
  * @param scope The scope for callbacks.
@@ -1733,7 +1826,7 @@ declare module MobileCRM.UI {
1733
1826
  errorMessage: string;
1734
1827
  }
1735
1828
  interface IFormChangeContext {
1736
- changedItem: string;
1829
+ changedItem: string;
1737
1830
  selectedView: string;
1738
1831
  }
1739
1832
  /** Represents context of change on entity form detail collection. */
@@ -1976,9 +2069,9 @@ declare module MobileCRM.UI {
1976
2069
  */
1977
2070
  enum EntityListClickAction {
1978
2071
  Text = 0,
1979
- Image= 1,
1980
- Button=2,
1981
- InlineButton=3,
2072
+ Image = 1,
2073
+ Button = 2,
2074
+ InlineButton = 3,
1982
2075
  Editable = 0x1000,
1983
2076
  Clickable = 0x2000,
1984
2077
  DirectEdit = 0x4000 | Editable,
@@ -2083,7 +2176,7 @@ declare module MobileCRM.UI {
2083
2176
  public static trySetAnswer(questionName: string, answer: any, errorCallback?: (err: string) => void, scope?: any);
2084
2177
  /**
2085
2178
  * Asynchronously sets the image as answer value for this question
2086
- * @param imageQuestionName
2179
+ * @param imageQuestionName
2087
2180
  * @param base64Data A value that us used to create image answer.
2088
2181
  * @param mimeType The valid mime type of corresponding base64Data.
2089
2182
  * @param errorCallback A callback which is called in case of error.
@@ -2135,7 +2228,7 @@ declare module MobileCRM.UI {
2135
2228
  /**
2136
2229
  * Binds or unbinds the handler for onSave event on QuestionnaireForm.
2137
2230
  * @param handler The handler function that has to be bound or unbound.
2138
- * @param bind Determines whether to bind or unbind the handler.
2231
+ * @param bind Determines whether to bind or unbind the handler.
2139
2232
  * @param scope The scope for callbacks.
2140
2233
  */
2141
2234
  public static onSave(handler: (questionnaireForm: QuestionnaireForm) => void, bind: boolean, scope?: any);
@@ -2147,14 +2240,14 @@ declare module MobileCRM.UI {
2147
2240
  */
2148
2241
  public static onChange(handler: (questionnaireForm: QuestionnaireForm) => void, bind: boolean, scope?: any);
2149
2242
  /**
2150
- * @since 11.2
2243
+ * @since 11.2
2151
2244
  * Binds or unbinds the handler for specific question change event on QuestionnaireForm.
2152
- * @param questionName The name of desired question.
2245
+ * @param questionName The name of desired question.
2153
2246
  * @param handler The handler function that has to be bound or unbound.
2154
2247
  * @param bind Determines whether to bind or unbind the handler.
2155
2248
  * @param scope The scope for callbacks.
2156
2249
  */
2157
- public static onAnswerChanged(questionName:string, handler: (questionnaireForm: QuestionnaireForm) => void, bind: boolean, scope?: any);
2250
+ public static onAnswerChanged(questionName: string, handler: (questionnaireForm: QuestionnaireForm) => void, bind: boolean, scope?: any);
2158
2251
  /**
2159
2252
  * Binds or unbinds the handler for onPostSave event on QuestionnaireForm.
2160
2253
  * @param handler The handler function that has to be bound or unbound.
@@ -2316,8 +2409,7 @@ declare module MobileCRM.UI {
2316
2409
  isVisible?: boolean;
2317
2410
  }
2318
2411
 
2319
- class HomeItem
2320
- {
2412
+ class HomeItem {
2321
2413
  name: string;
2322
2414
  path: string;
2323
2415
  title: string;
@@ -2808,10 +2900,10 @@ declare module MobileCRM.UI {
2808
2900
  * @param errorCallback The errorCallback which is called in case of error.
2809
2901
  */
2810
2902
  static setDate(date: Date, callback?: () => void, errorCallback?: (err: string) => void);
2811
- static setMode(mode, callback, errorCallback);
2812
- }
2813
- /** Represents the UI component hosting the calendar. */
2814
- interface AppointmentView {
2903
+ static setMode(mode, callback, errorCallback);
2904
+ }
2905
+ /** Represents the UI component hosting the calendar. */
2906
+ interface AppointmentView {
2815
2907
  /** Gets or sets whether the view is visible. */
2816
2908
  isVisible: boolean;
2817
2909
  /** Gets the name of view. */
@@ -2819,7 +2911,7 @@ declare module MobileCRM.UI {
2819
2911
  /** Gets a view mode @see TourplanForm.TourplanViewMode */
2820
2912
  mode: TourplanViewMode;
2821
2913
  /** Gets the current date of displayed view. */
2822
- currentDate: Date;
2914
+ currentDate: Date;
2823
2915
  }
2824
2916
  /** TourplanForm.onCreateNew context interface. */
2825
2917
  interface ITourplanCreateNewContext {