@salesforce/afv-skills 1.70.0 → 1.72.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.
Files changed (1101) hide show
  1. package/package.json +1 -1
  2. package/skills/agentforce-generate/SKILL.md +8 -0
  3. package/skills/agentforce-generate/assets/agents/README.md +1 -1
  4. package/skills/agentforce-generate/references/actions-reference.md +4 -0
  5. package/skills/agentforce-generate/references/mcp-actions-in-agent-script.md +233 -0
  6. package/skills/agentforce-generate/references/reference-map.md +1 -0
  7. package/skills/agentforce-offline-experimentation-run/SKILL.md +12 -12
  8. package/skills/commerce-react-storefront-create/SKILL.md +12 -12
  9. package/skills/dx-apexguru-scan/SKILL.md +10 -5
  10. package/skills/dx-apexguru-scan/references/authentication.md +11 -7
  11. package/skills/dx-apexguru-scan/scripts/build-zip.sh +10 -3
  12. package/skills/dx-apexguru-scan/scripts/decode-report.js +72 -17
  13. package/skills/dx-apexguru-scan/scripts/resolve-token.sh +58 -13
  14. package/skills/dx-apexguru-scan/scripts/run-scan.sh +16 -5
  15. package/skills/dx-apexguru-scan/scripts/validate-token.js +12 -9
  16. package/skills/dx-packaging-convert-1gp-to-2gp-create/SKILL.md +9 -7
  17. package/skills/dx-packaging-convert-1gp-to-2gp-create/references/conversion-operations.md +78 -4
  18. package/skills/dx-packaging-move-to-2gp-migrate/SKILL.md +17 -13
  19. package/skills/dx-packaging-move-to-2gp-migrate/references/api-operations.md +110 -9
  20. package/skills/dx-scratch-def-configure/SKILL.md +110 -33
  21. package/skills/dx-scratch-def-configure/examples/confirm-card.md +33 -0
  22. package/skills/dx-scratch-def-configure/examples/report-recipes.md +54 -0
  23. package/skills/dx-scratch-def-configure/scripts/lib_scratch_def.py +1096 -90
  24. package/skills/dx-scratch-def-configure/scripts/scrape_config_values.py +22 -6
  25. package/skills/experience-app-mcp-generate/SKILL.md +2 -2
  26. package/skills/experience-app-mcp-generate/references/troubleshooting.md +1 -1
  27. package/skills/experience-app-mcp-generate/scripts/merge_tools.mjs +49 -18
  28. package/skills/experience-app-mcp-generate/scripts/render_eca.mjs +1 -1
  29. package/skills/experience-app-mcp-generate/scripts/render_mcp_server.mjs +1 -1
  30. package/skills/experience-app-mcp-generate/scripts/scan_tool_candidates.mjs +3 -1
  31. package/skills/experience-lwc-accessibility-jest-run/SKILL.md +16 -6
  32. package/skills/experience-search-coordinate/SKILL.md +6 -51
  33. package/skills/experience-search-coordinate/references/content-route.md +239 -36
  34. package/skills/experience-search-coordinate/references/media-route.md +28 -5
  35. package/skills/experience-ui-bundle-custom-app-generate/SKILL.md +32 -26
  36. package/skills/experience-ui-bundle-custom-app-generate/references/configure-metadata-custom-application.md +6 -24
  37. package/skills/experience-ui-bundle-mfa-configure/SKILL.md +47 -21
  38. package/skills/experience-ui-bundle-mfa-configure/references/setup.md +3 -1
  39. package/skills/experience-ui-bundle-site-generate/references/configure-metadata-digital-experience.md +1 -1
  40. package/skills/industries-patient-card-generate/SKILL.md +209 -0
  41. package/skills/industries-patient-card-generate/references/acceptance-tests.md +64 -0
  42. package/skills/industries-patient-card-generate/references/component-behavior.md +95 -0
  43. package/skills/industries-patient-card-generate/references/custom-labels.md +51 -0
  44. package/skills/industries-patient-card-generate/references/values-and-rules.md +51 -0
  45. package/skills/industries-patient-card-generate/references/visual-design.md +89 -0
  46. package/skills/nonprofit-fundraising-configure/references/mcp-invocation.md +4 -6
  47. package/skills/nonprofit-volunteer-management-records-create/references/field-guide.md +1 -1
  48. package/skills/nonprofit-volunteer-management-records-create/references/mcp-invocation.md +11 -4
  49. package/skills/nonprofit-volunteer-management-records-create/scripts/render-review-table.py +2 -2
  50. package/skills/nonprofit-volunteer-management-records-create/scripts/tests/test_render_review_table.py +21 -0
  51. package/skills/nonprofit-volunteer-management-structure-generate/references/mcp-invocation.md +5 -2
  52. package/skills/platform-apex-generate/SKILL.md +2 -1
  53. package/skills/platform-apex-generate/assets/abstract.cls +0 -4
  54. package/skills/platform-apex-generate/assets/invocable-action-extension.invocableactionextension-meta.xml +28 -0
  55. package/skills/platform-apex-generate/assets/invocable.cls +2 -0
  56. package/skills/platform-apex-generate/references/dml-declarations.md +69 -0
  57. package/skills/platform-apex-test-generate/SKILL.md +2 -0
  58. package/skills/platform-custom-lightning-type-generate/SKILL.md +5 -1
  59. package/skills/platform-custom-lightning-type-generate/references/agent-action-output.md +99 -0
  60. package/skills/platform-data-and-tooling-api-context-get/README.md +36 -0
  61. package/skills/platform-data-and-tooling-api-context-get/SKILL.md +18 -21
  62. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AIInsightAction.json +1 -1
  63. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AIInsightFeedback.json +1 -1
  64. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AIInsightReason.json +1 -1
  65. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AIInsightValue.json +1 -1
  66. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AIRecordInsight.json +1 -1
  67. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AbnExperiment.json +2 -2
  68. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AbnExperimentCohort.json +5 -0
  69. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AcceptedEventRelation.json +1 -1
  70. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Account.json +37 -65
  71. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountCleanInfo.json +1 -1
  72. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountContactRelation.json +1 -1
  73. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountOwnerSharingRule.json +1 -1
  74. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountPlanObjMeasCalcCond.json +1 -1
  75. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountPlanObjMeasCalcDefLocalization.json +2 -0
  76. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountProspectingAgentResearch.json +44 -0
  77. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountShare.json +1 -1
  78. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountTag.json +1 -1
  79. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountTeamMember.json +3 -1
  80. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountTerritoryAssignmentRuleItem.json +4 -2
  81. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AccountUserTerritory2View.json +1 -1
  82. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadence.json +1 -1
  83. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceRule.json +1 -1
  84. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceRuleCondition.json +1 -1
  85. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceStep.json +50 -26
  86. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceStepTracker.json +47 -2
  87. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceStepVariant.json +65 -3
  88. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionCadenceTracker.json +2 -12
  89. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionLinkGroupTemplate.json +1 -1
  90. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionLinkTemplate.json +1 -1
  91. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlan.json +17 -6
  92. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlanItem.json +6 -6
  93. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlanTemplate.json +10 -5
  94. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlanTemplateItem.json +0 -5
  95. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlanTemplateItemValue.json +0 -5
  96. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActionPlanTemplateVersion.json +0 -5
  97. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActiveScratchOrg.json +1 -6
  98. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActivityHistory.json +1 -1
  99. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActivityMetric.json +8 -0
  100. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ActivityUsrConnectionStatus.json +1 -1
  101. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Address.json +3 -3
  102. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AgentQltyEvalFormCondition.json +54 -0
  103. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AgentQltyEvalFormCriteria.json +59 -0
  104. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AgentWork.json +15 -1
  105. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AgentWorkConversationalData.json +20 -0
  106. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AgentWorkSkill.json +0 -5
  107. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AiGenActionItem.json +1 -1
  108. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AiGenActionItemInfo.json +1 -1
  109. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AiModelLanguage.json +1 -1
  110. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AnalyticsChangeEventLog.json +2 -2
  111. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AnalyticsVizField.json +17 -1
  112. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Announcement.json +1 -1
  113. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexExecutionEventLog.json +2 -2
  114. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexLog.json +1 -1
  115. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexPageInfo.json +1 -1
  116. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexRestApiEventLog.json +3 -2
  117. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTestQueueItem.json +1 -1
  118. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTestResult.json +1 -1
  119. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTestResultLimits.json +1 -1
  120. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTestSuite.json +1 -1
  121. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTriggerEventLog.json +26 -22
  122. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexTypeImplementor.json +1 -1
  123. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApexUnexpectedExcpEventLog.json +16 -1
  124. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApiTotalUsageEventLog.json +5 -0
  125. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AppAnalyticsQueryRequest.json +1 -1
  126. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AppMenuItem.json +1 -1
  127. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApplicationFormTemplate.json +8 -28
  128. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AppointmentTopicTimeSlot.json +0 -5
  129. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Approval.json +1 -1
  130. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalAlertContentDef.json +71 -2
  131. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalDelegation.json +56 -0
  132. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalSubmission.json +1 -1
  133. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalSubmissionDetail.json +1 -1
  134. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalWorkItem.json +7 -2
  135. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalWorkItemCondition.json +5 -1
  136. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApprovalWorkItemCriteria.json +2 -2
  137. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundleAggrDurDnscale.json +2 -5
  138. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundleAggrPolicy.json +2 -5
  139. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundleConfig.json +2 -5
  140. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundlePolicy.json +2 -5
  141. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundlePolicySvcTerr.json +2 -5
  142. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundlePropagatePolicy.json +2 -5
  143. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundleRestrictPolicy.json +2 -5
  144. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ApptBundleSortPolicy.json +2 -5
  145. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ArchivePolicyDefinition.json +83 -18
  146. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Article_Type__DataCategorySelection.json +1 -1
  147. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssessmentQuestionCatgData.json +47 -0
  148. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Asset.json +12 -1
  149. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetAction.json +6 -1
  150. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetActionSource.json +11 -1
  151. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetAttribute.json +2 -0
  152. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetDowntimePeriod.json +0 -5
  153. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetRateAdjustment.json +1 -1
  154. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetRateCardEntry.json +16 -0
  155. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetShare.json +1 -1
  156. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetStatePeriod.json +35 -9
  157. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetStatePeriodAttribute.json +6 -2
  158. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetTag.json +1 -1
  159. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssetWarranty.json +0 -5
  160. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssignedResource.json +8 -0
  161. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssignmentRule.json +3 -1
  162. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AssociatedLocation.json +1 -1
  163. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AsyncOpSyndicationFeedFile.json +1 -1
  164. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AsyncOperationLog.json +17 -1
  165. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AsyncReportRunEventLog.json +2 -1
  166. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttachedContentDocument.json +2 -2
  167. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttachedContentNote.json +3 -3
  168. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Attachment.json +1 -1
  169. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttribModel.json +167 -3
  170. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttribModelStage.json +87 -3
  171. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttribModelStageMetric.json +66 -2
  172. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AttributeDefinition.json +1 -1
  173. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AuraRequestEventLog.json +1 -0
  174. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AuthSession.json +1 -1
  175. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AutomatedAction.json +134 -2
  176. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AutomatedActionCondition.json +72 -2
  177. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AutomatedActionOverride.json +75 -2
  178. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AutomatedActionParameter.json +66 -2
  179. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/AutomatedActionReminder.json +78 -2
  180. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BackgroundOperation.json +3 -1
  181. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BackgroundOperationResult.json +1 -1
  182. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Big_Objects.json +8 -0
  183. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingBatchScheduler.json +6 -2
  184. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingPeriodItem.json +16 -1
  185. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingPolicy.json +1 -1
  186. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingSchedule.json +189 -6
  187. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingScheduleGroup.json +44 -4
  188. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingTreatment.json +5 -1
  189. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BillingTreatmentItem.json +21 -1
  190. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Blocked_Redirect_Event_Type.json +1 -1
  191. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Bookmark.json +1 -1
  192. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BotDefinition.json +1 -1
  193. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BroadcastTopic.json +1 -1
  194. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BroadcastTopicGroup.json +1 -1
  195. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BulkApi2EventLog.json +6 -6
  196. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BulkApiEventLog.json +2 -2
  197. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BusinessHours.json +1 -1
  198. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BuyerCriteria.json +1 -1
  199. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BuyerGroup.json +1 -1
  200. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BuyerGroupBuyerCriteria.json +1 -1
  201. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/BuyerGroupRelatedObject.json +1 -1
  202. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CSP_Violation_Event_Type.json +1 -1
  203. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CalculatedInsightRangeBound.json +1 -1
  204. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CalculationMatrix.json +25 -1
  205. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CalendarView.json +1 -1
  206. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CallCenterRoutingMap.json +1 -1
  207. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Campaign.json +1 -1
  208. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CampaignMember.json +1 -1
  209. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CampaignMemberStatus.json +2 -2
  210. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CampaignTag.json +1 -1
  211. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CardPaymentMethod.json +1 -1
  212. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CartItem.json +5 -0
  213. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CartItemPriceAdjustment.json +5 -0
  214. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Case.json +0 -34
  215. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CaseArticle.json +2 -2
  216. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CaseParticipant.json +1 -6
  217. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CaseRelatedIssue.json +5 -0
  218. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CaseTag.json +1 -1
  219. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CaseTeamMember.json +1 -1
  220. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CategoryData.json +1 -1
  221. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CategoryNode.json +3 -1
  222. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CategoryNodeLocalization.json +2 -0
  223. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChangeRequest.json +5 -0
  224. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChangeRequestRelatedIssue.json +5 -0
  225. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChangeRequestRelatedItem.json +5 -0
  226. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChatterActivity.json +2 -2
  227. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChatterAnswersActivity.json +1 -1
  228. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ChatterMessage.json +1 -1
  229. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollabDocumentMetricRecord.json +1 -1
  230. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollabTemplateMetric.json +1 -1
  231. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollabTemplateMetricRecord.json +1 -1
  232. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollaborationGroup.json +2 -6
  233. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollaborationGroupMember.json +0 -4
  234. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollaborationGroupMemberRequest.json +1 -1
  235. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollaborationInvitation.json +2 -2
  236. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CollaborationRoom.json +1 -6
  237. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CombinedAttachment.json +1 -1
  238. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ComplaintCase.json +123 -0
  239. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ComplaintParticipant.json +133 -0
  240. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConcurApexLimitEventLog.json +1 -1
  241. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Contact.json +15 -20
  242. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactCenterChannel.json +0 -10
  243. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactCleanInfo.json +1 -1
  244. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactPointAddress.json +9 -0
  245. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactPointEmail.json +1 -1
  246. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactPointPhone.json +1 -1
  247. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactProspectingAgentResearch.json +51 -0
  248. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactRequest.json +2 -17
  249. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactRequestShare.json +1 -1
  250. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactShare.json +1 -1
  251. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContactTag.json +1 -1
  252. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentAsset.json +1 -1
  253. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDistribution.json +3 -1
  254. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDistributionView.json +2 -0
  255. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDocument.json +4 -2
  256. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDocumentHistory.json +2 -0
  257. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDocumentLink.json +3 -1
  258. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDocumentListViewMapping.json +1 -1
  259. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentDocumentSubscription.json +1 -1
  260. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentFolder.json +2 -0
  261. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentFolderLink.json +2 -0
  262. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentFolderMember.json +2 -0
  263. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentHubItem.json +1 -1
  264. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentNote.json +3 -1
  265. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentNotification.json +1 -1
  266. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentTagSubscription.json +1 -1
  267. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentUserSubscription.json +1 -1
  268. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentVersion.json +2 -2
  269. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentVersionComment.json +1 -1
  270. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentVersionHistory.json +2 -0
  271. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentVersionRating.json +1 -1
  272. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentWorkspace.json +3 -1
  273. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentWorkspaceDoc.json +4 -0
  274. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContentWorkspaceSubscription.json +1 -1
  275. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Contract.json +1 -1
  276. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContractLineItem.json +1 -1
  277. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContractLineOutcome.json +2 -5
  278. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContractLineOutcomeData.json +2 -5
  279. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ContractTag.json +1 -1
  280. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConvMessageSendRequest.json +1 -1
  281. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Conversation.json +14 -4
  282. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConversationApiLog.json +2 -7
  283. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConversationChannelDefinition.json +1 -1
  284. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConversationEntry.json +1 -1
  285. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConversationParticipant.json +9 -4
  286. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ConversationVendorInfo.json +19 -1
  287. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CorsWhitelistEntry.json +1 -1
  288. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Coupon.json +14 -0
  289. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CreditMemo.json +20 -1
  290. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CreditMemoAddressGroup.json +1 -6
  291. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CreditMemoInvApplication.json +1 -1
  292. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CreditMemoLine.json +1 -1
  293. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CronJobDetail.json +6 -1
  294. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CspTrustedSite.json +2 -2
  295. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CspViolationEventLog.json +1 -1
  296. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CurrencyType.json +3 -1
  297. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CustomBrand.json +1 -1
  298. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CustomBrandAsset.json +1 -1
  299. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CustomPermission.json +2 -2
  300. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CustomPermissionDependency.json +1 -1
  301. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/CustomReportType.json +133 -0
  302. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Custom_Object__Feed.json +2 -2
  303. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DashboardTag.json +1 -1
  304. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DataAssessmentValueMetric.json +1 -1
  305. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DataEncryptionKey.json +1 -1
  306. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DataKitDeploymentLog.json +5 -0
  307. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DataLakeObjectInstance.json +327 -0
  308. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DataMaskCustomValueLibrary.json +1 -1
  309. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DatacloudCompany.json +1 -1
  310. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DatacloudContact.json +1 -1
  311. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DatacloudDandBCompany.json +1 -1
  312. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DatasetExport.json +1 -1
  313. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DatasetExportPart.json +1 -1
  314. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DeliveryEstimationSetup.json +28 -0
  315. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsActivityLog.json +133 -2
  316. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsEnvDeployment.json +173 -2
  317. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsEnvDeploymentMbr.json +101 -2
  318. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsEnvironment.json +144 -2
  319. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipeline.json +90 -2
  320. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelineEnvironment.json +80 -2
  321. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelineStage.json +99 -2
  322. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelineStageTrigger.json +96 -2
  323. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelineTestProvider.json +81 -2
  324. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelnStgProm.json +80 -2
  325. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsPipelnStgPromWkItem.json +85 -2
  326. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsProject.json +80 -2
  327. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsProjectPipeline.json +76 -2
  328. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsQualityGate.json +71 -2
  329. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsQualityGateResult.json +76 -2
  330. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsQualityGateRule.json +77 -2
  331. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsQualityGateRuleResult.json +76 -2
  332. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsRequestInfo.json +98 -2
  333. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTest.json +148 -2
  334. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestExecution.json +124 -2
  335. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestProvider.json +88 -2
  336. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestProviderSyncLog.json +94 -2
  337. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestSuite.json +115 -2
  338. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestSuiteExecution.json +150 -2
  339. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestSuiteGroupExec.json +100 -2
  340. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestSuiteStage.json +85 -2
  341. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsTestSuiteTest.json +85 -2
  342. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DevopsWkItmTstSteGrpExec.json +76 -2
  343. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DigitalSignature.json +1 -6
  344. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Division.json +3 -1
  345. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DivisionLocalization.json +2 -0
  346. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DocumentTag.json +1 -1
  347. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Domain.json +2 -0
  348. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DomainSite.json +2 -0
  349. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DuplicateRule.json +1 -1
  350. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/DynamicDataCapture.json +0 -5
  351. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ElectronicMediaGroup.json +1 -1
  352. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailDomainFilter.json +2 -2
  353. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailDomainKey.json +2 -2
  354. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailInsight.json +1 -1
  355. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailInsightAction.json +1 -1
  356. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailMessage.json +2 -2
  357. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailRelay.json +35 -2
  358. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmailRoutingAddress.json +1 -1
  359. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EmbeddedServiceLabel.json +1 -1
  360. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Employee2.json +112 -2
  361. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnablementMeasureDefinition.json +1 -1
  362. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnablementProgram.json +2 -0
  363. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblMeasureObjectDefinition.json +1 -1
  364. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblPgmTaskMeasureProgress.json +4 -2
  365. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblProgramSection.json +4 -2
  366. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblProgramTaskDefinition.json +4 -2
  367. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblProgramTaskProgress.json +4 -2
  368. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EnblProgramTaskSubCategory.json +1 -1
  369. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EngagementChannelType.json +14 -2
  370. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EngagementSignal.json +83 -2
  371. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EngagementSignalCmpndMetric.json +88 -2
  372. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EngagementSignalMetric.json +73 -2
  373. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EntityMilestone.json +8 -1
  374. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EntitySubscription.json +1 -1
  375. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Event.json +2 -2
  376. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EventLogFile.json +1 -1
  377. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EventRelation.json +6 -2
  378. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EventRelayConfig.json +2 -0
  379. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EventTag.json +1 -1
  380. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/EventWhoRelation.json +1 -1
  381. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Expense.json +0 -5
  382. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExpenseReport.json +0 -5
  383. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExpenseReportEntry.json +0 -5
  384. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExpressionFilter.json +1 -6
  385. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExpressionFilterCriteria.json +0 -5
  386. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalAccountHierarchy.json +1 -1
  387. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalClientApplication.json +1 -1
  388. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalDataSource.json +1 -1
  389. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalDataUserAuth.json +1 -1
  390. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalEncryptionRootKey.json +2 -2
  391. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExternalSocialAccount.json +1 -1
  392. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExtlClntAppOauthSettings.json +1 -1
  393. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ExtlClntAppPlcyCnfg.json +1 -1
  394. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedAttachment.json +3 -1
  395. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedComment.json +2 -2
  396. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedItem.json +3 -3
  397. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedLike.json +1 -1
  398. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedPollChoice.json +2 -2
  399. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedPollVote.json +1 -1
  400. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedPost.json +2 -2
  401. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedRevision.json +1 -1
  402. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FeedTrackedChange.json +1 -1
  403. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FieldChangeSnapshot.json +1 -1
  404. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FieldHistoryArchive.json +0 -15
  405. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FieldPermissions.json +1 -1
  406. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FieldServiceMobileSettings.json +1 -1
  407. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FieldServiceOrgSettings.json +1 -1
  408. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FldSvcObjChg.json +2 -0
  409. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FldSvcObjChgDtl.json +2 -0
  410. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlexQueueItem.json +1 -1
  411. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowInterview.json +1 -1
  412. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowInterviewLog.json +1 -1
  413. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowInterviewLogOwnerSharingRule.json +1 -1
  414. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowInterviewOwnerSharingRule.json +1 -1
  415. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowInterviewShare.json +1 -1
  416. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowNavMetricEventLog.json +2 -2
  417. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowOrchestrationInstance.json +1 -1
  418. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowRecord.json +5 -0
  419. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowRecordVersion.json +4 -0
  420. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowStageRelation.json +1 -1
  421. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FlowTestResult.json +1 -1
  422. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Folder.json +2 -0
  423. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingAdjustment.json +1 -6
  424. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingColumnDefinition.json +1 -1
  425. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingColumnDefinitionLocalization.json +1 -1
  426. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingCustomData.json +0 -5
  427. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingFact.json +1 -6
  428. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingGroup.json +1 -1
  429. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingItem.json +1 -6
  430. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingOwnerAdjustment.json +1 -6
  431. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingQuota.json +1 -6
  432. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingSourceDefinition.json +1 -1
  433. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingType.json +0 -5
  434. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ForecastingTypeSource.json +1 -1
  435. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FrcstCustmzAdjustment.json +0 -5
  436. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FrcstCustmzOwnerAdjustment.json +0 -5
  437. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfillmentOrder.json +5 -0
  438. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfillmentOrderLineItem.json +10 -0
  439. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfmtRoutgCriteria.json +1 -1
  440. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfmtRoutgCriteriaActnVar.json +1 -1
  441. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfmtRoutgCriteriaCond.json +1 -1
  442. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfmtRoutgCriteriaGrp.json +1 -1
  443. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FulfmtRoutgCriteriaGrpVer.json +1 -1
  444. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FunctionConnection.json +1 -1
  445. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FunctionInvocationRequest.json +1 -1
  446. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/FunctionReference.json +1 -1
  447. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenAIConversationSummary.json +1 -1
  448. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenAiFunctionDefinition.json +118 -2
  449. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenAiPlannerDefinition.json +86 -2
  450. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenAiPlannerFunctionDef.json +51 -2
  451. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenAiPluginDefinition.json +104 -2
  452. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenOpPlanReferenceRecord.json +54 -0
  453. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GenOpPlanRequest.json +127 -2
  454. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GeoCountry.json +1 -1
  455. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GeolocationBasedAction.json +2 -5
  456. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GoogleDoc.json +1 -1
  457. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GraphQlQueryEventLog.json +123 -0
  458. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Group.json +1 -1
  459. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GroupMember.json +1 -1
  460. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/GtwyProvPaymentMethodType.json +1 -1
  461. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/HealthCareProcedure.json +1 -1
  462. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Holiday.json +1 -1
  463. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Hostname_Redirects_Event_Type.json +1 -1
  464. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/IframeWhiteListUrl.json +1 -1
  465. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Incident.json +5 -0
  466. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/IncidentRelatedItem.json +5 -0
  467. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Individual.json +3 -1
  468. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/IndividualApplicationItem.json +1 -1
  469. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/IndividualHistory.json +3 -1
  470. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/IndividualShare.json +2 -0
  471. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InsufficientAccessEventLog.json +17 -9
  472. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InternalOrganizationUnit.json +19 -8
  473. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InventoryItemReservation.json +19 -1
  474. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InventoryReservation.json +6 -1
  475. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvocableActionEventLog.json +4 -0
  476. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Invoice.json +1 -1
  477. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceAddressGroup.json +1 -1
  478. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceBatchRun.json +29 -28
  479. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceBatchRunCriteria.json +26 -3
  480. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceBatchRunRecovery.json +6 -6
  481. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceDocument.json +1 -1
  482. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/InvoiceLine.json +1 -21
  483. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/JobProfile.json +0 -5
  484. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/JobProfileQueueGroup.json +1 -1
  485. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/KnowledgeArticleVersion.json +11 -1
  486. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/KnowledgeArticleViewStat.json +1 -1
  487. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/KnowledgeArticleVoteStat.json +1 -1
  488. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Knowledge__DataCategorySelection.json +1 -1
  489. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Knowledge__kav.json +26 -1
  490. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Lead.json +19 -37
  491. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LeadProspectingAgentResearch.json +51 -0
  492. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LeadShare.json +1 -1
  493. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LeadTag.json +1 -1
  494. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningContent.json +4 -2
  495. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningItem.json +2 -0
  496. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningItemAssignment.json +2 -0
  497. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningItemProgress.json +2 -0
  498. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningItemSubmission.json +1 -1
  499. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningItemType.json +1 -1
  500. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LearningPractice.json +4 -2
  501. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LegalEntity.json +1 -1
  502. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LicenseDefinitionCustomPermission.json +37 -6
  503. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LinkedArticle.json +1 -1
  504. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ListEmail.json +5 -0
  505. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ListEmailMonthlyMetric.json +184 -2
  506. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ListEmailSentResult.json +1 -1
  507. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ListViewChartInstance.json +1 -1
  508. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LiveAgentSessionShare.json +1 -1
  509. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LiveChatTranscriptEvent.json +1 -1
  510. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LiveChatTranscriptShare.json +1 -1
  511. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Location.json +8 -3
  512. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LocationShippingCarrierMethod.json +40 -1
  513. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LoginAsEventLog.json +1 -1
  514. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LoginEventLog.json +21 -8
  515. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LoginGeo.json +1 -1
  516. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LoginHistory.json +2 -2
  517. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/LookedUpFromActivity.json +1 -1
  518. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MLModel.json +1 -1
  519. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MLModelFactor.json +1 -1
  520. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MLModelFactorComponent.json +1 -1
  521. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MLModelMetric.json +1 -1
  522. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Macro.json +1 -6
  523. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MacroInstruction.json +1 -6
  524. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MacroUsage.json +0 -5
  525. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MailmergeTemplate.json +2 -0
  526. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MaintenanceAsset.json +0 -5
  527. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MaintenancePlan.json +0 -5
  528. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MaintenanceWorkRule.json +0 -5
  529. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ManagedContentVariant.json +1 -1
  530. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MerchAccPaymentMethodSet.json +1 -1
  531. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MerchAccPaymentMethodType.json +1 -1
  532. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MessagingChannel.json +18 -3
  533. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MessagingChannelUsage.json +1 -1
  534. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MessagingEndUser.json +14 -6
  535. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MessagingSession.json +10 -7
  536. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MessagingSessionMetrics.json +1 -1
  537. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MetadataPackage.json +1 -1
  538. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MetadataPackageVersion.json +1 -1
  539. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MlIntentUtteranceSuggestion.json +0 -5
  540. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MsgChannelAvailability.json +93 -0
  541. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MsgChannelUsageExternalOrg.json +1 -1
  542. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/MutingPermissionSet.json +1298 -114
  543. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NamedCredential.json +1 -1
  544. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NamedCredentialEventLog.json +19 -16
  545. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NamespaceRegistry.json +0 -5
  546. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Network.json +24 -0
  547. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkActivityAudit.json +1 -1
  548. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkAffinity.json +1 -1
  549. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkAuthApiSettings.json +1 -1
  550. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkDiscoverableLogin.json +1 -1
  551. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkMember.json +1 -1
  552. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkMemberGroup.json +1 -1
  553. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkModeration.json +1 -1
  554. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NetworkPageOverride.json +1 -1
  555. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NoteAndAttachment.json +1 -1
  556. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/NoteTag.json +1 -1
  557. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OSAsyncChgCompletedEvent.json +1 -1
  558. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OauthToken.json +2 -2
  559. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ObjectTerritory2Association.json +1 -1
  560. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfig.json +1 -1
  561. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigAction.json +1 -1
  562. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigGroup.json +1 -1
  563. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigProfile.json +1 -1
  564. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigQueue.json +1 -1
  565. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigSkill.json +1 -1
  566. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigTab.json +1 -1
  567. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OmniSupervisorConfigUser.json +1 -1
  568. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpenActivity.json +1 -1
  569. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OperatingHours.json +10 -2
  570. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OperatingHoursHoliday.json +2 -2
  571. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OppSalesMethodology.json +1 -1
  572. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OppSalesMethodologyItem.json +1 -1
  573. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Opportunity.json +14 -50
  574. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityFieldHistory.json +1 -1
  575. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityHistory.json +1 -1
  576. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityLineItem.json +6 -2
  577. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityLineItemSchedule.json +1 -1
  578. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunitySplit.json +1 -1
  579. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityTag.json +1 -1
  580. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OpportunityTeamMember.json +1 -1
  581. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Order.json +10 -1
  582. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderAction.json +6 -1
  583. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderAdjustmentGroupSummary.json +5 -0
  584. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderHistory.json +1 -1
  585. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItem.json +16 -11
  586. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItemAdjustmentLineItem.json +11 -0
  587. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItemAdjustmentLineSummary.json +5 -0
  588. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItemGroup.json +82 -2
  589. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItemRelationship.json +1 -1
  590. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderItemSummary.json +5 -0
  591. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderShare.json +1 -1
  592. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderSummary.json +5 -0
  593. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrderSummaryAdditionalInfo.json +12 -1
  594. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrgEmailAddressSecurity.json +1 -1
  595. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OrgSnapshot.json +1 -1
  596. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Organization.json +5 -4
  597. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/OutOfOffice.json +3 -1
  598. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PackageLicense.json +1 -1
  599. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PackagePushError.json +2 -2
  600. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PackagePushJob.json +2 -2
  601. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PackagePushRequest.json +8 -2
  602. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PackageSubscriber.json +2 -2
  603. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PartnerNetworkRecordConnection.json +1 -1
  604. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentCreditLinePayment.json +1 -1
  605. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentCreditTransaction.json +1 -1
  606. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentGateway.json +1 -1
  607. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentLineInvoice.json +1 -1
  608. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentLink.json +11 -1
  609. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentSchedule.json +11 -6
  610. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentScheduleItem.json +37 -8
  611. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentSchedulePolicy.json +1 -6
  612. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentScheduleTreatment.json +22 -7
  613. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentScheduleTreatmentDtl.json +1 -6
  614. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentTerm.json +2 -2
  615. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PaymentTermItem.json +1 -1
  616. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PendingOrderSummary.json +1 -1
  617. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PendingServiceRouting.json +5 -0
  618. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSet.json +1299 -115
  619. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetAssignment.json +2 -2
  620. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetGroup.json +2 -2
  621. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetLicense.json +1298 -114
  622. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetLicenseAssign.json +2 -2
  623. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetLicenseDefinition.json +56 -11
  624. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PermissionSetTabSetting.json +1 -1
  625. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersnlBatchDecision.json +127 -2
  626. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonAccountOwnerPowerUser.json +1 -1
  627. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonTraining.json +1 -1
  628. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonalizationDecision.json +82 -2
  629. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonalizationObjective.json +69 -2
  630. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonalizationPoint.json +119 -2
  631. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PersonalizationSchema.json +4 -4
  632. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PipelineInspectionListView.json +1 -1
  633. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PipelineInspectionSumField.json +1 -1
  634. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PlatformAction.json +1 -1
  635. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PplnInspListViewCalcClmn.json +62 -2
  636. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PresenceConfigDeclineReason.json +1 -1
  637. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PresenceDeclineReason.json +1 -1
  638. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PresenceUserConfig.json +1 -1
  639. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PresenceUserConfigProfile.json +1 -1
  640. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PresenceUserConfigUser.json +1 -1
  641. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PriceAdjustmentSchedule.json +6 -1
  642. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PriceAdjustmentTier.json +1 -1
  643. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Pricebook2.json +6 -1
  644. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Pricebook2History.json +1 -1
  645. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PricebookEntry.json +1 -1
  646. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyHold.json +1 -1
  647. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyHoldReason.json +1 -1
  648. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyJobSession.json +2 -2
  649. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyObjectSession.json +1 -1
  650. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyRTBFRequest.json +1 -1
  651. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacyRequest.json +2 -2
  652. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PrivacySessionRecordFailure.json +1 -1
  653. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Problem.json +5 -0
  654. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProblemIncident.json +5 -0
  655. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProblemRelatedItem.json +5 -0
  656. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProcessException.json +5 -0
  657. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProcessInstance.json +1 -1
  658. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProcessInstanceHistory.json +1 -1
  659. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProducerCommission.json +26 -0
  660. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Product2.json +11 -1
  661. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Product2DataTranslation.json +2 -2
  662. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductCategory.json +2 -2
  663. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductCategoryDataTranslation.json +2 -0
  664. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductConsumed.json +2 -7
  665. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductConsumedState.json +117 -0
  666. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductItem.json +16 -5
  667. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductItemTransaction.json +7 -5
  668. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductMedia.json +1 -1
  669. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductRelatedComponent.json +1 -1
  670. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductRelationshipType.json +6 -1
  671. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductRequest.json +11 -6
  672. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductRequestLineItem.json +5 -5
  673. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductRequired.json +1 -6
  674. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductSellingModel.json +1 -1
  675. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductSellingModelOption.json +1 -1
  676. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductServiceCampaign.json +0 -5
  677. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductServiceCampaignItem.json +0 -5
  678. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductServiceCampaignItemStatus.json +1 -1
  679. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductServiceCampaignStatus.json +1 -1
  680. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductTransfer.json +5 -5
  681. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProductWarrantyTerm.json +0 -5
  682. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Profile.json +1303 -115
  683. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProgramProduct.json +1 -1
  684. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Promotion.json +5 -0
  685. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PromotionLineItemRule.json +4 -0
  686. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PromotionQualifier.json +4 -0
  687. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PromotionTarget.json +4 -0
  688. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PromotionTier.json +5 -0
  689. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Prospect.json +199 -2
  690. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentDataSource.json +40 -2
  691. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentExternalCompanyResearch.json +52 -0
  692. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentExternalPersonResearch.json +52 -0
  693. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentRcmdTarget.json +1 -1
  694. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentSpec.json +48 -2
  695. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentSpecParm.json +50 -2
  696. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ProspectingAgentUserSpec.json +42 -2
  697. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PublicComplaint.json +24 -8
  698. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PushTopic.json +4 -2
  699. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/PymtSchdDistributionMethod.json +1 -6
  700. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuestionDataCategorySelection.json +1 -1
  701. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuestionSubscription.json +1 -1
  702. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QueueRoutingConfig.json +1 -1
  703. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QueueSobject.json +2 -2
  704. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuickText.json +1 -1
  705. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Quote.json +10 -1
  706. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteAction.json +5 -0
  707. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteAdjustmentGroup.json +1 -1
  708. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteDocument.json +15 -0
  709. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteItemTaxItem.json +1 -1
  710. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteLineGroup.json +82 -2
  711. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteLineItem.json +11 -6
  712. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteLinePriceAdjustment.json +117 -2
  713. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteLineRelationship.json +9 -0
  714. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/QuoteRecipientGroup.json +5 -0
  715. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecentFieldChange.json +1 -1
  716. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecentlyViewed.json +1 -1
  717. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecommendationResponse.json +1 -1
  718. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordAction.json +6 -1
  719. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordActionHistory.json +2 -2
  720. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordType.json +1 -1
  721. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordTypeLocalization.json +2 -0
  722. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordVisibility.json +2 -2
  723. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordsetFilterCriteria.json +1 -6
  724. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordsetFilterCriteriaRule.json +0 -5
  725. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RecordsetFltrCritMonitor.json +0 -5
  726. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RedirectWhitelistUrl.json +1 -1
  727. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Refund.json +36 -0
  728. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RefundLinePayment.json +1 -1
  729. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RelatedListColumnDefinition.json +1 -1
  730. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RelatedListDefinition.json +1 -1
  731. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ReplyText.json +1 -1
  732. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ReportEventLog.json +7 -6
  733. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ReportTag.json +1 -1
  734. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Report_Event_Type.json +1 -1
  735. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ResourceAbsence.json +10 -6
  736. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ResourcePreference.json +0 -5
  737. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RestApiEventLog.json +4 -3
  738. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ReturnOrder.json +12 -2
  739. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RevenueAsyncOperation.json +1 -1
  740. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/RevenueTransactionErrorLog.json +1 -1
  741. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SalesWorkQueueSettings.json +1 -1
  742. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SamlSsoConfig.json +1 -1
  743. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SavedPaymentMethod.json +1 -1
  744. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SchedulingConstraint.json +2 -2
  745. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SchedulingObjective.json +1 -1
  746. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SchedulingRule.json +1 -1
  747. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SchedulingRuleParameter.json +1 -1
  748. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Scontrol.json +2 -0
  749. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ScontrolLocalization.json +2 -0
  750. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ScratchOrgInfo.json +0 -5
  751. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SearchActivity.json +1 -1
  752. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SecurityHealthCheckAlertRecipient.json +65 -2
  753. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SecurityHealthCheckResult.json +78 -2
  754. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SelfServiceUser.json +1 -1
  755. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SenderEmailAddress.json +9 -0
  756. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SerializedProductTransaction.json +126 -0
  757. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceAppointment.json +28 -8
  758. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceAppointmentStatus.json +2 -2
  759. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceChannel.json +1 -1
  760. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceChannelStatus.json +1 -1
  761. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceCrew.json +0 -5
  762. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceCrewMember.json +0 -5
  763. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServicePresenceStatus.json +1 -1
  764. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceReport.json +0 -5
  765. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceResource.json +6 -5
  766. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceResourceCapacity.json +1 -6
  767. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceResourceDataTranslation.json +3 -1
  768. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceResourcePreference.json +1 -1
  769. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceResourceSkill.json +1 -6
  770. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceTerritory.json +6 -5
  771. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceTerritoryDataTranslation.json +3 -1
  772. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceTerritoryLocation.json +0 -5
  773. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceTerritoryMember.json +11 -5
  774. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ServiceTerritoryWorkType.json +9 -1
  775. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SessionPermSetActivation.json +2 -2
  776. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SetupEntityAccess.json +1 -1
  777. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SfdcPartnerSbscrOffer.json +272 -2
  778. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SfdcPartnerSbscrOfferItem.json +128 -2
  779. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Shift.json +14 -6
  780. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShiftPattern.json +0 -5
  781. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShiftPatternEntry.json +6 -6
  782. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShiftSegment.json +1 -1
  783. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShiftSegmentType.json +1 -1
  784. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShiftTemplate.json +1 -1
  785. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Shipment.json +1 -1
  786. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShipmentItem.json +1 -1
  787. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShippingCarrierMethod.json +38 -0
  788. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShippingConfigSetProduct.json +1 -1
  789. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShippingConfigurationSet.json +1 -1
  790. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShippingRateArea.json +1 -1
  791. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ShippingRateGroup.json +1 -1
  792. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SignupRequest.json +2 -25
  793. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Site.json +2 -0
  794. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SiteDomain.json +2 -0
  795. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SiteEventLog.json +2 -1
  796. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SiteHistory.json +2 -0
  797. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SiteIframeWhitelistUrl.json +2 -0
  798. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Skill.json +1 -1
  799. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SkillLevelDefinition.json +1 -1
  800. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SkillLevelProgress.json +1 -1
  801. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SkillRequirement.json +2 -7
  802. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SlaProcess.json +1 -1
  803. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SlackChannelRelatedRecord.json +1 -1
  804. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SoapApiEventLog.json +2 -1
  805. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SocialPersona.json +1 -1
  806. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SocialPost.json +1 -1
  807. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SolutionTag.json +1 -1
  808. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SourceCodeRepoProvider.json +81 -2
  809. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SourceCodeRepository.json +101 -2
  810. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SourceCodeRepositoryBranch.json +95 -2
  811. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StagedUnmtchdEmailAddr.json +1 -1
  812. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StagedUnmtchdEmailAddrRela.json +1 -1
  813. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardInvocableActionType.json +1 -1
  814. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectNameChangeEvent.json +2 -0
  815. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectNameFeed.json +2 -2
  816. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectNameHistory.json +1 -1
  817. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectNameOwnerSharingRule.json +1 -1
  818. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectNameShare.json +1 -1
  819. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_Feed.json +2 -2
  820. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_Feed_Feed.json +2 -2
  821. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_History.json +1 -1
  822. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_History_History.json +1 -1
  823. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_OwnerSharingRule.json +1 -1
  824. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_OwnerSharingRule_OwnerSharingRule.json +1 -1
  825. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_Share.json +1 -1
  826. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardObjectName_Share_Share.json +1 -1
  827. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StandardShippingRate.json +1 -1
  828. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StaticResource.json +1 -1
  829. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/StreamingChannel.json +2 -0
  830. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SvcCatalogItemDef.json +0 -50
  831. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SvcCatalogRequest.json +29 -9
  832. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Swarm.json +15 -5
  833. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/SwarmMember.json +0 -5
  834. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TagDefinition.json +1 -1
  835. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Task.json +1 -1
  836. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaskRelation.json +1 -1
  837. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaskTag.json +1 -1
  838. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaxEngine.json +11 -1
  839. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaxEngineInteractionLog.json +6 -1
  840. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaxEngineProvider.json +1 -1
  841. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaxPolicy.json +1 -1
  842. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TaxTreatment.json +1 -1
  843. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantConsumptionAlert.json +1 -1
  844. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecret.json +1 -1
  845. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityHealthCheckBaselineTrend.json +15 -15
  846. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityHealthCheckDetail.json +2 -2
  847. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityHealthCheckTrend.json +3 -3
  848. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityLicense.json +4 -4
  849. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityLogin.json +2 -2
  850. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityLoginIpRangeTrend.json +2 -2
  851. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityNotificationRule.json +2 -2
  852. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityPackage.json +1 -1
  853. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityReportAnomaly.json +2 -2
  854. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecuritySessionHijacking.json +2 -2
  855. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityTrigTransactionSecurityPol.json +30 -34
  856. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TenantSecurityTrustedIpRangeTrend.json +3 -3
  857. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Territory2AlignmentLog.json +1 -1
  858. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Territory2ObjSharingConfig.json +1 -1
  859. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Territory2ObjectExclusion.json +1 -1
  860. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TerritoryAdminAssignment.json +1 -1
  861. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TerritoryMgmtObjectConfig.json +1 -1
  862. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TestSuiteMembership.json +1 -1
  863. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/ThirdPartyAccountLink.json +2 -2
  864. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TimeSheet.json +0 -5
  865. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TimeSheetEntry.json +0 -5
  866. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TimeSlot.json +9 -1
  867. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Topic.json +1 -1
  868. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TopicAssignment.json +1 -1
  869. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TransactionSecurityEventLog.json +0 -5
  870. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TransactionSecurityPolicy.json +1 -1
  871. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Translation.json +1 -1
  872. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TravelMode.json +9 -6
  873. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/TwoFactorMethodsInfo.json +2 -2
  874. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedActivity.json +1 -1
  875. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedActivityInsight.json +3 -1
  876. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedActivityParticipant.json +1 -1
  877. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedActivityRelation.json +1 -1
  878. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedActvtyInsightKeyword.json +1 -1
  879. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedEmail.json +2 -2
  880. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedEmailParticipant.json +2 -2
  881. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedMeeting.json +2 -2
  882. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedMeetingParticipant.json +2 -2
  883. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedTask.json +2 -2
  884. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedTaskParticipant.json +2 -2
  885. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedVideoCall.json +1 -1
  886. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedVideoCallParticipant.json +3 -1
  887. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedVoiceCall.json +1 -1
  888. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UnifiedVoiceCallParticipant.json +3 -1
  889. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UniqueQueryEventLog.json +12 -1
  890. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UsageImpactFactor.json +6 -16
  891. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UsageImpactGroup.json +6 -18
  892. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UsageImpactGroupFactor.json +8 -34
  893. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UsageImpactGroupPgmMeasure.json +7 -31
  894. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UsageImpactGroupVersion.json +11 -37
  895. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/User.json +12 -65
  896. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserCustomBadgeLocalization.json +1 -1
  897. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserEmailCalendarSync.json +1 -1
  898. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserEmailPreferredPerson.json +1 -1
  899. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserEmailPreferredPersonShare.json +1 -1
  900. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserLicense.json +1 -1
  901. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserLogin.json +1 -1
  902. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserPermissionAccess.json +1297 -113
  903. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserPreference.json +2 -2
  904. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserPrioritizedRecord.json +1 -1
  905. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserProfile.json +1 -1
  906. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserProvAccountStaging.json +1 -1
  907. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserProvisioningRequest.json +1 -1
  908. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserRecordAccess.json +1 -1
  909. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserRole.json +1 -1
  910. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserServicePresence.json +1 -1
  911. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserTeamMember.json +3 -1
  912. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserTerritory.json +2 -0
  913. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/UserUIPreference.json +5 -0
  914. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VendorCallCenterStatusMap.json +1 -1
  915. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VerificationHistory.json +2 -2
  916. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VideoCall.json +1 -1
  917. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VideoCallParticipant.json +12 -5
  918. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VisualforceRequestEventLog.json +1 -1
  919. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VoiceCall.json +22 -7
  920. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VoiceCallRecording.json +5 -9
  921. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VoiceCallSessionData.json +94 -0
  922. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VoiceCall_Sharing_Models.json +8 -0
  923. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/VoiceVendorInfo.json +0 -5
  924. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Vote.json +2 -2
  925. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WarrantyTerm.json +10 -5
  926. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebCart.json +70 -3
  927. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebCartAdjustmentGroup.json +5 -0
  928. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebCartHistory.json +1 -1
  929. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebLink.json +4 -2
  930. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebLinkLocalization.json +2 -0
  931. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebStore.json +1 -1
  932. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebStoreMessageContent.json +1 -1
  933. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WebStoreNetwork.json +1 -1
  934. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Wishlist.json +10 -0
  935. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WishlistItem.json +14 -1
  936. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkCapacityAvailability.json +2 -7
  937. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkCapacityLimit.json +0 -5
  938. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkCapacityUsage.json +2 -7
  939. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkDemographic.json +88 -2
  940. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkItem.json +144 -2
  941. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkItemComponent.json +101 -2
  942. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkItemEvent.json +49 -2
  943. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkOrder.json +2 -0
  944. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkOrderLineItem.json +1 -1
  945. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkOrderLineItemStatus.json +1 -1
  946. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkOrderStatus.json +1 -1
  947. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkPlanSelectionRule.json +0 -5
  948. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkType.json +6 -5
  949. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkTypeGroup.json +0 -5
  950. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkTypeGroupMember.json +0 -5
  951. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkforceCapacity.json +91 -3
  952. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkforceCapacityUnit.json +168 -2
  953. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/Workload.json +140 -3
  954. package/skills/platform-data-and-tooling-api-context-get/assets/enterprise_api/WorkloadUnit.json +110 -2
  955. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/AIApplication.json +1 -1
  956. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/AIApplicationConfig.json +1 -1
  957. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/AuthorizedEmailDomain.json +8 -3
  958. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/ContainerAsyncRequest.json +1 -1
  959. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/ConversationVendorInfo.json +1 -1
  960. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CspTrustedSite.json +1 -1
  961. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CustomApplication.json +1 -1
  962. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CustomField.json +5 -0
  963. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CustomNotifActionDef.json +1 -1
  964. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CustomNotificationActionGroup.json +1 -1
  965. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/CustomObject.json +5 -0
  966. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/DebugLevel.json +15 -0
  967. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/DeployDetails.json +1 -1
  968. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/DeployRequest.json +1 -1
  969. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/EmbeddedServiceCustomLabel.json +1 -1
  970. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/EventRelayConfig.json +1 -1
  971. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/ExternalDataSource.json +2 -2
  972. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/ExternalServiceRegistration.json +1 -1
  973. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/FlexiPage.json +2 -2
  974. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/Flow.json +2 -2
  975. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/Group.json +1 -1
  976. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/OutboundNetworkConnection.json +1 -1
  977. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/PermissionSet.json +1 -1
  978. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/QueryResult.json +1 -1
  979. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/QuickActionDefinition.json +3 -3
  980. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/ScndTelephPrvdOtbdDtl.json +59 -0
  981. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/SecondaryTelephonyProvider.json +54 -0
  982. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/SensitiveDataRuleElmnt.json +42 -0
  983. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/SensitiveDataRuleElmntGrp.json +33 -0
  984. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/SubscriberPackage.json +1 -1
  985. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/TelephonyProvider.json +55 -0
  986. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/TrustedTelephonyProvider.json +49 -0
  987. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/User.json +1 -1
  988. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/VoiceTelephonyDefinition.json +64 -0
  989. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/VoiceTelephonyGroupOvride.json +38 -0
  990. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/VoiceTelephonyProfileOvride.json +38 -0
  991. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/VoiceTelephonyUserOvride.json +38 -0
  992. package/skills/platform-data-and-tooling-api-context-get/assets/tooling_api/WorkflowAlert.json +1 -1
  993. package/skills/platform-data-and-tooling-api-context-get/references/data_and_tooling_index_table.md +190 -159
  994. package/skills/platform-data-and-tooling-api-context-get/references/usage_guide.md +2 -2
  995. package/skills/platform-datamask-run/SKILL.md +27 -24
  996. package/skills/platform-datamask-run/references/run-and-abort.md +10 -12
  997. package/skills/platform-datamask-run/scripts/poll-job.sh +27 -2
  998. package/skills/platform-lightning-app-coordinate/SKILL.md +43 -45
  999. package/skills/platform-metadata-discovery-get/SKILL.md +15 -10
  1000. package/skills/platform-metadata-grounding-get/SKILL.md +5 -3
  1001. package/skills/platform-trust-archive-manage/SKILL.md +7 -7
  1002. package/skills/platform-trust-archive-manage/examples/monitor-failed-jobs.md +6 -5
  1003. package/skills/platform-trust-archive-manage/references/archive-activity-entity.md +3 -3
  1004. package/skills/platform-trust-archive-manage/references/connect-api-operations.md +4 -2
  1005. package/skills/service-add-agents-to-contact-center-create/SKILL.md +138 -0
  1006. package/skills/service-agentforce-contact-center-coordinate/SKILL.md +5 -5
  1007. package/skills/service-agentforce-contact-center-coordinate/references/omni-flow-routing.md +3 -3
  1008. package/skills/service-agentforce-contact-center-coordinate/scripts/create-routing-flows.sh +8 -3
  1009. package/skills/service-agentforce-contact-center-coordinate/scripts/create-voice-agent.sh +5 -5
  1010. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-acc-queue.sh +10 -1
  1011. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-channel-line.sh +4 -0
  1012. package/skills/service-agentforce-contact-center-coordinate/scripts/resolve-flow-definition.sh +5 -0
  1013. package/skills/service-agentforce-contact-center-coordinate/scripts/verify-number-live.sh +6 -1
  1014. package/skills/service-concierge-portal-generate/SKILL.md +1 -1
  1015. package/skills/service-concierge-portal-generate/references/portal-deploy-runbook.md +21 -8
  1016. package/skills/service-digital-engagement-channel-configure/SKILL.md +64 -59
  1017. package/skills/service-digital-engagement-channel-configure/assets/messaging_channel_template.xml +5 -0
  1018. package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_template.xml +20 -0
  1019. package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_set_jwks_url_template.xml +23 -0
  1020. package/skills/service-digital-engagement-channel-configure/assets/public_key_certificate_template.xml +15 -0
  1021. package/skills/service-digital-engagement-channel-configure/examples/asa_agent_channel.xml +1 -1
  1022. package/skills/service-digital-engagement-channel-configure/examples/auth_queue_channel.xml +3 -3
  1023. package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_key.xml +11 -0
  1024. package/skills/service-digital-engagement-channel-configure/examples/jwks_upload_keyset.xml +13 -0
  1025. package/skills/service-digital-engagement-channel-configure/examples/jwks_url_keyset.xml +17 -0
  1026. package/skills/service-digital-engagement-channel-configure/examples/omni_flow_channel.xml +3 -3
  1027. package/skills/service-digital-engagement-channel-configure/examples/omni_queue_channel.xml +3 -3
  1028. package/skills/service-digital-engagement-channel-configure/examples/user_channel.xml +53 -0
  1029. package/skills/service-digital-engagement-channel-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
  1030. package/skills/service-digital-engagement-channel-configure/references/channel_settings.md +7 -7
  1031. package/skills/service-digital-engagement-channel-configure/references/keyset_settings.md +46 -0
  1032. package/skills/service-digital-engagement-channel-configure/references/keyset_setup.md +42 -0
  1033. package/skills/service-digital-engagement-channel-configure/references/onboarding_contract.md +32 -29
  1034. package/skills/service-digital-engagement-channel-configure/references/recaptcha_handoff.md +2 -5
  1035. package/skills/service-digital-engagement-channel-configure/references/routing_transitions.md +48 -0
  1036. package/skills/service-digital-engagement-channel-configure/references/user_verification.md +3 -4
  1037. package/skills/service-digital-engagement-channel-configure/references/user_verification_client.md +51 -0
  1038. package/skills/service-digital-engagement-channel-configure/scripts/check-api-version.sh +23 -2
  1039. package/skills/service-digital-engagement-deployment-configure/SKILL.md +28 -10
  1040. package/skills/service-digital-engagement-deployment-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
  1041. package/skills/service-digital-engagement-deployment-configure/references/branding_and_tooling.md +2 -2
  1042. package/skills/service-digital-engagement-deployment-configure/references/code_snippet.md +2 -2
  1043. package/skills/service-digital-engagement-deployment-configure/references/connect_api_creation.md +13 -7
  1044. package/skills/service-digital-engagement-deployment-configure/references/custom_labels.md +127 -0
  1045. package/skills/service-digital-engagement-deployment-configure/references/deployment_settings.md +2 -1
  1046. package/skills/service-digital-engagement-deployment-configure/references/onboarding_contract.md +29 -32
  1047. package/skills/service-digital-engagement-deployment-configure/references/prechat_forms.md +1 -1
  1048. package/skills/service-digital-engagement-deployment-configure/scripts/check-api-version.sh +25 -4
  1049. package/skills/service-email-to-case-configure/SKILL.md +89 -80
  1050. package/skills/service-email-to-case-configure/assets/CaseSettings.settings-meta.xml +1 -1
  1051. package/skills/service-email-to-case-configure/examples/CaseSettings-two-addresses.settings-meta.xml +6 -3
  1052. package/skills/service-email-to-case-configure/references/_vendored/service-onboarding-delegation-guidelines.md +43 -0
  1053. package/skills/service-email-to-case-configure/references/agent-delegation.md +22 -0
  1054. package/skills/service-email-to-case-configure/references/apply-mechanics.md +15 -12
  1055. package/skills/service-email-to-case-configure/references/end-to-end-proof.md +14 -0
  1056. package/skills/service-email-to-case-configure/references/onboarding-delegated-run.md +66 -0
  1057. package/skills/service-email-to-case-configure/references/routing_address_reference.md +6 -2
  1058. package/skills/service-email-to-case-configure/references/troubleshooting.md +17 -9
  1059. package/skills/service-email-to-case-configure/scripts/apply-casesettings.py +863 -925
  1060. package/skills/service-email-to-case-configure/scripts/tests/_agent.py +162 -0
  1061. package/skills/service-email-to-case-configure/scripts/tests/_fakeorg.py +119 -155
  1062. package/skills/service-email-to-case-configure/scripts/tests/_run.py +10 -17
  1063. package/skills/service-email-to-case-configure/scripts/tests/test_apply_org_scenarios.py +14 -14
  1064. package/skills/service-email-to-case-configure/scripts/tests/test_dispatch_contract.py +316 -0
  1065. package/skills/service-email-to-case-configure/scripts/tests/test_new_capabilities.py +12 -43
  1066. package/skills/service-email-to-case-configure/scripts/tests/test_validate_casesettings.py +13 -0
  1067. package/skills/service-email-to-case-configure/scripts/validate-casesettings.py +17 -5
  1068. package/skills/service-helpagent-coordinate/README.md +2 -3
  1069. package/skills/service-helpagent-coordinate/SKILL.md +11 -10
  1070. package/skills/service-helpagent-coordinate/assets/help-agent-spec.md +3 -3
  1071. package/skills/service-helpagent-coordinate/references/channel-web-chat.md +33 -1
  1072. package/skills/service-helpagent-coordinate/references/output-report-format.md +8 -2
  1073. package/skills/service-itsm-agentic-setup-incident-management/references/status-checks.md +11 -11
  1074. package/skills/service-remove-agents-from-contact-center-assign/SKILL.md +145 -0
  1075. package/skills/service-voice-configuration-manage/SKILL.md +206 -0
  1076. package/skills/service-voice-configuration-manage/assets/regions.json +23 -0
  1077. package/skills/service-voice-configuration-manage/references/lookups.md +91 -0
  1078. package/skills/service-voice-configuration-manage/references/voice_config_api.md +169 -0
  1079. package/skills/service-voice-configuration-manage/scripts/create-configuration.sh +20 -0
  1080. package/skills/service-voice-configuration-manage/scripts/delete-configuration.sh +31 -0
  1081. package/skills/service-voice-configuration-manage/scripts/get-configuration.sh +18 -0
  1082. package/skills/service-voice-configuration-manage/scripts/lib.sh +22 -0
  1083. package/skills/service-voice-configuration-manage/scripts/list-configurations.sh +18 -0
  1084. package/skills/service-voice-configuration-manage/scripts/lookup-caller-lines.sh +30 -0
  1085. package/skills/service-voice-configuration-manage/scripts/lookup-flows.sh +29 -0
  1086. package/skills/service-voice-configuration-manage/scripts/lookup-profiles.sh +29 -0
  1087. package/skills/service-voice-configuration-manage/scripts/lookup-users.sh +29 -0
  1088. package/skills/service-voice-configuration-manage/scripts/update-configuration.sh +20 -0
  1089. package/skills/tableau-next-asset-create/SKILL.md +10 -4
  1090. package/skills/tableau-next-asset-create/references/dashboard-design-principles.md +133 -0
  1091. package/skills/tableau-next-asset-create/references/data-transform-gotchas.md +284 -128
  1092. package/skills/tableau-next-asset-create/references/deep-reference-index.md +3 -3
  1093. package/skills/tableau-next-asset-create/references/edit-dashboard.md +1 -1
  1094. package/skills/tableau-next-asset-create/references/edit-visualization.md +678 -468
  1095. package/skills/tableau-next-asset-create/references/shared-gates.md +1 -1
  1096. package/skills/tableau-next-asset-create/references/tasks/create-data-transform.md +120 -42
  1097. package/skills/tableau-next-asset-create/references/tasks/create-viz.md +8 -0
  1098. package/skills/tableau-next-asset-create/references/tasks/edit-viz.md +7 -4
  1099. package/skills/tableau-next-asset-create/references/tasks/promote-or-reuse.md +9 -4
  1100. package/skills/tableau-next-asset-create/references/viz-authoring.md +1 -1
  1101. package/skills/service-email-to-case-configure/scripts/tests/test_get_session.py +0 -134
