@breign/client 1.0.182 → 1.0.184

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 (33) hide show
  1. package/dist/apis/AdminApi.d.ts +14 -1
  2. package/dist/apis/AdminApi.js +31 -0
  3. package/dist/apis/EngineApi.d.ts +15 -1
  4. package/dist/apis/EngineApi.js +34 -0
  5. package/dist/apis/TicketsApi.d.ts +16 -1
  6. package/dist/apis/TicketsApi.js +37 -0
  7. package/dist/models/AiGatewayInternalSettingsSummaryUio.d.ts +7 -0
  8. package/dist/models/AiGatewayInternalSettingsSummaryUio.js +3 -0
  9. package/dist/models/AiGatewayModelTokenQuotaUio.d.ts +1 -1
  10. package/dist/models/AiGatewaySettingsUio.d.ts +7 -0
  11. package/dist/models/AiGatewaySettingsUio.js +3 -0
  12. package/dist/models/AiGatewaySettingsUpdateRequestUio.d.ts +7 -0
  13. package/dist/models/AiGatewaySettingsUpdateRequestUio.js +3 -0
  14. package/dist/models/AiGatewayUserBudgetUio.d.ts +58 -0
  15. package/dist/models/AiGatewayUserBudgetUio.js +67 -0
  16. package/dist/models/InboxItemKindUio.d.ts +2 -1
  17. package/dist/models/InboxItemKindUio.js +2 -1
  18. package/dist/models/ModelDefinitionUio.d.ts +1 -1
  19. package/dist/models/TicketApprovalDecisionUio.d.ts +26 -0
  20. package/dist/models/TicketApprovalDecisionUio.js +52 -0
  21. package/dist/models/TicketApprovalRequestUio.d.ts +39 -0
  22. package/dist/models/TicketApprovalRequestUio.js +53 -0
  23. package/dist/models/TicketEventKindUio.d.ts +2 -1
  24. package/dist/models/TicketEventKindUio.js +2 -1
  25. package/dist/models/TicketEventUio.d.ts +1 -1
  26. package/dist/models/TokenPriceSuggestionRequestUio.d.ts +39 -0
  27. package/dist/models/TokenPriceSuggestionRequestUio.js +55 -0
  28. package/dist/models/TokenPriceSuggestionUio.d.ts +70 -0
  29. package/dist/models/TokenPriceSuggestionUio.js +72 -0
  30. package/dist/models/index.d.ts +5 -0
  31. package/dist/models/index.js +5 -0
  32. package/dist/openapi.json +275 -7
  33. package/package.json +1 -1
package/dist/openapi.json CHANGED
@@ -7566,6 +7566,61 @@
7566
7566
  "tags" : [ "Engines" ]
7567
7567
  }
7568
7568
  },
7569
+ "/organizations/{organizationId}/engines/token-price-suggestions" : {
7570
+ "post" : {
7571
+ "description" : "Admin d'organisation. Prix au million de tokens proposés pour des modèles, en euros : tarifs Breign, sinon catalogue public (models.dev) converti au taux BCE du jour. C'est en euros que se comptent les budgets des utilisateurs. Un prix dont la devise ne se convertit pas est omis.",
7572
+ "operationId" : "suggestOrganizationTokenPrices",
7573
+ "parameters" : [ {
7574
+ "description" : "ID of the organization",
7575
+ "in" : "path",
7576
+ "name" : "organizationId",
7577
+ "required" : true,
7578
+ "schema" : {
7579
+ "type" : "string"
7580
+ }
7581
+ } ],
7582
+ "requestBody" : {
7583
+ "content" : {
7584
+ "application/json" : {
7585
+ "schema" : {
7586
+ "$ref" : "#/components/schemas/TokenPriceSuggestionRequest"
7587
+ }
7588
+ }
7589
+ },
7590
+ "required" : true
7591
+ },
7592
+ "responses" : {
7593
+ "200" : {
7594
+ "content" : {
7595
+ "application/json" : {
7596
+ "schema" : {
7597
+ "items" : {
7598
+ "$ref" : "#/components/schemas/TokenPriceSuggestion"
7599
+ },
7600
+ "type" : "array"
7601
+ }
7602
+ }
7603
+ },
7604
+ "description" : "Suggested prices in euros; models without a known price are omitted"
7605
+ },
7606
+ "400" : {
7607
+ "content" : {
7608
+ "application/json" : {
7609
+ "schema" : {
7610
+ "$ref" : "#/components/schemas/BodyWithMessage"
7611
+ }
7612
+ }
7613
+ },
7614
+ "description" : "Invalid request"
7615
+ },
7616
+ "403" : {
7617
+ "description" : "Forbidden — the caller is not an admin of the organization"
7618
+ }
7619
+ },
7620
+ "summary" : "Suggest token prices for organization engine models",
7621
+ "tags" : [ "engine" ]
7622
+ }
7623
+ },
7569
7624
  "/organizations/{organizationId}/engines/providers/with-embedding" : {
7570
7625
  "get" : {
7571
7626
  "description" : "Returns engine providers that support embedding for a given organization. Chaque provider est réduit aux seuls modèles marqués `hasEmbedding`.",
@@ -7885,6 +7940,52 @@
7885
7940
  "tags" : [ "admin" ]
7886
7941
  }
7887
7942
  },
