@sassoftware/vi-api 1.5.0 → 1.9.0

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.
Files changed (82) hide show
  1. package/alert-reps/index.d.ts +1 -1
  2. package/alert-reps/package.json +5 -0
  3. package/component/bindings.d.ts +10 -4
  4. package/component/index.d.ts +11 -10
  5. package/component/index.js +1 -1
  6. package/component/package.json +9 -0
  7. package/config/config-api.d.ts +21 -2
  8. package/config/package.json +9 -0
  9. package/control/control-api.d.ts +40 -15
  10. package/control/package.json +9 -0
  11. package/control/restrictions.d.ts +5 -1
  12. package/current-user/package.json +9 -0
  13. package/event/event-api.d.ts +3 -1
  14. package/event/event-api.js +2 -0
  15. package/event/package.json +9 -0
  16. package/file/package.json +9 -0
  17. package/http/package.json +9 -0
  18. package/index.d.ts +4 -2
  19. package/localization/package.json +9 -0
  20. package/metadata/metadata-api.d.ts +17 -14
  21. package/metadata/package.json +9 -0
  22. package/object/object-api.d.ts +34 -21
  23. package/object/package.json +9 -0
  24. package/package.json +2 -1
  25. package/page-admin/package.json +9 -0
  26. package/page-admin/page-admin-api.d.ts +2 -2
  27. package/page-model/package.json +9 -0
  28. package/page-model/page-model-api.d.ts +92 -1
  29. package/page-state/package.json +9 -0
  30. package/page-state/page-state-api.d.ts +6 -33
  31. package/property/package.json +9 -0
  32. package/property/property-api.d.ts +6 -6
  33. package/property/property-api.js +2 -2
  34. package/reference-data/package.json +9 -0
  35. package/resource/package.json +9 -0
  36. package/score-reps/index.d.ts +1 -1
  37. package/score-reps/package.json +5 -0
  38. package/search/client/client-search-api.d.ts +24 -14
  39. package/search/package.json +9 -0
  40. package/search/search-api.d.ts +1 -1
  41. package/sheet/package.json +9 -0
  42. package/sheet/sheet-api.d.ts +6 -6
  43. package/shell-tabs/package.json +9 -0
  44. package/shell-tabs/public-api.d.ts +2 -0
  45. package/shell-tabs/public-api.js +2 -0
  46. package/shell-tabs/shell-tabs-api.d.ts +199 -0
  47. package/shell-tabs/shell-tabs-api.js +6 -0
  48. package/shell-tabs/shell-tabs-lifecycle-api.d.ts +69 -0
  49. package/shell-tabs/shell-tabs-lifecycle-api.js +14 -0
  50. package/svi-datahub/index.d.ts +295 -135
  51. package/svi-datahub/package.json +5 -0
  52. package/svi-sand/index.d.ts +31 -24
  53. package/svi-sand/package.json +5 -0
  54. package/tab/package.json +9 -0
  55. package/tab/tab-api.d.ts +1 -1
  56. package/theme/package.json +9 -0
  57. package/time-slider/index.d.ts +9 -0
  58. package/traversal/package.json +9 -0
  59. package/api-init.service.js +0 -86
  60. package/component/component-api.service.js +0 -161
  61. package/config/config-api.service.js +0 -54
  62. package/current-user/currentUser-api.service.js +0 -49
  63. package/event/event-api.service.js +0 -32
  64. package/file/file-api.service.js +0 -24
  65. package/http/http-api.service.js +0 -64
  66. package/localization/localization-api.service.js +0 -38
  67. package/metadata/admin/admin-metadata-api.service.js +0 -30
  68. package/metadata/metadata-api.service.js +0 -85
  69. package/object/object-api.service.js +0 -207
  70. package/page-admin/page-admin-api.service.js +0 -25
  71. package/page-model/page-model-api.service.js +0 -25
  72. package/page-state/page-state-api.service.js +0 -70
  73. package/property/property-api.service.js +0 -34
  74. package/reference-data/refData.service.js +0 -40
  75. package/resource/resource-api.service.js +0 -24
  76. package/search/client/client-search-api.service.js +0 -111
  77. package/search/search-api.service.js +0 -28
  78. package/sheet/network-menu-handler.service.js +0 -39
  79. package/sheet/sheet-api.service.js +0 -140
  80. package/tab/tab-api.service.js +0 -35
  81. package/theme/theme-api.service.js +0 -35
  82. package/traversal/traversal-api.service.js +0 -77
