@breign/client 1.0.163 → 1.0.165

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 (31) hide show
  1. package/dist/apis/AgentApi.d.ts +15 -1
  2. package/dist/apis/AgentApi.js +34 -0
  3. package/dist/apis/KnowledgeApi.d.ts +43 -1
  4. package/dist/apis/KnowledgeApi.js +104 -0
  5. package/dist/models/AddKnowledgeSiteExclusionRequestUio.d.ts +32 -0
  6. package/dist/models/AddKnowledgeSiteExclusionRequestUio.js +50 -0
  7. package/dist/models/AddKnowledgeSiteExclusionResponseUio.d.ts +44 -0
  8. package/dist/models/AddKnowledgeSiteExclusionResponseUio.js +58 -0
  9. package/dist/models/AgentPromptInitGenerationRequestNotesUio.d.ts +45 -0
  10. package/dist/models/AgentPromptInitGenerationRequestNotesUio.js +52 -0
  11. package/dist/models/AgentPromptInitGenerationRequestUio.d.ts +110 -0
  12. package/dist/models/AgentPromptInitGenerationRequestUio.js +92 -0
  13. package/dist/models/AgentPromptInitGenerationResponseUio.d.ts +38 -0
  14. package/dist/models/AgentPromptInitGenerationResponseUio.js +52 -0
  15. package/dist/models/FileCreationResponseUio.d.ts +7 -0
  16. package/dist/models/FileCreationResponseUio.js +2 -0
  17. package/dist/models/FileUio.d.ts +7 -0
  18. package/dist/models/FileUio.js +2 -0
  19. package/dist/models/FileWithDownloadUrlUio.d.ts +7 -0
  20. package/dist/models/FileWithDownloadUrlUio.js +2 -0
  21. package/dist/models/KnowledgeFileUio.d.ts +7 -0
  22. package/dist/models/KnowledgeFileUio.js +2 -0
  23. package/dist/models/KnowledgeSiteExclusionsUio.d.ts +32 -0
  24. package/dist/models/KnowledgeSiteExclusionsUio.js +50 -0
  25. package/dist/models/KnowledgeSitePagesRemovalUio.d.ts +38 -0
  26. package/dist/models/KnowledgeSitePagesRemovalUio.js +54 -0
  27. package/dist/models/StartKnowledgeBaseScrappingRequestUio.d.ts +1 -0
  28. package/dist/models/index.d.ts +7 -0
  29. package/dist/models/index.js +7 -0
  30. package/dist/openapi.json +362 -0
  31. 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",
@@ -10781,6 +10839,56 @@
10781
10839
  }
10782
10840
  },
10783
10841
  "/knowledge-files/{fileId}/knowledge-site-pages" : {
10842
+ "delete" : {
10843
+ "description" : "Removes every page located in `pathPrefix` or below it, along with its chunks and stored content. The pages are not excluded: the next resync brings them back.\n",
10844
+ "operationId" : "deleteKnowledgeSitePagesUnderPath",
10845
+ "parameters" : [ {
10846
+ "description" : "The ID of the file",
10847
+ "in" : "path",
10848
+ "name" : "fileId",
10849
+ "required" : true,
10850
+ "schema" : {
10851
+ "type" : "string"
10852
+ }
10853
+ }, {
10854
+ "description" : "Directory of the site, e.g. `/blog`",
10855
+ "in" : "query",
10856
+ "name" : "pathPrefix",
10857
+ "required" : true,
10858
+ "schema" : {
10859
+ "type" : "string"
10860
+ }
10861
+ } ],
10862
+ "responses" : {
10863
+ "200" : {
10864
+ "content" : {
10865
+ "application/json" : {
10866
+ "schema" : {
10867
+ "$ref" : "#/components/schemas/KnowledgeSitePagesRemoval"
10868
+ }
10869
+ }
10870
+ },
10871
+ "description" : "Pages removed"
10872
+ },
10873
+ "400" : {
10874
+ "description" : "Not a website, or empty `pathPrefix`"
10875
+ },
10876
+ "401" : {
10877
+ "description" : "Unauthorized"
10878
+ },
10879
+ "403" : {
10880
+ "description" : "Forbidden - User is not admin of the organization"
10881
+ },
10882
+ "404" : {
10883
+ "description" : "Knowledge site or knowledge base not found"
10884
+ },
10885
+ "409" : {
10886
+ "description" : "The directory holds every page of the site (`SITE_WOULD_BE_EMPTY`)"
10887
+ }
10888
+ },
10889
+ "summary" : "Delete the knowledge site pages of a directory",
10890
+ "tags" : [ "knowledge" ]
10891
+ },
10784
10892
  "get" : {
10785
10893
  "description" : "Get the scraped site pages attached to a knowledge file of type website",
10786
10894
  "operationId" : "getKnowledgeSitePagesForFile",
@@ -10872,6 +10980,107 @@
10872
10980
  "tags" : [ "knowledge" ]
10873
10981
  }
10874
10982
  },
