@elementumai/edk 0.13.3 → 0.14.0
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-sdk/src/catalog/factories.d.ts +4 -2
- package/dist-sdk/src/catalog/factories.js +3 -1
- package/dist-sdk/src/catalog/from-authoring.d.ts +8 -3
- package/dist-sdk/src/catalog/from-authoring.js +21 -8
- package/dist-sdk/src/engine/build/context.d.ts +17 -0
- package/dist-sdk/src/engine/coverage-gaps.d.ts +13 -0
- package/dist-sdk/src/engine/coverage-gaps.js +21 -0
- package/dist-sdk/src/engine/pull/context.d.ts +57 -1
- package/dist-sdk/src/engine/pull/context.js +9 -1
- package/dist-sdk/src/engine/pull/pulled-roots.d.ts +14 -1
- package/dist-sdk/src/engine/pull/pulled-roots.js +23 -3
- package/dist-sdk/src/engine/pull/ref-only.d.ts +6 -1
- package/dist-sdk/src/engine/pull/ref-only.js +4 -1
- package/dist-sdk/src/engine/pull/stream-root.d.ts +17 -1
- package/dist-sdk/src/engine/pull/stream-root.js +57 -4
- package/dist-sdk/src/engine/tf/index.d.ts +1 -0
- package/dist-sdk/src/engine/tf/index.js +1 -0
- package/dist-sdk/src/engine/tf/jsonencode.d.ts +19 -0
- package/dist-sdk/src/engine/tf/jsonencode.js +49 -0
- package/dist-sdk/src/engine/validation.d.ts +36 -1
- package/dist-sdk/src/engine/validation.js +56 -2
- package/dist-sdk/src/engine/workspace/loader.d.ts +6 -0
- package/dist-sdk/src/engine/workspace/loader.js +87 -2
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +58 -17
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +3 -1
- package/dist-sdk/src/entities/access-policy/to-tf.js +1 -1
- package/dist-sdk/src/entities/agent/build.d.ts +15 -0
- package/dist-sdk/src/entities/agent/build.js +139 -16
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.d.ts +3 -3
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +39 -25
- package/dist-sdk/src/entities/agent/module.js +95 -3
- package/dist-sdk/src/entities/agent/to-tf.js +6 -4
- package/dist-sdk/src/entities/agent-evaluation/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/agent-evaluation/from-tf.js +14 -5
- package/dist-sdk/src/entities/agent-evaluation/module.js +4 -2
- package/dist-sdk/src/entities/agent-tool/from-tf.d.ts +11 -2
- package/dist-sdk/src/entities/agent-tool/from-tf.js +38 -40
- package/dist-sdk/src/entities/agent-tool/to-tf.js +12 -5
- package/dist-sdk/src/entities/app/build.d.ts +1 -1
- package/dist-sdk/src/entities/app/index.d.ts +1 -1
- package/dist-sdk/src/entities/automation/approval-trigger-refs.d.ts +20 -0
- package/dist-sdk/src/entities/automation/approval-trigger-refs.js +83 -0
- package/dist-sdk/src/entities/automation/build.d.ts +75 -42
- package/dist-sdk/src/entities/automation/build.js +18 -8
- package/dist-sdk/src/entities/automation/deserializer/ast.d.ts +14 -2
- package/dist-sdk/src/entities/automation/deserializer/print-automation.d.ts +9 -0
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +64 -12
- package/dist-sdk/src/entities/automation/from-tf.d.ts +53 -0
- package/dist-sdk/src/entities/automation/from-tf.js +579 -106
- package/dist-sdk/src/entities/automation/index.d.ts +2 -2
- package/dist-sdk/src/entities/automation/index.js +1 -1
- package/dist-sdk/src/entities/automation/lookup-owner.d.ts +23 -0
- package/dist-sdk/src/entities/automation/lookup-owner.js +27 -0
- package/dist-sdk/src/entities/automation/module.js +265 -26
- package/dist-sdk/src/entities/automation/operators.d.ts +6 -2
- package/dist-sdk/src/entities/automation/operators.js +0 -2
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +8 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +11 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +37 -2
- package/dist-sdk/src/entities/automation/tasks.js +38 -1
- package/dist-sdk/src/entities/automation/to-tf.d.ts +8 -0
- package/dist-sdk/src/entities/automation/to-tf.js +576 -52
- package/dist-sdk/src/entities/automation/triggers.d.ts +47 -1
- package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +10 -5
- package/dist-sdk/src/entities/automation/unsafe-script-output.js +10 -5
- package/dist-sdk/src/entities/chart/to-tf.js +18 -5
- package/dist-sdk/src/entities/dashboard/from-tf.js +45 -11
- package/dist-sdk/src/entities/dashboard-widget-order/order.d.ts +5 -3
- package/dist-sdk/src/entities/dashboard-widget-order/order.js +6 -4
- package/dist-sdk/src/entities/datamine/from-tf.js +10 -3
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +38 -11
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +35 -7
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +101 -9
- package/dist-sdk/src/entities/element/build.d.ts +4 -1
- package/dist-sdk/src/entities/element/build.js +3 -4
- package/dist-sdk/src/entities/element/index.d.ts +1 -1
- package/dist-sdk/src/entities/field/from-tf.js +8 -1
- package/dist-sdk/src/entities/field/to-tf.d.ts +29 -2
- package/dist-sdk/src/entities/field/to-tf.js +106 -7
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +15 -7
- package/dist-sdk/src/entities/phone-service/module.js +4 -2
- package/dist-sdk/src/entities/portal/to-tf.d.ts +1 -1
- package/dist-sdk/src/entities/portal/to-tf.js +61 -2
- package/dist-sdk/src/entities/record-create-form/from-tf.js +3 -1
- package/dist-sdk/src/entities/relationship/from-tf.js +34 -4
- package/dist-sdk/src/entities/relationship/to-tf.js +24 -6
- package/dist-sdk/src/entities/role/from-tf.js +3 -1
- package/dist-sdk/src/entities/search-table/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/search-table/from-tf.js +6 -3
- package/dist-sdk/src/entities/search-table/module.js +18 -2
- package/dist-sdk/src/entities/search-table/to-tf.js +10 -16
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +6 -1
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +6 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +21 -4
- package/dist-sdk/src/entities/shared/filters/index.js +27 -3
- package/dist-sdk/src/entities/shared/filters/print.js +23 -7
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +24 -0
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +98 -3
- package/dist-sdk/src/entities/shared/filters/types.d.ts +8 -1
- package/dist-sdk/src/entities/shared/run-automation-requirement.d.ts +15 -0
- package/dist-sdk/src/entities/shared/run-automation-requirement.js +28 -0
- package/dist-sdk/src/entities/shared/search-table-address.d.ts +17 -0
- package/dist-sdk/src/entities/shared/search-table-address.js +24 -0
- package/dist-sdk/src/entities/shared/skip-release.d.ts +49 -0
- package/dist-sdk/src/entities/shared/skip-release.js +74 -0
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.d.ts +3 -3
- package/dist-sdk/src/entities/skill/deserializer/print-skill-v2.js +11 -5
- package/dist-sdk/src/entities/skill/module.js +3 -25
- package/dist-sdk/src/entities/skill-tool/from-tf.d.ts +4 -2
- package/dist-sdk/src/entities/skill-tool/from-tf.js +28 -27
- package/dist-sdk/src/entities/skill-tool/to-tf.js +12 -5
- package/dist-sdk/src/entities/skill-tool/types.d.ts +1 -0
- package/dist-sdk/src/entities/skill-tool/types.js +2 -1
- package/dist-sdk/src/entities/table/catalog.d.ts +16 -0
- package/dist-sdk/src/entities/table/catalog.js +44 -2
- package/dist-sdk/src/entities/table/from-tf.js +30 -4
- package/dist-sdk/src/entities/table/keys.d.ts +27 -0
- package/dist-sdk/src/entities/table/keys.js +46 -0
- package/dist-sdk/src/entities/table/to-tf.js +2 -2
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.d.ts +12 -1
- package/dist-sdk/src/entities/view/agent-view-layout-from-tf.js +9 -4
- package/dist-sdk/src/entities/view/agent-view-layout-to-tf.js +215 -10
- package/dist-sdk/src/entities/view/agent-view-layout.d.ts +10 -4
- package/dist-sdk/src/entities/view/custom-view-runtime-rules.d.ts +43 -0
- package/dist-sdk/src/entities/view/custom-view-runtime-rules.js +285 -0
- package/dist-sdk/src/entities/view/custom-view-validate.d.ts +3 -1
- package/dist-sdk/src/entities/view/custom-view-validate.js +24 -5
- package/dist-sdk/src/entities/view/from-tf.js +14 -1
- package/dist-sdk/src/entities/widget/from-tf.js +14 -7
- package/dist-sdk/src/entities/widget/to-tf.js +9 -6
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +4 -2
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +14 -1
- package/dist-sdk/src/graph/index.js +2 -0
- package/dist-sdk/src/graph/resource-types.d.ts +2 -0
- package/dist-sdk/src/graph/resource-types.js +3 -0
- package/dist-sdk/src/graph/types.d.ts +105 -0
- package/package.json +1 -1
|
@@ -1044,8 +1044,12 @@ export interface ApprovalChainOptions {
|
|
|
1044
1044
|
readonly record: RecordReference;
|
|
1045
1045
|
/** User requesting the approval. Use a USER_ID value reference. */
|
|
1046
1046
|
readonly requester: ValueOrRef<unknown>;
|
|
1047
|
-
/**
|
|
1048
|
-
|
|
1047
|
+
/**
|
|
1048
|
+
* Optional dynamic approvers, one per dynamic approver slot of the process,
|
|
1049
|
+
* in order. A plain entry is a user: a USER_ID value reference (or a
|
|
1050
|
+
* variable holding a user id). Wrap a group in `groupApprover(...)`.
|
|
1051
|
+
*/
|
|
1052
|
+
readonly approvers?: readonly (ValueOrRef<unknown> | ApprovalGroupApprover)[];
|
|
1049
1053
|
readonly reason?: ValueOrRef<unknown>;
|
|
1050
1054
|
readonly summary?: ValueOrRef<unknown>;
|
|
1051
1055
|
/**
|
|
@@ -1056,6 +1060,37 @@ export interface ApprovalChainOptions {
|
|
|
1056
1060
|
*/
|
|
1057
1061
|
readonly tag?: ValueOrRef<unknown>;
|
|
1058
1062
|
}
|
|
1063
|
+
/**
|
|
1064
|
+
* A group in a dynamic approver slot of `approvalChain`, with how many of its
|
|
1065
|
+
* members must approve or deny. Build it with `groupApprover(...)`.
|
|
1066
|
+
*/
|
|
1067
|
+
export interface ApprovalGroupApprover {
|
|
1068
|
+
readonly kind: "groupApprover";
|
|
1069
|
+
/** The group: a GROUP_ID value reference (a group field's `.id`), a variable holding a group id, or an `org.groups` token. */
|
|
1070
|
+
readonly group: ValueOrRef<string> | GroupRef | Ref<unknown, string>;
|
|
1071
|
+
readonly approvalsRequired: number;
|
|
1072
|
+
readonly denialsRequired: number;
|
|
1073
|
+
}
|
|
1074
|
+
/**
|
|
1075
|
+
* What `groupApprover` accepts as its group: an `org.groups` token, a group
|
|
1076
|
+
* id, a reference whose value is a string (a group field's `.id`), or a
|
|
1077
|
+
* variable (its reference is untyped). A reference to anything else, such as
|
|
1078
|
+
* the group field itself (`record.team` instead of `record.team.id`), is a
|
|
1079
|
+
* type error.
|
|
1080
|
+
*/
|
|
1081
|
+
export type GroupApproverValue<G> = G extends GroupRef ? G : G extends string ? G : G extends Ref<infer T, string> ? (unknown extends T ? G : [T] extends [string] ? G : GroupApproverArgumentError) : GroupApproverArgumentError;
|
|
1082
|
+
/** The type a wrong `groupApprover` argument is checked against, so the compiler error says what to pass. */
|
|
1083
|
+
export interface GroupApproverArgumentError {
|
|
1084
|
+
readonly "groupApprover takes a group: an org.groups token, a Group field's .id (record.<field>.id, not record.<field>), a group id string, or a variable": never;
|
|
1085
|
+
}
|
|
1086
|
+
/**
|
|
1087
|
+
* A group approves in an `approvalChain` dynamic approver slot:
|
|
1088
|
+
* `groupApprover(ctx.item.approvalGroup.id, { approvalsRequired: 1, denialsRequired: 1 })`.
|
|
1089
|
+
*/
|
|
1090
|
+
export declare function groupApprover<G>(group: G & GroupApproverValue<G>, options: {
|
|
1091
|
+
readonly approvalsRequired: number;
|
|
1092
|
+
readonly denialsRequired: number;
|
|
1093
|
+
}): ApprovalGroupApprover;
|
|
1059
1094
|
export declare function approvalChain(opts: ApprovalChainOptions): ActionDef<Empty>;
|
|
1060
1095
|
export type ApprovalChainTemplateOptions = ApprovalChainOptions;
|
|
1061
1096
|
export declare function approvalChainTemplate(opts: ApprovalChainTemplateOptions): ActionDef<Empty>;
|
|
@@ -927,6 +927,43 @@ export function bulkExcel(opts) {
|
|
|
927
927
|
},
|
|
928
928
|
};
|
|
929
929
|
}
|
|
930
|
+
/**
|
|
931
|
+
* A group approves in an `approvalChain` dynamic approver slot:
|
|
932
|
+
* `groupApprover(ctx.item.approvalGroup.id, { approvalsRequired: 1, denialsRequired: 1 })`.
|
|
933
|
+
*/
|
|
934
|
+
export function groupApprover(group, options) {
|
|
935
|
+
if (group === undefined || group === null)
|
|
936
|
+
throw new Error("groupApprover requires a group.");
|
|
937
|
+
for (const [name, value] of [["approvalsRequired", options.approvalsRequired], ["denialsRequired", options.denialsRequired]]) {
|
|
938
|
+
if (!Number.isInteger(value) || value < 0) {
|
|
939
|
+
throw new Error(`groupApprover: ${name} must be an integer >= 0 (got ${String(value)}).`);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
return {
|
|
943
|
+
kind: "groupApprover",
|
|
944
|
+
group: group,
|
|
945
|
+
approvalsRequired: options.approvalsRequired,
|
|
946
|
+
denialsRequired: options.denialsRequired,
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
function isGroupApprover(value) {
|
|
950
|
+
return !isRef(value) && typeof value === "object" && value !== null && value.kind === "groupApprover";
|
|
951
|
+
}
|
|
952
|
+
/**
|
|
953
|
+
* The approvers config: `approverReferences` while every slot is a user (the
|
|
954
|
+
* HCL `approver_references`), otherwise `approvers`, one `{ user }` or
|
|
955
|
+
* `{ group, approvalsRequired, denialsRequired }` per slot, the only form that
|
|
956
|
+
* keeps a group (edk#3163). Export makes the same choice.
|
|
957
|
+
*/
|
|
958
|
+
function approversConfig(approvers) {
|
|
959
|
+
if (!approvers.some(isGroupApprover))
|
|
960
|
+
return { approverReferences: approvers.map((a) => serializeValueOrRef(a)) };
|
|
961
|
+
return {
|
|
962
|
+
approvers: approvers.map((a) => isGroupApprover(a)
|
|
963
|
+
? { group: serializeValueOrRef(a.group), approvalsRequired: a.approvalsRequired, denialsRequired: a.denialsRequired }
|
|
964
|
+
: { user: serializeValueOrRef(a) }),
|
|
965
|
+
};
|
|
966
|
+
}
|
|
930
967
|
export function approvalChain(opts) {
|
|
931
968
|
return {
|
|
932
969
|
key: "approvalChain",
|
|
@@ -934,7 +971,7 @@ export function approvalChain(opts) {
|
|
|
934
971
|
approvalProcessId: opts.approvalProcess,
|
|
935
972
|
recordReference: serializeValueOrRef(opts.record),
|
|
936
973
|
requesterReference: serializeValueOrRef(opts.requester),
|
|
937
|
-
...(opts.approvers !== undefined ?
|
|
974
|
+
...(opts.approvers !== undefined ? approversConfig(opts.approvers) : {}),
|
|
938
975
|
...(opts.reason !== undefined ? { reason: serializeValueOrRef(opts.reason) } : {}),
|
|
939
976
|
...(opts.summary !== undefined ? { summary: serializeValueOrRef(opts.summary) } : {}),
|
|
940
977
|
...(opts.tag !== undefined ? { tags: serializeValueOrRef(opts.tag) } : {}),
|
|
@@ -75,6 +75,10 @@ export interface AutomationToTfContext {
|
|
|
75
75
|
readonly workspaceAspects?: ReadonlyMap<string, WorkspaceAspect>;
|
|
76
76
|
/** See `ToTfContext.outOfScopeApps`. */
|
|
77
77
|
readonly outOfScopeApps?: ReadonlyMap<string, ForeignRootIdentity>;
|
|
78
|
+
/** See `ToTfContext.outOfScopeElements`. */
|
|
79
|
+
readonly outOfScopeElements?: ReadonlyMap<string, ForeignRootIdentity>;
|
|
80
|
+
/** See `ToTfContext.catalogElementIdentities`. */
|
|
81
|
+
readonly catalogElementIdentities?: ReadonlyMap<string, ForeignRootIdentity>;
|
|
78
82
|
/**
|
|
79
83
|
* The build's shared `locals.tf` attrs map — mutated in place so a foreign
|
|
80
84
|
* field crossing through {@link crossAppFieldToTf} can contribute its own
|
|
@@ -102,6 +106,10 @@ export interface AutomationToTfResult {
|
|
|
102
106
|
* plus field mappings, and the script receives `{}` at runtime. Record
|
|
103
107
|
* triggers' `ctx.trigger.record` and the `.record` of recordSearch,
|
|
104
108
|
* createRecord and updateField carry the whole record (#1284, #1489).
|
|
109
|
+
* AI agent and email record attachments read the record's files from the
|
|
110
|
+
* whole record too: an on-demand record parameter or an explicit record ID
|
|
111
|
+
* fails there (#3069). A task's `.record`, Find Related Records' included,
|
|
112
|
+
* builds the whole record in an attachment.
|
|
105
113
|
*/
|
|
106
114
|
export declare function recordIdFieldMappingFailures(entity: DeployableEntity, payload: object, address: string): ValidationFailure[];
|
|
107
115
|
export declare function automationToTf(entity: DeployableEntity, ctx: AutomationToTfContext): AutomationToTfResult;
|