@@ -1,4 +1,4 @@
1
- import { Relationship, StoredObjectFieldDTO, Comment } from "../svi-datahub";
1
+ import { Comment, Relationship, StoredObjectFieldDTO } from "../svi-datahub";
2
2
  import { FileOperation } from "../file/file-api";
3
3
  import { PageModel } from "../page-model/page-model-api";
4
4
  import { ClientSheet, Sheet } from "../sheet/sheet-api";
@@ -16,11 +16,11 @@ export interface FormatObjectFieldsOptions {
16
16
  skipFormatUserGroups?: boolean;
17
17
  skipFormatBooleans?: boolean;
18
18
  /**
19
- * A function that will be the last thing called in order to format the object's field values
20
- * @param fieldValue the current value of the field being formatted
21
- * @param fieldName the name of the field currently being formatted
22
- * @param objectFields all of the available fields in the object
23
- * @param fieldMetadata the current field's metadata
19
+ * A function that will be the last thing called in order to format the object's field values.
20
+ * @param fieldValue the current value of the field being formatted.
21
+ * @param fieldName the name of the field currently being formatted.
22
+ * @param objectFields all of the available fields in the object.
23
+ * @param fieldMetadata the current field's metadata.
24
24
  */
25
25
  formatCallback?: (fieldValue: string | number | Date | PageData[], fieldName: string, objectFields: FieldValues, fieldMetadata: StoredObjectFieldDTO) => void;
26
26
  }