@@ -1,147 +1,93 @@
1
1
  #!/usr/bin/env python3
2
- """Apply Email-to-Case CaseSettings to an org via the Metadata API's CRUD
3
- updateMetadata call (read -> merge -> update -> verify), in two phases.
4
-
5
- Why updateMetadata and not a file-based deploy: enabling On-Demand
6
- Email-to-Case provisions the org's internal email-service infrastructure,
7
- and a routing address can only bind to it in a SUBSEQUENT operation. A
8
- single file-based deploy that both enables On-Demand and declares a routing
9
- address fails on a freshly-configured org ("We couldn't save your routing
10
- address..."). This script therefore applies changes in two phases:
2
+ """Payload builder / response validator for configuring Email-to-Case through the
3
+ Metadata CRUD route (`/headless/metadata`, type CaseSettings) in two phases.
4
+
5
+ This script makes NO network calls and holds no credentials. The agent performs
6
+ every org call with the project-codey `dispatch_readonly` / `dispatch` tools; this
7
+ script prints the exact request to make (`requests`), validates what came back, and
8
+ builds the next write. Each subcommand reads dispatch responses from files (the
9
+ `{status_code, body}` envelope the tools return, or a bare body) and prints JSON to
10
+ stdout. Any refusal or invalid input exits non-zero with the reason on stderr.
11
+
12
+ Why two phases and not one write: enabling On-Demand Email-to-Case provisions the
13
+ org's internal email-service infrastructure, and a routing address can only bind
14
+ to it in a SUBSEQUENT operation. A single write that both enables On-Demand and
15
+ declares a routing address fails on a freshly-configured org ("We couldn't save
16
+ your routing address...").
11
17
 
12
18
  Phase A - prerequisites + toggles (Support Settings owner / automated case
13
19
  user, enableEmailToCase, enableOnDemandEmailToCase, plus any other
14
20
  emailToCase flags EXCEPT routingAddresses).
15
- Phase B - routing addresses, appended one updateMetadata call after the
16
- toggles are live.
21
+ Phase B - routing addresses, one write after the toggles are live.
17
22
 
18
23
  Each write sends ONLY the top-level CaseSettings fields this skill owns (see
19
- KEEP_TOP_LEVEL_FIELDS) plus the complete emailToCase block; all other top-level
20
- fields read from the org are stripped. This is deliberate: the platform
21
- re-validates any top-level field present in the payload even at an unchanged
22
- value, and some (e.g. Case Feed) carry dependencies unrelated to Email-to-Case
23
- (Case Feed needs Chatter), which would fail the call on orgs where that config
24
- differs. Stripped fields keep their current value via field-level merge, and
25
- provisioning is driven by the emailToCase block, so the skill needs no Chatter
26
- prerequisite and is unaffected by unrelated org Case configuration.
27
-
28
- Authentication uses the Salesforce CLI's existing session for a target-org
29
- alias (no passwords handled here): `sf org display --target-org <alias> --json`
30
- supplies the instanceUrl, username, and apiVersion, and
31
- `sf org auth show-access-token` supplies the live session token. Recent CLIs
32
- REDACT the token in `sf org display` output (a `[REDACTED ...]` marker, with or
33
- without `--verbose`), so it is not reused directly. Only older CLIs that predate
34
- the show-access-token subcommand are served by a fallback, and those omit the
35
- token from non-verbose `sf org display` entirely — so the fallback issues a
36
- `--verbose` display to obtain it.
37
-
38
- Support Settings (Default Case Owner + Automated Case User) are handled so no
39
- value is ever assumed or guessed:
40
- * If the org ALREADY has them configured, they are PRESERVED untouched
41
- (unless --overwrite-support-settings is passed). The platform returns these
42
- fields null when unset, so a null read is a reliable "not configured"
43
- signal.
44
- * If NOT configured, the caller must supply explicit values (the skill
45
- elicits them):
46
- - Default Case Owner: --owner-type {User|Queue} + --owner-value. A User
47
- value must be an active Username; a Queue value must be a real Queue
48
- (matched on DeveloperName). Invalid input fails closed with an
49
- actionable message so the skill can re-prompt.
24
+ KEEP_TOP_LEVEL_FIELDS) plus the complete emailToCase block as read from the org;
25
+ all other top-level fields are stripped. The platform re-validates any top-level
26
+ field present in the payload even at an unchanged value, and some (e.g. Case Feed)
27
+ carry dependencies unrelated to Email-to-Case (Case Feed needs Chatter). Stripped
28
+ fields keep their current value via field-level merge, and provisioning is driven
29
+ by the emailToCase block, so no Chatter prerequisite is needed. The complete
30
+ emailToCase block matters: a minimal patch that only flips
31
+ enableOnDemandEmailToCase does not provision the email service.
32
+
33
+ Support Settings (Default Case Owner + Automated Case User) are never guessed:
34
+ * Already configured in the org -> PRESERVED (omitted from the payload) unless
35
+ --overwrite-support-settings is passed AND new input is supplied for that field.
36
+ The platform returns these null when unset, so a null read means "not set".
37
+ * Not configured -> the caller must supply values (the skill elicits them):
38
+ - Default Case Owner: --owner-type {User|Queue} + --owner-value (an active
39
+ Username, or a Queue DeveloperName).
50
40
  - Automated Case User: --automated-type {User|System}. User needs
