@epilot/sdk 2.7.1 → 2.8.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/README.md +1 -0
  2. package/definitions/app.json +101 -8
  3. package/definitions/configuration-hub-runtime.json +1 -1
  4. package/definitions/configuration-hub.json +623 -0
  5. package/definitions/customer-portal.json +72 -58
  6. package/definitions/design-runtime.json +1 -1
  7. package/definitions/design.json +1 -11
  8. package/definitions/focus-pocus-runtime.json +1 -0
  9. package/definitions/focus-pocus.json +757 -0
  10. package/definitions/journey-runtime.json +1 -1
  11. package/definitions/journey.json +21 -1
  12. package/dist/README-37TXN4EL.cjs +7 -0
  13. package/dist/README-Z2WITBOR.js +7 -0
  14. package/dist/{_index-DB2VV4PQ.cjs → _index-HTUXYSTD.cjs} +4 -1
  15. package/dist/{_index-5FB6F5YY.js → _index-YTOJUFGD.js} +3 -0
  16. package/dist/apis/access-token.cjs +6 -6
  17. package/dist/apis/access-token.js +1 -1
  18. package/dist/apis/address-suggestions.cjs +6 -6
  19. package/dist/apis/address-suggestions.js +1 -1
  20. package/dist/apis/address.cjs +6 -6
  21. package/dist/apis/address.js +1 -1
  22. package/dist/apis/ai-agents.cjs +6 -6
  23. package/dist/apis/ai-agents.js +1 -1
  24. package/dist/apis/app.cjs +6 -6
  25. package/dist/apis/app.d.cts +2 -2
  26. package/dist/apis/app.d.ts +2 -2
  27. package/dist/apis/app.js +1 -1
  28. package/dist/apis/audit-logs.cjs +6 -6
  29. package/dist/apis/audit-logs.js +1 -1
  30. package/dist/apis/automation.cjs +6 -6
  31. package/dist/apis/automation.js +1 -1
  32. package/dist/apis/billing.cjs +6 -6
  33. package/dist/apis/billing.js +1 -1
  34. package/dist/apis/blueprint-manifest.cjs +6 -6
  35. package/dist/apis/blueprint-manifest.js +1 -1
  36. package/dist/apis/calendar.cjs +6 -6
  37. package/dist/apis/calendar.js +1 -1
  38. package/dist/apis/configuration-hub.cjs +8 -8
  39. package/dist/apis/configuration-hub.d.cts +2 -2
  40. package/dist/apis/configuration-hub.d.ts +2 -2
  41. package/dist/apis/configuration-hub.js +2 -2
  42. package/dist/apis/consent.cjs +6 -6
  43. package/dist/apis/consent.js +1 -1
  44. package/dist/apis/customer-portal.cjs +6 -6
  45. package/dist/apis/customer-portal.d.cts +2 -2
  46. package/dist/apis/customer-portal.d.ts +2 -2
  47. package/dist/apis/customer-portal.js +1 -1
  48. package/dist/apis/dashboard.cjs +6 -6
  49. package/dist/apis/dashboard.js +1 -1
  50. package/dist/apis/data-governance.cjs +6 -6
  51. package/dist/apis/data-governance.js +1 -1
  52. package/dist/apis/deduplication.cjs +6 -6
  53. package/dist/apis/deduplication.js +1 -1
  54. package/dist/apis/design.cjs +8 -8
  55. package/dist/apis/design.js +2 -2
  56. package/dist/apis/document.cjs +6 -6
  57. package/dist/apis/document.js +1 -1
  58. package/dist/apis/email-settings.cjs +6 -6
  59. package/dist/apis/email-settings.js +1 -1
  60. package/dist/apis/email-template.cjs +6 -6
  61. package/dist/apis/email-template.js +1 -1
  62. package/dist/apis/entity-mapping.cjs +6 -6
  63. package/dist/apis/entity-mapping.js +1 -1
  64. package/dist/apis/entity.cjs +6 -6
  65. package/dist/apis/entity.js +1 -1
  66. package/dist/apis/environments.cjs +6 -6
  67. package/dist/apis/environments.js +1 -1
  68. package/dist/apis/event-catalog.cjs +6 -6
  69. package/dist/apis/event-catalog.js +1 -1
  70. package/dist/apis/file.cjs +6 -6
  71. package/dist/apis/file.js +1 -1
  72. package/dist/apis/focus-pocus.cjs +38 -0
  73. package/dist/apis/focus-pocus.d.cts +18 -0
  74. package/dist/apis/focus-pocus.d.ts +18 -0
  75. package/dist/apis/focus-pocus.js +38 -0
  76. package/dist/apis/iban.cjs +6 -6
  77. package/dist/apis/iban.js +1 -1
  78. package/dist/apis/integration-toolkit.cjs +6 -6
  79. package/dist/apis/integration-toolkit.js +1 -1
  80. package/dist/apis/journey.cjs +8 -8
  81. package/dist/apis/journey.d.cts +2 -2
  82. package/dist/apis/journey.d.ts +2 -2
  83. package/dist/apis/journey.js +2 -2
  84. package/dist/apis/kanban.cjs +6 -6
  85. package/dist/apis/kanban.js +1 -1
  86. package/dist/apis/message.cjs +6 -6
  87. package/dist/apis/message.js +1 -1
  88. package/dist/apis/metering.cjs +6 -6
  89. package/dist/apis/metering.js +1 -1
  90. package/dist/apis/notes.cjs +6 -6
  91. package/dist/apis/notes.js +1 -1
  92. package/dist/apis/notification.cjs +6 -6
  93. package/dist/apis/notification.js +1 -1
  94. package/dist/apis/organization.cjs +6 -6
  95. package/dist/apis/organization.js +1 -1
  96. package/dist/apis/partner-directory.cjs +6 -6
  97. package/dist/apis/partner-directory.js +1 -1
  98. package/dist/apis/permissions.cjs +6 -6
  99. package/dist/apis/permissions.js +1 -1
  100. package/dist/apis/pricing-tier.cjs +6 -6
  101. package/dist/apis/pricing-tier.js +1 -1
  102. package/dist/apis/pricing.cjs +6 -6
  103. package/dist/apis/pricing.js +1 -1
  104. package/dist/apis/purpose.cjs +6 -6
  105. package/dist/apis/purpose.js +1 -1
  106. package/dist/apis/query.cjs +6 -6
  107. package/dist/apis/query.js +1 -1
  108. package/dist/apis/sandbox.cjs +6 -6
  109. package/dist/apis/sandbox.js +1 -1
  110. package/dist/apis/sharing.cjs +6 -6
  111. package/dist/apis/sharing.js +1 -1
  112. package/dist/apis/submission.cjs +6 -6
  113. package/dist/apis/submission.js +1 -1
  114. package/dist/apis/target.cjs +6 -6
  115. package/dist/apis/target.js +1 -1
  116. package/dist/apis/targeting.cjs +6 -6
  117. package/dist/apis/targeting.js +1 -1
  118. package/dist/apis/template-variables.cjs +6 -6
  119. package/dist/apis/template-variables.js +1 -1
  120. package/dist/apis/user.cjs +6 -6
  121. package/dist/apis/user.js +1 -1
  122. package/dist/apis/validation-rules.cjs +6 -6
  123. package/dist/apis/validation-rules.js +1 -1
  124. package/dist/apis/webhooks.cjs +6 -6
  125. package/dist/apis/webhooks.js +1 -1
  126. package/dist/apis/workflow-definition.cjs +6 -6
  127. package/dist/apis/workflow-definition.js +1 -1
  128. package/dist/apis/workflow.cjs +6 -6
  129. package/dist/apis/workflow.js +1 -1
  130. package/dist/{app-SSF545U7.cjs → app-74LECFMK.cjs} +1 -1
  131. package/dist/{app-34OBBTA4.js → app-GNUHCGPO.js} +1 -1
  132. package/dist/{app.d--5n0FQQ4.d.cts → app.d-BOR23dso.d.cts} +104 -4
  133. package/dist/{app.d--5n0FQQ4.d.ts → app.d-BOR23dso.d.ts} +104 -4
  134. package/dist/bin/cli.js +1 -1
  135. package/dist/{chunk-SCMAZ73K.js → chunk-54KWFSCM.js} +30 -19
  136. package/dist/chunk-A6FYGWQ7.cjs +14 -0
  137. package/dist/{chunk-R7XDTILZ.cjs → chunk-F5Z6I7TF.cjs} +30 -19
  138. package/dist/chunk-JOUTFBLN.js +14 -0
  139. package/dist/chunk-LAWKCWVU.cjs +14 -0
  140. package/dist/{chunk-ZSONBZIF.cjs → chunk-MOLFG5L4.cjs} +1 -1
  141. package/dist/chunk-P42Q6HOW.js +14 -0
  142. package/dist/chunk-P4NA7NWG.js +14 -0
  143. package/dist/chunk-WHXYES2D.cjs +14 -0
  144. package/dist/{chunk-ONOGGR6Q.js → chunk-WW6DVKJR.js} +1 -1
  145. package/dist/configuration-hub-E7S4JB2T.js +7 -0
  146. package/dist/configuration-hub-Q5JBYB52.cjs +7 -0
  147. package/dist/{configuration-hub-runtime-L6IOERSP.js → configuration-hub-runtime-CXME7TCX.js} +1 -1
  148. package/dist/{configuration-hub-runtime-I5Y67CXD.cjs → configuration-hub-runtime-QVLJKEZD.cjs} +2 -2
  149. package/dist/configuration-hub.d-CbSJDa7k.d.cts +1096 -0
  150. package/dist/configuration-hub.d-CbSJDa7k.d.ts +1096 -0
  151. package/dist/customer-portal-DR6XFCTQ.js +7 -0
  152. package/dist/customer-portal-PNFBVIAH.cjs +7 -0
  153. package/dist/{customer-portal.d-C7ZCbjiY.d.cts → customer-portal.d-CTTCBAZI.d.cts} +217 -61
  154. package/dist/{customer-portal.d-C7ZCbjiY.d.ts → customer-portal.d-CTTCBAZI.d.ts} +217 -61
  155. package/dist/data-governance-QYFHBCNB.cjs +7 -0
  156. package/dist/data-governance-YS2NA6W4.js +7 -0
  157. package/dist/design-EWZQZ5KX.js +7 -0
  158. package/dist/design-MUUYXB2J.cjs +7 -0
  159. package/dist/design-runtime-3RHYNHUV.cjs +5 -0
  160. package/dist/{design-runtime-QMJM4FAF.js → design-runtime-DLMA4EHQ.js} +1 -1
  161. package/dist/focus-pocus-JGXH42OF.cjs +7 -0
  162. package/dist/focus-pocus-XVDVUYL6.js +7 -0
  163. package/dist/focus-pocus-runtime-QXBBYVX7.js +5 -0
  164. package/dist/focus-pocus-runtime-X6GQ3WI4.cjs +5 -0
  165. package/dist/focus-pocus.d-BRFGe53G.d.cts +489 -0
  166. package/dist/focus-pocus.d-BRFGe53G.d.ts +489 -0
  167. package/dist/index.cjs +29 -21
  168. package/dist/index.d.cts +55 -53
  169. package/dist/index.d.ts +55 -53
  170. package/dist/index.js +20 -12
  171. package/dist/journey-4DIIPRU4.js +7 -0
  172. package/dist/journey-ATC3Y5AW.cjs +7 -0
  173. package/dist/{journey-runtime-SPBL3F32.cjs → journey-runtime-G2O5C3N2.cjs} +2 -2
  174. package/dist/{journey-runtime-YXIAOTMD.js → journey-runtime-RI2LJO5S.js} +1 -1
  175. package/dist/{journey.d-ClXO0xK8.d.cts → journey.d-BenIUWaO.d.cts} +9 -3
  176. package/dist/{journey.d-ClXO0xK8.d.ts → journey.d-BenIUWaO.d.ts} +9 -3
  177. package/dist/{js-yaml-UPZKYVRY.js → js-yaml-DLCVPJ7G.js} +17 -15
  178. package/dist/pricing-R5ENSVPQ.cjs +7 -0
  179. package/dist/pricing-X27CCRI6.js +7 -0
  180. package/dist/targeting-74BV7F7H.cjs +7 -0
  181. package/dist/targeting-W5EKJYR2.js +7 -0
  182. package/docs/app.md +34 -10
  183. package/docs/configuration-hub.md +660 -0
  184. package/docs/customer-portal.md +223 -161
  185. package/docs/data-governance.md +17 -17
  186. package/docs/design.md +1 -1
  187. package/docs/focus-pocus.md +460 -0
  188. package/docs/journey.md +2 -0
  189. package/docs/pricing.md +1 -1
  190. package/docs/targeting.md +4 -4
  191. package/package.json +10 -1
  192. package/dist/README-46VYEGGW.js +0 -7
  193. package/dist/README-IVBISSWB.cjs +0 -7
  194. package/dist/chunk-EIIIKDOJ.cjs +0 -14
  195. package/dist/chunk-KIWRGUKM.js +0 -14
  196. package/dist/chunk-MB6NKETA.cjs +0 -14
  197. package/dist/chunk-VSZEOCIE.js +0 -14
  198. package/dist/configuration-hub-A3S6ND6R.cjs +0 -7
  199. package/dist/configuration-hub-PMAW44U5.js +0 -7
  200. package/dist/configuration-hub.d-Cqaq2F-W.d.cts +0 -478
  201. package/dist/configuration-hub.d-Cqaq2F-W.d.ts +0 -478
  202. package/dist/customer-portal-7HYSBH7H.cjs +0 -7
  203. package/dist/customer-portal-X4LJX6AU.js +0 -7
  204. package/dist/data-governance-2U5UU4GM.cjs +0 -7
  205. package/dist/data-governance-36Y33JVG.js +0 -7
  206. package/dist/design-DROLIWS3.js +0 -7
  207. package/dist/design-XZKOZLTR.cjs +0 -7
  208. package/dist/design-runtime-OXEXKZVG.cjs +0 -5
  209. package/dist/journey-KDR5EU3W.js +0 -7
  210. package/dist/journey-REBN4TGQ.cjs +0 -7
  211. package/dist/pricing-FODHQFCB.cjs +0 -7
  212. package/dist/pricing-XRIDVZFC.js +0 -7
  213. package/dist/targeting-EYGYZD6M.cjs +0 -7
  214. package/dist/targeting-GEJTJN5Z.js +0 -7