7943
+ "/admin/platform-engines/token-price-suggestions" : {
7944
+ "post" : {
7945
+ "description" : "Superadmin. Prix au million de tokens proposés pour des modèles : tarifs Breign déjà enregistrés, sinon catalogue public (models.dev), dans leur devise d'origine.",
7946
+ "operationId" : "suggestPlatformTokenPrices",
7947
+ "requestBody" : {
7948
+ "content" : {
7949
+ "application/json" : {
7950
+ "schema" : {
7951
+ "$ref" : "#/components/schemas/TokenPriceSuggestionRequest"
7952
+ }
7953
+ }
7954
+ },
7955
+ "required" : true
7956
+ },
7957
+ "responses" : {
7958
+ "200" : {
7959
+ "content" : {
7960
+ "application/json" : {
7961
+ "schema" : {
7962
+ "items" : {
7963
+ "$ref" : "#/components/schemas/TokenPriceSuggestion"
7964
+ },
7965
+ "type" : "array"
7966
+ }
7967
+ }
7968
+ },
7969
+ "description" : "Suggested prices; models without a known price are omitted"
7970
+ },
7971
+ "400" : {
7972
+ "content" : {
7973
+ "application/json" : {
7974
+ "schema" : {
7975
+ "$ref" : "#/components/schemas/BodyWithMessage"
7976
+ }
7977
+ }
7978
+ },
7979
+ "description" : "Invalid request"
7980
+ },
7981
+ "403" : {
7982
+ "description" : "Forbidden — superadmin only"
7983
+ }
7984
+ },
7985
+ "summary" : "Suggest token prices for platform engine models",
7986
+ "tags" : [ "admin" ]
7987
+ }
7988
+ },
7888
7989
  "/admin/platform-engines/{id}" : {
7889
7990
  "delete" : {
7890
7991
  "operationId" : "deletePlatformEngine",
@@ -18405,6 +18506,69 @@
18405
18506
  "tags" : [ "tickets" ]
18406
18507
  }
18407
18508
  },
18509
+ "/tickets/{ticketId}/approvals/{eventId}" : {
18510
+ "post" : {
18511
+ "description" : "Réponse de l'humain visé (ou d'un responsable du projet) à une demande d'approbation d'un agent. Le statut du ticket ne change pas ; l'agent est réveillé avec la réponse.",
18512
+ "operationId" : "decideTicketApproval",
18513
+ "parameters" : [ {
18514
+ "description" : "ID of the ticket",
18515
+ "in" : "path",
18516
+ "name" : "ticketId",
18517
+ "required" : true,
18518
+ "schema" : {
18519
+ "format" : "uuid",
18520
+ "type" : "string"
18521
+ }
18522
+ }, {
18523
+ "description" : "L'événement approval qui porte la demande.",
18524
+ "in" : "path",
18525
+ "name" : "eventId",
18526
+ "required" : true,
18527
+ "schema" : {
18528
+ "type" : "string"
18529
+ }
18530
+ } ],
18531
+ "requestBody" : {
18532
+ "content" : {
18533
+ "application/json" : {
18534
+ "schema" : {
18535
+ "$ref" : "#/components/schemas/TicketApprovalRequest"
18536
+ }
18537
+ }
18538
+ },
18539
+ "required" : true
18540
+ },
18541
+ "responses" : {
18542
+ "200" : {
18543
+ "content" : {
18544
+ "application/json" : {
18545
+ "schema" : {
18546
+ "$ref" : "#/components/schemas/Ticket"
18547
+ }
18548
+ }
18549
+ },
18550
+ "description" : "OK"
18551
+ },
18552
+ "400" : {
18553
+ "description" : "Invalid request — changes without a comment"
18554
+ },
18555
+ "401" : {
18556
+ "description" : "Unauthenticated"
18557
+ },
18558
+ "403" : {
18559
+ "description" : "Forbidden — neither the approver nor a manager of the project"
18560
+ },
18561
+ "404" : {
18562
+ "description" : "Not found"
18563
+ },
18564
+ "409" : {
18565
+ "description" : "Conflict — the request is no longer waiting"
18566
+ }
18567
+ },
18568
+ "summary" : "Answer an agent's approval request",
18569
+ "tags" : [ "tickets" ]
18570
+ }
18571
+ },
18408
18572
  "/tickets/{ticketId}/agents/execution" : {
18409
18573
  "get" : {
18410
18574
  "description" : "Pour chaque agent assigné : réveil en attente, exécution en cours, question en attente, plan publié et occupation du contexte de sa session de travail.",
@@ -26882,7 +27046,7 @@
26882
27046
  "type" : "integer"
26883
27047
  },
26884
27048
  "inputTokenPrice" : {
26885
- "description" : "Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme.",
27049
+ "description" : "Prix d'un million de tokens en entrée. Défini par le superadmin sur un moteur plateforme, ou par l'admin d'organisation sur ses moteurs à clé propre (compté dans les budgets en euros).",
26886
27050
  "minimum" : 0,
26887
27051
  "type" : "number"
26888
27052
  },
@@ -26929,6 +27093,54 @@
26929
27093
  "required" : [ "id", "models", "name", "providerType" ],
26930
27094
  "type" : "object"
26931
27095
  },