10983
+ "/knowledge-files/{fileId}/scraping-exclusions" : {
10984
+ "delete" : {
10985
+ "description" : "The pages it covered are not scrapped again here: they come back with the next resync.\n",
10986
+ "operationId" : "removeKnowledgeSiteExclusion",
10987
+ "parameters" : [ {
10988
+ "description" : "The ID of the file",
10989
+ "in" : "path",
10990
+ "name" : "fileId",
10991
+ "required" : true,
10992
+ "schema" : {
10993
+ "type" : "string"
10994
+ }
10995
+ }, {
10996
+ "description" : "The exclusion to remove, as returned in `scrapingExclusions`",
10997
+ "in" : "query",
10998
+ "name" : "url",
10999
+ "required" : true,
11000
+ "schema" : {
11001
+ "type" : "string"
11002
+ }
11003
+ } ],
11004
+ "responses" : {
11005
+ "200" : {
11006
+ "content" : {
11007
+ "application/json" : {
11008
+ "schema" : {
11009
+ "$ref" : "#/components/schemas/KnowledgeSiteExclusions"
11010
+ }
11011
+ }
11012
+ },
11013
+ "description" : "Exclusion removed"
11014
+ },
11015
+ "400" : {
11016
+ "description" : "Not a website or invalid URL"
11017
+ },
11018
+ "401" : {
11019
+ "description" : "Unauthorized"
11020
+ },
11021
+ "403" : {
11022
+ "description" : "Forbidden - User is not admin of the organization"
11023
+ },
11024
+ "404" : {
11025
+ "description" : "Knowledge site, knowledge base or exclusion not found"
11026
+ }
11027
+ },
11028
+ "summary" : "Remove an exclusion from a scrapped site",
11029
+ "tags" : [ "knowledge" ]
11030
+ },
11031
+ "post" : {
11032
+ "description" : "Saves the URL among the site exclusions, which every resync applies, and removes the site pages it covers right away. An exclusion covers the URL and everything below it (`/blog` covers `/blog/a` but not `/blog-news`); an exclusion without a path covers the whole host. Adding a URL already excluded is a no-op.\n",
11033
+ "operationId" : "addKnowledgeSiteExclusion",
11034
+ "parameters" : [ {
11035
+ "description" : "The ID of the file",
11036
+ "in" : "path",
11037
+ "name" : "fileId",
11038
+ "required" : true,
11039
+ "schema" : {
11040
+ "type" : "string"
11041
+ }
11042
+ } ],
11043
+ "requestBody" : {
11044
+ "content" : {
11045
+ "application/json" : {
11046
+ "schema" : {
11047
+ "$ref" : "#/components/schemas/AddKnowledgeSiteExclusionRequest"
11048
+ }
11049
+ }
11050
+ },
11051
+ "required" : true
11052
+ },
11053
+ "responses" : {
11054
+ "200" : {
11055
+ "content" : {
11056
+ "application/json" : {
11057
+ "schema" : {
11058
+ "$ref" : "#/components/schemas/AddKnowledgeSiteExclusionResponse"
11059
+ }
11060
+ }
11061
+ },
11062
+ "description" : "Exclusion saved and covered pages removed"
11063
+ },
11064
+ "400" : {
11065
+ "description" : "Not a website, invalid URL, URL outside the site, or too many exclusions"
11066
+ },
11067
+ "401" : {
11068
+ "description" : "Unauthorized"
11069
+ },
11070
+ "403" : {
11071
+ "description" : "Forbidden - User is not admin of the organization"
11072
+ },
11073
+ "404" : {
11074
+ "description" : "Knowledge site or knowledge base not found"
11075
+ },
11076
+ "409" : {
11077
+ "description" : "The exclusion covers every page of the site (`SITE_WOULD_BE_EMPTY`)"
11078
+ }
11079
+ },
11080
+ "summary" : "Exclude a page or directory from a scrapped site",
11081
+ "tags" : [ "knowledge" ]
11082
+ }
11083
+ },
10875
11084
  "/knowledge-files/{fileId}/status" : {
10876
11085
  "post" : {
10877
11086
  "description" : "Updates the status of a knowledge file and triggers indexing when uploaded",
@@ -18557,6 +18766,13 @@
18557
18766
  },
18558
18767
  "isActive" : {
18559
18768
  "type" : "boolean"
18769
+ },
18770
+ "scrapingExclusions" : {
18771
+ "description" : "Websites only. URLs never scraped, each one along with everything below it, applied on every resync.\n",
18772
+ "items" : {
18773
+ "type" : "string"
18774
+ },
18775
+ "type" : "array"
18560
18776
  }
18561
18777
  },
