@app-vitals/agent-admin 1.12.1 → 1.14.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/openapi.json CHANGED
@@ -3490,6 +3490,300 @@
3490
3490
  "source",
3491
3491
  "ref"
3492
3492
  ]
3493
+ },
3494
+ "GithubEnterpriseStatus": {
3495
+ "type": "object",
3496
+ "properties": {
3497
+ "configured": {
3498
+ "type": "boolean"
3499
+ },
3500
+ "installer": {
3501
+ "$ref": "#/components/schemas/GithubEnterpriseApp"
3502
+ },
3503
+ "lookup": {
3504
+ "$ref": "#/components/schemas/GithubEnterpriseApp"
3505
+ }
3506
+ },
3507
+ "required": [
3508
+ "configured",
3509
+ "installer",
3510
+ "lookup"
3511
+ ]
3512
+ },
3513
+ "GithubEnterpriseApp": {
3514
+ "type": [
3515
+ "object",
3516
+ "null"
3517
+ ],
3518
+ "properties": {
3519
+ "role": {
3520
+ "type": "string",
3521
+ "example": "installer"
3522
+ },
3523
+ "appId": {
3524
+ "type": "string",
3525
+ "example": "12345"
3526
+ },
3527
+ "slug": {
3528
+ "type": "string",
3529
+ "example": "example-installer"
3530
+ },
3531
+ "enterpriseSlug": {
3532
+ "type": [
3533
+ "string",
3534
+ "null"
3535
+ ],
3536
+ "example": "acme"
3537
+ },
3538
+ "keySet": {
3539
+ "type": "boolean",
3540
+ "description": "True when a private key is stored. The key is never returned."
3541
+ },
3542
+ "lastValidationStatus": {
3543
+ "type": [
3544
+ "string",
3545
+ "null"
3546
+ ],
3547
+ "example": "valid"
3548
+ },
3549
+ "lastValidatedAt": {
3550
+ "type": [
3551
+ "string",
3552
+ "null"
3553
+ ]
3554
+ },
3555
+ "lastValidationError": {
3556
+ "type": [
3557
+ "string",
3558
+ "null"
3559
+ ]
3560
+ },
3561
+ "createdAt": {
3562
+ "type": "string"
3563
+ },
3564
+ "updatedAt": {
3565
+ "type": "string"
3566
+ }
3567
+ },
3568
+ "required": [
3569
+ "role",
3570
+ "appId",
3571
+ "slug",
3572
+ "enterpriseSlug",
3573
+ "keySet",
3574
+ "lastValidationStatus",
3575
+ "lastValidatedAt",
3576
+ "lastValidationError",
3577
+ "createdAt",
3578
+ "updatedAt"
3579
+ ]
3580
+ },
3581
+ "PutGithubEnterpriseAppBody": {
3582
+ "type": "object",
3583
+ "properties": {
3584
+ "appId": {
3585
+ "type": "string",
3586
+ "pattern": "^\\d+$",
3587
+ "example": "12345"
3588
+ },
3589
+ "slug": {
3590
+ "type": "string",
3591
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$",
3592
+ "example": "example-installer"
3593
+ },
3594
+ "enterpriseSlug": {
3595
+ "type": [
3596
+ "string",
3597
+ "null"
3598
+ ],
3599
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$",
3600
+ "description": "Required for the installer role.",
3601
+ "example": "acme"
3602
+ },
3603
+ "privateKey": {
3604
+ "type": "string",
3605
+ "minLength": 1,
3606
+ "description": "PEM private key. Write-only: encrypted at rest, never returned."
3607
+ }
3608
+ },
3609
+ "required": [
3610
+ "appId",
3611
+ "slug",
3612
+ "privateKey"
3613
+ ]
3614
+ },
3615
+ "GithubEnterpriseValidateResult": {
3616
+ "type": "object",
3617
+ "properties": {
3618
+ "role": {
3619
+ "type": "string"
3620
+ },
3621
+ "ok": {
3622
+ "type": "boolean"
3623
+ },
3624
+ "status": {
3625
+ "type": "string",
3626
+ "enum": [
3627
+ "valid",
3628
+ "missing_permission",
3629
+ "error"
3630
+ ]
3631
+ },
3632
+ "requiredPermission": {
3633
+ "type": "string"
3634
+ },
3635
+ "grantedPermissions": {
3636
+ "type": "object",
3637
+ "additionalProperties": {
3638
+ "type": "string"
3639
+ }
3640
+ },
3641
+ "error": {
3642
+ "type": [
3643
+ "string",
3644
+ "null"
3645
+ ]
3646
+ },
3647
+ "app": {
3648
+ "$ref": "#/components/schemas/GithubEnterpriseApp"
3649
+ }
3650
+ },
3651
+ "required": [
3652
+ "role",
3653
+ "ok",
3654
+ "status",
3655
+ "requiredPermission",
3656
+ "grantedPermissions",
3657
+ "error",
3658
+ "app"
3659
+ ]
3660
+ },
3661
+ "GithubEnterpriseOrgs": {
3662
+ "type": "object",
3663
+ "properties": {
3664
+ "configured": {
3665
+ "type": "boolean"
3666
+ },
3667
+ "agentAppSlug": {
3668
+ "type": [
3669
+ "string",
3670
+ "null"
3671
+ ]
3672
+ },
3673
+ "orgs": {
3674
+ "type": "array",
3675
+ "items": {
3676
+ "type": "object",
3677
+ "properties": {
3678
+ "id": {
3679
+ "type": "number"
3680
+ },
3681
+ "login": {
3682
+ "type": "string"
3683
+ },
3684
+ "lookupAppInstalled": {
3685
+ "type": [
3686
+ "boolean",
3687
+ "null"
3688
+ ],
3689
+ "description": "Null when no lookup App is configured."
3690
+ },
3691
+ "agentAppInstalled": {
3692
+ "type": [
3693
+ "boolean",
3694
+ "null"
3695
+ ],
3696
+ "description": "Null when no agentId (or no slug) was given."
3697
+ }
3698
+ },
3699
+ "required": [
3700
+ "id",
3701
+ "login",
3702
+ "lookupAppInstalled",
3703
+ "agentAppInstalled"
3704
+ ]
3705
+ }
3706
+ }
3707
+ },
3708
+ "required": [
3709
+ "configured",
3710
+ "orgs"
3711
+ ]
3712
+ },
3713
+ "GithubEnterpriseInstallResult": {
3714
+ "type": "object",
3715
+ "properties": {
3716
+ "org": {
3717
+ "type": "string"
3718
+ },
3719
+ "created": {
3720
+ "type": "boolean",
3721
+ "description": "False when the App was already installed."
3722
+ },
3723
+ "installation": {
3724
+ "type": "object",
3725
+ "properties": {
3726
+ "id": {
3727
+ "type": "number"
3728
+ },
3729
+ "appSlug": {
3730
+ "type": "string"
3731
+ },
3732
+ "accountLogin": {
3733
+ "type": "string"
3734
+ },
3735
+ "repositorySelection": {
3736
+ "type": "string",
3737
+ "enum": [
3738
+ "all",
3739
+ "selected",
3740
+ "none"
3741
+ ]
3742
+ }
3743
+ },
3744
+ "required": [
3745
+ "id",
3746
+ "appSlug",
3747
+ "accountLogin",
3748
+ "repositorySelection"
3749
+ ]
3750
+ }
3751
+ },
3752
+ "required": [
3753
+ "org",
3754
+ "created",
3755
+ "installation"
3756
+ ]
3757
+ },
3758
+ "GithubEnterpriseInstallBody": {
3759
+ "type": "object",
3760
+ "properties": {
3761
+ "agentId": {
3762
+ "type": "string",
3763
+ "minLength": 1,
3764
+ "example": "agent-id"
3765
+ },
3766
+ "repositorySelection": {
3767
+ "type": "string",
3768
+ "enum": [
3769
+ "all",
3770
+ "selected",
3771
+ "none"
3772
+ ],
3773
+ "default": "all"
3774
+ },
3775
+ "repositories": {
3776
+ "type": "array",
3777
+ "items": {
3778
+ "type": "string",
3779
+ "minLength": 1
3780
+ },
3781
+ "maxItems": 50
3782
+ }
3783
+ },
3784
+ "required": [
3785
+ "agentId"
3786
+ ]
3493
3787
  }
