bruce-models 7.1.99 → 7.1.101
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/dist/bruce-models.es5.js +146 -15
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +146 -15
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account-concept.js +4 -0
- package/dist/lib/account/account-concept.js.map +1 -1
- package/dist/lib/api/abstract-api.js +1 -1
- package/dist/lib/api/abstract-api.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/export/export-nsx.js +89 -2
- package/dist/lib/export/export-nsx.js.map +1 -1
- package/dist/lib/project/menu-item.js.map +1 -1
- package/dist/lib/server/pending-action.js +17 -3
- package/dist/lib/server/pending-action.js.map +1 -1
- package/dist/lib/server/record-change-feed.js +34 -8
- package/dist/lib/server/record-change-feed.js.map +1 -1
- package/dist/types/account/account-concept.d.ts +5 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/export/export-nsx.d.ts +88 -0
- package/dist/types/project/menu-item.d.ts +3 -0
- package/dist/types/server/pending-action.d.ts +14 -6
- package/dist/types/server/record-change-feed.d.ts +14 -3
- package/package.json +1 -1
|
@@ -9,14 +9,14 @@ export declare namespace PendingAction {
|
|
|
9
9
|
/**
|
|
10
10
|
* Describes a pending action record.
|
|
11
11
|
*/
|
|
12
|
-
interface IAction {
|
|
12
|
+
interface IAction<TResult = string> {
|
|
13
13
|
ID: number;
|
|
14
14
|
"CreatedBy.Application": string;
|
|
15
15
|
"Created"?: string;
|
|
16
16
|
"Updated"?: string;
|
|
17
17
|
"Completed"?: string;
|
|
18
18
|
"CreatedByUser.ID": string;
|
|
19
|
-
Result:
|
|
19
|
+
Result: TResult;
|
|
20
20
|
Progress: number;
|
|
21
21
|
Description: string;
|
|
22
22
|
Status: EStatus;
|
|
@@ -30,6 +30,12 @@ export declare namespace PendingAction {
|
|
|
30
30
|
Complete = "COMPLETE",
|
|
31
31
|
Failed = "FAILED"
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Available server-side Pending Action result encodings.
|
|
35
|
+
*/
|
|
36
|
+
enum EResultFormat {
|
|
37
|
+
JSON = "JSON"
|
|
38
|
+
}
|
|
33
39
|
/**
|
|
34
40
|
* Describes a pending action message record.
|
|
35
41
|
*/
|
|
@@ -55,12 +61,13 @@ export declare namespace PendingAction {
|
|
|
55
61
|
* @param params
|
|
56
62
|
* @returns
|
|
57
63
|
*/
|
|
58
|
-
function Get(params: {
|
|
64
|
+
function Get<TResult = string>(params: {
|
|
59
65
|
api?: BruceApi.Api;
|
|
60
66
|
actionId: number;
|
|
67
|
+
result?: EResultFormat;
|
|
61
68
|
req?: Api.IReqParams;
|
|
62
69
|
}): Promise<{
|
|
63
|
-
action: IAction
|
|
70
|
+
action: IAction<TResult>;
|
|
64
71
|
}>;
|
|
65
72
|
/**
|
|
66
73
|
* Returns a list of pending action records by their IDs.
|
|
@@ -134,15 +141,16 @@ export declare namespace PendingAction {
|
|
|
134
141
|
* });
|
|
135
142
|
* // Action will resolve as null if it was disposed early.
|
|
136
143
|
*/
|
|
137
|
-
function OnCompletion(params: {
|
|
144
|
+
function OnCompletion<TResult = string>(params: {
|
|
138
145
|
api?: BruceApi.Api;
|
|
139
146
|
actionId: number;
|
|
140
147
|
interval?: number;
|
|
141
148
|
isDisposed?: () => boolean;
|
|
142
149
|
onMessage?: (message: IMessage) => void;
|
|
150
|
+
result?: EResultFormat;
|
|
143
151
|
req?: Api.IReqParams;
|
|
144
152
|
}): Promise<{
|
|
145
|
-
action: IAction | null;
|
|
153
|
+
action: IAction<TResult> | null;
|
|
146
154
|
messages: IMessage[];
|
|
147
155
|
}>;
|
|
148
156
|
}
|
|
@@ -35,11 +35,22 @@ export declare namespace RecordChangeFeed {
|
|
|
35
35
|
*/
|
|
36
36
|
const parseEvent: (message: MessageBroker.IMessage) => IEvent | null;
|
|
37
37
|
/**
|
|
38
|
-
* Returns true if the given
|
|
38
|
+
* Returns true if the given internal ID falls within the reported range string.
|
|
39
|
+
*
|
|
40
|
+
* Every concept whose records carry a numeric identity reports them this way, as runs rather than
|
|
41
|
+
* as one ID per record, so that a change touching thousands of rows is still a short message.
|
|
39
42
|
*
|
|
40
43
|
* @example
|
|
41
|
-
*
|
|
42
|
-
*
|
|
44
|
+
* isInternalIdInRangeString("100-200,305,400-450", 150) // true
|
|
45
|
+
* isInternalIdInRangeString("100-200,305,400-450", 301) // false
|
|
46
|
+
*/
|
|
47
|
+
const isInternalIdInRangeString: (rangeString: string | null | undefined, internalId: number) => boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Returns true if the given Entity internal ID falls within the reported range string.
|
|
50
|
+
*
|
|
51
|
+
* The Entity-named form of {@link isInternalIdInRangeString}, kept because it is what the Entity
|
|
52
|
+
* callers already read as. Ranges are not an Entity idea: a Workflow Item reports its own IDs the
|
|
53
|
+
* same way.
|
|
43
54
|
*/
|
|
44
55
|
const isEntityInternalIdInRangeString: (rangeString: string | null | undefined, entityInternalId: number) => boolean;
|
|
45
56
|
/**
|