@epilot/sdk 2.18.23 → 2.18.25

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 (136) hide show
  1. package/definitions/customer-portal-runtime.json +1 -1
  2. package/definitions/customer-portal.json +418 -10
  3. package/definitions/validation-rules.json +67 -2
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.js +1 -1
  14. package/dist/apis/audit-logs.cjs +6 -6
  15. package/dist/apis/audit-logs.js +1 -1
  16. package/dist/apis/automation.cjs +6 -6
  17. package/dist/apis/automation.js +1 -1
  18. package/dist/apis/billing.cjs +6 -6
  19. package/dist/apis/billing.js +1 -1
  20. package/dist/apis/blueprint-manifest.cjs +6 -6
  21. package/dist/apis/blueprint-manifest.js +1 -1
  22. package/dist/apis/calendar.cjs +6 -6
  23. package/dist/apis/calendar.js +1 -1
  24. package/dist/apis/configuration-hub.cjs +6 -6
  25. package/dist/apis/configuration-hub.js +1 -1
  26. package/dist/apis/consent.cjs +6 -6
  27. package/dist/apis/consent.js +1 -1
  28. package/dist/apis/customer-portal.cjs +8 -8
  29. package/dist/apis/customer-portal.d.cts +2 -2
  30. package/dist/apis/customer-portal.d.ts +2 -2
  31. package/dist/apis/customer-portal.js +2 -2
  32. package/dist/apis/dashboard.cjs +6 -6
  33. package/dist/apis/dashboard.js +1 -1
  34. package/dist/apis/data-governance.cjs +6 -6
  35. package/dist/apis/data-governance.js +1 -1
  36. package/dist/apis/deduplication.cjs +6 -6
  37. package/dist/apis/deduplication.js +1 -1
  38. package/dist/apis/design.cjs +6 -6
  39. package/dist/apis/design.js +1 -1
  40. package/dist/apis/document.cjs +6 -6
  41. package/dist/apis/document.js +1 -1
  42. package/dist/apis/email-settings.cjs +6 -6
  43. package/dist/apis/email-settings.js +1 -1
  44. package/dist/apis/email-template.cjs +6 -6
  45. package/dist/apis/email-template.js +1 -1
  46. package/dist/apis/entity-mapping.cjs +6 -6
  47. package/dist/apis/entity-mapping.js +1 -1
  48. package/dist/apis/entity.cjs +6 -6
  49. package/dist/apis/entity.js +1 -1
  50. package/dist/apis/environments.cjs +6 -6
  51. package/dist/apis/environments.js +1 -1
  52. package/dist/apis/event-catalog.cjs +6 -6
  53. package/dist/apis/event-catalog.js +1 -1
  54. package/dist/apis/file.cjs +6 -6
  55. package/dist/apis/file.js +1 -1
  56. package/dist/apis/iban.cjs +6 -6
  57. package/dist/apis/iban.js +1 -1
  58. package/dist/apis/integration-toolkit.cjs +6 -6
  59. package/dist/apis/integration-toolkit.js +1 -1
  60. package/dist/apis/journey.cjs +6 -6
  61. package/dist/apis/journey.js +1 -1
  62. package/dist/apis/kanban.cjs +6 -6
  63. package/dist/apis/kanban.js +1 -1
  64. package/dist/apis/message.cjs +6 -6
  65. package/dist/apis/message.js +1 -1
  66. package/dist/apis/metering.cjs +6 -6
  67. package/dist/apis/metering.js +1 -1
  68. package/dist/apis/notes.cjs +6 -6
  69. package/dist/apis/notes.js +1 -1
  70. package/dist/apis/notification.cjs +6 -6
  71. package/dist/apis/notification.js +1 -1
  72. package/dist/apis/organization.cjs +6 -6
  73. package/dist/apis/organization.js +1 -1
  74. package/dist/apis/partner-directory.cjs +6 -6
  75. package/dist/apis/partner-directory.js +1 -1
  76. package/dist/apis/permissions.cjs +6 -6
  77. package/dist/apis/permissions.js +1 -1
  78. package/dist/apis/pricing-tier.cjs +6 -6
  79. package/dist/apis/pricing-tier.js +1 -1
  80. package/dist/apis/pricing.cjs +6 -6
  81. package/dist/apis/pricing.js +1 -1
  82. package/dist/apis/purpose.cjs +6 -6
  83. package/dist/apis/purpose.js +1 -1
  84. package/dist/apis/query.cjs +6 -6
  85. package/dist/apis/query.js +1 -1
  86. package/dist/apis/sandbox.cjs +6 -6
  87. package/dist/apis/sandbox.js +1 -1
  88. package/dist/apis/sharing.cjs +6 -6
  89. package/dist/apis/sharing.js +1 -1
  90. package/dist/apis/snapshot.cjs +6 -6
  91. package/dist/apis/snapshot.js +1 -1
  92. package/dist/apis/submission.cjs +6 -6
  93. package/dist/apis/submission.js +1 -1
  94. package/dist/apis/target.cjs +6 -6
  95. package/dist/apis/target.js +1 -1
  96. package/dist/apis/targeting.cjs +6 -6
  97. package/dist/apis/targeting.js +1 -1
  98. package/dist/apis/template-variables.cjs +6 -6
  99. package/dist/apis/template-variables.js +1 -1
  100. package/dist/apis/user.cjs +6 -6
  101. package/dist/apis/user.js +1 -1
  102. package/dist/apis/validation-rules.cjs +6 -6
  103. package/dist/apis/validation-rules.d.cts +2 -2
  104. package/dist/apis/validation-rules.d.ts +2 -2
  105. package/dist/apis/validation-rules.js +1 -1
  106. package/dist/apis/webhooks.cjs +6 -6
  107. package/dist/apis/webhooks.js +1 -1
  108. package/dist/apis/workflow-definition.cjs +6 -6
  109. package/dist/apis/workflow-definition.js +1 -1
  110. package/dist/apis/workflow.cjs +6 -6
  111. package/dist/apis/workflow.js +1 -1
  112. package/dist/{chunk-J57SWYWL.cjs → chunk-6AESXD5D.cjs} +3 -3
  113. package/dist/{chunk-AWKA7GZQ.js → chunk-GB2OJK7Z.js} +1 -1
  114. package/dist/{chunk-QKEPXYEF.cjs → chunk-Q35SXSWS.cjs} +1 -1
  115. package/dist/{chunk-SCBBLLBK.js → chunk-XW3N5APN.js} +3 -3
  116. package/dist/customer-portal-FOLTI3GK.cjs +7 -0
  117. package/dist/customer-portal-HQ3DJCGO.js +7 -0
  118. package/dist/{customer-portal-runtime-6CECA6UW.js → customer-portal-runtime-PIBTR7QG.js} +1 -1
  119. package/dist/{customer-portal-runtime-QMONBHLN.cjs → customer-portal-runtime-UVMYBCJL.cjs} +2 -2
  120. package/dist/{customer-portal.d-Ce8-UnSY.d.cts → customer-portal.d-D44zeiJ4.d.cts} +348 -12
  121. package/dist/{customer-portal.d-Ce8-UnSY.d.ts → customer-portal.d-D44zeiJ4.d.ts} +348 -12
  122. package/dist/index.cjs +10 -10
  123. package/dist/index.d.cts +2 -2
  124. package/dist/index.d.ts +2 -2
  125. package/dist/index.js +2 -2
  126. package/dist/validation-rules-G5BWXUWI.cjs +7 -0
  127. package/dist/validation-rules-NLHK2CD3.js +7 -0
  128. package/dist/{validation-rules.d-BBy6Cw2O.d.cts → validation-rules.d-MvjG-zzw.d.cts} +58 -2
  129. package/dist/{validation-rules.d-BBy6Cw2O.d.ts → validation-rules.d-MvjG-zzw.d.ts} +58 -2
  130. package/docs/customer-portal.md +264 -4
  131. package/docs/validation-rules.md +63 -4
  132. package/package.json +1 -1
  133. package/dist/customer-portal-JLUT56QQ.js +0 -7
  134. package/dist/customer-portal-NUYHT3HX.cjs +0 -7
  135. package/dist/validation-rules-CU5JJKDV.cjs +0 -7
  136. package/dist/validation-rules-M2JVIR7U.js +0 -7