51
- --automated-value (an active Username); System sets
52
- useSystemUserAsDefaultCaseUser and needs no user value (optionally
53
- --system-user-email when the org's automated case user doesn't exist).
54
- The authenticated CLI user is used ONLY with --use-authenticated-user, and
55
- only when the operator explicitly asks for it.
56
- * Routing-address email addresses must be supplied explicitly with
57
- --routing-email (one per routing address, in document order). The script
58
- refuses to run if the input declares routing addresses but no
59
- --routing-email is given.
60
-
61
- Before mutating a PRODUCTION org (non-sandbox, non-trial), the script fails
62
- closed unless --confirm-production is passed — enabling Email-to-Case is a
63
- permanent, org-wide change. Sandboxes and trials deploy without it. The Metadata
64
- API version is derived from the org and floored at DEFAULT_API_VERSION (67.0);
65
- pass --api-version to force a specific version.
66
-
67
- Usage:
68
- python3 apply-casesettings.py --target-org <alias> --input <file> \
69
- --routing-email support@yourco.com \
70
- --owner-type Queue --owner-value Support_Queue \
71
- --automated-type System --system-user-email ops-noreply@yourco.com
72
- python3 apply-casesettings.py --target-org <alias> --input <file> --verify-only
73
- # Act 3 — prove inbound email created Cases (read-only; no --input needed):
74
- python3 apply-casesettings.py --target-org <alias> --verify-cases \
75
- --supplied-email customer@external.com
76
-
77
- The --input file is a standard CaseSettings source file (the artifact this
78
- skill produces). The script parses it, resolves/validates the owner + automated
79
- user (only when not already configured), substitutes the supplied routing
80
- email(s), applies phase A then phase B, and re-reads to verify. Prints a JSON
81
- summary to stdout; exits non-zero on any SOAP fault or failed SaveResult (the
82
- error text is printed to stderr).
41
+ --automated-value; System needs no value (optionally --system-user-email).
42
+ Values are checked against the lookup responses and fail closed.
43
+ * Routing-address emails come only from --routing-email (one per address, in
44
+ document order); the script refuses a count mismatch.
45
+
46
+ Subcommands (agent flow, in order):
47
+ requests <kind> [--api-version X.Y] ... print the request to dispatch
48
+ gate --org F [--confirm-production] production-org safety verdict
49
+ read --response F print current settings
50
+ phase-a --input F --current F ... build the Phase A write
51
+ phase-b --input F --current F ... build the Phase B write
52
+ check-write --response F validate a write response
53
+ verify --input F --initial F --after F preservation guard + summary
54
+ cases --cases F --messages F prove inbound mail made Cases
83
55
  """
84
56
 
85
57
  import argparse
86
58
  import json
87
- import subprocess
88
59
  import sys
89
- import urllib.error
90
- import urllib.request
91
60
  import xml.etree.ElementTree as ET
92
61
 
93
62
  META_NS = "http://soap.sforce.com/2006/04/metadata"
94
- SOAP_NS = "http://schemas.xmlsoap.org/soap/envelope/"
95
- XSI_NS = "http://www.w3.org/2001/XMLSchema-instance"
96
- # Matches the skill's declared minApiVersion (67.0), which clears the version
97
- # floors of every emailToCase toggle this skill sets (e.g. showWordCountInComposer)
98
- # and the Support-Settings System-user fields. The routing-address
99
- # `botEmailDefinition` child (Agentforce for Service on Email) requires v68.0+.
100
- DEFAULT_API_VERSION = "67.0"
101
- # Resolved at runtime by get_session(): an explicit --api-version wins, otherwise
102
- # it is DERIVED from the org's own apiVersion (as reported by `sf org display`)
103
- # but floored at DEFAULT_API_VERSION — see resolve_api_version. This lets the
104
- # skill use the org's newer features (e.g. the v68+ botEmailDefinition binding)
105
- # with no manual flag, while never dropping below the field version-floors this
106
- # skill relies on and never outrunning what the org actually supports.
107
- API_VERSION = DEFAULT_API_VERSION
108
- # Set True in main() when the operator passed --api-version, so get_session skips
109
- # the org-derived version and honors the explicit override.
110
- _API_VERSION_EXPLICIT = False
111
- # Set by get_session(): the sf CLI alias/username used to run read-only SOQL via
112
- # `sf data query --json`, so the sf CLI holds the token. The raw session token is
113
- # only ever put on the wire by the SOAP metadata path (readMetadata/updateMetadata),
114
- # which has no CLI equivalent.
115
- TARGET_ORG = None
63
+
64
+
65
+ def _data_path(version, tail):
66
+ """Dispatch path for `tail`. Without a version the server injects the org's
67
+ own API version, so by default the skill rides whatever the org supports; an
68
+ explicit --api-version pins it."""
69
+ return f"/services/data/v{version}{tail}" if version else f"/services/data{tail}"
116
70
 
117
71
  # Platform-managed read-only fields the org mints on a routing address. We never
118
72
  # declare these on a write (defensive hygiene). NOTE: stripping them is not what
119
- # preserves existing addresses on a multi-address write — document ordering is
120
- # (new addresses before existing ones). See strip_readonly_address_fields.
73
+ # preserves existing addresses on a multi-address write - document ordering is
74
+ # (new addresses before existing ones).
121
75
  READONLY_ADDRESS_FIELDS = {"emailServicesAddress", "isVerified"}
122
76
 
123
- # Top-level CaseSettings fields this skill is responsible for — the ONLY
124
- # top-level children we send in an updateMetadata payload. Every other top-level
125
- # field the read returns is stripped before writing.
77
+ # Top-level CaseSettings fields this skill is responsible for - the ONLY
78
+ # top-level children we send in a write payload. Every other top-level field the
79
+ # read returns is stripped before writing.
126
80
  #
127
81
  # Why strip everything else: the platform RE-VALIDATES any field present in the
128
82
  # payload, even at an unchanged value. Several top-level Case fields carry
129
- # dependencies unrelated to Email-to-Case — most notably Case Feed, whose
130
- # re-validation requires Chatter (feeds) and otherwise fails the whole call with
131
- # "The setup requirements for Case Feed Items has to be enabled." Sending only
132
- # the fields we own avoids every such unrelated re-validation (Case Feed,
133
- # swarming, solutions, suggested articles, web-to-case, ...), so the skill works
134
- # on orgs regardless of their other Case configuration and needs no Chatter
135
- # prerequisite.
83
+ # dependencies unrelated to Email-to-Case - most notably Case Feed, whose
84
+ # re-validation requires Chatter and otherwise fails the whole call with "The
85
+ # setup requirements for Case Feed Items has to be enabled."
136
86
  #
137
- # Why this is safe: CaseSettings updateMetadata merges at the field level, so any
138
- # omitted top-level field keeps its current org value untouched (verified:
139
- # enableCaseFeed and enableCollapseEmailThread both stay true after a write that
140
- # omits them). Provisioning of the On-Demand email service is driven entirely by
141
- # the full `emailToCase` block, NOT by any top-level field (verified from scratch
142
- # on a Chatter-off org: stripping all 35 other top-level fields still provisioned
143
- # and bound a routing address). `emailToCase` and `fullName` are always kept in
144
- # addition to these; support-settings fields (SUPPORT_SETTINGS_FIELDS) are here.
87
+ # Why this is safe: CaseSettings writes merge at the field level, so any omitted
88
+ # top-level field keeps its current org value untouched. Provisioning of the
89
+ # On-Demand email service is driven entirely by the full `emailToCase` block, NOT
90
+ # by any top-level field.
145
91
  KEEP_TOP_LEVEL_FIELDS = {
146
92
  "fullName",
147
93
  "emailToCase",
@@ -174,6 +120,10 @@ def fail(message):
174
120
  sys.exit(1)
175
121
 
176
122
 
123
+ def emit(obj):
124
+ print(json.dumps(obj, indent=2, sort_keys=True))
125
+
126
+
177
127
  def local_name(tag):
178
128
  return tag.split("}", 1)[-1] if "}" in tag else tag
179
129
 
@@ -182,236 +132,205 @@ def qn(name):
182
132
  return f"{{{META_NS}}}{name}"
183
133
 
184
134
 
135
+
185
136
  # ---------------------------------------------------------------------------
186
- # sf CLI session
137
+ # dispatch responses
187
138
  # ---------------------------------------------------------------------------
188
139
 
189
- def sf_json(args):
190
- """Run an `sf` command with --json and return the parsed 'result'."""
140
+ def load_response(path):
141
+ """Return (status_code, body) from a saved dispatch response. Accepts the
142
+ `{status_code, body}` envelope the dispatch tools return, or a bare body
143
+ (treated as status 200)."""
191
144
  try:
192
- proc = subprocess.run(
193
- args, capture_output=True, text=True, check=False
194
- )
195
- except FileNotFoundError:
196
- fail("The Salesforce CLI (`sf`) was not found on PATH. Install it or "
197
- "authenticate the target org first.")
198
- if proc.returncode != 0:
199
- # sf prints a JSON error on stdout even on failure; try to surface it.
200
- detail = proc.stdout.strip() or proc.stderr.strip()
201
- fail(f"`{' '.join(args)}` failed: {detail}")
145
+ with open(path, encoding="utf-8") as fh:
146
+ data = json.load(fh)
147
+ except (OSError, json.JSONDecodeError) as exc:
148
+ fail(f"Could not read dispatch response '{path}': {exc}")
149
+ if isinstance(data, dict) and "status_code" in data and "body" in data:
150
+ return data["status_code"], data["body"]
151
+ return 200, data
152
+
153
+
154
+ def error_messages(status, body):
155
+ """Collect the error text from any of the response shapes the route returns:
156
+ a bare array of {errorCode, message} (unsupported operation), or a
157
+ {results: [{errors: [{statusCode, message}]}]} object (rule violations and
158
+ provisioning failures). Empty list means the response carried no error."""
159
+ msgs = []
160
+ if isinstance(body, list):
161
+ for item in body:
162
+ if isinstance(item, dict) and (item.get("message")
163
+ or item.get("errorCode")):
164
+ code = item.get("errorCode")
165
+ text = item.get("message") or ""
166
+ msgs.append(f"{code}: {text}" if code else text)
167
+ elif isinstance(body, dict):
168
+ for res in body.get("results") or []:
169
+ for err in (res or {}).get("errors") or []:
170
+ code = err.get("statusCode") or err.get("errorCode")
171
+ text = err.get("message") or json.dumps(err)
172
+ msgs.append(f"{code}: {text}" if code else text)
173
+ if not msgs and body.get("message"):
174
+ msgs.append(str(body["message"]))
175
+ if not msgs and not (isinstance(status, int) and 200 <= status < 300):
176
+ msgs.append(f"HTTP {status}: {json.dumps(body)[:500]}")
177
+ return msgs
178
+
179
+
180
+ def parse_settings_response(path):
181
+ """Return the CaseSettings root element from a read response, or fail with
182
+ the route's error text."""
183
+ status, body = load_response(path)
184
+ msgs = error_messages(status, body)
185
+ if msgs:
186
+ fail("Reading CaseSettings failed: " + "; ".join(msgs))
187
+ xml_rep = body.get("xmlRep") if isinstance(body, dict) else None
188
+ if not xml_rep:
189
+ fail("The read response carried no CaseSettings xmlRep.")
202
190
  try:
