@droz-js/sdk 0.20.18 → 0.20.21
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/package.json +1 -1
- package/src/sdks/ai.d.ts +14 -6
- package/src/sdks/drozchat.d.ts +11 -9
- package/src/sdks/drozchat.js +4 -0
package/package.json
CHANGED
package/src/sdks/ai.d.ts
CHANGED
|
@@ -215,6 +215,8 @@ export type AiAgentConversationMetrics = {
|
|
|
215
215
|
};
|
|
216
216
|
export type AiAgentConversationOutcome = {
|
|
217
217
|
agentId: Scalars['ID']['output'];
|
|
218
|
+
/** Escrito pelo modelo ao transferir ou encerrar; nao substitui o que foi medido. */
|
|
219
|
+
agentSummary?: Maybe<Scalars['String']['output']>;
|
|
218
220
|
agentVersion: Scalars['String']['output'];
|
|
219
221
|
/** Fatos da sessao; chave e valor mascarados quando a politica de retencao pede. */
|
|
220
222
|
collectedData: Scalars['JSON']['output'];
|
|
@@ -222,7 +224,11 @@ export type AiAgentConversationOutcome = {
|
|
|
222
224
|
collectedDataAvailable: Scalars['Boolean']['output'];
|
|
223
225
|
/** Motivo da parada do ultimo turno, quando houve. */
|
|
224
226
|
haltReason?: Maybe<Scalars['String']['output']>;
|
|
227
|
+
/** Motivo do ultimo pedido de pessoa, com os mesmos valores de `handoffsByReason`. */
|
|
228
|
+
handoffReason?: Maybe<Scalars['String']['output']>;
|
|
225
229
|
lastTurnAt: Scalars['Number']['output'];
|
|
230
|
+
/** O que o agente disse ao consumidor que vai acontecer. */
|
|
231
|
+
promisedNextStep?: Maybe<Scalars['String']['output']>;
|
|
226
232
|
resolution: Scalars['String']['output'];
|
|
227
233
|
resolutionDefinition: Scalars['String']['output'];
|
|
228
234
|
sessionId: Scalars['ID']['output'];
|
|
@@ -322,9 +328,10 @@ export type AiAgentMetrics = {
|
|
|
322
328
|
haltReasons: Array<AiAgentMetricsCount>;
|
|
323
329
|
haltedTurns: Scalars['Number']['output'];
|
|
324
330
|
/**
|
|
325
|
-
* Por que a pessoa foi pedida
|
|
326
|
-
*
|
|
327
|
-
*
|
|
331
|
+
* Por que a pessoa foi pedida. Declarado pelo agente: `customer_request`, `out_of_scope`,
|
|
332
|
+
* `knowledge_gap`, `policy_requires_human`, `cannot_resolve`, `tool_failure`; `undeclared` quando ele
|
|
333
|
+
* transferiu sem declarar. Da plataforma: `tool_failure`, `provider_unavailable`, `budget_exceeded`,
|
|
334
|
+
* `period_budget_exceeded` e `unresolved` quando o agente parou sem concluir.
|
|
328
335
|
*/
|
|
329
336
|
handoffsByReason: Array<AiAgentMetricsCount>;
|
|
330
337
|
/** Turnos que terminaram pedindo uma pessoa (pedido, nao transferencia). */
|
|
@@ -466,9 +473,10 @@ export type AiAgentScenarioReport = {
|
|
|
466
473
|
/** Execuções que o prazo interrompeu antes de poderem ser julgadas. */
|
|
467
474
|
cut: Scalars['Int']['output'];
|
|
468
475
|
/**
|
|
469
|
-
* Por que a conversa foi para uma pessoa, contado entre as execuções julgadas.
|
|
470
|
-
*
|
|
471
|
-
*
|
|
476
|
+
* Por que a conversa foi para uma pessoa, contado entre as execuções julgadas. Os motivos declarados
|
|
477
|
+
* pelo agente (`customer_request`, `out_of_scope`, `knowledge_gap`, `policy_requires_human`,
|
|
478
|
+
* `cannot_resolve`) são entrega por decisão dele; `provider_unavailable` e `unresolved` são desistência.
|
|
479
|
+
* A taxa sozinha não separa as duas.
|
|
472
480
|
*/
|
|
473
481
|
handoffReasons: Array<AiAgentMetricsCount>;
|
|
474
482
|
/** Execuções efetivamente julgadas. Zero significa que este cenário não produziu evidência. */
|
package/src/sdks/drozchat.d.ts
CHANGED
|
@@ -405,6 +405,7 @@ export type CustomField = {
|
|
|
405
405
|
name: Scalars['String']['output'];
|
|
406
406
|
options: Array<CustomFieldOption>;
|
|
407
407
|
order: Scalars['Int']['output'];
|
|
408
|
+
removedOptions: Array<CustomFieldOption>;
|
|
408
409
|
type: CustomFieldType;
|
|
409
410
|
updatedAt: Scalars['DateTime']['output'];
|
|
410
411
|
usedInTicket: Scalars['Boolean']['output'];
|
|
@@ -1863,6 +1864,7 @@ export type DeleteNoteMutation = {
|
|
|
1863
1864
|
};
|
|
1864
1865
|
export type CustomFieldFragment = (Pick<CustomField, 'id' | 'name' | 'type' | 'isRequired' | 'order' | 'isActive' | 'usedInTicket' | 'maxLength' | 'createdAt' | 'updatedAt'> & {
|
|
1865
1866
|
options: Array<Pick<CustomFieldOption, 'label' | 'tag'>>;
|
|
1867
|
+
removedOptions: Array<Pick<CustomFieldOption, 'label' | 'tag'>>;
|
|
1866
1868
|
});
|
|
1867
1869
|
export type TicketCustomFieldValueFragment = (Pick<TicketCustomFieldValue, 'value' | 'isMissingRequired'> & {
|
|
1868
1870
|
field: CustomFieldFragment;
|
|
@@ -2558,7 +2560,7 @@ export declare const CustomerFragmentDoc = "\n fragment customer on DrozChatC
|
|
|
2558
2560
|
export declare const TicketTriggerAppFragmentDoc = "\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n ";
|
|
2559
2561
|
export declare const DrozChatChannelFragmentDoc = "\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n groupIds\n ticketAutoAssigner\n ticketAutoAssignerType\n maxSimultaneousAttendances\n createdAt\n updatedAt\n deletedAt\n}\n ";
|
|
2560
2562
|
export declare const TicketFragmentDoc = "\n fragment ticket on Ticket {\n channelId\n id\n subject\n description\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n modifiedBy {\n ...drozChatAgent\n }\n closedBy {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n participants {\n email\n name\n }\n unreadMessagesCount\n}\n ";
|
|
2561
|
-
export declare const CustomFieldFragmentDoc = "\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2563
|
+
export declare const CustomFieldFragmentDoc = "\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2562
2564
|
export declare const TicketCustomFieldValueFragmentDoc = "\n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n ";
|
|
2563
2565
|
export declare const TicketWithCustomFieldValuesFragmentDoc = "\n fragment ticketWithCustomFieldValues on Ticket {\n ...ticket\n customFieldValues {\n ...ticketCustomFieldValue\n }\n}\n ";
|
|
2564
2566
|
export declare const GlobalConfigurationFragmentDoc = "\n fragment globalConfiguration on GlobalConfiguration {\n maxSimultaneousAttendances\n createdAt\n updatedAt\n}\n ";
|
|
@@ -2608,15 +2610,15 @@ export declare const ListNotesDocument = "\n query listNotes($customerId: Str
|
|
|
2608
2610
|
export declare const CreateNoteDocument = "\n mutation createNote($input: CreateCustomerNoteInput!) {\n createNote(input: $input) {\n ...customerNote\n }\n}\n \n fragment customerNote on CustomerNote {\n id\n note\n createdBy {\n ...drozChatAgent\n }\n createdAt\n updatedAt\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
|
|
2609
2611
|
export declare const UpdateNoteDocument = "\n mutation updateNote($input: UpdateCustomerNoteInput!) {\n updateNote(input: $input) {\n ...customerNote\n }\n}\n \n fragment customerNote on CustomerNote {\n id\n note\n createdBy {\n ...drozChatAgent\n }\n createdAt\n updatedAt\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
|
|
2610
2612
|
export declare const DeleteNoteDocument = "\n mutation deleteNote($input: DeleteCustomerNoteInput!) {\n deleteNote(input: $input) {\n ...customerNote\n }\n}\n \n fragment customerNote on CustomerNote {\n id\n note\n createdBy {\n ...drozChatAgent\n }\n createdAt\n updatedAt\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n ";
|
|
2611
|
-
export declare const ListCustomFieldsDocument = "\n query listCustomFields {\n listCustomFields {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2612
|
-
export declare const CreateCustomFieldDocument = "\n mutation createCustomField($input: CreateCustomFieldInput!) {\n createCustomField(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2613
|
-
export declare const UpdateCustomFieldDocument = "\n mutation updateCustomField($input: UpdateCustomFieldInput!) {\n updateCustomField(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2613
|
+
export declare const ListCustomFieldsDocument = "\n query listCustomFields {\n listCustomFields {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2614
|
+
export declare const CreateCustomFieldDocument = "\n mutation createCustomField($input: CreateCustomFieldInput!) {\n createCustomField(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2615
|
+
export declare const UpdateCustomFieldDocument = "\n mutation updateCustomField($input: UpdateCustomFieldInput!) {\n updateCustomField(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2614
2616
|
export declare const DeleteCustomFieldDocument = "\n mutation deleteCustomField($id: ID!) {\n deleteCustomField(id: $id)\n}\n ";
|
|
2615
|
-
export declare const ReorderCustomFieldsDocument = "\n mutation reorderCustomFields($input: ReorderCustomFieldsInput!) {\n reorderCustomFields(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2616
|
-
export declare const SearchTicketsWithCustomFieldValuesDocument = "\n query searchTicketsWithCustomFieldValues($q: String, $filters: [TicketSearchFilterInput!], $sortBy: [TicketSearchSortBy!], $page: Number, $perPage: Number) {\n searchTickets(\n q: $q\n filters: $filters\n sortBy: $sortBy\n page: $page\n perPage: $perPage\n ) {\n nodes {\n ...ticketWithCustomFieldValues\n }\n stats {\n found\n outOf\n page\n totalPages\n perPage\n searchTime\n }\n }\n}\n \n fragment ticketWithCustomFieldValues on Ticket {\n ...ticket\n customFieldValues {\n ...ticketCustomFieldValue\n }\n}\n \n\n fragment ticket on Ticket {\n channelId\n id\n subject\n description\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n modifiedBy {\n ...drozChatAgent\n }\n closedBy {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n participants {\n email\n name\n }\n unreadMessagesCount\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n \n\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n groupIds\n ticketAutoAssigner\n ticketAutoAssignerType\n maxSimultaneousAttendances\n createdAt\n updatedAt\n deletedAt\n}\n \n\n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2617
|
-
export declare const SetCustomFieldValueDocument = "\n mutation setCustomFieldValue($input: SetCustomFieldValueInput!) {\n setCustomFieldValue(input: $input) {\n id\n customFieldValues {\n ...ticketCustomFieldValue\n }\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2618
|
-
export declare const ClearCustomFieldValueDocument = "\n mutation clearCustomFieldValue($input: ClearCustomFieldValueInput!) {\n clearCustomFieldValue(input: $input) {\n id\n customFieldValues {\n ...ticketCustomFieldValue\n }\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2619
|
-
export declare const CustomFieldValuesForTicketDocument = "\n query customFieldValuesForTicket($ticketId: ID!) {\n customFieldValuesForTicket(ticketId: $ticketId) {\n ...ticketCustomFieldValue\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2617
|
+
export declare const ReorderCustomFieldsDocument = "\n mutation reorderCustomFields($input: ReorderCustomFieldsInput!) {\n reorderCustomFields(input: $input) {\n ...customField\n }\n}\n \n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2618
|
+
export declare const SearchTicketsWithCustomFieldValuesDocument = "\n query searchTicketsWithCustomFieldValues($q: String, $filters: [TicketSearchFilterInput!], $sortBy: [TicketSearchSortBy!], $page: Number, $perPage: Number) {\n searchTickets(\n q: $q\n filters: $filters\n sortBy: $sortBy\n page: $page\n perPage: $perPage\n ) {\n nodes {\n ...ticketWithCustomFieldValues\n }\n stats {\n found\n outOf\n page\n totalPages\n perPage\n searchTime\n }\n }\n}\n \n fragment ticketWithCustomFieldValues on Ticket {\n ...ticket\n customFieldValues {\n ...ticketCustomFieldValue\n }\n}\n \n\n fragment ticket on Ticket {\n channelId\n id\n subject\n description\n state\n status\n priority\n tags\n externalProviderId\n externalId\n protocol\n assignee {\n ...drozChatAgent\n }\n modifiedBy {\n ...drozChatAgent\n }\n closedBy {\n ...drozChatAgent\n }\n customer {\n ...customer\n }\n triggerApp {\n ...ticketTriggerApp\n }\n channel {\n ...drozChatChannel\n }\n createdAt\n updatedAt\n assignedAt\n closedAt\n lastMessageAt\n firstAgentResponseAt\n timeToFirstAgentResponseInMs\n timeToCloseInMs\n messagesCount\n lastMessage\n participants {\n email\n name\n }\n unreadMessagesCount\n}\n \n\n fragment drozChatAgent on DrozChatAgent {\n id\n name\n}\n \n\n fragment customer on DrozChatCustomer {\n id\n name\n alternateName\n email\n phone\n document\n externalId\n emails\n phones\n documents\n externalIds\n createdAt\n updatedAt\n}\n \n\n fragment ticketTriggerApp on TicketTriggerApp {\n drn\n name\n appId\n appName\n appColor\n channels {\n id\n main\n readonly\n hidden\n sources\n unreadMessagesCount\n }\n}\n \n\n fragment drozChatChannel on DrozChatChannel {\n id\n name\n drn\n agentIds\n groupIds\n ticketAutoAssigner\n ticketAutoAssignerType\n maxSimultaneousAttendances\n createdAt\n updatedAt\n deletedAt\n}\n \n\n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2619
|
+
export declare const SetCustomFieldValueDocument = "\n mutation setCustomFieldValue($input: SetCustomFieldValueInput!) {\n setCustomFieldValue(input: $input) {\n id\n customFieldValues {\n ...ticketCustomFieldValue\n }\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2620
|
+
export declare const ClearCustomFieldValueDocument = "\n mutation clearCustomFieldValue($input: ClearCustomFieldValueInput!) {\n clearCustomFieldValue(input: $input) {\n id\n customFieldValues {\n ...ticketCustomFieldValue\n }\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2621
|
+
export declare const CustomFieldValuesForTicketDocument = "\n query customFieldValuesForTicket($ticketId: ID!) {\n customFieldValuesForTicket(ticketId: $ticketId) {\n ...ticketCustomFieldValue\n }\n}\n \n fragment ticketCustomFieldValue on TicketCustomFieldValue {\n field {\n ...customField\n }\n value\n isMissingRequired\n}\n \n\n fragment customField on CustomField {\n id\n name\n type\n options {\n label\n tag\n }\n removedOptions {\n label\n tag\n }\n isRequired\n order\n isActive\n usedInTicket\n maxLength\n createdAt\n updatedAt\n}\n ";
|
|
2620
2622
|
export declare const GetGlobalConfigurationDocument = "\n query getGlobalConfiguration {\n getGlobalConfiguration {\n ...globalConfiguration\n }\n}\n \n fragment globalConfiguration on GlobalConfiguration {\n maxSimultaneousAttendances\n createdAt\n updatedAt\n}\n ";
|
|
2621
2623
|
export declare const SetMaxSimultaneousAttendancesDocument = "\n mutation setMaxSimultaneousAttendances($input: SetMaxSimultaneousAttendancesInput!) {\n setMaxSimultaneousAttendances(input: $input) {\n ...globalConfiguration\n }\n}\n \n fragment globalConfiguration on GlobalConfiguration {\n maxSimultaneousAttendances\n createdAt\n updatedAt\n}\n ";
|
|
2622
2624
|
export declare const ClearMaxSimultaneousAttendancesDocument = "\n mutation clearMaxSimultaneousAttendances {\n clearMaxSimultaneousAttendances {\n ...globalConfiguration\n }\n}\n \n fragment globalConfiguration on GlobalConfiguration {\n maxSimultaneousAttendances\n createdAt\n updatedAt\n}\n ";
|