retell-sdk 5.64.0 → 5.65.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 (129) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +29 -0
  3. package/client.d.mts +9 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +9 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/agent.d.mts +43 -13
  13. package/resources/agent.d.mts.map +1 -1
  14. package/resources/agent.d.ts +43 -13
  15. package/resources/agent.d.ts.map +1 -1
  16. package/resources/agent.js +21 -2
  17. package/resources/agent.js.map +1 -1
  18. package/resources/agent.mjs +21 -2
  19. package/resources/agent.mjs.map +1 -1
  20. package/resources/app.d.mts +28 -46
  21. package/resources/app.d.mts.map +1 -1
  22. package/resources/app.d.ts +28 -46
  23. package/resources/app.d.ts.map +1 -1
  24. package/resources/app.js +7 -5
  25. package/resources/app.js.map +1 -1
  26. package/resources/app.mjs +7 -5
  27. package/resources/app.mjs.map +1 -1
  28. package/resources/asset.d.mts +53 -0
  29. package/resources/asset.d.mts.map +1 -0
  30. package/resources/asset.d.ts +53 -0
  31. package/resources/asset.d.ts.map +1 -0
  32. package/resources/asset.js +20 -0
  33. package/resources/asset.js.map +1 -0
  34. package/resources/asset.mjs +16 -0
  35. package/resources/asset.mjs.map +1 -0
  36. package/resources/batch-call.d.mts +4 -2
  37. package/resources/batch-call.d.mts.map +1 -1
  38. package/resources/batch-call.d.ts +4 -2
  39. package/resources/batch-call.d.ts.map +1 -1
  40. package/resources/call.d.mts +155 -21
  41. package/resources/call.d.mts.map +1 -1
  42. package/resources/call.d.ts +155 -21
  43. package/resources/call.d.ts.map +1 -1
  44. package/resources/call.js +37 -5
  45. package/resources/call.js.map +1 -1
  46. package/resources/call.mjs +37 -5
  47. package/resources/call.mjs.map +1 -1
  48. package/resources/chat-agent.d.mts +2 -2
  49. package/resources/chat-agent.d.mts.map +1 -1
  50. package/resources/chat-agent.d.ts +2 -2
  51. package/resources/chat-agent.d.ts.map +1 -1
  52. package/resources/chat.d.mts +24 -11
  53. package/resources/chat.d.mts.map +1 -1
  54. package/resources/chat.d.ts +24 -11
  55. package/resources/chat.d.ts.map +1 -1
  56. package/resources/contact.d.mts +138 -10
  57. package/resources/contact.d.mts.map +1 -1
  58. package/resources/contact.d.ts +138 -10
  59. package/resources/contact.d.ts.map +1 -1
  60. package/resources/contact.js +23 -0
  61. package/resources/contact.js.map +1 -1
  62. package/resources/contact.mjs +23 -0
  63. package/resources/contact.mjs.map +1 -1
  64. package/resources/conversation-flow-component.d.mts +38 -2
  65. package/resources/conversation-flow-component.d.mts.map +1 -1
  66. package/resources/conversation-flow-component.d.ts +38 -2
  67. package/resources/conversation-flow-component.d.ts.map +1 -1
  68. package/resources/conversation-flow.d.mts +74 -2
  69. package/resources/conversation-flow.d.mts.map +1 -1
  70. package/resources/conversation-flow.d.ts +74 -2
  71. package/resources/conversation-flow.d.ts.map +1 -1
  72. package/resources/crm.d.mts +4 -0
  73. package/resources/crm.d.mts.map +1 -1
  74. package/resources/crm.d.ts +4 -0
  75. package/resources/crm.d.ts.map +1 -1
  76. package/resources/export-request.d.mts +2 -2
  77. package/resources/export-request.d.mts.map +1 -1
  78. package/resources/export-request.d.ts +2 -2
  79. package/resources/export-request.d.ts.map +1 -1
  80. package/resources/index.d.mts +4 -3
  81. package/resources/index.d.mts.map +1 -1
  82. package/resources/index.d.ts +4 -3
  83. package/resources/index.d.ts.map +1 -1
  84. package/resources/index.js +3 -1
  85. package/resources/index.js.map +1 -1
  86. package/resources/index.mjs +1 -0
  87. package/resources/index.mjs.map +1 -1
  88. package/resources/knowledge-base.d.mts +7 -7
  89. package/resources/knowledge-base.d.ts +7 -7
  90. package/resources/llm.d.mts +38 -2
  91. package/resources/llm.d.mts.map +1 -1
  92. package/resources/llm.d.ts +38 -2
  93. package/resources/llm.d.ts.map +1 -1
  94. package/resources/phone-number.d.mts +14 -8
  95. package/resources/phone-number.d.mts.map +1 -1
  96. package/resources/phone-number.d.ts +14 -8
  97. package/resources/phone-number.d.ts.map +1 -1
  98. package/resources/tests.d.mts +6 -6
  99. package/resources/tests.d.mts.map +1 -1
  100. package/resources/tests.d.ts +6 -6
  101. package/resources/tests.d.ts.map +1 -1
  102. package/resources/voice.d.mts +4 -4
  103. package/resources/voice.d.mts.map +1 -1
  104. package/resources/voice.d.ts +4 -4
  105. package/resources/voice.d.ts.map +1 -1
  106. package/src/client.ts +31 -0
  107. package/src/resources/agent.ts +60 -9
  108. package/src/resources/app.ts +29 -58
  109. package/src/resources/asset.ts +69 -0
  110. package/src/resources/batch-call.ts +6 -1
  111. package/src/resources/call.ts +196 -18
  112. package/src/resources/chat-agent.ts +2 -2
  113. package/src/resources/chat.ts +28 -11
  114. package/src/resources/contact.ts +187 -9
  115. package/src/resources/conversation-flow-component.ts +38 -2
  116. package/src/resources/conversation-flow.ts +74 -2
  117. package/src/resources/crm.ts +5 -0
  118. package/src/resources/export-request.ts +2 -2
  119. package/src/resources/index.ts +12 -0
  120. package/src/resources/knowledge-base.ts +7 -7
  121. package/src/resources/llm.ts +38 -2
  122. package/src/resources/phone-number.ts +14 -8
  123. package/src/resources/tests.ts +6 -6
  124. package/src/resources/voice.ts +4 -4
  125. package/src/version.ts +1 -1
  126. package/version.d.mts +1 -1
  127. package/version.d.ts +1 -1
  128. package/version.js +1 -1
  129. package/version.mjs +1 -1
