@snokam/mcp-api 1.4.0 → 1.4.1

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.
Files changed (41) hide show
  1. package/dist/auth.d.ts +0 -15
  2. package/dist/auth.js +15 -59
  3. package/dist/builtin-tools.d.ts +109 -0
  4. package/dist/builtin-tools.js +200 -0
  5. package/dist/execute-call.d.ts +5 -0
  6. package/dist/execute-call.js +45 -0
  7. package/dist/index.d.ts +0 -7
  8. package/dist/index.js +7 -312
  9. package/dist/openapi-loader.d.ts +1 -14
  10. package/dist/openapi-loader.js +8 -49
  11. package/dist/state.d.ts +13 -0
  12. package/dist/state.js +54 -0
  13. package/dist/tool-schema.d.ts +2 -0
  14. package/dist/tool-schema.js +42 -0
  15. package/package.json +6 -6
  16. package/specs/production/accounting.json +2533 -1937
  17. package/specs/production/blog.json +1608 -1
  18. package/specs/production/broker.json +52 -24
  19. package/specs/production/chatgpt.json +299 -17
  20. package/specs/production/employees.json +3116 -278
  21. package/specs/production/events.json +437 -51
  22. package/specs/production/notifications.json +441 -11
  23. package/specs/production/office.json +818 -836
  24. package/specs/production/recruitment.json +3635 -1
  25. package/specs/production/sales.json +5250 -417
  26. package/specs/production/sanity.json +28588 -15500
  27. package/specs/production/sync.json +116 -20
  28. package/specs/production/webshop.json +38 -18
  29. package/specs/test/accounting.json +2533 -1937
  30. package/specs/test/blog.json +1608 -1
  31. package/specs/test/broker.json +52 -24
  32. package/specs/test/chatgpt.json +299 -17
  33. package/specs/test/employees.json +3116 -278
  34. package/specs/test/events.json +437 -51
  35. package/specs/test/notifications.json +441 -11
  36. package/specs/test/office.json +818 -836
  37. package/specs/test/recruitment.json +3635 -1
  38. package/specs/test/sales.json +5250 -417
  39. package/specs/test/sanity.json +28588 -15500
  40. package/specs/test/sync.json +116 -20
  41. package/specs/test/webshop.json +38 -18
@@ -11,6 +11,223 @@
11
11
  }
12
12
  ],
13
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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
223
+ ]
224
+ },
225
+ {
226
+ "ApiKey": []
227
+ }
228
+ ]
229
+ }
230
+ },
14
231
  "/v1.0/protected/push/register": {
15
232
  "post": {
16
233
  "tags": [
@@ -39,8 +256,11 @@
39
256
  "security": [
40
257
  {
41
258
  "Implicit": [
42
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
259
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
43
260
  ]
261
+ },
262
+ {
263
+ "ApiKey": []
44
264
  }
45
265
  ]
46
266
  }
@@ -62,8 +282,11 @@
62
282
  "security": [
63
283
  {
64
284
  "Implicit": [
65
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
285
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
66
286
  ]
287
+ },
288
+ {
289
+ "ApiKey": []
67
290
  }
68
291
  ]
69
292
  }
@@ -96,8 +319,11 @@
96
319
  "security": [
97
320
  {
98
321
  "Implicit": [
99
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
322
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
100
323
  ]
324
+ },
325
+ {
326
+ "ApiKey": []
101
327
  }
102
328
  ]
103
329
  }
@@ -130,8 +356,11 @@
130
356
  "security": [
131
357
  {
132
358
  "Implicit": [
133
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
359
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
134
360
  ]
361
+ },
362
+ {
363
+ "ApiKey": []
135
364
  }
136
365
  ]
137
366
  }
@@ -164,8 +393,11 @@
164
393
  "security": [
165
394
  {
166
395
  "Implicit": [
167
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
396
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
168
397
  ]
398
+ },
399
+ {
400
+ "ApiKey": []
169
401
  }
170
402
  ]
171
403
  }
@@ -198,8 +430,11 @@
198
430
  "security": [
199
431
  {
200
432
  "Implicit": [
201
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
433
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
202
434
  ]
435
+ },
436
+ {
437
+ "ApiKey": []
203
438
  }
204
439
  ]
205
440
  }
@@ -232,8 +467,119 @@
232
467
  "security": [
233
468
  {
234
469
  "Implicit": [
235
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
470
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.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://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default"
236
579
  ]
580
+ },
581
+ {
582
+ "ApiKey": []
237
583
  }
238
584
  ]
239
585
  }
@@ -261,6 +607,71 @@
261
607
  }
262
608
  }
263
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
+ },
264
675
  "sendEmailAttachmentRequest": {
265
676
  "type": "object",
266
677
  "properties": {
@@ -389,6 +800,20 @@
389
800
  "type": "string"
390
801
  }
391
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
+ }
392
817
  }
393
818
  },
394
819
  "securitySchemes": {
@@ -396,14 +821,19 @@
396
821
  "type": "oauth2",
397
822
  "flows": {
398
823
  "implicit": {
399
- "authorizationUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/authorize",
400
- "tokenUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
401
- "refreshUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
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",
402
827
  "scopes": {
403
- "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default": "Default function scope"
828
+ "api://bb21a8d0-366b-4a95-aa59-dbbf708322d1/.default": "Default function scope"
404
829
  }
405
830
  }
406
831
  }
832
+ },
833
+ "ApiKey": {
834
+ "type": "http",
835
+ "scheme": "bearer",
836
+ "bearerFormat": "JWT"
407
837
  }
408
838
  }
409
839
  }