@sassoftware/vi-api 1.15.2 → 1.40.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.
@@ -0,0 +1,133 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ // Generated using typescript-generator version 2.15.527 on 2024-03-12 16:17:17.
4
+
5
+ export interface BaseRep extends TrackedResource {
6
+ links?: Link[];
7
+ }
8
+
9
+ export interface BatchJobRep extends BaseRep {
10
+ batchId?: string;
11
+ scorecardDefinitionId?: string;
12
+ batchStatus?: string;
13
+ dropZoneType?: string;
14
+ casLibraryName?: string;
15
+ inputScoreTableName?: string;
16
+ inputElementTableName?: string;
17
+ dropZoneTimeToLive?: number;
18
+ deleteCasTablesAfterCompletionFlag?: boolean;
19
+ expirationTimeStamp?: string;
20
+ }
21
+
22
+ export interface ElementRep extends BaseRep {
23
+ version?: number;
24
+ elementId?: string;
25
+ scoreId?: string;
26
+ batchId?: string;
27
+ elementEntityType?: string;
28
+ elementEntityId?: string;
29
+ elementEntityLabel?: string;
30
+ elementNativeId?: string;
31
+ elementNativeName?: string;
32
+ elementDescription?: string;
33
+ displayFlag?: boolean;
34
+ displayOrder?: number;
35
+ displayTypeCode?: DisplayType;
36
+ messageTemplateText?: string;
37
+ messageValuesJson?: { [index: string]: any };
38
+ score?: number;
39
+ minimumScore?: number;
40
+ maximumScore?: number;
41
+ meanScore?: number;
42
+ displayFormat?: string;
43
+ valueType?: ValueType;
44
+ valueText?: string;
45
+ valueBoolean?: boolean;
46
+ valueNumeric?: number;
47
+ valueTimeStamp?: string;
48
+ }
49
+
50
+ export interface EntityElementsRep {
51
+ entityType?: string;
52
+ entityId?: string;
53
+ entityLabel?: string;
54
+ elements?: ElementRep[];
55
+ version?: number;
56
+ }
57
+
58
+ export interface ScorecardDefinitionRep extends BaseRep {
59
+ currentTableName?: string;
60
+ domainId?: string;
61
+ elementTableName?: string;
62
+ entityType?: string;
63
+ historyTableName?: string;
64
+ inputElementTableName?: string;
65
+ inputScoreTableName?: string;
66
+ origin?: string;
67
+ scorecardDefinitionDescription?: string;
68
+ scorecardDefinitionId?: string;
69
+ scorecardDefinitionName?: string;
70
+ solutionId?: string;
71
+ }
72
+
73
+ export interface ScorecardFullRep extends ScorecardSummaryRep {
74
+ entities?: EntityElementsRep[];
75
+ }
76
+
77
+ export interface ScorecardSummaryRep extends BaseRep {
78
+ version?: number;
79
+ scoreId?: string;
80
+ batchId?: string;
81
+ actionableEntityType?: string;
82
+ actionableEntityId?: string;
83
+ actionableEntityLabel?: string;
84
+ score?: number;
85
+ scoreDescription?: string;
86
+ effectiveTimeStamp?: string;
87
+ }
88
+
89
+ export interface Link extends Serializable {
90
+ method?: string;
91
+ rel?: string;
92
+ href?: string;
93
+ uri?: string;
94
+ type?: string;
95
+ responseType?: string;
96
+ itemType?: string;
97
+ responseItemType?: string;
98
+ title?: string;
99
+ }
100
+
101
+ export interface TrackedResource extends Serializable, ETaggable, TimeTrackedResource, ETagAndLastModifiedProvider {
102
+ createdBy?: string;
103
+ modifiedBy?: string;
104
+ }
105
+
106
+ export interface Serializable {
107
+ }
108
+
109
+ export interface ETaggable extends Preconditionable {
110
+ etag?: string;
111
+ }
112
+
113
+ export interface TimeTrackedResource extends LastModifiedProviderFromModifiedTimeStamp {
114
+ creationTimeStamp?: string;
115
+ }
116
+
117
+ export interface ETagAndLastModifiedProvider extends ETaggable, LastModifiedProvider {
118
+ }
119
+
120
+ export interface Preconditionable {
121
+ }
122
+
123
+ export interface LastModifiedProviderFromModifiedTimeStamp extends LastModifiedProvider {
124
+ modifiedTimeStamp?: string;
125
+ }
126
+
127
+ export interface LastModifiedProvider extends Preconditionable {
128
+ lastModifiedHeaderDate?: string;
129
+ }
130
+
131
+ export type DisplayType = 'TEXT' | 'VARIABLE' | 'UNKNOWN';
132
+
133
+ export type ValueType = 'TEXT' | 'NUMERIC' | 'TIMESTAMP' | 'BOOLEAN' | 'UNKNOWN';
@@ -0,0 +1,5 @@
1
+ {
2
+ "name": "@types/score-reps",
3
+ "version": "6.0.2-SNAPSHOT",
4
+ "types": "index.d.ts"
5
+ }
@@ -1,6 +1,5 @@
1
- import { Relationship } from "../../svi-datahub";
2
1
  import { MapBoundedBoxFilter, MapBoundedPolygonFilter, MapRadiusFilter, MapShapeFilter, QueryMode, SearchRepresentation, SearchResponse, SummaryVisualizationResponse } from "../../svi-sand";
