@cesar-richard/git-connector-sdk 4.4.0 → 4.5.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/README.md +18 -0
- package/dist/schema.d.ts +72 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -81,6 +81,24 @@ Tokens with the `gck_` prefix are immutable once minted; revoke and reissue via
|
|
|
81
81
|
|
|
82
82
|
The `/v1/*` surface is designed to power activity reports (CRA, billable-time sheets, "what did I do this month"). The primitives below let you slice your data per-user, per-day, per-type.
|
|
83
83
|
|
|
84
|
+
### Issues, tasks, incidents: you filter, we don't
|
|
85
|
+
|
|
86
|
+
git-connector collects and labels; **it does not decide what belongs in your report**. GitLab tasks, incidents and test cases come back from the same project endpoint as ordinary issues, so they are all ingested and all returned. If your CRA should only count real issues, filter on your side:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
const { data } = await client.GET("/v1/work-items", {
|
|
90
|
+
params: { query: { from, to } },
|
|
91
|
+
});
|
|
92
|
+
const issuesOnly = data.items.filter((w) => w.issueType === "issue");
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Two fields carry the kind, on `/v1/work-items`, `/v1/activities` and `/v1/deliverables`:
|
|
96
|
+
|
|
97
|
+
- **`issueType`** — normalised: `issue`, `task`, `incident`, `test_case`, or `other`. It is `null` on a PR/MR, which is not an issue-like item.
|
|
98
|
+
- **`originalType`** — the provider's own word, unmapped: `"task"` on GitLab, `"Feature"` on a GitHub org that defined it. `null` when the provider said nothing.
|
|
99
|
+
|
|
100
|
+
`other` is **not** a parse failure: it means the provider named a kind outside the normalised vocabulary. Read `originalType` then. This matters most on GitHub, whose issue types are defined per organisation — one org's `Epic` or `Spike` cannot be mapped onto a cross-provider taxonomy without inventing one, so it is deliberately left native. Branch on `source` if you need the raw values.
|
|
101
|
+
|
|
84
102
|
### What did I do today?
|
|
85
103
|
|
|
86
104
|
```ts
|
package/dist/schema.d.ts
CHANGED
|
@@ -238,6 +238,10 @@ export interface components {
|
|
|
238
238
|
source: "github" | "gitlab";
|
|
239
239
|
repo: string;
|
|
240
240
|
type: "pr" | "mr" | "issue";
|
|
241
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
242
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
243
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
244
|
+
originalType: string | null;
|
|
241
245
|
number: string | number;
|
|
242
246
|
title: string;
|
|
243
247
|
body: string | null;
|
|
@@ -293,6 +297,10 @@ export interface components {
|
|
|
293
297
|
source: "github" | "gitlab";
|
|
294
298
|
repo: string;
|
|
295
299
|
type: "pr" | "mr" | "issue";
|
|
300
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
301
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
302
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
303
|
+
originalType: string | null;
|
|
296
304
|
number: string | number;
|
|
297
305
|
title: string;
|
|
298
306
|
body: string | null;
|
|
@@ -631,6 +639,10 @@ export interface components {
|
|
|
631
639
|
author: string | null;
|
|
632
640
|
createdAt: string;
|
|
633
641
|
updatedAt: string;
|
|
642
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
643
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
644
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
645
|
+
originalType: string | null;
|
|
634
646
|
iteration: {
|
|
635
647
|
id: string | number;
|
|
636
648
|
title: string;
|
|
@@ -852,6 +864,10 @@ export interface components {
|
|
|
852
864
|
author: string | null;
|
|
853
865
|
createdAt: string;
|
|
854
866
|
updatedAt: string;
|
|
867
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
868
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
869
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
870
|
+
originalType: string | null;
|
|
855
871
|
iteration: {
|
|
856
872
|
id: string | number;
|
|
857
873
|
title: string;
|
|
@@ -1714,6 +1730,10 @@ export interface components {
|
|
|
1714
1730
|
author: string | null;
|
|
1715
1731
|
createdAt: string;
|
|
1716
1732
|
updatedAt: string;
|
|
1733
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
1734
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
1735
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
1736
|
+
originalType: string | null;
|
|
1717
1737
|
iteration: {
|
|
1718
1738
|
id: string | number;
|
|
1719
1739
|
title: string;
|
|
@@ -1899,6 +1919,10 @@ export interface components {
|
|
|
1899
1919
|
author: string | null;
|
|
1900
1920
|
createdAt: string;
|
|
1901
1921
|
updatedAt: string;
|
|
1922
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
1923
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
1924
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
1925
|
+
originalType: string | null;
|
|
1902
1926
|
iteration: {
|
|
1903
1927
|
id: string | number;
|
|
1904
1928
|
title: string;
|
|
@@ -2137,6 +2161,10 @@ export interface operations {
|
|
|
2137
2161
|
author: string | null;
|
|
2138
2162
|
createdAt: string;
|
|
2139
2163
|
updatedAt: string;
|
|
2164
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
2165
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
2166
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
2167
|
+
originalType: string | null;
|
|
2140
2168
|
iteration: {
|
|
2141
2169
|
id: string | number;
|
|
2142
2170
|
title: string;
|
|
@@ -2326,6 +2354,10 @@ export interface operations {
|
|
|
2326
2354
|
author: string | null;
|
|
2327
2355
|
createdAt: string;
|
|
2328
2356
|
updatedAt: string;
|
|
2357
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
2358
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
2359
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
2360
|
+
originalType: string | null;
|
|
2329
2361
|
iteration: {
|
|
2330
2362
|
id: string | number;
|
|
2331
2363
|
title: string;
|
|
@@ -2515,6 +2547,10 @@ export interface operations {
|
|
|
2515
2547
|
author: string | null;
|
|
2516
2548
|
createdAt: string;
|
|
2517
2549
|
updatedAt: string;
|
|
2550
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
2551
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
2552
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
2553
|
+
originalType: string | null;
|
|
2518
2554
|
iteration: {
|
|
2519
2555
|
id: string | number;
|
|
2520
2556
|
title: string;
|
|
@@ -2760,6 +2796,10 @@ export interface operations {
|
|
|
2760
2796
|
author: string | null;
|
|
2761
2797
|
createdAt: string;
|
|
2762
2798
|
updatedAt: string;
|
|
2799
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
2800
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
2801
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
2802
|
+
originalType: string | null;
|
|
2763
2803
|
iteration: {
|
|
2764
2804
|
id: string | number;
|
|
2765
2805
|
title: string;
|
|
@@ -2944,6 +2984,10 @@ export interface operations {
|
|
|
2944
2984
|
author: string | null;
|
|
2945
2985
|
createdAt: string;
|
|
2946
2986
|
updatedAt: string;
|
|
2987
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
2988
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
2989
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
2990
|
+
originalType: string | null;
|
|
2947
2991
|
iteration: {
|
|
2948
2992
|
id: string | number;
|
|
2949
2993
|
title: string;
|
|
@@ -3128,6 +3172,10 @@ export interface operations {
|
|
|
3128
3172
|
author: string | null;
|
|
3129
3173
|
createdAt: string;
|
|
3130
3174
|
updatedAt: string;
|
|
3175
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
3176
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
3177
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
3178
|
+
originalType: string | null;
|
|
3131
3179
|
iteration: {
|
|
3132
3180
|
id: string | number;
|
|
3133
3181
|
title: string;
|
|
@@ -4206,6 +4254,10 @@ export interface operations {
|
|
|
4206
4254
|
source: "github" | "gitlab";
|
|
4207
4255
|
repo: string;
|
|
4208
4256
|
type: "pr" | "mr" | "issue";
|
|
4257
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
4258
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
4259
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
4260
|
+
originalType: string | null;
|
|
4209
4261
|
number: string | number;
|
|
4210
4262
|
title: string;
|
|
4211
4263
|
body: string | null;
|
|
@@ -4262,6 +4314,10 @@ export interface operations {
|
|
|
4262
4314
|
source: "github" | "gitlab";
|
|
4263
4315
|
repo: string;
|
|
4264
4316
|
type: "pr" | "mr" | "issue";
|
|
4317
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
4318
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
4319
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
4320
|
+
originalType: string | null;
|
|
4265
4321
|
number: string | number;
|
|
4266
4322
|
title: string;
|
|
4267
4323
|
body: string | null;
|
|
@@ -4318,6 +4374,10 @@ export interface operations {
|
|
|
4318
4374
|
source: "github" | "gitlab";
|
|
4319
4375
|
repo: string;
|
|
4320
4376
|
type: "pr" | "mr" | "issue";
|
|
4377
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
4378
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
4379
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
4380
|
+
originalType: string | null;
|
|
4321
4381
|
number: string | number;
|
|
4322
4382
|
title: string;
|
|
4323
4383
|
body: string | null;
|
|
@@ -4625,6 +4685,10 @@ export interface operations {
|
|
|
4625
4685
|
author: string | null;
|
|
4626
4686
|
createdAt: string;
|
|
4627
4687
|
updatedAt: string;
|
|
4688
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
4689
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
4690
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
4691
|
+
originalType: string | null;
|
|
4628
4692
|
iteration: {
|
|
4629
4693
|
id: string | number;
|
|
4630
4694
|
title: string;
|
|
@@ -4847,6 +4911,10 @@ export interface operations {
|
|
|
4847
4911
|
author: string | null;
|
|
4848
4912
|
createdAt: string;
|
|
4849
4913
|
updatedAt: string;
|
|
4914
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
4915
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
4916
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
4917
|
+
originalType: string | null;
|
|
4850
4918
|
iteration: {
|
|
4851
4919
|
id: string | number;
|
|
4852
4920
|
title: string;
|
|
@@ -5069,6 +5137,10 @@ export interface operations {
|
|
|
5069
5137
|
author: string | null;
|
|
5070
5138
|
createdAt: string;
|
|
5071
5139
|
updatedAt: string;
|
|
5140
|
+
/** @description Normalised work item kind. `null` on a PR/MR, which is not an issue-like item. `other` means the provider named a kind outside this vocabulary — read `originalType` then, never treat `other` as a parse failure. */
|
|
5141
|
+
issueType: "issue" | "task" | "incident" | "test_case" | "other" | null;
|
|
5142
|
+
/** @description The provider's own word for the kind, unmapped: `task` on GitLab, `Feature` on a GitHub org that defined it. `null` when the provider said nothing. GitHub issue types are org-defined, so this is deliberately NOT normalised across providers — branch on `source` if you need the raw taxonomy. */
|
|
5143
|
+
originalType: string | null;
|
|
5072
5144
|
iteration: {
|
|
5073
5145
|
id: string | number;
|
|
5074
5146
|
title: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cesar-richard/git-connector-sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
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": {
|