@sassoftware/vi-api 1.55.1 → 1.56.3
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/index.d.ts +19 -3
- package/alert-reps/package.json +1 -1
- package/component/bindings.d.ts +68 -25
- package/config/standardPropertyTypes.d.ts +2 -1
- package/config/standardPropertyTypes.js +1 -0
- package/control/events.d.ts +10 -0
- package/event/event-api.d.ts +2 -0
- package/event/event-api.js +2 -0
- package/mcp/mcp-api.d.ts +20 -0
- package/mcp/mcp-api.js +4 -1
- package/metadata/metadata-api.d.ts +1 -0
- package/object/object-api.d.ts +147 -21
- package/object/object-api.js +7 -0
- package/package.json +36 -36
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +1 -1
- package/search/client/client-search-api.d.ts +28 -1
- package/svi-datahub/index.d.ts +123 -50
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +4 -1
- package/svi-sand/package.json +1 -1
package/alert-reps/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
// Generated using typescript-generator version 2.15.527 on
|
|
3
|
+
// Generated using typescript-generator version 2.15.527 on 2026-05-28 08:54:14.
|
|
4
4
|
|
|
5
5
|
export interface ActionRequestRep {
|
|
6
6
|
version?: number;
|
|
@@ -450,17 +450,32 @@ export interface ScenarioFieldEventFieldDescriptionRep {
|
|
|
450
450
|
dataType?: string;
|
|
451
451
|
}
|
|
452
452
|
|
|
453
|
+
export interface ScenarioFiredEventBulkDispositionRep extends BaseRep {
|
|
454
|
+
version?: number;
|
|
455
|
+
scenarioFiredEventDispositionReps?: ScenarioFiredEventDispositionRep[];
|
|
456
|
+
scenarioFiredEventFailedDispositionReps?: ScenarioFiredEventFailedDispositionRep[];
|
|
457
|
+
}
|
|
458
|
+
|
|
453
459
|
export interface ScenarioFiredEventDispositionRep extends BaseRep {
|
|
454
460
|
version?: number;
|
|
455
461
|
scenarioFiredEventDispositionId?: string;
|
|
456
462
|
scenarioFiredEventId?: string;
|
|
457
463
|
alertDispositionId?: string;
|
|
464
|
+
alertId?: string;
|
|
458
465
|
resolutionCode?: string;
|
|
459
466
|
resolutionComment?: string;
|
|
460
467
|
reasonCode?: string;
|
|
461
468
|
logicalDeleteFlag?: string;
|
|
462
469
|
}
|
|
463
470
|
|
|
471
|
+
export interface ScenarioFiredEventFailedDispositionRep extends BaseRep {
|
|
472
|
+
version?: number;
|
|
473
|
+
scenarioFiredEventId?: string;
|
|
474
|
+
actionableEntityId?: string;
|
|
475
|
+
alertId?: string;
|
|
476
|
+
errorMessage?: string;
|
|
477
|
+
}
|
|
478
|
+
|
|
464
479
|
export interface ScenarioFiredEventFlatRep extends ScenarioFiredEventRep {
|
|
465
480
|
alertingEventId?: string;
|
|
466
481
|
}
|
|
@@ -526,6 +541,7 @@ export interface ScenarioFiredEventRep extends BaseRep {
|
|
|
526
541
|
appliedSegmentCode?: string;
|
|
527
542
|
createdByName?: string;
|
|
528
543
|
modifiedByName?: string;
|
|
544
|
+
triggeringFlagName?: string;
|
|
529
545
|
currentProductiveTimestamp?: string;
|
|
530
546
|
valueTimestamp?: string;
|
|
531
547
|
value?: any;
|
|
@@ -690,8 +706,8 @@ export interface Link extends Serializable, Comparable<Link> {
|
|
|
690
706
|
}
|
|
691
707
|
|
|
692
708
|
export interface TypedPayload {
|
|
693
|
-
payloadType?: string;
|
|
694
709
|
eventType?: string;
|
|
710
|
+
payloadType?: string;
|
|
695
711
|
}
|
|
696
712
|
|
|
697
713
|
export interface TrackedResource extends Serializable, ETaggable, TimeTrackedResource, ETagAndLastModifiedProvider {
|
|
@@ -737,7 +753,7 @@ export type DisplayType = 'TEXT' | 'VARIABLE';
|
|
|
737
753
|
|
|
738
754
|
export type DispositionResolutionCode = 'PRODUCTIVE' | 'NON_PRODUCTIVE' | 'INDETERMINATE';
|
|
739
755
|
|
|
740
|
-
export type ScenarioFiredEventReplicationPolicyType = 'INTERNAL' | 'EXTERNAL';
|
|
756
|
+
export type ScenarioFiredEventReplicationPolicyType = 'INTERNAL' | 'EXTERNAL' | 'EXTERNAL_W_TRIG_FLAG';
|
|
741
757
|
|
|
742
758
|
export type ValueType = 'TEXT' | 'NUMERIC' | 'TIMESTAMP' | 'BOOLEAN';
|
|
743
759
|
|
package/alert-reps/package.json
CHANGED
package/component/bindings.d.ts
CHANGED
|
@@ -10,12 +10,12 @@
|
|
|
10
10
|
* If you need to add a new interface, please consider whether it can extend an existing one or if a new base interface should be created to group related bindings together.
|
|
11
11
|
* Please also add JSDoc comments to the new bindings and interfaces to explain their purpose and usage.
|
|
12
12
|
*/
|
|
13
|
-
import { PageDataChange, PageModeChange } from "../control/events";
|
|
13
|
+
import { PageDataChange, PageDataChangeWithPageModel, PageModeChange, PageModeChangeWithPageModel } from "../control/events";
|
|
14
14
|
import { Relationship } from "../svi-datahub";
|
|
15
15
|
import { QueryMode } from "../svi-sand";
|
|
16
|
-
import { ControlContainer, VIObject } from "../object/object-api";
|
|
16
|
+
import { APISelectedItem, ControlContainer, CreateDialogResponse, IRelationshipWithLabel, RelationshipInformation, VIObject } from "../object/object-api";
|
|
17
17
|
import { PageModel, PageModelObjectData } from "../page-model/page-model-api";
|
|
18
|
-
import { SearchObject, SearchQuery } from "../search/client/client-search-api";
|
|
18
|
+
import { LinkStatusResult, SearchObject, SearchQuery } from "../search/client/client-search-api";
|
|
19
19
|
import { HandleType, MinMaxDates, TimeSliderContextMenuHideOptions, TimeSliderEventDates, TimeSliderRange, TimeSliderRangeChangedEvent } from "../time-slider";
|
|
20
20
|
import { PageModeEvent } from "../control";
|
|
21
21
|
export interface SearchAndSelectWithPreviewInputBindings {
|
|
@@ -135,7 +135,7 @@ export interface CommonPageViewerBindings {
|
|
|
135
135
|
/** A callback that is called when the page viewer dirty state changes. */
|
|
136
136
|
onDirty?: (isDirty: boolean) => void;
|
|
137
137
|
/** A callback that is called when the pageModel's mode or data changes. */
|
|
138
|
-
onChange?: (change: PageDataChange | PageModeChange) => void;
|
|
138
|
+
onChange?: (change: PageDataChange | PageModeChange | PageDataChangeWithPageModel | PageModeChangeWithPageModel) => void;
|
|
139
139
|
}
|
|
140
140
|
/** @deprecated use {@link PageViewerBindings} */
|
|
141
141
|
export interface PageBindings {
|
|
@@ -156,7 +156,7 @@ export interface PageBindings {
|
|
|
156
156
|
setApi?: (api: PageViewerApi) => void;
|
|
157
157
|
mainTab?: string;
|
|
158
158
|
onDirty?: (isDirty: boolean) => void;
|
|
159
|
-
onChange?: (change: PageDataChange | PageModeChange) => void;
|
|
159
|
+
onChange?: (change: PageDataChange | PageModeChange | PageDataChangeWithPageModel | PageModeChangeWithPageModel) => void;
|
|
160
160
|
}
|
|
161
161
|
export interface PagePreviewBindings {
|
|
162
162
|
templateUuid: string;
|
|
@@ -169,7 +169,7 @@ export interface ControlCollectionBindings {
|
|
|
169
169
|
/**
|
|
170
170
|
* Defines the bindings for managing relationship details in a component.
|
|
171
171
|
*/
|
|
172
|
-
export interface
|
|
172
|
+
export interface RelationshipDetailsInputBindings {
|
|
173
173
|
/**
|
|
174
174
|
* Defines the identifier of the target object type that the relationship references.
|
|
175
175
|
*/
|
|
@@ -189,15 +189,16 @@ export interface RelationshipDetailsBindings {
|
|
|
189
189
|
/**
|
|
190
190
|
* Represents the list of reasons that define the purpose or context of the relationship.
|
|
191
191
|
*/
|
|
192
|
-
linkReasons: Relationship[];
|
|
192
|
+
linkReasons: Relationship[] | IRelationshipWithLabel[];
|
|
193
193
|
/**
|
|
194
194
|
* Represents the currently selected item in the relationship, if applicable.
|
|
195
|
-
* Contains an object with `id` and `
|
|
195
|
+
* Contains an object with `id`, `type`, and optional `title` fields to identify the selected item.
|
|
196
196
|
*/
|
|
197
|
-
selectedItem?:
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
selectedItem?: APISelectedItem;
|
|
198
|
+
/**
|
|
199
|
+
* Represents the list of currently selected items in the relationship, if applicable.
|
|
200
|
+
*/
|
|
201
|
+
selectedItems?: APISelectedItem[];
|
|
201
202
|
/**
|
|
202
203
|
* Fields that are read-only and cannot be modified by the user within the relationships properties panel
|
|
203
204
|
*/
|
|
@@ -208,24 +209,50 @@ export interface RelationshipDetailsBindings {
|
|
|
208
209
|
hiddenFields?: string[];
|
|
209
210
|
/**
|
|
210
211
|
* Contains the data for a new page model, if applicable.
|
|
211
|
-
* Includes a `PageModelObjectData` object to represent the model structure.
|
|
212
|
+
* Includes a `PageModel` or `PageModelObjectData` object to represent the model structure.
|
|
212
213
|
*/
|
|
213
214
|
newPageModel?: {
|
|
214
|
-
model: PageModelObjectData;
|
|
215
|
+
model: PageModel | PageModelObjectData;
|
|
215
216
|
};
|
|
216
217
|
/**
|
|
217
|
-
*
|
|
218
|
-
* @param linkReason - The selected link reason.
|
|
218
|
+
* Indicates whether to display the page viewer component. Default: true
|
|
219
219
|
*/
|
|
220
|
-
|
|
220
|
+
showPageViewer?: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Used to show link status in the relationship properties component when coming from the relate to button bulk link flow
|
|
223
|
+
*/
|
|
224
|
+
linkStatusResults?: LinkStatusResult[];
|
|
225
|
+
/**
|
|
226
|
+
* Used to show link status in the relationship properties component when coming from the relate to button bulk link flow
|
|
227
|
+
*/
|
|
228
|
+
originalWizardResults?: CreateDialogResponse[];
|
|
221
229
|
/**
|
|
222
230
|
* Represents the current field values of the relationship as key-value pairs.
|
|
223
231
|
*/
|
|
224
|
-
relationshipValues?: Record<string,
|
|
232
|
+
relationshipValues?: Record<string, unknown>;
|
|
225
233
|
/**
|
|
226
234
|
* Represents the initial field values used to populate the related object during creation.
|
|
227
235
|
*/
|
|
228
|
-
initialCreateData?: Record<string,
|
|
236
|
+
initialCreateData?: Record<string, unknown>;
|
|
237
|
+
/**
|
|
238
|
+
* Entity names of the selected items.
|
|
239
|
+
*/
|
|
240
|
+
entityNames?: string[];
|
|
241
|
+
/**
|
|
242
|
+
* Entity name of the parent object to which we are relating.
|
|
243
|
+
*/
|
|
244
|
+
relateToParentName?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Stored relationship info for each selected item, used to restore state when navigating between wizard steps.
|
|
247
|
+
*/
|
|
248
|
+
storedAllRelationshipInfo?: Map<string, RelationshipInformation>;
|
|
249
|
+
}
|
|
250
|
+
export interface RelationshipDetailsBindings extends RelationshipDetailsInputBindings {
|
|
251
|
+
/**
|
|
252
|
+
* Callback invoked when a link reason is selected.
|
|
253
|
+
* @param linkReason - The selected link reason.
|
|
254
|
+
*/
|
|
255
|
+
onLinkReasonSelected: (linkReason: Relationship | IRelationshipWithLabel | undefined) => void;
|
|
229
256
|
/**
|
|
230
257
|
* Callback to set the API for the page viewer.
|
|
231
258
|
* Provides a `PageViewerAPI` instance to the component.
|
|
@@ -235,20 +262,36 @@ export interface RelationshipDetailsBindings {
|
|
|
235
262
|
/**
|
|
236
263
|
* Callback invoked when the related page changes.
|
|
237
264
|
* Triggered by events such as data updates or mode transitions.
|
|
238
|
-
* @param change - The event describing the change, either `PageDataChange` or `
|
|
265
|
+
* @param change - The event describing the change, either `PageDataChange`, `PageModeChange`, `PageDataChangeWithPageModel`, or `PageModeChangeWithPageModel`.
|
|
239
266
|
*/
|
|
240
|
-
onRelatedPageChange?: (change: PageDataChange | PageModeChange) => void;
|
|
267
|
+
onRelatedPageChange?: (change: PageDataChange | PageModeChange | PageDataChangeWithPageModel | PageModeChangeWithPageModel) => void;
|
|
241
268
|
/**
|
|
242
269
|
* Callback invoked when the relationship values are updated.
|
|
243
270
|
* Provides both the current and previous values for comparison.
|
|
244
|
-
* @param
|
|
245
|
-
* @param previous - The previous relationship values, if available.
|
|
271
|
+
* @param event - Object containing current and previous relationship values.
|
|
246
272
|
*/
|
|
247
|
-
onRelationshipValuesChange?: (
|
|
273
|
+
onRelationshipValuesChange?: (event: {
|
|
274
|
+
current: Record<string, any>;
|
|
275
|
+
previous?: Record<string, any>;
|
|
276
|
+
}) => void;
|
|
248
277
|
/**
|
|
249
|
-
* Callback invoked when the related page
|
|
278
|
+
* Callback invoked when the related page loading is complete.
|
|
250
279
|
*/
|
|
251
280
|
onRelatedPageLoad?: () => void;
|
|
281
|
+
/**
|
|
282
|
+
* Callback invoked when the relationship information is updated.
|
|
283
|
+
* @param allRelationshipInfo - Map of all relationship information keyed by item ID.
|
|
284
|
+
*/
|
|
285
|
+
onAllRelationshipInfoChanged?: (allRelationshipInfo: Map<string, RelationshipInformation>) => void;
|
|
286
|
+
/**
|
|
287
|
+
* Callback invoked when the selected items are updated.
|
|
288
|
+
* @param event - Object containing the updated selected items and optionally the removed item.
|
|
289
|
+
*/
|
|
290
|
+
selectedItemsUpdated?: (event: {
|
|
291
|
+
selectedItems: APISelectedItem[] | undefined;
|
|
292
|
+
removedItem?: APISelectedItem;
|
|
293
|
+
removedItemIndex?: number;
|
|
294
|
+
}) => void;
|
|
252
295
|
}
|
|
253
296
|
export interface SearchInputInputBindings {
|
|
254
297
|
entityName: string;
|
|
@@ -51,6 +51,7 @@ export var StandardPropertyTypes;
|
|
|
51
51
|
StandardPropertyTypes["Hidden"] = "Hidden";
|
|
52
52
|
StandardPropertyTypes["Disabled"] = "Disabled";
|
|
53
53
|
StandardPropertyTypes["Condition"] = "Condition";
|
|
54
|
+
StandardPropertyTypes["CreateRelationshipSelection"] = "CreateRelationshipSelection";
|
|
54
55
|
/**
|
|
55
56
|
* @internal For now as there is no consumer request and the editor only supports the usage by the (feature flagged) generated text control.
|
|
56
57
|
*/
|
package/control/events.d.ts
CHANGED
|
@@ -58,6 +58,11 @@ export interface PageDataChange {
|
|
|
58
58
|
old?: PageModelData;
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
+
export interface PageDataChangeWithPageModel extends PageDataChange {
|
|
62
|
+
pageModel: {
|
|
63
|
+
model: PageModelData;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
61
66
|
export interface PageModeChange {
|
|
62
67
|
readonly type: ChangeType.PAGE_MODE;
|
|
63
68
|
value: {
|
|
@@ -65,6 +70,11 @@ export interface PageModeChange {
|
|
|
65
70
|
old?: PageMode;
|
|
66
71
|
};
|
|
67
72
|
}
|
|
73
|
+
export interface PageModeChangeWithPageModel extends PageModeChange {
|
|
74
|
+
pageModel: {
|
|
75
|
+
model: PageModelData;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
68
78
|
export interface StateChange {
|
|
69
79
|
readOnly?: boolean;
|
|
70
80
|
hidden?: boolean;
|
package/event/event-api.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export declare enum PageEvents {
|
|
|
4
4
|
ChildObjectOnSelect = "spb:ChildObjectSelect",
|
|
5
5
|
CommentsOnShowEvent = "spb::Comments:onShow",
|
|
6
6
|
DirtyStateChangeEvent = "spb::dirty-state-change",
|
|
7
|
+
DragMoveEvent = "spb::dragMove",
|
|
8
|
+
DragStopEvent = "spb::dragStop",
|
|
7
9
|
LoadDocumentEvent = "spb::page-load-all",
|
|
8
10
|
ModeChangeEvent = "spb::page-mode-change",
|
|
9
11
|
ModelChangeEvent = "spb::page-model-change",
|
package/event/event-api.js
CHANGED
|
@@ -5,6 +5,8 @@ export var PageEvents;
|
|
|
5
5
|
PageEvents["ChildObjectOnSelect"] = "spb:ChildObjectSelect";
|
|
6
6
|
PageEvents["CommentsOnShowEvent"] = "spb::Comments:onShow";
|
|
7
7
|
PageEvents["DirtyStateChangeEvent"] = "spb::dirty-state-change";
|
|
8
|
+
PageEvents["DragMoveEvent"] = "spb::dragMove";
|
|
9
|
+
PageEvents["DragStopEvent"] = "spb::dragStop";
|
|
8
10
|
PageEvents["LoadDocumentEvent"] = "spb::page-load-all";
|
|
9
11
|
PageEvents["ModeChangeEvent"] = "spb::page-mode-change";
|
|
10
12
|
PageEvents["ModelChangeEvent"] = "spb::page-model-change";
|
package/mcp/mcp-api.d.ts
CHANGED
|
@@ -12,11 +12,25 @@ export interface SimpleContextMenuPrompt {
|
|
|
12
12
|
prompt: string;
|
|
13
13
|
placeholders?: Record<string, PromptPlaceholderDefinition>;
|
|
14
14
|
}
|
|
15
|
+
export interface ToolCategory {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
tools: string[];
|
|
20
|
+
}
|
|
21
|
+
export interface ToolCategoryApi {
|
|
22
|
+
getAll(): ToolCategory[];
|
|
23
|
+
get(id: string): ToolCategory | undefined;
|
|
24
|
+
create(category: ToolCategory): void;
|
|
25
|
+
update(id: string, category: ToolCategory): void;
|
|
26
|
+
delete(id: string): void;
|
|
27
|
+
}
|
|
15
28
|
export interface RemoteMCPServerConfig {
|
|
16
29
|
url: string;
|
|
17
30
|
}
|
|
18
31
|
export interface BaseMCPServerConfig {
|
|
19
32
|
name: string;
|
|
33
|
+
title?: string;
|
|
20
34
|
version: string;
|
|
21
35
|
}
|
|
22
36
|
export interface StreamableMCPServerConfig extends BaseMCPServerConfig, RemoteMCPServerConfig {
|
|
@@ -54,6 +68,12 @@ export interface McpApi {
|
|
|
54
68
|
* @returns A Promise that resolves when the server has been successfully deregistered.
|
|
55
69
|
*/
|
|
56
70
|
deregisterServer(config: StreamableMCPServerConfig | LocalTransportConfig): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* @description Provides CRUD operations for managing tool categories.
|
|
73
|
+
* @example window.sas.vi.mcp.toolCategories.getAll();
|
|
74
|
+
* @example window.sas.vi.mcp.toolCategories.create({ id: "my_category", name: "My Category", description: "Custom tools", tools: ["my.tool"] });
|
|
75
|
+
*/
|
|
76
|
+
toolCategories: ToolCategoryApi;
|
|
57
77
|
/**
|
|
58
78
|
* @method
|
|
59
79
|
* @description Registers prompts with the VI platform that can be used in MCP interactions.
|
package/mcp/mcp-api.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
// eslint-disable-next-line no-restricted-imports
|
|
1
|
+
// eslint-disable-next-line no-restricted-imports -- helper fns
|
|
2
2
|
import { expectType } from "../../shared/util/helper-functions";
|
|
3
3
|
expectType(true);
|
|
4
4
|
expectType(true);
|
|
5
5
|
expectType(true);
|
|
6
6
|
expectType(true);
|
|
7
|
+
expectType(true);
|
|
8
|
+
expectType(true);
|
|
9
|
+
expectType(true);
|
package/object/object-api.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SearchRepresentation } from "../svi-sand";
|
|
2
|
+
import { Comment, DocumentAndLink, Relationship, RelationshipDTO, StoredObjectFieldDTO } from "../svi-datahub";
|
|
2
3
|
import { FileOperation } from "../file/file-api";
|
|
3
|
-
import { PageModel } from "../page-model/page-model-api";
|
|
4
|
+
import { PageModel, PageModelData } from "../page-model/page-model-api";
|
|
4
5
|
import { ClientSheet, Sheet } from "../sheet/sheet-api";
|
|
6
|
+
import { PageViewerApi } from "../component/bindings";
|
|
7
|
+
import { PageDataChange, PageModeChange } from "../control";
|
|
8
|
+
export interface ISearchQuery {
|
|
9
|
+
text?: string;
|
|
10
|
+
additionalModes?: string[];
|
|
11
|
+
assistedSearchEnabled?: boolean;
|
|
12
|
+
assistedSearchPrompt?: string;
|
|
13
|
+
generatedTextQuery?: SearchRepresentation;
|
|
14
|
+
}
|
|
15
|
+
export type UnknownRecord = Record<string, unknown>;
|
|
16
|
+
export type PageModelOrData = PageModel | PageModelData | null;
|
|
17
|
+
export type SearchAndCreateNewPageModel = {
|
|
18
|
+
model?: PageModelOrData;
|
|
19
|
+
};
|
|
5
20
|
export interface ObjectIdentifier {
|
|
6
21
|
id: string;
|
|
7
22
|
type: string;
|
|
@@ -132,10 +147,10 @@ export interface ObjectApi {
|
|
|
132
147
|
* @method
|
|
133
148
|
* @description Updates an existing relationship in SAS Visual Investigator.
|
|
134
149
|
* @param relationshipId {string} Relationship ID.
|
|
135
|
-
* @param payload {
|
|
150
|
+
* @param payload {unknown} HTTP request content.
|
|
136
151
|
* @return A Promise that resolves to a relationship.
|
|
137
152
|
*/
|
|
138
|
-
updateObjectRelationship(relationshipId: string, payload:
|
|
153
|
+
updateObjectRelationship(relationshipId: string, payload: unknown): Promise<ObjectRelationship>;
|
|
139
154
|
/**
|
|
140
155
|
* @method
|
|
141
156
|
* @description Updates an existing relationship in SAS Visual Investigator.
|
|
@@ -175,9 +190,12 @@ export interface ObjectApi {
|
|
|
175
190
|
* @param from {LinkObject} Existing Object that the relationship is from.
|
|
176
191
|
* @param to {NewLinkObject} New Object to be created and related to.
|
|
177
192
|
* @param relationship {ObjectRelationship} The relationship.
|
|
178
|
-
* @
|
|
193
|
+
* @param [includeCreatedObject = false] {boolean} If true, returns both the documentLink and created document details.
|
|
194
|
+
* @return A Promise that resolves to the documentLink, or full response containing both documentLink and document.
|
|
179
195
|
*/
|
|
180
|
-
createAndRelateObject(from: LinkObject, to: NewLinkObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
|
|
196
|
+
createAndRelateObject(from: LinkObject, to: NewLinkObject, relationship: ObjectRelationship, includeCreatedObject?: false): Promise<ObjectRelationship>;
|
|
197
|
+
createAndRelateObject(from: LinkObject, to: NewLinkObject, relationship: ObjectRelationship, includeCreatedObject: true): Promise<DocumentAndLink>;
|
|
198
|
+
createAndRelateObject(from: LinkObject, to: NewLinkObject, relationship: ObjectRelationship, includeCreatedObject?: boolean): Promise<ObjectRelationship | DocumentAndLink>;
|
|
181
199
|
/**
|
|
182
200
|
* @method
|
|
183
201
|
* @description Processes an array of objects and formats them for display.
|
|
@@ -272,7 +290,7 @@ export interface PageAction {
|
|
|
272
290
|
actionId: number;
|
|
273
291
|
actionName: string;
|
|
274
292
|
attributes: {
|
|
275
|
-
[property: string]:
|
|
293
|
+
[property: string]: unknown;
|
|
276
294
|
displayName: string;
|
|
277
295
|
disabled: boolean;
|
|
278
296
|
};
|
|
@@ -314,7 +332,7 @@ export interface ObjectFieldRestrictions {
|
|
|
314
332
|
[property: string]: FieldRestrictions;
|
|
315
333
|
}
|
|
316
334
|
export interface TypeAttributes {
|
|
317
|
-
[property: string]:
|
|
335
|
+
[property: string]: unknown;
|
|
318
336
|
}
|
|
319
337
|
export interface NodeStates {
|
|
320
338
|
readOnly?: boolean;
|
|
@@ -322,7 +340,7 @@ export interface NodeStates {
|
|
|
322
340
|
hidden?: boolean;
|
|
323
341
|
}
|
|
324
342
|
interface GlobalNodeStates extends NodeStates {
|
|
325
|
-
conditions?:
|
|
343
|
+
conditions?: unknown[];
|
|
326
344
|
}
|
|
327
345
|
export interface NodeAttributes extends TypeAttributes {
|
|
328
346
|
global?: {
|
|
@@ -410,15 +428,15 @@ export interface FieldOperand {
|
|
|
410
428
|
}
|
|
411
429
|
export interface BooleanExpression {
|
|
412
430
|
type: string;
|
|
413
|
-
leftOperand?:
|
|
431
|
+
leftOperand?: unknown;
|
|
414
432
|
operator: string;
|
|
415
|
-
rightOperand:
|
|
433
|
+
rightOperand: unknown;
|
|
416
434
|
}
|
|
417
435
|
export interface ConditionalExpression extends BooleanExpression {
|
|
418
436
|
type: string;
|
|
419
|
-
leftOperand:
|
|
437
|
+
leftOperand: unknown;
|
|
420
438
|
operator: string;
|
|
421
|
-
rightOperands:
|
|
439
|
+
rightOperands: unknown[];
|
|
422
440
|
}
|
|
423
441
|
export interface ObjectIcon {
|
|
424
442
|
id: number;
|
|
@@ -477,11 +495,16 @@ export interface ObjectRelationship {
|
|
|
477
495
|
toObjectTypeVersion?: number;
|
|
478
496
|
toObjectId?: string;
|
|
479
497
|
toObjectDisplayLabel?: string;
|
|
480
|
-
fieldValues?:
|
|
481
|
-
[index: string]: any;
|
|
482
|
-
};
|
|
498
|
+
fieldValues?: UnknownRecord;
|
|
483
499
|
qualifiedTypeName?: string;
|
|
484
500
|
}
|
|
501
|
+
export interface ObjectRelationshipMultiple extends ObjectRelationship {
|
|
502
|
+
fromId?: string;
|
|
503
|
+
fromEntityType?: string;
|
|
504
|
+
toId?: string;
|
|
505
|
+
toEntityType?: string;
|
|
506
|
+
operation?: string;
|
|
507
|
+
}
|
|
485
508
|
export interface AttachmentRow {
|
|
486
509
|
description?: string;
|
|
487
510
|
location: string;
|
|
@@ -521,9 +544,7 @@ export interface FileAssociationResponse {
|
|
|
521
544
|
type?: string;
|
|
522
545
|
size?: number;
|
|
523
546
|
description?: string;
|
|
524
|
-
properties?:
|
|
525
|
-
[index: string]: any;
|
|
526
|
-
};
|
|
547
|
+
properties?: UnknownRecord;
|
|
527
548
|
uploadedAt?: Date;
|
|
528
549
|
uploadedBy?: string;
|
|
529
550
|
extractedContent?: string;
|
|
@@ -534,22 +555,111 @@ export interface DisplayTextFields {
|
|
|
534
555
|
name: string;
|
|
535
556
|
displayIndex: number;
|
|
536
557
|
}
|
|
558
|
+
export declare enum SearchAndCreateStep {
|
|
559
|
+
Search = "search",
|
|
560
|
+
SearchResults = "searchResults",
|
|
561
|
+
Entity = "entity",
|
|
562
|
+
Relationship = "relationship"
|
|
563
|
+
}
|
|
564
|
+
export interface SearchAndCreatePanelContext {
|
|
565
|
+
[SearchAndCreateStep.Search]: {
|
|
566
|
+
doSearch: (query: string, additionalModes?: string[]) => void;
|
|
567
|
+
updateAssistedSearchEnabled: (assistedSearchEnabled: boolean) => void;
|
|
568
|
+
getQuery: () => ISearchQuery;
|
|
569
|
+
updateQuery: (query: string) => void;
|
|
570
|
+
};
|
|
571
|
+
[SearchAndCreateStep.SearchResults]: {
|
|
572
|
+
getQuery: () => ISearchQuery;
|
|
573
|
+
updateQuery: (query: string) => void;
|
|
574
|
+
updateSelection: (results: Array<{
|
|
575
|
+
id: string;
|
|
576
|
+
type: string;
|
|
577
|
+
}>) => void;
|
|
578
|
+
};
|
|
579
|
+
[SearchAndCreateStep.Entity]: {
|
|
580
|
+
setPageViewerApi(api: PageViewerApi): void;
|
|
581
|
+
onPageChange(change?: PageDataChange | PageModeChange): void;
|
|
582
|
+
newPageModel: SearchAndCreateNewPageModel;
|
|
583
|
+
selectedItems: Array<{
|
|
584
|
+
id?: string;
|
|
585
|
+
type?: string;
|
|
586
|
+
title?: string;
|
|
587
|
+
}> | null | undefined;
|
|
588
|
+
};
|
|
589
|
+
[SearchAndCreateStep.Relationship]: {
|
|
590
|
+
updateLinkReason: (linkReason: Relationship) => void;
|
|
591
|
+
onPageChange(change?: PageDataChange | PageModeChange): void;
|
|
592
|
+
setPageViewerApi(api: PageViewerApi): void;
|
|
593
|
+
newPageModel: SearchAndCreateNewPageModel;
|
|
594
|
+
selectedItems: Array<{
|
|
595
|
+
id?: string;
|
|
596
|
+
type?: string;
|
|
597
|
+
title?: string;
|
|
598
|
+
}> | null | undefined;
|
|
599
|
+
};
|
|
600
|
+
}
|
|
601
|
+
export interface SearchAndCreateFooterContext {
|
|
602
|
+
query?: ISearchQuery;
|
|
603
|
+
selectedItems?: Array<{
|
|
604
|
+
id?: string;
|
|
605
|
+
type?: string;
|
|
606
|
+
title?: string;
|
|
607
|
+
}> | null;
|
|
608
|
+
linkReason?: Relationship;
|
|
609
|
+
newPageModel?: SearchAndCreateNewPageModel;
|
|
610
|
+
relationshipValues?: UnknownRecord;
|
|
611
|
+
doSearch: (queryText?: string) => void;
|
|
612
|
+
updateAssistedSearchEnabled?: (assistedSearchEnabled: boolean) => void;
|
|
613
|
+
commit: () => void;
|
|
614
|
+
relateToSelected: () => void;
|
|
615
|
+
relateToNew: () => void;
|
|
616
|
+
close: (result?: unknown) => void;
|
|
617
|
+
}
|
|
618
|
+
interface BaseButton {
|
|
619
|
+
label: string;
|
|
620
|
+
primary?: boolean;
|
|
621
|
+
disabled?: boolean;
|
|
622
|
+
}
|
|
623
|
+
export type SearchAndCreateDialogButton = (BaseButton & {
|
|
624
|
+
onClick: () => void | Promise<void>;
|
|
625
|
+
}) | (BaseButton & {
|
|
626
|
+
items: Array<{
|
|
627
|
+
text: string;
|
|
628
|
+
click: () => void;
|
|
629
|
+
}>;
|
|
630
|
+
});
|
|
631
|
+
export interface CustomSearchAndCreateStep<Step extends SearchAndCreateStep> {
|
|
632
|
+
panel?: {
|
|
633
|
+
render: (container: HTMLDivElement, context: SearchAndCreatePanelContext[Step]) => void | (() => void);
|
|
634
|
+
};
|
|
635
|
+
footer?: {
|
|
636
|
+
getButtons: (context: SearchAndCreateFooterContext) => SearchAndCreateDialogButton[];
|
|
637
|
+
};
|
|
638
|
+
}
|
|
639
|
+
export type CustomSearchAndCreateSteps = {
|
|
640
|
+
[Step in SearchAndCreateStep]?: CustomSearchAndCreateStep<Step>;
|
|
641
|
+
};
|
|
537
642
|
export interface SearchOrCreateAndLinkDialogBase<T> {
|
|
538
643
|
entityName: string;
|
|
539
644
|
entityLabel: string;
|
|
645
|
+
entityNames?: string[];
|
|
646
|
+
entityLabels?: string[];
|
|
540
647
|
onClose?: (result?: T) => Promise<boolean>;
|
|
541
648
|
/**
|
|
542
649
|
* Values returned on the close of the dialog box. May be undefined when dialog box is cancelled.
|
|
543
650
|
*/
|
|
544
651
|
result?: T;
|
|
652
|
+
multipleSearchChoice?: boolean;
|
|
653
|
+
showPageViewer?: boolean;
|
|
654
|
+
customSteps?: CustomSearchAndCreateSteps;
|
|
655
|
+
customResult?: unknown;
|
|
545
656
|
}
|
|
546
657
|
export interface CreateRelationshipDialogModel<T> extends SearchOrCreateAndLinkDialogBase<T> {
|
|
547
658
|
relateToParentName: string;
|
|
548
659
|
relateToParentLabel: string;
|
|
549
660
|
linkReasons?: Relationship[];
|
|
550
661
|
}
|
|
551
|
-
export
|
|
552
|
-
}
|
|
662
|
+
export type CreateDialogModel = CreateRelationshipDialogModel<CreateDialogResponse>;
|
|
553
663
|
export interface CreateDialogResponse {
|
|
554
664
|
relateToModel?: CreateRelateToModel;
|
|
555
665
|
}
|
|
@@ -561,4 +671,20 @@ export interface CreateRelateToModel extends CreateRelationshipDialogResultModel
|
|
|
561
671
|
model: PageModel;
|
|
562
672
|
};
|
|
563
673
|
}
|
|
674
|
+
export interface IRelationshipWithLabel extends RelationshipDTO {
|
|
675
|
+
relationshipLabel: string;
|
|
676
|
+
}
|
|
677
|
+
export type APISelectedItem = ObjectIdentifier & {
|
|
678
|
+
title?: string;
|
|
679
|
+
uniqueKey?: string;
|
|
680
|
+
typeLabel?: string;
|
|
681
|
+
};
|
|
682
|
+
export interface RelationshipInformation {
|
|
683
|
+
relationshipTypeId?: number;
|
|
684
|
+
relationshipValues?: UnknownRecord;
|
|
685
|
+
selectedItemTitle?: string;
|
|
686
|
+
requiredFieldsStatus?: unknown;
|
|
687
|
+
entityIconClass?: string;
|
|
688
|
+
entityType?: string;
|
|
689
|
+
}
|
|
564
690
|
export {};
|
package/object/object-api.js
CHANGED
|
@@ -16,3 +16,10 @@ export var ConditionFactType;
|
|
|
16
16
|
ConditionFactType["Field"] = "FIELD";
|
|
17
17
|
ConditionFactType["Condition"] = "CONDITION_REFERENCE";
|
|
18
18
|
})(ConditionFactType || (ConditionFactType = {}));
|
|
19
|
+
export var SearchAndCreateStep;
|
|
20
|
+
(function (SearchAndCreateStep) {
|
|
21
|
+
SearchAndCreateStep["Search"] = "search";
|
|
22
|
+
SearchAndCreateStep["SearchResults"] = "searchResults";
|
|
23
|
+
SearchAndCreateStep["Entity"] = "entity";
|
|
24
|
+
SearchAndCreateStep["Relationship"] = "relationship";
|
|
25
|
+
})(SearchAndCreateStep || (SearchAndCreateStep = {}));
|