@snokam/mcp-api 0.180.2 → 0.180.4

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.
@@ -0,0 +1,840 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Notifications API",
5
+ "description": "Notification hub service",
6
+ "version": "v1.0.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://notifications.api.test.snokam.no"
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/v1.0/protected/health/{provider}": {
15
+ "get": {
16
+ "tags": [
17
+ "Health"
18
+ ],
19
+ "summary": "Checks an integration's connectivity",
20
+ "operationId": "NotificationsIntegrationHealth",
21
+ "parameters": [
22
+ {
23
+ "name": "provider",
24
+ "in": "path",
25
+ "required": true,
26
+ "schema": {
27
+ "type": "string"
28
+ }
29
+ }
30
+ ],
31
+ "responses": {
32
+ "200": {
33
+ "description": "Health result",
34
+ "content": {
35
+ "application/json": {
36
+ "schema": {
37
+ "$ref": "#/components/schemas/integrationHealthResult"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "security": [
44
+ {
45
+ "Implicit": [
46
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
47
+ ]
48
+ },
49
+ {
50
+ "ApiKey": []
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ "/v1.0/protected/newsletter/trigger": {
56
+ "post": {
57
+ "tags": [
58
+ "Notifications"
59
+ ],
60
+ "summary": "Trigger newsletter summarizer",
61
+ "description": "Manually runs the weekly knowledge-summarizer cron (iterates active newsletterSeries, posts Olaf's summary to the configured Slack channel per series, and emails subscribers for series with sendEmails=true).",
62
+ "operationId": "TriggerKnowledgeSummarizer",
63
+ "responses": {
64
+ "200": {
65
+ "description": "Summarizer run completed",
66
+ "x-ms-summary": "Success"
67
+ }
68
+ },
69
+ "security": [
70
+ {
71
+ "Implicit": [
72
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
73
+ ]
74
+ },
75
+ {
76
+ "ApiKey": []
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ "/v1.0/protected/newsletter/debug": {
82
+ "post": {
83
+ "tags": [
84
+ "Notifications"
85
+ ],
86
+ "summary": "Preview newsletters by email",
87
+ "description": "Generates Olaf's summary for each active newsletterSeries and emails the rendered body (same composition the real cron uses) to the caller-supplied address. Skips Sanity persistence, Slack posts, and the 7-day dedup check — subscribers are never touched. Defaults to utvikling@snokam.no.",
88
+ "operationId": "DebugNewsletterEmail",
89
+ "parameters": [
90
+ {
91
+ "name": "to",
92
+ "in": "query",
93
+ "schema": {
94
+ "type": "string"
95
+ },
96
+ "x-ms-summary": "Recipient email (defaults to utvikling@snokam.no)"
97
+ }
98
+ ],
99
+ "responses": {
100
+ "200": {
101
+ "description": "Payload of Object",
102
+ "content": {
103
+ "application/json": {
104
+ "schema": {
105
+ "type": "object"
106
+ }
107
+ }
108
+ },
109
+ "x-ms-summary": "Preview sent"
110
+ }
111
+ },
112
+ "security": [
113
+ {
114
+ "Implicit": [
115
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
116
+ ]
117
+ },
118
+ {
119
+ "ApiKey": []
120
+ }
121
+ ]
122
+ }
123
+ },
124
+ "/v1.0/protected/alerts/azure": {
125
+ "post": {
126
+ "tags": [
127
+ "Alerts"
128
+ ],
129
+ "summary": "Receive Azure Monitor alert",
130
+ "description": "Action Group webhook receiver for the Azure Monitor common alert schema. Posts a formatted summary to the channel given by ?channel= (defaults to #feed-errors).",
131
+ "operationId": "ReceiveAzureAlert",
132
+ "parameters": [
133
+ {
134
+ "name": "channel",
135
+ "in": "query",
136
+ "schema": {
137
+ "type": "string"
138
+ },
139
+ "x-ms-summary": "Slack channel including the leading # (defaults to #feed-errors)"
140
+ }
141
+ ],
142
+ "responses": {
143
+ "200": {
144
+ "description": "Alert relayed",
145
+ "x-ms-summary": "Success"
146
+ }
147
+ },
148
+ "security": [
149
+ {
150
+ "Implicit": [
151
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
152
+ ]
153
+ },
154
+ {
155
+ "ApiKey": []
156
+ }
157
+ ]
158
+ }
159
+ },
160
+ "/v1.0/protected/routing": {
161
+ "get": {
162
+ "tags": [
163
+ "Notifications"
164
+ ],
165
+ "summary": "Get notification routing",
166
+ "description": "Returns the tenant's notification routing plus the known keys and active chat provider.",
167
+ "operationId": "GetNotificationRouting",
168
+ "responses": {
169
+ "200": {
170
+ "description": "Payload of NotificationRoutingResponse",
171
+ "content": {
172
+ "application/json": {
173
+ "schema": {
174
+ "$ref": "#/components/schemas/notificationRoutingResponse"
175
+ }
176
+ }
177
+ },
178
+ "x-ms-summary": "Success"
179
+ }
180
+ },
181
+ "security": [
182
+ {
183
+ "Implicit": [
184
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
185
+ ]
186
+ },
187
+ {
188
+ "ApiKey": []
189
+ }
190
+ ]
191
+ },
192
+ "put": {
193
+ "tags": [
194
+ "Notifications"
195
+ ],
196
+ "summary": "Update notification routing",
197
+ "description": "Upserts the tenant's notification routing (routes + default destination).",
198
+ "operationId": "UpdateNotificationRouting",
199
+ "requestBody": {
200
+ "content": {
201
+ "application/json": {
202
+ "schema": {
203
+ "$ref": "#/components/schemas/updateNotificationRoutingRequest"
204
+ }
205
+ }
206
+ },
207
+ "required": true
208
+ },
209
+ "responses": {
210
+ "204": {
211
+ "description": "No description",
212
+ "x-ms-summary": "Saved"
213
+ },
214
+ "400": {
215
+ "description": "No description",
216
+ "x-ms-summary": "Invalid body"
217
+ }
218
+ },
219
+ "security": [
220
+ {
221
+ "Implicit": [
222
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
223
+ ]
224
+ },
225
+ {
226
+ "ApiKey": []
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ "/v1.0/protected/push/register": {
232
+ "post": {
233
+ "tags": [
234
+ "Push"
235
+ ],
236
+ "summary": "Register device for push notifications",
237
+ "description": "Creates or updates a device installation in Azure Notification Hub",
238
+ "operationId": "RegisterDevice",
239
+ "requestBody": {
240
+ "description": "Device registration data",
241
+ "content": {
242
+ "application/json": {
243
+ "schema": {
244
+ "$ref": "#/components/schemas/deviceInstallation"
245
+ }
246
+ }
247
+ },
248
+ "required": true
249
+ },
250
+ "responses": {
251
+ "200": {
252
+ "description": "Device registered successfully",
253
+ "x-ms-summary": "Success"
254
+ }
255
+ },
256
+ "security": [
257
+ {
258
+ "Implicit": [
259
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
260
+ ]
261
+ },
262
+ {
263
+ "ApiKey": []
264
+ }
265
+ ]
266
+ }
267
+ },
268
+ "/v1.0/protected/push/register/{installationId}": {
269
+ "delete": {
270
+ "tags": [
271
+ "Push"
272
+ ],
273
+ "summary": "Unregister device from push notifications",
274
+ "description": "Removes a device installation from Azure Notification Hub",
275
+ "operationId": "UnregisterDevice",
276
+ "responses": {
277
+ "200": {
278
+ "description": "Device unregistered successfully",
279
+ "x-ms-summary": "Success"
280
+ }
281
+ },
282
+ "security": [
283
+ {
284
+ "Implicit": [
285
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
286
+ ]
287
+ },
288
+ {
289
+ "ApiKey": []
290
+ }
291
+ ]
292
+ }
293
+ },
294
+ "/v1.0/protected/slack": {
295
+ "post": {
296
+ "tags": [
297
+ "Notifications"
298
+ ],
299
+ "summary": "Send Slack notification",
300
+ "description": "Queues a Slack message for delivery",
301
+ "operationId": "SendSlackNotification",
302
+ "requestBody": {
303
+ "description": "Slack notification to send",
304
+ "content": {
305
+ "application/json": {
306
+ "schema": {
307
+ "$ref": "#/components/schemas/sendSlackRequest"
308
+ }
309
+ }
310
+ },
311
+ "required": true
312
+ },
313
+ "responses": {
314
+ "200": {
315
+ "description": "Notification queued successfully",
316
+ "x-ms-summary": "Success"
317
+ }
318
+ },
319
+ "security": [
320
+ {
321
+ "Implicit": [
322
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
323
+ ]
324
+ },
325
+ {
326
+ "ApiKey": []
327
+ }
328
+ ]
329
+ }
330
+ },
331
+ "/v1.0/protected/sms": {
332
+ "post": {
333
+ "tags": [
334
+ "Notifications"
335
+ ],
336
+ "summary": "Send SMS notification",
337
+ "description": "Queues an SMS message for delivery",
338
+ "operationId": "SendSmsNotification",
339
+ "requestBody": {
340
+ "description": "SMS notification to send",
341
+ "content": {
342
+ "application/json": {
343
+ "schema": {
344
+ "$ref": "#/components/schemas/sendSmsRequest"
345
+ }
346
+ }
347
+ },
348
+ "required": true
349
+ },
350
+ "responses": {
351
+ "200": {
352
+ "description": "Notification queued successfully",
353
+ "x-ms-summary": "Success"
354
+ }
355
+ },
356
+ "security": [
357
+ {
358
+ "Implicit": [
359
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
360
+ ]
361
+ },
362
+ {
363
+ "ApiKey": []
364
+ }
365
+ ]
366
+ }
367
+ },
368
+ "/v1.0/protected/email": {
369
+ "post": {
370
+ "tags": [
371
+ "Notifications"
372
+ ],
373
+ "summary": "Send email notification",
374
+ "description": "Queues an email for delivery",
375
+ "operationId": "SendEmailNotification",
376
+ "requestBody": {
377
+ "description": "Email notification to send",
378
+ "content": {
379
+ "application/json": {
380
+ "schema": {
381
+ "$ref": "#/components/schemas/sendEmailRequest"
382
+ }
383
+ }
384
+ },
385
+ "required": true
386
+ },
387
+ "responses": {
388
+ "200": {
389
+ "description": "Notification queued successfully",
390
+ "x-ms-summary": "Success"
391
+ }
392
+ },
393
+ "security": [
394
+ {
395
+ "Implicit": [
396
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
397
+ ]
398
+ },
399
+ {
400
+ "ApiKey": []
401
+ }
402
+ ]
403
+ }
404
+ },
405
+ "/v1.0/protected/push": {
406
+ "post": {
407
+ "tags": [
408
+ "Notifications"
409
+ ],
410
+ "summary": "Send push notification",
411
+ "description": "Queues a push notification for delivery",
412
+ "operationId": "SendPushNotification",
413
+ "requestBody": {
414
+ "description": "Push notification to send",
415
+ "content": {
416
+ "application/json": {
417
+ "schema": {
418
+ "$ref": "#/components/schemas/sendPushRequest"
419
+ }
420
+ }
421
+ },
422
+ "required": true
423
+ },
424
+ "responses": {
425
+ "200": {
426
+ "description": "Notification queued successfully",
427
+ "x-ms-summary": "Success"
428
+ }
429
+ },
430
+ "security": [
431
+ {
432
+ "Implicit": [
433
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
434
+ ]
435
+ },
436
+ {
437
+ "ApiKey": []
438
+ }
439
+ ]
440
+ }
441
+ },
442
+ "/v1.0/protected/notify": {
443
+ "post": {
444
+ "tags": [
445
+ "Notifications"
446
+ ],
447
+ "summary": "Send notification",
448
+ "description": "Queues a notification for delivery to one or more channels (Slack, SMS, email)",
449
+ "operationId": "SendNotification",
450
+ "requestBody": {
451
+ "description": "Notification with one or more channels",
452
+ "content": {
453
+ "application/json": {
454
+ "schema": {
455
+ "$ref": "#/components/schemas/sendNotificationRequest"
456
+ }
457
+ }
458
+ },
459
+ "required": true
460
+ },
461
+ "responses": {
462
+ "200": {
463
+ "description": "Notification queued successfully",
464
+ "x-ms-summary": "Success"
465
+ }
466
+ },
467
+ "security": [
468
+ {
469
+ "Implicit": [
470
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
471
+ ]
472
+ },
473
+ {
474
+ "ApiKey": []
475
+ }
476
+ ]
477
+ }
478
+ },
479
+ "/v1.0/protected/sprint-notification/trigger": {
480
+ "post": {
481
+ "tags": [
482
+ "Notifications"
483
+ ],
484
+ "summary": "Trigger weekly sprint summary",
485
+ "description": "Manually triggers the weekly sprint summary notification to Slack #general",
486
+ "operationId": "TriggerSprintNotification",
487
+ "responses": {
488
+ "200": {
489
+ "description": "Summary sent successfully",
490
+ "x-ms-summary": "Success"
491
+ }
492
+ },
493
+ "security": [
494
+ {
495
+ "Implicit": [
496
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
497
+ ]
498
+ },
499
+ {
500
+ "ApiKey": []
501
+ }
502
+ ]
503
+ }
504
+ },
505
+ "/v1.0/protected/sprint-notification/debug": {
506
+ "get": {
507
+ "tags": [
508
+ "Notifications"
509
+ ],
510
+ "summary": "Debug friday summary",
511
+ "description": "Returns the full friday summary including ChatGPT output for debugging",
512
+ "operationId": "DebugSprintSummary",
513
+ "responses": {
514
+ "200": {
515
+ "description": "Payload of Object",
516
+ "content": {
517
+ "application/json": {
518
+ "schema": {
519
+ "type": "object"
520
+ }
521
+ }
522
+ },
523
+ "x-ms-summary": "Debug data"
524
+ }
525
+ },
526
+ "security": [
527
+ {
528
+ "Implicit": [
529
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
530
+ ]
531
+ }
532
+ ]
533
+ }
534
+ },
535
+ "/v1.0/protected/time-logging/reminder/trigger": {
536
+ "post": {
537
+ "tags": [
538
+ "Notifications"
539
+ ],
540
+ "summary": "Trigger the time-logging SMS reminder",
541
+ "description": "Manually runs the personal time-logging SMS reminder for the calling tenant: texts active employees who have not yet locked their hours for the current month. Ignores the last-day-of-month gate.",
542
+ "operationId": "TriggerTimeLoggingReminder",
543
+ "responses": {
544
+ "200": {
545
+ "description": "Reminder run completed",
546
+ "x-ms-summary": "Success"
547
+ }
548
+ },
549
+ "security": [
550
+ {
551
+ "Implicit": [
552
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
553
+ ]
554
+ },
555
+ {
556
+ "ApiKey": []
557
+ }
558
+ ]
559
+ }
560
+ },
561
+ "/v1.0/protected/time-logging/shame/trigger": {
562
+ "post": {
563
+ "tags": [
564
+ "Notifications"
565
+ ],
566
+ "summary": "Trigger the monthly time-logging shame",
567
+ "description": "Manually runs the monthly time-logging shame for the calling tenant: reads employees without all hours approved for last month from accounting/PowerOffice and posts the public reminder to #general.",
568
+ "operationId": "TriggerTimeLoggingShame",
569
+ "responses": {
570
+ "200": {
571
+ "description": "Shame run completed",
572
+ "x-ms-summary": "Success"
573
+ }
574
+ },
575
+ "security": [
576
+ {
577
+ "Implicit": [
578
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
579
+ ]
580
+ },
581
+ {
582
+ "ApiKey": []
583
+ }
584
+ ]
585
+ }
586
+ }
587
+ },
588
+ "components": {
589
+ "schemas": {
590
+ "deviceInstallation": {
591
+ "type": "object",
592
+ "properties": {
593
+ "installationId": {
594
+ "type": "string"
595
+ },
596
+ "platform": {
597
+ "type": "string"
598
+ },
599
+ "pushChannel": {
600
+ "type": "string"
601
+ },
602
+ "tags": {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "string"
606
+ }
607
+ }
608
+ }
609
+ },
610
+ "integrationHealthResult": {
611
+ "type": "object",
612
+ "properties": {
613
+ "key": {
614
+ "type": "string"
615
+ },
616
+ "status": {
617
+ "type": "string"
618
+ },
619
+ "message": {
620
+ "type": "string"
621
+ }
622
+ }
623
+ },
624
+ "notificationKnownKeyDto": {
625
+ "type": "object",
626
+ "properties": {
627
+ "key": {
628
+ "type": "string"
629
+ },
630
+ "title": {
631
+ "type": "string"
632
+ },
633
+ "group": {
634
+ "type": "string"
635
+ }
636
+ }
637
+ },
638
+ "notificationRouteDto": {
639
+ "type": "object",
640
+ "properties": {
641
+ "key": {
642
+ "type": "string"
643
+ },
644
+ "destination": {
645
+ "type": "string"
646
+ },
647
+ "enabled": {
648
+ "type": "boolean"
649
+ }
650
+ }
651
+ },
652
+ "notificationRoutingResponse": {
653
+ "type": "object",
654
+ "properties": {
655
+ "routes": {
656
+ "type": "array",
657
+ "items": {
658
+ "$ref": "#/components/schemas/notificationRouteDto"
659
+ }
660
+ },
661
+ "defaultDestination": {
662
+ "type": "string"
663
+ },
664
+ "knownKeys": {
665
+ "type": "array",
666
+ "items": {
667
+ "$ref": "#/components/schemas/notificationKnownKeyDto"
668
+ }
669
+ },
670
+ "activeChatProvider": {
671
+ "type": "string"
672
+ }
673
+ }
674
+ },
675
+ "sendEmailAttachmentRequest": {
676
+ "type": "object",
677
+ "properties": {
678
+ "content": {
679
+ "type": "string"
680
+ },
681
+ "filename": {
682
+ "type": "string"
683
+ },
684
+ "contentType": {
685
+ "type": "string"
686
+ }
687
+ }
688
+ },
689
+ "sendEmailRequest": {
690
+ "type": "object",
691
+ "properties": {
692
+ "receiver": {
693
+ "type": "string"
694
+ },
695
+ "receivers": {
696
+ "type": "array",
697
+ "items": {
698
+ "type": "string"
699
+ }
700
+ },
701
+ "title": {
702
+ "type": "string"
703
+ },
704
+ "body": {
705
+ "type": "string"
706
+ },
707
+ "htmlBody": {
708
+ "type": "string"
709
+ },
710
+ "sender": {
711
+ "type": "string"
712
+ },
713
+ "senderName": {
714
+ "type": "string"
715
+ },
716
+ "replyTo": {
717
+ "type": "string"
718
+ },
719
+ "attachments": {
720
+ "type": "array",
721
+ "items": {
722
+ "$ref": "#/components/schemas/sendEmailAttachmentRequest"
723
+ }
724
+ }
725
+ }
726
+ },
727
+ "sendNotificationRequest": {
728
+ "type": "object",
729
+ "properties": {
730
+ "slack": {
731
+ "$ref": "#/components/schemas/sendSlackRequest"
732
+ },
733
+ "sms": {
734
+ "$ref": "#/components/schemas/sendSmsRequest"
735
+ },
736
+ "email": {
737
+ "$ref": "#/components/schemas/sendEmailRequest"
738
+ },
739
+ "push": {
740
+ "$ref": "#/components/schemas/sendPushRequest"
741
+ }
742
+ }
743
+ },
744
+ "sendPushRequest": {
745
+ "type": "object",
746
+ "properties": {
747
+ "title": {
748
+ "type": "string"
749
+ },
750
+ "body": {
751
+ "type": "string"
752
+ },
753
+ "email": {
754
+ "type": "string"
755
+ },
756
+ "tags": {
757
+ "type": "array",
758
+ "items": {
759
+ "type": "string"
760
+ }
761
+ },
762
+ "data": {
763
+ "type": "object",
764
+ "additionalProperties": {
765
+ "type": "string"
766
+ }
767
+ }
768
+ }
769
+ },
770
+ "sendSlackRequest": {
771
+ "type": "object",
772
+ "properties": {
773
+ "channelId": {
774
+ "type": "string"
775
+ },
776
+ "message": {
777
+ "type": "string"
778
+ },
779
+ "blocksJson": {
780
+ "type": "string"
781
+ },
782
+ "attachmentsJson": {
783
+ "type": "string"
784
+ },
785
+ "iconEmoji": {
786
+ "type": "string"
787
+ },
788
+ "username": {
789
+ "type": "string"
790
+ }
791
+ }
792
+ },
793
+ "sendSmsRequest": {
794
+ "type": "object",
795
+ "properties": {
796
+ "phoneNumber": {
797
+ "type": "string"
798
+ },
799
+ "message": {
800
+ "type": "string"
801
+ }
802
+ }
803
+ },
804
+ "updateNotificationRoutingRequest": {
805
+ "type": "object",
806
+ "properties": {
807
+ "routes": {
808
+ "type": "array",
809
+ "items": {
810
+ "$ref": "#/components/schemas/notificationRouteDto"
811
+ }
812
+ },
813
+ "defaultDestination": {
814
+ "type": "string"
815
+ }
816
+ }
817
+ }
818
+ },
819
+ "securitySchemes": {
820
+ "Implicit": {
821
+ "type": "oauth2",
822
+ "flows": {
823
+ "implicit": {
824
+ "authorizationUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize",
825
+ "tokenUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
826
+ "refreshUrl": "https://login.microsoftonline.com/organizations/oauth2/v2.0/token",
827
+ "scopes": {
828
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default": "Default function scope"
829
+ }
830
+ }
831
+ }
832
+ },
833
+ "ApiKey": {
834
+ "type": "http",
835
+ "scheme": "bearer",
836
+ "bearerFormat": "JWT"
837
+ }
838
+ }
839
+ }
840
+ }