@breign/client 1.0.189 → 1.0.191

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/openapi.json CHANGED
@@ -18378,6 +18378,55 @@
18378
18378
  "tags" : [ "tickets" ]
18379
18379
  }
18380
18380
  },
18381
+ "/projects/{projectId}/threads" : {
18382
+ "get" : {
18383
+ "description" : "Vue « Fils » : tous les tickets ouverts et les terminés les plus récents, chacun avec les sessions de travail de ses agents. L'arbre des sous-tickets, les filtres et la recherche se font côté client.",
18384
+ "operationId" : "getProjectThreads",
18385
+ "parameters" : [ {
18386
+ "description" : "ID of the project",
18387
+ "in" : "path",
18388
+ "name" : "projectId",
18389
+ "required" : true,
18390
+ "schema" : {
18391
+ "format" : "uuid",
18392
+ "type" : "string"
18393
+ }
18394
+ }, {
18395
+ "description" : "Nombre de tickets terminés renvoyés (10 par défaut)",
18396
+ "in" : "query",
18397
+ "name" : "doneLimit",
18398
+ "required" : false,
18399
+ "schema" : {
18400
+ "maximum" : 50,
18401
+ "minimum" : 0,
18402
+ "type" : "integer"
18403
+ }
18404
+ } ],
18405
+ "responses" : {
18406
+ "200" : {
18407
+ "content" : {
18408
+ "application/json" : {
18409
+ "schema" : {
18410
+ "$ref" : "#/components/schemas/TicketThreads"
18411
+ }
18412
+ }
18413
+ },
18414
+ "description" : "OK"
18415
+ },
18416
+ "401" : {
18417
+ "description" : "Unauthenticated"
18418
+ },
18419
+ "403" : {
18420
+ "description" : "Forbidden — the caller is not part of the organization or not a member of the project"
18421
+ },
18422
+ "404" : {
18423
+ "description" : "Not found"
18424
+ }
18425
+ },
18426
+ "summary" : "Get the threads of a project",
18427
+ "tags" : [ "tickets" ]
18428
+ }
18429
+ },
18381
18430
  "/organizations/{organizationId}/tickets/{ticketKey}" : {
18382
18431
  "get" : {
18383
18432
  "description" : "Ticket désigné par sa clé (BRN-142) dans une organisation.",
@@ -18425,6 +18474,54 @@
18425
18474
  "tags" : [ "tickets" ]
18426
18475
  }
18427
18476
  },
18477
+ "/organizations/{organizationId}/agents-at-work" : {
18478
+ "get" : {
18479
+ "description" : "Les agents qui travaillent, attendent une réponse ou sont bloqués sur les tickets ouverts dont l'utilisateur est créateur, assigné ou relecteur. Ceux qui attendent une réponse d'abord, puis du plus récent au plus ancien.",
18480
+ "operationId" : "getAgentsAtWork",
18481
+ "parameters" : [ {
18482
+ "description" : "ID of the organization",
18483
+ "in" : "path",
18484
+ "name" : "organizationId",
18485
+ "required" : true,
18486
+ "schema" : {
18487
+ "type" : "string"
18488
+ }
18489
+ }, {
18490
+ "description" : "Nombre de lignes renvoyées (10 par défaut)",
18491
+ "in" : "query",
18492
+ "name" : "limit",
18493
+ "required" : false,
18494
+ "schema" : {
18495
+ "maximum" : 30,
18496
+ "minimum" : 1,
18497
+ "type" : "integer"
18498
+ }
18499
+ } ],
18500
+ "responses" : {
18501
+ "200" : {
18502
+ "content" : {
18503
+ "application/json" : {
18504
+ "schema" : {
18505
+ "items" : {
18506
+ "$ref" : "#/components/schemas/AgentAtWork"
18507
+ },
18508
+ "type" : "array"
18509
+ }
18510
+ }
18511
+ },
18512
+ "description" : "OK"
18513
+ },
18514
+ "401" : {
18515
+ "description" : "Unauthenticated"
18516
+ },
18517
+ "403" : {
18518
+ "description" : "Forbidden — the caller is not part of the organization"
18519
+ }
18520
+ },
18521
+ "summary" : "List the agents at work on the caller's tickets",
18522
+ "tags" : [ "tickets" ]
18523
+ }
18524
+ },
18428
18525
  "/tickets/{ticketId}" : {
18429
18526
  "get" : {
18430
18527
  "description" : "Ticket avec ses assignés et leurs états.",
@@ -18788,6 +18885,69 @@
18788
18885
  "tags" : [ "tickets" ]
18789
18886
  }
18790
18887
  },