@@ -1,6 +1,7 @@
1
1
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
  import { APIResource } from "../core/resource.mjs";
3
3
  import { buildHeaders } from "../internal/headers.mjs";
4
+ import { multipartFormRequestOptions } from "../internal/uploads.mjs";
4
5
  import { path } from "../internal/utils/path.mjs";
5
6
  export class Contact extends APIResource {
6
7
  /**
@@ -42,6 +43,15 @@ export class Contact extends APIResource {
42
43
  backfillAnalysisData(body, options) {
43
44
  return this._client.post('/backfill-contact-analysis-data', { body, ...options });
44
45
  }
46
+ /**
47
+ * Start an incremental contact import from an uploaded CSV: creates new contacts
48
+ * and updates existing ones matched by phone number. Mapped columns overwrite the
49
+ * matched contact's fields; unmapped columns are ignored. Runs asynchronously —
50
+ * poll get-contact-import for progress.
51
+ */
52
+ createImport(body, options) {
53
+ return this._client.post('/create-contact-import', { body, ...options });
54
+ }
45
55
  /**
46
56
  * Retrieve a contact by ID.
47
57
  */
@@ -61,6 +71,12 @@ export class Contact extends APIResource {
61
71
  getByPhone(phoneNumber, options) {
62
72
  return this._client.get(path `/get-contact-by-phone/${phoneNumber}`, options);
63
73
  }
74
+ /**
75
+ * Status and counts for the org's current or latest contact import.
76
+ */
77
+ getImport(options) {
78
+ return this._client.get('/get-contact-import', options);
79
+ }
64
80
  /**
65
81
  * List a contact's conversations (inbound calls, outbound calls, and chats) merged
66
82
  * into a single timeline, most recent first. Results are matched by the contact's
@@ -69,5 +85,12 @@ export class Contact extends APIResource {
69
85
  listConversations(contactID, query = {}, options) {
70
86
  return this._client.get(path `/list-contact-conversations/${contactID}`, { query, ...options });
71
87
  }
88
+ /**
89
+ * Upload a CSV file for a contact import. The file is stored privately and
90
+ * referenced by the returned upload_id in create-contact-import.
91
+ */
92
+ uploadImportFile(body, options) {
93
+ return this._client.post('/upload-contact-import-file', multipartFormRequestOptions({ body, ...options }, this._client));
94
+ }
72
95
  }
73
96
  //# sourceMappingURL=contact.mjs.map
@@ -1 +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,I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O,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAED;;;;OAIG;IACH,iBAAiB,CACf,SAAiB,EACjB,QAA2D,EAAE,EAC7D,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA,+BAA+B,SAAS,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,gBAAgB,CACd,IAAmC,EACnC,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CACtB,6BAA6B,EAC7B,2BAA2B,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;CACF"}
@@ -1377,6 +1377,9 @@ export declare namespace ConversationFlowComponentResponse {
1377
1377
  }
1378
1378
  }
