@epilot/sdk 2.18.22 → 2.18.24

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/message.json +164 -14
  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.d.cts +2 -2
  66. package/dist/apis/message.d.ts +2 -2
  67. package/dist/apis/message.js +1 -1
  68. package/dist/apis/metering.cjs +6 -6
  69. package/dist/apis/metering.js +1 -1
  70. package/dist/apis/notes.cjs +6 -6
  71. package/dist/apis/notes.js +1 -1
  72. package/dist/apis/notification.cjs +6 -6
  73. package/dist/apis/notification.js +1 -1
  74. package/dist/apis/organization.cjs +6 -6
  75. package/dist/apis/organization.js +1 -1
  76. package/dist/apis/partner-directory.cjs +6 -6
  77. package/dist/apis/partner-directory.js +1 -1
  78. package/dist/apis/permissions.cjs +6 -6
  79. package/dist/apis/permissions.js +1 -1
  80. package/dist/apis/pricing-tier.cjs +6 -6
  81. package/dist/apis/pricing-tier.js +1 -1
  82. package/dist/apis/pricing.cjs +6 -6
  83. package/dist/apis/pricing.js +1 -1
  84. package/dist/apis/purpose.cjs +6 -6
  85. package/dist/apis/purpose.js +1 -1
  86. package/dist/apis/query.cjs +6 -6
  87. package/dist/apis/query.js +1 -1
  88. package/dist/apis/sandbox.cjs +6 -6
  89. package/dist/apis/sandbox.js +1 -1
  90. package/dist/apis/sharing.cjs +6 -6
  91. package/dist/apis/sharing.js +1 -1
  92. package/dist/apis/snapshot.cjs +6 -6
  93. package/dist/apis/snapshot.js +1 -1
  94. package/dist/apis/submission.cjs +6 -6
  95. package/dist/apis/submission.js +1 -1
  96. package/dist/apis/target.cjs +6 -6
  97. package/dist/apis/target.js +1 -1
  98. package/dist/apis/targeting.cjs +6 -6
  99. package/dist/apis/targeting.js +1 -1
  100. package/dist/apis/template-variables.cjs +6 -6
  101. package/dist/apis/template-variables.js +1 -1
  102. package/dist/apis/user.cjs +6 -6
  103. package/dist/apis/user.js +1 -1
  104. package/dist/apis/validation-rules.cjs +6 -6
  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-AWKA7GZQ.js → chunk-GB2OJK7Z.js} +1 -1
  113. package/dist/{chunk-S6BWLYUQ.js → chunk-HOPMN6R2.js} +3 -3
  114. package/dist/{chunk-QKEPXYEF.cjs → chunk-Q35SXSWS.cjs} +1 -1
  115. package/dist/{chunk-QAEAAKLA.cjs → chunk-XQAZPM6D.cjs} +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/message-LJ32JH6Z.cjs +7 -0
  127. package/dist/message-SSTVRGEF.js +7 -0
  128. package/dist/{message.d-BHWCGH3q.d.cts → message.d-DwnqO-Us.d.cts} +366 -25
  129. package/dist/{message.d-BHWCGH3q.d.ts → message.d-DwnqO-Us.d.ts} +366 -25
  130. package/docs/customer-portal.md +264 -4
  131. package/docs/message.md +126 -2
  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/message-BZN67NTB.js +0 -7
  136. package/dist/message-DBHA4PHI.cjs +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
