@halix/action-sdk 1.0.38 β 1.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/lib/cjs/data-crud.js +174 -34
- package/lib/cjs/index.js +13 -2
- package/lib/cjs/lists.js +57 -0
- package/lib/cjs/payments.js +87 -0
- package/lib/cjs/types/data-crud.d.ts +38 -5
- package/lib/cjs/types/data-crud.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/lists.d.ts +64 -3
- package/lib/cjs/types/lists.d.ts.map +1 -1
- package/lib/cjs/types/payments.d.ts +75 -0
- package/lib/cjs/types/payments.d.ts.map +1 -0
- package/lib/esm/data-crud.js +165 -33
- package/lib/esm/data-crud.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +8 -2
- package/lib/esm/lists.js +57 -0
- package/lib/esm/lists.js.map +1 -1
- package/lib/esm/payments.js +78 -0
- package/lib/esm/payments.js.map +1 -0
- package/lib/esm/types/data-crud.d.ts +38 -5
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/lists.d.ts +64 -3
- package/lib/esm/types/payments.d.ts +74 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -91,6 +91,7 @@ This action pattern is typical for use in Halixβs Lambda-style runtime environ
|
|
|
91
91
|
| `saveRelatedObject(...)` / `saveRelatedObjectAsObservable(...)` | Save objects and relationships |
|
|
92
92
|
| `deleteRelatedObject(...)` / `deleteRelatedObjectAsObservable(...)` | Delete a single related object |
|
|
93
93
|
| `deleteRelatedObjects(...)` / `deleteRelatedObjectsAsObservable(...)` | Delete multiple related objects (uses `keys` query param) |
|
|
94
|
+
| `submitStandalonePayment(...)` / `submitStandalonePaymentAsObservable(...)` | Finalize a payment from a gateway preauth result |
|
|
94
95
|
| `prepareSuccessResponse(...)` | Create a success response |
|
|
95
96
|
| `prepareErrorResponse(...)` | Create an error response |
|
|
96
97
|
|
|
@@ -112,6 +113,36 @@ These helpers simplify working with content resources and file uploads.
|
|
|
112
113
|
|
|
113
114
|
---
|
|
114
115
|
|
|
116
|
+
## Payment Helpers
|
|
117
|
+
|
|
118
|
+
Use `submitStandalonePayment(...)` after UI code has already produced a gateway preauth result and you need action code to finish the payment through the platform backend.
|
|
119
|
+
|
|
120
|
+
```js
|
|
121
|
+
const result = await hx.submitStandalonePayment({
|
|
122
|
+
payerKey: hx.userContext.userProxyKey,
|
|
123
|
+
payeeKey: hx.userContext.orgKey,
|
|
124
|
+
paymentAmount: 49.99,
|
|
125
|
+
preAuthResult,
|
|
126
|
+
hostObjectKey: invoice.objKey,
|
|
127
|
+
hostElementId: 'clientInvoice',
|
|
128
|
+
hostAttributeId: 'paymentStatus',
|
|
129
|
+
generateTransaction: true,
|
|
130
|
+
chargeDescription: 'Invoice payment'
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
console.log(result.paymentKey, result.paymentSummary);
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Notes:
|
|
137
|
+
- `organizationKey` is taken from `userContext.orgKey`, and `payerType` is fixed to `SolutionUserProxy`.
|
|
138
|
+
- The SDK assumes a Stripe preauth result and injects `paymentGateway: 'stripe'` before sending the request.
|
|
139
|
+
- Extra fields on `preAuthResult` are still passed through because Stripe completion may require gateway-specific values such as token or saved-payment-method identifiers.
|
|
140
|
+
- `hostObjectKey`, `hostElementId`, and `hostAttributeId` must point at a real solution-defined object field that the backend can update with the returned payment summary.
|
|
141
|
+
- `bankAccountPayment` is optional in the SDK wrapper; if omitted it is inferred from common ACH payment method values in the preauth result.
|
|
142
|
+
- `payeeKey` should be the organization receiving the payment.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
115
146
|
## π§ͺ Utilities
|
|
116
147
|
|
|
117
148
|
| Function | Description |
|
package/lib/cjs/data-crud.js
CHANGED
|
@@ -26,6 +26,10 @@ exports.getRelatedObjects = getRelatedObjects;
|
|
|
26
26
|
exports.getRelatedObjectsAsObservable = getRelatedObjectsAsObservable;
|
|
27
27
|
exports.getAccessibleObjects = getAccessibleObjects;
|
|
28
28
|
exports.getAccessibleObjectsAsObservable = getAccessibleObjectsAsObservable;
|
|
29
|
+
exports.getObjectsByKeys = getObjectsByKeys;
|
|
30
|
+
exports.getObjectsByKeysAsObservable = getObjectsByKeysAsObservable;
|
|
31
|
+
exports.saveObject = saveObject;
|
|
32
|
+
exports.saveObjectAsObservable = saveObjectAsObservable;
|
|
29
33
|
exports.saveRelatedObject = saveRelatedObject;
|
|
30
34
|
exports.saveRelatedObjectAsObservable = saveRelatedObjectAsObservable;
|
|
31
35
|
exports.deleteRelatedObject = deleteRelatedObject;
|
|
@@ -43,6 +47,63 @@ exports.deleteRelatedObjectsAsObservable = deleteRelatedObjectsAsObservable;
|
|
|
43
47
|
* - Retrieve all objects related to a parent object
|
|
44
48
|
* - Save a single object
|
|
45
49
|
* - Delete a single or multiple objects
|
|
50
|
+
*
|
|
51
|
+
* @usage
|
|
52
|
+
* ## When to Use
|
|
53
|
+
* - **Read objects without specifying parent scope** β `getAccessibleObjects` (most common read)
|
|
54
|
+
* - **Read specific accessible objects by key list** β `getObjectsByKeys`
|
|
55
|
+
* - **Get single object by key** β `getObject`
|
|
56
|
+
* - **Get related objects (<50)** β `getRelatedObjects`
|
|
57
|
+
* - **Create/update single object** β `saveObject`
|
|
58
|
+
* - **Delete single object** β `deleteRelatedObject`
|
|
59
|
+
*
|
|
60
|
+
* ## When NOT to Use
|
|
61
|
+
* - **Large lists (100+)** β use lists skill with `getListData`
|
|
62
|
+
* - **Bulk updates** β use lists skill with `massEdit`
|
|
63
|
+
* - **Aggregations** β use data-aggregate skill
|
|
64
|
+
*
|
|
65
|
+
* ## Key Functions
|
|
66
|
+
* | Function | Use For |
|
|
67
|
+
* |----------|---------|
|
|
68
|
+
* | `getAccessibleObjects` | Read objects the current user can access (no parent scope needed) |
|
|
69
|
+
* | `getObjectsByKeys` | Read accessible objects from a specific key list |
|
|
70
|
+
* | `getObject` | Single object by key |
|
|
71
|
+
* | `getRelatedObjects` | Children of a parent (small collections) |
|
|
72
|
+
* | `saveObject` | Create or update one object |
|
|
73
|
+
* | `saveRelatedObject` | Create or update one object and establish relationship to a parent |
|
|
74
|
+
* | `deleteRelatedObject` | Delete one object |
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* // Get all accessible recipes
|
|
78
|
+
* const recipes = await hx.getAccessibleObjects('recipe');
|
|
79
|
+
*
|
|
80
|
+
* @example
|
|
81
|
+
* // Get accessible recipes from a known key list
|
|
82
|
+
* const recipes = await hx.getObjectsByKeys('recipe', recipeKeys);
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* // Get single recipe
|
|
86
|
+
* const recipe = await hx.getObject('recipe', recipeKey);
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* // Get ingredients (small collection)
|
|
90
|
+
* const ingredients = await hx.getRelatedObjects(
|
|
91
|
+
* 'recipe', recipeKey, 'ingredient'
|
|
92
|
+
* );
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* // Save a recipe
|
|
96
|
+
* await hx.saveObject(
|
|
97
|
+
* 'recipe',
|
|
98
|
+
* { name: 'Soup' }
|
|
99
|
+
* );
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* // Save new ingredient related to a recipe
|
|
103
|
+
* await hx.saveRelatedObject(
|
|
104
|
+
* 'recipe', recipeKey, 'ingredient',
|
|
105
|
+
* { name: 'Salt', amount: '1 tsp' }
|
|
106
|
+
* );
|
|
46
107
|
*/
|
|
47
108
|
const axios_1 = __importDefault(require("axios"));
|
|
48
109
|
const rxjs_1 = require("rxjs");
|
|
@@ -141,35 +202,12 @@ function getRelatedObjectsAsObservable(parentElementId, parentKey, elementId, fi
|
|
|
141
202
|
*/
|
|
142
203
|
function getAccessibleObjects(dataElementId, filter, fetchedRelationships, applyContext) {
|
|
143
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
var _a, _b, _c;
|
|
145
205
|
if (!sdk_general_1.getAuthToken) {
|
|
146
206
|
const errorMessage = 'SDK not initialized.';
|
|
147
207
|
console.error(errorMessage);
|
|
148
208
|
throw new Error(errorMessage);
|
|
149
209
|
}
|
|
150
|
-
let params;
|
|
151
|
-
if (filter || fetchedRelationships || applyContext) {
|
|
152
|
-
let p = {};
|
|
153
|
-
if (filter) {
|
|
154
|
-
p.filter = filter;
|
|
155
|
-
}
|
|
156
|
-
if (fetchedRelationships) {
|
|
157
|
-
p.fetchedRelationships = fetchedRelationships.join(",");
|
|
158
|
-
}
|
|
159
|
-
if (applyContext) {
|
|
160
|
-
if (!(sdk_general_1.userContext === null || sdk_general_1.userContext === void 0 ? void 0 : sdk_general_1.userContext.navigationContext)) {
|
|
161
|
-
throw new Error("navigationContext is required but not available on userContext");
|
|
162
|
-
}
|
|
163
|
-
const navigationContext = sdk_general_1.userContext.navigationContext;
|
|
164
|
-
if (!navigationContext.navigationKey) {
|
|
165
|
-
throw new Error("navigationContext is missing navigationKey");
|
|
166
|
-
}
|
|
167
|
-
const userProxyKey = (_a = sdk_general_1.userContext.userProxyKey) !== null && _a !== void 0 ? _a : "";
|
|
168
|
-
const orgProxyKey = (_c = (_b = sdk_general_1.userContext.orgProxyKey) !== null && _b !== void 0 ? _b : navigationContext.orgProxyKey) !== null && _c !== void 0 ? _c : "";
|
|
169
|
-
p.applyContext = `${navigationContext.navigationKey}|${userProxyKey}|${orgProxyKey}`;
|
|
170
|
-
}
|
|
171
|
-
params = new URLSearchParams(p);
|
|
172
|
-
}
|
|
210
|
+
let params = buildAccessibleObjectsParams(filter, fetchedRelationships, applyContext);
|
|
173
211
|
let url = `${sdk_general_1.serviceAddress}/schema/sandboxes/${sdk_general_1.sandboxKey}/${dataElementId}`;
|
|
174
212
|
let authToken = yield (0, rxjs_1.lastValueFrom)((0, sdk_general_1.getAuthToken)());
|
|
175
213
|
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
@@ -186,17 +224,83 @@ function getAccessibleObjects(dataElementId, filter, fetchedRelationships, apply
|
|
|
186
224
|
function getAccessibleObjectsAsObservable(dataElementId, filter, fetchedRelationships, applyContext) {
|
|
187
225
|
return (0, rxjs_1.from)(getAccessibleObjects(dataElementId, filter, fetchedRelationships, applyContext));
|
|
188
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Retrieves accessible objects for a data element from a specific key list.
|
|
229
|
+
* Only objects that are accessible to the current user are returned. If applyContext is true, keyed objects outside the current navigation context are also omitted.
|
|
230
|
+
*
|
|
231
|
+
* @param dataElementId - Data element ID
|
|
232
|
+
* @param keys - Object keys to retrieve
|
|
233
|
+
* @param filter - Optional filter; call `dataexpr_agent` to generate the filter expression. Must be less than 200 characters.
|
|
234
|
+
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
235
|
+
* @param applyContext - Optional flag to apply navigation context scoping. When true, navigation context is read from UserContext.navigationContext and results are limited by the navigation context org proxy.
|
|
236
|
+
* @returns Promise<any[]>
|
|
237
|
+
*/
|
|
238
|
+
function getObjectsByKeys(dataElementId, keys, filter, fetchedRelationships, applyContext) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
if (!sdk_general_1.getAuthToken) {
|
|
241
|
+
const errorMessage = 'SDK not initialized.';
|
|
242
|
+
console.error(errorMessage);
|
|
243
|
+
throw new Error(errorMessage);
|
|
244
|
+
}
|
|
245
|
+
let params = buildAccessibleObjectsParams(filter, fetchedRelationships, applyContext, keys);
|
|
246
|
+
let url = `${sdk_general_1.serviceAddress}/schema/sandboxes/${sdk_general_1.sandboxKey}/${dataElementId}`;
|
|
247
|
+
let authToken = yield (0, rxjs_1.lastValueFrom)((0, sdk_general_1.getAuthToken)());
|
|
248
|
+
console.log("Sending GET request to " + url + " with token " + authToken);
|
|
249
|
+
let response = yield axios_1.default.get(url, {
|
|
250
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
251
|
+
params: params,
|
|
252
|
+
});
|
|
253
|
+
return response.data;
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Observable version of getObjectsByKeys. See getObjectsByKeys for details.
|
|
258
|
+
*/
|
|
259
|
+
function getObjectsByKeysAsObservable(dataElementId, keys, filter, fetchedRelationships, applyContext) {
|
|
260
|
+
return (0, rxjs_1.from)(getObjectsByKeys(dataElementId, keys, filter, fetchedRelationships, applyContext));
|
|
261
|
+
}
|
|
189
262
|
// ================================================================================
|
|
190
263
|
// DATA SAVE FUNCTIONS
|
|
191
264
|
// ================================================================================
|
|
192
265
|
/**
|
|
193
|
-
* Saves
|
|
266
|
+
* Saves an object without establishing a parent relationship. Returns saved object with any server-assigned values (objKey, calculated fields).
|
|
267
|
+
*
|
|
268
|
+
* @param dataElementId - Data element ID for the object being saved
|
|
269
|
+
* @param objectToSave - Object data or JSON string of object data
|
|
270
|
+
* @param opts - Optional save options (e.g., bypassValidation, fetchedRelationships)
|
|
271
|
+
* @returns Promise<any> - saved object with updates including server-assigned values (objKey, calculated fields)
|
|
272
|
+
*/
|
|
273
|
+
function saveObject(dataElementId, objectToSave, opts) {
|
|
274
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
275
|
+
if (!sdk_general_1.getAuthToken) {
|
|
276
|
+
const errorMessage = 'SDK not initialized.';
|
|
277
|
+
console.error(errorMessage);
|
|
278
|
+
throw new Error(errorMessage);
|
|
279
|
+
}
|
|
280
|
+
const queryString = buildSaveQueryString(opts);
|
|
281
|
+
let url = `${sdk_general_1.serviceAddress}/schema/sandboxes/${sdk_general_1.sandboxKey}/${dataElementId}?${queryString}`;
|
|
282
|
+
let authToken = yield (0, rxjs_1.lastValueFrom)((0, sdk_general_1.getAuthToken)());
|
|
283
|
+
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
284
|
+
let response = yield axios_1.default.post(url, objectToSave, {
|
|
285
|
+
headers: { "Authorization": `Bearer ${authToken}` },
|
|
286
|
+
});
|
|
287
|
+
return response.data;
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Observable version of saveObject. See saveObject for details.
|
|
292
|
+
*/
|
|
293
|
+
function saveObjectAsObservable(dataElementId, objectToSave, opts) {
|
|
294
|
+
return (0, rxjs_1.from)(saveObject(dataElementId, objectToSave, opts));
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Saves a related object and establishes or updates its relationship to a parent. Returns saved object with any server-assigned values (objKey, calculated fields).
|
|
194
298
|
*
|
|
195
299
|
* @param parentElementId - Parent element ID
|
|
196
300
|
* @param parentKey - Parent object key; important: this establishes the scope of the save operation; use an appropriate scope Key
|
|
197
301
|
* @param elementId - Child element ID for the object being saved
|
|
198
|
-
* @param objectToSave - JSON string of object data
|
|
199
|
-
* @param opts - Optional save options (e.g., bypassValidation)
|
|
302
|
+
* @param objectToSave - Object data or JSON string of object data
|
|
303
|
+
* @param opts - Optional save options (e.g., bypassValidation, fetchedRelationships)
|
|
200
304
|
* @returns Promise<any> - saved object with updates including server-assigned values (objKey, calculated fields)
|
|
201
305
|
*/
|
|
202
306
|
function saveRelatedObject(parentElementId, parentKey, elementId, objectToSave, opts) {
|
|
@@ -206,13 +310,8 @@ function saveRelatedObject(parentElementId, parentKey, elementId, objectToSave,
|
|
|
206
310
|
console.error(errorMessage);
|
|
207
311
|
throw new Error(errorMessage);
|
|
208
312
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
url += "?bypassValidation=false";
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
214
|
-
url += "?bypassValidation=true";
|
|
215
|
-
}
|
|
313
|
+
const queryString = buildSaveQueryString(opts);
|
|
314
|
+
let url = `${sdk_general_1.serviceAddress}/schema/sandboxes/${sdk_general_1.sandboxKey}/${parentElementId}/${parentKey}/${elementId}?${queryString}`;
|
|
216
315
|
let authToken = yield (0, rxjs_1.lastValueFrom)((0, sdk_general_1.getAuthToken)());
|
|
217
316
|
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
218
317
|
let response = yield axios_1.default.post(url, objectToSave, {
|
|
@@ -292,3 +391,44 @@ function deleteRelatedObjects(parentElementId, parentKey, childElementId, childK
|
|
|
292
391
|
function deleteRelatedObjectsAsObservable(parentElementId, parentKey, childElementId, childKeys) {
|
|
293
392
|
return (0, rxjs_1.from)(deleteRelatedObjects(parentElementId, parentKey, childElementId, childKeys));
|
|
294
393
|
}
|
|
394
|
+
// ================================================================================
|
|
395
|
+
// LOCAL HELPERS
|
|
396
|
+
// ================================================================================
|
|
397
|
+
function buildAccessibleObjectsParams(filter, fetchedRelationships, applyContext, keys) {
|
|
398
|
+
var _a, _b, _c;
|
|
399
|
+
let params;
|
|
400
|
+
if (filter || fetchedRelationships || applyContext || keys) {
|
|
401
|
+
let p = {};
|
|
402
|
+
if (filter) {
|
|
403
|
+
p.filter = filter;
|
|
404
|
+
}
|
|
405
|
+
if (fetchedRelationships) {
|
|
406
|
+
p.fetchedRelationships = fetchedRelationships.join(",");
|
|
407
|
+
}
|
|
408
|
+
if (keys) {
|
|
409
|
+
p.keys = keys.join(",");
|
|
410
|
+
}
|
|
411
|
+
if (applyContext) {
|
|
412
|
+
if (!(sdk_general_1.userContext === null || sdk_general_1.userContext === void 0 ? void 0 : sdk_general_1.userContext.navigationContext)) {
|
|
413
|
+
throw new Error("navigationContext is required but not available on userContext");
|
|
414
|
+
}
|
|
415
|
+
const navigationContext = sdk_general_1.userContext.navigationContext;
|
|
416
|
+
if (!navigationContext.navigationKey) {
|
|
417
|
+
throw new Error("navigationContext is missing navigationKey");
|
|
418
|
+
}
|
|
419
|
+
const userProxyKey = (_a = sdk_general_1.userContext.userProxyKey) !== null && _a !== void 0 ? _a : "";
|
|
420
|
+
const orgProxyKey = (_c = (_b = sdk_general_1.userContext.orgProxyKey) !== null && _b !== void 0 ? _b : navigationContext.orgProxyKey) !== null && _c !== void 0 ? _c : "";
|
|
421
|
+
p.applyContext = `${navigationContext.navigationKey}|${userProxyKey}|${orgProxyKey}`;
|
|
422
|
+
}
|
|
423
|
+
params = new URLSearchParams(p);
|
|
424
|
+
}
|
|
425
|
+
return params;
|
|
426
|
+
}
|
|
427
|
+
function buildSaveQueryString(opts) {
|
|
428
|
+
const params = new URLSearchParams();
|
|
429
|
+
params.set("bypassValidation", (opts === null || opts === void 0 ? void 0 : opts.bypassValidation) === false ? "false" : "true");
|
|
430
|
+
if (opts === null || opts === void 0 ? void 0 : opts.fetchedRelationships) {
|
|
431
|
+
params.set("fetchedRelationships", opts.fetchedRelationships.join(","));
|
|
432
|
+
}
|
|
433
|
+
return params.toString();
|
|
434
|
+
}
|
package/lib/cjs/index.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
// Unauthorized use outside the Halix platform is prohibited.
|
|
9
9
|
// Full license terms available in the LICENSE file.
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.
|
|
12
|
-
exports.debounceFn = exports.getValueFromObject = void 0;
|
|
11
|
+
exports.getAggregateDataAsObservable = exports.getAggregateData = exports.AggregationResponse = exports.massDeleteAsObservable = exports.massDelete = exports.massEditAsObservable = exports.massEdit = exports.getListDataAsObservable = exports.getListData = exports.getOrganizationPreferenceAsObservable = exports.getUserPreferenceAsObservable = exports.getOrganizationPreference = exports.getUserPreference = exports.sendMessageAsObservable = exports.sendMessage = exports.MessageMethod = exports.createOrUpdateResourceAsObservable = exports.createOrUpdateResource = exports.sendFileContentsAsObservable = exports.sendFileContents = exports.saveResourceAsObservable = exports.saveResource = exports.getOrCreateResourceAsObservable = exports.getOrCreateResource = exports.deleteRelatedObjectsAsObservable = exports.deleteRelatedObjects = exports.deleteRelatedObjectAsObservable = exports.deleteRelatedObject = exports.saveRelatedObjectAsObservable = exports.saveRelatedObject = exports.saveObjectAsObservable = exports.saveObject = exports.getObjectsByKeysAsObservable = exports.getObjectsByKeys = exports.getAccessibleObjectsAsObservable = exports.getAccessibleObjects = exports.getRelatedObjectsAsObservable = exports.getRelatedObjects = exports.getObjectAsObservable = exports.getObject = exports.prepareErrorResponse = exports.prepareSuccessResponse = exports.initialize = exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.getAuthToken = void 0;
|
|
12
|
+
exports.debounceFn = exports.getValueFromObject = exports.compareValues = exports.sortObjectArray = exports.sendAIMessageAsObservable = exports.sendAIMessage = exports.submitStandalonePaymentAsObservable = exports.submitStandalonePayment = void 0;
|
|
13
13
|
/**
|
|
14
14
|
* @module @halix/action-sdk
|
|
15
15
|
* @description Halix Platform action SDK for developing NodeJS Lambda-based actions on the Halix
|
|
@@ -43,7 +43,11 @@ Object.defineProperty(exports, "getRelatedObjects", { enumerable: true, get: fun
|
|
|
43
43
|
Object.defineProperty(exports, "getRelatedObjectsAsObservable", { enumerable: true, get: function () { return data_crud_1.getRelatedObjectsAsObservable; } });
|
|
44
44
|
Object.defineProperty(exports, "getAccessibleObjects", { enumerable: true, get: function () { return data_crud_1.getAccessibleObjects; } });
|
|
45
45
|
Object.defineProperty(exports, "getAccessibleObjectsAsObservable", { enumerable: true, get: function () { return data_crud_1.getAccessibleObjectsAsObservable; } });
|
|
46
|
+
Object.defineProperty(exports, "getObjectsByKeys", { enumerable: true, get: function () { return data_crud_1.getObjectsByKeys; } });
|
|
47
|
+
Object.defineProperty(exports, "getObjectsByKeysAsObservable", { enumerable: true, get: function () { return data_crud_1.getObjectsByKeysAsObservable; } });
|
|
46
48
|
// Data Save
|
|
49
|
+
Object.defineProperty(exports, "saveObject", { enumerable: true, get: function () { return data_crud_1.saveObject; } });
|
|
50
|
+
Object.defineProperty(exports, "saveObjectAsObservable", { enumerable: true, get: function () { return data_crud_1.saveObjectAsObservable; } });
|
|
47
51
|
Object.defineProperty(exports, "saveRelatedObject", { enumerable: true, get: function () { return data_crud_1.saveRelatedObject; } });
|
|
48
52
|
Object.defineProperty(exports, "saveRelatedObjectAsObservable", { enumerable: true, get: function () { return data_crud_1.saveRelatedObjectAsObservable; } });
|
|
49
53
|
// Data Delete
|
|
@@ -103,6 +107,13 @@ Object.defineProperty(exports, "AggregationResponse", { enumerable: true, get: f
|
|
|
103
107
|
Object.defineProperty(exports, "getAggregateData", { enumerable: true, get: function () { return data_aggregate_1.getAggregateData; } });
|
|
104
108
|
Object.defineProperty(exports, "getAggregateDataAsObservable", { enumerable: true, get: function () { return data_aggregate_1.getAggregateDataAsObservable; } });
|
|
105
109
|
// ================================================================================
|
|
110
|
+
// PAYMENT FUNCTIONS
|
|
111
|
+
// ================================================================================
|
|
112
|
+
var payments_1 = require("./payments");
|
|
113
|
+
// Functions
|
|
114
|
+
Object.defineProperty(exports, "submitStandalonePayment", { enumerable: true, get: function () { return payments_1.submitStandalonePayment; } });
|
|
115
|
+
Object.defineProperty(exports, "submitStandalonePaymentAsObservable", { enumerable: true, get: function () { return payments_1.submitStandalonePaymentAsObservable; } });
|
|
116
|
+
// ================================================================================
|
|
106
117
|
// AI FUNCTIONS
|
|
107
118
|
// ================================================================================
|
|
108
119
|
var ai_1 = require("./ai");
|
package/lib/cjs/lists.js
CHANGED
|
@@ -51,11 +51,50 @@ const sdk_general_1 = require("./sdk-general");
|
|
|
51
51
|
/**
|
|
52
52
|
* Retrieves paginated list data. Supports authenticated/public access, filtering, sorting, and binary search.
|
|
53
53
|
*
|
|
54
|
+
* Common usage:
|
|
55
|
+
* - For most custom-element list UIs, start with only `dataElementId`, pagination fields,
|
|
56
|
+
* and `displayFields`.
|
|
57
|
+
* - Omit `parentDataElementId` and `parentKey` when you want the records the current user
|
|
58
|
+
* can already access.
|
|
59
|
+
* - Add `parentDataElementId` and `parentKey` only when the list must be anchored to a
|
|
60
|
+
* specific parent record.
|
|
61
|
+
* - Most callers should omit `options`. Use `options.search` only for binary-search
|
|
62
|
+
* navigation scenarios, and use `options.bypassTotal` only when you explicitly do not
|
|
63
|
+
* need the total count.
|
|
64
|
+
*
|
|
65
|
+
* Request shape:
|
|
66
|
+
* - `dataElementId` (required): root data element to retrieve
|
|
67
|
+
* - `pageNumber` / `pageSize` (optional): pagination
|
|
68
|
+
* - `displayFields` (optional): fields to populate in returned objects
|
|
69
|
+
* - `sort` (optional): sort fields such as `[{ attributeId: 'name' }]`
|
|
70
|
+
* - `filter` (optional): filter expression
|
|
71
|
+
* - `parentDataElementId` / `parentKey` (optional): explicit parent scope
|
|
72
|
+
*
|
|
54
73
|
* @param request - List configuration including dataElementId, parentDataElementId, parentKey, pagination, sort, filter
|
|
55
74
|
* @param options - Optional: isPublic, bypassTotal, search
|
|
56
75
|
* @returns Promise<ListDataResponse> with data array, total count, pageNumber
|
|
57
76
|
*
|
|
58
77
|
* @example
|
|
78
|
+
* // Most common case: one page of records the current user can access.
|
|
79
|
+
* const response = await getListData({
|
|
80
|
+
* dataElementId: 'student',
|
|
81
|
+
* pageNumber: 1,
|
|
82
|
+
* pageSize: 10,
|
|
83
|
+
* displayFields: ['name', 'studentNumber', 'email', 'grade']
|
|
84
|
+
* });
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* // Custom element pagination with an optional sort.
|
|
88
|
+
* const response = await getListData({
|
|
89
|
+
* dataElementId: 'student',
|
|
90
|
+
* pageNumber: currentPage,
|
|
91
|
+
* pageSize: 10,
|
|
92
|
+
* displayFields: ['name', 'studentNumber', 'email', 'grade'],
|
|
93
|
+
* sort: [{ attributeId: 'name' }]
|
|
94
|
+
* });
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* // Explicit parent scoping when the list must be anchored to a specific parent.
|
|
59
98
|
* const listData = await getListData({
|
|
60
99
|
* dataElementId: 'customer',
|
|
61
100
|
* parentDataElementId: 'company',
|
|
@@ -64,6 +103,24 @@ const sdk_general_1 = require("./sdk-general");
|
|
|
64
103
|
* pageSize: 50,
|
|
65
104
|
* displayFields: ['firstName', 'lastName', 'email']
|
|
66
105
|
* });
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* // options is rarely needed; omit it unless you need one of these behaviors.
|
|
109
|
+
* const response = await getListData(
|
|
110
|
+
* {
|
|
111
|
+
* dataElementId: 'student',
|
|
112
|
+
* pageNumber: 1,
|
|
113
|
+
* pageSize: 10,
|
|
114
|
+
* displayFields: ['name']
|
|
115
|
+
* },
|
|
116
|
+
* {
|
|
117
|
+
* search: {
|
|
118
|
+
* attributeId: 'name',
|
|
119
|
+
* value: 'Ada',
|
|
120
|
+
* total: 100
|
|
121
|
+
* }
|
|
122
|
+
* }
|
|
123
|
+
* );
|
|
67
124
|
*/
|
|
68
125
|
function getListData(request, options) {
|
|
69
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Halix SDK License v1.0
|
|
3
|
+
// Copyright (c) 2025 halix.io LLC.
|
|
4
|
+
//
|
|
5
|
+
// This source code is licensed for use **only** within applications
|
|
6
|
+
// running on the Halix platform, in accordance with Halix SDK guidelines.
|
|
7
|
+
//
|
|
8
|
+
// Unauthorized use outside the Halix platform is prohibited.
|
|
9
|
+
// Full license terms available in the LICENSE file.
|
|
10
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
11
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
12
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
13
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
14
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
15
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
16
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
20
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
|
+
};
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.submitStandalonePayment = submitStandalonePayment;
|
|
24
|
+
exports.submitStandalonePaymentAsObservable = submitStandalonePaymentAsObservable;
|
|
25
|
+
/**
|
|
26
|
+
* @module @halix/action-sdk/payments
|
|
27
|
+
* @description Payment completion helpers for the Halix Platform action SDK. This module provides
|
|
28
|
+
* a wrapper around the `standalonePayment` backend route, which finalizes a payment after a gateway
|
|
29
|
+
* component has already produced a preauthorization result.
|
|
30
|
+
*
|
|
31
|
+
* Typical flow:
|
|
32
|
+
* 1. Client/UI code collects payment details and obtains a gateway preauth result.
|
|
33
|
+
* 2. Action code calls `submitStandalonePayment(...)` with the payer, payee, host object, and preauth result.
|
|
34
|
+
* 3. The platform completes the payment, updates the host object's payment summary field, and optionally
|
|
35
|
+
* generates a sales transaction.
|
|
36
|
+
*/
|
|
37
|
+
const axios_1 = __importDefault(require("axios"));
|
|
38
|
+
const rxjs_1 = require("rxjs");
|
|
39
|
+
const sdk_general_1 = require("./sdk-general");
|
|
40
|
+
const STANDALONE_PAYMENT_URL = 'payments/sandboxes/:sandboxKey/standalonePayment';
|
|
41
|
+
const ASSUMED_PAYER_TYPE = 'SolutionUserProxy';
|
|
42
|
+
const ASSUMED_PAYMENT_GATEWAY = 'stripe';
|
|
43
|
+
const BANK_ACCOUNT_PAYMENT_METHODS = new Set(['us_bank_account', 'USBankAccount', 'bankAccount']);
|
|
44
|
+
function resolveBankAccountPayment(request) {
|
|
45
|
+
var _a;
|
|
46
|
+
if (request.bankAccountPayment !== undefined) {
|
|
47
|
+
return request.bankAccountPayment;
|
|
48
|
+
}
|
|
49
|
+
return BANK_ACCOUNT_PAYMENT_METHODS.has(((_a = request.preAuthResult) === null || _a === void 0 ? void 0 : _a.paymentMethod) || '');
|
|
50
|
+
}
|
|
51
|
+
function resolveOrganizationKey() {
|
|
52
|
+
const organizationKey = sdk_general_1.userContext === null || sdk_general_1.userContext === void 0 ? void 0 : sdk_general_1.userContext.orgKey;
|
|
53
|
+
if (!organizationKey) {
|
|
54
|
+
throw new Error('userContext.orgKey is required for standalone payments; check that initialize(event) has been called with a full userContext');
|
|
55
|
+
}
|
|
56
|
+
return organizationKey;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Completes a previously preauthorized standalone payment.
|
|
60
|
+
*
|
|
61
|
+
* This endpoint performs the final charge, updates the host object's payment summary attribute,
|
|
62
|
+
* persists billing address information back to the payer, and can optionally generate a linked
|
|
63
|
+
* sales transaction.
|
|
64
|
+
*/
|
|
65
|
+
function submitStandalonePayment(request) {
|
|
66
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
+
if (!sdk_general_1.getAuthToken) {
|
|
68
|
+
const errorMessage = 'SDK not initialized.';
|
|
69
|
+
console.error(errorMessage);
|
|
70
|
+
throw new Error(errorMessage);
|
|
71
|
+
}
|
|
72
|
+
const url = `${sdk_general_1.serviceAddress}/${STANDALONE_PAYMENT_URL.replace(':sandboxKey', sdk_general_1.sandboxKey)}`;
|
|
73
|
+
const authToken = yield (0, rxjs_1.lastValueFrom)((0, sdk_general_1.getAuthToken)());
|
|
74
|
+
const payload = Object.assign(Object.assign({}, request), { organizationKey: resolveOrganizationKey(), payerType: ASSUMED_PAYER_TYPE, bankAccountPayment: resolveBankAccountPayment(request), preAuthResult: Object.assign({ paymentGateway: ASSUMED_PAYMENT_GATEWAY }, request.preAuthResult) });
|
|
75
|
+
console.log('Sending POST request to ' + url + ' with token ' + authToken);
|
|
76
|
+
const response = yield axios_1.default.post(url, payload, {
|
|
77
|
+
headers: { Authorization: `Bearer ${authToken}` },
|
|
78
|
+
});
|
|
79
|
+
return response.data;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Observable version of submitStandalonePayment. See submitStandalonePayment for details.
|
|
84
|
+
*/
|
|
85
|
+
function submitStandalonePaymentAsObservable(request) {
|
|
86
|
+
return (0, rxjs_1.from)(submitStandalonePayment(request));
|
|
87
|
+
}
|
|
@@ -5,7 +5,10 @@ import { Observable } from 'rxjs';
|
|
|
5
5
|
export interface SaveOptions {
|
|
6
6
|
/** Whether to bypass validation */
|
|
7
7
|
bypassValidation?: boolean;
|
|
8
|
+
/** Optional relationships to include as nested objects in the saved response */
|
|
9
|
+
fetchedRelationships?: string[];
|
|
8
10
|
}
|
|
11
|
+
type SaveBody = string | object;
|
|
9
12
|
/**
|
|
10
13
|
* Retrieves a single object by dataElementId and key. Optionally fetch related objects.
|
|
11
14
|
*
|
|
@@ -46,20 +49,49 @@ export declare function getAccessibleObjects(dataElementId: string, filter?: str
|
|
|
46
49
|
*/
|
|
47
50
|
export declare function getAccessibleObjectsAsObservable(dataElementId: string, filter?: string, fetchedRelationships?: string[], applyContext?: boolean): Observable<any[]>;
|
|
48
51
|
/**
|
|
49
|
-
*
|
|
52
|
+
* Retrieves accessible objects for a data element from a specific key list.
|
|
53
|
+
* Only objects that are accessible to the current user are returned. If applyContext is true, keyed objects outside the current navigation context are also omitted.
|
|
54
|
+
*
|
|
55
|
+
* @param dataElementId - Data element ID
|
|
56
|
+
* @param keys - Object keys to retrieve
|
|
57
|
+
* @param filter - Optional filter; call `dataexpr_agent` to generate the filter expression. Must be less than 200 characters.
|
|
58
|
+
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
59
|
+
* @param applyContext - Optional flag to apply navigation context scoping. When true, navigation context is read from UserContext.navigationContext and results are limited by the navigation context org proxy.
|
|
60
|
+
* @returns Promise<any[]>
|
|
61
|
+
*/
|
|
62
|
+
export declare function getObjectsByKeys(dataElementId: string, keys: string[], filter?: string, fetchedRelationships?: string[], applyContext?: boolean): Promise<any[]>;
|
|
63
|
+
/**
|
|
64
|
+
* Observable version of getObjectsByKeys. See getObjectsByKeys for details.
|
|
65
|
+
*/
|
|
66
|
+
export declare function getObjectsByKeysAsObservable(dataElementId: string, keys: string[], filter?: string, fetchedRelationships?: string[], applyContext?: boolean): Observable<any[]>;
|
|
67
|
+
/**
|
|
68
|
+
* Saves an object without establishing a parent relationship. Returns saved object with any server-assigned values (objKey, calculated fields).
|
|
69
|
+
*
|
|
70
|
+
* @param dataElementId - Data element ID for the object being saved
|
|
71
|
+
* @param objectToSave - Object data or JSON string of object data
|
|
72
|
+
* @param opts - Optional save options (e.g., bypassValidation, fetchedRelationships)
|
|
73
|
+
* @returns Promise<any> - saved object with updates including server-assigned values (objKey, calculated fields)
|
|
74
|
+
*/
|
|
75
|
+
export declare function saveObject(dataElementId: string, objectToSave: SaveBody, opts?: SaveOptions): Promise<any>;
|
|
76
|
+
/**
|
|
77
|
+
* Observable version of saveObject. See saveObject for details.
|
|
78
|
+
*/
|
|
79
|
+
export declare function saveObjectAsObservable(dataElementId: string, objectToSave: SaveBody, opts?: SaveOptions): Observable<any>;
|
|
80
|
+
/**
|
|
81
|
+
* Saves a related object and establishes or updates its relationship to a parent. Returns saved object with any server-assigned values (objKey, calculated fields).
|
|
50
82
|
*
|
|
51
83
|
* @param parentElementId - Parent element ID
|
|
52
84
|
* @param parentKey - Parent object key; important: this establishes the scope of the save operation; use an appropriate scope Key
|
|
53
85
|
* @param elementId - Child element ID for the object being saved
|
|
54
|
-
* @param objectToSave - JSON string of object data
|
|
55
|
-
* @param opts - Optional save options (e.g., bypassValidation)
|
|
86
|
+
* @param objectToSave - Object data or JSON string of object data
|
|
87
|
+
* @param opts - Optional save options (e.g., bypassValidation, fetchedRelationships)
|
|
56
88
|
* @returns Promise<any> - saved object with updates including server-assigned values (objKey, calculated fields)
|
|
57
89
|
*/
|
|
58
|
-
export declare function saveRelatedObject(parentElementId: string, parentKey: string, elementId: string, objectToSave:
|
|
90
|
+
export declare function saveRelatedObject(parentElementId: string, parentKey: string, elementId: string, objectToSave: SaveBody, opts?: SaveOptions): Promise<any>;
|
|
59
91
|
/**
|
|
60
92
|
* Observable version of saveRelatedObject. See saveRelatedObject for details.
|
|
61
93
|
*/
|
|
62
|
-
export declare function saveRelatedObjectAsObservable(parentElementId: string, parentKey: string, elementId: string, objectToSave:
|
|
94
|
+
export declare function saveRelatedObjectAsObservable(parentElementId: string, parentKey: string, elementId: string, objectToSave: SaveBody, opts?: SaveOptions): Observable<any>;
|
|
63
95
|
/**
|
|
64
96
|
* Deletes a single object related to a parent.
|
|
65
97
|
*
|
|
@@ -81,4 +113,5 @@ export declare function deleteRelatedObjects(parentElementId: string, parentKey:
|
|
|
81
113
|
* Observable version of deleteRelatedObjects. See deleteRelatedObjects for details.
|
|
82
114
|
*/
|
|
83
115
|
export declare function deleteRelatedObjectsAsObservable(parentElementId: string, parentKey: string, childElementId: string, childKeys: string[]): Observable<boolean>;
|
|
116
|
+
export {};
|
|
84
117
|
//# sourceMappingURL=data-crud.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-crud.d.ts","sourceRoot":"","sources":["../../../src/data-crud.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data-crud.d.ts","sourceRoot":"","sources":["../../../src/data-crud.ts"],"names":[],"mappings":"AAgFA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AAOvD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gFAAgF;IAChF,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACnC;AAED,KAAK,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAMhC;;;;GAIG;AACH,wBAAsB,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,gBA6BlG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,CAE1H;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS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AEG;AACH,wBAAgB,gCAAgC,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAE7J"}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* platform. This is the main entry point that provides a unified interface for all SDK functionality.
|
|
5
5
|
*/
|
|
6
6
|
export { getAuthToken, sandboxKey, serviceAddress, actionSubject, userContext, params, useBody, initialize, type UserContext, type IncomingEventBody, type BaseActionResponse, type ActionResponse, type NotificationConfig, type ListActionResponse, type FormTemplateActionResponse, type PageTemplateActionResponse, type ObjectSaveActionResponse, type CalculatedFieldActionResponse, type SingleValueActionResponse, type ErrorResponse, prepareSuccessResponse, prepareErrorResponse } from './sdk-general';
|
|
7
|
-
export { type SaveOptions, getObject, getObjectAsObservable, getRelatedObjects, getRelatedObjectsAsObservable, getAccessibleObjects, getAccessibleObjectsAsObservable, saveRelatedObject, saveRelatedObjectAsObservable, deleteRelatedObject, deleteRelatedObjectAsObservable, deleteRelatedObjects, deleteRelatedObjectsAsObservable } from './data-crud';
|
|
7
|
+
export { type SaveOptions, getObject, getObjectAsObservable, getRelatedObjects, getRelatedObjectsAsObservable, getAccessibleObjects, getAccessibleObjectsAsObservable, getObjectsByKeys, getObjectsByKeysAsObservable, saveObject, saveObjectAsObservable, saveRelatedObject, saveRelatedObjectAsObservable, deleteRelatedObject, deleteRelatedObjectAsObservable, deleteRelatedObjects, deleteRelatedObjectsAsObservable } from './data-crud';
|
|
8
8
|
export { type ContentResource, getOrCreateResource, getOrCreateResourceAsObservable, saveResource, saveResourceAsObservable, sendFileContents, sendFileContentsAsObservable, createOrUpdateResource, createOrUpdateResourceAsObservable } from './content';
|
|
9
9
|
export { MessageMethod, type MessageRequest, sendMessage, sendMessageAsObservable } from './messaging';
|
|
10
10
|
export { getUserPreference, getOrganizationPreference, getUserPreferenceAsObservable, getOrganizationPreferenceAsObservable } from './preferences';
|
|
11
11
|
export { type SortField, type DataSortField, type BaseListDataRequest, type PagedListDataRequest, type ListDataResponse, type ListDataOptions, type ListDataSearchOptions, type MassEditValueType, type MassEditRequest, type MassDeleteRequest, type MassChangeResponse, getListData, getListDataAsObservable, massEdit, massEditAsObservable, massDelete, massDeleteAsObservable } from './lists';
|
|
12
12
|
export { AggregationResponse, type AggregationRequest, type AggregationRow, type AggregationGroup, type AggregationSort, type Aggregation, type AggregationGroupTransform, type TransformType, type AggregationType, getAggregateData, getAggregateDataAsObservable } from './data-aggregate';
|
|
13
|
+
export { type GatewayPaymentPreauthResult, type StandalonePaymentRequest, type StandalonePaymentResult, submitStandalonePayment, submitStandalonePaymentAsObservable } from './payments';
|
|
13
14
|
export { type AIRequestOptions, sendAIMessage, sendAIMessageAsObservable } from './ai';
|
|
14
15
|
export { sortObjectArray, compareValues, getValueFromObject, debounceFn } from './utilities';
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AASA;;;;GAIG;AAMH,OAAO,EAEH,YAAY,EACZ,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,MAAM,EACN,OAAO,EAGP,UAAU,EAGV,KAAK,WAAW,EAChB,KAAK,iBAAiB,EAGtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAGlB,sBAAsB,EACtB,oBAAoB,EACvB,MAAM,eAAe,CAAC;AAMvB,OAAO,EAEH,KAAK,WAAW,EAGhB,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,EA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