@resconet/jsbridge 16.0.0 → 16.0.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resconet/jsbridge",
3
- "version": "16.0.0",
3
+ "version": "16.0.4",
4
4
  "main": "./src/JSBridge.js",
5
5
  "types": "./src/JSBridge.d.ts",
6
6
  "description": "Install npm JSBridge module",
package/src/JSBridge.d.ts CHANGED
@@ -368,6 +368,17 @@ declare module MobileCRM {
368
368
  static loadAsync(entityName: string, id: string): Promise<Reference>;
369
369
  }
370
370
 
371
+ /**
372
+ * Person or group associated with an activity.
373
+ * An activity can have multiple activity parties.
374
+ */
375
+ class ActivityParty extends Reference {
376
+ /** Gets or sets whether the party is direct (email) or a pointer to an CRM record.*/
377
+ isDirectParty: boolean;
378
+ /** The actual email address used.*/
379
+ addressUsed: string;
380
+ }
381
+
371
382
  class Relationship {
372
383
  constructor(sourceProperty: string, target?: Reference, intersectEntity?: string, intersectProperty?: string);
373
384
 
@@ -912,6 +923,17 @@ declare module MobileCRM {
912
923
  * @param scope The scope for callbacks.
913
924
  */
914
925
  static showForm(report: MobileCRM.Reference, source: Array<MobileCRM.Reference>, fetchXml: string, failed?: (err: string) => void, scope?: any);
926
+ /**
927
+ * @since 16.0
928
+ * Shows new MobileReport form. Source for the report can be defined either as list of MobileCRM.Reference objects or as FetchXML query.
929
+ * @param report Optional reference to the resco_mobilereport entity that will be pre-selected.
930
+ * @param source The list of entity references used as report input.
931
+ * @param fetchXml The fetch XML defining the entity (entities) query used as report input.
932
+ * @param paramString Run report form Configuration string in JSON format.
933
+ * @param failed A callback which is called in case of error.
934
+ * @param scope The scope for callbacks.
935
+ */
936
+ static showFormWithConfiguration(report: MobileCRM.Reference, source: Array<MobileCRM.Reference>, fetchXml: string, paramString: string, failed?: (err: string) => void, scope?: any);
915
937
  }
916
938
  class Questionnaire {
917
939
  static getQuestionName(name: string, repeatIndex: number): string;
package/src/JSBridge.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function () {
2
- var _scriptVersion = 15.3
2
+ var _scriptVersion = 16.0
3
3
  // Private objects & functions
4
4
  var _inherit = (function () {
5
5
  function _() { }
@@ -286,6 +286,23 @@
286
286
  this.primaryName = primaryName;
287
287
  },
288
288
 
289
+ ActivityParty: function (entityName, id, primaryName, isDirectParty, addressUsed) {
290
+ /// <summary>Person or group associated with an activity. An activity can have multiple activity parties.</summary>
291
+ /// <param name="entityName" type="String">The logical entity name of the party (account, contact, lead, systemuser, etc.)</param>
292
+ /// <param name="id" type="String">GUID of the existing entity or null for new one or direct party.</param>
293
+ /// <param name="primaryName" type="String">The human readable name of the reference, e.g "Alexandro".</param>
294
+ /// <param name="isDirectParty" type="Boolean">Gets or sets whether the party is direct (email) or a pointer to an CRM record.</param>
295
+ /// <param name="addressUsed" type="String">Gets or sets the actual address used.</param>
296
+ /// <field name="entityName" type="String">The entity name of the party (account, contact, lead, systemuser, etc.)</field>
297
+ /// <field name="id" type="String">GUID of the existing entity or null for new one or direct party.</field>
298
+ /// <field name="primaryName" type="String">The human readable name of the reference, e.g. "Alexandro".</field>
299
+ /// <field name="isDirectParty" type="Boolean">Gets or sets whether the party is direct (email) or a pointer to an CRM record.</field>
300
+ /// <field name="addressUsed" type="String">Gets or sets the actual address used.</field>
301
+ MobileCRM.ActivityParty.superproto.constructor.apply(this, arguments);
302
+ this.isDirectParty = isDirectParty;
303
+ this.addressUsed = addressUsed;
304
+ },
305
+
289
306
  Relationship: function (sourceProperty, target, intersectEntity, intersectProperty) {
290
307
  /// <summary>Represents a relationship between two entities.</summary>
291
308
  /// <param name="sourceProperty" type="String">Gets the name of the source of the relationship.</param>
@@ -2047,7 +2064,10 @@
2047
2064
  /// <param name="failed" type="function(error)">A callback function for command failure. The <b>error</b> argument will carry the error message.</param>
2048
2065
  /// <param name="scope" type="">A scope for calling the callbacks; set &quot;null&quot; to call the callbacks in global scope.</param>
2049
2066
  MobileCRM.ManyToManyReference.addRecord(entityName, ref1, ref2, false, success, failed, scope);
2050
- };
2067
+ };
2068
+
2069
+ // MobileCRM.ActivityParty
2070
+ _inherit(MobileCRM.ActivityParty, MobileCRM.Reference);
2051
2071
 
2052
2072
  // MobileCRM.DynamicEntity
2053
2073
  _inherit(MobileCRM.DynamicEntity, MobileCRM.Reference);
@@ -4044,7 +4064,19 @@
4044
4064
  /// <param name="scope" type="Object">The scope for callbacks.</param>
4045
4065
  var params = { fetchXml: fetchXml, report: report, source: source };
4046
4066
  MobileCRM.bridge.command("showMobileReportForm", JSON.stringify(params), null, failed, scope);
4047
- };
4067
+ };
4068
+ MobileCRM.MobileReport.showFormWithConfiguration = function (report, source, fetchXml, paramString, failed, scope) {
4069
+ /// <summary>[v16.0] Shows new MobileReport form. Source for the report can be defined either as list of <see cref="MobileCRM.Reference">MobileCRM.Reference</see> objects or as FetchXML query.</summary>
4070
+ /// <remarks>If both types of source are passed, user can select which one to use.</remarks>
4071
+ /// <param name="report" type="MobileCRM.Reference">Optional reference to the resco_mobilereport entity that will be pre-selected.</param>
4072
+ /// <param name="source" type="MobileCRM.Reference[]">The list of entity references used as report input.</param>
4073
+ /// <param name="fetchXML" type="String">The fetch XML defining the entity (entities) query used as report input.</param>
4074
+ /// <param name="paramString" type="String">Run report form <see cref="https://docs.resco.net/wiki/Configure_Run_Report_command#Configuration_string">Configuration string</see> in JSON format.</param>
4075
+ /// <param name="failed" type="function(errorMsg)">A callback which is called in case of error.</param>
4076
+ /// <param name="scope" type="Object">The scope for callbacks.</param>
4077
+ var params = { fetchXml: fetchXml, report: report, source: source, paramString: paramString };
4078
+ MobileCRM.bridge.command("showMobileReportForm", JSON.stringify(params), null, failed, scope);
4079
+ };
4048
4080
  // MobileCRM.UI.Questionnaire
4049
4081
  MobileCRM.Questionnaire.showForm = function(id, failed, scope, relationship) {
4050
4082
  /// <summary>[v10.2] Shows the questionnaire form.</summary>