@snokam/mcp-api 2.29.0 → 2.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snokam/mcp-api",
3
- "version": "2.29.0",
3
+ "version": "2.31.0",
4
4
  "description": "MCP server exposing Snokam backend APIs as tools for Claude Code and other MCP clients",
5
5
  "type": "module",
6
6
  "bin": {
@@ -33,7 +33,156 @@
33
33
  }
34
34
  }
35
35
  }
36
+ },
37
+ "/v1.0/protected/{slugOrId}/article-invitation-preview": {
38
+ "get": {
39
+ "tags": [
40
+ "Articles"
41
+ ],
42
+ "summary": "Preview invitation recipients",
43
+ "description": "Returns the list of subscriber emails for the given tag slugs. Does not send any email.",
44
+ "operationId": "GetArticleInvitationPreview",
45
+ "parameters": [
46
+ {
47
+ "name": "slugOrId",
48
+ "in": "path",
49
+ "required": true,
50
+ "schema": {
51
+ "type": "string"
52
+ },
53
+ "x-ms-summary": "The slug or id of the article"
54
+ },
55
+ {
56
+ "name": "tagSlugs",
57
+ "in": "query",
58
+ "required": true,
59
+ "schema": {
60
+ "type": "string"
61
+ },
62
+ "x-ms-summary": "Comma-separated tag slugs to preview subscribers for"
63
+ }
64
+ ],
65
+ "responses": {
66
+ "200": {
67
+ "description": "List of subscriber emails",
68
+ "content": {
69
+ "application/json": {
70
+ "schema": {
71
+ "$ref": "#/components/schemas/articleInvitationPreviewResponse"
72
+ }
73
+ }
74
+ },
75
+ "x-ms-summary": "Success"
76
+ },
77
+ "400": {
78
+ "description": "At least one tag slug is required",
79
+ "x-ms-summary": "Bad Request"
80
+ },
81
+ "401": {
82
+ "description": "No description",
83
+ "x-ms-summary": "Unauthorized"
84
+ }
85
+ },
86
+ "security": [
87
+ {
88
+ "Implicit": [
89
+ "api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
90
+ ]
91
+ }
92
+ ]
93
+ }
94
+ },
95
+ "/v1.0/protected/{slugOrId}/send-article-invitations": {
96
+ "post": {
97
+ "tags": [
98
+ "Articles"
99
+ ],
100
+ "summary": "Send article invitation emails",
101
+ "description": "Sends invitation emails to subscribers of the given tags and marks invitationSent as true on the article. Only the article author may call this.",
102
+ "operationId": "SendArticleInvitations",
103
+ "parameters": [
104
+ {
105
+ "name": "slugOrId",
106
+ "in": "path",
107
+ "required": true,
108
+ "schema": {
109
+ "type": "string"
110
+ },
111
+ "x-ms-summary": "The slug or id of the article"
112
+ },
113
+ {
114
+ "name": "tagSlugs",
115
+ "in": "query",
116
+ "required": true,
117
+ "schema": {
118
+ "type": "string"
119
+ },
120
+ "x-ms-summary": "Comma-separated tag slugs to send invitations to"
121
+ }
122
+ ],
123
+ "responses": {
124
+ "200": {
125
+ "description": "Invitations sent successfully",
126
+ "x-ms-summary": "Success"
127
+ },
128
+ "400": {
129
+ "description": "Payload of Object",
130
+ "content": {
131
+ "application/json": {
132
+ "schema": {
133
+ "type": "object"
134
+ }
135
+ }
136
+ },
137
+ "x-ms-summary": "Bad Request"
138
+ },
139
+ "401": {
140
+ "description": "No description",
141
+ "x-ms-summary": "Unauthorized"
142
+ },
143
+ "404": {
144
+ "description": "Article not found",
145
+ "x-ms-summary": "Not Found"
146
+ }
147
+ },
148
+ "security": [
149
+ {
150
+ "Implicit": [
151
+ "api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
152
+ ]
153
+ }
154
+ ]
155
+ }
36
156
  }