203
- return json.loads(proc.stdout)["result"]
204
- except (json.JSONDecodeError, KeyError) as exc:
205
- fail(f"Could not parse `{' '.join(args)}` output: {exc}")
191
+ return ET.fromstring(xml_rep)
192
+ except ET.ParseError as exc:
193
+ fail(f"The CaseSettings xmlRep could not be parsed: {exc}")
206
194
 
207
195
 
208
- def sf_json_optional(args):
209
- """Like ``sf_json`` but return None instead of exiting when the command is
210
- unavailable or fails. Used to probe optional subcommands that don't exist on
211
- every CLI version (e.g. older CLIs lack `sf org auth show-access-token`)."""
212
- try:
213
- proc = subprocess.run(
214
- args, capture_output=True, text=True, check=False
215
- )
216
- except FileNotFoundError:
217
- return None
218
- if proc.returncode != 0:
219
- return None
220
- try:
221
- return json.loads(proc.stdout).get("result")
222
- except (json.JSONDecodeError, AttributeError):
223
- return None
196
+ def parse_query_records(path, what):
197
+ status, body = load_response(path)
198
+ msgs = error_messages(status, body)
199
+ if msgs:
200
+ fail(f"{what} query failed: " + "; ".join(msgs))
201
+ return (body.get("records") if isinstance(body, dict) else None) or []
224
202
 
225
203
 
226
- def _usable_access_token(token):
227
- """True if ``token`` looks like a live Salesforce session token.
204
+ # ---------------------------------------------------------------------------
205
+ # request builders (what the agent should dispatch)
206
+ # ---------------------------------------------------------------------------
228
207
 
229
- A real token is ``<orgId>!<...>``; the `!` separator is always present.
230
- Recent CLIs redact the token in `sf org display --json` (returning a
231
- non-empty `[REDACTED ...]` marker), which must be rejected rather than sent
232
- as a Bearer token."""
233
- return isinstance(token, str) and "!" in token and "REDACTED" not in token
208
+ def _escape_soql(value):
209
+ return str(value).replace("\\", "\\\\").replace("'", "\\'")
234
210
 
235
211
 
236
- def _version_tuple(value):
237
- """Parse an 'X.Y' API version string to a (major, minor) int tuple, or None
238
- if it isn't a recognizable numeric version."""
239
- if not value:
240
- return None
241
- try:
242
- parts = str(value).strip().split(".")
243
- return (int(parts[0]), int(parts[1]) if len(parts) > 1 else 0)
244
- except (ValueError, IndexError):
245
- return None
212
+ def _soql_list(values):
213
+ return ", ".join(f"'{_escape_soql(v)}'" for v in sorted(values))
246
214
 
247
215
 