27096
+ "TokenPriceSuggestionRequest" : {
27097
+ "properties" : {
27098
+ "providerType" : {
27099
+ "$ref" : "#/components/schemas/ProviderType"
27100
+ },
27101
+ "modelIds" : {
27102
+ "description" : "Identifiants des modèles chez le fournisseur (`modelId`).",
27103
+ "items" : {
27104
+ "type" : "string"
27105
+ },
27106
+ "maxItems" : 50,
27107
+ "minItems" : 1,
27108
+ "type" : "array"
27109
+ }
27110
+ },
27111
+ "required" : [ "modelIds", "providerType" ],
27112
+ "type" : "object"
27113
+ },
27114
+ "TokenPriceSuggestion" : {
27115
+ "properties" : {
27116
+ "modelId" : {
27117
+ "type" : "string"
27118
+ },
27119
+ "inputTokenPrice" : {
27120
+ "description" : "Prix d'un million de tokens en entrée.",
27121
+ "type" : "number"
27122
+ },
27123
+ "outputTokenPrice" : {
27124
+ "description" : "Prix d'un million de tokens en sortie.",
27125
+ "type" : "number"
27126
+ },
27127
+ "currency" : {
27128
+ "description" : "Devise des prix (ISO 4217).",
27129
+ "type" : "string"
27130
+ },
27131
+ "source" : {
27132
+ "description" : "configuration = tarifs déjà enregistrés par Breign ; catalog = catalogue public (models.dev).",
27133
+ "enum" : [ "configuration", "catalog" ],
27134
+ "type" : "string"
27135
+ },
27136
+ "convertedFrom" : {
27137
+ "description" : "Devise d'origine quand les prix ont été convertis en euros au taux du jour (BCE). Absent sans conversion.",
27138
+ "type" : "string"
27139
+ }
27140
+ },
27141
+ "required" : [ "currency", "modelId", "source" ],
27142
+ "type" : "object"
27143
+ },
26932
27144
  "EmbeddingProvider" : {
26933
27145
  "properties" : {
26934
27146
  "id" : {
@@ -30790,6 +31002,13 @@
30790
31002
  },
30791
31003
  "type" : "array"
30792
31004
  },
31005
+ "userBudgets" : {
31006
+ "description" : "Budgets en euros par utilisateur (moteurs à clé propre seulement ; vide côté plateforme).",
31007
+ "items" : {
31008
+ "$ref" : "#/components/schemas/AiGatewayUserBudget"
31009
+ },
31010
+ "type" : "array"
31011
+ },
30793
31012
  "updatedAt" : {
30794
31013
  "format" : "date-time",
30795
31014
  "type" : "string"
@@ -30805,7 +31024,7 @@
30805
31024
  "AiGatewayModelTokenQuota" : {
30806
31025
  "properties" : {
30807
31026
  "userId" : {
30808
- "description" : "Breign user id this quota applies to",
31027
+ "description" : "Breign user id this quota applies to, or `*` for every user (each one separately). A quota on a specific user overrides the `*` one for that user.",
30809
31028
  "type" : "string"
30810
31029
  },
30811
31030
  "model" : {
@@ -30829,6 +31048,31 @@
30829
31048
  "required" : [ "limit", "model", "period", "userId" ],
30830
31049
  "type" : "object"
30831
31050
  },
31051
+ "AiGatewayUserBudget" : {
31052
+ "properties" : {
31053
+ "userId" : {
31054
+ "description" : "Breign user id this budget applies to, or `*` for every user (each one separately). A budget on a specific user overrides the `*` one for that user.",
31055
+ "type" : "string"
31056
+ },
31057
+ "amount" : {
31058
+ "description" : "Budget en euros pour la période, tous modèles à clé propre de l'organisation confondus. Une consommation sans prix en euros n'y compte pas.",
31059
+ "exclusiveMinimum" : true,
31060
+ "minimum" : 0,
31061
+ "type" : "number"
31062
+ },
31063
+ "period" : {
31064
+ "enum" : [ "day", "month" ],
31065
+ "type" : "string"
31066
+ },
31067
+ "used" : {
31068
+ "description" : "Euros déjà consommés sur la période en cours (réponse seulement). Absent pour `*` : chaque utilisateur a sa propre consommation.",
31069
+ "readOnly" : true,
31070
+ "type" : "number"
31071
+ }
31072
+ },
31073
+ "required" : [ "amount", "period", "userId" ],
31074
+ "type" : "object"
31075
+ },
30832
31076
  "AiGatewaySettingsUpdateRequest" : {
30833
31077
  "properties" : {
30834
31078
  "gatewayRpm" : {
@@ -30841,6 +31085,13 @@
30841
31085
  "$ref" : "#/components/schemas/AiGatewayModelTokenQuota"
30842
31086
  },
30843
31087
  "type" : "array"
31088
+ },
31089
+ "userBudgets" : {
31090
+ "description" : "Remplace tous les budgets. Refusé sur les réglages plateforme.",
31091
+ "items" : {
31092
+ "$ref" : "#/components/schemas/AiGatewayUserBudget"
31093
+ },
31094
+ "type" : "array"
30844
31095
  }
30845
31096
  },
30846
31097
  "type" : "object"
@@ -31849,6 +32100,18 @@
31849
32100
  "required" : [ "decision" ],
31850
32101
  "type" : "object"
31851
32102
  },
32103
+ "TicketApprovalRequest" : {
32104
+ "properties" : {
32105
+ "decision" : {
32106
+ "$ref" : "#/components/schemas/TicketApprovalDecision"
32107
+ },
32108
+ "comment" : {
32109
+ "type" : "string"
32110
+ }
32111
+ },
32112
+ "required" : [ "decision" ],
32113
+ "type" : "object"
32114
+ },
31852
32115
  "TicketAgentExecution" : {
31853
32116
  "description" : "Ce que fait un agent assigné sur le ticket, pour le panneau « Exécution en cours ».",
31854
32117
  "properties" : {
@@ -32041,7 +32304,7 @@
32041
32304
  },
32042
32305
  "data" : {
32043
32306
  "additionalProperties" : true,
32044
- "description" : "Détails selon le type : pour event, { action, from?, to?, member? } ; pour report, { title } ; pour question, { humanRequest: TicketQuestion } ; mentions dans { mentions: MemberRef[] }.",
32307
+ "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[] }.",
32045
32308
  "type" : "object"
32046
32309
  },
32047
32310
  "artifactIds" : {
@@ -34300,13 +34563,18 @@
34300
34563
  "enum" : [ "approve", "changes" ],
34301
34564
  "type" : "string"
34302
34565
  },
34566
+ "TicketApprovalDecision" : {
34567
+ "description" : "approve = l'agent peut agir ; changes = il corrige puis redemande (commentaire requis) ; reject = il renonce.",
34568
+ "enum" : [ "approve", "changes", "reject" ],
34569
+ "type" : "string"
34570
+ },
34303
34571
  "TicketPlanStepStatus" : {
34304
34572
  "enum" : [ "todo", "doing", "done" ],
34305
34573
  "type" : "string"
34306
34574
  },
34307
34575
  "TicketEventKind" : {
34308
- "description" : "comment et report sont écrits par un humain ou un agent ; question porte une question d'agent à un humain ; event est une trace système (création, statut, assignation…).",
34309
- "enum" : [ "comment", "report", "question", "event" ],
34576
+ "description" : "comment et report sont écrits par un humain ou un agent ; question porte une question d'agent à un humain ; approval une demande d'approbation d'un agent ; event est une trace système (création, statut, assignation…).",
34577
+ "enum" : [ "comment", "report", "question", "approval", "event" ],
34310
34578
  "type" : "string"
34311
34579
  },
34312
34580
  "TicketArtifactSource" : {
@@ -34322,8 +34590,8 @@
34322
34590
  "type" : "string"
34323
34591
  },
34324
34592
  "InboxItemKind" : {
34325
- "description" : "question, ticket_proposal, review et go_ahead sont des actions (onglet « À traiter ») ; mention a son propre onglet.",
34326
- "enum" : [ "question", "ticket_proposal", "review", "go_ahead", "mention" ],
34593
+ "description" : "question, ticket_proposal, review, go_ahead et approval sont des actions (onglet « À traiter ») ; mention a son propre onglet.",
34594
+ "enum" : [ "question", "ticket_proposal", "review", "go_ahead", "approval", "mention" ],
34327
34595
  "type" : "string"
34328
34596
  },
34329
34597
  "InboxItemStatus" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.182",
3
+ "version": "1.0.184",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",