@epilot/sdk 2.1.0-rc.0 → 2.1.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/definitions/app.json +38 -0
- package/definitions/automation.json +2 -37
- package/definitions/blueprint-manifest-runtime.json +1 -1
- package/definitions/blueprint-manifest.json +115 -1
- package/definitions/customer-portal-runtime.json +1 -1
- package/definitions/customer-portal.json +279 -42
- package/definitions/data-management.json +10 -0
- package/definitions/email-template.json +25 -3
- package/definitions/entity.json +205 -3
- package/definitions/erp-integration-runtime.json +1 -1
- package/definitions/erp-integration.json +472 -13
- package/definitions/journey.json +257 -12
- package/definitions/kanban.json +630 -78
- package/definitions/organization-runtime.json +1 -1
- package/definitions/organization.json +614 -51
- package/definitions/workflow.json +40 -0
- package/dist/README-VG67PX4R.js +7 -0
- package/dist/README-W4B35MRN.cjs +7 -0
- package/dist/_index-AMVZBT2K.cjs +99 -0
- package/dist/_index-S6LFD3ER.js +99 -0
- package/dist/access-token-6BJDZSFE.cjs +7 -0
- package/dist/access-token-GSQZLDXR.js +7 -0
- package/dist/address-HA4RMRNQ.cjs +7 -0
- package/dist/address-QVJUGMOG.js +7 -0
- package/dist/address-suggestions-74244BAJ.js +7 -0
- package/dist/address-suggestions-IUQMYF27.cjs +7 -0
- package/dist/ai-agents-IZWFEUSH.js +7 -0
- package/dist/ai-agents-PWHKNRCX.cjs +7 -0
- package/dist/apis/access-token.cjs +10 -13
- package/dist/apis/access-token.js +7 -10
- package/dist/apis/address-suggestions.cjs +10 -13
- package/dist/apis/address-suggestions.js +7 -10
- package/dist/apis/address.cjs +10 -13
- package/dist/apis/address.js +7 -10
- package/dist/apis/ai-agents.cjs +10 -13
- package/dist/apis/ai-agents.js +7 -10
- package/dist/apis/app.cjs +10 -13
- package/dist/apis/app.js +7 -10
- package/dist/apis/audit-logs.cjs +10 -13
- package/dist/apis/audit-logs.js +7 -10
- package/dist/apis/automation.cjs +10 -13
- package/dist/apis/automation.js +7 -10
- package/dist/apis/billing.cjs +10 -13
- package/dist/apis/billing.js +7 -10
- package/dist/apis/blueprint-manifest.cjs +10 -13
- package/dist/apis/blueprint-manifest.js +7 -10
- package/dist/apis/consent.cjs +10 -13
- package/dist/apis/consent.js +7 -10
- package/dist/apis/customer-portal.cjs +10 -13
- package/dist/apis/customer-portal.js +7 -10
- package/dist/apis/dashboard.cjs +10 -13
- package/dist/apis/dashboard.js +7 -10
- package/dist/apis/data-management.cjs +10 -13
- package/dist/apis/data-management.js +7 -10
- package/dist/apis/deduplication.cjs +10 -13
- package/dist/apis/deduplication.js +7 -10
- package/dist/apis/design.cjs +10 -13
- package/dist/apis/design.js +7 -10
- package/dist/apis/document.cjs +10 -13
- package/dist/apis/document.js +7 -10
- package/dist/apis/email-settings.cjs +10 -13
- package/dist/apis/email-settings.js +7 -10
- package/dist/apis/email-template.cjs +10 -13
- package/dist/apis/email-template.js +7 -10
- package/dist/apis/entity-mapping.cjs +10 -13
- package/dist/apis/entity-mapping.js +7 -10
- package/dist/apis/entity.cjs +10 -13
- package/dist/apis/entity.js +7 -10
- package/dist/apis/environments.cjs +10 -13
- package/dist/apis/environments.js +7 -10
- package/dist/apis/erp-integration.cjs +10 -13
- package/dist/apis/erp-integration.js +7 -10
- package/dist/apis/event-catalog.cjs +10 -13
- package/dist/apis/event-catalog.js +7 -10
- package/dist/apis/file.cjs +10 -13
- package/dist/apis/file.js +7 -10
- package/dist/apis/iban.cjs +10 -13
- package/dist/apis/iban.js +7 -10
- package/dist/apis/journey.cjs +10 -13
- package/dist/apis/journey.js +7 -10
- package/dist/apis/kanban.cjs +10 -13
- package/dist/apis/kanban.js +7 -10
- package/dist/apis/message.cjs +10 -13
- package/dist/apis/message.js +7 -10
- package/dist/apis/metering.cjs +10 -13
- package/dist/apis/metering.js +7 -10
- package/dist/apis/notes.cjs +10 -13
- package/dist/apis/notes.js +7 -10
- package/dist/apis/notification.cjs +10 -13
- package/dist/apis/notification.js +7 -10
- package/dist/apis/organization.cjs +10 -13
- package/dist/apis/organization.d.cts +2 -2
- package/dist/apis/organization.d.ts +2 -2
- package/dist/apis/organization.js +7 -10
- package/dist/apis/partner-directory.cjs +10 -13
- package/dist/apis/partner-directory.js +7 -10
- package/dist/apis/permissions.cjs +10 -13
- package/dist/apis/permissions.js +7 -10
- package/dist/apis/pricing-tier.cjs +10 -13
- package/dist/apis/pricing-tier.js +7 -10
- package/dist/apis/pricing.cjs +10 -13
- package/dist/apis/pricing.js +7 -10
- package/dist/apis/purpose.cjs +10 -13
- package/dist/apis/purpose.js +7 -10
- package/dist/apis/sandbox.cjs +10 -13
- package/dist/apis/sandbox.js +7 -10
- package/dist/apis/submission.cjs +10 -13
- package/dist/apis/submission.js +7 -10
- package/dist/apis/targeting.cjs +10 -13
- package/dist/apis/targeting.js +7 -10
- package/dist/apis/template-variables.cjs +10 -13
- package/dist/apis/template-variables.js +7 -10
- package/dist/apis/user.cjs +10 -13
- package/dist/apis/user.js +7 -10
- package/dist/apis/validation-rules.cjs +10 -13
- package/dist/apis/validation-rules.js +7 -10
- package/dist/apis/webhooks.cjs +10 -13
- package/dist/apis/webhooks.js +7 -10
- package/dist/apis/workflow-definition.cjs +10 -13
- package/dist/apis/workflow-definition.js +7 -10
- package/dist/apis/workflow.cjs +10 -13
- package/dist/apis/workflow.js +7 -10
- package/dist/app-IKHWU222.cjs +7 -0
- package/dist/app-VLM3SWKA.js +7 -0
- package/dist/audit-logs-5VXHOQ7S.js +7 -0
- package/dist/audit-logs-D2LFUA2R.cjs +7 -0
- package/dist/automation-3HGCK725.cjs +7 -0
- package/dist/automation-72VGEJCY.js +7 -0
- package/dist/billing-DUWDISHP.cjs +7 -0
- package/dist/billing-IPALEAG2.js +7 -0
- package/dist/blueprint-manifest-CXSCRQ5X.js +7 -0
- package/dist/blueprint-manifest-SHNZPK5O.cjs +7 -0
- package/dist/chunk-2HOJWFQ4.js +14 -0
- package/dist/chunk-372VUPHN.js +14 -0
- package/dist/chunk-3HJEWWPS.cjs +14 -0
- package/dist/chunk-3N67SSL3.js +14 -0
- package/dist/chunk-3XEP56SV.cjs +204 -0
- package/dist/chunk-3ZZ57K3S.cjs +14 -0
- package/dist/chunk-4SWC43JO.cjs +14 -0
- package/dist/chunk-4VFQTSJQ.js +14 -0
- package/dist/chunk-57QIBYDN.js +14 -0
- package/dist/chunk-5SNJAD6F.cjs +14 -0
- package/dist/chunk-73H6TVKN.js +14 -0
- package/dist/chunk-A6JOROUC.cjs +14 -0
- package/dist/chunk-AJKH25H2.cjs +14 -0
- package/dist/chunk-ARWMTXJV.cjs +14 -0
- package/dist/chunk-B3ZGAG7B.js +14 -0
- package/dist/chunk-BH5ZXK4J.cjs +14 -0
- package/dist/chunk-BWFXLUK5.cjs +14 -0
- package/dist/chunk-C6UTZEHH.js +14 -0
- package/dist/chunk-CPKBR34V.js +14 -0
- package/dist/chunk-CWSHYFVZ.js +14 -0
- package/dist/chunk-DJKSULPK.js +14 -0
- package/dist/chunk-DNJ54L2G.js +14 -0
- package/dist/chunk-DY2D2IW5.cjs +14 -0
- package/dist/chunk-E26ZO7QM.cjs +14 -0
- package/dist/chunk-EBCHCYUO.js +14 -0
- package/dist/chunk-EPAIOB5U.cjs +14 -0
- package/dist/chunk-EQZMT2HF.cjs +14 -0
- package/dist/chunk-F376L6PP.cjs +14 -0
- package/dist/chunk-F472YLJG.cjs +14 -0
- package/dist/chunk-FXOX3X7E.cjs +14 -0
- package/dist/chunk-G2REP2VZ.cjs +14 -0
- package/dist/chunk-GLO477NZ.js +14 -0
- package/dist/chunk-H4VSK4KF.js +14 -0
- package/dist/chunk-HPSGM6QP.js +14 -0
- package/dist/chunk-HPYHWTTA.cjs +14 -0
- package/dist/chunk-IH4CMOML.js +14 -0
- package/dist/chunk-IMT3IE5M.cjs +14 -0
- package/dist/chunk-IP2WWEOU.js +14 -0
- package/dist/chunk-IS2VB342.js +14 -0
- package/dist/chunk-ITX53XAZ.js +14 -0
- package/dist/chunk-JXBXDTFG.cjs +14 -0
- package/dist/chunk-K62XK7KU.js +14 -0
- package/dist/chunk-KA3TGFJP.js +14 -0
- package/dist/chunk-KBOVBUBM.js +14 -0
- package/dist/chunk-KPGC2D6E.js +14 -0
- package/dist/chunk-KSXTBGIV.js +14 -0
- package/dist/chunk-LCIJ4TJ4.cjs +14 -0
- package/dist/chunk-LQOLYXGQ.cjs +14 -0
- package/dist/chunk-LSIWCIQV.js +14 -0
- package/dist/chunk-MHNSZ4HE.js +14 -0
- package/dist/chunk-MKX4CKAB.cjs +14 -0
- package/dist/chunk-MRTAFRO7.js +14 -0
- package/dist/chunk-MRZ7LGKZ.js +14 -0
- package/dist/chunk-MSASBR2Y.js +14 -0
- package/dist/chunk-NAWLLC3T.cjs +14 -0
- package/dist/chunk-NJK5F5TF.cjs +21 -0
- package/dist/chunk-NLSZVGHK.cjs +14 -0
- package/dist/chunk-O4LRVGOY.js +14 -0
- package/dist/chunk-OG2DMGU6.cjs +14 -0
- package/dist/chunk-OGQKJTXF.js +14 -0
- package/dist/chunk-PETLAONH.js +14 -0
- package/dist/chunk-PVSS2WPM.cjs +14 -0
- package/dist/chunk-PXITFTJA.cjs +14 -0
- package/dist/chunk-QDVPPRWI.cjs +14 -0
- package/dist/chunk-QKERXNJJ.cjs +14 -0
- package/dist/chunk-QLML3IP5.cjs +14 -0
- package/dist/chunk-QVAJ5JP4.js +14 -0
- package/dist/chunk-RD7E4OSJ.cjs +14 -0
- package/dist/chunk-RWSA3LXE.cjs +14 -0
- package/dist/chunk-RXSS67VI.cjs +14 -0
- package/dist/chunk-S3ZNESMC.cjs +14 -0
- package/dist/chunk-S7NDMDRX.js +14 -0
- package/dist/chunk-SK3VYIZ6.cjs +14 -0
- package/dist/chunk-SMGHAG5C.cjs +14 -0
- package/dist/chunk-T46LODOF.js +14 -0
- package/dist/chunk-TIJWJVKZ.js +14 -0
- package/dist/chunk-TLWCYLNA.js +14 -0
- package/dist/chunk-TRJLYZHD.js +14 -0
- package/dist/chunk-UKKJMCNH.js +14 -0
- package/dist/chunk-ULBEEHG4.js +204 -0
- package/dist/chunk-VGTUK3QD.cjs +14 -0
- package/dist/chunk-VQ7R36AC.js +14 -0
- package/dist/chunk-VVQB5W7U.cjs +14 -0
- package/dist/chunk-VVVATFGK.cjs +14 -0
- package/dist/chunk-WMTYO5OX.cjs +14 -0
- package/dist/chunk-WOSSSFXB.js +14 -0
- package/dist/chunk-WOXXNKTE.js +14 -0
- package/dist/chunk-XKI2OAYV.cjs +14 -0
- package/dist/chunk-XR4QF6KQ.cjs +14 -0
- package/dist/chunk-XYHTQ523.cjs +14 -0
- package/dist/chunk-XZYZLSUO.cjs +14 -0
- package/dist/chunk-YPSWSI3M.js +21 -0
- package/dist/chunk-YYBIU5BQ.js +14 -0
- package/dist/chunk-YZA5WZUS.js +14 -0
- package/dist/chunk-Z4LUE424.cjs +14 -0
- package/dist/chunk-ZV6XYUXS.js +14 -0
- package/dist/consent-CS2ZBZX4.cjs +7 -0
- package/dist/consent-NNYHF2N4.js +7 -0
- package/dist/customer-portal-D3SLPAHZ.js +7 -0
- package/dist/customer-portal-UR3GN4VU.cjs +7 -0
- package/dist/dashboard-UHYR5RTY.cjs +7 -0
- package/dist/dashboard-UTPGXFW5.js +7 -0
- package/dist/data-management-QH2IJ5QV.js +7 -0
- package/dist/data-management-TEFRLGSU.cjs +7 -0
- package/dist/deduplication-ECVAZVVA.cjs +7 -0
- package/dist/deduplication-GYIST22B.js +7 -0
- package/dist/design-KUVXMFFK.cjs +7 -0
- package/dist/design-YKBXRW5C.js +7 -0
- package/dist/document-CY2A2OE7.js +7 -0
- package/dist/document-RYQ7MF6U.cjs +7 -0
- package/dist/email-settings-TQ5GGDYG.js +7 -0
- package/dist/email-settings-TQC34GST.cjs +7 -0
- package/dist/email-template-M2VVL4TI.cjs +7 -0
- package/dist/email-template-WYROV3UG.js +7 -0
- package/dist/entity-FA6PZX6S.js +7 -0
- package/dist/entity-IX5NSHPX.cjs +7 -0
- package/dist/entity-mapping-7J3IAGKQ.js +7 -0
- package/dist/entity-mapping-ZNMFCUKK.cjs +7 -0
- package/dist/environments-E3X6NYGX.js +7 -0
- package/dist/environments-P2JS4F5N.cjs +7 -0
- package/dist/erp-integration-EP2XFEH5.js +7 -0
- package/dist/erp-integration-NNV72VFI.cjs +7 -0
- package/dist/event-catalog-C45ISVMP.cjs +7 -0
- package/dist/event-catalog-D7VJ7WRS.js +7 -0
- package/dist/file-UOWBTDIU.cjs +7 -0
- package/dist/file-XSN3NAVZ.js +7 -0
- package/dist/iban-24GHLFDB.cjs +7 -0
- package/dist/iban-LDKYDVQV.js +7 -0
- package/dist/index.cjs +199 -58
- package/dist/index.d.cts +17 -2
- package/dist/index.d.ts +17 -2
- package/dist/index.js +197 -56
- package/dist/journey-7CKX67M7.js +7 -0
- package/dist/journey-EUZ6MVHG.cjs +7 -0
- package/dist/kanban-CHTH2ZSY.cjs +7 -0
- package/dist/kanban-HI6LL5WY.js +7 -0
- package/dist/message-3XZLJR6R.cjs +7 -0
- package/dist/message-ZNMCS5YH.js +7 -0
- package/dist/metering-DZNZPPY6.cjs +7 -0
- package/dist/metering-KOSCPPKB.js +7 -0
- package/dist/notes-3AO5GXIT.js +7 -0
- package/dist/notes-MPWOQC5J.cjs +7 -0
- package/dist/notification-PZOCUYD5.cjs +7 -0
- package/dist/notification-VWDZRSFZ.js +7 -0
- package/dist/organization-RARYYG2E.cjs +7 -0
- package/dist/organization-ZERPH2IH.js +7 -0
- package/dist/{organization.d-Bd2Hmk8v.d.cts → organization.d-DqwnNxMg.d.cts} +34 -7
- package/dist/{organization.d-Bd2Hmk8v.d.ts → organization.d-DqwnNxMg.d.ts} +34 -7
- package/dist/partner-directory-2XMPQWWX.js +7 -0
- package/dist/partner-directory-WHNTKQ5E.cjs +7 -0
- package/dist/permissions-4T3GFNB4.js +7 -0
- package/dist/permissions-FGBIJNN7.cjs +7 -0
- package/dist/pricing-4Z4TOETA.cjs +7 -0
- package/dist/pricing-C65DTZSX.js +7 -0
- package/dist/pricing-tier-NI35WOUP.cjs +7 -0
- package/dist/pricing-tier-VUOFK5Q7.js +7 -0
- package/dist/purpose-AKOEUHZ4.cjs +7 -0
- package/dist/purpose-RBRV3AQZ.js +7 -0
- package/dist/sandbox-2KN4X66E.cjs +7 -0
- package/dist/sandbox-L2SOOGGR.js +7 -0
- package/dist/submission-7BISSPO6.js +7 -0
- package/dist/submission-Q24BU4GS.cjs +7 -0
- package/dist/targeting-EYGYZD6M.cjs +7 -0
- package/dist/targeting-GEJTJN5Z.js +7 -0
- package/dist/template-variables-OAYS2E3G.cjs +1148 -0
- package/dist/template-variables-VKDJJZUT.js +1148 -0
- package/dist/user-EIEOI3OG.js +7 -0
- package/dist/user-NJJ7XVKB.cjs +7 -0
- package/dist/validation-rules-P6F5P73P.js +7 -0
- package/dist/validation-rules-VDU3CIZV.cjs +7 -0
- package/dist/webhooks-I7JWU34X.cjs +7 -0
- package/dist/webhooks-WPLEHVPX.js +7 -0
- package/dist/workflow-3LLURW3H.js +7 -0
- package/dist/workflow-RAGQDYXT.cjs +7 -0
- package/dist/workflow-definition-B6ELOZUR.cjs +7 -0
- package/dist/workflow-definition-D24CRCK2.js +7 -0
- package/docs/access-token.md +440 -0
- package/docs/address-suggestions.md +256 -0
- package/docs/address.md +284 -0
- package/docs/ai-agents.md +1891 -0
- package/docs/app.md +3388 -0
- package/docs/audit-logs.md +242 -0
- package/docs/automation.md +4044 -0
- package/docs/billing.md +783 -0
- package/docs/blueprint-manifest.md +3234 -0
- package/docs/consent.md +213 -0
- package/docs/customer-portal.md +11399 -0
- package/docs/dashboard.md +640 -0
- package/docs/data-management.md +883 -0
- package/docs/deduplication.md +135 -0
- package/docs/design.md +1273 -0
- package/docs/document.md +590 -0
- package/docs/email-settings.md +1544 -0
- package/docs/email-template.md +1197 -0
- package/docs/entity-mapping.md +2864 -0
- package/docs/entity.md +9595 -0
- package/docs/environments.md +259 -0
- package/docs/erp-integration.md +4572 -0
- package/docs/event-catalog.md +835 -0
- package/docs/file.md +1453 -0
- package/docs/iban.md +61 -0
- package/docs/journey.md +2268 -0
- package/docs/kanban.md +882 -0
- package/docs/message.md +2122 -0
- package/docs/metering.md +1431 -0
- package/docs/notes.md +670 -0
- package/docs/notification.md +1207 -0
- package/docs/organization.md +733 -0
- package/docs/partner-directory.md +1197 -0
- package/docs/permissions.md +1047 -0
- package/docs/pricing-tier.md +81 -0
- package/docs/pricing.md +5923 -0
- package/docs/purpose.md +283 -0
- package/docs/sandbox.md +389 -0
- package/docs/submission.md +195 -0
- package/docs/targeting.md +959 -0
- package/docs/template-variables.md +1141 -0
- package/docs/user.md +2555 -0
- package/docs/validation-rules.md +1597 -0
- package/docs/webhooks.md +996 -0
- package/docs/workflow-definition.md +3842 -0
- package/docs/workflow.md +4465 -0
- package/package.json +3 -2
- package/dist/chunk-XE25WERA.js +0 -125
- package/dist/chunk-XEQMAKGA.cjs +0 -125
|
@@ -0,0 +1,883 @@
|
|
|
1
|
+
# Data Management API
|
|
2
|
+
|
|
3
|
+
- **Base URL:** `https://data-management.sls.epilot.io`
|
|
4
|
+
- **Full API Docs:** [https://docs.epilot.io/api/data-management](https://docs.epilot.io/api/data-management)
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { epilot } from '@epilot/sdk'
|
|
10
|
+
|
|
11
|
+
epilot.authorize(() => '<token>')
|
|
12
|
+
const { data } = await epilot.dataManagement.queryEntities(...)
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Tree-shakeable import
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { getClient, authorize } from '@epilot/sdk/data-management'
|
|
19
|
+
|
|
20
|
+
const dataManagementClient = getClient()
|
|
21
|
+
authorize(dataManagementClient, () => '<token>')
|
|
22
|
+
const { data } = await dataManagementClient.queryEntities(...)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Operations
|
|
26
|
+
|
|
27
|
+
**Data Management**
|
|
28
|
+
- [`queryEntities`](#queryentities)
|
|
29
|
+
- [`createJob`](#createjob)
|
|
30
|
+
- [`updateJob`](#updatejob)
|
|
31
|
+
- [`getJob`](#getjob)
|
|
32
|
+
- [`getJobReportUrl`](#getjobreporturl)
|
|
33
|
+
- [`getConfig`](#getconfig)
|
|
34
|
+
- [`createJobForConfig`](#createjobforconfig)
|
|
35
|
+
- [`upsertConfig`](#upsertconfig)
|
|
36
|
+
- [`listConfigs`](#listconfigs)
|
|
37
|
+
- [`listJobs`](#listjobs)
|
|
38
|
+
|
|
39
|
+
**Schemas**
|
|
40
|
+
- [`ConfigType`](#configtype)
|
|
41
|
+
- [`JobStatus`](#jobstatus)
|
|
42
|
+
- [`JobTrigger`](#jobtrigger)
|
|
43
|
+
- [`JobReportFormat`](#jobreportformat)
|
|
44
|
+
- [`JobReport`](#jobreport)
|
|
45
|
+
- [`CreateJobRequest`](#createjobrequest)
|
|
46
|
+
- [`JobDetails`](#jobdetails)
|
|
47
|
+
- [`UpdateJobRequest`](#updatejobrequest)
|
|
48
|
+
- [`Job`](#job)
|
|
49
|
+
- [`ListJobsResponse`](#listjobsresponse)
|
|
50
|
+
- [`JobReportUrlResponse`](#jobreporturlresponse)
|
|
51
|
+
- [`QueryFilterType`](#queryfiltertype)
|
|
52
|
+
- [`QueryFilter`](#queryfilter)
|
|
53
|
+
- [`QueryConfig`](#queryconfig)
|
|
54
|
+
- [`QueryEntitiesRequest`](#queryentitiesrequest)
|
|
55
|
+
- [`QueryEntitiesResult`](#queryentitiesresult)
|
|
56
|
+
- [`ConfigSchedule`](#configschedule)
|
|
57
|
+
- [`IntervalConfigSchedule`](#intervalconfigschedule)
|
|
58
|
+
- [`UpsertConfigRequest`](#upsertconfigrequest)
|
|
59
|
+
- [`Config`](#config)
|
|
60
|
+
- [`DeletionRelationEntitySchema`](#deletionrelationentityschema)
|
|
61
|
+
- [`ListConfigsResponse`](#listconfigsresponse)
|
|
62
|
+
|
|
63
|
+
### `queryEntities`
|
|
64
|
+
|
|
65
|
+
Query entities using a saved view with additional data filters
|
|
66
|
+
|
|
67
|
+
`POST /data-management/v1/{entity_schema}/query`
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
const { data } = await client.queryEntities(
|
|
71
|
+
{
|
|
72
|
+
entity_schema: 'example',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
saved_view_id: 'string',
|
|
76
|
+
include_deleted: 'true',
|
|
77
|
+
filters: [
|
|
78
|
+
{
|
|
79
|
+
type: 'entity_workflows_only_in_closed_or_cancelled_status',
|
|
80
|
+
related_entity_schemas: ['string'],
|
|
81
|
+
lookback_period_days: 0,
|
|
82
|
+
message_type: ['SENT']
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
from: 0,
|
|
86
|
+
size: 0,
|
|
87
|
+
hydrate: true,
|
|
88
|
+
fields: ['string']
|
|
89
|
+
},
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
<details>
|
|
94
|
+
<summary>Response</summary>
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"hits": 0,
|
|
99
|
+
"results": [
|
|
100
|
+
{}
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### `createJob`
|
|
110
|
+
|
|
111
|
+
Create a new job run
|
|
112
|
+
|
|
113
|
+
`POST /data-management/v1/{entity_schema}/jobs`
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
const { data } = await client.createJob(
|
|
117
|
+
{
|
|
118
|
+
entity_schema: 'example',
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'deletion',
|
|
122
|
+
config_id: 'string',
|
|
123
|
+
scheduled_for: '1970-01-01',
|
|
124
|
+
status: 'in_progress',
|
|
125
|
+
started_at: '1970-01-01T00:00:00.000Z'
|
|
126
|
+
},
|
|
127
|
+
)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
<details>
|
|
131
|
+
<summary>Response</summary>
|
|
132
|
+
|
|
133
|
+
```json
|
|
134
|
+
{
|
|
135
|
+
"id": "string",
|
|
136
|
+
"type": "deletion",
|
|
137
|
+
"config_id": "string",
|
|
138
|
+
"entity_schema": "string",
|
|
139
|
+
"scheduled_for": "1970-01-01",
|
|
140
|
+
"status": "in_progress",
|
|
141
|
+
"details": {},
|
|
142
|
+
"started_at": "1970-01-01T00:00:00.000Z",
|
|
143
|
+
"completed_at": "1970-01-01T00:00:00.000Z",
|
|
144
|
+
"error": "string",
|
|
145
|
+
"report": {
|
|
146
|
+
"bucket": "string",
|
|
147
|
+
"key": "string",
|
|
148
|
+
"format": "csv"
|
|
149
|
+
},
|
|
150
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
151
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
152
|
+
"trigger": "schedule",
|
|
153
|
+
"triggered_by": "string"
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
</details>
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### `updateJob`
|
|
162
|
+
|
|
163
|
+
Update an existing job run
|
|
164
|
+
|
|
165
|
+
`PATCH /data-management/v1/{entity_schema}/jobs/{job_id}`
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
const { data } = await client.updateJob(
|
|
169
|
+
{
|
|
170
|
+
entity_schema: 'example',
|
|
171
|
+
job_id: 'example',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
status: 'in_progress',
|
|
175
|
+
details: {},
|
|
176
|
+
completed_at: '1970-01-01T00:00:00.000Z',
|
|
177
|
+
error: 'string',
|
|
178
|
+
report: {
|
|
179
|
+
bucket: 'string',
|
|
180
|
+
key: 'string',
|
|
181
|
+
format: 'csv'
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
)
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
<details>
|
|
188
|
+
<summary>Response</summary>
|
|
189
|
+
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"id": "string",
|
|
193
|
+
"type": "deletion",
|
|
194
|
+
"config_id": "string",
|
|
195
|
+
"entity_schema": "string",
|
|
196
|
+
"scheduled_for": "1970-01-01",
|
|
197
|
+
"status": "in_progress",
|
|
198
|
+
"details": {},
|
|
199
|
+
"started_at": "1970-01-01T00:00:00.000Z",
|
|
200
|
+
"completed_at": "1970-01-01T00:00:00.000Z",
|
|
201
|
+
"error": "string",
|
|
202
|
+
"report": {
|
|
203
|
+
"bucket": "string",
|
|
204
|
+
"key": "string",
|
|
205
|
+
"format": "csv"
|
|
206
|
+
},
|
|
207
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
208
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
209
|
+
"trigger": "schedule",
|
|
210
|
+
"triggered_by": "string"
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
</details>
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### `getJob`
|
|
219
|
+
|
|
220
|
+
Get a job by id
|
|
221
|
+
|
|
222
|
+
`GET /data-management/v1/jobs/{job_id}`
|
|
223
|
+
|
|
224
|
+
```ts
|
|
225
|
+
const { data } = await client.getJob({
|
|
226
|
+
job_id: 'example',
|
|
227
|
+
})
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
<details>
|
|
231
|
+
<summary>Response</summary>
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{
|
|
235
|
+
"id": "string",
|
|
236
|
+
"type": "deletion",
|
|
237
|
+
"config_id": "string",
|
|
238
|
+
"entity_schema": "string",
|
|
239
|
+
"scheduled_for": "1970-01-01",
|
|
240
|
+
"status": "in_progress",
|
|
241
|
+
"details": {},
|
|
242
|
+
"started_at": "1970-01-01T00:00:00.000Z",
|
|
243
|
+
"completed_at": "1970-01-01T00:00:00.000Z",
|
|
244
|
+
"error": "string",
|
|
245
|
+
"report": {
|
|
246
|
+
"bucket": "string",
|
|
247
|
+
"key": "string",
|
|
248
|
+
"format": "csv"
|
|
249
|
+
},
|
|
250
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
251
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
252
|
+
"trigger": "schedule",
|
|
253
|
+
"triggered_by": "string"
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
</details>
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
### `getJobReportUrl`
|
|
262
|
+
|
|
263
|
+
Get report download URL for a job
|
|
264
|
+
|
|
265
|
+
`GET /data-management/v1/jobs/{job_id}/report-url`
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
const { data } = await client.getJobReportUrl({
|
|
269
|
+
job_id: 'example',
|
|
270
|
+
})
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary>Response</summary>
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"url": "string",
|
|
279
|
+
"expires_in": 0
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
</details>
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
### `getConfig`
|
|
288
|
+
|
|
289
|
+
Get a config by id
|
|
290
|
+
|
|
291
|
+
`GET /data-management/v1/configs/{config_id}`
|
|
292
|
+
|
|
293
|
+
```ts
|
|
294
|
+
const { data } = await client.getConfig({
|
|
295
|
+
config_id: 'example',
|
|
296
|
+
})
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
<details>
|
|
300
|
+
<summary>Response</summary>
|
|
301
|
+
|
|
302
|
+
```json
|
|
303
|
+
{
|
|
304
|
+
"id": "string",
|
|
305
|
+
"type": "deletion",
|
|
306
|
+
"entity_schema": "string",
|
|
307
|
+
"query": {
|
|
308
|
+
"saved_view_id": "string",
|
|
309
|
+
"include_deleted": "true",
|
|
310
|
+
"filters": [
|
|
311
|
+
{
|
|
312
|
+
"type": "entity_workflows_only_in_closed_or_cancelled_status",
|
|
313
|
+
"related_entity_schemas": ["string"],
|
|
314
|
+
"lookback_period_days": 0,
|
|
315
|
+
"message_type": ["SENT"]
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
"schedule": {
|
|
320
|
+
"frequency": "interval",
|
|
321
|
+
"interval_days": 1,
|
|
322
|
+
"start_date": "1970-01-01",
|
|
323
|
+
"end_date": "1970-01-01"
|
|
324
|
+
},
|
|
325
|
+
"enabled": true,
|
|
326
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
327
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
328
|
+
"next_run_at": "1970-01-01",
|
|
329
|
+
"relations_for_deletion": ["contact"],
|
|
330
|
+
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
331
|
+
}
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
</details>
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
### `createJobForConfig`
|
|
339
|
+
|
|
340
|
+
Trigger a manual job run for a config
|
|
341
|
+
|
|
342
|
+
`POST /data-management/v1/configs/{config_id}/jobs`
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
const { data } = await client.createJobForConfig({
|
|
346
|
+
config_id: 'example',
|
|
347
|
+
})
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
<details>
|
|
351
|
+
<summary>Response</summary>
|
|
352
|
+
|
|
353
|
+
```json
|
|
354
|
+
{
|
|
355
|
+
"id": "string",
|
|
356
|
+
"type": "deletion",
|
|
357
|
+
"config_id": "string",
|
|
358
|
+
"entity_schema": "string",
|
|
359
|
+
"scheduled_for": "1970-01-01",
|
|
360
|
+
"status": "in_progress",
|
|
361
|
+
"details": {},
|
|
362
|
+
"started_at": "1970-01-01T00:00:00.000Z",
|
|
363
|
+
"completed_at": "1970-01-01T00:00:00.000Z",
|
|
364
|
+
"error": "string",
|
|
365
|
+
"report": {
|
|
366
|
+
"bucket": "string",
|
|
367
|
+
"key": "string",
|
|
368
|
+
"format": "csv"
|
|
369
|
+
},
|
|
370
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
371
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
372
|
+
"trigger": "schedule",
|
|
373
|
+
"triggered_by": "string"
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
</details>
|
|
378
|
+
|
|
379
|
+
---
|
|
380
|
+
|
|
381
|
+
### `upsertConfig`
|
|
382
|
+
|
|
383
|
+
Upsert config
|
|
384
|
+
|
|
385
|
+
`POST /data-management/v1/{entity_schema}/configs`
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
const { data } = await client.upsertConfig(
|
|
389
|
+
{
|
|
390
|
+
entity_schema: 'example',
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
type: 'deletion',
|
|
394
|
+
query: {
|
|
395
|
+
saved_view_id: 'string',
|
|
396
|
+
include_deleted: 'true',
|
|
397
|
+
filters: [
|
|
398
|
+
{
|
|
399
|
+
type: 'entity_workflows_only_in_closed_or_cancelled_status',
|
|
400
|
+
related_entity_schemas: ['string'],
|
|
401
|
+
lookback_period_days: 0,
|
|
402
|
+
message_type: ['SENT']
|
|
403
|
+
}
|
|
404
|
+
]
|
|
405
|
+
},
|
|
406
|
+
schedule: {
|
|
407
|
+
frequency: 'interval',
|
|
408
|
+
interval_days: 1,
|
|
409
|
+
start_date: '1970-01-01',
|
|
410
|
+
end_date: '1970-01-01'
|
|
411
|
+
},
|
|
412
|
+
relations_for_deletion: ['contact'],
|
|
413
|
+
enabled: true
|
|
414
|
+
},
|
|
415
|
+
)
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
<details>
|
|
419
|
+
<summary>Response</summary>
|
|
420
|
+
|
|
421
|
+
```json
|
|
422
|
+
{
|
|
423
|
+
"id": "string",
|
|
424
|
+
"type": "deletion",
|
|
425
|
+
"entity_schema": "string",
|
|
426
|
+
"query": {
|
|
427
|
+
"saved_view_id": "string",
|
|
428
|
+
"include_deleted": "true",
|
|
429
|
+
"filters": [
|
|
430
|
+
{
|
|
431
|
+
"type": "entity_workflows_only_in_closed_or_cancelled_status",
|
|
432
|
+
"related_entity_schemas": ["string"],
|
|
433
|
+
"lookback_period_days": 0,
|
|
434
|
+
"message_type": ["SENT"]
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
"schedule": {
|
|
439
|
+
"frequency": "interval",
|
|
440
|
+
"interval_days": 1,
|
|
441
|
+
"start_date": "1970-01-01",
|
|
442
|
+
"end_date": "1970-01-01"
|
|
443
|
+
},
|
|
444
|
+
"enabled": true,
|
|
445
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
446
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
447
|
+
"next_run_at": "1970-01-01",
|
|
448
|
+
"relations_for_deletion": ["contact"],
|
|
449
|
+
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
450
|
+
}
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
</details>
|
|
454
|
+
|
|
455
|
+
---
|
|
456
|
+
|
|
457
|
+
### `listConfigs`
|
|
458
|
+
|
|
459
|
+
List configs
|
|
460
|
+
|
|
461
|
+
`GET /data-management/v1/configs`
|
|
462
|
+
|
|
463
|
+
```ts
|
|
464
|
+
const { data } = await client.listConfigs({
|
|
465
|
+
limit: 1,
|
|
466
|
+
cursor: 'example',
|
|
467
|
+
entity_schema: 'example',
|
|
468
|
+
type: 'example',
|
|
469
|
+
next_run_at: 'example',
|
|
470
|
+
enabled: true,
|
|
471
|
+
})
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
<details>
|
|
475
|
+
<summary>Response</summary>
|
|
476
|
+
|
|
477
|
+
```json
|
|
478
|
+
{
|
|
479
|
+
"configs": [
|
|
480
|
+
{
|
|
481
|
+
"id": "string",
|
|
482
|
+
"type": "deletion",
|
|
483
|
+
"entity_schema": "string",
|
|
484
|
+
"query": {
|
|
485
|
+
"saved_view_id": "string",
|
|
486
|
+
"include_deleted": "true",
|
|
487
|
+
"filters": [
|
|
488
|
+
{
|
|
489
|
+
"type": "entity_workflows_only_in_closed_or_cancelled_status",
|
|
490
|
+
"related_entity_schemas": ["string"],
|
|
491
|
+
"lookback_period_days": 0,
|
|
492
|
+
"message_type": ["SENT"]
|
|
493
|
+
}
|
|
494
|
+
]
|
|
495
|
+
},
|
|
496
|
+
"schedule": {
|
|
497
|
+
"frequency": "interval",
|
|
498
|
+
"interval_days": 1,
|
|
499
|
+
"start_date": "1970-01-01",
|
|
500
|
+
"end_date": "1970-01-01"
|
|
501
|
+
},
|
|
502
|
+
"enabled": true,
|
|
503
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
504
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
505
|
+
"next_run_at": "1970-01-01",
|
|
506
|
+
"relations_for_deletion": ["contact"],
|
|
507
|
+
"last_run_at": "1970-01-01T00:00:00.000Z"
|
|
508
|
+
}
|
|
509
|
+
],
|
|
510
|
+
"cursor": "string"
|
|
511
|
+
}
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
</details>
|
|
515
|
+
|
|
516
|
+
---
|
|
517
|
+
|
|
518
|
+
### `listJobs`
|
|
519
|
+
|
|
520
|
+
List jobs
|
|
521
|
+
|
|
522
|
+
`GET /data-management/v1/jobs`
|
|
523
|
+
|
|
524
|
+
```ts
|
|
525
|
+
const { data } = await client.listJobs({
|
|
526
|
+
limit: 1,
|
|
527
|
+
cursor: 'example',
|
|
528
|
+
entity_schema: 'example',
|
|
529
|
+
type: 'example',
|
|
530
|
+
status: 'example',
|
|
531
|
+
config_id: 'example',
|
|
532
|
+
})
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
<details>
|
|
536
|
+
<summary>Response</summary>
|
|
537
|
+
|
|
538
|
+
```json
|
|
539
|
+
{
|
|
540
|
+
"jobs": [
|
|
541
|
+
{
|
|
542
|
+
"id": "string",
|
|
543
|
+
"type": "deletion",
|
|
544
|
+
"config_id": "string",
|
|
545
|
+
"entity_schema": "string",
|
|
546
|
+
"scheduled_for": "1970-01-01",
|
|
547
|
+
"status": "in_progress",
|
|
548
|
+
"details": {},
|
|
549
|
+
"started_at": "1970-01-01T00:00:00.000Z",
|
|
550
|
+
"completed_at": "1970-01-01T00:00:00.000Z",
|
|
551
|
+
"error": "string",
|
|
552
|
+
"report": {
|
|
553
|
+
"bucket": "string",
|
|
554
|
+
"key": "string",
|
|
555
|
+
"format": "csv"
|
|
556
|
+
},
|
|
557
|
+
"created_at": "1970-01-01T00:00:00.000Z",
|
|
558
|
+
"last_updated_at": "1970-01-01T00:00:00.000Z",
|
|
559
|
+
"trigger": "schedule",
|
|
560
|
+
"triggered_by": "string"
|
|
561
|
+
}
|
|
562
|
+
],
|
|
563
|
+
"cursor": "string"
|
|
564
|
+
}
|
|
565
|
+
```
|
|
566
|
+
|
|
567
|
+
</details>
|
|
568
|
+
|
|
569
|
+
---
|
|
570
|
+
|
|
571
|
+
## Schemas
|
|
572
|
+
|
|
573
|
+
### `ConfigType`
|
|
574
|
+
|
|
575
|
+
Type of configuration (e.g. deletion)
|
|
576
|
+
|
|
577
|
+
```ts
|
|
578
|
+
type ConfigType = "deletion"
|
|
579
|
+
```
|
|
580
|
+
|
|
581
|
+
### `JobStatus`
|
|
582
|
+
|
|
583
|
+
```ts
|
|
584
|
+
type JobStatus = "in_progress" | "success" | "failed"
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
### `JobTrigger`
|
|
588
|
+
|
|
589
|
+
```ts
|
|
590
|
+
type JobTrigger = "schedule" | "manual"
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
### `JobReportFormat`
|
|
594
|
+
|
|
595
|
+
```ts
|
|
596
|
+
type JobReportFormat = "csv"
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
### `JobReport`
|
|
600
|
+
|
|
601
|
+
```ts
|
|
602
|
+
type JobReport = {
|
|
603
|
+
bucket?: string
|
|
604
|
+
key?: string
|
|
605
|
+
format?: "csv"
|
|
606
|
+
}
|
|
607
|
+
```
|
|
608
|
+
|
|
609
|
+
### `CreateJobRequest`
|
|
610
|
+
|
|
611
|
+
```ts
|
|
612
|
+
type CreateJobRequest = {
|
|
613
|
+
type: "deletion"
|
|
614
|
+
config_id: string
|
|
615
|
+
scheduled_for: string // date
|
|
616
|
+
status?: "in_progress" | "success" | "failed"
|
|
617
|
+
started_at?: string // date-time
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
### `JobDetails`
|
|
622
|
+
|
|
623
|
+
Generic, type-specific job details payload (e.g. matched count, deleted count, failed count, etc.).
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
type JobDetails = Record<string, unknown>
|
|
627
|
+
```
|
|
628
|
+
|
|
629
|
+
### `UpdateJobRequest`
|
|
630
|
+
|
|
631
|
+
```ts
|
|
632
|
+
type UpdateJobRequest = {
|
|
633
|
+
status?: "in_progress" | "success" | "failed"
|
|
634
|
+
details?: Record<string, unknown>
|
|
635
|
+
completed_at?: string // date-time
|
|
636
|
+
error?: string
|
|
637
|
+
report?: {
|
|
638
|
+
bucket?: string
|
|
639
|
+
key?: string
|
|
640
|
+
format?: "csv"
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
### `Job`
|
|
646
|
+
|
|
647
|
+
```ts
|
|
648
|
+
type Job = {
|
|
649
|
+
id: string
|
|
650
|
+
type: "deletion"
|
|
651
|
+
config_id: string
|
|
652
|
+
entity_schema: string
|
|
653
|
+
scheduled_for: string // date
|
|
654
|
+
status: "in_progress" | "success" | "failed"
|
|
655
|
+
details?: Record<string, unknown>
|
|
656
|
+
started_at?: string // date-time
|
|
657
|
+
completed_at?: string // date-time
|
|
658
|
+
error?: string
|
|
659
|
+
report?: {
|
|
660
|
+
bucket?: string
|
|
661
|
+
key?: string
|
|
662
|
+
format?: "csv"
|
|
663
|
+
}
|
|
664
|
+
created_at: string // date-time
|
|
665
|
+
last_updated_at: string // date-time
|
|
666
|
+
trigger?: "schedule" | "manual"
|
|
667
|
+
triggered_by?: string
|
|
668
|
+
}
|
|
669
|
+
```
|
|
670
|
+
|
|
671
|
+
### `ListJobsResponse`
|
|
672
|
+
|
|
673
|
+
```ts
|
|
674
|
+
type ListJobsResponse = {
|
|
675
|
+
jobs?: Array<{
|
|
676
|
+
id: string
|
|
677
|
+
type: "deletion"
|
|
678
|
+
config_id: string
|
|
679
|
+
entity_schema: string
|
|
680
|
+
scheduled_for: string // date
|
|
681
|
+
status: "in_progress" | "success" | "failed"
|
|
682
|
+
details?: Record<string, unknown>
|
|
683
|
+
started_at?: string // date-time
|
|
684
|
+
completed_at?: string // date-time
|
|
685
|
+
error?: string
|
|
686
|
+
report?: {
|
|
687
|
+
bucket?: { ... }
|
|
688
|
+
key?: { ... }
|
|
689
|
+
format?: { ... }
|
|
690
|
+
}
|
|
691
|
+
created_at: string // date-time
|
|
692
|
+
last_updated_at: string // date-time
|
|
693
|
+
trigger?: "schedule" | "manual"
|
|
694
|
+
triggered_by?: string
|
|
695
|
+
}>
|
|
696
|
+
cursor?: string
|
|
697
|
+
}
|
|
698
|
+
```
|
|
699
|
+
|
|
700
|
+
### `JobReportUrlResponse`
|
|
701
|
+
|
|
702
|
+
```ts
|
|
703
|
+
type JobReportUrlResponse = {
|
|
704
|
+
url?: string
|
|
705
|
+
expires_in?: number
|
|
706
|
+
}
|
|
707
|
+
```
|
|
708
|
+
|
|
709
|
+
### `QueryFilterType`
|
|
710
|
+
|
|
711
|
+
```ts
|
|
712
|
+
type QueryFilterType = "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"
|
|
713
|
+
```
|
|
714
|
+
|
|
715
|
+
### `QueryFilter`
|
|
716
|
+
|
|
717
|
+
```ts
|
|
718
|
+
type QueryFilter = {
|
|
719
|
+
type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"
|
|
720
|
+
related_entity_schemas?: string[]
|
|
721
|
+
lookback_period_days?: number
|
|
722
|
+
message_type?: "SENT" | "RECEIVED"[]
|
|
723
|
+
}
|
|
724
|
+
```
|
|
725
|
+
|
|
726
|
+
### `QueryConfig`
|
|
727
|
+
|
|
728
|
+
```ts
|
|
729
|
+
type QueryConfig = {
|
|
730
|
+
saved_view_id: string
|
|
731
|
+
include_deleted?: "true" | "false" | "only"
|
|
732
|
+
filters?: Array<{
|
|
733
|
+
type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"
|
|
734
|
+
related_entity_schemas?: string[]
|
|
735
|
+
lookback_period_days?: number
|
|
736
|
+
message_type?: "SENT" | "RECEIVED"[]
|
|
737
|
+
}>
|
|
738
|
+
}
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
### `QueryEntitiesRequest`
|
|
742
|
+
|
|
743
|
+
```ts
|
|
744
|
+
type QueryEntitiesRequest = {
|
|
745
|
+
saved_view_id: string
|
|
746
|
+
include_deleted?: "true" | "false" | "only"
|
|
747
|
+
filters?: Array<{
|
|
748
|
+
type: "entity_workflows_only_in_closed_or_cancelled_status" | "no_related_entities" | "related_entities_all_in_closed_or_cancelled_status" | "related_entities_workflows_only_in_closed_or_cancelled_status" | "no_email_communication_since"
|
|
749
|
+
related_entity_schemas?: string[]
|
|
750
|
+
lookback_period_days?: number
|
|
751
|
+
message_type?: "SENT" | "RECEIVED"[]
|
|
752
|
+
}>
|
|
753
|
+
from?: number
|
|
754
|
+
size?: number
|
|
755
|
+
hydrate?: boolean
|
|
756
|
+
fields?: string[]
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### `QueryEntitiesResult`
|
|
761
|
+
|
|
762
|
+
```ts
|
|
763
|
+
type QueryEntitiesResult = {
|
|
764
|
+
hits?: number
|
|
765
|
+
results?: Record<string, unknown>[]
|
|
766
|
+
}
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### `ConfigSchedule`
|
|
770
|
+
|
|
771
|
+
```ts
|
|
772
|
+
type ConfigSchedule = {
|
|
773
|
+
frequency: "interval"
|
|
774
|
+
interval_days: number
|
|
775
|
+
start_date?: string // date
|
|
776
|
+
end_date?: string // date
|
|
777
|
+
}
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
### `IntervalConfigSchedule`
|
|
781
|
+
|
|
782
|
+
```ts
|
|
783
|
+
type IntervalConfigSchedule = {
|
|
784
|
+
frequency: "interval"
|
|
785
|
+
interval_days: number
|
|
786
|
+
start_date?: string // date
|
|
787
|
+
end_date?: string // date
|
|
788
|
+
}
|
|
789
|
+
```
|
|
790
|
+
|
|
791
|
+
### `UpsertConfigRequest`
|
|
792
|
+
|
|
793
|
+
```ts
|
|
794
|
+
type UpsertConfigRequest = {
|
|
795
|
+
type: "deletion"
|
|
796
|
+
query: {
|
|
797
|
+
saved_view_id: string
|
|
798
|
+
include_deleted?: "true" | "false" | "only"
|
|
799
|
+
filters?: Array<{
|
|
800
|
+
type: { ... }
|
|
801
|
+
related_entity_schemas?: { ... }
|
|
802
|
+
lookback_period_days?: { ... }
|
|
803
|
+
message_type?: { ... }
|
|
804
|
+
}>
|
|
805
|
+
}
|
|
806
|
+
schedule: {
|
|
807
|
+
frequency: "interval"
|
|
808
|
+
interval_days: number
|
|
809
|
+
start_date?: string // date
|
|
810
|
+
end_date?: string // date
|
|
811
|
+
}
|
|
812
|
+
relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]
|
|
813
|
+
enabled?: boolean
|
|
814
|
+
}
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
### `Config`
|
|
818
|
+
|
|
819
|
+
```ts
|
|
820
|
+
type Config = {
|
|
821
|
+
id: string
|
|
822
|
+
type: "deletion"
|
|
823
|
+
entity_schema: string
|
|
824
|
+
query: {
|
|
825
|
+
saved_view_id: string
|
|
826
|
+
include_deleted?: "true" | "false" | "only"
|
|
827
|
+
filters?: Array<{
|
|
828
|
+
type: { ... }
|
|
829
|
+
related_entity_schemas?: { ... }
|
|
830
|
+
lookback_period_days?: { ... }
|
|
831
|
+
message_type?: { ... }
|
|
832
|
+
}>
|
|
833
|
+
}
|
|
834
|
+
schedule?: {
|
|
835
|
+
frequency: "interval"
|
|
836
|
+
interval_days: number
|
|
837
|
+
start_date?: string // date
|
|
838
|
+
end_date?: string // date
|
|
839
|
+
}
|
|
840
|
+
enabled?: boolean
|
|
841
|
+
created_at?: string // date-time
|
|
842
|
+
last_updated_at?: string // date-time
|
|
843
|
+
next_run_at?: string // date
|
|
844
|
+
relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]
|
|
845
|
+
last_run_at?: string // date-time
|
|
846
|
+
}
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
### `DeletionRelationEntitySchema`
|
|
850
|
+
|
|
851
|
+
```ts
|
|
852
|
+
type DeletionRelationEntitySchema = "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"
|
|
853
|
+
```
|
|
854
|
+
|
|
855
|
+
### `ListConfigsResponse`
|
|
856
|
+
|
|
857
|
+
```ts
|
|
858
|
+
type ListConfigsResponse = {
|
|
859
|
+
configs?: Array<{
|
|
860
|
+
id: string
|
|
861
|
+
type: "deletion"
|
|
862
|
+
entity_schema: string
|
|
863
|
+
query: {
|
|
864
|
+
saved_view_id: { ... }
|
|
865
|
+
include_deleted?: { ... }
|
|
866
|
+
filters?: { ... }
|
|
867
|
+
}
|
|
868
|
+
schedule?: {
|
|
869
|
+
frequency: { ... }
|
|
870
|
+
interval_days: { ... }
|
|
871
|
+
start_date?: { ... }
|
|
872
|
+
end_date?: { ... }
|
|
873
|
+
}
|
|
874
|
+
enabled?: boolean
|
|
875
|
+
created_at?: string // date-time
|
|
876
|
+
last_updated_at?: string // date-time
|
|
877
|
+
next_run_at?: string // date
|
|
878
|
+
relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]
|
|
879
|
+
last_run_at?: string // date-time
|
|
880
|
+
}>
|
|
881
|
+
cursor?: string
|
|
882
|
+
}
|
|
883
|
+
```
|