@breign/client 1.0.179 → 1.0.180

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
@@ -19699,6 +19699,182 @@
19699
19699
  "tags" : [ "tickets" ]
19700
19700
  }
19701
19701
  },
19702
+ "/organizations/{organizationId}/automations" : {
19703
+ "get" : {
19704
+ "description" : "Every member of the organization can read them, as they can read its agents.",
19705
+ "operationId" : "listOrganizationAutomations",
19706
+ "parameters" : [ {
19707
+ "description" : "ID of the organization",
19708
+ "in" : "path",
19709
+ "name" : "organizationId",
19710
+ "required" : true,
19711
+ "schema" : {
19712
+ "type" : "string"
19713
+ }
19714
+ }, {
19715
+ "in" : "query",
19716
+ "name" : "agentId",
19717
+ "required" : false,
19718
+ "schema" : {
19719
+ "type" : "string"
19720
+ }
19721
+ }, {
19722
+ "in" : "query",
19723
+ "name" : "trigger",
19724
+ "required" : false,
19725
+ "schema" : {
19726
+ "$ref" : "#/components/schemas/AutomationTriggerKind"
19727
+ }
19728
+ }, {
19729
+ "description" : "Comma-separated statuses among active, paused, done (default active,paused).",
19730
+ "in" : "query",
19731
+ "name" : "status",
19732
+ "required" : false,
19733
+ "schema" : {
19734
+ "type" : "string"
19735
+ }
19736
+ }, {
19737
+ "in" : "query",
19738
+ "name" : "q",
19739
+ "required" : false,
19740
+ "schema" : {
19741
+ "type" : "string"
19742
+ }
19743
+ }, {
19744
+ "in" : "query",
19745
+ "name" : "limit",
19746
+ "required" : false,
19747
+ "schema" : {
19748
+ "default" : 50,
19749
+ "maximum" : 100,
19750
+ "minimum" : 1,
19751
+ "type" : "integer"
19752
+ }
19753
+ }, {
19754
+ "in" : "query",
19755
+ "name" : "offset",
19756
+ "required" : false,
19757
+ "schema" : {
19758
+ "default" : 0,
19759
+ "minimum" : 0,
19760
+ "type" : "integer"
19761
+ }
19762
+ } ],
19763
+ "responses" : {
19764
+ "200" : {
19765
+ "content" : {
19766
+ "application/json" : {
19767
+ "schema" : {
19768
+ "$ref" : "#/components/schemas/AutomationList"
19769
+ }
19770
+ }
19771
+ },
19772
+ "description" : "The automations, newest first, with their key figures"
19773
+ },
19774
+ "400" : {
19775
+ "description" : "Invalid query"
19776
+ },
19777
+ "401" : {
19778
+ "description" : "Unauthorized"
19779
+ },
19780
+ "403" : {
19781
+ "description" : "Not a member of the organization"
19782
+ },
19783
+ "404" : {
19784
+ "description" : "Agent not in the organization"
19785
+ }
19786
+ },
19787
+ "summary" : "The automations of the organization, or of one of its agents",
19788
+ "tags" : [ "scheduledTasks" ]
19789
+ }
19790
+ },
19791
+ "/organizations/{organizationId}/automation-runs" : {
19792
+ "get" : {
19793
+ "description" : "Most recent first. Every member of the organization can read them.",
19794
+ "operationId" : "listOrganizationAutomationRuns",
19795
+ "parameters" : [ {
19796
+ "description" : "ID of the organization",
19797
+ "in" : "path",
19798
+ "name" : "organizationId",
19799
+ "required" : true,
19800
+ "schema" : {
19801
+ "type" : "string"
19802
+ }
19803
+ }, {
19804
+ "in" : "query",
19805
+ "name" : "agentId",
19806
+ "required" : false,
19807
+ "schema" : {
19808
+ "type" : "string"
19809
+ }
19810
+ }, {
19811
+ "in" : "query",
19812
+ "name" : "taskId",
19813
+ "required" : false,
19814
+ "schema" : {
19815
+ "type" : "string"
19816
+ }
19817
+ }, {
19818
+ "in" : "query",
19819
+ "name" : "trigger",
19820
+ "required" : false,
19821
+ "schema" : {
19822
+ "$ref" : "#/components/schemas/AutomationTriggerKind"
19823
+ }
19824
+ }, {
19825
+ "in" : "query",
19826
+ "name" : "status",
19827
+ "required" : false,
19828
+ "schema" : {
19829
+ "$ref" : "#/components/schemas/AutomationRunOutcome"
19830
+ }
19831
+ }, {
19832
+ "in" : "query",
19833
+ "name" : "before",
19834
+ "required" : false,
19835
+ "schema" : {
19836
+ "format" : "date-time",
19837
+ "type" : "string"
19838
+ }
19839
+ }, {
19840
+ "in" : "query",
19841
+ "name" : "limit",
19842
+ "required" : false,
19843
+ "schema" : {
19844
+ "default" : 30,
19845
+ "maximum" : 100,
19846
+ "minimum" : 1,
19847
+ "type" : "integer"
19848
+ }
19849
+ } ],
19850
+ "responses" : {
19851
+ "200" : {
19852
+ "content" : {
19853
+ "application/json" : {
19854
+ "schema" : {
19855
+ "$ref" : "#/components/schemas/AutomationRunList"
19856
+ }
19857
+ }
19858
+ },
19859
+ "description" : "The runs, with what triggered them and what became of their result"
19860
+ },
19861
+ "400" : {
19862
+ "description" : "Invalid query"
19863
+ },
19864
+ "401" : {
19865
+ "description" : "Unauthorized"
19866
+ },
19867
+ "403" : {
19868
+ "description" : "Not a member of the organization"
19869
+ },
19870
+ "404" : {
19871
+ "description" : "Agent not in the organization"
19872
+ }
19873
+ },
19874
+ "summary" : "The runs of the automations of the organization, or of one of its agents",
19875
+ "tags" : [ "scheduledTasks" ]
19876
+ }
19877
+ },
19702
19878
  "/organizations/{organizationId}/integrations/gitlab" : {
19703
19879
  "get" : {
19704
19880
  "operationId" : "listGitlabIntegrations",
@@ -32262,6 +32438,323 @@
32262
32438
  "required" : [ "assignees", "description", "priority", "reviewer", "startMode", "title", "workspacePaths" ],
32263
32439
  "type" : "object"
32264
32440
  },
32441
+ "AutomationTriggerKind" : {
32442
+ "description" : "What starts the automation, as shown in lists — its schedule, a GitLab mention, or its webhook.",
32443
+ "enum" : [ "schedule", "gitlab", "webhook" ],
32444
+ "type" : "string"
32445
+ },
32446
+ "AutomationList" : {
32447
+ "properties" : {
32448
+ "items" : {
32449
+ "items" : {
32450
+ "$ref" : "#/components/schemas/AutomationSummary"
32451
+ },
32452
+ "type" : "array"
32453
+ },
32454
+ "total" : {
32455
+ "type" : "integer"
32456
+ },
32457
+ "stats" : {
32458
+ "$ref" : "#/components/schemas/AutomationStats"
32459
+ }
32460
+ },
32461
+ "required" : [ "items", "stats", "total" ],
32462
+ "type" : "object"
32463
+ },
32464
+ "AutomationSummary" : {
32465
+ "properties" : {
32466
+ "id" : {
32467
+ "type" : "string"
32468
+ },
32469
+ "name" : {
32470
+ "nullable" : true,
32471
+ "type" : "string"
32472
+ },
32473
+ "message" : {
32474
+ "type" : "string"
32475
+ },
32476
+ "agentId" : {
32477
+ "type" : "string"
32478
+ },
32479
+ "agentName" : {
32480
+ "nullable" : true,
32481
+ "type" : "string"
32482
+ },
32483
+ "mode" : {
32484
+ "enum" : [ "once", "recurring" ],
32485
+ "type" : "string"
32486
+ },
32487
+ "status" : {
32488
+ "enum" : [ "active", "paused", "done" ],
32489
+ "type" : "string"
32490
+ },
32491
+ "trigger" : {
32492
+ "$ref" : "#/components/schemas/AutomationTriggerKind"
32493
+ },
32494
+ "schedule" : {
32495
+ "allOf" : [ {
32496
+ "$ref" : "#/components/schemas/TaskSchedule"
32497
+ } ],
32498
+ "nullable" : true
32499
+ },
32500
+ "timezone" : {
32501
+ "type" : "string"
32502
+ },
32503
+ "nextRunAt" : {
32504
+ "format" : "date-time",
32505
+ "nullable" : true,
32506
+ "type" : "string"
32507
+ },
32508
+ "callbackUrl" : {
32509
+ "nullable" : true,
32510
+ "type" : "string"
32511
+ },
32512
+ "lastRun" : {
32513
+ "allOf" : [ {
32514
+ "$ref" : "#/components/schemas/AutomationLastRun"
32515
+ } ],
32516
+ "nullable" : true
32517
+ },
32518
+ "days" : {
32519
+ "description" : "The last 7 UTC days, oldest first.",
32520
+ "items" : {
32521
+ "$ref" : "#/components/schemas/AutomationDayCount"
32522
+ },
32523
+ "type" : "array"
32524
+ },
32525
+ "runs7d" : {
32526
+ "type" : "integer"
32527
+ }
32528
+ },
32529
+ "required" : [ "agentId", "agentName", "callbackUrl", "days", "id", "lastRun", "message", "mode", "name", "nextRunAt", "runs7d", "schedule", "status", "timezone", "trigger" ],
32530
+ "type" : "object"
32531
+ },
32532
+ "AutomationLastRun" : {
32533
+ "properties" : {
32534
+ "id" : {
32535
+ "type" : "string"
32536
+ },
32537
+ "status" : {
32538
+ "$ref" : "#/components/schemas/AutomationRunOutcome"
32539
+ },
32540
+ "triggeredAt" : {
32541
+ "format" : "date-time",
32542
+ "type" : "string"
32543
+ },
32544
+ "finishedAt" : {
32545
+ "format" : "date-time",
32546
+ "nullable" : true,
32547
+ "type" : "string"
32548
+ }
32549
+ },
32550
+ "required" : [ "finishedAt", "id", "status", "triggeredAt" ],
32551
+ "type" : "object"
32552
+ },
32553
+ "AutomationRunOutcome" : {
32554
+ "enum" : [ "success", "error", "running" ],
32555
+ "type" : "string"
32556
+ },
32557
+ "AutomationDayCount" : {
32558
+ "properties" : {
32559
+ "date" : {
32560
+ "description" : "UTC day, YYYY-MM-DD.",
32561
+ "type" : "string"
32562
+ },
32563
+ "success" : {
32564
+ "type" : "integer"
32565
+ },
32566
+ "error" : {
32567
+ "type" : "integer"
32568
+ }
32569
+ },
32570
+ "required" : [ "date", "error", "success" ],
32571
+ "type" : "object"
32572
+ },
32573
+ "AutomationStats" : {
32574
+ "properties" : {
32575
+ "active" : {
32576
+ "type" : "integer"
32577
+ },
32578
+ "event" : {
32579
+ "description" : "Active automations triggered by a GitLab mention or a webhook.",
32580
+ "type" : "integer"
32581
+ },
32582
+ "runs24h" : {
32583
+ "type" : "integer"
32584
+ },
32585
+ "runs7d" : {
32586
+ "type" : "integer"
32587
+ },
32588
+ "failures7d" : {
32589
+ "type" : "integer"
32590
+ },
32591
+ "pending" : {
32592
+ "description" : "Mentions and webhook calls of the organization not handled yet.",
32593
+ "type" : "integer"
32594
+ }
32595
+ },
32596
+ "required" : [ "active", "event", "failures7d", "pending", "runs24h", "runs7d" ],
32597
+ "type" : "object"
32598
+ },
32599
+ "AutomationRunList" : {
32600
+ "properties" : {
32601
+ "runs" : {
32602
+ "items" : {
32603
+ "$ref" : "#/components/schemas/AutomationRun"
32604
+ },
32605
+ "type" : "array"
32606
+ },
32607
+ "nextBefore" : {
32608
+ "description" : "Pass as `before` to get the next page; null on the last one.",
32609
+ "format" : "date-time",
32610
+ "nullable" : true,
32611
+ "type" : "string"
32612
+ }
32613
+ },
32614
+ "required" : [ "nextBefore", "runs" ],
32615
+ "type" : "object"
32616
+ },
32617
+ "AutomationRun" : {
32618
+ "properties" : {
32619
+ "id" : {
32620
+ "type" : "string"
32621
+ },
32622
+ "taskId" : {
32623
+ "type" : "string"
32624
+ },
32625
+ "taskName" : {
32626
+ "nullable" : true,
32627
+ "type" : "string"
32628
+ },
32629
+ "agentId" : {
32630
+ "type" : "string"
32631
+ },
32632
+ "agentName" : {
32633
+ "nullable" : true,
32634
+ "type" : "string"
32635
+ },
32636
+ "status" : {
32637
+ "$ref" : "#/components/schemas/AutomationRunOutcome"
32638
+ },
32639
+ "triggeredAt" : {
32640
+ "format" : "date-time",
32641
+ "type" : "string"
32642
+ },
32643
+ "startedAt" : {
32644
+ "format" : "date-time",
32645
+ "nullable" : true,
32646
+ "type" : "string"
32647
+ },
32648
+ "finishedAt" : {
32649
+ "format" : "date-time",
32650
+ "nullable" : true,
32651
+ "type" : "string"
32652
+ },
32653
+ "durationMs" : {
32654
+ "nullable" : true,
32655
+ "type" : "integer"
32656
+ },
32657
+ "conversationId" : {
32658
+ "nullable" : true,
32659
+ "type" : "string"
32660
+ },
32661
+ "trigger" : {
32662
+ "$ref" : "#/components/schemas/AutomationTriggerKind"
32663
+ },
32664
+ "source" : {
32665
+ "$ref" : "#/components/schemas/AutomationRunSource"
32666
+ },
32667
+ "delivery" : {
32668
+ "$ref" : "#/components/schemas/AutomationRunDelivery"
32669
+ },
32670
+ "reply" : {
32671
+ "description" : "Start of the agent answer (500 characters at most).",
32672
+ "nullable" : true,
32673
+ "type" : "string"
32674
+ },
32675
+ "error" : {
32676
+ "nullable" : true,
32677
+ "type" : "string"
32678
+ }
32679
+ },
32680
+ "required" : [ "agentId", "agentName", "conversationId", "delivery", "durationMs", "error", "finishedAt", "id", "reply", "source", "startedAt", "status", "taskId", "taskName", "trigger", "triggeredAt" ],
32681
+ "type" : "object"
32682
+ },
32683
+ "AutomationRunSource" : {
32684
+ "description" : "What triggered the run. `schedule`: `schedule`, `timezone`, `mode`. `gitlab`: `author`, `authorUsername`, `ref`, `title`, `url`, `text` (untrusted user content). `webhook`: `thread`, `contentType`.",
32685
+ "properties" : {
32686
+ "kind" : {
32687
+ "$ref" : "#/components/schemas/AutomationTriggerKind"
32688
+ },
32689
+ "schedule" : {
32690
+ "allOf" : [ {
32691
+ "$ref" : "#/components/schemas/TaskSchedule"
32692
+ } ],
32693
+ "nullable" : true
32694
+ },
32695
+ "timezone" : {
32696
+ "type" : "string"
32697
+ },
32698
+ "mode" : {
32699
+ "enum" : [ "once", "recurring" ],
32700
+ "type" : "string"
32701
+ },
32702
+ "author" : {
32703
+ "type" : "string"
32704
+ },
32705
+ "authorUsername" : {
32706
+ "type" : "string"
32707
+ },
32708
+ "ref" : {
32709
+ "type" : "string"
32710
+ },
32711
+ "title" : {
32712
+ "nullable" : true,
32713
+ "type" : "string"
32714
+ },
32715
+ "url" : {
32716
+ "nullable" : true,
32717
+ "type" : "string"
32718
+ },
32719
+ "text" : {
32720
+ "type" : "string"
32721
+ },
32722
+ "thread" : {
32723
+ "nullable" : true,
32724
+ "type" : "string"
32725
+ },
32726
+ "contentType" : {
32727
+ "type" : "string"
32728
+ }
32729
+ },
32730
+ "required" : [ "kind" ],
32731
+ "type" : "object"
32732
+ },
32733
+ "AutomationRunDelivery" : {
32734
+ "description" : "What became of the result — the reply in the GitLab thread, the caller's callback, or nothing.",
32735
+ "properties" : {
32736
+ "kind" : {
32737
+ "enum" : [ "gitlab_reply", "callback", "none" ],
32738
+ "type" : "string"
32739
+ },
32740
+ "eventStatus" : {
32741
+ "allOf" : [ {
32742
+ "$ref" : "#/components/schemas/ExternalEventStatus"
32743
+ } ],
32744
+ "nullable" : true
32745
+ },
32746
+ "url" : {
32747
+ "nullable" : true,
32748
+ "type" : "string"
32749
+ },
32750
+ "error" : {
32751
+ "nullable" : true,
32752
+ "type" : "string"
32753
+ }
32754
+ },
32755
+ "required" : [ "error", "eventStatus", "kind", "url" ],
32756
+ "type" : "object"
32757
+ },
32265
32758
  "GitlabIntegration" : {
32266
32759
  "description" : "A GitLab instance linked to an organization. Its projects send webhooks to `webhookUrl`.",
32267
32760
  "properties" : {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/client",
3
- "version": "1.0.179",
3
+ "version": "1.0.180",
4
4
  "main": "dist/index.js",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",