@@ -69,7 +69,7 @@ export interface ObjectApi {
69
69
  * @param objectId {string} Gets the child objects relating to the object ID.
70
70
  * @param childObjectType {string} Child object type.
71
71
  * @param [maxResponses = 25] {number} Maximum number of child objects to be returned.
72
- * @return A promise that resolves to an array of objects, that are child objects of the specified object.
72
+ * @return A Promise that resolves to an array of objects, that are child objects of the specified object.
73
73
  */
74
74
  getChildObjects(objectType: string, objectId: string, childObjectType: string, maxResponses?: number): Promise<VIObject[]>;
75
75
  /**
@@ -81,15 +81,28 @@ export interface ObjectApi {
81
81
  * @param objectTypeVersion {number} Object type version.
82
82
  * @param fieldValues {FieldValues} Field values of the object.
83
83
  * @param [options] {UpdateObjectOptions} Optional extra parameters.
84
- * @return A promise that resolves to the updated object once the object has successfully been updated.
84
+ * @return A Promise that resolves to the updated object when the object has successfully been updated.
85
85
  */
86
86
  updateObject(objectType: string, objectId: string, objectTypeId: number, objectTypeVersion: number, fieldValues: FieldValues, options?: UpdateObjectOptions): Promise<VIObject>;
87
+ /**
88
+ * @method
89
+ * @description Updates an existing object with the provided data.
90
+ * @param objectType {string} Object type.
91
+ * @param objectId {string} Object ID.
92
+ * @param objectTypeId {number} Object type ID.
93
+ * @param objectTypeVersion {number} Object type version.
94
+ * @param originalFieldValues {FieldValues} Field values before the object was edited
95
+ * @param newFieldValues {FieldValues} Field values after the object was edited
96
+ * @param [options] {UpdateObjectOptions} Optional extra parameters.
97
+ * @return A Promise that resolves to the updated object when the object has successfully been updated.
98
+ */
99
+ patchObject(objectType: string, objectId: string, objectTypeId: number, objectTypeVersion: number, originalFieldValues: FieldValues, newFieldValues: FieldValues, options?: UpdateObjectOptions): Promise<VIObject>;
87
100
  /**
88
101
  * @method
89
102
  * @description Deletes an object.
90
103
  * @param objectType {string} Object type.
91
104
  * @param objectId {string} Object ID.
92
- * @return A promise that resolves to void when the specified object is successfully deleted.
105
+ * @return A Promise that resolves to void when the specified object is successfully deleted.
93
106
  */
94
107
  deleteObject(objectType: string, objectId: string): Promise<void>;
95
108
  /**
@@ -99,14 +112,14 @@ export interface ObjectApi {
99
112
  * @param objectTypeId {number} Object type ID.
100
113
  * @param fieldValues {FieldValues} Field values of the object.
101
114
  * @param [options] {CreateObjectOptions} Optional extra parameters.
102
- * @return A promise that resolves to the created object once the object has successfully been created.
115
+ * @return A Promise that resolves to the created object when the object has successfully been created.
103
116
  */
104
117
  createObject(objectType: string, objectTypeId: number, fieldValues: FieldValues, options?: CreateObjectOptions): Promise<VIObject>;
105
118
  /**
106
119
  * @method
107
120
  * @description Gets relationship via the relationship ID.
108
121
  * @param relationshipId {string} Relationship ID.
109
- * @return A promise that resolves to a relationship.
122
+ * @return A Promise that resolves to a relationship.
110
123
  */
111
124
  getObjectRelationship(relationshipId: string): Promise<ObjectRelationship>;
112
125
  /**
@@ -114,14 +127,14 @@ export interface ObjectApi {
114
127
  * @description Updates an existing relationship in SAS Visual Investigator.
115
128
  * @param relationshipId {string} Relationship ID.
116
129
  * @param payload {any} HTTP request content.
117
- * @return A promise that resolves to a relationship.
130
+ * @return A Promise that resolves to a relationship.
118
131
  */
119
132
  updateObjectRelationship(relationshipId: string, payload: any): Promise<ObjectRelationship>;
120
133
  /**
121
134
  * @method
122
135
  * @description Deletes relationship with the specified ID.
123
136
  * @param relationshipId {string} Relationship ID.
124
- * @return A promise that resolves to void when the object is successfully deleted.
137
+ * @return A Promise that resolves to void when the object is successfully deleted.
125
138
  */
126
139
  deleteObjectRelationship(relationshipId: string): Promise<void>;
127
140
  /**
@@ -130,7 +143,7 @@ export interface ObjectApi {
130
143
  * @param from {VIObject} Object that relationship is from.
131
144
  * @param to {VIObject} Object that relationship is to.
132
145
  * @param relationship {ObjectRelationship} The relationship.
133
- * @return A promise that resolves to an object.
146
+ * @return A Promise that resolves to an object.
134
147
  */
135
148
  relateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
136
149
  /**
@@ -147,7 +160,7 @@ export interface ObjectApi {
147
160
  * @param from {VIObject} Object that the relationship is from.
148
161
  * @param to {VIObject} Object that the relationship is to.
149
162
  * @param relationship {ObjectRelationship} The relationship.
150
- * @return A promise that resolves to a newly created relationship.
163
+ * @return A Promise that resolves to a newly created relationship.
151
164
  */
152
165
  createAndRelateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
153
166
  /**
@@ -156,7 +169,7 @@ export interface ObjectApi {
156
169
  * @param objects {VIObject[]} Array of objects.
157
170
  * @param objectType {string} Type of the objects in the array.
158
171
  * @param [options] {FormatObjectFieldsOptions} Optional parameters to control the formatting. By default, nothing is skipped and there is no formatCallback.
159
- * @return A promise that resolves to the formatted array of objects.
172
+ * @return A Promise that resolves to the formatted array of objects.
160
173
  */
161
174
  formatObjectFieldsForDisplay(objects: VIObject[], objectType: string, options?: FormatObjectFieldsOptions): Promise<VIObject[]>;
162
175
  /**
@@ -165,7 +178,7 @@ export interface ObjectApi {
165
178
  * @param attachmentModel {AttachmentModel} Attachment model.
166
179
  * @param objectType {string} Object type.
167
180
  * @param objectId {string} Object ID.
168
- * @return A promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
181
+ * @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
169
182
  */
170
183
  uploadAttachment(attachmentModel: AttachmentModel, objectType: string, objectId: string): Promise<FileAssociationResponse>;
171
184
  /**
@@ -174,21 +187,21 @@ export interface ObjectApi {
174
187
  * @param objectType {string} Object type.
175
188
  * @param objectId {string} Object ID.
176
189
  * @param attachmentId {string} Attachment ID.
177
- * @return A promise that resolves to an empty HttpResponse when the attachment is successfully deleted.
190
+ * @return A Promise that resolves to an empty HttpResponse when the attachment is successfully deleted.
178
191
  */
179
192
  deleteAttachment(objectType: string, objectId: string, attachmentId: string): Promise<void>;
180
193
  /**
181
194
  * @method
182
195
  * @description Gets an attachment of the associated object.
183
- * @param objectId {string} Object ID
196
+ * @param objectId {string} Object ID.
184
197
  * @param objectType {string} Object type.
185
198
  * @param attachmentId {string} Attachment ID.
186
- * @return A promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
199
+ * @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
187
200
  */
188
201
  getAttachment(objectType: string, objectId: string, attachmentId: string): Promise<FileAssociationResponse>;
189
202
  /**
190
203
  * @method
191
- * @description Validates the fields, controls and file categories of a child object.
204
+ * @description Validates the fields, controls, and file categories of a child object.
192
205
  * @param pageModel {PageModel} Page model.
193
206
  * @param childObject {StoredObjectMetadata} Child object metadata.
194
207
  * @return An observable that resolves to an array of validation results.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/object",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/vi-api",
3
- "version": "1.5.0",
3
+ "version": "1.9.0",
4
4
  "description": "Types used in the SAS Visual Investigator API",
5
5
  "keywords": [
6
6
  "SAS",
@@ -24,6 +24,7 @@
24
24
  "files": [
25
25
  "**/*.d.ts",
26
26
  "**/*.js",
27
+ "**/package.json",
27
28
  "./README.md",
28
29
  "./LICENSE.txt"
29
30
  ],
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/page-admin",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -17,8 +17,8 @@ export interface PageAdminApi {
17
17
  * @method