package/docs/message.md CHANGED
@@ -95,6 +95,7 @@ const { data } = await messageClient.sendMessage(...)
95
95
  - [`AttachmentsRelation`](#attachmentsrelation)
96
96
  - [`File`](#file)
97
97
  - [`MessageRequestParams`](#messagerequestparams)
98
+ - [`ThreadView`](#threadview)
98
99
  - [`UnreadCountScope`](#unreadcountscope)
99
100
  - [`UnreadCountsPayload`](#unreadcountspayload)
100
101
  - [`UnreadCountsResult`](#unreadcountsresult)
@@ -391,6 +392,24 @@ const { data } = await client.searchMessages(
391
392
  {
392
393
  inbox_id: '3f34ce73-089c-4d45-a5ee-c161234e41c3',
393
394
  q: 'subject:"Request for solar panel price" AND _tags:INBOX',
395
+ view: {
396
+ folder: 'inbox',
397
+ mailbox: 'organization',
398
+ labels: ['string'],
399
+ purposes: ['string'],
400
+ filters: ['unread'],
401
+ from: ['string'],
402
+ to: ['string'],
403
+ assigned_to: ['string'],
404
+ include_unassigned: true,
405
+ date_from_days_ago: 0,
406
+ date_to_days_ago: 0,
407
+ email_filter: ['string'],
408
+ text: 'string',
409
+ thread_ids: ['string'],
410
+ pinned_by: 'string'
411
+ },
412
+ user_groups: ['string'],
394
413
  fields: ['_id', '_title', 'first_name', 'account', '!account.*._files', '**._product'],
395
414
  from: 0,
396
415
  size: 10,
@@ -611,11 +630,13 @@ const { data } = await client.getUnreadCounts(
611
630
  {
612
631
  actor: 'organization',
613
632
  email_filter: ['string'],
633
+ user_groups: ['string'],
614
634
  scopes: [
615
635
  {
616
636
  name: 'inbox-support',
617
637
  type: 'organization',
618
638
  q: '_tags.keyword:inbox AND !_tags.keyword:trash',
639
+ view_id: '3f34ce73-089c-4d45-a5ee-c161234e41c3',
619
640
  inbox_id: '3f34ce73-089c-4d45-a5ee-c161234e41c3'
620
641
  }
621
642
  ]
@@ -718,6 +739,24 @@ const { data } = await client.searchThreadsV2(
718
739
  {
719
740
  inbox_id: '3f34ce73-089c-4d45-a5ee-c161234e41c3',
720
741
  q: 'subject:"Request for solar panel price" AND _tags:INBOX',
742
+ view: {
743
+ folder: 'inbox',
744
+ mailbox: 'organization',
745
+ labels: ['string'],
746
+ purposes: ['string'],
747
+ filters: ['unread'],
748
+ from: ['string'],
749
+ to: ['string'],
750
+ assigned_to: ['string'],
751
+ include_unassigned: true,
752
+ date_from_days_ago: 0,
753
+ date_to_days_ago: 0,
754
+ email_filter: ['string'],
755
+ text: 'string',
756
+ thread_ids: ['string'],
757
+ pinned_by: 'string'
758
+ },
759
+ user_groups: ['string'],
721
760
  fields: ['_id', '_title', 'first_name', 'account', '!account.*._files', '**._product'],
722
761
  from: 0,
723
762
  size: 10,
@@ -770,6 +809,24 @@ Search threads and return all id's
770
809
  const { data } = await client.searchIds(
771
810
  null,
772
811
  {
812
+ view: {
813
+ folder: 'inbox',
814
+ mailbox: 'organization',
815
+ labels: ['string'],
816
+ purposes: ['string'],
817
+ filters: ['unread'],
818
+ from: ['string'],
819
+ to: ['string'],
820
+ assigned_to: ['string'],
821
+ include_unassigned: true,
822
+ date_from_days_ago: 0,
823
+ date_to_days_ago: 0,
824
+ email_filter: ['string'],
825
+ text: 'string',
826
+ thread_ids: ['string'],
827
+ pinned_by: 'string'
828
+ },
829
+ user_groups: ['string'],
773
830
  inbox_id: '3f34ce73-089c-4d45-a5ee-c161234e41c3',
774
831
  q: 'subject:"Request for solar panel price" AND _tags:INBOX'
775
832
  },
@@ -1025,7 +1082,7 @@ const { data } = await client.getThreadTimeline({
1025
1082
  "user_id": "123",
1026
1083
  "organization_id": "456"
1027
1084
  },
1028
- "timestamp": "2024-01-01T00:00:00Z",
1085
+ "timestamp": "2024-01-01T00:00:00.000Z",
1029
1086
  "message_id": "string",
1030
1087
  "source": "user",
1031
1088
  "automated": true,
@@ -2207,6 +2264,34 @@ type MessageRequestParams = {
2207
2264
  }
2208
2265
  ```
2209
2266
 
2267
+ ### `ThreadView`
2268
+
2269
+ A central-inbox view, described structurally so the server compiles the query for it. Both the
2270
+ thread list and the unread count for a view are compiled from the same description, so the two
2271
+ cannot disagree about what the view means.
2272
+
2273
+ Every field is optional and an omitted field adds no condition, so
2274
+
2275
+ ```ts
2276
+ type ThreadView = {
2277
+ folder?: "inbox" | "favorite" | "sent" | "trash" | "spam" | "unassignable" | "draft"
2278
+ mailbox?: "organization" | "agent"
2279
+ labels?: string[]
2280
+ purposes?: string[]
2281
+ filters?: "unread" | "resolved" | "trash"[]
2282
+ from?: string[]
2283
+ to?: string[]
2284
+ assigned_to?: string[]
2285
+ include_unassigned?: boolean
2286
+ date_from_days_ago?: number
2287
+ date_to_days_ago?: number
2288
+ email_filter?: string[]
2289
+ text?: string
2290
+ thread_ids?: string[]
2291
+ pinned_by?: string
2292
+ }
2293
+ ```
2294
+
2210
2295
  ### `UnreadCountScope`
2211
2296
 
2212
2297
  ```ts
@@ -2214,6 +2299,7 @@ type UnreadCountScope = {
2214
2299
  name: string
2215
2300
  type: "organization" | "shared_inbox" | "saved_view"
2216
2301
  q?: string
2302
+ view_id?: string
2217
2303
  inbox_id?: string | string[]
2218
2304
  }
2219
2305
  ```
@@ -2224,10 +2310,12 @@ type UnreadCountScope = {
2224
2310
  type UnreadCountsPayload = {
2225
2311
  actor: "organization" | "user"
2226
2312
  email_filter?: string[]
2313
+ user_groups?: string[]
2227
2314
  scopes: Array<{
2228
2315
  name: string
2229
2316
  type: "organization" | "shared_inbox" | "saved_view"
2230
2317
  q?: string
2318
+ view_id?: string
2231
2319
  inbox_id?: string | string[]
2232
2320
  }>
2233
2321
  }
@@ -2264,7 +2352,25 @@ type UnreadCountBuckets = {
2264
2352
  ```ts
2265
2353
  type SearchParamsV2 = {
2266
2354
  inbox_id?: string | string[]
2267
- q: string
2355
+ q?: string
2356
+ view?: {
2357
+ folder?: "inbox" | "favorite" | "sent" | "trash" | "spam" | "unassignable" | "draft"
2358
+ mailbox?: "organization" | "agent"
2359
+ labels?: string[]
2360
+ purposes?: string[]
2361
+ filters?: "unread" | "resolved" | "trash"[]
2362
+ from?: string[]
2363
+ to?: string[]
2364
+ assigned_to?: string[]
2365
+ include_unassigned?: boolean
2366
+ date_from_days_ago?: number
2367
+ date_to_days_ago?: number
2368
+ email_filter?: string[]
2369
+ text?: string
2370
+ thread_ids?: string[]
2371
+ pinned_by?: string
2372
+ }
2373
+ user_groups?: string[]
2268
2374
  fields?: string[]
2269
2375
  from?: number
2270
2376
  size?: number
@@ -2290,6 +2396,24 @@ type SearchParams = {
2290
2396
 
2291
2397
  ```ts
2292
2398
  type SearchIDParams = {
2399
+ view?: {
2400
+ folder?: "inbox" | "favorite" | "sent" | "trash" | "spam" | "unassignable" | "draft"
2401
+ mailbox?: "organization" | "agent"
2402
+ labels?: string[]
2403
+ purposes?: string[]
2404
+ filters?: "unread" | "resolved" | "trash"[]
2405
+ from?: string[]
2406
+ to?: string[]
2407
+ assigned_to?: string[]
2408
+ include_unassigned?: boolean
2409
+ date_from_days_ago?: number
2410
+ date_to_days_ago?: number
2411
+ email_filter?: string[]
2412
+ text?: string
2413
+ thread_ids?: string[]
2414
+ pinned_by?: string
2415
+ }
2416
+ user_groups?: string[]
2293
2417
  inbox_id?: string | string[]
2294
2418
  q?: string
2295
2419
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.18.22",
3
+ "version": "2.18.24",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",