@medalsocial/sdk 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -1
- package/dist/openapi/medal-social.openapi.json +1257 -86
- package/dist/src/index.d.mts +437 -4
- package/dist/src/index.d.ts +437 -4
- package/dist/src/index.js +224 -8
- package/dist/src/index.js.map +1 -1
- package/dist/src/index.mjs +218 -7
- package/dist/src/index.mjs.map +1 -1
- package/dist/src/openapi.generated.d.mts +674 -0
- package/dist/src/openapi.generated.d.ts +674 -0
- package/dist/src/openapi.generated.js.map +1 -1
- package/openapi/medal-social.openapi.yaml +710 -0
- package/package.json +21 -15
- package/skills/client/SKILL.md +105 -0
- package/skills/resources/SKILL.md +241 -0
|
@@ -25,6 +25,10 @@ tags:
|
|
|
25
25
|
description: Manage exports, consent records, and cookie consent.
|
|
26
26
|
- name: Workspaces
|
|
27
27
|
description: Inspect workspaces accessible to the current credential.
|
|
28
|
+
- name: Helpdesk
|
|
29
|
+
description: Read helpdesk conversations, reply, and manage assignment/status.
|
|
30
|
+
- name: Webhooks
|
|
31
|
+
description: Manage webhook endpoints and inspect their deliveries.
|
|
28
32
|
paths:
|
|
29
33
|
/api/v1/posts:
|
|
30
34
|
get:
|
|
@@ -645,6 +649,283 @@ paths:
|
|
|
645
649
|
$ref: "#/components/schemas/ApiResponse_WorkspaceArray"
|
|
646
650
|
default:
|
|
647
651
|
$ref: "#/components/responses/ApiError"
|
|
652
|
+
/api/v1/helpdesk/conversations:
|
|
653
|
+
get:
|
|
654
|
+
tags: [Helpdesk]
|
|
655
|
+
operationId: listHelpdeskConversations
|
|
656
|
+
summary: List helpdesk conversations
|
|
657
|
+
parameters:
|
|
658
|
+
- name: limit
|
|
659
|
+
in: query
|
|
660
|
+
schema:
|
|
661
|
+
type: integer
|
|
662
|
+
minimum: 1
|
|
663
|
+
maximum: 100
|
|
664
|
+
- $ref: "#/components/parameters/Cursor"
|
|
665
|
+
- name: status
|
|
666
|
+
in: query
|
|
667
|
+
schema:
|
|
668
|
+
$ref: "#/components/schemas/HelpdeskConversationStatus"
|
|
669
|
+
- name: assignee_user_id
|
|
670
|
+
in: query
|
|
671
|
+
schema:
|
|
672
|
+
type: string
|
|
673
|
+
description: Only conversations assigned to this user.
|
|
674
|
+
- name: requester
|
|
675
|
+
in: query
|
|
676
|
+
schema:
|
|
677
|
+
type: string
|
|
678
|
+
description: Match against visitor name/email.
|
|
679
|
+
- name: query
|
|
680
|
+
in: query
|
|
681
|
+
schema:
|
|
682
|
+
type: string
|
|
683
|
+
description: Free-text search query.
|
|
684
|
+
- name: channels
|
|
685
|
+
in: query
|
|
686
|
+
schema:
|
|
687
|
+
type: string
|
|
688
|
+
description: Comma-separated channel types (e.g. `widget,whatsapp`).
|
|
689
|
+
responses:
|
|
690
|
+
"200":
|
|
691
|
+
description: Conversations page.
|
|
692
|
+
content:
|
|
693
|
+
application/json:
|
|
694
|
+
schema:
|
|
695
|
+
$ref: "#/components/schemas/PaginatedResponse_HelpdeskConversation"
|
|
696
|
+
default:
|
|
697
|
+
$ref: "#/components/responses/ApiError"
|
|
698
|
+
/api/v1/helpdesk/conversations/{id}:
|
|
699
|
+
parameters:
|
|
700
|
+
- $ref: "#/components/parameters/Id"
|
|
701
|
+
get:
|
|
702
|
+
tags: [Helpdesk]
|
|
703
|
+
operationId: getHelpdeskConversation
|
|
704
|
+
summary: Get a helpdesk conversation
|
|
705
|
+
responses:
|
|
706
|
+
"200":
|
|
707
|
+
description: Conversation.
|
|
708
|
+
content:
|
|
709
|
+
application/json:
|
|
710
|
+
schema:
|
|
711
|
+
$ref: "#/components/schemas/ApiResponse_HelpdeskConversation"
|
|
712
|
+
default:
|
|
713
|
+
$ref: "#/components/responses/ApiError"
|
|
714
|
+
patch:
|
|
715
|
+
tags: [Helpdesk]
|
|
716
|
+
operationId: updateHelpdeskConversation
|
|
717
|
+
summary: Update a conversation's status or assignee
|
|
718
|
+
description: >-
|
|
719
|
+
Set `status` and/or `assignee_user_id` (`null` unassigns). At least one
|
|
720
|
+
field is required. Capability-scoped tokens must send `Idempotency-Key`
|
|
721
|
+
and `X-Capability-Confirmation` headers on this route; API keys with
|
|
722
|
+
legacy scopes may omit them.
|
|
723
|
+
requestBody:
|
|
724
|
+
required: true
|
|
725
|
+
content:
|
|
726
|
+
application/json:
|
|
727
|
+
schema:
|
|
728
|
+
$ref: "#/components/schemas/UpdateHelpdeskConversationInput"
|
|
729
|
+
responses:
|
|
730
|
+
"200":
|
|
731
|
+
description: Update result.
|
|
732
|
+
content:
|
|
733
|
+
application/json:
|
|
734
|
+
schema:
|
|
735
|
+
$ref: "#/components/schemas/ApiResponse_HelpdeskConversationUpdateResult"
|
|
736
|
+
default:
|
|
737
|
+
$ref: "#/components/responses/ApiError"
|
|
738
|
+
/api/v1/helpdesk/conversations/{id}/messages:
|
|
739
|
+
parameters:
|
|
740
|
+
- $ref: "#/components/parameters/Id"
|
|
741
|
+
get:
|
|
742
|
+
tags: [Helpdesk]
|
|
743
|
+
operationId: listHelpdeskConversationMessages
|
|
744
|
+
summary: List conversation messages
|
|
745
|
+
parameters:
|
|
746
|
+
- name: limit
|
|
747
|
+
in: query
|
|
748
|
+
schema:
|
|
749
|
+
type: integer
|
|
750
|
+
minimum: 1
|
|
751
|
+
maximum: 50
|
|
752
|
+
- $ref: "#/components/parameters/Cursor"
|
|
753
|
+
responses:
|
|
754
|
+
"200":
|
|
755
|
+
description: Messages page.
|
|
756
|
+
content:
|
|
757
|
+
application/json:
|
|
758
|
+
schema:
|
|
759
|
+
$ref: "#/components/schemas/PaginatedResponse_HelpdeskMessage"
|
|
760
|
+
"404":
|
|
761
|
+
description: Conversation not found.
|
|
762
|
+
content:
|
|
763
|
+
application/json:
|
|
764
|
+
schema:
|
|
765
|
+
$ref: "#/components/schemas/ApiError"
|
|
766
|
+
default:
|
|
767
|
+
$ref: "#/components/responses/ApiError"
|
|
768
|
+
/api/v1/helpdesk/replies:
|
|
769
|
+
post:
|
|
770
|
+
tags: [Helpdesk]
|
|
771
|
+
operationId: createHelpdeskReply
|
|
772
|
+
summary: Send an operator reply or internal note
|
|
773
|
+
description: >-
|
|
774
|
+
Send an `Idempotency-Key` header so retried requests do not create
|
|
775
|
+
duplicate messages — it is required for capability-scoped tokens
|
|
776
|
+
(together with `X-Capability-Confirmation`).
|
|
777
|
+
requestBody:
|
|
778
|
+
required: true
|
|
779
|
+
content:
|
|
780
|
+
application/json:
|
|
781
|
+
schema:
|
|
782
|
+
$ref: "#/components/schemas/CreateHelpdeskReplyInput"
|
|
783
|
+
responses:
|
|
784
|
+
"201":
|
|
785
|
+
description: Created reply reference.
|
|
786
|
+
content:
|
|
787
|
+
application/json:
|
|
788
|
+
schema:
|
|
789
|
+
$ref: "#/components/schemas/ApiResponse_HelpdeskReplyCreateResult"
|
|
790
|
+
default:
|
|
791
|
+
$ref: "#/components/responses/ApiError"
|
|
792
|
+
/api/v1/webhooks:
|
|
793
|
+
get:
|
|
794
|
+
tags: [Webhooks]
|
|
795
|
+
operationId: listWebhooks
|
|
796
|
+
summary: List webhook endpoints
|
|
797
|
+
responses:
|
|
798
|
+
"200":
|
|
799
|
+
description: Webhook endpoints.
|
|
800
|
+
content:
|
|
801
|
+
application/json:
|
|
802
|
+
schema:
|
|
803
|
+
$ref: "#/components/schemas/ApiResponse_WebhookEndpointArray"
|
|
804
|
+
default:
|
|
805
|
+
$ref: "#/components/responses/ApiError"
|
|
806
|
+
post:
|
|
807
|
+
tags: [Webhooks]
|
|
808
|
+
operationId: createWebhook
|
|
809
|
+
summary: Create a webhook endpoint
|
|
810
|
+
description: >-
|
|
811
|
+
The response's `data.secret` contains the signing secret EXACTLY ONCE —
|
|
812
|
+
it can never be retrieved again, so store it securely immediately. An
|
|
813
|
+
idempotent replay (same `Idempotency-Key`) returns the existing
|
|
814
|
+
endpoint WITHOUT `secret`. Deliveries are HTTP POSTs signed with
|
|
815
|
+
`X-Medal-Signature: sha256=<base64(HMAC-SHA256("{timestamp}.{rawBody}",
|
|
816
|
+
secret))>` plus `X-Medal-Timestamp`, `X-Medal-Event`, and
|
|
817
|
+
`X-Medal-Delivery-Id` / `Idempotency-Key` headers.
|
|
818
|
+
requestBody:
|
|
819
|
+
required: true
|
|
820
|
+
content:
|
|
821
|
+
application/json:
|
|
822
|
+
schema:
|
|
823
|
+
$ref: "#/components/schemas/CreateWebhookInput"
|
|
824
|
+
responses:
|
|
825
|
+
"201":
|
|
826
|
+
description: Created endpoint, including the one-time `secret`.
|
|
827
|
+
content:
|
|
828
|
+
application/json:
|
|
829
|
+
schema:
|
|
830
|
+
$ref: "#/components/schemas/ApiResponse_WebhookEndpoint"
|
|
831
|
+
default:
|
|
832
|
+
$ref: "#/components/responses/ApiError"
|
|
833
|
+
/api/v1/webhooks/{id}:
|
|
834
|
+
parameters:
|
|
835
|
+
- $ref: "#/components/parameters/Id"
|
|
836
|
+
get:
|
|
837
|
+
tags: [Webhooks]
|
|
838
|
+
operationId: getWebhook
|
|
839
|
+
summary: Get a webhook endpoint
|
|
840
|
+
responses:
|
|
841
|
+
"200":
|
|
842
|
+
description: Webhook endpoint.
|
|
843
|
+
content:
|
|
844
|
+
application/json:
|
|
845
|
+
schema:
|
|
846
|
+
$ref: "#/components/schemas/ApiResponse_WebhookEndpoint"
|
|
847
|
+
default:
|
|
848
|
+
$ref: "#/components/responses/ApiError"
|
|
849
|
+
patch:
|
|
850
|
+
tags: [Webhooks]
|
|
851
|
+
operationId: updateWebhook
|
|
852
|
+
summary: Update a webhook endpoint
|
|
853
|
+
description: >-
|
|
854
|
+
Only provided fields change. Pass `null` for `channels` or
|
|
855
|
+
`channel_connection_ids` to clear that filter.
|
|
856
|
+
requestBody:
|
|
857
|
+
required: true
|
|
858
|
+
content:
|
|
859
|
+
application/json:
|
|
860
|
+
schema:
|
|
861
|
+
$ref: "#/components/schemas/UpdateWebhookInput"
|
|
862
|
+
responses:
|
|
863
|
+
"200":
|
|
864
|
+
description: Updated endpoint.
|
|
865
|
+
content:
|
|
866
|
+
application/json:
|
|
867
|
+
schema:
|
|
868
|
+
$ref: "#/components/schemas/ApiResponse_WebhookEndpoint"
|
|
869
|
+
default:
|
|
870
|
+
$ref: "#/components/responses/ApiError"
|
|
871
|
+
delete:
|
|
872
|
+
tags: [Webhooks]
|
|
873
|
+
operationId: deleteWebhook
|
|
874
|
+
summary: Delete a webhook endpoint
|
|
875
|
+
description: >-
|
|
876
|
+
Permanently deletes the endpoint and stops all outbound deliveries.
|
|
877
|
+
Capability-scoped tokens must send `Idempotency-Key` and
|
|
878
|
+
`X-Capability-Confirmation` headers on this route; API keys with legacy
|
|
879
|
+
scopes may omit them.
|
|
880
|
+
responses:
|
|
881
|
+
"200":
|
|
882
|
+
description: Delete result.
|
|
883
|
+
content:
|
|
884
|
+
application/json:
|
|
885
|
+
schema:
|
|
886
|
+
$ref: "#/components/schemas/ApiResponse_WebhookDeleteResult"
|
|
887
|
+
default:
|
|
888
|
+
$ref: "#/components/responses/ApiError"
|
|
889
|
+
/api/v1/webhooks/{id}/deliveries:
|
|
890
|
+
parameters:
|
|
891
|
+
- $ref: "#/components/parameters/Id"
|
|
892
|
+
get:
|
|
893
|
+
tags: [Webhooks]
|
|
894
|
+
operationId: listWebhookDeliveries
|
|
895
|
+
summary: List recent deliveries
|
|
896
|
+
parameters:
|
|
897
|
+
- name: limit
|
|
898
|
+
in: query
|
|
899
|
+
schema:
|
|
900
|
+
type: integer
|
|
901
|
+
minimum: 1
|
|
902
|
+
maximum: 100
|
|
903
|
+
responses:
|
|
904
|
+
"200":
|
|
905
|
+
description: Recent deliveries, most recent first.
|
|
906
|
+
content:
|
|
907
|
+
application/json:
|
|
908
|
+
schema:
|
|
909
|
+
$ref: "#/components/schemas/ApiResponse_WebhookDeliveryArray"
|
|
910
|
+
default:
|
|
911
|
+
$ref: "#/components/responses/ApiError"
|
|
912
|
+
/api/v1/webhooks/{id}/test:
|
|
913
|
+
parameters:
|
|
914
|
+
- $ref: "#/components/parameters/Id"
|
|
915
|
+
post:
|
|
916
|
+
tags: [Webhooks]
|
|
917
|
+
operationId: testWebhook
|
|
918
|
+
summary: Queue a test delivery
|
|
919
|
+
description: Queues a signed `test.ping` delivery to the endpoint.
|
|
920
|
+
responses:
|
|
921
|
+
"202":
|
|
922
|
+
description: Test delivery queued.
|
|
923
|
+
content:
|
|
924
|
+
application/json:
|
|
925
|
+
schema:
|
|
926
|
+
$ref: "#/components/schemas/ApiResponse_WebhookTestResult"
|
|
927
|
+
default:
|
|
928
|
+
$ref: "#/components/responses/ApiError"
|
|
648
929
|
components:
|
|
649
930
|
securitySchemes:
|
|
650
931
|
bearerAuth:
|
|
@@ -1642,6 +1923,347 @@ components:
|
|
|
1642
1923
|
slug:
|
|
1643
1924
|
type: string
|
|
1644
1925
|
additionalProperties: true
|
|
1926
|
+
HelpdeskConversationStatus:
|
|
1927
|
+
type: string
|
|
1928
|
+
enum: [open, snoozed, closed]
|
|
1929
|
+
HelpdeskMessageAuthorType:
|
|
1930
|
+
type: string
|
|
1931
|
+
enum: [visitor, operator, ai, system]
|
|
1932
|
+
HelpdeskMessageType:
|
|
1933
|
+
type: string
|
|
1934
|
+
enum: [chat, email, note]
|
|
1935
|
+
description: >-
|
|
1936
|
+
`note` is operator-internal and never delivered to the customer.
|
|
1937
|
+
HelpdeskConversation:
|
|
1938
|
+
type: object
|
|
1939
|
+
required:
|
|
1940
|
+
- id
|
|
1941
|
+
- channel
|
|
1942
|
+
- channel_connection_id
|
|
1943
|
+
- status
|
|
1944
|
+
- subject
|
|
1945
|
+
- assignee_user_id
|
|
1946
|
+
- contact_id
|
|
1947
|
+
- visitor_name
|
|
1948
|
+
- visitor_email
|
|
1949
|
+
- external_conversation_id
|
|
1950
|
+
- channel_account_id
|
|
1951
|
+
- message_count
|
|
1952
|
+
- unread_for_operator
|
|
1953
|
+
- last_message_at
|
|
1954
|
+
- last_message_preview
|
|
1955
|
+
- last_message_author_type
|
|
1956
|
+
- created_at
|
|
1957
|
+
- updated_at
|
|
1958
|
+
properties:
|
|
1959
|
+
id:
|
|
1960
|
+
type: string
|
|
1961
|
+
channel:
|
|
1962
|
+
type: string
|
|
1963
|
+
description: >-
|
|
1964
|
+
Channel type, e.g. `widget`, `instagram`, `messenger`, `whatsapp`,
|
|
1965
|
+
`email`.
|
|
1966
|
+
channel_connection_id:
|
|
1967
|
+
type: [string, "null"]
|
|
1968
|
+
status:
|
|
1969
|
+
$ref: "#/components/schemas/HelpdeskConversationStatus"
|
|
1970
|
+
subject:
|
|
1971
|
+
type: [string, "null"]
|
|
1972
|
+
assignee_user_id:
|
|
1973
|
+
type: [string, "null"]
|
|
1974
|
+
contact_id:
|
|
1975
|
+
type: [string, "null"]
|
|
1976
|
+
visitor_name:
|
|
1977
|
+
type: [string, "null"]
|
|
1978
|
+
visitor_email:
|
|
1979
|
+
type: [string, "null"]
|
|
1980
|
+
external_conversation_id:
|
|
1981
|
+
type: [string, "null"]
|
|
1982
|
+
channel_account_id:
|
|
1983
|
+
type: [string, "null"]
|
|
1984
|
+
message_count:
|
|
1985
|
+
type: integer
|
|
1986
|
+
unread_for_operator:
|
|
1987
|
+
type: integer
|
|
1988
|
+
last_message_at:
|
|
1989
|
+
type: integer
|
|
1990
|
+
description: Unix timestamp in milliseconds.
|
|
1991
|
+
last_message_preview:
|
|
1992
|
+
type: [string, "null"]
|
|
1993
|
+
last_message_author_type:
|
|
1994
|
+
anyOf:
|
|
1995
|
+
- $ref: "#/components/schemas/HelpdeskMessageAuthorType"
|
|
1996
|
+
- type: "null"
|
|
1997
|
+
created_at:
|
|
1998
|
+
type: integer
|
|
1999
|
+
description: Unix timestamp in milliseconds.
|
|
2000
|
+
updated_at:
|
|
2001
|
+
type: integer
|
|
2002
|
+
description: Unix timestamp in milliseconds.
|
|
2003
|
+
HelpdeskMessage:
|
|
2004
|
+
type: object
|
|
2005
|
+
required:
|
|
2006
|
+
- id
|
|
2007
|
+
- conversation_id
|
|
2008
|
+
- author_type
|
|
2009
|
+
- message_type
|
|
2010
|
+
- author_user_id
|
|
2011
|
+
- author_name
|
|
2012
|
+
- body
|
|
2013
|
+
- created_at
|
|
2014
|
+
properties:
|
|
2015
|
+
id:
|
|
2016
|
+
type: string
|
|
2017
|
+
conversation_id:
|
|
2018
|
+
type: string
|
|
2019
|
+
author_type:
|
|
2020
|
+
$ref: "#/components/schemas/HelpdeskMessageAuthorType"
|
|
2021
|
+
message_type:
|
|
2022
|
+
$ref: "#/components/schemas/HelpdeskMessageType"
|
|
2023
|
+
author_user_id:
|
|
2024
|
+
type: [string, "null"]
|
|
2025
|
+
author_name:
|
|
2026
|
+
type: [string, "null"]
|
|
2027
|
+
body:
|
|
2028
|
+
type: string
|
|
2029
|
+
created_at:
|
|
2030
|
+
type: integer
|
|
2031
|
+
description: Unix timestamp in milliseconds.
|
|
2032
|
+
UpdateHelpdeskConversationInput:
|
|
2033
|
+
type: object
|
|
2034
|
+
minProperties: 1
|
|
2035
|
+
description: At least one field is required.
|
|
2036
|
+
properties:
|
|
2037
|
+
status:
|
|
2038
|
+
$ref: "#/components/schemas/HelpdeskConversationStatus"
|
|
2039
|
+
assignee_user_id:
|
|
2040
|
+
type: [string, "null"]
|
|
2041
|
+
description: User ID to assign, or `null` to unassign.
|
|
2042
|
+
HelpdeskConversationUpdateResult:
|
|
2043
|
+
type: object
|
|
2044
|
+
required: [id, status, assignee_user_id]
|
|
2045
|
+
properties:
|
|
2046
|
+
id:
|
|
2047
|
+
type: string
|
|
2048
|
+
status:
|
|
2049
|
+
$ref: "#/components/schemas/HelpdeskConversationStatus"
|
|
2050
|
+
assignee_user_id:
|
|
2051
|
+
type: [string, "null"]
|
|
2052
|
+
CreateHelpdeskReplyInput:
|
|
2053
|
+
type: object
|
|
2054
|
+
required: [conversation_id, body]
|
|
2055
|
+
properties:
|
|
2056
|
+
conversation_id:
|
|
2057
|
+
type: string
|
|
2058
|
+
body:
|
|
2059
|
+
type: string
|
|
2060
|
+
maxLength: 20000
|
|
2061
|
+
message_type:
|
|
2062
|
+
type: string
|
|
2063
|
+
enum: [chat, note]
|
|
2064
|
+
description: >-
|
|
2065
|
+
`note` = operator-internal note (not delivered to the customer).
|
|
2066
|
+
Default `chat`.
|
|
2067
|
+
author_name:
|
|
2068
|
+
type: string
|
|
2069
|
+
description: >-
|
|
2070
|
+
Agent display name for bridged replies (shown in widget + inbox).
|
|
2071
|
+
HelpdeskReplyCreateResult:
|
|
2072
|
+
type: object
|
|
2073
|
+
required: [id, conversation_id, status]
|
|
2074
|
+
properties:
|
|
2075
|
+
id:
|
|
2076
|
+
type: string
|
|
2077
|
+
conversation_id:
|
|
2078
|
+
type: string
|
|
2079
|
+
status:
|
|
2080
|
+
type: string
|
|
2081
|
+
const: created
|
|
2082
|
+
WebhookEndpoint:
|
|
2083
|
+
type: object
|
|
2084
|
+
required:
|
|
2085
|
+
- id
|
|
2086
|
+
- name
|
|
2087
|
+
- url
|
|
2088
|
+
- enabled
|
|
2089
|
+
- event_types
|
|
2090
|
+
- channels
|
|
2091
|
+
- channel_connection_ids
|
|
2092
|
+
- secret_last4
|
|
2093
|
+
- consecutive_failures
|
|
2094
|
+
- last_delivery_at
|
|
2095
|
+
- last_success_at
|
|
2096
|
+
- last_error_at
|
|
2097
|
+
- last_error
|
|
2098
|
+
- created_at
|
|
2099
|
+
- updated_at
|
|
2100
|
+
properties:
|
|
2101
|
+
id:
|
|
2102
|
+
type: string
|
|
2103
|
+
name:
|
|
2104
|
+
type: string
|
|
2105
|
+
url:
|
|
2106
|
+
type: string
|
|
2107
|
+
format: uri
|
|
2108
|
+
description: Destination URL (must be https).
|
|
2109
|
+
enabled:
|
|
2110
|
+
type: boolean
|
|
2111
|
+
event_types:
|
|
2112
|
+
type: array
|
|
2113
|
+
items:
|
|
2114
|
+
type: string
|
|
2115
|
+
description: Subscribed event types. Empty array = all events.
|
|
2116
|
+
channels:
|
|
2117
|
+
type: [array, "null"]
|
|
2118
|
+
items:
|
|
2119
|
+
type: string
|
|
2120
|
+
description: >-
|
|
2121
|
+
Channel-type filter (e.g. `['widget', 'whatsapp']`), or `null` for
|
|
2122
|
+
all channels.
|
|
2123
|
+
channel_connection_ids:
|
|
2124
|
+
type: [array, "null"]
|
|
2125
|
+
items:
|
|
2126
|
+
type: string
|
|
2127
|
+
description: Channel-connection filter, or `null` for all connections.
|
|
2128
|
+
secret_last4:
|
|
2129
|
+
type: string
|
|
2130
|
+
description: Last 4 characters of the signing secret, for identification.
|
|
2131
|
+
consecutive_failures:
|
|
2132
|
+
type: integer
|
|
2133
|
+
last_delivery_at:
|
|
2134
|
+
type: [integer, "null"]
|
|
2135
|
+
description: Unix timestamp in milliseconds, or `null` if never.
|
|
2136
|
+
last_success_at:
|
|
2137
|
+
type: [integer, "null"]
|
|
2138
|
+
description: Unix timestamp in milliseconds, or `null` if never.
|
|
2139
|
+
last_error_at:
|
|
2140
|
+
type: [integer, "null"]
|
|
2141
|
+
description: Unix timestamp in milliseconds, or `null` if never.
|
|
2142
|
+
last_error:
|
|
2143
|
+
type: [string, "null"]
|
|
2144
|
+
created_at:
|
|
2145
|
+
type: integer
|
|
2146
|
+
description: Unix timestamp in milliseconds.
|
|
2147
|
+
updated_at:
|
|
2148
|
+
type: integer
|
|
2149
|
+
description: Unix timestamp in milliseconds.
|
|
2150
|
+
secret:
|
|
2151
|
+
type: string
|
|
2152
|
+
description: >-
|
|
2153
|
+
Full signing secret (`whsec_…`) — present ONLY in the create
|
|
2154
|
+
response, exactly once. It can never be retrieved again; store it
|
|
2155
|
+
securely immediately. An idempotent replay of the create request
|
|
2156
|
+
omits it.
|
|
2157
|
+
CreateWebhookInput:
|
|
2158
|
+
type: object
|
|
2159
|
+
required: [name, url, event_types]
|
|
2160
|
+
properties:
|
|
2161
|
+
name:
|
|
2162
|
+
type: string
|
|
2163
|
+
maxLength: 100
|
|
2164
|
+
url:
|
|
2165
|
+
type: string
|
|
2166
|
+
format: uri
|
|
2167
|
+
description: Destination URL — must be https.
|
|
2168
|
+
event_types:
|
|
2169
|
+
type: array
|
|
2170
|
+
items:
|
|
2171
|
+
type: string
|
|
2172
|
+
description: >-
|
|
2173
|
+
Event types to subscribe to (e.g. `helpdesk.message_received`).
|
|
2174
|
+
Empty = all.
|
|
2175
|
+
channels:
|
|
2176
|
+
type: array
|
|
2177
|
+
items:
|
|
2178
|
+
type: string
|
|
2179
|
+
description: Restrict to these channel types (e.g. `['widget', 'whatsapp']`).
|
|
2180
|
+
channel_connection_ids:
|
|
2181
|
+
type: array
|
|
2182
|
+
items:
|
|
2183
|
+
type: string
|
|
2184
|
+
description: Restrict to these channel connection IDs.
|
|
2185
|
+
UpdateWebhookInput:
|
|
2186
|
+
type: object
|
|
2187
|
+
description: Only provided fields change.
|
|
2188
|
+
properties:
|
|
2189
|
+
name:
|
|
2190
|
+
type: string
|
|
2191
|
+
maxLength: 100
|
|
2192
|
+
url:
|
|
2193
|
+
type: string
|
|
2194
|
+
format: uri
|
|
2195
|
+
event_types:
|
|
2196
|
+
type: array
|
|
2197
|
+
items:
|
|
2198
|
+
type: string
|
|
2199
|
+
channels:
|
|
2200
|
+
type: [array, "null"]
|
|
2201
|
+
items:
|
|
2202
|
+
type: string
|
|
2203
|
+
description: New channel-type filter, or `null` to clear the filter.
|
|
2204
|
+
channel_connection_ids:
|
|
2205
|
+
type: [array, "null"]
|
|
2206
|
+
items:
|
|
2207
|
+
type: string
|
|
2208
|
+
description: New channel-connection filter, or `null` to clear the filter.
|
|
2209
|
+
enabled:
|
|
2210
|
+
type: boolean
|
|
2211
|
+
WebhookDeleteResult:
|
|
2212
|
+
type: object
|
|
2213
|
+
required: [id, status]
|
|
2214
|
+
properties:
|
|
2215
|
+
id:
|
|
2216
|
+
type: string
|
|
2217
|
+
status:
|
|
2218
|
+
type: string
|
|
2219
|
+
const: deleted
|
|
2220
|
+
WebhookDelivery:
|
|
2221
|
+
type: object
|
|
2222
|
+
required:
|
|
2223
|
+
- id
|
|
2224
|
+
- event_type
|
|
2225
|
+
- status
|
|
2226
|
+
- attempt_count
|
|
2227
|
+
- next_attempt_at
|
|
2228
|
+
- response_status
|
|
2229
|
+
- duration_ms
|
|
2230
|
+
- last_error
|
|
2231
|
+
- delivered_at
|
|
2232
|
+
- created_at
|
|
2233
|
+
properties:
|
|
2234
|
+
id:
|
|
2235
|
+
type: string
|
|
2236
|
+
event_type:
|
|
2237
|
+
type: string
|
|
2238
|
+
status:
|
|
2239
|
+
type: string
|
|
2240
|
+
enum: [pending, delivered, dead_letter]
|
|
2241
|
+
attempt_count:
|
|
2242
|
+
type: integer
|
|
2243
|
+
next_attempt_at:
|
|
2244
|
+
type: [integer, "null"]
|
|
2245
|
+
description: Unix timestamp in milliseconds of the next retry, or `null`.
|
|
2246
|
+
response_status:
|
|
2247
|
+
type: [integer, "null"]
|
|
2248
|
+
duration_ms:
|
|
2249
|
+
type: [integer, "null"]
|
|
2250
|
+
last_error:
|
|
2251
|
+
type: [string, "null"]
|
|
2252
|
+
delivered_at:
|
|
2253
|
+
type: [integer, "null"]
|
|
2254
|
+
description: Unix timestamp in milliseconds, or `null` if not delivered.
|
|
2255
|
+
created_at:
|
|
2256
|
+
type: integer
|
|
2257
|
+
description: Unix timestamp in milliseconds.
|
|
2258
|
+
WebhookTestResult:
|
|
2259
|
+
type: object
|
|
2260
|
+
required: [delivery_id, status]
|
|
2261
|
+
properties:
|
|
2262
|
+
delivery_id:
|
|
2263
|
+
type: string
|
|
2264
|
+
status:
|
|
2265
|
+
type: string
|
|
2266
|
+
const: queued
|
|
1645
2267
|
ApiResponse_PostCreateResult:
|
|
1646
2268
|
$ref: "#/components/schemas/Envelope_PostCreateResult"
|
|
1647
2269
|
ApiResponse_PostDetail:
|
|
@@ -1696,6 +2318,22 @@ components:
|
|
|
1696
2318
|
$ref: "#/components/schemas/Envelope_ConsentRecordArray"
|
|
1697
2319
|
ApiResponse_WorkspaceArray:
|
|
1698
2320
|
$ref: "#/components/schemas/Envelope_WorkspaceArray"
|
|
2321
|
+
ApiResponse_HelpdeskConversation:
|
|
2322
|
+
$ref: "#/components/schemas/Envelope_HelpdeskConversation"
|
|
2323
|
+
ApiResponse_HelpdeskConversationUpdateResult:
|
|
2324
|
+
$ref: "#/components/schemas/Envelope_HelpdeskConversationUpdateResult"
|
|
2325
|
+
ApiResponse_HelpdeskReplyCreateResult:
|
|
2326
|
+
$ref: "#/components/schemas/Envelope_HelpdeskReplyCreateResult"
|
|
2327
|
+
ApiResponse_WebhookEndpoint:
|
|
2328
|
+
$ref: "#/components/schemas/Envelope_WebhookEndpoint"
|
|
2329
|
+
ApiResponse_WebhookEndpointArray:
|
|
2330
|
+
$ref: "#/components/schemas/Envelope_WebhookEndpointArray"
|
|
2331
|
+
ApiResponse_WebhookDeleteResult:
|
|
2332
|
+
$ref: "#/components/schemas/Envelope_WebhookDeleteResult"
|
|
2333
|
+
ApiResponse_WebhookDeliveryArray:
|
|
2334
|
+
$ref: "#/components/schemas/Envelope_WebhookDeliveryArray"
|
|
2335
|
+
ApiResponse_WebhookTestResult:
|
|
2336
|
+
$ref: "#/components/schemas/Envelope_WebhookTestResult"
|
|
1699
2337
|
PaginatedResponse_Post:
|
|
1700
2338
|
type: object
|
|
1701
2339
|
required: [data, pagination]
|
|
@@ -1736,6 +2374,26 @@ components:
|
|
|
1736
2374
|
$ref: "#/components/schemas/Deal"
|
|
1737
2375
|
pagination:
|
|
1738
2376
|
$ref: "#/components/schemas/Pagination"
|
|
2377
|
+
PaginatedResponse_HelpdeskConversation:
|
|
2378
|
+
type: object
|
|
2379
|
+
required: [data, pagination]
|
|
2380
|
+
properties:
|
|
2381
|
+
data:
|
|
2382
|
+
type: array
|
|
2383
|
+
items:
|
|
2384
|
+
$ref: "#/components/schemas/HelpdeskConversation"
|
|
2385
|
+
pagination:
|
|
2386
|
+
$ref: "#/components/schemas/Pagination"
|
|
2387
|
+
PaginatedResponse_HelpdeskMessage:
|
|
2388
|
+
type: object
|
|
2389
|
+
required: [data, pagination]
|
|
2390
|
+
properties:
|
|
2391
|
+
data:
|
|
2392
|
+
type: array
|
|
2393
|
+
items:
|
|
2394
|
+
$ref: "#/components/schemas/HelpdeskMessage"
|
|
2395
|
+
pagination:
|
|
2396
|
+
$ref: "#/components/schemas/Pagination"
|
|
1739
2397
|
Envelope_PostCreateResult:
|
|
1740
2398
|
type: object
|
|
1741
2399
|
required: [data]
|
|
@@ -1908,3 +2566,55 @@ components:
|
|
|
1908
2566
|
type: array
|
|
1909
2567
|
items:
|
|
1910
2568
|
$ref: "#/components/schemas/Workspace"
|
|
2569
|
+
Envelope_HelpdeskConversation:
|
|
2570
|
+
type: object
|
|
2571
|
+
required: [data]
|
|
2572
|
+
properties:
|
|
2573
|
+
data:
|
|
2574
|
+
$ref: "#/components/schemas/HelpdeskConversation"
|
|
2575
|
+
Envelope_HelpdeskConversationUpdateResult:
|
|
2576
|
+
type: object
|
|
2577
|
+
required: [data]
|
|
2578
|
+
properties:
|
|
2579
|
+
data:
|
|
2580
|
+
$ref: "#/components/schemas/HelpdeskConversationUpdateResult"
|
|
2581
|
+
Envelope_HelpdeskReplyCreateResult:
|
|
2582
|
+
type: object
|
|
2583
|
+
required: [data]
|
|
2584
|
+
properties:
|
|
2585
|
+
data:
|
|
2586
|
+
$ref: "#/components/schemas/HelpdeskReplyCreateResult"
|
|
2587
|
+
Envelope_WebhookEndpoint:
|
|
2588
|
+
type: object
|
|
2589
|
+
required: [data]
|
|
2590
|
+
properties:
|
|
2591
|
+
data:
|
|
2592
|
+
$ref: "#/components/schemas/WebhookEndpoint"
|
|
2593
|
+
Envelope_WebhookEndpointArray:
|
|
2594
|
+
type: object
|
|
2595
|
+
required: [data]
|
|
2596
|
+
properties:
|
|
2597
|
+
data:
|
|
2598
|
+
type: array
|
|
2599
|
+
items:
|
|
2600
|
+
$ref: "#/components/schemas/WebhookEndpoint"
|
|
2601
|
+
Envelope_WebhookDeleteResult:
|
|
2602
|
+
type: object
|
|
2603
|
+
required: [data]
|
|
2604
|
+
properties:
|
|
2605
|
+
data:
|
|
2606
|
+
$ref: "#/components/schemas/WebhookDeleteResult"
|
|
2607
|
+
Envelope_WebhookDeliveryArray:
|
|
2608
|
+
type: object
|
|
2609
|
+
required: [data]
|
|
2610
|
+
properties:
|
|
2611
|
+
data:
|
|
2612
|
+
type: array
|
|
2613
|
+
items:
|
|
2614
|
+
$ref: "#/components/schemas/WebhookDelivery"
|
|
2615
|
+
Envelope_WebhookTestResult:
|
|
2616
|
+
type: object
|
|
2617
|
+
required: [data]
|
|
2618
|
+
properties:
|
|
2619
|
+
data:
|
|
2620
|
+
$ref: "#/components/schemas/WebhookTestResult"
|