@epilot/sdk 2.20.43 → 2.20.45

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 (148) hide show
  1. package/definitions/chat-runtime.json +1 -1
  2. package/definitions/chat.json +2859 -150
  3. package/definitions/integration-toolkit-runtime.json +1 -1
  4. package/definitions/integration-toolkit.json +133 -1
  5. package/dist/apis/access-token.cjs +6 -6
  6. package/dist/apis/access-token.js +1 -1
  7. package/dist/apis/address-suggestions.cjs +6 -6
  8. package/dist/apis/address-suggestions.js +1 -1
  9. package/dist/apis/address.cjs +6 -6
  10. package/dist/apis/address.js +1 -1
  11. package/dist/apis/ai-agents.cjs +6 -6
  12. package/dist/apis/ai-agents.js +1 -1
  13. package/dist/apis/app.cjs +6 -6
  14. package/dist/apis/app.js +1 -1
  15. package/dist/apis/audit-logs.cjs +6 -6
  16. package/dist/apis/audit-logs.js +1 -1
  17. package/dist/apis/automation.cjs +6 -6
  18. package/dist/apis/automation.js +1 -1
  19. package/dist/apis/billing.cjs +6 -6
  20. package/dist/apis/billing.js +1 -1
  21. package/dist/apis/blueprint-manifest.cjs +6 -6
  22. package/dist/apis/blueprint-manifest.js +1 -1
  23. package/dist/apis/calendar.cjs +6 -6
  24. package/dist/apis/calendar.js +1 -1
  25. package/dist/apis/chat.cjs +8 -8
  26. package/dist/apis/chat.d.cts +2 -2
  27. package/dist/apis/chat.d.ts +2 -2
  28. package/dist/apis/chat.js +2 -2
  29. package/dist/apis/configuration-hub.cjs +6 -6
  30. package/dist/apis/configuration-hub.js +1 -1
  31. package/dist/apis/consent.cjs +6 -6
  32. package/dist/apis/consent.js +1 -1
  33. package/dist/apis/customer-portal.cjs +6 -6
  34. package/dist/apis/customer-portal.js +1 -1
  35. package/dist/apis/dashboard.cjs +6 -6
  36. package/dist/apis/dashboard.js +1 -1
  37. package/dist/apis/data-governance.cjs +6 -6
  38. package/dist/apis/data-governance.js +1 -1
  39. package/dist/apis/deduplication.cjs +6 -6
  40. package/dist/apis/deduplication.js +1 -1
  41. package/dist/apis/design.cjs +6 -6
  42. package/dist/apis/design.js +1 -1
  43. package/dist/apis/document.cjs +6 -6
  44. package/dist/apis/document.js +1 -1
  45. package/dist/apis/email-settings.cjs +6 -6
  46. package/dist/apis/email-settings.js +1 -1
  47. package/dist/apis/email-template.cjs +6 -6
  48. package/dist/apis/email-template.js +1 -1
  49. package/dist/apis/entity-mapping.cjs +6 -6
  50. package/dist/apis/entity-mapping.js +1 -1
  51. package/dist/apis/entity.cjs +6 -6
  52. package/dist/apis/entity.js +1 -1
  53. package/dist/apis/environments.cjs +6 -6
  54. package/dist/apis/environments.js +1 -1
  55. package/dist/apis/event-catalog.cjs +6 -6
  56. package/dist/apis/event-catalog.js +1 -1
  57. package/dist/apis/file.cjs +6 -6
  58. package/dist/apis/file.js +1 -1
  59. package/dist/apis/iban.cjs +6 -6
  60. package/dist/apis/iban.js +1 -1
  61. package/dist/apis/identity.cjs +6 -6
  62. package/dist/apis/identity.js +1 -1
  63. package/dist/apis/integration-toolkit.cjs +8 -8
  64. package/dist/apis/integration-toolkit.d.cts +2 -2
  65. package/dist/apis/integration-toolkit.d.ts +2 -2
  66. package/dist/apis/integration-toolkit.js +2 -2
  67. package/dist/apis/journey.cjs +6 -6
  68. package/dist/apis/journey.js +1 -1
  69. package/dist/apis/kanban.cjs +6 -6
  70. package/dist/apis/kanban.js +1 -1
  71. package/dist/apis/message.cjs +6 -6
  72. package/dist/apis/message.js +1 -1
  73. package/dist/apis/metering.cjs +6 -6
  74. package/dist/apis/metering.js +1 -1
  75. package/dist/apis/notes.cjs +6 -6
  76. package/dist/apis/notes.js +1 -1
  77. package/dist/apis/notification.cjs +6 -6
  78. package/dist/apis/notification.js +1 -1
  79. package/dist/apis/organization.cjs +6 -6
  80. package/dist/apis/organization.js +1 -1
  81. package/dist/apis/partner-directory.cjs +6 -6
  82. package/dist/apis/partner-directory.js +1 -1
  83. package/dist/apis/permissions.cjs +6 -6
  84. package/dist/apis/permissions.js +1 -1
  85. package/dist/apis/pricing-tier.cjs +6 -6
  86. package/dist/apis/pricing-tier.js +1 -1
  87. package/dist/apis/pricing.cjs +6 -6
  88. package/dist/apis/pricing.js +1 -1
  89. package/dist/apis/purpose.cjs +6 -6
  90. package/dist/apis/purpose.js +1 -1
  91. package/dist/apis/query.cjs +6 -6
  92. package/dist/apis/query.js +1 -1
  93. package/dist/apis/sandbox.cjs +6 -6
  94. package/dist/apis/sandbox.js +1 -1
  95. package/dist/apis/sharing.cjs +6 -6
  96. package/dist/apis/sharing.js +1 -1
  97. package/dist/apis/snapshot.cjs +6 -6
  98. package/dist/apis/snapshot.js +1 -1
  99. package/dist/apis/submission.cjs +6 -6
  100. package/dist/apis/submission.js +1 -1
  101. package/dist/apis/target.cjs +6 -6
  102. package/dist/apis/target.js +1 -1
  103. package/dist/apis/targeting.cjs +6 -6
  104. package/dist/apis/targeting.js +1 -1
  105. package/dist/apis/template-variables.cjs +6 -6
  106. package/dist/apis/template-variables.js +1 -1
  107. package/dist/apis/user.cjs +6 -6
  108. package/dist/apis/user.js +1 -1
  109. package/dist/apis/validation-rules.cjs +6 -6
  110. package/dist/apis/validation-rules.js +1 -1
  111. package/dist/apis/webhooks.cjs +6 -6
  112. package/dist/apis/webhooks.js +1 -1
  113. package/dist/apis/workflow-definition.cjs +6 -6
  114. package/dist/apis/workflow-definition.js +1 -1
  115. package/dist/apis/workflow.cjs +6 -6
  116. package/dist/apis/workflow.js +1 -1
  117. package/dist/chat-6E3CPZZV.js +7 -0
  118. package/dist/chat-EGLWHHF5.cjs +7 -0
  119. package/dist/{chat-runtime-O46V7MCD.js → chat-runtime-GCKIJKUM.js} +1 -1
  120. package/dist/chat-runtime-X5ASDO46.cjs +5 -0
  121. package/dist/chat.d-BGPN5RIE.d.cts +5319 -0
  122. package/dist/chat.d-BGPN5RIE.d.ts +5319 -0
  123. package/dist/{chunk-QWQ6UINA.cjs → chunk-2QQYR5S5.cjs} +1 -1
  124. package/dist/{chunk-XQNNKNLX.cjs → chunk-5VZDYAPQ.cjs} +4 -4
  125. package/dist/{chunk-4OBXBYLK.js → chunk-6JWMDS4Z.js} +1 -1
  126. package/dist/{chunk-2F4JXHGX.js → chunk-DIUWLA6A.js} +1 -1
  127. package/dist/{chunk-4M4Z7BKK.cjs → chunk-EPZ3JT2W.cjs} +1 -1
  128. package/dist/{chunk-REBTL7ST.js → chunk-FEW7BLOY.js} +4 -4
  129. package/dist/index.cjs +12 -12
  130. package/dist/index.d.cts +2 -2
  131. package/dist/index.d.ts +2 -2
  132. package/dist/index.js +3 -3
  133. package/dist/integration-toolkit-EIVEAO4Z.cjs +7 -0
  134. package/dist/integration-toolkit-NIA5DND5.js +7 -0
  135. package/dist/{integration-toolkit-runtime-ABL4FFLI.js → integration-toolkit-runtime-FT2J5NFV.js} +1 -1
  136. package/dist/{integration-toolkit-runtime-SU7VKZJB.cjs → integration-toolkit-runtime-GDJVWSKC.cjs} +2 -2
  137. package/dist/{integration-toolkit.d-DRYMfItg.d.cts → integration-toolkit.d-D4CzSBOS.d.cts} +88 -1
  138. package/dist/{integration-toolkit.d-DRYMfItg.d.ts → integration-toolkit.d-D4CzSBOS.d.ts} +88 -1
  139. package/docs/chat.md +610 -15
  140. package/docs/integration-toolkit.md +68 -0
  141. package/package.json +1 -1
  142. package/dist/chat-3MIK7DUI.js +0 -7
  143. package/dist/chat-IWMQEXCD.cjs +0 -7
  144. package/dist/chat-runtime-QSGSW6SL.cjs +0 -5
  145. package/dist/chat.d-mUHenLz7.d.cts +0 -1743
  146. package/dist/chat.d-mUHenLz7.d.ts +0 -1743
  147. package/dist/integration-toolkit-4W2SXQZZ.cjs +0 -7
  148. package/dist/integration-toolkit-WZ324PVF.js +0 -7
