@sassoftware/vi-api 1.5.0 → 1.7.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/alert-reps/package.json +5 -0
- package/component/bindings.d.ts +10 -4
- package/component/index.d.ts +11 -10
- package/component/index.js +1 -1
- package/component/package.json +9 -0
- package/config/config-api.d.ts +20 -2
- package/config/package.json +9 -0
- package/control/control-api.d.ts +25 -15
- package/control/package.json +9 -0
- package/current-user/package.json +9 -0
- package/event/package.json +9 -0
- package/file/package.json +9 -0
- package/http/package.json +9 -0
- package/index.d.ts +2 -2
- package/localization/package.json +9 -0
- package/metadata/metadata-api.d.ts +12 -12
- package/metadata/package.json +9 -0
- package/object/object-api.d.ts +20 -20
- package/object/package.json +9 -0
- package/package.json +2 -1
- package/page-admin/package.json +9 -0
- package/page-admin/page-admin-api.d.ts +2 -2
- package/page-model/package.json +9 -0
- package/page-model/page-model-api.d.ts +92 -1
- package/page-state/package.json +9 -0
- package/page-state/page-state-api.d.ts +1 -1
- package/property/package.json +9 -0
- package/property/property-api.d.ts +6 -6
- package/property/property-api.js +2 -2
- package/reference-data/package.json +9 -0
- package/resource/package.json +9 -0
- package/score-reps/package.json +5 -0
- package/search/client/client-search-api.d.ts +8 -8
- package/search/package.json +9 -0
- package/search/search-api.d.ts +1 -1
- package/sheet/package.json +9 -0
- package/sheet/sheet-api.d.ts +6 -6
- package/svi-datahub/index.d.ts +37 -24
- package/svi-datahub/package.json +5 -0
- package/svi-sand/index.d.ts +31 -24
- package/svi-sand/package.json +5 -0
- package/tab/package.json +9 -0
- package/tab/tab-api.d.ts +1 -1
- package/theme/package.json +9 -0
- package/time-slider/index.d.ts +9 -0
- package/traversal/package.json +9 -0
- package/api-init.service.js +0 -86
- package/component/component-api.service.js +0 -161
- package/config/config-api.service.js +0 -54
- package/current-user/currentUser-api.service.js +0 -49
- package/event/event-api.service.js +0 -32
- package/file/file-api.service.js +0 -24
- package/http/http-api.service.js +0 -64
- package/localization/localization-api.service.js +0 -38
- package/metadata/admin/admin-metadata-api.service.js +0 -30
- package/metadata/metadata-api.service.js +0 -85
- package/object/object-api.service.js +0 -207
- package/page-admin/page-admin-api.service.js +0 -25
- package/page-model/page-model-api.service.js +0 -25
- package/page-state/page-state-api.service.js +0 -70
- package/property/property-api.service.js +0 -34
- package/reference-data/refData.service.js +0 -40
- package/resource/resource-api.service.js +0 -24
- package/search/client/client-search-api.service.js +0 -111
- package/search/search-api.service.js +0 -28
- package/sheet/network-menu-handler.service.js +0 -39
- package/sheet/sheet-api.service.js +0 -140
- package/tab/tab-api.service.js +0 -35
- package/theme/theme-api.service.js +0 -35
- package/traversal/traversal-api.service.js +0 -77
package/component/bindings.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { QueryMode } from "../svi-sand";
|
|
|
4
4
|
import { ControlContainer } from "../object/object-api";
|
|
5
5
|
import { PageModel, PageModelObjectData } from "../page-model/page-model-api";
|
|
6
6
|
import { SearchObject, SearchQuery } from "../search/client/client-search-api";
|
|
7
|
-
import { TimeSliderEventDates, TimeSliderRange } from "../time-slider";
|
|
7
|
+
import { HandleType, MinMaxDates, TimeSliderContextMenuHideOptions, TimeSliderEventDates, TimeSliderRange, TimeSliderRangeChangedEvent } from "../time-slider";
|
|
8
8
|
export interface SearchAndSelectWithPreviewInputBindings {
|
|
9
9
|
initialQuery?: string;
|
|
10
10
|
additionalModes?: QueryMode[];
|
|
@@ -77,11 +77,17 @@ export interface TimeSliderInputBindings {
|
|
|
77
77
|
timeSliderId: string;
|
|
78
78
|
timeSliderDates: TimeSliderEventDates;
|
|
79
79
|
viewRange: TimeSliderRange;
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
handleType?: HandleType;
|
|
81
|
+
isReadOnly?: boolean;
|
|
82
|
+
sliderWidth?: number;
|
|
83
|
+
disableSwitchHandleType?: boolean;
|
|
84
|
+
contextMenuHideOptions: TimeSliderContextMenuHideOptions;
|
|
85
|
+
minMaxDates?: MinMaxDates;
|
|
82
86
|
}
|
|
83
87
|
export interface TimeSliderBindings extends TimeSliderInputBindings {
|
|
84
|
-
rangeChangeEvent?: () => void;
|
|
88
|
+
rangeChangeEvent?: (rangeChangedEvent: TimeSliderRangeChangedEvent) => void;
|
|
89
|
+
handleTypeChange?: (handleType: HandleType) => void;
|
|
90
|
+
onLoad?: () => void;
|
|
85
91
|
close?: () => void;
|
|
86
92
|
}
|
|
87
93
|
export declare type SviComponentBindings = ControlCollectionBindings | RelationshipDetailsBindings | SearchInputBindings | PageBindings | SearchAndSelectWithPreviewBindings | TimeSliderBindings;
|
package/component/index.d.ts
CHANGED
|
@@ -7,22 +7,23 @@ export declare enum SviComponent {
|
|
|
7
7
|
SearchAndSelectWithPreview = "svi-search-and-select-with-preview",
|
|
8
8
|
TimeSlider = "svi-time-slider"
|
|
9
9
|
}
|
|
10
|
-
export interface ComponentCreationResult {
|
|
10
|
+
export interface ComponentCreationResult<T> {
|
|
11
11
|
element: HTMLElement;
|
|
12
12
|
destroy: () => void;
|
|
13
13
|
component: Record<string, any>;
|
|
14
|
+
setComponentInputValue?: (name: keyof T, value: unknown) => void;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Functionality related to dynamically creating SAS Visual Investigator UI components.
|
|
17
18
|
* Accessed from the window at window.sas.vi.component.
|
|
18
19
|
*/
|
|
19
20
|
export interface ComponentApi {
|
|
20
|
-
create(component: SviComponent.ControlCollection, target: HTMLElement, bindings?: ControlCollectionBindings): Promise<ComponentCreationResult
|
|
21
|
-
create(component: SviComponent.Page, target: HTMLElement, bindings?: PageBindings): Promise<ComponentCreationResult
|
|
22
|
-
create(component: SviComponent.RelationshipDetails, target: HTMLElement, bindings?: RelationshipDetailsBindings): Promise<ComponentCreationResult
|
|
23
|
-
create(component: SviComponent.SearchInput, target: HTMLElement, bindings?: SearchInputBindings): Promise<ComponentCreationResult
|
|
24
|
-
create(component: SviComponent.SearchAndSelectWithPreview, target: HTMLElement, bindings?: SearchAndSelectWithPreviewBindings): Promise<ComponentCreationResult
|
|
25
|
-
create(component: SviComponent.TimeSlider, target: HTMLElement, bindings?: TimeSliderBindings): Promise<ComponentCreationResult
|
|
21
|
+
create(component: SviComponent.ControlCollection, target: HTMLElement, bindings?: ControlCollectionBindings): Promise<ComponentCreationResult<ControlCollectionBindings>>;
|
|
22
|
+
create(component: SviComponent.Page, target: HTMLElement, bindings?: PageBindings): Promise<ComponentCreationResult<PageBindings>>;
|
|
23
|
+
create(component: SviComponent.RelationshipDetails, target: HTMLElement, bindings?: RelationshipDetailsBindings): Promise<ComponentCreationResult<RelationshipDetailsBindings>>;
|
|
24
|
+
create(component: SviComponent.SearchInput, target: HTMLElement, bindings?: SearchInputBindings): Promise<ComponentCreationResult<SearchInputBindings>>;
|
|
25
|
+
create(component: SviComponent.SearchAndSelectWithPreview, target: HTMLElement, bindings?: SearchAndSelectWithPreviewBindings): Promise<ComponentCreationResult<SearchAndSelectWithPreviewBindings>>;
|
|
26
|
+
create(component: SviComponent.TimeSlider, target: HTMLElement, bindings?: TimeSliderBindings): Promise<ComponentCreationResult<TimeSliderBindings>>;
|
|
26
27
|
/**
|
|
27
28
|
* Dynamically create a SAS Visual Investigator UI component appended to a given target DOM element location.
|
|
28
29
|
*
|
|
@@ -30,10 +31,10 @@ export interface ComponentApi {
|
|
|
30
31
|
* @param component {SviComponent} Creates the component.
|
|
31
32
|
* @param target {HTMLElement} Appends the component to the element.
|
|
32
33
|
* @param [bindings] {SviComponentBindings} Creates the component with the bindings.
|
|
33
|
-
* @returns A
|
|
34
|
+
* @returns A Promise that resolves when the component has been created.
|
|
34
35
|
* Resolves to an object containing the created element and a function to destroy it.
|
|
35
36
|
*/
|
|
36
|
-
create(component: SviComponent, target: HTMLElement, bindings?: SviComponentBindings): Promise<ComponentCreationResult
|
|
37
|
+
create(component: SviComponent, target: HTMLElement, bindings?: SviComponentBindings): Promise<ComponentCreationResult<SviComponentBindings>>;
|
|
37
38
|
/**
|
|
38
39
|
* @method
|
|
39
40
|
* Notifies the application to identify and react to any changes that have been applied.
|
|
@@ -43,7 +44,7 @@ export interface ComponentApi {
|
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
46
|
* @callback ComponentApi~afterDetectChanges
|
|
46
|
-
* @description A function to be called after change detection
|
|
47
|
+
* @description A function to be called after change detection.
|
|
47
48
|
* @returns {void}
|
|
48
49
|
*/
|
|
49
50
|
export * from "./bindings";
|
package/component/index.js
CHANGED
|
@@ -10,7 +10,7 @@ export var SviComponent;
|
|
|
10
10
|
})(SviComponent || (SviComponent = {}));
|
|
11
11
|
/**
|
|
12
12
|
* @callback ComponentApi~afterDetectChanges
|
|
13
|
-
* @description A function to be called after change detection
|
|
13
|
+
* @description A function to be called after change detection.
|
|
14
14
|
* @returns {void}
|
|
15
15
|
*/
|
|
16
16
|
export * from "./bindings";
|
package/config/config-api.d.ts
CHANGED
|
@@ -44,6 +44,18 @@ export interface SolutionExtensionMetadata {
|
|
|
44
44
|
showInToolbox?: "true" | "false";
|
|
45
45
|
mainDocumentOnly?: boolean;
|
|
46
46
|
}
|
|
47
|
+
export declare type SviDocumentManager = {
|
|
48
|
+
key: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
onClick: (onFilesAdded: (files: SviLinkedFile[]) => void) => void;
|
|
51
|
+
};
|
|
52
|
+
export interface SviLinkedFile {
|
|
53
|
+
fileName: string;
|
|
54
|
+
link: string;
|
|
55
|
+
type: string;
|
|
56
|
+
content?: string;
|
|
57
|
+
size: number;
|
|
58
|
+
}
|
|
47
59
|
/**
|
|
48
60
|
* Functionality related to configuration.
|
|
49
61
|
* Accessed from the window at window.sas.vi.config.
|
|
@@ -80,14 +92,20 @@ export interface ConfigApi {
|
|
|
80
92
|
* @method
|
|
81
93
|
* @description Retrieves registered solution extension with a given name.
|
|
82
94
|
* @param name {string} Name of the solution extension.
|
|
83
|
-
* @returns A
|
|
95
|
+
* @returns A Promise that resolves to the solution extension if the name is found.
|
|
84
96
|
*/
|
|
85
97
|
getSolutionExtension(name: string): Promise<SolutionExtension | undefined>;
|
|
86
98
|
/**
|
|
87
99
|
* @method
|
|
88
100
|
* @description Registers a solution extension with the application.
|
|
89
101
|
* @param config {SolutionExtension} Solution extension configuration.
|
|
90
|
-
* @returns A Promise that resolves
|
|
102
|
+
* @returns A Promise that resolves when the solution has been sent to the cache.
|
|
91
103
|
*/
|
|
92
104
|
registerSolutionExtension(config: SolutionExtension): Promise<void>;
|
|
105
|
+
/**
|
|
106
|
+
* @method
|
|
107
|
+
* @description Registers a document manager with the application.
|
|
108
|
+
* @param config {SviDocumentManager} Document manager configuration.
|
|
109
|
+
*/
|
|
110
|
+
registerDocumentManager(config: SviDocumentManager): void;
|
|
93
111
|
}
|
package/control/control-api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileChange, SASObjectAttachedFile, SASUploadedFile } from "../file/file-api";
|
|
2
|
-
import { PageMode, PageModel } from "../page-model/page-model-api";
|
|
2
|
+
import { PageEventsApiBase, PageMode, PageModel } from "../page-model/page-model-api";
|
|
3
3
|
import { FieldType, FieldTypeToValue } from "./data-types";
|
|
4
4
|
import { PageDataChange, PageModeChange, StateChange } from "./events";
|
|
5
5
|
import { Control, RefreshablePageControlOptions, SlidingPanelContent, SlidingPanelProperties, TypeAttributes } from "./page";
|
|
@@ -24,7 +24,7 @@ export interface ControlMemberApiBase<ControlTypeAttributes extends TypeAttribut
|
|
|
24
24
|
*/
|
|
25
25
|
export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = any> extends ControlMemberApiBase<ControlTypeAttributes, ControlFieldType> {
|
|
26
26
|
/**
|
|
27
|
-
* Methods related to this control
|
|
27
|
+
* Methods related to this control.
|
|
28
28
|
*/
|
|
29
29
|
readonly control: ControlApi<ControlTypeAttributes, ControlFieldType>;
|
|
30
30
|
/**
|
|
@@ -37,7 +37,7 @@ export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes =
|
|
|
37
37
|
readonly admin: ControlAdminApi;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* This Control API pertains functionality that checks the state, registers event handlers and so on.
|
|
40
|
+
* This Control API pertains to functionality that checks the state, registers event handlers, and so on.
|
|
41
41
|
*/
|
|
42
42
|
export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = never> {
|
|
43
43
|
/**
|
|
@@ -127,7 +127,7 @@ export interface ControlApi<ControlTypeAttributes extends TypeAttributes = TypeA
|
|
|
127
127
|
*/
|
|
128
128
|
getAriaLabel: () => string;
|
|
129
129
|
/**
|
|
130
|
-
* Sets the value of the component specific API
|
|
130
|
+
* Sets the value of the component specific API.
|
|
131
131
|
* @param componentSpecificApi
|
|
132
132
|
*/
|
|
133
133
|
setComponentSpecificApi(componentSpecificApi?: any): void;
|
|
@@ -148,7 +148,7 @@ export interface ControlStateApi {
|
|
|
148
148
|
readonly required: boolean;
|
|
149
149
|
/**
|
|
150
150
|
* Checks if the current controls should allow input.
|
|
151
|
-
* Returns
|
|
151
|
+
* Returns true if the control allows input, otherwise false.
|
|
152
152
|
*/
|
|
153
153
|
readonly allowInput: boolean;
|
|
154
154
|
/**
|
|
@@ -187,7 +187,7 @@ export interface ControlStateApi {
|
|
|
187
187
|
export interface ControlPageFieldApi {
|
|
188
188
|
/**
|
|
189
189
|
* Sets the value of the supplied field.
|
|
190
|
-
* This works only with fields for the current object
|
|
190
|
+
* This works only with fields for the current object with which the control is associated.
|
|
191
191
|
* For example, if the control is on a parent object, you cannot set a child's field.
|
|
192
192
|
* @method
|
|
193
193
|
* @param value {FieldTypeToValue<Type>} New field value.
|
|
@@ -196,7 +196,7 @@ export interface ControlPageFieldApi {
|
|
|
196
196
|
setFieldValue<Type extends FieldType>(value: FieldTypeToValue<Type>, field: string): void;
|
|
197
197
|
/**
|
|
198
198
|
* Returns the value of the supplied field.
|
|
199
|
-
* This works only with fields for the current object
|
|
199
|
+
* This works only with fields for the current object with which the control is associated.
|
|
200
200
|
* For example, if the control is on a parent object, you cannot get a child's field.
|
|
201
201
|
* @method
|
|
202
202
|
* @template {FieldType} File type.
|
|
@@ -234,7 +234,7 @@ export interface ControlPageApiBase {
|
|
|
234
234
|
*/
|
|
235
235
|
readonly isExternalObject: boolean;
|
|
236
236
|
/**
|
|
237
|
-
* Checks if the page is a
|
|
237
|
+
* Checks if the page is a Home page.
|
|
238
238
|
*/
|
|
239
239
|
readonly isHomepage: boolean;
|
|
240
240
|
/**
|
|
@@ -269,6 +269,10 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
269
269
|
* Methods related to the files associated with the page.
|
|
270
270
|
*/
|
|
271
271
|
file: ControlFileApi;
|
|
272
|
+
/**
|
|
273
|
+
* Methods related to the hookable events associated with the page.
|
|
274
|
+
*/
|
|
275
|
+
events: ControlPageEventsApi;
|
|
272
276
|
/**
|
|
273
277
|
* Returns the model of the page in which the calling control resides.
|
|
274
278
|
* @method
|
|
@@ -335,7 +339,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
335
339
|
* Toggle the page-level sliding panel. This panel should be used to contain information that is
|
|
336
340
|
* supplementary to the document, for example attachments or workflow tasks.
|
|
337
341
|
* @method
|
|
338
|
-
* @param [sectionLabel] {string} Describes the section, this should be
|
|
342
|
+
* @param [sectionLabel] {string} Describes the section, this should be internationalized.
|
|
339
343
|
* @param [content] {SlidingPanelContent} The content of the sliding panel.
|
|
340
344
|
* @param [panelProperties] {SlidingPanelProperties} Properties for the panel.
|
|
341
345
|
* When providing a url for content: the panel properties will be available on the controller's "slidingPanel" object.
|
|
@@ -354,7 +358,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
354
358
|
* If the user has not saved, the user is prompted to do so.
|
|
355
359
|
* @method
|
|
356
360
|
* @param closeTab {boolean} Checks if the tab should close after edit mode is cancelled.
|
|
357
|
-
* @returns A
|
|
361
|
+
* @returns A Promise that resolves when the edit has been cancelled.
|
|
358
362
|
*/
|
|
359
363
|
cancelEdit(closeTab: boolean): Promise<{
|
|
360
364
|
userSaved: boolean;
|
|
@@ -362,18 +366,18 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
362
366
|
/**
|
|
363
367
|
* Sets the page to be in edit mode. Used when clicking the Edit button.
|
|
364
368
|
* @method
|
|
365
|
-
* @returns A
|
|
369
|
+
* @returns A Promise that resolves when the page is put in edit mode.
|
|
366
370
|
*/
|
|
367
371
|
edit(): Promise<any>;
|
|
368
372
|
/**
|
|
369
|
-
* Refreshes the attachments grid to display new attachments when new attachment is uploaded.
|
|
373
|
+
* Refreshes the attachments grid to display new attachments when a new attachment is uploaded.
|
|
370
374
|
* @method
|
|
371
375
|
*/
|
|
372
376
|
refreshAttachments(): void;
|
|
373
377
|
/**
|
|
374
378
|
* Reloads an instance of a page.
|
|
375
379
|
* @method
|
|
376
|
-
* @returns A
|
|
380
|
+
* @returns A Promise that resolves when the page is reloaded.
|
|
377
381
|
*/
|
|
378
382
|
reloadPage(): Promise<void>;
|
|
379
383
|
/**
|
|
@@ -381,7 +385,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
381
385
|
* @method
|
|
382
386
|
* @param stopEditing {boolean} Checks if the page should leave edit mode after it is saved.
|
|
383
387
|
* @param closeObject {boolean} Checks if the page should be closed after it is saved.
|
|
384
|
-
* @returns A
|
|
388
|
+
* @returns A Promise which resolves when the page has been saved.
|
|
385
389
|
*/
|
|
386
390
|
save(stopEditing: boolean, closeObject: boolean): Promise<void>;
|
|
387
391
|
}
|
|
@@ -444,7 +448,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
444
448
|
*/
|
|
445
449
|
updateFile(updatedFile: SASUploadedFile): Promise<void>;
|
|
446
450
|
/**
|
|
447
|
-
*
|
|
451
|
+
* Creates a file operation to remove a file with a given ID.
|
|
448
452
|
*
|
|
449
453
|
* @method
|
|
450
454
|
* @param {string} id The ID of the file to remove.
|
|
@@ -460,3 +464,9 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
460
464
|
*/
|
|
461
465
|
onChange(handler: (change: FileChange) => void): void;
|
|
462
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Equivalent to {@link PageEventsApiBase} with the exception that event hooks will be scoped to the page on which the calling control resides.
|
|
469
|
+
* @extends PageEventsApiBase
|
|
470
|
+
*/
|
|
471
|
+
export interface ControlPageEventsApi extends PageEventsApiBase {
|
|
472
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { TabApi } from "./tab/tab-api";
|
|
|
21
21
|
import { ThemeApi } from "./theme/theme-api";
|
|
22
22
|
import { TraversalApi } from "./traversal/traversal-api";
|
|
23
23
|
/**
|
|
24
|
-
* Common API Functions
|
|
24
|
+
* Common API Functions.
|
|
25
25
|
*/
|
|
26
26
|
export interface SviCommonApi {
|
|
27
27
|
component: ComponentApi;
|
|
@@ -52,7 +52,7 @@ export interface SviClientApi extends SviCommonApi {
|
|
|
52
52
|
tab: TabApi;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* The Admin API
|
|
55
|
+
* The Admin API.
|
|
56
56
|
*/
|
|
57
57
|
export interface SviAdminApi extends SviCommonApi {
|
|
58
58
|
metadata: AdminMetadataApi;
|
|
@@ -136,16 +136,16 @@ export interface ReferenceDataOptions {
|
|
|
136
136
|
export interface MetadataApi {
|
|
137
137
|
/**
|
|
138
138
|
* @method
|
|
139
|
-
* @description Gets create, read and update access rights for an entity.
|
|
139
|
+
* @description Gets create, read, and update access rights for an entity.
|
|
140
140
|
* @param objectType {string} Entity name.
|
|
141
|
-
* @returns Object with a
|
|
141
|
+
* @returns Object with a Promise of type boolean for each rule.
|
|
142
142
|
*/
|
|
143
143
|
getEntityAccessRules(objectType: string): EntityAccessRules;
|
|
144
144
|
/**
|
|
145
145
|
* @method
|
|
146
146
|
* @description Checks access rights and gets metadata for an entity. Returns undefined if the entity does not exist.
|
|
147
147
|
* @param objectType {string} Entity name.
|
|
148
|
-
* @returns A
|
|
148
|
+
* @returns A Promise containing the entity metadata.
|
|
149
149
|
*/
|
|
150
150
|
getEntity(objectType: string): Promise<StoredObjectDTO | undefined>;
|
|
151
151
|
/**
|
|
@@ -153,26 +153,26 @@ export interface MetadataApi {
|
|
|
153
153
|
* @description Gets metadata for an entity field.
|
|
154
154
|
* @param objectType {string} Entity name.
|
|
155
155
|
* @param fieldName {string} Field name.
|
|
156
|
-
* @returns A
|
|
156
|
+
* @returns A Promise containing the field metadata.
|
|
157
157
|
*/
|
|
158
158
|
getField(objectType: string, fieldName: string): Promise<CoreStoredObjectField>;
|
|
159
159
|
/**
|
|
160
160
|
* @method
|
|
161
161
|
* @description Gets managed entity types.
|
|
162
|
-
* @returns A
|
|
162
|
+
* @returns A Promise containing an array of managed entity types.
|
|
163
163
|
*/
|
|
164
164
|
getManagedEntityTypes(): Promise<StoredObjectDTO[]>;
|
|
165
165
|
/**
|
|
166
166
|
* @method
|
|
167
167
|
* @description Gets root type entities that are not child types.
|
|
168
|
-
* @returns A
|
|
168
|
+
* @returns A Promise containing an array of root types.
|
|
169
169
|
*/
|
|
170
170
|
getRootTypes(): Promise<StoredObjectDTO[]>;
|
|
171
171
|
/**
|
|
172
172
|
* @method
|
|
173
173
|
* @description Gets child entity types for a given entity.
|
|
174
174
|
* @param objectType {string} Checks for children for the named entity.
|
|
175
|
-
* @returns A
|
|
175
|
+
* @returns A Promise containing an array of child entity types or an empty list if none are found.
|
|
176
176
|
*/
|
|
177
177
|
getChildEntityTypes(objectType: string): Promise<StoredObjectDTO[]>;
|
|
178
178
|
/**
|
|
@@ -189,15 +189,15 @@ export interface MetadataApi {
|
|
|
189
189
|
getAllValidRelationshipTypes(objectType: string, relationshipObjectType?: string, relationshipName?: string): Promise<ValidRelationshipTypes>;
|
|
190
190
|
/**
|
|
191
191
|
* @method
|
|
192
|
-
* @description Gets metadata for all resolved entities
|
|
193
|
-
* @returns A
|
|
192
|
+
* @description Gets metadata for all resolved entities.
|
|
193
|
+
* @returns A Promise containing an array of the resolved entities metadata.
|
|
194
194
|
*/
|
|
195
195
|
getResolvedEntities(): Promise<Entity[]>;
|
|
196
196
|
/**
|
|
197
197
|
* @method
|
|
198
198
|
* @description Gets metadata for a resolved entity.
|
|
199
199
|
* @param objectType {string} Resolved Entity Name.
|
|
200
|
-
* @returns A
|
|
200
|
+
* @returns A Promise containing resolved entity metadata or undefined if none exists.
|
|
201
201
|
*/
|
|
202
202
|
getResolvedEntityMetadata(objectType: string): Promise<Entity | undefined>;
|
|
203
203
|
/**
|
|
@@ -212,8 +212,8 @@ export interface MetadataApi {
|
|
|
212
212
|
* @deprecated Use `getRootTypes()` and `getResolvedEntities()` instead.
|
|
213
213
|
*
|
|
214
214
|
* @method
|
|
215
|
-
* @description Gets metadata for both entities and resolved entities
|
|
216
|
-
* @returns A
|
|
215
|
+
* @description Gets metadata for both entities and resolved entities.
|
|
216
|
+
* @returns A Promise resolving to Search entity metadata.
|
|
217
217
|
*/
|
|
218
218
|
getSearchMetadata(): Promise<EntityMetadata>;
|
|
219
219
|
/**
|
package/object/object-api.d.ts
CHANGED
|
@@ -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
|
|
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,7 +81,7 @@ 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
|
|
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
87
|
/**
|
|
@@ -89,7 +89,7 @@ export interface ObjectApi {
|
|
|
89
89
|
* @description Deletes an object.
|
|
90
90
|
* @param objectType {string} Object type.
|
|
91
91
|
* @param objectId {string} Object ID.
|
|
92
|
-
* @return A
|
|
92
|
+
* @return A Promise that resolves to void when the specified object is successfully deleted.
|
|
93
93
|
*/
|
|
94
94
|
deleteObject(objectType: string, objectId: string): Promise<void>;
|
|
95
95
|
/**
|
|
@@ -99,14 +99,14 @@ export interface ObjectApi {
|
|
|
99
99
|
* @param objectTypeId {number} Object type ID.
|
|
100
100
|
* @param fieldValues {FieldValues} Field values of the object.
|
|
101
101
|
* @param [options] {CreateObjectOptions} Optional extra parameters.
|
|
102
|
-
* @return A
|
|
102
|
+
* @return A Promise that resolves to the created object when the object has successfully been created.
|
|
103
103
|
*/
|
|
104
104
|
createObject(objectType: string, objectTypeId: number, fieldValues: FieldValues, options?: CreateObjectOptions): Promise<VIObject>;
|
|
105
105
|
/**
|
|
106
106
|
* @method
|
|
107
107
|
* @description Gets relationship via the relationship ID.
|
|
108
108
|
* @param relationshipId {string} Relationship ID.
|
|
109
|
-
* @return A
|
|
109
|
+
* @return A Promise that resolves to a relationship.
|
|
110
110
|
*/
|
|
111
111
|
getObjectRelationship(relationshipId: string): Promise<ObjectRelationship>;
|
|
112
112
|
/**
|
|
@@ -114,14 +114,14 @@ export interface ObjectApi {
|
|
|
114
114
|
* @description Updates an existing relationship in SAS Visual Investigator.
|
|
115
115
|
* @param relationshipId {string} Relationship ID.
|
|
116
116
|
* @param payload {any} HTTP request content.
|
|
117
|
-
* @return A
|
|
117
|
+
* @return A Promise that resolves to a relationship.
|
|
118
118
|
*/
|
|
119
119
|
updateObjectRelationship(relationshipId: string, payload: any): Promise<ObjectRelationship>;
|
|
120
120
|
/**
|
|
121
121
|
* @method
|
|
122
122
|
* @description Deletes relationship with the specified ID.
|
|
123
123
|
* @param relationshipId {string} Relationship ID.
|
|
124
|
-
* @return A
|
|
124
|
+
* @return A Promise that resolves to void when the object is successfully deleted.
|
|
125
125
|
*/
|
|
126
126
|
deleteObjectRelationship(relationshipId: string): Promise<void>;
|
|
127
127
|
/**
|
|
@@ -130,7 +130,7 @@ export interface ObjectApi {
|
|
|
130
130
|
* @param from {VIObject} Object that relationship is from.
|
|
131
131
|
* @param to {VIObject} Object that relationship is to.
|
|
132
132
|
* @param relationship {ObjectRelationship} The relationship.
|
|
133
|
-
* @return A
|
|
133
|
+
* @return A Promise that resolves to an object.
|
|
134
134
|
*/
|
|
135
135
|
relateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
|
|
136
136
|
/**
|
|
@@ -147,7 +147,7 @@ export interface ObjectApi {
|
|
|
147
147
|
* @param from {VIObject} Object that the relationship is from.
|
|
148
148
|
* @param to {VIObject} Object that the relationship is to.
|
|
149
149
|
* @param relationship {ObjectRelationship} The relationship.
|
|
150
|
-
* @return A
|
|
150
|
+
* @return A Promise that resolves to a newly created relationship.
|
|
151
151
|
*/
|
|
152
152
|
createAndRelateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
|
|
153
153
|
/**
|
|
@@ -156,7 +156,7 @@ export interface ObjectApi {
|
|
|
156
156
|
* @param objects {VIObject[]} Array of objects.
|
|
157
157
|
* @param objectType {string} Type of the objects in the array.
|
|
158
158
|
* @param [options] {FormatObjectFieldsOptions} Optional parameters to control the formatting. By default, nothing is skipped and there is no formatCallback.
|
|
159
|
-
* @return A
|
|
159
|
+
* @return A Promise that resolves to the formatted array of objects.
|
|
160
160
|
*/
|
|
161
161
|
formatObjectFieldsForDisplay(objects: VIObject[], objectType: string, options?: FormatObjectFieldsOptions): Promise<VIObject[]>;
|
|
162
162
|
/**
|
|
@@ -165,7 +165,7 @@ export interface ObjectApi {
|
|
|
165
165
|
* @param attachmentModel {AttachmentModel} Attachment model.
|
|
166
166
|
* @param objectType {string} Object type.
|
|
167
167
|
* @param objectId {string} Object ID.
|
|
168
|
-
* @return A
|
|
168
|
+
* @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
|
|
169
169
|
*/
|
|
170
170
|
uploadAttachment(attachmentModel: AttachmentModel, objectType: string, objectId: string): Promise<FileAssociationResponse>;
|
|
171
171
|
/**
|
|
@@ -174,21 +174,21 @@ export interface ObjectApi {
|
|
|
174
174
|
* @param objectType {string} Object type.
|
|
175
175
|
* @param objectId {string} Object ID.
|
|
176
176
|
* @param attachmentId {string} Attachment ID.
|
|
177
|
-
* @return A
|
|
177
|
+
* @return A Promise that resolves to an empty HttpResponse when the attachment is successfully deleted.
|
|
178
178
|
*/
|
|
179
179
|
deleteAttachment(objectType: string, objectId: string, attachmentId: string): Promise<void>;
|
|
180
180
|
/**
|
|
181
181
|
* @method
|
|
182
182
|
* @description Gets an attachment of the associated object.
|
|
183
|
-
* @param objectId {string} Object ID
|
|
183
|
+
* @param objectId {string} Object ID.
|
|
184
184
|
* @param objectType {string} Object type.
|
|
185
185
|
* @param attachmentId {string} Attachment ID.
|
|
186
|
-
* @return A
|
|
186
|
+
* @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
|
|
187
187
|
*/
|
|
188
188
|
getAttachment(objectType: string, objectId: string, attachmentId: string): Promise<FileAssociationResponse>;
|
|
189
189
|
/**
|
|
190
190
|
* @method
|
|
191
|
-
* @description Validates the fields, controls and file categories of a child object.
|
|
191
|
+
* @description Validates the fields, controls, and file categories of a child object.
|
|
192
192
|
* @param pageModel {PageModel} Page model.
|
|
193
193
|
* @param childObject {StoredObjectMetadata} Child object metadata.
|
|
194
194
|
* @return An observable that resolves to an array of validation results.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/vi-api",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.1",
|
|
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
|
],
|