248
- def resolve_api_version(org_api_version):
249
- """Return the API version string to use, given the org's own apiVersion
250
- (as reported by `sf org display`; may be None/blank/garbage).
251
-
252
- Rule: floor, not "always latest". The effective version is
253
- max(org_apiVersion, DEFAULT_API_VERSION) — so the skill rides the org's newer
254
- features (e.g. the v68+ botEmailDefinition binding) automatically, but never
255
- drops below DEFAULT_API_VERSION (the floor that clears every field this skill
256
- sets) and never claims a version the org doesn't report. If the org's version
257
- can't be parsed, fall back to DEFAULT_API_VERSION."""
258
- org_t = _version_tuple(org_api_version)
259
- floor_t = _version_tuple(DEFAULT_API_VERSION)
260
- if org_t is None or org_t < floor_t:
261
- return DEFAULT_API_VERSION
262
- return org_api_version.strip() if isinstance(org_api_version, str) else str(
263
- org_api_version)
264
-
265
-
266
- def get_session(target_org):
267
- """Return (session_id, metadata_url, instance_url, auth_username).
268
-
269
- Also resolves the global API_VERSION when it was not set explicitly via
270
- --api-version: it is derived from the org's reported apiVersion but floored
271
- at DEFAULT_API_VERSION (see resolve_api_version)."""
272
- display = sf_json(["sf", "org", "display", "--target-org", target_org,
273
- "--json"])
274
- instance_url = display.get("instanceUrl")
275
- if not instance_url:
276
- fail(f"No instanceUrl for org '{target_org}'. Is it authenticated?")
277
- auth_username = display.get("username")
278
- if not auth_username:
279
- fail(f"Could not determine the authenticated username for "
280
- f"org '{target_org}'.")
281
- # Derive the API version from the org unless the operator forced one with
282
- # --api-version. `sf org display` reports the CLI's configured apiVersion for
283
- # the org (the org default unless locally overridden); flooring at
284
- # DEFAULT_API_VERSION keeps every field this skill sets valid.
285
- global API_VERSION, TARGET_ORG
286
- TARGET_ORG = target_org
287
- if not _API_VERSION_EXPLICIT:
288
- API_VERSION = resolve_api_version(display.get("apiVersion"))
289
- # Obtain a live access token. Prefer `sf org auth show-access-token`, which
290
- # returns the real session token; recent CLIs REDACT the token in
291
- # `sf org display --json` (a `[REDACTED ...]` marker, verbose or not) so it
292
- # can't be sent as a Bearer token. Only when that subcommand is unavailable
293
- # (older CLIs) fall back to a `--verbose` display: those CLIs omit the token
294
- # from non-verbose output entirely, so a plain `sf org display` never carries
295
- # it. Either way, accept a value only if it looks like a live token.
296
- token = None
297
- at = sf_json_optional(["sf", "org", "auth", "show-access-token",
298
- "--target-org", target_org, "--no-prompt", "--json"])
299
- # `result` is an object (`{accessToken}`) on current CLIs, but accept a bare
300
- # string too in case a CLI version returns the token directly.
301
- if isinstance(at, str):
302
- token = at
303
- elif isinstance(at, dict):
304
- token = at.get("accessToken")
305
- if not _usable_access_token(token):
306
- verbose = sf_json_optional(["sf", "org", "display", "--target-org",
307
- target_org, "--verbose", "--json"])
308
- if isinstance(verbose, dict):
309
- token = verbose.get("accessToken")
310
- if not _usable_access_token(token):
311
- fail(f"Could not obtain a usable access token for org '{target_org}'. "
312
- f"Re-authenticate with `sf org login` and try again.")
313
- metadata_url = f"{instance_url}/services/Soap/m/{API_VERSION}"
314
- return token, metadata_url, instance_url, auth_username
315
-
316
-
317
- def query_active_user(session_id, instance_url, username):
318
- """Return the exact Username of an active User matching `username`
319
- (case-insensitively), or None if there is no active match."""
320
- if not username:
321
- return None
322
- escaped = username.replace("\\", "\\\\").replace("'", "\\'")
323
- soql = ("SELECT Username FROM User "
324
- f"WHERE Username = '{escaped}' AND IsActive = true")
325
- records = _soql_query(session_id, instance_url, soql).get("records", [])
326
- return records[0]["Username"] if records else None
327
-
328
-
329
- def _soql_query(session_id, instance_url, soql):
330
- # Read-only SOQL runs through `sf data query`, so the sf CLI holds the token
331
- # — the raw session_id is only ever put on the wire by the SOAP metadata path
332
- # (read/update), which has no CLI equivalent. session_id and instance_url are
333
- # retained for signature parity with the test seams and other query helpers.
334
- result = sf_json(["sf", "data", "query", "--target-org", TARGET_ORG,
335
- "--query", soql, "--json"])
336
- # `sf data query --json` returns {"records": [...], "totalSize": N, ...} under
337
- # 'result' — the same shape callers already consume from the REST /query body.
338
- return result if isinstance(result, dict) else {"records": []}
339
-
340
-
341
- def query_org_info(session_id, instance_url):
342
- """Return (is_sandbox, organization_type, is_trial) for the target org, or
343
- (None, None, None) if the Organization row can't be read. Used by the
344
- production-org safety gate."""
345
- soql = ("SELECT IsSandbox, OrganizationType, TrialExpirationDate "
346
- "FROM Organization LIMIT 1")
347
- data = _soql_query(session_id, instance_url, soql)
348
- records = data.get("records", [])
349
- if not records:
350
- return None, None, None
351
- row = records[0]
352
- return (row.get("IsSandbox"), row.get("OrganizationType"),
353
- row.get("TrialExpirationDate") is not None)
354
-
355
-
356
- def query_email_cases(session_id, instance_url, supplied_email=None):
357
- """Return the list of Case records created from inbound email
358
- (Origin = 'Email') within the last 3 days, optionally narrowed to a
359
- SuppliedEmail. The 3-day window excludes stale pre-existing email Cases so a
360
- verify run can't false-pass on an old Case. Used by --verify-cases to prove
361
- inbound mail created Cases."""
216
+ def soql_request(version, soql, purpose):
217
+ return {"purpose": purpose, "tool": "dispatch_readonly", "method": "GET",
218
+ "path": _data_path(version, "/query"),
219
+ "query_params": {"q": soql}}
220
+
221
+
222
+ def settings_read_request(version):
223
+ return {"purpose": "read CaseSettings", "tool": "dispatch_readonly",
224
+ "method": "GET", "path": _data_path(version, "/headless/metadata"),
225
+ "query_params": {"type": "CaseSettings", "fullName": "Case"}}
226
+
227
+
228
+ def settings_write_request(version, records, purpose):
229
+ """Build the PUT request for `records` (a CaseSettings element): strip the
230
+ platform-managed address fields, keep only the fields this skill owns, and
231
+ serialize as the route's {type, fullName, xmlRep} body."""
232
+ strip_readonly_address_fields(records)
233
+ root = ET.Element(qn("CaseSettings"))
234
+ for child in list(records):
235
+ if local_name(child.tag) in KEEP_TOP_LEVEL_FIELDS:
236
+ root.append(child)
237
+ ET.register_namespace("", META_NS)
238
+ xml_rep = ('<?xml version="1.0" encoding="UTF-8"?>\n'
239
+ + ET.tostring(root, encoding="unicode") + "\n")
240
+ return {"purpose": purpose, "tool": "dispatch", "method": "PUT",
241
+ "path": _data_path(version, "/headless/metadata"),
242
+ "body": {"type": "CaseSettings", "fullName": "Case",
243
+ "xmlRep": xml_rep}}
244
+
245
+
246
+ def org_request(version):
247
+ return soql_request(
248
+ version, "SELECT IsSandbox, OrganizationType, TrialExpirationDate "
249
+ "FROM Organization LIMIT 1", "production-org gate")
250
+
251
+
252
+ def cases_request(version, supplied_email=None):
253
+ """Case rows created from inbound email (Origin = 'Email') in the last 3
254
+ days, optionally narrowed to a SuppliedEmail. The 3-day window excludes stale
255
+ pre-existing email Cases so a verify run can't false-pass on an old Case."""
362
256
  where = ["Origin = 'Email'"]
363
257
  if supplied_email:
364
- esc = supplied_email.replace("\\", "\\\\").replace("'", "\\'")
365
- where.append(f"SuppliedEmail = '{esc}'")
366
- # Fixed SOQL date-literal window (a constant, never operator input) — recent
258
+ where.append(f"SuppliedEmail = '{_escape_soql(supplied_email)}'")
259
+ # Fixed SOQL date-literal window (a constant, never operator input) - recent
367
260
  # enough to catch a test email sent over a weekend, tight enough to exclude
368
261
  # old Cases from a prior setup.
369
262
  where.append("CreatedDate >= LAST_N_DAYS:3")
370
- soql = ("SELECT Id, CaseNumber, Origin, SuppliedEmail, Subject, Status, "
371
- "CreatedDate FROM Case WHERE " + " AND ".join(where) +
372
- " ORDER BY CreatedDate DESC LIMIT 50")
373
- data = _soql_query(session_id, instance_url, soql)
374
- return data.get("records", [])
263
+ soql = ("SELECT Id, CaseNumber, Origin, SuppliedEmail, CreatedDate FROM Case "
264
+ "WHERE " + " AND ".join(where) + " ORDER BY CreatedDate DESC LIMIT 50")
265
+ return soql_request(version, soql, "inbound-email Cases")
375
266
 
376
267
 
377
- def query_incoming_email_messages(session_id, instance_url, case_ids):
378
- """Return incoming EmailMessage records (Incoming = true) whose ParentId is
379
- one of `case_ids`. Proves the Case has its linked inbound email."""
380
- if not case_ids:
381
- return []
382
- quoted = ", ".join(
383
- "'" + cid.replace("\\", "\\\\").replace("'", "\\'") + "'"
384
- for cid in case_ids)
385
- soql = ("SELECT Id, ParentId, FromAddress, ToAddress, Subject, Incoming, "
386
- "MessageDate FROM EmailMessage "
387
- f"WHERE Incoming = true AND ParentId IN ({quoted}) "
268
+ def messages_request(version, case_ids):
269
+ """Incoming EmailMessage rows whose ParentId is one of `case_ids` - proves the
270
+ Case has its linked inbound email."""
271
+ soql = ("SELECT Id, ParentId, Incoming FROM EmailMessage "
272
+ f"WHERE Incoming = true AND ParentId IN ({_soql_list(case_ids)}) "
388
273
  "ORDER BY MessageDate DESC LIMIT 200")
389
- data = _soql_query(session_id, instance_url, soql)
390
- return data.get("records", [])
274
+ return soql_request(version, soql, "incoming EmailMessage rows")
391
275
 
392
276
 
393
- def query_queue(session_id, instance_url, name):
394
- """Return the DeveloperName of a Queue matching `name` (by DeveloperName,
395
- which is what CaseSettings.defaultCaseOwner stores for a queue; Name is
396
- accepted too as a tolerant fallback), or None if there is no match."""
397
- if not name:
277
+ # ---------------------------------------------------------------------------
278
+ # Org lookups (Users / Queues) validated from saved query responses
279
+ # ---------------------------------------------------------------------------
280
+
281
+ class Directory:
282
+ """Active users and queues returned by the lookup queries. `users` / `queues`
283
+ are None when the matching response was not supplied, so a missing lookup is
284
+ reported as such instead of looking like 'not found'."""
285
+
286
+ def __init__(self, users=None, queues=None):
287
+ self.users = users
288
+ self.queues = queues
289
+
290
+ def active_user(self, username):
291
+ """Exact Username of an active User matching `username`
292
+ (case-insensitively), or None."""
293
+ if not username:
294
+ return None
295
+ if self.users is None:
296
+ fail(f"'{username}' must be checked against the org first: run "
297
+ f"`requests lookups`, dispatch the queries, and pass the result "
298
+ f"files with --users / --queues.")
299
+ for name in self.users:
300
+ if name.lower() == username.lower():
301
+ return name
398
302
  return None
399
- escaped = name.replace("\\", "\\\\").replace("'", "\\'")
400
- soql = ("SELECT DeveloperName FROM Group "
401
- f"WHERE Type = 'Queue' AND (DeveloperName = '{escaped}' "
402
- f"OR Name = '{escaped}')")
403
- data = _soql_query(session_id, instance_url, soql)
404
- records = data.get("records", [])
405
- return records[0]["DeveloperName"] if records else None
303
+
304
+ def queue(self, name):
305
+ """DeveloperName of a Queue matching `name` (DeveloperName is what
306
+ CaseSettings.defaultCaseOwner stores; Name is accepted as a tolerant
307
+ fallback), or None."""
308
+ if not name:
309
+ return None
310
+ if self.queues is None:
311
+ fail(f"Queue '{name}' must be checked against the org first: run "
312
+ f"`requests lookups`, dispatch the queries, and pass the result "
313
+ f"files with --users / --queues.")
314
+ for dev_name, label in self.queues:
315
+ if name == dev_name or name == label:
316
+ return dev_name
317
+ return None
318
+
319
+
320
+ def load_directory(args):
321
+ users = queues = None
322
+ if getattr(args, "users", None):
323
+ users = [r["Username"] for r in parse_query_records(args.users, "User")]
324
+ if getattr(args, "queues", None):
325
+ queues = [(r.get("DeveloperName"), r.get("Name"))
326
+ for r in parse_query_records(args.queues, "Queue")]
327
+ return Directory(users, queues)
406
328
 
407
329
 
408
- def resolve_owner(session_id, instance_url, owner_value, owner_type):
330
+ def resolve_owner(directory, owner_value, owner_type):
409
331
  """Validate a user-supplied Default Case Owner against the org and return
410
332
  (resolved_value, resolved_type). Fails closed with an actionable message if
411
- the type is invalid or the value is not a real active user / queue.
412
-
413
- Never assumes the authenticated user — the caller must have supplied an
414
- explicit owner (the skill elicits it)."""
333
+ the type is invalid or the value is not a real active user / queue."""
415
334
  if owner_type not in VALID_OWNER_TYPES:
416
335
  fail(f"defaultCaseOwnerType '{owner_type}' is not valid. It must be "
417
336
  f"'User' or 'Queue'. Ask the user for a valid type and value.")
@@ -419,13 +338,12 @@ def resolve_owner(session_id, instance_url, owner_value, owner_type):
419
338
  fail(f"defaultCaseOwnerType is '{owner_type}' but no defaultCaseOwner "
420
339
  f"value was provided. Ask the user for the {owner_type} to use.")
421
340
  if owner_type == "User":
422
- resolved = query_active_user(session_id, instance_url, owner_value)
341
+ resolved = directory.active_user(owner_value)
423
342
  if not resolved:
424
343
  fail(f"Default Case Owner '{owner_value}' is not an active User in "
425
344
  f"this org. Ask the user for a valid username (or a Queue).")
426
345
  return resolved, "User"
427
- # Queue
428
- resolved = query_queue(session_id, instance_url, owner_value)
346
+ resolved = directory.queue(owner_value)
429
347
  if not resolved:
430
348
  fail(f"Default Case Owner '{owner_value}' is not a Queue in this org. "
431
349
  f"Ask the user for a valid queue DeveloperName (or a User).")
@@ -438,15 +356,15 @@ def _is_placeholder(value):
438
356
  and value.endswith("}"))
439
357
 
440
358
 
441
- def resolve_address_case_owner(session_id, instance_url, addr, label):
359
+ def resolve_address_case_owner(directory, addr, label):
442
360
  """Validate the OPTIONAL per-address Default Case Owner on one routing
443
361
  address, in place. Rules (applied only when the user opted in to a
444
362
  per-address owner, i.e. caseOwner is present):
445
363
  * caseOwner must not be an unfilled placeholder.
446
364
  * caseOwnerType is required whenever caseOwner is set (platform rejects
447
365
  caseOwner without it) and must be 'User' or 'Queue'.
448
- * The value is validated against the org — an active Username for User, a
449
- real Queue DeveloperName for Queue — and fails closed if it does not
366
+ * The value is validated against the org - an active Username for User, a
367
+ real Queue DeveloperName for Queue - and fails closed if it does not
450
368
  exist, so the skill can re-prompt.
451
369
  When caseOwner is absent the address is left untouched (cases fall to the
452
370
  org Default Case Owner / assignment rules)."""
@@ -470,34 +388,32 @@ def resolve_address_case_owner(session_id, instance_url, addr, label):
470
388
  # resolve_owner validates the type and the value against the org, failing
471
389
  # closed with an actionable message; reuse it so per-address and top-level
472
390
  # owner validation are identical.
473
- resolved, resolved_type = resolve_owner(
474
- session_id, instance_url, case_owner, case_owner_type)
391
+ resolved, resolved_type = resolve_owner(directory, case_owner,
392
+ case_owner_type)
475
393
  addr["caseOwner"] = resolved
476
394
  addr["caseOwnerType"] = resolved_type
477
395
 
478
396
 
479
- def resolve_automated_user(session_id, instance_url, automated_type,
480
- user_value, system_email):
397
+ def resolve_automated_user(directory, automated_type, user_value, system_email):
481
398
  """Validate the user-supplied Automated Case User and return a dict of the
482
- CaseSettings fields to write. 'System' → useSystemUserAsDefaultCaseUser
483
- (no defaultCaseUser). 'User' → a validated defaultCaseUser username.
399
+ CaseSettings fields to write. 'System' -> useSystemUserAsDefaultCaseUser
400
+ (no defaultCaseUser). 'User' -> a validated defaultCaseUser username.
484
401
  Fails closed with an actionable message on any invalid input."""
485
402
  if automated_type not in VALID_AUTOMATED_TYPES:
486
403
  fail(f"Automated Case User type '{automated_type}' is not valid. It "
487
404
  f"must be 'User' or 'System'. Ask the user for a valid type.")
488
405
  if automated_type == "System":
489
406
  # System needs no user value; systemUserEmail is required only if the
490
- # org's automated case user does not exist yet — we pass it through
407
+ # org's automated case user does not exist yet - we pass it through
491
408
  # when provided and let the platform validate.
492
409
  fields = {"useSystemUserAsDefaultCaseUser": True}
493
410
  if system_email:
494
411
  fields["systemUserEmail"] = system_email
495
412
  return fields, "System"
496
- # User
497
413
  if not user_value:
498
414
  fail("Automated Case User type is 'User' but no defaultCaseUser value "
499
415
  "was provided. Ask the user for the username to use.")
500
- resolved = query_active_user(session_id, instance_url, user_value)
416
+ resolved = directory.active_user(user_value)
501
417
  if not resolved:
502
418
  fail(f"Automated Case User '{user_value}' is not an active User in "
503
419
  f"this org. Ask the user for a valid username (or use System).")
@@ -505,126 +421,6 @@ def resolve_automated_user(session_id, instance_url, automated_type,
505
421
  "useSystemUserAsDefaultCaseUser": False}, "User"
506
422
 
507
423
 
508
- # ---------------------------------------------------------------------------
509
- # SOAP plumbing
510
- # ---------------------------------------------------------------------------
511
-
512
- def post_soap(url, envelope, soap_action):
513
- req = urllib.request.Request(
514
- url, data=envelope.encode("utf-8"), method="POST",
515
- headers={"Content-Type": "text/xml; charset=UTF-8",
516
- "SOAPAction": soap_action})
517
- try:
518
- with urllib.request.urlopen(req) as resp:
519
- body = resp.read()
520
- except urllib.error.HTTPError as e:
521
- body = e.read() # SOAP faults come back with a non-2xx status + body
522
- except urllib.error.URLError as e:
523
- fail(f"Could not reach {url}: {e}")
524
- return ET.fromstring(body)
525
-
526
-
527
- def find_fault(root):
528
- fault = root.find(f".//{{{SOAP_NS}}}Fault")
529
- if fault is None:
530
- return None
531
- fs = fault.find("faultstring")
532
- return fs.text if fs is not None else ET.tostring(fault, encoding="unicode")
533
-
534
-
535
- def envelope(session_id, body_inner):
536
- return (
537
- f'<?xml version="1.0" encoding="UTF-8"?>'
538
- f'<soapenv:Envelope xmlns:soapenv="{SOAP_NS}" xmlns:met="{META_NS}">'
539
- f'<soapenv:Header><met:SessionHeader>'
540
- f'<met:sessionId>{escape_xml(session_id)}</met:sessionId>'
541
- f'</met:SessionHeader></soapenv:Header>'
542
- f'<soapenv:Body>{body_inner}</soapenv:Body></soapenv:Envelope>'
543
- )
544
-
545
-
546
- def escape_xml(text):
547
- return (str(text).replace("&", "&amp;").replace("<", "&lt;")
548
- .replace(">", "&gt;").replace('"', "&quot;"))
549
-
550
-
551
- def read_case_settings(session_id, metadata_url):
552
- body = (f'<met:readMetadata><met:type>CaseSettings</met:type>'
553
- f'<met:fullNames>Case</met:fullNames></met:readMetadata>')
554
- root = post_soap(metadata_url, envelope(session_id, body), "readMetadata")
555
- fault = find_fault(root)
556
- if fault:
557
- fail(f"readMetadata failed: {fault}")
558
- records = root.find(f".//{qn('records')}")
559
- if records is None:
560
- fail("readMetadata returned no CaseSettings record.")
561
- return records
562
-
563
-
564
- def strip_readonly_address_fields(records):
565
- """Remove platform-managed read-only fields (emailServicesAddress,
566
- isVerified) from EVERY routingAddresses element under emailToCase, in place.
567
-
568
- This is defensive hygiene, NOT the multi-address preservation mechanism. A
569
- write should never declare platform-managed fields the org owns; stripping
570
- them keeps our payload clean and avoids relying on the platform to tolerate
571
- them.
572
-
573
- It is explicitly NOT what preserves existing addresses: these fields are
574
- irrelevant to preservation — existing addresses were dropped with the fields
575
- stripped AND survived with them kept as-read — the deciding factor is document
576
- ORDER, not these fields. See the ORDERING note in main()'s Phase B (new
577
- addresses must precede existing ones in the routingAddresses collection) for
578
- the actual preservation mechanism."""
579
- e2c = records.find(qn("emailToCase"))
580
- if e2c is None:
581
- return
582
- for addr in e2c.findall(qn("routingAddresses")):
583
- for field in READONLY_ADDRESS_FIELDS:
584
- el = addr.find(qn(field))
585
- if el is not None:
586
- addr.remove(el)
587
-
588
-
589
- def update_case_settings(session_id, metadata_url, records):
590
- metadata_el = ET.Element(qn("metadata"))
591
- metadata_el.set(f"{{{XSI_NS}}}type", "met:CaseSettings")
592
- # Defensive hygiene: don't declare platform-managed read-only address fields
593
- # (emailServicesAddress, isVerified) on a write. This is NOT what preserves
594
- # existing addresses — that is document ordering (see the Phase B ORDERING
595
- # note). See strip_readonly_address_fields.
596
- strip_readonly_address_fields(records)
597
- # Send ONLY the top-level fields this skill owns; drop every other top-level
598
- # child the read returned. This avoids the platform re-validating unrelated
599
- # Case config (Case Feed → Chatter, swarming, solutions, ...). Dropped fields
600
- # keep their current org value via field-level merge; provisioning is driven
601
- # by the emailToCase block, not by any top-level field. See
602
- # KEEP_TOP_LEVEL_FIELDS.
603
- for child in list(records):
604
- if local_name(child.tag) in KEEP_TOP_LEVEL_FIELDS:
605
- metadata_el.append(child)
606
- update_el = ET.Element(qn("updateMetadata"))
607
- update_el.append(metadata_el)
608
- ET.register_namespace("met", META_NS)
609
- ET.register_namespace("xsi", XSI_NS)
610
- body = ET.tostring(update_el, encoding="unicode")
611
- root = post_soap(metadata_url, envelope(session_id, body), "updateMetadata")
612
- fault = find_fault(root)
613
- if fault:
614
- fail(f"updateMetadata failed: {fault}")
615
- result = root.find(f".//{qn('result')}")
616
- success_el = result.find(qn("success")) if result is not None else None
617
- if success_el is None or success_el.text != "true":
618
- msgs = []
619
- if result is not None:
620
- for err in result.findall(qn("errors")):
621
- m = err.find(qn("message"))
622
- msgs.append(m.text if m is not None else
623
- ET.tostring(err, encoding="unicode"))
624
- fail("updateMetadata reported failure: " +
625
- ("; ".join(msgs) if msgs else "(no error detail returned)"))
626
-
627
-
628
424
  # ---------------------------------------------------------------------------
629
425
  # XML value helpers
630
426
  # ---------------------------------------------------------------------------
@@ -660,6 +456,10 @@ def set_child_text(parent, tag, text):
660
456
  return el
661
457
 
662
458
 
459
+ def _text(val):
460
+ return "true" if val is True else ("false" if val is False else str(val))
461
+
462
+
663
463
  def build_address_element(parent, addr_dict):
664
464
  """Append one <routingAddresses> element built from a dict."""
665
465
  ra = ET.SubElement(parent, qn("routingAddresses"))
@@ -667,14 +467,27 @@ def build_address_element(parent, addr_dict):
667
467
  if key in READONLY_ADDRESS_FIELDS:
668
468
  continue # never write platform-managed fields
669
469
  child = ET.SubElement(ra, qn(key))
670
- child.text = "true" if val is True else ("false" if val is False
671
- else str(val))
470
+ child.text = _text(val)
672
471
  return ra
673
472
 
674
473
 
675
- # ---------------------------------------------------------------------------
676
- # Parse the input CaseSettings artifact
677
- # ---------------------------------------------------------------------------
474
+ def strip_readonly_address_fields(records):
475
+ """Remove platform-managed read-only fields (emailServicesAddress,
476
+ isVerified) from EVERY routingAddresses element under emailToCase, in place.
477
+
478
+ This is defensive hygiene, NOT the multi-address preservation mechanism: a
479
+ write should never declare fields the org owns. Existing addresses were
480
+ dropped with these fields stripped AND survived with them kept - the deciding
481
+ factor is document ORDER (see phase-b: new addresses precede existing ones)."""
482
+ e2c = records.find(qn("emailToCase"))
483
+ if e2c is None:
484
+ return
485
+ for addr in e2c.findall(qn("routingAddresses")):
486
+ for field in READONLY_ADDRESS_FIELDS:
487
+ el = addr.find(qn(field))
488
+ if el is not None:
489
+ addr.remove(el)
490
+
678
491
 
679
492
  def parse_input(path):
680
493
  try:
@@ -687,29 +500,78 @@ def parse_input(path):
687
500
  return elem_to_value(root)
688
501
 
689
502
 
690
- # ---------------------------------------------------------------------------
691
- # Main flow
692
- # ---------------------------------------------------------------------------
693
-
694
503
  def existing_address_keys(records_value):
695
504
  """Return (routingNames, emailAddresses) already present, to avoid duplicates."""
696
- e2c = records_value.get("emailToCase") or {}
697
- addrs = e2c.get("routingAddresses")
698
- if addrs is None:
699
- return set(), set()
700
- if isinstance(addrs, dict):
701
- addrs = [addrs]
505
+ addrs = _address_list(records_value)
702
506
  names = {a.get("routingName") for a in addrs if a.get("routingName")}
703
507
  emails = {a.get("emailAddress") for a in addrs if a.get("emailAddress")}
704
508
  return names, emails
705
509
 
706
510
 
511
+ def _address_list(value):
512
+ addrs = (value.get("emailToCase") or {}).get("routingAddresses")
513
+ if addrs is None:
514
+ return []
515
+ return [addrs] if isinstance(addrs, dict) else list(addrs)
516
+
517
+
518
+ def _count_addresses(value):
519
+ return len(_address_list(value))
520
+
521
+
522
+ # Address types the platform rejects an emailAddress on ("emailAddress is not
523
+ # available for an Outlook routing address"). They also require a caseOwner.
524
+ NO_EMAIL_ADDRESS_TYPES = {"Outlook"}
525
+
526
+
527
+ def desired_addresses(desired, routing_emails):
528
+ """The input's routing addresses with the user-supplied emails substituted
529
+ positionally, skipping types that take no email. Fails closed on a count
530
+ mismatch so no placeholder from the input file ever reaches the org."""
531
+ addrs = (desired.get("emailToCase") or {}).get("routingAddresses")
532
+ if addrs and isinstance(addrs, dict):
533
+ addrs = [addrs]
534
+ addrs = addrs or []
535
+ for addr in addrs:
536
+ if addr.get("addressType") in NO_EMAIL_ADDRESS_TYPES and not addr.get("caseOwner"):
537
+ fail(f"{addr['addressType']} routing address "
538
+ f"'{addr.get('routingName')}' needs a caseOwner and "
539
+ f"caseOwnerType; the platform rejects it with 'Missing caseOwner'.")
540
+ takes_email = [a for a in addrs
541
+ if a.get("addressType") not in NO_EMAIL_ADDRESS_TYPES]
542
+ if takes_email and len(routing_emails) != len(takes_email):
543
+ fail(f"--input declares {len(takes_email)} routing address(es) that take "
544
+ f"an email (Outlook addresses take none) but {len(routing_emails)} "
545
+ f"--routing-email value(s) were given. Provide exactly one "
546
+ f"--routing-email per such address, in order.")
547
+ if not takes_email and routing_emails:
548
+ fail("--routing-email was given but no routing address takes an email.")
549
+ for addr, email in zip(takes_email, routing_emails):
550
+ addr["emailAddress"] = email
551
+ return addrs
552
+
553
+
554
+ def split_addresses(addrs, existing_names, existing_emails):
555
+ """Partition desired addresses into (new, already_existing) by routingName /
556
+ emailAddress against what the org already has."""
557
+ new, existing = [], []
558
+ for addr in addrs:
559
+ name, email = addr.get("routingName"), addr.get("emailAddress")
560
+ if name in existing_names or (email and email in existing_emails):
561
+ existing.append(addr)
562
+ else:
563
+ new.append(addr)
564
+ return new, existing
565
+
566
+
567
+ # ---------------------------------------------------------------------------
568
+ # Support Settings
569
+ # ---------------------------------------------------------------------------
570
+
707
571
  def support_settings_state(records_value):
708
572
  """Report whether Default Case Owner and Automated Case User are already
