@roarkanalytics/sdk 7.8.0 → 8.0.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 (205) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +20 -5
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +20 -5
  5. package/client.d.ts.map +1 -1
  6. package/client.js +18 -3
  7. package/client.js.map +1 -1
  8. package/client.mjs +18 -3
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/agent-connection.d.mts +1952 -0
  12. package/resources/agent-connection.d.mts.map +1 -0
  13. package/resources/agent-connection.d.ts +1952 -0
  14. package/resources/agent-connection.d.ts.map +1 -0
  15. package/resources/agent-connection.js +173 -0
  16. package/resources/agent-connection.js.map +1 -0
  17. package/resources/agent-connection.mjs +169 -0
  18. package/resources/agent-connection.mjs.map +1 -0
  19. package/resources/agent-conversation.d.mts +110 -0
  20. package/resources/agent-conversation.d.mts.map +1 -0
  21. package/resources/agent-conversation.d.ts +110 -0
  22. package/resources/agent-conversation.d.ts.map +1 -0
  23. package/resources/agent-conversation.js +41 -0
  24. package/resources/agent-conversation.js.map +1 -0
  25. package/resources/agent-conversation.mjs +37 -0
  26. package/resources/agent-conversation.mjs.map +1 -0
  27. package/resources/agent-draft.d.mts +101 -35
  28. package/resources/agent-draft.d.mts.map +1 -1
  29. package/resources/agent-draft.d.ts +101 -35
  30. package/resources/agent-draft.d.ts.map +1 -1
  31. package/resources/agent-endpoint.d.mts +4 -4
  32. package/resources/agent-endpoint.d.mts.map +1 -1
  33. package/resources/agent-endpoint.d.ts +4 -4
  34. package/resources/agent-endpoint.d.ts.map +1 -1
  35. package/resources/agent-setup.d.mts +1057 -0
  36. package/resources/agent-setup.d.mts.map +1 -0
  37. package/resources/agent-setup.d.ts +1057 -0
  38. package/resources/agent-setup.d.ts.map +1 -0
  39. package/resources/agent-setup.js +113 -0
  40. package/resources/agent-setup.js.map +1 -0
  41. package/resources/agent-setup.mjs +109 -0
  42. package/resources/agent-setup.mjs.map +1 -0
  43. package/resources/agent-version.d.mts +57 -18
  44. package/resources/agent-version.d.mts.map +1 -1
  45. package/resources/agent-version.d.ts +57 -18
  46. package/resources/agent-version.d.ts.map +1 -1
  47. package/resources/agent.d.mts +263 -4
  48. package/resources/agent.d.mts.map +1 -1
  49. package/resources/agent.d.ts +263 -4
  50. package/resources/agent.d.ts.map +1 -1
  51. package/resources/calendar-connection.d.mts +834 -56
  52. package/resources/calendar-connection.d.mts.map +1 -1
  53. package/resources/calendar-connection.d.ts +834 -56
  54. package/resources/calendar-connection.d.ts.map +1 -1
  55. package/resources/calendar-connection.js +127 -8
  56. package/resources/calendar-connection.js.map +1 -1
  57. package/resources/calendar-connection.mjs +127 -8
  58. package/resources/calendar-connection.mjs.map +1 -1
  59. package/resources/call.d.mts +2 -2
  60. package/resources/call.d.mts.map +1 -1
  61. package/resources/call.d.ts +2 -2
  62. package/resources/call.d.ts.map +1 -1
  63. package/resources/config.d.mts +78 -36
  64. package/resources/config.d.mts.map +1 -1
  65. package/resources/config.d.ts +78 -36
  66. package/resources/config.d.ts.map +1 -1
  67. package/resources/conversation.d.mts +156 -0
  68. package/resources/conversation.d.mts.map +1 -0
  69. package/resources/conversation.d.ts +156 -0
  70. package/resources/conversation.d.ts.map +1 -0
  71. package/resources/conversation.js +40 -0
  72. package/resources/conversation.js.map +1 -0
  73. package/resources/conversation.mjs +36 -0
  74. package/resources/conversation.mjs.map +1 -0
  75. package/resources/customer-flow-edge-case.d.mts +637 -40
  76. package/resources/customer-flow-edge-case.d.mts.map +1 -1
  77. package/resources/customer-flow-edge-case.d.ts +637 -40
  78. package/resources/customer-flow-edge-case.d.ts.map +1 -1
  79. package/resources/customer-flow.d.mts +2583 -156
  80. package/resources/customer-flow.d.mts.map +1 -1
  81. package/resources/customer-flow.d.ts +2583 -156
  82. package/resources/customer-flow.d.ts.map +1 -1
  83. package/resources/{customer-profile.d.mts → customer.d.mts} +287 -98
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -98
  86. package/resources/customer.d.ts.map +1 -0
  87. package/resources/customer.js +180 -0
  88. package/resources/customer.js.map +1 -0
  89. package/resources/customer.mjs +176 -0
  90. package/resources/customer.mjs.map +1 -0
  91. package/resources/index.d.mts +7 -2
  92. package/resources/index.d.mts.map +1 -1
  93. package/resources/index.d.ts +7 -2
  94. package/resources/index.d.ts.map +1 -1
  95. package/resources/index.js +13 -3
  96. package/resources/index.js.map +1 -1
  97. package/resources/index.mjs +6 -1
  98. package/resources/index.mjs.map +1 -1
  99. package/resources/mcp-server.d.mts +588 -0
  100. package/resources/mcp-server.d.mts.map +1 -0
  101. package/resources/mcp-server.d.ts +588 -0
  102. package/resources/mcp-server.d.ts.map +1 -0
  103. package/resources/mcp-server.js +109 -0
  104. package/resources/mcp-server.js.map +1 -0
  105. package/resources/mcp-server.mjs +105 -0
  106. package/resources/mcp-server.mjs.map +1 -0
  107. package/resources/metric-policy.d.mts +5 -4
  108. package/resources/metric-policy.d.mts.map +1 -1
  109. package/resources/metric-policy.d.ts +5 -4
  110. package/resources/metric-policy.d.ts.map +1 -1
  111. package/resources/metric-policy.js +1 -1
  112. package/resources/metric-policy.mjs +1 -1
  113. package/resources/metric-variant.d.mts +4 -1
  114. package/resources/metric-variant.d.mts.map +1 -1
  115. package/resources/metric-variant.d.ts +4 -1
  116. package/resources/metric-variant.d.ts.map +1 -1
  117. package/resources/metric.d.mts +7 -2
  118. package/resources/metric.d.mts.map +1 -1
  119. package/resources/metric.d.ts +7 -2
  120. package/resources/metric.d.ts.map +1 -1
  121. package/resources/simulation-environment.d.mts +366 -0
  122. package/resources/simulation-environment.d.mts.map +1 -1
  123. package/resources/simulation-environment.d.ts +366 -0
  124. package/resources/simulation-environment.d.ts.map +1 -1
  125. package/resources/simulation-job.d.mts +12 -8
  126. package/resources/simulation-job.d.mts.map +1 -1
  127. package/resources/simulation-job.d.ts +12 -8
  128. package/resources/simulation-job.d.ts.map +1 -1
  129. package/resources/simulation-persona.d.mts +25 -15
  130. package/resources/simulation-persona.d.mts.map +1 -1
  131. package/resources/simulation-persona.d.ts +25 -15
  132. package/resources/simulation-persona.d.ts.map +1 -1
  133. package/resources/simulation-run-plan-job.d.mts +32 -6
  134. package/resources/simulation-run-plan-job.d.mts.map +1 -1
  135. package/resources/simulation-run-plan-job.d.ts +32 -6
  136. package/resources/simulation-run-plan-job.d.ts.map +1 -1
  137. package/resources/simulation-run-plan.d.mts +126 -13
  138. package/resources/simulation-run-plan.d.mts.map +1 -1
  139. package/resources/simulation-run-plan.d.ts +126 -13
  140. package/resources/simulation-run-plan.d.ts.map +1 -1
  141. package/resources/simulation-template.d.mts +1 -1
  142. package/resources/simulation-template.d.mts.map +1 -1
  143. package/resources/simulation-template.d.ts +1 -1
  144. package/resources/simulation-template.d.ts.map +1 -1
  145. package/resources/simulation.d.mts +35 -3
  146. package/resources/simulation.d.mts.map +1 -1
  147. package/resources/simulation.d.ts +35 -3
  148. package/resources/simulation.d.ts.map +1 -1
  149. package/resources/tool.d.mts +565 -6
  150. package/resources/tool.d.mts.map +1 -1
  151. package/resources/tool.d.ts +565 -6
  152. package/resources/tool.d.ts.map +1 -1
  153. package/resources/tool.js +9 -6
  154. package/resources/tool.js.map +1 -1
  155. package/resources/tool.mjs +9 -6
  156. package/resources/tool.mjs.map +1 -1
  157. package/resources/usage.d.mts +1 -1
  158. package/resources/usage.d.mts.map +1 -1
  159. package/resources/usage.d.ts +1 -1
  160. package/resources/usage.d.ts.map +1 -1
  161. package/resources/webhook.d.mts +4 -4
  162. package/resources/webhook.d.mts.map +1 -1
  163. package/resources/webhook.d.ts +4 -4
  164. package/resources/webhook.d.ts.map +1 -1
  165. package/src/client.ts +197 -34
  166. package/src/resources/agent-connection.ts +2523 -0
  167. package/src/resources/agent-conversation.ts +139 -0
  168. package/src/resources/agent-draft.ts +239 -35
  169. package/src/resources/agent-endpoint.ts +8 -4
  170. package/src/resources/agent-setup.ts +1685 -0
  171. package/src/resources/agent-version.ts +126 -18
  172. package/src/resources/agent.ts +506 -4
  173. package/src/resources/calendar-connection.ts +1035 -63
  174. package/src/resources/call.ts +12 -2
  175. package/src/resources/config.ts +198 -36
  176. package/src/resources/conversation.ts +205 -0
  177. package/src/resources/customer-flow-edge-case.ts +709 -40
  178. package/src/resources/customer-flow.ts +3141 -156
  179. package/src/resources/{customer-profile.ts → customer.ts} +406 -306
  180. package/src/resources/index.ts +91 -17
  181. package/src/resources/mcp-server.ts +786 -0
  182. package/src/resources/metric-policy.ts +5 -4
  183. package/src/resources/metric-variant.ts +4 -1
  184. package/src/resources/metric.ts +7 -2
  185. package/src/resources/simulation-environment.ts +414 -0
  186. package/src/resources/simulation-job.ts +14 -8
  187. package/src/resources/simulation-persona.ts +25 -15
  188. package/src/resources/simulation-run-plan-job.ts +47 -6
  189. package/src/resources/simulation-run-plan.ts +140 -0
  190. package/src/resources/simulation-template.ts +1 -0
  191. package/src/resources/simulation.ts +39 -0
  192. package/src/resources/tool.ts +697 -6
  193. package/src/resources/usage.ts +6 -1
  194. package/src/resources/webhook.ts +8 -0
  195. package/src/version.ts +1 -1
  196. package/version.d.mts +1 -1
  197. package/version.d.ts +1 -1
  198. package/version.js +1 -1
  199. package/version.mjs +1 -1
  200. package/resources/customer-profile.d.mts.map +0 -1
  201. package/resources/customer-profile.d.ts.map +0 -1
  202. package/resources/customer-profile.js +0 -141
  203. package/resources/customer-profile.js.map +0 -1
  204. package/resources/customer-profile.mjs +0 -137
  205. package/resources/customer-profile.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { APIResource } from "../core/resource.js";