@@ -3384,6 +3384,14 @@ declare namespace Components {
3384
3384
  * Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level.
3385
3385
  */
3386
3386
  dataPath?: string;
3387
+ /**
3388
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3389
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3390
+ *
3391
+ * example:
3392
+ * error.message
3393
+ */
3394
+ errorMessagePath?: string;
3387
3395
  };
3388
3396
  /**
3389
3397
  * Deprecated. Prefer `secure_proxy` instead.
@@ -3513,6 +3521,14 @@ declare namespace Components {
3513
3521
  * Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level.
3514
3522
  */
3515
3523
  dataPath?: string;
3524
+ /**
3525
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3526
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3527
+ *
3528
+ * example:
3529
+ * error.message
3530
+ */
3531
+ errorMessagePath?: string;
3516
3532
  };
3517
3533
  /**
3518
3534
  * Deprecated. Prefer `secure_proxy` instead.
@@ -3566,6 +3582,16 @@ declare namespace Components {
3566
3582
  [name: string]: string;
3567
3583
  };
3568
3584
  };
3585
+ resolved?: {
3586
+ /**
3587
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3588
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3589
+ *
3590
+ * example:
3591
+ * error.message
3592
+ */
3593
+ errorMessagePath?: string;
3594
+ };
3569
3595
  /**
3570
3596
  * Deprecated. Prefer `secure_proxy` instead.
3571
3597
  * If true, requests are made from a set of static IP addresses and only allow connections to a set of allowed IP addresses. Get in touch with us to add your IP addresses.
@@ -3659,6 +3685,14 @@ declare namespace Components {
3659
3685
  * {{CallResponse.data.lower_limit}}
3660
3686
  */
3661
3687
  lower_limit?: string;
3688
+ /**
3689
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3690
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3691
+ *
3692
+ * example:
3693
+ * error.message
3694
+ */
3695
+ errorMessagePath?: string;
3662
3696
  };
3663
3697
  /**
3664
3698
  * Deprecated. Prefer `secure_proxy` instead.
@@ -3709,6 +3743,14 @@ declare namespace Components {
3709
3743
  * Optional path to the data (array) in the response. If omitted, the data is assumed to be on the top level.
3710
3744
  */
3711
3745
  dataPath?: string;
3746
+ /**
3747
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3748
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3749
+ *
3750
+ * example:
3751
+ * error.message
3752
+ */
3753
+ errorMessagePath?: string;
3712
3754
  };
3713
3755
  /**
3714
3756
  * Deprecated. Prefer `secure_proxy` instead.
@@ -3821,6 +3863,14 @@ declare namespace Components {
3821
3863
  * Optional path to the metadata object in the response. If omitted, the metadata is assumed to be on the top level.
3822
3864
  */
3823
3865
  dataPath?: string;
3866
+ /**
3867
+ * Optional path to a human-readable error message in the third-party response body, used when the call fails (non-2xx status).
3868
+ * If specified and the path resolves to a string, that message is forwarded to the end user instead of a generic error.
3869
+ *
3870
+ * example:
3871
+ * error.message
3872
+ */
3873
+ errorMessagePath?: string;
3824
3874
  };
