@snokam/mcp-api 0.7.0 → 0.9.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/dist/index.js +4 -7
- package/package.json +1 -1
- package/specs/production/notifications.json +140 -0
- package/specs/production/sanity.json +128 -0
- package/specs/test/notifications.json +140 -0
- package/specs/test/sanity.json +128 -0
- package/specs/production/sync.json +0 -181
- package/specs/test/sync.json +0 -181
package/dist/index.js
CHANGED
|
@@ -161,12 +161,9 @@ async function executeCall(endpoint, args) {
|
|
|
161
161
|
const headers = {
|
|
162
162
|
Accept: "application/json",
|
|
163
163
|
};
|
|
164
|
-
const
|
|
165
|
-
if (
|
|
166
|
-
|
|
167
|
-
if (token) {
|
|
168
|
-
headers.Authorization = `Bearer ${token}`;
|
|
169
|
-
}
|
|
164
|
+
const token = await getAccessToken(endpoint.scope);
|
|
165
|
+
if (token) {
|
|
166
|
+
headers.Authorization = `Bearer ${token}`;
|
|
170
167
|
}
|
|
171
168
|
let fetchBody;
|
|
172
169
|
if (args.body !== undefined && endpoint.method !== "GET") {
|
|
@@ -371,7 +368,7 @@ Controls: Sonos speakers, lights, YouTube queue
|
|
|
371
368
|
content: [
|
|
372
369
|
{
|
|
373
370
|
type: "text",
|
|
374
|
-
text: `Overrode ${service} → ${url} (${serviceEndpoints.length} endpoints)
|
|
371
|
+
text: `Overrode ${service} → ${url} (${serviceEndpoints.length} endpoints).`,
|
|
375
372
|
},
|
|
376
373
|
],
|
|
377
374
|
};
|
package/package.json
CHANGED
|
@@ -11,6 +11,63 @@
|
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"paths": {
|
|
14
|
+
"/v1.0/protected/push/register": {
|
|
15
|
+
"post": {
|
|
16
|
+
"tags": [
|
|
17
|
+
"Push"
|
|
18
|
+
],
|
|
19
|
+
"summary": "Register device for push notifications",
|
|
20
|
+
"description": "Creates or updates a device installation in Azure Notification Hub",
|
|
21
|
+
"operationId": "RegisterDevice",
|
|
22
|
+
"requestBody": {
|
|
23
|
+
"description": "Device registration data",
|
|
24
|
+
"content": {
|
|
25
|
+
"application/json": {
|
|
26
|
+
"schema": {
|
|
27
|
+
"$ref": "#/components/schemas/deviceInstallation"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": true
|
|
32
|
+
},
|
|
33
|
+
"responses": {
|
|
34
|
+
"200": {
|
|
35
|
+
"description": "Device registered 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/push/register/{installationId}": {
|
|
49
|
+
"delete": {
|
|
50
|
+
"tags": [
|
|
51
|
+
"Push"
|
|
52
|
+
],
|
|
53
|
+
"summary": "Unregister device from push notifications",
|
|
54
|
+
"description": "Removes a device installation from Azure Notification Hub",
|
|
55
|
+
"operationId": "UnregisterDevice",
|
|
56
|
+
"responses": {
|
|
57
|
+
"200": {
|
|
58
|
+
"description": "Device unregistered successfully",
|
|
59
|
+
"x-ms-summary": "Success"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"security": [
|
|
63
|
+
{
|
|
64
|
+
"Implicit": [
|
|
65
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
14
71
|
"/v1.0/protected/slack": {
|
|
15
72
|
"post": {
|
|
16
73
|
"tags": [
|
|
@@ -113,6 +170,40 @@
|
|
|
113
170
|
]
|
|
114
171
|
}
|
|
115
172
|
},
|
|
173
|
+
"/v1.0/protected/push": {
|
|
174
|
+
"post": {
|
|
175
|
+
"tags": [
|
|
176
|
+
"Notifications"
|
|
177
|
+
],
|
|
178
|
+
"summary": "Send push notification",
|
|
179
|
+
"description": "Queues a push notification for delivery",
|
|
180
|
+
"operationId": "SendPushNotification",
|
|
181
|
+
"requestBody": {
|
|
182
|
+
"description": "Push notification to send",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/sendPushRequest"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": true
|
|
191
|
+
},
|
|
192
|
+
"responses": {
|
|
193
|
+
"200": {
|
|
194
|
+
"description": "Notification queued successfully",
|
|
195
|
+
"x-ms-summary": "Success"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"security": [
|
|
199
|
+
{
|
|
200
|
+
"Implicit": [
|
|
201
|
+
"api://000b05c4-1c46-4ea7-bcf6-e8d17bc1838c/user_impersonation"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
116
207
|
"/v1.0/protected/notify": {
|
|
117
208
|
"post": {
|
|
118
209
|
"tags": [
|
|
@@ -150,6 +241,26 @@
|
|
|
150
241
|
},
|
|
151
242
|
"components": {
|
|
152
243
|
"schemas": {
|
|
244
|
+
"deviceInstallation": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"installationId": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"platform": {
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
"pushChannel": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"tags": {
|
|
257
|
+
"type": "array",
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
153
264
|
"sendEmailAttachmentRequest": {
|
|
154
265
|
"type": "object",
|
|
155
266
|
"properties": {
|
|
@@ -213,6 +324,35 @@
|
|
|
213
324
|
},
|
|
214
325
|
"email": {
|
|
215
326
|
"$ref": "#/components/schemas/sendEmailRequest"
|
|
327
|
+
},
|
|
328
|
+
"push": {
|
|
329
|
+
"$ref": "#/components/schemas/sendPushRequest"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"sendPushRequest": {
|
|
334
|
+
"type": "object",
|
|
335
|
+
"properties": {
|
|
336
|
+
"title": {
|
|
337
|
+
"type": "string"
|
|
338
|
+
},
|
|
339
|
+
"body": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"email": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"tags": {
|
|
346
|
+
"type": "array",
|
|
347
|
+
"items": {
|
|
348
|
+
"type": "string"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"data": {
|
|
352
|
+
"type": "object",
|
|
353
|
+
"additionalProperties": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
}
|
|
216
356
|
}
|
|
217
357
|
}
|
|
218
358
|
},
|
|
@@ -4581,6 +4581,41 @@
|
|
|
4581
4581
|
"type": "object",
|
|
4582
4582
|
"additionalProperties": true
|
|
4583
4583
|
},
|
|
4584
|
+
"RedemptionCodePoolStatus": {
|
|
4585
|
+
"properties": {
|
|
4586
|
+
"totalCodes": {
|
|
4587
|
+
"type": "number",
|
|
4588
|
+
"format": "double"
|
|
4589
|
+
},
|
|
4590
|
+
"availableCodes": {
|
|
4591
|
+
"type": "number",
|
|
4592
|
+
"format": "double"
|
|
4593
|
+
},
|
|
4594
|
+
"claimedCodes": {
|
|
4595
|
+
"type": "number",
|
|
4596
|
+
"format": "double"
|
|
4597
|
+
}
|
|
4598
|
+
},
|
|
4599
|
+
"required": [
|
|
4600
|
+
"totalCodes",
|
|
4601
|
+
"availableCodes",
|
|
4602
|
+
"claimedCodes"
|
|
4603
|
+
],
|
|
4604
|
+
"type": "object",
|
|
4605
|
+
"additionalProperties": true
|
|
4606
|
+
},
|
|
4607
|
+
"ClaimedRedemptionCode": {
|
|
4608
|
+
"properties": {
|
|
4609
|
+
"code": {
|
|
4610
|
+
"type": "string"
|
|
4611
|
+
}
|
|
4612
|
+
},
|
|
4613
|
+
"required": [
|
|
4614
|
+
"code"
|
|
4615
|
+
],
|
|
4616
|
+
"type": "object",
|
|
4617
|
+
"additionalProperties": true
|
|
4618
|
+
},
|
|
4584
4619
|
"MuxTrack": {
|
|
4585
4620
|
"properties": {
|
|
4586
4621
|
"max_height": {
|
|
@@ -24472,6 +24507,99 @@
|
|
|
24472
24507
|
]
|
|
24473
24508
|
}
|
|
24474
24509
|
},
|
|
24510
|
+
"/v1.0/redemption-codes": {
|
|
24511
|
+
"get": {
|
|
24512
|
+
"operationId": "GetPoolStatus",
|
|
24513
|
+
"responses": {
|
|
24514
|
+
"200": {
|
|
24515
|
+
"description": "Ok",
|
|
24516
|
+
"content": {
|
|
24517
|
+
"application/json": {
|
|
24518
|
+
"schema": {
|
|
24519
|
+
"$ref": "#/components/schemas/RedemptionCodePoolStatus"
|
|
24520
|
+
}
|
|
24521
|
+
}
|
|
24522
|
+
}
|
|
24523
|
+
}
|
|
24524
|
+
},
|
|
24525
|
+
"tags": [
|
|
24526
|
+
"Redemption Codes"
|
|
24527
|
+
],
|
|
24528
|
+
"security": [
|
|
24529
|
+
{
|
|
24530
|
+
"Implicit": [
|
|
24531
|
+
"api://c03a7c58-49d5-4f50-aa43-ad00b22c6943/user_impersonation"
|
|
24532
|
+
]
|
|
24533
|
+
}
|
|
24534
|
+
],
|
|
24535
|
+
"parameters": [
|
|
24536
|
+
{
|
|
24537
|
+
"in": "query",
|
|
24538
|
+
"name": "useCache",
|
|
24539
|
+
"required": false,
|
|
24540
|
+
"schema": {
|
|
24541
|
+
"default": false,
|
|
24542
|
+
"type": "boolean"
|
|
24543
|
+
}
|
|
24544
|
+
},
|
|
24545
|
+
{
|
|
24546
|
+
"in": "query",
|
|
24547
|
+
"name": "useCdn",
|
|
24548
|
+
"required": false,
|
|
24549
|
+
"schema": {
|
|
24550
|
+
"default": false,
|
|
24551
|
+
"type": "boolean"
|
|
24552
|
+
}
|
|
24553
|
+
}
|
|
24554
|
+
]
|
|
24555
|
+
}
|
|
24556
|
+
},
|
|
24557
|
+
"/v1.0/redemption-codes/claim": {
|
|
24558
|
+
"post": {
|
|
24559
|
+
"operationId": "ClaimRedemptionCode",
|
|
24560
|
+
"responses": {
|
|
24561
|
+
"200": {
|
|
24562
|
+
"description": "Ok",
|
|
24563
|
+
"content": {
|
|
24564
|
+
"application/json": {
|
|
24565
|
+
"schema": {
|
|
24566
|
+
"$ref": "#/components/schemas/ClaimedRedemptionCode"
|
|
24567
|
+
}
|
|
24568
|
+
}
|
|
24569
|
+
}
|
|
24570
|
+
},
|
|
24571
|
+
"404": {
|
|
24572
|
+
"description": "",
|
|
24573
|
+
"content": {
|
|
24574
|
+
"application/json": {
|
|
24575
|
+
"schema": {
|
|
24576
|
+
"properties": {
|
|
24577
|
+
"message": {
|
|
24578
|
+
"type": "string"
|
|
24579
|
+
}
|
|
24580
|
+
},
|
|
24581
|
+
"required": [
|
|
24582
|
+
"message"
|
|
24583
|
+
],
|
|
24584
|
+
"type": "object"
|
|
24585
|
+
}
|
|
24586
|
+
}
|
|
24587
|
+
}
|
|
24588
|
+
}
|
|
24589
|
+
},
|
|
24590
|
+
"tags": [
|
|
24591
|
+
"Redemption Codes"
|
|
24592
|
+
],
|
|
24593
|
+
"security": [
|
|
24594
|
+
{
|
|
24595
|
+
"Implicit": [
|
|
24596
|
+
"api://c03a7c58-49d5-4f50-aa43-ad00b22c6943/user_impersonation"
|
|
24597
|
+
]
|
|
24598
|
+
}
|
|
24599
|
+
],
|
|
24600
|
+
"parameters": []
|
|
24601
|
+
}
|
|
24602
|
+
},
|
|
24475
24603
|
"/v1.0/quizes": {
|
|
24476
24604
|
"get": {
|
|
24477
24605
|
"operationId": "GetQuizes",
|
|
@@ -11,6 +11,63 @@
|
|
|
11
11
|
}
|
|
12
12
|
],
|
|
13
13
|
"paths": {
|
|
14
|
+
"/v1.0/protected/push/register": {
|
|
15
|
+
"post": {
|
|
16
|
+
"tags": [
|
|
17
|
+
"Push"
|
|
18
|
+
],
|
|
19
|
+
"summary": "Register device for push notifications",
|
|
20
|
+
"description": "Creates or updates a device installation in Azure Notification Hub",
|
|
21
|
+
"operationId": "RegisterDevice",
|
|
22
|
+
"requestBody": {
|
|
23
|
+
"description": "Device registration data",
|
|
24
|
+
"content": {
|
|
25
|
+
"application/json": {
|
|
26
|
+
"schema": {
|
|
27
|
+
"$ref": "#/components/schemas/deviceInstallation"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"required": true
|
|
32
|
+
},
|
|
33
|
+
"responses": {
|
|
34
|
+
"200": {
|
|
35
|
+
"description": "Device registered successfully",
|
|
36
|
+
"x-ms-summary": "Success"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"security": [
|
|
40
|
+
{
|
|
41
|
+
"Implicit": [
|
|
42
|
+
"api://246713d5-cd48-4a00-84dd-7fc7ae290a62/user_impersonation"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"/v1.0/protected/push/register/{installationId}": {
|
|
49
|
+
"delete": {
|
|
50
|
+
"tags": [
|
|
51
|
+
"Push"
|
|
52
|
+
],
|
|
53
|
+
"summary": "Unregister device from push notifications",
|
|
54
|
+
"description": "Removes a device installation from Azure Notification Hub",
|
|
55
|
+
"operationId": "UnregisterDevice",
|
|
56
|
+
"responses": {
|
|
57
|
+
"200": {
|
|
58
|
+
"description": "Device unregistered successfully",
|
|
59
|
+
"x-ms-summary": "Success"
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"security": [
|
|
63
|
+
{
|
|
64
|
+
"Implicit": [
|
|
65
|
+
"api://246713d5-cd48-4a00-84dd-7fc7ae290a62/user_impersonation"
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
},
|
|
14
71
|
"/v1.0/protected/slack": {
|
|
15
72
|
"post": {
|
|
16
73
|
"tags": [
|
|
@@ -113,6 +170,40 @@
|
|
|
113
170
|
]
|
|
114
171
|
}
|
|
115
172
|
},
|
|
173
|
+
"/v1.0/protected/push": {
|
|
174
|
+
"post": {
|
|
175
|
+
"tags": [
|
|
176
|
+
"Notifications"
|
|
177
|
+
],
|
|
178
|
+
"summary": "Send push notification",
|
|
179
|
+
"description": "Queues a push notification for delivery",
|
|
180
|
+
"operationId": "SendPushNotification",
|
|
181
|
+
"requestBody": {
|
|
182
|
+
"description": "Push notification to send",
|
|
183
|
+
"content": {
|
|
184
|
+
"application/json": {
|
|
185
|
+
"schema": {
|
|
186
|
+
"$ref": "#/components/schemas/sendPushRequest"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"required": true
|
|
191
|
+
},
|
|
192
|
+
"responses": {
|
|
193
|
+
"200": {
|
|
194
|
+
"description": "Notification queued successfully",
|
|
195
|
+
"x-ms-summary": "Success"
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"security": [
|
|
199
|
+
{
|
|
200
|
+
"Implicit": [
|
|
201
|
+
"api://246713d5-cd48-4a00-84dd-7fc7ae290a62/user_impersonation"
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
},
|
|
116
207
|
"/v1.0/protected/notify": {
|
|
117
208
|
"post": {
|
|
118
209
|
"tags": [
|
|
@@ -150,6 +241,26 @@
|
|
|
150
241
|
},
|
|
151
242
|
"components": {
|
|
152
243
|
"schemas": {
|
|
244
|
+
"deviceInstallation": {
|
|
245
|
+
"type": "object",
|
|
246
|
+
"properties": {
|
|
247
|
+
"installationId": {
|
|
248
|
+
"type": "string"
|
|
249
|
+
},
|
|
250
|
+
"platform": {
|
|
251
|
+
"type": "string"
|
|
252
|
+
},
|
|
253
|
+
"pushChannel": {
|
|
254
|
+
"type": "string"
|
|
255
|
+
},
|
|
256
|
+
"tags": {
|
|
257
|
+
"type": "array",
|
|
258
|
+
"items": {
|
|
259
|
+
"type": "string"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
153
264
|
"sendEmailAttachmentRequest": {
|
|
154
265
|
"type": "object",
|
|
155
266
|
"properties": {
|
|
@@ -213,6 +324,35 @@
|
|
|
213
324
|
},
|
|
214
325
|
"email": {
|
|
215
326
|
"$ref": "#/components/schemas/sendEmailRequest"
|
|
327
|
+
},
|
|
328
|
+
"push": {
|
|
329
|
+
"$ref": "#/components/schemas/sendPushRequest"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
"sendPushRequest": {
|
|
334
|
+
"type": "object",
|
|
335
|
+
"properties": {
|
|
336
|
+
"title": {
|
|
337
|
+
"type": "string"
|
|
338
|
+
},
|
|
339
|
+
"body": {
|
|
340
|
+
"type": "string"
|
|
341
|
+
},
|
|
342
|
+
"email": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"tags": {
|
|
346
|
+
"type": "array",
|
|
347
|
+
"items": {
|
|
348
|
+
"type": "string"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
"data": {
|
|
352
|
+
"type": "object",
|
|
353
|
+
"additionalProperties": {
|
|
354
|
+
"type": "string"
|
|
355
|
+
}
|
|
216
356
|
}
|
|
217
357
|
}
|
|
218
358
|
},
|
package/specs/test/sanity.json
CHANGED
|
@@ -4581,6 +4581,41 @@
|
|
|
4581
4581
|
"type": "object",
|
|
4582
4582
|
"additionalProperties": true
|
|
4583
4583
|
},
|
|
4584
|
+
"RedemptionCodePoolStatus": {
|
|
4585
|
+
"properties": {
|
|
4586
|
+
"totalCodes": {
|
|
4587
|
+
"type": "number",
|
|
4588
|
+
"format": "double"
|
|
4589
|
+
},
|
|
4590
|
+
"availableCodes": {
|
|
4591
|
+
"type": "number",
|
|
4592
|
+
"format": "double"
|
|
4593
|
+
},
|
|
4594
|
+
"claimedCodes": {
|
|
4595
|
+
"type": "number",
|
|
4596
|
+
"format": "double"
|
|
4597
|
+
}
|
|
4598
|
+
},
|
|
4599
|
+
"required": [
|
|
4600
|
+
"totalCodes",
|
|
4601
|
+
"availableCodes",
|
|
4602
|
+
"claimedCodes"
|
|
4603
|
+
],
|
|
4604
|
+
"type": "object",
|
|
4605
|
+
"additionalProperties": true
|
|
4606
|
+
},
|
|
4607
|
+
"ClaimedRedemptionCode": {
|
|
4608
|
+
"properties": {
|
|
4609
|
+
"code": {
|
|
4610
|
+
"type": "string"
|
|
4611
|
+
}
|
|
4612
|
+
},
|
|
4613
|
+
"required": [
|
|
4614
|
+
"code"
|
|
4615
|
+
],
|
|
4616
|
+
"type": "object",
|
|
4617
|
+
"additionalProperties": true
|
|
4618
|
+
},
|
|
4584
4619
|
"MuxTrack": {
|
|
4585
4620
|
"properties": {
|
|
4586
4621
|
"max_height": {
|
|
@@ -24472,6 +24507,99 @@
|
|
|
24472
24507
|
]
|
|
24473
24508
|
}
|
|
24474
24509
|
},
|
|
24510
|
+
"/v1.0/redemption-codes": {
|
|
24511
|
+
"get": {
|
|
24512
|
+
"operationId": "GetPoolStatus",
|
|
24513
|
+
"responses": {
|
|
24514
|
+
"200": {
|
|
24515
|
+
"description": "Ok",
|
|
24516
|
+
"content": {
|
|
24517
|
+
"application/json": {
|
|
24518
|
+
"schema": {
|
|
24519
|
+
"$ref": "#/components/schemas/RedemptionCodePoolStatus"
|
|
24520
|
+
}
|
|
24521
|
+
}
|
|
24522
|
+
}
|
|
24523
|
+
}
|
|
24524
|
+
},
|
|
24525
|
+
"tags": [
|
|
24526
|
+
"Redemption Codes"
|
|
24527
|
+
],
|
|
24528
|
+
"security": [
|
|
24529
|
+
{
|
|
24530
|
+
"Implicit": [
|
|
24531
|
+
"api://59c81dff-a91a-4343-bbba-0c201c23db32/user_impersonation"
|
|
24532
|
+
]
|
|
24533
|
+
}
|
|
24534
|
+
],
|
|
24535
|
+
"parameters": [
|
|
24536
|
+
{
|
|
24537
|
+
"in": "query",
|
|
24538
|
+
"name": "useCache",
|
|
24539
|
+
"required": false,
|
|
24540
|
+
"schema": {
|
|
24541
|
+
"default": false,
|
|
24542
|
+
"type": "boolean"
|
|
24543
|
+
}
|
|
24544
|
+
},
|
|
24545
|
+
{
|
|
24546
|
+
"in": "query",
|
|
24547
|
+
"name": "useCdn",
|
|
24548
|
+
"required": false,
|
|
24549
|
+
"schema": {
|
|
24550
|
+
"default": false,
|
|
24551
|
+
"type": "boolean"
|
|
24552
|
+
}
|
|
24553
|
+
}
|
|
24554
|
+
]
|
|
24555
|
+
}
|
|
24556
|
+
},
|
|
24557
|
+
"/v1.0/redemption-codes/claim": {
|
|
24558
|
+
"post": {
|
|
24559
|
+
"operationId": "ClaimRedemptionCode",
|
|
24560
|
+
"responses": {
|
|
24561
|
+
"200": {
|
|
24562
|
+
"description": "Ok",
|
|
24563
|
+
"content": {
|
|
24564
|
+
"application/json": {
|
|
24565
|
+
"schema": {
|
|
24566
|
+
"$ref": "#/components/schemas/ClaimedRedemptionCode"
|
|
24567
|
+
}
|
|
24568
|
+
}
|
|
24569
|
+
}
|
|
24570
|
+
},
|
|
24571
|
+
"404": {
|
|
24572
|
+
"description": "",
|
|
24573
|
+
"content": {
|
|
24574
|
+
"application/json": {
|
|
24575
|
+
"schema": {
|
|
24576
|
+
"properties": {
|
|
24577
|
+
"message": {
|
|
24578
|
+
"type": "string"
|
|
24579
|
+
}
|
|
24580
|
+
},
|
|
24581
|
+
"required": [
|
|
24582
|
+
"message"
|
|
24583
|
+
],
|
|
24584
|
+
"type": "object"
|
|
24585
|
+
}
|
|
24586
|
+
}
|
|
24587
|
+
}
|
|
24588
|
+
}
|
|
24589
|
+
},
|
|
24590
|
+
"tags": [
|
|
24591
|
+
"Redemption Codes"
|
|
24592
|
+
],
|
|
24593
|
+
"security": [
|
|
24594
|
+
{
|
|
24595
|
+
"Implicit": [
|
|
24596
|
+
"api://59c81dff-a91a-4343-bbba-0c201c23db32/user_impersonation"
|
|
24597
|
+
]
|
|
24598
|
+
}
|
|
24599
|
+
],
|
|
24600
|
+
"parameters": []
|
|
24601
|
+
}
|
|
24602
|
+
},
|
|
24475
24603
|
"/v1.0/quizes": {
|
|
24476
24604
|
"get": {
|
|
24477
24605
|
"operationId": "GetQuizes",
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.1",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Sync Function",
|
|
5
|
-
"description": "Sync data from one system to another, e.g CvPartner to Sanity",
|
|
6
|
-
"version": "v1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"servers": [
|
|
9
|
-
{
|
|
10
|
-
"url": "https://sync.api.snokam.no"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"paths": {
|
|
14
|
-
"/v1.0/azure-ad-to-sanity": {
|
|
15
|
-
"get": {
|
|
16
|
-
"tags": [
|
|
17
|
-
"Sync"
|
|
18
|
-
],
|
|
19
|
-
"summary": "Syncs Azure AD to Sanity",
|
|
20
|
-
"description": "Synchronizes data from Azure AD to Sanity.",
|
|
21
|
-
"operationId": "SyncAzureAdToSanity",
|
|
22
|
-
"responses": {
|
|
23
|
-
"200": {
|
|
24
|
-
"description": "Data synchronized successfully",
|
|
25
|
-
"content": {
|
|
26
|
-
"application/json": {
|
|
27
|
-
"schema": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"x-ms-summary": "Success"
|
|
33
|
-
},
|
|
34
|
-
"401": {
|
|
35
|
-
"description": "Unauthorized access",
|
|
36
|
-
"x-ms-summary": "Unauthorized"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"security": [
|
|
40
|
-
{
|
|
41
|
-
"Implicit": [
|
|
42
|
-
"api://ff9fe93f-c16c-4d28-ad16-8c379e0815ef/user_impersonation"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"/v1.0/cv-partner-to-sanity": {
|
|
49
|
-
"get": {
|
|
50
|
-
"tags": [
|
|
51
|
-
"Sync"
|
|
52
|
-
],
|
|
53
|
-
"summary": "Syncs CV Partner to Sanity",
|
|
54
|
-
"description": "Synchronizes data from CV Partner to Sanity.",
|
|
55
|
-
"operationId": "SyncCvPartnerToSanity",
|
|
56
|
-
"responses": {
|
|
57
|
-
"200": {
|
|
58
|
-
"description": "Data synchronized successfully",
|
|
59
|
-
"content": {
|
|
60
|
-
"application/json": {
|
|
61
|
-
"schema": {
|
|
62
|
-
"type": "string"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"x-ms-summary": "Success"
|
|
67
|
-
},
|
|
68
|
-
"401": {
|
|
69
|
-
"description": "Unauthorized access",
|
|
70
|
-
"x-ms-summary": "Unauthorized"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"security": [
|
|
74
|
-
{
|
|
75
|
-
"Implicit": [
|
|
76
|
-
"api://ff9fe93f-c16c-4d28-ad16-8c379e0815ef/user_impersonation"
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"/v1.0/power-office-to-sanity": {
|
|
83
|
-
"get": {
|
|
84
|
-
"tags": [
|
|
85
|
-
"Sync"
|
|
86
|
-
],
|
|
87
|
-
"summary": "Sync power office data to sanity",
|
|
88
|
-
"description": "Sync power office data to sanity",
|
|
89
|
-
"operationId": "SyncPowerOfficeToSanity",
|
|
90
|
-
"parameters": [
|
|
91
|
-
{
|
|
92
|
-
"name": "from",
|
|
93
|
-
"in": "query",
|
|
94
|
-
"description": "",
|
|
95
|
-
"required": true,
|
|
96
|
-
"schema": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"format": "date-time"
|
|
99
|
-
},
|
|
100
|
-
"x-ms-summary": "Date from"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"name": "to",
|
|
104
|
-
"in": "query",
|
|
105
|
-
"description": "",
|
|
106
|
-
"required": true,
|
|
107
|
-
"schema": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"format": "date-time"
|
|
110
|
-
},
|
|
111
|
-
"x-ms-summary": "Date to"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"responses": {
|
|
115
|
-
"200": {
|
|
116
|
-
"description": "Data synchronized successfully",
|
|
117
|
-
"content": {
|
|
118
|
-
"application/json": {
|
|
119
|
-
"schema": {
|
|
120
|
-
"type": "string"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"x-ms-summary": "Success"
|
|
125
|
-
},
|
|
126
|
-
"401": {
|
|
127
|
-
"description": "Unauthorized access",
|
|
128
|
-
"x-ms-summary": "Unauthorized"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"security": [
|
|
132
|
-
{
|
|
133
|
-
"Implicit": [
|
|
134
|
-
"api://ff9fe93f-c16c-4d28-ad16-8c379e0815ef/user_impersonation"
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"/v1.0/okrs-to-sanity": {
|
|
141
|
-
"get": {
|
|
142
|
-
"tags": [
|
|
143
|
-
"Sync"
|
|
144
|
-
],
|
|
145
|
-
"summary": "Sync OKRs",
|
|
146
|
-
"description": "Synchronizes OKRs",
|
|
147
|
-
"operationId": "SyncOkrs",
|
|
148
|
-
"responses": {
|
|
149
|
-
"200": {
|
|
150
|
-
"description": "OKRs synchronized successfully",
|
|
151
|
-
"x-ms-summary": "Success"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"security": [
|
|
155
|
-
{
|
|
156
|
-
"Implicit": [
|
|
157
|
-
"api://ff9fe93f-c16c-4d28-ad16-8c379e0815ef/user_impersonation"
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"components": {
|
|
165
|
-
"securitySchemes": {
|
|
166
|
-
"Implicit": {
|
|
167
|
-
"type": "oauth2",
|
|
168
|
-
"flows": {
|
|
169
|
-
"implicit": {
|
|
170
|
-
"authorizationUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/authorize",
|
|
171
|
-
"tokenUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
|
|
172
|
-
"refreshUrl": "https://login.microsoftonline.com/81a4f38d-6712-4b65-868b-c3771f9ba91e/oauth2/v2.0/token",
|
|
173
|
-
"scopes": {
|
|
174
|
-
"api://ff9fe93f-c16c-4d28-ad16-8c379e0815ef/user_impersonation": "Default function scope"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
package/specs/test/sync.json
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"openapi": "3.0.1",
|
|
3
|
-
"info": {
|
|
4
|
-
"title": "Sync Function",
|
|
5
|
-
"description": "Sync data from one system to another, e.g CvPartner to Sanity",
|
|
6
|
-
"version": "v1.0.0"
|
|
7
|
-
},
|
|
8
|
-
"servers": [
|
|
9
|
-
{
|
|
10
|
-
"url": "https://sync.api.test.snokam.no"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"paths": {
|
|
14
|
-
"/v1.0/azure-ad-to-sanity": {
|
|
15
|
-
"get": {
|
|
16
|
-
"tags": [
|
|
17
|
-
"Sync"
|
|
18
|
-
],
|
|
19
|
-
"summary": "Syncs Azure AD to Sanity",
|
|
20
|
-
"description": "Synchronizes data from Azure AD to Sanity.",
|
|
21
|
-
"operationId": "SyncAzureAdToSanity",
|
|
22
|
-
"responses": {
|
|
23
|
-
"200": {
|
|
24
|
-
"description": "Data synchronized successfully",
|
|
25
|
-
"content": {
|
|
26
|
-
"application/json": {
|
|
27
|
-
"schema": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"x-ms-summary": "Success"
|
|
33
|
-
},
|
|
34
|
-
"401": {
|
|
35
|
-
"description": "Unauthorized access",
|
|
36
|
-
"x-ms-summary": "Unauthorized"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
"security": [
|
|
40
|
-
{
|
|
41
|
-
"Implicit": [
|
|
42
|
-
"api://2d964377-8322-482d-bd45-3134b48a9da5/user_impersonation"
|
|
43
|
-
]
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"/v1.0/cv-partner-to-sanity": {
|
|
49
|
-
"get": {
|
|
50
|
-
"tags": [
|
|
51
|
-
"Sync"
|
|
52
|
-
],
|
|
53
|
-
"summary": "Syncs CV Partner to Sanity",
|
|
54
|
-
"description": "Synchronizes data from CV Partner to Sanity.",
|
|
55
|
-
"operationId": "SyncCvPartnerToSanity",
|
|
56
|
-
"responses": {
|
|
57
|
-
"200": {
|
|
58
|
-
"description": "Data synchronized successfully",
|
|
59
|
-
"content": {
|
|
60
|
-
"application/json": {
|
|
61
|
-
"schema": {
|
|
62
|
-
"type": "string"
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"x-ms-summary": "Success"
|
|
67
|
-
},
|
|
68
|
-
"401": {
|
|
69
|
-
"description": "Unauthorized access",
|
|
70
|
-
"x-ms-summary": "Unauthorized"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"security": [
|
|
74
|
-
{
|
|
75
|
-
"Implicit": [
|
|
76
|
-
"api://2d964377-8322-482d-bd45-3134b48a9da5/user_impersonation"
|
|
77
|
-
]
|
|
78
|
-
}
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"/v1.0/power-office-to-sanity": {
|
|
83
|
-
"get": {
|
|
84
|
-
"tags": [
|
|
85
|
-
"Sync"
|
|
86
|
-
],
|
|
87
|
-
"summary": "Sync power office data to sanity",
|
|
88
|
-
"description": "Sync power office data to sanity",
|
|
89
|
-
"operationId": "SyncPowerOfficeToSanity",
|
|
90
|
-
"parameters": [
|
|
91
|
-
{
|
|
92
|
-
"name": "from",
|
|
93
|
-
"in": "query",
|
|
94
|
-
"description": "",
|
|
95
|
-
"required": true,
|
|
96
|
-
"schema": {
|
|
97
|
-
"type": "string",
|
|
98
|
-
"format": "date-time"
|
|
99
|
-
},
|
|
100
|
-
"x-ms-summary": "Date from"
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
"name": "to",
|
|
104
|
-
"in": "query",
|
|
105
|
-
"description": "",
|
|
106
|
-
"required": true,
|
|
107
|
-
"schema": {
|
|
108
|
-
"type": "string",
|
|
109
|
-
"format": "date-time"
|
|
110
|
-
},
|
|
111
|
-
"x-ms-summary": "Date to"
|
|
112
|
-
}
|
|
113
|
-
],
|
|
114
|
-
"responses": {
|
|
115
|
-
"200": {
|
|
116
|
-
"description": "Data synchronized successfully",
|
|
117
|
-
"content": {
|
|
118
|
-
"application/json": {
|
|
119
|
-
"schema": {
|
|
120
|
-
"type": "string"
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
"x-ms-summary": "Success"
|
|
125
|
-
},
|
|
126
|
-
"401": {
|
|
127
|
-
"description": "Unauthorized access",
|
|
128
|
-
"x-ms-summary": "Unauthorized"
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
"security": [
|
|
132
|
-
{
|
|
133
|
-
"Implicit": [
|
|
134
|
-
"api://2d964377-8322-482d-bd45-3134b48a9da5/user_impersonation"
|
|
135
|
-
]
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
"/v1.0/okrs-to-sanity": {
|
|
141
|
-
"get": {
|
|
142
|
-
"tags": [
|
|
143
|
-
"Sync"
|
|
144
|
-
],
|
|
145
|
-
"summary": "Sync OKRs",
|
|
146
|
-
"description": "Synchronizes OKRs",
|
|
147
|
-
"operationId": "SyncOkrs",
|
|
148
|
-
"responses": {
|
|
149
|
-
"200": {
|
|
150
|
-
"description": "OKRs synchronized successfully",
|
|
151
|
-
"x-ms-summary": "Success"
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
"security": [
|
|
155
|
-
{
|
|
156
|
-
"Implicit": [
|
|
157
|
-
"api://2d964377-8322-482d-bd45-3134b48a9da5/user_impersonation"
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
"components": {
|
|
165
|
-
"securitySchemes": {
|
|
166
|
-
"Implicit": {
|
|
167
|
-
"type": "oauth2",
|
|
168
|
-
"flows": {
|
|
169
|
-
"implicit": {
|
|
170
|
-
"authorizationUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/authorize",
|
|
171
|
-
"tokenUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
|
|
172
|
-
"refreshUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
|
|
173
|
-
"scopes": {
|
|
174
|
-
"api://2d964377-8322-482d-bd45-3134b48a9da5/user_impersonation": "Default function scope"
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|