@snokam/mcp-api 0.5.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.
- package/dist/auth.d.ts +16 -0
- package/dist/auth.js +72 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +271 -0
- package/dist/openapi-loader.d.ts +46 -0
- package/dist/openapi-loader.js +174 -0
- package/package.json +35 -0
- package/specs/production/accounting.json +1131 -0
- package/specs/production/broker.json +109 -0
- package/specs/production/calculators.json +1523 -0
- package/specs/production/chatgpt.json +1655 -0
- package/specs/production/crypto.json +1998 -0
- package/specs/production/employees.json +1867 -0
- package/specs/production/events.json +2322 -0
- package/specs/production/notifications.json +270 -0
- package/specs/production/office.json +1984 -0
- package/specs/production/power-office.json +2383 -0
- package/specs/production/sanity.json +29509 -0
- package/specs/production/sync.json +181 -0
- package/specs/production/webshop.json +631 -0
- package/specs/test/accounting.json +1131 -0
- package/specs/test/broker.json +109 -0
- package/specs/test/calculators.json +1523 -0
- package/specs/test/chatgpt.json +1655 -0
- package/specs/test/crypto.json +1998 -0
- package/specs/test/employees.json +1867 -0
- package/specs/test/events.json +2322 -0
- package/specs/test/notifications.json +270 -0
- package/specs/test/power-office.json +2383 -0
- package/specs/test/sanity.json +29509 -0
- package/specs/test/sync.json +181 -0
- package/specs/test/webshop.json +631 -0
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.0.1",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "Notifications Function",
|
|
5
|
+
"description": "Cron jobs that checks e.g annual wheel and Doffin and posts to Slack",
|
|
6
|
+
"version": "v1.0.0"
|
|
7
|
+
},
|
|
8
|
+
"servers": [
|
|
9
|
+
{
|
|
10
|
+
"url": "https://notifications.api.snokam.no"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"paths": {
|
|
14
|
+
"/v1.0/protected/slack": {
|
|
15
|
+
"post": {
|
|
16
|
+
"tags": [
|
|
17
|
+
"Notifications"
|
|
18
|
+
],
|
|
19
|
+
"summary": "Send Slack notification",
|
|
20
|
+
"description": "Queues a Slack message for delivery",
|
|
21
|
+
"operationId": "SendSlackNotification",
|
|
22
|
+
"requestBody": {
|
|
23
|
+
"description": "Slack notification to send",
|
|
24
|
+
"content": {
|
|
25
|
+
"application/json": {
|
|
26
|
+
"schema": {
|
|
27
|
+
"$ref": "#/components/schemas/sendSlackRequest"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": true
|
|
32
|
+
},
|
|
33
|
+
"responses": {
|
|
34
|
+
"200": {
|
|
35
|
+
"description": "Notification queued successfully",
|
|
36
|
+
"x-ms-summary": "Success"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"security": [
|
|
40
|
+
{
|
|
41
|
+
"Implicit": [
|
|
42
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"/v1.0/protected/sms": {
|
|
49
|
+
"post": {
|
|
50
|
+
"tags": [
|
|
51
|
+
"Notifications"
|
|
52
|
+
],
|
|
53
|
+
"summary": "Send SMS notification",
|
|
54
|
+
"description": "Queues an SMS message for delivery",
|
|
55
|
+
"operationId": "SendSmsNotification",
|
|
56
|
+
"requestBody": {
|
|
57
|
+
"description": "SMS notification to send",
|
|
58
|
+
"content": {
|
|
59
|
+
"application/json": {
|
|
60
|
+
"schema": {
|
|
61
|
+
"$ref": "#/components/schemas/sendSmsRequest"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
"required": true
|
|
66
|
+
},
|
|
67
|
+
"responses": {
|
|
68
|
+
"200": {
|
|
69
|
+
"description": "Notification queued successfully",
|
|
70
|
+
"x-ms-summary": "Success"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"security": [
|
|
74
|
+
{
|
|
75
|
+
"Implicit": [
|
|
76
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"/v1.0/protected/email": {
|
|
83
|
+
"post": {
|
|
84
|
+
"tags": [
|
|
85
|
+
"Notifications"
|
|
86
|
+
],
|
|
87
|
+
"summary": "Send email notification",
|
|
88
|
+
"description": "Queues an email for delivery",
|
|
89
|
+
"operationId": "SendEmailNotification",
|
|
90
|
+
"requestBody": {
|
|
91
|
+
"description": "Email notification to send",
|
|
92
|
+
"content": {
|
|
93
|
+
"application/json": {
|
|
94
|
+
"schema": {
|
|
95
|
+
"$ref": "#/components/schemas/sendEmailRequest"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": true
|
|
100
|
+
},
|
|
101
|
+
"responses": {
|
|
102
|
+
"200": {
|
|
103
|
+
"description": "Notification queued successfully",
|
|
104
|
+
"x-ms-summary": "Success"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"security": [
|
|
108
|
+
{
|
|
109
|
+
"Implicit": [
|
|
110
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"/v1.0/protected/notify": {
|
|
117
|
+
"post": {
|
|
118
|
+
"tags": [
|
|
119
|
+
"Notifications"
|
|
120
|
+
],
|
|
121
|
+
"summary": "Send notification",
|
|
122
|
+
"description": "Queues a notification for delivery to one or more channels (Slack, SMS, email)",
|
|
123
|
+
"operationId": "SendNotification",
|
|
124
|
+
"requestBody": {
|
|
125
|
+
"description": "Notification with one or more channels",
|
|
126
|
+
"content": {
|
|
127
|
+
"application/json": {
|
|
128
|
+
"schema": {
|
|
129
|
+
"$ref": "#/components/schemas/sendNotificationRequest"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": true
|
|
134
|
+
},
|
|
135
|
+
"responses": {
|
|
136
|
+
"200": {
|
|
137
|
+
"description": "Notification queued successfully",
|
|
138
|
+
"x-ms-summary": "Success"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"security": [
|
|
142
|
+
{
|
|
143
|
+
"Implicit": [
|
|
144
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"components": {
|
|
152
|
+
"schemas": {
|
|
153
|
+
"sendEmailAttachmentRequest": {
|
|
154
|
+
"type": "object",
|
|
155
|
+
"properties": {
|
|
156
|
+
"content": {
|
|
157
|
+
"type": "string"
|
|
158
|
+
},
|
|
159
|
+
"filename": {
|
|
160
|
+
"type": "string"
|
|
161
|
+
},
|
|
162
|
+
"contentType": {
|
|
163
|
+
"type": "string"
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
"sendEmailRequest": {
|
|
168
|
+
"type": "object",
|
|
169
|
+
"properties": {
|
|
170
|
+
"receiver": {
|
|
171
|
+
"type": "string"
|
|
172
|
+
},
|
|
173
|
+
"receivers": {
|
|
174
|
+
"type": "array",
|
|
175
|
+
"items": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"title": {
|
|
180
|
+
"type": "string"
|
|
181
|
+
},
|
|
182
|
+
"body": {
|
|
183
|
+
"type": "string"
|
|
184
|
+
},
|
|
185
|
+
"htmlBody": {
|
|
186
|
+
"type": "string"
|
|
187
|
+
},
|
|
188
|
+
"sender": {
|
|
189
|
+
"type": "string"
|
|
190
|
+
},
|
|
191
|
+
"senderName": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"replyTo": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
},
|
|
197
|
+
"attachments": {
|
|
198
|
+
"type": "array",
|
|
199
|
+
"items": {
|
|
200
|
+
"$ref": "#/components/schemas/sendEmailAttachmentRequest"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"sendNotificationRequest": {
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"slack": {
|
|
209
|
+
"$ref": "#/components/schemas/sendSlackRequest"
|
|
210
|
+
},
|
|
211
|
+
"sms": {
|
|
212
|
+
"$ref": "#/components/schemas/sendSmsRequest"
|
|
213
|
+
},
|
|
214
|
+
"email": {
|
|
215
|
+
"$ref": "#/components/schemas/sendEmailRequest"
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
"sendSlackRequest": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"properties": {
|
|
222
|
+
"channelId": {
|
|
223
|
+
"type": "string"
|
|
224
|
+
},
|
|
225
|
+
"message": {
|
|
226
|
+
"type": "string"
|
|
227
|
+
},
|
|
228
|
+
"blocksJson": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
},
|
|
231
|
+
"attachmentsJson": {
|
|
232
|
+
"type": "string"
|
|
233
|
+
},
|
|
234
|
+
"iconEmoji": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
},
|
|
237
|
+
"username": {
|
|
238
|
+
"type": "string"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"sendSmsRequest": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"properties": {
|
|
245
|
+
"phoneNumber": {
|
|
246
|
+
"type": "string"
|
|
247
|
+
},
|
|
248
|
+
"message": {
|
|
249
|
+
"type": "string"
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"securitySchemes": {
|
|
255
|
+
"Implicit": {
|
|
256
|
+
"type": "oauth2",
|
|
257
|
+
"flows": {
|
|
258
|
+
"implicit": {
|
|
259
|
+
"authorizationUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/authorize",
|
|
260
|
+
"tokenUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
|
|
261
|
+
"refreshUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
|
|
262
|
+
"scopes": {
|
|
263
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation": "Default function scope"
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|