3494
3788
  },
3495
3789
  "parameters": {}
@@ -6751,6 +7045,499 @@
6751
7045
  }
6752
7046
  }
6753
7047
  }
7048
+ },
7049
+ "/github-enterprise/apps": {
7050
+ "get": {
7051
+ "tags": [
7052
+ "github-enterprise"
7053
+ ],
7054
+ "summary": "GitHub Enterprise App status",
7055
+ "description": "Admin-only. Metadata and key-set flag per role; never the key. Returns configured=false with null roles when nothing is set.",
7056
+ "responses": {
7057
+ "200": {
7058
+ "description": "Status",
7059
+ "content": {
7060
+ "application/json": {
7061
+ "schema": {
7062
+ "$ref": "#/components/schemas/GithubEnterpriseStatus"
7063
+ }
7064
+ }
7065
+ }
7066
+ },
7067
+ "401": {
7068
+ "description": "Unauthorized",
7069
+ "content": {
7070
+ "application/json": {
7071
+ "schema": {
7072
+ "$ref": "#/components/schemas/Error"
7073
+ }
7074
+ }
7075
+ }
7076
+ },
7077
+ "403": {
7078
+ "description": "Forbidden (non-admin caller)",
7079
+ "content": {
7080
+ "application/json": {
7081
+ "schema": {
7082
+ "$ref": "#/components/schemas/Error"
7083
+ }
7084
+ }
7085
+ }
7086
+ }
7087
+ }
7088
+ }
7089
+ },
7090
+ "/github-enterprise/apps/{role}": {
7091
+ "put": {
7092
+ "tags": [
7093
+ "github-enterprise"
7094
+ ],
7095
+ "summary": "Create or replace the App for a role",
7096
+ "description": "Admin-only. Stores the App id, slug, enterprise slug (installer) and the encrypted private key, and resets validation state. 422 when SHIPWRIGHT_ENCRYPTION_KEY is not configured.",
7097
+ "parameters": [
7098
+ {
7099
+ "schema": {
7100
+ "type": "string",
7101
+ "enum": [
7102
+ "installer",
7103
+ "lookup"
7104
+ ],
7105
+ "example": "installer"
7106
+ },
7107
+ "required": true,
7108
+ "name": "role",
7109
+ "in": "path"
7110
+ }
7111
+ ],
7112
+ "requestBody": {
7113
+ "content": {
7114
+ "application/json": {
7115
+ "schema": {
7116
+ "$ref": "#/components/schemas/PutGithubEnterpriseAppBody"
7117
+ }
7118
+ }
7119
+ }
7120
+ },
7121
+ "responses": {
7122
+ "200": {
7123
+ "description": "Saved (metadata only)",
7124
+ "content": {
7125
+ "application/json": {
7126
+ "schema": {
7127
+ "$ref": "#/components/schemas/GithubEnterpriseApp"
7128
+ }
7129
+ }
7130
+ }
7131
+ },
7132
+ "400": {
7133
+ "description": "Bad request",
7134
+ "content": {
7135
+ "application/json": {
7136
+ "schema": {
7137
+ "$ref": "#/components/schemas/Error"
7138
+ }
7139
+ }
7140
+ }
7141
+ },
7142
+ "401": {
7143
+ "description": "Unauthorized",
7144
+ "content": {
7145
+ "application/json": {
7146
+ "schema": {
7147
+ "$ref": "#/components/schemas/Error"
7148
+ }
7149
+ }
7150
+ }
7151
+ },
7152
+ "403": {
7153
+ "description": "Forbidden (non-admin caller)",
7154
+ "content": {
7155
+ "application/json": {
7156
+ "schema": {
7157
+ "$ref": "#/components/schemas/Error"
7158
+ }
7159
+ }
7160
+ }
7161
+ },
7162
+ "422": {
7163
+ "description": "Invalid key, or encryption unavailable",
7164
+ "content": {
7165
+ "application/json": {
7166
+ "schema": {
7167
+ "$ref": "#/components/schemas/Error"
7168
+ }
7169
+ }
7170
+ }
7171
+ }
7172
+ }
7173
+ },
7174
+ "delete": {
7175
+ "tags": [
7176
+ "github-enterprise"
7177
+ ],
7178
+ "summary": "Remove the App for a role",
7179
+ "description": "Admin-only. No-op when the role is not configured.",
7180
+ "parameters": [
7181
+ {
7182
+ "schema": {
7183
+ "type": "string",
7184
+ "enum": [
7185
+ "installer",
7186
+ "lookup"
7187
+ ],
7188
+ "example": "installer"
7189
+ },
7190
+ "required": true,
7191
+ "name": "role",
7192
+ "in": "path"
7193
+ }
7194
+ ],
7195
+ "responses": {
7196
+ "204": {
7197
+ "description": "Removed"
7198
+ },
7199
+ "401": {
7200
+ "description": "Unauthorized",
7201
+ "content": {
7202
+ "application/json": {
7203
+ "schema": {
7204
+ "$ref": "#/components/schemas/Error"
7205
+ }
7206
+ }
7207
+ }
7208
+ },
7209
+ "403": {
7210
+ "description": "Forbidden (non-admin caller)",
7211
+ "content": {
7212
+ "application/json": {
7213
+ "schema": {
7214
+ "$ref": "#/components/schemas/Error"
7215
+ }
7216
+ }
7217
+ }
7218
+ }
7219
+ }
7220
+ }
7221
+ },
7222
+ "/github-enterprise/apps/{role}/validate": {
7223
+ "post": {
7224
+ "tags": [
7225
+ "github-enterprise"
7226
+ ],
7227
+ "summary": "Validate the App for a role",
7228
+ "description": "Admin-only. Authenticates as the App and checks the required permission (installer: enterprise_organization_installations write; lookup: metadata read). The outcome is persisted and returned; GitHub failures are reported as status=error with a generic message.",
7229
+ "parameters": [
7230
+ {
7231
+ "schema": {
7232
+ "type": "string",
7233
+ "enum": [
7234
+ "installer",
7235
+ "lookup"
7236
+ ],
7237
+ "example": "installer"
7238
+ },
7239
+ "required": true,
7240
+ "name": "role",
7241
+ "in": "path"
7242
+ }
7243
+ ],
7244
+ "responses": {
7245
+ "200": {
7246
+ "description": "Validation outcome",
7247
+ "content": {
7248
+ "application/json": {
7249
+ "schema": {
7250
+ "$ref": "#/components/schemas/GithubEnterpriseValidateResult"
7251
+ }
7252
+ }
7253
+ }
7254
+ },
7255
+ "401": {
7256
+ "description": "Unauthorized",
7257
+ "content": {
7258
+ "application/json": {
7259
+ "schema": {
7260
+ "$ref": "#/components/schemas/Error"
7261
+ }
7262
+ }
7263
+ }
7264
+ },
7265
+ "403": {
7266
+ "description": "Forbidden (non-admin caller)",
7267
+ "content": {
7268
+ "application/json": {
7269
+ "schema": {
7270
+ "$ref": "#/components/schemas/Error"
7271
+ }
7272
+ }
7273
+ }
7274
+ },
7275
+ "404": {
7276
+ "description": "Role not configured",
7277
+ "content": {
7278
+ "application/json": {
7279
+ "schema": {
7280
+ "$ref": "#/components/schemas/Error"
7281
+ }
7282
+ }
7283
+ }
7284
+ }
7285
+ }
7286
+ }
7287
+ },
7288
+ "/github-enterprise/orgs": {
7289
+ "get": {
7290
+ "tags": [
7291
+ "github-enterprise"
7292
+ ],
7293
+ "summary": "List installable organizations",
7294
+ "description": "Admin-only. Lists the enterprise's installable organizations, whether each has the lookup App installed, and (with agentId) whether each has that agent's App installed. Returns configured=false and no orgs when the installer App is not set.",
7295
+ "parameters": [
7296
+ {
7297
+ "schema": {
7298
+ "type": "string",
7299
+ "minLength": 1
7300
+ },
7301
+ "required": false,
7302
+ "name": "agentId",
7303
+ "in": "query"
7304
+ }
7305
+ ],
7306
+ "responses": {
7307
+ "200": {
7308
+ "description": "Organizations",
7309
+ "content": {
7310
+ "application/json": {
7311
+ "schema": {
7312
+ "$ref": "#/components/schemas/GithubEnterpriseOrgs"
7313
+ }
7314
+ }
7315
+ }
7316
+ },
7317
+ "401": {
7318
+ "description": "Unauthorized",
7319
+ "content": {
7320
+ "application/json": {
7321
+ "schema": {
7322
+ "$ref": "#/components/schemas/Error"
7323
+ }
7324
+ }
7325
+ }
7326
+ },
7327
+ "403": {
7328
+ "description": "Forbidden (non-admin caller)",
7329
+ "content": {
7330
+ "application/json": {
7331
+ "schema": {
7332
+ "$ref": "#/components/schemas/Error"
7333
+ }
7334
+ }
7335
+ }
7336
+ },
7337
+ "404": {
7338
+ "description": "Not found (or not found at GitHub)",
7339
+ "content": {
7340
+ "application/json": {
7341
+ "schema": {
7342
+ "$ref": "#/components/schemas/Error"
7343
+ }
7344
+ }
7345
+ }
7346
+ },
7347
+ "422": {
7348
+ "description": "Refused or rejected by GitHub",
7349
+ "content": {
7350
+ "application/json": {
7351
+ "schema": {
7352
+ "$ref": "#/components/schemas/Error"
7353
+ }
7354
+ }
7355
+ }
7356
+ },
7357
+ "424": {
7358
+ "description": "GitHub refused the configured App credentials or permission",
7359
+ "content": {
7360
+ "application/json": {
7361
+ "schema": {
7362
+ "$ref": "#/components/schemas/Error"
7363
+ }
7364
+ }
7365
+ }
7366
+ },
7367
+ "429": {
7368
+ "description": "GitHub rate limit",
7369
+ "content": {
7370
+ "application/json": {
7371
+ "schema": {
7372
+ "$ref": "#/components/schemas/Error"
7373
+ }
7374
+ }
7375
+ }
7376
+ },
7377
+ "502": {
7378
+ "description": "GitHub unavailable or returned an unexpected response",
7379
+ "content": {
7380
+ "application/json": {
7381
+ "schema": {
7382
+ "$ref": "#/components/schemas/Error"
7383
+ }
7384
+ }
7385
+ }
7386
+ },
7387
+ "504": {
7388
+ "description": "GitHub unreachable",
7389
+ "content": {
7390
+ "application/json": {
7391
+ "schema": {
7392
+ "$ref": "#/components/schemas/Error"
7393
+ }
7394
+ }
7395
+ }
7396
+ }
7397
+ }
7398
+ }
7399
+ },
7400
+ "/github-enterprise/orgs/{org}/install": {
7401
+ "post": {
7402
+ "tags": [
7403
+ "github-enterprise"
7404
+ ],
7405
+ "summary": "Install an agent's App on an organization",
7406
+ "description": "Admin-only. Resolves the agent's stored GH_APP_SLUG, looks the App up through the public GET /apps/{slug} to get its client id, and installs it on the org with the installer App. 422 for an agent with no slug and for a private App (not visible to the public lookup); 409 when the installer App is not configured.",
7407
+ "parameters": [
7408
+ {
7409
+ "schema": {
7410
+ "type": "string",
7411
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$",
7412
+ "example": "example-org"
7413
+ },
7414
+ "required": true,
7415
+ "name": "org",
7416
+ "in": "path"
7417
+ }
7418
+ ],
7419
+ "requestBody": {
7420
+ "content": {
7421
+ "application/json": {
7422
+ "schema": {
7423
+ "$ref": "#/components/schemas/GithubEnterpriseInstallBody"
7424
+ }
7425
+ }
7426
+ }
7427
+ },
7428
+ "responses": {
7429
+ "200": {
7430
+ "description": "Installed (or already installed)",
7431
+ "content": {
7432
+ "application/json": {
7433
+ "schema": {
7434
+ "$ref": "#/components/schemas/GithubEnterpriseInstallResult"
7435
+ }
7436
+ }
7437
+ }
7438
+ },
7439
+ "400": {
7440
+ "description": "Bad request",
7441
+ "content": {
7442
+ "application/json": {
7443
+ "schema": {
7444
+ "$ref": "#/components/schemas/Error"
7445
+ }
7446
+ }
7447
+ }
7448
+ },
7449
+ "401": {
7450
+ "description": "Unauthorized",
7451
+ "content": {
7452
+ "application/json": {
7453
+ "schema": {
7454
+ "$ref": "#/components/schemas/Error"
7455
+ }
7456
+ }
7457
+ }
7458
+ },
7459
+ "403": {
7460
+ "description": "Forbidden (non-admin caller)",
7461
+ "content": {
7462
+ "application/json": {
7463
+ "schema": {
7464
+ "$ref": "#/components/schemas/Error"
7465
+ }
7466
+ }
7467
+ }
7468
+ },
7469
+ "404": {
7470
+ "description": "Not found (or not found at GitHub)",
7471
+ "content": {
7472
+ "application/json": {
7473
+ "schema": {
7474
+ "$ref": "#/components/schemas/Error"
7475
+ }
7476
+ }
7477
+ }
7478
+ },
7479
+ "409": {
7480
+ "description": "Installer App not configured",
7481
+ "content": {
7482
+ "application/json": {
7483
+ "schema": {
7484
+ "$ref": "#/components/schemas/Error"
7485
+ }
7486
+ }
7487
+ }
7488
+ },
7489
+ "422": {
7490
+ "description": "Refused or rejected by GitHub",
7491
+ "content": {
7492
+ "application/json": {
7493
+ "schema": {
7494
+ "$ref": "#/components/schemas/Error"
7495
+ }
7496
+ }
7497
+ }
7498
+ },
7499
+ "424": {
7500
+ "description": "GitHub refused the configured App credentials or permission",
7501
+ "content": {
7502
+ "application/json": {
7503
+ "schema": {
7504
+ "$ref": "#/components/schemas/Error"
7505
+ }
7506
+ }
7507
+ }
7508
+ },
7509
+ "429": {
7510
+ "description": "GitHub rate limit",
7511
+ "content": {
7512
+ "application/json": {
7513
+ "schema": {
7514
+ "$ref": "#/components/schemas/Error"
7515
+ }
7516
+ }
7517
+ }
7518
+ },
7519
+ "502": {
7520
+ "description": "GitHub unavailable or returned an unexpected response",
7521
+ "content": {
7522
+ "application/json": {
7523
+ "schema": {
7524
+ "$ref": "#/components/schemas/Error"
7525
+ }
7526
+ }
7527
+ }
7528
+ },
7529
+ "504": {
7530
+ "description": "GitHub unreachable",
7531
+ "content": {
7532
+ "application/json": {
7533
+ "schema": {
7534
+ "$ref": "#/components/schemas/Error"
7535
+ }
7536
+ }
7537
+ }
7538
+ }
7539
+ }
7540
+ }
6754
7541
  }
6755
7542
  },
6756
7543
  "webhooks": {}