18
18
  * @description Registers a page designer configuration.
19
19
  * @param name {string} A unique name for the configuration.
20
- * @param applicationType {ApplicationType} The name of the app type used for this page. Must be a valid datahub client application (for example, desktop | mobile).
21
- * @param templateType {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, home | page).
20
+ * @param applicationType {ApplicationType} The name of the app type used for this page. Must be a valid datahub client application (for example, "desktop" or "mobile").
21
+ * @param templateType {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, "home" or "page").
22
22
  * @param controlGroups {Control[]} The control categories that are displayed in the designer's left hand side toolbox. Must be valid control categories.
23
23
  * @param canvasCssClass {string} A CSS class that is applied to the canvas in the designer.
24
24
  * @param previewCssClass {string} A CSS class that is applied to the preview (for example, template list).
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/page-model",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -111,11 +111,102 @@ export interface LinkedPage {
111
111
  traversalUuid?: string;
112
112
  traversal?: PathsRepresentation;
113
113
  }
114
+ export interface IPageEventHook<T extends IPageEventData, R extends IPageEventHookResponse> {
115
+ exec: (pageData: T) => Promise<R | void>;
116
+ /**
117
+ * Run onFail instead of exec if the preceding event action has failed.
118
+ * If not provided, nothing will be executed for this hook in the event of failure.
119
+ */
120
+ onFail?: (pageData: T) => Promise<R | void>;
121
+ /**
122
+ * Hooks are executed in ascending order.
123
+ */
124
+ order?: number;
125
+ }
126
+ export declare type IPrePageEventHook<T extends IPageEventData> = Omit<IPageEventHook<T, IPrePageEventHookResponse>, "onFail">;
127
+ export declare type IPostPageEventHook<T extends IPageEventData> = IPageEventHook<T, IPostPageEventHookResponse>;
128
+ export interface IPageEventHookResponse {
129
+ message: string;
130
+ messages?: string[];
131
+ }
132
+ export interface IPrePageEventHookResponse extends IPageEventHookResponse {
133
+ abort: boolean;
134
+ }
135
+ export declare type IPostPageEventHookResponse = IPageEventHookResponse;
136
+ /**
137
+ * A callback to unregister a page event hook.
138
+ * @returns true if the hook was removed, false if it was already removed.
139
+ */
140
+ export declare type PageEventHookRemove = () => boolean;
141
+ export interface IPageEventData {
142
+ pageModel: PageModel;
143
+ }
114
144
  /**
115
- * This API is used for creating a PageModel object from source data.
145
+ * Page model events which can have pre-event or post-event hooks.
146
+ */
147
+ export declare const enum HookablePageEvents {
148
+ /**
149
+ * A pagemodel is being saved as an object.
150
+ */
151
+ SaveObject = "svi:hookable:pagemodel:saveObject"
152
+ }
153
+ export interface IPageEvent<T extends IPageEventData> {
154
+ /**
155
+ * @method
156
+ * @description Adds a hook to be executed before a hookable event is triggered.
157
+ * @param event {string} the event to hook onto.
158
+ * @param hook {IPrePageEventHook} the hook which defines the callback to run pre-event.
159
+ */
160
+ addPreHook(hook: IPrePageEventHook<T>): PageEventHookRemove;
161
+ /**
162
+ * @method
163
+ * @description Adds a hook to be executed after a hookable event is triggered.
164
+ * @param event {string} the event to hook onto.
165
+ * @param hook {IPostPageEventHook} the hook which defines the callback to run post-event.
166
+ */
167
+ addPostHook(hook: IPostPageEventHook<T>): PageEventHookRemove;
168
+ /**
169
+ * @method
170
+ * @description run pre-hooks, execute the action, run post hooks.
171
+ * @param payload is passed as input for any event hooks.
172
+ * @param action the action to perform.
173
+ */
174
+ trigger<R>(payload: T, action: () => Promise<R>): Promise<R>;
175
+ }
176
+ /**
177
+ * Methods related to page events.
178
+ */
179
+ export interface PageEventsApiBase {
180
+ /**
181
+ * @method
182
+ * @description Get a reference to a hookable page event if it is defined.
183
+ * @param eventName The name of the event.
184
+ * @returns The reference to the hookable page event.
185
+ */
186
+ getPageEvent(eventName: HookablePageEvents.SaveObject): IPageEvent<IPageEventData> | undefined;
187
+ getPageEvent<T extends IPageEventData>(eventName: string): IPageEvent<T> | undefined;
188
+ }
189
+ /**
190
+ * {@link PageEventsApiBase} extension that provides more functionality.
191
+ * @extends PageEventsApiBase
192
+ */
193
+ export interface PageEventsApi extends PageEventsApiBase {
194
+ /**
195
+ * @method
196
+ * @description Add a hookable page event. An error is thrown if the event is already registered.
197
+ * @param eventName The name of the event, this should be unique.
198
+ */
199
+ addPageEvent(eventName: string): void | never;
200
+ }
201
+ /**
202
+ * This API is used for PageModel utilities.
116
203
  * Accessed from the window at window.sas.vi.pageModel.
117
204
  */
