@i2analyze/notebook-sdk 1.1.0-dev.22 → 1.1.0-dev.23

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,11 @@
1
1
  # @i2analyze/notebook-sdk
2
2
 
3
+ ## 1.1.0-dev.23
4
+
5
+ ### Minor Changes
6
+
7
+ - Add PropertySpecifier and ensurePropertiesFetched API
8
+
3
9
  ## 1.1.0-dev.22
4
10
 
5
11
  ### Minor Changes
@@ -302,7 +302,7 @@ export declare namespace app {
302
302
  * A common specifier for record properties used to pass record properties when adding or editing a record.
303
303
  * @i2since 1.1
304
304
  */
305
- export type RecordPropertiesSpecifier = Record<schema.ChartPropertyTypeId, data.PropertyValue> | Iterable<[schema.IChartPropertyType | schema.ChartPropertyTypeId, data.PropertyValue]>;
305
+ export type RecordPropertiesSpecifier = Record<schema.ChartPropertyTypeId, data.PropertyValue> | Iterable<[schema.PropertyTypeSpecifier, data.PropertyValue]>;
306
306
  /**
307
307
  * A set of data that is common to creating records of all types.
308
308
  * @i2since 1.1
@@ -1151,6 +1151,19 @@ export declare namespace chart {
1151
1151
  * @i2since 1.0
1152
1152
  */
1153
1153
  readonly selection: ISelection;
1154
+ /**
1155
+ * Updates each given record with the specified propertyTypes if the record does not have the specified propertyTypes.
1156
+ *
1157
+ * @remarks
1158
+ * Any propertyTypes that were fetched by this method will become unfetched on subsequent record updates by the server.
1159
+ *
1160
+ * @param records - The record or records to update.
1161
+ * @param propertyTypes - The propertyType or propertyTypes to ensure are fetched.
1162
+ * @param signal - A signal that the application uses to abort the operation.
1163
+ * @returns A promise that is fulfilled if the work completes successfully, or rejected if there is a problem performing it.
1164
+ * @i2since 1.1
1165
+ */
1166
+ ensurePropertiesFetched(records: app.RecordSpecifier | Iterable<app.RecordSpecifier>, propertyTypes: schema.PropertyTypeSpecifier | Iterable<schema.PropertyTypeSpecifier>, signal?: AbortSignal): Promise<void>;
1154
1167
  }
1155
1168
  /**
1156
1169
  * A change that has occurred to the data in a chart.
@@ -2945,7 +2958,7 @@ export declare namespace records {
2945
2958
  * @returns The property value or, if not present, `undefined`.
2946
2959
  * @i2since 1.0
2947
2960
  */
2948
- getProperty(propertyType: schema.IChartPropertyType | schema.ChartPropertyTypeId): data.PropertyValue | data.IValueNotFetched | undefined;
2961
+ getProperty(propertyType: schema.PropertyTypeSpecifier): data.PropertyValue | data.IValueNotFetched | undefined;
2949
2962
  /**
2950
2963
  * Tests whether the record is an entity record; functions as a TypeScript typeguard.
2951
2964
  *
@@ -3555,6 +3568,11 @@ export declare namespace schema {
3555
3568
  * @i2since 1.0
3556
3569
  */
3557
3570
  export type AnalyzePropertyTypeId = string;
3571
+ /**
3572
+ * A specifier for a property type.
3573
+ * @i2since 1.1
3574
+ */
3575
+ export type PropertyTypeSpecifier = ChartPropertyTypeId | IChartPropertyType;
3558
3576
  /**
3559
3577
  * A property type.
3560
3578
  * @i2since 1.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i2analyze/notebook-sdk",
3
- "version": "1.1.0-dev.22",
3
+ "version": "1.1.0-dev.23",
4
4
  "description": "i2 Notebook SDK",
5
5
  "license": "MIT",
6
6
  "publishConfig": {