@proofline/sdk 5.7.1 → 5.9.0

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/schema.d.ts CHANGED
@@ -826,6 +826,13 @@ export interface components {
826
826
  */
827
827
  review_id: string;
828
828
  };
829
+ /**
830
+ * @description What a review is counted under: the cause its assessments recorded, or
831
+ * `OUT_OF_CREDITS` where an assessment recorded the credit refusal. An
832
+ * assessment's detail names that refusal by the rule `public_reason_codes`
833
+ * applies; no other detail is read into the summary.
834
+ */
835
+ CountedCause: components["schemas"]["IncompleteCause"] | components["schemas"]["CreditRefusalCause"];
829
836
  /**
830
837
  * @description An upload refused for its content: a symbolic or unknown commit, or a
831
838
  * report that cannot be read. Nothing is stored.
@@ -880,6 +887,8 @@ export interface components {
880
887
  /** @description The commit the reports tested, as the upload named it. */
881
888
  tested_sha: string;
882
889
  };
890
+ /** @description The credit refusal, named apart from the `NOT_CONFIGURED` it records. */
891
+ CreditRefusalCause: "OUT_OF_CREDITS";
883
892
  CustomerAssessment: {
884
893
  /** @description The deterministic World checks recorded for this assessment. */
885
894
  checks: components["schemas"]["CustomerChecks"];
@@ -1402,6 +1411,13 @@ export interface components {
1402
1411
  * Null for a caller who is not a member of the organization.
1403
1412
  */
1404
1413
  cost_microcredits?: number | null;
1414
+ /**
1415
+ * @description `incomplete_causes` as the Inbox and the reviews `cause:` search
1416
+ * count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an
1417
+ * assessment records when credits refused it. Present exactly when
1418
+ * `incomplete_causes` is.
1419
+ */
1420
+ counted_incomplete_causes?: components["schemas"]["CountedCause"][];
1405
1421
  /**
1406
1422
  * Format: date-time
1407
1423
  * @description When the review was created.
@@ -1607,6 +1623,12 @@ export interface components {
1607
1623
  * @description One-based, append-only ordinal within one repository pull request.
1608
1624
  */
1609
1625
  run_number?: number | null;
1626
+ /**
1627
+ * @description Where an unfinished review's runs stand: running, queued for a worker,
1628
+ * waiting for a scheduled step, or due again after an attempt that did
1629
+ * not finish. Null once the review has ended.
1630
+ */
1631
+ run_progress?: components["schemas"]["RunProgress"] | null;
1610
1632
  /** @description The review's lifecycle status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`, `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`. */
1611
1633
  status: string;
1612
1634
  /**
@@ -2900,6 +2922,13 @@ export interface components {
2900
2922
  * @description When the review reached a terminal status. Absent while it is still pending or running.
2901
2923
  */
2902
2924
  completed_at?: string | null;
2925
+ /**
2926
+ * @description `incomplete_causes` as the Inbox and the reviews `cause:` search
2927
+ * count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an
2928
+ * assessment records when credits refused it. Present exactly when
2929
+ * `incomplete_causes` is.
2930
+ */
2931
+ counted_incomplete_causes?: components["schemas"]["CountedCause"][];
2903
2932
  /**
2904
2933
  * Format: date-time
2905
2934
  * @description When the review was created.
@@ -3256,6 +3285,34 @@ export interface components {
3256
3285
  */
3257
3286
  run_number: number;
3258
3287
  };
3288
+ /** @description Where an unfinished review's runs stand. */
3289
+ RunProgress: {
3290
+ /**
3291
+ * Format: int32
3292
+ * @description Attempts begun by the run in `state`, counting worker claims.
3293
+ */
3294
+ attempts: number;
3295
+ /**
3296
+ * Format: date-time
3297
+ * @description When the run in `state` is due: in the past for `QUEUED`, the next
3298
+ * attempt for `RETRY_SCHEDULED` and the next check for `WAITING`. Null
3299
+ * for `RUNNING`.
3300
+ */
3301
+ due_at?: string | null;
3302
+ /**
3303
+ * Format: date-time
3304
+ * @description When any of the review's runs last recorded a completed step. Null
3305
+ * before the first.
3306
+ */
3307
+ last_progress_at?: string | null;
3308
+ /**
3309
+ * @description The most telling state among the review's unfinished runs: a scheduled
3310
+ * retry, then a running worker, then a queued run, then a wait.
3311
+ */
3312
+ state: components["schemas"]["RunProgressState"];
3313
+ };
3314
+ /** @description What an unfinished review's runs are doing now. */
3315
+ RunProgressState: "WAITING" | "QUEUED" | "RUNNING" | "RETRY_SCHEDULED";
3259
3316
  /** @description One request to scan a ref or an exact commit of the repository. */
3260
3317
  ScanRequestBody: {
3261
3318
  /**
package/dist/transport.js CHANGED
@@ -1,4 +1,4 @@
1
- const VERSION = "5.7.1";
1
+ const VERSION = "5.9.0";
2
2
  const MAX_RESPONSE_BYTES = 8 * 1024 * 1024;
3
3
  const MAX_RETRIES = 3;
4
4
  const MAX_RETRY_SECONDS = 60;
@@ -799,6 +799,17 @@
799
799
  ],
800
800
  "type": "object"
801
801
  },
802
+ "CountedCause": {
803
+ "anyOf": [
804
+ {
805
+ "$ref": "#/components/schemas/IncompleteCause"
806
+ },
807
+ {
808
+ "$ref": "#/components/schemas/CreditRefusalCause"
809
+ }
810
+ ],
811
+ "description": "What a review is counted under: the cause its assessments recorded, or\n `OUT_OF_CREDITS` where an assessment recorded the credit refusal. An\n assessment's detail names that refusal by the rule `public_reason_codes`\n applies; no other detail is read into the summary."
812
+ },
802
813
  "CoverageRefused": {
803
814
  "description": "An upload refused for its content: a symbolic or unknown commit, or a\n report that cannot be read. Nothing is stored.",
804
815
  "properties": {
@@ -893,6 +904,16 @@
893
904
  ],
894
905
  "type": "object"
895
906
  },
907
+ "CreditRefusalCause": {
908
+ "description": "The credit refusal, named apart from the `NOT_CONFIGURED` it records.",
909
+ "oneOf": [
910
+ {
911
+ "const": "OUT_OF_CREDITS",
912
+ "description": "The organization had no credits left, so the code lane refused to\n run its model.",
913
+ "type": "string"
914
+ }
915
+ ]
916
+ },
896
917
  "CustomerAssessment": {
897
918
  "properties": {
898
919
  "checks": {
@@ -1726,6 +1747,13 @@
1726
1747
  "null"
1727
1748
  ]
1728
1749
  },
1750
+ "counted_incomplete_causes": {
1751
+ "description": "`incomplete_causes` as the Inbox and the reviews `cause:` search\n count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an\n assessment records when credits refused it. Present exactly when\n `incomplete_causes` is.",
1752
+ "items": {
1753
+ "$ref": "#/components/schemas/CountedCause"
1754
+ },
1755
+ "type": "array"
1756
+ },
1729
1757
  "created_at": {
1730
1758
  "description": "When the review was created.",
1731
1759
  "format": "date-time",
@@ -2044,6 +2072,17 @@
2044
2072
  "null"
2045
2073
  ]
2046
2074
  },
2075
+ "run_progress": {
2076
+ "anyOf": [
2077
+ {
2078
+ "$ref": "#/components/schemas/RunProgress"
2079
+ },
2080
+ {
2081
+ "type": "null"
2082
+ }
2083
+ ],
2084
+ "description": "Where an unfinished review's runs stand: running, queued for a worker,\n waiting for a scheduled step, or due again after an attempt that did\n not finish. Null once the review has ended."
2085
+ },
2047
2086
  "status": {
2048
2087
  "description": "The review's lifecycle status: `PENDING`, `RUNNING`, `COMPLETED`, `INCOMPLETE`, `FAILED`, `SUPERSEDED`, `STOPPED` or `EXCLUDED`.",
2049
2088
  "type": "string"
@@ -4755,6 +4794,13 @@
4755
4794
  "null"
4756
4795
  ]
4757
4796
  },
4797
+ "counted_incomplete_causes": {
4798
+ "description": "`incomplete_causes` as the Inbox and the reviews `cause:` search\n count them: `OUT_OF_CREDITS` in place of the `NOT_CONFIGURED` an\n assessment records when credits refused it. Present exactly when\n `incomplete_causes` is.",
4799
+ "items": {
4800
+ "$ref": "#/components/schemas/CountedCause"
4801
+ },
4802
+ "type": "array"
4803
+ },
4758
4804
  "created_at": {
4759
4805
  "description": "When the review was created.",
4760
4806
  "format": "date-time",
@@ -5445,6 +5491,70 @@
5445
5491
  ],
5446
5492
  "type": "object"
5447
5493
  },
5494
+ "RunProgress": {
5495
+ "description": "Where an unfinished review's runs stand.",
5496
+ "properties": {
5497
+ "attempts": {
5498
+ "description": "Attempts begun by the run in `state`, counting worker claims.",
5499
+ "format": "int32",
5500
+ "type": "integer"
5501
+ },
5502
+ "due_at": {
5503
+ "description": "When the run in `state` is due: in the past for `QUEUED`, the next\n attempt for `RETRY_SCHEDULED` and the next check for `WAITING`. Null\n for `RUNNING`.",
5504
+ "format": "date-time",
5505
+ "type": [
5506
+ "string",
5507
+ "null"
5508
+ ]
5509
+ },
5510
+ "last_progress_at": {
5511
+ "description": "When any of the review's runs last recorded a completed step. Null\n before the first.",
5512
+ "format": "date-time",
5513
+ "type": [
5514
+ "string",
5515
+ "null"
5516
+ ]
5517
+ },
5518
+ "state": {
5519
+ "allOf": [
5520
+ {
5521
+ "$ref": "#/components/schemas/RunProgressState"
5522
+ }
5523
+ ],
5524
+ "description": "The most telling state among the review's unfinished runs: a scheduled\n retry, then a running worker, then a queued run, then a wait."
5525
+ }
5526
+ },
5527
+ "required": [
5528
+ "state",
5529
+ "attempts"
5530
+ ],
5531
+ "type": "object"
5532
+ },
5533
+ "RunProgressState": {
5534
+ "description": "What an unfinished review's runs are doing now.",
5535
+ "oneOf": [
5536
+ {
5537
+ "const": "WAITING",
5538
+ "description": "A run waits for a scheduled step, such as a push's quiet period, a\n resource another run holds, or its assessments, and is checked again\n at `due_at`.",
5539
+ "type": "string"
5540
+ },
5541
+ {
5542
+ "const": "QUEUED",
5543
+ "description": "A run is due and no worker has claimed it yet. It has been due since\n `due_at`.",
5544
+ "type": "string"
5545
+ },
5546
+ {
5547
+ "const": "RUNNING",
5548
+ "description": "A worker is running one of the review's runs.",
5549
+ "type": "string"
5550
+ },
5551
+ {
5552
+ "const": "RETRY_SCHEDULED",
5553
+ "description": "An attempt of a run ended without finishing, and the run starts again\n at `due_at`.",
5554
+ "type": "string"
5555
+ }
5556
+ ]
5557
+ },
5448
5558
  "ScanRequestBody": {
5449
5559
  "additionalProperties": false,
5450
5560
  "description": "One request to scan a ref or an exact commit of the repository.",
@@ -6040,7 +6150,7 @@
6040
6150
  },
6041
6151
  "info": {
6042
6152
  "title": "Proofline Review API",
6043
- "version": "5.7.0"
6153
+ "version": "5.9.0"
6044
6154
  },
6045
6155
  "openapi": "3.1.0",
6046
6156
  "paths": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proofline/sdk",
3
- "version": "5.7.1",
3
+ "version": "5.9.0",
4
4
  "description": "Typed clients for the token-scoped Proofline review API",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",