118
205
  export interface PageModelApi {
206
+ /**
207
+ * Methods related to page event hooks.
208
+ */
209
+ readonly events: PageEventsApi;
119
210
  /**
120
211
  * @method
121
212
  * @description Creates a new instance of a PageModel when given the object source.
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/page-state",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -1,31 +1,4 @@
1
- import { Template, StoredObjectDTO } from "../svi-datahub";
2
- /**
3
- * SAS Visual Investigator API's representation of a UI-Router state.
4
- * Accessed from the window at window.sas.vi.pageState.
5
- */
6
- export interface StateObject {
7
- /** The parent StateObject. */
8
- parent: StateObject;
9
- /** Name used to register the state. */
10
- name: string;
11
- /** Parent StateObject array from this state up to the root. */
12
- path: StateObject[];
13
- data: any;
14
- /**
15
- * An object containing the parent States' names as keys and
16
- * true as their values.
17
- */
18
- includes: {
19
- [name: string]: boolean;
20
- };
21
- /**
22
- * Function to return the root node of this state's tree.
23
- *
24
- * @returns The root of this state's tree.
25
- */
26
- root(): StateObject;
27
- toString(): string;
28
- }
1
+ import { StoredObjectDTO, Template } from "../svi-datahub";
29
2
  export interface HomepageDesignerState {
30
3
  isNew: boolean;
31
4
  page: Template;
@@ -48,21 +21,21 @@ export interface PageStateApi {
48
21
  * @description Returns the state of the current page.
49
22
  * @returns An object containing the page state data or undefined if no page exists.
50
23
  */
51
- getCurrent(): StateObject | undefined;
24
+ getCurrent(): HomepageDesignerState | ObjectPageDesignerState | undefined;
52
25
  /**
53
26
  * @method
54
27
  * @description Returns the state of the page matching the ID.
55
28
  * @param id {string | number} Page ID for which the state will be returned.
56
29
  * @returns An object containing the page state data or undefined if the ID doesn't exist.
57
30
  */
58
- get(id: string | number): StateObject | undefined;
31
+ get(id: string | number): HomepageDesignerState | ObjectPageDesignerState | undefined;
59
32
  /**
60
33
  * @method
61
34
  * @description Creates a page state.
62
35
  * @param id {string | number} Page ID to be created.
63
- * @param state {StateObject} Object containing the state data required to create the page.
36
+ * @param state {HomepageDesignerState | ObjectPageDesignerState} Object containing the state data required to create the page.
64
37
  */
65
- add(id: string | number, state: StateObject): void;
38
+ add(id: string | number, state: HomepageDesignerState | ObjectPageDesignerState): void;
66
39
  /**
67
40
  * @method
68
41
  * @description Deletes a page state.
@@ -70,7 +43,7 @@ export interface PageStateApi {
70
43
  */
71
44
  remove(id: string | number): void;
72
45
  /**
73
- * Gives the currently active homepages state, or undefined if a homepage
46
+ * Gives the currently active Home page's state, or undefined if a Home page
74
47
  * designer tab is not active.
75
48
  */
76
49
  getCurrentHomepageDesigner(): HomepageDesignerState | undefined;
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/property",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -49,9 +49,9 @@ export interface PropertyApi {
49
49
  * @method
50
50
  * @description Registers a custom element to be rendered as the property editor.
51
51
  * The element is rendered as a custom web component.
52
- * The element is passed selectedNode, property, propertyKey and categoryKey as attributes.
52
+ * The element is passed selectedNode, property, propertyKey, and categoryKey as attributes.
53
53
  * Throws a console error if the type is already used by another registered editor.
54
- * @param elementName {string} Element to be rendered. For example "custom-editor" renders an element with the tag name "custom-editor".
54
+ * @param elementName {string} Element to be rendered. For example, "custom-editor" renders an element with the tag name "custom-editor".
55
55
  * @param type {string} A custom type that is expected to be unique among registered editors.
56
56
  * @param [validatorFn] {PropertyApi~isPropertyEditorValid} Function to provide custom logic for determining if the editor is valid.
57
57
  * @param [metadataFn] {PropertyApi~getPropertyEditorMetadata} Function to provide custom metadata.
@@ -61,7 +61,7 @@ export interface PropertyApi {
61
61
  * @method
62
62
  * @description Determines whether or not the child object data source property editor is valid.
63
63
  * Typically passed as a function reference to registerCustomEditor() instead of being called directly.
64
- * @param {PropertyConfig} propertyConfig Configuration details relating to the property type. For example, required, type and so on.
64
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the property type. For example, required, type, and so on.
65
65
  * @param {string} propertyKey Key where this property's value is stored.
66
66
  * @param {Control | ToolbarPropertyControl} control The control.
67
67
  * @example
@@ -76,7 +76,7 @@ export interface PropertyApi {
76
76
  * @method
77
77
  * @description Get metadata for the child object data source property editor.
78
78
  * Typically passed as a function reference to registerCustomEditor() instead of being called directly.
79
- * @param {PropertyConfig} propertyConfig Configuration details relating to the property type. For example, required, type and so on.
79
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the property type. For example, required, type, and so on.
80
80
  * @param {string} propertyKey Key where this property's value is stored.
81
81
  * @param {Control | ToolbarPropertyControl} control The control.
82
82
  * @example
@@ -91,7 +91,7 @@ export interface PropertyApi {
91
91
  /**
92
92
  * Determines whether or not the property editor is valid.
93
93
  * @callback PropertyApi~isPropertyEditorValid
94
- * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type and so on.
94
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type, and so on.
95
95
  * @param {string} propertyKey Key where this property's value is stored.
96
96
  * @param {Control | ToolbarPropertyControl} control The control.
97
97
  * @returns {boolean} true if valid, false if not.
@@ -99,7 +99,7 @@ export interface PropertyApi {
99
99
  /**
100
100
  * Get metadata for the property editor.
101
101
  * @callback PropertyApi~getPropertyEditorMetadata
102
- * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type and so on.
102
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type, and so on.
103
103
  * @param {string} propertyKey Key where this property's value is stored.
104
104
  * @param {Control | ToolbarPropertyControl} control The control.
105
105
  * @returns {PageTemplateMetadata}
@@ -2,7 +2,7 @@ export {};
2
2
  /**
3
3
  * Determines whether or not the property editor is valid.
4
4
  * @callback PropertyApi~isPropertyEditorValid
5
- * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type and so on.
5
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type, and so on.
6
6
  * @param {string} propertyKey Key where this property's value is stored.
7
7
  * @param {Control | ToolbarPropertyControl} control The control.
8
8
  * @returns {boolean} true if valid, false if not.
@@ -10,7 +10,7 @@ export {};
10
10
  /**
11
11
  * Get metadata for the property editor.
12
12
  * @callback PropertyApi~getPropertyEditorMetadata
13
- * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type and so on.
13
+ * @param {PropertyConfig} propertyConfig Configuration details relating to the custom property type. For example, required, type, and so on.
14
14
  * @param {string} propertyKey Key where this property's value is stored.
15
15
  * @param {Control | ToolbarPropertyControl} control The control.
16
16
  * @returns {PageTemplateMetadata}
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/reference-data",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/resource",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -1,6 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- // Generated using typescript-generator version 2.15.527 on 2023-01-24 10:52:36.
3
+ // Generated using typescript-generator version 2.15.527 on 2023-07-07 09:38:54.
4
4
 
5
5
  export interface BaseRep extends TrackedResource {
6
6
  links?: Link[];
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "@types/score-reps",
3
+ "version": "4.0.12",
4
+ "types": "index.d.ts"
5
+ }
@@ -1,5 +1,5 @@
1
1
  import { Relationship } from "../../svi-datahub";
2
- import { MapBoundedBoxFilter, MapBoundedPolygonFilter, MapRadiusFilter, MapShapeFilter, QueryMode, SearchRepresentation, SearchResponse } from "../../svi-sand";
2
+ import { MapBoundedBoxFilter, MapBoundedPolygonFilter, MapRadiusFilter, MapShapeFilter, QueryMode, SearchRepresentation, SearchResponse, SummaryVisualizationResponse } from "../../svi-sand";
3
3
  import { ObjectIdentifier } from "../../object/object-api";
4
4
  import { QueryBuilderModel, SearchApi } from "../search-api";
5
5
  export declare enum SearchVisualization {
@@ -52,7 +52,7 @@ export interface SearchAndCreateDialogModel {
52
52
  canCreate?: boolean;
53
53
  linkReasons?: Relationship[];
54
54
  /**
55
- * Values returned on the close of the dialog. May be undefined when dialog is cancelled.
55
+ * Values returned on the close of the dialog box. May be undefined when dialog box is cancelled.
56
56
  */
57
57
  result?: SearchAndCreateResponse;
58
58
  }
@@ -73,7 +73,7 @@ export interface SearchAndCreateResponse {
73
73
  relateToModel?: SearchAndCreateRelateToModel;
74
74
  }
75
75
  /**
76
- * {@link SearchApi} extension pertains to functionality related to SAS Visual Investigators search capabilities.
76
+ * {@link SearchApi} extension pertains to functionality related to SAS Visual Investigator's search capabilities.
77
77
  * These additional methods are available only in the SAS Visual Investigator Client Application.
78
78
  * Accessed from the window at window.sas.vi.search.
79
79
  * @extends SearchApi
@@ -83,7 +83,7 @@ export interface ClientSearchApi extends SearchApi {
83
83
  * @method
84
84
  * @description Performs a search against the svi-sand service.
85
85
  * @param query {SearchRepresentation} Query to send to the service.
86
- * @returns A promise containing the search response.
86
+ * @returns A Promise containing the search response.
87
87
  */
88
88
  performSearch(query: SearchRepresentation): Promise<SearchResponse>;
89
89
  /**
@@ -92,7 +92,7 @@ export interface ClientSearchApi extends SearchApi {
92
92
  * @param queryText {string} Text used to form the query.
93
93
  * @param visualizationName {"summary" | "map" | "table"} Visualization to query for and then display to the user.
94
94
  * @param [mapFilters] {MapFilter[]} The map filter object to include with the search query. This can consist of MapBoundedPolygonFilter, MapRadiusFilter, MapBoundedBoxFilter or MapShapeFilter.
95
- * @param [queryMode] {"standard" | "phonetic" | "synonym"} Used to perform phonetic and synonym searches. Default is "standard".
95
+ * @param [queryMode] {"standard" | "phonetic" | "synonym"} Used to perform phonetic and synonym searches. Default: "standard".
96
96
  */
97
97
  navigateSearch(queryText: string, visualizationName: SearchVisualization, mapFilters?: MapFilter[], queryMode?: QueryMode[]): Promise<void>;
98
98
  /**
@@ -104,7 +104,7 @@ export interface ClientSearchApi extends SearchApi {
104
104
  * @method
105
105
  * @description Converts a query model generated by the query builder to a string.
106
106
  * @param queryModel {QueryBuilderModel} Query builder model.
107
- * @returns A promise containing the string representation of the query.
107
+ * @returns A Promise containing the string representation of the query.
108
108
  */
109
109
  createQueryStringFromModel(queryModel: QueryBuilderModel): Promise<string>;
110
110
  /**
@@ -117,15 +117,15 @@ export interface ClientSearchApi extends SearchApi {
117
117
  /**
118
118
  * @method
119
119
  * @description Sets the query builder model for the given ID. If no ID is given, it sets the query model for SEARCH.
120
- * Once stored, the query model is used to initially populate a Query Builder opened with the given ID.
120
+ * When stored, the query model is used to initially populate a Query Builder opened with the given ID.
121
121
  * @param queryModel {QueryBuilderModel} A query builder model.
122
- * @param [id] {string} ID of the model to set. Defaults to SEARCH.
122
+ * @param [id] {string} ID of the model to set. Default: SEARCH.
123
123
  */
124
124
  setQueryBuilderModel(queryModel: QueryBuilderModel, id?: string): void;
125
125
  /**
126
126
  * @method
127
- * @description Opens up the "Add Objects to Workspace" dialog box and then performs the action once a document and workspace have been selected.
128
- * @param visualizationName {Visualization} Visualization to initially display once the objects have been added.
127
+ * @description Opens the "Add Objects to Workspace" dialog box and then performs the action after a document and workspace have been selected.
128
+ * @param visualizationName {Visualization} Visualization to display after the objects have been added.
129
129
  * @param objects {Array<ObjectIdentifier | ResolvedObjectIdentifier>} Objects to add to the workspace.
130
130
  * @param [currentObject] {ObjectIdentifier} The document the user is currently viewing. This is used as a visual aid in the dialog box.
131
131
  * @param [networkData] {NetworkData} Network visualization data to be copied to the workspace.
@@ -147,17 +147,27 @@ export interface ClientSearchApi extends SearchApi {
147
147
  * @param objectsToAdd {Array<ObjectIdentifier | ResolvedObjectIdentifier>} Objects to add to the workspace.
148
148
  * @param targetObjectType {string} Object type where the workspace is created.
149
149
  * @param [targetObjectId] {string} Object to add to the workspace. If undefined, a new object is created.
150
- * @param [visualization] {"summary" | "map" | "table" | "timeline" | "network"} Visualization to initially display in the new workspace.
150
+ * @param [visualization] {"summary" | "map" | "table" | "timeline" | "networkDiagram"} Visualization to initially display in the new workspace.
151
151
  * @param [workspaceName] {string} Name of the new workspace.
152
152
  * @param [networkData] {NetworkData} Network visualization data to be copied to the new workspace.
153
153
  */
154
154
  addToNewWorkspace(objectsToAdd: Array<ObjectIdentifier | ResolvedObjectIdentifier>, targetObjectType: string, targetObjectId?: string, visualization?: Visualization, workspaceName?: string, networkData?: NetworkData): Promise<void>;
155
155
  /**
156
156
  * @method
157
- * @description Launches a wizard allowing users to search first, before creating an object/relationship.
158
- * Relationship wizard is determined by relateToParentLabel or relateToParentName being defined within the wizardValues parameter.
157
+ * @description Launches a wizard allowing users to search, before creating an object/relationship.
158
+ * The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
159
159
  * @param wizardValues {SearchAndCreateDialogModel} Object containing entity and relationship data.
160
- * @returns {Promise<SearchAndCreateDialogModel>} A promise resolving
160
+ * @returns A Promise which resolves when the dialog box is closed.
161
161
  */
162
162
  openSearchAndCreateDialog(wizardValues: SearchAndCreateDialogModel): Promise<SearchAndCreateDialogModel>;
163
+ /**
164
+ * @method
165
+ * @description Gets the selected items within the search result or specified workspace.
166
+ * @param selectionId {string} The selection ID for the currently selected objects. Default: "SEARCH".
167
+ * @param maxItems {number} The maximum number of items to get in the selection. Default: 50.
168
+ * @param textAnalytics {boolean} Boolean value to determine whether the current visualization is Text Analytics. Default: false.
169
+ */
170
+ getSelectedItems(selectionId: string, maxItems: number, textAnalytics: boolean): Promise<{
171
+ [index: string]: SummaryVisualizationResponse;
172
+ } | undefined>;
163
173
  }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/search",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "public-api.js",
8
+ "types": "public-api.d.ts"
9
+ }
@@ -57,7 +57,7 @@ export interface SearchApi {
57
57
  * @param [queryModel] {QueryBuilderModel} An existing query model that can be used to initially populate the query builder.
58
58
  * @param [enforceObjectType] {string} If enforceObjectType is set, the user cannot choose which entity to query. It is pre-set to the specified entity.
59
59
  * @param [restrictObjectTypes] {Array<string>} If restrictObjectTypes is set, then the entity dropdown is filtered to show only the entities in this list.
60
- * @returns A promise containing the result of the dialog box.
60
+ * @returns A Promise containing the result of the dialog box.
61
61
  * @example
62
62
  * const searchApi: SearchApi = window.sas.vi.search;
63
63
  * const dialogTitle = 'Intelligence Search'