@breign/client 1.0.162 → 1.0.164
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/dist/apis/AgentApi.d.ts +15 -1
- package/dist/apis/AgentApi.js +34 -0
- package/dist/apis/ConversationsApi.d.ts +22 -4
- package/dist/apis/ConversationsApi.js +48 -4
- package/dist/models/AgentChatOverviewEntryUio.d.ts +20 -1
- package/dist/models/AgentChatOverviewEntryUio.js +7 -0
- package/dist/models/AgentPromptInitGenerationRequestNotesUio.d.ts +45 -0
- package/dist/models/AgentPromptInitGenerationRequestNotesUio.js +52 -0
- package/dist/models/AgentPromptInitGenerationRequestUio.d.ts +110 -0
- package/dist/models/AgentPromptInitGenerationRequestUio.js +92 -0
- package/dist/models/AgentPromptInitGenerationResponseUio.d.ts +38 -0
- package/dist/models/AgentPromptInitGenerationResponseUio.js +52 -0
- package/dist/models/ChatSessionSummaryLastMessagePreviewUio.d.ts +46 -0
- package/dist/models/ChatSessionSummaryLastMessagePreviewUio.js +62 -0
- package/dist/models/ChatSessionSummaryUio.d.ts +87 -0
- package/dist/models/ChatSessionSummaryUio.js +85 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/openapi.json +339 -2
- package/package.json +1 -1
package/dist/openapi.json
CHANGED
|
@@ -1781,6 +1781,64 @@
|
|
|
1781
1781
|
"tags" : [ "agent" ]
|
|
1782
1782
|
}
|
|
1783
1783
|
},
|
|
1784
|
+
"/agents/{agentId}/prompt-init/generate" : {
|
|
1785
|
+
"post" : {
|
|
1786
|
+
"description" : "Writes a ready-to-use initialization prompt from a short brief, using the AI model configured on the agent (or, failing that, on its organisation). The result is returned only — it is never persisted on the agent, which is updated through PATCH /agents/{agentId}.\n",
|
|
1787
|
+
"operationId" : "generateAgentPromptInit",
|
|
1788
|
+
"parameters" : [ {
|
|
1789
|
+
"description" : "ID of the agent",
|
|
1790
|
+
"in" : "path",
|
|
1791
|
+
"name" : "agentId",
|
|
1792
|
+
"required" : true,
|
|
1793
|
+
"schema" : {
|
|
1794
|
+
"format" : "uuid",
|
|
1795
|
+
"type" : "string"
|
|
1796
|
+
}
|
|
1797
|
+
} ],
|
|
1798
|
+
"requestBody" : {
|
|
1799
|
+
"content" : {
|
|
1800
|
+
"application/json" : {
|
|
1801
|
+
"schema" : {
|
|
1802
|
+
"$ref" : "#/components/schemas/AgentPromptInitGenerationRequest"
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
},
|
|
1806
|
+
"required" : true
|
|
1807
|
+
},
|
|
1808
|
+
"responses" : {
|
|
1809
|
+
"201" : {
|
|
1810
|
+
"content" : {
|
|
1811
|
+
"application/json" : {
|
|
1812
|
+
"schema" : {
|
|
1813
|
+
"$ref" : "#/components/schemas/AgentPromptInitGenerationResponse"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"description" : "Instructions generated successfully"
|
|
1818
|
+
},
|
|
1819
|
+
"400" : {
|
|
1820
|
+
"description" : "Invalid request body"
|
|
1821
|
+
},
|
|
1822
|
+
"401" : {
|
|
1823
|
+
"description" : "Unauthorized"
|
|
1824
|
+
},
|
|
1825
|
+
"403" : {
|
|
1826
|
+
"description" : "Forbidden - User doesn't have access to this agent"
|
|
1827
|
+
},
|
|
1828
|
+
"404" : {
|
|
1829
|
+
"description" : "Agent not found"
|
|
1830
|
+
},
|
|
1831
|
+
"409" : {
|
|
1832
|
+
"description" : "No AI model is configured for this agent or its organisation"
|
|
1833
|
+
},
|
|
1834
|
+
"502" : {
|
|
1835
|
+
"description" : "The model failed to produce usable instructions"
|
|
1836
|
+
}
|
|
1837
|
+
},
|
|
1838
|
+
"summary" : "Generate initialization instructions for an agent",
|
|
1839
|
+
"tags" : [ "agent" ]
|
|
1840
|
+
}
|
|
1841
|
+
},
|
|
1784
1842
|
"/agents/{agentId}/tools/{toolId}" : {
|
|
1785
1843
|
"delete" : {
|
|
1786
1844
|
"description" : "Unlinks an organization tool from the specified agent",
|
|
@@ -5449,9 +5507,109 @@
|
|
|
5449
5507
|
"tags" : [ "conversations" ]
|
|
5450
5508
|
}
|
|
5451
5509
|
},
|
|
5510
|
+
"/organizations/{organizationId}/chat/agents/{agentId}/conversations" : {
|
|
5511
|
+
"get" : {
|
|
5512
|
+
"description" : "Sessions de chat de l'utilisateur courant avec cet agent, de la plus récemment active à la plus ancienne. Chaque session porte son nombre de non-lus, un aperçu du dernier message et l'indication qu'elle est la conversation principale (celle mémorisée par setUserAgentConversation).",
|
|
5513
|
+
"operationId" : "listUserAgentConversations",
|
|
5514
|
+
"parameters" : [ {
|
|
5515
|
+
"description" : "ID of the organization",
|
|
5516
|
+
"in" : "path",
|
|
5517
|
+
"name" : "organizationId",
|
|
5518
|
+
"required" : true,
|
|
5519
|
+
"schema" : {
|
|
5520
|
+
"type" : "string"
|
|
5521
|
+
}
|
|
5522
|
+
}, {
|
|
5523
|
+
"description" : "ID of the agent",
|
|
5524
|
+
"in" : "path",
|
|
5525
|
+
"name" : "agentId",
|
|
5526
|
+
"required" : true,
|
|
5527
|
+
"schema" : {
|
|
5528
|
+
"format" : "uuid",
|
|
5529
|
+
"type" : "string"
|
|
5530
|
+
}
|
|
5531
|
+
}, {
|
|
5532
|
+
"description" : "Page number (1-based). Must be used together with limit.",
|
|
5533
|
+
"in" : "query",
|
|
5534
|
+
"name" : "page",
|
|
5535
|
+
"required" : false,
|
|
5536
|
+
"schema" : {
|
|
5537
|
+
"minimum" : 1,
|
|
5538
|
+
"type" : "integer"
|
|
5539
|
+
}
|
|
5540
|
+
}, {
|
|
5541
|
+
"description" : "Number of sessions per page. Must be used together with page.",
|
|
5542
|
+
"in" : "query",
|
|
5543
|
+
"name" : "limit",
|
|
5544
|
+
"required" : false,
|
|
5545
|
+
"schema" : {
|
|
5546
|
+
"maximum" : 100,
|
|
5547
|
+
"minimum" : 1,
|
|
5548
|
+
"type" : "integer"
|
|
5549
|
+
}
|
|
5550
|
+
}, {
|
|
5551
|
+
"description" : "Ne renvoie que les sessions ayant des non-lus",
|
|
5552
|
+
"in" : "query",
|
|
5553
|
+
"name" : "unreadOnly",
|
|
5554
|
+
"required" : false,
|
|
5555
|
+
"schema" : {
|
|
5556
|
+
"type" : "boolean"
|
|
5557
|
+
}
|
|
5558
|
+
} ],
|
|
5559
|
+
"responses" : {
|
|
5560
|
+
"200" : {
|
|
5561
|
+
"content" : {
|
|
5562
|
+
"application/json" : {
|
|
5563
|
+
"schema" : {
|
|
5564
|
+
"items" : {
|
|
5565
|
+
"$ref" : "#/components/schemas/ChatSessionSummary"
|
|
5566
|
+
},
|
|
5567
|
+
"type" : "array"
|
|
5568
|
+
}
|
|
5569
|
+
}
|
|
5570
|
+
},
|
|
5571
|
+
"description" : "Sessions retrieved successfully",
|
|
5572
|
+
"headers" : {
|
|
5573
|
+
"X-Total-Count" : {
|
|
5574
|
+
"description" : "Total number of sessions matching the filters",
|
|
5575
|
+
"schema" : {
|
|
5576
|
+
"type" : "integer"
|
|
5577
|
+
}
|
|
5578
|
+
},
|
|
5579
|
+
"X-Page" : {
|
|
5580
|
+
"description" : "Current page number",
|
|
5581
|
+
"schema" : {
|
|
5582
|
+
"type" : "integer"
|
|
5583
|
+
}
|
|
5584
|
+
},
|
|
5585
|
+
"X-Limit" : {
|
|
5586
|
+
"description" : "Number of items per page",
|
|
5587
|
+
"schema" : {
|
|
5588
|
+
"type" : "integer"
|
|
5589
|
+
}
|
|
5590
|
+
},
|
|
5591
|
+
"X-Total-Pages" : {
|
|
5592
|
+
"description" : "Total number of pages",
|
|
5593
|
+
"schema" : {
|
|
5594
|
+
"type" : "integer"
|
|
5595
|
+
}
|
|
5596
|
+
}
|
|
5597
|
+
}
|
|
5598
|
+
},
|
|
5599
|
+
"401" : {
|
|
5600
|
+
"description" : "Unauthenticated"
|
|
5601
|
+
},
|
|
5602
|
+
"403" : {
|
|
5603
|
+
"description" : "Forbidden — the caller is not part of the organization or cannot use this agent"
|
|
5604
|
+
}
|
|
5605
|
+
},
|
|
5606
|
+
"summary" : "List the current user's sessions with an agent",
|
|
5607
|
+
"tags" : [ "conversations" ]
|
|
5608
|
+
}
|
|
5609
|
+
},
|
|
5452
5610
|
"/organizations/{organizationId}/chat/overview" : {
|
|
5453
5611
|
"get" : {
|
|
5454
|
-
"description" : "Pour chaque agent de l'organisation avec lequel l'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l'indication d'une réponse en cours de génération.",
|
|
5612
|
+
"description" : "Pour chaque agent de l'organisation avec lequel l'utilisateur a une conversation, renvoie sa conversation la plus récente, le nombre de messages non lus et l'indication d'une réponse en cours de génération, ainsi que les totaux sur l'ensemble de ses sessions et ses sessions les plus récentes.",
|
|
5455
5613
|
"operationId" : "getAgentChatOverview",
|
|
5456
5614
|
"parameters" : [ {
|
|
5457
5615
|
"description" : "ID of the organization",
|
|
@@ -5461,6 +5619,16 @@
|
|
|
5461
5619
|
"schema" : {
|
|
5462
5620
|
"type" : "string"
|
|
5463
5621
|
}
|
|
5622
|
+
}, {
|
|
5623
|
+
"description" : "Nombre de sessions récentes renvoyées par agent (recentSessions), 5 par défaut",
|
|
5624
|
+
"in" : "query",
|
|
5625
|
+
"name" : "recent",
|
|
5626
|
+
"required" : false,
|
|
5627
|
+
"schema" : {
|
|
5628
|
+
"maximum" : 20,
|
|
5629
|
+
"minimum" : 0,
|
|
5630
|
+
"type" : "integer"
|
|
5631
|
+
}
|
|
5464
5632
|
} ],
|
|
5465
5633
|
"responses" : {
|
|
5466
5634
|
"200" : {
|
|
@@ -18554,6 +18722,80 @@
|
|
|
18554
18722
|
"required" : [ "transcription" ],
|
|
18555
18723
|
"type" : "object"
|
|
18556
18724
|
},
|
|
18725
|
+
"AgentPromptInitGenerationRequest" : {
|
|
18726
|
+
"additionalProperties" : false,
|
|
18727
|
+
"properties" : {
|
|
18728
|
+
"mission" : {
|
|
18729
|
+
"description" : "What the agent is for, in the user's own words.",
|
|
18730
|
+
"maxLength" : 600,
|
|
18731
|
+
"minLength" : 10,
|
|
18732
|
+
"type" : "string"
|
|
18733
|
+
},
|
|
18734
|
+
"audiences" : {
|
|
18735
|
+
"description" : "Who the agent talks to. Several may apply at once; duplicates are rejected. Omit it when `notes.audience` is given — a free-text note replaces the presets. Defaults to `employees` when neither is given. Not declared as `uniqueItems` because the TypeScript generator would turn the field into a `Set`, which does not survive a server-action boundary — the server-side schema enforces uniqueness.\n",
|
|
18736
|
+
"items" : {
|
|
18737
|
+
"enum" : [ "general_public", "customers", "employees", "experts" ],
|
|
18738
|
+
"type" : "string"
|
|
18739
|
+
},
|
|
18740
|
+
"maxItems" : 4,
|
|
18741
|
+
"minItems" : 1,
|
|
18742
|
+
"type" : "array"
|
|
18743
|
+
},
|
|
18744
|
+
"answerStyle" : {
|
|
18745
|
+
"default" : "concise",
|
|
18746
|
+
"description" : "Omit it when `notes.answerStyle` is given. Defaults to `concise`.",
|
|
18747
|
+
"enum" : [ "concise", "detailed", "step_by_step" ],
|
|
18748
|
+
"type" : "string"
|
|
18749
|
+
},
|
|
18750
|
+
"sourcePolicy" : {
|
|
18751
|
+
"default" : "provided_only",
|
|
18752
|
+
"description" : "Omit it when `notes.sourcePolicy` is given. Defaults to `provided_only`.",
|
|
18753
|
+
"enum" : [ "provided_only", "provided_and_general" ],
|
|
18754
|
+
"type" : "string"
|
|
18755
|
+
},
|
|
18756
|
+
"notes" : {
|
|
18757
|
+
"$ref" : "#/components/schemas/AgentPromptInitGenerationRequest_notes"
|
|
18758
|
+
},
|
|
18759
|
+
"constraints" : {
|
|
18760
|
+
"description" : "What the agent must never do.",
|
|
18761
|
+
"maxLength" : 600,
|
|
18762
|
+
"type" : "string"
|
|
18763
|
+
},
|
|
18764
|
+
"lang" : {
|
|
18765
|
+
"description" : "Language the instructions are written in. Defaults to the agent's.",
|
|
18766
|
+
"pattern" : "^[a-z]{2}$",
|
|
18767
|
+
"type" : "string"
|
|
18768
|
+
},
|
|
18769
|
+
"providerId" : {
|
|
18770
|
+
"description" : "Engine to write with, instead of the agent's. Must belong to the agent's organisation. Only honoured together with `model`.\n",
|
|
18771
|
+
"type" : "string"
|
|
18772
|
+
},
|
|
18773
|
+
"model" : {
|
|
18774
|
+
"description" : "Model id within `providerId`.",
|
|
18775
|
+
"type" : "string"
|
|
18776
|
+
}
|
|
18777
|
+
},
|
|
18778
|
+
"required" : [ "mission" ],
|
|
18779
|
+
"type" : "object"
|
|
18780
|
+
},
|
|
18781
|
+
"AgentPromptInitGenerationResponse" : {
|
|
18782
|
+
"properties" : {
|
|
18783
|
+
"promptInit" : {
|
|
18784
|
+
"maxLength" : 50000,
|
|
18785
|
+
"minLength" : 50,
|
|
18786
|
+
"type" : "string"
|
|
18787
|
+
},
|
|
18788
|
+
"warnings" : {
|
|
18789
|
+
"description" : "Adjustments applied to the model's output, for information only.",
|
|
18790
|
+
"items" : {
|
|
18791
|
+
"type" : "string"
|
|
18792
|
+
},
|
|
18793
|
+
"type" : "array"
|
|
18794
|
+
}
|
|
18795
|
+
},
|
|
18796
|
+
"required" : [ "promptInit" ],
|
|
18797
|
+
"type" : "object"
|
|
18798
|
+
},
|
|
18557
18799
|
"AgentToolAllowedMethodsRequest" : {
|
|
18558
18800
|
"properties" : {
|
|
18559
18801
|
"allowedMethods" : {
|
|
@@ -20598,6 +20840,52 @@
|
|
|
20598
20840
|
"required" : [ "conversationId" ],
|
|
20599
20841
|
"type" : "object"
|
|
20600
20842
|
},
|
|
20843
|
+
"ChatSessionSummary" : {
|
|
20844
|
+
"description" : "Une session de chat de l'utilisateur courant avec un agent.",
|
|
20845
|
+
"properties" : {
|
|
20846
|
+
"id" : {
|
|
20847
|
+
"format" : "uuid",
|
|
20848
|
+
"type" : "string"
|
|
20849
|
+
},
|
|
20850
|
+
"agentId" : {
|
|
20851
|
+
"format" : "uuid",
|
|
20852
|
+
"type" : "string"
|
|
20853
|
+
},
|
|
20854
|
+
"title" : {
|
|
20855
|
+
"description" : "Titre de la session ; à défaut, le premier message tronqué",
|
|
20856
|
+
"nullable" : true,
|
|
20857
|
+
"type" : "string"
|
|
20858
|
+
},
|
|
20859
|
+
"createdAt" : {
|
|
20860
|
+
"type" : "string"
|
|
20861
|
+
},
|
|
20862
|
+
"lastMessageAt" : {
|
|
20863
|
+
"description" : "Horodatage du dernier message, null si la session est vide",
|
|
20864
|
+
"nullable" : true,
|
|
20865
|
+
"type" : "string"
|
|
20866
|
+
},
|
|
20867
|
+
"lastMessagePreview" : {
|
|
20868
|
+
"$ref" : "#/components/schemas/ChatSessionSummary_lastMessagePreview"
|
|
20869
|
+
},
|
|
20870
|
+
"unreadCount" : {
|
|
20871
|
+
"description" : "Même définition que AgentChatOverviewEntry.unreadCount",
|
|
20872
|
+
"type" : "integer"
|
|
20873
|
+
},
|
|
20874
|
+
"isGenerating" : {
|
|
20875
|
+
"type" : "boolean"
|
|
20876
|
+
},
|
|
20877
|
+
"isMain" : {
|
|
20878
|
+
"description" : "Vrai si c'est la conversation principale de l'utilisateur avec cet agent",
|
|
20879
|
+
"type" : "boolean"
|
|
20880
|
+
},
|
|
20881
|
+
"pendingHumanRequests" : {
|
|
20882
|
+
"description" : "Questions Human_ask en attente dans cette session",
|
|
20883
|
+
"type" : "integer"
|
|
20884
|
+
}
|
|
20885
|
+
},
|
|
20886
|
+
"required" : [ "agentId", "createdAt", "id", "isGenerating", "isMain", "lastMessageAt", "pendingHumanRequests", "title", "unreadCount" ],
|
|
20887
|
+
"type" : "object"
|
|
20888
|
+
},
|
|
20601
20889
|
"AgentChatOverviewEntry" : {
|
|
20602
20890
|
"description" : "État de la conversation d'un agent pour l'utilisateur courant. Le nombre de non-lus est dérivé des messages postérieurs à sa marque de lecture.",
|
|
20603
20891
|
"properties" : {
|
|
@@ -20615,7 +20903,7 @@
|
|
|
20615
20903
|
"type" : "string"
|
|
20616
20904
|
},
|
|
20617
20905
|
"unreadCount" : {
|
|
20618
|
-
"description" : "
|
|
20906
|
+
"description" : "Non-lus de cette conversation : messages de l'agent postérieurs à la marque de lecture, et interactions qui attendent l'utilisateur (question Human_ask, validation d'outil) tant qu'elles ne sont pas traitées.",
|
|
20619
20907
|
"type" : "integer"
|
|
20620
20908
|
},
|
|
20621
20909
|
"isGenerating" : {
|
|
@@ -20625,6 +20913,21 @@
|
|
|
20625
20913
|
"pendingHumanRequests" : {
|
|
20626
20914
|
"description" : "Questions de cet agent qui attendent une réponse de l'utilisateur courant (outil Human_ask), toutes tâches confondues.",
|
|
20627
20915
|
"type" : "integer"
|
|
20916
|
+
},
|
|
20917
|
+
"totalUnreadCount" : {
|
|
20918
|
+
"description" : "Somme des non-lus sur toutes les sessions de l'utilisateur avec cet agent",
|
|
20919
|
+
"type" : "integer"
|
|
20920
|
+
},
|
|
20921
|
+
"sessionCount" : {
|
|
20922
|
+
"description" : "Nombre de sessions de l'utilisateur avec cet agent",
|
|
20923
|
+
"type" : "integer"
|
|
20924
|
+
},
|
|
20925
|
+
"recentSessions" : {
|
|
20926
|
+
"description" : "Sessions les plus récemment actives, conversation principale comprise",
|
|
20927
|
+
"items" : {
|
|
20928
|
+
"$ref" : "#/components/schemas/ChatSessionSummary"
|
|
20929
|
+
},
|
|
20930
|
+
"type" : "array"
|
|
20628
20931
|
}
|
|
20629
20932
|
},
|
|
20630
20933
|
"required" : [ "agentId", "conversationId", "isGenerating", "unreadCount" ],
|
|
@@ -26744,6 +27047,25 @@
|
|
|
26744
27047
|
"required" : [ "x", "y" ],
|
|
26745
27048
|
"type" : "object"
|
|
26746
27049
|
},
|
|
27050
|
+
"AgentPromptInitGenerationRequest_notes" : {
|
|
27051
|
+
"additionalProperties" : false,
|
|
27052
|
+
"description" : "What the user wrote themselves when no preset fitted, per question. A note REPLACES the presets of its own question rather than adding to them.\n",
|
|
27053
|
+
"properties" : {
|
|
27054
|
+
"audience" : {
|
|
27055
|
+
"maxLength" : 300,
|
|
27056
|
+
"type" : "string"
|
|
27057
|
+
},
|
|
27058
|
+
"answerStyle" : {
|
|
27059
|
+
"maxLength" : 300,
|
|
27060
|
+
"type" : "string"
|
|
27061
|
+
},
|
|
27062
|
+
"sourcePolicy" : {
|
|
27063
|
+
"maxLength" : 300,
|
|
27064
|
+
"type" : "string"
|
|
27065
|
+
}
|
|
27066
|
+
},
|
|
27067
|
+
"type" : "object"
|
|
27068
|
+
},
|
|
26747
27069
|
"ChatMessage_audio_inner" : {
|
|
26748
27070
|
"properties" : {
|
|
26749
27071
|
"sequence" : {
|
|
@@ -27313,6 +27635,21 @@
|
|
|
27313
27635
|
"required" : [ "contentType", "ext", "size" ],
|
|
27314
27636
|
"type" : "object"
|
|
27315
27637
|
},
|
|
27638
|
+
"ChatSessionSummary_lastMessagePreview" : {
|
|
27639
|
+
"nullable" : true,
|
|
27640
|
+
"properties" : {
|
|
27641
|
+
"role" : {
|
|
27642
|
+
"enum" : [ "USER", "ASSISTANT" ],
|
|
27643
|
+
"type" : "string"
|
|
27644
|
+
},
|
|
27645
|
+
"content" : {
|
|
27646
|
+
"description" : "Début du dernier message, tronqué",
|
|
27647
|
+
"type" : "string"
|
|
27648
|
+
}
|
|
27649
|
+
},
|
|
27650
|
+
"required" : [ "content", "role" ],
|
|
27651
|
+
"type" : "object"
|
|
27652
|
+
},
|
|
27316
27653
|
"HumanRequestSummary_requestedBy" : {
|
|
27317
27654
|
"properties" : {
|
|
27318
27655
|
"kind" : {
|