3825
3875
  /**
3826
3876
  * Deprecated. Prefer `secure_proxy` instead.
@@ -4561,8 +4611,9 @@ declare namespace Components {
4561
4611
  schema?: string;
4562
4612
  }
4563
4613
  /**
4564
- * Mobile OIDC configuration. All string fields support env var interpolation
4565
- * (incl. secrets) via mustache-like templates, e.g. `{{ env.MOBILE_CLIENT_SECRET }}`.
4614
+ * Mobile OIDC configuration. Values are resolved at SSO invocation time, so the
4615
+ * fields below may reference org env vars via mustache-like templates, e.g.
4616
+ * `{{ env.MOBILE_CLIENT_SECRET }}`.
4566
4617
  *
4567
4618
  */
4568
4619
  export interface MoblieOIDCConfig {
@@ -4582,8 +4633,12 @@ declare namespace Components {
4582
4633
  client_secret?: string;
4583
4634
  }
4584
4635
  /**
4585
- * OIDC provider configuration. All string fields support env var interpolation
4586
- * (incl. secrets) via mustache-like templates, e.g. `{{ env.MY_PROVIDER_CLIENT_SECRET }}`.
4636
+ * OIDC provider configuration. Values are resolved at SSO invocation time
4637
+ * (login / callback), so the fields below may reference org env vars via
4638
+ * mustache-like templates, e.g. `{{ env.MY_PROVIDER_CLIENT_SECRET }}`.
4639
+ *
4640
+ * Fields used to render the SSO buttons up-front (`ProviderConfig.slug`,
4641
+ * `ProviderConfig.display_name`) are NOT interpolated and must be literal.
4587
4642
  *
4588
4643
  */
4589
4644
  export interface OIDCProviderConfig {
@@ -4631,6 +4686,10 @@ declare namespace Components {
4631
4686
  prompt?: "login" | "select_account" | "consent";
4632
4687
  }
4633
4688
  export interface OIDCProviderMetadata {
4689
+ /**
4690
+ * Response modes the provider accepts (e.g. `form_post` for Apple)
4691
+ */
4692
+ response_modes_supported?: ("form_post" | "fragment" | "query")[];
4634
4693
  /**
4635
4694
  * URL of the authorization endpoint
4636
4695
  * example:
@@ -4686,47 +4745,6 @@ declare namespace Components {
4686
4745
  */
4687
4746
  test_auth_password?: string;
4688
4747
  }
4689
- /**
4690
- * Public OIDC provider configuration. Same as OIDCProviderConfig but never includes
4691
- * the `client_secret` field — it is kept server-side and only used to exchange the
4692
- * authorization code at the SSO callback. String fields are returned with env var
4693
- * placeholders already resolved when fetched via `GET /v2/portal/public/sso/providers/{provider_slug}`.
4694
- *
4695
- */
4696
- export interface OIDCProviderPublicConfig {
4697
- type?: "authorization_code" | "implicit";
4698
- /**
4699
- * Issuing Authority URL
4700
- * example:
4701
- * https://login.microsoftonline.com/33d4f3e5-3df2-421e-b92e-a63cfa680a88/v2.0
4702
- */
4703
- oidc_issuer: string;
4704
- /**
4705
- * Redirect URI for the OIDC flow
4706
- * example:
4707
- * https://customer-portal.com/login
4708
- */
4709
- redirect_uri?: string;
4710
- /**
4711
- * example:
4712
- * ab81daf8-8b1f-42d6-94ca-c51621054c75
4713
- */
4714
- client_id: string;
4715
- /**
4716
- * Whether the client secret is present (the value itself is kept server-side)
4717
- * example:
4718
- * true
4719
- */
4720
- has_client_secret?: boolean;
4721
- /**
4722
- * Space-separated list of OAuth 2.0 scopes to request from OpenID Connect
4723
- * example:
4724
- * openid email
4725
- */
4726
- scope: string;
4727
- metadata?: OIDCProviderMetadata;
4728
- prompt?: "login" | "select_account" | "consent";
4729
- }
4730
4748
  /**
4731
4749
  * The opportunity entity
4732
4750
  */
@@ -5797,6 +5815,18 @@ declare namespace Components {
5797
5815
  */
5798
5816
  onPendingUser?: AdminUser[];
5799
5817
  };
5818
+ /**
5819
+ * SSO identity providers for the portal. When sent on a portal save (PUT/POST),
5820
+ * the list is fully synced — incoming providers are upserted and any existing
5821
+ * providers not in the list are deleted. Omit the field to leave SSO
5822
+ * configuration unchanged; send an empty array to remove all providers.
5823
+ *
5824
+ * Each provider is persisted verbatim — `oidc_config.client_secret` is stored
5825
+ * as sent. Customers are encouraged to reference an org env secret via
5826
+ * `{{ env.VAR }}` rather than embed raw values.
5827
+ *
5828
+ */
5829
+ identity_providers?: ProviderPublicConfig[];
5800
5830
  /**
5801
5831
  * Enable/Disable the portal access
5802
5832
  */
@@ -6270,7 +6300,6 @@ declare namespace Components {
6270
6300
  * Permissions granted to a portal user while accessing entities
6271
6301
  */
6272
6302
  grants?: Grant[];
6273
- identity_providers?: ProviderPublicConfig[];
6274
6303
  pages?: Page[];
6275
6304
  }
6276
6305
  /**
@@ -6474,14 +6503,19 @@ declare namespace Components {
6474
6503
  attribute_mappings?: /* Dictionary of epilot user attributes to claims */ AttributeMappingConfig;
6475
6504
  entity_matching?: /* Configuration for matching existing entities during SSO login using token claims */ EntityMatchingConfig;
6476
6505
  oidc_config?: /**
6477
- * OIDC provider configuration. All string fields support env var interpolation
6478
- * (incl. secrets) via mustache-like templates, e.g. `{{ env.MY_PROVIDER_CLIENT_SECRET }}`.
6506
+ * OIDC provider configuration. Values are resolved at SSO invocation time
6507
+ * (login / callback), so the fields below may reference org env vars via
6508
+ * mustache-like templates, e.g. `{{ env.MY_PROVIDER_CLIENT_SECRET }}`.
6509
+ *
6510
+ * Fields used to render the SSO buttons up-front (`ProviderConfig.slug`,
6511
+ * `ProviderConfig.display_name`) are NOT interpolated and must be literal.
6479
6512
  *
6480
6513
  */
6481
6514
  OIDCProviderConfig;
6482
6515
  mobile_oidc_config?: /**
6483
- * Mobile OIDC configuration. All string fields support env var interpolation
6484
- * (incl. secrets) via mustache-like templates, e.g. `{{ env.MOBILE_CLIENT_SECRET }}`.
6516
+ * Mobile OIDC configuration. Values are resolved at SSO invocation time, so the
6517
+ * fields below may reference org env vars via mustache-like templates, e.g.
6518
+ * `{{ env.MOBILE_CLIENT_SECRET }}`.
6485
6519
  *
6486
6520
  */
6487
6521
  MoblieOIDCConfig;
@@ -6506,16 +6540,19 @@ declare namespace Components {
6506
6540
  */
6507
6541
  ProviderDisplayName;
6508
6542
  oidc_config?: /**
6509
- * Public OIDC provider configuration. Same as OIDCProviderConfig but never includes
6510
- * the `client_secret` field it is kept server-side and only used to exchange the
6511
- * authorization code at the SSO callback. String fields are returned with env var
6512
- * placeholders already resolved when fetched via `GET /v2/portal/public/sso/providers/{provider_slug}`.
6543
+ * OIDC provider configuration. Values are resolved at SSO invocation time
6544
+ * (login / callback), so the fields below may reference org env vars via
6545
+ * mustache-like templates, e.g. `{{ env.MY_PROVIDER_CLIENT_SECRET }}`.
6546
+ *
6547
+ * Fields used to render the SSO buttons up-front (`ProviderConfig.slug`,
6548
+ * `ProviderConfig.display_name`) are NOT interpolated and must be literal.
6513
6549
  *
6514
6550
  */
6515
- OIDCProviderPublicConfig;
6551
+ OIDCProviderConfig;
6516
6552
  mobile_oidc_config?: /**
6517
- * Mobile OIDC configuration. All string fields support env var interpolation
6518
- * (incl. secrets) via mustache-like templates, e.g. `{{ env.MOBILE_CLIENT_SECRET }}`.
6553
+ * Mobile OIDC configuration. Values are resolved at SSO invocation time, so the
6554
+ * fields below may reference org env vars via mustache-like templates, e.g.
6555
+ * `{{ env.MOBILE_CLIENT_SECRET }}`.
6519
6556
  *
6520
6557
  */
6521
6558
  MoblieOIDCConfig;
@@ -7052,6 +7089,32 @@ declare namespace Components {
7052
7089
  */
7053
7090
  onPendingUser?: AdminUser[];
7054
7091
  };
7092
+ /**
7093
+ * SSO identity providers for the portal. When sent on a portal save (PUT/POST),
7094
+ * the list is fully synced — incoming providers are upserted and any existing
7095
+ * providers not in the list are deleted. Omit the field to leave SSO
7096
+ * configuration unchanged; send an empty array to remove all providers.
7097
+ *
7098
+ * Each provider is persisted verbatim — `oidc_config.client_secret` is stored
7099
+ * as sent. Customers are encouraged to reference an org env secret via
7100
+ * `{{ env.VAR }}` rather than embed raw values.
7101
+ *
7102
+ */
7103
+ identity_providers?: /**
7104
+ * SSO identity provider configuration.
7105
+ *
7106
+ * Env var interpolation: only string fields under `oidc_config` and
7107
+ * `mobile_oidc_config` (incl. their nested `metadata`) are passed through
7108
+ * Liquid templating, so they may contain `{{ env.VAR }}` placeholders that
7109
+ * get resolved at runtime against the organization's environment.
7110
+ *
7111
+ * The following fields are used as literal values and MUST NOT contain
7112
+ * template syntax: `slug`, `display_name`, `provider_type`, all keys and
7113
+ * values under `attribute_mappings` (used as JSONPath-like accessors into
7114
+ * token claims), and all keys and values under `entity_matching`.
7115
+ *
7116
+ */
7117
+ ProviderConfig[];
7055
7118
  }
7056
7119
  export interface UpsertPortalConfig {
7057
7120
  /**
@@ -7094,6 +7157,32 @@ declare namespace Components {
7094
7157
  */
7095
7158
  onPendingUser?: AdminUser[];
7096
7159
  };
7160
+ /**
7161
+ * SSO identity providers for the portal. When sent on a portal save (PUT/POST),
7162
+ * the list is fully synced — incoming providers are upserted and any existing
7163
+ * providers not in the list are deleted. Omit the field to leave SSO
7164
+ * configuration unchanged; send an empty array to remove all providers.
7165
+ *
7166
+ * Each provider is persisted verbatim — `oidc_config.client_secret` is stored
7167
+ * as sent. Customers are encouraged to reference an org env secret via
7168
+ * `{{ env.VAR }}` rather than embed raw values.
7169
+ *
7170
+ */
7171
+ identity_providers?: /**
7172
+ * SSO identity provider configuration.
7173
+ *
7174
+ * Env var interpolation: only string fields under `oidc_config` and
7175
+ * `mobile_oidc_config` (incl. their nested `metadata`) are passed through
7176
+ * Liquid templating, so they may contain `{{ env.VAR }}` placeholders that
7177
+ * get resolved at runtime against the organization's environment.
7178
+ *
7179
+ * The following fields are used as literal values and MUST NOT contain
7180
+ * template syntax: `slug`, `display_name`, `provider_type`, all keys and
7181
+ * values under `attribute_mappings` (used as JSONPath-like accessors into
7182
+ * token claims), and all keys and values under `entity_matching`.
7183
+ *
7184
+ */
7185
+ ProviderConfig[];
7097
7186
  /**
7098
7187
  * Enable/Disable the portal access
7099
7188
  */
@@ -7573,6 +7662,32 @@ declare namespace Components {
7573
7662
  */
7574
7663
  onPendingUser?: AdminUser[];
7575
7664
  };
7665
+ /**
7666
+ * SSO identity providers for the portal. When sent on a portal save (PUT/POST),
7667
+ * the list is fully synced — incoming providers are upserted and any existing
7668
+ * providers not in the list are deleted. Omit the field to leave SSO
7669
+ * configuration unchanged; send an empty array to remove all providers.
7670
+ *
7671
+ * Each provider is persisted verbatim — `oidc_config.client_secret` is stored
7672
+ * as sent. Customers are encouraged to reference an org env secret via
7673
+ * `{{ env.VAR }}` rather than embed raw values.
7674
+ *
7675
+ */
7676
+ identity_providers?: /**
7677
+ * SSO identity provider configuration.
7678
+ *
7679
+ * Env var interpolation: only string fields under `oidc_config` and
7680
+ * `mobile_oidc_config` (incl. their nested `metadata`) are passed through
7681
+ * Liquid templating, so they may contain `{{ env.VAR }}` placeholders that
7682
+ * get resolved at runtime against the organization's environment.
7683
+ *
7684
+ * The following fields are used as literal values and MUST NOT contain
7685
+ * template syntax: `slug`, `display_name`, `provider_type`, all keys and
7686
+ * values under `attribute_mappings` (used as JSONPath-like accessors into
7687
+ * token claims), and all keys and values under `entity_matching`.
7688
+ *
7689
+ */
7690
+ ProviderConfig[];
7576
7691
  /**
7577
7692
  * Enable/Disable the portal access
7578
7693
  */
@@ -10908,7 +11023,28 @@ declare namespace Paths {
10908
11023
  * Permissions granted to a portal user while accessing entities
10909
11024
  */
10910
11025
  grants?: Components.Schemas.Grant[];
10911
- identity_providers?: Components.Schemas.ProviderPublicConfig[];
11026
+ /**
11027
+ * SSO identity providers configured for the portal. Includes raw
11028
+ * `oidc_config.client_secret` values so the admin UI can round-trip
11029
+ * them. Customers are encouraged to reference secrets via env
11030
+ * templates (`{{ env.VAR }}`) rather than embed raw values.
11031
+ *
11032
+ */
11033
+ identity_providers?: /**
11034
+ * SSO identity provider configuration.
11035
+ *
11036
+ * Env var interpolation: only string fields under `oidc_config` and
11037
+ * `mobile_oidc_config` (incl. their nested `metadata`) are passed through
11038
+ * Liquid templating, so they may contain `{{ env.VAR }}` placeholders that
11039
+ * get resolved at runtime against the organization's environment.
11040
+ *
11041
+ * The following fields are used as literal values and MUST NOT contain
11042
+ * template syntax: `slug`, `display_name`, `provider_type`, all keys and
11043
+ * values under `attribute_mappings` (used as JSONPath-like accessors into
11044
+ * token claims), and all keys and values under `entity_matching`.
11045
+ *
11046
+ */
11047
+ Components.Schemas.ProviderConfig[];
10912
11048
  certificate_details?: {
10913
11049
  /**
10914
11050
  * Status of the certificate
@@ -11423,7 +11559,28 @@ declare namespace Paths {
11423
11559
  * Permissions granted to a portal user while accessing entities
11424
11560
  */
11425
11561
  grants?: Components.Schemas.Grant[];
11426
- identity_providers?: Components.Schemas.ProviderPublicConfig[];
11562
+ /**
11563
+ * SSO identity providers configured for the portal. Includes raw
11564
+ * `oidc_config.client_secret` values so the admin UI can round-trip
11565
+ * them. Customers are encouraged to reference secrets via env
11566
+ * templates (`{{ env.VAR }}`) rather than embed raw values.
11567
+ *
11568
+ */
11569
+ identity_providers?: /**
11570
+ * SSO identity provider configuration.
11571
+ *
11572
+ * Env var interpolation: only string fields under `oidc_config` and
11573
+ * `mobile_oidc_config` (incl. their nested `metadata`) are passed through
11574
+ * Liquid templating, so they may contain `{{ env.VAR }}` placeholders that
11575
+ * get resolved at runtime against the organization's environment.
11576
+ *
11577
+ * The following fields are used as literal values and MUST NOT contain
11578
+ * template syntax: `slug`, `display_name`, `provider_type`, all keys and
11579
+ * values under `attribute_mappings` (used as JSONPath-like accessors into
11580
+ * token claims), and all keys and values under `entity_matching`.
11581
+ *
11582
+ */
11583
+ Components.Schemas.ProviderConfig[];
11427
11584
  certificate_details?: {
11428
11585
  /**
11429
11586
  * Status of the certificate
@@ -17644,7 +17801,6 @@ type MeterReadingWidget = Components.Schemas.MeterReadingWidget;
17644
17801
  type MoblieOIDCConfig = Components.Schemas.MoblieOIDCConfig;
17645
17802
  type OIDCProviderConfig = Components.Schemas.OIDCProviderConfig;
17646
17803
  type OIDCProviderMetadata = Components.Schemas.OIDCProviderMetadata;
17647
- type OIDCProviderPublicConfig = Components.Schemas.OIDCProviderPublicConfig;
17648
17804
  type Opportunity = Components.Schemas.Opportunity;
17649
17805
  type Order = Components.Schemas.Order;
17650
17806
  type OrganizationSettings = Components.Schemas.OrganizationSettings;
@@ -17704,4 +17860,4 @@ type WorfklowIdentifier = Components.Schemas.WorfklowIdentifier;
17704
17860
  type WorkflowExecution = Components.Schemas.WorkflowExecution;
17705
17861
  type WorkflowStep = Components.Schemas.WorkflowStep;
17706
17862
 
17707
- export { type EntityMatchingConfig as $, type AcceptanceDecision as A, type Balance as B, type Client as C, type Contact as D, type ContactCountRequest as E, type ContactExistsRequest as F, type ContentWidget as G, type ContextEntities as H, type ContextEntity as I, type Contract as J, type ContractIdentifier as K, type CreateUserRequest as L, type Currency as M, type DataRetrievalItem as N, type OperationMethods as O, Paths as P, DeleteEntityFile as Q, type Direction as R, type DocumentWidget as S, type DomainSettings as T, type EmailTemplates as U, type Entity as V, type EntityEditRule as W, type EntityFileCount as X, type EntityGetParams as Y, type EntityId as Z, type EntityItem as _, Components as a, type PublicAppDetails as a$, type EntityResponse as a0, type EntityResponseGroupedWithHits as a1, type EntityResponseWithHits as a2, type EntitySearchParams as a3, type EntitySlug as a4, type EntitySlugConfig as a5, type EntityTemplates as a6, type EntityWidget as a7, type ErrorResp as a8, type Exists as a9, type MeterReading as aA, type MeterReadingPhoto as aB, type MeterReadingPhotoData as aC, type MeterReadingWidget as aD, type MoblieOIDCConfig as aE, type OIDCProviderConfig as aF, type OIDCProviderMetadata as aG, type OIDCProviderPublicConfig as aH, type Opportunity as aI, type Order as aJ, type OrganizationSettings as aK, type Origin as aL, type Page as aM, type PageRequest as aN, type PaymentWidget as aO, type PortalConfig as aP, type PortalConfigV3 as aQ, type PortalId as aR, type PortalUser as aS, type PortalUserRegistrationStatus as aT, type PortalWidget as aU, type Product as aV, type ProductRecommendationsWidget as aW, type ProviderConfig as aX, type ProviderDisplayName as aY, type ProviderPublicConfig as aZ, type ProviderSlug as a_, type Extension as aa, type ExtensionAuthBlock as ab, type ExtensionConfig as ac, type ExtensionHook as ad, type ExtensionHookConsumptionDataRetrieval as ae, type ExtensionHookContractIdentification as af, type ExtensionHookCostDataRetrieval as ag, type ExtensionHookDataExport as ah, type ExtensionHookMeterReadingPlausibilityCheck as ai, type ExtensionHookPriceDataRetrieval as aj, type ExtensionHookRegistrationIdentifiersCheck as ak, type ExtensionHookSelection as al, type ExtensionHookVisualizationMetadata as am, type ExtensionSeamlessLink as an, type ExternalLink as ao, type ExtraSchemaAttributes as ap, type FailedRuleErrorResp as aq, type File as ar, type FileItem as as, type Grant as at, type IdentifierAttribute as au, type InstallmentEvent as av, type JourneyActions as aw, type JuiceSettings as ax, type Meter as ay, type MeterChartWidget as az, type PathsDictionary as b, type PublicContractIdentificationDetails as b0, type PublicDataRetrievalHookDetails as b1, type PublicExtensionCapabilities as b2, type PublicExtensionDetails as b3, type PublicMeterReadingPlausibilityCheckDetails as b4, type ReadBy as b5, type ReadingStatus as b6, type Reason as b7, type RegistrationIdentifier as b8, type ReimbursementEvent as b9, type WorkflowExecution as bA, type WorkflowStep as bB, type Rule as ba, type SAMLProviderConfig as bb, type SSOCallbackRequest as bc, type SSOCallbackResponse as bd, type SSOLoginToken as be, SaveEntityFile as bf, type SavePortalFile as bg, type Schema as bh, type SearchIncludes as bi, type SecureProxyConfig as bj, type Source as bk, type SwappableConfig as bl, type TariffType as bm, type TeaserWidget as bn, type TriggerPortalFlow as bo, type UpdateOnlyPortalConfigAttributes as bp, type UpsertPortalConfig as bq, type UpsertPortalConfigV3 as br, UpsertPortalWidget as bs, type UserRequest as bt, type VisualizationDataRange as bu, type VisualizationMetadata as bv, type VisualizationTypeOption as bw, type WidgetAction as bx, type WidgetBase as by, type WorfklowIdentifier as bz, type AccountExistsRequest as c, type ActionLabel as d, type ActionWidget as e, type Activity as f, type ActivityCallerContext as g, type ActivityId as h, type ActivityItem as i, type AdminUser as j, type AllowedFileExtensions as k, type AttributeMappingConfig as l, type AuthConfig as m, type BaseBillingEvent as n, type BaseEntity as o, type BillingAccount as p, type BillingEvent as q, type Block as r, type BlockId as s, type BlockProps as t, type BlockRequest as u, type BlockType as v, type BusinessPartnerItem as w, type CampaignWidget as x, type CommonConfigAttributes as y, type CommonConfigAttributesV3 as z };
17863
+ export { type EntityMatchingConfig as $, type AcceptanceDecision as A, type Balance as B, type Client as C, type Contact as D, type ContactCountRequest as E, type ContactExistsRequest as F, type ContentWidget as G, type ContextEntities as H, type ContextEntity as I, type Contract as J, type ContractIdentifier as K, type CreateUserRequest as L, type Currency as M, type DataRetrievalItem as N, type OperationMethods as O, Paths as P, DeleteEntityFile as Q, type Direction as R, type DocumentWidget as S, type DomainSettings as T, type EmailTemplates as U, type Entity as V, type EntityEditRule as W, type EntityFileCount as X, type EntityGetParams as Y, type EntityId as Z, type EntityItem as _, Components as a, type PublicContractIdentificationDetails as a$, type EntityResponse as a0, type EntityResponseGroupedWithHits as a1, type EntityResponseWithHits as a2, type EntitySearchParams as a3, type EntitySlug as a4, type EntitySlugConfig as a5, type EntityTemplates as a6, type EntityWidget as a7, type ErrorResp as a8, type Exists as a9, type MeterReading as aA, type MeterReadingPhoto as aB, type MeterReadingPhotoData as aC, type MeterReadingWidget as aD, type MoblieOIDCConfig as aE, type OIDCProviderConfig as aF, type OIDCProviderMetadata as aG, type Opportunity as aH, type Order as aI, type OrganizationSettings as aJ, type Origin as aK, type Page as aL, type PageRequest as aM, type PaymentWidget as aN, type PortalConfig as aO, type PortalConfigV3 as aP, type PortalId as aQ, type PortalUser as aR, type PortalUserRegistrationStatus as aS, type PortalWidget as aT, type Product as aU, type ProductRecommendationsWidget as aV, type ProviderConfig as aW, type ProviderDisplayName as aX, type ProviderPublicConfig as aY, type ProviderSlug as aZ, type PublicAppDetails as a_, type Extension as aa, type ExtensionAuthBlock as ab, type ExtensionConfig as ac, type ExtensionHook as ad, type ExtensionHookConsumptionDataRetrieval as ae, type ExtensionHookContractIdentification as af, type ExtensionHookCostDataRetrieval as ag, type ExtensionHookDataExport as ah, type ExtensionHookMeterReadingPlausibilityCheck as ai, type ExtensionHookPriceDataRetrieval as aj, type ExtensionHookRegistrationIdentifiersCheck as ak, type ExtensionHookSelection as al, type ExtensionHookVisualizationMetadata as am, type ExtensionSeamlessLink as an, type ExternalLink as ao, type ExtraSchemaAttributes as ap, type FailedRuleErrorResp as aq, type File as ar, type FileItem as as, type Grant as at, type IdentifierAttribute as au, type InstallmentEvent as av, type JourneyActions as aw, type JuiceSettings as ax, type Meter as ay, type MeterChartWidget as az, type PathsDictionary as b, type PublicDataRetrievalHookDetails as b0, type PublicExtensionCapabilities as b1, type PublicExtensionDetails as b2, type PublicMeterReadingPlausibilityCheckDetails as b3, type ReadBy as b4, type ReadingStatus as b5, type Reason as b6, type RegistrationIdentifier as b7, type ReimbursementEvent as b8, type Rule as b9, type WorkflowStep as bA, type SAMLProviderConfig as ba, type SSOCallbackRequest as bb, type SSOCallbackResponse as bc, type SSOLoginToken as bd, SaveEntityFile as be, type SavePortalFile as bf, type Schema as bg, type SearchIncludes as bh, type SecureProxyConfig as bi, type Source as bj, type SwappableConfig as bk, type TariffType as bl, type TeaserWidget as bm, type TriggerPortalFlow as bn, type UpdateOnlyPortalConfigAttributes as bo, type UpsertPortalConfig as bp, type UpsertPortalConfigV3 as bq, UpsertPortalWidget as br, type UserRequest as bs, type VisualizationDataRange as bt, type VisualizationMetadata as bu, type VisualizationTypeOption as bv, type WidgetAction as bw, type WidgetBase as bx, type WorfklowIdentifier as by, type WorkflowExecution as bz, type AccountExistsRequest as c, type ActionLabel as d, type ActionWidget as e, type Activity as f, type ActivityCallerContext as g, type ActivityId as h, type ActivityItem as i, type AdminUser as j, type AllowedFileExtensions as k, type AttributeMappingConfig as l, type AuthConfig as m, type BaseBillingEvent as n, type BaseEntity as o, type BillingAccount as p, type BillingEvent as q, type Block as r, type BlockId as s, type BlockProps as t, type BlockRequest as u, type BlockType as v, type BusinessPartnerItem as w, type CampaignWidget as x, type CommonConfigAttributes as y, type CommonConfigAttributesV3 as z };
@@ -0,0 +1,7 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
+
3
+ // src/docs/data-governance.json
4
+ var data_governance_default = '# Data Governance API\n\n- **Base URL:** `https://data-governance.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/data-governance](https://docs.epilot.io/api/data-governance)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.dataGovernance.queryEntities(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/data-governance\'\n\nconst dataGovernanceClient = getClient()\nauthorize(dataGovernanceClient, () => \'<token>\')\nconst { data } = await dataGovernanceClient.queryEntities(...)\n```\n\n## Operations\n\n**Query**\n- [`queryEntities`](#queryentities)\n\n**Auditable Jobs**\n- [`createJob`](#createjob)\n- [`updateJob`](#updatejob)\n- [`getJob`](#getjob)\n- [`getJobReportUrl`](#getjobreporturl)\n- [`createJobForConfig`](#createjobforconfig)\n- [`listJobs`](#listjobs)\n\n**Data Lifecycle Configs**\n- [`getConfig`](#getconfig)\n- [`upsertConfig`](#upsertconfig)\n- [`listConfigs`](#listconfigs)\n\n**Schemas**\n- [`ConfigType`](#configtype)\n- [`JobStatus`](#jobstatus)\n- [`JobTrigger`](#jobtrigger)\n- [`JobReportFormat`](#jobreportformat)\n- [`JobReport`](#jobreport)\n- [`CreateJobRequest`](#createjobrequest)\n- [`JobDetails`](#jobdetails)\n- [`UpdateJobRequest`](#updatejobrequest)\n- [`Job`](#job)\n- [`ListJobsResponse`](#listjobsresponse)\n- [`JobReportUrlResponse`](#jobreporturlresponse)\n- [`QueryFilterType`](#queryfiltertype)\n- [`QueryFilter`](#queryfilter)\n- [`QueryConfig`](#queryconfig)\n- [`QueryEntitiesRequest`](#queryentitiesrequest)\n- [`QueryEntitiesResult`](#queryentitiesresult)\n- [`ConfigSchedule`](#configschedule)\n- [`IntervalConfigSchedule`](#intervalconfigschedule)\n- [`UpsertConfigRequest`](#upsertconfigrequest)\n- [`Config`](#config)\n- [`DeletionRelationEntitySchema`](#deletionrelationentityschema)\n- [`ListConfigsResponse`](#listconfigsresponse)\n\n### `queryEntities`\n\nQuery entities matching a data lifecycle config\n\n`POST /data-governance/v1/{entity_schema}/query`\n\n```ts\nconst { data } = await client.queryEntities(\n {\n entity_schema: \'example\',\n },\n {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\'],\n workflow_status: [\'CLOSED\']\n }\n ],\n from: 0,\n size: 0,\n hydrate: true,\n fields: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `createJob`\n\nCreate a new job run\n\n`POST /data-governance/v1/{entity_schema}/jobs`\n\n```ts\nconst { data } = await client.createJob(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n config_id: \'string\',\n scheduled_for: \'string\',\n status: \'in_progress\',\n started_at: \'1970-01-01T00:00:00.000Z\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateJob`\n\nUpdate an existing job run\n\n`PATCH /data-governance/v1/{entity_schema}/jobs/{job_id}`\n\n```ts\nconst { data } = await client.updateJob(\n {\n entity_schema: \'example\',\n job_id: \'example\',\n },\n {\n status: \'in_progress\',\n details: {},\n completed_at: \'1970-01-01T00:00:00.000Z\',\n error: \'string\',\n report: {\n bucket: \'string\',\n key: \'string\',\n format: \'csv\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJob`\n\nGet a job by ID\n\n`GET /data-governance/v1/jobs/{job_id}`\n\n```ts\nconst { data } = await client.getJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJobReportUrl`\n\nGet report download URL for a job\n\n`GET /data-governance/v1/jobs/{job_id}/report-url`\n\n```ts\nconst { data } = await client.getJobReportUrl({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "url": "string",\n "expires_in": 0\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet a config by ID\n\n`GET /data-governance/v1/configs/{config_id}`\n\n```ts\nconst { data } = await client.getConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `createJobForConfig`\n\nTrigger a manual job run for a config\n\n`POST /data-governance/v1/configs/{config_id}/jobs`\n\n```ts\nconst { data } = await client.createJobForConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `upsertConfig`\n\nCreate or update a data lifecycle config\n\n`POST /data-governance/v1/{entity_schema}/configs`\n\n```ts\nconst { data } = await client.upsertConfig(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n query: {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\'],\n workflow_status: [\'CLOSED\']\n }\n ]\n },\n schedule: {\n frequency: \'interval\',\n interval_days: 1,\n start_date: \'string\',\n end_date: \'string\'\n },\n relations_for_deletion: [\'contact\'],\n enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listConfigs`\n\nList data lifecycle configs\n\n`GET /data-governance/v1/configs`\n\n```ts\nconst { data } = await client.listConfigs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n next_run_at: \'example\',\n enabled: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "configs": [\n {\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `listJobs`\n\nList job runs\n\n`GET /data-governance/v1/jobs`\n\n```ts\nconst { data } = await client.listJobs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n status: \'example\',\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobs": [\n {\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ConfigType`\n\nThe governance action type. Determines what operation is performed on\nmatched entities when a job runs. Currently only `deletion` is supported.\n\n\n```ts\ntype ConfigType = "deletion"\n```\n\n### `JobStatus`\n\nCurrent execution status of a job run.\n- `in_progress` \u2014 the job is actively processing entities.\n- `success` \u2014 the job completed without critical errors.\n- `failed` \u2014 the job terminated due to an error.\n\n\n```ts\ntype JobStatus = "in_progress" | "success" | "failed"\n```\n\n### `JobTrigger`\n\nIndicates how the job was initiated.\n- `schedule` \u2014 automatically created by the background scheduler.\n- `manual` \u2014 explicitly triggered by a user via the API.\n\n\n```ts\ntype JobTrigger = "schedule" | "manual"\n```\n\n### `JobReportFormat`\n\nFile format of the job report. Currently only CSV is supported.\n\n```ts\ntype JobReportFormat = "csv"\n```\n\n### `JobReport`\n\nReference to a report file stored in S3 that details the outcome of a\njob run (e.g., which entities were deleted or failed).\n\n\n```ts\ntype JobReport = {\n bucket?: string\n key?: string\n format?: "csv"\n}\n```\n\n### `CreateJobRequest`\n\nRequest payload for creating a new job run.\n\n```ts\ntype CreateJobRequest = {\n type: "deletion"\n config_id: string\n scheduled_for: string // date\n status?: "in_progress" | "success" | "failed"\n started_at?: string // date-time\n}\n```\n\n### `JobDetails`\n\nType-specific job outcome payload. The shape depends on the config type.\nFor `deletion` jobs, typical fields include:\n- `matched_count` \u2014 total entities matched by the query\n- `deleted_count` \u2014 entities successfully deleted\n- `failed_count` \u2014 entities that could not be deleted\n\n\n```ts\ntype JobDetails = Record<string, unknown>\n```\n\n### `UpdateJobRequest`\n\nPartial update payload for an existing job. Only the fields provided\nwill be merged into the job record.\n\n\n```ts\ntype UpdateJobRequest = {\n status?: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n}\n```\n\n### `Job`\n\nRepresents a single execution run of a data lifecycle config. Tracks the\nfull lifecycle from creation through completion, including outcome\ndetails and an optional downloadable report.\n\n\n```ts\ntype Job = {\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n}\n```\n\n### `ListJobsResponse`\n\nPaginated response containing a list of job runs.\n\n```ts\ntype ListJobsResponse = {\n jobs?: Array<{\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: { ... }\n key?: { ... }\n format?: { ... }\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n }>\n cursor?: string\n}\n```\n\n### `JobReportUrlResponse`\n\nContains a time-limited pre-signed URL to download a job report.\n\n```ts\ntype JobReportUrlResponse = {\n url?: string\n expires_in?: number\n}\n```\n\n### `QueryFilterType`\n\nPredefined data governance filter types that can be layered on top of\na saved view to narrow down target entities:\n- `entity_workflows_only_in_closed_or_cancelled_status` \u2014 include only\n entities whose own workflows are all in a closed/cancelled state.\n- `no_related_entities` \u2014 include only entitie\n\n```ts\ntype 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"\n```\n\n### `QueryFilter`\n\nA single governance filter condition applied during entity querying.\nThe required and optional fields depend on the `type`.\n\n\n```ts\ntype QueryFilter = {\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n}\n```\n\n### `QueryConfig`\n\nDefines the query used by a data lifecycle config to identify target\nentities. Combines a saved view with optional governance filters.\n\n\n```ts\ntype QueryConfig = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n }>\n}\n```\n\n### `QueryEntitiesRequest`\n\nRequest body for the query endpoint. Extends `QueryConfig` with\npagination and projection options.\n\n\n```ts\ntype QueryEntitiesRequest = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n }>\n from?: number\n size?: number\n hydrate?: boolean\n fields?: string[]\n}\n```\n\n### `QueryEntitiesResult`\n\nResponse from the entity query endpoint.\n\n```ts\ntype QueryEntitiesResult = {\n hits?: number\n results?: Record<string, unknown>[]\n}\n```\n\n### `ConfigSchedule`\n\nInterval-based schedule. The governance engine will create a job every\n`interval_days` days, optionally bounded by start and end dates.\n\n\n```ts\ntype ConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `IntervalConfigSchedule`\n\nInterval-based schedule. The governance engine will create a job every\n`interval_days` days, optionally bounded by start and end dates.\n\n\n```ts\ntype IntervalConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `UpsertConfigRequest`\n\nRequest payload for creating or updating a data lifecycle config.\n\n```ts\ntype UpsertConfigRequest = {\n type: "deletion"\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n workflow_status?: { ... }\n }>\n }\n schedule: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n enabled?: boolean\n}\n```\n\n### `Config`\n\nA data lifecycle config defining an automated policy (e.g., scheduled\nentity deletion) for a specific entity schema.\n\n\n```ts\ntype Config = {\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n workflow_status?: { ... }\n }>\n }\n schedule?: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n}\n```\n\n### `DeletionRelationEntitySchema`\n\nEntity schema slug that can be specified as a cascading deletion\ntarget. When a primary entity is deleted, related entities of these\nschemas are also removed.\n\n\n```ts\ntype DeletionRelationEntitySchema = "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"\n```\n\n### `ListConfigsResponse`\n\nPaginated response containing a list of data lifecycle configs.\n\n```ts\ntype ListConfigsResponse = {\n configs?: Array<{\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: { ... }\n include_deleted?: { ... }\n filters?: { ... }\n }\n schedule?: {\n frequency: { ... }\n interval_days: { ... }\n start_date?: { ... }\n end_date?: { ... }\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n }>\n cursor?: string\n}\n```\n';
5
+
6
+
7
+ exports.default = data_governance_default;
@@ -0,0 +1,7 @@
1
+ import "./chunk-YPSWSI3M.js";
2
+
3
+ // src/docs/data-governance.json
4
+ var data_governance_default = '# Data Governance API\n\n- **Base URL:** `https://data-governance.sls.epilot.io`\n- **Full API Docs:** [https://docs.epilot.io/api/data-governance](https://docs.epilot.io/api/data-governance)\n\n## Usage\n\n```ts\nimport { epilot } from \'@epilot/sdk\'\n\nepilot.authorize(() => \'<token>\')\nconst { data } = await epilot.dataGovernance.queryEntities(...)\n```\n\n### Tree-shakeable import\n\n```ts\nimport { getClient, authorize } from \'@epilot/sdk/data-governance\'\n\nconst dataGovernanceClient = getClient()\nauthorize(dataGovernanceClient, () => \'<token>\')\nconst { data } = await dataGovernanceClient.queryEntities(...)\n```\n\n## Operations\n\n**Query**\n- [`queryEntities`](#queryentities)\n\n**Auditable Jobs**\n- [`createJob`](#createjob)\n- [`updateJob`](#updatejob)\n- [`getJob`](#getjob)\n- [`getJobReportUrl`](#getjobreporturl)\n- [`createJobForConfig`](#createjobforconfig)\n- [`listJobs`](#listjobs)\n\n**Data Lifecycle Configs**\n- [`getConfig`](#getconfig)\n- [`upsertConfig`](#upsertconfig)\n- [`listConfigs`](#listconfigs)\n\n**Schemas**\n- [`ConfigType`](#configtype)\n- [`JobStatus`](#jobstatus)\n- [`JobTrigger`](#jobtrigger)\n- [`JobReportFormat`](#jobreportformat)\n- [`JobReport`](#jobreport)\n- [`CreateJobRequest`](#createjobrequest)\n- [`JobDetails`](#jobdetails)\n- [`UpdateJobRequest`](#updatejobrequest)\n- [`Job`](#job)\n- [`ListJobsResponse`](#listjobsresponse)\n- [`JobReportUrlResponse`](#jobreporturlresponse)\n- [`QueryFilterType`](#queryfiltertype)\n- [`QueryFilter`](#queryfilter)\n- [`QueryConfig`](#queryconfig)\n- [`QueryEntitiesRequest`](#queryentitiesrequest)\n- [`QueryEntitiesResult`](#queryentitiesresult)\n- [`ConfigSchedule`](#configschedule)\n- [`IntervalConfigSchedule`](#intervalconfigschedule)\n- [`UpsertConfigRequest`](#upsertconfigrequest)\n- [`Config`](#config)\n- [`DeletionRelationEntitySchema`](#deletionrelationentityschema)\n- [`ListConfigsResponse`](#listconfigsresponse)\n\n### `queryEntities`\n\nQuery entities matching a data lifecycle config\n\n`POST /data-governance/v1/{entity_schema}/query`\n\n```ts\nconst { data } = await client.queryEntities(\n {\n entity_schema: \'example\',\n },\n {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\'],\n workflow_status: [\'CLOSED\']\n }\n ],\n from: 0,\n size: 0,\n hydrate: true,\n fields: [\'string\']\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "hits": 0,\n "results": [\n {}\n ]\n}\n```\n\n</details>\n\n---\n\n### `createJob`\n\nCreate a new job run\n\n`POST /data-governance/v1/{entity_schema}/jobs`\n\n```ts\nconst { data } = await client.createJob(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n config_id: \'string\',\n scheduled_for: \'string\',\n status: \'in_progress\',\n started_at: \'1970-01-01T00:00:00.000Z\'\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `updateJob`\n\nUpdate an existing job run\n\n`PATCH /data-governance/v1/{entity_schema}/jobs/{job_id}`\n\n```ts\nconst { data } = await client.updateJob(\n {\n entity_schema: \'example\',\n job_id: \'example\',\n },\n {\n status: \'in_progress\',\n details: {},\n completed_at: \'1970-01-01T00:00:00.000Z\',\n error: \'string\',\n report: {\n bucket: \'string\',\n key: \'string\',\n format: \'csv\'\n }\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJob`\n\nGet a job by ID\n\n`GET /data-governance/v1/jobs/{job_id}`\n\n```ts\nconst { data } = await client.getJob({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `getJobReportUrl`\n\nGet report download URL for a job\n\n`GET /data-governance/v1/jobs/{job_id}/report-url`\n\n```ts\nconst { data } = await client.getJobReportUrl({\n job_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "url": "string",\n "expires_in": 0\n}\n```\n\n</details>\n\n---\n\n### `getConfig`\n\nGet a config by ID\n\n`GET /data-governance/v1/configs/{config_id}`\n\n```ts\nconst { data } = await client.getConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `createJobForConfig`\n\nTrigger a manual job run for a config\n\n`POST /data-governance/v1/configs/{config_id}/jobs`\n\n```ts\nconst { data } = await client.createJobForConfig({\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n}\n```\n\n</details>\n\n---\n\n### `upsertConfig`\n\nCreate or update a data lifecycle config\n\n`POST /data-governance/v1/{entity_schema}/configs`\n\n```ts\nconst { data } = await client.upsertConfig(\n {\n entity_schema: \'example\',\n },\n {\n type: \'deletion\',\n query: {\n saved_view_id: \'string\',\n include_deleted: \'true\',\n filters: [\n {\n type: \'entity_workflows_only_in_closed_or_cancelled_status\',\n related_entity_schemas: [\'string\'],\n lookback_period_days: 0,\n message_type: [\'SENT\'],\n workflow_status: [\'CLOSED\']\n }\n ]\n },\n schedule: {\n frequency: \'interval\',\n interval_days: 1,\n start_date: \'string\',\n end_date: \'string\'\n },\n relations_for_deletion: [\'contact\'],\n enabled: true\n },\n)\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n}\n```\n\n</details>\n\n---\n\n### `listConfigs`\n\nList data lifecycle configs\n\n`GET /data-governance/v1/configs`\n\n```ts\nconst { data } = await client.listConfigs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n next_run_at: \'example\',\n enabled: true,\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "configs": [\n {\n "id": "string",\n "type": "deletion",\n "entity_schema": "string",\n "query": {\n "saved_view_id": "string",\n "include_deleted": "true",\n "filters": [\n {\n "type": "entity_workflows_only_in_closed_or_cancelled_status",\n "related_entity_schemas": ["string"],\n "lookback_period_days": 0,\n "message_type": ["SENT"],\n "workflow_status": ["CLOSED"]\n }\n ]\n },\n "schedule": {\n "frequency": "interval",\n "interval_days": 1,\n "start_date": "string",\n "end_date": "string"\n },\n "enabled": true,\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "next_run_at": "string",\n "relations_for_deletion": ["contact"],\n "last_run_at": "1970-01-01T00:00:00.000Z"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n### `listJobs`\n\nList job runs\n\n`GET /data-governance/v1/jobs`\n\n```ts\nconst { data } = await client.listJobs({\n limit: 1,\n cursor: \'example\',\n entity_schema: \'example\',\n type: \'example\',\n status: \'example\',\n config_id: \'example\',\n})\n```\n\n<details>\n<summary>Response</summary>\n\n```json\n{\n "jobs": [\n {\n "id": "string",\n "type": "deletion",\n "config_id": "string",\n "entity_schema": "string",\n "scheduled_for": "string",\n "status": "in_progress",\n "details": {},\n "started_at": "1970-01-01T00:00:00.000Z",\n "completed_at": "1970-01-01T00:00:00.000Z",\n "error": "string",\n "report": {\n "bucket": "string",\n "key": "string",\n "format": "csv"\n },\n "created_at": "1970-01-01T00:00:00.000Z",\n "last_updated_at": "1970-01-01T00:00:00.000Z",\n "trigger": "schedule",\n "triggered_by": "string"\n }\n ],\n "cursor": "string"\n}\n```\n\n</details>\n\n---\n\n## Schemas\n\n### `ConfigType`\n\nThe governance action type. Determines what operation is performed on\nmatched entities when a job runs. Currently only `deletion` is supported.\n\n\n```ts\ntype ConfigType = "deletion"\n```\n\n### `JobStatus`\n\nCurrent execution status of a job run.\n- `in_progress` \u2014 the job is actively processing entities.\n- `success` \u2014 the job completed without critical errors.\n- `failed` \u2014 the job terminated due to an error.\n\n\n```ts\ntype JobStatus = "in_progress" | "success" | "failed"\n```\n\n### `JobTrigger`\n\nIndicates how the job was initiated.\n- `schedule` \u2014 automatically created by the background scheduler.\n- `manual` \u2014 explicitly triggered by a user via the API.\n\n\n```ts\ntype JobTrigger = "schedule" | "manual"\n```\n\n### `JobReportFormat`\n\nFile format of the job report. Currently only CSV is supported.\n\n```ts\ntype JobReportFormat = "csv"\n```\n\n### `JobReport`\n\nReference to a report file stored in S3 that details the outcome of a\njob run (e.g., which entities were deleted or failed).\n\n\n```ts\ntype JobReport = {\n bucket?: string\n key?: string\n format?: "csv"\n}\n```\n\n### `CreateJobRequest`\n\nRequest payload for creating a new job run.\n\n```ts\ntype CreateJobRequest = {\n type: "deletion"\n config_id: string\n scheduled_for: string // date\n status?: "in_progress" | "success" | "failed"\n started_at?: string // date-time\n}\n```\n\n### `JobDetails`\n\nType-specific job outcome payload. The shape depends on the config type.\nFor `deletion` jobs, typical fields include:\n- `matched_count` \u2014 total entities matched by the query\n- `deleted_count` \u2014 entities successfully deleted\n- `failed_count` \u2014 entities that could not be deleted\n\n\n```ts\ntype JobDetails = Record<string, unknown>\n```\n\n### `UpdateJobRequest`\n\nPartial update payload for an existing job. Only the fields provided\nwill be merged into the job record.\n\n\n```ts\ntype UpdateJobRequest = {\n status?: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n}\n```\n\n### `Job`\n\nRepresents a single execution run of a data lifecycle config. Tracks the\nfull lifecycle from creation through completion, including outcome\ndetails and an optional downloadable report.\n\n\n```ts\ntype Job = {\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: string\n key?: string\n format?: "csv"\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n}\n```\n\n### `ListJobsResponse`\n\nPaginated response containing a list of job runs.\n\n```ts\ntype ListJobsResponse = {\n jobs?: Array<{\n id: string\n type: "deletion"\n config_id: string\n entity_schema: string\n scheduled_for: string // date\n status: "in_progress" | "success" | "failed"\n details?: Record<string, unknown>\n started_at?: string // date-time\n completed_at?: string // date-time\n error?: string\n report?: {\n bucket?: { ... }\n key?: { ... }\n format?: { ... }\n }\n created_at: string // date-time\n last_updated_at: string // date-time\n trigger?: "schedule" | "manual"\n triggered_by?: string\n }>\n cursor?: string\n}\n```\n\n### `JobReportUrlResponse`\n\nContains a time-limited pre-signed URL to download a job report.\n\n```ts\ntype JobReportUrlResponse = {\n url?: string\n expires_in?: number\n}\n```\n\n### `QueryFilterType`\n\nPredefined data governance filter types that can be layered on top of\na saved view to narrow down target entities:\n- `entity_workflows_only_in_closed_or_cancelled_status` \u2014 include only\n entities whose own workflows are all in a closed/cancelled state.\n- `no_related_entities` \u2014 include only entitie\n\n```ts\ntype 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"\n```\n\n### `QueryFilter`\n\nA single governance filter condition applied during entity querying.\nThe required and optional fields depend on the `type`.\n\n\n```ts\ntype QueryFilter = {\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n}\n```\n\n### `QueryConfig`\n\nDefines the query used by a data lifecycle config to identify target\nentities. Combines a saved view with optional governance filters.\n\n\n```ts\ntype QueryConfig = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n }>\n}\n```\n\n### `QueryEntitiesRequest`\n\nRequest body for the query endpoint. Extends `QueryConfig` with\npagination and projection options.\n\n\n```ts\ntype QueryEntitiesRequest = {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n 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"\n related_entity_schemas?: string[]\n lookback_period_days?: number\n message_type?: "SENT" | "RECEIVED"[]\n workflow_status?: "CLOSED" | "DONE"[]\n }>\n from?: number\n size?: number\n hydrate?: boolean\n fields?: string[]\n}\n```\n\n### `QueryEntitiesResult`\n\nResponse from the entity query endpoint.\n\n```ts\ntype QueryEntitiesResult = {\n hits?: number\n results?: Record<string, unknown>[]\n}\n```\n\n### `ConfigSchedule`\n\nInterval-based schedule. The governance engine will create a job every\n`interval_days` days, optionally bounded by start and end dates.\n\n\n```ts\ntype ConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `IntervalConfigSchedule`\n\nInterval-based schedule. The governance engine will create a job every\n`interval_days` days, optionally bounded by start and end dates.\n\n\n```ts\ntype IntervalConfigSchedule = {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n}\n```\n\n### `UpsertConfigRequest`\n\nRequest payload for creating or updating a data lifecycle config.\n\n```ts\ntype UpsertConfigRequest = {\n type: "deletion"\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n workflow_status?: { ... }\n }>\n }\n schedule: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n enabled?: boolean\n}\n```\n\n### `Config`\n\nA data lifecycle config defining an automated policy (e.g., scheduled\nentity deletion) for a specific entity schema.\n\n\n```ts\ntype Config = {\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: string\n include_deleted?: "true" | "false" | "only"\n filters?: Array<{\n type: { ... }\n related_entity_schemas?: { ... }\n lookback_period_days?: { ... }\n message_type?: { ... }\n workflow_status?: { ... }\n }>\n }\n schedule?: {\n frequency: "interval"\n interval_days: number\n start_date?: string // date\n end_date?: string // date\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n}\n```\n\n### `DeletionRelationEntitySchema`\n\nEntity schema slug that can be specified as a cascading deletion\ntarget. When a primary entity is deleted, related entities of these\nschemas are also removed.\n\n\n```ts\ntype DeletionRelationEntitySchema = "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"\n```\n\n### `ListConfigsResponse`\n\nPaginated response containing a list of data lifecycle configs.\n\n```ts\ntype ListConfigsResponse = {\n configs?: Array<{\n id: string\n type: "deletion"\n entity_schema: string\n query: {\n saved_view_id: { ... }\n include_deleted?: { ... }\n filters?: { ... }\n }\n schedule?: {\n frequency: { ... }\n interval_days: { ... }\n start_date?: { ... }\n end_date?: { ... }\n }\n enabled?: boolean\n created_at?: string // date-time\n last_updated_at?: string // date-time\n next_run_at?: string // date\n relations_for_deletion?: "contact" | "file" | "opportunity" | "order" | "meter" | "ticket" | "message" | "account" | "submission" | "contract"[]\n last_run_at?: string // date-time\n }>\n cursor?: string\n}\n```\n';
5
+ export {
6
+ data_governance_default as default
7
+ };