1379
1379
  }
1380
+ /**
1381
+ * @deprecated
1382
+ */
1380
1383
  interface CheckAvailabilityCalTool {
1381
1384
  /**
1382
1385
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -1411,6 +1414,9 @@ export declare namespace ConversationFlowComponentResponse {
1411
1414
  */
1412
1415
  timezone?: string;
1413
1416
  }
1417
+ /**
1418
+ * @deprecated
1419
+ */
1414
1420
  interface BookAppointmentCalTool {
1415
1421
  /**
1416
1422
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -6053,6 +6059,9 @@ export declare namespace ConversationFlowComponentResponse {
6053
6059
  required?: Array<string>;
6054
6060
  }
6055
6061
  }
6062
+ /**
6063
+ * @deprecated
6064
+ */
6056
6065
  interface CheckAvailabilityCalTool {
6057
6066
  /**
6058
6067
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -6091,6 +6100,9 @@ export declare namespace ConversationFlowComponentResponse {
6091
6100
  */
6092
6101
  tool_id?: string;
6093
6102
  }
6103
+ /**
6104
+ * @deprecated
6105
+ */
6094
6106
  interface BookAppointmentCalTool {
6095
6107
  /**
6096
6108
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -6134,8 +6146,8 @@ export interface ConversationFlowComponentListResponse {
6134
6146
  /**
6135
6147
  * Whether more results are available.
6136
6148
  */
6137
- has_more?: boolean;
6138
- items?: Array<ConversationFlowComponentResponse>;
6149
+ has_more: boolean;
6150
+ items: Array<ConversationFlowComponentResponse>;
6139
6151
  /**
6140
6152
  * Pagination key for the next page.
6141
6153
  */
@@ -7435,6 +7447,9 @@ export declare namespace ConversationFlowComponentCreateParams {
7435
7447
  }
7436
7448
  }
7437
7449
  }
7450
+ /**
7451
+ * @deprecated
7452
+ */
7438
7453
  interface CheckAvailabilityCalTool {
7439
7454
  /**
7440
7455
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -7469,6 +7484,9 @@ export declare namespace ConversationFlowComponentCreateParams {
7469
7484
  */
7470
7485
  timezone?: string;
7471
7486
  }
7487
+ /**
7488
+ * @deprecated
7489
+ */
7472
7490
  interface BookAppointmentCalTool {
7473
7491
  /**
7474
7492
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -12111,6 +12129,9 @@ export declare namespace ConversationFlowComponentCreateParams {
12111
12129
  required?: Array<string>;
12112
12130
  }
12113
12131
  }
12132
+ /**
12133
+ * @deprecated
12134
+ */
12114
12135
  interface CheckAvailabilityCalTool {
12115
12136
  /**
12116
12137
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -12149,6 +12170,9 @@ export declare namespace ConversationFlowComponentCreateParams {
12149
12170
  */
12150
12171
  tool_id?: string;
12151
12172
  }
12173
+ /**
12174
+ * @deprecated
12175
+ */
12152
12176
  interface BookAppointmentCalTool {
12153
12177
  /**
12154
12178
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -13513,6 +13537,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
13513
13537
  }
13514
13538
  }
13515
13539
  }
13540
+ /**
13541
+ * @deprecated
13542
+ */
13516
13543
  interface CheckAvailabilityCalTool {
13517
13544
  /**
13518
13545
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -13547,6 +13574,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
13547
13574
  */
13548
13575
  timezone?: string;
13549
13576
  }
13577
+ /**
13578
+ * @deprecated
13579
+ */
13550
13580
  interface BookAppointmentCalTool {
13551
13581
  /**
13552
13582
  * Cal.com Api key that have access to the cal.com event you want to book
@@ -18158,6 +18188,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
18158
18188
  required?: Array<string>;
18159
18189
  }
18160
18190
  }
18191
+ /**
18192
+ * @deprecated
18193
+ */
18161
18194
  interface CheckAvailabilityCalTool {
18162
18195
  /**
18163
18196
  * Cal.com Api key that have access to the cal.com event you want to check
@@ -18196,6 +18229,9 @@ export declare namespace ConversationFlowComponentUpdateParams {
18196
18229
  */
18197
18230
  tool_id?: string;
18198
18231
  }
18232
+ /**
18233
+ * @deprecated
18234
+ */
18199
18235
  interface BookAppointmentCalTool {
18200
18236
  /**
18201
18237
  * Cal.com Api key that have access to the cal.com event you want to book