@elementumai/edk 0.12.0 → 0.13.1
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 +8 -2
- package/dist-sdk/src/catalog/factories.d.ts +7 -1
- package/dist-sdk/src/catalog/factories.js +10 -2
- package/dist-sdk/src/catalog/index.d.ts +2 -2
- package/dist-sdk/src/catalog/index.js +1 -1
- package/dist-sdk/src/catalog/org.js +79 -34
- package/dist-sdk/src/catalog/token.js +5 -0
- package/dist-sdk/src/catalog/types.d.ts +12 -1
- package/dist-sdk/src/catalog/types.js +3 -0
- package/dist-sdk/src/core/system-fields.d.ts +1 -1
- package/dist-sdk/src/core/system-fields.js +1 -1
- package/dist-sdk/src/core/types/app.d.ts +6 -0
- package/dist-sdk/src/engine/build/context.d.ts +3 -0
- package/dist-sdk/src/engine/coverage-gaps.d.ts +2 -0
- package/dist-sdk/src/engine/coverage-gaps.js +4 -0
- package/dist-sdk/src/engine/ei/run.d.ts +8 -0
- package/dist-sdk/src/engine/ei/run.js +46 -7
- package/dist-sdk/src/engine/pull/authored-address.js +42 -6
- package/dist-sdk/src/engine/pull/authored-root.d.ts +88 -0
- package/dist-sdk/src/engine/pull/authored-root.js +306 -0
- package/dist-sdk/src/engine/pull/context.d.ts +34 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.d.ts +114 -0
- package/dist-sdk/src/engine/pull/field-refs-registry.js +501 -0
- package/dist-sdk/src/engine/pull/org.d.ts +1 -0
- package/dist-sdk/src/engine/pull/org.js +2 -0
- package/dist-sdk/src/engine/pull/partition.d.ts +8 -0
- package/dist-sdk/src/engine/pull/partition.js +43 -0
- package/dist-sdk/src/engine/pull/pulled-roots.d.ts +89 -0
- package/dist-sdk/src/engine/pull/pulled-roots.js +203 -0
- package/dist-sdk/src/engine/pull/ref-only.d.ts +4 -0
- package/dist-sdk/src/engine/pull/ref-only.js +7 -1
- package/dist-sdk/src/engine/pull/source-resources.d.ts +39 -0
- package/dist-sdk/src/engine/pull/source-resources.js +110 -0
- package/dist-sdk/src/engine/pull/stream-root.d.ts +159 -0
- package/dist-sdk/src/engine/pull/stream-root.js +579 -0
- package/dist-sdk/src/engine/workspace/authoring-layout.js +16 -2
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.d.ts +47 -0
- package/dist-sdk/src/engine/workspace/reserved-catalog-keys.js +115 -0
- package/dist-sdk/src/entities/access-policy/build.d.ts +2 -1
- package/dist-sdk/src/entities/access-policy/from-tf.d.ts +7 -0
- package/dist-sdk/src/entities/access-policy/from-tf.js +17 -5
- package/dist-sdk/src/entities/access-policy/to-tf.d.ts +19 -0
- package/dist-sdk/src/entities/access-policy/to-tf.js +65 -8
- package/dist-sdk/src/entities/agent/build.d.ts +52 -1
- package/dist-sdk/src/entities/agent/build.js +34 -0
- package/dist-sdk/src/entities/agent/deserializer/print-agent-v2.js +70 -1
- package/dist-sdk/src/entities/agent/from-tf.d.ts +36 -1
- package/dist-sdk/src/entities/agent/from-tf.js +289 -2
- package/dist-sdk/src/entities/agent/index.d.ts +1 -1
- package/dist-sdk/src/entities/agent/module.js +1 -0
- package/dist-sdk/src/entities/agent/to-tf.d.ts +11 -11
- package/dist-sdk/src/entities/agent/to-tf.js +179 -17
- package/dist-sdk/src/entities/agent-tool/from-tf.js +6 -0
- package/dist-sdk/src/entities/agent-tool/to-tf.d.ts +2 -2
- package/dist-sdk/src/entities/agent-tool/to-tf.js +2 -2
- package/dist-sdk/src/entities/app/build.d.ts +33 -13
- package/dist-sdk/src/entities/app/build.js +14 -12
- package/dist-sdk/src/entities/app/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/app/from-tf.js +7 -9
- package/dist-sdk/src/entities/app/index.d.ts +1 -0
- package/dist-sdk/src/entities/app/index.js +1 -0
- package/dist-sdk/src/entities/app/module.js +3 -0
- package/dist-sdk/src/entities/app/stage-keys.d.ts +2 -2
- package/dist-sdk/src/entities/app/stage-keys.js +3 -3
- package/dist-sdk/src/entities/app/to-tf.js +1 -0
- package/dist-sdk/src/entities/approval-chain/build.d.ts +46 -11
- package/dist-sdk/src/entities/approval-chain/build.js +120 -8
- package/dist-sdk/src/entities/approval-chain/from-tf.d.ts +24 -2
- package/dist-sdk/src/entities/approval-chain/from-tf.js +148 -6
- package/dist-sdk/src/entities/approval-chain/index.d.ts +4 -1
- package/dist-sdk/src/entities/approval-chain/index.js +4 -1
- package/dist-sdk/src/entities/approval-chain/module.js +23 -5
- package/dist-sdk/src/entities/approval-chain/printer.d.ts +1 -1
- package/dist-sdk/src/entities/approval-chain/printer.js +91 -5
- package/dist-sdk/src/entities/approval-chain/steps-tf.d.ts +77 -0
- package/dist-sdk/src/entities/approval-chain/steps-tf.js +255 -0
- package/dist-sdk/src/entities/approval-chain/steps.d.ts +71 -0
- package/dist-sdk/src/entities/approval-chain/steps.js +83 -0
- package/dist-sdk/src/entities/approval-chain/to-tf.d.ts +16 -6
- package/dist-sdk/src/entities/approval-chain/to-tf.js +37 -4
- package/dist-sdk/src/entities/automation/build.d.ts +10 -1
- package/dist-sdk/src/entities/automation/build.js +70 -27
- package/dist-sdk/src/entities/automation/deserializer/print-automation.js +21 -5
- package/dist-sdk/src/entities/automation/from-tf.d.ts +26 -5
- package/dist-sdk/src/entities/automation/from-tf.js +665 -112
- package/dist-sdk/src/entities/automation/index.d.ts +2 -1
- package/dist-sdk/src/entities/automation/index.js +1 -0
- package/dist-sdk/src/entities/automation/module.d.ts +4 -3
- package/dist-sdk/src/entities/automation/module.js +45 -12
- package/dist-sdk/src/entities/automation/refs-read.d.ts +19 -0
- package/dist-sdk/src/entities/automation/refs-read.js +48 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.d.ts +9 -0
- package/dist-sdk/src/entities/automation/slack-message-refs.js +75 -0
- package/dist-sdk/src/entities/automation/system-ref-name.d.ts +23 -3
- package/dist-sdk/src/entities/automation/system-ref-name.js +86 -4
- package/dist-sdk/src/entities/automation/task-output-labels.d.ts +11 -0
- package/dist-sdk/src/entities/automation/task-output-labels.js +23 -0
- package/dist-sdk/src/entities/automation/tasks.d.ts +29 -4
- package/dist-sdk/src/entities/automation/tasks.js +34 -11
- package/dist-sdk/src/entities/automation/to-tf.d.ts +8 -1
- package/dist-sdk/src/entities/automation/to-tf.js +563 -103
- package/dist-sdk/src/entities/automation/triggers.d.ts +0 -8
- package/dist-sdk/src/entities/automation/triggers.js +26 -11
- package/dist-sdk/src/entities/automation/unsafe-script-output.d.ts +50 -0
- package/dist-sdk/src/entities/automation/unsafe-script-output.js +92 -0
- package/dist-sdk/src/entities/chart/build.d.ts +9 -1
- package/dist-sdk/src/entities/chart/from-tf.js +3 -0
- package/dist-sdk/src/entities/chart/to-tf.js +19 -2
- package/dist-sdk/src/entities/dashboard/from-tf.d.ts +3 -1
- package/dist-sdk/src/entities/dashboard/from-tf.js +42 -2
- package/dist-sdk/src/entities/dashboard/to-tf.js +9 -1
- package/dist-sdk/src/entities/dashboard-widget-order/module.d.ts +10 -0
- package/dist-sdk/src/entities/dashboard-widget-order/module.js +25 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.d.ts +31 -0
- package/dist-sdk/src/entities/dashboard-widget-order/order.js +102 -0
- package/dist-sdk/src/entities/dynamic-layout/build.d.ts +2 -0
- package/dist-sdk/src/entities/dynamic-layout/from-tf.js +44 -5
- package/dist-sdk/src/entities/dynamic-layout/to-tf.js +46 -12
- package/dist-sdk/src/entities/element/audit-field-guard.d.ts +9 -0
- package/dist-sdk/src/entities/element/audit-field-guard.js +88 -0
- package/dist-sdk/src/entities/element/build.js +2 -1
- package/dist-sdk/src/entities/element/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/element/from-tf.js +4 -7
- package/dist-sdk/src/entities/element/module.js +5 -0
- package/dist-sdk/src/entities/element/system-fields.d.ts +13 -0
- package/dist-sdk/src/entities/element/system-fields.js +23 -0
- package/dist-sdk/src/entities/element/to-tf.js +1 -0
- package/dist-sdk/src/entities/field/build.d.ts +9 -0
- package/dist-sdk/src/entities/field/from-tf.d.ts +52 -1
- package/dist-sdk/src/entities/field/from-tf.js +212 -14
- package/dist-sdk/src/entities/field/module.js +4 -0
- package/dist-sdk/src/entities/field/to-tf.d.ts +5 -1
- package/dist-sdk/src/entities/field/to-tf.js +33 -12
- package/dist-sdk/src/entities/org/category.js +1 -0
- package/dist-sdk/src/entities/org/index.d.ts +1 -0
- package/dist-sdk/src/entities/org/index.js +1 -0
- package/dist-sdk/src/entities/org/voice-auth.d.ts +5 -0
- package/dist-sdk/src/entities/org/voice-auth.js +33 -0
- package/dist-sdk/src/entities/organization/build.d.ts +3 -0
- package/dist-sdk/src/entities/organization/build.js +2 -0
- package/dist-sdk/src/entities/organization/index.d.ts +1 -0
- package/dist-sdk/src/entities/organization/index.js +1 -0
- package/dist-sdk/src/entities/organization/to-tf.d.ts +2 -0
- package/dist-sdk/src/entities/organization/to-tf.js +59 -1
- package/dist-sdk/src/entities/organization/voice-auth.d.ts +60 -0
- package/dist-sdk/src/entities/organization/voice-auth.js +60 -0
- package/dist-sdk/src/entities/phone-service/build.d.ts +9 -1
- package/dist-sdk/src/entities/phone-service/build.js +1 -0
- package/dist-sdk/src/entities/phone-service/deserializer/print-phone-service.js +3 -0
- package/dist-sdk/src/entities/phone-service/from-tf.d.ts +1 -0
- package/dist-sdk/src/entities/phone-service/from-tf.js +8 -1
- package/dist-sdk/src/entities/phone-service/to-tf.js +16 -0
- package/dist-sdk/src/entities/record-create-form/from-tf.js +2 -2
- package/dist-sdk/src/entities/relationship/from-tf.js +9 -4
- package/dist-sdk/src/entities/relationship/module.js +2 -2
- package/dist-sdk/src/entities/relationship/pair-check.d.ts +6 -2
- package/dist-sdk/src/entities/relationship/pair-check.js +105 -18
- package/dist-sdk/src/entities/relationship/to-tf.js +5 -2
- package/dist-sdk/src/entities/role/build.d.ts +3 -4
- package/dist-sdk/src/entities/role/permission-levels.d.ts +7 -0
- package/dist-sdk/src/entities/role/permission-levels.js +78 -0
- package/dist-sdk/src/entities/role/to-tf.js +32 -2
- package/dist-sdk/src/entities/search-table/build.d.ts +9 -3
- package/dist-sdk/src/entities/search-table/build.js +4 -4
- package/dist-sdk/src/entities/search-table/printer.js +3 -1
- package/dist-sdk/src/entities/search-table/to-tf.js +20 -2
- package/dist-sdk/src/entities/service-account/module.d.ts +2 -1
- package/dist-sdk/src/entities/service-account/module.js +4 -1
- package/dist-sdk/src/entities/service-account/resource-type.d.ts +2 -0
- package/dist-sdk/src/entities/service-account/resource-type.js +2 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.d.ts +20 -0
- package/dist-sdk/src/entities/service-account/role-membership-check.js +80 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.d.ts +15 -0
- package/dist-sdk/src/entities/shared/aspect-target-from-tf.js +36 -0
- package/dist-sdk/src/entities/shared/context.d.ts +14 -1
- package/dist-sdk/src/entities/shared/filters/ast.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/index.d.ts +97 -15
- package/dist-sdk/src/entities/shared/filters/index.js +30 -7
- package/dist-sdk/src/entities/shared/filters/option-lookups.d.ts +57 -0
- package/dist-sdk/src/entities/shared/filters/option-lookups.js +108 -0
- package/dist-sdk/src/entities/shared/filters/print.d.ts +2 -0
- package/dist-sdk/src/entities/shared/filters/print.js +19 -6
- package/dist-sdk/src/entities/shared/filters/tf-codec.d.ts +16 -7
- package/dist-sdk/src/entities/shared/filters/tf-codec.js +25 -5
- package/dist-sdk/src/entities/shared/filters/types.d.ts +4 -0
- package/dist-sdk/src/entities/shared/raw-option-id.d.ts +30 -0
- package/dist-sdk/src/entities/shared/raw-option-id.js +41 -0
- package/dist-sdk/src/entities/shared/tool-field-ref.d.ts +1 -1
- package/dist-sdk/src/entities/shared/tool-field-ref.js +3 -2
- package/dist-sdk/src/entities/skill/input-coverage.js +5 -2
- package/dist-sdk/src/entities/sla/build.d.ts +96 -0
- package/dist-sdk/src/entities/sla/build.js +124 -0
- package/dist-sdk/src/entities/sla/from-tf.d.ts +40 -0
- package/dist-sdk/src/entities/sla/from-tf.js +164 -0
- package/dist-sdk/src/entities/sla/index.d.ts +1 -0
- package/dist-sdk/src/entities/sla/index.js +1 -0
- package/dist-sdk/src/entities/sla/module.d.ts +4 -0
- package/dist-sdk/src/entities/sla/module.js +73 -0
- package/dist-sdk/src/entities/sla/printer.d.ts +2 -0
- package/dist-sdk/src/entities/sla/printer.js +84 -0
- package/dist-sdk/src/entities/sla/to-tf.d.ts +12 -0
- package/dist-sdk/src/entities/sla/to-tf.js +81 -0
- package/dist-sdk/src/entities/table/build.d.ts +7 -2
- package/dist-sdk/src/entities/table/build.js +22 -1
- package/dist-sdk/src/entities/table/deserializer/normalize.d.ts +4 -1
- package/dist-sdk/src/entities/table/from-tf.js +89 -14
- package/dist-sdk/src/entities/table/index.d.ts +1 -1
- package/dist-sdk/src/entities/table/to-tf.js +41 -2
- package/dist-sdk/src/entities/task/from-tf.js +3 -2
- package/dist-sdk/src/entities/view/custom-view-validate.d.ts +6 -4
- package/dist-sdk/src/entities/view/custom-view-validate.js +36 -18
- package/dist-sdk/src/entities/view/from-tf.js +16 -4
- package/dist-sdk/src/entities/view/to-tf.js +66 -47
- package/dist-sdk/src/entities/visual-flow/module.js +52 -1
- package/dist-sdk/src/entities/widget/from-tf.js +19 -8
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.d.ts +49 -4
- package/dist-sdk/src/generated/ragnarok/ragnarok-spec.js +2 -2
- package/dist-sdk/src/graph/index.d.ts +9 -0
- package/dist-sdk/src/graph/index.js +8 -0
- package/dist-sdk/src/graph/modules.js +13 -1
- package/dist-sdk/src/graph/resource-types.d.ts +47 -0
- package/dist-sdk/src/graph/resource-types.js +62 -0
- package/dist-sdk/src/graph/types.d.ts +113 -6
- package/package.json +7 -4
|
@@ -15,8 +15,9 @@ export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TASK_TYPES, AUTOMATION_TRIGGER_TY
|
|
|
15
15
|
* from v1's deploy-wired builder.
|
|
16
16
|
*/
|
|
17
17
|
export * as filter from "../shared/filters/index.js";
|
|
18
|
-
export { automationStatus, chainableTrigger, actions, automation, type ActionBuilder, type ActionChain, type ActionDef, type ActionOptions, type ActionSequenceDef, type ActionsStarted, type AutomationConfigured, type AutomationOptions, type AutomationStatus, type ForkJoinBranch, type ForkJoinBranchBuilder, type ForkJoinConfig, type ForEachBuilder, type ForEachConfig, type ForEachScope, type LoopScope, type NestedActionBuilder, type NestedActionChain, type NestedActionContext, type OperatorChild, type SwitchCase, type SwitchCaseBuilder, type SwitchConfig, type TriggerChain, type TriggerDef, type TriggerParamMeta } from "./build.js";
|
|
18
|
+
export { automationStatus, chainableTrigger, actions, automation, type ActionBuilder, type ActionChain, type ActionDef, type ActionOptions, type ActionSequenceDef, type ActionsStarted, type AutomationConfigured, type AutomationOptions, type AutomationStatus, type ForkJoinBranch, type ForkJoinBranchBuilder, type ForkJoinConfig, type ForEachBuilder, type ForEachConfig, type ForEachOutput, type ForEachScope, type LoopScope, type NestedActionBuilder, type NestedActionChain, type NestedActionContext, type OperatorChild, type SwitchCase, type SwitchCaseBuilder, type SwitchConfig, type TriggerChain, type TriggerDef, type TriggerParamMeta } from "./build.js";
|
|
19
19
|
export { ScriptCodeError, scriptFile, type ScriptCodeFn, type ScriptFile, type ScriptInput } from "./script-code.js";
|
|
20
|
+
export { unsafeScriptOutput } from "./unsafe-script-output.js";
|
|
20
21
|
export { workflowOutput, workflowOutputType, type WorkflowOutputDeclaration, type WorkflowOutputType, } from "./workflow-output.js";
|
|
21
22
|
export { addWatcher, aiAgent, aiClassify, aiEmailAnalysis, aiFileAnalysis, aiSearchTable, aiSummarize, aiTransform, apiRequest, approvalChain, approvalChainTemplate, approvalStatusUpdate, requiredSecret, assignGroup, assignUser, assignmentEngine, bulkExcel, bulkUpdateFields, calculation, createRecord, executeScript, findRelatedRecords, generateReport, initiateCall, initiateEmailConversation, notification, postComment, postTeamsMessage, procedure, readFile, recordFieldLocking, recordSearch, relateRecords, runAutomation, saveAttachment, sendEmail, sendSurvey, setVariable, tableRecordsSearch, unzip, updateField, userGroupSearch, userSearch, withFieldMappings, type AddWatcherOptions, type AiAgentAttachment, type AiAgentOptions, type AiAgentOutput, type AiAgentOutputField, type AiAgentOutputFieldType, type AiClassifyCategorySource, type AiClassifyOptions, type AiClassifyStaticCategory, type AiEmailAnalysisOptions, type AiFileAnalysisOptions, type AiSearchTableOptions, type AiSearchTableOutput, type AiSummarizeOptions, type AiTransformOptions, type ApiRequestHeader, type ApiRequestOptions, type ApiRequestOutputs, type ApiResponseType, type ApprovalChainOptions, type RequiredSecret, type ApprovalChainTemplateOptions, type ApprovalStatusUpdateOptions, type ApprovalStatusUpdateStatus, type AssignGroupOptions, type AssignUserOptions, type AssignmentEngineOptions, type BulkExcelFieldMapping, type BulkExcelFieldSource, type BulkExcelOptions, type BulkUpdateFieldsOptions, type BulkUpdateFieldsOutput, type CalculationEntry, type CalculationExpression, type CalculationInclude, type CalculationOptions, type CalculationOutputs, type CalculationValueInput, type CalculationValueOptions, type CalculationValueOutputs, type CalculationValues, type CreateRecordOptions, type CreateRecordOutput, type EmailAttachment, type ExecuteScriptFieldMapping, type ExecuteScriptOptions, type ExecuteScriptOutput, type FieldAssignment, type FindRelatedRecordsOptions, type FindRelatedRecordsOutput, type GenerateReportOptions, type InitiateCallOptions, type InitiateEmailConversationOptions, type InitiateEmailFirstEmail, type LegacyCalculationOptions, type MultiSelectUpdateMode, type NotificationOptions, type StaticGroupRecipient, type StaticUserRecipient, type PostCommentOptions, type PostTeamsMessageOptions, type LegacyProcedureOptions, type ProcedureOptions, type TypedProcedureOptions, type ReadFileDataSource, type ReadFileOptions, type RecordFieldLockingOptions, type RecordId, type RecordReference, type RecordSearchOptions, type RecordSearchOutput, type RelateRecordsOptions, type RunAutomationInput, type RunAutomationDynamicReferenceOptions, type RunAutomationOptions, type RunAutomationStaticOptions, type SaveAttachmentOptions, type ScriptOutputProperties, type ScriptOutputScalarType, type ScriptOutputType, type ScriptOutputs, type SendEmailOptions, type SendSurveyOptions, type SetVariableOptions, type TableRecordsSearchOptions, type TableRecordsSearchOutput, type UnzipOptions, type UpdateFieldAssignment, type UpdateFieldOptions, type UserGroupSearchOptions, type UserGroupSearchOutput, type UserGroupShape, type UserSearchOptions, type VariableAssign, type VariableDecl } from "./tasks.js";
|
|
22
23
|
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook, type AttachmentTriggerOptions, type AttachmentTriggerOutput, type CommentAddedTriggerOptions, type CommentAddedTriggerOutput, type ConversationEndConversationType, type ConversationEndTriggerOptions, type ConversationEndTriggerOutput, type DataMineTriggerOptions, type DataMineTriggerOutput, type EmailReceivedTriggerOptions, type EmailReceivedTriggerOutput, type RecordTriggerOptions, type RecordTriggerOutput, type ScheduleFrequency, type ScheduleTriggerOptions, type ScheduleTriggerOutput, type SlackMessageTriggerOutput, type SurveyResponseCreateTriggerOptions, type SurveyResponseCreateTriggerOutput, type TemporalTriggerOptions, type TemporalUnit, type WebhookTriggerOptions, type WebhookTriggerOutput, type Weekday, type approvalProcessStatusUpdatedStatus, type approvalProcessStatusUpdatedTriggerOptions } from "./triggers.js";
|
|
@@ -17,6 +17,7 @@ export { AUTOMATION_RESOURCE_TYPES, AUTOMATION_TASK_TYPES, AUTOMATION_TRIGGER_TY
|
|
|
17
17
|
export * as filter from "../shared/filters/index.js";
|
|
18
18
|
export { automationStatus, chainableTrigger, actions, automation } from "./build.js";
|
|
19
19
|
export { ScriptCodeError, scriptFile } from "./script-code.js";
|
|
20
|
+
export { unsafeScriptOutput } from "./unsafe-script-output.js";
|
|
20
21
|
export { workflowOutput, workflowOutputType, } from "./workflow-output.js";
|
|
21
22
|
export { addWatcher, aiAgent, aiClassify, aiEmailAnalysis, aiFileAnalysis, aiSearchTable, aiSummarize, aiTransform, apiRequest, approvalChain, approvalChainTemplate, approvalStatusUpdate, requiredSecret, assignGroup, assignUser, assignmentEngine, bulkExcel, bulkUpdateFields, calculation, createRecord, executeScript, findRelatedRecords, generateReport, initiateCall, initiateEmailConversation, notification, postComment, postTeamsMessage, procedure, readFile, recordFieldLocking, recordSearch, relateRecords, runAutomation, saveAttachment, sendEmail, sendSurvey, setVariable, tableRecordsSearch, unzip, updateField, userGroupSearch, userSearch, withFieldMappings } from "./tasks.js";
|
|
22
23
|
export { approvalProcessStatusUpdated, attachment, commentAdded, conversationEnd, dataMine, emailReceived, onDemand, recordCreated, recordUpdated, schedule, slackMessage, surveyResponseCreate, temporal, webHook, webhook } from "./triggers.js";
|
|
@@ -9,9 +9,10 @@ import { type EntityKindModule } from "../../graph/types.js";
|
|
|
9
9
|
* any automation is skipped, so a released file left in place would still
|
|
10
10
|
* build and the next plan would create a duplicate. The file is kept instead
|
|
11
11
|
* when a resource that stays in source still references the automation
|
|
12
|
-
* (`keptFor`): agent and skill run-automation tools
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* (`keptFor`): agent and skill run-automation tools and other kept
|
|
13
|
+
* automations can only name an automation in source, so archiving would
|
|
14
|
+
* break build. A widget can (#1901), and so can a dynamic-layout button
|
|
15
|
+
* (#2693). An automation pull skips without releasing keeps its state and
|
|
15
16
|
* its existing source file, so the next plan builds that older file against
|
|
16
17
|
* the live automation.
|
|
17
18
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** The automation entity's registry entry (see src/graph/). */
|
|
2
|
+
import { canonicalAuditRefKey } from "./system-ref-name.js";
|
|
2
3
|
import { appScopedResourceLabel, sanitizeName, scopedLabelToBagKey, tfLabelToTsLabel, isTfExpr } from "../../engine/tf/index.js";
|
|
3
4
|
function elementOwnerHandle(payload) {
|
|
4
5
|
if (payload === null || typeof payload !== "object" || !("handle" in payload))
|
|
@@ -11,7 +12,7 @@ import { hasUnresolvedForEachItem, preserveAuthoredAutomationPullMeta, printAuto
|
|
|
11
12
|
import { automationFromTf, automationOwnedAddresses, ForEachItemOutsideLoopError, UnresolvedForeignServiceAccountError, UnresolvedTaskFilterRefError, UnsupportedMultiTriggerError } from "./from-tf.js";
|
|
12
13
|
import { scriptFileRefs } from "./script-code.js";
|
|
13
14
|
import { typedCoverageGap } from "../../engine/coverage-gaps.js";
|
|
14
|
-
import { taskOutputReferences, USER_SEARCH_OUTPUT_REFERENCES } from "./task-output-labels.js";
|
|
15
|
+
import { executeScriptOutputReferences, taskOutputReferences, USER_SEARCH_OUTPUT_REFERENCES } from "./task-output-labels.js";
|
|
15
16
|
import { automationToTf } from "./to-tf.js";
|
|
16
17
|
import { approvalChainLostStage } from "../approval-chain/from-tf.js";
|
|
17
18
|
import { IMPLEMENTED_FILE_READER_RESOURCE_TYPES } from "../file-reader/types.js";
|
|
@@ -129,9 +130,10 @@ function registerForeignObjectIdDeps(doc, automationLabel, ctx) {
|
|
|
129
130
|
* any automation is skipped, so a released file left in place would still
|
|
130
131
|
* build and the next plan would create a duplicate. The file is kept instead
|
|
131
132
|
* when a resource that stays in source still references the automation
|
|
132
|
-
* (`keptFor`): agent and skill run-automation tools
|
|
133
|
-
*
|
|
134
|
-
*
|
|
133
|
+
* (`keptFor`): agent and skill run-automation tools and other kept
|
|
134
|
+
* automations can only name an automation in source, so archiving would
|
|
135
|
+
* break build. A widget can (#1901), and so can a dynamic-layout button
|
|
136
|
+
* (#2693). An automation pull skips without releasing keeps its state and
|
|
135
137
|
* its existing source file, so the next plan builds that older file against
|
|
136
138
|
* the live automation.
|
|
137
139
|
*/
|
|
@@ -143,7 +145,7 @@ export function droppedAutomationGap(autoBlock, autoLabel, gap) {
|
|
|
143
145
|
entity: `automation ${JSON.stringify(display)} (${autoLabel})`,
|
|
144
146
|
detail: `skipped, not written to source: ${gap.why}`,
|
|
145
147
|
consequence: gap.released && gap.keptFor !== undefined
|
|
146
|
-
? `it is not adopted, and adoption releases it from state if this workspace managed it, so it keeps running on the platform unmanaged. Pull keeps its authored file, if there is one, because ${gap.keptFor.join(", ")} still name${gap.keptFor.length === 1 ? "s" : ""} it in source, and agent and skill tools
|
|
148
|
+
? `it is not adopted, and adoption releases it from state if this workspace managed it, so it keeps running on the platform unmanaged. Pull keeps its authored file, if there is one, because ${gap.keptFor.join(", ")} still name${gap.keptFor.length === 1 ? "s" : ""} it in source, and agent and skill tools and other automations cannot name a platform id instead, so moving the file would break build. While that file exists the next plan creates a second copy of the automation: review the plan before applying, and remove those references and the file to stop it. ${gap.nextStep}`
|
|
147
149
|
: gap.released && gap.settleByState === true
|
|
148
150
|
? `it is not adopted; adoption releases it from state if this workspace managed it, and once state no longer manages it pull moves its authored file, if there is one, to .edk-state/pull-backups so the next plan neither destroys it nor creates a duplicate. Until a pull releases it (under --no-adopt, or when adoption stops before releasing it), its file and state stay as they were and this workspace still manages it. Once a pull releases it, it keeps running on the platform unmanaged and its file is archived; do not restore that file. ${gap.nextStep}`
|
|
149
151
|
: gap.released
|
|
@@ -157,7 +159,8 @@ const FIX_OR_REPORT = "If you can change what the reason names in the platform,
|
|
|
157
159
|
* Addresses of the stream's resources that stay in source (`inSource`) and
|
|
158
160
|
* reference any of `owned` by source name. A widget does not count: with its
|
|
159
161
|
* automation out of source, build points it at the live automation through a
|
|
160
|
-
* display-name lookup (#1901), so archiving is safe.
|
|
162
|
+
* display-name lookup (#1901), so archiving is safe. A dynamic-layout button
|
|
163
|
+
* does not count either (#2693). Any other reference from that layout still does.
|
|
161
164
|
*/
|
|
162
165
|
function externalReferrers(stream, owned, inSource) {
|
|
163
166
|
const ownedSet = new Set(owned);
|
|
@@ -168,11 +171,26 @@ function externalReferrers(stream, owned, inSource) {
|
|
|
168
171
|
const address = `${block.type}.${block.label}`;
|
|
169
172
|
if (ownedSet.has(address) || block.type === "elementum_widget" || !inSource(address))
|
|
170
173
|
continue;
|
|
171
|
-
|
|
174
|
+
const attrs = block.type === "elementum_dynamic_layout" ? withoutAutomationButtons(block.attrs) : block.attrs;
|
|
175
|
+
if (referenceIn(attrs, ownedSet) !== undefined)
|
|
172
176
|
referrers.push(address);
|
|
173
177
|
}
|
|
174
178
|
return referrers;
|
|
175
179
|
}
|
|
180
|
+
/** Layout attrs with each `automation_button` removed, so a button's automation ref does not keep the file. */
|
|
181
|
+
function withoutAutomationButtons(value) {
|
|
182
|
+
if (Array.isArray(value))
|
|
183
|
+
return value.map(withoutAutomationButtons);
|
|
184
|
+
if (value === null || typeof value !== "object")
|
|
185
|
+
return value;
|
|
186
|
+
const out = {};
|
|
187
|
+
for (const [key, child] of Object.entries(value)) {
|
|
188
|
+
if (key === "automation_button")
|
|
189
|
+
continue;
|
|
190
|
+
out[key] = withoutAutomationButtons(child);
|
|
191
|
+
}
|
|
192
|
+
return out;
|
|
193
|
+
}
|
|
176
194
|
/** Addresses of the stream's approval processes that pull leaves unmanaged because their stage lost its only handle (#1136). */
|
|
177
195
|
function lostStageApprovalChains(stream, ctx) {
|
|
178
196
|
const lost = new Set();
|
|
@@ -274,7 +292,7 @@ function extractAutomations(ownBlocks, stream, ctx) {
|
|
|
274
292
|
}
|
|
275
293
|
}
|
|
276
294
|
try {
|
|
277
|
-
const extracted = automationFromTf(doc, autoLabel, ctx.appRefName, ctx.foreignFieldRefsById, ctx.foreignFieldRefsByDataAddress, ctx.foreignTableRefsById, ctx.
|
|
295
|
+
const extracted = automationFromTf(doc, autoLabel, ctx.appRefName, ctx.foreignFieldRefsById, ctx.foreignFieldRefsByDataAddress, ctx.foreignTableRefsById, ctx.picklistOptionsByField, ctx.fieldNamesByOwnerRefName, ctx.foreignAppRefNames, ctx.foreignElementRefNames, ctx.procedureKeysByDiscriminator, ctx.foreignTaskRefNames, ctx.groupKeysByName, ctx.serviceAccountsById, ctx.foreignFileReaderRefsById, ctx.foreignAppRefNamespaces);
|
|
278
296
|
// edk#1646 / #1858: adopt when a rebuilt ctx ref matches provider Read.
|
|
279
297
|
// Otherwise the automation stays platform-managed. Releasing its state
|
|
280
298
|
// also archives the authored file, so the next plan does not create a
|
|
@@ -383,10 +401,12 @@ function extractAutomations(ownBlocks, stream, ctx) {
|
|
|
383
401
|
}
|
|
384
402
|
}
|
|
385
403
|
// Archive a released automation's file only when nothing that stays in
|
|
386
|
-
// source still references it (#1877)
|
|
387
|
-
// tools
|
|
388
|
-
//
|
|
389
|
-
//
|
|
404
|
+
// source still references it (#1877). Agent and skill run-automation
|
|
405
|
+
// tools and other automations can only name an automation in source, so
|
|
406
|
+
// a reference from one of those keeps the file, and the warning says so.
|
|
407
|
+
// A dynamic-layout button looks the live automation up by the display
|
|
408
|
+
// name pull prints (#2693), so its reference does not keep the file.
|
|
409
|
+
// What stays in source is known only after
|
|
390
410
|
// every own-file child of the stream is extracted, so stream root decides
|
|
391
411
|
// it and calls back. A kept file is source too: what it references must
|
|
392
412
|
// stay (an automation a kept automation runs is kept as well), so iterate
|
|
@@ -566,13 +586,16 @@ export const automationModule = {
|
|
|
566
586
|
: {}),
|
|
567
587
|
...(ctx.elementsWithoutAuditFields !== undefined ? { elementsWithoutAuditFields: ctx.elementsWithoutAuditFields } : {}),
|
|
568
588
|
diagnostics: ctx.diagnostics,
|
|
589
|
+
...(ctx.advisoriesWhileRecorded !== undefined ? { advisoriesWhileRecorded: ctx.advisoriesWhileRecorded } : {}),
|
|
569
590
|
fieldAddresses: ctx.fieldAddresses ?? new Map(),
|
|
570
591
|
fieldNames: ctx.fieldNames ?? new Map(),
|
|
571
592
|
fieldMetadata: ctx.fieldMetadata ?? new Map(),
|
|
572
593
|
...(ctx.fieldNamesByAppRefName !== undefined ? { fieldNamesByAppRefName: ctx.fieldNamesByAppRefName } : {}),
|
|
573
594
|
...(ctx.fieldAddressesByAppRefName !== undefined ? { fieldAddressesByAppRefName: ctx.fieldAddressesByAppRefName } : {}),
|
|
595
|
+
...(ctx.catalogFieldTypesByAppRefName !== undefined ? { catalogFieldTypesByAppRefName: ctx.catalogFieldTypesByAppRefName } : {}),
|
|
574
596
|
...(ctx.authoredAspectKeys !== undefined ? { authoredAspectKeys: ctx.authoredAspectKeys } : {}),
|
|
575
597
|
...(ctx.allowUnknownPicklistOptions === true ? { allowUnknownPicklistOptions: true } : {}),
|
|
598
|
+
...(ctx.optionIds !== undefined ? { optionIds: ctx.optionIds } : {}),
|
|
576
599
|
orgRefs: ctx.orgRefs,
|
|
577
600
|
workspaceAspects: ctx.workspaceAspects,
|
|
578
601
|
...(ctx.outOfScopeApps !== undefined && { outOfScopeApps: ctx.outOfScopeApps }),
|
|
@@ -605,6 +628,7 @@ export const automationModule = {
|
|
|
605
628
|
taskOutputReferences: {
|
|
606
629
|
...taskOutputReferences(),
|
|
607
630
|
elementum_user_search_task: USER_SEARCH_OUTPUT_REFERENCES,
|
|
631
|
+
elementum_execute_script_task: executeScriptOutputReferences(),
|
|
608
632
|
},
|
|
609
633
|
// An on-demand parameter used as a script input: the build writes the
|
|
610
634
|
// envelope with the platform's normalized name (#1525), the export the
|
|
@@ -626,6 +650,15 @@ export const automationModule = {
|
|
|
626
650
|
{ resourceType: "elementum_create_record_task", attribute: "fields" },
|
|
627
651
|
],
|
|
628
652
|
recordFieldOutputKeys: [{ nameAttribute: "name", ownerAttribute: "object_id" }],
|
|
653
|
+
// A platform-named audit ref ("Created on", or "<input> - Created on")
|
|
654
|
+
// and the provider's alias of it ("Created At"), which a build reads
|
|
655
|
+
// (#2936). The provider skips the alias when the owner has its own
|
|
656
|
+
// "Created At" field, and this check can't see that. It relies on pull:
|
|
657
|
+
// a platform spelling decodes to the typed accessor only for an owner
|
|
658
|
+
// whose fields pull knows and that has no field of the provider's name
|
|
659
|
+
// (customFieldNamed in from-tf.ts); otherwise it stays a raw key on both
|
|
660
|
+
// sides, which this rewrite leaves equal.
|
|
661
|
+
mapKeyAliases: [{ attribute: "refs", canonicalKey: canonicalAuditRefKey }],
|
|
629
662
|
computedReferenceMaps: [{
|
|
630
663
|
resourceType: "elementum_on_demand_trigger",
|
|
631
664
|
attribute: "filter_refs",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A record-bearing task's or trigger's write-only `refs_read` (edk#2648):
|
|
3
|
+
* the `refs` keys this automation's resources read from it. The provider
|
|
4
|
+
* plans `refs` unknown while the owner's field set changes (edk#2280,
|
|
5
|
+
* edk#2438), which made every task that reads a trigger's refs plan an
|
|
6
|
+
* update when one field was added. With `refs_read` it keeps `refs` known
|
|
7
|
+
* when every key read is still right, and plans them unknown only when a key
|
|
8
|
+
* read is new or belongs to a field that changes in this apply.
|
|
9
|
+
*/
|
|
10
|
+
import { type TfBlock } from "../../engine/tf/index.js";
|
|
11
|
+
/**
|
|
12
|
+
* Sets `refs_read` on each block that has `object_field_ids`, from every
|
|
13
|
+
* `<type>.<label>.refs["<key>"]` read in `blocks`. A read of the whole map,
|
|
14
|
+
* or of a key that isn't a literal index, leaves `refs_read` unset, so the
|
|
15
|
+
* provider plans as before. Pull's build-vs-export compare skips `refs_read`
|
|
16
|
+
* because export does not write it; it is a build-only planning hint
|
|
17
|
+
* (edk#2649 H1).
|
|
18
|
+
*/
|
|
19
|
+
export declare function setRefsRead(blocks: readonly TfBlock[]): void;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A record-bearing task's or trigger's write-only `refs_read` (edk#2648):
|
|
3
|
+
* the `refs` keys this automation's resources read from it. The provider
|
|
4
|
+
* plans `refs` unknown while the owner's field set changes (edk#2280,
|
|
5
|
+
* edk#2438), which made every task that reads a trigger's refs plan an
|
|
6
|
+
* update when one field was added. With `refs_read` it keeps `refs` known
|
|
7
|
+
* when every key read is still right, and plans them unknown only when a key
|
|
8
|
+
* read is new or belongs to a field that changes in this apply.
|
|
9
|
+
*/
|
|
10
|
+
import { forEachExpr } from "../../engine/tf/index.js";
|
|
11
|
+
/**
|
|
12
|
+
* Sets `refs_read` on each block that has `object_field_ids`, from every
|
|
13
|
+
* `<type>.<label>.refs["<key>"]` read in `blocks`. A read of the whole map,
|
|
14
|
+
* or of a key that isn't a literal index, leaves `refs_read` unset, so the
|
|
15
|
+
* provider plans as before. Pull's build-vs-export compare skips `refs_read`
|
|
16
|
+
* because export does not write it; it is a build-only planning hint
|
|
17
|
+
* (edk#2649 H1).
|
|
18
|
+
*/
|
|
19
|
+
export function setRefsRead(blocks) {
|
|
20
|
+
const readKeys = new Map();
|
|
21
|
+
for (const block of blocks) {
|
|
22
|
+
for (const value of Object.values(block.attrs)) {
|
|
23
|
+
forEachExpr(value, (e) => {
|
|
24
|
+
if (e.$expr !== "resource-attr" || e.path[0] !== "refs")
|
|
25
|
+
return;
|
|
26
|
+
const address = `${e.type}.${e.label}`;
|
|
27
|
+
const index = e.path[1];
|
|
28
|
+
if (e.path.length !== 2 || typeof index !== "object") {
|
|
29
|
+
readKeys.set(address, "whole map");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const keys = readKeys.get(address) ?? new Set();
|
|
33
|
+
if (keys === "whole map")
|
|
34
|
+
return;
|
|
35
|
+
keys.add(index.index);
|
|
36
|
+
readKeys.set(address, keys);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
for (const block of blocks) {
|
|
41
|
+
if (block.kind !== "resource" || block.attrs["object_field_ids"] === undefined)
|
|
42
|
+
continue;
|
|
43
|
+
const keys = readKeys.get(`${block.type}.${block.label}`) ?? new Set();
|
|
44
|
+
if (keys === "whole map")
|
|
45
|
+
continue;
|
|
46
|
+
block.attrs["refs_read"] = [...keys].sort();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The accessor path for a stored Slack message trigger reference, or
|
|
3
|
+
* undefined when its first segment names no Slack output (pull keeps it).
|
|
4
|
+
*/
|
|
5
|
+
export declare function slackMessageTriggerPathFromWire(path: readonly string[]): string[] | undefined;
|
|
6
|
+
/** The `refs` map key for `ctx.trigger.<name>` on a Slack message trigger. */
|
|
7
|
+
export declare function slackMessageTriggerRefName(name: string): string;
|
|
8
|
+
/** The `triggerReference.name` (calculation formula, ValueReference) for `ctx.trigger.<name>`. */
|
|
9
|
+
export declare function slackMessageTriggerReferenceName(name: string): string;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { EntityTfError } from "../../engine/entity.js";
|
|
2
|
+
/**
|
|
3
|
+
* Every `ctx.trigger.<accessor>` on a Slack message trigger (#2581), keyed by
|
|
4
|
+
* `keyof SlackMessageTriggerOutput` so an output added to the type without an
|
|
5
|
+
* entry here fails `tsc`. Live-confirmed (`ei refs --from-remote`, edk#2581):
|
|
6
|
+
* - `refsKey` is the trigger's `refs` map key, read by task inputs and filters;
|
|
7
|
+
* - `referenceName` is its `triggerReference.name`, the name a calculation
|
|
8
|
+
* formula (`{{trigger name="content"}}`) and a ValueReference envelope use.
|
|
9
|
+
* The platform rejects the refs key there with `Unable to validate`.
|
|
10
|
+
*/
|
|
11
|
+
const SLACK_MESSAGE_TRIGGER_REFS = {
|
|
12
|
+
threadId: { refsKey: "Slack Thread ID", referenceName: "threadId" },
|
|
13
|
+
channelId: { refsKey: "Slack Channel ID", referenceName: "channelId" },
|
|
14
|
+
authorEmail: { refsKey: "Message Author Email", referenceName: "authorEmail" },
|
|
15
|
+
authorId: { refsKey: "Message Author ID", referenceName: "authorId" },
|
|
16
|
+
authorName: { refsKey: "Message Author Name", referenceName: "authorName" },
|
|
17
|
+
content: { refsKey: "Message Content", referenceName: "content" },
|
|
18
|
+
messageId: { refsKey: "Message ID", referenceName: "messageId" },
|
|
19
|
+
meta: { refsKey: "Message Metadata", referenceName: "metadata" },
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Names pull may find stored on a Slack message trigger reference → accessor:
|
|
23
|
+
* the refs keys, the reference names, and the accessor names removed in
|
|
24
|
+
* #2581. Pull-only, so a re-pull writes the one accessor spelling.
|
|
25
|
+
*/
|
|
26
|
+
const SLACK_MESSAGE_TRIGGER_REF_FROM_WIRE = new Map([
|
|
27
|
+
...Object.entries(SLACK_MESSAGE_TRIGGER_REFS).flatMap(([accessor, { refsKey, referenceName }]) => [
|
|
28
|
+
[refsKey, accessor],
|
|
29
|
+
[referenceName, accessor],
|
|
30
|
+
[accessor, accessor],
|
|
31
|
+
]),
|
|
32
|
+
["slackThreadId", "threadId"],
|
|
33
|
+
["slackChannelId", "channelId"],
|
|
34
|
+
["messageAuthorEmail", "authorEmail"],
|
|
35
|
+
["messageAuthorId", "authorId"],
|
|
36
|
+
["messageAuthorName", "authorName"],
|
|
37
|
+
["messageContent", "content"],
|
|
38
|
+
["messageMetadata", "meta"],
|
|
39
|
+
]);
|
|
40
|
+
/**
|
|
41
|
+
* The accessor path for a stored Slack message trigger reference, or
|
|
42
|
+
* undefined when its first segment names no Slack output (pull keeps it).
|
|
43
|
+
*/
|
|
44
|
+
export function slackMessageTriggerPathFromWire(path) {
|
|
45
|
+
const accessor = path[0] !== undefined ? SLACK_MESSAGE_TRIGGER_REF_FROM_WIRE.get(path[0]) : undefined;
|
|
46
|
+
return accessor !== undefined ? [accessor, ...path.slice(1)] : undefined;
|
|
47
|
+
}
|
|
48
|
+
const ACCESSOR_BY_REFS_KEY_LOWER = new Map(Object.entries(SLACK_MESSAGE_TRIGGER_REFS).map(([accessor, { refsKey }]) => [refsKey.toLowerCase(), accessor]));
|
|
49
|
+
/**
|
|
50
|
+
* Resolve `ctx.trigger.<name>` on a Slack message trigger. Fails closed: an
|
|
51
|
+
* accessor the trigger does not publish is a build error, not a name that
|
|
52
|
+
* only fails at apply (`Invalid index`, `Unable to validate`).
|
|
53
|
+
*/
|
|
54
|
+
function resolveSlackAccessor(name, column) {
|
|
55
|
+
const byRefsKey = ACCESSOR_BY_REFS_KEY_LOWER.get(name.toLowerCase());
|
|
56
|
+
if (byRefsKey !== undefined)
|
|
57
|
+
return SLACK_MESSAGE_TRIGGER_REFS[byRefsKey][column];
|
|
58
|
+
const [head, ...rest] = name.split(".");
|
|
59
|
+
const entry = Object.hasOwn(SLACK_MESSAGE_TRIGGER_REFS, head)
|
|
60
|
+
? SLACK_MESSAGE_TRIGGER_REFS[head]
|
|
61
|
+
: undefined;
|
|
62
|
+
if (entry === undefined) {
|
|
63
|
+
throw new EntityTfError(`ctx.trigger.${name}: a Slack message trigger publishes no such reference. ` +
|
|
64
|
+
`Use one of ${Object.keys(SLACK_MESSAGE_TRIGGER_REFS).join(", ")}.`);
|
|
65
|
+
}
|
|
66
|
+
return [entry[column], ...rest].join(".");
|
|
67
|
+
}
|
|
68
|
+
/** The `refs` map key for `ctx.trigger.<name>` on a Slack message trigger. */
|
|
69
|
+
export function slackMessageTriggerRefName(name) {
|
|
70
|
+
return resolveSlackAccessor(name, "refsKey");
|
|
71
|
+
}
|
|
72
|
+
/** The `triggerReference.name` (calculation formula, ValueReference) for `ctx.trigger.<name>`. */
|
|
73
|
+
export function slackMessageTriggerReferenceName(name) {
|
|
74
|
+
return resolveSlackAccessor(name, "referenceName");
|
|
75
|
+
}
|
|
@@ -4,13 +4,33 @@ import { type SystemFieldKey } from "../../core/system-fields.js";
|
|
|
4
4
|
* from DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES, whatever the app authored.
|
|
5
5
|
*/
|
|
6
6
|
export declare const PROVIDER_FIXED_SYSTEM_FIELD_KEYS: ReadonlySet<SystemFieldKey>;
|
|
7
|
+
/**
|
|
8
|
+
* The display names, other than its deploy default, under which a refs map
|
|
9
|
+
* can list an audit field that the provider republishes under the default.
|
|
10
|
+
*/
|
|
11
|
+
export declare function platformAuditRefSpellings(key: SystemFieldKey): readonly string[];
|
|
7
12
|
/** The refs-map key a build emits for a record field display name plus wire suffix. */
|
|
8
13
|
export declare function recordFieldWireRefName(fieldName: string, wireSuffix: string): string;
|
|
9
14
|
/**
|
|
10
15
|
* Whether decoding `wireName` as `<key><wireSuffix>` is lossless: a build of
|
|
11
16
|
* the typed path must emit a key the live refs map resolves identically.
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
17
|
+
* Platform-composed apps name audit fields "Closed by" / "Created on"; the
|
|
18
|
+
* typed key rebuilds as "Closed By" / "Created At", which the provider
|
|
19
|
+
* publishes as an alias of the platform-named key (edk#2936). A "Field ID"
|
|
20
|
+
* read is not aliased, so it keeps the org's exact label.
|
|
15
21
|
*/
|
|
16
22
|
export declare function systemRefNameRoundTrips(key: SystemFieldKey, wireSuffix: string, wireName: string): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Whether `wireName` is a platform spelling of `<key><wireSuffix>` that a
|
|
25
|
+
* build reaches only through the provider's alias ("Created on" for
|
|
26
|
+
* "Created At"). The provider adds no alias when the owner has a field of the
|
|
27
|
+
* provider's name, so a decode must first rule that out.
|
|
28
|
+
*/
|
|
29
|
+
export declare function auditRefNeedsProviderAlias(key: SystemFieldKey, wireSuffix: string, wireName: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* The refs key a build emits for an audit ref the provider publishes under
|
|
32
|
+
* several spellings ("Created on", "Created At"; "Created By Email",
|
|
33
|
+
* "Created by Email"), or undefined for any other key. The pull's
|
|
34
|
+
* build-vs-export check reads both spellings as this one.
|
|
35
|
+
*/
|
|
36
|
+
export declare function canonicalAuditRefKey(key: string): string | undefined;
|
|
@@ -23,6 +23,40 @@ const PROVIDER_ALIASED_REF_NAMES = new Map([
|
|
|
23
23
|
["Updated by Manager Email", "Updated By Manager Email"],
|
|
24
24
|
["Updated By Manager Email", "Updated by Manager Email"],
|
|
25
25
|
]);
|
|
26
|
+
/**
|
|
27
|
+
* The names the platform gives an audit field when it composes an app
|
|
28
|
+
* ("Created on") or element ("Created On"); the provider creates them as
|
|
29
|
+
* DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES ("Created At"). Refs keys follow the live
|
|
30
|
+
* display name, so the provider also publishes each platform-named audit ref
|
|
31
|
+
* under the provider's name (addAuditFieldRefAliases in
|
|
32
|
+
* provider/internal/provider/trigger_common.go; keep the two tables in step).
|
|
33
|
+
* A build therefore always emits the provider's name (edk#2936).
|
|
34
|
+
*/
|
|
35
|
+
const PLATFORM_AUDIT_REF_SPELLINGS = {
|
|
36
|
+
createdAt: ["Created on", "Created On"],
|
|
37
|
+
createdBy: ["Created by"],
|
|
38
|
+
updatedAt: ["Updated on", "Updated On"],
|
|
39
|
+
updatedBy: ["Updated by"],
|
|
40
|
+
closedAt: ["Closed on", "Closed On"],
|
|
41
|
+
closedBy: ["Closed by"],
|
|
42
|
+
};
|
|
43
|
+
/** Refs-key suffixes the provider aliases for audit fields (no " Field ID"). */
|
|
44
|
+
const AUDIT_REF_ALIAS_SUFFIXES = new Set([
|
|
45
|
+
"",
|
|
46
|
+
" ID",
|
|
47
|
+
" Email",
|
|
48
|
+
" Name",
|
|
49
|
+
" Manager",
|
|
50
|
+
" Manager Email",
|
|
51
|
+
" Manager Name",
|
|
52
|
+
]);
|
|
53
|
+
/**
|
|
54
|
+
* The display names, other than its deploy default, under which a refs map
|
|
55
|
+
* can list an audit field that the provider republishes under the default.
|
|
56
|
+
*/
|
|
57
|
+
export function platformAuditRefSpellings(key) {
|
|
58
|
+
return PLATFORM_AUDIT_REF_SPELLINGS[key] ?? [];
|
|
59
|
+
}
|
|
26
60
|
/** The refs-map key a build emits for a record field display name plus wire suffix. */
|
|
27
61
|
export function recordFieldWireRefName(fieldName, wireSuffix) {
|
|
28
62
|
const refName = `${fieldName}${wireSuffix}`;
|
|
@@ -36,13 +70,61 @@ export function recordFieldWireRefName(fieldName, wireSuffix) {
|
|
|
36
70
|
/**
|
|
37
71
|
* Whether decoding `wireName` as `<key><wireSuffix>` is lossless: a build of
|
|
38
72
|
* the typed path must emit a key the live refs map resolves identically.
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
73
|
+
* Platform-composed apps name audit fields "Closed by" / "Created on"; the
|
|
74
|
+
* typed key rebuilds as "Closed By" / "Created At", which the provider
|
|
75
|
+
* publishes as an alias of the platform-named key (edk#2936). A "Field ID"
|
|
76
|
+
* read is not aliased, so it keeps the org's exact label.
|
|
42
77
|
*/
|
|
43
78
|
export function systemRefNameRoundTrips(key, wireSuffix, wireName) {
|
|
44
79
|
if (!PROVIDER_FIXED_SYSTEM_FIELD_KEYS.has(key))
|
|
45
80
|
return true;
|
|
46
81
|
const emitted = recordFieldWireRefName(DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES[key], wireSuffix);
|
|
47
|
-
return emitted === wireName || PROVIDER_ALIASED_REF_NAMES.get(emitted) === wireName
|
|
82
|
+
return emitted === wireName || PROVIDER_ALIASED_REF_NAMES.get(emitted) === wireName ||
|
|
83
|
+
auditRefNeedsProviderAlias(key, wireSuffix, wireName);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Whether `wireName` is a platform spelling of `<key><wireSuffix>` that a
|
|
87
|
+
* build reaches only through the provider's alias ("Created on" for
|
|
88
|
+
* "Created At"). The provider adds no alias when the owner has a field of the
|
|
89
|
+
* provider's name, so a decode must first rule that out.
|
|
90
|
+
*/
|
|
91
|
+
export function auditRefNeedsProviderAlias(key, wireSuffix, wireName) {
|
|
92
|
+
if (!PROVIDER_FIXED_SYSTEM_FIELD_KEYS.has(key) || !AUDIT_REF_ALIAS_SUFFIXES.has(wireSuffix))
|
|
93
|
+
return false;
|
|
94
|
+
const emitted = recordFieldWireRefName(DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES[key], wireSuffix);
|
|
95
|
+
if (emitted === wireName || PROVIDER_ALIASED_REF_NAMES.get(emitted) === wireName)
|
|
96
|
+
return false;
|
|
97
|
+
return platformAuditRefSpellings(key).some((spelling) => `${spelling}${wireSuffix}` === wireName);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* The refs key a build emits for an audit ref the provider publishes under
|
|
101
|
+
* several spellings ("Created on", "Created At"; "Created By Email",
|
|
102
|
+
* "Created by Email"), or undefined for any other key. The pull's
|
|
103
|
+
* build-vs-export check reads both spellings as this one.
|
|
104
|
+
*/
|
|
105
|
+
export function canonicalAuditRefKey(key) {
|
|
106
|
+
// An on-demand trigger with two or more record inputs keys their refs
|
|
107
|
+
// "<input> - <field>"; the provider aliases under that prefix too.
|
|
108
|
+
for (let at = key.indexOf(" - "); at >= 0; at = key.indexOf(" - ", at + 3)) {
|
|
109
|
+
const canonical = unprefixedCanonicalAuditRefKey(key.slice(at + 3));
|
|
110
|
+
if (canonical !== undefined)
|
|
111
|
+
return `${key.slice(0, at + 3)}${canonical}`;
|
|
112
|
+
}
|
|
113
|
+
return unprefixedCanonicalAuditRefKey(key);
|
|
114
|
+
}
|
|
115
|
+
function unprefixedCanonicalAuditRefKey(key) {
|
|
116
|
+
for (const fieldKey of PROVIDER_FIXED_SYSTEM_FIELD_KEYS) {
|
|
117
|
+
const defaultName = DEPLOY_DEFAULT_SYSTEM_FIELD_NAMES[fieldKey];
|
|
118
|
+
for (const suffix of AUDIT_REF_ALIAS_SUFFIXES) {
|
|
119
|
+
const emitted = recordFieldWireRefName(defaultName, suffix);
|
|
120
|
+
if (key === emitted)
|
|
121
|
+
return undefined;
|
|
122
|
+
if (key === `${defaultName}${suffix}` ||
|
|
123
|
+
PROVIDER_ALIASED_REF_NAMES.get(emitted) === key ||
|
|
124
|
+
platformAuditRefSpellings(fieldKey).some((spelling) => key === `${spelling}${suffix}`)) {
|
|
125
|
+
return emitted;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return undefined;
|
|
48
130
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type { TaskOutputReference } from "../../graph/types.js";
|
|
2
|
+
/** Platform reference name for a whole record's identity, distinct from its TEXT handle. */
|
|
3
|
+
export declare const RECORD_ID_REFERENCE_FIELD = "10000001-2000-4000-a000-800000000000";
|
|
2
4
|
/** userSearch authoring output → provider refs-map key (as exported from live user-search tasks). */
|
|
3
5
|
export declare const USER_SEARCH_REF_WIRE_NAMES: Readonly<Record<string, string>>;
|
|
4
6
|
/**
|
|
@@ -23,6 +25,15 @@ export declare const TASK_OUTPUT_REFERENCE_NAMES: Readonly<Record<string, Readon
|
|
|
23
25
|
* the envelope is of this type.
|
|
24
26
|
*/
|
|
25
27
|
export declare function taskOutputReferences(): Readonly<Record<string, Readonly<Record<string, TaskOutputReference>>>>;
|
|
28
|
+
/**
|
|
29
|
+
* executeScript contract outputs keyed by refs-map key ("Text Result" →
|
|
30
|
+
* `textResult`), for the build-vs-export comparison only. Build reads a
|
|
31
|
+
* script output as `refs["Text Result"]` (EXECUTE_SCRIPT_REFS_INDEX); the
|
|
32
|
+
* export spells the same read as the `textResult` envelope, so without this
|
|
33
|
+
* the comparison reported every such filter as a difference (edk#2791). Kept
|
|
34
|
+
* out of TASK_OUTPUT_REFERENCE_NAMES, which build also reads.
|
|
35
|
+
*/
|
|
36
|
+
export declare function executeScriptOutputReferences(): Readonly<Record<string, TaskOutputReference>>;
|
|
26
37
|
/**
|
|
27
38
|
* A record-bearing task's whole-record output (ASPECT_RECORD). The bare
|
|
28
39
|
* `.record` accessor otherwise builds the ASPECT_RECORD_ID `Record` key a
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { RESOURCE_TYPE_TO_EXECUTOR, TASK_OUTPUT_CONTRACTS } from "./generated/task-output-contracts.js";
|
|
2
|
+
import { EXECUTE_SCRIPT_REFS_INDEX } from "./output-key-wire-name.js";
|
|
3
|
+
/** Platform reference name for a whole record's identity, distinct from its TEXT handle. */
|
|
4
|
+
export const RECORD_ID_REFERENCE_FIELD = "10000001-2000-4000-a000-800000000000";
|
|
2
5
|
/** userSearch authoring output → provider refs-map key (as exported from live user-search tasks). */
|
|
3
6
|
export const USER_SEARCH_REF_WIRE_NAMES = {
|
|
4
7
|
"user.id": "User's Id",
|
|
@@ -89,6 +92,26 @@ export function taskOutputReferences() {
|
|
|
89
92
|
}))];
|
|
90
93
|
}));
|
|
91
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* executeScript contract outputs keyed by refs-map key ("Text Result" →
|
|
97
|
+
* `textResult`), for the build-vs-export comparison only. Build reads a
|
|
98
|
+
* script output as `refs["Text Result"]` (EXECUTE_SCRIPT_REFS_INDEX); the
|
|
99
|
+
* export spells the same read as the `textResult` envelope, so without this
|
|
100
|
+
* the comparison reported every such filter as a difference (edk#2791). Kept
|
|
101
|
+
* out of TASK_OUTPUT_REFERENCE_NAMES, which build also reads.
|
|
102
|
+
*/
|
|
103
|
+
export function executeScriptOutputReferences() {
|
|
104
|
+
const taskType = "elementum_execute_script_task";
|
|
105
|
+
const executor = RESOURCE_TYPE_TO_EXECUTOR[taskType];
|
|
106
|
+
return Object.fromEntries(Object.entries(EXECUTE_SCRIPT_REFS_INDEX)
|
|
107
|
+
.filter(([name, key]) => name !== key)
|
|
108
|
+
.map(([name, key]) => {
|
|
109
|
+
const contract = executor === undefined ? undefined : TASK_OUTPUT_CONTRACTS[executor]?.[name];
|
|
110
|
+
if (contract === undefined)
|
|
111
|
+
throw new Error(`no output contract for ${taskType} output "${name}" (refs key "${key}")`);
|
|
112
|
+
return [key, { name, fieldType: contract.fieldType, multiple: contract.multiple }];
|
|
113
|
+
}));
|
|
114
|
+
}
|
|
92
115
|
/**
|
|
93
116
|
* A record-bearing task's whole-record output (ASPECT_RECORD). The bare
|
|
94
117
|
* `.record` accessor otherwise builds the ASPECT_RECORD_ID `Record` key a
|
|
@@ -20,6 +20,7 @@ import { type Ref, type ValueOrRef } from "../shared/ref.js";
|
|
|
20
20
|
import type { DropdownValue } from "../shared/types/platform.js";
|
|
21
21
|
import type { ActionDef } from "./build.js";
|
|
22
22
|
import { type CalculationValue } from "./calculation-expression.js";
|
|
23
|
+
import type { TextOptionValue } from "../shared/filters/index.js";
|
|
23
24
|
import type { Filter } from "./filter.js";
|
|
24
25
|
import { type ScriptCodeFn, type ScriptFile } from "./script-code.js";
|
|
25
26
|
export type { CalculationInclude } from "../field/calc/types.js";
|
|
@@ -48,7 +49,7 @@ type UpdateModeForField<F extends FieldRef | UnsafePlatformId> = [F] extends [Mu
|
|
|
48
49
|
type UpdateValueForField<F extends FieldRef | UnsafePlatformId> = IsAny<F> extends true ? {
|
|
49
50
|
readonly value: ValueOrRef<unknown>;
|
|
50
51
|
} : [F] extends [MultiSelectFieldRef] ? {
|
|
51
|
-
readonly value: readonly string[] | Ref<readonly string[], string> | Ref<readonly DropdownValue[], string>;
|
|
52
|
+
readonly value: readonly (TextOptionValue | string)[] | Ref<readonly string[], string> | Ref<readonly DropdownValue[], string>;
|
|
52
53
|
} : {
|
|
53
54
|
readonly value: ValueOrRef<unknown>;
|
|
54
55
|
};
|
|
@@ -67,6 +68,7 @@ export interface RecordSearchOptions<A extends AppOrElementOrTaskRef = AppOrElem
|
|
|
67
68
|
/** Required — the platform rejects a record search with no filter (use `filter.whereTrue()` for all). */
|
|
68
69
|
readonly filter: Filter;
|
|
69
70
|
readonly sort?: Record<string, unknown>;
|
|
71
|
+
/** Integer from 1 to 500. Compare totalCount with returned records before treating a search as complete. */
|
|
70
72
|
readonly limit?: number;
|
|
71
73
|
}
|
|
72
74
|
export declare function recordSearch<A extends AppOrElementOrTaskRef>(opts: RecordSearchOptions<A>): ActionDef<RecordSearchOutput<A>>;
|
|
@@ -600,6 +602,15 @@ export interface AiTransformOptions {
|
|
|
600
602
|
/** Required — `BOOLEAN`, `DATE`, `DATETIME`, or `TEXT`. */
|
|
601
603
|
readonly fieldType: string;
|
|
602
604
|
readonly connector?: ConnectorRef;
|
|
605
|
+
/**
|
|
606
|
+
* Size of the embedding the task produces (the web app's **Dimensions**).
|
|
607
|
+
* Only for a connector whose embedding model lists the sizes it supports,
|
|
608
|
+
* and only one of those sizes (for example 256, 512 or 1024 for Titan Embed
|
|
609
|
+
* V2). A whole number ≥ 1. Leave it out for no size. A size can be changed
|
|
610
|
+
* in place (512 to 256). Removing it from a task that has one fails the
|
|
611
|
+
* plan, so set it again or delete and recreate the task.
|
|
612
|
+
*/
|
|
613
|
+
readonly dimensions?: number;
|
|
603
614
|
}
|
|
604
615
|
export declare function aiTransform(opts: AiTransformOptions): ActionDef<Record<string, unknown>>;
|
|
605
616
|
export interface AiEmailAnalysisOptions {
|
|
@@ -684,6 +695,8 @@ export declare function assignGroup(opts: AssignGroupOptions): ActionDef<Empty>;
|
|
|
684
695
|
export interface AddWatcherOptions {
|
|
685
696
|
readonly userIds?: readonly StaticUserRecipient[];
|
|
686
697
|
readonly groupIds?: readonly StaticGroupRecipient[];
|
|
698
|
+
readonly userRefs?: readonly ValueOrRef<string>[];
|
|
699
|
+
readonly groupRefs?: readonly ValueOrRef<string>[];
|
|
687
700
|
readonly record?: ValueOrRef<unknown>;
|
|
688
701
|
}
|
|
689
702
|
export declare function addWatcher(opts: AddWatcherOptions): ActionDef<Empty>;
|
|
@@ -888,10 +901,15 @@ export declare function calculation<const Values extends CalculationValues>(opts
|
|
|
888
901
|
/** @deprecated Prefer `calculation({ values: { name: expression } })`. */
|
|
889
902
|
export declare function calculation<const Entries extends readonly CalculationEntry[]>(opts: LegacyCalculationOptions<Entries>): ActionDef<CalculationOutputs<Entries>>;
|
|
890
903
|
/** The status to set on the referenced approval. Mirrors the provider's `status` validator. */
|
|
891
|
-
export type ApprovalStatusUpdateStatus = "APPROVED" | "DENIED" | "EXCEPTION";
|
|
904
|
+
export type ApprovalStatusUpdateStatus = "APPROVED" | "DENIED" | "CANCELLED" | "EXCEPTION";
|
|
892
905
|
export interface ApprovalStatusUpdateOptions {
|
|
893
|
-
/**
|
|
894
|
-
|
|
906
|
+
/**
|
|
907
|
+
* Approval process (approval chain template) whose status to update.
|
|
908
|
+
* Sent as the platform's approvalChainTemplateId (edk#1581).
|
|
909
|
+
*/
|
|
910
|
+
readonly approvalReference: ApprovalProcessRef;
|
|
911
|
+
/** Record whose approval status to update. */
|
|
912
|
+
readonly record: RecordReference;
|
|
895
913
|
readonly status: ApprovalStatusUpdateStatus;
|
|
896
914
|
readonly reason?: ValueOrRef<unknown>;
|
|
897
915
|
}
|
|
@@ -1030,6 +1048,13 @@ export interface ApprovalChainOptions {
|
|
|
1030
1048
|
readonly approvers?: readonly ValueOrRef<unknown>[];
|
|
1031
1049
|
readonly reason?: ValueOrRef<unknown>;
|
|
1032
1050
|
readonly summary?: ValueOrRef<unknown>;
|
|
1051
|
+
/**
|
|
1052
|
+
* The Approval Process Tag. A record can have one active approval per
|
|
1053
|
+
* approval process and tag, so approvals of the same process that run in
|
|
1054
|
+
* parallel on one record each need a distinct tag (for example a loop's
|
|
1055
|
+
* iteration).
|
|
1056
|
+
*/
|
|
1057
|
+
readonly tag?: ValueOrRef<unknown>;
|
|
1033
1058
|
}
|
|
1034
1059
|
export declare function approvalChain(opts: ApprovalChainOptions): ActionDef<Empty>;
|
|
1035
1060
|
export type ApprovalChainTemplateOptions = ApprovalChainOptions;
|