@cesar-richard/git-connector-sdk 1.65.0 → 1.67.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 CHANGED
@@ -610,6 +610,22 @@ const { data: workItems } = await client.GET("/v1/work-items", {
610
610
  `?identity` and `?author` are mutually exclusive: passing both returns 400.
611
611
  `?withIdentity=1` opts into the `authorIdentity` field on each item.
612
612
 
613
+ ### Auto-discovery + enrichment (server-side)
614
+
615
+ The server runs a nightly cron (3 AM UTC) + a post-sync event hook that:
616
+
617
+ 1. Scans `git_events` + `git_activities` for any `(provider, login)` not yet
618
+ attached to an identity → creates one identity per login with
619
+ `display_name = login` (fallback) and `display_name_source = "auto"`.
620
+ 2. Calls the provider's user-API (GitLab `users?username=...`, GitHub
621
+ `users.getByUsername`) to enrich `display_name`, `email`, `avatar_url`.
622
+ 3. Caches both positive AND negative results (`enriched_at` ISO timestamp,
623
+ 7-day TTL).
624
+ 4. Never touches identities edited manually (`display_name_source = "manual"`).
625
+
626
+ Identities created via `POST /v1/identities` or whose `displayName` was set
627
+ via `PATCH` keep `display_name_source = "manual"` automatically.
628
+
613
629
  ## Related
614
630
 
615
631
  - **Server / control UI:** [git-connector](https://github.com/cesar-richard-ei/git-connector)
package/dist/schema.d.ts CHANGED
@@ -629,6 +629,8 @@ export interface components {
629
629
  displayName: string;
630
630
  email: string | null;
631
631
  avatarUrl: string | null;
632
+ enrichedAt: string | null;
633
+ displayNameSource: "auto" | "manual";
632
634
  aliases: {
633
635
  provider: "github" | "gitlab";
634
636
  login: string;
@@ -646,6 +648,8 @@ export interface components {
646
648
  displayName: string;
647
649
  email: string | null;
648
650
  avatarUrl: string | null;
651
+ enrichedAt: string | null;
652
+ displayNameSource: "auto" | "manual";
649
653
  aliases: {
650
654
  provider: "github" | "gitlab";
651
655
  login: string;
@@ -3207,6 +3211,8 @@ export interface operations {
3207
3211
  displayName: string;
3208
3212
  email: string | null;
3209
3213
  avatarUrl: string | null;
3214
+ enrichedAt: string | null;
3215
+ displayNameSource: "auto" | "manual";
3210
3216
  aliases: {
3211
3217
  provider: "github" | "gitlab";
3212
3218
  login: string;
@@ -3225,6 +3231,8 @@ export interface operations {
3225
3231
  displayName: string;
3226
3232
  email: string | null;
3227
3233
  avatarUrl: string | null;
3234
+ enrichedAt: string | null;
3235
+ displayNameSource: "auto" | "manual";
3228
3236
  aliases: {
3229
3237
  provider: "github" | "gitlab";
3230
3238
  login: string;
@@ -3243,6 +3251,8 @@ export interface operations {
3243
3251
  displayName: string;
3244
3252
  email: string | null;
3245
3253
  avatarUrl: string | null;
3254
+ enrichedAt: string | null;
3255
+ displayNameSource: "auto" | "manual";
3246
3256
  aliases: {
3247
3257
  provider: "github" | "gitlab";
3248
3258
  login: string;
@@ -3308,6 +3318,8 @@ export interface operations {
3308
3318
  displayName: string;
3309
3319
  email: string | null;
3310
3320
  avatarUrl: string | null;
3321
+ enrichedAt: string | null;
3322
+ displayNameSource: "auto" | "manual";
3311
3323
  aliases: {
3312
3324
  provider: "github" | "gitlab";
3313
3325
  login: string;
@@ -3321,6 +3333,8 @@ export interface operations {
3321
3333
  displayName: string;
3322
3334
  email: string | null;
3323
3335
  avatarUrl: string | null;
3336
+ enrichedAt: string | null;
3337
+ displayNameSource: "auto" | "manual";
3324
3338
  aliases: {
3325
3339
  provider: "github" | "gitlab";
3326
3340
  login: string;
@@ -3334,6 +3348,8 @@ export interface operations {
3334
3348
  displayName: string;
3335
3349
  email: string | null;
3336
3350
  avatarUrl: string | null;
3351
+ enrichedAt: string | null;
3352
+ displayNameSource: "auto" | "manual";
3337
3353
  aliases: {
3338
3354
  provider: "github" | "gitlab";
3339
3355
  login: string;
@@ -3367,6 +3383,8 @@ export interface operations {
3367
3383
  displayName: string;
3368
3384
  email: string | null;
3369
3385
  avatarUrl: string | null;
3386
+ enrichedAt: string | null;
3387
+ displayNameSource: "auto" | "manual";
3370
3388
  aliases: {
3371
3389
  provider: "github" | "gitlab";
3372
3390
  login: string;
@@ -3380,6 +3398,8 @@ export interface operations {
3380
3398
  displayName: string;
3381
3399
  email: string | null;
3382
3400
  avatarUrl: string | null;
3401
+ enrichedAt: string | null;
3402
+ displayNameSource: "auto" | "manual";
3383
3403
  aliases: {
3384
3404
  provider: "github" | "gitlab";
3385
3405
  login: string;
@@ -3393,6 +3413,8 @@ export interface operations {
3393
3413
  displayName: string;
3394
3414
  email: string | null;
3395
3415
  avatarUrl: string | null;
3416
+ enrichedAt: string | null;
3417
+ displayNameSource: "auto" | "manual";
3396
3418
  aliases: {
3397
3419
  provider: "github" | "gitlab";
3398
3420
  login: string;
@@ -3527,6 +3549,8 @@ export interface operations {
3527
3549
  displayName: string;
3528
3550
  email: string | null;
3529
3551
  avatarUrl: string | null;
3552
+ enrichedAt: string | null;
3553
+ displayNameSource: "auto" | "manual";
3530
3554
  aliases: {
3531
3555
  provider: "github" | "gitlab";
3532
3556
  login: string;
@@ -3540,6 +3564,8 @@ export interface operations {
3540
3564
  displayName: string;
3541
3565
  email: string | null;
3542
3566
  avatarUrl: string | null;
3567
+ enrichedAt: string | null;
3568
+ displayNameSource: "auto" | "manual";
3543
3569
  aliases: {
3544
3570
  provider: "github" | "gitlab";
3545
3571
  login: string;
@@ -3553,6 +3579,8 @@ export interface operations {
3553
3579
  displayName: string;
3554
3580
  email: string | null;
3555
3581
  avatarUrl: string | null;
3582
+ enrichedAt: string | null;
3583
+ displayNameSource: "auto" | "manual";
3556
3584
  aliases: {
3557
3585
  provider: "github" | "gitlab";
3558
3586
  login: string;
@@ -3633,6 +3661,8 @@ export interface operations {
3633
3661
  displayName: string;
3634
3662
  email: string | null;
3635
3663
  avatarUrl: string | null;
3664
+ enrichedAt: string | null;
3665
+ displayNameSource: "auto" | "manual";
3636
3666
  aliases: {
3637
3667
  provider: "github" | "gitlab";
3638
3668
  login: string;
@@ -3646,6 +3676,8 @@ export interface operations {
3646
3676
  displayName: string;
3647
3677
  email: string | null;
3648
3678
  avatarUrl: string | null;
3679
+ enrichedAt: string | null;
3680
+ displayNameSource: "auto" | "manual";
3649
3681
  aliases: {
3650
3682
  provider: "github" | "gitlab";
3651
3683
  login: string;
@@ -3659,6 +3691,8 @@ export interface operations {
3659
3691
  displayName: string;
3660
3692
  email: string | null;
3661
3693
  avatarUrl: string | null;
3694
+ enrichedAt: string | null;
3695
+ displayNameSource: "auto" | "manual";
3662
3696
  aliases: {
3663
3697
  provider: "github" | "gitlab";
3664
3698
  login: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cesar-richard/git-connector-sdk",
3
- "version": "1.65.0",
3
+ "version": "1.67.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": {