@snokam/mcp-api 0.24.2 → 0.24.3

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.
@@ -1,2784 +0,0 @@
1
- {
2
- "openapi": "3.0.1",
3
- "info": {
4
- "title": "Sales API",
5
- "description": "Sales management API",
6
- "version": "v1.0.0"
7
- },
8
- "servers": [
9
- {
10
- "url": "https://sales.api.test.snokam.no"
11
- }
12
- ],
13
- "paths": {
14
- "/v1.0/GetHealth": {
15
- "get": {
16
- "tags": [
17
- "Health"
18
- ],
19
- "summary": "Health check",
20
- "description": "Returns a health check response.",
21
- "operationId": "GetHealth",
22
- "responses": {
23
- "200": {
24
- "description": "Service is healthy",
25
- "content": {
26
- "application/json": {
27
- "schema": {
28
- "type": "object"
29
- }
30
- }
31
- },
32
- "x-ms-summary": "Success"
33
- }
34
- }
35
- }
36
- },
37
- "/v1.0/tenders/{id}/match-consultants": {
38
- "post": {
39
- "tags": [
40
- "Tenders"
41
- ],
42
- "summary": "Start CV matching for a tender",
43
- "operationId": "StartCvMatching",
44
- "parameters": [
45
- {
46
- "name": "id",
47
- "in": "path",
48
- "required": true,
49
- "schema": {
50
- "type": "string"
51
- }
52
- }
53
- ],
54
- "responses": {
55
- "202": {
56
- "description": "Payload of Object",
57
- "content": {
58
- "application/json": {
59
- "schema": {
60
- "type": "object"
61
- }
62
- }
63
- }
64
- },
65
- "404": {
66
- "description": "No description"
67
- }
68
- },
69
- "security": [
70
- {
71
- "Implicit": [
72
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
73
- ]
74
- }
75
- ]
76
- }
77
- },
78
- "/v1.0/tenders/ingest": {
79
- "post": {
80
- "tags": [
81
- "Tenders"
82
- ],
83
- "summary": "Start tender ingestion",
84
- "operationId": "StartTenderIngestion",
85
- "requestBody": {
86
- "content": {
87
- "application/json": {
88
- "schema": {
89
- "$ref": "#/components/schemas/ingestionRequest"
90
- }
91
- }
92
- },
93
- "required": true
94
- },
95
- "responses": {
96
- "202": {
97
- "description": "Payload of Object",
98
- "content": {
99
- "application/json": {
100
- "schema": {
101
- "type": "object"
102
- }
103
- }
104
- }
105
- }
106
- },
107
- "security": [
108
- {
109
- "Implicit": [
110
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
111
- ]
112
- }
113
- ]
114
- }
115
- },
116
- "/v1.0/jobs/{jobId}": {
117
- "get": {
118
- "tags": [
119
- "Admin"
120
- ],
121
- "summary": "Get agent job by ID",
122
- "operationId": "GetAgentJob",
123
- "parameters": [
124
- {
125
- "name": "jobId",
126
- "in": "path",
127
- "required": true,
128
- "schema": {
129
- "type": "string"
130
- }
131
- }
132
- ],
133
- "responses": {
134
- "200": {
135
- "description": "Payload of AgentJob",
136
- "content": {
137
- "application/json": {
138
- "schema": {
139
- "$ref": "#/components/schemas/agentJob"
140
- }
141
- }
142
- }
143
- },
144
- "404": {
145
- "description": "No description"
146
- }
147
- },
148
- "security": [
149
- {
150
- "Implicit": [
151
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
152
- ]
153
- }
154
- ]
155
- }
156
- },
157
- "/v1.0/admin/reprocess-ingestion": {
158
- "post": {
159
- "tags": [
160
- "Admin"
161
- ],
162
- "summary": "Batch reprocess tender ingestion",
163
- "operationId": "ReprocessIngestion",
164
- "parameters": [
165
- {
166
- "name": "unmatchedOnly",
167
- "in": "query",
168
- "description": "If true, only reprocess tenders with no existing consultant matches",
169
- "schema": {
170
- "type": "boolean"
171
- }
172
- }
173
- ],
174
- "responses": {
175
- "200": {
176
- "description": "Payload of Object",
177
- "content": {
178
- "application/json": {
179
- "schema": {
180
- "type": "object"
181
- }
182
- }
183
- }
184
- }
185
- },
186
- "security": [
187
- {
188
- "Implicit": [
189
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
190
- ]
191
- }
192
- ]
193
- }
194
- },
195
- "/v1.0/scan/doffin": {
196
- "post": {
197
- "tags": [
198
- "Scan"
199
- ],
200
- "summary": "Trigger a Doffin scan immediately",
201
- "operationId": "TriggerDoffinScan",
202
- "responses": {
203
- "200": {
204
- "description": "Payload of Object",
205
- "content": {
206
- "application/json": {
207
- "schema": {
208
- "type": "object"
209
- }
210
- }
211
- }
212
- }
213
- },
214
- "security": [
215
- {
216
- "Implicit": [
217
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
218
- ]
219
- }
220
- ]
221
- }
222
- },
223
- "/v1.0/scan/email": {
224
- "post": {
225
- "tags": [
226
- "Scan"
227
- ],
228
- "summary": "Trigger an email scan immediately",
229
- "operationId": "TriggerEmailScan",
230
- "responses": {
231
- "200": {
232
- "description": "Payload of Object",
233
- "content": {
234
- "application/json": {
235
- "schema": {
236
- "type": "object"
237
- }
238
- }
239
- }
240
- }
241
- },
242
- "security": [
243
- {
244
- "Implicit": [
245
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
246
- ]
247
- }
248
- ]
249
- }
250
- },
251
- "/v1.0/scan/sites": {
252
- "post": {
253
- "tags": [
254
- "Scan"
255
- ],
256
- "summary": "Trigger an agentic site scan immediately over all configured sources",
257
- "operationId": "TriggerSiteScan",
258
- "responses": {
259
- "200": {
260
- "description": "Payload of Object",
261
- "content": {
262
- "application/json": {
263
- "schema": {
264
- "type": "object"
265
- }
266
- }
267
- }
268
- }
269
- },
270
- "security": [
271
- {
272
- "Implicit": [
273
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
274
- ]
275
- }
276
- ]
277
- }
278
- },
279
- "/v1.0/admin/reprocess-emails": {
280
- "post": {
281
- "tags": [
282
- "Admin"
283
- ],
284
- "summary": "Re-fetch all emails since N days ago and re-ingest them so raw content is stored as source_email blobs",
285
- "operationId": "ReprocessEmails",
286
- "parameters": [
287
- {
288
- "name": "daysSince",
289
- "in": "query",
290
- "description": "Number of days back to fetch emails (default: 90)",
291
- "schema": {
292
- "type": "string"
293
- }
294
- }
295
- ],
296
- "responses": {
297
- "200": {
298
- "description": "Payload of Object",
299
- "content": {
300
- "application/json": {
301
- "schema": {
302
- "type": "object"
303
- }
304
- }
305
- }
306
- }
307
- }
308
- }
309
- },
310
- "/v1.0/crawl/jobs/reap-zombies": {
311
- "post": {
312
- "tags": [
313
- "Crawl"
314
- ],
315
- "summary": "Manually fail pending/running jobs older than 15 min (same logic as the every-5-min timer)",
316
- "operationId": "ReapZombieJobsManual",
317
- "parameters": [
318
- {
319
- "name": "thresholdMinutes",
320
- "in": "query",
321
- "description": "Override the 15 min threshold (1-180)",
322
- "schema": {
323
- "type": "integer",
324
- "format": "int32"
325
- }
326
- }
327
- ],
328
- "responses": {
329
- "200": {
330
- "description": "Payload of ZombieReapResult",
331
- "content": {
332
- "application/json": {
333
- "schema": {
334
- "$ref": "#/components/schemas/zombieReapResult"
335
- }
336
- }
337
- }
338
- }
339
- },
340
- "security": [
341
- {
342
- "Implicit": [
343
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
344
- ]
345
- }
346
- ]
347
- }
348
- },
349
- "/v1.0/tenders/{tenderId}/audit": {
350
- "get": {
351
- "tags": [
352
- "Audit"
353
- ],
354
- "summary": "Recent audit events for a single tender, newest first",
355
- "operationId": "GetTenderAudit",
356
- "parameters": [
357
- {
358
- "name": "tenderId",
359
- "in": "path",
360
- "required": true,
361
- "schema": {
362
- "type": "string"
363
- }
364
- },
365
- {
366
- "name": "limit",
367
- "in": "query",
368
- "description": "Max events to return (default 50, max 500)",
369
- "schema": {
370
- "type": "integer",
371
- "format": "int32"
372
- }
373
- }
374
- ],
375
- "responses": {
376
- "200": {
377
- "description": "Payload of Array of AuditEvent",
378
- "content": {
379
- "application/json": {
380
- "schema": {
381
- "type": "array",
382
- "items": {
383
- "$ref": "#/components/schemas/auditEvent"
384
- }
385
- }
386
- }
387
- }
388
- }
389
- },
390
- "security": [
391
- {
392
- "Implicit": [
393
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
394
- ]
395
- }
396
- ]
397
- }
398
- },
399
- "/v1.0/audit/recent": {
400
- "get": {
401
- "tags": [
402
- "Audit"
403
- ],
404
- "summary": "Recent audit events across all tenders, newest first",
405
- "operationId": "GetRecentAudit",
406
- "parameters": [
407
- {
408
- "name": "limit",
409
- "in": "query",
410
- "description": "Max events to return (default 100, max 1000)",
411
- "schema": {
412
- "type": "integer",
413
- "format": "int32"
414
- }
415
- },
416
- {
417
- "name": "sinceHours",
418
- "in": "query",
419
- "description": "Only events from the last N hours (default 24)",
420
- "schema": {
421
- "type": "integer",
422
- "format": "int32"
423
- }
424
- }
425
- ],
426
- "responses": {
427
- "200": {
428
- "description": "Payload of Array of AuditEvent",
429
- "content": {
430
- "application/json": {
431
- "schema": {
432
- "type": "array",
433
- "items": {
434
- "$ref": "#/components/schemas/auditEvent"
435
- }
436
- }
437
- }
438
- }
439
- }
440
- },
441
- "security": [
442
- {
443
- "Implicit": [
444
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
445
- ]
446
- }
447
- ]
448
- }
449
- },
450
- "/v1.0/tenders/funnel": {
451
- "get": {
452
- "tags": [
453
- "Tenders"
454
- ],
455
- "summary": "Pipeline funnel analytics: stage counts, conversion rates, cycle times",
456
- "operationId": "GetTenderFunnel",
457
- "parameters": [
458
- {
459
- "name": "windowDays",
460
- "in": "query",
461
- "description": "Rolling window in days (default 30, max 365)",
462
- "schema": {
463
- "type": "integer",
464
- "format": "int32"
465
- }
466
- }
467
- ],
468
- "responses": {
469
- "200": {
470
- "description": "Payload of FunnelResponse",
471
- "content": {
472
- "application/json": {
473
- "schema": {
474
- "$ref": "#/components/schemas/funnelResponse"
475
- }
476
- }
477
- }
478
- }
479
- },
480
- "security": [
481
- {
482
- "Implicit": [
483
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
484
- ]
485
- }
486
- ]
487
- }
488
- },
489
- "/v1.0/tenders/stats": {
490
- "get": {
491
- "tags": [
492
- "Tenders"
493
- ],
494
- "summary": "Aggregated tender KPIs for the admin dashboard (by status/stage/health + activity window)",
495
- "operationId": "GetTenderStats",
496
- "parameters": [
497
- {
498
- "name": "windowDays",
499
- "in": "query",
500
- "description": "Rolling window for activity-based metrics (defaults to 30, max 365)",
501
- "schema": {
502
- "type": "integer",
503
- "format": "int32"
504
- }
505
- }
506
- ],
507
- "responses": {
508
- "200": {
509
- "description": "Payload of TenderStatsResponse",
510
- "content": {
511
- "application/json": {
512
- "schema": {
513
- "$ref": "#/components/schemas/tenderStatsResponse"
514
- }
515
- }
516
- }
517
- }
518
- },
519
- "security": [
520
- {
521
- "Implicit": [
522
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
523
- ]
524
- }
525
- ]
526
- }
527
- },
528
- "/v1.0/consultants/stats": {
529
- "get": {
530
- "tags": [
531
- "Consultants"
532
- ],
533
- "summary": "Aggregated consultant KPIs (total, availability split, avg fit score from latest matches)",
534
- "operationId": "GetConsultantStats",
535
- "responses": {
536
- "200": {
537
- "description": "Payload of ConsultantStatsResponse",
538
- "content": {
539
- "application/json": {
540
- "schema": {
541
- "$ref": "#/components/schemas/consultantStatsResponse"
542
- }
543
- }
544
- }
545
- }
546
- },
547
- "security": [
548
- {
549
- "Implicit": [
550
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
551
- ]
552
- }
553
- ]
554
- }
555
- },
556
- "/v1.0/crawl/sources": {
557
- "get": {
558
- "tags": [
559
- "Crawl"
560
- ],
561
- "summary": "List configured crawl sources together with their learned patterns and last-activity timestamp",
562
- "operationId": "ListCrawlSources",
563
- "responses": {
564
- "200": {
565
- "description": "Payload of Array of CrawlSourceWithPattern",
566
- "content": {
567
- "application/json": {
568
- "schema": {
569
- "type": "array",
570
- "items": {
571
- "$ref": "#/components/schemas/crawlSourceWithPattern"
572
- }
573
- }
574
- }
575
- }
576
- }
577
- },
578
- "security": [
579
- {
580
- "Implicit": [
581
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
582
- ]
583
- }
584
- ]
585
- }
586
- },
587
- "/v1.0/crawl/sources/{name}": {
588
- "put": {
589
- "tags": [
590
- "Crawl"
591
- ],
592
- "summary": "Create or update a crawl source",
593
- "operationId": "UpsertCrawlSource",
594
- "requestBody": {
595
- "content": {
596
- "application/json": {
597
- "schema": {
598
- "$ref": "#/components/schemas/crawlSourceUpsertRequest"
599
- }
600
- }
601
- }
602
- },
603
- "responses": {
604
- "200": {
605
- "description": "Payload of CrawlSourceConfig",
606
- "content": {
607
- "application/json": {
608
- "schema": {
609
- "$ref": "#/components/schemas/crawlSourceConfig"
610
- }
611
- }
612
- }
613
- },
614
- "400": {
615
- "description": "No description"
616
- }
617
- },
618
- "security": [
619
- {
620
- "Implicit": [
621
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
622
- ]
623
- }
624
- ]
625
- },
626
- "delete": {
627
- "tags": [
628
- "Crawl"
629
- ],
630
- "summary": "Delete a crawl source and its cached pattern",
631
- "operationId": "DeleteCrawlSource",
632
- "responses": {
633
- "204": {
634
- "description": "No description"
635
- }
636
- },
637
- "security": [
638
- {
639
- "Implicit": [
640
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
641
- ]
642
- }
643
- ]
644
- }
645
- },
646
- "/v1.0/crawl/sources/{name}/pattern": {
647
- "delete": {
648
- "tags": [
649
- "Crawl"
650
- ],
651
- "summary": "Drop the cached URL pattern for a source so the next scan re-bootstraps it",
652
- "operationId": "InvalidateCrawlPattern",
653
- "responses": {
654
- "204": {
655
- "description": "No description"
656
- }
657
- },
658
- "security": [
659
- {
660
- "Implicit": [
661
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
662
- ]
663
- }
664
- ]
665
- }
666
- },
667
- "/v1.0/crawl/discover-listing": {
668
- "post": {
669
- "tags": [
670
- "Crawl"
671
- ],
672
- "summary": "Given a site homepage or bare domain, locate the tender/project listing page on it",
673
- "operationId": "DiscoverCrawlListing",
674
- "requestBody": {
675
- "content": {
676
- "application/json": {
677
- "schema": {
678
- "$ref": "#/components/schemas/discoverListingRequest"
679
- }
680
- }
681
- }
682
- },
683
- "responses": {
684
- "200": {
685
- "description": "Payload of DiscoverListingResponse",
686
- "content": {
687
- "application/json": {
688
- "schema": {
689
- "$ref": "#/components/schemas/discoverListingResponse"
690
- }
691
- }
692
- }
693
- }
694
- },
695
- "security": [
696
- {
697
- "Implicit": [
698
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
699
- ]
700
- }
701
- ]
702
- }
703
- },
704
- "/v1.0/crawl/sources/{name}/scan": {
705
- "post": {
706
- "tags": [
707
- "Crawl"
708
- ],
709
- "summary": "Scan one source now and enqueue ingestion jobs for newly discovered notices",
710
- "operationId": "ScanCrawlSource",
711
- "responses": {
712
- "200": {
713
- "description": "Payload of CrawlScanResponse",
714
- "content": {
715
- "application/json": {
716
- "schema": {
717
- "$ref": "#/components/schemas/crawlScanResponse"
718
- }
719
- }
720
- }
721
- },
722
- "404": {
723
- "description": "No description"
724
- }
725
- },
726
- "security": [
727
- {
728
- "Implicit": [
729
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
730
- ]
731
- }
732
- ]
733
- }
734
- },
735
- "/v1.0/crawl/sources/{name}/failed-tenders": {
736
- "delete": {
737
- "tags": [
738
- "Crawl"
739
- ],
740
- "summary": "Delete all tenders for this source whose ingestion failed (parse-failed / zero confidence)",
741
- "operationId": "DeleteFailedTenders",
742
- "responses": {
743
- "200": {
744
- "description": "Payload of DeleteFailedTendersResponse",
745
- "content": {
746
- "application/json": {
747
- "schema": {
748
- "$ref": "#/components/schemas/deleteFailedTendersResponse"
749
- }
750
- }
751
- }
752
- }
753
- },
754
- "security": [
755
- {
756
- "Implicit": [
757
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
758
- ]
759
- }
760
- ]
761
- }
762
- },
763
- "/v1.0/crawl/stats": {
764
- "get": {
765
- "tags": [
766
- "Crawl"
767
- ],
768
- "summary": "High-level stats for the /admin ops dashboard",
769
- "operationId": "GetCrawlStats",
770
- "responses": {
771
- "200": {
772
- "description": "Payload of CrawlStatsResponse",
773
- "content": {
774
- "application/json": {
775
- "schema": {
776
- "$ref": "#/components/schemas/crawlStatsResponse"
777
- }
778
- }
779
- }
780
- }
781
- },
782
- "security": [
783
- {
784
- "Implicit": [
785
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
786
- ]
787
- }
788
- ]
789
- }
790
- },
791
- "/v1.0/crawl/stream": {
792
- "get": {
793
- "tags": [
794
- "Crawl"
795
- ],
796
- "summary": "Server-sent-events stream: pushes stats + activity every ~2s for the ops dashboard",
797
- "operationId": "StreamCrawlEvents",
798
- "responses": {},
799
- "security": [
800
- {
801
- "Implicit": [
802
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
803
- ]
804
- }
805
- ]
806
- }
807
- },
808
- "/v1.0/crawl/activity": {
809
- "get": {
810
- "tags": [
811
- "Crawl"
812
- ],
813
- "summary": "Recent ingestion jobs across all sources, newest first. Supports source/status/date/search filters and paging.",
814
- "operationId": "GetCrawlActivity",
815
- "parameters": [
816
- {
817
- "name": "source",
818
- "in": "query",
819
- "description": "Filter by sourceName (exact match)",
820
- "schema": {
821
- "type": "string"
822
- }
823
- },
824
- {
825
- "name": "status",
826
- "in": "query",
827
- "description": "Comma-separated statuses (pending,running,completed,failed)",
828
- "schema": {
829
- "type": "string"
830
- }
831
- },
832
- {
833
- "name": "from",
834
- "in": "query",
835
- "description": "ISO-8601 lower bound on startedAt",
836
- "schema": {
837
- "type": "string"
838
- }
839
- },
840
- {
841
- "name": "to",
842
- "in": "query",
843
- "description": "ISO-8601 upper bound on startedAt",
844
- "schema": {
845
- "type": "string"
846
- }
847
- },
848
- {
849
- "name": "search",
850
- "in": "query",
851
- "description": "Substring match across inputTitle/inputUrl/externalId/id/error",
852
- "schema": {
853
- "type": "string"
854
- }
855
- },
856
- {
857
- "name": "skip",
858
- "in": "query",
859
- "description": "Offset for paging (default 0)",
860
- "schema": {
861
- "type": "string"
862
- }
863
- },
864
- {
865
- "name": "limit",
866
- "in": "query",
867
- "description": "Max jobs to return (default 50, max 500)",
868
- "schema": {
869
- "type": "string"
870
- }
871
- }
872
- ],
873
- "responses": {
874
- "200": {
875
- "description": "Payload of CrawlActivityResponse",
876
- "content": {
877
- "application/json": {
878
- "schema": {
879
- "$ref": "#/components/schemas/crawlActivityResponse"
880
- }
881
- }
882
- }
883
- }
884
- },
885
- "security": [
886
- {
887
- "Implicit": [
888
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
889
- ]
890
- }
891
- ]
892
- }
893
- },
894
- "/v1.0/crawl/jobs/{jobId}/retry": {
895
- "post": {
896
- "tags": [
897
- "Crawl"
898
- ],
899
- "summary": "Delete the tender (if any) and enqueue a fresh ingestion for the same URL/title/externalId",
900
- "operationId": "RetryCrawlJob",
901
- "responses": {
902
- "200": {
903
- "description": "Payload of AgentJob",
904
- "content": {
905
- "application/json": {
906
- "schema": {
907
- "$ref": "#/components/schemas/agentJob"
908
- }
909
- }
910
- }
911
- },
912
- "400": {
913
- "description": "No description"
914
- },
915
- "404": {
916
- "description": "No description"
917
- }
918
- },
919
- "security": [
920
- {
921
- "Implicit": [
922
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
923
- ]
924
- }
925
- ]
926
- }
927
- },
928
- "/v1.0/crawl/jobs/{jobId}/cancel": {
929
- "post": {
930
- "tags": [
931
- "Crawl"
932
- ],
933
- "summary": "Terminate the running orchestration and mark the job as failed (\"Cancelled by operator\")",
934
- "operationId": "CancelCrawlJob",
935
- "responses": {
936
- "200": {
937
- "description": "Payload of AgentJob",
938
- "content": {
939
- "application/json": {
940
- "schema": {
941
- "$ref": "#/components/schemas/agentJob"
942
- }
943
- }
944
- }
945
- },
946
- "404": {
947
- "description": "No description"
948
- },
949
- "409": {
950
- "description": "No description"
951
- }
952
- },
953
- "security": [
954
- {
955
- "Implicit": [
956
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
957
- ]
958
- }
959
- ]
960
- }
961
- },
962
- "/v1.0/crawl/jobs/bulk-delete": {
963
- "post": {
964
- "tags": [
965
- "Crawl"
966
- ],
967
- "summary": "Delete a batch of jobs and their backing tenders",
968
- "operationId": "BulkDeleteCrawlJobs",
969
- "requestBody": {
970
- "content": {
971
- "application/json": {
972
- "schema": {
973
- "$ref": "#/components/schemas/bulkDeleteJobsRequest"
974
- }
975
- }
976
- }
977
- },
978
- "responses": {
979
- "200": {
980
- "description": "Payload of BulkDeleteJobsResponse",
981
- "content": {
982
- "application/json": {
983
- "schema": {
984
- "$ref": "#/components/schemas/bulkDeleteJobsResponse"
985
- }
986
- }
987
- }
988
- },
989
- "400": {
990
- "description": "No description"
991
- }
992
- },
993
- "security": [
994
- {
995
- "Implicit": [
996
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
997
- ]
998
- }
999
- ]
1000
- }
1001
- },
1002
- "/v1.0/crawl/sources/{name}/jobs": {
1003
- "get": {
1004
- "tags": [
1005
- "Crawl"
1006
- ],
1007
- "summary": "Recent ingestion jobs for this source, newest first",
1008
- "operationId": "ListCrawlJobs",
1009
- "parameters": [
1010
- {
1011
- "name": "limit",
1012
- "in": "query",
1013
- "description": "Max jobs to return (default 50)",
1014
- "schema": {
1015
- "type": "string"
1016
- }
1017
- }
1018
- ],
1019
- "responses": {
1020
- "200": {
1021
- "description": "Payload of Array of AgentJob",
1022
- "content": {
1023
- "application/json": {
1024
- "schema": {
1025
- "type": "array",
1026
- "items": {
1027
- "$ref": "#/components/schemas/agentJob"
1028
- }
1029
- }
1030
- }
1031
- }
1032
- }
1033
- },
1034
- "security": [
1035
- {
1036
- "Implicit": [
1037
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1038
- ]
1039
- }
1040
- ]
1041
- }
1042
- },
1043
- "/v1.0/crawl/sources/{name}/preview": {
1044
- "post": {
1045
- "tags": [
1046
- "Crawl"
1047
- ],
1048
- "summary": "Run a one-off discovery crawl for a single source and return the notices it would enqueue (no ingestion)",
1049
- "operationId": "PreviewCrawlSource",
1050
- "responses": {
1051
- "200": {
1052
- "description": "Payload of CrawlPreviewResponse",
1053
- "content": {
1054
- "application/json": {
1055
- "schema": {
1056
- "$ref": "#/components/schemas/crawlPreviewResponse"
1057
- }
1058
- }
1059
- }
1060
- },
1061
- "404": {
1062
- "description": "No description"
1063
- }
1064
- },
1065
- "security": [
1066
- {
1067
- "Implicit": [
1068
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1069
- ]
1070
- }
1071
- ]
1072
- }
1073
- },
1074
- "/v1.0/tenders/{id}/documents": {
1075
- "get": {
1076
- "tags": [
1077
- "Documents"
1078
- ],
1079
- "summary": "List documents for a tender",
1080
- "operationId": "ListTenderDocuments",
1081
- "parameters": [
1082
- {
1083
- "name": "id",
1084
- "in": "path",
1085
- "required": true,
1086
- "schema": {
1087
- "type": "string"
1088
- }
1089
- }
1090
- ],
1091
- "responses": {
1092
- "200": {
1093
- "description": "Payload of Array of TenderDocument",
1094
- "content": {
1095
- "application/json": {
1096
- "schema": {
1097
- "type": "array",
1098
- "items": {
1099
- "$ref": "#/components/schemas/tenderDocument"
1100
- }
1101
- }
1102
- }
1103
- }
1104
- },
1105
- "404": {
1106
- "description": "No description"
1107
- }
1108
- },
1109
- "security": [
1110
- {
1111
- "Implicit": [
1112
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1113
- ]
1114
- }
1115
- ]
1116
- },
1117
- "post": {
1118
- "tags": [
1119
- "Documents"
1120
- ],
1121
- "summary": "Upload a new document to a tender",
1122
- "operationId": "UploadTenderDocument",
1123
- "parameters": [
1124
- {
1125
- "name": "id",
1126
- "in": "path",
1127
- "required": true,
1128
- "schema": {
1129
- "type": "string"
1130
- }
1131
- }
1132
- ],
1133
- "responses": {
1134
- "200": {
1135
- "description": "Payload of TenderDocument",
1136
- "content": {
1137
- "application/json": {
1138
- "schema": {
1139
- "$ref": "#/components/schemas/tenderDocument"
1140
- }
1141
- }
1142
- }
1143
- },
1144
- "404": {
1145
- "description": "No description"
1146
- }
1147
- },
1148
- "security": [
1149
- {
1150
- "Implicit": [
1151
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1152
- ]
1153
- }
1154
- ]
1155
- }
1156
- },
1157
- "/v1.0/tenders/{id}/documents/{docId}/download-url": {
1158
- "get": {
1159
- "tags": [
1160
- "Documents"
1161
- ],
1162
- "summary": "Get a short-lived download URL for a document",
1163
- "operationId": "GetDocumentDownloadUrl",
1164
- "parameters": [
1165
- {
1166
- "name": "id",
1167
- "in": "path",
1168
- "required": true,
1169
- "schema": {
1170
- "type": "string"
1171
- }
1172
- },
1173
- {
1174
- "name": "docId",
1175
- "in": "path",
1176
- "required": true,
1177
- "schema": {
1178
- "type": "string"
1179
- }
1180
- }
1181
- ],
1182
- "responses": {
1183
- "200": {
1184
- "description": "Payload of Object",
1185
- "content": {
1186
- "application/json": {
1187
- "schema": {
1188
- "type": "object"
1189
- }
1190
- }
1191
- }
1192
- },
1193
- "404": {
1194
- "description": "No description"
1195
- }
1196
- },
1197
- "security": [
1198
- {
1199
- "Implicit": [
1200
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1201
- ]
1202
- }
1203
- ]
1204
- }
1205
- },
1206
- "/v1.0/tenders/{id}/documents/{docId}/download": {
1207
- "get": {
1208
- "tags": [
1209
- "Documents"
1210
- ],
1211
- "summary": "Download a single document",
1212
- "operationId": "DownloadDocument",
1213
- "parameters": [
1214
- {
1215
- "name": "id",
1216
- "in": "path",
1217
- "required": true,
1218
- "schema": {
1219
- "type": "string"
1220
- }
1221
- },
1222
- {
1223
- "name": "docId",
1224
- "in": "path",
1225
- "required": true,
1226
- "schema": {
1227
- "type": "string"
1228
- }
1229
- }
1230
- ],
1231
- "responses": {
1232
- "200": {
1233
- "description": "Payload of Array of Byte",
1234
- "content": {
1235
- "application/octet-stream": {
1236
- "schema": {
1237
- "type": "string",
1238
- "format": "binary"
1239
- }
1240
- }
1241
- }
1242
- },
1243
- "404": {
1244
- "description": "No description"
1245
- }
1246
- },
1247
- "security": [
1248
- {
1249
- "Implicit": [
1250
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1251
- ]
1252
- }
1253
- ]
1254
- }
1255
- },
1256
- "/v1.0/tenders/{id}/documents/download-all": {
1257
- "get": {
1258
- "tags": [
1259
- "Documents"
1260
- ],
1261
- "summary": "Download all tender documents as a ZIP archive",
1262
- "operationId": "DownloadAllDocuments",
1263
- "parameters": [
1264
- {
1265
- "name": "id",
1266
- "in": "path",
1267
- "required": true,
1268
- "schema": {
1269
- "type": "string"
1270
- }
1271
- }
1272
- ],
1273
- "responses": {
1274
- "200": {
1275
- "description": "Payload of Array of Byte",
1276
- "content": {
1277
- "application/zip": {
1278
- "schema": {
1279
- "type": "string",
1280
- "format": "binary"
1281
- }
1282
- }
1283
- }
1284
- },
1285
- "404": {
1286
- "description": "No description"
1287
- }
1288
- },
1289
- "security": [
1290
- {
1291
- "Implicit": [
1292
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1293
- ]
1294
- }
1295
- ]
1296
- }
1297
- },
1298
- "/v1.0/tenders/{id}/documents/{docId}": {
1299
- "patch": {
1300
- "tags": [
1301
- "Documents"
1302
- ],
1303
- "summary": "Patch tender document flags (e.g. set as competence matrix source)",
1304
- "operationId": "PatchTenderDocument",
1305
- "parameters": [
1306
- {
1307
- "name": "id",
1308
- "in": "path",
1309
- "required": true,
1310
- "schema": {
1311
- "type": "string"
1312
- }
1313
- },
1314
- {
1315
- "name": "docId",
1316
- "in": "path",
1317
- "required": true,
1318
- "schema": {
1319
- "type": "string"
1320
- }
1321
- }
1322
- ],
1323
- "requestBody": {
1324
- "content": {
1325
- "application/json": {
1326
- "schema": {
1327
- "$ref": "#/components/schemas/patchDocumentRequest"
1328
- }
1329
- }
1330
- },
1331
- "required": true
1332
- },
1333
- "responses": {
1334
- "200": {
1335
- "description": "Payload of PatchDocumentResponse",
1336
- "content": {
1337
- "application/json": {
1338
- "schema": {
1339
- "$ref": "#/components/schemas/patchDocumentResponse"
1340
- }
1341
- }
1342
- }
1343
- },
1344
- "404": {
1345
- "description": "No description"
1346
- }
1347
- },
1348
- "security": [
1349
- {
1350
- "Implicit": [
1351
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1352
- ]
1353
- }
1354
- ]
1355
- },
1356
- "delete": {
1357
- "tags": [
1358
- "Documents"
1359
- ],
1360
- "summary": "Delete a tender document (and its blob + related answers)",
1361
- "operationId": "DeleteTenderDocument",
1362
- "parameters": [
1363
- {
1364
- "name": "id",
1365
- "in": "path",
1366
- "required": true,
1367
- "schema": {
1368
- "type": "string"
1369
- }
1370
- },
1371
- {
1372
- "name": "docId",
1373
- "in": "path",
1374
- "required": true,
1375
- "schema": {
1376
- "type": "string"
1377
- }
1378
- }
1379
- ],
1380
- "responses": {
1381
- "204": {
1382
- "description": "No description"
1383
- },
1384
- "404": {
1385
- "description": "No description"
1386
- }
1387
- },
1388
- "security": [
1389
- {
1390
- "Implicit": [
1391
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1392
- ]
1393
- }
1394
- ]
1395
- }
1396
- },
1397
- "/v1.0/tenders/{id}/documents/{docId}/extract-questions": {
1398
- "post": {
1399
- "tags": [
1400
- "Documents"
1401
- ],
1402
- "summary": "Start extraction of fillable questions from a document",
1403
- "operationId": "StartQuestionExtraction",
1404
- "parameters": [
1405
- {
1406
- "name": "id",
1407
- "in": "path",
1408
- "required": true,
1409
- "schema": {
1410
- "type": "string"
1411
- }
1412
- },
1413
- {
1414
- "name": "docId",
1415
- "in": "path",
1416
- "required": true,
1417
- "schema": {
1418
- "type": "string"
1419
- }
1420
- }
1421
- ],
1422
- "responses": {
1423
- "202": {
1424
- "description": "Payload of Object",
1425
- "content": {
1426
- "application/json": {
1427
- "schema": {
1428
- "type": "object"
1429
- }
1430
- }
1431
- }
1432
- },
1433
- "404": {
1434
- "description": "No description"
1435
- }
1436
- },
1437
- "security": [
1438
- {
1439
- "Implicit": [
1440
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1441
- ]
1442
- }
1443
- ]
1444
- }
1445
- },
1446
- "/v1.0/tenders/{id}/documents/{docId}/fill-questions": {
1447
- "post": {
1448
- "tags": [
1449
- "Documents"
1450
- ],
1451
- "summary": "Start filling tender question answers per consultant",
1452
- "operationId": "StartQuestionFill",
1453
- "parameters": [
1454
- {
1455
- "name": "id",
1456
- "in": "path",
1457
- "required": true,
1458
- "schema": {
1459
- "type": "string"
1460
- }
1461
- },
1462
- {
1463
- "name": "docId",
1464
- "in": "path",
1465
- "required": true,
1466
- "schema": {
1467
- "type": "string"
1468
- }
1469
- }
1470
- ],
1471
- "requestBody": {
1472
- "content": {
1473
- "application/json": {
1474
- "schema": {
1475
- "$ref": "#/components/schemas/questionFillRequest"
1476
- }
1477
- }
1478
- },
1479
- "required": true
1480
- },
1481
- "responses": {
1482
- "202": {
1483
- "description": "Payload of Object",
1484
- "content": {
1485
- "application/json": {
1486
- "schema": {
1487
- "type": "object"
1488
- }
1489
- }
1490
- }
1491
- },
1492
- "404": {
1493
- "description": "No description"
1494
- }
1495
- },
1496
- "security": [
1497
- {
1498
- "Implicit": [
1499
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1500
- ]
1501
- }
1502
- ]
1503
- }
1504
- },
1505
- "/v1.0/consultants": {
1506
- "get": {
1507
- "tags": [
1508
- "Consultants"
1509
- ],
1510
- "summary": "List all known consultants (for manual selection)",
1511
- "operationId": "ListConsultants",
1512
- "parameters": [
1513
- {
1514
- "name": "query",
1515
- "in": "query",
1516
- "schema": {
1517
- "type": "string"
1518
- }
1519
- }
1520
- ],
1521
- "responses": {
1522
- "200": {
1523
- "description": "Payload of Array of ConsultantSummary",
1524
- "content": {
1525
- "application/json": {
1526
- "schema": {
1527
- "type": "array",
1528
- "items": {
1529
- "$ref": "#/components/schemas/consultantSummary"
1530
- }
1531
- }
1532
- }
1533
- }
1534
- }
1535
- },
1536
- "security": [
1537
- {
1538
- "Implicit": [
1539
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1540
- ]
1541
- }
1542
- ]
1543
- }
1544
- },
1545
- "/v1.0/realtime/negotiate": {
1546
- "post": {
1547
- "tags": [
1548
- "Realtime"
1549
- ],
1550
- "summary": "Issue a SignalR access token + URL for the sales-live hub",
1551
- "operationId": "NegotiateSignalR",
1552
- "requestBody": {
1553
- "content": {
1554
- "application/json": {
1555
- "schema": {
1556
- "$ref": "#/components/schemas/negotiateRequest"
1557
- }
1558
- }
1559
- }
1560
- },
1561
- "responses": {
1562
- "200": {
1563
- "description": "Payload of NegotiateResponse",
1564
- "content": {
1565
- "application/json": {
1566
- "schema": {
1567
- "$ref": "#/components/schemas/negotiateResponse"
1568
- }
1569
- }
1570
- }
1571
- },
1572
- "503": {
1573
- "description": "SignalR is not configured on this instance; fall back to SSE"
1574
- }
1575
- },
1576
- "security": [
1577
- {
1578
- "Implicit": [
1579
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1580
- ]
1581
- }
1582
- ]
1583
- }
1584
- },
1585
- "/v1.0/stream": {
1586
- "get": {
1587
- "tags": [
1588
- "Realtime"
1589
- ],
1590
- "summary": "Unified SSE stream: tender/job/crawl/consultant/audit events on one connection",
1591
- "operationId": "StreamAll",
1592
- "parameters": [
1593
- {
1594
- "name": "channels",
1595
- "in": "query",
1596
- "description": "Comma-separated namespaces to include (tender,job,crawl,consultant,audit). Default: all.",
1597
- "schema": {
1598
- "type": "string"
1599
- }
1600
- }
1601
- ],
1602
- "responses": {},
1603
- "security": [
1604
- {
1605
- "Implicit": [
1606
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1607
- ]
1608
- }
1609
- ]
1610
- }
1611
- },
1612
- "/v1.0/tenders/stream-redirect": {
1613
- "get": {
1614
- "tags": [
1615
- "Realtime"
1616
- ],
1617
- "summary": "Deprecated: redirects to /v1.0/stream?channels=tender,job",
1618
- "operationId": "DeprecatedTenderStream",
1619
- "responses": {},
1620
- "deprecated": true,
1621
- "security": [
1622
- {
1623
- "Implicit": [
1624
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1625
- ]
1626
- }
1627
- ]
1628
- }
1629
- },
1630
- "/v1.0/crawl/stream-redirect": {
1631
- "get": {
1632
- "tags": [
1633
- "Realtime"
1634
- ],
1635
- "summary": "Deprecated: redirects to /v1.0/stream?channels=crawl,job",
1636
- "operationId": "DeprecatedCrawlStream",
1637
- "responses": {},
1638
- "deprecated": true,
1639
- "security": [
1640
- {
1641
- "Implicit": [
1642
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1643
- ]
1644
- }
1645
- ]
1646
- }
1647
- },
1648
- "/v1.0/salesforce/opportunities": {
1649
- "get": {
1650
- "tags": [
1651
- "Salesforce"
1652
- ],
1653
- "summary": "List Salesforce Opportunities (open by default).",
1654
- "operationId": "ListSalesforceOpportunities",
1655
- "parameters": [
1656
- {
1657
- "name": "includeClosed",
1658
- "in": "query",
1659
- "schema": {
1660
- "type": "boolean"
1661
- },
1662
- "x-ms-summary": "Include closed opportunities (default false)."
1663
- },
1664
- {
1665
- "name": "limit",
1666
- "in": "query",
1667
- "schema": {
1668
- "type": "integer",
1669
- "format": "int32"
1670
- },
1671
- "x-ms-summary": "Row cap, max 200 (default 100)."
1672
- }
1673
- ],
1674
- "responses": {
1675
- "200": {
1676
- "description": "Payload of Array of SalesforceOpportunity",
1677
- "content": {
1678
- "application/json": {
1679
- "schema": {
1680
- "type": "array",
1681
- "items": {
1682
- "$ref": "#/components/schemas/salesforceOpportunity"
1683
- }
1684
- }
1685
- }
1686
- }
1687
- }
1688
- },
1689
- "security": [
1690
- {
1691
- "Implicit": [
1692
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1693
- ]
1694
- }
1695
- ]
1696
- }
1697
- },
1698
- "/v1.0/salesforce/opportunity-stages": {
1699
- "get": {
1700
- "tags": [
1701
- "Salesforce"
1702
- ],
1703
- "summary": "List the SF org's Opportunity pipeline stages in configured order.",
1704
- "operationId": "ListSalesforceOpportunityStages",
1705
- "responses": {
1706
- "200": {
1707
- "description": "Payload of Array of SalesforceOpportunityStage",
1708
- "content": {
1709
- "application/json": {
1710
- "schema": {
1711
- "type": "array",
1712
- "items": {
1713
- "$ref": "#/components/schemas/salesforceOpportunityStage"
1714
- }
1715
- }
1716
- }
1717
- }
1718
- }
1719
- },
1720
- "security": [
1721
- {
1722
- "Implicit": [
1723
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1724
- ]
1725
- }
1726
- ]
1727
- }
1728
- },
1729
- "/v1.0/salesforce/refresh": {
1730
- "post": {
1731
- "tags": [
1732
- "Salesforce"
1733
- ],
1734
- "summary": "Batch-refresh the cached Salesforce state on every linked Snøkam tender.",
1735
- "operationId": "RefreshAllSalesforceLinks",
1736
- "responses": {
1737
- "200": {
1738
- "description": "Payload of SalesforceRefreshResult",
1739
- "content": {
1740
- "application/json": {
1741
- "schema": {
1742
- "$ref": "#/components/schemas/salesforceRefreshResult"
1743
- }
1744
- }
1745
- }
1746
- }
1747
- },
1748
- "security": [
1749
- {
1750
- "Implicit": [
1751
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1752
- ]
1753
- }
1754
- ]
1755
- }
1756
- },
1757
- "/v1.0/tenders/{id}/salesforce/stage": {
1758
- "post": {
1759
- "tags": [
1760
- "Salesforce"
1761
- ],
1762
- "summary": "Move the linked SF Opportunity to a new stage and refresh the cache.",
1763
- "operationId": "UpdateTenderSalesforceStage",
1764
- "parameters": [
1765
- {
1766
- "name": "id",
1767
- "in": "path",
1768
- "required": true,
1769
- "schema": {
1770
- "type": "string"
1771
- }
1772
- }
1773
- ],
1774
- "requestBody": {
1775
- "description": "The SF stage masterLabel/apiName to switch to.",
1776
- "content": {
1777
- "application/json": {
1778
- "schema": {
1779
- "$ref": "#/components/schemas/updateSalesforceStageRequest"
1780
- }
1781
- }
1782
- },
1783
- "required": true
1784
- },
1785
- "responses": {
1786
- "200": {
1787
- "description": "Payload of Tender",
1788
- "content": {
1789
- "application/json": {
1790
- "schema": {
1791
- "$ref": "#/components/schemas/tender"
1792
- }
1793
- }
1794
- }
1795
- },
1796
- "400": {
1797
- "description": "Tender has no Salesforce link, or stageName is missing."
1798
- },
1799
- "404": {
1800
- "description": "No description"
1801
- }
1802
- },
1803
- "security": [
1804
- {
1805
- "Implicit": [
1806
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1807
- ]
1808
- }
1809
- ]
1810
- }
1811
- },
1812
- "/v1.0/salesforce/opportunities/{sfId}/import": {
1813
- "post": {
1814
- "tags": [
1815
- "Salesforce"
1816
- ],
1817
- "summary": "Create a Snøkam tender stub from an existing Salesforce Opportunity.",
1818
- "operationId": "ImportSalesforceOpportunity",
1819
- "parameters": [
1820
- {
1821
- "name": "sfId",
1822
- "in": "path",
1823
- "required": true,
1824
- "schema": {
1825
- "type": "string"
1826
- },
1827
- "x-ms-summary": "Salesforce Opportunity Id."
1828
- }
1829
- ],
1830
- "responses": {
1831
- "200": {
1832
- "description": "Payload of Tender",
1833
- "content": {
1834
- "application/json": {
1835
- "schema": {
1836
- "$ref": "#/components/schemas/tender"
1837
- }
1838
- }
1839
- }
1840
- },
1841
- "404": {
1842
- "description": "No description"
1843
- },
1844
- "409": {
1845
- "description": "A tender is already linked to this Opportunity."
1846
- }
1847
- },
1848
- "security": [
1849
- {
1850
- "Implicit": [
1851
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1852
- ]
1853
- }
1854
- ]
1855
- }
1856
- },
1857
- "/v1.0/tenders/{id}/salesforce": {
1858
- "post": {
1859
- "tags": [
1860
- "Salesforce"
1861
- ],
1862
- "summary": "Create a Salesforce Opportunity from a Snøkam tender and cache the link.",
1863
- "operationId": "PromoteTenderToSalesforce",
1864
- "parameters": [
1865
- {
1866
- "name": "id",
1867
- "in": "path",
1868
- "required": true,
1869
- "schema": {
1870
- "type": "string"
1871
- }
1872
- }
1873
- ],
1874
- "responses": {
1875
- "200": {
1876
- "description": "Payload of Tender",
1877
- "content": {
1878
- "application/json": {
1879
- "schema": {
1880
- "$ref": "#/components/schemas/tender"
1881
- }
1882
- }
1883
- }
1884
- },
1885
- "404": {
1886
- "description": "No description"
1887
- },
1888
- "409": {
1889
- "description": "Tender is already linked to a Salesforce Opportunity."
1890
- }
1891
- },
1892
- "security": [
1893
- {
1894
- "Implicit": [
1895
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1896
- ]
1897
- }
1898
- ]
1899
- }
1900
- },
1901
- "/v1.0/tenders/{id}/salesforce/refresh": {
1902
- "post": {
1903
- "tags": [
1904
- "Salesforce"
1905
- ],
1906
- "summary": "Re-sync cached Salesforce Opportunity state (stage / closed / won) onto the tender.",
1907
- "operationId": "RefreshTenderSalesforceLink",
1908
- "parameters": [
1909
- {
1910
- "name": "id",
1911
- "in": "path",
1912
- "required": true,
1913
- "schema": {
1914
- "type": "string"
1915
- }
1916
- }
1917
- ],
1918
- "responses": {
1919
- "200": {
1920
- "description": "Payload of Tender",
1921
- "content": {
1922
- "application/json": {
1923
- "schema": {
1924
- "$ref": "#/components/schemas/tender"
1925
- }
1926
- }
1927
- }
1928
- },
1929
- "404": {
1930
- "description": "No description"
1931
- }
1932
- },
1933
- "security": [
1934
- {
1935
- "Implicit": [
1936
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1937
- ]
1938
- }
1939
- ]
1940
- }
1941
- },
1942
- "/v1.0/tenders": {
1943
- "get": {
1944
- "tags": [
1945
- "Tenders"
1946
- ],
1947
- "summary": "List all tenders",
1948
- "operationId": "ListTenders",
1949
- "responses": {
1950
- "200": {
1951
- "description": "Payload of Array of Tender",
1952
- "content": {
1953
- "application/json": {
1954
- "schema": {
1955
- "type": "array",
1956
- "items": {
1957
- "$ref": "#/components/schemas/tender"
1958
- }
1959
- }
1960
- }
1961
- }
1962
- }
1963
- },
1964
- "security": [
1965
- {
1966
- "Implicit": [
1967
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
1968
- ]
1969
- }
1970
- ]
1971
- },
1972
- "post": {
1973
- "tags": [
1974
- "Tenders"
1975
- ],
1976
- "summary": "Create a new tender",
1977
- "operationId": "CreateTender",
1978
- "requestBody": {
1979
- "content": {
1980
- "application/json": {
1981
- "schema": {
1982
- "$ref": "#/components/schemas/tender"
1983
- }
1984
- }
1985
- },
1986
- "required": true
1987
- },
1988
- "responses": {
1989
- "201": {
1990
- "description": "Payload of Tender",
1991
- "content": {
1992
- "application/json": {
1993
- "schema": {
1994
- "$ref": "#/components/schemas/tender"
1995
- }
1996
- }
1997
- }
1998
- }
1999
- },
2000
- "security": [
2001
- {
2002
- "Implicit": [
2003
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2004
- ]
2005
- }
2006
- ]
2007
- }
2008
- },
2009
- "/v1.0/tenders/{id}": {
2010
- "get": {
2011
- "tags": [
2012
- "Tenders"
2013
- ],
2014
- "summary": "Get a tender by its URL slug (or internal id for admin use).",
2015
- "operationId": "GetTender",
2016
- "parameters": [
2017
- {
2018
- "name": "id",
2019
- "in": "path",
2020
- "description": "URL slug (canonical) or the internal guid id (admin/legacy).",
2021
- "required": true,
2022
- "schema": {
2023
- "type": "string"
2024
- }
2025
- }
2026
- ],
2027
- "responses": {
2028
- "200": {
2029
- "description": "Payload of Tender",
2030
- "content": {
2031
- "application/json": {
2032
- "schema": {
2033
- "$ref": "#/components/schemas/tender"
2034
- }
2035
- }
2036
- }
2037
- },
2038
- "404": {
2039
- "description": "No description"
2040
- }
2041
- },
2042
- "security": [
2043
- {
2044
- "Implicit": [
2045
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2046
- ]
2047
- }
2048
- ]
2049
- },
2050
- "put": {
2051
- "tags": [
2052
- "Tenders"
2053
- ],
2054
- "summary": "Update a tender",
2055
- "operationId": "UpdateTender",
2056
- "parameters": [
2057
- {
2058
- "name": "id",
2059
- "in": "path",
2060
- "required": true,
2061
- "schema": {
2062
- "type": "string"
2063
- }
2064
- }
2065
- ],
2066
- "requestBody": {
2067
- "content": {
2068
- "application/json": {
2069
- "schema": {
2070
- "$ref": "#/components/schemas/tender"
2071
- }
2072
- }
2073
- },
2074
- "required": true
2075
- },
2076
- "responses": {
2077
- "200": {
2078
- "description": "Payload of Tender",
2079
- "content": {
2080
- "application/json": {
2081
- "schema": {
2082
- "$ref": "#/components/schemas/tender"
2083
- }
2084
- }
2085
- }
2086
- },
2087
- "404": {
2088
- "description": "No description"
2089
- }
2090
- },
2091
- "security": [
2092
- {
2093
- "Implicit": [
2094
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2095
- ]
2096
- }
2097
- ]
2098
- },
2099
- "delete": {
2100
- "tags": [
2101
- "Tenders"
2102
- ],
2103
- "summary": "Delete a tender",
2104
- "operationId": "DeleteTender",
2105
- "parameters": [
2106
- {
2107
- "name": "id",
2108
- "in": "path",
2109
- "required": true,
2110
- "schema": {
2111
- "type": "string"
2112
- }
2113
- }
2114
- ],
2115
- "responses": {
2116
- "204": {
2117
- "description": "No description"
2118
- },
2119
- "404": {
2120
- "description": "No description"
2121
- }
2122
- },
2123
- "security": [
2124
- {
2125
- "Implicit": [
2126
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2127
- ]
2128
- }
2129
- ]
2130
- }
2131
- },
2132
- "/v1.0/tenders/backfill-slugs": {
2133
- "post": {
2134
- "tags": [
2135
- "Tenders"
2136
- ],
2137
- "summary": "Assign a slug to every tender that doesn't have one yet. Idempotent — safe to re-run.",
2138
- "operationId": "BackfillTenderSlugs",
2139
- "responses": {
2140
- "200": {
2141
- "description": "Payload of BackfillSlugsResult",
2142
- "content": {
2143
- "application/json": {
2144
- "schema": {
2145
- "$ref": "#/components/schemas/backfillSlugsResult"
2146
- }
2147
- }
2148
- }
2149
- }
2150
- },
2151
- "security": [
2152
- {
2153
- "Implicit": [
2154
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2155
- ]
2156
- }
2157
- ]
2158
- }
2159
- },
2160
- "/v1.0/tenders/{id}/reingest": {
2161
- "post": {
2162
- "tags": [
2163
- "Tenders"
2164
- ],
2165
- "summary": "Re-run the ingestion pipeline on an existing tender, re-parsing documents and refreshing AI match / summary / classification.",
2166
- "operationId": "ReingestTender",
2167
- "parameters": [
2168
- {
2169
- "name": "id",
2170
- "in": "path",
2171
- "required": true,
2172
- "schema": {
2173
- "type": "string"
2174
- }
2175
- }
2176
- ],
2177
- "responses": {
2178
- "200": {
2179
- "description": "Payload of AgentJob",
2180
- "content": {
2181
- "application/json": {
2182
- "schema": {
2183
- "$ref": "#/components/schemas/agentJob"
2184
- }
2185
- }
2186
- }
2187
- },
2188
- "404": {
2189
- "description": "No description"
2190
- }
2191
- },
2192
- "security": [
2193
- {
2194
- "Implicit": [
2195
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2196
- ]
2197
- }
2198
- ]
2199
- }
2200
- },
2201
- "/v1.0/tenders/{id}/jobs/{jobId}/snapshot": {
2202
- "get": {
2203
- "tags": [
2204
- "Tenders"
2205
- ],
2206
- "summary": "Return the tender as it looked right after a given agent job ran (time-travel view).",
2207
- "operationId": "GetTenderJobSnapshot",
2208
- "parameters": [
2209
- {
2210
- "name": "id",
2211
- "in": "path",
2212
- "required": true,
2213
- "schema": {
2214
- "type": "string"
2215
- }
2216
- },
2217
- {
2218
- "name": "jobId",
2219
- "in": "path",
2220
- "required": true,
2221
- "schema": {
2222
- "type": "string"
2223
- }
2224
- }
2225
- ],
2226
- "responses": {
2227
- "200": {
2228
- "description": "Payload of Tender",
2229
- "content": {
2230
- "application/json": {
2231
- "schema": {
2232
- "$ref": "#/components/schemas/tender"
2233
- }
2234
- }
2235
- }
2236
- },
2237
- "404": {
2238
- "description": "No description"
2239
- }
2240
- },
2241
- "security": [
2242
- {
2243
- "Implicit": [
2244
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2245
- ]
2246
- }
2247
- ]
2248
- }
2249
- },
2250
- "/v1.0/tenders/{id}/cv-proposal": {
2251
- "put": {
2252
- "tags": [
2253
- "Tenders"
2254
- ],
2255
- "summary": "Set or replace the Flowcase proposal + tailored-CV mapping attached to a tender.",
2256
- "operationId": "SetTenderCvProposal",
2257
- "parameters": [
2258
- {
2259
- "name": "id",
2260
- "in": "path",
2261
- "required": true,
2262
- "schema": {
2263
- "type": "string"
2264
- }
2265
- }
2266
- ],
2267
- "requestBody": {
2268
- "content": {
2269
- "application/json": {
2270
- "schema": {
2271
- "$ref": "#/components/schemas/tenderCvProposal"
2272
- }
2273
- }
2274
- },
2275
- "required": true
2276
- },
2277
- "responses": {
2278
- "200": {
2279
- "description": "Payload of Tender",
2280
- "content": {
2281
- "application/json": {
2282
- "schema": {
2283
- "$ref": "#/components/schemas/tender"
2284
- }
2285
- }
2286
- }
2287
- },
2288
- "404": {
2289
- "description": "No description"
2290
- }
2291
- },
2292
- "security": [
2293
- {
2294
- "Implicit": [
2295
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2296
- ]
2297
- }
2298
- ]
2299
- }
2300
- },
2301
- "/v1.0/tenders/{id}/cv-proposal/variants": {
2302
- "post": {
2303
- "tags": [
2304
- "Tenders"
2305
- ],
2306
- "summary": "Upsert a single tailored-CV variant on a tender's proposal (per consultant).",
2307
- "operationId": "UpsertTenderCvVariant",
2308
- "parameters": [
2309
- {
2310
- "name": "id",
2311
- "in": "path",
2312
- "required": true,
2313
- "schema": {
2314
- "type": "string"
2315
- }
2316
- }
2317
- ],
2318
- "requestBody": {
2319
- "content": {
2320
- "application/json": {
2321
- "schema": {
2322
- "$ref": "#/components/schemas/tenderCvVariant"
2323
- }
2324
- }
2325
- },
2326
- "required": true
2327
- },
2328
- "responses": {
2329
- "200": {
2330
- "description": "Payload of Tender",
2331
- "content": {
2332
- "application/json": {
2333
- "schema": {
2334
- "$ref": "#/components/schemas/tender"
2335
- }
2336
- }
2337
- }
2338
- },
2339
- "404": {
2340
- "description": "No description"
2341
- }
2342
- },
2343
- "security": [
2344
- {
2345
- "Implicit": [
2346
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2347
- ]
2348
- }
2349
- ]
2350
- }
2351
- },
2352
- "/v1.0/tenders/{id}/cv-proposal/variants/{email}": {
2353
- "delete": {
2354
- "tags": [
2355
- "Tenders"
2356
- ],
2357
- "summary": "Remove a tailored-CV variant from a tender's proposal by consultant email.",
2358
- "operationId": "RemoveTenderCvVariant",
2359
- "parameters": [
2360
- {
2361
- "name": "id",
2362
- "in": "path",
2363
- "required": true,
2364
- "schema": {
2365
- "type": "string"
2366
- }
2367
- },
2368
- {
2369
- "name": "email",
2370
- "in": "path",
2371
- "required": true,
2372
- "schema": {
2373
- "type": "string"
2374
- }
2375
- }
2376
- ],
2377
- "responses": {
2378
- "200": {
2379
- "description": "Payload of Tender",
2380
- "content": {
2381
- "application/json": {
2382
- "schema": {
2383
- "$ref": "#/components/schemas/tender"
2384
- }
2385
- }
2386
- }
2387
- },
2388
- "404": {
2389
- "description": "No description"
2390
- }
2391
- },
2392
- "security": [
2393
- {
2394
- "Implicit": [
2395
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2396
- ]
2397
- }
2398
- ]
2399
- }
2400
- },
2401
- "/v1.0/tenders/{id}/consultants": {
2402
- "post": {
2403
- "tags": [
2404
- "Tenders"
2405
- ],
2406
- "summary": "Assign a consultant to a tender. Idempotent: assigning the same email twice refreshes Name/Note but does not create duplicates.",
2407
- "operationId": "AssignConsultant",
2408
- "parameters": [
2409
- {
2410
- "name": "id",
2411
- "in": "path",
2412
- "required": true,
2413
- "schema": {
2414
- "type": "string"
2415
- }
2416
- }
2417
- ],
2418
- "requestBody": {
2419
- "content": {
2420
- "application/json": {
2421
- "schema": {
2422
- "$ref": "#/components/schemas/assignedConsultant"
2423
- }
2424
- }
2425
- },
2426
- "required": true
2427
- },
2428
- "responses": {
2429
- "200": {
2430
- "description": "Payload of Tender",
2431
- "content": {
2432
- "application/json": {
2433
- "schema": {
2434
- "$ref": "#/components/schemas/tender"
2435
- }
2436
- }
2437
- }
2438
- },
2439
- "404": {
2440
- "description": "No description"
2441
- }
2442
- },
2443
- "security": [
2444
- {
2445
- "Implicit": [
2446
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2447
- ]
2448
- }
2449
- ]
2450
- }
2451
- },
2452
- "/v1.0/tenders/{id}/slack-messages": {
2453
- "post": {
2454
- "tags": [
2455
- "Tenders"
2456
- ],
2457
- "summary": "Queue a Slack message for a tender (Service Bus → notifications-function).",
2458
- "operationId": "SendTenderSlackMessage",
2459
- "parameters": [
2460
- {
2461
- "name": "id",
2462
- "in": "path",
2463
- "required": true,
2464
- "schema": {
2465
- "type": "string"
2466
- }
2467
- }
2468
- ],
2469
- "requestBody": {
2470
- "content": {
2471
- "application/json": {
2472
- "schema": {
2473
- "$ref": "#/components/schemas/sendTenderSlackMessageRequest"
2474
- }
2475
- }
2476
- },
2477
- "required": true
2478
- },
2479
- "responses": {
2480
- "204": {
2481
- "description": "No description"
2482
- },
2483
- "400": {
2484
- "description": "No description"
2485
- },
2486
- "404": {
2487
- "description": "No description"
2488
- }
2489
- },
2490
- "security": [
2491
- {
2492
- "Implicit": [
2493
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2494
- ]
2495
- }
2496
- ]
2497
- }
2498
- },
2499
- "/v1.0/tenders/{id}/consultants/{email}": {
2500
- "delete": {
2501
- "tags": [
2502
- "Tenders"
2503
- ],
2504
- "summary": "Remove a consultant assignment from a tender. No-op if the email isn't assigned.",
2505
- "operationId": "UnassignConsultant",
2506
- "parameters": [
2507
- {
2508
- "name": "id",
2509
- "in": "path",
2510
- "required": true,
2511
- "schema": {
2512
- "type": "string"
2513
- }
2514
- },
2515
- {
2516
- "name": "email",
2517
- "in": "path",
2518
- "required": true,
2519
- "schema": {
2520
- "type": "string"
2521
- }
2522
- }
2523
- ],
2524
- "responses": {
2525
- "200": {
2526
- "description": "Payload of Tender",
2527
- "content": {
2528
- "application/json": {
2529
- "schema": {
2530
- "$ref": "#/components/schemas/tender"
2531
- }
2532
- }
2533
- }
2534
- },
2535
- "404": {
2536
- "description": "No description"
2537
- }
2538
- },
2539
- "security": [
2540
- {
2541
- "Implicit": [
2542
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2543
- ]
2544
- }
2545
- ]
2546
- }
2547
- },
2548
- "/v1.0/tenders/{id}/jobs": {
2549
- "get": {
2550
- "tags": [
2551
- "Tenders"
2552
- ],
2553
- "summary": "Recent agent jobs (ingestion, CV matching, …) for a tender — newest first.",
2554
- "operationId": "ListTenderJobs",
2555
- "parameters": [
2556
- {
2557
- "name": "id",
2558
- "in": "path",
2559
- "required": true,
2560
- "schema": {
2561
- "type": "string"
2562
- }
2563
- },
2564
- {
2565
- "name": "limit",
2566
- "in": "query",
2567
- "schema": {
2568
- "type": "integer",
2569
- "format": "int32"
2570
- },
2571
- "x-ms-summary": "Max rows (default 10, capped at 100)."
2572
- }
2573
- ],
2574
- "responses": {
2575
- "200": {
2576
- "description": "Payload of Array of AgentJob",
2577
- "content": {
2578
- "application/json": {
2579
- "schema": {
2580
- "type": "array",
2581
- "items": {
2582
- "$ref": "#/components/schemas/agentJob"
2583
- }
2584
- }
2585
- }
2586
- }
2587
- }
2588
- },
2589
- "security": [
2590
- {
2591
- "Implicit": [
2592
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2593
- ]
2594
- }
2595
- ]
2596
- }
2597
- },
2598
- "/v1.0/admin/tenders": {
2599
- "delete": {
2600
- "tags": [
2601
- "Admin"
2602
- ],
2603
- "summary": "Delete all tenders",
2604
- "operationId": "DeleteAllTenders",
2605
- "responses": {
2606
- "200": {
2607
- "description": "Payload of Object",
2608
- "content": {
2609
- "application/json": {
2610
- "schema": {
2611
- "type": "object"
2612
- }
2613
- }
2614
- }
2615
- }
2616
- }
2617
- }
2618
- },
2619
- "/v1.0/admin/reprocess-matches": {
2620
- "post": {
2621
- "tags": [
2622
- "Admin"
2623
- ],
2624
- "summary": "Trigger CV matching on all tenders",
2625
- "operationId": "ReprocessMatches",
2626
- "parameters": [
2627
- {
2628
- "name": "unmatchedOnly",
2629
- "in": "query",
2630
- "description": "If true, only re-match tenders with no existing consultant matches",
2631
- "schema": {
2632
- "type": "boolean"
2633
- }
2634
- }
2635
- ],
2636
- "responses": {
2637
- "200": {
2638
- "description": "Payload of Object",
2639
- "content": {
2640
- "application/json": {
2641
- "schema": {
2642
- "type": "object"
2643
- }
2644
- }
2645
- }
2646
- }
2647
- },
2648
- "security": [
2649
- {
2650
- "Implicit": [
2651
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2652
- ]
2653
- }
2654
- ]
2655
- }
2656
- },
2657
- "/v1.0/tenders/export.csv": {
2658
- "get": {
2659
- "tags": [
2660
- "Tenders"
2661
- ],
2662
- "summary": "Export tenders matching the given filters as RFC 4180 CSV",
2663
- "operationId": "ExportTendersCsv",
2664
- "parameters": [
2665
- {
2666
- "name": "stage",
2667
- "in": "query",
2668
- "description": "Filter by status.stage (e.g. discovery, qualification)",
2669
- "schema": {
2670
- "type": "string"
2671
- }
2672
- },
2673
- {
2674
- "name": "state",
2675
- "in": "query",
2676
- "description": "Filter by status.state (e.g. active, irrelevant, ingestion_failed)",
2677
- "schema": {
2678
- "type": "string"
2679
- }
2680
- },
2681
- {
2682
- "name": "fromDate",
2683
- "in": "query",
2684
- "description": "Only include tenders with foundAt >= fromDate (ISO 8601)",
2685
- "schema": {
2686
- "type": "string",
2687
- "format": "date-time"
2688
- }
2689
- },
2690
- {
2691
- "name": "toDate",
2692
- "in": "query",
2693
- "description": "Only include tenders with foundAt <= toDate (ISO 8601)",
2694
- "schema": {
2695
- "type": "string",
2696
- "format": "date-time"
2697
- }
2698
- }
2699
- ],
2700
- "responses": {
2701
- "200": {
2702
- "description": "Payload of String",
2703
- "content": {
2704
- "text/csv": {
2705
- "schema": {
2706
- "type": "string"
2707
- }
2708
- }
2709
- },
2710
- "x-ms-summary": "CSV file with one tender per row"
2711
- }
2712
- },
2713
- "security": [
2714
- {
2715
- "Implicit": [
2716
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2717
- ]
2718
- }
2719
- ]
2720
- }
2721
- },
2722
- "/v1.0/tenders/stream": {
2723
- "get": {
2724
- "tags": [
2725
- "Tenders"
2726
- ],
2727
- "summary": "Server-sent-events stream of tender.created / tender.updated / tender.deleted events",
2728
- "operationId": "StreamTenderEvents",
2729
- "responses": {},
2730
- "security": [
2731
- {
2732
- "Implicit": [
2733
- "api://d7f15838-af74-4048-88b3-503089de0064/.default"
2734
- ]
2735
- }
2736
- ]
2737
- }
2738
- }
2739
- },
2740
- "components": {
2741
- "schemas": {
2742
- "ingestionAttachment": {
2743
- "type": "object",
2744
- "properties": {
2745
- "name": {
2746
- "type": "string",
2747
- "nullable": true
2748
- },
2749
- "contentType": {
2750
- "type": "string",
2751
- "nullable": true
2752
- },
2753
- "blobPath": {
2754
- "type": "string",
2755
- "nullable": true
2756
- },
2757
- "sizeBytes": {
2758
- "type": "integer",
2759
- "format": "int64",
2760
- "nullable": true
2761
- }
2762
- }
2763
- },
2764
- "ingestionRequest": {
2765
- "type": "object"
2766
- }
2767
- },
2768
- "securitySchemes": {
2769
- "Implicit": {
2770
- "type": "oauth2",
2771
- "flows": {
2772
- "implicit": {
2773
- "authorizationUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/authorize",
2774
- "tokenUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
2775
- "refreshUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
2776
- "scopes": {
2777
- "api://d7f15838-af74-4048-88b3-503089de0064/.default": "Default function scope"
2778
- }
2779
- }
2780
- }
2781
- }
2782
- }
2783
- }
2784
- }