37
157
  },
38
- "components": {}
158
+ "components": {
159
+ "schemas": {
160
+ "articleInvitationPreviewResponse": {
161
+ "type": "object",
162
+ "properties": {
163
+ "emails": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "securitySchemes": {
173
+ "Implicit": {
174
+ "type": "oauth2",
175
+ "flows": {
176
+ "implicit": {
177
+ "authorizationUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/authorize",
178
+ "tokenUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
179
+ "refreshUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
180
+ "scopes": {
181
+ "api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default": "Default function scope"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
39
188
  }
@@ -34,6 +34,46 @@
34
34
  ]
35
35
  }
36
36
  },
37
+ "/v1.0/protected/newsletter/debug": {
38
+ "post": {
39
+ "tags": [
40
+ "Notifications"
41
+ ],
42
+ "summary": "Preview newsletters by email",
43
+ "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.",
44
+ "operationId": "DebugNewsletterEmail",
45
+ "parameters": [
46
+ {
47
+ "name": "to",
48
+ "in": "query",
49
+ "schema": {
50
+ "type": "string"
51
+ },
52
+ "x-ms-summary": "Recipient email (defaults to utvikling@snokam.no)"
53
+ }
54
+ ],
55
+ "responses": {
56
+ "200": {
57
+ "description": "Payload of Object",
58
+ "content": {
59
+ "application/json": {
60
+ "schema": {
61
+ "type": "object"
62
+ }
63
+ }
64
+ },
65
+ "x-ms-summary": "Preview sent"
66
+ }
67
+ },
68
+ "security": [
69
+ {
70
+ "Implicit": [
71
+ "api://46c59afb-0021-439b-a56c-6e29d39f2c7a/.default"
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ },
37
77
  "/v1.0/protected/push/register": {
38
78
  "post": {
39
79
  "tags": [
@@ -33,7 +33,156 @@
33
33
  }
34
34
  }
35
35
  }
36
+ },
37
+ "/v1.0/protected/{slugOrId}/article-invitation-preview": {
38
+ "get": {
39
+ "tags": [
40
+ "Articles"
41
+ ],
42
+ "summary": "Preview invitation recipients",
43
+ "description": "Returns the list of subscriber emails for the given tag slugs. Does not send any email.",
44
+ "operationId": "GetArticleInvitationPreview",
45
+ "parameters": [
46
+ {
47
+ "name": "slugOrId",
48
+ "in": "path",
49
+ "required": true,
50
+ "schema": {
51
+ "type": "string"
52
+ },
53
+ "x-ms-summary": "The slug or id of the article"
54
+ },
55
+ {
56
+ "name": "tagSlugs",
57
+ "in": "query",
58
+ "required": true,
59
+ "schema": {
60
+ "type": "string"
61
+ },
62
+ "x-ms-summary": "Comma-separated tag slugs to preview subscribers for"
63
+ }
64
+ ],
65
+ "responses": {
66
+ "200": {
67
+ "description": "List of subscriber emails",
68
+ "content": {
69
+ "application/json": {
70
+ "schema": {
71
+ "$ref": "#/components/schemas/articleInvitationPreviewResponse"
72
+ }
73
+ }
74
+ },
75
+ "x-ms-summary": "Success"
76
+ },
77
+ "400": {
78
+ "description": "At least one tag slug is required",
79
+ "x-ms-summary": "Bad Request"
80
+ },
81
+ "401": {
82
+ "description": "No description",
83
+ "x-ms-summary": "Unauthorized"
84
+ }
85
+ },
86
+ "security": [
87
+ {
88
+ "Implicit": [
89
+ "api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
90
+ ]
91
+ }
92
+ ]
93
+ }
94
+ },
95
+ "/v1.0/protected/{slugOrId}/send-article-invitations": {
96
+ "post": {
97
+ "tags": [
98
+ "Articles"
99
+ ],
100
+ "summary": "Send article invitation emails",
101
+ "description": "Sends invitation emails to subscribers of the given tags and marks invitationSent as true on the article. Only the article author may call this.",
102
+ "operationId": "SendArticleInvitations",
103
+ "parameters": [
104
+ {
105
+ "name": "slugOrId",
106
+ "in": "path",
107
+ "required": true,
108
+ "schema": {
109
+ "type": "string"
110
+ },
111
+ "x-ms-summary": "The slug or id of the article"
112
+ },
113
+ {
114
+ "name": "tagSlugs",
115
+ "in": "query",
116
+ "required": true,
117
+ "schema": {
118
+ "type": "string"
119
+ },
120
+ "x-ms-summary": "Comma-separated tag slugs to send invitations to"
121
+ }
122
+ ],
123
+ "responses": {
124
+ "200": {
125
+ "description": "Invitations sent successfully",
126
+ "x-ms-summary": "Success"
127
+ },
128
+ "400": {
129
+ "description": "Payload of Object",
130
+ "content": {
131
+ "application/json": {
132
+ "schema": {
133
+ "type": "object"
134
+ }
135
+ }
136
+ },
137
+ "x-ms-summary": "Bad Request"
138
+ },
139
+ "401": {
140
+ "description": "No description",
141
+ "x-ms-summary": "Unauthorized"
142
+ },
143
+ "404": {
144
+ "description": "Article not found",
145
+ "x-ms-summary": "Not Found"
146
+ }
147
+ },
148
+ "security": [
149
+ {
150
+ "Implicit": [
151
+ "api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
152
+ ]
153
+ }
154
+ ]
155
+ }
36
156
  }
37
157
  },
38
- "components": {}
158
+ "components": {
159
+ "schemas": {
160
+ "articleInvitationPreviewResponse": {
161
+ "type": "object",
162
+ "properties": {
163
+ "emails": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "string"
167
+ }
168
+ }
169
+ }
170
+ }
171
+ },
172
+ "securitySchemes": {
173
+ "Implicit": {
174
+ "type": "oauth2",
175
+ "flows": {
176
+ "implicit": {
177
+ "authorizationUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/authorize",
178
+ "tokenUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
179
+ "refreshUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
180
+ "scopes": {
181
+ "api://c375ccd2-e69d-4262-808d-1a197df95d34/.default": "Default function scope"
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
39
188
  }
@@ -34,6 +34,46 @@
34
34
  ]
35
35
  }
36
36
  },
37
+ "/v1.0/protected/newsletter/debug": {
38
+ "post": {
39
+ "tags": [
40
+ "Notifications"
41
+ ],
42
+ "summary": "Preview newsletters by email",
43
+ "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.",
44
+ "operationId": "DebugNewsletterEmail",
45
+ "parameters": [
46
+ {
47
+ "name": "to",
48
+ "in": "query",
49
+ "schema": {
50
+ "type": "string"
51
+ },
52
+ "x-ms-summary": "Recipient email (defaults to utvikling@snokam.no)"
53
+ }
54
+ ],
55
+ "responses": {
56
+ "200": {
57
+ "description": "Payload of Object",
58
+ "content": {
59
+ "application/json": {
60
+ "schema": {
61
+ "type": "object"
62
+ }
63
+ }
64
+ },
65
+ "x-ms-summary": "Preview sent"
66
+ }
67
+ },
68
+ "security": [
69
+ {
70
+ "Implicit": [
71
+ "api://246713d5-cd48-4a00-84dd-7fc7ae290a62/.default"
72
+ ]
73
+ }
74
+ ]
75
+ }
76
+ },
37
77
  "/v1.0/protected/push/register": {
38
78
  "post": {
39
79
  "tags": [