@snokam/mcp-api 0.154.0 → 0.155.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.
@@ -1288,35 +1288,40 @@
1288
1288
  ]
1289
1289
  }
1290
1290
  },
1291
- "/v1.0/consultants": {
1292
- "get": {
1291
+ "/v1.0/salesforce/opportunities/{sfId}/import": {
1292
+ "post": {
1293
1293
  "tags": [
1294
- "Consultants"
1294
+ "Salesforce"
1295
1295
  ],
1296
- "summary": "List all known consultants (for manual selection)",
1297
- "operationId": "ListConsultants",
1296
+ "summary": "Create a Snøkam tender stub from an existing Salesforce Opportunity.",
1297
+ "operationId": "ImportSalesforceOpportunity",
1298
1298
  "parameters": [
1299
1299
  {
1300
- "name": "query",
1301
- "in": "query",
1300
+ "name": "sfId",
1301
+ "in": "path",
1302
+ "required": true,
1302
1303
  "schema": {
1303
1304
  "type": "string"
1304
- }
1305
+ },
1306
+ "x-ms-summary": "Salesforce Opportunity Id."
1305
1307
  }
1306
1308
  ],
1307
1309
  "responses": {
1308
1310
  "200": {
1309
- "description": "Payload of Array of ConsultantSummary",
1311
+ "description": "Payload of TenderView",
1310
1312
  "content": {
1311
1313
  "application/json": {
1312
1314
  "schema": {
1313
- "type": "array",
1314
- "items": {
1315
- "$ref": "#/components/schemas/consultantSummary"
1316
- }
1315
+ "$ref": "#/components/schemas/tenderView"
1317
1316
  }
1318
1317
  }
1319
1318
  }
1319
+ },
1320
+ "404": {
1321
+ "description": "No description"
1322
+ },
1323
+ "409": {
1324
+ "description": "A tender is already linked to this Opportunity."
1320
1325
  }
1321
1326
  },
1322
1327
  "security": [
@@ -1331,13 +1336,13 @@
1331
1336
  ]
1332
1337
  }
1333
1338
  },
1334
- "/v1.0/tenders/{id}/documents": {
1335
- "get": {
1339
+ "/v1.0/tenders/{id}/salesforce": {
1340
+ "post": {
1336
1341
  "tags": [
1337
- "Documents"
1342
+ "Salesforce"
1338
1343
  ],
1339
- "summary": "List documents for a tender",
1340
- "operationId": "ListTenderDocuments",
1344
+ "summary": "Create a Salesforce Opportunity from a Snøkam tender and cache the link.",
1345
+ "operationId": "PromoteTenderToSalesforce",
1341
1346
  "parameters": [
1342
1347
  {
1343
1348
  "name": "id",
@@ -1350,20 +1355,20 @@
1350
1355
  ],
1351
1356
  "responses": {
1352
1357
  "200": {
1353
- "description": "Payload of Array of TenderDocument",
1358
+ "description": "Payload of TenderView",
1354
1359
  "content": {
1355
1360
  "application/json": {
1356
1361
  "schema": {
1357
- "type": "array",
1358
- "items": {
1359
- "$ref": "#/components/schemas/tenderDocument"
1360
- }
1362
+ "$ref": "#/components/schemas/tenderView"
1361
1363
  }
1362
1364
  }
1363
1365
  }
1364
1366
  },
1365
1367
  "404": {
1366
1368
  "description": "No description"
1369
+ },
1370
+ "409": {
1371
+ "description": "Tender is already linked to a Salesforce Opportunity."
1367
1372
  }
1368
1373
  },
1369
1374
  "security": [
@@ -1376,13 +1381,15 @@
1376
1381
  "ApiKey": []
1377
1382
  }
1378
1383
  ]
1379
- },
1384
+ }
1385
+ },
1386
+ "/v1.0/tenders/{id}/salesforce/refresh": {
1380
1387
  "post": {
1381
1388
  "tags": [
1382
- "Documents"
1389
+ "Salesforce"
1383
1390
  ],
1384
- "summary": "Upload a new document to a tender",
1385
- "operationId": "UploadTenderDocument",
1391
+ "summary": "Re-sync cached Salesforce Opportunity state (stage / closed / won) onto the engagement.",
1392
+ "operationId": "RefreshTenderSalesforceLink",
1386
1393
  "parameters": [
1387
1394
  {
1388
1395
  "name": "id",
@@ -1395,11 +1402,11 @@
1395
1402
  ],
1396
1403
  "responses": {
1397
1404
  "200": {
1398
- "description": "Payload of TenderDocument",
1405
+ "description": "Payload of TenderView",
1399
1406
  "content": {
1400
1407
  "application/json": {
1401
1408
  "schema": {
1402
- "$ref": "#/components/schemas/tenderDocument"
1409
+ "$ref": "#/components/schemas/tenderView"
1403
1410
  }
1404
1411
  }
1405
1412
  }
@@ -1420,44 +1427,45 @@
1420
1427
  ]
1421
1428
  }
1422
1429
  },
1423
- "/v1.0/tenders/{id}/documents/{docId}/download-url": {
1430
+ "/v1.0/salesforce/opportunities": {
1424
1431
  "get": {
1425
1432
  "tags": [
1426
- "Documents"
1433
+ "Salesforce"
1427
1434
  ],
1428
- "summary": "Get a short-lived download URL for a document",
1429
- "operationId": "GetDocumentDownloadUrl",
1435
+ "summary": "List Salesforce Opportunities (open by default).",
1436
+ "operationId": "ListSalesforceOpportunities",
1430
1437
  "parameters": [
1431
1438
  {
1432
- "name": "id",
1433
- "in": "path",
1434
- "required": true,
1439
+ "name": "includeClosed",
1440
+ "in": "query",
1435
1441
  "schema": {
1436
- "type": "string"
1437
- }
1442
+ "type": "boolean"
1443
+ },
1444
+ "x-ms-summary": "Include closed opportunities (default false)."
1438
1445
  },
1439
1446
  {
1440
- "name": "docId",
1441
- "in": "path",
1442
- "required": true,
1447
+ "name": "limit",
1448
+ "in": "query",
1443
1449
  "schema": {
1444
- "type": "string"
1445
- }
1450
+ "type": "integer",
1451
+ "format": "int32"
1452
+ },
1453
+ "x-ms-summary": "Row cap, max 200 (default 100)."
1446
1454
  }
1447
1455
  ],
1448
1456
  "responses": {
1449
1457
  "200": {
1450
- "description": "Payload of Object",
1458
+ "description": "Payload of Array of CrmOpportunity",
1451
1459
  "content": {
1452
1460
  "application/json": {
1453
1461
  "schema": {
1454
- "type": "object"
1462
+ "type": "array",
1463
+ "items": {
1464
+ "$ref": "#/components/schemas/crmOpportunity"
1465
+ }
1455
1466
  }
1456
1467
  }
1457
1468
  }
1458
- },
1459
- "404": {
1460
- "description": "No description"
1461
1469
  }
1462
1470
  },
1463
1471
  "security": [
@@ -1472,24 +1480,81 @@
1472
1480
  ]
1473
1481
  }
1474
1482
  },
1475
- "/v1.0/tenders/{id}/documents/{docId}/download": {
1483
+ "/v1.0/salesforce/opportunity-stages": {
1476
1484
  "get": {
1477
1485
  "tags": [
1478
- "Documents"
1486
+ "Salesforce"
1479
1487
  ],
1480
- "summary": "Download a single document",
1481
- "operationId": "DownloadDocument",
1482
- "parameters": [
1488
+ "summary": "List the SF org's Opportunity pipeline stages in configured order.",
1489
+ "operationId": "ListSalesforceOpportunityStages",
1490
+ "responses": {
1491
+ "200": {
1492
+ "description": "Payload of Array of CrmStage",
1493
+ "content": {
1494
+ "application/json": {
1495
+ "schema": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "$ref": "#/components/schemas/crmStage"
1499
+ }
1500
+ }
1501
+ }
1502
+ }
1503
+ }
1504
+ },
1505
+ "security": [
1483
1506
  {
1484
- "name": "id",
1485
- "in": "path",
1486
- "required": true,
1487
- "schema": {
1488
- "type": "string"
1507
+ "Implicit": [
1508
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
1509
+ ]
1510
+ },
1511
+ {
1512
+ "ApiKey": []
1513
+ }
1514
+ ]
1515
+ }
1516
+ },
1517
+ "/v1.0/salesforce/refresh": {
1518
+ "post": {
1519
+ "tags": [
1520
+ "Salesforce"
1521
+ ],
1522
+ "summary": "Batch-refresh the cached Salesforce state on every linked engagement for the current business.",
1523
+ "operationId": "RefreshAllSalesforceLinks",
1524
+ "responses": {
1525
+ "200": {
1526
+ "description": "Payload of CrmRefreshResult",
1527
+ "content": {
1528
+ "application/json": {
1529
+ "schema": {
1530
+ "$ref": "#/components/schemas/crmRefreshResult"
1531
+ }
1532
+ }
1489
1533
  }
1534
+ }
1535
+ },
1536
+ "security": [
1537
+ {
1538
+ "Implicit": [
1539
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
1540
+ ]
1490
1541
  },
1491
1542
  {
1492
- "name": "docId",
1543
+ "ApiKey": []
1544
+ }
1545
+ ]
1546
+ }
1547
+ },
1548
+ "/v1.0/tenders/{id}/salesforce/stage": {
1549
+ "post": {
1550
+ "tags": [
1551
+ "Salesforce"
1552
+ ],
1553
+ "summary": "Move the linked SF Opportunity to a new stage and refresh the cache.",
1554
+ "operationId": "UpdateTenderSalesforceStage",
1555
+ "parameters": [
1556
+ {
1557
+ "name": "id",
1493
1558
  "in": "path",
1494
1559
  "required": true,
1495
1560
  "schema": {
@@ -1497,18 +1562,31 @@
1497
1562
  }
1498
1563
  }
1499
1564
  ],
1565
+ "requestBody": {
1566
+ "description": "The SF stage masterLabel/apiName to switch to.",
1567
+ "content": {
1568
+ "application/json": {
1569
+ "schema": {
1570
+ "$ref": "#/components/schemas/updateSalesforceStageRequest"
1571
+ }
1572
+ }
1573
+ },
1574
+ "required": true
1575
+ },
1500
1576
  "responses": {
1501
1577
  "200": {
1502
- "description": "Payload of Array of Byte",
1578
+ "description": "Payload of TenderView",
1503
1579
  "content": {
1504
- "application/octet-stream": {
1580
+ "application/json": {
1505
1581
  "schema": {
1506
- "type": "string",
1507
- "format": "binary"
1582
+ "$ref": "#/components/schemas/tenderView"
1508
1583
  }
1509
1584
  }
1510
1585
  }
1511
1586
  },
1587
+ "400": {
1588
+ "description": "Tender has no Salesforce link, or stageName is missing."
1589
+ },
1512
1590
  "404": {
1513
1591
  "description": "No description"
1514
1592
  }
@@ -1525,18 +1603,17 @@
1525
1603
  ]
1526
1604
  }
1527
1605
  },
1528
- "/v1.0/tenders/{id}/documents/download-all": {
1606
+ "/v1.0/consultants": {
1529
1607
  "get": {
1530
1608
  "tags": [
1531
- "Documents"
1609
+ "Consultants"
1532
1610
  ],
1533
- "summary": "Download all tender documents as a ZIP archive",
1534
- "operationId": "DownloadAllDocuments",
1611
+ "summary": "List all known consultants (for manual selection)",
1612
+ "operationId": "ListConsultants",
1535
1613
  "parameters": [
1536
1614
  {
1537
- "name": "id",
1538
- "in": "path",
1539
- "required": true,
1615
+ "name": "query",
1616
+ "in": "query",
1540
1617
  "schema": {
1541
1618
  "type": "string"
1542
1619
  }
@@ -1544,18 +1621,17 @@
1544
1621
  ],
1545
1622
  "responses": {
1546
1623
  "200": {
1547
- "description": "Payload of Array of Byte",
1624
+ "description": "Payload of Array of ConsultantSummary",
1548
1625
  "content": {
1549
- "application/zip": {
1626
+ "application/json": {
1550
1627
  "schema": {
1551
- "type": "string",
1552
- "format": "binary"
1628
+ "type": "array",
1629
+ "items": {
1630
+ "$ref": "#/components/schemas/consultantSummary"
1631
+ }
1553
1632
  }
1554
1633
  }
1555
1634
  }
1556
- },
1557
- "404": {
1558
- "description": "No description"
1559
1635
  }
1560
1636
  },
1561
1637
  "security": [
@@ -1570,13 +1646,13 @@
1570
1646
  ]
1571
1647
  }
1572
1648
  },
1573
- "/v1.0/tenders/{id}/documents/{docId}/extract-questions": {
1574
- "post": {
1649
+ "/v1.0/tenders/{id}/documents": {
1650
+ "get": {
1575
1651
  "tags": [
1576
1652
  "Documents"
1577
1653
  ],
1578
- "summary": "Start extraction of fillable questions from a document",
1579
- "operationId": "StartQuestionExtraction",
1654
+ "summary": "List documents for a tender",
1655
+ "operationId": "ListTenderDocuments",
1580
1656
  "parameters": [
1581
1657
  {
1582
1658
  "name": "id",
@@ -1585,23 +1661,18 @@
1585
1661
  "schema": {
1586
1662
  "type": "string"
1587
1663
  }
1588
- },
1589
- {
1590
- "name": "docId",
1591
- "in": "path",
1592
- "required": true,
1593
- "schema": {
1594
- "type": "string"
1595
- }
1596
1664
  }
1597
1665
  ],
1598
1666
  "responses": {
1599
- "202": {
1600
- "description": "Payload of Object",
1667
+ "200": {
1668
+ "description": "Payload of Array of TenderDocument",
1601
1669
  "content": {
1602
1670
  "application/json": {
1603
1671
  "schema": {
1604
- "type": "object"
1672
+ "type": "array",
1673
+ "items": {
1674
+ "$ref": "#/components/schemas/tenderDocument"
1675
+ }
1605
1676
  }
1606
1677
  }
1607
1678
  }
@@ -1620,15 +1691,13 @@
1620
1691
  "ApiKey": []
1621
1692
  }
1622
1693
  ]
1623
- }
1624
- },
1625
- "/v1.0/tenders/{id}/documents/{docId}/fill-questions": {
1694
+ },
1626
1695
  "post": {
1627
1696
  "tags": [
1628
1697
  "Documents"
1629
1698
  ],
1630
- "summary": "Start filling tender question answers per consultant",
1631
- "operationId": "StartQuestionFill",
1699
+ "summary": "Upload a new document to a tender",
1700
+ "operationId": "UploadTenderDocument",
1632
1701
  "parameters": [
1633
1702
  {
1634
1703
  "name": "id",
@@ -1637,33 +1706,15 @@
1637
1706
  "schema": {
1638
1707
  "type": "string"
1639
1708
  }
1640
- },
1641
- {
1642
- "name": "docId",
1643
- "in": "path",
1644
- "required": true,
1645
- "schema": {
1646
- "type": "string"
1647
- }
1648
1709
  }
1649
1710
  ],
1650
- "requestBody": {
1651
- "content": {
1652
- "application/json": {
1653
- "schema": {
1654
- "$ref": "#/components/schemas/questionFillRequest"
1655
- }
1656
- }
1657
- },
1658
- "required": true
1659
- },
1660
1711
  "responses": {
1661
- "202": {
1662
- "description": "Payload of Object",
1712
+ "200": {
1713
+ "description": "Payload of TenderDocument",
1663
1714
  "content": {
1664
1715
  "application/json": {
1665
1716
  "schema": {
1666
- "type": "object"
1717
+ "$ref": "#/components/schemas/tenderDocument"
1667
1718
  }
1668
1719
  }
1669
1720
  }
@@ -1684,13 +1735,13 @@
1684
1735
  ]
1685
1736
  }
1686
1737
  },
1687
- "/v1.0/tenders/{id}/documents/{docId}": {
1688
- "patch": {
1738
+ "/v1.0/tenders/{id}/documents/{docId}/download-url": {
1739
+ "get": {
1689
1740
  "tags": [
1690
1741
  "Documents"
1691
1742
  ],
1692
- "summary": "Patch tender document flags (e.g. set as competence matrix source)",
1693
- "operationId": "PatchTenderDocument",
1743
+ "summary": "Get a short-lived download URL for a document",
1744
+ "operationId": "GetDocumentDownloadUrl",
1694
1745
  "parameters": [
1695
1746
  {
1696
1747
  "name": "id",
@@ -1709,23 +1760,13 @@
1709
1760
  }
1710
1761
  }
1711
1762
  ],
1712
- "requestBody": {
1713
- "content": {
1714
- "application/json": {
1715
- "schema": {
1716
- "$ref": "#/components/schemas/patchDocumentRequest"
1717
- }
1718
- }
1719
- },
1720
- "required": true
1721
- },
1722
1763
  "responses": {
1723
1764
  "200": {
1724
- "description": "Payload of PatchDocumentResponse",
1765
+ "description": "Payload of Object",
1725
1766
  "content": {
1726
1767
  "application/json": {
1727
1768
  "schema": {
1728
- "$ref": "#/components/schemas/patchDocumentResponse"
1769
+ "type": "object"
1729
1770
  }
1730
1771
  }
1731
1772
  }
@@ -1744,13 +1785,15 @@
1744
1785
  "ApiKey": []
1745
1786
  }
1746
1787
  ]
1747
- },
1748
- "delete": {
1788
+ }
1789
+ },
1790
+ "/v1.0/tenders/{id}/documents/{docId}/download": {
1791
+ "get": {
1749
1792
  "tags": [
1750
1793
  "Documents"
1751
1794
  ],
1752
- "summary": "Delete a tender document (and its blob + related answers)",
1753
- "operationId": "DeleteTenderDocument",
1795
+ "summary": "Download a single document",
1796
+ "operationId": "DownloadDocument",
1754
1797
  "parameters": [
1755
1798
  {
1756
1799
  "name": "id",
@@ -1770,8 +1813,16 @@
1770
1813
  }
1771
1814
  ],
1772
1815
  "responses": {
1773
- "204": {
1774
- "description": "No description"
1816
+ "200": {
1817
+ "description": "Payload of Array of Byte",
1818
+ "content": {
1819
+ "application/octet-stream": {
1820
+ "schema": {
1821
+ "type": "string",
1822
+ "format": "binary"
1823
+ }
1824
+ }
1825
+ }
1775
1826
  },
1776
1827
  "404": {
1777
1828
  "description": "No description"
@@ -1789,16 +1840,16 @@
1789
1840
  ]
1790
1841
  }
1791
1842
  },
1792
- "/v1.0/protected/health/{provider}": {
1843
+ "/v1.0/tenders/{id}/documents/download-all": {
1793
1844
  "get": {
1794
1845
  "tags": [
1795
- "Health"
1846
+ "Documents"
1796
1847
  ],
1797
- "summary": "Checks an integration's connectivity",
1798
- "operationId": "SalesIntegrationHealth",
1848
+ "summary": "Download all tender documents as a ZIP archive",
1849
+ "operationId": "DownloadAllDocuments",
1799
1850
  "parameters": [
1800
1851
  {
1801
- "name": "provider",
1852
+ "name": "id",
1802
1853
  "in": "path",
1803
1854
  "required": true,
1804
1855
  "schema": {
@@ -1808,14 +1859,18 @@
1808
1859
  ],
1809
1860
  "responses": {
1810
1861
  "200": {
1811
- "description": "Health result",
1862
+ "description": "Payload of Array of Byte",
1812
1863
  "content": {
1813
- "application/json": {
1864
+ "application/zip": {
1814
1865
  "schema": {
1815
- "$ref": "#/components/schemas/integrationHealthResult"
1866
+ "type": "string",
1867
+ "format": "binary"
1816
1868
  }
1817
1869
  }
1818
1870
  }
1871
+ },
1872
+ "404": {
1873
+ "description": "No description"
1819
1874
  }
1820
1875
  },
1821
1876
  "security": [
@@ -1830,35 +1885,44 @@
1830
1885
  ]
1831
1886
  }
1832
1887
  },
1833
- "/v1.0/realtime/negotiate": {
1888
+ "/v1.0/tenders/{id}/documents/{docId}/extract-questions": {
1834
1889
  "post": {
1835
1890
  "tags": [
1836
- "Realtime"
1891
+ "Documents"
1837
1892
  ],
1838
- "summary": "Issue a SignalR access token + URL for the sales-live hub",
1839
- "operationId": "NegotiateSignalR",
1840
- "requestBody": {
1841
- "content": {
1842
- "application/json": {
1843
- "schema": {
1844
- "$ref": "#/components/schemas/negotiateRequest"
1845
- }
1893
+ "summary": "Start extraction of fillable questions from a document",
1894
+ "operationId": "StartQuestionExtraction",
1895
+ "parameters": [
1896
+ {
1897
+ "name": "id",
1898
+ "in": "path",
1899
+ "required": true,
1900
+ "schema": {
1901
+ "type": "string"
1902
+ }
1903
+ },
1904
+ {
1905
+ "name": "docId",
1906
+ "in": "path",
1907
+ "required": true,
1908
+ "schema": {
1909
+ "type": "string"
1846
1910
  }
1847
1911
  }
1848
- },
1912
+ ],
1849
1913
  "responses": {
1850
- "200": {
1851
- "description": "Payload of NegotiateResponse",
1914
+ "202": {
1915
+ "description": "Payload of Object",
1852
1916
  "content": {
1853
1917
  "application/json": {
1854
1918
  "schema": {
1855
- "$ref": "#/components/schemas/negotiateResponse"
1919
+ "type": "object"
1856
1920
  }
1857
1921
  }
1858
1922
  }
1859
1923
  },
1860
- "503": {
1861
- "description": "SignalR is not configured on this instance; fall back to SSE"
1924
+ "404": {
1925
+ "description": "No description"
1862
1926
  }
1863
1927
  },
1864
1928
  "security": [
@@ -1873,109 +1937,54 @@
1873
1937
  ]
1874
1938
  }
1875
1939
  },
1876
- "/v1.0/stream": {
1877
- "get": {
1940
+ "/v1.0/tenders/{id}/documents/{docId}/fill-questions": {
1941
+ "post": {
1878
1942
  "tags": [
1879
- "Realtime"
1943
+ "Documents"
1880
1944
  ],
1881
- "summary": "Unified SSE stream: tender/job/crawl/consultant/audit events on one connection",
1882
- "operationId": "StreamAll",
1945
+ "summary": "Start filling tender question answers per consultant",
1946
+ "operationId": "StartQuestionFill",
1883
1947
  "parameters": [
1884
1948
  {
1885
- "name": "channels",
1886
- "in": "query",
1887
- "description": "Comma-separated namespaces to include (tender,job,crawl,consultant,audit). Default: all.",
1949
+ "name": "id",
1950
+ "in": "path",
1951
+ "required": true,
1888
1952
  "schema": {
1889
1953
  "type": "string"
1890
1954
  }
1891
- }
1892
- ],
1893
- "responses": {},
1894
- "security": [
1895
- {
1896
- "Implicit": [
1897
- "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
1898
- ]
1899
1955
  },
1900
1956
  {
1901
- "ApiKey": []
1902
- }
1903
- ]
1904
- }
1905
- },
1906
- "/v1.0/tenders/stream-redirect": {
1907
- "get": {
1908
- "tags": [
1909
- "Realtime"
1910
- ],
1911
- "summary": "Deprecated: redirects to /v1.0/stream?channels=tender,job",
1912
- "operationId": "DeprecatedTenderStream",
1913
- "responses": {},
1914
- "deprecated": true,
1915
- "security": [
1916
- {
1917
- "Implicit": [
1918
- "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
1919
- ]
1920
- },
1921
- {
1922
- "ApiKey": []
1923
- }
1924
- ]
1925
- }
1926
- },
1927
- "/v1.0/crawl/stream-redirect": {
1928
- "get": {
1929
- "tags": [
1930
- "Realtime"
1931
- ],
1932
- "summary": "Deprecated: redirects to /v1.0/stream?channels=crawl,job",
1933
- "operationId": "DeprecatedCrawlStream",
1934
- "responses": {},
1935
- "deprecated": true,
1936
- "security": [
1937
- {
1938
- "Implicit": [
1939
- "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
1940
- ]
1941
- }
1942
- ]
1943
- }
1944
- },
1945
- "/v1.0/salesforce/opportunities/{sfId}/import": {
1946
- "post": {
1947
- "tags": [
1948
- "Salesforce"
1949
- ],
1950
- "summary": "Create a Snøkam tender stub from an existing Salesforce Opportunity.",
1951
- "operationId": "ImportSalesforceOpportunity",
1952
- "parameters": [
1953
- {
1954
- "name": "sfId",
1957
+ "name": "docId",
1955
1958
  "in": "path",
1956
1959
  "required": true,
1957
1960
  "schema": {
1958
1961
  "type": "string"
1959
- },
1960
- "x-ms-summary": "Salesforce Opportunity Id."
1962
+ }
1961
1963
  }
1962
1964
  ],
1965
+ "requestBody": {
1966
+ "content": {
1967
+ "application/json": {
1968
+ "schema": {
1969
+ "$ref": "#/components/schemas/questionFillRequest"
1970
+ }
1971
+ }
1972
+ },
1973
+ "required": true
1974
+ },
1963
1975
  "responses": {
1964
- "200": {
1965
- "description": "Payload of TenderView",
1976
+ "202": {
1977
+ "description": "Payload of Object",
1966
1978
  "content": {
1967
1979
  "application/json": {
1968
1980
  "schema": {
1969
- "$ref": "#/components/schemas/tenderView"
1981
+ "type": "object"
1970
1982
  }
1971
1983
  }
1972
1984
  }
1973
1985
  },
1974
1986
  "404": {
1975
1987
  "description": "No description"
1976
- },
1977
- "409": {
1978
- "description": "A tender is already linked to this Opportunity."
1979
1988
  }
1980
1989
  },
1981
1990
  "security": [
@@ -1990,13 +1999,13 @@
1990
1999
  ]
1991
2000
  }
1992
2001
  },
1993
- "/v1.0/tenders/{id}/salesforce": {
1994
- "post": {
2002
+ "/v1.0/tenders/{id}/documents/{docId}": {
2003
+ "patch": {
1995
2004
  "tags": [
1996
- "Salesforce"
2005
+ "Documents"
1997
2006
  ],
1998
- "summary": "Create a Salesforce Opportunity from a Snøkam tender and cache the link.",
1999
- "operationId": "PromoteTenderToSalesforce",
2007
+ "summary": "Patch tender document flags (e.g. set as competence matrix source)",
2008
+ "operationId": "PatchTenderDocument",
2000
2009
  "parameters": [
2001
2010
  {
2002
2011
  "name": "id",
@@ -2005,24 +2014,39 @@
2005
2014
  "schema": {
2006
2015
  "type": "string"
2007
2016
  }
2017
+ },
2018
+ {
2019
+ "name": "docId",
2020
+ "in": "path",
2021
+ "required": true,
2022
+ "schema": {
2023
+ "type": "string"
2024
+ }
2008
2025
  }
2009
2026
  ],
2027
+ "requestBody": {
2028
+ "content": {
2029
+ "application/json": {
2030
+ "schema": {
2031
+ "$ref": "#/components/schemas/patchDocumentRequest"
2032
+ }
2033
+ }
2034
+ },
2035
+ "required": true
2036
+ },
2010
2037
  "responses": {
2011
2038
  "200": {
2012
- "description": "Payload of TenderView",
2039
+ "description": "Payload of PatchDocumentResponse",
2013
2040
  "content": {
2014
2041
  "application/json": {
2015
2042
  "schema": {
2016
- "$ref": "#/components/schemas/tenderView"
2043
+ "$ref": "#/components/schemas/patchDocumentResponse"
2017
2044
  }
2018
2045
  }
2019
2046
  }
2020
2047
  },
2021
2048
  "404": {
2022
2049
  "description": "No description"
2023
- },
2024
- "409": {
2025
- "description": "Tender is already linked to a Salesforce Opportunity."
2026
2050
  }
2027
2051
  },
2028
2052
  "security": [
@@ -2035,15 +2059,13 @@
2035
2059
  "ApiKey": []
2036
2060
  }
2037
2061
  ]
2038
- }
2039
- },
2040
- "/v1.0/tenders/{id}/salesforce/refresh": {
2041
- "post": {
2062
+ },
2063
+ "delete": {
2042
2064
  "tags": [
2043
- "Salesforce"
2065
+ "Documents"
2044
2066
  ],
2045
- "summary": "Re-sync cached Salesforce Opportunity state (stage / closed / won) onto the engagement.",
2046
- "operationId": "RefreshTenderSalesforceLink",
2067
+ "summary": "Delete a tender document (and its blob + related answers)",
2068
+ "operationId": "DeleteTenderDocument",
2047
2069
  "parameters": [
2048
2070
  {
2049
2071
  "name": "id",
@@ -2052,18 +2074,19 @@
2052
2074
  "schema": {
2053
2075
  "type": "string"
2054
2076
  }
2077
+ },
2078
+ {
2079
+ "name": "docId",
2080
+ "in": "path",
2081
+ "required": true,
2082
+ "schema": {
2083
+ "type": "string"
2084
+ }
2055
2085
  }
2056
2086
  ],
2057
2087
  "responses": {
2058
- "200": {
2059
- "description": "Payload of TenderView",
2060
- "content": {
2061
- "application/json": {
2062
- "schema": {
2063
- "$ref": "#/components/schemas/tenderView"
2064
- }
2065
- }
2066
- }
2088
+ "204": {
2089
+ "description": "No description"
2067
2090
  },
2068
2091
  "404": {
2069
2092
  "description": "No description"
@@ -2081,42 +2104,30 @@
2081
2104
  ]
2082
2105
  }
2083
2106
  },
2084
- "/v1.0/salesforce/opportunities": {
2107
+ "/v1.0/protected/health/{provider}": {
2085
2108
  "get": {
2086
2109
  "tags": [
2087
- "Salesforce"
2110
+ "Health"
2088
2111
  ],
2089
- "summary": "List Salesforce Opportunities (open by default).",
2090
- "operationId": "ListSalesforceOpportunities",
2112
+ "summary": "Checks an integration's connectivity",
2113
+ "operationId": "SalesIntegrationHealth",
2091
2114
  "parameters": [
2092
2115
  {
2093
- "name": "includeClosed",
2094
- "in": "query",
2095
- "schema": {
2096
- "type": "boolean"
2097
- },
2098
- "x-ms-summary": "Include closed opportunities (default false)."
2099
- },
2100
- {
2101
- "name": "limit",
2102
- "in": "query",
2116
+ "name": "provider",
2117
+ "in": "path",
2118
+ "required": true,
2103
2119
  "schema": {
2104
- "type": "integer",
2105
- "format": "int32"
2106
- },
2107
- "x-ms-summary": "Row cap, max 200 (default 100)."
2120
+ "type": "string"
2121
+ }
2108
2122
  }
2109
2123
  ],
2110
2124
  "responses": {
2111
2125
  "200": {
2112
- "description": "Payload of Array of CrmOpportunity",
2126
+ "description": "Health result",
2113
2127
  "content": {
2114
2128
  "application/json": {
2115
2129
  "schema": {
2116
- "type": "array",
2117
- "items": {
2118
- "$ref": "#/components/schemas/crmOpportunity"
2119
- }
2130
+ "$ref": "#/components/schemas/integrationHealthResult"
2120
2131
  }
2121
2132
  }
2122
2133
  }
@@ -2134,26 +2145,35 @@
2134
2145
  ]
2135
2146
  }
2136
2147
  },
2137
- "/v1.0/salesforce/opportunity-stages": {
2138
- "get": {
2148
+ "/v1.0/realtime/negotiate": {
2149
+ "post": {
2139
2150
  "tags": [
2140
- "Salesforce"
2151
+ "Realtime"
2141
2152
  ],
2142
- "summary": "List the SF org's Opportunity pipeline stages in configured order.",
2143
- "operationId": "ListSalesforceOpportunityStages",
2153
+ "summary": "Issue a SignalR access token + URL for the sales-live hub",
2154
+ "operationId": "NegotiateSignalR",
2155
+ "requestBody": {
2156
+ "content": {
2157
+ "application/json": {
2158
+ "schema": {
2159
+ "$ref": "#/components/schemas/negotiateRequest"
2160
+ }
2161
+ }
2162
+ }
2163
+ },
2144
2164
  "responses": {
2145
2165
  "200": {
2146
- "description": "Payload of Array of CrmStage",
2166
+ "description": "Payload of NegotiateResponse",
2147
2167
  "content": {
2148
2168
  "application/json": {
2149
2169
  "schema": {
2150
- "type": "array",
2151
- "items": {
2152
- "$ref": "#/components/schemas/crmStage"
2153
- }
2170
+ "$ref": "#/components/schemas/negotiateResponse"
2154
2171
  }
2155
2172
  }
2156
2173
  }
2174
+ },
2175
+ "503": {
2176
+ "description": "SignalR is not configured on this instance; fall back to SSE"
2157
2177
  }
2158
2178
  },
2159
2179
  "security": [
@@ -2168,25 +2188,24 @@
2168
2188
  ]
2169
2189
  }
2170
2190
  },
2171
- "/v1.0/salesforce/refresh": {
2172
- "post": {
2191
+ "/v1.0/stream": {
2192
+ "get": {
2173
2193
  "tags": [
2174
- "Salesforce"
2194
+ "Realtime"
2175
2195
  ],
2176
- "summary": "Batch-refresh the cached Salesforce state on every linked engagement for the current business.",
2177
- "operationId": "RefreshAllSalesforceLinks",
2178
- "responses": {
2179
- "200": {
2180
- "description": "Payload of SalesforceRefreshResult",
2181
- "content": {
2182
- "application/json": {
2183
- "schema": {
2184
- "$ref": "#/components/schemas/salesforceRefreshResult"
2185
- }
2186
- }
2196
+ "summary": "Unified SSE stream: tender/job/crawl/consultant/audit events on one connection",
2197
+ "operationId": "StreamAll",
2198
+ "parameters": [
2199
+ {
2200
+ "name": "channels",
2201
+ "in": "query",
2202
+ "description": "Comma-separated namespaces to include (tender,job,crawl,consultant,audit). Default: all.",
2203
+ "schema": {
2204
+ "type": "string"
2187
2205
  }
2188
2206
  }
2189
- },
2207
+ ],
2208
+ "responses": {},
2190
2209
  "security": [
2191
2210
  {
2192
2211
  "Implicit": [
@@ -2199,52 +2218,15 @@
2199
2218
  ]
2200
2219
  }
2201
2220
  },
2202
- "/v1.0/tenders/{id}/salesforce/stage": {
2203
- "post": {
2221
+ "/v1.0/tenders/stream-redirect": {
2222
+ "get": {
2204
2223
  "tags": [
2205
- "Salesforce"
2206
- ],
2207
- "summary": "Move the linked SF Opportunity to a new stage and refresh the cache.",
2208
- "operationId": "UpdateTenderSalesforceStage",
2209
- "parameters": [
2210
- {
2211
- "name": "id",
2212
- "in": "path",
2213
- "required": true,
2214
- "schema": {
2215
- "type": "string"
2216
- }
2217
- }
2224
+ "Realtime"
2218
2225
  ],
2219
- "requestBody": {
2220
- "description": "The SF stage masterLabel/apiName to switch to.",
2221
- "content": {
2222
- "application/json": {
2223
- "schema": {
2224
- "$ref": "#/components/schemas/updateSalesforceStageRequest"
2225
- }
2226
- }
2227
- },
2228
- "required": true
2229
- },
2230
- "responses": {
2231
- "200": {
2232
- "description": "Payload of TenderView",
2233
- "content": {
2234
- "application/json": {
2235
- "schema": {
2236
- "$ref": "#/components/schemas/tenderView"
2237
- }
2238
- }
2239
- }
2240
- },
2241
- "400": {
2242
- "description": "Tender has no Salesforce link, or stageName is missing."
2243
- },
2244
- "404": {
2245
- "description": "No description"
2246
- }
2247
- },
2226
+ "summary": "Deprecated: redirects to /v1.0/stream?channels=tender,job",
2227
+ "operationId": "DeprecatedTenderStream",
2228
+ "responses": {},
2229
+ "deprecated": true,
2248
2230
  "security": [
2249
2231
  {
2250
2232
  "Implicit": [
@@ -2257,6 +2239,24 @@
2257
2239
  ]
2258
2240
  }
2259
2241
  },
2242
+ "/v1.0/crawl/stream-redirect": {
2243
+ "get": {
2244
+ "tags": [
2245
+ "Realtime"
2246
+ ],
2247
+ "summary": "Deprecated: redirects to /v1.0/stream?channels=crawl,job",
2248
+ "operationId": "DeprecatedCrawlStream",
2249
+ "responses": {},
2250
+ "deprecated": true,
2251
+ "security": [
2252
+ {
2253
+ "Implicit": [
2254
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
2255
+ ]
2256
+ }
2257
+ ]
2258
+ }
2259
+ },
2260
2260
  "/v1.0/tenders/{id}/consultants": {
2261
2261
  "post": {
2262
2262
  "tags": [
@@ -3875,6 +3875,19 @@
3875
3875
  }
3876
3876
  }
3877
3877
  },
3878
+ "crmRefreshResult": {
3879
+ "type": "object",
3880
+ "properties": {
3881
+ "checked": {
3882
+ "type": "integer",
3883
+ "format": "int32"
3884
+ },
3885
+ "updated": {
3886
+ "type": "integer",
3887
+ "format": "int32"
3888
+ }
3889
+ }
3890
+ },
3878
3891
  "crmStage": {
3879
3892
  "type": "object",
3880
3893
  "properties": {
@@ -4265,19 +4278,6 @@
4265
4278
  },
4266
4279
  "nullable": true
4267
4280
  },
4268
- "salesforceRefreshResult": {
4269
- "type": "object",
4270
- "properties": {
4271
- "checked": {
4272
- "type": "integer",
4273
- "format": "int32"
4274
- },
4275
- "updated": {
4276
- "type": "integer",
4277
- "format": "int32"
4278
- }
4279
- }
4280
- },
4281
4281
  "sendTenderSlackMessageRequest": {
4282
4282
  "type": "object",
4283
4283
  "properties": {