@roarkanalytics/sdk 7.9.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 +16 -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 -92
  84. package/resources/customer.d.mts.map +1 -0
  85. package/resources/{customer-profile.d.ts → customer.d.ts} +287 -92
  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 -294
  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.mjs";
2
2
  import { APIPromise } from "../core/api-promise.mjs";
3
3
  import { RequestOptions } from "../internal/request-options.mjs";
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>;
@@ -163,11 +200,16 @@ export declare namespace CustomerProfileListResponse {
163
200
  * Other values this field has held or been offered, newest first
164
201
  */
165
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;
166
208
  /**
167
209
  * True when newer conversations cannot change this field
168
210
  */
169
211
  isLocked: boolean;
170
- 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;
171
213
  observedAt: string;
172
214
  /**
173
215
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -215,21 +257,21 @@ export declare namespace CustomerProfileListResponse {
215
257
  }
216
258
  }
217
259
  }
218
- export interface CustomerProfileDeleteResponse {
219
- data: CustomerProfileDeleteResponse.Data;
260
+ export interface CustomerDeleteResponse {
261
+ data: CustomerDeleteResponse.Data;
220
262
  }
221
- export declare namespace CustomerProfileDeleteResponse {
263
+ export declare namespace CustomerDeleteResponse {
222
264
  interface Data {
223
265
  success: boolean;
224
266
  }
225
267
  }
226
- export interface CustomerProfileClearAttributeResponse {
227
- data: CustomerProfileClearAttributeResponse.Data;
268
+ export interface CustomerClearAttributeResponse {
269
+ data: CustomerClearAttributeResponse.Data;
228
270
  }
229
- export declare namespace CustomerProfileClearAttributeResponse {
271
+ export declare namespace CustomerClearAttributeResponse {
230
272
  interface Data {
231
273
  /**
232
- * Unique identifier of the customer profile
274
+ * Unique identifier of the customer
233
275
  */
234
276
  id: string;
235
277
  agentIds: Array<string>;
@@ -271,11 +313,16 @@ export declare namespace CustomerProfileClearAttributeResponse {
271
313
  * Other values this field has held or been offered, newest first
272
314
  */
273
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;
274
321
  /**
275
322
  * True when newer conversations cannot change this field
276
323
  */
277
324
  isLocked: boolean;
278
- 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;
279
326
  observedAt: string;
280
327
  /**
281
328
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -322,13 +369,52 @@ export declare namespace CustomerProfileClearAttributeResponse {
322
369
  }
323
370
  }
324
371
  }
325
- export interface CustomerProfileGetByIDResponse {
326
- 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;
327
413
  }
328
- export declare namespace CustomerProfileGetByIDResponse {
414
+ export declare namespace CustomerGetByIDResponse {
329
415
  interface Data {
330
416
  /**
331
- * Unique identifier of the customer profile
417
+ * Unique identifier of the customer
332
418
  */
333
419
  id: string;
334
420
  agentIds: Array<string>;
@@ -370,11 +456,16 @@ export declare namespace CustomerProfileGetByIDResponse {
370
456
  * Other values this field has held or been offered, newest first
371
457
  */
372
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;
373
464
  /**
374
465
  * True when newer conversations cannot change this field
375
466
  */
376
467
  isLocked: boolean;
377
- 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;
378
469
  observedAt: string;
379
470
  /**
380
471
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -421,10 +512,10 @@ export declare namespace CustomerProfileGetByIDResponse {
421
512
  }
422
513
  }
423
514
  }
424
- export interface CustomerProfileListConversationsResponse {
425
- data: CustomerProfileListConversationsResponse.Data;
515
+ export interface CustomerListConversationsResponse {
516
+ data: CustomerListConversationsResponse.Data;
426
517
  }
427
- export declare namespace CustomerProfileListConversationsResponse {
518
+ export declare namespace CustomerListConversationsResponse {
428
519
  interface Data {
429
520
  items: Array<Data.Item>;
430
521
  page: number;
@@ -433,7 +524,10 @@ export declare namespace CustomerProfileListConversationsResponse {
433
524
  namespace Data {
434
525
  interface Item {
435
526
  id: string;
436
- conversationType: 'call' | 'chat';
527
+ /**
528
+ * `voice` or `chat`.
529
+ */
530
+ conversationType: 'voice' | 'chat';
437
531
  durationMs: number | null;
438
532
  startedAt: string;
439
533
  summary: string | null;
@@ -441,13 +535,44 @@ export declare namespace CustomerProfileListConversationsResponse {
441
535
  }
442
536
  }
443
537
  }
444
- export interface CustomerProfileSetAttributeResponse {
445
- data: CustomerProfileSetAttributeResponse.Data;
538
+ export interface CustomerListFieldsResponse {
539
+ data: Array<CustomerListFieldsResponse.Data>;
446
540
  }
447
- export declare namespace CustomerProfileSetAttributeResponse {
541
+ export declare namespace CustomerListFieldsResponse {
448
542
  interface Data {
449
543
  /**
450
- * 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
451
576
  */
452
577
  id: string;
453
578
  agentIds: Array<string>;
@@ -489,11 +614,16 @@ export declare namespace CustomerProfileSetAttributeResponse {
489
614
  * Other values this field has held or been offered, newest first
490
615
  */
491
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;
492
622
  /**
493
623
  * True when newer conversations cannot change this field
494
624
  */
495
625
  isLocked: boolean;
496
- 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;
497
627
  observedAt: string;
498
628
  /**
499
629
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -540,13 +670,13 @@ export declare namespace CustomerProfileSetAttributeResponse {
540
670
  }
541
671
  }
542
672
  }
543
- export interface CustomerProfileUnlockAttributeResponse {
544
- data: CustomerProfileUnlockAttributeResponse.Data;
673
+ export interface CustomerUnlockAttributeResponse {
674
+ data: CustomerUnlockAttributeResponse.Data;
545
675
  }
546
- export declare namespace CustomerProfileUnlockAttributeResponse {
676
+ export declare namespace CustomerUnlockAttributeResponse {
547
677
  interface Data {
548
678
  /**
549
- * Unique identifier of the customer profile
679
+ * Unique identifier of the customer
550
680
  */
551
681
  id: string;
552
682
  agentIds: Array<string>;
@@ -588,11 +718,16 @@ export declare namespace CustomerProfileUnlockAttributeResponse {
588
718
  * Other values this field has held or been offered, newest first
589
719
  */
590
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;
591
726
  /**
592
727
  * True when newer conversations cannot change this field
593
728
  */
594
729
  isLocked: boolean;
595
- 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;
596
731
  observedAt: string;
597
732
  /**
598
733
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -639,13 +774,44 @@ export declare namespace CustomerProfileUnlockAttributeResponse {
639
774
  }
640
775
  }
641
776
  }
642
- export interface CustomerProfileUpdateNotesResponse {
643
- data: CustomerProfileUpdateNotesResponse.Data;
777
+ export interface CustomerUpdateFieldResponse {
778
+ data: CustomerUpdateFieldResponse.Data;
644
779
  }
645
- export declare namespace CustomerProfileUpdateNotesResponse {
780
+ export declare namespace CustomerUpdateFieldResponse {
646
781
  interface Data {
647
782
  /**
648
- * 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
649
815
  */
650
816
  id: string;
651
817
  agentIds: Array<string>;
@@ -687,11 +853,16 @@ export declare namespace CustomerProfileUpdateNotesResponse {
687
853
  * Other values this field has held or been offered, newest first
688
854
  */
689
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;
690
861
  /**
691
862
  * True when newer conversations cannot change this field
692
863
  */
693
864
  isLocked: boolean;
694
- 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;
695
866
  observedAt: string;
696
867
  /**
697
868
  * Where the current value came from. LIVE and POST_CALL extraction are read from
@@ -738,13 +909,13 @@ export declare namespace CustomerProfileUpdateNotesResponse {
738
909
  }
739
910
  }
740
911
  }
741
- export interface CustomerProfileListParams {
912
+ export interface CustomerListParams {
742
913
  agentId?: string;
743
914
  /**
744
- * Filter by this field. Use with fieldOperator and, unless checking presence,
745
- * fieldValue.
915
+ * Filter by this field, a key from GET /v1/customer/fields. Use with fieldOperator
916
+ * and, unless checking presence, fieldValue.
746
917
  */
747
- 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;
748
919
  /**
749
920
  * How fieldValue is compared, ignoring case. NOT_EQUALS includes customers without
750
921
  * the field.
@@ -757,24 +928,42 @@ export interface CustomerProfileListParams {
757
928
  */
758
929
  includeNoData?: 'true' | 'false';
759
930
  limit?: number;
760
- modality?: 'call' | 'chat';
931
+ modality?: 'voice' | 'chat' | 'call';
761
932
  page?: number;
762
933
  search?: string;
763
934
  /**
764
- * A column, or field.<KEY> (for example field.COMPANY) to sort by a field's value.
765
- * 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.
766
939
  */
767
- 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;
768
941
  sortDirection?: 'asc' | 'desc';
769
942
  }
770
- export interface CustomerProfileClearAttributeParams {
943
+ export interface CustomerClearAttributeParams {
771
944
  customerProfileId: string;
772
945
  }
773
- 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 {
774
963
  limit?: number;
775
964
  page?: number;
776
965
  }
777
- export interface CustomerProfileSetAttributeParams {
966
+ export interface CustomerSetAttributeParams {
778
967
  /**
779
968
  * Path param
780
969
  */
@@ -785,16 +974,22 @@ export interface CustomerProfileSetAttributeParams {
785
974
  */
786
975
  value: string;
787
976
  }
788
- export interface CustomerProfileUnlockAttributeParams {
977
+ export interface CustomerUnlockAttributeParams {
789
978
  customerProfileId: string;
790
979
  }
791
- 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 {
792
987
  /**
793
988
  * Replaces the existing notes. Null or empty clears them.
794
989
  */
795
990
  notes: string | null;
796
991
  }
797
- export declare namespace CustomerProfile {
798
- 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, };
799
994
  }
800
- //# sourceMappingURL=customer-profile.d.mts.map
995
+ //# sourceMappingURL=customer.d.mts.map