18888
+ "/tickets/{ticketId}/agents/{agentId}/session/messages" : {
18889
+ "post" : {
18890
+ "description" : "Le message rejoint la session de travail de l'agent au prochain réveil, qui est mis en file (après le tour en cours ou la réponse à une question en attente). Le fil du ticket garde la trace de l'envoi, sans le texte.",
18891
+ "operationId" : "writeTicketAgentSessionMessage",
18892
+ "parameters" : [ {
18893
+ "description" : "ID of the ticket",
18894
+ "in" : "path",
18895
+ "name" : "ticketId",
18896
+ "required" : true,
18897
+ "schema" : {
18898
+ "format" : "uuid",
18899
+ "type" : "string"
18900
+ }
18901
+ }, {
18902
+ "description" : "Identifiant de l'agent",
18903
+ "in" : "path",
18904
+ "name" : "agentId",
18905
+ "required" : true,
18906
+ "schema" : {
18907
+ "type" : "string"
18908
+ }
18909
+ } ],
18910
+ "requestBody" : {
18911
+ "content" : {
18912
+ "application/json" : {
18913
+ "schema" : {
18914
+ "$ref" : "#/components/schemas/TicketSessionMessageRequest"
18915
+ }
18916
+ }
18917
+ },
18918
+ "required" : true
18919
+ },
18920
+ "responses" : {
18921
+ "201" : {
18922
+ "content" : {
18923
+ "application/json" : {
18924
+ "schema" : {
18925
+ "$ref" : "#/components/schemas/TicketEvent"
18926
+ }
18927
+ }
18928
+ },
18929
+ "description" : "Message mis en file ; l'événement de trace du ticket"
18930
+ },
18931
+ "400" : {
18932
+ "description" : "Invalid body"
18933
+ },
18934
+ "401" : {
18935
+ "description" : "Unauthenticated"
18936
+ },
18937
+ "403" : {
18938
+ "description" : "Forbidden — the caller is not part of the organization or not a member of the project"
18939
+ },
18940
+ "404" : {
18941
+ "description" : "Not found"
18942
+ },
18943
+ "409" : {
18944
+ "description" : "Agent work is disabled for this project"
18945
+ }
18946
+ },
18947
+ "summary" : "Write to an agent in its work session on a ticket",
18948
+ "tags" : [ "tickets" ]
18949
+ }
18950
+ },
18791
18951
  "/tickets/{ticketId}/usage" : {
18792
18952
  "get" : {
18793
18953
  "description" : "Tokens consommés par les sessions de travail des agents sur le ticket et par les appels qu'elles ont faits à d'autres agents : au total, par modèle, et par agent puis par modèle.",
@@ -27198,6 +27358,14 @@
27198
27358
  },
27199
27359
  "type" : "array"
27200
27360
  },
27361
+ "pinnedProjectIds" : {
27362
+ "description" : "Liste ordonnée des espaces de travail épinglés dans la barre latérale",
27363
+ "items" : {
27364
+ "format" : "uuid",
27365
+ "type" : "string"
27366
+ },
27367
+ "type" : "array"
27368
+ },
27201
27369
  "railOpen" : {
27202
27370
  "type" : "boolean"
27203
27371
  },
@@ -27209,7 +27377,7 @@
27209
27377
  "type" : "array"
27210
27378
  }
27211
27379
  },
27212
- "required" : [ "agentConversations", "pinnedAgentIds", "railOpen" ],
27380
+ "required" : [ "agentConversations", "pinnedAgentIds", "pinnedProjectIds", "railOpen" ],
27213
27381
  "type" : "object"
27214
27382
  },
27215
27383
  "UserAgentConversation" : {
@@ -27236,6 +27404,13 @@
27236
27404
  },
27237
27405
  "type" : "array"
27238
27406
  },
27407
+ "pinnedProjectIds" : {
27408
+ "items" : {
27409
+ "format" : "uuid",
27410
+ "type" : "string"
27411
+ },
27412
+ "type" : "array"
27413
+ },
27239
27414
  "railOpen" : {
27240
27415
  "type" : "boolean"
27241
27416
  }
@@ -32638,9 +32813,13 @@
32638
32813
  },
32639
32814
  "goAheads" : {
32640
32815
  "type" : "integer"
32816
+ },
32817
+ "approvals" : {
32818
+ "description" : "Demandes d'approbation posées par un agent",
32819
+ "type" : "integer"
32641
32820
  }
32642
32821
  },
32643
- "required" : [ "goAheads", "proposals", "questions", "reviews" ],
32822
+ "required" : [ "approvals", "goAheads", "proposals", "questions", "reviews" ],
32644
32823
  "type" : "object"
