@snokam/mcp-api 0.15.0 → 0.16.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/package.json +1 -1
- package/specs/production/blog.json +264 -56
- package/specs/test/blog.json +264 -56
package/package.json
CHANGED
|
@@ -35,6 +35,51 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
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://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
38
83
|
"post": {
|
|
39
84
|
"tags": [
|
|
40
85
|
"Articles"
|
|
@@ -90,7 +135,151 @@
|
|
|
90
135
|
]
|
|
91
136
|
}
|
|
92
137
|
},
|
|
138
|
+
"/v1.0/protected/articles/drafts": {
|
|
139
|
+
"get": {
|
|
140
|
+
"tags": [
|
|
141
|
+
"Articles"
|
|
142
|
+
],
|
|
143
|
+
"summary": "List drafts without a published counterpart",
|
|
144
|
+
"description": "Used by the editor to surface unpublished articles authors might want to resume.",
|
|
145
|
+
"operationId": "GetDraftOnlyArticles",
|
|
146
|
+
"responses": {
|
|
147
|
+
"200": {
|
|
148
|
+
"description": "Draft article list",
|
|
149
|
+
"content": {
|
|
150
|
+
"application/json": {
|
|
151
|
+
"schema": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"$ref": "#/components/schemas/getArticlesResultInner"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"x-ms-summary": "Success"
|
|
160
|
+
},
|
|
161
|
+
"401": {
|
|
162
|
+
"description": "No description",
|
|
163
|
+
"x-ms-summary": "Unauthorized"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"security": [
|
|
167
|
+
{
|
|
168
|
+
"Implicit": [
|
|
169
|
+
"api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"post": {
|
|
175
|
+
"tags": [
|
|
176
|
+
"Articles"
|
|
177
|
+
],
|
|
178
|
+
"summary": "Create a new article as a draft",
|
|
179
|
+
"description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
|
|
180
|
+
"operationId": "CreateDraft",
|
|
181
|
+
"requestBody": {
|
|
182
|
+
"description": "The article content to save as a draft",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/sanityCreateArticle"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": true
|
|
191
|
+
},
|
|
192
|
+
"responses": {
|
|
193
|
+
"200": {
|
|
194
|
+
"description": "The newly created draft",
|
|
195
|
+
"content": {
|
|
196
|
+
"application/json": {
|
|
197
|
+
"schema": {
|
|
198
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"x-ms-summary": "Success"
|
|
203
|
+
},
|
|
204
|
+
"400": {
|
|
205
|
+
"description": "Payload of Object",
|
|
206
|
+
"content": {
|
|
207
|
+
"application/json": {
|
|
208
|
+
"schema": {
|
|
209
|
+
"type": "object"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"x-ms-summary": "Bad Request"
|
|
214
|
+
},
|
|
215
|
+
"401": {
|
|
216
|
+
"description": "No description",
|
|
217
|
+
"x-ms-summary": "Unauthorized"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"security": [
|
|
221
|
+
{
|
|
222
|
+
"Implicit": [
|
|
223
|
+
"api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
93
229
|
"/v1.0/protected/articles/{slugOrId}": {
|
|
230
|
+
"get": {
|
|
231
|
+
"tags": [
|
|
232
|
+
"Articles"
|
|
233
|
+
],
|
|
234
|
+
"summary": "Get a single published article (admin)",
|
|
235
|
+
"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.",
|
|
236
|
+
"operationId": "GetPublishedArticle",
|
|
237
|
+
"parameters": [
|
|
238
|
+
{
|
|
239
|
+
"name": "slugOrId",
|
|
240
|
+
"in": "path",
|
|
241
|
+
"required": true,
|
|
242
|
+
"schema": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "includeInactive",
|
|
248
|
+
"in": "query",
|
|
249
|
+
"schema": {
|
|
250
|
+
"type": "boolean"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"responses": {
|
|
255
|
+
"200": {
|
|
256
|
+
"description": "The article",
|
|
257
|
+
"content": {
|
|
258
|
+
"application/json": {
|
|
259
|
+
"schema": {
|
|
260
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"x-ms-summary": "Success"
|
|
265
|
+
},
|
|
266
|
+
"401": {
|
|
267
|
+
"description": "No description",
|
|
268
|
+
"x-ms-summary": "Unauthorized"
|
|
269
|
+
},
|
|
270
|
+
"404": {
|
|
271
|
+
"description": "No description",
|
|
272
|
+
"x-ms-summary": "Not Found"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"security": [
|
|
276
|
+
{
|
|
277
|
+
"Implicit": [
|
|
278
|
+
"api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
94
283
|
"patch": {
|
|
95
284
|
"tags": [
|
|
96
285
|
"Articles"
|
|
@@ -257,62 +446,6 @@
|
|
|
257
446
|
]
|
|
258
447
|
}
|
|
259
448
|
},
|
|
260
|
-
"/v1.0/protected/articles/drafts": {
|
|
261
|
-
"post": {
|
|
262
|
-
"tags": [
|
|
263
|
-
"Articles"
|
|
264
|
-
],
|
|
265
|
-
"summary": "Create a new article as a draft",
|
|
266
|
-
"description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
|
|
267
|
-
"operationId": "CreateDraft",
|
|
268
|
-
"requestBody": {
|
|
269
|
-
"description": "The article content to save as a draft",
|
|
270
|
-
"content": {
|
|
271
|
-
"application/json": {
|
|
272
|
-
"schema": {
|
|
273
|
-
"$ref": "#/components/schemas/sanityCreateArticle"
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
"required": true
|
|
278
|
-
},
|
|
279
|
-
"responses": {
|
|
280
|
-
"200": {
|
|
281
|
-
"description": "The newly created draft",
|
|
282
|
-
"content": {
|
|
283
|
-
"application/json": {
|
|
284
|
-
"schema": {
|
|
285
|
-
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"x-ms-summary": "Success"
|
|
290
|
-
},
|
|
291
|
-
"400": {
|
|
292
|
-
"description": "Payload of Object",
|
|
293
|
-
"content": {
|
|
294
|
-
"application/json": {
|
|
295
|
-
"schema": {
|
|
296
|
-
"type": "object"
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
"x-ms-summary": "Bad Request"
|
|
301
|
-
},
|
|
302
|
-
"401": {
|
|
303
|
-
"description": "No description",
|
|
304
|
-
"x-ms-summary": "Unauthorized"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
"security": [
|
|
308
|
-
{
|
|
309
|
-
"Implicit": [
|
|
310
|
-
"api://e60092d3-3970-4a7c-a62e-19f17c4bca08/.default"
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
449
|
"/v1.0/protected/articles/{slugOrId}/draft": {
|
|
317
450
|
"patch": {
|
|
318
451
|
"tags": [
|
|
@@ -894,6 +1027,81 @@
|
|
|
894
1027
|
}
|
|
895
1028
|
}
|
|
896
1029
|
},
|
|
1030
|
+
"getArticlesResultInner": {
|
|
1031
|
+
"type": "object",
|
|
1032
|
+
"properties": {
|
|
1033
|
+
"sanityType": {
|
|
1034
|
+
"enum": [
|
|
1035
|
+
"article"
|
|
1036
|
+
],
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"default": "article"
|
|
1039
|
+
},
|
|
1040
|
+
"active": {
|
|
1041
|
+
"type": "boolean"
|
|
1042
|
+
},
|
|
1043
|
+
"articleSeries": {
|
|
1044
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResultArticleSeries"
|
|
1045
|
+
},
|
|
1046
|
+
"authors": {
|
|
1047
|
+
"type": "array",
|
|
1048
|
+
"items": {
|
|
1049
|
+
"$ref": "#/components/schemas/sanityOrderEmployee"
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"content": {
|
|
1053
|
+
"type": "array",
|
|
1054
|
+
"items": {
|
|
1055
|
+
"$ref": "#/components/schemas/sanityTechnologyWithRelationsProjectsInnerTestimonialsInnerContentInner"
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"customer": {
|
|
1059
|
+
"$ref": "#/components/schemas/customerReference"
|
|
1060
|
+
},
|
|
1061
|
+
"live": {
|
|
1062
|
+
"type": "string"
|
|
1063
|
+
},
|
|
1064
|
+
"media": {
|
|
1065
|
+
"$ref": "#/components/schemas/sanityTechnologyWithRelationsArticlesInnerMedia"
|
|
1066
|
+
},
|
|
1067
|
+
"metaDescription": {
|
|
1068
|
+
"type": "string"
|
|
1069
|
+
},
|
|
1070
|
+
"preview": {
|
|
1071
|
+
"type": "string"
|
|
1072
|
+
},
|
|
1073
|
+
"publishedAt": {
|
|
1074
|
+
"type": "string"
|
|
1075
|
+
},
|
|
1076
|
+
"sanityCreatedAt": {
|
|
1077
|
+
"type": "string"
|
|
1078
|
+
},
|
|
1079
|
+
"sanityId": {
|
|
1080
|
+
"type": "string"
|
|
1081
|
+
},
|
|
1082
|
+
"sanityRev": {
|
|
1083
|
+
"type": "string"
|
|
1084
|
+
},
|
|
1085
|
+
"sanityUpdatedAt": {
|
|
1086
|
+
"type": "string"
|
|
1087
|
+
},
|
|
1088
|
+
"slug": {
|
|
1089
|
+
"$ref": "#/components/schemas/slug"
|
|
1090
|
+
},
|
|
1091
|
+
"subscribersNotified": {
|
|
1092
|
+
"type": "boolean"
|
|
1093
|
+
},
|
|
1094
|
+
"technologies": {
|
|
1095
|
+
"type": "array",
|
|
1096
|
+
"items": {
|
|
1097
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResultTechnologiesInner"
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
"title": {
|
|
1101
|
+
"type": "string"
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
897
1105
|
"getArticleWithDraftResult": {
|
|
898
1106
|
"type": "object",
|
|
899
1107
|
"properties": {
|
package/specs/test/blog.json
CHANGED
|
@@ -35,6 +35,51 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
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://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
},
|
|
38
83
|
"post": {
|
|
39
84
|
"tags": [
|
|
40
85
|
"Articles"
|
|
@@ -90,7 +135,151 @@
|
|
|
90
135
|
]
|
|
91
136
|
}
|
|
92
137
|
},
|
|
138
|
+
"/v1.0/protected/articles/drafts": {
|
|
139
|
+
"get": {
|
|
140
|
+
"tags": [
|
|
141
|
+
"Articles"
|
|
142
|
+
],
|
|
143
|
+
"summary": "List drafts without a published counterpart",
|
|
144
|
+
"description": "Used by the editor to surface unpublished articles authors might want to resume.",
|
|
145
|
+
"operationId": "GetDraftOnlyArticles",
|
|
146
|
+
"responses": {
|
|
147
|
+
"200": {
|
|
148
|
+
"description": "Draft article list",
|
|
149
|
+
"content": {
|
|
150
|
+
"application/json": {
|
|
151
|
+
"schema": {
|
|
152
|
+
"type": "array",
|
|
153
|
+
"items": {
|
|
154
|
+
"$ref": "#/components/schemas/getArticlesResultInner"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"x-ms-summary": "Success"
|
|
160
|
+
},
|
|
161
|
+
"401": {
|
|
162
|
+
"description": "No description",
|
|
163
|
+
"x-ms-summary": "Unauthorized"
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"security": [
|
|
167
|
+
{
|
|
168
|
+
"Implicit": [
|
|
169
|
+
"api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
"post": {
|
|
175
|
+
"tags": [
|
|
176
|
+
"Articles"
|
|
177
|
+
],
|
|
178
|
+
"summary": "Create a new article as a draft",
|
|
179
|
+
"description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
|
|
180
|
+
"operationId": "CreateDraft",
|
|
181
|
+
"requestBody": {
|
|
182
|
+
"description": "The article content to save as a draft",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/sanityCreateArticle"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": true
|
|
191
|
+
},
|
|
192
|
+
"responses": {
|
|
193
|
+
"200": {
|
|
194
|
+
"description": "The newly created draft",
|
|
195
|
+
"content": {
|
|
196
|
+
"application/json": {
|
|
197
|
+
"schema": {
|
|
198
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"x-ms-summary": "Success"
|
|
203
|
+
},
|
|
204
|
+
"400": {
|
|
205
|
+
"description": "Payload of Object",
|
|
206
|
+
"content": {
|
|
207
|
+
"application/json": {
|
|
208
|
+
"schema": {
|
|
209
|
+
"type": "object"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"x-ms-summary": "Bad Request"
|
|
214
|
+
},
|
|
215
|
+
"401": {
|
|
216
|
+
"description": "No description",
|
|
217
|
+
"x-ms-summary": "Unauthorized"
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"security": [
|
|
221
|
+
{
|
|
222
|
+
"Implicit": [
|
|
223
|
+
"api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
|
|
224
|
+
]
|
|
225
|
+
}
|
|
226
|
+
]
|
|
227
|
+
}
|
|
228
|
+
},
|
|
93
229
|
"/v1.0/protected/articles/{slugOrId}": {
|
|
230
|
+
"get": {
|
|
231
|
+
"tags": [
|
|
232
|
+
"Articles"
|
|
233
|
+
],
|
|
234
|
+
"summary": "Get a single published article (admin)",
|
|
235
|
+
"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.",
|
|
236
|
+
"operationId": "GetPublishedArticle",
|
|
237
|
+
"parameters": [
|
|
238
|
+
{
|
|
239
|
+
"name": "slugOrId",
|
|
240
|
+
"in": "path",
|
|
241
|
+
"required": true,
|
|
242
|
+
"schema": {
|
|
243
|
+
"type": "string"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "includeInactive",
|
|
248
|
+
"in": "query",
|
|
249
|
+
"schema": {
|
|
250
|
+
"type": "boolean"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"responses": {
|
|
255
|
+
"200": {
|
|
256
|
+
"description": "The article",
|
|
257
|
+
"content": {
|
|
258
|
+
"application/json": {
|
|
259
|
+
"schema": {
|
|
260
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"x-ms-summary": "Success"
|
|
265
|
+
},
|
|
266
|
+
"401": {
|
|
267
|
+
"description": "No description",
|
|
268
|
+
"x-ms-summary": "Unauthorized"
|
|
269
|
+
},
|
|
270
|
+
"404": {
|
|
271
|
+
"description": "No description",
|
|
272
|
+
"x-ms-summary": "Not Found"
|
|
273
|
+
}
|
|
274
|
+
},
|
|
275
|
+
"security": [
|
|
276
|
+
{
|
|
277
|
+
"Implicit": [
|
|
278
|
+
"api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
]
|
|
282
|
+
},
|
|
94
283
|
"patch": {
|
|
95
284
|
"tags": [
|
|
96
285
|
"Articles"
|
|
@@ -257,62 +446,6 @@
|
|
|
257
446
|
]
|
|
258
447
|
}
|
|
259
448
|
},
|
|
260
|
-
"/v1.0/protected/articles/drafts": {
|
|
261
|
-
"post": {
|
|
262
|
-
"tags": [
|
|
263
|
-
"Articles"
|
|
264
|
-
],
|
|
265
|
-
"summary": "Create a new article as a draft",
|
|
266
|
-
"description": "Creates a new article in Sanity's `drafts.*` namespace. The article is not visible on the public site until PublishDraft is called.",
|
|
267
|
-
"operationId": "CreateDraft",
|
|
268
|
-
"requestBody": {
|
|
269
|
-
"description": "The article content to save as a draft",
|
|
270
|
-
"content": {
|
|
271
|
-
"application/json": {
|
|
272
|
-
"schema": {
|
|
273
|
-
"$ref": "#/components/schemas/sanityCreateArticle"
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
"required": true
|
|
278
|
-
},
|
|
279
|
-
"responses": {
|
|
280
|
-
"200": {
|
|
281
|
-
"description": "The newly created draft",
|
|
282
|
-
"content": {
|
|
283
|
-
"application/json": {
|
|
284
|
-
"schema": {
|
|
285
|
-
"$ref": "#/components/schemas/getArticlesBySlugOrIdResult"
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"x-ms-summary": "Success"
|
|
290
|
-
},
|
|
291
|
-
"400": {
|
|
292
|
-
"description": "Payload of Object",
|
|
293
|
-
"content": {
|
|
294
|
-
"application/json": {
|
|
295
|
-
"schema": {
|
|
296
|
-
"type": "object"
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
},
|
|
300
|
-
"x-ms-summary": "Bad Request"
|
|
301
|
-
},
|
|
302
|
-
"401": {
|
|
303
|
-
"description": "No description",
|
|
304
|
-
"x-ms-summary": "Unauthorized"
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
"security": [
|
|
308
|
-
{
|
|
309
|
-
"Implicit": [
|
|
310
|
-
"api://c375ccd2-e69d-4262-808d-1a197df95d34/.default"
|
|
311
|
-
]
|
|
312
|
-
}
|
|
313
|
-
]
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
449
|
"/v1.0/protected/articles/{slugOrId}/draft": {
|
|
317
450
|
"patch": {
|
|
318
451
|
"tags": [
|
|
@@ -894,6 +1027,81 @@
|
|
|
894
1027
|
}
|
|
895
1028
|
}
|
|
896
1029
|
},
|
|
1030
|
+
"getArticlesResultInner": {
|
|
1031
|
+
"type": "object",
|
|
1032
|
+
"properties": {
|
|
1033
|
+
"sanityType": {
|
|
1034
|
+
"enum": [
|
|
1035
|
+
"article"
|
|
1036
|
+
],
|
|
1037
|
+
"type": "string",
|
|
1038
|
+
"default": "article"
|
|
1039
|
+
},
|
|
1040
|
+
"active": {
|
|
1041
|
+
"type": "boolean"
|
|
1042
|
+
},
|
|
1043
|
+
"articleSeries": {
|
|
1044
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResultArticleSeries"
|
|
1045
|
+
},
|
|
1046
|
+
"authors": {
|
|
1047
|
+
"type": "array",
|
|
1048
|
+
"items": {
|
|
1049
|
+
"$ref": "#/components/schemas/sanityOrderEmployee"
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
"content": {
|
|
1053
|
+
"type": "array",
|
|
1054
|
+
"items": {
|
|
1055
|
+
"$ref": "#/components/schemas/sanityTechnologyWithRelationsProjectsInnerTestimonialsInnerContentInner"
|
|
1056
|
+
}
|
|
1057
|
+
},
|
|
1058
|
+
"customer": {
|
|
1059
|
+
"$ref": "#/components/schemas/customerReference"
|
|
1060
|
+
},
|
|
1061
|
+
"live": {
|
|
1062
|
+
"type": "string"
|
|
1063
|
+
},
|
|
1064
|
+
"media": {
|
|
1065
|
+
"$ref": "#/components/schemas/sanityTechnologyWithRelationsArticlesInnerMedia"
|
|
1066
|
+
},
|
|
1067
|
+
"metaDescription": {
|
|
1068
|
+
"type": "string"
|
|
1069
|
+
},
|
|
1070
|
+
"preview": {
|
|
1071
|
+
"type": "string"
|
|
1072
|
+
},
|
|
1073
|
+
"publishedAt": {
|
|
1074
|
+
"type": "string"
|
|
1075
|
+
},
|
|
1076
|
+
"sanityCreatedAt": {
|
|
1077
|
+
"type": "string"
|
|
1078
|
+
},
|
|
1079
|
+
"sanityId": {
|
|
1080
|
+
"type": "string"
|
|
1081
|
+
},
|
|
1082
|
+
"sanityRev": {
|
|
1083
|
+
"type": "string"
|
|
1084
|
+
},
|
|
1085
|
+
"sanityUpdatedAt": {
|
|
1086
|
+
"type": "string"
|
|
1087
|
+
},
|
|
1088
|
+
"slug": {
|
|
1089
|
+
"$ref": "#/components/schemas/slug"
|
|
1090
|
+
},
|
|
1091
|
+
"subscribersNotified": {
|
|
1092
|
+
"type": "boolean"
|
|
1093
|
+
},
|
|
1094
|
+
"technologies": {
|
|
1095
|
+
"type": "array",
|
|
1096
|
+
"items": {
|
|
1097
|
+
"$ref": "#/components/schemas/getArticlesBySlugOrIdResultTechnologiesInner"
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
"title": {
|
|
1101
|
+
"type": "string"
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
897
1105
|
"getArticleWithDraftResult": {
|
|
898
1106
|
"type": "object",
|
|
899
1107
|
"properties": {
|