@cesar-richard/git-connector-sdk 2.6.0 → 2.7.1
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/README.md +76 -2
- package/dist/schema.d.ts +241 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -354,7 +354,26 @@ for (const wi of data.items) {
|
|
|
354
354
|
|
|
355
355
|
## API surface
|
|
356
356
|
|
|
357
|
-
The `/v1/*` API exposes these resources: work items, iterations, work-item details, the unified events stream, raw activities, deliverables, and per-project delivery rules.
|
|
357
|
+
The `/v1/*` API exposes these resources: tracked projects, work items, iterations, work-item details, the unified events stream (polled or server-sent), raw activities, deliverables, and per-project delivery rules.
|
|
358
|
+
|
|
359
|
+
### `GET /v1/projects` — list tracked projects
|
|
360
|
+
|
|
361
|
+
Every project the operator tracks, sorted by `(source, projectKey)`.
|
|
362
|
+
|
|
363
|
+
```ts
|
|
364
|
+
const { data } = await client.GET("/v1/projects");
|
|
365
|
+
// data: { projects: { source, projectKey, name, webUrl, lastSyncedAt }[] }
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
This is the **only correct way** to enumerate projects. Deriving the list by
|
|
369
|
+
paginating `/v1/work-items` or `/v1/activities` and deduplicating
|
|
370
|
+
`(source, projectKey)` is wrong by construction: a tracked project with no
|
|
371
|
+
activity in the window read is invisible that way, so it can never be configured
|
|
372
|
+
downstream. `lastSyncedAt` is `null` when the project has never completed a sync
|
|
373
|
+
— that means *never ingested*, not *quiet*.
|
|
374
|
+
|
|
375
|
+
Pair `source` + `projectKey` to call
|
|
376
|
+
`GET /v1/projects/{source}/{projectKey}/labels`.
|
|
358
377
|
|
|
359
378
|
### `GET /v1/work-items` — list aggregated work items
|
|
360
379
|
|
|
@@ -373,7 +392,24 @@ const { data } = await client.GET("/v1/work-items", {
|
|
|
373
392
|
// data: { items: WorkItem[]; total: number; limit: number }
|
|
374
393
|
```
|
|
375
394
|
|
|
376
|
-
Each `WorkItem` includes its `linkedActivities` (PRs/MRs with full enrichment: reviews summary, unresolved threads, volume, status history, reviewRequestedAt, mergedAt).
|
|
395
|
+
Each `WorkItem` includes its `linkedActivities` (PRs/MRs with full enrichment: reviews summary, unresolved threads, volume, status history, reviewRequestedAt, mergedAt, and the current CI status).
|
|
396
|
+
|
|
397
|
+
#### `linkedActivities[].ci` — current CI status
|
|
398
|
+
|
|
399
|
+
The latest known CI **pipeline** for that PR/MR (not per-job `ci-run`), always
|
|
400
|
+
computed on both the list and the detail route:
|
|
401
|
+
|
|
402
|
+
```ts
|
|
403
|
+
ci?: {
|
|
404
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
405
|
+
url: string | null;
|
|
406
|
+
finishedAt: string | null;
|
|
407
|
+
} | null
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
`null` means *no pipeline is known* — never read it as "green". Together with
|
|
411
|
+
`hasConflicts`, `reviews` and `unresolvedThreads`, `status: "failed"` is the
|
|
412
|
+
fourth signal for rendering a work item as blocked.
|
|
377
413
|
|
|
378
414
|
### `GET /v1/work-items/{source}/{projectKey}/{number}` — detail
|
|
379
415
|
|
|
@@ -426,6 +462,44 @@ Event types in the stream:
|
|
|
426
462
|
| `review` | GH PR review / GL MR approval | resolves to PR/MR | `state`, `reviewer` |
|
|
427
463
|
| `state-transition` | Derived from activity state diff | resolves to PR/MR/issue | `from`, `to` |
|
|
428
464
|
| `ci-run` | GH Actions job / GL pipeline job | resolves to PR/MR via head SHA | `runId`, `jobName`, `conclusion`, `durationSec`, `sha`, `branch` |
|
|
465
|
+
| `ci-pipeline` | GH Actions run / GL pipeline | resolves to PR/MR via head SHA | `runId`, `conclusion`, `status`, `durationSec`, `sha`, `branch` |
|
|
466
|
+
|
|
467
|
+
#### Fetching one activity's events — `?parentActivityId`
|
|
468
|
+
|
|
469
|
+
Pass `parentActivityId` (CSV for several) to get every event attached to a PR/MR
|
|
470
|
+
— commits, pipelines, comments — without guessing a date window. **When this
|
|
471
|
+
filter is given, `from`/`to` become optional**, and omitting them is usually what
|
|
472
|
+
you want: a window silently drops anything older than it, which for a CI pipeline
|
|
473
|
+
means reading "no pipeline" where there is a red one.
|
|
474
|
+
|
|
475
|
+
```ts
|
|
476
|
+
const { data } = await client.GET("/v1/events", {
|
|
477
|
+
params: {
|
|
478
|
+
query: {
|
|
479
|
+
parentActivityId: "github:acme/web:pr:42,github:acme/web:pr:43",
|
|
480
|
+
type: "ci-pipeline",
|
|
481
|
+
},
|
|
482
|
+
},
|
|
483
|
+
});
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### `GET /v1/events/stream` — server-sent events
|
|
487
|
+
|
|
488
|
+
SSE on the consumer scope, authenticated with the same `gck_` Bearer token. It
|
|
489
|
+
emits `events.ingested` frames only — operator-scope traffic (sync progress,
|
|
490
|
+
config changes, provider-auth staleness) never crosses this boundary. A `:ping`
|
|
491
|
+
comment every 30 s keeps proxies from dropping the socket.
|
|
492
|
+
|
|
493
|
+
```ts
|
|
494
|
+
const res = await fetch(`${baseUrl}/v1/events/stream`, {
|
|
495
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
496
|
+
});
|
|
497
|
+
// text/event-stream: `event: events.ingested` frames whose data is
|
|
498
|
+
// { type: "events.ingested", payload: { events: GitEvent[] } }
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Polling `GET /v1/events?since=<ISO>` stays the simpler option and is cheap enough
|
|
502
|
+
for most consumers; reach for the stream when you want push latency.
|
|
429
503
|
|
|
430
504
|
### `GET /v1/deliverables` — classified deliverables of a window
|
|
431
505
|
|
package/dist/schema.d.ts
CHANGED
|
@@ -68,6 +68,22 @@ export interface paths {
|
|
|
68
68
|
patch?: never;
|
|
69
69
|
trace?: never;
|
|
70
70
|
};
|
|
71
|
+
"/v1/events/stream": {
|
|
72
|
+
parameters: {
|
|
73
|
+
query?: never;
|
|
74
|
+
header?: never;
|
|
75
|
+
path?: never;
|
|
76
|
+
cookie?: never;
|
|
77
|
+
};
|
|
78
|
+
get: operations["getV1EventsStream"];
|
|
79
|
+
put?: never;
|
|
80
|
+
post?: never;
|
|
81
|
+
delete?: never;
|
|
82
|
+
options?: never;
|
|
83
|
+
head?: never;
|
|
84
|
+
patch?: never;
|
|
85
|
+
trace?: never;
|
|
86
|
+
};
|
|
71
87
|
"/v1/activities": {
|
|
72
88
|
parameters: {
|
|
73
89
|
query?: never;
|
|
@@ -116,6 +132,22 @@ export interface paths {
|
|
|
116
132
|
patch: operations["patchV1ProjectsBySourceByProjectKeyDelivery-rules"];
|
|
117
133
|
trace?: never;
|
|
118
134
|
};
|
|
135
|
+
"/v1/projects": {
|
|
136
|
+
parameters: {
|
|
137
|
+
query?: never;
|
|
138
|
+
header?: never;
|
|
139
|
+
path?: never;
|
|
140
|
+
cookie?: never;
|
|
141
|
+
};
|
|
142
|
+
get: operations["getV1Projects"];
|
|
143
|
+
put?: never;
|
|
144
|
+
post?: never;
|
|
145
|
+
delete?: never;
|
|
146
|
+
options?: never;
|
|
147
|
+
head?: never;
|
|
148
|
+
patch?: never;
|
|
149
|
+
trace?: never;
|
|
150
|
+
};
|
|
119
151
|
"/v1/projects/{source}/{projectKey}/labels": {
|
|
120
152
|
parameters: {
|
|
121
153
|
query?: never;
|
|
@@ -295,6 +327,11 @@ export interface components {
|
|
|
295
327
|
} & {
|
|
296
328
|
[key: string]: unknown;
|
|
297
329
|
};
|
|
330
|
+
CiSummary: {
|
|
331
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
332
|
+
url: string | null;
|
|
333
|
+
finishedAt: string | null;
|
|
334
|
+
};
|
|
298
335
|
Comment: {
|
|
299
336
|
id: string;
|
|
300
337
|
source: "github" | "gitlab";
|
|
@@ -379,7 +416,7 @@ export interface components {
|
|
|
379
416
|
externalId: string;
|
|
380
417
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
381
418
|
number: string | number;
|
|
382
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
419
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
383
420
|
type: "pr" | "mr";
|
|
384
421
|
title: string;
|
|
385
422
|
url: string;
|
|
@@ -453,6 +490,12 @@ export interface components {
|
|
|
453
490
|
url: string | null;
|
|
454
491
|
}[];
|
|
455
492
|
} | null;
|
|
493
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
494
|
+
ci?: {
|
|
495
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
496
|
+
url: string | null;
|
|
497
|
+
finishedAt: string | null;
|
|
498
|
+
} | null;
|
|
456
499
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
457
500
|
linkSource?: {
|
|
458
501
|
hintSource: string;
|
|
@@ -578,7 +621,7 @@ export interface components {
|
|
|
578
621
|
externalId: string;
|
|
579
622
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
580
623
|
number: string | number;
|
|
581
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
624
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
582
625
|
type: "pr" | "mr";
|
|
583
626
|
title: string;
|
|
584
627
|
url: string;
|
|
@@ -652,6 +695,12 @@ export interface components {
|
|
|
652
695
|
url: string | null;
|
|
653
696
|
}[];
|
|
654
697
|
} | null;
|
|
698
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
699
|
+
ci?: {
|
|
700
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
701
|
+
url: string | null;
|
|
702
|
+
finishedAt: string | null;
|
|
703
|
+
} | null;
|
|
655
704
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
656
705
|
linkSource?: {
|
|
657
706
|
hintSource: string;
|
|
@@ -1248,7 +1297,7 @@ export interface components {
|
|
|
1248
1297
|
externalId: string;
|
|
1249
1298
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
1250
1299
|
number: string | number;
|
|
1251
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
1300
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
1252
1301
|
type: "pr" | "mr";
|
|
1253
1302
|
title: string;
|
|
1254
1303
|
url: string;
|
|
@@ -1322,6 +1371,12 @@ export interface components {
|
|
|
1322
1371
|
url: string | null;
|
|
1323
1372
|
}[];
|
|
1324
1373
|
} | null;
|
|
1374
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
1375
|
+
ci?: {
|
|
1376
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
1377
|
+
url: string | null;
|
|
1378
|
+
finishedAt: string | null;
|
|
1379
|
+
} | null;
|
|
1325
1380
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
1326
1381
|
linkSource?: {
|
|
1327
1382
|
hintSource: string;
|
|
@@ -1366,6 +1421,20 @@ export interface components {
|
|
|
1366
1421
|
}[];
|
|
1367
1422
|
fetchedAt: string;
|
|
1368
1423
|
};
|
|
1424
|
+
ProjectsListResponse: {
|
|
1425
|
+
/** @description Every project the operator tracks, sorted by (source, projectKey). Sourced from the operator config, so a tracked project with no activity in any window still appears — do NOT derive this list by paginating /v1/work-items or /v1/activities, which silently omits quiet projects. */
|
|
1426
|
+
projects: {
|
|
1427
|
+
source: "github" | "gitlab";
|
|
1428
|
+
/** @description Provider-side project path, verbatim from the operator config (`owner/repo` on GitHub, `group/sub/project` on GitLab). Pair with `source` to call /v1/projects/{source}/{projectKey}/labels. */
|
|
1429
|
+
projectKey: string;
|
|
1430
|
+
/** @description Last path segment of `projectKey`, for display. */
|
|
1431
|
+
name: string;
|
|
1432
|
+
/** @description Project homepage. Null on GitLab when no instance URL is configured. */
|
|
1433
|
+
webUrl: string | null;
|
|
1434
|
+
/** @description ISO timestamp of the most recent FINISHED sync run for this project, or null when it has never completed one. Null means 'tracked but never ingested' — NOT 'no recent activity'. */
|
|
1435
|
+
lastSyncedAt: string | null;
|
|
1436
|
+
}[];
|
|
1437
|
+
};
|
|
1369
1438
|
Provider: "github" | "gitlab";
|
|
1370
1439
|
ResolvedUser: {
|
|
1371
1440
|
id: string;
|
|
@@ -1428,6 +1497,17 @@ export interface components {
|
|
|
1428
1497
|
firstNoteCreatedAt: string;
|
|
1429
1498
|
url: string | null;
|
|
1430
1499
|
};
|
|
1500
|
+
TrackedProject: {
|
|
1501
|
+
source: "github" | "gitlab";
|
|
1502
|
+
/** @description Provider-side project path, verbatim from the operator config (`owner/repo` on GitHub, `group/sub/project` on GitLab). Pair with `source` to call /v1/projects/{source}/{projectKey}/labels. */
|
|
1503
|
+
projectKey: string;
|
|
1504
|
+
/** @description Last path segment of `projectKey`, for display. */
|
|
1505
|
+
name: string;
|
|
1506
|
+
/** @description Project homepage. Null on GitLab when no instance URL is configured. */
|
|
1507
|
+
webUrl: string | null;
|
|
1508
|
+
/** @description ISO timestamp of the most recent FINISHED sync run for this project, or null when it has never completed one. Null means 'tracked but never ingested' — NOT 'no recent activity'. */
|
|
1509
|
+
lastSyncedAt: string | null;
|
|
1510
|
+
};
|
|
1431
1511
|
UnresolvedThreads: {
|
|
1432
1512
|
count: string | number;
|
|
1433
1513
|
digest: {
|
|
@@ -1483,7 +1563,7 @@ export interface components {
|
|
|
1483
1563
|
externalId: string;
|
|
1484
1564
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
1485
1565
|
number: string | number;
|
|
1486
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
1566
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
1487
1567
|
type: "pr" | "mr";
|
|
1488
1568
|
title: string;
|
|
1489
1569
|
url: string;
|
|
@@ -1557,6 +1637,12 @@ export interface components {
|
|
|
1557
1637
|
url: string | null;
|
|
1558
1638
|
}[];
|
|
1559
1639
|
} | null;
|
|
1640
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
1641
|
+
ci?: {
|
|
1642
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
1643
|
+
url: string | null;
|
|
1644
|
+
finishedAt: string | null;
|
|
1645
|
+
} | null;
|
|
1560
1646
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
1561
1647
|
linkSource?: {
|
|
1562
1648
|
hintSource: string;
|
|
@@ -1650,7 +1736,7 @@ export interface components {
|
|
|
1650
1736
|
externalId: string;
|
|
1651
1737
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
1652
1738
|
number: string | number;
|
|
1653
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
1739
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
1654
1740
|
type: "pr" | "mr";
|
|
1655
1741
|
title: string;
|
|
1656
1742
|
url: string;
|
|
@@ -1724,6 +1810,12 @@ export interface components {
|
|
|
1724
1810
|
url: string | null;
|
|
1725
1811
|
}[];
|
|
1726
1812
|
} | null;
|
|
1813
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
1814
|
+
ci?: {
|
|
1815
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
1816
|
+
url: string | null;
|
|
1817
|
+
finishedAt: string | null;
|
|
1818
|
+
} | null;
|
|
1727
1819
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
1728
1820
|
linkSource?: {
|
|
1729
1821
|
hintSource: string;
|
|
@@ -1870,7 +1962,7 @@ export interface operations {
|
|
|
1870
1962
|
externalId: string;
|
|
1871
1963
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
1872
1964
|
number: string | number;
|
|
1873
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
1965
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
1874
1966
|
type: "pr" | "mr";
|
|
1875
1967
|
title: string;
|
|
1876
1968
|
url: string;
|
|
@@ -1944,6 +2036,12 @@ export interface operations {
|
|
|
1944
2036
|
url: string | null;
|
|
1945
2037
|
}[];
|
|
1946
2038
|
} | null;
|
|
2039
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2040
|
+
ci?: {
|
|
2041
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2042
|
+
url: string | null;
|
|
2043
|
+
finishedAt: string | null;
|
|
2044
|
+
} | null;
|
|
1947
2045
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
1948
2046
|
linkSource?: {
|
|
1949
2047
|
hintSource: string;
|
|
@@ -2041,7 +2139,7 @@ export interface operations {
|
|
|
2041
2139
|
externalId: string;
|
|
2042
2140
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
2043
2141
|
number: string | number;
|
|
2044
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
2142
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
2045
2143
|
type: "pr" | "mr";
|
|
2046
2144
|
title: string;
|
|
2047
2145
|
url: string;
|
|
@@ -2115,6 +2213,12 @@ export interface operations {
|
|
|
2115
2213
|
url: string | null;
|
|
2116
2214
|
}[];
|
|
2117
2215
|
} | null;
|
|
2216
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2217
|
+
ci?: {
|
|
2218
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2219
|
+
url: string | null;
|
|
2220
|
+
finishedAt: string | null;
|
|
2221
|
+
} | null;
|
|
2118
2222
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
2119
2223
|
linkSource?: {
|
|
2120
2224
|
hintSource: string;
|
|
@@ -2212,7 +2316,7 @@ export interface operations {
|
|
|
2212
2316
|
externalId: string;
|
|
2213
2317
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
2214
2318
|
number: string | number;
|
|
2215
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
2319
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
2216
2320
|
type: "pr" | "mr";
|
|
2217
2321
|
title: string;
|
|
2218
2322
|
url: string;
|
|
@@ -2286,6 +2390,12 @@ export interface operations {
|
|
|
2286
2390
|
url: string | null;
|
|
2287
2391
|
}[];
|
|
2288
2392
|
} | null;
|
|
2393
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2394
|
+
ci?: {
|
|
2395
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2396
|
+
url: string | null;
|
|
2397
|
+
finishedAt: string | null;
|
|
2398
|
+
} | null;
|
|
2289
2399
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
2290
2400
|
linkSource?: {
|
|
2291
2401
|
hintSource: string;
|
|
@@ -2439,7 +2549,7 @@ export interface operations {
|
|
|
2439
2549
|
externalId: string;
|
|
2440
2550
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
2441
2551
|
number: string | number;
|
|
2442
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
2552
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
2443
2553
|
type: "pr" | "mr";
|
|
2444
2554
|
title: string;
|
|
2445
2555
|
url: string;
|
|
@@ -2513,6 +2623,12 @@ export interface operations {
|
|
|
2513
2623
|
url: string | null;
|
|
2514
2624
|
}[];
|
|
2515
2625
|
} | null;
|
|
2626
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2627
|
+
ci?: {
|
|
2628
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2629
|
+
url: string | null;
|
|
2630
|
+
finishedAt: string | null;
|
|
2631
|
+
} | null;
|
|
2516
2632
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
2517
2633
|
linkSource?: {
|
|
2518
2634
|
hintSource: string;
|
|
@@ -2605,7 +2721,7 @@ export interface operations {
|
|
|
2605
2721
|
externalId: string;
|
|
2606
2722
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
2607
2723
|
number: string | number;
|
|
2608
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
2724
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
2609
2725
|
type: "pr" | "mr";
|
|
2610
2726
|
title: string;
|
|
2611
2727
|
url: string;
|
|
@@ -2679,6 +2795,12 @@ export interface operations {
|
|
|
2679
2795
|
url: string | null;
|
|
2680
2796
|
}[];
|
|
2681
2797
|
} | null;
|
|
2798
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2799
|
+
ci?: {
|
|
2800
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2801
|
+
url: string | null;
|
|
2802
|
+
finishedAt: string | null;
|
|
2803
|
+
} | null;
|
|
2682
2804
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
2683
2805
|
linkSource?: {
|
|
2684
2806
|
hintSource: string;
|
|
@@ -2771,7 +2893,7 @@ export interface operations {
|
|
|
2771
2893
|
externalId: string;
|
|
2772
2894
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
2773
2895
|
number: string | number;
|
|
2774
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
2896
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
2775
2897
|
type: "pr" | "mr";
|
|
2776
2898
|
title: string;
|
|
2777
2899
|
url: string;
|
|
@@ -2845,6 +2967,12 @@ export interface operations {
|
|
|
2845
2967
|
url: string | null;
|
|
2846
2968
|
}[];
|
|
2847
2969
|
} | null;
|
|
2970
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
2971
|
+
ci?: {
|
|
2972
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
2973
|
+
url: string | null;
|
|
2974
|
+
finishedAt: string | null;
|
|
2975
|
+
} | null;
|
|
2848
2976
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
2849
2977
|
linkSource?: {
|
|
2850
2978
|
hintSource: string;
|
|
@@ -2981,10 +3109,12 @@ export interface operations {
|
|
|
2981
3109
|
getV1Events: {
|
|
2982
3110
|
parameters: {
|
|
2983
3111
|
query?: {
|
|
2984
|
-
/** @description Inclusive lower bound, YYYY-MM-DD (Paris-TZ day). Required. */
|
|
3112
|
+
/** @description Inclusive lower bound, YYYY-MM-DD (Paris-TZ day). Required unless `parentActivityId` is given. */
|
|
2985
3113
|
from?: string;
|
|
2986
|
-
/** @description Inclusive upper bound, YYYY-MM-DD (Paris-TZ day). Required. */
|
|
3114
|
+
/** @description Inclusive upper bound, YYYY-MM-DD (Paris-TZ day). Required unless `parentActivityId` is given. */
|
|
2987
3115
|
to?: string;
|
|
3116
|
+
/** @description Filter by parent activity id (the `${source}:${repo}:${type}:${externalId}` key). CSV for several. When given, `from`/`to` become optional — use it to fetch every commit, pipeline and comment attached to a PR/MR without guessing a date window, which would silently drop older events. */
|
|
3117
|
+
parentActivityId?: string;
|
|
2988
3118
|
/** @description Filter by author (case-insensitive). */
|
|
2989
3119
|
user?: string;
|
|
2990
3120
|
/** @description Filter by user identity ID (resolves to all aliases). Mutually exclusive with ?user. */
|
|
@@ -3629,6 +3759,23 @@ export interface operations {
|
|
|
3629
3759
|
};
|
|
3630
3760
|
};
|
|
3631
3761
|
};
|
|
3762
|
+
getV1EventsStream: {
|
|
3763
|
+
parameters: {
|
|
3764
|
+
query?: never;
|
|
3765
|
+
header?: never;
|
|
3766
|
+
path?: never;
|
|
3767
|
+
cookie?: never;
|
|
3768
|
+
};
|
|
3769
|
+
requestBody?: never;
|
|
3770
|
+
responses: {
|
|
3771
|
+
200: {
|
|
3772
|
+
headers: {
|
|
3773
|
+
[name: string]: unknown;
|
|
3774
|
+
};
|
|
3775
|
+
content?: never;
|
|
3776
|
+
};
|
|
3777
|
+
};
|
|
3778
|
+
};
|
|
3632
3779
|
getV1Activities: {
|
|
3633
3780
|
parameters: {
|
|
3634
3781
|
query?: {
|
|
@@ -3853,7 +4000,7 @@ export interface operations {
|
|
|
3853
4000
|
externalId: string;
|
|
3854
4001
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
3855
4002
|
number: string | number;
|
|
3856
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
4003
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
3857
4004
|
type: "pr" | "mr";
|
|
3858
4005
|
title: string;
|
|
3859
4006
|
url: string;
|
|
@@ -3927,6 +4074,12 @@ export interface operations {
|
|
|
3927
4074
|
url: string | null;
|
|
3928
4075
|
}[];
|
|
3929
4076
|
} | null;
|
|
4077
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
4078
|
+
ci?: {
|
|
4079
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
4080
|
+
url: string | null;
|
|
4081
|
+
finishedAt: string | null;
|
|
4082
|
+
} | null;
|
|
3930
4083
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
3931
4084
|
linkSource?: {
|
|
3932
4085
|
hintSource: string;
|
|
@@ -4053,7 +4206,7 @@ export interface operations {
|
|
|
4053
4206
|
externalId: string;
|
|
4054
4207
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
4055
4208
|
number: string | number;
|
|
4056
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
4209
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
4057
4210
|
type: "pr" | "mr";
|
|
4058
4211
|
title: string;
|
|
4059
4212
|
url: string;
|
|
@@ -4127,6 +4280,12 @@ export interface operations {
|
|
|
4127
4280
|
url: string | null;
|
|
4128
4281
|
}[];
|
|
4129
4282
|
} | null;
|
|
4283
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
4284
|
+
ci?: {
|
|
4285
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
4286
|
+
url: string | null;
|
|
4287
|
+
finishedAt: string | null;
|
|
4288
|
+
} | null;
|
|
4130
4289
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
4131
4290
|
linkSource?: {
|
|
4132
4291
|
hintSource: string;
|
|
@@ -4253,7 +4412,7 @@ export interface operations {
|
|
|
4253
4412
|
externalId: string;
|
|
4254
4413
|
/** @description Numeric form of externalId (cast for convenience). Useful for display like '!123' or '#123'. */
|
|
4255
4414
|
number: string | number;
|
|
4256
|
-
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id>
|
|
4415
|
+
/** @description PR/MR linked via git_activity_links. Commit-level linkage is NOT included here — fetch /v1/events?parentActivityId=<id> (CSV accepted, no date window required) for the commits, pipelines and comments attached to this activity. */
|
|
4257
4416
|
type: "pr" | "mr";
|
|
4258
4417
|
title: string;
|
|
4259
4418
|
url: string;
|
|
@@ -4327,6 +4486,12 @@ export interface operations {
|
|
|
4327
4486
|
url: string | null;
|
|
4328
4487
|
}[];
|
|
4329
4488
|
} | null;
|
|
4489
|
+
/** @description Latest known CI pipeline for this PR/MR — derived from `ci-pipeline` events, NOT from per-job `ci-run`. Null when no pipeline is known: never read a null as 'green'. `status: 'failed'` is the CI half of a blocked signal, alongside hasConflicts, reviews and unresolvedThreads. */
|
|
4490
|
+
ci?: {
|
|
4491
|
+
status: "success" | "failed" | "running" | "canceled" | "unknown";
|
|
4492
|
+
url: string | null;
|
|
4493
|
+
finishedAt: string | null;
|
|
4494
|
+
} | null;
|
|
4330
4495
|
reviewStatus?: "draft" | "open-no-review" | "open-awaiting-my-review" | "open-awaiting-other-review" | "open-changes-requested" | "open-approved" | "merged" | "closed";
|
|
4331
4496
|
linkSource?: {
|
|
4332
4497
|
hintSource: string;
|
|
@@ -4555,6 +4720,66 @@ export interface operations {
|
|
|
4555
4720
|
};
|
|
4556
4721
|
};
|
|
4557
4722
|
};
|
|
4723
|
+
getV1Projects: {
|
|
4724
|
+
parameters: {
|
|
4725
|
+
query?: never;
|
|
4726
|
+
header?: never;
|
|
4727
|
+
path?: never;
|
|
4728
|
+
cookie?: never;
|
|
4729
|
+
};
|
|
4730
|
+
requestBody?: never;
|
|
4731
|
+
responses: {
|
|
4732
|
+
200: {
|
|
4733
|
+
headers: {
|
|
4734
|
+
[name: string]: unknown;
|
|
4735
|
+
};
|
|
4736
|
+
content: {
|
|
4737
|
+
"application/json": {
|
|
4738
|
+
/** @description Every project the operator tracks, sorted by (source, projectKey). Sourced from the operator config, so a tracked project with no activity in any window still appears — do NOT derive this list by paginating /v1/work-items or /v1/activities, which silently omits quiet projects. */
|
|
4739
|
+
projects: {
|
|
4740
|
+
source: "github" | "gitlab";
|
|
4741
|
+
/** @description Provider-side project path, verbatim from the operator config (`owner/repo` on GitHub, `group/sub/project` on GitLab). Pair with `source` to call /v1/projects/{source}/{projectKey}/labels. */
|
|
4742
|
+
projectKey: string;
|
|
4743
|
+
/** @description Last path segment of `projectKey`, for display. */
|
|
4744
|
+
name: string;
|
|
4745
|
+
/** @description Project homepage. Null on GitLab when no instance URL is configured. */
|
|
4746
|
+
webUrl: string | null;
|
|
4747
|
+
/** @description ISO timestamp of the most recent FINISHED sync run for this project, or null when it has never completed one. Null means 'tracked but never ingested' — NOT 'no recent activity'. */
|
|
4748
|
+
lastSyncedAt: string | null;
|
|
4749
|
+
}[];
|
|
4750
|
+
};
|
|
4751
|
+
"multipart/form-data": {
|
|
4752
|
+
/** @description Every project the operator tracks, sorted by (source, projectKey). Sourced from the operator config, so a tracked project with no activity in any window still appears — do NOT derive this list by paginating /v1/work-items or /v1/activities, which silently omits quiet projects. */
|
|
4753
|
+
projects: {
|
|
4754
|
+
source: "github" | "gitlab";
|
|
4755
|
+
/** @description Provider-side project path, verbatim from the operator config (`owner/repo` on GitHub, `group/sub/project` on GitLab). Pair with `source` to call /v1/projects/{source}/{projectKey}/labels. */
|
|
4756
|
+
projectKey: string;
|
|
4757
|
+
/** @description Last path segment of `projectKey`, for display. */
|
|
4758
|
+
name: string;
|
|
4759
|
+
/** @description Project homepage. Null on GitLab when no instance URL is configured. */
|
|
4760
|
+
webUrl: string | null;
|
|
4761
|
+
/** @description ISO timestamp of the most recent FINISHED sync run for this project, or null when it has never completed one. Null means 'tracked but never ingested' — NOT 'no recent activity'. */
|
|
4762
|
+
lastSyncedAt: string | null;
|
|
4763
|
+
}[];
|
|
4764
|
+
};
|
|
4765
|
+
"text/plain": {
|
|
4766
|
+
/** @description Every project the operator tracks, sorted by (source, projectKey). Sourced from the operator config, so a tracked project with no activity in any window still appears — do NOT derive this list by paginating /v1/work-items or /v1/activities, which silently omits quiet projects. */
|
|
4767
|
+
projects: {
|
|
4768
|
+
source: "github" | "gitlab";
|
|
4769
|
+
/** @description Provider-side project path, verbatim from the operator config (`owner/repo` on GitHub, `group/sub/project` on GitLab). Pair with `source` to call /v1/projects/{source}/{projectKey}/labels. */
|
|
4770
|
+
projectKey: string;
|
|
4771
|
+
/** @description Last path segment of `projectKey`, for display. */
|
|
4772
|
+
name: string;
|
|
4773
|
+
/** @description Project homepage. Null on GitLab when no instance URL is configured. */
|
|
4774
|
+
webUrl: string | null;
|
|
4775
|
+
/** @description ISO timestamp of the most recent FINISHED sync run for this project, or null when it has never completed one. Null means 'tracked but never ingested' — NOT 'no recent activity'. */
|
|
4776
|
+
lastSyncedAt: string | null;
|
|
4777
|
+
}[];
|
|
4778
|
+
};
|
|
4779
|
+
};
|
|
4780
|
+
};
|
|
4781
|
+
};
|
|
4782
|
+
};
|
|
4558
4783
|
getV1ProjectsBySourceByProjectKeyLabels: {
|
|
4559
4784
|
parameters: {
|
|
4560
4785
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cesar-richard/git-connector-sdk",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "TypeScript SDK for the git-connector v1 API (work items + iterations aggregated from GitHub/GitLab). Version published on npm tracks server releases.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|