2
2
  import { APIPromise } from "../core/api-promise.js";
3
3
  import { RequestOptions } from "../internal/request-options.js";
4
- export declare class CustomerProfile extends APIResource {
4
+ export declare class Customer extends APIResource {
5
5
  /**
6
6
  * Returns the people who have talked to your agents in this project. Customers we
7
7
  * hold nothing about beyond their identifier are left out unless includeNoData is
@@ -9,110 +9,147 @@ export declare class CustomerProfile extends APIResource {
9
9
  *
10
10
  * @example
11
11
  * ```ts
12
- * const customerProfiles =
13
- * await client.customerProfile.list();
12
+ * const customers = await client.customer.list();
14
13
  * ```
15
14
  */
16
- list(query?: CustomerProfileListParams | null | undefined, options?: RequestOptions): APIPromise<CustomerProfileListResponse>;
15
+ list(query?: CustomerListParams | null | undefined, options?: RequestOptions): APIPromise<CustomerListResponse>;
17
16
  /**
18
- * Permanently removes the profile, its fields, evidence and notes. Conversations
19
- * are kept. A new conversation from the same identifier creates a new profile.
17
+ * Permanently removes the customer, with their fields, evidence and notes.
18
+ * Conversations are kept. A new conversation from the same identifier starts a new
19
+ * customer.
20
20
  *
21
21
  * @example
22
22
  * ```ts
23
- * const customerProfile = await client.customerProfile.delete(
23
+ * const customer = await client.customer.delete(
24
24
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
25
25
  * );
26
26
  * ```
27
27
  */
28
- delete(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileDeleteResponse>;
28
+ delete(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerDeleteResponse>;
29
29
  /**
30
30
  * Removes the value and any lock, so a later conversation can fill it again.
31
31
  *
32
32
  * @example
33
33
  * ```ts
34
- * const response =
35
- * await client.customerProfile.clearAttribute('FULL_NAME', {
36
- * customerProfileId:
37
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
38
- * });
34
+ * const response = await client.customer.clearAttribute('x', {
35
+ * customerProfileId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
36
+ * });
39
37
  * ```
40
38
  */
41
- clearAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileClearAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileClearAttributeResponse>;
39
+ clearAttribute(key: string, params: CustomerClearAttributeParams, options?: RequestOptions): APIPromise<CustomerClearAttributeResponse>;
42
40
  /**
43
- * Get a customer profile
41
+ * Adds a field of your project's own. With extract on, conversations fill it from
42
+ * what customers say, guided by its description.
44
43
  *
45
44
  * @example
46
45
  * ```ts
47
- * const response = await client.customerProfile.getByID(
46
+ * const response = await client.customer.createField({
47
+ * extract: true,
48
+ * key: 'plan_tier',
49
+ * label: 'x',
50
+ * valueType: 'TEXT',
51
+ * });
52
+ * ```
53
+ */
54
+ createField(body: CustomerCreateFieldParams, options?: RequestOptions): APIPromise<CustomerCreateFieldResponse>;
55
+ /**
56
+ * Deletes a field of your project's own. Its values stop showing on customers. A
57
+ * built-in field cannot be deleted; turn it off instead.
58
+ *
59
+ * @example
60
+ * ```ts
61
+ * const response = await client.customer.deleteField('x');
62
+ * ```
63
+ */
64
+ deleteField(key: string, options?: RequestOptions): APIPromise<CustomerDeleteFieldResponse>;
65
+ /**
66
+ * Get a customer
67
+ *
68
+ * @example
69
+ * ```ts
70
+ * const response = await client.customer.getByID(
48
71
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
49
72
  * );
50
73
  * ```
51
74
  */
52
- getByID(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerProfileGetByIDResponse>;
75
+ getByID(customerProfileID: string, options?: RequestOptions): APIPromise<CustomerGetByIDResponse>;
53
76
  /**
54
77
  * Calls and chats with this customer, newest first.
55
78
  *
56
79
  * @example
57
80
  * ```ts
58
- * const response =
59
- * await client.customerProfile.listConversations(
60
- * 'customerProfileId',
61
- * );
81
+ * const response = await client.customer.listConversations(
82
+ * 'customerProfileId',
83
+ * );
84
+ * ```
85
+ */
86
+ listConversations(customerProfileID: string, query?: CustomerListConversationsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerListConversationsResponse>;
87
+ /**
88
+ * The fields this project's customers can hold, in display order. Use a field's
89
+ * key to filter, sort and set attributes.
90
+ *
91
+ * @example
92
+ * ```ts
93
+ * const response = await client.customer.listFields();
62
94
  * ```
63
95
  */
64
- listConversations(customerProfileID: string, query?: CustomerProfileListConversationsParams | null | undefined, options?: RequestOptions): APIPromise<CustomerProfileListConversationsResponse>;
96
+ listFields(options?: RequestOptions): APIPromise<CustomerListFieldsResponse>;
65
97
  /**
66
98
  * Sets the value and locks the field, so newer conversations cannot change it.
67
99
  *
68
100
  * @example
69
101
  * ```ts
70
- * const response = await client.customerProfile.setAttribute(
71
- * 'FULL_NAME',
102
+ * const response = await client.customer.setAttribute('x', {
103
+ * customerProfileId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
104
+ * value: 'x',
105
+ * });
106
+ * ```
107
+ */
108
+ setAttribute(key: string, params: CustomerSetAttributeParams, options?: RequestOptions): APIPromise<CustomerSetAttributeResponse>;
109
+ /**
110
+ * Lets newer conversations change this field again. The current value stays until
111
+ * one does.
112
+ *
113
+ * @example
114
+ * ```ts
115
+ * const response = await client.customer.unlockAttribute(
116
+ * 'x',
72
117
  * {
73
118
  * customerProfileId:
74
119
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
75
- * value: 'x',
76
120
  * },
77
121
  * );
78
122
  * ```
79
123
  */
80
- setAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileSetAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileSetAttributeResponse>;
124
+ unlockAttribute(key: string, params: CustomerUnlockAttributeParams, options?: RequestOptions): APIPromise<CustomerUnlockAttributeResponse>;
81
125
  /**
82
- * Lets newer conversations change this field again. The current value stays until
83
- * one does.
126
+ * Changes a field. A built-in field can only be turned on or off for your project;
127
+ * any field of your project's own can change everything but its key.
84
128
  *
85
129
  * @example
86
130
  * ```ts
87
- * const response =
88
- * await client.customerProfile.unlockAttribute(
89
- * 'FULL_NAME',
90
- * {
91
- * customerProfileId:
92
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
93
- * },
94
- * );
131
+ * const response = await client.customer.updateField('x');
95
132
  * ```
96
133
  */
97
- unlockAttribute(key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL', params: CustomerProfileUnlockAttributeParams, options?: RequestOptions): APIPromise<CustomerProfileUnlockAttributeResponse>;
134
+ updateField(key: string, body?: CustomerUpdateFieldParams | null | undefined, options?: RequestOptions): APIPromise<CustomerUpdateFieldResponse>;
98
135
  /**
99
136
  * Replaces your team's shared notes. Null or empty clears them. The last save
100
137
  * wins.
101
138
  *
102
139
  * @example
103
140
  * ```ts
104
- * const response = await client.customerProfile.updateNotes(
141
+ * const response = await client.customer.updateNotes(
105
142
  * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
106
143
  * { notes: 'notes' },
107
144
  * );
108
145
  * ```
109
146
  */
110
- updateNotes(customerProfileID: string, body: CustomerProfileUpdateNotesParams, options?: RequestOptions): APIPromise<CustomerProfileUpdateNotesResponse>;
147
+ updateNotes(customerProfileID: string, body: CustomerUpdateNotesParams, options?: RequestOptions): APIPromise<CustomerUpdateNotesResponse>;
111
148
  }
112
- export interface CustomerProfileListResponse {
113
- data: CustomerProfileListResponse.Data;
149
+ export interface CustomerListResponse {
150
+ data: CustomerListResponse.Data;
114
151
  }
115
- export declare namespace CustomerProfileListResponse {
152
+ export declare namespace CustomerListResponse {
116
153
  interface Data {
117
154
  items: Array<Data.Item>;
118
155
  page: number;
@@ -121,7 +158,7 @@ export declare namespace CustomerProfileListResponse {
121
158
  namespace Data {
122
159
  interface Item {
123
160
  /**
124
- * Unique identifier of the customer profile
161
+ * Unique identifier of the customer
125
162
  */
126
163
  id: string;
127
164
  agentIds: Array<string>;
@@ -140,7 +177,6 @@ export declare namespace CustomerProfileListResponse {
140
177
  */
141
178
  notes: string | null;
142
179
  notesUpdatedAt: string | null;
143
- openItems: string | null;
144
180
  phoneNumberE164: string | null;
145
181
  summary: string | null;
146
182
  /**
@@ -164,11 +200,16 @@ export declare namespace CustomerProfileListResponse {
164
200
  * Other values this field has held or been offered, newest first
165
201
  */
166
202
  history: Array<Attribute.History>;
203
+ /**
204
+ * True when the value was inferred from the conversation, such as a gender read
205
+ * from a name, rather than stated. A stated value always replaces it.
206
+ */
207
+ isInferred: boolean;
167
208
  /**
168
209
  * True when newer conversations cannot change this field
169
210
  */
170
211
  isLocked: boolean;
171
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
212
+ key: string;
172
213
  observedAt: string;
173
214
  /**
174
215
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -216,21 +257,21 @@ export declare namespace CustomerProfileListResponse {
216
257
  }
217
258
  }
218
259
  }
219
- export interface CustomerProfileDeleteResponse {
220
- data: CustomerProfileDeleteResponse.Data;
260
+ export interface CustomerDeleteResponse {
261
+ data: CustomerDeleteResponse.Data;
221
262
  }
222
- export declare namespace CustomerProfileDeleteResponse {
263
+ export declare namespace CustomerDeleteResponse {
223
264
  interface Data {
224
265
  success: boolean;
225
266
  }
226
267
  }
227
- export interface CustomerProfileClearAttributeResponse {
228
- data: CustomerProfileClearAttributeResponse.Data;
268
+ export interface CustomerClearAttributeResponse {
269
+ data: CustomerClearAttributeResponse.Data;
229
270
  }
230
- export declare namespace CustomerProfileClearAttributeResponse {
271
+ export declare namespace CustomerClearAttributeResponse {
231
272
  interface Data {
232
273
  /**
233
- * Unique identifier of the customer profile
274
+ * Unique identifier of the customer
234
275
  */
235
276
  id: string;
236
277
  agentIds: Array<string>;
@@ -249,7 +290,6 @@ export declare namespace CustomerProfileClearAttributeResponse {
249
290
  */
250
291
  notes: string | null;
251
292
  notesUpdatedAt: string | null;
252
- openItems: string | null;
253
293
  phoneNumberE164: string | null;
254
294
  summary: string | null;
255
295
  /**
@@ -273,11 +313,16 @@ export declare namespace CustomerProfileClearAttributeResponse {
273
313
  * Other values this field has held or been offered, newest first
274
314
  */
275
315
  history: Array<Attribute.History>;
316
+ /**
317
+ * True when the value was inferred from the conversation, such as a gender read
318
+ * from a name, rather than stated. A stated value always replaces it.
319
+ */
320
+ isInferred: boolean;
276
321
  /**
277
322
  * True when newer conversations cannot change this field
278
323
  */
279
324
  isLocked: boolean;
280
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
325
+ key: string;
281
326
  observedAt: string;
282
327
  /**
283
328
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -324,13 +369,52 @@ export declare namespace CustomerProfileClearAttributeResponse {
324
369
  }
325
370
  }
326
371
  }
327
- export interface CustomerProfileGetByIDResponse {
328
- data: CustomerProfileGetByIDResponse.Data;
372
+ export interface CustomerCreateFieldResponse {
373
+ data: CustomerCreateFieldResponse.Data;
374
+ }
375
+ export declare namespace CustomerCreateFieldResponse {
376
+ interface Data {
377
+ /**
378
+ * What extraction looks for in a conversation
379
+ */
380
+ description: string | null;
381
+ /**
382
+ * Whether conversations fill this field on this project: the project's own setting
383
+ * where it made one
384
+ */
385
+ extract: boolean;
386
+ /**
387
+ * What filters, sorts and attribute routes name the field by
388
+ */
389
+ key: string;
390
+ label: string;
391
+ /**
392
+ * The project redaction setting that, when on, keeps conversations from filling
393
+ * this field
394
+ */
395
+ redactedBy: 'redactName' | 'redactEmail' | 'redactPhone' | 'redactDateOfBirth' | 'redactAddress' | 'redactBankAccountNumber' | null;
396
+ /**
397
+ * SYSTEM for a built-in field, CUSTOM for one your project defined
398
+ */
399
+ source: 'SYSTEM' | 'CUSTOM';
400
+ valueType: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'PHONE_NUMBER' | 'EMAIL' | 'CURRENCY';
401
+ }
402
+ }
403
+ export interface CustomerDeleteFieldResponse {
404
+ data: CustomerDeleteFieldResponse.Data;
405
+ }
406
+ export declare namespace CustomerDeleteFieldResponse {
407
+ interface Data {
408
+ success: boolean;
409
+ }
410
+ }
411
+ export interface CustomerGetByIDResponse {
412
+ data: CustomerGetByIDResponse.Data;
329
413
  }
330
- export declare namespace CustomerProfileGetByIDResponse {
414
+ export declare namespace CustomerGetByIDResponse {
331
415
  interface Data {
332
416
  /**
333
- * Unique identifier of the customer profile
417
+ * Unique identifier of the customer
334
418
  */
335
419
  id: string;
336
420
  agentIds: Array<string>;
@@ -349,7 +433,6 @@ export declare namespace CustomerProfileGetByIDResponse {
349
433
  */
350
434
  notes: string | null;
351
435
  notesUpdatedAt: string | null;
352
- openItems: string | null;
353
436
  phoneNumberE164: string | null;
354
437
  summary: string | null;
355
438
  /**
@@ -373,11 +456,16 @@ export declare namespace CustomerProfileGetByIDResponse {
373
456
  * Other values this field has held or been offered, newest first
374
457
  */
375
458
  history: Array<Attribute.History>;
459
+ /**
460
+ * True when the value was inferred from the conversation, such as a gender read
461
+ * from a name, rather than stated. A stated value always replaces it.
462
+ */
463
+ isInferred: boolean;
376
464
  /**
377
465
  * True when newer conversations cannot change this field
378
466
  */
379
467
  isLocked: boolean;
380
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
468
+ key: string;
381
469
  observedAt: string;
382
470
  /**
383
471
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -424,10 +512,10 @@ export declare namespace CustomerProfileGetByIDResponse {
424
512
  }
425
513
  }
426
514
  }
427
- export interface CustomerProfileListConversationsResponse {
428
- data: CustomerProfileListConversationsResponse.Data;
515
+ export interface CustomerListConversationsResponse {
516
+ data: CustomerListConversationsResponse.Data;
429
517
  }
430
- export declare namespace CustomerProfileListConversationsResponse {
518
+ export declare namespace CustomerListConversationsResponse {
431
519
  interface Data {
432
520
  items: Array<Data.Item>;
433
521
  page: number;
@@ -436,7 +524,10 @@ export declare namespace CustomerProfileListConversationsResponse {
436
524
  namespace Data {
437
525
  interface Item {
438
526
  id: string;
439
- conversationType: 'call' | 'chat';
527
+ /**
528
+ * `voice` or `chat`.
529
+ */
530
+ conversationType: 'voice' | 'chat';
440
531
  durationMs: number | null;
441
532
  startedAt: string;
442
533
  summary: string | null;
@@ -444,13 +535,44 @@ export declare namespace CustomerProfileListConversationsResponse {
444
535
  }
445
536
  }
446
537
  }
447
- export interface CustomerProfileSetAttributeResponse {
448
- data: CustomerProfileSetAttributeResponse.Data;
538
+ export interface CustomerListFieldsResponse {
539
+ data: Array<CustomerListFieldsResponse.Data>;
449
540
  }
450
- export declare namespace CustomerProfileSetAttributeResponse {
541
+ export declare namespace CustomerListFieldsResponse {
451
542
  interface Data {
452
543
  /**
453
- * Unique identifier of the customer profile
544
+ * What extraction looks for in a conversation
545
+ */
546
+ description: string | null;
547
+ /**
548
+ * Whether conversations fill this field on this project: the project's own setting
549
+ * where it made one
550
+ */
551
+ extract: boolean;
552
+ /**
553
+ * What filters, sorts and attribute routes name the field by
554
+ */
555
+ key: string;
556
+ label: string;
557
+ /**
558
+ * The project redaction setting that, when on, keeps conversations from filling
559
+ * this field
560
+ */
561
+ redactedBy: 'redactName' | 'redactEmail' | 'redactPhone' | 'redactDateOfBirth' | 'redactAddress' | 'redactBankAccountNumber' | null;
562
+ /**
563
+ * SYSTEM for a built-in field, CUSTOM for one your project defined
564
+ */
565
+ source: 'SYSTEM' | 'CUSTOM';
566
+ valueType: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'PHONE_NUMBER' | 'EMAIL' | 'CURRENCY';
567
+ }
568
+ }
569
+ export interface CustomerSetAttributeResponse {
570
+ data: CustomerSetAttributeResponse.Data;
571
+ }
572
+ export declare namespace CustomerSetAttributeResponse {
573
+ interface Data {
574
+ /**
575
+ * Unique identifier of the customer
454
576
  */
455
577
  id: string;
456
578
  agentIds: Array<string>;
@@ -469,7 +591,6 @@ export declare namespace CustomerProfileSetAttributeResponse {
469
591
  */
470
592
  notes: string | null;
471
593
  notesUpdatedAt: string | null;
472
- openItems: string | null;
473
594
  phoneNumberE164: string | null;
474
595
  summary: string | null;
475
596
  /**
@@ -493,11 +614,16 @@ export declare namespace CustomerProfileSetAttributeResponse {
493
614
  * Other values this field has held or been offered, newest first
494
615
  */
495
616
  history: Array<Attribute.History>;
617
+ /**
618
+ * True when the value was inferred from the conversation, such as a gender read
619
+ * from a name, rather than stated. A stated value always replaces it.
620
+ */
621
+ isInferred: boolean;
496
622
  /**
497
623
  * True when newer conversations cannot change this field
498
624
  */
499
625
  isLocked: boolean;
500
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
626
+ key: string;
501
627
  observedAt: string;
502
628
  /**
503
629
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -544,13 +670,13 @@ export declare namespace CustomerProfileSetAttributeResponse {
544
670
  }
545
671
  }
546
672
  }
547
- export interface CustomerProfileUnlockAttributeResponse {
548
- data: CustomerProfileUnlockAttributeResponse.Data;
673
+ export interface CustomerUnlockAttributeResponse {
674
+ data: CustomerUnlockAttributeResponse.Data;
549
675
  }
550
- export declare namespace CustomerProfileUnlockAttributeResponse {
676
+ export declare namespace CustomerUnlockAttributeResponse {
551
677
  interface Data {
552
678
  /**
553
- * Unique identifier of the customer profile
679
+ * Unique identifier of the customer
554
680
  */
555
681
  id: string;
556
682
  agentIds: Array<string>;
@@ -569,7 +695,6 @@ export declare namespace CustomerProfileUnlockAttributeResponse {
569
695
  */
570
696
  notes: string | null;
571
697
  notesUpdatedAt: string | null;
572
- openItems: string | null;
573
698
  phoneNumberE164: string | null;
574
699
  summary: string | null;
575
700
  /**
@@ -593,11 +718,16 @@ export declare namespace CustomerProfileUnlockAttributeResponse {
593
718
  * Other values this field has held or been offered, newest first
594
719
  */
595
720
  history: Array<Attribute.History>;
721
+ /**
722
+ * True when the value was inferred from the conversation, such as a gender read
723
+ * from a name, rather than stated. A stated value always replaces it.
724
+ */
725
+ isInferred: boolean;
596
726
  /**
597
727
  * True when newer conversations cannot change this field
598
728
  */
599
729
  isLocked: boolean;
600
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
730
+ key: string;
601
731
  observedAt: string;
602
732
  /**
603
733
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -644,13 +774,44 @@ export declare namespace CustomerProfileUnlockAttributeResponse {
644
774
  }
645
775
  }
646
776
  }
647
- export interface CustomerProfileUpdateNotesResponse {
648
- data: CustomerProfileUpdateNotesResponse.Data;
777
+ export interface CustomerUpdateFieldResponse {
778
+ data: CustomerUpdateFieldResponse.Data;
649
779
  }
650
- export declare namespace CustomerProfileUpdateNotesResponse {
780
+ export declare namespace CustomerUpdateFieldResponse {
651
781
  interface Data {
652
782
  /**
653
- * Unique identifier of the customer profile
783
+ * What extraction looks for in a conversation
784
+ */
785
+ description: string | null;
786
+ /**
787
+ * Whether conversations fill this field on this project: the project's own setting
788
+ * where it made one
789
+ */
790
+ extract: boolean;
791
+ /**
792
+ * What filters, sorts and attribute routes name the field by
793
+ */
794
+ key: string;
795
+ label: string;
796
+ /**
797
+ * The project redaction setting that, when on, keeps conversations from filling
798
+ * this field
799
+ */
800
+ redactedBy: 'redactName' | 'redactEmail' | 'redactPhone' | 'redactDateOfBirth' | 'redactAddress' | 'redactBankAccountNumber' | null;
801
+ /**
802
+ * SYSTEM for a built-in field, CUSTOM for one your project defined
803
+ */
804
+ source: 'SYSTEM' | 'CUSTOM';
805
+ valueType: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'PHONE_NUMBER' | 'EMAIL' | 'CURRENCY';
806
+ }
807
+ }
808
+ export interface CustomerUpdateNotesResponse {
809
+ data: CustomerUpdateNotesResponse.Data;
810
+ }
811
+ export declare namespace CustomerUpdateNotesResponse {
812
+ interface Data {
813
+ /**
814
+ * Unique identifier of the customer
654
815
  */
655
816
  id: string;
656
817
  agentIds: Array<string>;
@@ -669,7 +830,6 @@ export declare namespace CustomerProfileUpdateNotesResponse {
669
830
  */
670
831
  notes: string | null;
671
832
  notesUpdatedAt: string | null;
672
- openItems: string | null;
673
833
  phoneNumberE164: string | null;
674
834
  summary: string | null;
675
835
  /**
@@ -693,11 +853,16 @@ export declare namespace CustomerProfileUpdateNotesResponse {
693
853
  * Other values this field has held or been offered, newest first
694
854
  */
695
855
  history: Array<Attribute.History>;
856
+ /**
857
+ * True when the value was inferred from the conversation, such as a gender read
858
+ * from a name, rather than stated. A stated value always replaces it.
859
+ */
860
+ isInferred: boolean;
696
861
  /**
697
862
  * True when newer conversations cannot change this field
698
863
  */
699
864
  isLocked: boolean;
700
- key: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
865
+ key: string;
701
866
  observedAt: string;
702
867
  /**
703
868
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -744,13 +909,13 @@ export declare namespace CustomerProfileUpdateNotesResponse {
744
909
  }
745
910
  }
746
911
  }
747
- export interface CustomerProfileListParams {
912
+ export interface CustomerListParams {
748
913
  agentId?: string;
749
914
  /**
750
- * Filter by this field. Use with fieldOperator and, unless checking presence,
751
- * fieldValue.
915
+ * Filter by this field, a key from GET /v1/customer/fields. Use with fieldOperator
916
+ * and, unless checking presence, fieldValue.
752
917
  */
753
- fieldKey?: 'FULL_NAME' | 'PREFERRED_NAME' | 'ACCOUNT_ID' | 'COMPANY' | 'JOB_TITLE' | 'EMAIL' | 'ALTERNATE_PHONE' | 'AGE' | 'GENDER' | 'LANGUAGE' | 'LOCATION' | 'TIMEZONE' | 'BEST_TIME_TO_REACH' | 'PREFERRED_CHANNEL';
918
+ fieldKey?: string;
754
919
  /**
755
920
  * How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without
756
921
  * the field.
@@ -763,24 +928,42 @@ export interface CustomerProfileListParams {
763
928
  */
764
929
  includeNoData?: 'true' | 'false';
765
930
  limit?: number;
766
- modality?: 'call' | 'chat';
931
+ modality?: 'voice' | 'chat' | 'call';
767
932
  page?: number;
768
933
  search?: string;
769
934
  /**
770
- * A column, or field.<KEY> (for example field.COMPANY) to sort by a field's value.
771
- * Customers without a value sort last.
935
+ * lastSeenAt (the default), firstSeenAt, conversationCount, voiceCount, chatCount,
936
+ * talkTimeMs or displayName, or field.<key> (for example field.COMPANY) to sort by
937
+ * a field's value. Field keys come from GET /v1/customer/fields. Customers without
938
+ * a value sort last.
772
939
  */
773
- sortBy?: 'lastSeenAt' | 'firstSeenAt' | 'conversationCount' | 'voiceCount' | 'chatCount' | 'talkTimeMs' | 'displayName' | 'field.FULL_NAME' | 'field.PREFERRED_NAME' | 'field.ACCOUNT_ID' | 'field.COMPANY' | 'field.JOB_TITLE' | 'field.EMAIL' | 'field.ALTERNATE_PHONE' | 'field.AGE' | 'field.GENDER' | 'field.LANGUAGE' | 'field.LOCATION' | 'field.TIMEZONE' | 'field.BEST_TIME_TO_REACH' | 'field.PREFERRED_CHANNEL';
940
+ sortBy?: string;
774
941
  sortDirection?: 'asc' | 'desc';
775
942
  }
776
- export interface CustomerProfileClearAttributeParams {
943
+ export interface CustomerClearAttributeParams {
777
944
  customerProfileId: string;
778
945
  }
779
- export interface CustomerProfileListConversationsParams {
946
+ export interface CustomerCreateFieldParams {
947
+ /**
948
+ * Whether conversations fill this field
949
+ */
950
+ extract: boolean;
951
+ /**
952
+ * Starts with a letter; letters, numbers and underscores only. Fixed once created.
953
+ */
954
+ key: string;
955
+ label: string;
956
+ valueType: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'PHONE_NUMBER' | 'EMAIL' | 'CURRENCY';
957
+ /**
958
+ * What the agent listens for in a conversation. Required when extract is true.
959
+ */
960
+ description?: string | null;
961
+ }
962
+ export interface CustomerListConversationsParams {
780
963
  limit?: number;
781
964
  page?: number;
782
965
  }
783
- export interface CustomerProfileSetAttributeParams {
966
+ export interface CustomerSetAttributeParams {
784
967
  /**
785
968
  * Path param
786
969
  */
@@ -791,16 +974,22 @@ export interface CustomerProfileSetAttributeParams {
791
974
  */
792
975
  value: string;
793
976
  }
794
- export interface CustomerProfileUnlockAttributeParams {
977
+ export interface CustomerUnlockAttributeParams {
795
978
  customerProfileId: string;
796
979
  }
797
- export interface CustomerProfileUpdateNotesParams {
980
+ export interface CustomerUpdateFieldParams {
981
+ description?: string | null;
982
+ extract?: boolean;
983
+ label?: string;
984
+ valueType?: 'TEXT' | 'NUMBER' | 'BOOLEAN' | 'DATE' | 'PHONE_NUMBER' | 'EMAIL' | 'CURRENCY';
985
+ }
986
+ export interface CustomerUpdateNotesParams {
798
987
  /**
799
988
  * Replaces the existing notes. Null or empty clears them.
800
989
  */
801
990
  notes: string | null;
802
991
  }
803
- export declare namespace CustomerProfile {
804
- export { type CustomerProfileListResponse as CustomerProfileListResponse, type CustomerProfileDeleteResponse as CustomerProfileDeleteResponse, type CustomerProfileClearAttributeResponse as CustomerProfileClearAttributeResponse, type CustomerProfileGetByIDResponse as CustomerProfileGetByIDResponse, type CustomerProfileListConversationsResponse as CustomerProfileListConversationsResponse, type CustomerProfileSetAttributeResponse as CustomerProfileSetAttributeResponse, type CustomerProfileUnlockAttributeResponse as CustomerProfileUnlockAttributeResponse, type CustomerProfileUpdateNotesResponse as CustomerProfileUpdateNotesResponse, type CustomerProfileListParams as CustomerProfileListParams, type CustomerProfileClearAttributeParams as CustomerProfileClearAttributeParams, type CustomerProfileListConversationsParams as CustomerProfileListConversationsParams, type CustomerProfileSetAttributeParams as CustomerProfileSetAttributeParams, type CustomerProfileUnlockAttributeParams as CustomerProfileUnlockAttributeParams, type CustomerProfileUpdateNotesParams as CustomerProfileUpdateNotesParams, };
992
+ export declare namespace Customer {
993
+ export { type CustomerListResponse as CustomerListResponse, type CustomerDeleteResponse as CustomerDeleteResponse, type CustomerClearAttributeResponse as CustomerClearAttributeResponse, type CustomerCreateFieldResponse as CustomerCreateFieldResponse, type CustomerDeleteFieldResponse as CustomerDeleteFieldResponse, type CustomerGetByIDResponse as CustomerGetByIDResponse, type CustomerListConversationsResponse as CustomerListConversationsResponse, type CustomerListFieldsResponse as CustomerListFieldsResponse, type CustomerSetAttributeResponse as CustomerSetAttributeResponse, type CustomerUnlockAttributeResponse as CustomerUnlockAttributeResponse, type CustomerUpdateFieldResponse as CustomerUpdateFieldResponse, type CustomerUpdateNotesResponse as CustomerUpdateNotesResponse, type CustomerListParams as CustomerListParams, type CustomerClearAttributeParams as CustomerClearAttributeParams, type CustomerCreateFieldParams as CustomerCreateFieldParams, type CustomerListConversationsParams as CustomerListConversationsParams, type CustomerSetAttributeParams as CustomerSetAttributeParams, type CustomerUnlockAttributeParams as CustomerUnlockAttributeParams, type CustomerUpdateFieldParams as CustomerUpdateFieldParams, type CustomerUpdateNotesParams as CustomerUpdateNotesParams, };
805
994
  }
806
- //# sourceMappingURL=customer-profile.d.ts.map
995
+ //# sourceMappingURL=customer.d.ts.map