@aiqa/sdk 2.0.1 → 2.1.0-develop.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -140,14 +140,33 @@ change.
140
140
  **Parameters:**
141
141
 
142
142
  - `input: UpdateConversationInput` - partial set of conversation fields to update
143
- - `policyNumber?: string` - non-empty; surrounding whitespace is trimmed
143
+
144
+ | field | type | max | notes |
145
+ | --------------------------- | ---------- | -------- | ------------------------------------------- |
146
+ | `policyNumber` | `string` | 128 | |
147
+ | `insuredPhone` | `string` | 32 | the insured, who may differ from the caller |
148
+ | `clientName` | `string` | 128 | |
149
+ | `clientPhone` | `string` | 32 | |
150
+ | `clientEmail` | `string` | 254 | must be a valid email address |
151
+ | `clientId` | `string` | 64 | your own CRM identifier |
152
+ | `agentId` / `agentName` | `string` | 64/128 | |
153
+ | `advisorId` / `advisorName` | `string` | 64/128 | |
154
+ | `agentGroups` | `string[]` | 32 × 128 | entries cannot contain a comma |
155
+
156
+ Every string (including each `agentGroups` entry) must be non-empty;
157
+ surrounding whitespace is trimmed. `null` is rejected — omit the field
158
+ instead. At least one field is required.
144
159
 
145
160
  **Returns:**
146
161
 
147
- - `Promise<{ success: boolean; conversation: { policy_number?: string } }>`
162
+ - `Promise<UpdateConversationResult>` - `conversation` echoes only the fields
163
+ you sent.
148
164
 
149
165
  ```typescript
150
- const result = await sdk.updateConversation({ policyNumber: "POL-123" });
166
+ const result = await sdk.updateConversation({
167
+ policyNumber: "POL-123",
168
+ clientEmail: "jane@example.com",
169
+ });
151
170
  console.log(result.success, result.conversation.policy_number);
152
171
  ```
153
172
 
@@ -592,18 +611,39 @@ Partial set of conversation fields accepted by `updateConversation()`.
592
611
  ```typescript
593
612
  type UpdateConversationInput = {
594
613
  policyNumber?: string;
614
+ insuredPhone?: string;
615
+ clientName?: string;
616
+ clientPhone?: string;
617
+ clientEmail?: string;
618
+ clientId?: string;
619
+ agentId?: string;
620
+ agentName?: string;
621
+ advisorId?: string;
622
+ advisorName?: string;
623
+ agentGroups?: string[];
595
624
  };
596
625
  ```
597
626
 
598
627
  ### UpdateConversationResult
599
628
 
600
- Returned by `updateConversation()`.
629
+ Returned by `updateConversation()`. `conversation` echoes only the fields you
630
+ sent.
601
631
 
602
632
  ```typescript
603
633
  type UpdateConversationResult = {
604
634
  success: boolean;
605
635
  conversation: {
606
636
  policy_number?: string;
637
+ insured_phone?: string;
638
+ client_name?: string;
639
+ client_phone?: string;
640
+ client_email?: string;
641
+ client_id?: string;
642
+ agent_id?: string;
643
+ agent_name?: string;
644
+ advisor_id?: string;
645
+ advisor_name?: string;
646
+ agent_groups?: string[];
607
647
  };
608
648
  };
609
649
  ```
@@ -30,11 +30,32 @@ type SetConversationLanguageResult = {
30
30
  };
31
31
  type UpdateConversationInput = {
32
32
  policyNumber?: string;
33
+ insuredPhone?: string;
34
+ clientName?: string;
35
+ clientPhone?: string;
36
+ clientEmail?: string;
37
+ clientId?: string;
38
+ agentId?: string;
39
+ agentName?: string;
40
+ advisorId?: string;
41
+ advisorName?: string;
42
+ agentGroups?: string[];
33
43
  };
44
+ /** Echo of the patched subset — only the fields you sent come back. */
34
45
  type UpdateConversationResult = {
35
46
  success: boolean;
36
47
  conversation: {
37
48
  policy_number?: string;
49
+ insured_phone?: string;
50
+ client_name?: string;
51
+ client_phone?: string;
52
+ client_email?: string;
53
+ client_id?: string;
54
+ agent_id?: string;
55
+ agent_name?: string;
56
+ advisor_id?: string;
57
+ advisor_name?: string;
58
+ agent_groups?: string[];
38
59
  };
39
60
  };
40
61
  declare enum ConversationLanguage {