retell-sdk 5.62.0 → 5.64.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +15 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +15 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +9 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +9 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent.d.mts +64 -4
  12. package/resources/agent.d.mts.map +1 -1
  13. package/resources/agent.d.ts +64 -4
  14. package/resources/agent.d.ts.map +1 -1
  15. package/resources/agent.js +13 -4
  16. package/resources/agent.js.map +1 -1
  17. package/resources/agent.mjs +13 -4
  18. package/resources/agent.mjs.map +1 -1
  19. package/resources/app.d.mts +457 -0
  20. package/resources/app.d.mts.map +1 -0
  21. package/resources/app.d.ts +457 -0
  22. package/resources/app.d.ts.map +1 -0
  23. package/resources/app.js +67 -0
  24. package/resources/app.js.map +1 -0
  25. package/resources/app.mjs +63 -0
  26. package/resources/app.mjs.map +1 -0
  27. package/resources/call.d.mts +66 -6
  28. package/resources/call.d.mts.map +1 -1
  29. package/resources/call.d.ts +66 -6
  30. package/resources/call.d.ts.map +1 -1
  31. package/resources/chat-agent.d.mts +2 -8
  32. package/resources/chat-agent.d.mts.map +1 -1
  33. package/resources/chat-agent.d.ts +2 -8
  34. package/resources/chat-agent.d.ts.map +1 -1
  35. package/resources/chat-agent.js +2 -8
  36. package/resources/chat-agent.js.map +1 -1
  37. package/resources/chat-agent.mjs +2 -8
  38. package/resources/chat-agent.mjs.map +1 -1
  39. package/resources/contact.d.mts +541 -0
  40. package/resources/contact.d.mts.map +1 -0
  41. package/resources/contact.d.ts +541 -0
  42. package/resources/contact.d.ts.map +1 -0
  43. package/resources/contact.js +77 -0
  44. package/resources/contact.js.map +1 -0
  45. package/resources/contact.mjs +73 -0
  46. package/resources/contact.mjs.map +1 -0
  47. package/resources/conversation-flow-component.d.mts +18 -6
  48. package/resources/conversation-flow-component.d.mts.map +1 -1
  49. package/resources/conversation-flow-component.d.ts +18 -6
  50. package/resources/conversation-flow-component.d.ts.map +1 -1
  51. package/resources/conversation-flow.d.mts +46 -14
  52. package/resources/conversation-flow.d.mts.map +1 -1
  53. package/resources/conversation-flow.d.ts +46 -14
  54. package/resources/conversation-flow.d.ts.map +1 -1
  55. package/resources/conversation-flow.js +3 -1
  56. package/resources/conversation-flow.js.map +1 -1
  57. package/resources/conversation-flow.mjs +3 -1
  58. package/resources/conversation-flow.mjs.map +1 -1
  59. package/resources/crm.d.mts +222 -0
  60. package/resources/crm.d.mts.map +1 -0
  61. package/resources/crm.d.ts +222 -0
  62. package/resources/crm.d.ts.map +1 -0
  63. package/resources/crm.js +46 -0
  64. package/resources/crm.js.map +1 -0
  65. package/resources/crm.mjs +42 -0
  66. package/resources/crm.mjs.map +1 -0
  67. package/resources/index.d.mts +6 -3
  68. package/resources/index.d.mts.map +1 -1
  69. package/resources/index.d.ts +6 -3
  70. package/resources/index.d.ts.map +1 -1
  71. package/resources/index.js +7 -1
  72. package/resources/index.js.map +1 -1
  73. package/resources/index.mjs +3 -0
  74. package/resources/index.mjs.map +1 -1
  75. package/resources/knowledge-base.d.mts +12 -4
  76. package/resources/knowledge-base.d.mts.map +1 -1
  77. package/resources/knowledge-base.d.ts +12 -4
  78. package/resources/knowledge-base.d.ts.map +1 -1
  79. package/resources/llm.d.mts +28 -8
  80. package/resources/llm.d.mts.map +1 -1
  81. package/resources/llm.d.ts +28 -8
  82. package/resources/llm.d.ts.map +1 -1
  83. package/resources/llm.js +3 -1
  84. package/resources/llm.js.map +1 -1
  85. package/resources/llm.mjs +3 -1
  86. package/resources/llm.mjs.map +1 -1
  87. package/src/client.ts +85 -0
  88. package/src/resources/agent.ts +85 -4
  89. package/src/resources/app.ts +622 -0
  90. package/src/resources/call.ts +93 -7
  91. package/src/resources/chat-agent.ts +2 -8
  92. package/src/resources/contact.ts +732 -0
  93. package/src/resources/conversation-flow-component.ts +18 -6
  94. package/src/resources/conversation-flow.ts +53 -13
  95. package/src/resources/crm.ts +293 -0
  96. package/src/resources/index.ts +38 -0
  97. package/src/resources/knowledge-base.ts +12 -4
  98. package/src/resources/llm.ts +35 -7
  99. package/src/version.ts +1 -1
  100. package/version.d.mts +1 -1
  101. package/version.d.ts +1 -1
  102. package/version.js +1 -1
  103. package/version.mjs +1 -1