3
- import { ObjectIdentifier } from "../../object/object-api";
2
+ import { CreateRelationshipDialogModel, CreateReleationshipDialogResultModel, ObjectIdentifier, SearchOrCreateAndLinkDialogBase } from "../../object/object-api";
4
3
  import { QueryBuilderModel, SearchApi } from "../search-api";
5
4
  export declare enum SearchVisualization {
6
5
  Summary = "summary",
@@ -14,7 +13,7 @@ export declare enum Visualization {
14
13
  Timeline = "timeline",
15
14
  Network = "networkDiagram"
16
15
  }
17
- export declare type MapFilter = MapBoundedPolygonFilter | MapRadiusFilter | MapBoundedBoxFilter | MapShapeFilter;
16
+ export type MapFilter = MapBoundedPolygonFilter | MapRadiusFilter | MapBoundedBoxFilter | MapShapeFilter;
18
17
  export interface SearchQuery {
19
18
  additionalModes?: string[];
20
19
  queryText: string;
@@ -41,30 +40,24 @@ export interface NetworkData {
41
40
  };
42
41
  numNodes: number;
43
42
  }
44
- export interface SearchAndCreateDialogModel {
45
- entityName: string;
46
- entityLabel: string;
47
- relateToParentName?: string;
48
- relateToParentLabel?: string;
43
+ export interface SearchAndCreateDialogModel extends CreateRelationshipDialogModel<SearchAndCreateResponse> {
44
+ }
45
+ export interface SearchDialogModel extends SearchOrCreateAndLinkDialogBase<SearchDialogResponse> {
49
46
  canCreate?: boolean;
50
- linkReasons?: Relationship[];
51
- /**
52
- * Values returned on the close of the dialog box. May be undefined when dialog box is cancelled.
53
- */
54
- result?: SearchAndCreateResponse;
47
+ }
48
+ export interface SearchDialogResponse {
49
+ selectedItem?: SearchObject;
55
50
  }
56
51
  export interface SearchObject extends ObjectIdentifier {
57
52
  title?: string;
58
53
  typeLabel?: string;
59
54
  uniqueKey?: string;
60
55
  }
61
- export interface SearchAndCreateRelateToModel {
62
- linkReason?: Relationship;
56
+ export interface SearchAndCreateRelateToModel extends CreateReleationshipDialogResultModel {
63
57
  relateToTargetId?: string;
64
58
  relateToTargetType?: string;
65
59
  }
66
60
  export interface SearchAndCreateResponse {
67
- selectedItem?: SearchObject;
68
61
  relateToModel?: SearchAndCreateRelateToModel;
69
62
  }
70
63
  /**
@@ -155,6 +148,14 @@ export interface ClientSearchApi extends SearchApi {
155
148
  * @returns A Promise which resolves when the dialog box is closed.
156
149
  */
157
150
  openSearchAndCreateDialog(wizardValues: SearchAndCreateDialogModel): Promise<SearchAndCreateDialogModel>;
151
+ /**
152
+ * @method
153
+ * @description Launches a wizard allowing users to search, before creating an object/relationship.
154
+ * The relationship wizard is determined by the relateToParentLabel or relateToParentName defined in the wizardValues parameter.
155
+ * @param wizardValues {SearchDialogModel} Object containing entity and relationship data.
156
+ * @returns A Promise which resolves when the dialog box is closed.
157
+ */
158
+ openSearchAndCreateDialog(wizardValues: SearchDialogModel): Promise<SearchDialogModel>;
158
159
  /**
159
160
  * @method
160
161
  * @description Gets the selected items within the search result or specified workspace.
@@ -213,4 +213,4 @@ export declare enum NetworkMenuType {
213
213
  /**
214
214
  * The type of function that can be registered as a callback for modifying the Network menus.
215
215
  */
216
- export declare type NetworkMenuCallback = (menu: ContextMenuItem, workspaceClientId: string) => void;
216
+ export type NetworkMenuCallback = (menu: ContextMenuItem, workspaceClientId: string) => void;
@@ -1,5 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { INavigationBarTabSaveOptions } from "./shell-tabs-lifecycle-api";
3
+ import { RequiredResourcesExpression } from "../config/config-api";
3
4
  export interface WebElementData {
4
5
  elementName: string;
5
6
  doNotReuse?: boolean;
@@ -52,10 +53,27 @@ export interface INavigationBarTab<D = {
52
53
  /** any extra data to be associated with the tab */
53
54
  data?: D;
54
55
  }
55
- export declare type ISecondaryNavigationBarTab<D = {
56
+ export type ISecondaryNavigationBarTab<D = {
56
57
  [key: string]: any;
57
58
  }> = Omit<INavigationBarTab<D>, "secondaryTabs" | "selectedSecondaryTab">;
58
- export interface ExternalTabConfig<T = any, P = any> {
59
+ export interface SviShellTabData {
60
+ /**
61
+ * required user capabilities for the tab.
62
+ * if unmet, the tab is hidden and cannot be navigated to.
63
+ * @example
64
+ * { or: ["svi.administration.alerts", "svi.vsd.flow.view"] }
65
+ */
66
+ requiredCapabilities?: RequiredResourcesExpression;
67
+ /**
68
+ * REST APIs required by the tab's content.
69
+ * if unavailable, the tab is hidden and cannot be navigated to.
70
+ * @example
71
+ * { and: ["svi-alert", "documentGeneratorAdapter"] }
72
+ */
73
+ requiredServices?: RequiredResourcesExpression;
74
+ [key: string]: any;
75
+ }
76
+ export interface ExternalTabConfig<T = SviShellTabData, P = any> {
59
77
  /**
60
78
  * will try to place at this index, can be negative, fraction, etc to put before/between existing tabs
61
79
  */
@@ -95,11 +113,16 @@ export interface ExternalTabConfig<T = any, P = any> {
95
113
  */
96
114
  buildOnRegister?: boolean;
97
115
  }
98
- export declare type ShellTabsApi = {
99
- /**
100
- * this is used to expose any {@link PotentialTabItem} hooks on a component up to the Tab Service
101
- * @param context pass "this"
102
- * @param elRef pass the ElementRef for the component
116
+ /**
117
+ * This API provides functionality that pertains to the shell tabs.
118
+ * Accessed from the window at window.sas.vi.shellTabs.
119
+ */
120
+ export interface ShellTabsApi<T = SviShellTabData> {
121
+ /**
122
+ * @method
123
+ * @description this is used to expose any {@link PotentialTabItem} hooks on a component up to the Tab Service
124
+ * @param [context] {this} pass "this"
125
+ * @param [elRef] {HTMLElement} pass the ElementRef for the component
103
126
  *
104
127
  * onTabClose {@link OnTabClose}, optional, can be used to prevent closing of a tab or close async
105
128
  * onAttachTab {@link OnAttachTab}, will always trigger when currentNavigationBarTab has set
@@ -110,90 +133,107 @@ export declare type ShellTabsApi = {
110
133
  */
111
134
  createTabApiForElement: (context: any, nativeElement: HTMLElement) => void;
112
135
  /**
113
- * Use this function to register new routes for tabs
114
- * @param tabsToAdd - see {@link ExternalTabConfig}
136
+ * @method
137
+ * @description Use this function to register new routes for tabs
138
+ * @param [tabsToAdd] {ExternalTabConfig[]} - see {@link ExternalTabConfig}
115
139
  */
116
- registerExternalTabs: (tab: ExternalTabConfig[]) => void;
140
+ registerExternalTabs: (tab: Array<ExternalTabConfig<T>>) => void;
117
141
  /**
118
- * Use this function to remove routes added via registerTabFn
119
- * @param tabsToAdd - see {@link ExternalTabConfig}
142
+ * @method
143
+ * @description Use this function to remove routes added via registerTabFn
144
+ * @param [tabsToRemove] {ExternalTabConfig[]} - see {@link ExternalTabConfig}
120
145
  */
121
- unregisterExternalTabs: (tabsToRemove: ExternalTabConfig[]) => void;
146
+ unregisterExternalTabs: (tabsToRemove: Array<ExternalTabConfig<T>>) => void;
122
147
  /**
123
- * this will return the current primary and secondary tabs
148
+ * @method
149
+ * @description this will return the current primary and secondary tabs
124
150
  */
125
151
  getSelectedTab: () => {
126
152
  primaryTab: INavigationBarTab;
127
153
  secondaryTab?: INavigationBarTab;
128
154
  };
129
155
  /**
130
- * this stream will track the current top level tab
156
+ * @method
157
+ * @description this stream will track the current top level tab
131
158
  */
132
159
  selectedPrimaryTabChanged$: Observable<INavigationBarTab>;
133
160
  /**
134
- * this stream will track the current second level tab
161
+ * @method
162
+ * @description this stream will track the current second level tab
135
163
  */
136
164
  selectedSecondaryTabChanged$: Observable<INavigationBarTab | undefined>;
137
165
  /**
138
- * this stream will update after any additions/removals to either system or application tabs
166
+ * @method
167
+ * @description this stream will update after any additions/removals to either system or application tabs
139
168
  */
140
169
  openTabsChanged$: Observable<{
141
170
  systemTabs: INavigationBarTab[];
142
171
  applicationTabs: INavigationBarTab[];
143
172
  }>;
144
173
  /**
145
- * this stream will emit any removed tabs
174
+ * @method
175
+ * @description this stream will emit any removed tabs
146
176
  */
147
177
  tabRemoved$: Observable<INavigationBarTab>;
148
178
  /**
149
- * @param tabId will be ID of an existing tab
179
+ * @method
180
+ * @description get Tab by ID
181
+ * @param [tabId] {string} will be ID of an existing tab
150
182
  */
151
183
  getTabById: (tabId: string) => INavigationBarTab | undefined;
152
184
  /**
153
- * will return a slice of the current system and application tabs
185
+ * @method
186
+ * @description will return a slice of the current system and application tabs
154
187
  */
155
188
  getAllTabs: () => {
156
189
  system: INavigationBarTab[];
157
190
  application: INavigationBarTab[];
158
191
  };
159
192
  /**
160
- * will move user to the default tab
193
+ * @method
194
+ * @description will move user to the default tab
161
195
  */
162
196
  selectDefaultTab: () => Promise<boolean>;
163
197
  /**
164
- * will attempt to open+select a matching INavigationBarTab and optional secondaryTab, returning false on failure
198
+ * @method
199
+ * @description will attempt to open+select a matching INavigationBarTab and optional secondaryTab, returning false on failure
165
200
  * in the event the tab doesn't exist already, it will add the tab assuming an appropriate route has been registered for it
166
- * @param tabToSelect {@link INavigationBarTab}
167
- * @param secondaryTab {@link INavigationBarTab} if left undefined, this will select the previously
201
+ * @param [tabToSelect] {INavigationBarTab} see {@link INavigationBarTab}
202
+ * @param [secondaryTab] {INavigationBarTab} see {@link INavigationBarTab} if left undefined, this will select the previously
168
203
  * selected secondary tab of the primary tab or it's first index secondary tab
169
204
  */
170
205
  openTab: (tabToSelect: INavigationBarTab, secondaryTab?: INavigationBarTab) => Promise<boolean>;
171
206
  /**
172
- * will attempt to select a tab by its id, returning false on failure
173
- * @param tabId will be ID of an existing tab
207
+ * @method
208
+ * @description will attempt to select a tab by its id, returning false on failure
209
+ * @param [tabId] {string} will be ID of an existing tab
174
210
  */
175
211
  selectTabById: (tabId: string) => Promise<boolean>;
176
212
  /**
177
- * will remove an application tab, if allowed, and will trigger any closing and saving logic beforehand
178
- * @param tabIdToRemove will be ID of an existing tab
179
- * @param suppressNavigation if you are closing a tab that isn't open, you want to supressNavigation=true
213
+ * @method
214
+ * @description will remove an application tab, if allowed, and will trigger any closing and saving logic beforehand
215
+ * @param [tabIdToRemove] {string} will be ID of an existing tab
216
+ * @param [suppressNavigation] {boolean} if you are closing a tab that isn't open, you want to supressNavigation=true
180
217
  */
181
218
  removeApplicationTabById: (tabIdToRemove: string, suppressNavigation?: boolean) => Promise<boolean>;
182
219
  /**
183
- * will remove an existing application tab then replace with another, if {@link removeApplicationTabById} is unsuccessful this will fail
220
+ * @method
221
+ * @description will remove an existing application tab then replace with another, if {@link removeApplicationTabById} is unsuccessful this will fail
184
222
  * use case can be saving a tab which has a temporary ID, and reopening it with a saved payload.
185
- * @param tabId will be ID of an existing tab
186
- * @param newTab {@link INavigationBarTab}
223
+ * @param [tabId] {string} will be ID of an existing tab
224
+ * @param [newTab] {INavigationBarTab} see {@link INavigationBarTab}
187
225
  *
188
226
  */
189
227
  replaceApplicationTab: (tabId: string, newTab: INavigationBarTab) => Promise<boolean>;
190
228
  /**
191
- * will run {@link removeApplicationTabById} on all tabs, will stop if any fail to close, will wait for each close to complete
229
+ * @method
230
+ * @description will run {@link removeApplicationTabById} on all tabs, will stop if any fail to close, will wait for each close to complete
192
231
  */
193
232
  removeAllApplicationTabs: () => Promise<boolean>;
194
233
  /**
195
- * will run same as {@link removeAllApplicationTabs}, but not on the provided tabIdToKeep
196
- * @param tabIdToKeep
234
+ * @method
235
+ * @description will run same as {@link removeAllApplicationTabs}, but not on the provided tabIdToKeep
236
+ * @param [tabIdToKeep] {string}
197
237
  */
198
238
  removeOtherApplicationTabs: (tabIdToKeep?: string) => Promise<boolean>;
199
- };
239
+ }
@@ -1,7 +1,7 @@
1
1
  import { OnDestroy } from "@angular/core";
2
2
  import { INavigationBarTab, INavigationBarTabs } from "./shell-tabs-api";
3
3
  import { Observable } from "rxjs";
4
- export declare type PotentialTabItem<T = any, U = any> = Partial<OnAttachTab<T> & OnTabEnter & OnTabLeave & OnTabSaveConfirm & OnTabClose & TabWithToolbar<U> & OnDestroy>;
4
+ export type PotentialTabItem<T = any, U = any> = Partial<OnAttachTab<T> & OnTabEnter & OnTabLeave & OnTabSaveConfirm & OnTabClose & TabWithToolbar<U> & OnDestroy>;
5
5
  export interface OnAttachTab<T = any> {
6
6
  currentNavigationBarTab?: INavigationBarTab<T>;
7
7
  /**
@@ -17,7 +17,7 @@ export interface OnTabEnterParams {
17
17
  toSecondary?: INavigationBarTab;
18
18
  recycled: boolean;
19
19
  }
20
- export declare type OnTabLeaveParams = Omit<OnTabEnterParams, "recycled">;
20
+ export type OnTabLeaveParams = Omit<OnTabEnterParams, "recycled">;
21
21
  export interface OnTabEnter {
22
22
  /**
23
23
  * Function to run when the Tab is entered, this happens on first load as well
@@ -61,9 +61,9 @@ export interface INavigationBarTabSaveOptions {
61
61
  dialogMessage: string;
62
62
  saveFunction(): Promise<boolean> | Observable<boolean> | boolean;
63
63
  }
64
- export declare type WebElementTabApi<NavBarDataType = any, ComponentType = any> = Omit<PotentialTabItem<NavBarDataType, ComponentType>, "onAttachTab" | keyof TabWithToolbar<ComponentType>> & {
64
+ export type WebElementTabApi<NavBarDataType = any, ComponentType = any> = Omit<PotentialTabItem<NavBarDataType, ComponentType>, "onAttachTab" | keyof TabWithToolbar<ComponentType>> & {
65
65
  onAttachTab?(tab: INavigationBarTab<NavBarDataType>): void;
66
66
  };
67
- export declare type WebTabApiElement = HTMLElement & {
67
+ export type WebTabApiElement = HTMLElement & {
68
68
  tabApi?: WebElementTabApi;
69
69
  };