@halix/action-sdk 1.0.51 → 1.0.53
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/data-aggregate.js +27 -2
- package/lib/cjs/data-crud.js +30 -12
- package/lib/cjs/filter-expression.js +10 -0
- package/lib/cjs/index.js +10 -1
- package/lib/cjs/invoices.js +70 -0
- package/lib/cjs/lists.js +74 -15
- package/lib/cjs/types/data-aggregate.d.ts +20 -10
- package/lib/cjs/types/data-aggregate.d.ts.map +1 -1
- package/lib/cjs/types/data-crud.d.ts +10 -9
- package/lib/cjs/types/data-crud.d.ts.map +1 -1
- package/lib/cjs/types/filter-expression.d.ts +22 -0
- package/lib/cjs/types/filter-expression.d.ts.map +1 -0
- package/lib/cjs/types/index.d.ts +2 -0
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/invoices.d.ts +72 -0
- package/lib/cjs/types/invoices.d.ts.map +1 -0
- package/lib/cjs/types/lists.d.ts +80 -29
- package/lib/cjs/types/lists.d.ts.map +1 -1
- package/lib/cjs/types/sdk-general.d.ts +25 -0
- package/lib/cjs/types/sdk-general.d.ts.map +1 -1
- package/lib/esm/data-aggregate.js +23 -2
- package/lib/esm/data-aggregate.js.map +1 -1
- package/lib/esm/data-crud.js +30 -12
- package/lib/esm/data-crud.js.map +1 -1
- package/lib/esm/filter-expression.js +10 -0
- package/lib/esm/filter-expression.js.map +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +4 -0
- package/lib/esm/invoices.js +43 -0
- package/lib/esm/invoices.js.map +1 -0
- package/lib/esm/lists.js +72 -15
- package/lib/esm/lists.js.map +1 -1
- package/lib/esm/sdk-general.js.map +1 -1
- package/lib/esm/types/data-aggregate.d.ts +20 -10
- package/lib/esm/types/data-crud.d.ts +10 -9
- package/lib/esm/types/filter-expression.d.ts +21 -0
- package/lib/esm/types/index.d.ts +2 -0
- package/lib/esm/types/invoices.d.ts +71 -0
- package/lib/esm/types/lists.d.ts +80 -29
- package/lib/esm/types/sdk-general.d.ts +25 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Halix data filter expression language string.
|
|
3
|
+
*
|
|
4
|
+
* This is not SQL, JavaScript, or an arbitrary query-string syntax. Use the
|
|
5
|
+
* `build_filter_expression` agent tool to generate filter expressions for SDK
|
|
6
|
+
* calls, list reads, aggregate queries, choosers, and generated TypeScript.
|
|
7
|
+
*
|
|
8
|
+
* Filter expressions are evaluated by Halix services within the request's
|
|
9
|
+
* normal data-access scope. Most filter parameters must be less than 200
|
|
10
|
+
* characters.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // Boolean comparison
|
|
14
|
+
* const filter: FilterExpression = "archive!=boolean:true";
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Date and key comparisons
|
|
18
|
+
* const filter: FilterExpression =
|
|
19
|
+
* "(endDate >= date:2025-06-12) AND (courseKey=string:crs~00~abc)";
|
|
20
|
+
*/
|
|
21
|
+
export type FilterExpression = string;
|
|
22
|
+
//# sourceMappingURL=filter-expression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-expression.d.ts","sourceRoot":"","sources":["../../../src/filter-expression.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC"}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
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 FilterExpression } from './filter-expression';
|
|
7
8
|
export { type SaveOptions, getObject, getObjectAsObservable, getRelatedObjects, getRelatedObjectsAsObservable, getAccessibleObjects, getAccessibleObjectsAsObservable, getObjects, getObjectsAsObservable, saveObject, saveObjectAsObservable, saveRelatedObject, saveRelatedObjectAsObservable, deleteObject, deleteObjectAsObservable, deleteRelatedObject, deleteRelatedObjectAsObservable, deleteRelatedObjects, deleteRelatedObjectsAsObservable } from './data-crud';
|
|
8
9
|
export { type ScopeKeyItem, type Role, type BusinessPrivilege, type SandboxUser, type UserAccessWrapper, type LinkUserProxyRequest, type UserProxyAccessRosterRow, type ListUserProxyAccessRosterOptions, type InviteOrLinkUserProxyByEmailRequest, type InviteOrLinkUserProxyAction, type InviteOrLinkUserProxyResult, type SetUserProxyRosterRolesRequest, type UpdateAccessRequest, type BusinessPrivilegeCheckResult, type CurrentBusinessPrivilegesResult, type DataElementAccessMode, type DataElementAccessResult, listRoles, listRolesAsObservable, listBusinessPrivileges, listBusinessPrivilegesAsObservable, listSandboxUsers, listSandboxUsersAsObservable, getUserAccess, getUserAccessAsObservable, linkUserProxy, linkUserProxyAsObservable, listUserProxyAccessRoster, listUserProxyAccessRosterAsObservable, inviteOrLinkUserProxyByEmail, inviteOrLinkUserProxyByEmailAsObservable, setUserProxyRosterRoles, setUserProxyRosterRolesAsObservable, removeUserProxyRosterAccess, removeUserProxyRosterAccessAsObservable, updateUserAccess, updateUserAccessAsObservable, removeUserAccess, removeUserAccessAsObservable, hasBusinessPrivilege, hasBusinessPrivilegeAsObservable, userPrivileges, userPrivilegesAsObservable, dataElementAccess, dataElementAccessAsObservable, hasDataElementAccess, hasDataElementAccessAsObservable, canReadDataElement, canReadDataElementAsObservable, canWriteDataElement, canWriteDataElementAsObservable, canDeleteDataElement, canDeleteDataElementAsObservable, } from './access';
|
|
9
10
|
export { type ContentResource, getOrCreateResource, getOrCreateResourceAsObservable, saveResource, saveResourceAsObservable, sendFileContents, sendFileContentsAsObservable, createOrUpdateResource, createOrUpdateResourceAsObservable, downloadResource, downloadResourceAsObservable } from './content';
|
|
@@ -12,6 +13,7 @@ export { getUserPreference, getOrganizationPreference, getUserPreferenceAsObserv
|
|
|
12
13
|
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';
|
|
13
14
|
export { AggregationResponse, type AggregationRequest, type AggregationRow, type AggregationGroup, type AggregationSort, type Aggregation, type AggregationGroupTransform, type TransformType, type AggregationType, getAggregateData, getAggregateDataAsObservable } from './data-aggregate';
|
|
14
15
|
export { type GatewayPaymentPreauthResult, type StandalonePaymentRequest, type StandalonePaymentResult, submitStandalonePayment, submitStandalonePaymentAsObservable } from './payments';
|
|
16
|
+
export { type InvoiceDueItem, type PayerInvoiceGroup, type ReminderMatchCriteria, type PaymentReminderRecord, type ChannelCoverage, getEnabledPaymentReminders, getInvoicesMatchingReminder, listEnrolledOrganizations, getReminderDeliveryCoverage } from './invoices';
|
|
15
17
|
export { type AIRequestOptions, sendAIMessage, sendAIMessageAsObservable } from './ai';
|
|
16
18
|
export { sortObjectArray, compareValues, getValueFromObject, debounceFn } from './utilities';
|
|
17
19
|
//# 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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gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAGvB,WAAW,EACX,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,sBAAsB,EACzB,MAAM,SAAS,CAAC;AAMjB,OAAO,EAEH,mBAAmB,EAGnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,eAAe,EAGpB,gBAAgB,EAChB,4BAA4B,EAC/B,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAEH,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAG5B,uBAAuB,EACvB,mCAAmC,EACtC,MAAM,YAAY,CAAC;AAMpB,OAAO,EACH,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC9B,MAAM,YAAY,CAAC;AAMpB,OAAO,EAEH,KAAK,gBAAgB,EAGrB,aAAa,EACb,yBAAyB,EAC5B,MAAM,MAAM,CAAC;AAMd,OAAO,EACH,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,UAAU,EACb,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export interface InvoiceDueItem {
|
|
2
|
+
/** Invoice (sales transaction) key. */
|
|
3
|
+
invoiceKey: string;
|
|
4
|
+
/** User-facing invoice ID from the SalesTransaction id field. */
|
|
5
|
+
invoiceId: string;
|
|
6
|
+
/** Backwards-compatible alias for invoiceId. */
|
|
7
|
+
invoiceNumber: string;
|
|
8
|
+
/** User-facing description, e.g. "Down payment on Tuition Kindergarten SY26-27". */
|
|
9
|
+
description: string;
|
|
10
|
+
/** Due date — either the invoice's top-level dueDate or an installment's dueDate. */
|
|
11
|
+
dueDate: string;
|
|
12
|
+
/** Due date formatted for message display as M/d/yyyy. */
|
|
13
|
+
dueDateDisplay: string;
|
|
14
|
+
/** When the matching due date came from an installment, the 0-based index in installmentItems. */
|
|
15
|
+
installmentIndex?: number;
|
|
16
|
+
/** Amount remaining for this invoice/installment. */
|
|
17
|
+
amountDue: number;
|
|
18
|
+
/** Line-item summaries suitable for inclusion in a reminder message. */
|
|
19
|
+
lineItems: Array<{
|
|
20
|
+
description: string;
|
|
21
|
+
quantity: number;
|
|
22
|
+
amount: number;
|
|
23
|
+
}>;
|
|
24
|
+
}
|
|
25
|
+
export interface PayerInvoiceGroup {
|
|
26
|
+
payerKey: string;
|
|
27
|
+
payerType: string;
|
|
28
|
+
payerName: string;
|
|
29
|
+
items: InvoiceDueItem[];
|
|
30
|
+
totalBalance: number;
|
|
31
|
+
}
|
|
32
|
+
export interface ReminderMatchCriteria {
|
|
33
|
+
sendType: 'specificDates' | 'dueDateRelative';
|
|
34
|
+
specificDates?: string[];
|
|
35
|
+
dueDateOffsets?: number[];
|
|
36
|
+
}
|
|
37
|
+
export interface PaymentReminderRecord {
|
|
38
|
+
objKey: string;
|
|
39
|
+
organizationKey: string;
|
|
40
|
+
sandboxKey: string;
|
|
41
|
+
name: string;
|
|
42
|
+
enabled: boolean;
|
|
43
|
+
previewMode?: boolean;
|
|
44
|
+
channel: 'email' | 'sms' | 'both';
|
|
45
|
+
emailSubject?: string;
|
|
46
|
+
emailBody?: string;
|
|
47
|
+
smsBody?: string;
|
|
48
|
+
sendType: 'specificDates' | 'dueDateRelative';
|
|
49
|
+
specificDates?: string[];
|
|
50
|
+
dueDateOffsets?: number[];
|
|
51
|
+
bccEmail?: string;
|
|
52
|
+
}
|
|
53
|
+
export type ChannelCoverage = 'covered' | 'retryable' | 'unsent';
|
|
54
|
+
export declare function getEnabledPaymentReminders(orgKey: string): Promise<PaymentReminderRecord[]>;
|
|
55
|
+
export declare function getInvoicesMatchingReminder(orgKey: string, criteria: ReminderMatchCriteria, today: string): Promise<PayerInvoiceGroup[]>;
|
|
56
|
+
export declare function listEnrolledOrganizations(solutionKey: string): Promise<{
|
|
57
|
+
orgKey: string;
|
|
58
|
+
orgProxyKey: string;
|
|
59
|
+
orgProxyType: string;
|
|
60
|
+
orgName: string;
|
|
61
|
+
timezone?: string;
|
|
62
|
+
}[]>;
|
|
63
|
+
export declare function getReminderDeliveryCoverage(args: {
|
|
64
|
+
reminderKey: string;
|
|
65
|
+
payerKey: string;
|
|
66
|
+
organizationProxyKey: string;
|
|
67
|
+
organizationProxyType?: string;
|
|
68
|
+
dayStart: string;
|
|
69
|
+
nextDayStart: string;
|
|
70
|
+
channels: ('email' | 'sms')[];
|
|
71
|
+
}): Promise<Record<'email' | 'sms', ChannelCoverage>>;
|
|
72
|
+
//# sourceMappingURL=invoices.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/invoices.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,cAAc;IAC3B,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,aAAa,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,WAAW,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,kGAAkG;IAClG,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,EAAE,KAAK,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM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AE,CAAC,CAI9B;AAED,wBAAsB,yBAAyB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,CAAC,CAIjL;AAED,wBAAsB,2BAA2B,CAAC,IAAI,EAAE;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,CAAC,OAAO,GAAG,KAAK,CAAC,EAAE,CAAC;CACjC,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,GAAG,KAAK,EAAE,eAAe,CAAC,CAAC,CAIpD"}
|
package/lib/cjs/types/lists.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import type { FilterExpression } from './filter-expression';
|
|
2
3
|
/**
|
|
3
4
|
* SortField is an interface for specifying sort fields.
|
|
4
5
|
*/
|
|
@@ -64,21 +65,21 @@ export interface BaseListDataRequest {
|
|
|
64
65
|
*/
|
|
65
66
|
childKeysField?: string;
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
-
* Call `
|
|
69
|
-
* Must be less than 200 characters.
|
|
68
|
+
* Halix filter expression to limit results. Evaluated within the parent key scope.
|
|
69
|
+
* This is not SQL or JavaScript syntax. Call `build_filter_expression` to generate
|
|
70
|
+
* the filter expression. Must be less than 200 characters.
|
|
70
71
|
*/
|
|
71
|
-
filter?:
|
|
72
|
+
filter?: FilterExpression;
|
|
72
73
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
*
|
|
74
|
+
* Fields to populate in returned rows. If omitted, rows may contain only `objKey`
|
|
75
|
+
* plus server defaults; every field read from `response.data` should be requested
|
|
76
|
+
* here. Use this same array for visible fields and fields needed by local
|
|
77
|
+
* calculations, joins, grouping, charting, sorting, or conditional rendering.
|
|
78
|
+
*
|
|
79
|
+
* If fields include relationship paths, those relationships are automatically retrieved.
|
|
80
|
+
* The SDK sends this to the list service as `displayFields`.
|
|
80
81
|
*/
|
|
81
|
-
|
|
82
|
+
fields?: string[];
|
|
82
83
|
}
|
|
83
84
|
/**
|
|
84
85
|
* PagedListDataRequest extends BaseListDataRequest with pagination properties.
|
|
@@ -96,14 +97,26 @@ export interface PagedListDataRequest extends BaseListDataRequest {
|
|
|
96
97
|
}
|
|
97
98
|
/**
|
|
98
99
|
* ListDataResponse wraps a data provider response to a list data request.
|
|
100
|
+
*
|
|
101
|
+
* Rows are returned in the `data` array. Do not read `objects`, `items`, or
|
|
102
|
+
* the response object itself as the row array. `total` is the total matching
|
|
103
|
+
* record count across all pages for this request. When `total > data.length`,
|
|
104
|
+
* the current response is only one page of a larger result set.
|
|
99
105
|
*/
|
|
100
|
-
export interface ListDataResponse {
|
|
106
|
+
export interface ListDataResponse<TRecord extends Record<string, unknown> = Record<string, unknown>> {
|
|
101
107
|
/**
|
|
102
|
-
* A
|
|
103
|
-
*
|
|
108
|
+
* A single page of rows for the requested data element. This is the only row array
|
|
109
|
+
* returned by getListData. Properties such as `objects`, `items`, or `list` are not
|
|
110
|
+
* part of the SDK response.
|
|
111
|
+
*/
|
|
112
|
+
data: TRecord[];
|
|
113
|
+
/**
|
|
114
|
+
* The total number of matching entries across all pages for this request.
|
|
115
|
+
* If total is greater than data.length, more pages exist. A caller that is
|
|
116
|
+
* building a complete report/chart must request additional pages, use an
|
|
117
|
+
* aggregate endpoint, narrow the query with filters/key lists, or present
|
|
118
|
+
* the result as a capped/partial view.
|
|
104
119
|
*/
|
|
105
|
-
data: any[];
|
|
106
|
-
/** The total number of entries across all pages */
|
|
107
120
|
total: number;
|
|
108
121
|
/**
|
|
109
122
|
* The index within the data array of the selected row.
|
|
@@ -210,8 +223,14 @@ export interface MassChangeResponse {
|
|
|
210
223
|
* Retrieves paginated list data. Supports authenticated/public access, filtering, sorting, and binary search.
|
|
211
224
|
*
|
|
212
225
|
* Common usage:
|
|
226
|
+
* - Use `getListData` when you are building a paged list UI or list-management workflow:
|
|
227
|
+
* pagination, explicit totals, server-side sort for the visible list, field projection, search, selection,
|
|
228
|
+
* or bulk operations.
|
|
229
|
+
* - Do not choose `getListData` only because the task is a report. Prefer `getAccessibleObjects`
|
|
230
|
+
* for bounded accessible-record reads without list behavior, `getRelatedObjects` when a
|
|
231
|
+
* concrete parent key is already known, or `getAggregateData` for grouped counts/sums.
|
|
213
232
|
* - For most custom-element list UIs, start with only `dataElementId`, pagination fields,
|
|
214
|
-
* and `
|
|
233
|
+
* and `fields`.
|
|
215
234
|
* - Omit `parentDataElementId` and `parentKey` when you want the records the current user
|
|
216
235
|
* can already access.
|
|
217
236
|
* - Add `parentDataElementId` and `parentKey` only when the list must be anchored to a
|
|
@@ -219,48 +238,80 @@ export interface MassChangeResponse {
|
|
|
219
238
|
* - Most callers should omit `options`. Use `options.search` only for binary-search
|
|
220
239
|
* navigation scenarios, and use `options.bypassTotal` only when you explicitly do not
|
|
221
240
|
* need the total count.
|
|
241
|
+
* - Do not use `getListData` as a generic bulk-data loader for reports. Use filtered
|
|
242
|
+
* `getAccessibleObjects`, `getRelatedObjects` with a concrete parent key, or `getAggregateData`
|
|
243
|
+
* whenever those can answer the data need directly.
|
|
244
|
+
* - Do not choose `getListData` only because you need a filter. For non-list report/search reads,
|
|
245
|
+
* use filtered `getAccessibleObjects`, `getRelatedObjects` with a concrete parent key,
|
|
246
|
+
* `getObjects` for explicit key lists, or `getAggregateData`.
|
|
247
|
+
*
|
|
248
|
+
* Response shape:
|
|
249
|
+
* - `response.data` is the row array.
|
|
250
|
+
* - `response.total` is the total matching record count across all pages when
|
|
251
|
+
* requested. If `response.total > response.data.length`, this response is
|
|
252
|
+
* a page slice, not the full result set.
|
|
253
|
+
* - Do not read `response.objects`, `response.items`, or the response object itself as
|
|
254
|
+
* the row array.
|
|
255
|
+
*
|
|
256
|
+
* Pagination guidance:
|
|
257
|
+
* - Use `response.total` to decide whether the current page covers the full
|
|
258
|
+
* query. For page 1 with pageSize 100 and total 5,000, local aggregation over
|
|
259
|
+
* `response.data` covers only the first 100 rows.
|
|
260
|
+
* - Do not treat a first page or large page as complete report data just because
|
|
261
|
+
* it contains rows.
|
|
222
262
|
*
|
|
223
263
|
* Request shape:
|
|
224
264
|
* - `dataElementId` (required): root data element to retrieve
|
|
225
265
|
* - `pageNumber` / `pageSize` (optional): pagination
|
|
226
|
-
* - `
|
|
266
|
+
* - `fields` (optional): fields to populate in returned objects
|
|
227
267
|
* - `sort` (optional): sort fields such as `[{ attributeId: 'name' }]`
|
|
228
268
|
* - `filter` (optional): filter expression
|
|
229
269
|
* - `parentDataElementId` / `parentKey` (optional): explicit parent scope
|
|
230
270
|
*
|
|
231
271
|
* @param request - List configuration including dataElementId, parentDataElementId, parentKey, pagination, sort, filter
|
|
232
272
|
* @param options - Optional: isPublic, bypassTotal, search
|
|
233
|
-
* @returns Promise<ListDataResponse
|
|
273
|
+
* @returns Promise<ListDataResponse<TRecord>> with data array, total count, pageNumber
|
|
234
274
|
*
|
|
235
275
|
* @example
|
|
236
276
|
* // Most common case: one page of records the current user can access.
|
|
237
|
-
*
|
|
277
|
+
* type StudentRow = {
|
|
278
|
+
* name: string;
|
|
279
|
+
* studentNumber: string;
|
|
280
|
+
* email: string;
|
|
281
|
+
* grade: string;
|
|
282
|
+
* };
|
|
283
|
+
* const response = await getListData<StudentRow>({
|
|
238
284
|
* dataElementId: 'student',
|
|
239
285
|
* pageNumber: 1,
|
|
240
286
|
* pageSize: 10,
|
|
241
|
-
*
|
|
287
|
+
* fields: ['name', 'studentNumber', 'email', 'grade']
|
|
242
288
|
* });
|
|
289
|
+
* const rows = response.data;
|
|
243
290
|
*
|
|
244
291
|
* @example
|
|
245
292
|
* // Custom element pagination with an optional sort.
|
|
246
|
-
*
|
|
293
|
+
* type StudentListRow = { name: string; studentNumber: string; email: string; grade: string };
|
|
294
|
+
* const response = await getListData<StudentListRow>({
|
|
247
295
|
* dataElementId: 'student',
|
|
248
296
|
* pageNumber: currentPage,
|
|
249
297
|
* pageSize: 10,
|
|
250
|
-
*
|
|
298
|
+
* fields: ['name', 'studentNumber', 'email', 'grade'],
|
|
251
299
|
* sort: [{ attributeId: 'name' }]
|
|
252
300
|
* });
|
|
301
|
+
* const rows = response.data;
|
|
253
302
|
*
|
|
254
303
|
* @example
|
|
255
304
|
* // Explicit parent scoping when the list must be anchored to a specific parent.
|
|
256
|
-
*
|
|
305
|
+
* type CustomerRow = { firstName: string; lastName: string; email: string };
|
|
306
|
+
* const listData = await getListData<CustomerRow>({
|
|
257
307
|
* dataElementId: 'customer',
|
|
258
308
|
* parentDataElementId: 'company',
|
|
259
309
|
* parentKey: orgProxyKey,
|
|
260
310
|
* pageNumber: 1,
|
|
261
311
|
* pageSize: 50,
|
|
262
|
-
*
|
|
312
|
+
* fields: ['firstName', 'lastName', 'email']
|
|
263
313
|
* });
|
|
314
|
+
* const rows = listData.data;
|
|
264
315
|
*
|
|
265
316
|
* @example
|
|
266
317
|
* // options is rarely needed; omit it unless you need one of these behaviors.
|
|
@@ -269,7 +320,7 @@ export interface MassChangeResponse {
|
|
|
269
320
|
* dataElementId: 'student',
|
|
270
321
|
* pageNumber: 1,
|
|
271
322
|
* pageSize: 10,
|
|
272
|
-
*
|
|
323
|
+
* fields: ['name']
|
|
273
324
|
* },
|
|
274
325
|
* {
|
|
275
326
|
* search: {
|
|
@@ -280,7 +331,7 @@ export interface MassChangeResponse {
|
|
|
280
331
|
* }
|
|
281
332
|
* );
|
|
282
333
|
*/
|
|
283
|
-
export declare function getListData(request: PagedListDataRequest, options?: ListDataOptions): Promise<ListDataResponse
|
|
334
|
+
export declare function getListData<TRecord extends Record<string, unknown> = Record<string, unknown>>(request: PagedListDataRequest, options?: ListDataOptions): Promise<ListDataResponse<TRecord>>;
|
|
284
335
|
/**
|
|
285
336
|
* Observable version of getListData. See getListData for details.
|
|
286
337
|
*
|
|
@@ -288,7 +339,7 @@ export declare function getListData(request: PagedListDataRequest, options?: Lis
|
|
|
288
339
|
* getListDataAsObservable({ dataElementId: 'customer', parentDataElementId: 'company', parentKey: orgProxyKey })
|
|
289
340
|
* .subscribe(response => console.log(response.data));
|
|
290
341
|
*/
|
|
291
|
-
export declare function getListDataAsObservable(request: PagedListDataRequest, options?: ListDataOptions): Observable<ListDataResponse
|
|
342
|
+
export declare function getListDataAsObservable<TRecord extends Record<string, unknown> = Record<string, unknown>>(request: PagedListDataRequest, options?: ListDataOptions): Observable<ListDataResponse<TRecord>>;
|
|
292
343
|
/**
|
|
293
344
|
* Bulk update multiple records. The dataRequest defines security scope; only records within that scope can be updated.
|
|
294
345
|
* Use valueType 'literal' to set a value, or 'property' to copy from another field.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../src/lists.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../src/lists.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAM5D;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,kCAAkC;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,qDAAqD;IACrD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qCAAq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;;;;;;;;;;;;;;;;GA+GG;AACH,wBAAsB,WAAW,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/F,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,eAAe,GAC1B,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAuDpC;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACrG,OAAO,EAAE,oBAAoB,EAC7B,OAAO,CAAC,EAAE,eAAe,GAC1B,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAEvC;AAsCD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAoBpF;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,eAAe,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAE7F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAoBxF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,iBAAiB,GAAG,UAAU,CAAC,kBAAkB,CAAC,CAEjG"}
|
|
@@ -103,12 +103,35 @@ export interface NotificationConfig {
|
|
|
103
103
|
notificationDefinitionId: string;
|
|
104
104
|
/** The key of the organization proxy */
|
|
105
105
|
organizationProxyKey: string;
|
|
106
|
+
/** The object type of the organization proxy; allows notification dispatch to resolve the owning organization efficiently. */
|
|
107
|
+
organizationProxyType?: string;
|
|
106
108
|
/** The object type of the data associated with the notification */
|
|
107
109
|
dataObjectType: string;
|
|
108
110
|
/** The key of the data object associated with the notification */
|
|
109
111
|
dataObjectKey: string;
|
|
110
112
|
/** The parameters to pass to the notification */
|
|
111
113
|
params: Record<string, any>;
|
|
114
|
+
/** Correlates generated notification history with a payment reminder or other producer-owned source. */
|
|
115
|
+
reminderKey?: string;
|
|
116
|
+
/** When true, render/log recipients but skip actual channel dispatch and quota tracking. */
|
|
117
|
+
previewMode?: boolean;
|
|
118
|
+
/** Outstanding balance copied to generated recipient history rows. */
|
|
119
|
+
totalOutstandingAmount?: number;
|
|
120
|
+
/** Per-send email content override. `summary` is used as the email subject. */
|
|
121
|
+
emailContentOverride?: {
|
|
122
|
+
summary?: string;
|
|
123
|
+
content?: string;
|
|
124
|
+
html?: string;
|
|
125
|
+
};
|
|
126
|
+
/** Per-send SMS content override. */
|
|
127
|
+
smsContentOverride?: {
|
|
128
|
+
content?: string;
|
|
129
|
+
};
|
|
130
|
+
/** Per-send push content override. `summary` is used as the push title. */
|
|
131
|
+
pushContentOverride?: {
|
|
132
|
+
summary?: string;
|
|
133
|
+
content?: string;
|
|
134
|
+
};
|
|
112
135
|
emailConfig?: {
|
|
113
136
|
/** The type of user proxy to send the email to */
|
|
114
137
|
recipientUserProxyType: string;
|
|
@@ -122,6 +145,8 @@ export interface NotificationConfig {
|
|
|
122
145
|
replyEmailAddress?: string;
|
|
123
146
|
/** The email address to send the email to; use when sending emails to non-user proxies/free-form email addresses; can contain a comma-separated list of email addresses */
|
|
124
147
|
recipientEmail?: string;
|
|
148
|
+
/** Optional BCC address(es); comma-separated list allowed. Envelope-only. */
|
|
149
|
+
bccEmail?: string;
|
|
125
150
|
};
|
|
126
151
|
smsConfig?: {
|
|
127
152
|
/** The type of user proxy to send the SMS to */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-general.d.ts","sourceRoot":"","sources":["../../../src/sdk-general.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAM,MAAM,MAAM,CAAC;AAMtC;;GAEG;AAC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,YAAY,EAAE,kBAAkB,CAAC;IACjC,cAAc,EAAE,GAAG,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA8B,SAAQ,kBAAkB;IACrE,YAAY,EAAE,uBAAuB,CAAC;IACtC,eAAe,EAAE,GAAG,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,kBAAkB;IACjE,YAAY,EAAE,mBAAmB,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACxB;AAMD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,eAAe,EAAE,cAAc,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,cAAc,CAS7H;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,aAAa,CAS/G"}
|
|
@@ -206,6 +206,11 @@ export class AggregationResponse {
|
|
|
206
206
|
* }, {
|
|
207
207
|
* aggregation: 'Sum',
|
|
208
208
|
* aggregationField: 'totalAmount'
|
|
209
|
+
* }],
|
|
210
|
+
* sort: [{
|
|
211
|
+
* attributeId: 'totalAmount',
|
|
212
|
+
* descending: true,
|
|
213
|
+
* sortAggregation: 'Sum'
|
|
209
214
|
* }]
|
|
210
215
|
* });
|
|
211
216
|
*
|
|
@@ -230,10 +235,26 @@ export async function getAggregateData(request) {
|
|
|
230
235
|
Authorization: `Bearer ${authToken}`
|
|
231
236
|
};
|
|
232
237
|
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
233
|
-
// Make the API request
|
|
234
|
-
|
|
238
|
+
// Make the API request. The public SDK sort shape is
|
|
239
|
+
// { attributeId, descending }; the aggregate endpoint still expects
|
|
240
|
+
// { sortField, sortDirection }, so translate at the boundary.
|
|
241
|
+
let response = await axios.post(url, toAggregateDataServiceRequest(request), { headers });
|
|
235
242
|
return new AggregationResponse(response.data.data);
|
|
236
243
|
}
|
|
244
|
+
function toAggregateDataServiceRequest(request) {
|
|
245
|
+
const { sort, ...rest } = request;
|
|
246
|
+
if (!sort) {
|
|
247
|
+
return rest;
|
|
248
|
+
}
|
|
249
|
+
return {
|
|
250
|
+
...rest,
|
|
251
|
+
sort: sort.map((sortItem) => ({
|
|
252
|
+
sortField: sortItem.attributeId,
|
|
253
|
+
sortDirection: sortItem.descending ? 'desc' : 'asc',
|
|
254
|
+
...(sortItem.sortAggregation ? { sortAggregation: sortItem.sortAggregation } : {})
|
|
255
|
+
}))
|
|
256
|
+
};
|
|
257
|
+
}
|
|
237
258
|
/**
|
|
238
259
|
* Observable version of getAggregateData. See getAggregateData for details.
|
|
239
260
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-aggregate.js","sourceRoot":"","sources":["../../src/data-aggregate.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,mCAAmC;AACnC,EAAE;AACF,oEAAoE;AACpE,0EAA0E;AAC1E,EAAE;AACF,6DAA6D;AAC7D,oDAAoD;AAEpD;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAc,aAAa,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"data-aggregate.js","sourceRoot":"","sources":["../../src/data-aggregate.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,mCAAmC;AACnC,EAAE;AACF,oEAAoE;AACpE,0EAA0E;AAC1E,EAAE;AACF,6DAA6D;AAC7D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IAE3E,qDAAqD;IACrD,oEAAoE;IACpE,8DAA8D;IAC9D,IAAI,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,6BAA6B,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;IAE1F,OAAO,IAAI,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvD,CAAC;AAYD,SAAS,6BAA6B,CAAC,OAA2B;IAC9D,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAClC,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO;QACH,GAAG,IAAI;QACP,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;YAC1B,SAAS,EAAE,QAAQ,CAAC,WAAW;YAC/B,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;YACnD,GAAG,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACrF,CAAC,CAAC;KACN,CAAC;AACN,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAA2B;IACpE,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAC3C,CAAC"}
|
package/lib/esm/data-crud.js
CHANGED
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
* @module @halix/action-sdk/data-crud
|
|
11
11
|
* @description Data CRUD operations for the Halix Platform action SDK. This module provides functions
|
|
12
12
|
* for creating, reading, updating, and deleting data objects through the Halix data service API.
|
|
13
|
-
* Note: for list-like displays, the `lists` module is preferred.
|
|
14
13
|
*
|
|
15
14
|
* Key features:
|
|
16
15
|
* - Retrieve one object a time
|
|
@@ -20,44 +19,63 @@
|
|
|
20
19
|
*
|
|
21
20
|
* @usage
|
|
22
21
|
* ## When to Use
|
|
23
|
-
* - **
|
|
22
|
+
* - **Filtered accessible-record reads without list behavior** → `getAccessibleObjects`
|
|
23
|
+
* - **Naturally small reference/dimension sets** → unfiltered `getAccessibleObjects`
|
|
24
24
|
* - **Read specific accessible objects by key list** → `getObjects`
|
|
25
25
|
* - **Get single object by key** → `getObject`
|
|
26
|
-
* - **
|
|
26
|
+
* - **Fetch a known parent's child records** → `getRelatedObjects`
|
|
27
27
|
* - **Create/update single object** → `saveObject`
|
|
28
28
|
* - **Delete single object** → `deleteObject`
|
|
29
29
|
*
|
|
30
|
+
* ## Record Retrieval Decision
|
|
31
|
+
* - Use `getAggregateData` from the data-aggregate module for counts, sums, rankings, and grouped metrics.
|
|
32
|
+
* - Use filtered `getAccessibleObjects` for bounded record reads that do not need list pagination,
|
|
33
|
+
* totals, sort, or projection.
|
|
34
|
+
* - Use unfiltered `getAccessibleObjects` only for naturally small reference/dimension sets.
|
|
35
|
+
* - Use `getRelatedObjects` when the component already has a concrete parent key and is fetching
|
|
36
|
+
* that parent's children.
|
|
37
|
+
* - Use `getListData` from the lists module for paged list UIs and list-management workflows.
|
|
38
|
+
*
|
|
30
39
|
* ## When NOT to Use
|
|
31
|
-
* - **
|
|
40
|
+
* - **High-cardinality report reads without a narrowing filter**
|
|
41
|
+
* - **Paged list UI pagination, explicit totals, server sort, or list field projection** → use lists skill with `getListData`
|
|
32
42
|
* - **Bulk updates** → use lists skill with `massEdit`
|
|
33
43
|
* - **Aggregations** → use data-aggregate skill
|
|
34
44
|
*
|
|
35
45
|
* ## Key Functions
|
|
36
46
|
* | Function | Use For |
|
|
37
47
|
* |----------|---------|
|
|
38
|
-
* | `getAccessibleObjects` |
|
|
48
|
+
* | `getAccessibleObjects` | Filtered accessible reads; unfiltered only for small reference/dimension sets |
|
|
39
49
|
* | `getObjects` | Read accessible objects from a specific key list |
|
|
40
50
|
* | `getObject` | Single object by key |
|
|
41
|
-
* | `getRelatedObjects` | Children of a parent
|
|
51
|
+
* | `getRelatedObjects` | Children of a known parent record |
|
|
42
52
|
* | `saveObject` | Create or update one object |
|
|
43
53
|
* | `saveRelatedObject` | Create or update one object and establish relationship to a parent |
|
|
44
54
|
* | `deleteObject` | Delete one object without parent scope |
|
|
45
55
|
* | `deleteRelatedObject` | Delete one related object |
|
|
46
56
|
*
|
|
47
57
|
* @example
|
|
48
|
-
* // Get
|
|
49
|
-
*
|
|
58
|
+
* // Get accessible class enrollments for a bounded date window
|
|
59
|
+
* // Create the filter expression with build_filter_expression before coding it here.
|
|
60
|
+
* const recentEnrollments = await hx.getAccessibleObjects(
|
|
61
|
+
* 'classEnrollment',
|
|
62
|
+
* "startDate>=date:'2025-01-01'"
|
|
63
|
+
* );
|
|
50
64
|
*
|
|
51
65
|
* @example
|
|
52
66
|
* // Get accessible recipes from a known key list
|
|
53
67
|
* const recipes = await hx.getObjects('recipe', recipeKeys);
|
|
54
68
|
*
|
|
55
69
|
* @example
|
|
70
|
+
* // Unfiltered accessible reads are for naturally small reference/dimension sets
|
|
71
|
+
* const categories = await hx.getAccessibleObjects('category');
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
56
74
|
* // Get single recipe
|
|
57
75
|
* const recipe = await hx.getObject('recipe', recipeKey);
|
|
58
76
|
*
|
|
59
77
|
* @example
|
|
60
|
-
* // Get ingredients
|
|
78
|
+
* // Get ingredients for a known recipe
|
|
61
79
|
* const ingredients = await hx.getRelatedObjects(
|
|
62
80
|
* 'recipe', recipeKey, 'ingredient'
|
|
63
81
|
* );
|
|
@@ -126,7 +144,7 @@ export function getObjectAsObservable(dataElementId, key, fetchedRelationships)
|
|
|
126
144
|
* @param parentElementId - Parent element ID
|
|
127
145
|
* @param parentKey - Parent object key; important: this establishes the scope of the query; use an appropriate scope key
|
|
128
146
|
* @param elementId - Child element ID
|
|
129
|
-
* @param filter - Optional filter
|
|
147
|
+
* @param filter - Optional Halix filter expression. This is not SQL or JavaScript syntax. Call `build_filter_expression` to generate it. Must be less than 200 characters.
|
|
130
148
|
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
131
149
|
* @returns Promise<any[]>
|
|
132
150
|
*/
|
|
@@ -166,7 +184,7 @@ export function getRelatedObjectsAsObservable(parentElementId, parentKey, elemen
|
|
|
166
184
|
* Retrieves all objects for a data element that the current user has access to.
|
|
167
185
|
*
|
|
168
186
|
* @param dataElementId - Data element ID
|
|
169
|
-
* @param filter - Optional filter
|
|
187
|
+
* @param filter - Optional Halix filter expression. This is not SQL or JavaScript syntax. Call `build_filter_expression` to generate it. Must be less than 200 characters.
|
|
170
188
|
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
171
189
|
* @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.
|
|
172
190
|
* @returns Promise<any[]>
|
|
@@ -199,7 +217,7 @@ export function getAccessibleObjectsAsObservable(dataElementId, filter, fetchedR
|
|
|
199
217
|
*
|
|
200
218
|
* @param dataElementId - Data element ID
|
|
201
219
|
* @param keys - Object keys to retrieve
|
|
202
|
-
* @param filter - Optional filter
|
|
220
|
+
* @param filter - Optional Halix filter expression. This is not SQL or JavaScript syntax. Call `build_filter_expression` to generate it. Must be less than 200 characters.
|
|
203
221
|
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
204
222
|
* @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.
|
|
205
223
|
* @returns Promise<any[]>
|