709
- configured in the org (from a readMetadata). The platform returns these
710
- fields null/absent when an admin has not set them, so null is a reliable
711
- "not configured" signal. Returns a dict with two booleans and the current
712
- values (for the summary)."""
573
+ configured in the org. The platform returns these fields null/absent when an
574
+ admin has not set them, so null is a reliable "not configured" signal."""
713
575
  owner = records_value.get("defaultCaseOwner")
714
576
  owner_type = records_value.get("defaultCaseOwnerType")
715
577
  auto_user = records_value.get("defaultCaseUser")
@@ -741,19 +603,15 @@ def _strip_unwritten_support_fields(records, applied):
741
603
  is omitted from the payload and preserved via field-level merge instead of
742
604
  resent verbatim.
743
605
 
744
- The five SUPPORT_SETTINGS_FIELDS are in KEEP_TOP_LEVEL_FIELDS so a field we
745
- DO set survives update_case_settings' strip. The side effect is that a field
746
- left as-read (preserved, not written) would otherwise be RESENT on the write,
747
- forcing the platform to re-validate a value nobody asked to touch — and a
748
- platform-derived `systemUserEmail` resent this way can collide with the
749
- routing address ("Enter an email address for the system user that's not an
750
- Email-to-Case routing email address"). Stripping the fields absent from
751
- `applied` applies the same omit-to-preserve pattern used for every other
752
- untouched top-level field.
753
-
754
- Scope: touches ONLY the five SUPPORT_SETTINGS_FIELDS. `emailToCase` (and its
755
- `routingAddresses`) is never a support field, so routing addresses are
756
- unaffected."""
606
+ The five SUPPORT_SETTINGS_FIELDS are in KEEP_TOP_LEVEL_FIELDS so a field we DO
607
+ set survives the strip. The side effect is that a field left as-read would
608
+ otherwise be RESENT, forcing the platform to re-validate a value nobody asked
609
+ to touch - and a platform-derived `systemUserEmail` resent this way can
610
+ collide with the routing address ("Enter an email address for the system user
611
+ that's not an Email-to-Case routing email address").
612
+
613
+ Scope: touches ONLY the five SUPPORT_SETTINGS_FIELDS; `emailToCase` and its
614
+ `routingAddresses` are unaffected."""
757
615
  for field in SUPPORT_SETTINGS_FIELDS:
758
616
  if field in applied:
759
617
  continue
@@ -762,39 +620,15 @@ def _strip_unwritten_support_fields(records, applied):
762
620
  records.remove(el)
763
621
 
764
622
 
765
- def apply_support_settings(records, args, desired, session_id, instance_url,
766
- auth_username, state, summary):
767
- """Set Default Case Owner and Automated Case User on `records` in Phase A.
623
+ def support_plan(args, desired, state):
624
+ """Decide, per field, whether Phase A writes Default Case Owner / Automated
625
+ Case User. Returns (write_owner, write_automated).
768
626
 
769
- Default Case Owner and Automated Case User are INDEPENDENT fields — an org
770
- can have one configured and the other not — so each is preserved or written
771
- on its own:
772
- * A field already configured in the org is PRESERVED (left untouched in
773
- `records`, so it keeps its value via field-level merge) unless
774
- --overwrite-support-settings is given AND the caller supplied new input
775
- for THAT field. The overwrite flag is scoped per field: overwriting one
776
- configured field never forces a rewrite of the other, unrelated field.
777
- A field the caller supplies for an already-configured setting is ignored
778
- (preserved) without that flag.
779
- * A field that is NOT configured must be supplied (via flags, the input
780
- file, or --use-authenticated-user); values are validated against the org
781
- and fail closed with an actionable message. Input is required ONLY for
782
- the field(s) actually being written.
783
- * The authenticated user is used ONLY with --use-authenticated-user, and
784
- only for the field(s) being written.
785
- * Never assume/guess an owner or automated user.
786
- """
787
- ss = {"ownerConfigured": state["ownerConfigured"],
788
- "automatedUserConfigured": state["automatedUserConfigured"],
789
- "current": state["current"]}
790
- summary["supportSettings"] = ss
791
-
792
- overwrite = args.overwrite_support_settings
793
- # Detect, per field, whether the caller actually supplied new input for it.
794
- # --overwrite-support-settings scopes to the field(s) the caller is changing;
795
- # it must never force a rewrite of an unrelated configured field the caller
796
- # did not touch. --use-authenticated-user supplies input for BOTH fields (it
797
- # sets the authenticated user as owner and automated user by design).
627
+ The two fields are INDEPENDENT - an org can have one configured and the other
628
+ not. A field is written when it is unset (input then required, fails closed),
629
+ or when the caller opted to overwrite AND supplied input for THAT field. The
630
+ overwrite flag is scoped per field: overwriting one configured field never
631
+ forces a rewrite of the other."""
798
632
  owner_input = bool(
799
633
  args.owner_type or args.owner_value
800
634
  or desired.get("defaultCaseOwner") or desired.get("defaultCaseOwnerType"))
@@ -802,17 +636,45 @@ def apply_support_settings(records, args, desired, session_id, instance_url,
802
636
  args.automated_type or args.automated_value or args.system_user_email
803
637
  or desired.get("defaultCaseUser") or desired.get("systemUserEmail")
804
638
  or desired.get("useSystemUserAsDefaultCaseUser") is True)
805
- if args.use_authenticated_user:
806
- owner_input = True
807
- automated_input = True
808
-
809
- # Decide per field: write it if it is unset (input then required, fails
810
- # closed), or if the caller opted to overwrite AND supplied input for THAT
811
- # field. A configured field the caller did not touch is preserved untouched,
812
- # even when --overwrite-support-settings is set for the other field.
813
- write_owner = (not state["ownerConfigured"]) or (overwrite and owner_input)
639
+ write_owner = ((not state["ownerConfigured"])
640
+ or (args.overwrite_support_settings and owner_input))
814
641
  write_automated = ((not state["automatedUserConfigured"])
815
- or (overwrite and automated_input))
642
+ or (args.overwrite_support_settings and automated_input))
643
+ return write_owner, write_automated
644
+
645
+
646
+ def owner_choice(args, desired):
647
+ return (args.owner_type or desired.get("defaultCaseOwnerType"),
648
+ args.owner_value or desired.get("defaultCaseOwner"))
649
+
650
+
651
+ def automated_choice(args, desired):
652
+ """(type, user value, system email) for the Automated Case User, inferring the
653
+ type from the input file when no flag gave it."""
654
+ automated_type = args.automated_type
655
+ value = args.automated_value or desired.get("defaultCaseUser")
656
+ system_email = args.system_user_email or desired.get("systemUserEmail")
657
+ if automated_type is None:
658
+ if desired.get("useSystemUserAsDefaultCaseUser") is True:
659
+ automated_type = "System"
660
+ elif desired.get("defaultCaseUser"):
661
+ automated_type = "User"
662
+ return automated_type, value, system_email
663
+
664
+
665
+ def apply_support_settings(records, args, desired, directory, state, summary):
666
+ """Set Default Case Owner and Automated Case User on `records` in Phase A.
667
+
668
+ A configured field is PRESERVED (omitted from the payload, so it keeps its
669
+ value via field-level merge) unless --overwrite-support-settings is given AND
670
+ new input was supplied for THAT field. A field that is NOT configured must be
671
+ supplied; values are validated against the org and fail closed. Never
672
+ assume/guess an owner or automated user."""
673
+ ss = {"ownerConfigured": state["ownerConfigured"],
674
+ "automatedUserConfigured": state["automatedUserConfigured"],
675
+ "current": state["current"]}
676
+ summary["supportSettings"] = ss
677
+ write_owner, write_automated = support_plan(args, desired, state)
816
678
 
817
679
  if not write_owner and not write_automated:
818
680
  ss["action"] = "preserved-existing"
@@ -822,38 +684,19 @@ def apply_support_settings(records, args, desired, session_id, instance_url,
822
684
  _strip_unwritten_support_fields(records, {})
823
685
  return
824
686
 
825
- # Resolve the authenticated user once if opted in; used only for fields
826
- # being written.
827
- auth_resolved = None
828
- if args.use_authenticated_user:
829
- auth_resolved = query_active_user(session_id, instance_url,
830
- auth_username)
831
- if not auth_resolved:
832
- fail(f"The authenticated user '{auth_username}' did not resolve as "
833
- f"an active user (unexpected).")
834
-
835
687
  applied = {}
836
688
 
837
689
  # ---- Default Case Owner ----
838
690
  if not write_owner:
839
691
  ss["ownerAction"] = "preserved"
840
- elif auth_resolved is not None:
841
- set_child_text(records, "defaultCaseOwner", auth_resolved)
842
- set_child_text(records, "defaultCaseOwnerType", "User")
843
- applied["defaultCaseOwner"] = auth_resolved
844
- applied["defaultCaseOwnerType"] = "User"
845
- ss["ownerAction"] = "set-from-authenticated-user"
846
692
  else:
847
- owner_type = args.owner_type or desired.get("defaultCaseOwnerType")
848
- owner_value = args.owner_value or desired.get("defaultCaseOwner")
693
+ owner_type, owner_value = owner_choice(args, desired)
849
694
  if not (owner_type or owner_value):
850
695
  fail("Default Case Owner is not configured in this org and none was "
851
696
  "provided. Ask the user for the Default Case Owner type (User "
852
- "or Queue) and value, then pass --owner-type/--owner-value (or "
853
- "--use-authenticated-user if the user asked to use the "
854
- "authenticated user).")
697
+ "or Queue) and value, then pass --owner-type/--owner-value.")
855
698
  resolved_owner, resolved_owner_type = resolve_owner(
856
- session_id, instance_url, owner_value, owner_type)
699
+ directory, owner_value, owner_type)
857
700
  set_child_text(records, "defaultCaseOwner", resolved_owner)
858
701
  set_child_text(records, "defaultCaseOwnerType", resolved_owner_type)
859
702
  applied["defaultCaseOwner"] = resolved_owner
@@ -864,51 +707,31 @@ def apply_support_settings(records, args, desired, session_id, instance_url,
864
707
  # ---- Automated Case User ----
865
708
  if not write_automated:
866
709
  ss["automatedUserAction"] = "preserved"
867
- elif auth_resolved is not None:
868
- _clear_automated_user_fields(records)
869
- set_child_text(records, "defaultCaseUser", auth_resolved)
870
- set_child_text(records, "useSystemUserAsDefaultCaseUser", "false")
871
- applied["defaultCaseUser"] = auth_resolved
872
- applied["useSystemUserAsDefaultCaseUser"] = False
873
- ss["automatedUserAction"] = "set-from-authenticated-user"
874
710
  else:
875
- automated_type = args.automated_type
876
- automated_value = args.automated_value or desired.get("defaultCaseUser")
877
- system_email = args.system_user_email or desired.get("systemUserEmail")
878
- # Infer automated type from the input file if not given via flag.
879
- if automated_type is None:
880
- if desired.get("useSystemUserAsDefaultCaseUser") is True:
881
- automated_type = "System"
882
- elif desired.get("defaultCaseUser"):
883
- automated_type = "User"
711
+ automated_type, automated_value, system_email = automated_choice(
712
+ args, desired)
884
713
  if automated_type is None:
885
714
  fail("Automated Case User is not configured in this org and none "
886
715
  "was provided. Ask the user whether it should be a specific "
887
716
  "User (and the username) or System, then pass --automated-type "
888
- "User --automated-value <username> or --automated-type System "
889
- "(or --use-authenticated-user).")
717
+ "User --automated-value <username> or --automated-type System.")
890
718
  auto_fields, auto_kind = resolve_automated_user(
891
- session_id, instance_url, automated_type, automated_value,
892
- system_email)
719
+ directory, automated_type, automated_value, system_email)
893
720
  _clear_automated_user_fields(records)
894
721
  for f, v in auto_fields.items():
895
- text = "true" if v is True else ("false" if v is False else str(v))
896
- set_child_text(records, f, text)
722
+ set_child_text(records, f, _text(v))
897
723
  applied[f] = v
898
724
  ss["automatedUserKind"] = auto_kind
899
725
  ss["automatedUserAction"] = (
900
726
  "overwrote-existing" if state["automatedUserConfigured"]
901
727
  else "set-from-input")
902
728
 
903
- # Roll the two per-field actions up into a single backward-compatible
904
- # `action` for the summary.
729
+ # Roll the two per-field actions up into a single `action` for the summary.
905
730
  actions = {ss.get("ownerAction"), ss.get("automatedUserAction")}
906
731
  if actions <= {"preserved"}:
907
732
  ss["action"] = "preserved-existing"
908
733
  elif "overwrote-existing" in actions:
909
734
  ss["action"] = "overwrote-existing"
910
- elif actions <= {"set-from-authenticated-user", "preserved"}:
911
- ss["action"] = "set-from-authenticated-user"
912
735
  else:
913
736
  ss["action"] = "set-from-input"
914
737
 
