@sassoftware/vi-api 0.0.29 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +333 -0
- package/README.md +9 -0
- package/alert-reps/index.d.ts +5 -1
- package/alert-reps/package.json +1 -1
- package/api.module.js +72 -0
- package/component/bindings.d.ts +15 -7
- package/component/index.d.ts +11 -10
- package/component/index.js +1 -1
- package/config/config-api.d.ts +21 -2
- package/control/control-api.d.ts +44 -22
- package/control/data-types.d.ts +6 -1
- package/control/page.d.ts +14 -0
- package/control/toolbar-property-api.d.ts +2 -1
- package/event/event-api.d.ts +1 -0
- package/event/event-api.js +1 -0
- package/index.d.ts +2 -2
- package/metadata/metadata-api.d.ts +15 -12
- package/object/object-api.d.ts +29 -40
- package/package.json +25 -2
- package/page-admin/page-admin-api.d.ts +2 -2
- package/page-model/page-model-api.d.ts +113 -14
- package/page-state/page-state-api.d.ts +23 -0
- package/property/property-api.d.ts +66 -6
- package/property/property-api.js +2 -2
- package/score-reps/index.d.ts +1 -1
- package/score-reps/package.json +1 -1
- package/search/client/client-search-api.d.ts +15 -11
- package/search/client/client-search-api.js +1 -1
- package/search/search-api.d.ts +7 -7
- package/sheet/sheet-api.d.ts +41 -9
- package/sheet/sheet-api.js +9 -1
- package/svi-datahub/index.d.ts +218 -173
- package/svi-datahub/package.json +1 -1
- package/svi-sand/index.d.ts +40 -33
- package/svi-sand/package.json +1 -1
- package/tab/tab-api.d.ts +1 -1
- package/theme/theme-api.d.ts +1 -1
- package/theme/theme-api.js +1 -1
- package/time-slider/index.d.ts +15 -0
- package/traversal/traversal-api.d.ts +7 -1
package/control/control-api.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FileChange, SASObjectAttachedFile, SASUploadedFile } from "../file/file-api";
|
|
2
|
-
import { PageMode, PageModel } from "../page-model/page-model-api";
|
|
2
|
+
import { PageEventsApiBase, PageMode, PageModel } from "../page-model/page-model-api";
|
|
3
3
|
import { FieldType, FieldTypeToValue } from "./data-types";
|
|
4
4
|
import { PageDataChange, PageModeChange, StateChange } from "./events";
|
|
5
|
-
import { Control, RefreshablePageControlOptions, SlidingPanelProperties, TypeAttributes } from "./page";
|
|
5
|
+
import { Control, RefreshablePageControlOptions, SlidingPanelContent, SlidingPanelProperties, TypeAttributes } from "./page";
|
|
6
6
|
import { FieldTypeToRestrictions, FileRestrictions } from "./restrictions";
|
|
7
7
|
import { AttachmentFormData } from "./file";
|
|
8
8
|
/**
|
|
@@ -24,7 +24,7 @@ export interface ControlMemberApiBase<ControlTypeAttributes extends TypeAttribut
|
|
|
24
24
|
*/
|
|
25
25
|
export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = any> extends ControlMemberApiBase<ControlTypeAttributes, ControlFieldType> {
|
|
26
26
|
/**
|
|
27
|
-
* Methods related to this control
|
|
27
|
+
* Methods related to this control.
|
|
28
28
|
*/
|
|
29
29
|
readonly control: ControlApi<ControlTypeAttributes, ControlFieldType>;
|
|
30
30
|
/**
|
|
@@ -37,7 +37,7 @@ export interface ControlMemberApi<ControlTypeAttributes extends TypeAttributes =
|
|
|
37
37
|
readonly admin: ControlAdminApi;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
* This Control API pertains functionality that checks the state, registers event handlers and so on.
|
|
40
|
+
* This Control API pertains to functionality that checks the state, registers event handlers, and so on.
|
|
41
41
|
*/
|
|
42
42
|
export interface ControlApiBase<ControlTypeAttributes extends TypeAttributes = TypeAttributes, ControlFieldType extends FieldType = never> {
|
|
43
43
|
/**
|
|
@@ -126,6 +126,11 @@ export interface ControlApi<ControlTypeAttributes extends TypeAttributes = TypeA
|
|
|
126
126
|
* @returns The aria label that should be applied.
|
|
127
127
|
*/
|
|
128
128
|
getAriaLabel: () => string;
|
|
129
|
+
/**
|
|
130
|
+
* Sets the value of the component specific API.
|
|
131
|
+
* @param componentSpecificApi
|
|
132
|
+
*/
|
|
133
|
+
setComponentSpecificApi(componentSpecificApi?: any): void;
|
|
129
134
|
}
|
|
130
135
|
/**
|
|
131
136
|
* Methods and properties related to the state of the control.
|
|
@@ -143,7 +148,7 @@ export interface ControlStateApi {
|
|
|
143
148
|
readonly required: boolean;
|
|
144
149
|
/**
|
|
145
150
|
* Checks if the current controls should allow input.
|
|
146
|
-
* Returns
|
|
151
|
+
* Returns true if the control allows input, otherwise false.
|
|
147
152
|
*/
|
|
148
153
|
readonly allowInput: boolean;
|
|
149
154
|
/**
|
|
@@ -182,7 +187,7 @@ export interface ControlStateApi {
|
|
|
182
187
|
export interface ControlPageFieldApi {
|
|
183
188
|
/**
|
|
184
189
|
* Sets the value of the supplied field.
|
|
185
|
-
* This works only with fields for the current object
|
|
190
|
+
* This works only with fields for the current object with which the control is associated.
|
|
186
191
|
* For example, if the control is on a parent object, you cannot set a child's field.
|
|
187
192
|
* @method
|
|
188
193
|
* @param value {FieldTypeToValue<Type>} New field value.
|
|
@@ -191,7 +196,7 @@ export interface ControlPageFieldApi {
|
|
|
191
196
|
setFieldValue<Type extends FieldType>(value: FieldTypeToValue<Type>, field: string): void;
|
|
192
197
|
/**
|
|
193
198
|
* Returns the value of the supplied field.
|
|
194
|
-
* This works only with fields for the current object
|
|
199
|
+
* This works only with fields for the current object with which the control is associated.
|
|
195
200
|
* For example, if the control is on a parent object, you cannot get a child's field.
|
|
196
201
|
* @method
|
|
197
202
|
* @template {FieldType} File type.
|
|
@@ -229,7 +234,7 @@ export interface ControlPageApiBase {
|
|
|
229
234
|
*/
|
|
230
235
|
readonly isExternalObject: boolean;
|
|
231
236
|
/**
|
|
232
|
-
* Checks if the page is a
|
|
237
|
+
* Checks if the page is a Home page.
|
|
233
238
|
*/
|
|
234
239
|
readonly isHomepage: boolean;
|
|
235
240
|
/**
|
|
@@ -264,6 +269,10 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
264
269
|
* Methods related to the files associated with the page.
|
|
265
270
|
*/
|
|
266
271
|
file: ControlFileApi;
|
|
272
|
+
/**
|
|
273
|
+
* Methods related to the hookable events associated with the page.
|
|
274
|
+
*/
|
|
275
|
+
events: ControlPageEventsApi;
|
|
267
276
|
/**
|
|
268
277
|
* Returns the model of the page in which the calling control resides.
|
|
269
278
|
* @method
|
|
@@ -275,9 +284,9 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
275
284
|
* @method
|
|
276
285
|
* @param handler {function} Function to be invoked on property change.
|
|
277
286
|
* Parameters are (category: string, property: string, currentValue: any, previousValue: any).
|
|
278
|
-
*
|
|
287
|
+
* @returns A function that stops the handler from being invoked.
|
|
279
288
|
*/
|
|
280
|
-
onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): void;
|
|
289
|
+
onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): () => void;
|
|
281
290
|
/**
|
|
282
291
|
* Returns the disabled status of the page toolbar.
|
|
283
292
|
* @method
|
|
@@ -312,25 +321,32 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
312
321
|
* By default, attempts to refresh all controls.
|
|
313
322
|
* Specify categoryToRefresh or controlToRefresh to restrict what is refreshed.
|
|
314
323
|
* @method
|
|
315
|
-
* @param categoryToRefresh {(string|undefined)} Name of the category to be refreshed.
|
|
324
|
+
* @param [categoryToRefresh] {(string|undefined)} Name of the category to be refreshed.
|
|
316
325
|
* @param [controlToRefresh] {Control} Individual control to be refreshed.
|
|
317
326
|
*/
|
|
318
|
-
reloadRefreshableControls(categoryToRefresh
|
|
327
|
+
reloadRefreshableControls(categoryToRefresh?: string, controlToRefresh?: Control): void;
|
|
319
328
|
/**
|
|
320
329
|
* Sets a page to be dirty, that is, when it has been edited and not saved.
|
|
321
330
|
* @method
|
|
322
331
|
*/
|
|
323
332
|
setPageDirty(): void;
|
|
333
|
+
/**
|
|
334
|
+
* Gets the dirty state of the page.
|
|
335
|
+
* @method
|
|
336
|
+
*/
|
|
337
|
+
getPageDirty(): boolean | undefined;
|
|
324
338
|
/**
|
|
325
339
|
* Toggle the page-level sliding panel. This panel should be used to contain information that is
|
|
326
340
|
* supplementary to the document, for example attachments or workflow tasks.
|
|
327
341
|
* @method
|
|
328
|
-
* @param sectionLabel {string} Describes the section, this should be
|
|
329
|
-
* @param
|
|
330
|
-
* @param [panelProperties] {SlidingPanelProperties} Properties
|
|
342
|
+
* @param [sectionLabel] {string} Describes the section, this should be internationalized.
|
|
343
|
+
* @param [content] {SlidingPanelContent} The content of the sliding panel.
|
|
344
|
+
* @param [panelProperties] {SlidingPanelProperties} Properties for the panel.
|
|
345
|
+
* When providing a url for content: the panel properties will be available on the controller's "slidingPanel" object.
|
|
346
|
+
* When providing a selector for content: the properties will be set on the element to be created.
|
|
331
347
|
* @param [onClose] {function} A callback function invoked when the panel is dismissed. There are no parameters. Returns void.
|
|
332
348
|
*/
|
|
333
|
-
toggleSlidingPanel(sectionLabel
|
|
349
|
+
toggleSlidingPanel<T>(sectionLabel?: string, content?: SlidingPanelContent<T>, panelProperties?: SlidingPanelProperties, onClose?: () => void): void;
|
|
334
350
|
/**
|
|
335
351
|
* Checks if a page is in edit mode.
|
|
336
352
|
* @method
|
|
@@ -342,7 +358,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
342
358
|
* If the user has not saved, the user is prompted to do so.
|
|
343
359
|
* @method
|
|
344
360
|
* @param closeTab {boolean} Checks if the tab should close after edit mode is cancelled.
|
|
345
|
-
* @returns A
|
|
361
|
+
* @returns A Promise that resolves when the edit has been cancelled.
|
|
346
362
|
*/
|
|
347
363
|
cancelEdit(closeTab: boolean): Promise<{
|
|
348
364
|
userSaved: boolean;
|
|
@@ -350,18 +366,18 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
350
366
|
/**
|
|
351
367
|
* Sets the page to be in edit mode. Used when clicking the Edit button.
|
|
352
368
|
* @method
|
|
353
|
-
* @returns A
|
|
369
|
+
* @returns A Promise that resolves when the page is put in edit mode.
|
|
354
370
|
*/
|
|
355
371
|
edit(): Promise<any>;
|
|
356
372
|
/**
|
|
357
|
-
* Refreshes the attachments grid to display new attachments when new attachment is uploaded.
|
|
373
|
+
* Refreshes the attachments grid to display new attachments when a new attachment is uploaded.
|
|
358
374
|
* @method
|
|
359
375
|
*/
|
|
360
376
|
refreshAttachments(): void;
|
|
361
377
|
/**
|
|
362
378
|
* Reloads an instance of a page.
|
|
363
379
|
* @method
|
|
364
|
-
* @returns A
|
|
380
|
+
* @returns A Promise that resolves when the page is reloaded.
|
|
365
381
|
*/
|
|
366
382
|
reloadPage(): Promise<void>;
|
|
367
383
|
/**
|
|
@@ -369,7 +385,7 @@ export interface ControlPageApi extends ControlPageApiBase {
|
|
|
369
385
|
* @method
|
|
370
386
|
* @param stopEditing {boolean} Checks if the page should leave edit mode after it is saved.
|
|
371
387
|
* @param closeObject {boolean} Checks if the page should be closed after it is saved.
|
|
372
|
-
* @returns A
|
|
388
|
+
* @returns A Promise which resolves when the page has been saved.
|
|
373
389
|
*/
|
|
374
390
|
save(stopEditing: boolean, closeObject: boolean): Promise<void>;
|
|
375
391
|
}
|
|
@@ -432,7 +448,7 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
432
448
|
*/
|
|
433
449
|
updateFile(updatedFile: SASUploadedFile): Promise<void>;
|
|
434
450
|
/**
|
|
435
|
-
*
|
|
451
|
+
* Creates a file operation to remove a file with a given ID.
|
|
436
452
|
*
|
|
437
453
|
* @method
|
|
438
454
|
* @param {string} id The ID of the file to remove.
|
|
@@ -448,3 +464,9 @@ export interface ControlFileApi extends ControlFileApiBase {
|
|
|
448
464
|
*/
|
|
449
465
|
onChange(handler: (change: FileChange) => void): void;
|
|
450
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Equivalent to {@link PageEventsApiBase} with the exception that event hooks will be scoped to the page on which the calling control resides.
|
|
469
|
+
* @extends PageEventsApiBase
|
|
470
|
+
*/
|
|
471
|
+
export interface ControlPageEventsApi extends PageEventsApiBase {
|
|
472
|
+
}
|
package/control/data-types.d.ts
CHANGED
|
@@ -6,4 +6,9 @@ export interface UserGroup {
|
|
|
6
6
|
type: "user" | "group";
|
|
7
7
|
}
|
|
8
8
|
export declare type FieldTypeToValue<Type extends FieldType> = Type extends "BOOLEAN" ? boolean : Type extends "STRING" | DateDataType | "REFERENCEDATA" ? string : Type extends NumberDataType ? number : Type extends "JSON" ? object : Type extends "USER_GROUP" ? UserGroup[] : never;
|
|
9
|
-
export declare type FieldValue = undefined | string | number | boolean | object | UserGroup;
|
|
9
|
+
export declare type FieldValue = undefined | string | number | boolean | object | UserGroup | Date | ChildObject[] | null;
|
|
10
|
+
export declare type ChildObject = {
|
|
11
|
+
id?: string;
|
|
12
|
+
isNew?: boolean;
|
|
13
|
+
fieldValues: Record<string, FieldValue>;
|
|
14
|
+
};
|
package/control/page.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Type } from "@angular/core";
|
|
1
2
|
export declare const enum PageModeEvent {
|
|
2
3
|
CREATE = "create",
|
|
3
4
|
EDIT = "edit",
|
|
@@ -49,6 +50,19 @@ export interface GlobalControlStates {
|
|
|
49
50
|
export interface SlidingPanelProperties {
|
|
50
51
|
[property: string]: any;
|
|
51
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Represents the content of a sliding panel.
|
|
55
|
+
*/
|
|
56
|
+
export interface SlidingPanelContent<T> {
|
|
57
|
+
/**
|
|
58
|
+
* The name of a custom element to be created in the content pane.
|
|
59
|
+
*/
|
|
60
|
+
customElementName?: string;
|
|
61
|
+
/**
|
|
62
|
+
* An Angular component to be included in the content pane.
|
|
63
|
+
*/
|
|
64
|
+
instanceClass?: Type<T>;
|
|
65
|
+
}
|
|
52
66
|
export interface RefreshablePageControlOptions {
|
|
53
67
|
refreshCategory?: string;
|
|
54
68
|
requiresIndex?: boolean;
|
|
@@ -10,7 +10,8 @@ export interface ToolbarPropertyApi {
|
|
|
10
10
|
* Registers a function to be invoked whenever one of the calling toolbar control's properties change.
|
|
11
11
|
* @method
|
|
12
12
|
* @param handler The function to be invoked.
|
|
13
|
+
* @returns A function that stops the handler from being invoked.
|
|
13
14
|
*/
|
|
14
|
-
onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): void;
|
|
15
|
+
onPropertyChange(handler: (category: string, property: string, currentValue: any, previousValue: any) => void): () => void;
|
|
15
16
|
};
|
|
16
17
|
}
|
package/event/event-api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare enum PageEvents {
|
|
|
8
8
|
ModeChangeEvent = "spb::page-mode-change",
|
|
9
9
|
ModelChangeEvent = "spb::page-model-change",
|
|
10
10
|
PanelOpenEvent = "spb::sliding-panel-open",
|
|
11
|
+
RefreshAttachmentsGrid = "spb::refreshAttachmentsGrid",
|
|
11
12
|
RefreshPageEvent = "spb::refreshPage",
|
|
12
13
|
SelectAttachmentEvent = "spb::Highlighting:SelectAttachment",
|
|
13
14
|
SelectChildObjectEvent = "spb::Highlighting:SelectChildObject",
|
package/event/event-api.js
CHANGED
|
@@ -9,6 +9,7 @@ export var PageEvents;
|
|
|
9
9
|
PageEvents["ModeChangeEvent"] = "spb::page-mode-change";
|
|
10
10
|
PageEvents["ModelChangeEvent"] = "spb::page-model-change";
|
|
11
11
|
PageEvents["PanelOpenEvent"] = "spb::sliding-panel-open";
|
|
12
|
+
PageEvents["RefreshAttachmentsGrid"] = "spb::refreshAttachmentsGrid";
|
|
12
13
|
PageEvents["RefreshPageEvent"] = "spb::refreshPage";
|
|
13
14
|
PageEvents["SelectAttachmentEvent"] = "spb::Highlighting:SelectAttachment";
|
|
14
15
|
PageEvents["SelectChildObjectEvent"] = "spb::Highlighting:SelectChildObject";
|
package/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { TabApi } from "./tab/tab-api";
|
|
|
21
21
|
import { ThemeApi } from "./theme/theme-api";
|
|
22
22
|
import { TraversalApi } from "./traversal/traversal-api";
|
|
23
23
|
/**
|
|
24
|
-
* Common API Functions
|
|
24
|
+
* Common API Functions.
|
|
25
25
|
*/
|
|
26
26
|
export interface SviCommonApi {
|
|
27
27
|
component: ComponentApi;
|
|
@@ -52,7 +52,7 @@ export interface SviClientApi extends SviCommonApi {
|
|
|
52
52
|
tab: TabApi;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* The Admin API
|
|
55
|
+
* The Admin API.
|
|
56
56
|
*/
|
|
57
57
|
export interface SviAdminApi extends SviCommonApi {
|
|
58
58
|
metadata: AdminMetadataApi;
|
|
@@ -24,6 +24,7 @@ export interface SandDataObject extends DataObject {
|
|
|
24
24
|
attachmentsIndexedForSearch?: boolean;
|
|
25
25
|
resolvedEntity?: boolean;
|
|
26
26
|
indexedForSearch?: boolean;
|
|
27
|
+
requireSearchBeforeCreate?: boolean;
|
|
27
28
|
}
|
|
28
29
|
export interface DataObject extends PersistableObject {
|
|
29
30
|
name: string;
|
|
@@ -135,16 +136,16 @@ export interface ReferenceDataOptions {
|
|
|
135
136
|
export interface MetadataApi {
|
|
136
137
|
/**
|
|
137
138
|
* @method
|
|
138
|
-
* @description Gets create, read and update access rights for an entity.
|
|
139
|
+
* @description Gets create, read, and update access rights for an entity.
|
|
139
140
|
* @param objectType {string} Entity name.
|
|
140
|
-
* @returns Object with a
|
|
141
|
+
* @returns Object with a Promise of type boolean for each rule.
|
|
141
142
|
*/
|
|
142
143
|
getEntityAccessRules(objectType: string): EntityAccessRules;
|
|
143
144
|
/**
|
|
144
145
|
* @method
|
|
145
146
|
* @description Checks access rights and gets metadata for an entity. Returns undefined if the entity does not exist.
|
|
146
147
|
* @param objectType {string} Entity name.
|
|
147
|
-
* @returns A
|
|
148
|
+
* @returns A Promise containing the entity metadata.
|
|
148
149
|
*/
|
|
149
150
|
getEntity(objectType: string): Promise<StoredObjectDTO | undefined>;
|
|
150
151
|
/**
|
|
@@ -152,26 +153,26 @@ export interface MetadataApi {
|
|
|
152
153
|
* @description Gets metadata for an entity field.
|
|
153
154
|
* @param objectType {string} Entity name.
|
|
154
155
|
* @param fieldName {string} Field name.
|
|
155
|
-
* @returns A
|
|
156
|
+
* @returns A Promise containing the field metadata.
|
|
156
157
|
*/
|
|
157
158
|
getField(objectType: string, fieldName: string): Promise<CoreStoredObjectField>;
|
|
158
159
|
/**
|
|
159
160
|
* @method
|
|
160
161
|
* @description Gets managed entity types.
|
|
161
|
-
* @returns A
|
|
162
|
+
* @returns A Promise containing an array of managed entity types.
|
|
162
163
|
*/
|
|
163
164
|
getManagedEntityTypes(): Promise<StoredObjectDTO[]>;
|
|
164
165
|
/**
|
|
165
166
|
* @method
|
|
166
167
|
* @description Gets root type entities that are not child types.
|
|
167
|
-
* @returns A
|
|
168
|
+
* @returns A Promise containing an array of root types.
|
|
168
169
|
*/
|
|
169
170
|
getRootTypes(): Promise<StoredObjectDTO[]>;
|
|
170
171
|
/**
|
|
171
172
|
* @method
|
|
172
173
|
* @description Gets child entity types for a given entity.
|
|
173
174
|
* @param objectType {string} Checks for children for the named entity.
|
|
174
|
-
* @returns A
|
|
175
|
+
* @returns A Promise containing an array of child entity types or an empty list if none are found.
|
|
175
176
|
*/
|
|
176
177
|
getChildEntityTypes(objectType: string): Promise<StoredObjectDTO[]>;
|
|
177
178
|
/**
|
|
@@ -188,15 +189,15 @@ export interface MetadataApi {
|
|
|
188
189
|
getAllValidRelationshipTypes(objectType: string, relationshipObjectType?: string, relationshipName?: string): Promise<ValidRelationshipTypes>;
|
|
189
190
|
/**
|
|
190
191
|
* @method
|
|
191
|
-
* @description Gets metadata for all resolved entities
|
|
192
|
-
* @returns A
|
|
192
|
+
* @description Gets metadata for all resolved entities.
|
|
193
|
+
* @returns A Promise containing an array of the resolved entities metadata.
|
|
193
194
|
*/
|
|
194
195
|
getResolvedEntities(): Promise<Entity[]>;
|
|
195
196
|
/**
|
|
196
197
|
* @method
|
|
197
198
|
* @description Gets metadata for a resolved entity.
|
|
198
199
|
* @param objectType {string} Resolved Entity Name.
|
|
199
|
-
* @returns A
|
|
200
|
+
* @returns A Promise containing resolved entity metadata or undefined if none exists.
|
|
200
201
|
*/
|
|
201
202
|
getResolvedEntityMetadata(objectType: string): Promise<Entity | undefined>;
|
|
202
203
|
/**
|
|
@@ -208,9 +209,11 @@ export interface MetadataApi {
|
|
|
208
209
|
*/
|
|
209
210
|
getIconForEntity(objectType: string, iconType?: string): string | undefined;
|
|
210
211
|
/**
|
|
212
|
+
* @deprecated Use `getRootTypes()` and `getResolvedEntities()` instead.
|
|
213
|
+
*
|
|
211
214
|
* @method
|
|
212
|
-
* @description Gets metadata for both entities and resolved entities
|
|
213
|
-
* @returns A
|
|
215
|
+
* @description Gets metadata for both entities and resolved entities.
|
|
216
|
+
* @returns A Promise resolving to Search entity metadata.
|
|
214
217
|
*/
|
|
215
218
|
getSearchMetadata(): Promise<EntityMetadata>;
|
|
216
219
|
/**
|
package/object/object-api.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Relationship, StoredObjectFieldDTO } from "../svi-datahub";
|
|
1
|
+
import { Relationship, StoredObjectFieldDTO, Comment } from "../svi-datahub";
|
|
2
2
|
import { FileOperation } from "../file/file-api";
|
|
3
3
|
import { PageModel } from "../page-model/page-model-api";
|
|
4
4
|
import { ClientSheet, Sheet } from "../sheet/sheet-api";
|
|
@@ -16,11 +16,11 @@ export interface FormatObjectFieldsOptions {
|
|
|
16
16
|
skipFormatUserGroups?: boolean;
|
|
17
17
|
skipFormatBooleans?: boolean;
|
|
18
18
|
/**
|
|
19
|
-
* A function that will be the last thing called in order to format the object's field values
|
|
20
|
-
* @param fieldValue the current value of the field being formatted
|
|
21
|
-
* @param fieldName the name of the field currently being formatted
|
|
22
|
-
* @param objectFields all of the available fields in the object
|
|
23
|
-
* @param fieldMetadata the current field's metadata
|
|
19
|
+
* A function that will be the last thing called in order to format the object's field values.
|
|
20
|
+
* @param fieldValue the current value of the field being formatted.
|
|
21
|
+
* @param fieldName the name of the field currently being formatted.
|
|
22
|
+
* @param objectFields all of the available fields in the object.
|
|
23
|
+
* @param fieldMetadata the current field's metadata.
|
|
24
24
|
*/
|
|
25
25
|
formatCallback?: (fieldValue: string | number | Date | PageData[], fieldName: string, objectFields: FieldValues, fieldMetadata: StoredObjectFieldDTO) => void;
|
|
26
26
|
}
|
|
@@ -69,7 +69,7 @@ export interface ObjectApi {
|
|
|
69
69
|
* @param objectId {string} Gets the child objects relating to the object ID.
|
|
70
70
|
* @param childObjectType {string} Child object type.
|
|
71
71
|
* @param [maxResponses = 25] {number} Maximum number of child objects to be returned.
|
|
72
|
-
* @return A
|
|
72
|
+
* @return A Promise that resolves to an array of objects, that are child objects of the specified object.
|
|
73
73
|
*/
|
|
74
74
|
getChildObjects(objectType: string, objectId: string, childObjectType: string, maxResponses?: number): Promise<VIObject[]>;
|
|
75
75
|
/**
|
|
@@ -77,36 +77,36 @@ export interface ObjectApi {
|
|
|
77
77
|
* @description Updates an existing object with the provided data.
|
|
78
78
|
* @param objectType {string} Object type.
|
|
79
79
|
* @param objectId {string} Object ID.
|
|
80
|
-
* @param objectTypeId {
|
|
80
|
+
* @param objectTypeId {number} Object type ID.
|
|
81
81
|
* @param objectTypeVersion {number} Object type version.
|
|
82
82
|
* @param fieldValues {FieldValues} Field values of the object.
|
|
83
83
|
* @param [options] {UpdateObjectOptions} Optional extra parameters.
|
|
84
|
-
* @return A
|
|
84
|
+
* @return A Promise that resolves to the updated object when the object has successfully been updated.
|
|
85
85
|
*/
|
|
86
|
-
updateObject(objectType: string, objectId: string, objectTypeId:
|
|
86
|
+
updateObject(objectType: string, objectId: string, objectTypeId: number, objectTypeVersion: number, fieldValues: FieldValues, options?: UpdateObjectOptions): Promise<VIObject>;
|
|
87
87
|
/**
|
|
88
88
|
* @method
|
|
89
89
|
* @description Deletes an object.
|
|
90
90
|
* @param objectType {string} Object type.
|
|
91
91
|
* @param objectId {string} Object ID.
|
|
92
|
-
* @return A
|
|
92
|
+
* @return A Promise that resolves to void when the specified object is successfully deleted.
|
|
93
93
|
*/
|
|
94
94
|
deleteObject(objectType: string, objectId: string): Promise<void>;
|
|
95
95
|
/**
|
|
96
96
|
* @method
|
|
97
97
|
* @description Creates an object.
|
|
98
98
|
* @param objectType {string} Object type.
|
|
99
|
-
* @param objectTypeId {
|
|
99
|
+
* @param objectTypeId {number} Object type ID.
|
|
100
100
|
* @param fieldValues {FieldValues} Field values of the object.
|
|
101
101
|
* @param [options] {CreateObjectOptions} Optional extra parameters.
|
|
102
|
-
* @return A
|
|
102
|
+
* @return A Promise that resolves to the created object when the object has successfully been created.
|
|
103
103
|
*/
|
|
104
|
-
createObject(objectType: string, objectTypeId:
|
|
104
|
+
createObject(objectType: string, objectTypeId: number, fieldValues: FieldValues, options?: CreateObjectOptions): Promise<VIObject>;
|
|
105
105
|
/**
|
|
106
106
|
* @method
|
|
107
107
|
* @description Gets relationship via the relationship ID.
|
|
108
108
|
* @param relationshipId {string} Relationship ID.
|
|
109
|
-
* @return A
|
|
109
|
+
* @return A Promise that resolves to a relationship.
|
|
110
110
|
*/
|
|
111
111
|
getObjectRelationship(relationshipId: string): Promise<ObjectRelationship>;
|
|
112
112
|
/**
|
|
@@ -114,14 +114,14 @@ export interface ObjectApi {
|
|
|
114
114
|
* @description Updates an existing relationship in SAS Visual Investigator.
|
|
115
115
|
* @param relationshipId {string} Relationship ID.
|
|
116
116
|
* @param payload {any} HTTP request content.
|
|
117
|
-
* @return A
|
|
117
|
+
* @return A Promise that resolves to a relationship.
|
|
118
118
|
*/
|
|
119
119
|
updateObjectRelationship(relationshipId: string, payload: any): Promise<ObjectRelationship>;
|
|
120
120
|
/**
|
|
121
121
|
* @method
|
|
122
122
|
* @description Deletes relationship with the specified ID.
|
|
123
123
|
* @param relationshipId {string} Relationship ID.
|
|
124
|
-
* @return A
|
|
124
|
+
* @return A Promise that resolves to void when the object is successfully deleted.
|
|
125
125
|
*/
|
|
126
126
|
deleteObjectRelationship(relationshipId: string): Promise<void>;
|
|
127
127
|
/**
|
|
@@ -130,7 +130,7 @@ export interface ObjectApi {
|
|
|
130
130
|
* @param from {VIObject} Object that relationship is from.
|
|
131
131
|
* @param to {VIObject} Object that relationship is to.
|
|
132
132
|
* @param relationship {ObjectRelationship} The relationship.
|
|
133
|
-
* @return A
|
|
133
|
+
* @return A Promise that resolves to an object.
|
|
134
134
|
*/
|
|
135
135
|
relateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
|
|
136
136
|
/**
|
|
@@ -147,7 +147,7 @@ export interface ObjectApi {
|
|
|
147
147
|
* @param from {VIObject} Object that the relationship is from.
|
|
148
148
|
* @param to {VIObject} Object that the relationship is to.
|
|
149
149
|
* @param relationship {ObjectRelationship} The relationship.
|
|
150
|
-
* @return A
|
|
150
|
+
* @return A Promise that resolves to a newly created relationship.
|
|
151
151
|
*/
|
|
152
152
|
createAndRelateObject(from: VIObject, to: VIObject, relationship: ObjectRelationship): Promise<ObjectRelationship>;
|
|
153
153
|
/**
|
|
@@ -156,7 +156,7 @@ export interface ObjectApi {
|
|
|
156
156
|
* @param objects {VIObject[]} Array of objects.
|
|
157
157
|
* @param objectType {string} Type of the objects in the array.
|
|
158
158
|
* @param [options] {FormatObjectFieldsOptions} Optional parameters to control the formatting. By default, nothing is skipped and there is no formatCallback.
|
|
159
|
-
* @return A
|
|
159
|
+
* @return A Promise that resolves to the formatted array of objects.
|
|
160
160
|
*/
|
|
161
161
|
formatObjectFieldsForDisplay(objects: VIObject[], objectType: string, options?: FormatObjectFieldsOptions): Promise<VIObject[]>;
|
|
162
162
|
/**
|
|
@@ -165,7 +165,7 @@ export interface ObjectApi {
|
|
|
165
165
|
* @param attachmentModel {AttachmentModel} Attachment model.
|
|
166
166
|
* @param objectType {string} Object type.
|
|
167
167
|
* @param objectId {string} Object ID.
|
|
168
|
-
* @return A
|
|
168
|
+
* @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
|
|
169
169
|
*/
|
|
170
170
|
uploadAttachment(attachmentModel: AttachmentModel, objectType: string, objectId: string): Promise<FileAssociationResponse>;
|
|
171
171
|
/**
|
|
@@ -174,21 +174,21 @@ export interface ObjectApi {
|
|
|
174
174
|
* @param objectType {string} Object type.
|
|
175
175
|
* @param objectId {string} Object ID.
|
|
176
176
|
* @param attachmentId {string} Attachment ID.
|
|
177
|
-
* @return A
|
|
177
|
+
* @return A Promise that resolves to an empty HttpResponse when the attachment is successfully deleted.
|
|
178
178
|
*/
|
|
179
179
|
deleteAttachment(objectType: string, objectId: string, attachmentId: string): Promise<void>;
|
|
180
180
|
/**
|
|
181
181
|
* @method
|
|
182
182
|
* @description Gets an attachment of the associated object.
|
|
183
|
-
* @param objectId {string} Object ID
|
|
183
|
+
* @param objectId {string} Object ID.
|
|
184
184
|
* @param objectType {string} Object type.
|
|
185
185
|
* @param attachmentId {string} Attachment ID.
|
|
186
|
-
* @return A
|
|
186
|
+
* @return A Promise that resolves to a HttpResponse with a FileAssociationResponse as the data.
|
|
187
187
|
*/
|
|
188
188
|
getAttachment(objectType: string, objectId: string, attachmentId: string): Promise<FileAssociationResponse>;
|
|
189
189
|
/**
|
|
190
190
|
* @method
|
|
191
|
-
* @description Validates the fields, controls and file categories of a child object.
|
|
191
|
+
* @description Validates the fields, controls, and file categories of a child object.
|
|
192
192
|
* @param pageModel {PageModel} Page model.
|
|
193
193
|
* @param childObject {StoredObjectMetadata} Child object metadata.
|
|
194
194
|
* @return An observable that resolves to an array of validation results.
|
|
@@ -219,10 +219,11 @@ export interface VIObject {
|
|
|
219
219
|
createdAt: string;
|
|
220
220
|
displayLabel?: string;
|
|
221
221
|
lastUpdatedAt: string;
|
|
222
|
-
objectTypeId:
|
|
222
|
+
objectTypeId: number;
|
|
223
223
|
objectTypeName: string;
|
|
224
224
|
sheets?: Sheet[];
|
|
225
225
|
id: string;
|
|
226
|
+
title?: string;
|
|
226
227
|
}
|
|
227
228
|
export interface ValidationResult {
|
|
228
229
|
isValid: boolean;
|
|
@@ -441,10 +442,10 @@ export interface ObjectRelationship {
|
|
|
441
442
|
qualifiedTypeName?: string;
|
|
442
443
|
}
|
|
443
444
|
export interface AttachmentRow {
|
|
444
|
-
description
|
|
445
|
+
description?: string;
|
|
445
446
|
location: string;
|
|
446
447
|
id: string;
|
|
447
|
-
uploadedBy
|
|
448
|
+
uploadedBy?: string;
|
|
448
449
|
name: string;
|
|
449
450
|
size: number;
|
|
450
451
|
type: string;
|
|
@@ -488,18 +489,6 @@ export interface FileAssociationResponse {
|
|
|
488
489
|
displayOrder?: number;
|
|
489
490
|
links?: RestRepresentationsLink[];
|
|
490
491
|
}
|
|
491
|
-
export interface Comment {
|
|
492
|
-
category: string;
|
|
493
|
-
createDate: string;
|
|
494
|
-
detail: string;
|
|
495
|
-
id: number;
|
|
496
|
-
lastUpdatedBy: string;
|
|
497
|
-
lastUpdatedAt: string;
|
|
498
|
-
author: {
|
|
499
|
-
id: string;
|
|
500
|
-
name: string;
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
492
|
export interface DisplayTextFields {
|
|
504
493
|
name: string;
|
|
505
494
|
displayIndex: number;
|
package/package.json
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sassoftware/vi-api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.7.1",
|
|
4
|
+
"description": "Types used in the SAS Visual Investigator API",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"SAS",
|
|
7
|
+
"VI",
|
|
8
|
+
"Visual Investigator",
|
|
9
|
+
"solution",
|
|
10
|
+
"extension",
|
|
11
|
+
"angular",
|
|
12
|
+
"API",
|
|
13
|
+
"types"
|
|
14
|
+
],
|
|
15
|
+
"homepage": "https://github.com/sassoftware/vi-solution-extensions",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/sassoftware/vi-solution-extensions/issues"
|
|
18
|
+
},
|
|
19
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/sassoftware/vi-solution-extensions"
|
|
23
|
+
},
|
|
4
24
|
"files": [
|
|
5
25
|
"**/*.d.ts",
|
|
6
|
-
"**/*.js"
|
|
26
|
+
"**/*.js",
|
|
27
|
+
"**/package.json",
|
|
28
|
+
"./README.md",
|
|
29
|
+
"./LICENSE.txt"
|
|
7
30
|
],
|
|
8
31
|
"main": "public-api.js",
|
|
9
32
|
"types": "public-api.d.ts",
|
|
@@ -17,8 +17,8 @@ export interface PageAdminApi {
|
|
|
17
17
|
* @method
|
|
18
18
|
* @description Registers a page designer configuration.
|
|
19
19
|
* @param name {string} A unique name for the configuration.
|
|
20
|
-
* @param applicationType {ApplicationType} The name of the app type used for this page. Must be a valid datahub client application (for example, desktop
|
|
21
|
-
* @param templateType {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, home
|
|
20
|
+
* @param applicationType {ApplicationType} The name of the app type used for this page. Must be a valid datahub client application (for example, "desktop" or "mobile").
|
|
21
|
+
* @param templateType {TemplateType} The name of the template type used for this page. Must be a valid datahub template type (for example, "home" or "page").
|
|
22
22
|
* @param controlGroups {Control[]} The control categories that are displayed in the designer's left hand side toolbox. Must be valid control categories.
|
|
23
23
|
* @param canvasCssClass {string} A CSS class that is applied to the canvas in the designer.
|
|
24
24
|
* @param previewCssClass {string} A CSS class that is applied to the preview (for example, template list).
|