@snokam/mcp-api 0.131.3 → 0.132.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.
@@ -34,64 +34,16 @@
34
34
  }
35
35
  }
36
36
  },
37
- "/v1.0/protected/articles": {
38
- "get": {
39
- "tags": [
40
- "Articles"
41
- ],
42
- "summary": "List articles (admin)",
43
- "description": "Returns the full published article list for the editor — live + offline articles when `includeInactive=true`. Public callers should hit sanity-function directly; this endpoint exists so my-page-web can read everything via blog-function without needing sanity-function admin perms.",
44
- "operationId": "GetArticles",
45
- "parameters": [
46
- {
47
- "name": "includeInactive",
48
- "in": "query",
49
- "schema": {
50
- "type": "boolean"
51
- },
52
- "x-ms-summary": "Include `active=false` articles (admin view)"
53
- }
54
- ],
55
- "responses": {
56
- "200": {
57
- "description": "Article list",
58
- "content": {
59
- "application/json": {
60
- "schema": {
61
- "type": "array",
62
- "items": {
63
- "$ref": "#/components/schemas/getArticlesResultInner"
64
- }
65
- }
66
- }
67
- },
68
- "x-ms-summary": "Success"
69
- },
70
- "401": {
71
- "description": "No description",
72
- "x-ms-summary": "Unauthorized"
73
- }
74
- },
75
- "security": [
76
- {
77
- "Implicit": [
78
- "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
79
- ]
80
- },
81
- {
82
- "ApiKey": []
83
- }
84
- ]
85
- },
37
+ "/v1.0/protected/articles/drafts": {
86
38
  "post": {
87
39
  "tags": [
88
40
  "Articles"
89
41
  ],
90
- "summary": "Create a new blog article",
91
- "description": "Creates a new blog article in Sanity. The caller is not automatically added as an author include authors in the body.",
92
- "operationId": "CreateArticle",
42
+ "summary": "Create a new article as a draft",
43
+ "description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
44
+ "operationId": "CreateDraft",
93
45
  "requestBody": {
94
- "description": "The article to create",
46
+ "description": "The article content to save as a draft",
95
47
  "content": {
96
48
  "application/json": {
97
49
  "schema": {
@@ -103,7 +55,7 @@
103
55
  },
104
56
  "responses": {
105
57
  "200": {
106
- "description": "The newly created article",
58
+ "description": "The newly created draft",
107
59
  "content": {
108
60
  "application/json": {
109
61
  "schema": {
@@ -139,9 +91,7 @@
139
91
  "ApiKey": []
140
92
  }
141
93
  ]
142
- }
143
- },
144
- "/v1.0/protected/articles/drafts": {
94
+ },
145
95
  "get": {
146
96
  "tags": [
147
97
  "Articles"
@@ -179,20 +129,33 @@
179
129
  "ApiKey": []
180
130
  }
181
131
  ]
182
- },
183
- "post": {
132
+ }
133
+ },
134
+ "/v1.0/protected/articles/{slugOrId}/draft": {
135
+ "patch": {
184
136
  "tags": [
185
137
  "Articles"
186
138
  ],
187
- "summary": "Create a new article as a draft",
188
- "description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
189
- "operationId": "CreateDraft",
139
+ "summary": "Write an edit to the draft",
140
+ "description": "Patches the draft for the given article. Creates the draft from the published copy first if none exists. Only authors may call this.",
141
+ "operationId": "PatchDraft",
142
+ "parameters": [
143
+ {
144
+ "name": "slugOrId",
145
+ "in": "path",
146
+ "required": true,
147
+ "schema": {
148
+ "type": "string"
149
+ },
150
+ "x-ms-summary": "The slug or id of the article"
151
+ }
152
+ ],
190
153
  "requestBody": {
191
- "description": "The article content to save as a draft",
154
+ "description": "Fields to merge into the draft",
192
155
  "content": {
193
156
  "application/json": {
194
157
  "schema": {
195
- "$ref": "#/components/schemas/sanityCreateArticle"
158
+ "$ref": "#/components/schemas/sanityPatchArticle"
196
159
  }
197
160
  }
198
161
  },
@@ -200,7 +163,7 @@
200
163
  },
201
164
  "responses": {
202
165
  "200": {
203
- "description": "The newly created draft",
166
+ "description": "The updated draft",
204
167
  "content": {
205
168
  "application/json": {
206
169
  "schema": {
@@ -224,6 +187,10 @@
224
187
  "401": {
225
188
  "description": "No description",
226
189
  "x-ms-summary": "Unauthorized"
190
+ },
191
+ "404": {
192
+ "description": "No description",
193
+ "x-ms-summary": "Not Found"
227
194
  }
228
195
  },
229
196
  "security": [
@@ -236,16 +203,14 @@
236
203
  "ApiKey": []
237
204
  }
238
205
  ]
239
- }
240
- },
241
- "/v1.0/protected/articles/{slugOrId}": {
242
- "get": {
206
+ },
207
+ "delete": {
243
208
  "tags": [
244
209
  "Articles"
245
210
  ],
246
- "summary": "Get a single published article (admin)",
247
- "description": "Returns the published article `includeInactive=true` resolves \"Ikke live\" articles by slug too. Mirrors sanity-function's `/v1.0/articles/{slugOrId}` but routed through blog-function so my-page-web doesn't need direct sanity-function permissions.",
248
- "operationId": "GetPublishedArticle",
211
+ "summary": "Delete the draft",
212
+ "description": "Removes the draft without touching the published article. Only authors may call this.",
213
+ "operationId": "DiscardDraft",
249
214
  "parameters": [
250
215
  {
251
216
  "name": "slugOrId",
@@ -253,19 +218,13 @@
253
218
  "required": true,
254
219
  "schema": {
255
220
  "type": "string"
256
- }
257
- },
258
- {
259
- "name": "includeInactive",
260
- "in": "query",
261
- "schema": {
262
- "type": "boolean"
263
- }
221
+ },
222
+ "x-ms-summary": "The slug or id of the article"
264
223
  }
265
224
  ],
266
225
  "responses": {
267
226
  "200": {
268
- "description": "The article",
227
+ "description": "The discarded draft (pre-delete snapshot)",
269
228
  "content": {
270
229
  "application/json": {
271
230
  "schema": {
@@ -280,7 +239,7 @@
280
239
  "x-ms-summary": "Unauthorized"
281
240
  },
282
241
  "404": {
283
- "description": "No description",
242
+ "description": "No draft exists",
284
243
  "x-ms-summary": "Not Found"
285
244
  }
286
245
  },
@@ -294,14 +253,16 @@
294
253
  "ApiKey": []
295
254
  }
296
255
  ]
297
- },
298
- "patch": {
256
+ }
257
+ },
258
+ "/v1.0/protected/articles/{slugOrId}/publish": {
259
+ "post": {
299
260
  "tags": [
300
261
  "Articles"
301
262
  ],
302
- "summary": "Update a blog article",
303
- "description": "Partially updates a blog article. Only the article's authors may call this.",
304
- "operationId": "PatchArticle",
263
+ "summary": "Promote the draft to published",
264
+ "description": "Overwrites the published article with the current draft and removes the draft. Only authors may call this.",
265
+ "operationId": "PublishDraft",
305
266
  "parameters": [
306
267
  {
307
268
  "name": "slugOrId",
@@ -313,20 +274,9 @@
313
274
  "x-ms-summary": "The slug or id of the article"
314
275
  }
315
276
  ],
316
- "requestBody": {
317
- "description": "Partial article fields to update",
318
- "content": {
319
- "application/json": {
320
- "schema": {
321
- "$ref": "#/components/schemas/sanityPatchArticle"
322
- }
323
- }
324
- },
325
- "required": true
326
- },
327
277
  "responses": {
328
278
  "200": {
329
- "description": "The updated article",
279
+ "description": "The newly-published article",
330
280
  "content": {
331
281
  "application/json": {
332
282
  "schema": {
@@ -336,23 +286,12 @@
336
286
  },
337
287
  "x-ms-summary": "Success"
338
288
  },
339
- "400": {
340
- "description": "Payload of Object",
341
- "content": {
342
- "application/json": {
343
- "schema": {
344
- "type": "object"
345
- }
346
- }
347
- },
348
- "x-ms-summary": "Bad Request"
349
- },
350
289
  "401": {
351
290
  "description": "No description",
352
291
  "x-ms-summary": "Unauthorized"
353
292
  },
354
293
  "404": {
355
- "description": "Article not found",
294
+ "description": "No draft exists",
356
295
  "x-ms-summary": "Not Found"
357
296
  }
358
297
  },
@@ -366,14 +305,16 @@
366
305
  "ApiKey": []
367
306
  }
368
307
  ]
369
- },
370
- "delete": {
308
+ }
309
+ },
310
+ "/v1.0/protected/{slugOrId}/article-invitation-preview": {
311
+ "get": {
371
312
  "tags": [
372
313
  "Articles"
373
314
  ],
374
- "summary": "Delete a blog article",
375
- "description": "Deletes a blog article. Only the article's authors may call this.",
376
- "operationId": "DeleteArticle",
315
+ "summary": "Preview invitation recipients",
316
+ "description": "Returns the list of subscriber emails for the given tag slugs. Does not send any email.",
317
+ "operationId": "GetArticleInvitationPreview",
377
318
  "parameters": [
378
319
  {
379
320
  "name": "slugOrId",
@@ -383,27 +324,36 @@
383
324
  "type": "string"
384
325
  },
385
326
  "x-ms-summary": "The slug or id of the article"
327
+ },
328
+ {
329
+ "name": "tagSlugs",
330
+ "in": "query",
331
+ "required": true,
332
+ "schema": {
333
+ "type": "string"
334
+ },
335
+ "x-ms-summary": "Comma-separated tag slugs to preview subscribers for"
386
336
  }
387
337
  ],
388
338
  "responses": {
389
339
  "200": {
390
- "description": "The deleted article",
340
+ "description": "List of subscriber emails",
391
341
  "content": {
392
342
  "application/json": {
393
343
  "schema": {
394
- "$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
344
+ "$ref": "#/components/schemas/articleInvitationPreviewResponse"
395
345
  }
396
346
  }
397
347
  },
398
348
  "x-ms-summary": "Success"
399
349
  },
350
+ "400": {
351
+ "description": "At least one tag slug is required",
352
+ "x-ms-summary": "Bad Request"
353
+ },
400
354
  "401": {
401
355
  "description": "No description",
402
356
  "x-ms-summary": "Unauthorized"
403
- },
404
- "404": {
405
- "description": "Article not found",
406
- "x-ms-summary": "Not Found"
407
357
  }
408
358
  },
409
359
  "security": [
@@ -418,14 +368,14 @@
418
368
  ]
419
369
  }
420
370
  },
421
- "/v1.0/protected/articles/{slugOrId}/draft-status": {
422
- "get": {
371
+ "/v1.0/protected/{slugOrId}/send-article-invitations": {
372
+ "post": {
423
373
  "tags": [
424
374
  "Articles"
425
375
  ],
426
- "summary": "Get article with draft status",
427
- "description": "Returns both the published article and any pending draft so authors can compare states. Only authors may call this.",
428
- "operationId": "GetArticleWithDraft",
376
+ "summary": "Send article invitation emails",
377
+ "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.",
378
+ "operationId": "SendArticleInvitations",
429
379
  "parameters": [
430
380
  {
431
381
  "name": "slugOrId",
@@ -435,26 +385,39 @@
435
385
  "type": "string"
436
386
  },
437
387
  "x-ms-summary": "The slug or id of the article"
388
+ },
389
+ {
390
+ "name": "tagSlugs",
391
+ "in": "query",
392
+ "required": true,
393
+ "schema": {
394
+ "type": "string"
395
+ },
396
+ "x-ms-summary": "Comma-separated tag slugs to send invitations to"
438
397
  }
439
398
  ],
440
399
  "responses": {
441
400
  "200": {
442
- "description": "Snapshot with published + draft sides",
401
+ "description": "Invitations sent successfully",
402
+ "x-ms-summary": "Success"
403
+ },
404
+ "400": {
405
+ "description": "Payload of Object",
443
406
  "content": {
444
407
  "application/json": {
445
408
  "schema": {
446
- "$ref": "#/components/schemas/getArticleWithDraftResult"
409
+ "type": "object"
447
410
  }
448
411
  }
449
412
  },
450
- "x-ms-summary": "Success"
413
+ "x-ms-summary": "Bad Request"
451
414
  },
452
415
  "401": {
453
416
  "description": "No description",
454
417
  "x-ms-summary": "Unauthorized"
455
418
  },
456
419
  "404": {
457
- "description": "No description",
420
+ "description": "Article not found",
458
421
  "x-ms-summary": "Not Found"
459
422
  }
460
423
  },
@@ -470,31 +433,68 @@
470
433
  ]
471
434
  }
472
435
  },
473
- "/v1.0/protected/articles/{slugOrId}/draft": {
474
- "patch": {
436
+ "/v1.0/protected/articles": {
437
+ "get": {
475
438
  "tags": [
476
439
  "Articles"
477
440
  ],
478
- "summary": "Write an edit to the draft",
479
- "description": "Patches the draft for the given article. Creates the draft from the published copy first if none exists. Only authors may call this.",
480
- "operationId": "PatchDraft",
441
+ "summary": "List articles (admin)",
442
+ "description": "Returns the full published article list for the editor live + offline articles when `includeInactive=true`. Public callers should hit sanity-function directly; this endpoint exists so my-page-web can read everything via blog-function without needing sanity-function admin perms.",
443
+ "operationId": "GetArticles",
481
444
  "parameters": [
482
445
  {
483
- "name": "slugOrId",
484
- "in": "path",
485
- "required": true,
446
+ "name": "includeInactive",
447
+ "in": "query",
486
448
  "schema": {
487
- "type": "string"
449
+ "type": "boolean"
488
450
  },
489
- "x-ms-summary": "The slug or id of the article"
451
+ "x-ms-summary": "Include `active=false` articles (admin view)"
490
452
  }
491
453
  ],
454
+ "responses": {
455
+ "200": {
456
+ "description": "Article list",
457
+ "content": {
458
+ "application/json": {
459
+ "schema": {
460
+ "type": "array",
461
+ "items": {
462
+ "$ref": "#/components/schemas/getArticlesResultInner"
463
+ }
464
+ }
465
+ }
466
+ },
467
+ "x-ms-summary": "Success"
468
+ },
469
+ "401": {
470
+ "description": "No description",
471
+ "x-ms-summary": "Unauthorized"
472
+ }
473
+ },
474
+ "security": [
475
+ {
476
+ "Implicit": [
477
+ "api://b2c47b20-df4a-49b5-a7ee-87f3647ab227/.default"
478
+ ]
479
+ },
480
+ {
481
+ "ApiKey": []
482
+ }
483
+ ]
484
+ },
485
+ "post": {
486
+ "tags": [
487
+ "Articles"
488
+ ],
489
+ "summary": "Create a new blog article",
490
+ "description": "Creates a new blog article in Sanity. The caller is not automatically added as an author — include authors in the body.",
491
+ "operationId": "CreateArticle",
492
492
  "requestBody": {
493
- "description": "Fields to merge into the draft",
493
+ "description": "The article to create",
494
494
  "content": {
495
495
  "application/json": {
496
496
  "schema": {
497
- "$ref": "#/components/schemas/sanityPatchArticle"
497
+ "$ref": "#/components/schemas/sanityCreateArticle"
498
498
  }
499
499
  }
500
500
  },
@@ -502,7 +502,7 @@
502
502
  },
503
503
  "responses": {
504
504
  "200": {
505
- "description": "The updated draft",
505
+ "description": "The newly created article",
506
506
  "content": {
507
507
  "application/json": {
508
508
  "schema": {
@@ -526,10 +526,6 @@
526
526
  "401": {
527
527
  "description": "No description",
528
528
  "x-ms-summary": "Unauthorized"
529
- },
530
- "404": {
531
- "description": "No description",
532
- "x-ms-summary": "Not Found"
533
529
  }
534
530
  },
535
531
  "security": [
@@ -542,14 +538,16 @@
542
538
  "ApiKey": []
543
539
  }
544
540
  ]
545
- },
546
- "delete": {
541
+ }
542
+ },
543
+ "/v1.0/protected/articles/{slugOrId}": {
544
+ "get": {
547
545
  "tags": [
548
546
  "Articles"
549
547
  ],
550
- "summary": "Delete the draft",
551
- "description": "Removes the draft without touching the published article. Only authors may call this.",
552
- "operationId": "DiscardDraft",
548
+ "summary": "Get a single published article (admin)",
549
+ "description": "Returns the published article `includeInactive=true` resolves \"Ikke live\" articles by slug too. Mirrors sanity-function's `/v1.0/articles/{slugOrId}` but routed through blog-function so my-page-web doesn't need direct sanity-function permissions.",
550
+ "operationId": "GetPublishedArticle",
553
551
  "parameters": [
554
552
  {
555
553
  "name": "slugOrId",
@@ -557,13 +555,19 @@
557
555
  "required": true,
558
556
  "schema": {
559
557
  "type": "string"
560
- },
561
- "x-ms-summary": "The slug or id of the article"
558
+ }
559
+ },
560
+ {
561
+ "name": "includeInactive",
562
+ "in": "query",
563
+ "schema": {
564
+ "type": "boolean"
565
+ }
562
566
  }
563
567
  ],
564
568
  "responses": {
565
569
  "200": {
566
- "description": "The discarded draft (pre-delete snapshot)",
570
+ "description": "The article",
567
571
  "content": {
568
572
  "application/json": {
569
573
  "schema": {
@@ -578,7 +582,7 @@
578
582
  "x-ms-summary": "Unauthorized"
579
583
  },
580
584
  "404": {
581
- "description": "No draft exists",
585
+ "description": "No description",
582
586
  "x-ms-summary": "Not Found"
583
587
  }
584
588
  },
@@ -592,16 +596,14 @@
592
596
  "ApiKey": []
593
597
  }
594
598
  ]
595
- }
596
- },
597
- "/v1.0/protected/articles/{slugOrId}/publish": {
598
- "post": {
599
+ },
600
+ "patch": {
599
601
  "tags": [
600
602
  "Articles"
601
603
  ],
602
- "summary": "Promote the draft to published",
603
- "description": "Overwrites the published article with the current draft and removes the draft. Only authors may call this.",
604
- "operationId": "PublishDraft",
604
+ "summary": "Update a blog article",
605
+ "description": "Partially updates a blog article. Only the article's authors may call this.",
606
+ "operationId": "PatchArticle",
605
607
  "parameters": [
606
608
  {
607
609
  "name": "slugOrId",
@@ -613,9 +615,20 @@
613
615
  "x-ms-summary": "The slug or id of the article"
614
616
  }
615
617
  ],
618
+ "requestBody": {
619
+ "description": "Partial article fields to update",
620
+ "content": {
621
+ "application/json": {
622
+ "schema": {
623
+ "$ref": "#/components/schemas/sanityPatchArticle"
624
+ }
625
+ }
626
+ },
627
+ "required": true
628
+ },
616
629
  "responses": {
617
630
  "200": {
618
- "description": "The newly-published article",
631
+ "description": "The updated article",
619
632
  "content": {
620
633
  "application/json": {
621
634
  "schema": {
@@ -625,12 +638,23 @@
625
638
  },
626
639
  "x-ms-summary": "Success"
627
640
  },
641
+ "400": {
642
+ "description": "Payload of Object",
643
+ "content": {
644
+ "application/json": {
645
+ "schema": {
646
+ "type": "object"
647
+ }
648
+ }
649
+ },
650
+ "x-ms-summary": "Bad Request"
651
+ },
628
652
  "401": {
629
653
  "description": "No description",
630
654
  "x-ms-summary": "Unauthorized"
631
655
  },
632
656
  "404": {
633
- "description": "No draft exists",
657
+ "description": "Article not found",
634
658
  "x-ms-summary": "Not Found"
635
659
  }
636
660
  },
@@ -644,16 +668,14 @@
644
668
  "ApiKey": []
645
669
  }
646
670
  ]
647
- }
648
- },
649
- "/v1.0/protected/{slugOrId}/article-invitation-preview": {
650
- "get": {
671
+ },
672
+ "delete": {
651
673
  "tags": [
652
674
  "Articles"
653
675
  ],
654
- "summary": "Preview invitation recipients",
655
- "description": "Returns the list of subscriber emails for the given tag slugs. Does not send any email.",
656
- "operationId": "GetArticleInvitationPreview",
676
+ "summary": "Delete a blog article",
677
+ "description": "Deletes a blog article. Only the article's authors may call this.",
678
+ "operationId": "DeleteArticle",
657
679
  "parameters": [
658
680
  {
659
681
  "name": "slugOrId",
@@ -663,36 +685,27 @@
663
685
  "type": "string"
664
686
  },
665
687
  "x-ms-summary": "The slug or id of the article"
666
- },
667
- {
668
- "name": "tagSlugs",
669
- "in": "query",
670
- "required": true,
671
- "schema": {
672
- "type": "string"
673
- },
674
- "x-ms-summary": "Comma-separated tag slugs to preview subscribers for"
675
688
  }
676
689
  ],
677
690
  "responses": {
678
691
  "200": {
679
- "description": "List of subscriber emails",
692
+ "description": "The deleted article",
680
693
  "content": {
681
694
  "application/json": {
682
695
  "schema": {
683
- "$ref": "#/components/schemas/articleInvitationPreviewResponse"
696
+ "$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
684
697
  }
685
698
  }
686
699
  },
687
700
  "x-ms-summary": "Success"
688
701
  },
689
- "400": {
690
- "description": "At least one tag slug is required",
691
- "x-ms-summary": "Bad Request"
692
- },
693
702
  "401": {
694
703
  "description": "No description",
695
704
  "x-ms-summary": "Unauthorized"
705
+ },
706
+ "404": {
707
+ "description": "Article not found",
708
+ "x-ms-summary": "Not Found"
696
709
  }
697
710
  },
698
711
  "security": [
@@ -707,14 +720,14 @@
707
720
  ]
708
721
  }
709
722
  },
710
- "/v1.0/protected/{slugOrId}/send-article-invitations": {
711
- "post": {
723
+ "/v1.0/protected/articles/{slugOrId}/draft-status": {
724
+ "get": {
712
725
  "tags": [
713
726
  "Articles"
714
727
  ],
715
- "summary": "Send article invitation emails",
716
- "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.",
717
- "operationId": "SendArticleInvitations",
728
+ "summary": "Get article with draft status",
729
+ "description": "Returns both the published article and any pending draft so authors can compare states. Only authors may call this.",
730
+ "operationId": "GetArticleWithDraft",
718
731
  "parameters": [
719
732
  {
720
733
  "name": "slugOrId",
@@ -724,39 +737,26 @@
724
737
  "type": "string"
725
738
  },
726
739
  "x-ms-summary": "The slug or id of the article"
727
- },
728
- {
729
- "name": "tagSlugs",
730
- "in": "query",
731
- "required": true,
732
- "schema": {
733
- "type": "string"
734
- },
735
- "x-ms-summary": "Comma-separated tag slugs to send invitations to"
736
740
  }
737
741
  ],
738
742
  "responses": {
739
743
  "200": {
740
- "description": "Invitations sent successfully",
741
- "x-ms-summary": "Success"
742
- },
743
- "400": {
744
- "description": "Payload of Object",
744
+ "description": "Snapshot with published + draft sides",
745
745
  "content": {
746
746
  "application/json": {
747
747
  "schema": {
748
- "type": "object"
748
+ "$ref": "#/components/schemas/getArticleWithDraftResult"
749
749
  }
750
750
  }
751
751
  },
752
- "x-ms-summary": "Bad Request"
752
+ "x-ms-summary": "Success"
753
753
  },
754
754
  "401": {
755
755
  "description": "No description",
756
756
  "x-ms-summary": "Unauthorized"
757
757
  },
758
758
  "404": {
759
- "description": "Article not found",
759
+ "description": "No description",
760
760
  "x-ms-summary": "Not Found"
761
761
  }
762
762
  },