18562
18778
  "required" : [ "id" ],
@@ -18664,6 +18880,80 @@
18664
18880
  "required" : [ "transcription" ],
18665
18881
  "type" : "object"
18666
18882
  },
18883
+ "AgentPromptInitGenerationRequest" : {
18884
+ "additionalProperties" : false,
18885
+ "properties" : {
18886
+ "mission" : {
18887
+ "description" : "What the agent is for, in the user's own words.",
18888
+ "maxLength" : 600,
18889
+ "minLength" : 10,
18890
+ "type" : "string"
18891
+ },
18892
+ "audiences" : {
18893
+ "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",
18894
+ "items" : {
18895
+ "enum" : [ "general_public", "customers", "employees", "experts" ],
18896
+ "type" : "string"
18897
+ },
18898
+ "maxItems" : 4,
18899
+ "minItems" : 1,
18900
+ "type" : "array"
18901
+ },
18902
+ "answerStyle" : {
18903
+ "default" : "concise",
18904
+ "description" : "Omit it when `notes.answerStyle` is given. Defaults to `concise`.",
18905
+ "enum" : [ "concise", "detailed", "step_by_step" ],
18906
+ "type" : "string"
18907
+ },
18908
+ "sourcePolicy" : {
18909
+ "default" : "provided_only",
18910
+ "description" : "Omit it when `notes.sourcePolicy` is given. Defaults to `provided_only`.",
18911
+ "enum" : [ "provided_only", "provided_and_general" ],
18912
+ "type" : "string"
18913
+ },
18914
+ "notes" : {
18915
+ "$ref" : "#/components/schemas/AgentPromptInitGenerationRequest_notes"
18916
+ },
18917
+ "constraints" : {
18918
+ "description" : "What the agent must never do.",
18919
+ "maxLength" : 600,
18920
+ "type" : "string"
18921
+ },
18922
+ "lang" : {
18923
+ "description" : "Language the instructions are written in. Defaults to the agent's.",
18924
+ "pattern" : "^[a-z]{2}$",
18925
+ "type" : "string"
18926
+ },
18927
+ "providerId" : {
18928
+ "description" : "Engine to write with, instead of the agent's. Must belong to the agent's organisation. Only honoured together with `model`.\n",
18929
+ "type" : "string"
18930
+ },
18931
+ "model" : {
18932
+ "description" : "Model id within `providerId`.",
18933
+ "type" : "string"
18934
+ }
18935
+ },
18936
+ "required" : [ "mission" ],
18937
+ "type" : "object"
18938
+ },
18939
+ "AgentPromptInitGenerationResponse" : {
18940
+ "properties" : {
18941
+ "promptInit" : {
18942
+ "maxLength" : 50000,
18943
+ "minLength" : 50,
18944
+ "type" : "string"
18945
+ },
18946
+ "warnings" : {
18947
+ "description" : "Adjustments applied to the model's output, for information only.",
18948
+ "items" : {
18949
+ "type" : "string"
18950
+ },
18951
+ "type" : "array"
18952
+ }
18953
+ },
18954
+ "required" : [ "promptInit" ],
18955
+ "type" : "object"
18956
+ },
18667
18957
  "AgentToolAllowedMethodsRequest" : {
18668
18958
  "properties" : {
18669
18959
  "allowedMethods" : {
@@ -22910,6 +23200,58 @@
22910
23200
  "required" : [ "createdAt", "id", "isActive", "key", "knowledgeBaseId", "name", "siteId", "status", "updatedAt", "url" ],
22911
23201
  "type" : "object"
22912
23202
  },
23203
+ "KnowledgeSitePagesRemoval" : {
23204
+ "properties" : {
23205
+ "removedPages" : {
23206
+ "description" : "URLs of the removed pages",
23207
+ "items" : {
23208
+ "type" : "string"
23209
+ },
23210
+ "type" : "array"
23211
+ },
23212
+ "failedPages" : {
23213
+ "description" : "URLs of the pages that could not be removed",
23214
+ "items" : {
23215
+ "type" : "string"
23216
+ },
23217
+ "type" : "array"
23218
+ }
23219
+ },
23220
+ "required" : [ "failedPages", "removedPages" ],
23221
+ "type" : "object"
23222
+ },
23223
+ "AddKnowledgeSiteExclusionRequest" : {
23224
+ "additionalProperties" : false,
23225
+ "properties" : {
23226
+ "url" : {
23227
+ "description" : "Page or directory of the site to exclude, e.g. `https://site.com/blog`",
23228
+ "maxLength" : 2048,
23229
+ "minLength" : 1,
23230
+ "type" : "string"
23231
+ }
23232
+ },
23233
+ "required" : [ "url" ],
23234
+ "type" : "object"
23235
+ },
23236
+ "AddKnowledgeSiteExclusionResponse" : {
23237
+ "allOf" : [ {
23238
+ "$ref" : "#/components/schemas/KnowledgeSiteExclusions"
23239
+ }, {
23240
+ "$ref" : "#/components/schemas/KnowledgeSitePagesRemoval"
23241
+ } ]
23242
+ },
23243
+ "KnowledgeSiteExclusions" : {
23244
+ "properties" : {
23245
+ "scrapingExclusions" : {
23246
+ "items" : {
23247
+ "type" : "string"
23248
+ },
23249
+ "type" : "array"
23250
+ }
23251
+ },
23252
+ "required" : [ "scrapingExclusions" ],
23253
+ "type" : "object"
23254
+ },
22913
23255
  "KnowledgeFilesByIdsRequest" : {
22914
23256
  "properties" : {
22915
23257
  "ids" : {
@@ -26397,6 +26739,7 @@
26397
26739
  "type" : "string"
26398
26740
  },
26399
26741
  "excludeDomains" : {
26742
+ "description" : "URLs to exclude, each one along with everything below it. Saved on the site when the crawl creates it. Ignored with `resync`, which applies the exclusions saved on the site.\n",
26400
26743
  "items" : {
26401
26744
  "type" : "string"
26402
26745
  },
@@ -26915,6 +27258,25 @@
26915
27258
  "required" : [ "x", "y" ],
26916
27259
  "type" : "object"
26917
27260
  },
27261
+ "AgentPromptInitGenerationRequest_notes" : {
27262
+ "additionalProperties" : false,
27263
+ "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",
27264
+ "properties" : {
27265
+ "audience" : {
27266
+ "maxLength" : 300,
27267
+ "type" : "string"
27268
+ },
27269
+ "answerStyle" : {
27270
+ "maxLength" : 300,
27271
+ "type" : "string"
27272
+ },
27273
+ "sourcePolicy" : {
27274
+ "maxLength" : 300,
27275
+ "type" : "string"
27276
+ }
27277
+ },
27278
+ "type" : "object"
27279
+ },
26918
27280
  "ChatMessage_audio_inner" : {
26919
27281
  "properties" : {
26920
27282
  "sequence" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.163",
3
+ "version": "1.0.165",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",