@sassoftware/vi-api 1.42.0 → 1.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- // Generated using typescript-generator version 2.15.527 on 2024-04-05 10:39:48.
3
+ // Generated using typescript-generator version 2.15.527 on 2024-10-31 19:39:54.
4
4
 
5
5
  export interface ActionRequestRep {
6
6
  version?: number;
@@ -17,6 +17,15 @@ export interface ActionResponseRep {
17
17
  alertChanged?: boolean;
18
18
  }
19
19
 
20
+ export interface AlertConstants {
21
+ }
22
+
23
+ export interface Length {
24
+ }
25
+
26
+ export interface LengthConstants {
27
+ }
28
+
20
29
  export interface AlertDispositionRep extends BaseRep {
21
30
  alertDispositionDescription?: string;
22
31
  alertDispositionId?: string;
@@ -106,6 +115,9 @@ export interface AlertRep extends BaseRep {
106
115
  autoActivateScore?: number;
107
116
  strategyRangeLow?: number;
108
117
  strategyRangeHigh?: number;
118
+ alertVersionTimestamp?: string;
119
+ statusTimestamp?: string;
120
+ dispositionTimestamp?: string;
109
121
  suppressionEndTimestamp?: string;
110
122
  holdEndTimestamp?: string;
111
123
  queueEntryTimestamp?: string;
@@ -115,9 +127,6 @@ export interface AlertRep extends BaseRep {
115
127
  systemServiceTimestamp?: string;
116
128
  autoCloseTimestamp?: string;
117
129
  autoActivateTimestamp?: string;
118
- alertVersionTimestamp?: string;
119
- statusTimestamp?: string;
120
- dispositionTimestamp?: string;
121
130
  }
122
131
 
123
132
  export interface AlertVersionSummaryRep {
@@ -130,8 +139,8 @@ export interface AlertVersionSummaryRep {
130
139
  versionDispositionResolutionCode?: string;
131
140
  versionScore?: number;
132
141
  versionLastUpdateTimeStamp?: string;
133
- versionCreationTimestamp?: string;
134
142
  versionLastUpdateTimestamp?: string;
143
+ versionCreationTimestamp?: string;
135
144
  }
136
145
 
137
146
  export interface AlertWorkflowRep {
@@ -228,6 +237,7 @@ export interface DispositionNotificationRep extends TypedPayload {
228
237
 
229
238
  export interface DispositionQueueRep extends BaseRep {
230
239
  displayCode?: string;
240
+ dispositionAutoApplied?: boolean;
231
241
  dispositionId?: string;
232
242
  dispositionName?: string;
233
243
  groupId?: string;
@@ -617,7 +627,7 @@ export interface MapType {
617
627
  entry?: MapEntryType[];
618
628
  }
619
629
 
620
- export interface Link extends Serializable {
630
+ export interface Link extends Serializable, Comparable<Link> {
621
631
  method?: string;
622
632
  rel?: string;
623
633
  href?: string;
@@ -659,6 +669,9 @@ export interface ETagAndLastModifiedProvider extends ETaggable, LastModifiedProv
659
669
  export interface XmlAdapter<ValueType, BoundType> {
660
670
  }
661
671
 
672
+ export interface Comparable<T> {
673
+ }
674
+
662
675
  export interface Preconditionable {
663
676
  }
664
677
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@types/alert-reps",
3
- "version": "18.0.2",
3
+ "version": "19.5.5",
4
4
  "types": "index.d.ts"
5
5
  }
@@ -5,6 +5,15 @@ export declare enum ControlType {
5
5
  Angular = "angular",
6
6
  WebComponent = "webcomponent"
7
7
  }
8
+ export declare enum ControlCategory {
9
+ Renderer = "Renderers",
10
+ Control = "Fields",
11
+ Toolbar = "ToolbarItems",
12
+ Home = "Home",
13
+ Chart = "Charts",
14
+ Panels = "Panels",
15
+ Container = "Container"
16
+ }
8
17
  export interface Solution {
9
18
  label: string;
10
19
  version?: string;
@@ -20,6 +29,13 @@ export interface SolutionExtension extends ControlMetadata {
20
29
  clientApplication?: string;
21
30
  name: string;
22
31
  }
32
+ export interface HomepageSolutionExtension extends SolutionExtension {
33
+ /** When set to true, the solution extension is reused when the homepage is reloaded instead. If unset, or set to
34
+ * false, then the control will be destroyed and recreated when the homepage is revisited.
35
+ */
36
+ reuse?: boolean;
37
+ category: ControlCategory.Home;
38
+ }
23
39
  export interface SolutionExtensionConfigTypeAttributes {
24
40
  metadata?: SolutionExtensionMetadata;
25
41
  attributes?: Record<string, SolutionExtensionAttribute>;
@@ -149,14 +165,14 @@ export interface ConfigApi {
149
165
  * @param name {string} Name of the solution extension.
150
166
  * @returns A Promise that resolves to the solution extension if the name is found.
151
167
  */
152
- getSolutionExtension(name: string): Promise<SolutionExtension | undefined>;
168
+ getSolutionExtension(name: string): Promise<SolutionExtension | HomepageSolutionExtension | undefined>;
153
169
  /**
154
170
  * @method
155
171
  * @description Registers a solution extension with the application.
156
172
  * @param config {SolutionExtension} Solution extension configuration.
157
173
  * @returns A Promise that resolves when the solution has been sent to the cache.
158
174
  */
159
- registerSolutionExtension(config: SolutionExtension): Promise<void>;
175
+ registerSolutionExtension(config: SolutionExtension | HomepageSolutionExtension): Promise<void>;
160
176
  /**
161
177
  * @method
162
178
  * @description Registers a document manager with the application.
@@ -4,3 +4,13 @@ export var ControlType;
4
4
  ControlType["Angular"] = "angular";
5
5
  ControlType["WebComponent"] = "webcomponent";
6
6
  })(ControlType || (ControlType = {}));
7
+ export var ControlCategory;
8
+ (function (ControlCategory) {
9
+ ControlCategory["Renderer"] = "Renderers";
10
+ ControlCategory["Control"] = "Fields";
11
+ ControlCategory["Toolbar"] = "ToolbarItems";
12
+ ControlCategory["Home"] = "Home";
13
+ ControlCategory["Chart"] = "Charts";
14
+ ControlCategory["Panels"] = "Panels";
15
+ ControlCategory["Container"] = "Container";
16
+ })(ControlCategory || (ControlCategory = {}));
@@ -5,6 +5,7 @@ import { PageDataChange, PageModeChange, StateChange } from "./events";
5
5
  import { Control, RefreshablePageControlOptions, SlidingPanelContent, SlidingPanelProperties, TypeAttributes } from "./page";
6
6
  import { FieldTypeToRestrictions, FileRestrictions } from "./restrictions";
7
7
  import { AttachmentFormData } from "./file";
8
+ import { MaskingControlApi, MaskingPageApi } from "./masking-api";
8
9
  /**
9
10
  * The minimum API that should be supported on control members across solutions.
10
11
  */
@@ -47,9 +48,14 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
47
48
  readonly state: ControlStateApi;
48
49
  /** Control type. */
49
50
  readonly type: string;
50
- /** Control Mask */
51
+ /**
52
+ * Control Mask
53
+ * @deprecated use `api.control.masking.isConfiguredForMasking` instead.
54
+ **/
51
55
  isMaskedControl(): boolean;
52
- /** Control Mask Authorization */
56
+ /** Control Mask Authorization
57
+ * @deprecated use `api.control.masking.isAuthorizedToUnmask`
58
+ **/
53
59
  isAuthorizedToUnmask(): boolean;
54
60
  /**
55
61
  * Sets the value of the control's field.
@@ -85,6 +91,10 @@ export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = T
85
91
  * @returns Object representing the calling control.
86
92
  */
87
93
  getControl(): Control<ControlTypeAttributes>;
94
+ /**
95
+ * Access the Control Data Masking API
96
+ */
97
+ masking: MaskingControlApi;
88
98
  }
89
99
  /**
90
100
  * This API pertains to administration functionality for controls, for example registering resources.
@@ -176,16 +186,17 @@ export interface ControlStateApi {
176
186
  * True if the control is hidden, otherwise false.
177
187
  */
178
188
  readonly hidden: boolean;
179
- /**
180
- * Returns the masked state of the calling control.
181
- * True if the control is masked, otherwise false.
182
- */
183
- readonly maskActive: boolean;
184
189
  /**
185
190
  * Returns the disabled state of the calling control.
186
191
  * True if the control is disabled, otherwise false.
187
192
  */
188
193
  readonly disabled: boolean;
194
+ /**
195
+ * Returns the masked state of the calling control.
196
+ * True if the control is masked, otherwise false.
197
+ * @deprecated use `api.control.masking.isMasked`
198
+ */
199
+ readonly maskActive: boolean;
189
200
  /**
190
201
  * Registers a function to be invoked whenever a state change event occurs.
191
202
  * This function receives an object that contains information about the change event.
@@ -423,6 +434,11 @@ export interface ControlPageApi extends ControlPageApiBase {
423
434
  * @returns A Promise which resolves when the page has been saved.
424
435
  */
425
436
  save(stopEditing: boolean, closeObject: boolean): Promise<void>;
437
+ /**
438
+ * Access the Page Data Masking API
439
+ */
440
+ masking: MaskingPageApi;
441
+ onNavigationStart(callback: () => void): void;
426
442
  }
427
443
  /**
428
444
  * Methods related to files.
@@ -506,3 +522,8 @@ export interface ControlFileApi extends ControlFileApiBase {
506
522
  */
507
523
  export interface ControlPageEventsApi extends PageEventsApiBase {
508
524
  }
525
+ export interface FieldNotOnPageError {
526
+ name: "FieldNotOnPageError";
527
+ message: string;
528
+ fields: string[];
529
+ }
@@ -72,5 +72,5 @@ export interface StateChange {
72
72
  allowInput?: boolean;
73
73
  couldBeReadOnly?: boolean;
74
74
  couldBeRequired?: boolean;
75
- maskActive?: boolean;
75
+ masked?: boolean;
76
76
  }
@@ -0,0 +1,187 @@
1
+ import { FieldValue } from "./data-types";
2
+ export interface UnmaskEventData {
3
+ data: {
4
+ [fieldName: string]: FieldValue;
5
+ };
6
+ fieldNames: string[];
7
+ documentId: string;
8
+ documentType: string;
9
+ scopeId: string;
10
+ nodeId?: string;
11
+ }
12
+ export interface MaskEventData {
13
+ fieldNames: string[];
14
+ documentId: string;
15
+ documentType: string;
16
+ scopeId: string;
17
+ nodeId?: string;
18
+ }
19
+ export interface MaskResetEventData {
20
+ scopeId: string;
21
+ documentId: string;
22
+ fieldNames: string[];
23
+ }
24
+ export declare const MASKED_FIELD_CHAR = "\u2022";
25
+ export declare const MASKED_FIELD_PLACEHOLDER: string;
26
+ export declare const MASKED_FIELD_ISO_CODE_PLACEHOLDER: string;
27
+ export interface MaskingPageApi {
28
+ /**
29
+ * Determines whether a field is masked.
30
+ * @throws {FieldNotOnPageError}
31
+ * @param fieldName The field name.
32
+ * @returns A boolean.
33
+ */
34
+ isMasked(fieldName: string): boolean;
35
+ /**
36
+ * Masks a field.
37
+ * @throws {NotConfiguredForMaskingError}
38
+ * @throws {FieldNotOnPageError}
39
+ * @param fieldName The field name.
40
+ */
41
+ mask(fieldName: string): void;
42
+ /**
43
+ * Masks the fields.
44
+ * If no fields array is passed in then all fields that are configured for masking on the page will be masked.
45
+ * @throws {NotConfiguredForMaskingError} If one or more of the fields are not configured for masking.
46
+ * @throws {FieldNotOnPageError} If one or more of the fields are not available on the page.
47
+ * @param fieldNames The field names.
48
+ */
49
+ maskAll(fieldNames?: string[]): void;
50
+ /**
51
+ * Unmasks the field via a fetch.
52
+ * Subsequent get field value calls return the unmasked value.
53
+ * If the field is unmasked or has been unmasked in the current page mode, no fetch is made.
54
+ * If the field is not on the page the promise will reject with a {@link FieldNotOnPageError}.
55
+ * If the field is not configured for masking the promise will reject with a {@link NotConfiguredForMaskingError}.
56
+ * If the user is not authorized to reveal the field, the returned promise will reject with an {@link UnmaskAuthError}.
57
+ * @param fieldName The field name.
58
+ * @returns A promise that resolves when the unmask is successful.
59
+ */
60
+ unmask(fieldName: string): Promise<void>;
61
+ /**
62
+ * Unmasks the fields via a fetch.
63
+ * Subsequent get field value calls return the unmasked value.
64
+ * If no fields array is passed in then all fields on the page configured for masking will be unmasked.
65
+ * For each field, if the field is unmasked or has been unmasked in the current page mode, no fetch for it is made.
66
+ * If one or more of the fields are not on the page the promise will reject with a {@link FieldNotOnPageError}.
67
+ * If one or more of the fields are not configured for masking the promise will reject with a {@link NotConfiguredForMaskingError}.
68
+ * If the user is not authorized to reveal one or more of the fields, the returned promise will reject with an {@link UnmaskAuthError}.
69
+ * @param fieldNames The field names.
70
+ * @returns A promise that resolves when the unmasks are successful.
71
+ */
72
+ unmaskAll(fieldNames?: string[]): Promise<void>;
73
+ /**
74
+ * Invokes the callback whenever any field value is masked.
75
+ * When an individual field is masked via a mask call, the callback will be invoked once.
76
+ * When multiple fields are masked via a single mask/mask all call, the callback will be invoked once.
77
+ * @param callback The callback function.
78
+ * @returns A function that removes the callback.
79
+ */
80
+ onEveryMask(callback: (mask: {
81
+ fieldNames: string[];
82
+ }) => void): () => void;
83
+ /**
84
+ * Invokes the callback whenever the specified field is masked.
85
+ * @throws {FieldNotOnPageError}
86
+ * @param fieldName The field name.
87
+ * @param callback The callback function.
88
+ * @returns A function that removes the callback.
89
+ */
90
+ onMask(fieldName: string, callback: () => void): () => void;
91
+ /**
92
+ * Invokes the callback whenever any field value is unmasked.
93
+ * When an individual field is unmasked via an unmask call, the callback will be invoked once.
94
+ * When multiple fields are unmasked via a single unmask/unmask all call, the callback will be invoked once.
95
+ * @param callback The callback function.
96
+ * @returns A function that removes the callback.
97
+ */
98
+ onEveryUnmask(callback: (unmask: {
99
+ fieldNames: string[];
100
+ }) => void): () => void;
101
+ /**
102
+ * Invokes the callback whenever the specified field is unmasked.
103
+ * @throws {FieldNotOnPageError}
104
+ * @param fieldName The field name.
105
+ * @param callback The callback function.
106
+ * @returns A function that removes the callback.
107
+ */
108
+ onUnmask(fieldName: string, callback: () => void): () => void;
109
+ /**
110
+ * Determines whether the field is configured for masking via the field's restrictions.
111
+ * @throws {FieldNotOnPageError}
112
+ * @param fieldName The field name.
113
+ * @returns Whether the field is configured for masking.
114
+ */
115
+ isConfiguredForMasking(fieldName: string): boolean;
116
+ /**
117
+ * Determines whether the current user can unmask the field.
118
+ * @throws {FieldNotOnPageError}
119
+ * @throws {NotConfiguredForMaskingError}
120
+ * @param fieldName The field name.
121
+ * @returns Whether the current can unmask the field.
122
+ */
123
+ isAuthorizedToUnmask(fieldName: string): boolean;
124
+ }
125
+ export interface MaskingControlApi {
126
+ /**
127
+ * In the case of a single field control, determines whether the control's field is masked.
128
+ * In the case of a multiple field control, determines whether one or more of the control's fields are masked.
129
+ * @returns A boolean.
130
+ */
131
+ isMasked(): boolean;
132
+ /**
133
+ * Masks the control's field(s) that are configured for masking.
134
+ * @throws {NotConfiguredForMaskingError} If a single field control's field is not configured for masking or if
135
+ * all of a multiple field control's fields are not configured for masking.
136
+ */
137
+ mask(): void;
138
+ /**
139
+ * Unmasks the controls field(s) via a fetch.
140
+ * Subsequent get field value calls return the unmasked value.
141
+ * For each field, if the field is unmasked or has been unmasked in the current page mode, no fetch for it is made.
142
+ * If a single field control's field is not configured for masking or if all of a multiple field control's fields are not configured for masking the returned
143
+ * promise will reject with a {@link NotConfiguredForMaskingError}.
144
+ * If the user is not authorized to reveal one or more of the control's fields, the returned promise will reject with an {@link UnmaskAuthError}.
145
+ * @returns A promise that resolves when the unmask is successful.
146
+ */
147
+ unmask(): Promise<void>;
148
+ /**
149
+ * Invokes the callback whenever the control's field is (or, in the case of a multiple field control, fields are) masked.
150
+ * @param callback The callback function.
151
+ * @returns A function that removes the callback.
152
+ */
153
+ onMask(callback: (mask: {
154
+ fieldNames: string[];
155
+ }) => void): () => void;
156
+ /**
157
+ * Invokes the callback whenever the control's field is (or, in the case of a multiple field control, fields are) unmasked.
158
+ * @param callback The callback function.
159
+ * @returns A function that removes the callback.
160
+ */
161
+ onUnmask(callback: (unmask: {
162
+ fieldNames: string[];
163
+ }) => void): () => void;
164
+ /**
165
+ * In the case of a single field control, determines (via the field restrictions) whether the control's field is configured for masking.
166
+ * In the case of a multiple field control, determines (via the field restrictions) whether one or more of the control's fields are configured for masking.
167
+ * @returns Whether the control is configured for masking.
168
+ */
169
+ isConfiguredForMasking(): boolean;
170
+ /**
171
+ * In the case of a single field control, determines whether the current user is able to unmask the control's field.
172
+ * In the case of a multiple field control, determines whether the current user is able to unmask all of the control's fields.
173
+ * @throws {NotConfiguredForMaskingError}
174
+ * @returns Whether the current user is able to unmask the control.
175
+ */
176
+ isAuthorizedToUnmask(): boolean;
177
+ }
178
+ export interface UnmaskAuthError {
179
+ name: "UnmaskAuthError";
180
+ message: string;
181
+ fields: string[];
182
+ }
183
+ export interface NotConfiguredForMaskingError {
184
+ name: "NotConfiguredForMaskingError";
185
+ message: string;
186
+ fields: string[];
187
+ }
@@ -0,0 +1,3 @@
1
+ export const MASKED_FIELD_CHAR = "\u2022";
2
+ export const MASKED_FIELD_PLACEHOLDER = MASKED_FIELD_CHAR.repeat(9);
3
+ export const MASKED_FIELD_ISO_CODE_PLACEHOLDER = MASKED_FIELD_CHAR.repeat(3);
@@ -1,5 +1,11 @@
1
1
  import { FieldType, NumberDataType } from "./data-types";
2
- export interface RequirableRestriction {
2
+ export interface MaskedFieldRestriction {
3
+ masked?: {
4
+ currentUserIsAuthorizedToReveal: boolean;
5
+ revealUrl?: string;
6
+ };
7
+ }
8
+ export interface RequirableRestriction extends MaskedFieldRestriction {
3
9
  required: boolean;
4
10
  }
5
11
  export interface FieldRestrictions extends RequirableRestriction {
@@ -50,9 +50,10 @@ export interface CurrentUserApi {
50
50
  /**
51
51
  * @method
52
52
  * @description Gets the list of groups to which the current user belongs.
53
+ * @param limit Maximum number of groups to be returned. Default: 1000.
53
54
  * @returns A list of group details.
54
55
  */
55
- getUserMemberships(): Promise<IdentitySummary[]>;
56
+ getUserMemberships(limit?: number): Promise<IdentitySummary[]>;
56
57
  /**
57
58
  * @method
58
59
  * @description Verifies if the current user has administration features.
@@ -0,0 +1,25 @@
1
+ import { PageModel } from "../page-model";
2
+ import { Control } from "../control";
3
+ /**
4
+ * @category Properties
5
+ */
6
+ export interface SASInputBindings<T = any> {
7
+ id?: string;
8
+ readOnly?: boolean;
9
+ placeholder?: string;
10
+ autocomplete?: string;
11
+ isDisabled?: boolean;
12
+ model?: T;
13
+ inputFocus?: (event: FocusEvent) => void;
14
+ inputBlur?: (event: FocusEvent) => void;
15
+ modelChanged?: (modelValue: T) => void;
16
+ }
17
+ /**
18
+ * Page Controls require a valid {@link Control | childNode} and {@link PageModel | pageModel}.</strong>
19
+ *
20
+ * @category Properties
21
+ **/
22
+ export interface PageControlBindings {
23
+ childNode: Control;
24
+ pageModel: PageModel;
25
+ }