@@ -921,394 +744,509 @@ def apply_support_settings(records, args, desired, session_id, instance_url,
921
744
  _strip_unwritten_support_fields(records, applied)
922
745
 
923
746
 
924
- def enforce_production_gate(session_id, instance_url, confirm_production,
925
- summary):
926
- """Fail closed on a PRODUCTION org unless --confirm-production is passed.
747
+ def lookup_targets(args, desired, state, new_addrs):
748
+ """Usernames and Queue names the write will need checked against the org:
749
+ the Default Case Owner and Automated Case User being written, plus each NEW
750
+ address's optional per-address owner. Returns (usernames, queue_names)."""
751
+ users, queues = set(), set()
752
+
753
+ def add(kind, value):
754
+ if not value or _is_placeholder(value):
755
+ return
756
+ if kind == "User":
757
+ users.add(value)
758
+ elif kind == "Queue":
759
+ queues.add(value)
760
+
761
+ write_owner, write_automated = support_plan(args, desired, state)
762
+ if write_owner:
763
+ owner_type, owner_value = owner_choice(args, desired)
764
+ add(owner_type, owner_value)
765
+ if write_automated:
766
+ automated_type, automated_value, _ = automated_choice(args, desired)
767
+ if automated_type == "User":
768
+ add("User", automated_value)
769
+ for addr in new_addrs:
770
+ add(addr.get("caseOwnerType"), addr.get("caseOwner"))
771
+ return users, queues
772
+
773
+
774
+ # ---------------------------------------------------------------------------
775
+ # Production-org gate
776
+ # ---------------------------------------------------------------------------
777
+
778
+ def evaluate_gate(org_records, confirm_production):
779
+ """Decide whether the org may be mutated. Returns the orgInfo dict, or exits
780
+ non-zero.
927
781
 
928
782
  Email-to-Case is a permanent, org-wide change (enableEmailToCase cannot be
929
- turned back off), so before mutating a production org we require an explicit
930
- opt-in. Sandboxes, scratch orgs, and trials deploy without confirmation.
931
- Records what it found in `summary['org']` so the caller sees the verdict."""
932
- is_sandbox, org_type, is_trial = query_org_info(session_id, instance_url)
933
- # A production org is a non-sandbox, non-trial org. If we can't read the
934
- # Organization row (is_sandbox is None), treat it as production and require
935
- # confirmation — fail closed rather than silently mutating an unknown org.
783
+ turned back off), so a PRODUCTION org (non-sandbox, non-trial) needs explicit
784
+ confirmation. Sandboxes, scratch orgs, and trials proceed. If the Organization
785
+ row cannot be read the type is unknown, and a confirmation flag cannot vouch
786
+ for a type nobody verified - so refuse outright."""
787
+ if not org_records:
788
+ fail("Could not determine whether this is a production org (the "
789
+ "Organization row was not readable). Refusing to mutate an org "
790
+ "of unknown type. Re-authenticate and retry so the Organization "
791
+ "row is readable.")
792
+ row = org_records[0]
793
+ is_sandbox = row.get("IsSandbox")
794
+ org_type = row.get("OrganizationType")
795
+ is_trial = row.get("TrialExpirationDate") is not None
796
+ if is_sandbox is None:
797
+ fail("Could not determine whether this is a production org (the "
798
+ "Organization row was not readable). Refusing to mutate an org "
799
+ "of unknown type. Re-authenticate and retry so the Organization "
800
+ "row is readable.")
936
801
  is_production = (is_sandbox is False and not is_trial)
937
- unknown = is_sandbox is None
938
- summary["orgInfo"] = {"isSandbox": is_sandbox, "organizationType": org_type,
939
- "isTrial": is_trial, "isProduction": is_production}
940
- if (is_production or unknown) and not confirm_production:
802
+ info = {"isSandbox": is_sandbox, "organizationType": org_type,
803
+ "isTrial": is_trial, "isProduction": is_production}
804
+ if is_production and not confirm_production:
941
805
  detail = (f"organizationType={org_type}, isSandbox={is_sandbox}, "
942
806
  f"isTrial={is_trial}")
943
- if unknown:
944
- fail("Could not determine whether this is a production org (the "
945
- "Organization row was not readable). Refusing to mutate an "
946
- "org of unknown type. If you are certain this is safe, re-run "
947
- "with --confirm-production. "
948
- "Enabling Email-to-Case is a permanent org-wide change.")
949
807
  fail(f"Target org appears to be PRODUCTION ({detail}). Enabling "
950
808
  "Email-to-Case is a permanent, org-wide change. Confirm with the "
951
809
  "user that they want to configure Email-to-Case on this "
952
810
  "production org, then re-run with --confirm-production. Sandboxes "
953
811
  "and trials do not require this flag.")
812
+ return info
954
813
 
955
814
 
956
- def verify_cases(session_id, instance_url, supplied_email):
957
- """Prove inbound email created Cases: query Case (Origin='Email', optionally
958
- a SuppliedEmail, within the last 3 days) and the linked incoming
959
- EmailMessage rows. Prints a JSON evidence summary and exits non-zero when no
960
- matching Case (or no linked incoming email) is found — a deploy landing is
961
- not proof; a Case with its incoming EmailMessage is."""
962
- cases = query_email_cases(session_id, instance_url, supplied_email)
963
- case_ids = [c["Id"] for c in cases if c.get("Id")]
964
- messages = query_incoming_email_messages(session_id, instance_url, case_ids)
965
- parent_ids_with_msg = {m.get("ParentId") for m in messages}
966
- result = {
967
- "mode": "verify-cases",
968
- "org": instance_url,
969
- "filter": {"suppliedEmail": supplied_email, "window": "LAST_N_DAYS:3"},
970
- "caseCount": len(cases),
971
- "cases": [
972
- {"caseNumber": c.get("CaseNumber"), "id": c.get("Id"),
973
- "origin": c.get("Origin"), "suppliedEmail": c.get("SuppliedEmail"),
974
- "subject": c.get("Subject"), "status": c.get("Status"),
975
- "createdDate": c.get("CreatedDate"),
976
- "hasIncomingEmailMessage": c.get("Id") in parent_ids_with_msg}
977
- for c in cases],
978
- "incomingEmailMessageCount": len(messages),
979
- }
980
- # Proof requires at least one Email-origin Case that has a linked incoming
981
- # EmailMessage. A Case with no incoming message (or no Case at all) is not
982
- # proof that the round-trip worked.
983
- proven = any(c.get("Id") in parent_ids_with_msg for c in cases)
984
- result["proven"] = proven
985
- print(json.dumps(result, indent=2, sort_keys=True))
986
- if not proven:
987
- if not cases:
988
- fail("No Cases with Origin='Email' in the last 3 days matched"
989
- + (f" SuppliedEmail={supplied_email}" if supplied_email else "")
990
- + ". The inbound email may not have arrived yet, the routing "
991
- "address may not be verified, the test email may be older than "
992
- "the 3-day window, or the sender differs. "
993
- "Confirm the user actually sent the test email, wait a moment, "
994
- "and re-run --verify-cases.")
995
- fail("Found Email-origin Case(s) but none has a linked incoming "
996
- "EmailMessage (Incoming=true). The Case may have been created "
997
- "another way. Re-run once the inbound email has been processed.")
998
-
999
-
1000
- def main():
1001
- ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
1002
- ap.add_argument("--target-org", required=True,
1003
- help="sf CLI alias/username of the target org")
1004
- ap.add_argument("--input", default=None,
1005
- help="Path to the CaseSettings source file to apply. "
1006
- "Required for the write path; not needed for "
1007
- "--verify-cases (a read-only proof step).")
1008
- ap.add_argument("--routing-email", action="append", default=[],
1009
- metavar="EMAIL",
1010
- help="Customer-facing email for a routing address. Repeat "
1011
- "once per routing address, in the order they appear "
1012
- "in --input. Required if --input declares any "
1013
- "routing addresses.")
1014
- # --- Default Case Owner (User or Queue) ---
1015
- ap.add_argument("--owner-type", choices=sorted(VALID_OWNER_TYPES),
1016
- default=None,
1017
- help="Default Case Owner type: User or Queue. Required when "
1018
- "support settings are not yet configured (unless "
1019
- "--use-authenticated-user). Falls back to the input "
1020
- "file's defaultCaseOwnerType.")
1021
- ap.add_argument("--owner-value", default=None,
1022
- help="Default Case Owner value: an active Username (for "
1023
- "--owner-type User) or a Queue DeveloperName (for "
1024
- "Queue). Validated against the org; the script fails "
1025
- "if it is not a real active user / queue.")
1026
- # --- Automated Case User (User or System) ---
1027
- ap.add_argument("--automated-type", choices=sorted(VALID_AUTOMATED_TYPES),
1028
- default=None,
1029
- help="Automated Case User type: User or System. System "
1030
- "uses the org's automated process user (no value "
1031
- "needed). Required when support settings are not yet "
1032
- "configured (unless --use-authenticated-user).")
1033
- ap.add_argument("--automated-value", default=None,
1034
- help="Automated Case User username (for --automated-type "
1035
- "User). Not needed for System. Validated against the "
1036
- "org.")
1037
- ap.add_argument("--system-user-email", default=None,
1038
- help="Email for the automated process user, used with "
1039
- "--automated-type System when the org's automated "
1040
- "case user does not exist yet.")
1041
- # --- Explicit opt-ins ---
1042
- ap.add_argument("--use-authenticated-user", action="store_true",
1043
- help="Only when the user running the skill explicitly asks: "
1044
- "use the authenticated CLI user as both Default Case "
1045
- "Owner (User) and Automated Case User. Never assumed.")
1046
- ap.add_argument("--overwrite-support-settings", action="store_true",
1047
- help="Overwrite an already-configured Default Case Owner or "
1048
- "Automated Case User. Scoped per field: only the "
1049
- "field(s) you also supply new input for are rewritten; "
1050
- "a configured field you don't touch stays preserved. "
1051
- "Without this, existing support settings are preserved.")
1052
- ap.add_argument("--verify-only", action="store_true",
1053
- help="Read and print current settings without writing")
1054
- # --- Production-org safety gate ---
1055
- ap.add_argument("--confirm-production", action="store_true",
1056
- help="Confirm you intend to configure Email-to-Case on a "
1057
- "PRODUCTION org. Enabling Email-to-Case is permanent "
1058
- "and org-wide; without this flag the script refuses to "
1059
- "mutate a production org. Sandboxes and trials do not "
1060
- "need it.")
1061
- # --- Act 3: prove inbound email created Cases (read-only) ---
1062
- ap.add_argument("--verify-cases", action="store_true",
1063
- help="Read-only proof step: after the user has verified the "
1064
- "routing address and sent a test email, query the org "
1065
- "for Cases with Origin='Email' and their linked "
1066
- "incoming EmailMessage rows, and report the evidence. "
1067
- "Exits non-zero if no such Case is found.")
1068
- ap.add_argument("--supplied-email", default=None, metavar="EMAIL",
1069
- help="With --verify-cases: narrow the Case query to this "
1070
- "sender address (Case.SuppliedEmail), e.g. the mailbox "
1071
- "the user sent the test email from.")
1072
- ap.add_argument("--api-version", default=None,
1073
- metavar="X.Y",
1074
- help=f"Explicit Metadata API version override. When omitted, "
1075
- f"the version is derived from the org and floored at "
1076
- f"{DEFAULT_API_VERSION}. Set 68.0+ explicitly only to "
1077
- f"force a version (a botEmailDefinition binding needs "
1078
- f"v68.0+, but a v68+ org is picked up automatically).")
1079
- args = ap.parse_args()
1080
-
1081
- global API_VERSION, _API_VERSION_EXPLICIT
1082
- _API_VERSION_EXPLICIT = bool(args.api_version)
1083
- if _API_VERSION_EXPLICIT:
1084
- API_VERSION = args.api_version
1085
- # else: get_session derives it from the org, floored at DEFAULT_API_VERSION.
1086
-
1087
- # --verify-cases is a standalone read-only proof step; it needs a session but
1088
- # neither the input file nor a write. Handle it before parsing the input so
1089
- # it works even without a source file on hand.
1090
- if args.verify_cases:
1091
- session_id, _metadata_url, instance_url, _auth = get_session(
1092
- args.target_org)
1093
- verify_cases(session_id, instance_url, args.supplied_email)
1094
- return
1095
-
1096
- if not args.input:
1097
- fail("--input <CaseSettings source file> is required to apply or verify "
1098
- "settings. (It is only optional for the read-only --verify-cases "
1099
- "proof step.)")
815
+ # ---------------------------------------------------------------------------
816
+ # Subcommands
817
+ # ---------------------------------------------------------------------------
1100
818
 
819
+ def cmd_requests(args):
820
+ version = args.api_version
821
+ kind = args.kind
822
+ if kind == "settings":
823
+ emit({"requests": [settings_read_request(version)]})
824
+ elif kind == "org":
825
+ emit({"requests": [org_request(version)]})
826
+ elif kind == "lookups":
827
+ emit({"requests": lookup_requests(args, version)})
828
+ elif kind == "cases":
829
+ emit({"requests": [cases_request(version, args.supplied_email)]})
830
+ else: # messages
831
+ status, body = load_response(args.cases_response)
832
+ msgs = error_messages(status, body)
833
+ if msgs:
834
+ fail("Case query failed: " + "; ".join(msgs))
835
+ case_ids = [r["Id"] for r in body.get("records", []) if r.get("Id")]
836
+ emit({"requests": [messages_request(version, case_ids)] if case_ids
837
+ else []})
838
+
839
+
840
+ def lookup_requests(args, version):
841
+ if not args.input or not args.current:
842
+ fail("`requests lookups` needs --input and --current (the read of the "
843
+ "org's CaseSettings).")
1101
844
  desired = parse_input(args.input)
1102
- session_id, metadata_url, instance_url, auth_username = get_session(
1103
- args.target_org)
1104
-
1105
- if args.verify_only:
1106
- records = read_case_settings(session_id, metadata_url)
1107
- print(json.dumps(elem_to_value(records), indent=2, sort_keys=True))
1108
- return
1109
-
1110
- # Production-org safety gate: refuse to mutate a production org unless the
1111
- # operator confirmed. Runs only on the write path (after --verify-only /
1112
- # --verify-cases, which are read-only). summary is created below; capture the
1113
- # verdict into a temporary and fold it in.
1114
- _gate_summary = {}
1115
- enforce_production_gate(session_id, instance_url, args.confirm_production,
1116
- _gate_summary)
1117
-
845
+ current = elem_to_value(parse_settings_response(args.current))
846
+ state = support_settings_state(current)
847
+ addrs = desired_addresses(desired, args.routing_email)
848
+ names, emails = existing_address_keys(current)
849
+ new_addrs, _ = split_addresses(addrs, names, emails)
850
+ users, queues = lookup_targets(args, desired, state, new_addrs)
851
+ out = []
852
+ if users:
853
+ out.append(soql_request(
854
+ version, "SELECT Username FROM User WHERE IsActive = true AND "
855
+ f"Username IN ({_soql_list(users)})",
856
+ "validate users (pass the result as --users)"))
857
+ if queues:
858
+ lst = _soql_list(queues)
859
+ out.append(soql_request(
860
+ version, "SELECT DeveloperName, Name FROM Group WHERE "
861
+ f"Type = 'Queue' AND (DeveloperName IN ({lst}) OR "
862
+ f"Name IN ({lst}))",
863
+ "validate queues (pass the result as --queues)"))
864
+ return out
865
+
866
+
867
+ def cmd_gate(args):
868
+ records = parse_query_records(args.org, "Organization")
869
+ emit({"orgInfo": evaluate_gate(records, args.confirm_production)})
870
+
871
+
872
+ def cmd_read(args):
873
+ emit(elem_to_value(parse_settings_response(args.response)))
874
+
875
+
876
+ def cmd_phase_a(args):
877
+ desired = parse_input(args.input)
878
+ directory = load_directory(args)
879
+ records = parse_settings_response(args.current)
880
+ state = support_settings_state(elem_to_value(records))
881
+ desired_addresses(desired, args.routing_email) # validates the email count
882
+ version = args.api_version
1118
883
  desired_e2c = desired.get("emailToCase") or {}
1119
- desired_addrs = desired_e2c.get("routingAddresses")
1120
- if desired_addrs and isinstance(desired_addrs, dict):
1121
- desired_addrs = [desired_addrs]
1122
-
1123
- # Routing emails must be supplied explicitly, one per declared address,
1124
- # so no placeholder from the input file ever reaches the org.
1125
- if desired_addrs:
1126
- if len(args.routing_email) != len(desired_addrs):
1127
- fail(f"--input declares {len(desired_addrs)} routing address(es) "
1128
- f"but {len(args.routing_email)} --routing-email value(s) were "
1129
- f"given. Provide exactly one --routing-email per address, in "
1130
- f"order.")
1131
-
1132
- summary = {"org": instance_url, "phaseA": {}, "phaseB": [],
1133
- "supportSettings": {}}
1134
- summary["orgInfo"] = _gate_summary.get("orgInfo")
1135
- summary["apiVersion"] = API_VERSION
1136
-
1137
- # ---- Phase A: prerequisites + emailToCase toggles (NOT addresses) ----
1138
- # Read the current CaseSettings record, merge the desired toggles / Support
1139
- # Settings into it, and write it back. Writing the COMPLETE emailToCase block
1140
- # is what actually provisions the org's On-Demand Email-to-Case email-service
1141
- # infrastructure: a minimal field-level patch that just flips
1142
- # enableOnDemandEmailToCase true does NOT trigger provisioning, so the routing
1143
- # address in Phase B then has nothing to bind to ("We couldn't save your
1144
- # routing address... custom email services named EmailToCase").
1145
- #
1146
- # No Chatter prerequisite: update_case_settings sends ONLY the top-level
1147
- # fields this skill owns (KEEP_TOP_LEVEL_FIELDS) and strips the rest, so the
1148
- # platform never re-validates unrelated top-level Case config (e.g. Case Feed,
1149
- # whose re-validation would require Chatter). Stripped fields keep their
1150
- # current org value via field-level merge. We still read the record first so
1151
- # the emailToCase block we send carries the platform's existing children
1152
- # (needed for provisioning) alongside our toggles.
1153
- records = read_case_settings(session_id, metadata_url)
1154
- initial_value = elem_to_value(records)
1155
- state = support_settings_state(initial_value)
1156
- # Count the addresses the org had BEFORE we touched anything. The
1157
- # preservation guard baselines against this, not against the post-Phase-A
1158
- # read: Phase A rewrites the whole emailToCase block, so a read-only field
1159
- # surviving on a carried-over address would drop it THERE, and a guard that
1160
- # re-reads after Phase A would see the already-shrunken collection and pass.
1161
- initial_addr_count = _count_addresses(initial_value)
1162
-
1163
- # Support Settings (Default Case Owner + Automated Case User): preserve what
1164
- # the org already has unless the caller explicitly opts to overwrite. The
1165
- # platform returns these fields null when an admin has not set them, so a
1166
- # null read is a reliable "not configured" signal. Modifies `records` in place.
1167
- apply_support_settings(records, args, desired, session_id, instance_url,
1168
- auth_username, state, summary)
1169
-
1170
- # Merge any other top-level scalar toggle from the input (e.g.
1171
- # enableDraftEmails) into the record. Nested/list values are skipped here —
1172
- # only emailToCase (its own block) and the owner fields above are structured;
1173
- # everything else at the top level is a scalar toggle. (Fields not in
1174
- # KEEP_TOP_LEVEL_FIELDS are stripped at write time regardless.)
884
+ summary = {"phaseA": {}, "supportSettings": {}}
885
+
886
+ # Merge the desired toggles / Support Settings into the record read from the
887
+ # org and write it back. Writing the COMPLETE emailToCase block is what
888
+ # provisions the On-Demand email-service infrastructure; a field-level patch
889
+ # that just flips enableOnDemandEmailToCase does NOT, so Phase B would then
890
+ # fail with "We couldn't save your routing address... custom email services
891
+ # named EmailToCase". Only the fields this skill owns are sent
892
+ # (KEEP_TOP_LEVEL_FIELDS), so the platform never re-validates unrelated Case
893
+ # config such as Case Feed (which would require Chatter).
894
+ apply_support_settings(records, args, desired, directory, state, summary)
895
+
896
+ # Any other top-level scalar toggle from the input (e.g. enableDraftEmails).
897
+ # Nested/list values are skipped - only emailToCase (its own block) and the
898
+ # owner fields above are structured. (Fields outside KEEP_TOP_LEVEL_FIELDS
899
+ # are stripped at write time regardless.)
1175
900
  for key, val in desired.items():
1176
901
  if key in HANDLED_TOP_LEVEL or isinstance(val, (dict, list)):
1177
902
  continue
1178
- text = "true" if val is True else ("false" if val is False else str(val))
1179
- set_child_text(records, key, text)
903
+ set_child_text(records, key, _text(val))
1180
904
  summary["phaseA"][key] = val
1181
905
 
1182
- # Merge the emailToCase toggles (NOT routingAddresses) into the existing
1183
- # emailToCase block read from the org.
1184
906
  e2c_el = records.find(qn("emailToCase"))
1185
907
  if e2c_el is None:
1186
908
  e2c_el = ET.SubElement(records, qn("emailToCase"))
1187
909
  for key, val in desired_e2c.items():
1188
910
  if key == "routingAddresses":
1189
911
  continue # phase B
1190
- text = "true" if val is True else ("false" if val is False else str(val))
1191
- set_child_text(e2c_el, key, text)
912
+ set_child_text(e2c_el, key, _text(val))
1192
913
  summary["phaseA"][f"emailToCase.{key}"] = val
1193
914
 
1194
- update_case_settings(session_id, metadata_url, records)
1195
-
1196
- # ---- Phase B: routing addresses, one call after toggles are live ----
1197
- if desired_addrs:
1198
- # Substitute the user-supplied email into each address (positional). The
1199
- # OPTIONAL per-address Default Case Owner is validated later, only for
1200
- # addresses that are actually new (see the build loop) — validating a
1201
- # duplicate that is skipped as already_exists would waste an org round-trip.
1202
- for addr, email in zip(desired_addrs, args.routing_email):
1203
- addr["emailAddress"] = email
1204
- # Re-read the record (now that Phase A's toggles are live and the
1205
- # email-service infrastructure is provisioned) and add the new
1206
- # address(es) to the emailToCase block. update_case_settings again
1207
- # strips top-level fields we don't own, so only emailToCase (+ the fields
1208
- # we set) is written. The routingAddresses collection is REPLACED (not
1209
- # field-merged) on update, so the write must carry the existing addresses
1210
- # alongside the new ones.
1211
- #
1212
- # ORDERING IS LOAD-BEARING: when a
1213
- # newly-added routingAddresses element is placed AFTER the existing,
1214
- # already-provisioned ones, the platform DROPS an existing address. When
1215
- # the new address(es) come FIRST and the existing ones LAST, every
1216
- # address is preserved. This held across writes with the platform-managed
1217
- # read-only fields (emailServicesAddress/isVerified) stripped, kept, and
1218
- # kept — so ordering, not those fields, is the deciding factor. We
1219
- # therefore build the new addresses first, then re-append the existing
1220
- # ones after them.
1221
- records = read_case_settings(session_id, metadata_url)
1222
- existing_names, existing_emails = existing_address_keys(
1223
- elem_to_value(records))
1224
- e2c_el = records.find(qn("emailToCase"))
1225
- if e2c_el is None:
1226
- e2c_el = ET.SubElement(records, qn("emailToCase"))
1227
- # Detach the existing address elements so the new ones can be inserted
1228
- # ahead of them; they are re-appended (unchanged) afterwards.
1229
- existing_ra_elements = e2c_el.findall(qn("routingAddresses"))
1230
- for ra in existing_ra_elements:
1231
- e2c_el.remove(ra)
1232
- # Build the new addresses FIRST (skip any that already exist by
1233
- # name/email — those stay only as carried-over existing elements).
1234
- added = []
1235
- for i, addr in enumerate(desired_addrs, 1):
1236
- name = addr.get("routingName")
1237
- email = addr.get("emailAddress")
1238
- if name in existing_names or (email and email in existing_emails):
1239
- summary["phaseB"].append({"routingName": name,
1240
- "emailAddress": email,
1241
- "status": "already_exists"})
1242
- continue
1243
- # Validate the OPTIONAL per-address Default Case Owner against the org
1244
- # now that we know this address is genuinely new.
1245
- resolve_address_case_owner(session_id, instance_url, addr,
1246
- f"routingAddresses[{i}]")
1247
- build_address_element(e2c_el, addr)
1248
- added.append(addr)
1249
- summary["phaseB"].append({"routingName": name,
1250
- "emailAddress": email,
1251
- "status": "created"})
1252
- # Re-append the existing addresses AFTER the new ones (see ORDERING note).
1253
- for ra in existing_ra_elements:
1254
- e2c_el.append(ra)
1255
- if added:
1256
- update_case_settings(session_id, metadata_url, records)
1257
-
1258
- # ---- Verify ----
1259
- after = elem_to_value(read_case_settings(session_id, metadata_url))
915
+ emit({"request": settings_write_request(version, records,
916
+ "Phase A: toggles + Support Settings"),
917
+ "summary": summary})
918
+
919
+
920
+ PHASE_B_PREREQUISITES = ("enableEmailToCase", "enableOnDemandEmailToCase")
921
+
922
+
923
+ def require_phase_a_applied(current, desired, new_addrs):
924
+ """Fail if `--current` was read before Phase A's write landed.
925
+
926
+ Phase B writes back the whole record it is given, so a stale read would
927
+ silently revert Phase A's toggles, and a new address cannot bind without the
928
+ On-Demand email service. Only toggles the input asks to be on are checked, so
929
+ an org the user deliberately leaves off is not blocked here.
930
+ """
931
+ if not new_addrs:
932
+ return
933
+ wanted = desired.get("emailToCase") or {}
934
+ have = current.get("emailToCase") or {}
935
+ missing = [k for k in PHASE_B_PREREQUISITES
936
+ if wanted.get(k) is True and have.get(k) is not True]
937
+ if missing:
938
+ fail("--current does not show " + ", ".join(missing) + " enabled. "
939
+ "Phase B needs a fresh CaseSettings read taken AFTER the Phase A "
940
+ "write succeeded; re-read and re-run phase-b. No write was built.")
941
+
942
+
943
+ def cmd_phase_b(args):
944
+ desired = parse_input(args.input)
945
+ directory = load_directory(args)
946
+ records = parse_settings_response(args.current)
947
+ version = args.api_version
948
+ addrs = desired_addresses(desired, args.routing_email)
949
+ if not addrs:
950
+ emit({"skip": True, "reason": "the input declares no routing addresses",
951
+ "phaseB": []})
952
+ return
953
+ current = elem_to_value(records)
954
+ names, emails = existing_address_keys(current)
955
+ new_addrs, existing_addrs = split_addresses(addrs, names, emails)
956
+ require_phase_a_applied(current, desired, new_addrs)
957
+ phase_b = [{"routingName": a.get("routingName"),
958
+ "emailAddress": a.get("emailAddress"), "status": "already_exists"}
959
+ for a in existing_addrs]
960
+
961
+ # The routingAddresses collection is REPLACED (not field-merged) on write, so
962
+ # the payload must carry the existing addresses alongside the new ones.
963
+ #
964
+ # ORDERING IS LOAD-BEARING: when a newly-added routingAddresses element is
965
+ # placed AFTER the existing, already-provisioned ones, the platform can DROP
966
+ # an existing address. With the new address(es) FIRST and the existing ones
967
+ # LAST every address was preserved, with the platform-managed read-only
968
+ # fields stripped or kept alike - so ordering, not those fields, decides it.
969
+ # We therefore detach the existing elements, build the new ones, then
970
+ # re-append the existing ones after them. The `verify` guard backstops any
971
+ # residual drop.
972
+ e2c_el = records.find(qn("emailToCase"))
973
+ if e2c_el is None:
974
+ e2c_el = ET.SubElement(records, qn("emailToCase"))
975
+ existing_ra_elements = e2c_el.findall(qn("routingAddresses"))
976
+ for ra in existing_ra_elements:
977
+ e2c_el.remove(ra)
978
+ for i, addr in enumerate(new_addrs, 1):
979
+ # Validated only for addresses that are genuinely new - a duplicate that
980
+ # is skipped as already_exists needs no owner lookup.
981
+ resolve_address_case_owner(directory, addr, f"routingAddresses[{i}]")
982
+ build_address_element(e2c_el, addr)
983
+ phase_b.append({"routingName": addr.get("routingName"),
984
+ "emailAddress": addr.get("emailAddress"),
985
+ "status": "created"})
986
+ for ra in existing_ra_elements:
987
+ e2c_el.append(ra)
988
+
989
+ if not new_addrs:
990
+ emit({"skip": True, "reason": "every declared address already exists",
991
+ "phaseB": phase_b})
992
+ return
993
+ emit({"request": settings_write_request(version, records,
994
+ "Phase B: routing addresses"),
995
+ "phaseB": phase_b})
996
+
997
+
998
+ def cmd_check_write(args):
999
+ status, body = load_response(args.response)
1000
+ msgs = error_messages(status, body)
1001
+ results = body.get("results") if isinstance(body, dict) else None
1002
+ ok = (not msgs and results
1003
+ and all((r or {}).get("success") is True for r in results))
1004
+ if not ok:
1005
+ fail("The CaseSettings write failed: "
1006
+ + ("; ".join(msgs) if msgs else "(no success result returned)"))
1007
+ emit({"success": True})
1008
+
1009
+
1010
+ def cmd_verify(args):
1011
+ desired = parse_input(args.input)
1012
+ initial = elem_to_value(parse_settings_response(args.initial))
1013
+ after = elem_to_value(parse_settings_response(args.after))
1014
+ desired_e2c = desired.get("emailToCase") or {}
1260
1015
  after_e2c = after.get("emailToCase") or {}
1016
+ addrs = desired_addresses(desired, args.routing_email)
1017
+ names, emails = existing_address_keys(initial)
1018
+ new_addrs, existing_addrs = split_addresses(addrs, names, emails)
1019
+
1020
+ # Preservation guard (runtime safety net): every address the org had BEFORE
1021
+ # the run, plus every address we created, must still be present. A shortfall
1022
+ # means a write REPLACED the routingAddresses collection and dropped an
1023
+ # existing address. Baselined on the very first read so a drop in Phase A is
1024
+ # caught as well as one in Phase B.
1025
+ initial_count = _count_addresses(initial)
1026
+ expected = initial_count + len(new_addrs)
1027
+ actual = _count_addresses(after)
1028
+ if actual < expected:
1029
+ fail(f"Routing-address write did not preserve existing addresses: "
1030
+ f"expected at least {expected} ({initial_count} already in the org "
1031
+ f"+ {len(new_addrs)} newly created), but the org now has {actual}. "
1032
+ f"A write replaced the routingAddresses collection and dropped an "
1033
+ f"existing address. No further changes were made; re-run after "
1034
+ f"confirming with the skill maintainer.")
1035
+
1036
+ # The platform can answer a Support Settings write with success yet not
1037
+ # persist it (e.g. an Automated Case User it deems ineligible), so compare
1038
+ # what this run asked to write against what the org now holds.
1039
+ scratch = {"supportSettings": {}, "phaseA": {}}
1040
+ apply_support_settings(parse_settings_response(args.initial), args, desired,
1041
+ load_directory(args), support_settings_state(initial),
1042
+ scratch)
1043
+ not_applied = {
1044
+ field: {"requested": want, "orgValue": after.get(field)}
1045
+ for field, want in (scratch["supportSettings"].get("applied") or {}).items()
1046
+ if str(want).lower() != str(after.get(field)).lower()}
1047
+ if not_applied:
1048
+ fail("The org did not keep these Support Settings even though the write "
1049
+ f"reported success: {json.dumps(not_applied)}. The platform ignored "
1050
+ "them (an Automated Case User it does not accept is the usual "
1051
+ "cause). Ask the user for a different user, or leave the field alone.")
1261
1052
 
1262
- # Preservation guard (runtime safety net): every address the org had before
1263
- # this run, plus every address we newly created, must still be present. A
1264
- # shortfall means an updateMetadata call REPLACED the routingAddresses
1265
- # collection and dropped an existing address. Baseline against
1266
- # initial_addr_count — the count from the very first read, before Phase A
1267
- # touched the block — so this catches a drop in Phase A as well as Phase B.
1268
- # Phase B orders new addresses before existing ones to prevent the known
1269
- # ordering-driven drop; this guard backstops any residual/unknown drop.
1270
- created_count = sum(1 for entry in summary["phaseB"]
1271
- if entry.get("status") == "created")
1272
- expected_count = initial_addr_count + created_count
1273
- actual_count = _count_addresses(after)
1274
- if actual_count < expected_count:
1275
- fail(
1276
- f"Routing-address write did not preserve existing addresses: "
1277
- f"expected at least {expected_count} ({initial_addr_count} already "
1278
- f"in the org + {created_count} newly created), but the org now has "
1279
- f"{actual_count}. An updateMetadata call replaced the "
1280
- f"routingAddresses collection and dropped an existing address. No "
1281
- f"further changes were made; re-run after confirming with the skill "
1282
- f"maintainer.")
1283
1053
  verified = {
1284
1054
  "enableEmailToCase": after_e2c.get("enableEmailToCase"),
1285
1055
  "enableOnDemandEmailToCase": after_e2c.get("enableOnDemandEmailToCase"),
1286
- "routingAddressCount": _count_addresses(after),
1056
+ "routingAddressCount": actual,
1287
1057
  }
1288
- # Echo back every emailToCase toggle and top-level toggle the input set, so
1289
- # the caller can confirm each requested flag actually landed in the org.
1058
+ # Echo back every toggle the input set so the caller can confirm each
1059
+ # requested flag actually landed in the org.
1290
1060
  for key in desired_e2c:
1291
- if key == "routingAddresses":
1292
- continue
1293
- verified[f"emailToCase.{key}"] = after_e2c.get(key)
1061
+ if key != "routingAddresses":
1062
+ verified[f"emailToCase.{key}"] = after_e2c.get(key)
1294
1063
  for key, val in desired.items():
1295
- if key in HANDLED_TOP_LEVEL or isinstance(val, (dict, list)):
1296
- continue
1297
- verified[key] = after.get(key)
1298
- # Echo the support-settings values now in the org so the caller can confirm
1299
- # they were preserved (or set) as intended.
1064
+ if key not in HANDLED_TOP_LEVEL and not isinstance(val, (dict, list)):
1065
+ verified[key] = after.get(key)
1300
1066
  for field in SUPPORT_SETTINGS_FIELDS:
1301
1067
  verified[field] = after.get(field)
1302
- summary["verified"] = verified
1303
- print(json.dumps(summary, indent=2, sort_keys=True))
1068
+ emit({"verified": verified,
1069
+ "phaseB": ([{"routingName": a.get("routingName"),
1070
+ "emailAddress": a.get("emailAddress"),
1071
+ "status": "already_exists"} for a in existing_addrs]
1072
+ + [{"routingName": a.get("routingName"),
1073
+ "emailAddress": a.get("emailAddress"),
1074
+ "status": "created"} for a in new_addrs])})
1075
+
1076
+
1077
+ def cmd_cases(args):
1078
+ """Prove inbound email created Cases: an Email-origin Case from the last 3
1079
+ days with a linked incoming EmailMessage. A deploy landing is not proof; a
1080
+ Case with its incoming message is. Exits non-zero when there is none."""
1081
+ cases = parse_query_records(args.cases, "Case")
1082
+ messages = (parse_query_records(args.messages, "EmailMessage")
1083
+ if args.messages else [])
1084
+ parents = {m.get("ParentId") for m in messages}
1085
+ result = {
1086
+ "mode": "verify-cases",
1087
+ "filter": {"suppliedEmail": args.supplied_email,
1088
+ "window": "LAST_N_DAYS:3"},
1089
+ "caseCount": len(cases),
1090
+ "cases": [
1091
+ {"caseNumber": c.get("CaseNumber"), "id": c.get("Id"),
1092
+ "origin": c.get("Origin"), "suppliedEmail": c.get("SuppliedEmail"),
1093
+ "createdDate": c.get("CreatedDate"),
1094
+ "hasIncomingEmailMessage": c.get("Id") in parents}
1095
+ for c in cases],
1096
+ "incomingEmailMessageCount": len(messages),
1097
+ }
1098
+ result["proven"] = any(c.get("Id") in parents for c in cases)
1099
+ emit(result)
1100
+ if result["proven"]:
1101
+ return
1102
+ if not cases:
1103
+ fail("No Cases with Origin='Email' in the last 3 days matched"
1104
+ + (f" SuppliedEmail={args.supplied_email}"
1105
+ if args.supplied_email else "")
1106
+ + ". The inbound email may not have arrived yet, the routing "
1107
+ "address may not be verified, the test email may be older than "
1108
+ "the 3-day window, or the sender differs. Confirm the user "
1109
+ "actually sent the test email, wait a moment, and re-run.")
1110
+ fail("Found Email-origin Case(s) but none has a linked incoming "
1111
+ "EmailMessage (Incoming=true). The Case may have been created "
1112
+ "another way. Re-run once the inbound email has been processed.")
1304
1113
 
1305
1114
 
1306
- def _count_addresses(value):
1307
- e2c = value.get("emailToCase") or {}
1308
- addrs = e2c.get("routingAddresses")
1309
- if addrs is None:
1310
- return 0
1311
- return len(addrs) if isinstance(addrs, list) else 1
1115
+ # ---------------------------------------------------------------------------
1116
+ # CLI
1117
+ # ---------------------------------------------------------------------------
1118
+
1119
+ def add_input_flags(sp, *, support=False):
1120
+ sp.add_argument("--input", required=True,
1121
+ help="Path to the CaseSettings source file to apply.")
1122
+ sp.add_argument("--routing-email", action="append", default=[],
1123
+ metavar="EMAIL",
1124
+ help="Customer-facing email for a routing address. Repeat "
1125
+ "once per routing address, in the order they appear in "
1126
+ "--input. Required if --input declares any.")
1127
+ sp.add_argument("--api-version", default=None, metavar="X.Y",
1128
+ help="Pin the API version in request paths. Default: unversioned "
1129
+ "paths, so the server uses the org's own version.")
1130
+ if support:
1131
+ sp.add_argument("--owner-type", choices=sorted(VALID_OWNER_TYPES),
1132
+ default=None,
1133
+ help="Default Case Owner type. Required when Support "
1134
+ "Settings are not yet configured. Falls back to the "
1135
+ "input file's defaultCaseOwnerType.")
1136
+ sp.add_argument("--owner-value", default=None,
1137
+ help="Default Case Owner: an active Username (User) or a "
1138
+ "Queue DeveloperName (Queue).")
1139
+ sp.add_argument("--automated-type",
1140
+ choices=sorted(VALID_AUTOMATED_TYPES), default=None,
1141
+ help="Automated Case User type: User or System. System "
1142
+ "uses the org's automated process user.")
1143
+ sp.add_argument("--automated-value", default=None,
1144
+ help="Automated Case User username (for --automated-type "
1145
+ "User).")
1146
+ sp.add_argument("--system-user-email", default=None,
1147
+ help="Email for the automated process user, used with "
1148
+ "--automated-type System when it does not exist yet.")
1149
+ sp.add_argument("--overwrite-support-settings", action="store_true",
1150
+ help="Overwrite an already-configured Default Case Owner "
1151
+ "or Automated Case User. Scoped per field: only the "
1152
+ "field(s) you also supply new input for are "
1153
+ "rewritten. Without this, existing values are "
1154
+ "preserved.")
1155
+
1156
+
1157
+ def add_lookup_flags(sp):
1158
+ sp.add_argument("--users", default=None, metavar="FILE",
1159
+ help="Response of the user-validation query from "
1160
+ "`requests lookups`.")
1161
+ sp.add_argument("--queues", default=None, metavar="FILE",
1162
+ help="Response of the queue-validation query from "
1163
+ "`requests lookups`.")
1164
+
1165
+
1166
+ def build_parser():
1167
+ ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
1168
+ sub = ap.add_subparsers(dest="command", required=True)
1169
+
1170
+ sp = sub.add_parser("requests", help="Print the request(s) to dispatch.")
1171
+ sp.add_argument("kind", choices=["settings", "org", "lookups",
1172
+ "cases", "messages"])
1173
+ sp.add_argument("--api-version", default=None, metavar="X.Y")
1174
+ sp.add_argument("--input", default=None)
1175
+ sp.add_argument("--current", default=None, metavar="FILE",
1176
+ help="With `lookups`: the CaseSettings read response.")
1177
+ sp.add_argument("--routing-email", action="append", default=[],
1178
+ metavar="EMAIL")
1179
+ sp.add_argument("--owner-type", choices=sorted(VALID_OWNER_TYPES),
1180
+ default=None)
1181
+ sp.add_argument("--owner-value", default=None)
1182
+ sp.add_argument("--automated-type", choices=sorted(VALID_AUTOMATED_TYPES),
1183
+ default=None)
1184
+ sp.add_argument("--automated-value", default=None)
1185
+ sp.add_argument("--system-user-email", default=None)
1186
+ sp.add_argument("--overwrite-support-settings", action="store_true")
1187
+ sp.add_argument("--supplied-email", default=None, metavar="EMAIL",
1188
+ help="With `cases`: narrow to this sender (Case.SuppliedEmail).")
1189
+ sp.add_argument("--cases-response", default=None, metavar="FILE",
1190
+ help="With `messages`: the Case query response.")
1191
+ sp.set_defaults(func=cmd_requests)
1192
+
1193
+ sp = sub.add_parser("gate", help="Production-org safety verdict.")
1194
+ sp.add_argument("--org", required=True, metavar="FILE",
1195
+ help="Response of `requests org`.")
1196
+ sp.add_argument("--confirm-production", action="store_true",
1197
+ help="The user confirmed they intend to configure "
1198
+ "Email-to-Case on a PRODUCTION org. Never pass it "
1199
+ "unprompted; it does not override an unreadable "
1200
+ "Organization row.")
1201
+ sp.set_defaults(func=cmd_gate)
1202
+
1203
+ sp = sub.add_parser("read", help="Print the current CaseSettings.")
1204
+ sp.add_argument("--response", required=True, metavar="FILE")
1205
+ sp.set_defaults(func=cmd_read)
1206
+
1207
+ sp = sub.add_parser("phase-a", help="Build the Phase A write.")
1208
+ add_input_flags(sp, support=True)
1209
+ sp.add_argument("--current", required=True, metavar="FILE",
1210
+ help="The CaseSettings read response.")
1211
+ add_lookup_flags(sp)
1212
+ sp.set_defaults(func=cmd_phase_a)
1213
+
1214
+ sp = sub.add_parser("phase-b", help="Build the Phase B write.")
1215
+ # Phase B writes only routing addresses and ignores the Support Settings
1216
+ # flags. They are still accepted so the one flag set the workflow builds
1217
+ # works unchanged on phase-a, phase-b and verify.
1218
+ add_input_flags(sp, support=True)
1219
+ sp.add_argument("--current", required=True, metavar="FILE",
1220
+ help="A fresh CaseSettings read taken AFTER Phase A.")
1221
+ add_lookup_flags(sp)
1222
+ sp.set_defaults(func=cmd_phase_b)
1223
+
1224
+ sp = sub.add_parser("check-write", help="Validate a write response.")
1225
+ sp.add_argument("--response", required=True, metavar="FILE")
1226
+ sp.set_defaults(func=cmd_check_write)
1227
+
1228
+ sp = sub.add_parser("verify", help="Preservation guard + verified summary.")
1229
+ add_input_flags(sp, support=True)
1230
+ add_lookup_flags(sp)
1231
+ sp.add_argument("--initial", required=True, metavar="FILE",
1232
+ help="The CaseSettings read taken BEFORE Phase A.")
1233
+ sp.add_argument("--after", required=True, metavar="FILE",
1234
+ help="A CaseSettings read taken AFTER the last write.")
1235
+ sp.set_defaults(func=cmd_verify)
1236
+
1237
+ sp = sub.add_parser("cases", help="Prove inbound email created Cases.")
1238
+ sp.add_argument("--cases", required=True, metavar="FILE",
1239
+ help="Response of `requests cases`.")
1240
+ sp.add_argument("--messages", default=None, metavar="FILE",
1241
+ help="Response of `requests messages` (omit if no Cases).")
1242
+ sp.add_argument("--supplied-email", default=None, metavar="EMAIL")
1243
+ sp.set_defaults(func=cmd_cases)
1244
+ return ap
1245
+
1246
+
1247
+ def main(argv=None):
1248
+ args = build_parser().parse_args(argv)
1249
+ args.func(args)
1312
1250
 
1313
1251
 
1314
1252
  if __name__ == "__main__":