@snokam/mcp-api 0.6.0 → 0.8.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 CHANGED
@@ -17,6 +17,7 @@ import { getAccessToken } from "./auth.js";
17
17
  let currentEnvironment = process.env.SNOKAM_ENVIRONMENT ?? "production";
18
18
  let endpoints = [];
19
19
  let endpointsByTool = new Map();
20
+ const serviceUrlOverrides = new Map();
20
21
  async function loadEndpoints(environment) {
21
22
  currentEnvironment = environment;
22
23
  endpoints = await fetchSpecs(environment);
@@ -24,6 +25,16 @@ async function loadEndpoints(environment) {
24
25
  for (const ep of endpoints) {
25
26
  endpointsByTool.set(ep.toolName, ep);
26
27
  }
28
+ // Re-apply any active URL overrides
29
+ applyUrlOverrides();
30
+ }
31
+ function applyUrlOverrides() {
32
+ for (const ep of endpoints) {
33
+ const override = serviceUrlOverrides.get(ep.service);
34
+ if (override) {
35
+ ep.baseUrl = override;
36
+ }
37
+ }
27
38
  }
28
39
  // ---------------------------------------------------------------------------
29
40
  // Built-in tool: SwitchEnvironment
@@ -46,6 +57,42 @@ const switchToolDef = {
46
57
  },
47
58
  };
48
59
  // ---------------------------------------------------------------------------
60
+ // Built-in tool: SetServiceUrl
61
+ // ---------------------------------------------------------------------------
62
+ const SET_URL_TOOL_NAME = "SetServiceUrl";
63
+ const RESET_URL_TOOL_NAME = "ResetServiceUrl";
64
+ const setUrlToolDef = {
65
+ name: SET_URL_TOOL_NAME,
66
+ description: "Override a service's base URL, e.g. to point to a locally running function. Auth is skipped for localhost URLs. Use ResetServiceUrl to revert.",
67
+ inputSchema: {
68
+ type: "object",
69
+ properties: {
70
+ service: {
71
+ type: "string",
72
+ description: "The service name (e.g. employees, notifications, events)",
73
+ },
74
+ url: {
75
+ type: "string",
76
+ description: "The base URL to use (e.g. http://localhost:7071)",
77
+ },
78
+ },
79
+ required: ["service", "url"],
80
+ },
81
+ };
82
+ const resetUrlToolDef = {
83
+ name: RESET_URL_TOOL_NAME,
84
+ description: "Reset a service's base URL back to the environment default. Call without arguments to reset all overrides.",
85
+ inputSchema: {
86
+ type: "object",
87
+ properties: {
88
+ service: {
89
+ type: "string",
90
+ description: "The service name to reset. Omit to reset all overrides.",
91
+ },
92
+ },
93
+ },
94
+ };
95
+ // ---------------------------------------------------------------------------
49
96
  // JSON Schema builder for tool inputs
50
97
  // ---------------------------------------------------------------------------
51
98
  function buildInputSchema(endpoint) {
@@ -114,9 +161,12 @@ async function executeCall(endpoint, args) {
114
161
  const headers = {
115
162
  Accept: "application/json",
116
163
  };
117
- const token = await getAccessToken(endpoint.scope);
118
- if (token) {
119
- headers.Authorization = `Bearer ${token}`;
164
+ const isLocal = url.startsWith("http://localhost") || url.startsWith("http://127.0.0.1");
165
+ if (!isLocal) {
166
+ const token = await getAccessToken(endpoint.scope);
167
+ if (token) {
168
+ headers.Authorization = `Bearer ${token}`;
169
+ }
120
170
  }
121
171
  let fetchBody;
122
172
  if (args.body !== undefined && endpoint.method !== "GET") {
@@ -246,6 +296,8 @@ Controls: Sonos speakers, lights, YouTube queue
246
296
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
247
297
  tools: [
248
298
  switchToolDef,
299
+ setUrlToolDef,
300
+ resetUrlToolDef,
249
301
  ...endpoints.map((ep) => ({
250
302
  name: ep.toolName,
251
303
  description: ep.description || ep.summary || `${ep.method} ${ep.path}`,
@@ -292,6 +344,56 @@ Controls: Sonos speakers, lights, YouTube queue
292
344
  ],
293
345
  };
294
346
  }
347
+ // Handle SetServiceUrl
348
+ if (name === SET_URL_TOOL_NAME) {
349
+ const service = String(args.service ?? "");
350
+ const url = String(args.url ?? "");
351
+ const serviceEndpoints = endpoints.filter((ep) => ep.service === service);
352
+ if (serviceEndpoints.length === 0) {
353
+ const available = [
354
+ ...new Set(endpoints.map((ep) => ep.service)),
355
+ ].sort();
356
+ return {
357
+ content: [
358
+ {
359
+ type: "text",
360
+ text: `Unknown service: ${service}. Available: ${available.join(", ")}`,
361
+ },
362
+ ],
363
+ isError: true,
364
+ };
365
+ }
366
+ serviceUrlOverrides.set(service, url);
367
+ for (const ep of serviceEndpoints) {
368
+ ep.baseUrl = url;
369
+ }
370
+ return {
371
+ content: [
372
+ {
373
+ type: "text",
374
+ text: `Overrode ${service} → ${url} (${serviceEndpoints.length} endpoints). Auth ${url.startsWith("http://localhost") || url.startsWith("http://127.0.0.1") ? "skipped" : "active"}.`,
375
+ },
376
+ ],
377
+ };
378
+ }
379
+ // Handle ResetServiceUrl
380
+ if (name === RESET_URL_TOOL_NAME) {
381
+ const service = args.service ? String(args.service) : undefined;
382
+ if (service) {
383
+ serviceUrlOverrides.delete(service);
384
+ }
385
+ else {
386
+ serviceUrlOverrides.clear();
387
+ }
388
+ // Reload to restore original URLs
389
+ await loadEndpoints(currentEnvironment);
390
+ const msg = service
391
+ ? `Reset ${service} to environment default`
392
+ : `Reset all service URL overrides`;
393
+ return {
394
+ content: [{ type: "text", text: msg }],
395
+ };
396
+ }
295
397
  const endpoint = endpointsByTool.get(name);
296
398
  if (!endpoint) {
297
399
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snokam/mcp-api",
3
- "version": "0.6.0",
3
+ "version": "0.8.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": {
@@ -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,32 @@
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
+ "tags": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "string"
346
+ }
347
+ },
348
+ "data": {
349
+ "type": "object",
350
+ "additionalProperties": {
351
+ "type": "string"
352
+ }
216
353
  }
217
354
  }
218
355
  },
@@ -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,32 @@
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
+ "tags": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "string"
346
+ }
347
+ },
348
+ "data": {
349
+ "type": "object",
350
+ "additionalProperties": {
351
+ "type": "string"
352
+ }
216
353
  }
217
354
  }
218
355
  },
@@ -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.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
- }