package/docs/chat.md CHANGED
@@ -40,6 +40,16 @@ const { data } = await chatClient.listWebsiteChats(...)
40
40
  - [`startChatEmailVerification`](#startchatemailverification)
41
41
  - [`verifyChatEmailCode`](#verifychatemailcode)
42
42
  - [`cancelChatVerification`](#cancelchatverification)
43
+ - [`getChatPortalLogin`](#getchatportallogin)
44
+ - [`startChatPortalLogin`](#startchatportallogin)
45
+ - [`verifyChatPortalLogin`](#verifychatportallogin)
46
+ - [`cancelChatPortalLogin`](#cancelchatportallogin)
47
+ - [`signOutChatCustomer`](#signoutchatcustomer)
48
+ - [`getChatAction`](#getchataction)
49
+ - [`startChatAction`](#startchataction)
50
+ - [`submitChatAction`](#submitchataction)
51
+ - [`confirmChatAction`](#confirmchataction)
52
+ - [`cancelChatAction`](#cancelchataction)
43
53
 
44
54
  **Schemas**
45
55
  - [`ListWebsiteChatsResponse`](#listwebsitechatsresponse)
@@ -48,7 +58,13 @@ const { data } = await chatClient.listWebsiteChats(...)
48
58
  - [`Error`](#error)
49
59
  - [`CreateWebsiteChatRequest`](#createwebsitechatrequest)
50
60
  - [`UpdateWebsiteChatRequest`](#updatewebsitechatrequest)
61
+ - [`ActionRevision`](#actionrevision)
62
+ - [`ActionState`](#actionstate)
51
63
  - [`VerificationState`](#verificationstate)
64
+ - [`PortalLoginState`](#portalloginstate)
65
+ - [`LoginMethod`](#loginmethod)
66
+ - [`AccessTier`](#accesstier)
67
+ - [`CustomerAccess`](#customeraccess)
52
68
  - [`PublicWebsiteChat`](#publicwebsitechat)
53
69
  - [`WebsiteChatDesign`](#websitechatdesign)
54
70
  - [`PublicEvent`](#publicevent)
@@ -81,6 +97,9 @@ const { data } = await client.listWebsiteChats({
81
97
  "authentication": {
82
98
  "email_code": {
83
99
  "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
100
+ },
101
+ "portal": {
102
+ "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
84
103
  }
85
104
  }
86
105
  },
@@ -123,6 +142,9 @@ const { data } = await client.createWebsiteChat(
123
142
  authentication: {
124
143
  email_code: {
125
144
  email_template_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
145
+ },
146
+ portal: {
147
+ portal_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
126
148
  }
127
149
  }
128
150
  }
@@ -145,6 +167,9 @@ const { data } = await client.createWebsiteChat(
145
167
  "authentication": {
146
168
  "email_code": {
147
169
  "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
170
+ },
171
+ "portal": {
172
+ "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
148
173
  }
149
174
  }
150
175
  },
@@ -191,6 +216,9 @@ const { data } = await client.getWebsiteChat({
191
216
  "authentication": {
192
217
  "email_code": {
193
218
  "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
219
+ },
220
+ "portal": {
221
+ "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
194
222
  }
195
223
  }
196
224
  },
@@ -232,6 +260,9 @@ const { data } = await client.updateWebsiteChat(
232
260
  authentication: {
233
261
  email_code: {
234
262
  email_template_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
263
+ },
264
+ portal: {
265
+ portal_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
235
266
  }
236
267
  }
237
268
  },
@@ -255,6 +286,9 @@ const { data } = await client.updateWebsiteChat(
255
286
  "authentication": {
256
287
  "email_code": {
257
288
  "email_template_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
289
+ },
290
+ "portal": {
291
+ "portal_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
258
292
  }
259
293
  }
260
294
  },
@@ -308,8 +342,10 @@ const { data } = await client.getPublicWebsiteChat({
308
342
  "organisationName": "string",
309
343
  "assistantName": "string",
310
344
  "defaultLocale": "en",
311
- "authentication": {
312
- "email_code": true
345
+ "login_methods": ["email_code"],
346
+ "actions": {
347
+ "meter_reading": true,
348
+ "meter_reading_journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
313
349
  },
314
350
  "design": {
315
351
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
@@ -409,8 +445,10 @@ const { data } = await client.createAnonymousChatSession(
409
445
  "organisationName": "string",
410
446
  "assistantName": "string",
411
447
  "defaultLocale": "en",
412
- "authentication": {
413
- "email_code": true
448
+ "login_methods": ["email_code"],
449
+ "actions": {
450
+ "meter_reading": true,
451
+ "meter_reading_journey_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
414
452
  },
415
453
  "design": {
416
454
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
@@ -495,7 +533,11 @@ const { data } = await client.getChatVerification()
495
533
  "code_expires_at": 0,
496
534
  "resend_after": 0,
497
535
  "email": "user@example.com",
498
- "contact_resolution": "matched"
536
+ "contact_resolution": "matched",
537
+ "access": {
538
+ "tier": "anonymous",
539
+ "method": "email_code"
540
+ }
499
541
  }
500
542
  ```
501
543
 
@@ -530,7 +572,11 @@ const { data } = await client.startChatEmailVerification(
530
572
  "code_expires_at": 0,
531
573
  "resend_after": 0,
532
574
  "email": "user@example.com",
533
- "contact_resolution": "matched"
575
+ "contact_resolution": "matched",
576
+ "access": {
577
+ "tier": "anonymous",
578
+ "method": "email_code"
579
+ }
534
580
  }
535
581
  ```
536
582
 
@@ -564,7 +610,11 @@ const { data } = await client.verifyChatEmailCode(
564
610
  "code_expires_at": 0,
565
611
  "resend_after": 0,
566
612
  "email": "user@example.com",
567
- "contact_resolution": "matched"
613
+ "contact_resolution": "matched",
614
+ "access": {
615
+ "tier": "anonymous",
616
+ "method": "email_code"
617
+ }
568
618
  }
569
619
  ```
570
620
 
@@ -592,7 +642,451 @@ const { data } = await client.cancelChatVerification()
592
642
  "code_expires_at": 0,
593
643
  "resend_after": 0,
594
644
  "email": "user@example.com",
595
- "contact_resolution": "matched"
645
+ "contact_resolution": "matched",
646
+ "access": {
647
+ "tier": "anonymous",
648
+ "method": "email_code"
649
+ }
650
+ }
651
+ ```
652
+
653
+ </details>
654
+
655
+ ---
656
+
657
+ ### `getChatPortalLogin`
658
+
659
+ `GET /v1/login/portal`
660
+
661
+ ```ts
662
+ const { data } = await client.getChatPortalLogin()
663
+ ```
664
+
665
+ <details>
666
+ <summary>Response</summary>
667
+
668
+ ```json
669
+ {
670
+ "available": true,
671
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
672
+ "status": "anonymous",
673
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
674
+ "code_expires_at": 0,
675
+ "attempts_left": 0,
676
+ "email": "user@example.com",
677
+ "contact_resolution": "matched",
678
+ "access": {
679
+ "tier": "anonymous",
680
+ "method": "email_code"
681
+ }
682
+ }
683
+ ```
684
+
685
+ </details>
686
+
687
+ ---
688
+
689
+ ### `startChatPortalLogin`
690
+
691
+ `POST /v1/login/portal/start`
692
+
693
+ ```ts
694
+ const { data } = await client.startChatPortalLogin(
695
+ null,
696
+ {
697
+ request_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
698
+ email: 'user@example.com'
699
+ },
700
+ )
701
+ ```
702
+
703
+ <details>
704
+ <summary>Response</summary>
705
+
706
+ ```json
707
+ {
708
+ "available": true,
709
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
710
+ "status": "anonymous",
711
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
712
+ "code_expires_at": 0,
713
+ "attempts_left": 0,
714
+ "email": "user@example.com",
715
+ "contact_resolution": "matched",
716
+ "access": {
717
+ "tier": "anonymous",
718
+ "method": "email_code"
719
+ }
720
+ }
721
+ ```
722
+
723
+ </details>
724
+
725
+ ---
726
+
727
+ ### `verifyChatPortalLogin`
728
+
729
+ `POST /v1/login/portal/verify`
730
+
731
+ ```ts
732
+ const { data } = await client.verifyChatPortalLogin(
733
+ null,
734
+ {
735
+ challenge_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
736
+ code: 'string'
737
+ },
738
+ )
739
+ ```
740
+
741
+ <details>
742
+ <summary>Response</summary>
743
+
744
+ ```json
745
+ {
746
+ "available": true,
747
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
748
+ "status": "anonymous",
749
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
750
+ "code_expires_at": 0,
751
+ "attempts_left": 0,
752
+ "email": "user@example.com",
753
+ "contact_resolution": "matched",
754
+ "access": {
755
+ "tier": "anonymous",
756
+ "method": "email_code"
757
+ }
758
+ }
759
+ ```
760
+
761
+ </details>
762
+
763
+ ---
764
+
765
+ ### `cancelChatPortalLogin`
766
+
767
+ `POST /v1/login/portal/cancel`
768
+
769
+ ```ts
770
+ const { data } = await client.cancelChatPortalLogin()
771
+ ```
772
+
773
+ <details>
774
+ <summary>Response</summary>
775
+
776
+ ```json
777
+ {
778
+ "available": true,
779
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
780
+ "status": "anonymous",
781
+ "challenge_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
782
+ "code_expires_at": 0,
783
+ "attempts_left": 0,
784
+ "email": "user@example.com",
785
+ "contact_resolution": "matched",
786
+ "access": {
787
+ "tier": "anonymous",
788
+ "method": "email_code"
789
+ }
790
+ }
791
+ ```
792
+
793
+ </details>
794
+
795
+ ---
796
+
797
+ ### `signOutChatCustomer`
798
+
799
+ `POST /v1/login/sign-out`
800
+
801
+ ```ts
802
+ const { data } = await client.signOutChatCustomer()
803
+ ```
804
+
805
+ <details>
806
+ <summary>Response</summary>
807
+
808
+ ```json
809
+ {
810
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
811
+ "access": {
812
+ "tier": "anonymous",
813
+ "method": "email_code"
814
+ }
815
+ }
816
+ ```
817
+
818
+ </details>
819
+
820
+ ---
821
+
822
+ ### `getChatAction`
823
+
824
+ `GET /v1/actions`
825
+
826
+ ```ts
827
+ const { data } = await client.getChatAction()
828
+ ```
829
+
830
+ <details>
831
+ <summary>Response</summary>
832
+
833
+ ```json
834
+ {
835
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
836
+ "status": "none",
837
+ "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
838
+ "revision": 0,
839
+ "options": [
840
+ {
841
+ "meter_id": "string",
842
+ "counter_id": "string",
843
+ "meter_number": "string",
844
+ "label": "string",
845
+ "unit": "string",
846
+ "min_value": 0,
847
+ "max_value": 0
848
+ }
849
+ ],
850
+ "values": {
851
+ "meter_id": "string",
852
+ "counter_id": "string",
853
+ "value": 0
854
+ },
855
+ "field_error": "VALUE_INVALID",
856
+ "receipt": {
857
+ "reference": "string",
858
+ "meter_number": "string",
859
+ "value": 0,
860
+ "unit": "string",
861
+ "submitted_at": "string"
862
+ },
863
+ "reason": "NO_METERS"
864
+ }
865
+ ```
866
+
867
+ </details>
868
+
869
+ ---
870
+
871
+ ### `startChatAction`
872
+
873
+ `POST /v1/actions`
874
+
875
+ ```ts
876
+ const { data } = await client.startChatAction(
877
+ null,
878
+ {
879
+ request_id: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
880
+ action_type: 'submit_meter_reading'
881
+ },
882
+ )
883
+ ```
884
+
885
+ <details>
886
+ <summary>Response</summary>
887
+
888
+ ```json
889
+ {
890
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
891
+ "status": "none",
892
+ "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
893
+ "revision": 0,
894
+ "options": [
895
+ {
896
+ "meter_id": "string",
897
+ "counter_id": "string",
898
+ "meter_number": "string",
899
+ "label": "string",
900
+ "unit": "string",
901
+ "min_value": 0,
902
+ "max_value": 0
903
+ }
904
+ ],
905
+ "values": {
906
+ "meter_id": "string",
907
+ "counter_id": "string",
908
+ "value": 0
909
+ },
910
+ "field_error": "VALUE_INVALID",
911
+ "receipt": {
912
+ "reference": "string",
913
+ "meter_number": "string",
914
+ "value": 0,
915
+ "unit": "string",
916
+ "submitted_at": "string"
917
+ },
918
+ "reason": "NO_METERS"
919
+ }
920
+ ```
921
+
922
+ </details>
923
+
924
+ ---
925
+
926
+ ### `submitChatAction`
927
+
928
+ `POST /v1/actions/{action_id}/submit`
929
+
930
+ ```ts
931
+ const { data } = await client.submitChatAction(
932
+ {
933
+ action_id: 'example',
934
+ },
935
+ {
936
+ expected_revision: 1,
937
+ meter_id: 'string',
938
+ counter_id: 'string',
939
+ value: 0
940
+ },
941
+ )
942
+ ```
943
+
944
+ <details>
945
+ <summary>Response</summary>
946
+
947
+ ```json
948
+ {
949
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
950
+ "status": "none",
951
+ "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
952
+ "revision": 0,
953
+ "options": [
954
+ {
955
+ "meter_id": "string",
956
+ "counter_id": "string",
957
+ "meter_number": "string",
958
+ "label": "string",
959
+ "unit": "string",
960
+ "min_value": 0,
961
+ "max_value": 0
962
+ }
963
+ ],
964
+ "values": {
965
+ "meter_id": "string",
966
+ "counter_id": "string",
967
+ "value": 0
968
+ },
969
+ "field_error": "VALUE_INVALID",
970
+ "receipt": {
971
+ "reference": "string",
972
+ "meter_number": "string",
973
+ "value": 0,
974
+ "unit": "string",
975
+ "submitted_at": "string"
976
+ },
977
+ "reason": "NO_METERS"
978
+ }
979
+ ```
980
+
981
+ </details>
982
+
983
+ ---
984
+
985
+ ### `confirmChatAction`
986
+
987
+ `POST /v1/actions/{action_id}/confirm`
988
+
989
+ ```ts
990
+ const { data } = await client.confirmChatAction(
991
+ {
992
+ action_id: 'example',
993
+ },
994
+ {
995
+ expected_revision: 1
996
+ },
997
+ )
998
+ ```
999
+
1000
+ <details>
1001
+ <summary>Response</summary>
1002
+
1003
+ ```json
1004
+ {
1005
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1006
+ "status": "none",
1007
+ "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1008
+ "revision": 0,
1009
+ "options": [
1010
+ {
1011
+ "meter_id": "string",
1012
+ "counter_id": "string",
1013
+ "meter_number": "string",
1014
+ "label": "string",
1015
+ "unit": "string",
1016
+ "min_value": 0,
1017
+ "max_value": 0
1018
+ }
1019
+ ],
1020
+ "values": {
1021
+ "meter_id": "string",
1022
+ "counter_id": "string",
1023
+ "value": 0
1024
+ },
1025
+ "field_error": "VALUE_INVALID",
1026
+ "receipt": {
1027
+ "reference": "string",
1028
+ "meter_number": "string",
1029
+ "value": 0,
1030
+ "unit": "string",
1031
+ "submitted_at": "string"
1032
+ },
1033
+ "reason": "NO_METERS"
1034
+ }
1035
+ ```
1036
+
1037
+ </details>
1038
+
1039
+ ---
1040
+
1041
+ ### `cancelChatAction`
1042
+
1043
+ `POST /v1/actions/{action_id}/cancel`
1044
+
1045
+ ```ts
1046
+ const { data } = await client.cancelChatAction(
1047
+ {
1048
+ action_id: 'example',
1049
+ },
1050
+ {
1051
+ expected_revision: 1
1052
+ },
1053
+ )
1054
+ ```
1055
+
1056
+ <details>
1057
+ <summary>Response</summary>
1058
+
1059
+ ```json
1060
+ {
1061
+ "conversation_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1062
+ "status": "none",
1063
+ "action_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
1064
+ "revision": 0,
1065
+ "options": [
1066
+ {
1067
+ "meter_id": "string",
1068
+ "counter_id": "string",
1069
+ "meter_number": "string",
1070
+ "label": "string",
1071
+ "unit": "string",
1072
+ "min_value": 0,
1073
+ "max_value": 0
1074
+ }
1075
+ ],
1076
+ "values": {
1077
+ "meter_id": "string",
1078
+ "counter_id": "string",
1079
+ "value": 0
1080
+ },
1081
+ "field_error": "VALUE_INVALID",
1082
+ "receipt": {
1083
+ "reference": "string",
1084
+ "meter_number": "string",
1085
+ "value": 0,
1086
+ "unit": "string",
1087
+ "submitted_at": "string"
1088
+ },
1089
+ "reason": "NO_METERS"
596
1090
  }
597
1091
  ```
598
1092
 
@@ -644,7 +1138,8 @@ type WebsiteChat = {
644
1138
  default_locale: "en" | "de"
645
1139
  design_id?: string // uuid
646
1140
  authentication?: {
647
- email_code: { ... }
1141
+ email_code?: { ... }
1142
+ portal?: { ... }
648
1143
  }
649
1144
  }
650
1145
  website_chat_id: string // uuid
@@ -670,9 +1165,12 @@ type WebsiteChatSettings = {
670
1165
  default_locale: "en" | "de"
671
1166
  design_id?: string // uuid
672
1167
  authentication?: {
673
- email_code: {
1168
+ email_code?: {
674
1169
  email_template_id?: { ... }
675
1170
  }
1171
+ portal?: {
1172
+ portal_id: { ... }
1173
+ }
676
1174
  }
677
1175
  }
678
1176
  ```
@@ -699,7 +1197,8 @@ type CreateWebsiteChatRequest = {
699
1197
  default_locale: "en" | "de"
700
1198
  design_id?: string // uuid
701
1199
  authentication?: {
702
- email_code: { ... }
1200
+ email_code?: { ... }
1201
+ portal?: { ... }
703
1202
  }
704
1203
  }
705
1204
  }
@@ -717,13 +1216,56 @@ type UpdateWebsiteChatRequest = {
717
1216
  default_locale: "en" | "de"
718
1217
  design_id?: string // uuid
719
1218
  authentication?: {
720
- email_code: { ... }
1219
+ email_code?: { ... }
1220
+ portal?: { ... }
721
1221
  }
722
1222
  }
723
1223
  version: number
724
1224
  }
725
1225
  ```
726
1226
 
1227
+ ### `ActionRevision`
1228
+
1229
+ ```ts
1230
+ type ActionRevision = {
1231
+ expected_revision: number
1232
+ }
1233
+ ```
1234
+
1235
+ ### `ActionState`
1236
+
1237
+ ```ts
1238
+ type ActionState = {
1239
+ conversation_id: string // uuid
1240
+ status: "none" | "needs_input" | "needs_confirmation" | "executing" | "completed" | "pending" | "rejected" | "handoff"
1241
+ action_id?: string // uuid
1242
+ revision?: number
1243
+ options?: Array<{
1244
+ meter_id: string
1245
+ counter_id: string
1246
+ meter_number: string
1247
+ label: string
1248
+ unit: string
1249
+ min_value?: number
1250
+ max_value?: number
1251
+ }>
1252
+ values?: {
1253
+ meter_id: string
1254
+ counter_id: string
1255
+ value: number
1256
+ }
1257
+ field_error?: "VALUE_INVALID" | "VALUE_OUT_OF_RANGE" | "TARGET_UNAVAILABLE"
1258
+ receipt?: {
1259
+ reference: string
1260
+ meter_number: string
1261
+ value: number
1262
+ unit: string
1263
+ submitted_at: string
1264
+ }
1265
+ reason?: "NO_METERS" | "SUBMISSION_REJECTED" | "SUBMISSION_UNCERTAIN"
1266
+ }
1267
+ ```
1268
+
727
1269
  ### `VerificationState`
728
1270
 
729
1271
  ```ts
@@ -736,6 +1278,56 @@ type VerificationState = {
736
1278
  resend_after?: number
737
1279
  email?: string // email
738
1280
  contact_resolution?: "matched" | "ambiguous" | "not_found"
1281
+ access: {
1282
+ tier: "anonymous" | "identified" | "verified"
1283
+ method?: "email_code" | "portal_login"
1284
+ }
1285
+ }
1286
+ ```
1287
+
1288
+ ### `PortalLoginState`
1289
+
1290
+ ```ts
1291
+ type PortalLoginState = {
1292
+ available: boolean
1293
+ conversation_id: string // uuid
1294
+ status: "anonymous" | "pending" | "verified"
1295
+ challenge_id?: string // uuid
1296
+ code_expires_at?: number
1297
+ attempts_left?: number
1298
+ email?: string // email
1299
+ contact_resolution?: "matched" | "not_found"
1300
+ access: {
1301
+ tier: "anonymous" | "identified" | "verified"
1302
+ method?: "email_code" | "portal_login"
1303
+ }
1304
+ }
1305
+ ```
1306
+
1307
+ ### `LoginMethod`
1308
+
1309
+ How a customer can log in or verify themselves in the chat.
1310
+
1311
+ ```ts
1312
+ type LoginMethod = "email_code" | "portal_login"
1313
+ ```
1314
+
1315
+ ### `AccessTier`
1316
+
1317
+ anonymous: no customer identity. identified: the Contact is known but ownership
1318
+ is not proven. verified: ownership is proven (an email code or a portal login).
1319
+
1320
+
1321
+ ```ts
1322
+ type AccessTier = "anonymous" | "identified" | "verified"
1323
+ ```
1324
+
1325
+ ### `CustomerAccess`
1326
+
1327
+ ```ts
1328
+ type CustomerAccess = {
1329
+ tier: "anonymous" | "identified" | "verified"
1330
+ method?: "email_code" | "portal_login"
739
1331
  }
740
1332
  ```
741
1333
 
@@ -747,8 +1339,10 @@ type PublicWebsiteChat = {
747
1339
  organisationName: string
748
1340
  assistantName: string
749
1341
  defaultLocale: "en" | "de"
750
- authentication?: {
751
- email_code: boolean
1342
+ login_methods: "email_code" | "portal_login"[]
1343
+ actions?: {
1344
+ meter_reading?: boolean
1345
+ meter_reading_journey_id?: string // uuid
752
1346
  }
753
1347
  design?: {
754
1348
  id: string // uuid
@@ -844,6 +1438,7 @@ type PublicEvent = {
844
1438
 
845
1439
  ```ts
846
1440
  type PublicChatError = {
847
- code: "INVALID_VERIFICATION_CODE" | "VERIFICATION_EXPIRED" | "VERIFICATION_CONFLICT" | "VERIFICATION_DISABLED" | "VERIFICATION_UNAVAILABLE" | "IDENTITY_CHANGED" | "INVALID_REQUEST" | "ORIGIN_DENIED" | "NOT_FOUND" | "INVALID_GRANT" | "SESSION_EXPIRED" | "RATE_LIMITED" | "SESSION_LIMIT" | "USAGE_LIMIT" | "REQUEST_CONFLICT" | "IN_PROGRESS" | "UNAVAILABLE" | "TEMPORARILY_UNAVAILABLE"
1441
+ code: "INVALID_VERIFICATION_CODE" | "VERIFICATION_EXPIRED" | "VERIFICATION_CONFLICT" | "VERIFICATION_DISABLED" | "VERIFICATION_UNAVAILABLE" | "IDENTITY_CHANGED" | "INVALID_REQUEST" | "ORIGIN_DENIED" | "NOT_FOUND" | "INVALID_GRANT" | "SESSION_EXPIRED" | "RATE_LIMITED" | "SESSION_LIMIT" | "USAGE_LIMIT" | "REQUEST_CONFLICT" | "IN_PROGRESS" | "UNAVAILABLE" | "TEMPORARILY_UNAVAILABLE" | "IDENTITY_REQUIRED" | "ACTION_UNAVAILABLE" | "ACTION_CONFLICT" | "ACTION_TARGET_DENIED" | "INVALID_LOGIN_CODE" | "LOGIN_EXPIRED" | "LOGIN_DISABLED" | "LOGIN_UNAVAILABLE" | "LOGIN_CONFLICT" | "LOGIN_REJECTED"
1442
+ attempts_left?: number
848
1443
  }
849
1444
  ```