@halix/action-sdk 1.0.8 → 1.0.10
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/lib/cjs/index.js +35 -8
- package/lib/cjs/types/index.d.ts +76 -5
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/index.mjs +107 -51
- package/lib/esm/types/index.d.ts +76 -6
- package/package.json +1 -1
- package/lib/esm/types/index.d.ts.map +0 -1
package/lib/cjs/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.
|
|
23
|
+
exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.getAuthToken = void 0;
|
|
24
24
|
exports.getRelatedObjects = getRelatedObjects;
|
|
25
25
|
exports.getRelatedObjectsAsObservable = getRelatedObjectsAsObservable;
|
|
26
26
|
exports.getObject = getObject;
|
|
@@ -33,6 +33,7 @@ exports.getValueFromObject = getValueFromObject;
|
|
|
33
33
|
exports.prepareSuccessResponse = prepareSuccessResponse;
|
|
34
34
|
exports.prepareErrorResponse = prepareErrorResponse;
|
|
35
35
|
exports.initialize = initialize;
|
|
36
|
+
exports.initializeFromCustomElement = initializeFromCustomElement;
|
|
36
37
|
/**
|
|
37
38
|
* @module @halix/action-sdk
|
|
38
39
|
* @description Halix Platform action SDK for developing NodeJS Lambda-based actions on the Halix
|
|
@@ -79,9 +80,10 @@ function getRelatedObjects(parentElementId, parentKey, elementId, filter, fetche
|
|
|
79
80
|
params = new URLSearchParams(p);
|
|
80
81
|
}
|
|
81
82
|
let url = `${exports.serviceAddress}/schema/sandboxes/${exports.sandboxKey}/${parentElementId}/${parentKey}/${elementId}`;
|
|
82
|
-
|
|
83
|
+
let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
|
|
84
|
+
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
83
85
|
let response = yield axios_1.default.get(url, {
|
|
84
|
-
headers: { "Authorization": `Bearer ${
|
|
86
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
85
87
|
params: params,
|
|
86
88
|
});
|
|
87
89
|
return response.data;
|
|
@@ -133,9 +135,10 @@ function getObject(dataElementId, key, fetchedRelationships) {
|
|
|
133
135
|
params = new URLSearchParams(p);
|
|
134
136
|
}
|
|
135
137
|
let url = `${exports.serviceAddress}/schema/sandboxes/${exports.sandboxKey}/${dataElementId}/${key}`;
|
|
136
|
-
|
|
138
|
+
let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
|
|
139
|
+
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
137
140
|
let response = yield axios_1.default.get(url, {
|
|
138
|
-
headers: { "Authorization": `Bearer ${
|
|
141
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
139
142
|
params: params,
|
|
140
143
|
});
|
|
141
144
|
return response.data;
|
|
@@ -179,9 +182,10 @@ function saveRelatedObject(parentElementId, parentKey, elementId, objectToSave,
|
|
|
179
182
|
else {
|
|
180
183
|
url += "?bypassValidation=true";
|
|
181
184
|
}
|
|
182
|
-
|
|
185
|
+
let authToken = yield (0, rxjs_1.lastValueFrom)((0, exports.getAuthToken)());
|
|
186
|
+
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
183
187
|
let response = yield axios_1.default.post(url, objectToSave, {
|
|
184
|
-
headers: { "Authorization": `Bearer ${
|
|
188
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
185
189
|
});
|
|
186
190
|
return response.data;
|
|
187
191
|
});
|
|
@@ -355,6 +359,29 @@ function initialize(event) {
|
|
|
355
359
|
exports.useBody = true;
|
|
356
360
|
}
|
|
357
361
|
if (body) {
|
|
358
|
-
({
|
|
362
|
+
({ sandboxKey: exports.sandboxKey, serviceAddress: exports.serviceAddress, actionSubject: exports.actionSubject, userContext: exports.userContext, params: exports.params } = body);
|
|
363
|
+
exports.getAuthToken = () => (0, rxjs_1.of)(body.authToken);
|
|
359
364
|
}
|
|
360
365
|
}
|
|
366
|
+
/**
|
|
367
|
+
* initializeFromCustomElement initializes the SDK from a custom element context. This should be called
|
|
368
|
+
* at the beginning of the action handler to set up the SDK with incoming information, including context
|
|
369
|
+
* information, input parameters, and authentication information needed to make API requests to the Halix service.
|
|
370
|
+
*
|
|
371
|
+
* @param context - The custom element context
|
|
372
|
+
*/
|
|
373
|
+
function initializeFromCustomElement(context) {
|
|
374
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
375
|
+
exports.sandboxKey = (_b = (_a = context.session) === null || _a === void 0 ? void 0 : _a.sandbox) === null || _b === void 0 ? void 0 : _b.objKey;
|
|
376
|
+
exports.serviceAddress = context.serviceAddress;
|
|
377
|
+
exports.actionSubject = context.pageContext;
|
|
378
|
+
exports.userContext = {
|
|
379
|
+
user: (_c = context.session) === null || _c === void 0 ? void 0 : _c.user,
|
|
380
|
+
userProxy: (_d = context.session) === null || _d === void 0 ? void 0 : _d.userProxy,
|
|
381
|
+
orgProxy: (_e = context.session) === null || _e === void 0 ? void 0 : _e.organizationProxy,
|
|
382
|
+
orgProxyKey: (_f = context.session) === null || _f === void 0 ? void 0 : _f.organizationProxyKey,
|
|
383
|
+
orgKey: (_g = context.session) === null || _g === void 0 ? void 0 : _g.organizationKey,
|
|
384
|
+
userProxyKey: (_j = (_h = context.session) === null || _h === void 0 ? void 0 : _h.userProxy) === null || _j === void 0 ? void 0 : _j.objKey,
|
|
385
|
+
};
|
|
386
|
+
exports.getAuthToken = () => context.authTokenRetriever();
|
|
387
|
+
}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
2
2
|
/**
|
|
3
3
|
* authToken contains the authentication token that the action handler can use to make API requests
|
|
4
4
|
* to Halix web services. This value is set upon calling the initialize function with incoming event
|
|
5
5
|
* data.
|
|
6
6
|
*/
|
|
7
|
-
export declare let
|
|
7
|
+
export declare let getAuthToken: () => Observable<string>;
|
|
8
8
|
/**
|
|
9
9
|
* sandboxKey contains the sandbox key identifier; identifies the sandbox that the action handler is
|
|
10
10
|
* running in. The sandbox identifies the current solution. This value is set upon calling the
|
|
@@ -28,12 +28,19 @@ export declare let serviceAddress: string;
|
|
|
28
28
|
* - for calculatedFieldActions, the action subject is the object containing the calculated field
|
|
29
29
|
* - for singleValueActions, the action subject may differ depending on the caller
|
|
30
30
|
*/
|
|
31
|
-
export declare let actionSubject:
|
|
31
|
+
export declare let actionSubject: any;
|
|
32
32
|
/**
|
|
33
33
|
* userContext contains the user context information for the user that is executing the action.
|
|
34
34
|
* This value is set upon calling the initialize function with incoming event data.
|
|
35
35
|
*/
|
|
36
|
-
export declare let userContext:
|
|
36
|
+
export declare let userContext: {
|
|
37
|
+
user: any;
|
|
38
|
+
userProxy: any;
|
|
39
|
+
orgProxy: any;
|
|
40
|
+
orgProxyKey: string;
|
|
41
|
+
orgKey: string;
|
|
42
|
+
userProxyKey: string;
|
|
43
|
+
};
|
|
37
44
|
/**
|
|
38
45
|
* params contains the parameters passed to the action. If an input dialog is used, params will
|
|
39
46
|
* contain the values entered in the dialog. This value is set upon calling the initialize
|
|
@@ -42,7 +49,7 @@ export declare let userContext: string;
|
|
|
42
49
|
export declare let params: string;
|
|
43
50
|
/**
|
|
44
51
|
* useBody is a flag indicating how responses should be formatted. If true, the response will be
|
|
45
|
-
* returned an object with the HTTP response code and ActionResponse in the body field. If false,
|
|
52
|
+
* returned as an object with the HTTP response code and ActionResponse in the body field. If false,
|
|
46
53
|
* the ActionResponse will be returned directly. Typically, this does not need to be set by the
|
|
47
54
|
* action handler and should remain false.
|
|
48
55
|
*/
|
|
@@ -225,6 +232,14 @@ export declare function prepareErrorResponse(errorMessage: string): {
|
|
|
225
232
|
export declare function initialize(event: {
|
|
226
233
|
body?: IncomingEventBody;
|
|
227
234
|
}): void;
|
|
235
|
+
/**
|
|
236
|
+
* initializeFromCustomElement initializes the SDK from a custom element context. This should be called
|
|
237
|
+
* at the beginning of the action handler to set up the SDK with incoming information, including context
|
|
238
|
+
* information, input parameters, and authentication information needed to make API requests to the Halix service.
|
|
239
|
+
*
|
|
240
|
+
* @param context - The custom element context
|
|
241
|
+
*/
|
|
242
|
+
export declare function initializeFromCustomElement(context: CustomElementContext): void;
|
|
228
243
|
/**
|
|
229
244
|
* SortField is an interface for specifying sort fields.
|
|
230
245
|
*/
|
|
@@ -395,4 +410,60 @@ export interface IncomingEventBody {
|
|
|
395
410
|
userContext: string;
|
|
396
411
|
params: Record<string, any>;
|
|
397
412
|
}
|
|
413
|
+
/**
|
|
414
|
+
* CustomElementContext is an interface defining the properties of the custom element context, which represents
|
|
415
|
+
* the state of the application front-end. A CustomElementContext is provided as property bound to Lit elements
|
|
416
|
+
* that back custom page elements.
|
|
417
|
+
*/
|
|
418
|
+
export interface CustomElementContext {
|
|
419
|
+
pageContext: {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
};
|
|
422
|
+
pageContext$: Observable<{
|
|
423
|
+
[key: string]: any;
|
|
424
|
+
}>;
|
|
425
|
+
groupObject: {
|
|
426
|
+
groupObject: any;
|
|
427
|
+
parent?: any;
|
|
428
|
+
groupChange: BehaviorSubject<number>;
|
|
429
|
+
};
|
|
430
|
+
session: {
|
|
431
|
+
solution: {
|
|
432
|
+
objKey: string;
|
|
433
|
+
name: string;
|
|
434
|
+
description: string;
|
|
435
|
+
sandboxKeys: string[];
|
|
436
|
+
};
|
|
437
|
+
sandbox: {
|
|
438
|
+
objKey: string;
|
|
439
|
+
id: string;
|
|
440
|
+
solutionKey: string;
|
|
441
|
+
organizationKey: string;
|
|
442
|
+
};
|
|
443
|
+
user: {
|
|
444
|
+
objKey: string;
|
|
445
|
+
username: string;
|
|
446
|
+
firstName: string;
|
|
447
|
+
lastName: string;
|
|
448
|
+
email: string;
|
|
449
|
+
photoKey: string;
|
|
450
|
+
thumbnail: string;
|
|
451
|
+
getFormattedName(): string;
|
|
452
|
+
};
|
|
453
|
+
currentComponent: {
|
|
454
|
+
id: string;
|
|
455
|
+
name: string;
|
|
456
|
+
componentConfig: any;
|
|
457
|
+
};
|
|
458
|
+
organizationKey: string;
|
|
459
|
+
organizationProxyKey: string;
|
|
460
|
+
organizationProxy: any;
|
|
461
|
+
userProxy: any;
|
|
462
|
+
secondaryScopeKey: string;
|
|
463
|
+
secondaryScopeLabel: string;
|
|
464
|
+
isLoggedIn(): boolean;
|
|
465
|
+
};
|
|
466
|
+
serviceAddress: string;
|
|
467
|
+
authTokenRetriever: () => Observable<string>;
|
|
468
|
+
}
|
|
398
469
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAQ,UAAU,EAAE,eAAe,EAAqB,MAAM,MAAM,CAAC;AAE5E;;;;GAIG;AACH,eAAO,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,IAAI,UAAU,EAAE,MAAM,CAAC;AAE9B;;;GAGG;AACH,eAAO,IAAI,cAAc,EAAE,MAAM,CAAC;AAElC;;;;;;;;;;;GAWG;AACH,eAAO,IAAI,aAAa,EAAE,GAAG,CAAC;AAE9B;;;GAGG;AACH,eAAO,IAAI,WAAW,EAAE;IACpB,IAAI,EAAE,GAAG,CAAC;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,EAAE,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM;KACnD,CAAA;IAED,YAAY,GAAG,GAAG,EAAE,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;AACtD,CAAC"}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Halix SDK License v1.0
|
|
3
2
|
// Copyright (c) 2025 halix.io LLC.
|
|
4
3
|
//
|
|
@@ -7,23 +6,6 @@
|
|
|
7
6
|
//
|
|
8
7
|
// Unauthorized use outside the Halix platform is prohibited.
|
|
9
8
|
// Full license terms available in the LICENSE file.
|
|
10
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
11
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
|
-
};
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.authToken = void 0;
|
|
15
|
-
exports.getRelatedObjects = getRelatedObjects;
|
|
16
|
-
exports.getRelatedObjectsAsObservable = getRelatedObjectsAsObservable;
|
|
17
|
-
exports.getObject = getObject;
|
|
18
|
-
exports.getObjectAsObservable = getObjectAsObservable;
|
|
19
|
-
exports.saveRelatedObject = saveRelatedObject;
|
|
20
|
-
exports.saveRelatedObjectAsObservable = saveRelatedObjectAsObservable;
|
|
21
|
-
exports.sortObjectArray = sortObjectArray;
|
|
22
|
-
exports.compareValues = compareValues;
|
|
23
|
-
exports.getValueFromObject = getValueFromObject;
|
|
24
|
-
exports.prepareSuccessResponse = prepareSuccessResponse;
|
|
25
|
-
exports.prepareErrorResponse = prepareErrorResponse;
|
|
26
|
-
exports.initialize = initialize;
|
|
27
9
|
/**
|
|
28
10
|
* @module @halix/action-sdk
|
|
29
11
|
* @description Halix Platform action SDK for developing NodeJS Lambda-based actions on the Halix
|
|
@@ -31,8 +13,56 @@ exports.initialize = initialize;
|
|
|
31
13
|
* requests to the Halix data service, and returning structured action responses back to the Halix
|
|
32
14
|
* platform.
|
|
33
15
|
*/
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
import axios from 'axios';
|
|
17
|
+
import { from, of, lastValueFrom } from 'rxjs';
|
|
18
|
+
/**
|
|
19
|
+
* authToken contains the authentication token that the action handler can use to make API requests
|
|
20
|
+
* to Halix web services. This value is set upon calling the initialize function with incoming event
|
|
21
|
+
* data.
|
|
22
|
+
*/
|
|
23
|
+
export let getAuthToken;
|
|
24
|
+
/**
|
|
25
|
+
* sandboxKey contains the sandbox key identifier; identifies the sandbox that the action handler is
|
|
26
|
+
* running in. The sandbox identifies the current solution. This value is set upon calling the
|
|
27
|
+
* initialize function with incoming event data.
|
|
28
|
+
*/
|
|
29
|
+
export let sandboxKey;
|
|
30
|
+
/**
|
|
31
|
+
* serviceAddress contains the URL of the Halix service that the action handler can use to make API
|
|
32
|
+
* requests to. This value is set upon calling the initialize function with incoming event data.
|
|
33
|
+
*/
|
|
34
|
+
export let serviceAddress;
|
|
35
|
+
/**
|
|
36
|
+
* actionSubject contains the identifier of the subject of the action. The subject is the object
|
|
37
|
+
* that the action is being performed on. The action subject's contents will differ depending on the
|
|
38
|
+
* context in which the action is being executed. This value is set upon calling the initialize
|
|
39
|
+
* function with incoming event data.
|
|
40
|
+
* - for formTemplateActions, the action subject is the data being edited on the form
|
|
41
|
+
* - for pageTemplateActions, the action subject is record containing the context variables and
|
|
42
|
+
* their corresponding values on the page
|
|
43
|
+
* - for objectSaveActions, the action subject is the object being saved
|
|
44
|
+
* - for calculatedFieldActions, the action subject is the object containing the calculated field
|
|
45
|
+
* - for singleValueActions, the action subject may differ depending on the caller
|
|
46
|
+
*/
|
|
47
|
+
export let actionSubject;
|
|
48
|
+
/**
|
|
49
|
+
* userContext contains the user context information for the user that is executing the action.
|
|
50
|
+
* This value is set upon calling the initialize function with incoming event data.
|
|
51
|
+
*/
|
|
52
|
+
export let userContext;
|
|
53
|
+
/**
|
|
54
|
+
* params contains the parameters passed to the action. If an input dialog is used, params will
|
|
55
|
+
* contain the values entered in the dialog. This value is set upon calling the initialize
|
|
56
|
+
* function with incoming event data.
|
|
57
|
+
*/
|
|
58
|
+
export let params;
|
|
59
|
+
/**
|
|
60
|
+
* useBody is a flag indicating how responses should be formatted. If true, the response will be
|
|
61
|
+
* returned as an object with the HTTP response code and ActionResponse in the body field. If false,
|
|
62
|
+
* the ActionResponse will be returned directly. Typically, this does not need to be set by the
|
|
63
|
+
* action handler and should remain false.
|
|
64
|
+
*/
|
|
65
|
+
export let useBody;
|
|
36
66
|
/**
|
|
37
67
|
* getRelatedObjects retrieves an array of objects from the the database. The objects returned are
|
|
38
68
|
* related to a parent through a defined relationship in the schema. In a typical setup, action's
|
|
@@ -56,7 +86,7 @@ const rxjs_1 = require("rxjs");
|
|
|
56
86
|
*
|
|
57
87
|
* @returns Promise resolving to an array of objects
|
|
58
88
|
*/
|
|
59
|
-
async function getRelatedObjects(parentElementId, parentKey, elementId, filter, fetchedRelationships) {
|
|
89
|
+
export async function getRelatedObjects(parentElementId, parentKey, elementId, filter, fetchedRelationships) {
|
|
60
90
|
let params;
|
|
61
91
|
if (filter || fetchedRelationships) {
|
|
62
92
|
let p = {};
|
|
@@ -68,10 +98,11 @@ async function getRelatedObjects(parentElementId, parentKey, elementId, filter,
|
|
|
68
98
|
}
|
|
69
99
|
params = new URLSearchParams(p);
|
|
70
100
|
}
|
|
71
|
-
let url = `${
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
101
|
+
let url = `${serviceAddress}/schema/sandboxes/${sandboxKey}/${parentElementId}/${parentKey}/${elementId}`;
|
|
102
|
+
let authToken = await lastValueFrom(getAuthToken());
|
|
103
|
+
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
104
|
+
let response = await axios.get(url, {
|
|
105
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
75
106
|
params: params,
|
|
76
107
|
});
|
|
77
108
|
return response.data;
|
|
@@ -99,8 +130,8 @@ async function getRelatedObjects(parentElementId, parentKey, elementId, filter,
|
|
|
99
130
|
*
|
|
100
131
|
* @returns Observable resolving to an array of objects
|
|
101
132
|
*/
|
|
102
|
-
function getRelatedObjectsAsObservable(parentElementId, parentKey, elementId, filter, fetchedRelationships) {
|
|
103
|
-
return
|
|
133
|
+
export function getRelatedObjectsAsObservable(parentElementId, parentKey, elementId, filter, fetchedRelationships) {
|
|
134
|
+
return from(getRelatedObjects(parentElementId, parentKey, elementId, filter, fetchedRelationships));
|
|
104
135
|
}
|
|
105
136
|
/**
|
|
106
137
|
* getObject retrieves a single object from the database by its data element ID and key.
|
|
@@ -111,7 +142,7 @@ function getRelatedObjectsAsObservable(parentElementId, parentKey, elementId, fi
|
|
|
111
142
|
* object will include the specified related objects as nested objects
|
|
112
143
|
* @returns Promise resolving to the object data
|
|
113
144
|
*/
|
|
114
|
-
async function getObject(dataElementId, key, fetchedRelationships) {
|
|
145
|
+
export async function getObject(dataElementId, key, fetchedRelationships) {
|
|
115
146
|
let params;
|
|
116
147
|
if (fetchedRelationships) {
|
|
117
148
|
let p = {};
|
|
@@ -120,10 +151,11 @@ async function getObject(dataElementId, key, fetchedRelationships) {
|
|
|
120
151
|
}
|
|
121
152
|
params = new URLSearchParams(p);
|
|
122
153
|
}
|
|
123
|
-
let url = `${
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
154
|
+
let url = `${serviceAddress}/schema/sandboxes/${sandboxKey}/${dataElementId}/${key}`;
|
|
155
|
+
let authToken = await lastValueFrom(getAuthToken());
|
|
156
|
+
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
157
|
+
let response = await axios.get(url, {
|
|
158
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
127
159
|
params: params,
|
|
128
160
|
});
|
|
129
161
|
return response.data;
|
|
@@ -138,8 +170,8 @@ async function getObject(dataElementId, key, fetchedRelationships) {
|
|
|
138
170
|
*
|
|
139
171
|
* @returns Observable resolving to the object data
|
|
140
172
|
*/
|
|
141
|
-
function getObjectAsObservable(dataElementId, key, fetchedRelationships) {
|
|
142
|
-
return
|
|
173
|
+
export function getObjectAsObservable(dataElementId, key, fetchedRelationships) {
|
|
174
|
+
return from(getObject(dataElementId, key, fetchedRelationships));
|
|
143
175
|
}
|
|
144
176
|
/**
|
|
145
177
|
* saveRelatedObject saves a related object to the database. The objectToSave is saved, and its
|
|
@@ -157,17 +189,18 @@ function getObjectAsObservable(dataElementId, key, fetchedRelationships) {
|
|
|
157
189
|
* save operation (such as assigning an objKey if the object is new), or the assignment of
|
|
158
190
|
* calculated values
|
|
159
191
|
*/
|
|
160
|
-
async function saveRelatedObject(parentElementId, parentKey, elementId, objectToSave, opts) {
|
|
161
|
-
let url = `${
|
|
192
|
+
export async function saveRelatedObject(parentElementId, parentKey, elementId, objectToSave, opts) {
|
|
193
|
+
let url = `${serviceAddress}/schema/sandboxes/${sandboxKey}/${parentElementId}/${parentKey}/${elementId}`;
|
|
162
194
|
if (opts?.bypassValidation === false) {
|
|
163
195
|
url += "?bypassValidation=false";
|
|
164
196
|
}
|
|
165
197
|
else {
|
|
166
198
|
url += "?bypassValidation=true";
|
|
167
199
|
}
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
200
|
+
let authToken = await lastValueFrom(getAuthToken());
|
|
201
|
+
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
202
|
+
let response = await axios.post(url, objectToSave, {
|
|
203
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
171
204
|
});
|
|
172
205
|
return response.data;
|
|
173
206
|
}
|
|
@@ -187,8 +220,8 @@ async function saveRelatedObject(parentElementId, parentKey, elementId, objectTo
|
|
|
187
220
|
* the save operation (such as assigning an objKey if the object is new), or the assignment of
|
|
188
221
|
* calculated values
|
|
189
222
|
*/
|
|
190
|
-
function saveRelatedObjectAsObservable(parentElementId, parentKey, elementId, objectToSave, opts) {
|
|
191
|
-
return
|
|
223
|
+
export function saveRelatedObjectAsObservable(parentElementId, parentKey, elementId, objectToSave, opts) {
|
|
224
|
+
return from(saveRelatedObject(parentElementId, parentKey, elementId, objectToSave, opts));
|
|
192
225
|
}
|
|
193
226
|
/**
|
|
194
227
|
* sortObjectArray is a helper function that sorts the passed array in place by the given
|
|
@@ -199,7 +232,7 @@ function saveRelatedObjectAsObservable(parentElementId, parentKey, elementId, ob
|
|
|
199
232
|
* @param sort - Array of sort field specifications
|
|
200
233
|
* @returns The sorted array
|
|
201
234
|
*/
|
|
202
|
-
function sortObjectArray(array, sort) {
|
|
235
|
+
export function sortObjectArray(array, sort) {
|
|
203
236
|
return array.sort((a, b) => {
|
|
204
237
|
let comparison = 0;
|
|
205
238
|
for (let s of sort) {
|
|
@@ -225,7 +258,7 @@ function sortObjectArray(array, sort) {
|
|
|
225
258
|
*
|
|
226
259
|
* @returns Comparison result (-1, 0, or 1)
|
|
227
260
|
*/
|
|
228
|
-
function compareValues(valueA, valueB, descending, caseInsensitive) {
|
|
261
|
+
export function compareValues(valueA, valueB, descending, caseInsensitive) {
|
|
229
262
|
if (caseInsensitive && (typeof valueA === 'string' || valueA instanceof String)) {
|
|
230
263
|
if (valueA && valueB) {
|
|
231
264
|
let comp = valueA.toLowerCase().localeCompare(valueB.toLowerCase());
|
|
@@ -267,7 +300,7 @@ function compareValues(valueA, valueB, descending, caseInsensitive) {
|
|
|
267
300
|
*
|
|
268
301
|
* @returns The extracted value
|
|
269
302
|
*/
|
|
270
|
-
function getValueFromObject(object, attribute) {
|
|
303
|
+
export function getValueFromObject(object, attribute) {
|
|
271
304
|
let components = attribute.split(".");
|
|
272
305
|
let value = object;
|
|
273
306
|
for (let component of components) {
|
|
@@ -298,8 +331,8 @@ function getValueFromObject(object, attribute) {
|
|
|
298
331
|
*
|
|
299
332
|
* @returns Formatted success response; an ActionResponse unless useBody is true
|
|
300
333
|
*/
|
|
301
|
-
function prepareSuccessResponse(successResponse) {
|
|
302
|
-
if (
|
|
334
|
+
export function prepareSuccessResponse(successResponse) {
|
|
335
|
+
if (useBody) {
|
|
303
336
|
return {
|
|
304
337
|
statusCode: 200,
|
|
305
338
|
body: JSON.stringify(successResponse)
|
|
@@ -317,8 +350,8 @@ function prepareSuccessResponse(successResponse) {
|
|
|
317
350
|
*
|
|
318
351
|
* @returns Formatted error response; an ErrorResponse unless useBody is true
|
|
319
352
|
*/
|
|
320
|
-
function prepareErrorResponse(errorMessage) {
|
|
321
|
-
if (
|
|
353
|
+
export function prepareErrorResponse(errorMessage) {
|
|
354
|
+
if (useBody) {
|
|
322
355
|
return {
|
|
323
356
|
statusCode: 400,
|
|
324
357
|
body: JSON.stringify({ errorMessage })
|
|
@@ -333,13 +366,36 @@ function prepareErrorResponse(errorMessage) {
|
|
|
333
366
|
*
|
|
334
367
|
* @param event - The event object containing authentication and context information
|
|
335
368
|
*/
|
|
336
|
-
function initialize(event) {
|
|
369
|
+
export function initialize(event) {
|
|
337
370
|
let body = event;
|
|
338
371
|
if (event.body) {
|
|
339
372
|
body = event.body;
|
|
340
|
-
|
|
373
|
+
useBody = true;
|
|
341
374
|
}
|
|
342
375
|
if (body) {
|
|
343
|
-
({
|
|
376
|
+
({ sandboxKey, serviceAddress, actionSubject, userContext, params } = body);
|
|
377
|
+
getAuthToken = () => of(body.authToken);
|
|
344
378
|
}
|
|
345
379
|
}
|
|
380
|
+
/**
|
|
381
|
+
* initializeFromCustomElement initializes the SDK from a custom element context. This should be called
|
|
382
|
+
* at the beginning of the action handler to set up the SDK with incoming information, including context
|
|
383
|
+
* information, input parameters, and authentication information needed to make API requests to the Halix service.
|
|
384
|
+
*
|
|
385
|
+
* @param context - The custom element context
|
|
386
|
+
*/
|
|
387
|
+
export function initializeFromCustomElement(context) {
|
|
388
|
+
sandboxKey = context.session?.sandbox?.objKey;
|
|
389
|
+
serviceAddress = context.serviceAddress;
|
|
390
|
+
actionSubject = context.pageContext;
|
|
391
|
+
userContext = {
|
|
392
|
+
user: context.session?.user,
|
|
393
|
+
userProxy: context.session?.userProxy,
|
|
394
|
+
orgProxy: context.session?.organizationProxy,
|
|
395
|
+
orgProxyKey: context.session?.organizationProxyKey,
|
|
396
|
+
orgKey: context.session?.organizationKey,
|
|
397
|
+
userProxyKey: context.session?.userProxy?.objKey,
|
|
398
|
+
};
|
|
399
|
+
getAuthToken = () => context.authTokenRetriever();
|
|
400
|
+
}
|
|
401
|
+
//# sourceMappingURL=index.js.map
|
package/lib/esm/types/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
1
|
+
import { Observable, BehaviorSubject } from 'rxjs';
|
|
2
2
|
/**
|
|
3
3
|
* authToken contains the authentication token that the action handler can use to make API requests
|
|
4
4
|
* to Halix web services. This value is set upon calling the initialize function with incoming event
|
|
5
5
|
* data.
|
|
6
6
|
*/
|
|
7
|
-
export declare let
|
|
7
|
+
export declare let getAuthToken: () => Observable<string>;
|
|
8
8
|
/**
|
|
9
9
|
* sandboxKey contains the sandbox key identifier; identifies the sandbox that the action handler is
|
|
10
10
|
* running in. The sandbox identifies the current solution. This value is set upon calling the
|
|
@@ -28,12 +28,19 @@ export declare let serviceAddress: string;
|
|
|
28
28
|
* - for calculatedFieldActions, the action subject is the object containing the calculated field
|
|
29
29
|
* - for singleValueActions, the action subject may differ depending on the caller
|
|
30
30
|
*/
|
|
31
|
-
export declare let actionSubject:
|
|
31
|
+
export declare let actionSubject: any;
|
|
32
32
|
/**
|
|
33
33
|
* userContext contains the user context information for the user that is executing the action.
|
|
34
34
|
* This value is set upon calling the initialize function with incoming event data.
|
|
35
35
|
*/
|
|
36
|
-
export declare let userContext:
|
|
36
|
+
export declare let userContext: {
|
|
37
|
+
user: any;
|
|
38
|
+
userProxy: any;
|
|
39
|
+
orgProxy: any;
|
|
40
|
+
orgProxyKey: string;
|
|
41
|
+
orgKey: string;
|
|
42
|
+
userProxyKey: string;
|
|
43
|
+
};
|
|
37
44
|
/**
|
|
38
45
|
* params contains the parameters passed to the action. If an input dialog is used, params will
|
|
39
46
|
* contain the values entered in the dialog. This value is set upon calling the initialize
|
|
@@ -42,7 +49,7 @@ export declare let userContext: string;
|
|
|
42
49
|
export declare let params: string;
|
|
43
50
|
/**
|
|
44
51
|
* useBody is a flag indicating how responses should be formatted. If true, the response will be
|
|
45
|
-
* returned an object with the HTTP response code and ActionResponse in the body field. If false,
|
|
52
|
+
* returned as an object with the HTTP response code and ActionResponse in the body field. If false,
|
|
46
53
|
* the ActionResponse will be returned directly. Typically, this does not need to be set by the
|
|
47
54
|
* action handler and should remain false.
|
|
48
55
|
*/
|
|
@@ -225,6 +232,14 @@ export declare function prepareErrorResponse(errorMessage: string): {
|
|
|
225
232
|
export declare function initialize(event: {
|
|
226
233
|
body?: IncomingEventBody;
|
|
227
234
|
}): void;
|
|
235
|
+
/**
|
|
236
|
+
* initializeFromCustomElement initializes the SDK from a custom element context. This should be called
|
|
237
|
+
* at the beginning of the action handler to set up the SDK with incoming information, including context
|
|
238
|
+
* information, input parameters, and authentication information needed to make API requests to the Halix service.
|
|
239
|
+
*
|
|
240
|
+
* @param context - The custom element context
|
|
241
|
+
*/
|
|
242
|
+
export declare function initializeFromCustomElement(context: CustomElementContext): void;
|
|
228
243
|
/**
|
|
229
244
|
* SortField is an interface for specifying sort fields.
|
|
230
245
|
*/
|
|
@@ -395,4 +410,59 @@ export interface IncomingEventBody {
|
|
|
395
410
|
userContext: string;
|
|
396
411
|
params: Record<string, any>;
|
|
397
412
|
}
|
|
398
|
-
|
|
413
|
+
/**
|
|
414
|
+
* CustomElementContext is an interface defining the properties of the custom element context, which represents
|
|
415
|
+
* the state of the application front-end. A CustomElementContext is provided as property bound to Lit elements
|
|
416
|
+
* that back custom page elements.
|
|
417
|
+
*/
|
|
418
|
+
export interface CustomElementContext {
|
|
419
|
+
pageContext: {
|
|
420
|
+
[key: string]: any;
|
|
421
|
+
};
|
|
422
|
+
pageContext$: Observable<{
|
|
423
|
+
[key: string]: any;
|
|
424
|
+
}>;
|
|
425
|
+
groupObject: {
|
|
426
|
+
groupObject: any;
|
|
427
|
+
parent?: any;
|
|
428
|
+
groupChange: BehaviorSubject<number>;
|
|
429
|
+
};
|
|
430
|
+
session: {
|
|
431
|
+
solution: {
|
|
432
|
+
objKey: string;
|
|
433
|
+
name: string;
|
|
434
|
+
description: string;
|
|
435
|
+
sandboxKeys: string[];
|
|
436
|
+
};
|
|
437
|
+
sandbox: {
|
|
438
|
+
objKey: string;
|
|
439
|
+
id: string;
|
|
440
|
+
solutionKey: string;
|
|
441
|
+
organizationKey: string;
|
|
442
|
+
};
|
|
443
|
+
user: {
|
|
444
|
+
objKey: string;
|
|
445
|
+
username: string;
|
|
446
|
+
firstName: string;
|
|
447
|
+
lastName: string;
|
|
448
|
+
email: string;
|
|
449
|
+
photoKey: string;
|
|
450
|
+
thumbnail: string;
|
|
451
|
+
getFormattedName(): string;
|
|
452
|
+
};
|
|
453
|
+
currentComponent: {
|
|
454
|
+
id: string;
|
|
455
|
+
name: string;
|
|
456
|
+
componentConfig: any;
|
|
457
|
+
};
|
|
458
|
+
organizationKey: string;
|
|
459
|
+
organizationProxyKey: string;
|
|
460
|
+
organizationProxy: any;
|
|
461
|
+
userProxy: any;
|
|
462
|
+
secondaryScopeKey: string;
|
|
463
|
+
secondaryScopeLabel: string;
|
|
464
|
+
isLoggedIn(): boolean;
|
|
465
|
+
};
|
|
466
|
+
serviceAddress: string;
|
|
467
|
+
authTokenRetriever: () => Observable<string>;
|
|
468
|
+
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAQ,UAAU,EAAE,MAAM,MAAM,CAAC;AAExC;;;;GAIG;AACH,eAAO,IAAI,SAAS,EAAE,MAAM,CAAC;AAE7B;;;;GAIG;AACH,eAAO,IAAI,UAAU,EAAE,MAAM,CAAC;AAE9B;;;GAGG;AACH,eAAO,IAAI,cAAc,EAAE,MAAM,CAAC;AAEl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