@declarion/react 0.1.26 → 0.1.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/api/data.d.ts +19 -5
- package/dist-lib/index.js +1595 -1589
- package/dist-lib/index.js.map +1 -1
- package/package.json +1 -1
package/dist-lib/api/data.d.ts
CHANGED
|
@@ -6,11 +6,14 @@ export declare function createEntity(entity: string, data: Record<string, unknow
|
|
|
6
6
|
export declare function updateEntity(entity: string, pkValues: PkValues | string, data: Record<string, unknown>): Promise<DataResponse>;
|
|
7
7
|
export declare function deleteEntity(entity: string, pkValues: PkValues | string): Promise<void>;
|
|
8
8
|
export declare function restoreEntity(entity: string, pkValues: PkValues | string): Promise<void>;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Action request body is flat: top-level keys are handler params. The only
|
|
11
|
+
* reserved control key is `_ids` (array of object IDs for single/batch
|
|
12
|
+
* scope). The server resolves entity from the action's registration; the
|
|
13
|
+
* URL code is fully qualified ("entity.action" for entity-scoped,
|
|
14
|
+
* "action" for global).
|
|
15
|
+
*/
|
|
16
|
+
export type ActionExecuteRequest = Record<string, unknown>;
|
|
14
17
|
export interface ActionExecuteResponse {
|
|
15
18
|
status: string;
|
|
16
19
|
result?: unknown;
|
|
@@ -19,6 +22,17 @@ export interface ActionExecuteResponse {
|
|
|
19
22
|
/** IDs that succeeded (batch_mode: each responses). */
|
|
20
23
|
success?: string[];
|
|
21
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Build a flat action body from handler params + optional object IDs.
|
|
27
|
+
* Promotes `ids` to the reserved `_ids` key. Throws if a caller passes a
|
|
28
|
+
* param literally named `_ids` (collision with the reserved control key).
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildActionBody(params: Record<string, unknown> | undefined, ids?: string[] | undefined): ActionExecuteRequest;
|
|
31
|
+
/**
|
|
32
|
+
* Invoke an action. The URL `code` must be fully qualified for
|
|
33
|
+
* entity-scoped actions (e.g. `lead.archive`). For global actions it's the
|
|
34
|
+
* action code on its own (e.g. `auth.login`).
|
|
35
|
+
*/
|
|
22
36
|
export declare function executeAction(code: string, body: ActionExecuteRequest): Promise<ActionExecuteResponse>;
|
|
23
37
|
export interface AssociationResponse {
|
|
24
38
|
target_entity: string;
|