@epilot/sdk 2.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +294 -0
- package/dist/access-token-MYDOBCIY.cjs +89 -0
- package/dist/access-token-Y5JR7PRG.js +89 -0
- package/dist/access-token.d-C2qnueDV.d.cts +553 -0
- package/dist/access-token.d-C2qnueDV.d.ts +553 -0
- package/dist/address-3RQRG3MK.js +84 -0
- package/dist/address-LQUTDOUA.cjs +84 -0
- package/dist/address-suggestions-PEKSA7B2.cjs +132 -0
- package/dist/address-suggestions-QNK5JWNH.js +132 -0
- package/dist/address-suggestions.d-CewXYNYH.d.cts +340 -0
- package/dist/address-suggestions.d-CewXYNYH.d.ts +340 -0
- package/dist/address.d-DP_aE2ex.d.cts +438 -0
- package/dist/address.d-DP_aE2ex.d.ts +438 -0
- package/dist/ai-agents-MO4PK2RJ.cjs +215 -0
- package/dist/ai-agents-OHP2F243.js +215 -0
- package/dist/ai-agents.d-vG-1utqk.d.cts +1340 -0
- package/dist/ai-agents.d-vG-1utqk.d.ts +1340 -0
- package/dist/apis/access-token.cjs +33 -0
- package/dist/apis/access-token.d.cts +18 -0
- package/dist/apis/access-token.d.ts +18 -0
- package/dist/apis/access-token.js +33 -0
- package/dist/apis/address-suggestions.cjs +33 -0
- package/dist/apis/address-suggestions.d.cts +18 -0
- package/dist/apis/address-suggestions.d.ts +18 -0
- package/dist/apis/address-suggestions.js +33 -0
- package/dist/apis/address.cjs +33 -0
- package/dist/apis/address.d.cts +18 -0
- package/dist/apis/address.d.ts +18 -0
- package/dist/apis/address.js +33 -0
- package/dist/apis/ai-agents.cjs +33 -0
- package/dist/apis/ai-agents.d.cts +18 -0
- package/dist/apis/ai-agents.d.ts +18 -0
- package/dist/apis/ai-agents.js +33 -0
- package/dist/apis/app.cjs +33 -0
- package/dist/apis/app.d.cts +18 -0
- package/dist/apis/app.d.ts +18 -0
- package/dist/apis/app.js +33 -0
- package/dist/apis/audit-logs.cjs +33 -0
- package/dist/apis/audit-logs.d.cts +18 -0
- package/dist/apis/audit-logs.d.ts +18 -0
- package/dist/apis/audit-logs.js +33 -0
- package/dist/apis/automation.cjs +33 -0
- package/dist/apis/automation.d.cts +18 -0
- package/dist/apis/automation.d.ts +18 -0
- package/dist/apis/automation.js +33 -0
- package/dist/apis/billing.cjs +33 -0
- package/dist/apis/billing.d.cts +18 -0
- package/dist/apis/billing.d.ts +18 -0
- package/dist/apis/billing.js +33 -0
- package/dist/apis/blueprint-manifest.cjs +33 -0
- package/dist/apis/blueprint-manifest.d.cts +18 -0
- package/dist/apis/blueprint-manifest.d.ts +18 -0
- package/dist/apis/blueprint-manifest.js +33 -0
- package/dist/apis/consent.cjs +33 -0
- package/dist/apis/consent.d.cts +18 -0
- package/dist/apis/consent.d.ts +18 -0
- package/dist/apis/consent.js +33 -0
- package/dist/apis/customer-portal.cjs +33 -0
- package/dist/apis/customer-portal.d.cts +18 -0
- package/dist/apis/customer-portal.d.ts +18 -0
- package/dist/apis/customer-portal.js +33 -0
- package/dist/apis/data-management.cjs +33 -0
- package/dist/apis/data-management.d.cts +18 -0
- package/dist/apis/data-management.d.ts +18 -0
- package/dist/apis/data-management.js +33 -0
- package/dist/apis/deduplication.cjs +33 -0
- package/dist/apis/deduplication.d.cts +18 -0
- package/dist/apis/deduplication.d.ts +18 -0
- package/dist/apis/deduplication.js +33 -0
- package/dist/apis/design.cjs +33 -0
- package/dist/apis/design.d.cts +18 -0
- package/dist/apis/design.d.ts +18 -0
- package/dist/apis/design.js +33 -0
- package/dist/apis/discussion.cjs +33 -0
- package/dist/apis/discussion.d.cts +18 -0
- package/dist/apis/discussion.d.ts +18 -0
- package/dist/apis/discussion.js +33 -0
- package/dist/apis/document.cjs +33 -0
- package/dist/apis/document.d.cts +18 -0
- package/dist/apis/document.d.ts +18 -0
- package/dist/apis/document.js +33 -0
- package/dist/apis/email-settings.cjs +33 -0
- package/dist/apis/email-settings.d.cts +18 -0
- package/dist/apis/email-settings.d.ts +18 -0
- package/dist/apis/email-settings.js +33 -0
- package/dist/apis/email-template.cjs +33 -0
- package/dist/apis/email-template.d.cts +18 -0
- package/dist/apis/email-template.d.ts +18 -0
- package/dist/apis/email-template.js +33 -0
- package/dist/apis/entity-mapping.cjs +33 -0
- package/dist/apis/entity-mapping.d.cts +18 -0
- package/dist/apis/entity-mapping.d.ts +18 -0
- package/dist/apis/entity-mapping.js +33 -0
- package/dist/apis/entity.cjs +33 -0
- package/dist/apis/entity.d.cts +18 -0
- package/dist/apis/entity.d.ts +18 -0
- package/dist/apis/entity.js +33 -0
- package/dist/apis/environments.cjs +33 -0
- package/dist/apis/environments.d.cts +18 -0
- package/dist/apis/environments.d.ts +18 -0
- package/dist/apis/environments.js +33 -0
- package/dist/apis/erp-integration.cjs +33 -0
- package/dist/apis/erp-integration.d.cts +18 -0
- package/dist/apis/erp-integration.d.ts +18 -0
- package/dist/apis/erp-integration.js +33 -0
- package/dist/apis/event-catalog.cjs +33 -0
- package/dist/apis/event-catalog.d.cts +18 -0
- package/dist/apis/event-catalog.d.ts +18 -0
- package/dist/apis/event-catalog.js +33 -0
- package/dist/apis/file.cjs +33 -0
- package/dist/apis/file.d.cts +18 -0
- package/dist/apis/file.d.ts +18 -0
- package/dist/apis/file.js +33 -0
- package/dist/apis/iban.cjs +33 -0
- package/dist/apis/iban.d.cts +18 -0
- package/dist/apis/iban.d.ts +18 -0
- package/dist/apis/iban.js +33 -0
- package/dist/apis/journey.cjs +33 -0
- package/dist/apis/journey.d.cts +18 -0
- package/dist/apis/journey.d.ts +18 -0
- package/dist/apis/journey.js +33 -0
- package/dist/apis/kanban.cjs +33 -0
- package/dist/apis/kanban.d.cts +18 -0
- package/dist/apis/kanban.d.ts +18 -0
- package/dist/apis/kanban.js +33 -0
- package/dist/apis/message.cjs +33 -0
- package/dist/apis/message.d.cts +18 -0
- package/dist/apis/message.d.ts +18 -0
- package/dist/apis/message.js +33 -0
- package/dist/apis/metering.cjs +33 -0
- package/dist/apis/metering.d.cts +18 -0
- package/dist/apis/metering.d.ts +18 -0
- package/dist/apis/metering.js +33 -0
- package/dist/apis/notes.cjs +33 -0
- package/dist/apis/notes.d.cts +18 -0
- package/dist/apis/notes.d.ts +18 -0
- package/dist/apis/notes.js +33 -0
- package/dist/apis/notification.cjs +33 -0
- package/dist/apis/notification.d.cts +18 -0
- package/dist/apis/notification.d.ts +18 -0
- package/dist/apis/notification.js +33 -0
- package/dist/apis/organization.cjs +33 -0
- package/dist/apis/organization.d.cts +18 -0
- package/dist/apis/organization.d.ts +18 -0
- package/dist/apis/organization.js +33 -0
- package/dist/apis/partner-directory.cjs +33 -0
- package/dist/apis/partner-directory.d.cts +18 -0
- package/dist/apis/partner-directory.d.ts +18 -0
- package/dist/apis/partner-directory.js +33 -0
- package/dist/apis/permissions.cjs +33 -0
- package/dist/apis/permissions.d.cts +18 -0
- package/dist/apis/permissions.d.ts +18 -0
- package/dist/apis/permissions.js +33 -0
- package/dist/apis/pricing-tier.cjs +33 -0
- package/dist/apis/pricing-tier.d.cts +18 -0
- package/dist/apis/pricing-tier.d.ts +18 -0
- package/dist/apis/pricing-tier.js +33 -0
- package/dist/apis/pricing.cjs +33 -0
- package/dist/apis/pricing.d.cts +18 -0
- package/dist/apis/pricing.d.ts +18 -0
- package/dist/apis/pricing.js +33 -0
- package/dist/apis/purpose.cjs +33 -0
- package/dist/apis/purpose.d.cts +18 -0
- package/dist/apis/purpose.d.ts +18 -0
- package/dist/apis/purpose.js +33 -0
- package/dist/apis/sandbox.cjs +33 -0
- package/dist/apis/sandbox.d.cts +18 -0
- package/dist/apis/sandbox.d.ts +18 -0
- package/dist/apis/sandbox.js +33 -0
- package/dist/apis/submission.cjs +33 -0
- package/dist/apis/submission.d.cts +18 -0
- package/dist/apis/submission.d.ts +18 -0
- package/dist/apis/submission.js +33 -0
- package/dist/apis/targeting.cjs +33 -0
- package/dist/apis/targeting.d.cts +18 -0
- package/dist/apis/targeting.d.ts +18 -0
- package/dist/apis/targeting.js +33 -0
- package/dist/apis/template-variables.cjs +33 -0
- package/dist/apis/template-variables.d.cts +18 -0
- package/dist/apis/template-variables.d.ts +18 -0
- package/dist/apis/template-variables.js +33 -0
- package/dist/apis/user.cjs +33 -0
- package/dist/apis/user.d.cts +18 -0
- package/dist/apis/user.d.ts +18 -0
- package/dist/apis/user.js +33 -0
- package/dist/apis/validation-rules.cjs +33 -0
- package/dist/apis/validation-rules.d.cts +18 -0
- package/dist/apis/validation-rules.d.ts +18 -0
- package/dist/apis/validation-rules.js +33 -0
- package/dist/apis/webhooks.cjs +33 -0
- package/dist/apis/webhooks.d.cts +18 -0
- package/dist/apis/webhooks.d.ts +18 -0
- package/dist/apis/webhooks.js +33 -0
- package/dist/apis/workflow-definition.cjs +33 -0
- package/dist/apis/workflow-definition.d.cts +18 -0
- package/dist/apis/workflow-definition.d.ts +18 -0
- package/dist/apis/workflow-definition.js +33 -0
- package/dist/apis/workflow.cjs +33 -0
- package/dist/apis/workflow.d.cts +18 -0
- package/dist/apis/workflow.d.ts +18 -0
- package/dist/apis/workflow.js +33 -0
- package/dist/app-UUTBO3WJ.js +573 -0
- package/dist/app-XJGY6SHO.cjs +573 -0
- package/dist/app.d-Uncn387s.d.cts +3370 -0
- package/dist/app.d-Uncn387s.d.ts +3370 -0
- package/dist/audit-logs-4IJYIOXF.js +55 -0
- package/dist/audit-logs-UWLCPBB4.cjs +55 -0
- package/dist/audit-logs.d-BxZqONu5.d.cts +288 -0
- package/dist/audit-logs.d-BxZqONu5.d.ts +288 -0
- package/dist/automation-4UQADTDO.cjs +282 -0
- package/dist/automation-PVXTQLZX.js +282 -0
- package/dist/automation.d-BteCzeFn.d.cts +4921 -0
- package/dist/automation.d-BteCzeFn.d.ts +4921 -0
- package/dist/billing-FI4V4UX5.cjs +175 -0
- package/dist/billing-OMWNJHGW.js +175 -0
- package/dist/billing.d-BH4__05Y.d.cts +994 -0
- package/dist/billing.d-BH4__05Y.d.ts +994 -0
- package/dist/bin/cli.js +135 -0
- package/dist/blueprint-manifest-CPQAL76N.cjs +504 -0
- package/dist/blueprint-manifest-FIMGDHSH.js +504 -0
- package/dist/blueprint-manifest.d-CU4v09fj.d.cts +3327 -0
- package/dist/blueprint-manifest.d-CU4v09fj.d.ts +3327 -0
- package/dist/chunk-3RG5ZIWI.js +10 -0
- package/dist/chunk-OBGZSXTJ.cjs +10 -0
- package/dist/chunk-UJTFRZMS.js +65 -0
- package/dist/chunk-YLLKMXS3.cjs +65 -0
- package/dist/consent-NHDCDJMK.js +84 -0
- package/dist/consent-R5GU3WCK.cjs +84 -0
- package/dist/consent.d-BETWwU_2.d.cts +266 -0
- package/dist/consent.d-BETWwU_2.d.ts +266 -0
- package/dist/customer-portal-6AV2W43T.cjs +2252 -0
- package/dist/customer-portal-EY57GJYV.js +2252 -0
- package/dist/customer-portal.d-Co_I6psR.d.cts +15255 -0
- package/dist/customer-portal.d-Co_I6psR.d.ts +15255 -0
- package/dist/data-management-ILQUYNTN.cjs +240 -0
- package/dist/data-management-QMXOLOEG.js +240 -0
- package/dist/data-management.d-CkR2E_Pm.d.cts +548 -0
- package/dist/data-management.d-CkR2E_Pm.d.ts +548 -0
- package/dist/deduplication-IVXANO7S.cjs +42 -0
- package/dist/deduplication-WN45DVK3.js +42 -0
- package/dist/deduplication.d-BlHnjhXk.d.cts +114 -0
- package/dist/deduplication.d-BlHnjhXk.d.ts +114 -0
- package/dist/design-ONRLY6XI.cjs +219 -0
- package/dist/design-UHMRO3PG.js +219 -0
- package/dist/design.d-JsNY_cGh.d.cts +834 -0
- package/dist/design.d-JsNY_cGh.d.ts +834 -0
- package/dist/discussion-4CZIG3ZM.cjs +134 -0
- package/dist/discussion-VWMWL2AF.js +134 -0
- package/dist/discussion.d-CxxaYKTf.d.cts +580 -0
- package/dist/discussion.d-CxxaYKTf.d.ts +580 -0
- package/dist/document-CN3JNXFF.js +78 -0
- package/dist/document-PCKNZA4K.cjs +78 -0
- package/dist/document.d-CZ_FGhEn.d.cts +649 -0
- package/dist/document.d-CZ_FGhEn.d.ts +649 -0
- package/dist/email-settings-ANURQMKZ.js +533 -0
- package/dist/email-settings-YE2XB2ZU.cjs +533 -0
- package/dist/email-settings.d-3eXYEyRr.d.cts +2278 -0
- package/dist/email-settings.d-3eXYEyRr.d.ts +2278 -0
- package/dist/email-template-4QI4YS4J.js +122 -0
- package/dist/email-template-BUJBC6HH.cjs +122 -0
- package/dist/email-template.d-C2L0dKqB.d.cts +1175 -0
- package/dist/email-template.d-C2L0dKqB.d.ts +1175 -0
- package/dist/entity-BCFE3UJT.cjs +1600 -0
- package/dist/entity-VEXNQC4Y.js +1600 -0
- package/dist/entity-mapping-PHRLSYP7.cjs +215 -0
- package/dist/entity-mapping-QK7MGNAW.js +215 -0
- package/dist/entity-mapping.d-B3Vyepok.d.cts +1093 -0
- package/dist/entity-mapping.d-B3Vyepok.d.ts +1093 -0
- package/dist/entity.d-DmER_7q5.d.cts +16018 -0
- package/dist/entity.d-DmER_7q5.d.ts +16018 -0
- package/dist/environments-266S44UM.cjs +71 -0
- package/dist/environments-AV7W6SLT.js +71 -0
- package/dist/environments.d-CpILpSNF.d.cts +254 -0
- package/dist/environments.d-CpILpSNF.d.ts +254 -0
- package/dist/erp-integration-5WNBCGWS.cjs +586 -0
- package/dist/erp-integration-EMI5WIWA.js +586 -0
- package/dist/erp-integration.d-DmxUZOUQ.d.cts +4120 -0
- package/dist/erp-integration.d-DmxUZOUQ.d.ts +4120 -0
- package/dist/event-catalog-DBWYKQ6J.cjs +130 -0
- package/dist/event-catalog-KKMXV5LB.js +130 -0
- package/dist/event-catalog.d-B2tq20gn.d.cts +1512 -0
- package/dist/event-catalog.d-B2tq20gn.d.ts +1512 -0
- package/dist/file-3ZLMS6TL.js +573 -0
- package/dist/file-Q66N5XMG.cjs +573 -0
- package/dist/file.d-Bi0EZkNu.d.cts +2993 -0
- package/dist/file.d-Bi0EZkNu.d.ts +2993 -0
- package/dist/iban-HSXVSIFW.cjs +43 -0
- package/dist/iban-Q27INTOC.js +43 -0
- package/dist/iban.d-DP7hl0Qt.d.cts +71 -0
- package/dist/iban.d-DP7hl0Qt.d.ts +71 -0
- package/dist/index.cjs +563 -0
- package/dist/index.d.cts +119 -0
- package/dist/index.d.ts +119 -0
- package/dist/index.js +563 -0
- package/dist/journey-DGKXVWZQ.js +270 -0
- package/dist/journey-T2Y72EBS.cjs +270 -0
- package/dist/journey.d-DxL16X6N.d.cts +1794 -0
- package/dist/journey.d-DxL16X6N.d.ts +1794 -0
- package/dist/kanban-A4B6RCJ2.cjs +164 -0
- package/dist/kanban-PP6WJVT2.js +164 -0
- package/dist/kanban.d-DDrBwr9h.d.cts +631 -0
- package/dist/kanban.d-DDrBwr9h.d.ts +631 -0
- package/dist/message-D6JY4GJH.cjs +673 -0
- package/dist/message-HFX2DDCV.js +673 -0
- package/dist/message.d-BeBH6vof.d.cts +3580 -0
- package/dist/message.d-BeBH6vof.d.ts +3580 -0
- package/dist/metering-63MJFCS2.cjs +399 -0
- package/dist/metering-F63PNFCZ.js +399 -0
- package/dist/metering.d-D5VR4tVa.d.cts +1842 -0
- package/dist/metering.d-D5VR4tVa.d.ts +1842 -0
- package/dist/notes-FTL5H4JE.cjs +219 -0
- package/dist/notes-GMWTQCMB.js +219 -0
- package/dist/notes.d-DZYeVo0I.d.cts +1047 -0
- package/dist/notes.d-DZYeVo0I.d.ts +1047 -0
- package/dist/notification-WXFSOORN.cjs +237 -0
- package/dist/notification-XHG3TIBW.js +237 -0
- package/dist/notification.d-BJwdFZnG.d.cts +1148 -0
- package/dist/notification.d-BJwdFZnG.d.ts +1148 -0
- package/dist/organization-CPXTUDJO.js +118 -0
- package/dist/organization-XIFV7MWP.cjs +118 -0
- package/dist/organization.d-DfUcuwKM.d.cts +629 -0
- package/dist/organization.d-DfUcuwKM.d.ts +629 -0
- package/dist/partner-directory-4WCHPJRO.js +282 -0
- package/dist/partner-directory-FKWPPO7F.cjs +282 -0
- package/dist/partner-directory.d-BRRDHFcz.d.cts +1511 -0
- package/dist/partner-directory.d-BRRDHFcz.d.ts +1511 -0
- package/dist/permissions-5E36GPG3.js +178 -0
- package/dist/permissions-PBTK5CCD.cjs +178 -0
- package/dist/permissions.d-CL7SwMFy.d.cts +1253 -0
- package/dist/permissions.d-CL7SwMFy.d.ts +1253 -0
- package/dist/pricing-FDWEBIQU.js +439 -0
- package/dist/pricing-FZQKL4DW.cjs +439 -0
- package/dist/pricing-tier-34O624R4.js +36 -0
- package/dist/pricing-tier-F4HE6WIM.cjs +36 -0
- package/dist/pricing-tier.d-VuH-NtlR.d.cts +82 -0
- package/dist/pricing-tier.d-VuH-NtlR.d.ts +82 -0
- package/dist/pricing.d-Dd1CaSX_.d.cts +12201 -0
- package/dist/pricing.d-Dd1CaSX_.d.ts +12201 -0
- package/dist/purpose-47HJIG2Q.cjs +180 -0
- package/dist/purpose-MX33NU5H.js +180 -0
- package/dist/purpose.d-D8YCSqt9.d.cts +373 -0
- package/dist/purpose.d-D8YCSqt9.d.ts +373 -0
- package/dist/sandbox-7QNLGFN2.cjs +100 -0
- package/dist/sandbox-TZCXHBJN.js +100 -0
- package/dist/sandbox.d-D1NgPMEc.d.cts +466 -0
- package/dist/sandbox.d-D1NgPMEc.d.ts +466 -0
- package/dist/submission-6LSPBI27.js +55 -0
- package/dist/submission-DBQNDJ4B.cjs +55 -0
- package/dist/submission.d-e9MPrbY1.d.cts +470 -0
- package/dist/submission.d-e9MPrbY1.d.ts +470 -0
- package/dist/targeting-HZRCLNIF.cjs +275 -0
- package/dist/targeting-MTQ6JBCY.js +275 -0
- package/dist/targeting.d-1GW3nh-y.d.cts +2058 -0
- package/dist/targeting.d-1GW3nh-y.d.ts +2058 -0
- package/dist/template-variables-S6IXK7SF.js +159 -0
- package/dist/template-variables-VPNIMC7L.cjs +159 -0
- package/dist/template-variables.d-CqqGe3sd.d.cts +1315 -0
- package/dist/template-variables.d-CqqGe3sd.d.ts +1315 -0
- package/dist/types-C5cGIwtq.d.cts +28 -0
- package/dist/types-C5cGIwtq.d.ts +28 -0
- package/dist/user-BHH4DAA5.cjs +488 -0
- package/dist/user-KBXFVRPI.js +488 -0
- package/dist/user.d-CWBgUia2.d.cts +2199 -0
- package/dist/user.d-CWBgUia2.d.ts +2199 -0
- package/dist/validation-rules-4V7KAWGW.cjs +120 -0
- package/dist/validation-rules-UGQY4ASY.js +120 -0
- package/dist/validation-rules.d-CMSvveua.d.cts +808 -0
- package/dist/validation-rules.d-CMSvveua.d.ts +808 -0
- package/dist/webhooks-JR475VD4.js +252 -0
- package/dist/webhooks-X64U3KCB.cjs +252 -0
- package/dist/webhooks.d-Bzl-u_Zs.d.cts +1201 -0
- package/dist/webhooks.d-Bzl-u_Zs.d.ts +1201 -0
- package/dist/workflow-7ANPQZDP.cjs +402 -0
- package/dist/workflow-DWSAHA5Q.js +402 -0
- package/dist/workflow-definition-2M3JBCUI.cjs +342 -0
- package/dist/workflow-definition-WLPGEU55.js +342 -0
- package/dist/workflow-definition.d-BKmIy2Qp.d.cts +2030 -0
- package/dist/workflow-definition.d-BKmIy2Qp.d.ts +2030 -0
- package/dist/workflow.d-DElz0XoQ.d.cts +3017 -0
- package/dist/workflow.d-DElz0XoQ.d.ts +3017 -0
- package/package.json +289 -0
|
@@ -0,0 +1,1512 @@
|
|
|
1
|
+
import { OpenAPIClient, Parameters, UnknownParamsObject, AxiosRequestConfig, OperationResponse } from 'openapi-client-axios';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* Auto-copied from event-catalog-client */
|
|
5
|
+
/* eslint-disable */
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
declare namespace Components {
|
|
10
|
+
namespace Schemas {
|
|
11
|
+
/**
|
|
12
|
+
* Common metadata fields present in all event payloads
|
|
13
|
+
* example:
|
|
14
|
+
* {
|
|
15
|
+
* "_org_id": {
|
|
16
|
+
* "type": "string",
|
|
17
|
+
* "description": "epilot tenant/organization ID"
|
|
18
|
+
* },
|
|
19
|
+
* "_event_time": {
|
|
20
|
+
* "type": "string",
|
|
21
|
+
* "format": "date-time",
|
|
22
|
+
* "description": "ISO 8601 timestamp when event occurred"
|
|
23
|
+
* },
|
|
24
|
+
* "_event_id": {
|
|
25
|
+
* "type": "string",
|
|
26
|
+
* "description": "Unique event identifier (ULID)"
|
|
27
|
+
* },
|
|
28
|
+
* "_event_name": {
|
|
29
|
+
* "type": "string",
|
|
30
|
+
* "description": "Event name from catalog"
|
|
31
|
+
* },
|
|
32
|
+
* "_event_version": {
|
|
33
|
+
* "type": "string",
|
|
34
|
+
* "description": "Schema version number"
|
|
35
|
+
* },
|
|
36
|
+
* "_event_source": {
|
|
37
|
+
* "type": "string",
|
|
38
|
+
* "description": "Source that triggered the event"
|
|
39
|
+
* },
|
|
40
|
+
* "_ack_id": {
|
|
41
|
+
* "type": "string",
|
|
42
|
+
* "description": "Unique acknowledgment tracking ID for the event"
|
|
43
|
+
* }
|
|
44
|
+
* }
|
|
45
|
+
*/
|
|
46
|
+
export interface CommonEventMetadata {
|
|
47
|
+
}
|
|
48
|
+
export interface ContextEntity {
|
|
49
|
+
/**
|
|
50
|
+
* Schema slug of the context entity
|
|
51
|
+
* example:
|
|
52
|
+
* meter
|
|
53
|
+
*/
|
|
54
|
+
entity_schema: string;
|
|
55
|
+
/**
|
|
56
|
+
* Whether this field is required in the event payload
|
|
57
|
+
*/
|
|
58
|
+
required?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Configuration for triggering an event based on entity operations.
|
|
62
|
+
*
|
|
63
|
+
* When an entity operation matches the configured criteria, the event will be triggered.
|
|
64
|
+
* - On createEntity: the attribute must be present in the entity payload
|
|
65
|
+
* - On updateEntity: the attribute must be in diff.added, diff.updated, or diff.deleted
|
|
66
|
+
* - On deleteEntity: the event triggers when the entity is deleted (attributes not checked)
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
export interface EntityOperationTrigger {
|
|
70
|
+
/**
|
|
71
|
+
* List of entity operations that can trigger this event
|
|
72
|
+
* example:
|
|
73
|
+
* [
|
|
74
|
+
* "createEntity",
|
|
75
|
+
* "updateEntity"
|
|
76
|
+
* ]
|
|
77
|
+
*/
|
|
78
|
+
operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
|
|
79
|
+
/**
|
|
80
|
+
* List of entity schema slugs that can trigger this event
|
|
81
|
+
* example:
|
|
82
|
+
* [
|
|
83
|
+
* "contact",
|
|
84
|
+
* "contract",
|
|
85
|
+
* "order"
|
|
86
|
+
* ]
|
|
87
|
+
*/
|
|
88
|
+
schema: string[];
|
|
89
|
+
/**
|
|
90
|
+
* Optional list of entity attributes to track for changes.
|
|
91
|
+
* If specified, the event only triggers when these attributes are affected.
|
|
92
|
+
* - On createEntity: attribute must be defined in the entity payload
|
|
93
|
+
* - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
|
|
94
|
+
* If not specified, all changes to matching entities will trigger the event.
|
|
95
|
+
*
|
|
96
|
+
* example:
|
|
97
|
+
* [
|
|
98
|
+
* "email",
|
|
99
|
+
* "phone",
|
|
100
|
+
* "status"
|
|
101
|
+
* ]
|
|
102
|
+
*/
|
|
103
|
+
attribute?: string[];
|
|
104
|
+
/**
|
|
105
|
+
* Optional list of purpose names to filter by.
|
|
106
|
+
* The entity must have at least one matching purpose in its _purpose array.
|
|
107
|
+
* Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
|
|
108
|
+
* If not specified, the event triggers regardless of entity purpose.
|
|
109
|
+
*
|
|
110
|
+
* example:
|
|
111
|
+
* [
|
|
112
|
+
* "Kündigung",
|
|
113
|
+
* "Umzug/Auszug"
|
|
114
|
+
* ]
|
|
115
|
+
*/
|
|
116
|
+
purpose?: string[];
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* An event instance in the event history
|
|
120
|
+
* example:
|
|
121
|
+
* {
|
|
122
|
+
* "_org_id": "org_123456",
|
|
123
|
+
* "_event_time": "2024-01-01T12:00:00Z",
|
|
124
|
+
* "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
|
|
125
|
+
* "_event_name": "MeterReading",
|
|
126
|
+
* "_event_version": "1.0.0",
|
|
127
|
+
* "_event_source": "api",
|
|
128
|
+
* "_trigger_source_type": "api",
|
|
129
|
+
* "_trigger_source": "user_123456",
|
|
130
|
+
* "reading_value": 123.45,
|
|
131
|
+
* "reading_date": "2024-01-01T11:59:00Z",
|
|
132
|
+
* "read_by": "John Doe",
|
|
133
|
+
* "reason": "regular",
|
|
134
|
+
* "direction": "feed-out",
|
|
135
|
+
* "source": "portal",
|
|
136
|
+
* "meter_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
137
|
+
* "counter_id": "660e8400-e29b-41d4-a716-446655440000",
|
|
138
|
+
* "meter_number": "MT123456789",
|
|
139
|
+
* "obis_number": "1-0:1.8.0",
|
|
140
|
+
* "unit": "kWh",
|
|
141
|
+
* "customer_id": "770e8400-e29b-41d4-a716-446655440000",
|
|
142
|
+
* "contract_id": "880e8400-e29b-41d4-a716-446655440000"
|
|
143
|
+
* }
|
|
144
|
+
*/
|
|
145
|
+
export interface Event {
|
|
146
|
+
[name: string]: any;
|
|
147
|
+
/**
|
|
148
|
+
* epilot tenant/organization ID
|
|
149
|
+
*/
|
|
150
|
+
_org_id: string;
|
|
151
|
+
/**
|
|
152
|
+
* ISO 8601 timestamp when event occurred
|
|
153
|
+
*/
|
|
154
|
+
_event_time: string; // date-time
|
|
155
|
+
/**
|
|
156
|
+
* Unique event identifier (ULID)
|
|
157
|
+
*/
|
|
158
|
+
_event_id: string;
|
|
159
|
+
/**
|
|
160
|
+
* Event name from catalog
|
|
161
|
+
*/
|
|
162
|
+
_event_name: string;
|
|
163
|
+
/**
|
|
164
|
+
* Event version (semver)
|
|
165
|
+
* example:
|
|
166
|
+
* 1.0.0
|
|
167
|
+
*/
|
|
168
|
+
_event_version: string;
|
|
169
|
+
/**
|
|
170
|
+
* Source that triggered the event
|
|
171
|
+
*/
|
|
172
|
+
_event_source: string;
|
|
173
|
+
/**
|
|
174
|
+
* The type of system that triggered the event.
|
|
175
|
+
* Common values: api, automation, operation, portal_user
|
|
176
|
+
*
|
|
177
|
+
* example:
|
|
178
|
+
* api
|
|
179
|
+
*/
|
|
180
|
+
_trigger_source_type?: string;
|
|
181
|
+
/**
|
|
182
|
+
* Identifier of the specific trigger source.
|
|
183
|
+
* - For api: User ID or API key identifier
|
|
184
|
+
* - For automation: Automation execution ID
|
|
185
|
+
* - For operation: Activity ID from the entity operation
|
|
186
|
+
* - For portal_user: Portal user email
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
_trigger_source?: string;
|
|
190
|
+
/**
|
|
191
|
+
* Unique acknowledgment tracking ID for the event.
|
|
192
|
+
* Used to track event delivery and processing status.
|
|
193
|
+
*
|
|
194
|
+
*/
|
|
195
|
+
_ack_id?: string;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Event configuration with required fields
|
|
199
|
+
*/
|
|
200
|
+
export interface EventConfig {
|
|
201
|
+
/**
|
|
202
|
+
* Unique human readable name of the event
|
|
203
|
+
* example:
|
|
204
|
+
* AddMeterReading
|
|
205
|
+
*/
|
|
206
|
+
event_name: string;
|
|
207
|
+
/**
|
|
208
|
+
* Human-friendly title for the event
|
|
209
|
+
* example:
|
|
210
|
+
* Add Meter Reading
|
|
211
|
+
*/
|
|
212
|
+
event_title?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Description of when the event is triggered
|
|
215
|
+
* example:
|
|
216
|
+
* Triggered when a new meter reading is added
|
|
217
|
+
*/
|
|
218
|
+
event_description?: string;
|
|
219
|
+
/**
|
|
220
|
+
* Event version (semver)
|
|
221
|
+
* example:
|
|
222
|
+
* 1.0.0
|
|
223
|
+
*/
|
|
224
|
+
event_version: string;
|
|
225
|
+
/**
|
|
226
|
+
* Status of the event
|
|
227
|
+
* example:
|
|
228
|
+
* active
|
|
229
|
+
*/
|
|
230
|
+
event_status?: "active" | "deprecated" | "draft" | "disabled";
|
|
231
|
+
/**
|
|
232
|
+
* Tags associated with the event for categorization and filtering
|
|
233
|
+
*
|
|
234
|
+
* The "builtin" tag indicates events that are built into the epilot system.
|
|
235
|
+
*
|
|
236
|
+
* example:
|
|
237
|
+
* [
|
|
238
|
+
* "builtin",
|
|
239
|
+
* "metering",
|
|
240
|
+
* "erp"
|
|
241
|
+
* ]
|
|
242
|
+
*/
|
|
243
|
+
event_tags?: string[];
|
|
244
|
+
/**
|
|
245
|
+
* Fields that define the event schema
|
|
246
|
+
*/
|
|
247
|
+
schema_fields: {
|
|
248
|
+
[name: string]: SchemaField;
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Optional entity graph definition for resolving related entities
|
|
252
|
+
*/
|
|
253
|
+
entity_graph?: {
|
|
254
|
+
/**
|
|
255
|
+
* List of node definitions in the graph
|
|
256
|
+
*/
|
|
257
|
+
nodes: /* A node in the entity graph */ GraphNode[];
|
|
258
|
+
/**
|
|
259
|
+
* List of edge definitions connecting nodes
|
|
260
|
+
*/
|
|
261
|
+
edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Optional configuration for triggering this event based on entity operations
|
|
265
|
+
*/
|
|
266
|
+
entity_operation?: {
|
|
267
|
+
/**
|
|
268
|
+
* List of entity operations that can trigger this event
|
|
269
|
+
* example:
|
|
270
|
+
* [
|
|
271
|
+
* "createEntity",
|
|
272
|
+
* "updateEntity"
|
|
273
|
+
* ]
|
|
274
|
+
*/
|
|
275
|
+
operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
|
|
276
|
+
/**
|
|
277
|
+
* List of entity schema slugs that can trigger this event
|
|
278
|
+
* example:
|
|
279
|
+
* [
|
|
280
|
+
* "contact",
|
|
281
|
+
* "contract",
|
|
282
|
+
* "order"
|
|
283
|
+
* ]
|
|
284
|
+
*/
|
|
285
|
+
schema: string[];
|
|
286
|
+
/**
|
|
287
|
+
* Optional list of entity attributes to track for changes.
|
|
288
|
+
* If specified, the event only triggers when these attributes are affected.
|
|
289
|
+
* - On createEntity: attribute must be defined in the entity payload
|
|
290
|
+
* - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
|
|
291
|
+
* If not specified, all changes to matching entities will trigger the event.
|
|
292
|
+
*
|
|
293
|
+
* example:
|
|
294
|
+
* [
|
|
295
|
+
* "email",
|
|
296
|
+
* "phone",
|
|
297
|
+
* "status"
|
|
298
|
+
* ]
|
|
299
|
+
*/
|
|
300
|
+
attribute?: string[];
|
|
301
|
+
/**
|
|
302
|
+
* Optional list of purpose names to filter by.
|
|
303
|
+
* The entity must have at least one matching purpose in its _purpose array.
|
|
304
|
+
* Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
|
|
305
|
+
* If not specified, the event triggers regardless of entity purpose.
|
|
306
|
+
*
|
|
307
|
+
* example:
|
|
308
|
+
* [
|
|
309
|
+
* "Kündigung",
|
|
310
|
+
* "Umzug/Auszug"
|
|
311
|
+
* ]
|
|
312
|
+
*/
|
|
313
|
+
purpose?: string[];
|
|
314
|
+
};
|
|
315
|
+
/**
|
|
316
|
+
* Whether this event is enabled for the organization.
|
|
317
|
+
* When disabled, the event will not be triggered by any means
|
|
318
|
+
* (automatic, API, or automation).
|
|
319
|
+
* Defaults to true if not specified.
|
|
320
|
+
*
|
|
321
|
+
* example:
|
|
322
|
+
* true
|
|
323
|
+
*/
|
|
324
|
+
enabled?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Whether the event should be triggered automatically by built-in logic
|
|
327
|
+
* (e.g., portal submissions, entity mutations, EventBridge rules).
|
|
328
|
+
* When false, the event can still be triggered manually via API or automations.
|
|
329
|
+
* Only meaningful for builtin events that have automatic trigger sources.
|
|
330
|
+
* Defaults to true if not specified.
|
|
331
|
+
*
|
|
332
|
+
* example:
|
|
333
|
+
* true
|
|
334
|
+
*/
|
|
335
|
+
auto_trigger?: boolean;
|
|
336
|
+
/**
|
|
337
|
+
* Whether this event can be explicitly triggered by automations.
|
|
338
|
+
* When true, the event will appear in the automation builder as a
|
|
339
|
+
* "Trigger Event" action option.
|
|
340
|
+
* Defaults to false if not specified.
|
|
341
|
+
*
|
|
342
|
+
* example:
|
|
343
|
+
* true
|
|
344
|
+
*/
|
|
345
|
+
automation_trigger?: boolean;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Base properties shared between EventConfig and UpdateEventPayload
|
|
349
|
+
*/
|
|
350
|
+
export interface EventConfigBase {
|
|
351
|
+
/**
|
|
352
|
+
* Unique human readable name of the event
|
|
353
|
+
* example:
|
|
354
|
+
* AddMeterReading
|
|
355
|
+
*/
|
|
356
|
+
event_name?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Human-friendly title for the event
|
|
359
|
+
* example:
|
|
360
|
+
* Add Meter Reading
|
|
361
|
+
*/
|
|
362
|
+
event_title?: string;
|
|
363
|
+
/**
|
|
364
|
+
* Description of when the event is triggered
|
|
365
|
+
* example:
|
|
366
|
+
* Triggered when a new meter reading is added
|
|
367
|
+
*/
|
|
368
|
+
event_description?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Event version (semver)
|
|
371
|
+
* example:
|
|
372
|
+
* 1.0.0
|
|
373
|
+
*/
|
|
374
|
+
event_version?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Status of the event
|
|
377
|
+
* example:
|
|
378
|
+
* active
|
|
379
|
+
*/
|
|
380
|
+
event_status?: "active" | "deprecated" | "draft" | "disabled";
|
|
381
|
+
/**
|
|
382
|
+
* Tags associated with the event for categorization and filtering
|
|
383
|
+
*
|
|
384
|
+
* The "builtin" tag indicates events that are built into the epilot system.
|
|
385
|
+
*
|
|
386
|
+
* example:
|
|
387
|
+
* [
|
|
388
|
+
* "builtin",
|
|
389
|
+
* "metering",
|
|
390
|
+
* "erp"
|
|
391
|
+
* ]
|
|
392
|
+
*/
|
|
393
|
+
event_tags?: string[];
|
|
394
|
+
/**
|
|
395
|
+
* Fields that define the event schema
|
|
396
|
+
*/
|
|
397
|
+
schema_fields?: {
|
|
398
|
+
[name: string]: SchemaField;
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* Optional entity graph definition for resolving related entities
|
|
402
|
+
*/
|
|
403
|
+
entity_graph?: {
|
|
404
|
+
/**
|
|
405
|
+
* List of node definitions in the graph
|
|
406
|
+
*/
|
|
407
|
+
nodes: /* A node in the entity graph */ GraphNode[];
|
|
408
|
+
/**
|
|
409
|
+
* List of edge definitions connecting nodes
|
|
410
|
+
*/
|
|
411
|
+
edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
|
|
412
|
+
};
|
|
413
|
+
/**
|
|
414
|
+
* Optional configuration for triggering this event based on entity operations
|
|
415
|
+
*/
|
|
416
|
+
entity_operation?: {
|
|
417
|
+
/**
|
|
418
|
+
* List of entity operations that can trigger this event
|
|
419
|
+
* example:
|
|
420
|
+
* [
|
|
421
|
+
* "createEntity",
|
|
422
|
+
* "updateEntity"
|
|
423
|
+
* ]
|
|
424
|
+
*/
|
|
425
|
+
operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
|
|
426
|
+
/**
|
|
427
|
+
* List of entity schema slugs that can trigger this event
|
|
428
|
+
* example:
|
|
429
|
+
* [
|
|
430
|
+
* "contact",
|
|
431
|
+
* "contract",
|
|
432
|
+
* "order"
|
|
433
|
+
* ]
|
|
434
|
+
*/
|
|
435
|
+
schema: string[];
|
|
436
|
+
/**
|
|
437
|
+
* Optional list of entity attributes to track for changes.
|
|
438
|
+
* If specified, the event only triggers when these attributes are affected.
|
|
439
|
+
* - On createEntity: attribute must be defined in the entity payload
|
|
440
|
+
* - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
|
|
441
|
+
* If not specified, all changes to matching entities will trigger the event.
|
|
442
|
+
*
|
|
443
|
+
* example:
|
|
444
|
+
* [
|
|
445
|
+
* "email",
|
|
446
|
+
* "phone",
|
|
447
|
+
* "status"
|
|
448
|
+
* ]
|
|
449
|
+
*/
|
|
450
|
+
attribute?: string[];
|
|
451
|
+
/**
|
|
452
|
+
* Optional list of purpose names to filter by.
|
|
453
|
+
* The entity must have at least one matching purpose in its _purpose array.
|
|
454
|
+
* Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
|
|
455
|
+
* If not specified, the event triggers regardless of entity purpose.
|
|
456
|
+
*
|
|
457
|
+
* example:
|
|
458
|
+
* [
|
|
459
|
+
* "Kündigung",
|
|
460
|
+
* "Umzug/Auszug"
|
|
461
|
+
* ]
|
|
462
|
+
*/
|
|
463
|
+
purpose?: string[];
|
|
464
|
+
};
|
|
465
|
+
/**
|
|
466
|
+
* Whether this event is enabled for the organization.
|
|
467
|
+
* When disabled, the event will not be triggered by any means
|
|
468
|
+
* (automatic, API, or automation).
|
|
469
|
+
* Defaults to true if not specified.
|
|
470
|
+
*
|
|
471
|
+
* example:
|
|
472
|
+
* true
|
|
473
|
+
*/
|
|
474
|
+
enabled?: boolean;
|
|
475
|
+
/**
|
|
476
|
+
* Whether the event should be triggered automatically by built-in logic
|
|
477
|
+
* (e.g., portal submissions, entity mutations, EventBridge rules).
|
|
478
|
+
* When false, the event can still be triggered manually via API or automations.
|
|
479
|
+
* Only meaningful for builtin events that have automatic trigger sources.
|
|
480
|
+
* Defaults to true if not specified.
|
|
481
|
+
*
|
|
482
|
+
* example:
|
|
483
|
+
* true
|
|
484
|
+
*/
|
|
485
|
+
auto_trigger?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Whether this event can be explicitly triggered by automations.
|
|
488
|
+
* When true, the event will appear in the automation builder as a
|
|
489
|
+
* "Trigger Event" action option.
|
|
490
|
+
* Defaults to false if not specified.
|
|
491
|
+
*
|
|
492
|
+
* example:
|
|
493
|
+
* true
|
|
494
|
+
*/
|
|
495
|
+
automation_trigger?: boolean;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* JSON Schema declaring the event payload structure
|
|
499
|
+
* example:
|
|
500
|
+
* {
|
|
501
|
+
* "type": "object",
|
|
502
|
+
* "properties": {
|
|
503
|
+
* "_org_id": {
|
|
504
|
+
* "type": "string",
|
|
505
|
+
* "description": "epilot tenant/organization ID"
|
|
506
|
+
* },
|
|
507
|
+
* "_event_time": {
|
|
508
|
+
* "type": "string",
|
|
509
|
+
* "format": "date-time",
|
|
510
|
+
* "description": "ISO 8601 timestamp when event occurred"
|
|
511
|
+
* },
|
|
512
|
+
* "_event_id": {
|
|
513
|
+
* "type": "string",
|
|
514
|
+
* "description": "Unique event identifier (ULID)"
|
|
515
|
+
* },
|
|
516
|
+
* "_event_name": {
|
|
517
|
+
* "type": "string",
|
|
518
|
+
* "description": "Event name from catalog"
|
|
519
|
+
* },
|
|
520
|
+
* "_event_version": {
|
|
521
|
+
* "type": "string",
|
|
522
|
+
* "description": "Event version (semver)"
|
|
523
|
+
* },
|
|
524
|
+
* "_event_source": {
|
|
525
|
+
* "type": "string",
|
|
526
|
+
* "description": "Source that triggered the event"
|
|
527
|
+
* },
|
|
528
|
+
* "reading_value": {
|
|
529
|
+
* "type": "number",
|
|
530
|
+
* "description": "The meter reading value"
|
|
531
|
+
* },
|
|
532
|
+
* "reading_date": {
|
|
533
|
+
* "type": "string",
|
|
534
|
+
* "format": "date-time",
|
|
535
|
+
* "description": "ISO 8601 timestamp when reading was taken"
|
|
536
|
+
* },
|
|
537
|
+
* "read_by": {
|
|
538
|
+
* "type": "string",
|
|
539
|
+
* "description": "Name or identifier of who submitted the reading"
|
|
540
|
+
* },
|
|
541
|
+
* "reason": {
|
|
542
|
+
* "type": "string",
|
|
543
|
+
* "enum": [
|
|
544
|
+
* "regular",
|
|
545
|
+
* "move-in",
|
|
546
|
+
* "move-out",
|
|
547
|
+
* "supplier-change",
|
|
548
|
+
* "correction",
|
|
549
|
+
* "final"
|
|
550
|
+
* ],
|
|
551
|
+
* "description": "Reason for the meter reading"
|
|
552
|
+
* },
|
|
553
|
+
* "direction": {
|
|
554
|
+
* "type": "string",
|
|
555
|
+
* "enum": [
|
|
556
|
+
* "feed-in",
|
|
557
|
+
* "feed-out"
|
|
558
|
+
* ],
|
|
559
|
+
* "description": "Direction of energy flow"
|
|
560
|
+
* },
|
|
561
|
+
* "source": {
|
|
562
|
+
* "type": "string",
|
|
563
|
+
* "enum": [
|
|
564
|
+
* "portal",
|
|
565
|
+
* "360",
|
|
566
|
+
* "api",
|
|
567
|
+
* "automation"
|
|
568
|
+
* ],
|
|
569
|
+
* "description": "Source system where reading was submitted"
|
|
570
|
+
* },
|
|
571
|
+
* "meter_id": {
|
|
572
|
+
* "type": "string",
|
|
573
|
+
* "format": "uuid",
|
|
574
|
+
* "description": "Entity ID of the meter"
|
|
575
|
+
* },
|
|
576
|
+
* "counter_id": {
|
|
577
|
+
* "type": "string",
|
|
578
|
+
* "format": "uuid",
|
|
579
|
+
* "description": "Entity ID of the meter counter"
|
|
580
|
+
* },
|
|
581
|
+
* "meter_number": {
|
|
582
|
+
* "type": "string",
|
|
583
|
+
* "description": "Human-readable meter number"
|
|
584
|
+
* },
|
|
585
|
+
* "obis_number": {
|
|
586
|
+
* "type": "string",
|
|
587
|
+
* "description": "OBIS code of the counter"
|
|
588
|
+
* },
|
|
589
|
+
* "unit": {
|
|
590
|
+
* "type": "string",
|
|
591
|
+
* "description": "Unit of measurement (e.g., kWh, m3)"
|
|
592
|
+
* },
|
|
593
|
+
* "customer_id": {
|
|
594
|
+
* "type": "string",
|
|
595
|
+
* "format": "uuid",
|
|
596
|
+
* "description": "Entity ID of the customer"
|
|
597
|
+
* },
|
|
598
|
+
* "contract_id": {
|
|
599
|
+
* "type": "string",
|
|
600
|
+
* "format": "uuid",
|
|
601
|
+
* "description": "Entity ID of the contract"
|
|
602
|
+
* },
|
|
603
|
+
* "user_id": {
|
|
604
|
+
* "type": "string",
|
|
605
|
+
* "description": "ID of the user who submitted the reading"
|
|
606
|
+
* },
|
|
607
|
+
* "user_email": {
|
|
608
|
+
* "type": "string",
|
|
609
|
+
* "format": "email",
|
|
610
|
+
* "description": "Email of the user who submitted the reading"
|
|
611
|
+
* }
|
|
612
|
+
* },
|
|
613
|
+
* "required": [
|
|
614
|
+
* "_org_id",
|
|
615
|
+
* "_event_time",
|
|
616
|
+
* "_event_id",
|
|
617
|
+
* "_event_name",
|
|
618
|
+
* "_event_version",
|
|
619
|
+
* "_event_source",
|
|
620
|
+
* "reading_value",
|
|
621
|
+
* "reading_date",
|
|
622
|
+
* "read_by",
|
|
623
|
+
* "reason",
|
|
624
|
+
* "direction",
|
|
625
|
+
* "source",
|
|
626
|
+
* "meter_id",
|
|
627
|
+
* "counter_id",
|
|
628
|
+
* "meter_number",
|
|
629
|
+
* "obis_number",
|
|
630
|
+
* "unit",
|
|
631
|
+
* "customer_id",
|
|
632
|
+
* "contract_id"
|
|
633
|
+
* ]
|
|
634
|
+
* }
|
|
635
|
+
*/
|
|
636
|
+
export interface EventJsonSchema {
|
|
637
|
+
}
|
|
638
|
+
/**
|
|
639
|
+
* List of entity fields to include or exclude in the response
|
|
640
|
+
*
|
|
641
|
+
* Use ! to exclude fields, e.g. `!_id` to exclude the `_id` field.
|
|
642
|
+
*
|
|
643
|
+
* Globbing and globstart (**) is supported for nested fields.
|
|
644
|
+
*
|
|
645
|
+
* example:
|
|
646
|
+
* [
|
|
647
|
+
* "_id",
|
|
648
|
+
* "_title",
|
|
649
|
+
* "first_name",
|
|
650
|
+
* "account",
|
|
651
|
+
* "!account.*._files",
|
|
652
|
+
* "**._product"
|
|
653
|
+
* ]
|
|
654
|
+
*/
|
|
655
|
+
export type FieldsParam = string[];
|
|
656
|
+
/**
|
|
657
|
+
* Entity graph definition for resolving related entities
|
|
658
|
+
*/
|
|
659
|
+
export interface GraphDefinition {
|
|
660
|
+
/**
|
|
661
|
+
* List of node definitions in the graph
|
|
662
|
+
*/
|
|
663
|
+
nodes: /* A node in the entity graph */ GraphNode[];
|
|
664
|
+
/**
|
|
665
|
+
* List of edge definitions connecting nodes
|
|
666
|
+
*/
|
|
667
|
+
edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* An edge connecting two nodes in the graph
|
|
671
|
+
*/
|
|
672
|
+
export interface GraphEdge {
|
|
673
|
+
/**
|
|
674
|
+
* Source node ID
|
|
675
|
+
* example:
|
|
676
|
+
* contact
|
|
677
|
+
*/
|
|
678
|
+
from: string;
|
|
679
|
+
/**
|
|
680
|
+
* Target node ID
|
|
681
|
+
* example:
|
|
682
|
+
* billing_account
|
|
683
|
+
*/
|
|
684
|
+
to: string;
|
|
685
|
+
}
|
|
686
|
+
/**
|
|
687
|
+
* A node in the entity graph
|
|
688
|
+
*/
|
|
689
|
+
export interface GraphNode {
|
|
690
|
+
/**
|
|
691
|
+
* Unique identifier for this node in the graph definition
|
|
692
|
+
* example:
|
|
693
|
+
* contact
|
|
694
|
+
*/
|
|
695
|
+
id: string;
|
|
696
|
+
/**
|
|
697
|
+
* Entity schema slug for this node
|
|
698
|
+
* example:
|
|
699
|
+
* contact
|
|
700
|
+
*/
|
|
701
|
+
schema: string;
|
|
702
|
+
/**
|
|
703
|
+
* Cardinality for this node when hydrated:
|
|
704
|
+
* - "one": Node can only contain one entity, returns single Entity object
|
|
705
|
+
* - "many": Node can contain multiple entities, returns array of Entity objects
|
|
706
|
+
* If not specified, defaults to "many" (returns array)
|
|
707
|
+
*
|
|
708
|
+
* example:
|
|
709
|
+
* one
|
|
710
|
+
*/
|
|
711
|
+
cardinality?: "one" | "many";
|
|
712
|
+
/**
|
|
713
|
+
* Optional array of field names to include in the hydrated entity response for this node.
|
|
714
|
+
* When specified, only the requested fields plus required internal fields (_id, _schema, _org) will be returned.
|
|
715
|
+
* Only applies when hydrate=true.
|
|
716
|
+
*
|
|
717
|
+
* example:
|
|
718
|
+
* [
|
|
719
|
+
* "_id",
|
|
720
|
+
* "_title",
|
|
721
|
+
* "first_name",
|
|
722
|
+
* "account",
|
|
723
|
+
* "!account.*._files",
|
|
724
|
+
* "**._product"
|
|
725
|
+
* ]
|
|
726
|
+
*/
|
|
727
|
+
fields?: string[];
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* A primitive JSON Schema field definition
|
|
731
|
+
*/
|
|
732
|
+
export interface PrimitiveField {
|
|
733
|
+
/**
|
|
734
|
+
* JSON Schema definition of the field
|
|
735
|
+
* example:
|
|
736
|
+
* {
|
|
737
|
+
* "type": "string",
|
|
738
|
+
* "format": "date-time",
|
|
739
|
+
* "description": "ISO 8601 timestamp when reading was taken"
|
|
740
|
+
* }
|
|
741
|
+
*/
|
|
742
|
+
json_schema: {
|
|
743
|
+
[key: string]: any;
|
|
744
|
+
};
|
|
745
|
+
/**
|
|
746
|
+
* Whether this field is required in the event payload
|
|
747
|
+
*/
|
|
748
|
+
required?: boolean;
|
|
749
|
+
/**
|
|
750
|
+
* Optional JSONata expression to extract the field value from the hydrated entity graph.
|
|
751
|
+
*
|
|
752
|
+
* The expression has access to all hydrated graph nodes by their node ID.
|
|
753
|
+
* If not specified, the field value must be provided as input when triggering the event.
|
|
754
|
+
*
|
|
755
|
+
* Examples:
|
|
756
|
+
* - "ticket.meter_reading_value" (simple path)
|
|
757
|
+
* - "contact.email[0].email" (nested/array access)
|
|
758
|
+
* - "ticket.reading_timestamp ?? $now()" (with fallback)
|
|
759
|
+
* - "$number(meter_counter.reading_value)" (type coercion)
|
|
760
|
+
*
|
|
761
|
+
* example:
|
|
762
|
+
* ticket.meter_reading_value
|
|
763
|
+
*/
|
|
764
|
+
graph_source?: string;
|
|
765
|
+
}
|
|
766
|
+
export type SchemaField = /* A primitive JSON Schema field definition */ PrimitiveField | ContextEntity;
|
|
767
|
+
export interface SearchOptions {
|
|
768
|
+
/**
|
|
769
|
+
* Maximum number of results to return
|
|
770
|
+
*/
|
|
771
|
+
limit?: number;
|
|
772
|
+
/**
|
|
773
|
+
* Cursor for pagination. Use the next_cursor from the previous response to get the next page.
|
|
774
|
+
*/
|
|
775
|
+
cursor?: {
|
|
776
|
+
/**
|
|
777
|
+
* Timestamp from the last event in the previous page
|
|
778
|
+
* example:
|
|
779
|
+
* 2025-10-31 12:34:56
|
|
780
|
+
*/
|
|
781
|
+
event_time?: string;
|
|
782
|
+
/**
|
|
783
|
+
* Event ID from the last event in the previous page
|
|
784
|
+
* example:
|
|
785
|
+
* evt_1234567890abcdef
|
|
786
|
+
*/
|
|
787
|
+
event_id?: string;
|
|
788
|
+
};
|
|
789
|
+
/**
|
|
790
|
+
* Filter events by timestamp range
|
|
791
|
+
*/
|
|
792
|
+
timestamp?: {
|
|
793
|
+
/**
|
|
794
|
+
* Start timestamp in ISO 8601 format
|
|
795
|
+
* example:
|
|
796
|
+
* 2025-10-01T00:00:00Z
|
|
797
|
+
*/
|
|
798
|
+
from?: string; // date-time
|
|
799
|
+
/**
|
|
800
|
+
* End timestamp in ISO 8601 format
|
|
801
|
+
* example:
|
|
802
|
+
* 2025-10-31T23:59:59Z
|
|
803
|
+
*/
|
|
804
|
+
to?: string; // date-time
|
|
805
|
+
};
|
|
806
|
+
/**
|
|
807
|
+
* Filter by specific event ID
|
|
808
|
+
* example:
|
|
809
|
+
* evt_1234567890abcdef
|
|
810
|
+
*/
|
|
811
|
+
event_id?: string;
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* Payload for explicitly triggering an event via API
|
|
815
|
+
*/
|
|
816
|
+
export interface TriggerEventPayload {
|
|
817
|
+
/**
|
|
818
|
+
* Entity seed for graph hydration. Required for events that have an entity_graph defined.
|
|
819
|
+
* Specifies which entity to start graph traversal from.
|
|
820
|
+
*
|
|
821
|
+
*/
|
|
822
|
+
seed?: {
|
|
823
|
+
/**
|
|
824
|
+
* Entity ID to seed the graph hydration
|
|
825
|
+
*/
|
|
826
|
+
entity_id: string; // uuid
|
|
827
|
+
/**
|
|
828
|
+
* Node ID from the event's entity_graph definition that matches
|
|
829
|
+
* the seed entity. Must be a valid node in the event's graph.
|
|
830
|
+
*
|
|
831
|
+
*/
|
|
832
|
+
node_id: string;
|
|
833
|
+
};
|
|
834
|
+
/**
|
|
835
|
+
* Input field values for the event. Keys must match the event's
|
|
836
|
+
* schema_fields definitions. Values are validated against each
|
|
837
|
+
* field's JSON Schema.
|
|
838
|
+
*
|
|
839
|
+
*/
|
|
840
|
+
fields?: {
|
|
841
|
+
[name: string]: any;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* Optional list of node IDs to skip during entity graph hydration.
|
|
845
|
+
* These nodes will be null/undefined in the event payload.
|
|
846
|
+
*
|
|
847
|
+
*/
|
|
848
|
+
skip_hydration?: string[];
|
|
849
|
+
/**
|
|
850
|
+
* The type of system that triggered the event.
|
|
851
|
+
* Examples: api, automation, operation, portal_user
|
|
852
|
+
* Defaults to "api" if not specified.
|
|
853
|
+
*
|
|
854
|
+
*/
|
|
855
|
+
_trigger_source_type?: string;
|
|
856
|
+
/**
|
|
857
|
+
* Identifier of the specific trigger source.
|
|
858
|
+
* Examples: user ID, automation execution ID, activity ID, portal user email
|
|
859
|
+
* Defaults to the calling user ID if not specified.
|
|
860
|
+
*
|
|
861
|
+
*/
|
|
862
|
+
_trigger_source?: string;
|
|
863
|
+
}
|
|
864
|
+
/**
|
|
865
|
+
* Response from triggering an event
|
|
866
|
+
*/
|
|
867
|
+
export interface TriggerEventResponse {
|
|
868
|
+
/**
|
|
869
|
+
* Whether the event was triggered successfully
|
|
870
|
+
*/
|
|
871
|
+
success: boolean;
|
|
872
|
+
/**
|
|
873
|
+
* The unique event ID (ULID) assigned to this event
|
|
874
|
+
*/
|
|
875
|
+
event_id: string;
|
|
876
|
+
/**
|
|
877
|
+
* EventBridge event ID from publishing
|
|
878
|
+
*/
|
|
879
|
+
event_bridge_event_id?: string;
|
|
880
|
+
}
|
|
881
|
+
/**
|
|
882
|
+
* Payload for updating an event configuration.
|
|
883
|
+
* Accepts the same fields as EventConfig (all optional for PATCH).
|
|
884
|
+
* Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
|
|
885
|
+
*
|
|
886
|
+
*/
|
|
887
|
+
export interface UpdateEventPayload {
|
|
888
|
+
/**
|
|
889
|
+
* Unique human readable name of the event
|
|
890
|
+
* example:
|
|
891
|
+
* AddMeterReading
|
|
892
|
+
*/
|
|
893
|
+
event_name?: string;
|
|
894
|
+
/**
|
|
895
|
+
* Human-friendly title for the event
|
|
896
|
+
* example:
|
|
897
|
+
* Add Meter Reading
|
|
898
|
+
*/
|
|
899
|
+
event_title?: string;
|
|
900
|
+
/**
|
|
901
|
+
* Description of when the event is triggered
|
|
902
|
+
* example:
|
|
903
|
+
* Triggered when a new meter reading is added
|
|
904
|
+
*/
|
|
905
|
+
event_description?: string;
|
|
906
|
+
/**
|
|
907
|
+
* Event version (semver)
|
|
908
|
+
* example:
|
|
909
|
+
* 1.0.0
|
|
910
|
+
*/
|
|
911
|
+
event_version?: string;
|
|
912
|
+
/**
|
|
913
|
+
* Status of the event
|
|
914
|
+
* example:
|
|
915
|
+
* active
|
|
916
|
+
*/
|
|
917
|
+
event_status?: "active" | "deprecated" | "draft" | "disabled";
|
|
918
|
+
/**
|
|
919
|
+
* Tags associated with the event for categorization and filtering
|
|
920
|
+
*
|
|
921
|
+
* The "builtin" tag indicates events that are built into the epilot system.
|
|
922
|
+
*
|
|
923
|
+
* example:
|
|
924
|
+
* [
|
|
925
|
+
* "builtin",
|
|
926
|
+
* "metering",
|
|
927
|
+
* "erp"
|
|
928
|
+
* ]
|
|
929
|
+
*/
|
|
930
|
+
event_tags?: string[];
|
|
931
|
+
/**
|
|
932
|
+
* Fields that define the event schema
|
|
933
|
+
*/
|
|
934
|
+
schema_fields?: {
|
|
935
|
+
[name: string]: SchemaField;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* Optional entity graph definition for resolving related entities
|
|
939
|
+
*/
|
|
940
|
+
entity_graph?: {
|
|
941
|
+
/**
|
|
942
|
+
* List of node definitions in the graph
|
|
943
|
+
*/
|
|
944
|
+
nodes: /* A node in the entity graph */ GraphNode[];
|
|
945
|
+
/**
|
|
946
|
+
* List of edge definitions connecting nodes
|
|
947
|
+
*/
|
|
948
|
+
edges: /* An edge connecting two nodes in the graph */ GraphEdge[];
|
|
949
|
+
};
|
|
950
|
+
/**
|
|
951
|
+
* Optional configuration for triggering this event based on entity operations
|
|
952
|
+
*/
|
|
953
|
+
entity_operation?: {
|
|
954
|
+
/**
|
|
955
|
+
* List of entity operations that can trigger this event
|
|
956
|
+
* example:
|
|
957
|
+
* [
|
|
958
|
+
* "createEntity",
|
|
959
|
+
* "updateEntity"
|
|
960
|
+
* ]
|
|
961
|
+
*/
|
|
962
|
+
operation: ("createEntity" | "updateEntity" | "deleteEntity")[];
|
|
963
|
+
/**
|
|
964
|
+
* List of entity schema slugs that can trigger this event
|
|
965
|
+
* example:
|
|
966
|
+
* [
|
|
967
|
+
* "contact",
|
|
968
|
+
* "contract",
|
|
969
|
+
* "order"
|
|
970
|
+
* ]
|
|
971
|
+
*/
|
|
972
|
+
schema: string[];
|
|
973
|
+
/**
|
|
974
|
+
* Optional list of entity attributes to track for changes.
|
|
975
|
+
* If specified, the event only triggers when these attributes are affected.
|
|
976
|
+
* - On createEntity: attribute must be defined in the entity payload
|
|
977
|
+
* - On updateEntity: attribute must be in diff.added, diff.updated, or diff.deleted
|
|
978
|
+
* If not specified, all changes to matching entities will trigger the event.
|
|
979
|
+
*
|
|
980
|
+
* example:
|
|
981
|
+
* [
|
|
982
|
+
* "email",
|
|
983
|
+
* "phone",
|
|
984
|
+
* "status"
|
|
985
|
+
* ]
|
|
986
|
+
*/
|
|
987
|
+
attribute?: string[];
|
|
988
|
+
/**
|
|
989
|
+
* Optional list of purpose names to filter by.
|
|
990
|
+
* The entity must have at least one matching purpose in its _purpose array.
|
|
991
|
+
* Purpose names are matched against the taxonomy classification names (e.g., "Kündigung", "Umzug/Auszug").
|
|
992
|
+
* If not specified, the event triggers regardless of entity purpose.
|
|
993
|
+
*
|
|
994
|
+
* example:
|
|
995
|
+
* [
|
|
996
|
+
* "Kündigung",
|
|
997
|
+
* "Umzug/Auszug"
|
|
998
|
+
* ]
|
|
999
|
+
*/
|
|
1000
|
+
purpose?: string[];
|
|
1001
|
+
};
|
|
1002
|
+
/**
|
|
1003
|
+
* Whether this event is enabled for the organization.
|
|
1004
|
+
* When disabled, the event will not be triggered by any means
|
|
1005
|
+
* (automatic, API, or automation).
|
|
1006
|
+
* Defaults to true if not specified.
|
|
1007
|
+
*
|
|
1008
|
+
* example:
|
|
1009
|
+
* true
|
|
1010
|
+
*/
|
|
1011
|
+
enabled?: boolean;
|
|
1012
|
+
/**
|
|
1013
|
+
* Whether the event should be triggered automatically by built-in logic
|
|
1014
|
+
* (e.g., portal submissions, entity mutations, EventBridge rules).
|
|
1015
|
+
* When false, the event can still be triggered manually via API or automations.
|
|
1016
|
+
* Only meaningful for builtin events that have automatic trigger sources.
|
|
1017
|
+
* Defaults to true if not specified.
|
|
1018
|
+
*
|
|
1019
|
+
* example:
|
|
1020
|
+
* true
|
|
1021
|
+
*/
|
|
1022
|
+
auto_trigger?: boolean;
|
|
1023
|
+
/**
|
|
1024
|
+
* Whether this event can be explicitly triggered by automations.
|
|
1025
|
+
* When true, the event will appear in the automation builder as a
|
|
1026
|
+
* "Trigger Event" action option.
|
|
1027
|
+
* Defaults to false if not specified.
|
|
1028
|
+
*
|
|
1029
|
+
* example:
|
|
1030
|
+
* true
|
|
1031
|
+
*/
|
|
1032
|
+
automation_trigger?: boolean;
|
|
1033
|
+
}
|
|
1034
|
+
}
|
|
1035
|
+
}
|
|
1036
|
+
declare namespace Paths {
|
|
1037
|
+
namespace GetEvent {
|
|
1038
|
+
namespace Parameters {
|
|
1039
|
+
export type EventName = string;
|
|
1040
|
+
}
|
|
1041
|
+
export interface PathParameters {
|
|
1042
|
+
event_name: Parameters.EventName;
|
|
1043
|
+
}
|
|
1044
|
+
namespace Responses {
|
|
1045
|
+
export type $200 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
namespace GetEventExample {
|
|
1049
|
+
namespace Parameters {
|
|
1050
|
+
export type EventName = string;
|
|
1051
|
+
}
|
|
1052
|
+
export interface PathParameters {
|
|
1053
|
+
event_name: Parameters.EventName;
|
|
1054
|
+
}
|
|
1055
|
+
namespace Responses {
|
|
1056
|
+
/**
|
|
1057
|
+
* A sample event payload generated from the JSON Schema
|
|
1058
|
+
*/
|
|
1059
|
+
export interface $200 {
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
namespace GetEventJSONSchema {
|
|
1064
|
+
namespace Parameters {
|
|
1065
|
+
export type EventName = string;
|
|
1066
|
+
}
|
|
1067
|
+
export interface PathParameters {
|
|
1068
|
+
event_name: Parameters.EventName;
|
|
1069
|
+
}
|
|
1070
|
+
namespace Responses {
|
|
1071
|
+
export type $200 = /**
|
|
1072
|
+
* JSON Schema declaring the event payload structure
|
|
1073
|
+
* example:
|
|
1074
|
+
* {
|
|
1075
|
+
* "type": "object",
|
|
1076
|
+
* "properties": {
|
|
1077
|
+
* "_org_id": {
|
|
1078
|
+
* "type": "string",
|
|
1079
|
+
* "description": "epilot tenant/organization ID"
|
|
1080
|
+
* },
|
|
1081
|
+
* "_event_time": {
|
|
1082
|
+
* "type": "string",
|
|
1083
|
+
* "format": "date-time",
|
|
1084
|
+
* "description": "ISO 8601 timestamp when event occurred"
|
|
1085
|
+
* },
|
|
1086
|
+
* "_event_id": {
|
|
1087
|
+
* "type": "string",
|
|
1088
|
+
* "description": "Unique event identifier (ULID)"
|
|
1089
|
+
* },
|
|
1090
|
+
* "_event_name": {
|
|
1091
|
+
* "type": "string",
|
|
1092
|
+
* "description": "Event name from catalog"
|
|
1093
|
+
* },
|
|
1094
|
+
* "_event_version": {
|
|
1095
|
+
* "type": "string",
|
|
1096
|
+
* "description": "Event version (semver)"
|
|
1097
|
+
* },
|
|
1098
|
+
* "_event_source": {
|
|
1099
|
+
* "type": "string",
|
|
1100
|
+
* "description": "Source that triggered the event"
|
|
1101
|
+
* },
|
|
1102
|
+
* "reading_value": {
|
|
1103
|
+
* "type": "number",
|
|
1104
|
+
* "description": "The meter reading value"
|
|
1105
|
+
* },
|
|
1106
|
+
* "reading_date": {
|
|
1107
|
+
* "type": "string",
|
|
1108
|
+
* "format": "date-time",
|
|
1109
|
+
* "description": "ISO 8601 timestamp when reading was taken"
|
|
1110
|
+
* },
|
|
1111
|
+
* "read_by": {
|
|
1112
|
+
* "type": "string",
|
|
1113
|
+
* "description": "Name or identifier of who submitted the reading"
|
|
1114
|
+
* },
|
|
1115
|
+
* "reason": {
|
|
1116
|
+
* "type": "string",
|
|
1117
|
+
* "enum": [
|
|
1118
|
+
* "regular",
|
|
1119
|
+
* "move-in",
|
|
1120
|
+
* "move-out",
|
|
1121
|
+
* "supplier-change",
|
|
1122
|
+
* "correction",
|
|
1123
|
+
* "final"
|
|
1124
|
+
* ],
|
|
1125
|
+
* "description": "Reason for the meter reading"
|
|
1126
|
+
* },
|
|
1127
|
+
* "direction": {
|
|
1128
|
+
* "type": "string",
|
|
1129
|
+
* "enum": [
|
|
1130
|
+
* "feed-in",
|
|
1131
|
+
* "feed-out"
|
|
1132
|
+
* ],
|
|
1133
|
+
* "description": "Direction of energy flow"
|
|
1134
|
+
* },
|
|
1135
|
+
* "source": {
|
|
1136
|
+
* "type": "string",
|
|
1137
|
+
* "enum": [
|
|
1138
|
+
* "portal",
|
|
1139
|
+
* "360",
|
|
1140
|
+
* "api",
|
|
1141
|
+
* "automation"
|
|
1142
|
+
* ],
|
|
1143
|
+
* "description": "Source system where reading was submitted"
|
|
1144
|
+
* },
|
|
1145
|
+
* "meter_id": {
|
|
1146
|
+
* "type": "string",
|
|
1147
|
+
* "format": "uuid",
|
|
1148
|
+
* "description": "Entity ID of the meter"
|
|
1149
|
+
* },
|
|
1150
|
+
* "counter_id": {
|
|
1151
|
+
* "type": "string",
|
|
1152
|
+
* "format": "uuid",
|
|
1153
|
+
* "description": "Entity ID of the meter counter"
|
|
1154
|
+
* },
|
|
1155
|
+
* "meter_number": {
|
|
1156
|
+
* "type": "string",
|
|
1157
|
+
* "description": "Human-readable meter number"
|
|
1158
|
+
* },
|
|
1159
|
+
* "obis_number": {
|
|
1160
|
+
* "type": "string",
|
|
1161
|
+
* "description": "OBIS code of the counter"
|
|
1162
|
+
* },
|
|
1163
|
+
* "unit": {
|
|
1164
|
+
* "type": "string",
|
|
1165
|
+
* "description": "Unit of measurement (e.g., kWh, m3)"
|
|
1166
|
+
* },
|
|
1167
|
+
* "customer_id": {
|
|
1168
|
+
* "type": "string",
|
|
1169
|
+
* "format": "uuid",
|
|
1170
|
+
* "description": "Entity ID of the customer"
|
|
1171
|
+
* },
|
|
1172
|
+
* "contract_id": {
|
|
1173
|
+
* "type": "string",
|
|
1174
|
+
* "format": "uuid",
|
|
1175
|
+
* "description": "Entity ID of the contract"
|
|
1176
|
+
* },
|
|
1177
|
+
* "user_id": {
|
|
1178
|
+
* "type": "string",
|
|
1179
|
+
* "description": "ID of the user who submitted the reading"
|
|
1180
|
+
* },
|
|
1181
|
+
* "user_email": {
|
|
1182
|
+
* "type": "string",
|
|
1183
|
+
* "format": "email",
|
|
1184
|
+
* "description": "Email of the user who submitted the reading"
|
|
1185
|
+
* }
|
|
1186
|
+
* },
|
|
1187
|
+
* "required": [
|
|
1188
|
+
* "_org_id",
|
|
1189
|
+
* "_event_time",
|
|
1190
|
+
* "_event_id",
|
|
1191
|
+
* "_event_name",
|
|
1192
|
+
* "_event_version",
|
|
1193
|
+
* "_event_source",
|
|
1194
|
+
* "reading_value",
|
|
1195
|
+
* "reading_date",
|
|
1196
|
+
* "read_by",
|
|
1197
|
+
* "reason",
|
|
1198
|
+
* "direction",
|
|
1199
|
+
* "source",
|
|
1200
|
+
* "meter_id",
|
|
1201
|
+
* "counter_id",
|
|
1202
|
+
* "meter_number",
|
|
1203
|
+
* "obis_number",
|
|
1204
|
+
* "unit",
|
|
1205
|
+
* "customer_id",
|
|
1206
|
+
* "contract_id"
|
|
1207
|
+
* ]
|
|
1208
|
+
* }
|
|
1209
|
+
*/
|
|
1210
|
+
Components.Schemas.EventJsonSchema;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
namespace ListEvents {
|
|
1214
|
+
namespace Responses {
|
|
1215
|
+
export interface $200 {
|
|
1216
|
+
results?: /* Event configuration with required fields */ Components.Schemas.EventConfig[];
|
|
1217
|
+
}
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
namespace PatchEvent {
|
|
1221
|
+
namespace Parameters {
|
|
1222
|
+
export type EventName = string;
|
|
1223
|
+
}
|
|
1224
|
+
export interface PathParameters {
|
|
1225
|
+
event_name: Parameters.EventName;
|
|
1226
|
+
}
|
|
1227
|
+
export type RequestBody = /**
|
|
1228
|
+
* Payload for updating an event configuration.
|
|
1229
|
+
* Accepts the same fields as EventConfig (all optional for PATCH).
|
|
1230
|
+
* Currently only `enabled` and `auto_trigger` fields are processed, other fields are ignored.
|
|
1231
|
+
*
|
|
1232
|
+
*/
|
|
1233
|
+
Components.Schemas.UpdateEventPayload;
|
|
1234
|
+
namespace Responses {
|
|
1235
|
+
export type $200 = /* Event configuration with required fields */ Components.Schemas.EventConfig;
|
|
1236
|
+
export interface $404 {
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
namespace SearchEventHistory {
|
|
1241
|
+
namespace Parameters {
|
|
1242
|
+
export type EventName = string;
|
|
1243
|
+
}
|
|
1244
|
+
export interface PathParameters {
|
|
1245
|
+
event_name: Parameters.EventName;
|
|
1246
|
+
}
|
|
1247
|
+
export type RequestBody = Components.Schemas.SearchOptions;
|
|
1248
|
+
namespace Responses {
|
|
1249
|
+
export interface $200 {
|
|
1250
|
+
results?: /**
|
|
1251
|
+
* An event instance in the event history
|
|
1252
|
+
* example:
|
|
1253
|
+
* {
|
|
1254
|
+
* "_org_id": "org_123456",
|
|
1255
|
+
* "_event_time": "2024-01-01T12:00:00Z",
|
|
1256
|
+
* "_event_id": "01FZ4Z5FZ5FZ5FZ5FZ5FZ5FZ5F",
|
|
1257
|
+
* "_event_name": "MeterReading",
|
|
1258
|
+
* "_event_version": "1.0.0",
|
|
1259
|
+
* "_event_source": "api",
|
|
1260
|
+
* "_trigger_source_type": "api",
|
|
1261
|
+
* "_trigger_source": "user_123456",
|
|
1262
|
+
* "reading_value": 123.45,
|
|
1263
|
+
* "reading_date": "2024-01-01T11:59:00Z",
|
|
1264
|
+
* "read_by": "John Doe",
|
|
1265
|
+
* "reason": "regular",
|
|
1266
|
+
* "direction": "feed-out",
|
|
1267
|
+
* "source": "portal",
|
|
1268
|
+
* "meter_id": "550e8400-e29b-41d4-a716-446655440000",
|
|
1269
|
+
* "counter_id": "660e8400-e29b-41d4-a716-446655440000",
|
|
1270
|
+
* "meter_number": "MT123456789",
|
|
1271
|
+
* "obis_number": "1-0:1.8.0",
|
|
1272
|
+
* "unit": "kWh",
|
|
1273
|
+
* "customer_id": "770e8400-e29b-41d4-a716-446655440000",
|
|
1274
|
+
* "contract_id": "880e8400-e29b-41d4-a716-446655440000"
|
|
1275
|
+
* }
|
|
1276
|
+
*/
|
|
1277
|
+
Components.Schemas.Event[];
|
|
1278
|
+
/**
|
|
1279
|
+
* Cursor for pagination. Use this to get the next page of results.
|
|
1280
|
+
*/
|
|
1281
|
+
next_cursor?: {
|
|
1282
|
+
/**
|
|
1283
|
+
* Timestamp from the last event in the current page
|
|
1284
|
+
* example:
|
|
1285
|
+
* 2025-10-31T12:34:56Z
|
|
1286
|
+
*/
|
|
1287
|
+
event_time?: string;
|
|
1288
|
+
/**
|
|
1289
|
+
* Event ID from the last event in the current page
|
|
1290
|
+
* example:
|
|
1291
|
+
* evt_1234567890abcdef
|
|
1292
|
+
*/
|
|
1293
|
+
event_id?: string;
|
|
1294
|
+
} | null;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
namespace TriggerEvent {
|
|
1299
|
+
namespace Parameters {
|
|
1300
|
+
export type EventName = string;
|
|
1301
|
+
}
|
|
1302
|
+
export interface PathParameters {
|
|
1303
|
+
event_name: Parameters.EventName;
|
|
1304
|
+
}
|
|
1305
|
+
export type RequestBody = /* Payload for explicitly triggering an event via API */ Components.Schemas.TriggerEventPayload;
|
|
1306
|
+
namespace Responses {
|
|
1307
|
+
export type $200 = /* Response from triggering an event */ Components.Schemas.TriggerEventResponse;
|
|
1308
|
+
export interface $400 {
|
|
1309
|
+
}
|
|
1310
|
+
export interface $403 {
|
|
1311
|
+
}
|
|
1312
|
+
export interface $404 {
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
|
|
1319
|
+
interface OperationMethods {
|
|
1320
|
+
/**
|
|
1321
|
+
* listEvents - listEvents
|
|
1322
|
+
*
|
|
1323
|
+
* Retrieve list of available business events
|
|
1324
|
+
*/
|
|
1325
|
+
'listEvents'(
|
|
1326
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1327
|
+
data?: any,
|
|
1328
|
+
config?: AxiosRequestConfig
|
|
1329
|
+
): OperationResponse<Paths.ListEvents.Responses.$200>
|
|
1330
|
+
/**
|
|
1331
|
+
* getEvent - getEvent
|
|
1332
|
+
*
|
|
1333
|
+
* Retrieve the configuration of a specific business event
|
|
1334
|
+
*/
|
|
1335
|
+
'getEvent'(
|
|
1336
|
+
parameters?: Parameters<Paths.GetEvent.PathParameters> | null,
|
|
1337
|
+
data?: any,
|
|
1338
|
+
config?: AxiosRequestConfig
|
|
1339
|
+
): OperationResponse<Paths.GetEvent.Responses.$200>
|
|
1340
|
+
/**
|
|
1341
|
+
* patchEvent - patchEvent
|
|
1342
|
+
*
|
|
1343
|
+
* Update the configuration of a specific business event for the organization
|
|
1344
|
+
*/
|
|
1345
|
+
'patchEvent'(
|
|
1346
|
+
parameters?: Parameters<Paths.PatchEvent.PathParameters> | null,
|
|
1347
|
+
data?: Paths.PatchEvent.RequestBody,
|
|
1348
|
+
config?: AxiosRequestConfig
|
|
1349
|
+
): OperationResponse<Paths.PatchEvent.Responses.$200>
|
|
1350
|
+
/**
|
|
1351
|
+
* getEventJSONSchema - getEventJSONSchema
|
|
1352
|
+
*
|
|
1353
|
+
* Retrieve the JSON Schema of a specific business event
|
|
1354
|
+
*/
|
|
1355
|
+
'getEventJSONSchema'(
|
|
1356
|
+
parameters?: Parameters<Paths.GetEventJSONSchema.PathParameters> | null,
|
|
1357
|
+
data?: any,
|
|
1358
|
+
config?: AxiosRequestConfig
|
|
1359
|
+
): OperationResponse<Paths.GetEventJSONSchema.Responses.$200>
|
|
1360
|
+
/**
|
|
1361
|
+
* getEventExample - getEventExample
|
|
1362
|
+
*
|
|
1363
|
+
* Generate a sample event payload based on the event's JSON Schema
|
|
1364
|
+
*/
|
|
1365
|
+
'getEventExample'(
|
|
1366
|
+
parameters?: Parameters<Paths.GetEventExample.PathParameters> | null,
|
|
1367
|
+
data?: any,
|
|
1368
|
+
config?: AxiosRequestConfig
|
|
1369
|
+
): OperationResponse<Paths.GetEventExample.Responses.$200>
|
|
1370
|
+
/**
|
|
1371
|
+
* searchEventHistory - searchEventHistory
|
|
1372
|
+
*
|
|
1373
|
+
* Paginated history of events
|
|
1374
|
+
*/
|
|
1375
|
+
'searchEventHistory'(
|
|
1376
|
+
parameters?: Parameters<Paths.SearchEventHistory.PathParameters> | null,
|
|
1377
|
+
data?: Paths.SearchEventHistory.RequestBody,
|
|
1378
|
+
config?: AxiosRequestConfig
|
|
1379
|
+
): OperationResponse<Paths.SearchEventHistory.Responses.$200>
|
|
1380
|
+
/**
|
|
1381
|
+
* triggerEvent - triggerEvent
|
|
1382
|
+
*
|
|
1383
|
+
* Explicitly trigger an event by providing input field values and an optional entity seed
|
|
1384
|
+
* for graph hydration. The event must be enabled for the organization.
|
|
1385
|
+
*
|
|
1386
|
+
* - For events with an entity_graph, a seed (entity_id + node_id) is required
|
|
1387
|
+
* - For events without an entity_graph, only fields are needed
|
|
1388
|
+
* - Entity operation context fields (operation, trigger_entity, activity_id, activity_type)
|
|
1389
|
+
* are not included when triggering via API
|
|
1390
|
+
*
|
|
1391
|
+
*/
|
|
1392
|
+
'triggerEvent'(
|
|
1393
|
+
parameters?: Parameters<Paths.TriggerEvent.PathParameters> | null,
|
|
1394
|
+
data?: Paths.TriggerEvent.RequestBody,
|
|
1395
|
+
config?: AxiosRequestConfig
|
|
1396
|
+
): OperationResponse<Paths.TriggerEvent.Responses.$200>
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
interface PathsDictionary {
|
|
1400
|
+
['/v1/events']: {
|
|
1401
|
+
/**
|
|
1402
|
+
* listEvents - listEvents
|
|
1403
|
+
*
|
|
1404
|
+
* Retrieve list of available business events
|
|
1405
|
+
*/
|
|
1406
|
+
'get'(
|
|
1407
|
+
parameters?: Parameters<UnknownParamsObject> | null,
|
|
1408
|
+
data?: any,
|
|
1409
|
+
config?: AxiosRequestConfig
|
|
1410
|
+
): OperationResponse<Paths.ListEvents.Responses.$200>
|
|
1411
|
+
}
|
|
1412
|
+
['/v1/events/{event_name}']: {
|
|
1413
|
+
/**
|
|
1414
|
+
* getEvent - getEvent
|
|
1415
|
+
*
|
|
1416
|
+
* Retrieve the configuration of a specific business event
|
|
1417
|
+
*/
|
|
1418
|
+
'get'(
|
|
1419
|
+
parameters?: Parameters<Paths.GetEvent.PathParameters> | null,
|
|
1420
|
+
data?: any,
|
|
1421
|
+
config?: AxiosRequestConfig
|
|
1422
|
+
): OperationResponse<Paths.GetEvent.Responses.$200>
|
|
1423
|
+
/**
|
|
1424
|
+
* patchEvent - patchEvent
|
|
1425
|
+
*
|
|
1426
|
+
* Update the configuration of a specific business event for the organization
|
|
1427
|
+
*/
|
|
1428
|
+
'patch'(
|
|
1429
|
+
parameters?: Parameters<Paths.PatchEvent.PathParameters> | null,
|
|
1430
|
+
data?: Paths.PatchEvent.RequestBody,
|
|
1431
|
+
config?: AxiosRequestConfig
|
|
1432
|
+
): OperationResponse<Paths.PatchEvent.Responses.$200>
|
|
1433
|
+
}
|
|
1434
|
+
['/v1/events/{event_name}/json_schema']: {
|
|
1435
|
+
/**
|
|
1436
|
+
* getEventJSONSchema - getEventJSONSchema
|
|
1437
|
+
*
|
|
1438
|
+
* Retrieve the JSON Schema of a specific business event
|
|
1439
|
+
*/
|
|
1440
|
+
'get'(
|
|
1441
|
+
parameters?: Parameters<Paths.GetEventJSONSchema.PathParameters> | null,
|
|
1442
|
+
data?: any,
|
|
1443
|
+
config?: AxiosRequestConfig
|
|
1444
|
+
): OperationResponse<Paths.GetEventJSONSchema.Responses.$200>
|
|
1445
|
+
}
|
|
1446
|
+
['/v1/events/{event_name}/example']: {
|
|
1447
|
+
/**
|
|
1448
|
+
* getEventExample - getEventExample
|
|
1449
|
+
*
|
|
1450
|
+
* Generate a sample event payload based on the event's JSON Schema
|
|
1451
|
+
*/
|
|
1452
|
+
'get'(
|
|
1453
|
+
parameters?: Parameters<Paths.GetEventExample.PathParameters> | null,
|
|
1454
|
+
data?: any,
|
|
1455
|
+
config?: AxiosRequestConfig
|
|
1456
|
+
): OperationResponse<Paths.GetEventExample.Responses.$200>
|
|
1457
|
+
}
|
|
1458
|
+
['/v1/events/{event_name}:history']: {
|
|
1459
|
+
/**
|
|
1460
|
+
* searchEventHistory - searchEventHistory
|
|
1461
|
+
*
|
|
1462
|
+
* Paginated history of events
|
|
1463
|
+
*/
|
|
1464
|
+
'post'(
|
|
1465
|
+
parameters?: Parameters<Paths.SearchEventHistory.PathParameters> | null,
|
|
1466
|
+
data?: Paths.SearchEventHistory.RequestBody,
|
|
1467
|
+
config?: AxiosRequestConfig
|
|
1468
|
+
): OperationResponse<Paths.SearchEventHistory.Responses.$200>
|
|
1469
|
+
}
|
|
1470
|
+
['/v1/events/{event_name}:trigger']: {
|
|
1471
|
+
/**
|
|
1472
|
+
* triggerEvent - triggerEvent
|
|
1473
|
+
*
|
|
1474
|
+
* Explicitly trigger an event by providing input field values and an optional entity seed
|
|
1475
|
+
* for graph hydration. The event must be enabled for the organization.
|
|
1476
|
+
*
|
|
1477
|
+
* - For events with an entity_graph, a seed (entity_id + node_id) is required
|
|
1478
|
+
* - For events without an entity_graph, only fields are needed
|
|
1479
|
+
* - Entity operation context fields (operation, trigger_entity, activity_id, activity_type)
|
|
1480
|
+
* are not included when triggering via API
|
|
1481
|
+
*
|
|
1482
|
+
*/
|
|
1483
|
+
'post'(
|
|
1484
|
+
parameters?: Parameters<Paths.TriggerEvent.PathParameters> | null,
|
|
1485
|
+
data?: Paths.TriggerEvent.RequestBody,
|
|
1486
|
+
config?: AxiosRequestConfig
|
|
1487
|
+
): OperationResponse<Paths.TriggerEvent.Responses.$200>
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
type Client = OpenAPIClient<OperationMethods, PathsDictionary>
|
|
1492
|
+
|
|
1493
|
+
|
|
1494
|
+
type CommonEventMetadata = Components.Schemas.CommonEventMetadata;
|
|
1495
|
+
type ContextEntity = Components.Schemas.ContextEntity;
|
|
1496
|
+
type EntityOperationTrigger = Components.Schemas.EntityOperationTrigger;
|
|
1497
|
+
type Event = Components.Schemas.Event;
|
|
1498
|
+
type EventConfig = Components.Schemas.EventConfig;
|
|
1499
|
+
type EventConfigBase = Components.Schemas.EventConfigBase;
|
|
1500
|
+
type EventJsonSchema = Components.Schemas.EventJsonSchema;
|
|
1501
|
+
type FieldsParam = Components.Schemas.FieldsParam;
|
|
1502
|
+
type GraphDefinition = Components.Schemas.GraphDefinition;
|
|
1503
|
+
type GraphEdge = Components.Schemas.GraphEdge;
|
|
1504
|
+
type GraphNode = Components.Schemas.GraphNode;
|
|
1505
|
+
type PrimitiveField = Components.Schemas.PrimitiveField;
|
|
1506
|
+
type SchemaField = Components.Schemas.SchemaField;
|
|
1507
|
+
type SearchOptions = Components.Schemas.SearchOptions;
|
|
1508
|
+
type TriggerEventPayload = Components.Schemas.TriggerEventPayload;
|
|
1509
|
+
type TriggerEventResponse = Components.Schemas.TriggerEventResponse;
|
|
1510
|
+
type UpdateEventPayload = Components.Schemas.UpdateEventPayload;
|
|
1511
|
+
|
|
1512
|
+
export type { Client as C, EntityOperationTrigger as E, FieldsParam as F, GraphDefinition as G, OperationMethods as O, PathsDictionary as P, SchemaField as S, TriggerEventPayload as T, UpdateEventPayload as U, CommonEventMetadata as a, ContextEntity as b, Event as c, EventConfig as d, EventConfigBase as e, EventJsonSchema as f, GraphEdge as g, GraphNode as h, PrimitiveField as i, SearchOptions as j, TriggerEventResponse as k };
|