@@ -141,6 +141,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
141
141
  - [`getAutomationContext`](#getautomationcontext)
142
142
  - [`updateWorkflowStepAsDone`](#updateworkflowstepasdone)
143
143
  - [`getEntityWorkflows`](#getentityworkflows)
144
+ - [`getOutstandingTasks`](#getoutstandingtasks)
144
145
  - [`getEntityPortalWorkflows`](#getentityportalworkflows)
145
146
  - [`getEntityPortalWorkflowsBatch`](#getentityportalworkflowsbatch)
146
147
  - [`uploadMeterReadingPhoto`](#uploadmeterreadingphoto)
@@ -153,6 +154,10 @@ const { data } = await customerPortalClient.upsertPortal(...)
153
154
  - [`getPortalPageBlocks`](#getportalpageblocks)
154
155
  - [`getPortalPageBlock`](#getportalpageblock)
155
156
  - [`updateCampaignPortalBlockStatus`](#updatecampaignportalblockstatus)
157
+ - [`listPortalNotifications`](#listportalnotifications)
158
+ - [`getPortalNotificationsUnreadCount`](#getportalnotificationsunreadcount)
159
+ - [`markAllPortalNotificationsRead`](#markallportalnotificationsread)
160
+ - [`markPortalNotificationRead`](#markportalnotificationread)
156
161
  - [`updateNotificationsStatus`](#updatenotificationsstatus)
157
162
  - [`invitePartner`](#invitepartner)
158
163
  - [`listBusinessPartners`](#listbusinesspartners)
@@ -176,6 +181,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
176
181
  - [`ssoLoginV3`](#ssologinv3)
177
182
 
178
183
  **Schemas**
184
+ - [`PortalNotification`](#portalnotification)
179
185
  - [`MobileBuildStatus`](#mobilebuildstatus)
180
186
  - [`MobileBranding`](#mobilebranding)
181
187
  - [`MobileConfig`](#mobileconfig)
@@ -195,6 +201,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
195
201
  - [`AllowedFileExtensions`](#allowedfileextensions)
196
202
  - [`UpdateOnlyPortalConfigAttributes`](#updateonlyportalconfigattributes)
197
203
  - [`CommonConfigAttributes`](#commonconfigattributes)
204
+ - [`NotificationTriggerConfig`](#notificationtriggerconfig)
198
205
  - [`UpsertPortalConfig`](#upsertportalconfig)
199
206
  - [`PortalConfig`](#portalconfig)
200
207
  - [`UpsertPortalWidget`](#upsertportalwidget)
@@ -255,6 +262,7 @@ const { data } = await customerPortalClient.upsertPortal(...)
255
262
  - [`Rule`](#rule)
256
263
  - [`JourneyActions`](#journeyactions)
257
264
  - [`ExternalLink`](#externallink)
265
+ - [`OutstandingTask`](#outstandingtask)
258
266
  - [`WorkflowExecution`](#workflowexecution)
259
267
  - [`WorkflowStep`](#workflowstep)
260
268
  - [`PortalWorkflow`](#portalworkflow)
@@ -610,7 +618,15 @@ const { data } = await client.upsertPortal(
610
618
  portal_sk_v3: 'PORTAL_CONFIG#453ad7bf-86d5-46c8-8252-bcc868df5e3c',
611
619
  origin: 'string',
612
620
  pages: {},
613
- global_blocks: {}
621
+ global_blocks: {},
622
+ notification_triggers: [
623
+ {
624
+ trigger_type: 'entity_created',
625
+ entity_schema: 'opportunity',
626
+ enabled: true,
627
+ template_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
628
+ }
629
+ ]
614
630
  },
615
631
  )
616
632
  ```
@@ -838,6 +854,14 @@ const { data } = await client.upsertPortal(
838
854
  "origin": "string",
839
855
  "pages": {},
840
856
  "global_blocks": {},
857
+ "notification_triggers": [
858
+ {
859
+ "trigger_type": "entity_created",
860
+ "entity_schema": "opportunity",
861
+ "enabled": true,
862
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
863
+ }
864
+ ],
841
865
  "id": 12345,
842
866
  "organization_id": 12345,
843
867
  "org_settings": {
@@ -1203,6 +1227,14 @@ const { data } = await client.getPortalConfigByDomain({
1203
1227
  "origin": "string",
1204
1228
  "pages": {},
1205
1229
  "global_blocks": {},
1230
+ "notification_triggers": [
1231
+ {
1232
+ "trigger_type": "entity_created",
1233
+ "entity_schema": "opportunity",
1234
+ "enabled": true,
1235
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
1236
+ }
1237
+ ],
1206
1238
  "id": 12345,
1207
1239
  "organization_id": 12345,
1208
1240
  "org_settings": {
@@ -1471,6 +1503,14 @@ const { data } = await client.getPortalConfig({
1471
1503
  "origin": "string",
1472
1504
  "pages": {},
1473
1505
  "global_blocks": {},
1506
+ "notification_triggers": [
1507
+ {
1508
+ "trigger_type": "entity_created",
1509
+ "entity_schema": "opportunity",
1510
+ "enabled": true,
1511
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
1512
+ }
1513
+ ],
1474
1514
  "id": 12345,
1475
1515
  "organization_id": 12345,
1476
1516
  "org_settings": {
@@ -2087,7 +2127,11 @@ const { data } = await client.getConsumption({
2087
2127
  "timestamp": "1970-01-01T00:00:00.000Z",
2088
2128
  "value": 0,
2089
2129
  "type": "nt",
2090
- "unit": "kWh"
2130
+ "unit": "kWh",
2131
+ "label": {
2132
+ "en": "Billing period 1",
2133
+ "de": "Abrechnungszeitraum 1"
2134
+ }
2091
2135
  }
2092
2136
  ]
2093
2137
  }
@@ -2624,6 +2668,14 @@ const { data } = await client.getPublicPortalConfig({
2624
2668
  "origin": "string",
2625
2669
  "pages": {},
2626
2670
  "global_blocks": {},
2671
+ "notification_triggers": [
2672
+ {
2673
+ "trigger_type": "entity_created",
2674
+ "entity_schema": "opportunity",
2675
+ "enabled": true,
2676
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
2677
+ }
2678
+ ],
2627
2679
  "id": 12345,
2628
2680
  "organization_id": 12345,
2629
2681
  "org_settings": {
@@ -2892,6 +2944,14 @@ const { data } = await client.getOrgPortalConfig({
2892
2944
  "origin": "string",
2893
2945
  "pages": {},
2894
2946
  "global_blocks": {},
2947
+ "notification_triggers": [
2948
+ {
2949
+ "trigger_type": "entity_created",
2950
+ "entity_schema": "opportunity",
2951
+ "enabled": true,
2952
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
2953
+ }
2954
+ ],
2895
2955
  "id": 12345,
2896
2956
  "organization_id": 12345,
2897
2957
  "org_settings": {
@@ -3169,6 +3229,14 @@ const { data } = await client.getPublicPortalConfigV3({
3169
3229
  "origin": "string",
3170
3230
  "pages": {},
3171
3231
  "global_blocks": {},
3232
+ "notification_triggers": [
3233
+ {
3234
+ "trigger_type": "entity_created",
3235
+ "entity_schema": "opportunity",
3236
+ "enabled": true,
3237
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
3238
+ }
3239
+ ],
3172
3240
  "id": 12345,
3173
3241
  "organization_id": 12345,
3174
3242
  "org_settings": {
@@ -3437,6 +3505,14 @@ const { data } = await client.getOrgPortalConfigV3({
3437
3505
  "origin": "string",
3438
3506
  "pages": {},
3439
3507
  "global_blocks": {},
3508
+ "notification_triggers": [
3509
+ {
3510
+ "trigger_type": "entity_created",
3511
+ "entity_schema": "opportunity",
3512
+ "enabled": true,
3513
+ "template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
3514
+ }
3515
+ ],
3440
3516
  "id": 12345,
3441
3517
  "organization_id": 12345,
3442
3518
  "org_settings": {
@@ -3538,6 +3614,7 @@ const { data } = await client.getAllPortalConfigs()
3538
3614
  "origin": "string",
3539
3615
  "pages": {},
3540
3616
  "global_blocks": {},
3617
+ "notification_triggers": [],
3541
3618
  "id": 12345,
3542
3619
  "organization_id": 12345,
3543
3620
  "org_settings": {},
@@ -5790,6 +5867,7 @@ const { data } = await client.getFilePreview({
5790
5867
  {
5791
5868
  "kind": "pdf",
5792
5869
  "url": "https://example.com/path",
5870
+ "requires_auth": true,
5793
5871
  "download_url": "https://example.com/path"
5794
5872
  }
5795
5873
  ```
@@ -5843,7 +5921,8 @@ const { data } = await client.trackFileDownloaded({
5843
5921
  "_title": "Opportunity ABC"
5844
5922
  }
5845
5923
  ],
5846
- "is_new": true
5924
+ "is_new": true,
5925
+ "custom_download_url_auth": "token"
5847
5926
  }
5848
5927
  }
5849
5928
  ```
@@ -6477,6 +6556,42 @@ const { data } = await client.getEntityWorkflows({
6477
6556
 
6478
6557
  ---
6479
6558
 
6559
+ ### `getOutstandingTasks`
6560
+
6561
+ Get outstanding workflow tasks for the portal user
6562
+
6563
+ `GET /v2/portal/engagement/tasks`
6564
+
6565
+ ```ts
6566
+ const { data } = await client.getOutstandingTasks()
6567
+ ```
6568
+
6569
+ <details>
6570
+ <summary>Response</summary>
6571
+
6572
+ ```json
6573
+ {
6574
+ "tasks": [
6575
+ {
6576
+ "entity_id": "string",
6577
+ "entity_schema": "string",
6578
+ "entity_title": "string",
6579
+ "workflow_id": "string",
6580
+ "workflow_name": "string",
6581
+ "step_id": "string",
6582
+ "step_name": "string",
6583
+ "journey_id": "string",
6584
+ "complete_task_automatically": true
6585
+ }
6586
+ ],
6587
+ "total": 0
6588
+ }
6589
+ ```
6590
+
6591
+ </details>
6592
+
6593
+ ---
6594
+
6480
6595
  ### `getEntityPortalWorkflows`
6481
6596
 
6482
6597
  Get all portal-relevant workflows associated with an entity (requires access to the entity),
@@ -7871,6 +7986,100 @@ const { data } = await client.updateCampaignPortalBlockStatus(
7871
7986
 
7872
7987
  ---
7873
7988
 
7989
+ ### `listPortalNotifications`
7990
+
7991
+ Lists the 360 notifications addressed to the authenticated portal user, newest first. The organization and the portal user are derived from the authenticated session, so a user can only ever read thei
7992
+
7993
+ `GET /v2/portal/notifications`
7994
+
7995
+ ```ts
7996
+ const { data } = await client.listPortalNotifications({
7997
+ cursor: 'example',
7998
+ limit: 1,
7999
+ })
8000
+ ```
8001
+
8002
+ <details>
8003
+ <summary>Response</summary>
8004
+
8005
+ ```json
8006
+ {
8007
+ "cursor": "string",
8008
+ "total_unread": 0,
8009
+ "results": [
8010
+ {
8011
+ "id": "1234567890",
8012
+ "notification_id": 1234567890,
8013
+ "type": "workflow_step_overdue",
8014
+ "title": {
8015
+ "en": "string",
8016
+ "de": "string"
8017
+ },
8018
+ "message": {
8019
+ "en": "string",
8020
+ "de": "string"
8021
+ },
8022
+ "created_at": "1970-01-01T00:00:00.000Z",
8023
+ "read": false,
8024
+ "redirect_url": "string"
8025
+ }
8026
+ ]
8027
+ }
8028
+ ```
8029
+
8030
+ </details>
8031
+
8032
+ ---
8033
+
8034
+ ### `getPortalNotificationsUnreadCount`
8035
+
8036
+ Returns the number of unread notifications for the authenticated portal user.
8037
+
8038
+ `GET /v2/portal/notifications/unread-count`
8039
+
8040
+ ```ts
8041
+ const { data } = await client.getPortalNotificationsUnreadCount()
8042
+ ```
8043
+
8044
+ <details>
8045
+ <summary>Response</summary>
8046
+
8047
+ ```json
8048
+ {
8049
+ "count": 3
8050
+ }
8051
+ ```
8052
+
8053
+ </details>
8054
+
8055
+ ---
8056
+
8057
+ ### `markAllPortalNotificationsRead`
8058
+
8059
+ Marks all notifications of the authenticated portal user as read.
8060
+
8061
+ `PUT /v2/portal/notifications/read-all`
8062
+
8063
+ ```ts
8064
+ const { data } = await client.markAllPortalNotificationsRead()
8065
+ ```
8066
+
8067
+ ---
8068
+
8069
+ ### `markPortalNotificationRead`
8070
+
8071
+ Marks a single notification of the authenticated portal user as read.
8072
+
8073
+ `PUT /v2/portal/notifications/{id}/read`
8074
+
8075
+ ```ts
8076
+ const { data } = await client.markPortalNotificationRead({
8077
+ id: 1,
8078
+ })
8079
+ ```
8080
+
8081
+ ---
8082
+
7874
8083
  ### `updateNotificationsStatus`
7875
8084
 
7876
8085
  Updates the statuses of multiple notifications at once.
@@ -9909,7 +10118,6 @@ const { data } = await client.invitePartner(
9909
10118
  null,
9910
10119
  {
9911
10120
  email: 'string',
9912
- represents_contact_list: ['5da0a718-c822-403d-9f5d-20d4584e0528'],
9913
10121
  contact_data: {},
9914
10122
  portal_user_data: {}
9915
10123
  },
@@ -10302,6 +10510,29 @@ const { data } = await client.putMobileConfig(
10302
10510
 
10303
10511
  ## Schemas
10304
10512
 
10513
+ ### `PortalNotification`
10514
+
10515
+ A 360 notification addressed to a portal user.
10516
+
10517
+ ```ts
10518
+ type PortalNotification = {
10519
+ id: string
10520
+ notification_id?: number
10521
+ type?: string
10522
+ title?: {
10523
+ en?: string
10524
+ de?: string
10525
+ }
10526
+ message?: {
10527
+ en?: string
10528
+ de?: string
10529
+ }
10530
+ created_at?: string // date-time
10531
+ read: boolean
10532
+ redirect_url?: string
10533
+ }
10534
+ ```
10535
+
10305
10536
  ### `MobileBuildStatus`
10306
10537
 
10307
10538
  Latest build/upload status for a platform (system-written).
@@ -10771,6 +11002,17 @@ type CommonConfigAttributes = {
10771
11002
  }
10772
11003
  ```
10773
11004
 
11005
+ ### `NotificationTriggerConfig`
11006
+
11007
+ ```ts
11008
+ type NotificationTriggerConfig = {
11009
+ trigger_type: "entity_created" | "entity_assigned" | "workflow_step_overdue"
11010
+ entity_schema?: string
11011
+ enabled?: boolean
11012
+ template_id?: string // uuid
11013
+ }
11014
+ ```
11015
+
10774
11016
  ### `UpsertPortalConfig`
10775
11017
 
10776
11018
  ```ts
@@ -12061,6 +12303,7 @@ type FileItem = {
12061
12303
  _title?: string
12062
12304
  }>
12063
12305
  is_new?: boolean
12306
+ custom_download_url_auth?: "token" | "presigned"
12064
12307
  }
12065
12308
  ```
12066
12309
 
@@ -12070,6 +12313,7 @@ type FileItem = {
12070
12313
  type FilePreviewResult = {
12071
12314
  kind: "pdf" | "image" | "unsupported"
12072
12315
  url?: string // uri
12316
+ requires_auth?: boolean
12073
12317
  download_url?: string // uri
12074
12318
  }
12075
12319
  ```
@@ -12172,6 +12416,22 @@ type ExternalLink = {
12172
12416
  }
12173
12417
  ```
12174
12418
 
12419
+ ### `OutstandingTask`
12420
+
12421
+ ```ts
12422
+ type OutstandingTask = {
12423
+ entity_id: string
12424
+ entity_schema: string
12425
+ entity_title: string
12426
+ workflow_id: string
12427
+ workflow_name: string
12428
+ step_id: string
12429
+ step_name: string
12430
+ journey_id: string
12431
+ complete_task_automatically?: boolean
12432
+ }
12433
+ ```
12434
+
12175
12435
  ### `WorkflowExecution`
12176
12436
 
12177
12437
  ```ts
@@ -62,6 +62,7 @@ const { data } = await validationRulesClient.getValidationRules(...)
62
62
  - [`RelativeDateValue`](#relativedatevalue)
63
63
  - [`RangeValue`](#rangevalue)
64
64
  - [`NoValue`](#novalue)
65
+ - [`AppliesWhen`](#applieswhen)
65
66
  - [`ContextRequirement`](#contextrequirement)
66
67
 
67
68
  ### `getValidationRules`
@@ -675,6 +676,7 @@ type UpdateValidationRuleRequest = {
675
676
  operator: { ... }
676
677
  value: { ... }
677
678
  error_message: { ... }
679
+ applies_when?: { ... }
678
680
  allow_failure?: { ... }
679
681
  }>
680
682
  }
@@ -729,6 +731,7 @@ type ValidationRuleBase = {
729
731
  operator: { ... }
730
732
  value: { ... }
731
733
  error_message: { ... }
734
+ applies_when?: { ... }
732
735
  allow_failure?: { ... }
733
736
  }>
734
737
  }
@@ -1696,6 +1699,11 @@ type ComparisonRuleType = {
1696
1699
  source: { ... }
1697
1700
  }
1698
1701
  error_message: string
1702
+ applies_when?: {
1703
+ path: { ... }
1704
+ operator: { ... }
1705
+ value?: { ... }
1706
+ }
1699
1707
  allow_failure?: boolean
1700
1708
  }>
1701
1709
  }
@@ -1719,6 +1727,7 @@ type Condition = {
1719
1727
  type: { ... }
1720
1728
  value: { ... }
1721
1729
  direction: { ... }
1730
+ rounding?: { ... }
1722
1731
  }
1723
1732
  } | {
1724
1733
  source: "relative_date"
@@ -1757,6 +1766,11 @@ type Condition = {
1757
1766
  source: "none"
1758
1767
  }
1759
1768
  error_message: string
1769
+ applies_when?: {
1770
+ path: string
1771
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"
1772
+ value?: number | string | boolean
1773
+ }
1760
1774
  allow_failure?: boolean
1761
1775
  }
1762
1776
  ```
@@ -1785,8 +1799,13 @@ type ConditionValue = {
1785
1799
  path: string
1786
1800
  adjust?: {
1787
1801
  type: "percent" | "absolute"
1788
- value: number
1802
+ value: number | {
1803
+ source: { ... }
1804
+ path: { ... }
1805
+ adjust?: { ... }
1806
+ }
1789
1807
  direction: "increase" | "decrease"
1808
+ rounding?: "up" | "down"
1790
1809
  }
1791
1810
  } | {
1792
1811
  source: "relative_date"
@@ -1805,6 +1824,7 @@ type ConditionValue = {
1805
1824
  type: { ... }
1806
1825
  value: { ... }
1807
1826
  direction: { ... }
1827
+ rounding?: { ... }
1808
1828
  }
1809
1829
  } | {
1810
1830
  source: "relative_date"
@@ -1822,6 +1842,7 @@ type ConditionValue = {
1822
1842
  type: { ... }
1823
1843
  value: { ... }
1824
1844
  direction: { ... }
1845
+ rounding?: { ... }
1825
1846
  }
1826
1847
  } | {
1827
1848
  source: "relative_date"
@@ -1847,8 +1868,13 @@ type ScalarValue = {
1847
1868
  path: string
1848
1869
  adjust?: {
1849
1870
  type: "percent" | "absolute"
1850
- value: number
1871
+ value: number | {
1872
+ source: { ... }
1873
+ path: { ... }
1874
+ adjust?: { ... }
1875
+ }
1851
1876
  direction: "increase" | "decrease"
1877
+ rounding?: "up" | "down"
1852
1878
  }
1853
1879
  } | {
1854
1880
  source: "relative_date"
@@ -1882,8 +1908,13 @@ type ContextValue = {
1882
1908
  path: string
1883
1909
  adjust?: {
1884
1910
  type: "percent" | "absolute"
1885
- value: number
1911
+ value: number | {
1912
+ source: { ... }
1913
+ path: { ... }
1914
+ adjust?: { ... }
1915
+ }
1886
1916
  direction: "increase" | "decrease"
1917
+ rounding?: "up" | "down"
1887
1918
  }
1888
1919
  }
1889
1920
  ```
@@ -1897,8 +1928,18 @@ Used to express tolerance bands such as "at most 10% above the current instalmen
1897
1928
  ```ts
1898
1929
  type ValueAdjustment = {
1899
1930
  type: "percent" | "absolute"
1900
- value: number
1931
+ value: number | {
1932
+ source: "context"
1933
+ path: string
1934
+ adjust?: {
1935
+ type: { ... }
1936
+ value: { ... }
1937
+ direction: { ... }
1938
+ rounding?: { ... }
1939
+ }
1940
+ }
1901
1941
  direction: "increase" | "decrease"
1942
+ rounding?: "up" | "down"
1902
1943
  }
1903
1944
  ```
1904
1945
 
@@ -1932,6 +1973,7 @@ type RangeValue = {
1932
1973
  type: { ... }
1933
1974
  value: { ... }
1934
1975
  direction: { ... }
1976
+ rounding?: { ... }
1935
1977
  }
1936
1978
  } | {
1937
1979
  source: "relative_date"
@@ -1949,6 +1991,7 @@ type RangeValue = {
1949
1991
  type: { ... }
1950
1992
  value: { ... }
1951
1993
  direction: { ... }
1994
+ rounding?: { ... }
1952
1995
  }
1953
1996
  } | {
1954
1997
  source: "relative_date"
@@ -1969,6 +2012,22 @@ type NoValue = {
1969
2012
  }
1970
2013
  ```
1971
2014
 
2015
+ ### `AppliesWhen`
2016
+
2017
+ Optional precondition on a condition: the condition only takes part in the
2018
+ validation when this comparison over context holds. Examples: apply the
2019
+ dual-tariff reference only when `contract.htnt` is not empty, or run a
2020
+ plausibility check only when a context value reaches a threshold.
2021
+
2022
+
2023
+ ```ts
2024
+ type AppliesWhen = {
2025
+ path: string
2026
+ operator: "equal" | "notEqual" | "greaterThan" | "greaterThanInclusive" | "lessThan" | "lessThanInclusive" | "isEmpty" | "isNotEmpty"
2027
+ value?: number | string | boolean
2028
+ }
2029
+ ```
2030
+
1972
2031
  ### `ContextRequirement`
1973
2032
 
1974
2033
  An entity context source the rule needs at evaluation time, referenced by `context`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.18.23",
3
+ "version": "2.18.25",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",