@sassoftware/vi-api 1.51.1 → 1.54.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/README.md CHANGED
@@ -4,7 +4,7 @@ The [SAS Visual Investigator](https://www.sas.com/en_us/software/intelligence-an
4
4
 
5
5
  ## Getting Started
6
6
 
7
- For documentation and examples please see our [Solution Extension GitHub](https://github.com/sassoftware/vi-solution-extensions).
7
+ For documentation and examples, see the SAS [Solution Extension GitHub](https://github.com/sassoftware/vi-solution-extensions).
8
8
 
9
9
  ### Installation
10
10
  To use the API, install the NPM package [@sassoftware/vi-api](https://www.npmjs.com/package/@sassoftware/vi-api):
@@ -1,6 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- // Generated using typescript-generator version 2.15.527 on 2025-09-03 08:54:51.
3
+ // Generated using typescript-generator version 2.15.527 on 2026-02-12 22:23:08.
4
4
 
5
5
  export interface ActionRequestRep {
6
6
  version?: number;
@@ -124,18 +124,6 @@ export interface AlertRep extends BaseRep {
124
124
  autoActivateScore?: number;
125
125
  strategyRangeLow?: number;
126
126
  strategyRangeHigh?: number;
127
- systemServiceTimestamp?: string;
128
- autoCloseTimestamp?: string;
129
- autoActivateTimestamp?: string;
130
- alertVersionTimestamp?: string;
131
- statusTimestamp?: string;
132
- dispositionTimestamp?: string;
133
- suppressionEndTimestamp?: string;
134
- holdEndTimestamp?: string;
135
- queueEntryTimestamp?: string;
136
- assignmentTimestamp?: string;
137
- checkoutTimestamp?: string;
138
- userServiceTimestamp?: string;
139
127
  }
140
128
 
141
129
  export interface AlertVersionSummaryRep {
@@ -176,6 +164,14 @@ export interface AlertingDataNestedRep extends TypedPayload {
176
164
  alertingEvents?: AlertingEventNestedRep<any>[];
177
165
  }
178
166
 
167
+ export interface AlertingEventFieldDescriptionRep {
168
+ fieldName?: string;
169
+ labelText?: string;
170
+ headerText?: string;
171
+ dataType?: string;
172
+ isEnrichment?: boolean;
173
+ }
174
+
179
175
  export interface AlertingEventNestedRep<SFE> extends AlertingEventRep {
180
176
  scenarioFiredEvents?: SFE[];
181
177
  contributingObjects?: ContributingObjectRep[];
@@ -204,7 +200,7 @@ export interface AlertingEventRep extends BaseRep {
204
200
  rollingCalculationTimeStamp?: string;
205
201
  scoreAggregationPolicy?: string;
206
202
  scoreDescription?: string;
207
- rollingCalculationTimestamp?: string;
203
+ jobId?: string;
208
204
  }
209
205
 
210
206
  export interface BaseRep extends TrackedResource {
@@ -317,21 +313,29 @@ export interface ExtendedScenarioFiredEventRep extends ScenarioFiredEventRep {
317
313
  alertingEventId?: string;
318
314
  modelName?: string;
319
315
  alertTypeCode?: string;
316
+ alertTypeLabel?: string;
320
317
  alertTriggerText?: string;
321
318
  suppressedFlag?: boolean;
322
319
  reasonCode?: string;
320
+ reasonLabel?: string;
323
321
  }
324
322
 
325
323
  export interface FieldDescriptionRep {
326
324
  version?: number;
327
325
  fieldName?: string;
328
326
  type?: string;
327
+ dataType?: string;
329
328
  size?: number;
330
329
  labelText?: string;
331
330
  headerText?: string;
332
331
  isEnrichment?: boolean;
333
332
  }
334
333
 
334
+ export interface IdRep extends Serializable {
335
+ version?: number;
336
+ id?: string;
337
+ }
338
+
335
339
  export interface LogicExpressionRep extends BaseRep {
336
340
  conditionCode?: string;
337
341
  logicExpressionId?: string;
@@ -369,6 +373,15 @@ export interface QueueRep extends BaseRep {
369
373
  version?: number;
370
374
  }
371
375
 
376
+ export interface ReflectionUtilsTest {
377
+ }
378
+
379
+ export interface NoAnnotatedFieldsClass {
380
+ }
381
+
382
+ export interface TestClass {
383
+ }
384
+
372
385
  export interface RelationshipRep extends Serializable {
373
386
  relationshipType?: string;
374
387
  fields?: { [index: string]: any };
@@ -430,17 +443,39 @@ export interface ScenarioDispositionSummaryRequestRep {
430
443
  startDatetime?: string;
431
444
  }
432
445
 
446
+ export interface ScenarioFieldEventFieldDescriptionRep {
447
+ fieldName?: string;
448
+ labelText?: string;
449
+ headerText?: string;
450
+ dataType?: string;
451
+ }
452
+
453
+ export interface ScenarioFiredEventBulkDispositionRep extends BaseRep {
454
+ version?: number;
455
+ scenarioFiredEventDispositionReps?: ScenarioFiredEventDispositionRep[];
456
+ scenarioFiredEventFailedDispositionReps?: ScenarioFiredEventFailedDispositionRep[];
457
+ }
458
+
433
459
  export interface ScenarioFiredEventDispositionRep extends BaseRep {
434
460
  version?: number;
435
461
  scenarioFiredEventDispositionId?: string;
436
462
  scenarioFiredEventId?: string;
437
463
  alertDispositionId?: string;
464
+ alertId?: string;
438
465
  resolutionCode?: string;
439
466
  resolutionComment?: string;
440
467
  reasonCode?: string;
441
468
  logicalDeleteFlag?: string;
442
469
  }
443
470
 
471
+ export interface ScenarioFiredEventFailedDispositionRep extends BaseRep {
472
+ version?: number;
473
+ scenarioFiredEventId?: string;
474
+ actionableEntityId?: string;
475
+ alertId?: string;
476
+ errorMessage?: string;
477
+ }
478
+
444
479
  export interface ScenarioFiredEventFlatRep extends ScenarioFiredEventRep {
445
480
  alertingEventId?: string;
446
481
  }
@@ -449,6 +484,7 @@ export interface ScenarioFiredEventRep extends BaseRep {
449
484
  version?: number;
450
485
  scenarioFiredEventId?: string;
451
486
  scenarioFiredEntityType?: string;
487
+ scenarioFiredEntityLabel?: string;
452
488
  scenarioFiredEntityId?: string;
453
489
  scenarioId?: string;
454
490
  scenarioName?: string;
@@ -470,20 +506,27 @@ export interface ScenarioFiredEventRep extends BaseRep {
470
506
  messageValuesJsonAsText?: string;
471
507
  weight?: number;
472
508
  recommendedQueueId?: string;
509
+ recommendedQueueName?: string;
473
510
  contextRelationshipName?: string;
474
511
  contextTimeStampFieldName?: string;
512
+ contextTimeStampFieldLabel?: string;
475
513
  contextStartTimeStamp?: string;
476
514
  contextEndTimeStamp?: string;
477
515
  replicateFlag?: boolean;
478
516
  replicationPolicy?: ScenarioFiredEventReplicationPolicyType;
479
517
  externalReplicationEntityName?: string;
518
+ externalReplicationEntityLabel?: string;
480
519
  externalReplicationEntitySFEIdFieldName?: string;
520
+ externalReplicationEntitySFEIdFieldLabel?: string;
481
521
  contributingObjects?: ContributingObjectRep[];
482
522
  currentDispositionResolutionCode?: string;
523
+ currentDispositionResolutionLabel?: string;
483
524
  currentProductiveUserId?: string;
525
+ currentProductiveUserName?: string;
484
526
  currentProductiveTimeStamp?: string;
485
527
  currentDispositionComment?: string;
486
528
  receivedScenarioFiredEntityType?: string;
529
+ receivedScenarioFiredEntityLabel?: string;
487
530
  receivedScenarioFiredEntityId?: string;
488
531
  valueText?: string;
489
532
  valueNumeric?: number;
@@ -496,8 +539,18 @@ export interface ScenarioFiredEventRep extends BaseRep {
496
539
  segmentGroupId?: string;
497
540
  entitySegmentCode?: string;
498
541
  appliedSegmentCode?: string;
542
+ createdByName?: string;
543
+ modifiedByName?: string;
499
544
  currentProductiveTimestamp?: string;
500
545
  valueTimestamp?: string;
546
+ value?: any;
547
+ }
548
+
549
+ export interface ScenarioRep extends BaseRep {
550
+ scenarioId?: string;
551
+ scenarioName?: string;
552
+ strategyId?: string;
553
+ version?: number;
501
554
  }
502
555
 
503
556
  export interface ScenarioTagRep extends BaseRep {
@@ -636,6 +689,9 @@ export interface MapType {
636
689
  entry?: MapEntryType[];
637
690
  }
638
691
 
692
+ export interface ReflectionUtils {
693
+ }
694
+
639
695
  export interface Link extends Serializable, Comparable<Link> {
640
696
  method?: string;
641
697
  rel?: string;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@types/alert-reps",
3
- "version": "21.1.1",
3
+ "version": "22.0.7",
4
4
  "types": "index.d.ts"
5
5
  }
package/api.module.js CHANGED
@@ -30,6 +30,7 @@ import { TraversalApiService } from "./traversal/traversal-api.service";
30
30
  import { PageTemplateApiService } from "./page-template/page-template-api.service";
31
31
  import { PageSharedModule } from "../spb/shared/spb-shared.module";
32
32
  import { HubCommonsModule } from "../fdh/hub-commons/hub-commons.module";
33
+ import { McpApiService } from "./mcp/mcp-api.service";
33
34
  let ApiModule = class ApiModule {
34
35
  };
35
36
  ApiModule = __decorate([
@@ -57,13 +58,11 @@ ApiModule = __decorate([
57
58
  SearchApiService,
58
59
  TabApiService,
59
60
  ThemeApiService,
60
- TraversalApiService
61
+ TraversalApiService,
62
+ McpApiService
61
63
  ],
62
64
  // Import modules which bootstrap used AngularJs injectables
63
- imports: [
64
- PageSharedModule,
65
- HubCommonsModule
66
- ]
65
+ imports: [PageSharedModule, HubCommonsModule]
67
66
  })
68
67
  ], ApiModule);
69
68
  export { ApiModule };
@@ -19,6 +19,7 @@ export interface PageViewerApi {
19
19
  save: () => Promise<void>;
20
20
  isDirty: () => boolean;
21
21
  isValid: () => Promise<boolean>;
22
+ getPageModel: () => PageModel | undefined;
22
23
  }
23
24
  export type PageViewerBindings = CreateObjectPageBindings | EditObjectPageBindings | ViewObjectPageBindings | StaticDataPageBindings | PageBindings;
24
25
  export declare enum PageViewerBindingsType {
@@ -1,3 +1,4 @@
1
+ /* eslint-enable @typescript-eslint/no-deprecated */
1
2
  export var PageViewerBindingsType;
2
3
  (function (PageViewerBindingsType) {
3
4
  PageViewerBindingsType["CreateObject"] = "CREATE";
@@ -51,4 +51,8 @@ export var StandardPropertyTypes;
51
51
  StandardPropertyTypes["Hidden"] = "Hidden";
52
52
  StandardPropertyTypes["Disabled"] = "Disabled";
53
53
  StandardPropertyTypes["Condition"] = "Condition";
54
+ /**
55
+ * @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
+ StandardPropertyTypes["PromptTemplate"] = "PromptTemplate";
54
58
  })(StandardPropertyTypes || (StandardPropertyTypes = {}));
@@ -40,7 +40,7 @@ export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes =
40
40
  readonly admin: ControlAdminApi;
41
41
  }
42
42
  /**
43
- * This Control API pertains to functionality that checks the state, registers event handlers, and so on.
43
+ * This Control API relates to functionality that checks the state, registers event handlers, and so on.
44
44
  */
45
45
  export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = never> {
46
46
  /**
@@ -51,12 +51,13 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
51
51
  readonly type: string;
52
52
  /**
53
53
  * Control Mask
54
- * @deprecated use `api.control.masking.isConfiguredForMasking` instead.
55
- **/
54
+ * @deprecated Use `api.control.masking.isConfiguredForMasking` instead.
55
+ */
56
56
  isMaskedControl(): boolean;
57
- /** Control Mask Authorization
58
- * @deprecated use `api.control.masking.isAuthorizedToUnmask`
59
- **/
57
+ /**
58
+ * Control Mask Authorization
59
+ * @deprecated Use `api.control.masking.isAuthorizedToUnmask` instead.
60
+ */
60
61
  isAuthorizedToUnmask(): boolean;
61
62
  /**
62
63
  * Sets the value of the control's field.
@@ -83,7 +84,7 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
83
84
  * Returns the client field properties that are associated with the calling control.
84
85
  * Field must be configured as dataSource in the control's typeAttributes.
85
86
  * @method
86
- * @returns The field restrictions that should be applied.
87
+ * @returns The client field properties that should be applied.
87
88
  */
88
89
  getClientFieldProperties(): FieldTypeToClientFieldProperties<ControlFieldType> | undefined;
89
90
  /**
@@ -107,12 +108,12 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
107
108
  */
108
109
  getControl(): Control<ControlTypeAttributes>;
109
110
  /**
110
- * Access the Control Data Masking API
111
+ * Access the Control Data Masking API.
111
112
  */
112
113
  masking: MaskingControlApi;
113
114
  }
114
115
  /**
115
- * This API pertains to administration functionality for controls, for example registering resources.
116
+ * This API relates to administration functionality for controls, for example registering resources.
116
117
  *
117
118
  * @category API
118
119
  */
@@ -209,7 +210,7 @@ export interface ControlStateApi {
209
210
  /**
210
211
  * Returns the masked state of the calling control.
211
212
  * True if the control is masked, otherwise false.
212
- * @deprecated use `api.control.masking.isMasked`
213
+ * @deprecated Use `api.control.masking.isMasked` instead.
213
214
  */
214
215
  readonly maskActive: boolean;
215
216
  /**
@@ -411,7 +412,7 @@ export interface ControlPageApi extends ControlPageApiBase {
411
412
  reloadRefreshableControls(categoryToRefresh?: string, controlToRefresh?: Control): void;
412
413
  /**
413
414
  * @method
414
- * @returns True if any RefreshableControls have options.requiresIndex present. Otherwise false
415
+ * @returns True if any RefreshableControls have options.requiresIndex present. Otherwise, false.
415
416
  */
416
417
  hasAnyRefreshableControlRequiresIndex(): boolean;
417
418
  /**
@@ -428,10 +429,10 @@ export interface ControlPageApi extends ControlPageApiBase {
428
429
  * Toggle the page-level sliding panel. This panel should be used to contain information that is
429
430
  * supplementary to the document, for example attachments or workflow tasks.
430
431
  * @method
431
- * @param [sectionLabel] {string} Describes the section, this should be internationalized.
432
+ * @param [sectionLabel] {string} Describes the section; this should be internationalized.
432
433
  * @param [content] {SlidingPanelContent} The content of the sliding panel.
433
434
  * @param [panelProperties] {SlidingPanelProperties} Properties for the panel.
434
- * When providing a url for content: the panel properties will be available on the controller's "slidingPanel" object.
435
+ * When providing a URL for content: the panel properties will be available on the controller's "slidingPanel" object.
435
436
  * When providing a selector for content: the properties will be set on the element to be created.
436
437
  * @param [onClose] {function} A callback function invoked when the panel is dismissed. There are no parameters. Returns void.
437
438
  * @param [focusPreviousActiveElementOnClose] {boolean} Toggle for whether the app should apply focus to the last active element before the panel was opened.
@@ -479,15 +480,26 @@ export interface ControlPageApi extends ControlPageApiBase {
479
480
  */
480
481
  save(stopEditing: boolean, closeObject: boolean): Promise<void>;
481
482
  /**
482
- * Access the Page Data Masking API
483
+ * Access the Page Data Masking API.
483
484
  */
484
485
  masking: MaskingPageApi;
486
+ /**
487
+ * Register a callback function that is invoked when the page that contains the current control is navigated back to.
488
+ * Useful for updating homepage controls whose config sets "reuse" to true and need to update when the homepage is reloaded.
489
+ * @method
490
+ * @param callback {function} The function to be invoked.
491
+ */
485
492
  onNavigationStart(callback: () => void): void;
486
493
  /**
487
- * Checks if the sliding panel is pinned
494
+ * Checks if the sliding panel is pinned.
488
495
  * @returns A boolean value that checks whether the sliding panel is pinned.
489
496
  */
490
497
  isSlidingPanelPinned(): boolean | undefined;
498
+ /**
499
+ * Gives whether a loading mask is shown for the page.
500
+ * This loading mask is shown when the page is saving or a disposition is in progress.
501
+ */
502
+ isLoadingMaskShown(): boolean;
491
503
  }
492
504
  /**
493
505
  * Methods related to files.
@@ -569,8 +581,7 @@ export interface ControlFileApi extends ControlFileApiBase {
569
581
  * Equivalent to {@link PageEventsApiBase} with the exception that event hooks will be scoped to the page on which the calling control resides.
570
582
  * @extends PageEventsApiBase
571
583
  */
572
- export interface ControlPageEventsApi extends PageEventsApiBase {
573
- }
584
+ export type ControlPageEventsApi = PageEventsApiBase;
574
585
  export interface FieldNotOnPageError {
575
586
  name: "FieldNotOnPageError";
576
587
  message: string;
@@ -31,6 +31,7 @@ export interface ReferenceDataRestrictions extends FieldRestrictions {
31
31
  cascadingReferenceDataName?: string;
32
32
  cascadingReferenceDataFilterByCode?: string;
33
33
  cascadingReferenceDataFilterByField?: string;
34
+ cascadingReferenceDataFilterByParentCode?: string;
34
35
  }
35
36
  export type UserGroupStrategy = "USERS" | "GROUPS" | "USERS_AND_GROUPS";
36
37
  export interface UserGroupRestrictions extends FieldRestrictions {
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line no-restricted-imports -- these get tree shaken out
1
2
  import { expectType } from "../../shared/util/helper-functions";
2
3
  export var IdentityState;
3
4
  (function (IdentityState) {
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line no-restricted-imports -- these get tree shaken out
1
2
  import { expectType } from "../../shared/util/helper-functions";
2
3
  /** @category Identities Types */
3
4
  export var SizeType;
package/index.d.ts CHANGED
@@ -23,6 +23,7 @@ import { TraversalApi } from "./traversal/traversal-api";
23
23
  import { ShellTabsApi } from "./shell-tabs/shell-tabs-api";
24
24
  import { PageTemplateApi } from "./page-template/page-template-api";
25
25
  import { InitApi } from "./init";
26
+ import { McpApi } from "./mcp";
26
27
  /**
27
28
  * The SVI API contains common API functions and can be accessed directly from the window via `window.sas.vi`
28
29
  *
@@ -58,6 +59,7 @@ export interface SviClientApi extends SviCommonApi {
58
59
  search: ClientSearchApi;
59
60
  sheet: SheetApi;
60
61
  tab: TabApi;
62
+ mcpApi?: McpApi;
61
63
  }
62
64
  /**
63
65
  * The Admin API.
@@ -66,9 +68,14 @@ export interface SviAdminApi extends SviCommonApi {
66
68
  metadata: AdminMetadataApi;
67
69
  }
68
70
  export type SviApi = SviClientApi | SviAdminApi;
69
- export type SviWindow = typeof window & {
70
- sas: {
71
- vi: SviApi;
72
- viInit: InitApi;
73
- };
74
- };
71
+ export type SviWindow = typeof globalThis & Window & VIWindowApi;
72
+ export interface VIWindowApi {
73
+ sas: VISASApi;
74
+ }
75
+ export interface VISASApi {
76
+ vi: SviApi;
77
+ viInit: InitApi;
78
+ }
79
+ export declare function getApi<T extends SviApi = SviApi>(): T;
80
+ export declare function isUserAppApi(api: SviApi): api is SviClientApi;
81
+ export declare function isAdminAppApi(api: SviApi): api is SviAdminApi;
package/index.js CHANGED
@@ -1 +1,13 @@
1
- export {};
1
+ export function getApi() {
2
+ const api = globalThis.sas.vi;
3
+ if (typeof api !== "object" || api === null) {
4
+ throw new TypeError("SVI API is not available or not properly initialized");
5
+ }
6
+ return api;
7
+ }
8
+ export function isUserAppApi(api) {
9
+ return "sheet" in api;
10
+ }
11
+ export function isAdminAppApi(api) {
12
+ return !isUserAppApi(api);
13
+ }
package/mcp/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./mcp-api";
package/mcp/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./mcp-api";
@@ -0,0 +1,75 @@
1
+ import { Transport } from "@modelcontextprotocol/sdk/shared/transport.js";
2
+ export interface PromptPlaceholderDefinition {
3
+ title: string;
4
+ type: "string" | "number" | "boolean" | "date" | "date-time";
5
+ enumNames?: string[];
6
+ required?: boolean;
7
+ }
8
+ export interface SimpleContextMenuPrompt {
9
+ label: string;
10
+ parentLabel: string;
11
+ prompt: string;
12
+ placeholders?: Record<string, PromptPlaceholderDefinition>;
13
+ }
14
+ export interface RemoteMCPServerConfig {
15
+ url: string;
16
+ }
17
+ export interface BaseMCPServerConfig {
18
+ name: string;
19
+ version: string;
20
+ }
21
+ export interface StreamableMCPServerConfig extends BaseMCPServerConfig, RemoteMCPServerConfig {
22
+ url: string;
23
+ name: string;
24
+ transport: "streamable";
25
+ headers?: Record<string, string>;
26
+ }
27
+ export interface LocalTransportConfig extends BaseMCPServerConfig {
28
+ name: string;
29
+ version: string;
30
+ transport: "local";
31
+ connect: (transport: Transport) => void;
32
+ }
33
+ /**
34
+ * This API provides functionality related to extension of MCP (Model Context Protocol) on the VI platform.
35
+ *
36
+ * Accessed from the window at `window.sas.vi.mcp`.
37
+ *
38
+ * @example window.sas.vi.mcp.registerMCPServer(newMcpConfig);
39
+ * @category API
40
+ */
41
+ export interface McpApi {
42
+ /**
43
+ * @method
44
+ * @description Registers an MCP server with the VI platform using the provided configuration.
45
+ * @param config The configuration object for the MCP server to register.
46
+ * @returns A Promise that resolves when the server has been successfully registered.
47
+ */
48
+ registerServer(config: StreamableMCPServerConfig | LocalTransportConfig): Promise<void>;
49
+ /**
50
+ * @method
51
+ * @description Deregisters an MCP server from the VI platform using the provided configuration.
52
+ * @param config The configuration object for the MCP server to deregister.
53
+ * @returns A Promise that resolves when the server has been successfully deregistered.
54
+ */
55
+ deregisterServer(config: StreamableMCPServerConfig | LocalTransportConfig): Promise<void>;
56
+ /**
57
+ * @method
58
+ * @description Registers prompts with the VI platform that can be used in MCP interactions.
59
+ * @param prompts The array of prompts to add to the existing prompts on the system. If a prompt with the same label and parentLabel already exists, it will be ignored.
60
+ * @see SimpleContextMenuPrompt for more detail on prompt definitions.
61
+ * @example window.sas.vi.mcpApi.registerPrompts([{label: "Example Prompt", parentLabel: "Example Prompts", prompt: "Tell me more about Visual Investigator."}]);
62
+ */
63
+ registerPrompts(prompts: SimpleContextMenuPrompt[]): void;
64
+ }
65
+ export type ValidElicitationDataTypes = number | string | boolean | undefined;
66
+ export type ElicitationDialogResponse = {
67
+ action: "accept";
68
+ data: {
69
+ values: Record<string, ValidElicitationDataTypes>;
70
+ promptResult?: string;
71
+ };
72
+ } | {
73
+ action: "decline" | "cancel";
74
+ data: undefined;
75
+ };
package/mcp/mcp-api.js ADDED
@@ -0,0 +1,6 @@
1
+ // eslint-disable-next-line no-restricted-imports
2
+ import { expectType } from "../../shared/util/helper-functions";
3
+ expectType(true);
4
+ expectType(true);
5
+ expectType(true);
6
+ expectType(true);
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "@sassoftware/vi-api/mcp",
3
+ "files": [
4
+ "**/*.d.ts",
5
+ "**/*.js"
6
+ ],
7
+ "main": "index.js",
8
+ "types": "index.d.ts"
9
+ }
@@ -113,7 +113,7 @@ export interface ValidRelationshipTypes {
113
113
  [relationshipName: string]: RelationshipTypes;
114
114
  }
115
115
  export interface RelationshipTypes {
116
- isIndexedForSearch: boolean;
116
+ indexedForSearch: boolean;
117
117
  linkTypes: Relationship[];
118
118
  name: string;
119
119
  searchBeforeCreate: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sassoftware/vi-api",
3
- "version": "1.51.1",
3
+ "version": "1.54.1",
4
4
  "description": "Types used in the SAS Visual Investigator API",
5
5
  "keywords": [
6
6
  "SAS",
@@ -32,6 +32,7 @@
32
32
  "types": "index.d.ts",
33
33
  "peerDependencies": {
34
34
  "@types/angular": "^1.7.3",
35
- "@types/angular-resource": "^1.5.16"
35
+ "@types/angular-resource": "^1.5.16",
36
+ "@modelcontextprotocol/sdk": "^1.20.2"
36
37
  }
37
38
  }
@@ -172,7 +172,7 @@ export interface IPageEvent<T extends IPageEventData> {
172
172
  addPostHook(hook: IPostPageEventHook<T>): PageEventHookRemove;
173
173
  /**
174
174
  * @method
175
- * @description run pre-hooks, execute the action, run post hooks.
175
+ * @description Run pre-hooks, execute the action, run post hooks.
176
176
  * @param payload is passed as input for any event hooks.
177
177
  * @param action the action to perform.
178
178
  */
@@ -12,7 +12,7 @@ export interface ObjectPageDesignerState {
12
12
  primaryDataSource: StoredObjectDTO;
13
13
  }
14
14
  /**
15
- * This API provides functionality that pertains to the page state.
15
+ * This API provides functionality that relates to the page state.
16
16
  * Accessed from the window at `window.sas.vi.pageState`.
17
17
  *
18
18
  * @example window.sas.vi.pageState.getCurrent();
@@ -51,7 +51,7 @@ export interface PageStateApi {
51
51
  */
52
52
  getCurrentHomepageDesigner(): HomepageDesignerState | undefined;
53
53
  /**
54
- * Gives the currently active object pages state, or undefined if an object page
54
+ * Gives the currently active object page's state, or undefined if an object page
55
55
  * designer tab is not active.
56
56
  */
57
57
  getCurrentObjectPageDesigner(): ObjectPageDesignerState | undefined;
@@ -1,7 +1,7 @@
1
1
  import { Template, TemplateResourceSummary } from "../svi-datahub";
2
2
  import { ApplicationType, TemplateType } from "../page-admin/page-admin-api";
3
3
  /**
4
- * This API provides functionality that pertains to the page templates.
4
+ * This API provides functionality that relates to the page templates.
5
5
  *
6
6
  * Accessed from the window at `window.sas.vi.pageTemplate`.
7
7
  *
@@ -90,9 +90,40 @@ export interface EditorApi {
90
90
  * @returns A function that stops the handler from being invoked.
91
91
  */
92
92
  onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): () => void;
93
+ /**
94
+ * Methods and properties related to the state of the property editor.
95
+ */
96
+ readonly state: EditorStateApi;
97
+ }
98
+ /**
99
+ * Methods and properties related to the state of the property editor.
100
+ *
101
+ * @category API
102
+ */
103
+ export interface EditorStateApi extends EditorState {
104
+ /**
105
+ * Registers a function to be invoked whenever a state change event occurs.
106
+ * This function receives an object that contains information about the change event.
107
+ *
108
+ * @method
109
+ * @param handler {function} Function to be invoked when a state is changed.
110
+ */
111
+ onChange(handler: (state: EditorState) => void): void;
112
+ }
113
+ export interface EditorState {
114
+ /**
115
+ * Returns the disabled state of the property editor.
116
+ * True if the control is disabled, otherwise false.
117
+ */
118
+ readonly disabled: boolean;
119
+ /**
120
+ * Returns the required state of the property editor.
121
+ * True if the control is required, otherwise false.
122
+ */
123
+ readonly required: boolean;
93
124
  }
94
125
  /**
95
- * This API pertains to page/toolbar control properties in SAS Visual Investigator.
126
+ * This API relates to page/toolbar control properties in SAS Visual Investigator.
96
127
  *
97
128
  * Accessed from the window at `window.sas.vi.property`.
98
129
  *