@yadsh/dsh-qa-integrations 0.8.3 → 0.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/README.md +13 -7
- package/lib/broker.js +93 -1
- package/lib/broker.js.map +1 -1
- package/lib/client.js +49 -49
- package/lib/client.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/repository.js +31 -0
- package/lib/repository.js.map +1 -1
- package/lib/service-credentials/config.js +61 -0
- package/lib/service-credentials/config.js.map +1 -1
- package/lib/service-credentials/rate-limit.js +136 -0
- package/lib/service-credentials/rate-limit.js.map +1 -0
- package/lib/typert.host.js +54 -50
- package/lib/typert.remote-client.js +49 -49
- package/lib/types/broker.d.ts +27 -2
- package/lib/types/repository.d.ts +2 -0
- package/lib/types/service-credentials/config.d.ts +22 -0
- package/lib/types/service-credentials/rate-limit.d.ts +66 -0
- package/lib/types/service-credentials/types.d.ts +18 -0
- package/package.json +5 -5
|
@@ -1131,7 +1131,7 @@ export const TYPERT_REMOTE = {
|
|
|
1131
1131
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/bitrix24Instances:result',
|
|
1132
1132
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_bitrix24Instances_result$schema,
|
|
1133
1133
|
},
|
|
1134
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1134
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":501,"column":3},
|
|
1135
1135
|
},
|
|
1136
1136
|
{
|
|
1137
1137
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/confluenceSites',
|
|
@@ -1156,7 +1156,7 @@ export const TYPERT_REMOTE = {
|
|
|
1156
1156
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/confluenceSites:result',
|
|
1157
1157
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_confluenceSites_result$schema,
|
|
1158
1158
|
},
|
|
1159
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1159
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":593,"column":3},
|
|
1160
1160
|
},
|
|
1161
1161
|
{
|
|
1162
1162
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/credentialSource',
|
|
@@ -1191,7 +1191,7 @@ export const TYPERT_REMOTE = {
|
|
|
1191
1191
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1192
1192
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_credentialSource_result$schema,
|
|
1193
1193
|
},
|
|
1194
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1194
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":941,"column":9},
|
|
1195
1195
|
},
|
|
1196
1196
|
{
|
|
1197
1197
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/describe',
|
|
@@ -1206,7 +1206,7 @@ export const TYPERT_REMOTE = {
|
|
|
1206
1206
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/describe:result',
|
|
1207
1207
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_describe_result$schema,
|
|
1208
1208
|
},
|
|
1209
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1209
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":450,"column":3},
|
|
1210
1210
|
},
|
|
1211
1211
|
{
|
|
1212
1212
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectBitrix24',
|
|
@@ -1231,7 +1231,7 @@ export const TYPERT_REMOTE = {
|
|
|
1231
1231
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectBitrix24:result',
|
|
1232
1232
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectBitrix24_result$schema,
|
|
1233
1233
|
},
|
|
1234
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1234
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":520,"column":3},
|
|
1235
1235
|
},
|
|
1236
1236
|
{
|
|
1237
1237
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectConfluence',
|
|
@@ -1256,7 +1256,7 @@ export const TYPERT_REMOTE = {
|
|
|
1256
1256
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectConfluence:result',
|
|
1257
1257
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectConfluence_result$schema,
|
|
1258
1258
|
},
|
|
1259
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1259
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":655,"column":3},
|
|
1260
1260
|
},
|
|
1261
1261
|
{
|
|
1262
1262
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectGitlab',
|
|
@@ -1281,7 +1281,7 @@ export const TYPERT_REMOTE = {
|
|
|
1281
1281
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectGitlab:result',
|
|
1282
1282
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectGitlab_result$schema,
|
|
1283
1283
|
},
|
|
1284
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1284
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":581,"column":3},
|
|
1285
1285
|
},
|
|
1286
1286
|
{
|
|
1287
1287
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectJira',
|
|
@@ -1306,7 +1306,7 @@ export const TYPERT_REMOTE = {
|
|
|
1306
1306
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectJira:result',
|
|
1307
1307
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectJira_result$schema,
|
|
1308
1308
|
},
|
|
1309
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1309
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":791,"column":3},
|
|
1310
1310
|
},
|
|
1311
1311
|
{
|
|
1312
1312
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectTeamcity',
|
|
@@ -1331,7 +1331,7 @@ export const TYPERT_REMOTE = {
|
|
|
1331
1331
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectTeamcity:result',
|
|
1332
1332
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectTeamcity_result$schema,
|
|
1333
1333
|
},
|
|
1334
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1334
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":719,"column":3},
|
|
1335
1335
|
},
|
|
1336
1336
|
{
|
|
1337
1337
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectTestit',
|
|
@@ -1356,7 +1356,7 @@ export const TYPERT_REMOTE = {
|
|
|
1356
1356
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectTestit:result',
|
|
1357
1357
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectTestit_result$schema,
|
|
1358
1358
|
},
|
|
1359
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1359
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":852,"column":3},
|
|
1360
1360
|
},
|
|
1361
1361
|
{
|
|
1362
1362
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectWeblate',
|
|
@@ -1381,7 +1381,7 @@ export const TYPERT_REMOTE = {
|
|
|
1381
1381
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/disconnectWeblate:result',
|
|
1382
1382
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_disconnectWeblate_result$schema,
|
|
1383
1383
|
},
|
|
1384
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1384
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":913,"column":3},
|
|
1385
1385
|
},
|
|
1386
1386
|
{
|
|
1387
1387
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getBitrix24',
|
|
@@ -1406,7 +1406,7 @@ export const TYPERT_REMOTE = {
|
|
|
1406
1406
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1407
1407
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getBitrix24_result$schema,
|
|
1408
1408
|
},
|
|
1409
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1409
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":471,"column":3},
|
|
1410
1410
|
},
|
|
1411
1411
|
{
|
|
1412
1412
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getConfluence',
|
|
@@ -1431,7 +1431,7 @@ export const TYPERT_REMOTE = {
|
|
|
1431
1431
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1432
1432
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getConfluence_result$schema,
|
|
1433
1433
|
},
|
|
1434
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1434
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":598,"column":3},
|
|
1435
1435
|
},
|
|
1436
1436
|
{
|
|
1437
1437
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getGitlab',
|
|
@@ -1456,7 +1456,7 @@ export const TYPERT_REMOTE = {
|
|
|
1456
1456
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1457
1457
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getGitlab_result$schema,
|
|
1458
1458
|
},
|
|
1459
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1459
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":537,"column":3},
|
|
1460
1460
|
},
|
|
1461
1461
|
{
|
|
1462
1462
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getJira',
|
|
@@ -1481,7 +1481,7 @@ export const TYPERT_REMOTE = {
|
|
|
1481
1481
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1482
1482
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getJira_result$schema,
|
|
1483
1483
|
},
|
|
1484
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1484
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":737,"column":3},
|
|
1485
1485
|
},
|
|
1486
1486
|
{
|
|
1487
1487
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getTeamcity',
|
|
@@ -1506,7 +1506,7 @@ export const TYPERT_REMOTE = {
|
|
|
1506
1506
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1507
1507
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getTeamcity_result$schema,
|
|
1508
1508
|
},
|
|
1509
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1509
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":662,"column":3},
|
|
1510
1510
|
},
|
|
1511
1511
|
{
|
|
1512
1512
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getTestit',
|
|
@@ -1531,7 +1531,7 @@ export const TYPERT_REMOTE = {
|
|
|
1531
1531
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1532
1532
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getTestit_result$schema,
|
|
1533
1533
|
},
|
|
1534
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1534
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":808,"column":3},
|
|
1535
1535
|
},
|
|
1536
1536
|
{
|
|
1537
1537
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/getWeblate',
|
|
@@ -1556,7 +1556,7 @@ export const TYPERT_REMOTE = {
|
|
|
1556
1556
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1557
1557
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_getWeblate_result$schema,
|
|
1558
1558
|
},
|
|
1559
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1559
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":869,"column":3},
|
|
1560
1560
|
},
|
|
1561
1561
|
{
|
|
1562
1562
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/gitlabInstances',
|
|
@@ -1581,7 +1581,7 @@ export const TYPERT_REMOTE = {
|
|
|
1581
1581
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/gitlabInstances:result',
|
|
1582
1582
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_gitlabInstances_result$schema,
|
|
1583
1583
|
},
|
|
1584
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1584
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":532,"column":3},
|
|
1585
1585
|
},
|
|
1586
1586
|
{
|
|
1587
1587
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/jiraSites',
|
|
@@ -1606,7 +1606,7 @@ export const TYPERT_REMOTE = {
|
|
|
1606
1606
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/jiraSites:result',
|
|
1607
1607
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_jiraSites_result$schema,
|
|
1608
1608
|
},
|
|
1609
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1609
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":732,"column":3},
|
|
1610
1610
|
},
|
|
1611
1611
|
{
|
|
1612
1612
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/list',
|
|
@@ -1631,7 +1631,7 @@ export const TYPERT_REMOTE = {
|
|
|
1631
1631
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/list:result',
|
|
1632
1632
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_list_result$schema,
|
|
1633
1633
|
},
|
|
1634
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1634
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":466,"column":3},
|
|
1635
1635
|
},
|
|
1636
1636
|
{
|
|
1637
1637
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/managedServiceCredentials',
|
|
@@ -1656,7 +1656,7 @@ export const TYPERT_REMOTE = {
|
|
|
1656
1656
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/managedServiceCredentials:result',
|
|
1657
1657
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_managedServiceCredentials_result$schema,
|
|
1658
1658
|
},
|
|
1659
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1659
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":925,"column":3},
|
|
1660
1660
|
},
|
|
1661
1661
|
{
|
|
1662
1662
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchBitrix24Policy',
|
|
@@ -1691,7 +1691,7 @@ export const TYPERT_REMOTE = {
|
|
|
1691
1691
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1692
1692
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchBitrix24Policy_result$schema,
|
|
1693
1693
|
},
|
|
1694
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1694
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":513,"column":3},
|
|
1695
1695
|
},
|
|
1696
1696
|
{
|
|
1697
1697
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchConfluencePolicy',
|
|
@@ -1726,7 +1726,7 @@ export const TYPERT_REMOTE = {
|
|
|
1726
1726
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1727
1727
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchConfluencePolicy_result$schema,
|
|
1728
1728
|
},
|
|
1729
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1729
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":648,"column":3},
|
|
1730
1730
|
},
|
|
1731
1731
|
{
|
|
1732
1732
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchGitlabPolicy',
|
|
@@ -1761,7 +1761,7 @@ export const TYPERT_REMOTE = {
|
|
|
1761
1761
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1762
1762
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchGitlabPolicy_result$schema,
|
|
1763
1763
|
},
|
|
1764
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1764
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":574,"column":3},
|
|
1765
1765
|
},
|
|
1766
1766
|
{
|
|
1767
1767
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchJiraPolicy',
|
|
@@ -1796,7 +1796,7 @@ export const TYPERT_REMOTE = {
|
|
|
1796
1796
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1797
1797
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchJiraPolicy_result$schema,
|
|
1798
1798
|
},
|
|
1799
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1799
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":784,"column":3},
|
|
1800
1800
|
},
|
|
1801
1801
|
{
|
|
1802
1802
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchTeamcityPolicy',
|
|
@@ -1831,7 +1831,7 @@ export const TYPERT_REMOTE = {
|
|
|
1831
1831
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1832
1832
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchTeamcityPolicy_result$schema,
|
|
1833
1833
|
},
|
|
1834
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1834
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":712,"column":3},
|
|
1835
1835
|
},
|
|
1836
1836
|
{
|
|
1837
1837
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchTestitPolicy',
|
|
@@ -1866,7 +1866,7 @@ export const TYPERT_REMOTE = {
|
|
|
1866
1866
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1867
1867
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchTestitPolicy_result$schema,
|
|
1868
1868
|
},
|
|
1869
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1869
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":845,"column":3},
|
|
1870
1870
|
},
|
|
1871
1871
|
{
|
|
1872
1872
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/patchWeblatePolicy',
|
|
@@ -1901,7 +1901,7 @@ export const TYPERT_REMOTE = {
|
|
|
1901
1901
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1902
1902
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_patchWeblatePolicy_result$schema,
|
|
1903
1903
|
},
|
|
1904
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1904
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":906,"column":3},
|
|
1905
1905
|
},
|
|
1906
1906
|
{
|
|
1907
1907
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/providers',
|
|
@@ -1926,7 +1926,7 @@ export const TYPERT_REMOTE = {
|
|
|
1926
1926
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/providers:result',
|
|
1927
1927
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_providers_result$schema,
|
|
1928
1928
|
},
|
|
1929
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1929
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":461,"column":3},
|
|
1930
1930
|
},
|
|
1931
1931
|
{
|
|
1932
1932
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putBitrix24Credential',
|
|
@@ -1961,7 +1961,7 @@ export const TYPERT_REMOTE = {
|
|
|
1961
1961
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1962
1962
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putBitrix24Credential_result$schema,
|
|
1963
1963
|
},
|
|
1964
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1964
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":478,"column":9},
|
|
1965
1965
|
},
|
|
1966
1966
|
{
|
|
1967
1967
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putConfluenceCredential',
|
|
@@ -1996,7 +1996,7 @@ export const TYPERT_REMOTE = {
|
|
|
1996
1996
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
1997
1997
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putConfluenceCredential_result$schema,
|
|
1998
1998
|
},
|
|
1999
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
1999
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":613,"column":9},
|
|
2000
2000
|
},
|
|
2001
2001
|
{
|
|
2002
2002
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putGitlabCredential',
|
|
@@ -2031,7 +2031,7 @@ export const TYPERT_REMOTE = {
|
|
|
2031
2031
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2032
2032
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putGitlabCredential_result$schema,
|
|
2033
2033
|
},
|
|
2034
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2034
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":544,"column":9},
|
|
2035
2035
|
},
|
|
2036
2036
|
{
|
|
2037
2037
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putJiraCredential',
|
|
@@ -2066,7 +2066,7 @@ export const TYPERT_REMOTE = {
|
|
|
2066
2066
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2067
2067
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putJiraCredential_result$schema,
|
|
2068
2068
|
},
|
|
2069
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2069
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":744,"column":9},
|
|
2070
2070
|
},
|
|
2071
2071
|
{
|
|
2072
2072
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putTeamcityCredential',
|
|
@@ -2101,7 +2101,7 @@ export const TYPERT_REMOTE = {
|
|
|
2101
2101
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2102
2102
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putTeamcityCredential_result$schema,
|
|
2103
2103
|
},
|
|
2104
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2104
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":675,"column":9},
|
|
2105
2105
|
},
|
|
2106
2106
|
{
|
|
2107
2107
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putTestitCredential',
|
|
@@ -2136,7 +2136,7 @@ export const TYPERT_REMOTE = {
|
|
|
2136
2136
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2137
2137
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putTestitCredential_result$schema,
|
|
2138
2138
|
},
|
|
2139
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2139
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":815,"column":9},
|
|
2140
2140
|
},
|
|
2141
2141
|
{
|
|
2142
2142
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/putWeblateCredential',
|
|
@@ -2171,7 +2171,7 @@ export const TYPERT_REMOTE = {
|
|
|
2171
2171
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2172
2172
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_putWeblateCredential_result$schema,
|
|
2173
2173
|
},
|
|
2174
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2174
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":876,"column":9},
|
|
2175
2175
|
},
|
|
2176
2176
|
{
|
|
2177
2177
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/serviceBoundary',
|
|
@@ -2206,7 +2206,7 @@ export const TYPERT_REMOTE = {
|
|
|
2206
2206
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2207
2207
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_serviceBoundary_result$schema,
|
|
2208
2208
|
},
|
|
2209
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2209
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":959,"column":3},
|
|
2210
2210
|
},
|
|
2211
2211
|
{
|
|
2212
2212
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/serviceHealth',
|
|
@@ -2241,7 +2241,7 @@ export const TYPERT_REMOTE = {
|
|
|
2241
2241
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/serviceHealth:result',
|
|
2242
2242
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_serviceHealth_result$schema,
|
|
2243
2243
|
},
|
|
2244
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2244
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":980,"column":3},
|
|
2245
2245
|
},
|
|
2246
2246
|
{
|
|
2247
2247
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/teamcityServer',
|
|
@@ -2266,7 +2266,7 @@ export const TYPERT_REMOTE = {
|
|
|
2266
2266
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/teamcityServer:result',
|
|
2267
2267
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_teamcityServer_result$schema,
|
|
2268
2268
|
},
|
|
2269
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2269
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":700,"column":3},
|
|
2270
2270
|
},
|
|
2271
2271
|
{
|
|
2272
2272
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testBitrix24',
|
|
@@ -2291,7 +2291,7 @@ export const TYPERT_REMOTE = {
|
|
|
2291
2291
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2292
2292
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testBitrix24_result$schema,
|
|
2293
2293
|
},
|
|
2294
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2294
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":506,"column":9},
|
|
2295
2295
|
},
|
|
2296
2296
|
{
|
|
2297
2297
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testConfluence',
|
|
@@ -2316,7 +2316,7 @@ export const TYPERT_REMOTE = {
|
|
|
2316
2316
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2317
2317
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testConfluence_result$schema,
|
|
2318
2318
|
},
|
|
2319
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2319
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":641,"column":9},
|
|
2320
2320
|
},
|
|
2321
2321
|
{
|
|
2322
2322
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testGitlab',
|
|
@@ -2341,7 +2341,7 @@ export const TYPERT_REMOTE = {
|
|
|
2341
2341
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2342
2342
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testGitlab_result$schema,
|
|
2343
2343
|
},
|
|
2344
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2344
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":567,"column":9},
|
|
2345
2345
|
},
|
|
2346
2346
|
{
|
|
2347
2347
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testitInstances',
|
|
@@ -2366,7 +2366,7 @@ export const TYPERT_REMOTE = {
|
|
|
2366
2366
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/testitInstances:result',
|
|
2367
2367
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testitInstances_result$schema,
|
|
2368
2368
|
},
|
|
2369
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2369
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":803,"column":3},
|
|
2370
2370
|
},
|
|
2371
2371
|
{
|
|
2372
2372
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testJira',
|
|
@@ -2391,7 +2391,7 @@ export const TYPERT_REMOTE = {
|
|
|
2391
2391
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2392
2392
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testJira_result$schema,
|
|
2393
2393
|
},
|
|
2394
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2394
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":777,"column":9},
|
|
2395
2395
|
},
|
|
2396
2396
|
{
|
|
2397
2397
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testTeamcity',
|
|
@@ -2416,7 +2416,7 @@ export const TYPERT_REMOTE = {
|
|
|
2416
2416
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2417
2417
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testTeamcity_result$schema,
|
|
2418
2418
|
},
|
|
2419
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2419
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":705,"column":9},
|
|
2420
2420
|
},
|
|
2421
2421
|
{
|
|
2422
2422
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testTestit',
|
|
@@ -2441,7 +2441,7 @@ export const TYPERT_REMOTE = {
|
|
|
2441
2441
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2442
2442
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testTestit_result$schema,
|
|
2443
2443
|
},
|
|
2444
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2444
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":838,"column":9},
|
|
2445
2445
|
},
|
|
2446
2446
|
{
|
|
2447
2447
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/testWeblate',
|
|
@@ -2466,7 +2466,7 @@ export const TYPERT_REMOTE = {
|
|
|
2466
2466
|
typeSymbol: '@yadsh/dsh-qa-integrations/types#IntegrationSummary',
|
|
2467
2467
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_testWeblate_result$schema,
|
|
2468
2468
|
},
|
|
2469
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2469
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":899,"column":9},
|
|
2470
2470
|
},
|
|
2471
2471
|
{
|
|
2472
2472
|
id: '@yadsh/dsh-qa-integrations#qaIntegrations/weblateInstances',
|
|
@@ -2491,7 +2491,7 @@ export const TYPERT_REMOTE = {
|
|
|
2491
2491
|
typeSymbol: '@yadsh/dsh-qa-integrations#qaIntegrations/weblateInstances:result',
|
|
2492
2492
|
schema: _yadsh_dsh_qa_integrations_qaIntegrations_weblateInstances_result$schema,
|
|
2493
2493
|
},
|
|
2494
|
-
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":
|
|
2494
|
+
sourceLocation: {"file":"packages/dsh-qa-integrations/src/index.ts","line":864,"column":3},
|
|
2495
2495
|
},
|
|
2496
2496
|
],
|
|
2497
2497
|
}
|
package/lib/types/broker.d.ts
CHANGED
|
@@ -2,14 +2,20 @@ import type { PluginLogger } from "@yadsh/dsh-plugin-log";
|
|
|
2
2
|
import type { IntegrationProviderRegistry } from "./providers/registry.js";
|
|
3
3
|
import type { IntegrationRepository } from "./repository.js";
|
|
4
4
|
import type { SecretStore } from "./secrets/secret-store.js";
|
|
5
|
+
import { ServiceRateLimiter } from "./service-credentials/rate-limit.js";
|
|
5
6
|
import type { ServiceCredentialRegistry } from "./service-credentials/registry.js";
|
|
6
|
-
import { type ServiceCredentialHealth, type ServiceResourceBoundary } from "./service-credentials/types.js";
|
|
7
|
+
import { type ServiceCredentialHealth, type ServiceRateLimitConfig, type ServiceResourceBoundary } from "./service-credentials/types.js";
|
|
7
8
|
import type { CredentialInput, CredentialSource, IntegrationPrincipal, IntegrationProviderId, IntegrationProviderSummary, IntegrationSummary, IntegrationToolResult, PolicyPatch } from "./types.js";
|
|
8
9
|
export interface BrokerOptions {
|
|
9
10
|
/** Absent in deployments that configure no managed credential at all. */
|
|
10
11
|
readonly serviceCredentials?: ServiceCredentialRegistry | undefined;
|
|
11
12
|
/** Whether a new connection starts in service mode when a profile exists. */
|
|
12
13
|
readonly defaultForNewConnections?: boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Ceiling of service-mode calls. Injectable for the same reason the registry
|
|
16
|
+
* takes its environment: the tests need a clock that is not the wall clock.
|
|
17
|
+
*/
|
|
18
|
+
readonly rateLimits?: ServiceRateLimiter | undefined;
|
|
13
19
|
}
|
|
14
20
|
/** In-process broker boundary; no caller outside it receives decrypted secrets. */
|
|
15
21
|
export declare class IntegrationBroker {
|
|
@@ -19,6 +25,7 @@ export declare class IntegrationBroker {
|
|
|
19
25
|
private readonly logger;
|
|
20
26
|
private serviceCredentials;
|
|
21
27
|
private defaultForNewConnections;
|
|
28
|
+
private readonly rateLimits;
|
|
22
29
|
constructor(repository: IntegrationRepository, secrets: SecretStore, providers: IntegrationProviderRegistry, logger: PluginLogger, options?: BrokerOptions);
|
|
23
30
|
/**
|
|
24
31
|
* Re-point the broker at the provider set and service-credential registry a
|
|
@@ -27,7 +34,7 @@ export declare class IntegrationBroker {
|
|
|
27
34
|
* the configuration move here. An in-flight call keeps the captures it
|
|
28
35
|
* already made and finishes against them.
|
|
29
36
|
*/
|
|
30
|
-
swap(providers: IntegrationProviderRegistry, serviceCredentials: ServiceCredentialRegistry | undefined, defaultForNewConnections: boolean): void;
|
|
37
|
+
swap(providers: IntegrationProviderRegistry, serviceCredentials: ServiceCredentialRegistry | undefined, defaultForNewConnections: boolean, rateLimit: ServiceRateLimitConfig): void;
|
|
31
38
|
listProviders(): readonly IntegrationProviderSummary[];
|
|
32
39
|
list(principal: IntegrationPrincipal): readonly IntegrationSummary[];
|
|
33
40
|
summary(principal: IntegrationPrincipal, providerId: IntegrationProviderId): IntegrationSummary;
|
|
@@ -70,6 +77,17 @@ export declare class IntegrationBroker {
|
|
|
70
77
|
readonly input: Readonly<Record<string, unknown>>;
|
|
71
78
|
readonly sourceSessionId: string;
|
|
72
79
|
}): Promise<IntegrationToolResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Spend one unit of the service-mode ceiling before the call leaves for
|
|
82
|
+
* upstream. Both sides of the limit are consulted together: one principal may
|
|
83
|
+
* not exhaust the quota the whole deployment shares, and the shared quota is
|
|
84
|
+
* not a per-user budget the operator never granted.
|
|
85
|
+
*
|
|
86
|
+
* A refusal is audited the way every other service-mode denial is, with the
|
|
87
|
+
* real principal — the limit is decided here, so upstream never learns the
|
|
88
|
+
* request existed.
|
|
89
|
+
*/
|
|
90
|
+
private acquireServiceCallSlot;
|
|
73
91
|
/**
|
|
74
92
|
* Decide one operation against the service ceiling. Every refusal is audited
|
|
75
93
|
* with the real principal: upstream will only ever show the service account,
|
|
@@ -82,6 +100,13 @@ export declare class IntegrationBroker {
|
|
|
82
100
|
* is why a caller cannot point a session at somebody else's credential.
|
|
83
101
|
*/
|
|
84
102
|
private profileFor;
|
|
103
|
+
/**
|
|
104
|
+
* Provision the one unambiguous managed profile for an account that has
|
|
105
|
+
* never made a choice for this provider. This is deliberately synchronous:
|
|
106
|
+
* it stores only the server-owned binding and policy; the secret remains
|
|
107
|
+
* lazy and the first real call still exercises the authenticated provider.
|
|
108
|
+
*/
|
|
109
|
+
private ensureDefaultServiceBinding;
|
|
85
110
|
private resolveService;
|
|
86
111
|
/**
|
|
87
112
|
* Turn the deployment's secret into the credential shape of this provider.
|
|
@@ -19,6 +19,8 @@ export declare class IntegrationRepository {
|
|
|
19
19
|
/** The whole store, for maintenance surfaces that need the aggregate. */
|
|
20
20
|
read(): IntegrationFile;
|
|
21
21
|
find(principal: IntegrationPrincipal, provider: IntegrationProviderId): StoredIntegration | undefined;
|
|
22
|
+
/** Whether this account explicitly disconnected this provider. */
|
|
23
|
+
serviceOptedOut(principal: IntegrationPrincipal, provider: IntegrationProviderId): boolean;
|
|
22
24
|
secretFor(principal: IntegrationPrincipal, provider: IntegrationProviderId): EncryptedSecretRecord | undefined;
|
|
23
25
|
policy(integration: StoredIntegration, operation: IntegrationCapability): IntegrationPolicyMode;
|
|
24
26
|
connect(options: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import z from "@deepseek-ai/schemastery";
|
|
2
|
+
import type { ServiceRateLimitConfig } from "./types.js";
|
|
2
3
|
/**
|
|
3
4
|
* One deployment-managed credential, as it appears under
|
|
4
5
|
* `managedServiceCredentials.profiles[]` in YAML. Everything here is operator
|
|
@@ -28,11 +29,25 @@ export interface ManagedServiceCredentialProfileInput {
|
|
|
28
29
|
/** Administrator narrowing of the service ceiling. Only `deny` is accepted. */
|
|
29
30
|
readonly policy?: Readonly<Record<string, string | undefined>>;
|
|
30
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Operator request ceiling of the service mode; §27 of
|
|
34
|
+
* `docs/specs/managed-service-credentials.md`.
|
|
35
|
+
*/
|
|
36
|
+
export interface ManagedServiceRateLimitInput {
|
|
37
|
+
readonly perPrincipal?: {
|
|
38
|
+
readonly requestsPerMinute?: number | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
readonly perCredential?: {
|
|
41
|
+
readonly requestsPerMinute?: number | undefined;
|
|
42
|
+
readonly maxConcurrent?: number | undefined;
|
|
43
|
+
} | undefined;
|
|
44
|
+
}
|
|
31
45
|
export interface ManagedServiceCredentialsInput {
|
|
32
46
|
readonly enabled?: boolean;
|
|
33
47
|
/** Whether a new connection starts in service mode when a profile exists. */
|
|
34
48
|
readonly defaultForNewConnections?: boolean;
|
|
35
49
|
readonly profiles?: readonly ManagedServiceCredentialProfileInput[];
|
|
50
|
+
readonly rateLimit?: ManagedServiceRateLimitInput | undefined;
|
|
36
51
|
}
|
|
37
52
|
export interface ManagedServiceCredentialProfileConfig {
|
|
38
53
|
readonly id: string;
|
|
@@ -49,7 +64,14 @@ export interface ManagedServiceCredentialsConfig {
|
|
|
49
64
|
readonly enabled: boolean;
|
|
50
65
|
readonly defaultForNewConnections: boolean;
|
|
51
66
|
readonly profiles: readonly ManagedServiceCredentialProfileConfig[];
|
|
67
|
+
readonly rateLimit: ServiceRateLimitConfig;
|
|
52
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* The design document's own §27 example, used as the shipped ceiling: a service
|
|
71
|
+
* credential is shared, so an unconfigured deployment is the case that needs
|
|
72
|
+
* the limit most. An operator who wants a dimension unbounded sets it to `0`.
|
|
73
|
+
*/
|
|
74
|
+
export declare const DEFAULT_SERVICE_RATE_LIMIT: ServiceRateLimitConfig;
|
|
53
75
|
export declare const MANAGED_SERVICE_CREDENTIALS_DEFAULTS: Readonly<{
|
|
54
76
|
enabled: false;
|
|
55
77
|
defaultForNewConnections: true;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { IntegrationError } from "../errors.js";
|
|
2
|
+
import type { ServiceRateLimitConfig } from "./types.js";
|
|
3
|
+
export interface ServiceCallKeys {
|
|
4
|
+
readonly principal: string;
|
|
5
|
+
readonly provider: string;
|
|
6
|
+
/** The managed credential the call spends: the shared side of the limit. */
|
|
7
|
+
readonly profileId: string;
|
|
8
|
+
}
|
|
9
|
+
/** Which ceiling refused, for the operator-facing log line only. */
|
|
10
|
+
export type ServiceRateLimitReason = "principal" | "concurrency" | "credential";
|
|
11
|
+
export declare class ServiceRateLimitError extends IntegrationError {
|
|
12
|
+
readonly reason: ServiceRateLimitReason;
|
|
13
|
+
constructor(reason: ServiceRateLimitReason);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Refill-on-read limiting of service-mode calls.
|
|
17
|
+
*
|
|
18
|
+
* A managed credential is one upstream identity shared by every user of the
|
|
19
|
+
* deployment, so the ceiling that protects it has to be two-sided at once: one
|
|
20
|
+
* principal must not exhaust the shared quota, and the shared quota must not be
|
|
21
|
+
* multiplied per principal. Both buckets are therefore read before either is
|
|
22
|
+
* written — a call refused by the shared ceiling leaves the individual balance
|
|
23
|
+
* untouched and one refused by the individual ceiling leaves the shared balance
|
|
24
|
+
* untouched. Otherwise a noisy user would pay for the bottleneck they create
|
|
25
|
+
* with everybody else's allowance.
|
|
26
|
+
*
|
|
27
|
+
* A bucket holds `requestsPerMinute` tokens and refills at that rate, so the
|
|
28
|
+
* allowance is spent continuously rather than reset on a wall-clock minute: a
|
|
29
|
+
* burst may take a full minute of requests and is then throttled to the steady
|
|
30
|
+
* rate. A rate of `0` disables that dimension.
|
|
31
|
+
*
|
|
32
|
+
* State lives in this process only, which is where the only path to a managed
|
|
33
|
+
* credential lives.
|
|
34
|
+
*/
|
|
35
|
+
export declare class ServiceRateLimiter {
|
|
36
|
+
private readonly now;
|
|
37
|
+
private readonly principals;
|
|
38
|
+
private readonly credentials;
|
|
39
|
+
private readonly inflight;
|
|
40
|
+
private readonly maxTrackedKeys;
|
|
41
|
+
private config;
|
|
42
|
+
constructor(config: ServiceRateLimitConfig, now?: () => number, options?: {
|
|
43
|
+
readonly maxTrackedKeys?: number;
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Take in new operator values. Balances survive: re-tuning a limit must not
|
|
47
|
+
* hand a fresh minute of requests to everyone at once.
|
|
48
|
+
*/
|
|
49
|
+
configure(config: ServiceRateLimitConfig): void;
|
|
50
|
+
/**
|
|
51
|
+
* Spend one request or refuse it. The returned function gives the concurrency
|
|
52
|
+
* slot back and is safe to call more than once, because the caller releases it
|
|
53
|
+
* from a `finally` that may have run already.
|
|
54
|
+
*/
|
|
55
|
+
acquire(keys: ServiceCallKeys): () => void;
|
|
56
|
+
private spend;
|
|
57
|
+
/**
|
|
58
|
+
* Free room for a new principal. A stored balance only refills when it is
|
|
59
|
+
* read, so "idle" is measured against now rather than against what is in the
|
|
60
|
+
* entry: a bucket that has earned its whole allowance back is equivalent to
|
|
61
|
+
* an absent one, and forgetting it costs nobody anything. If every entry is
|
|
62
|
+
* still spending, the longest untouched one goes.
|
|
63
|
+
*/
|
|
64
|
+
private retire;
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=rate-limit.d.ts.map
|
|
@@ -43,6 +43,24 @@ export declare const UNCLASSIFIED_OPERATION: OperationSecurityMetadata;
|
|
|
43
43
|
* contract because it crosses the remote boundary as well.
|
|
44
44
|
*/
|
|
45
45
|
export type ServiceResourceBoundary = IntegrationServiceBoundary;
|
|
46
|
+
/**
|
|
47
|
+
* Request ceiling of the service mode, as operator configuration resolves it.
|
|
48
|
+
* A rate of `0` leaves that dimension unbounded.
|
|
49
|
+
*/
|
|
50
|
+
export interface ServiceRateLimitConfig {
|
|
51
|
+
/** What one real user may ask of one provider through any managed credential. */
|
|
52
|
+
readonly perPrincipal: {
|
|
53
|
+
readonly requestsPerMinute: number;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* What one shared upstream identity may carry in total, and how many calls
|
|
57
|
+
* may be in flight against it at once.
|
|
58
|
+
*/
|
|
59
|
+
readonly perCredential: {
|
|
60
|
+
readonly requestsPerMinute: number;
|
|
61
|
+
readonly maxConcurrent: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
46
64
|
/**
|
|
47
65
|
* One administrator-managed credential. It belongs to the deployment, not to a
|
|
48
66
|
* user: a user cannot create one, cannot change its secret, cannot move its
|