32645
32824
  },
32646
32825
  "ProjectActivity" : {
@@ -33082,6 +33261,108 @@
33082
33261
  "required" : [ "id", "type" ],
33083
33262
  "type" : "object"
33084
33263
  },
33264
+ "TicketThreads" : {
33265
+ "properties" : {
33266
+ "open" : {
33267
+ "description" : "Tous les tickets ouverts du projet",
33268
+ "items" : {
33269
+ "$ref" : "#/components/schemas/TicketThread"
33270
+ },
33271
+ "type" : "array"
33272
+ },
33273
+ "done" : {
33274
+ "description" : "Les tickets terminés les plus récents",
33275
+ "items" : {
33276
+ "$ref" : "#/components/schemas/TicketThread"
33277
+ },
33278
+ "type" : "array"
33279
+ },
33280
+ "doneTotal" : {
33281
+ "description" : "Nombre total de tickets terminés",
33282
+ "type" : "integer"
33283
+ }
33284
+ },
33285
+ "required" : [ "done", "doneTotal", "open" ],
33286
+ "type" : "object"
33287
+ },
33288
+ "TicketThread" : {
33289
+ "allOf" : [ {
33290
+ "$ref" : "#/components/schemas/Ticket"
33291
+ }, {
33292
+ "properties" : {
33293
+ "sessions" : {
33294
+ "items" : {
33295
+ "$ref" : "#/components/schemas/TicketThreadSession"
33296
+ },
33297
+ "type" : "array"
33298
+ }
33299
+ },
33300
+ "required" : [ "sessions" ],
33301
+ "type" : "object"
33302
+ } ]
33303
+ },
33304
+ "TicketThreadSession" : {
33305
+ "description" : "Une session de travail d'agent, sous-fil d'un ticket dans la vue « Fils ». Le statut vient des réveils et des questions en attente, sans relire la conversation.",
33306
+ "properties" : {
33307
+ "agentId" : {
33308
+ "type" : "string"
33309
+ },
33310
+ "status" : {
33311
+ "$ref" : "#/components/schemas/TicketAgentRunStatus"
33312
+ },
33313
+ "conversationId" : {
33314
+ "description" : "null tant que l'agent n'a pas commencé (premier réveil en attente)",
33315
+ "format" : "uuid",
33316
+ "nullable" : true,
33317
+ "type" : "string"
33318
+ },
33319
+ "planDone" : {
33320
+ "description" : "Étapes terminées du plan publié",
33321
+ "type" : "integer"
33322
+ },
33323
+ "planTotal" : {
33324
+ "description" : "Étapes du plan publié ; 0 sans plan",
33325
+ "type" : "integer"
33326
+ },
33327
+ "currentStep" : {
33328
+ "description" : "Étape en cours du plan",
33329
+ "nullable" : true,
33330
+ "type" : "string"
33331
+ },
33332
+ "lastRunAt" : {
33333
+ "nullable" : true,
33334
+ "type" : "string"
33335
+ }
33336
+ },
33337
+ "required" : [ "agentId", "conversationId", "currentStep", "lastRunAt", "planDone", "planTotal", "status" ],
33338
+ "type" : "object"
33339
+ },
33340
+ "AgentAtWork" : {
33341
+ "description" : "Un agent assigné à un ticket ouvert qui concerne l'utilisateur (créateur, assigné ou relecteur), et qui travaille, attend une réponse ou est bloqué.",
33342
+ "properties" : {
33343
+ "ticket" : {
33344
+ "$ref" : "#/components/schemas/TicketParentRef"
33345
+ },
33346
+ "project" : {
33347
+ "$ref" : "#/components/schemas/AgentAtWork_project"
33348
+ },
33349
+ "agentId" : {
33350
+ "type" : "string"
33351
+ },
33352
+ "state" : {
33353
+ "$ref" : "#/components/schemas/TicketAssigneeState"
33354
+ },
33355
+ "stateNote" : {
33356
+ "nullable" : true,
33357
+ "type" : "string"
33358
+ },
33359
+ "updatedAt" : {
33360
+ "type" : "string"
33361
+ }
33362
+ },
33363
+ "required" : [ "agentId", "project", "state", "stateNote", "ticket", "updatedAt" ],
33364
+ "type" : "object"
33365
+ },
33085
33366
  "UpdateTicketRequest" : {
33086
33367
  "description" : "Mise à jour partielle — une propriété absente reste inchangée. Le projet ne change pas.",
33087
33368
  "properties" : {
@@ -33249,6 +33530,56 @@
33249
33530
  "required" : [ "status", "title" ],
33250
33531
  "type" : "object"
33251
33532
  },
33533
+ "TicketSessionMessageRequest" : {
33534
+ "properties" : {
33535
+ "body" : {
33536
+ "maxLength" : 20000,
33537
+ "minLength" : 1,
33538
+ "type" : "string"
33539
+ }
33540
+ },
33541
+ "required" : [ "body" ],
33542
+ "type" : "object"
33543
+ },
33544
+ "TicketEvent" : {
33545
+ "properties" : {
33546
+ "id" : {
33547
+ "format" : "uuid",
33548
+ "type" : "string"
33549
+ },
33550
+ "ticketId" : {
33551
+ "format" : "uuid",
33552
+ "type" : "string"
33553
+ },
33554
+ "author" : {
33555
+ "$ref" : "#/components/schemas/ActorRef"
33556
+ },
33557
+ "kind" : {
33558
+ "$ref" : "#/components/schemas/TicketEventKind"
33559
+ },
33560
+ "body" : {
33561
+ "nullable" : true,
33562
+ "type" : "string"
33563
+ },
33564
+ "data" : {
33565
+ "additionalProperties" : true,
33566
+ "description" : "Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest: TicketQuestion } ; pour approval, { approval: TicketApproval } ; mentions dans { mentions: MemberRef[] }.",
33567
+ "type" : "object"
33568
+ },
33569
+ "artifactIds" : {
33570
+ "items" : {
33571
+ "format" : "uuid",
33572
+ "type" : "string"
33573
+ },
33574
+ "type" : "array"
33575
+ },
33576
+ "createdAt" : {
33577
+ "type" : "string"
33578
+ }
33579
+ },
33580
+ "required" : [ "artifactIds", "author", "body", "createdAt", "data", "id", "kind", "ticketId" ],
33581
+ "type" : "object"
33582
+ },
33252
33583
  "TicketUsage" : {
33253
33584
  "description" : "Consommation du ticket : sessions de travail des agents et conversations ouvertes par leurs appels à d'autres agents. Modèles et agents triés du plus consommateur au moins consommateur.",
33254
33585
  "properties" : {
@@ -33340,45 +33671,6 @@
33340
33671
  "required" : [ "agentId", "inputTokens", "models", "outputTokens", "reasoningTokens", "totalTokens" ],
33341
33672
  "type" : "object"
33342
33673
  },
33343
- "TicketEvent" : {
33344
- "properties" : {
33345
- "id" : {
33346
- "format" : "uuid",
33347
- "type" : "string"
33348
- },
33349
- "ticketId" : {
33350
- "format" : "uuid",
33351
- "type" : "string"
33352
- },
33353
- "author" : {
33354
- "$ref" : "#/components/schemas/ActorRef"
33355
- },
33356
- "kind" : {
33357
- "$ref" : "#/components/schemas/TicketEventKind"
33358
- },
33359
- "body" : {
33360
- "nullable" : true,
33361
- "type" : "string"
33362
- },
33363
- "data" : {
33364
- "additionalProperties" : true,
33365
- "description" : "Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest: TicketQuestion } ; pour approval, { approval: TicketApproval } ; mentions dans { mentions: MemberRef[] }.",
33366
- "type" : "object"
33367
- },
33368
- "artifactIds" : {
33369
- "items" : {
33370
- "format" : "uuid",
33371
- "type" : "string"
33372
- },
33373
- "type" : "array"
33374
- },
33375
- "createdAt" : {
33376
- "type" : "string"
33377
- }
33378
- },
33379
- "required" : [ "artifactIds", "author", "body", "createdAt", "data", "id", "kind", "ticketId" ],
33380
- "type" : "object"
33381
- },
33382
33674
  "CreateTicketEventRequest" : {
33383
33675
  "description" : "Un commentaire humain ; les @mentions sont détectées dans le texte.",
33384
33676
  "properties" : {
@@ -38646,6 +38938,22 @@
38646
38938
  },
38647
38939
  "type" : "object"
38648
38940
  },
38941
+ "AgentAtWork_project" : {
38942
+ "properties" : {
38943
+ "id" : {
38944
+ "format" : "uuid",
38945
+ "type" : "string"
38946
+ },
38947
+ "key" : {
38948
+ "type" : "string"
38949
+ },
38950
+ "name" : {
38951
+ "type" : "string"
38952
+ }
38953
+ },
38954
+ "required" : [ "id", "key", "name" ],
38955
+ "type" : "object"
38956
+ },
38649
38957
  "TicketAgentExecution_pendingQuestion" : {
38650
38958
  "nullable" : true,
38651
38959
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.189",
3
+ "version": "1.0.191",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",