@@ -0,0 +1,73 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../core/resource.mjs";
3
+ import { buildHeaders } from "../internal/headers.mjs";
4
+ import { path } from "../internal/utils/path.mjs";
5
+ export class Contact extends APIResource {
6
+ /**
7
+ * Create a new contact.
8
+ */
9
+ create(body, options) {
10
+ return this._client.post('/create-contact', { body, ...options });
11
+ }
12
+ /**
13
+ * Update an existing contact.
14
+ */
15
+ update(contactID, body, options) {
16
+ return this._client.patch(path `/update-contact/${contactID}`, { body, ...options });
17
+ }
18
+ /**
19
+ * List contacts, newest conversation first by default, with the total count of
20
+ * matches alongside the page. Page through results with `pagination_key`; `skip`
21
+ * is available for offset-style paging but is slower on large contact sets and can
22
+ * repeat or miss rows as contacts are updated.
23
+ */
24
+ list(body = {}, options) {
25
+ return this._client.post('/list-contacts', { body, ...options });
26
+ }
27
+ /**
28
+ * Delete a contact. A contact linked to a record in a connected CRM cannot be
29
+ * deleted while two-way sync is active — unlink the CRM app first, otherwise the
30
+ * next sync would recreate it.
31
+ */
32
+ delete(contactID, options) {
33
+ return this._client.delete(path `/delete-contact/${contactID}`, {
34
+ ...options,
35
+ headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
36
+ });
37
+ }
38
+ /**
39
+ * Trigger a backfill job that re-applies analysis data mappings to contacts using
40
+ * historical call data. Only one backfill job can run per organization at a time.
41
+ */
42
+ backfillAnalysisData(body, options) {
43
+ return this._client.post('/backfill-contact-analysis-data', { body, ...options });
44
+ }
45
+ /**
46
+ * Retrieve a contact by ID.
47
+ */
48
+ get(contactID, options) {
49
+ return this._client.get(path `/get-contact/${contactID}`, options);
50
+ }
51
+ /**
52
+ * Get the status of the contact analysis data backfill job.
53
+ */
54
+ getBackfillJobStatus(options) {
55
+ return this._client.get('/get-backfill-contact-job-status', options);
56
+ }
57
+ /**
58
+ * Retrieve a contact by phone number. At most one contact exists per phone number
59
+ * in an organization.
60
+ */
61
+ getByPhone(phoneNumber, options) {
62
+ return this._client.get(path `/get-contact-by-phone/${phoneNumber}`, options);
63
+ }
64
+ /**
65
+ * List a contact's conversations (inbound calls, outbound calls, and chats) merged
66
+ * into a single timeline, most recent first. Results are matched by the contact's
67
+ * phone number. Use the returned `pagination_key` to fetch the next page.
68
+ */
69
+ listConversations(contactID, query = {}, options) {
70
+ return this._client.get(path `/list-contact-conversations/${contactID}`, { query, ...options });
71
+ }
72
+ }
73
+ //# sourceMappingURL=contact.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact.mjs","sourceRoot":"","sources":["../src/resources/contact.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAAE,YAAY,EAAE,gCAA4B;AAEnD,OAAO,EAAE,IAAI,EAAE,mCAA+B;AAE9C,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;OAEG;IACH,MAAM,CAAC,IAAyB,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,SAAiB,EACjB,IAAyB,EACzB,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAA,mBAAmB,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,C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O,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
@@ -1486,7 +1486,9 @@ export declare namespace ConversationFlowComponentResponse {
1486
1486
  */
1487
1487
  keep_current_language?: boolean;
1488
1488
  /**
1489
- * If true, keep the current voice when swapping agents. Defaults to false.
1489
+ * If true, keep the current voice and ambient sound settings when swapping agents.
1490
+ * Otherwise, use the destination agent's voice and ambient sound settings.
1491
+ * Defaults to false.
1490
1492
  */
1491
1493
  keep_current_voice?: boolean;
1492
1494
  speak_during_execution?: boolean;
@@ -4639,7 +4641,9 @@ export declare namespace ConversationFlowComponentResponse {
4639
4641
  */
4640
4642
  keep_current_language?: boolean;
4641
4643
  /**
4642
- * If true, keep the current voice when swapping agents. Defaults to false.
4644
+ * If true, keep the current voice and ambient sound settings when swapping agents.
4645
+ * Otherwise, use the destination agent's voice and ambient sound settings.
4646
+ * Defaults to false.
4643
4647
  */
4644
4648
  keep_current_voice?: boolean;
4645
4649
  model_choice?: AgentSwapNode.ModelChoice;
@@ -7540,7 +7544,9 @@ export declare namespace ConversationFlowComponentCreateParams {
7540
7544
  */
7541
7545
  keep_current_language?: boolean;
7542
7546
  /**
7543
- * If true, keep the current voice when swapping agents. Defaults to false.
7547
+ * If true, keep the current voice and ambient sound settings when swapping agents.
7548
+ * Otherwise, use the destination agent's voice and ambient sound settings.
7549
+ * Defaults to false.
7544
7550
  */
7545
7551
  keep_current_voice?: boolean;
7546
7552
  speak_during_execution?: boolean;
@@ -10693,7 +10699,9 @@ export declare namespace ConversationFlowComponentCreateParams {
10693
10699
  */
10694
10700
  keep_current_language?: boolean;
10695
10701
  /**
10696
- * If true, keep the current voice when swapping agents. Defaults to false.
10702
+ * If true, keep the current voice and ambient sound settings when swapping agents.
10703
+ * Otherwise, use the destination agent's voice and ambient sound settings.
10704
+ * Defaults to false.
10697
10705
  */
10698
10706
  keep_current_voice?: boolean;
10699
10707
  model_choice?: AgentSwapNode.ModelChoice;
@@ -13614,7 +13622,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
13614
13622
  */
13615
13623
  keep_current_language?: boolean;
13616
13624
  /**
13617
- * If true, keep the current voice when swapping agents. Defaults to false.
13625
+ * If true, keep the current voice and ambient sound settings when swapping agents.
13626
+ * Otherwise, use the destination agent's voice and ambient sound settings.
13627
+ * Defaults to false.
13618
13628
  */
13619
13629
  keep_current_voice?: boolean;
13620
13630
  speak_during_execution?: boolean;
@@ -16767,7 +16777,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
16767
16777
  */
16768
16778
  keep_current_language?: boolean;
16769
16779
  /**
16770
- * If true, keep the current voice when swapping agents. Defaults to false.
16780
+ * If true, keep the current voice and ambient sound settings when swapping agents.
16781
+ * Otherwise, use the destination agent's voice and ambient sound settings.
16782
+ * Defaults to false.
16771
16783
  */
16772
16784
  keep_current_voice?: boolean;
16773
16785
  model_choice?: AgentSwapNode.ModelChoice;