@i2analyze/notebook-sdk 1.1.0-dev.26 → 1.1.0-dev.29

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @i2analyze/notebook-sdk
2
2
 
3
+ ## 1.1.0-dev.29
4
+
5
+ ### Minor Changes
6
+
7
+ - Add map commands to system commands.
8
+
9
+ ## 1.1.0-dev.28
10
+
11
+ ### Minor Changes
12
+
13
+ - Add mutation response handler API.
14
+
15
+ ## 1.1.0-dev.27
16
+
17
+ ### Minor Changes
18
+
19
+ - Add options parameter to IApplication.runTrackedMutation and IApplication.runUntrackedMutation.
20
+
3
21
  ## 1.1.0-dev.26
4
22
 
5
23
  ### Minor Changes
@@ -75,9 +75,25 @@ export declare namespace app {
75
75
  * A successful set of tracked mutations is added as a single entry to the undo stack.
76
76
  *
77
77
  * @param mutationHandler - A function that performs one or more tracked mutations and reports on their success as a whole.
78
+ * @param options - An object that can control the transaction.
79
+ * @returns A promise that is fulfilled if the work completes successfully, or rejected if there is a problem performing it.
78
80
  * @i2since 1.1
79
81
  */
80
- runTrackedMutations(mutationHandler: TrackedMutationHandler): void;
82
+ runTrackedMutations(mutationHandler: TrackedMutationHandler, options?: ITransactionOptions): void;
83
+ /**
84
+ * Queues a function that performs tracked mutations on the application contents at the next available opportunity.
85
+ *
86
+ * @remarks
87
+ * A mutation is an operation that can read or modify the contents of the application.
88
+ * A successful set of tracked mutations is added as a single entry to the undo stack.
89
+ *
90
+ * @param mutationHandler - A function that performs one or more tracked mutations and reports on their success as a whole.
91
+ * @param responseHandler - A callback that receives the changes produced by the mutation.
92
+ * @param options - An object that can control the transaction.
93
+ * @returns A promise that is fulfilled if the work completes successfully, or rejected if there is a problem performing it.
94
+ * @i2since 1.1
95
+ */
96
+ runTrackedMutations(mutationHandler: TrackedMutationHandler, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
81
97
  /**
82
98
  * Queues a function that performs untracked mutations on the application contents at the next available opportunity.
83
99
  *
@@ -86,9 +102,23 @@ export declare namespace app {
86
102
  * Untracked mutations are not added to the undo stack, and therefore cannot be undone.
87
103
  *
88
104
  * @param mutationHandler - A function that performs one or more untracked mutations and reports on their success as a whole.
105
+ * @param options - An object that can control the transaction.
89
106
  * @i2since 1.1
90
107
  */
91
- runUntrackedMutations(mutationHandler: UntrackedMutationHandler): void;
108
+ runUntrackedMutations(mutationHandler: UntrackedMutationHandler, options?: ITransactionOptions): void;
109
+ /**
110
+ * Queues a function that performs untracked mutations on the application contents at the next available opportunity.
111
+ *
112
+ * @remarks
113
+ * A mutation is an operation that can read or modify the contents of the application.
114
+ * Untracked mutations are not added to the undo stack, and therefore cannot be undone.
115
+ *
116
+ * @param mutationHandler - A function that performs one or more untracked mutations and reports on their success as a whole.
117
+ * @param responseHandler - A callback that receives the changes produced by the mutation.
118
+ * @param options - An object that can control the transaction.
119
+ * @i2since 1.1
120
+ */
121
+ runUntrackedMutations(mutationHandler: UntrackedMutationHandler, responseHandler?: MutationResponseHandler, options?: ITransactionOptions): void;
92
122
  }
93
123
  /**
94
124
  * A report on the result of one or more mutations.
@@ -217,6 +247,26 @@ export declare namespace app {
217
247
  * @i2since 1.1
218
248
  */
219
249
  export type TrackedMutationHandler = (application: IApplicationContents, mutations: ITrackedMutations, cancelation: ICancelation) => ITrackedMutationInfo | Promise<ITrackedMutationInfo>;
250
+ /**
251
+ * A function that receives the results of a mutation.
252
+ *
253
+ * @param error - The error thrown if a mutation failed or was aborted.
254
+ * @param result - The results of the mutation.
255
+ * @param application - The contents of the application after the mutation was performed.
256
+ * @i2since 1.1
257
+ */
258
+ export type MutationResponseHandler = (error: Error | null, result: IMutationResult, application: IApplicationContents) => void;
259
+ /**
260
+ * A result from a mutation.
261
+ * @i2since 1.1
262
+ */
263
+ export interface IMutationResult {
264
+ /**
265
+ * Gets the changes that were the result of a mutation .
266
+ * @i2since 1.1
267
+ */
268
+ change: chart.IChartChange;
269
+ }
220
270
  /**
221
271
  * A collection of methods and properties for handling the situation when a user cancels an operation.
222
272
  *
@@ -729,7 +779,7 @@ export declare namespace app {
729
779
  * Removes records from the chart.
730
780
  *
731
781
  * @param records - The record or records to be removed.
732
- * @returns Returns true if one or more records existed on the chart and has been removed, or false if none of the records existed.
782
+ * @returns `true` if one or more records were successfully removed from the chart; `false` if none of the records existed.
733
783
  * @i2since 1.1
734
784
  */
735
785
  removeRecords(records: RecordSpecifier | Iterable<RecordSpecifier>): boolean;
@@ -737,12 +787,12 @@ export declare namespace app {
737
787
  * Removes elements from the chart.
738
788
  *
739
789
  * @param elements - The element or elements to be removed.
740
- * @returns Returns true if one or more elements existed on the chart and has been removed, or false if none of the elements existed.
790
+ * @returns `true` if one or more elements were successfully removed from the chart; `false` if none of the elements existed.
741
791
  * @i2since 1.1
742
792
  */
743
793
  removeElements(elements: ElementSpecifier | Iterable<ElementSpecifier>): boolean;
744
794
  /**
745
- * Removes the selected records from the chart.
795
+ * Removes the currently selected records from the chart.
746
796
  * @i2since 1.1
747
797
  */
748
798
  removeSelectedRecords(): void;
@@ -851,11 +901,10 @@ export declare namespace app {
851
901
  */
852
902
  export interface IServerComponents {
853
903
  /**
854
- * Gets the base url of the i2 Analyze server.
904
+ * Gets the base URL of the i2 Analyze server. For example, `http://localhost:3000/opal/`.
855
905
  *
856
- * E.g. http://localhost:3000/opal/.
857
- *
858
- * @remarks Note: The url will not contain any query parameters.
906
+ * @remarks
907
+ * The base URL always ends with a forward slash, and never contains query parameters.
859
908
  * @i2since 1.1
860
909
  */
861
910
  readonly baseUrl: string;
@@ -1983,7 +2032,7 @@ export declare namespace commands {
1983
2032
  */
1984
2033
  readonly toggleVisualQuery: CommandId;
1985
2034
  /**
1986
- * Gets the identifier of the system command that toggles the Expand UI.
2035
+ * Gets the identifier of the system command that toggles the Expand-with-conditions UI.
1987
2036
  * @i2since 1.0
1988
2037
  */
1989
2038
  readonly toggleExpand: CommandId;
@@ -2038,10 +2087,20 @@ export declare namespace commands {
2038
2087
  */
2039
2088
  readonly saveChart: CommandId;
2040
2089
  /**
2041
- * Gets the identifier of the system command that expands the current selection.
2090
+ * Gets the identifier of the system command that performs an expand operation on the current selection.
2042
2091
  * @i2since 1.1
2043
2092
  */
2044
2093
  readonly expand: CommandId;
2094
+ /**
2095
+ * Gets the identifier of the system command that toggles the map UI.
2096
+ * @i2since 1.1
2097
+ */
2098
+ readonly toggleMap: CommandId;
2099
+ /**
2100
+ * Gets the identifier of the system command that adds geospatial markers to the map from the current selection.
2101
+ * @i2since 1.1
2102
+ */
2103
+ readonly addToMap: CommandId;
2045
2104
  }
2046
2105
  /**
2047
2106
  * A lookup table for the group identifiers of the default system action groups.
@@ -3368,17 +3427,17 @@ export declare namespace schema {
3368
3427
  */
3369
3428
  readonly maximumSourceIdentifiers: number;
3370
3429
  /**
3371
- * Gets the maximum string length of a source identifier key.
3430
+ * Gets the maximum number of characters for a source identifier key.
3372
3431
  * @i2since 1.1
3373
3432
  */
3374
3433
  readonly maxKeyStringLength: data.ICharLimit;
3375
3434
  /**
3376
- * Gets the maximum string length of a source identifier type.
3435
+ * Gets the maximum number of characters for a source identifier type.
3377
3436
  * @i2since 1.1
3378
3437
  */
3379
3438
  readonly maxTypeStringLength: data.ICharLimit;
3380
3439
  /**
3381
- * Gets a collection of reserved source identifier types.
3440
+ * Gets the source identifier types that are reserved for system use.
3382
3441
  * @i2since 1.1
3383
3442
  */
3384
3443
  readonly reservedTypes: data.IReadOnlyCollection<string>;
@@ -3559,7 +3618,7 @@ export declare namespace schema {
3559
3618
  */
3560
3619
  readonly isOrphaned: boolean;
3561
3620
  /**
3562
- * Indicates whether the item type exists in the Information Store.
3621
+ * Indicates whether the item type is defined in the Information Store schema.
3563
3622
  * @i2since 1.1
3564
3623
  */
3565
3624
  readonly isInfoStore: boolean;
@@ -3585,7 +3644,7 @@ export declare namespace schema {
3585
3644
  */
3586
3645
  export type AnalyzePropertyTypeId = string;
3587
3646
  /**
3588
- * A specifier for a property type.
3647
+ * A common specifier for a property type.
3589
3648
  * @i2since 1.1
3590
3649
  */
3591
3650
  export type PropertyTypeSpecifier = ChartPropertyTypeId | IChartPropertyType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.1.0-dev.26",
3
+ "version": "1.1.0-dev.29",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {