@snokam/mcp-api 0.58.0 → 0.59.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.
@@ -0,0 +1,625 @@
1
+ {
2
+ "openapi": "3.0.1",
3
+ "info": {
4
+ "title": "Webshop API",
5
+ "description": "Webshop service",
6
+ "version": "v1.0.0"
7
+ },
8
+ "servers": [
9
+ {
10
+ "url": "https://webshop.api.test.snokam.no"
11
+ }
12
+ ],
13
+ "paths": {
14
+ "/v1.1/GetWebshopProducts": {
15
+ "get": {
16
+ "tags": [
17
+ "Webshop"
18
+ ],
19
+ "summary": "Gets webshop products",
20
+ "description": "Retrieves a list of webshop products.",
21
+ "operationId": "GetWebshopProducts",
22
+ "responses": {
23
+ "200": {
24
+ "description": "List of webshop products retrieved successfully",
25
+ "content": {
26
+ "application/json": {
27
+ "schema": {
28
+ "type": "array",
29
+ "items": {
30
+ "$ref": "#/components/schemas/equipment"
31
+ }
32
+ }
33
+ }
34
+ },
35
+ "x-ms-summary": "Success"
36
+ }
37
+ },
38
+ "security": [
39
+ {
40
+ "Implicit": [
41
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
42
+ ]
43
+ }
44
+ ]
45
+ }
46
+ },
47
+ "/v1.1/GetMyOrders": {
48
+ "get": {
49
+ "tags": [
50
+ "Orders"
51
+ ],
52
+ "summary": "Gets user's orders",
53
+ "description": "Retrieves the orders of the authenticated user.",
54
+ "operationId": "GetMyOrders",
55
+ "responses": {
56
+ "200": {
57
+ "description": "User's orders retrieved successfully",
58
+ "content": {
59
+ "application/json": {
60
+ "schema": {
61
+ "type": "array",
62
+ "items": {
63
+ "$ref": "#/components/schemas/innerOrder"
64
+ }
65
+ }
66
+ }
67
+ },
68
+ "x-ms-summary": "Success"
69
+ },
70
+ "401": {
71
+ "description": "User is not authenticated",
72
+ "x-ms-summary": "Unauthorized"
73
+ }
74
+ },
75
+ "security": [
76
+ {
77
+ "Implicit": [
78
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
79
+ ]
80
+ }
81
+ ]
82
+ }
83
+ },
84
+ "/v1.1/PlaceMyOrder": {
85
+ "post": {
86
+ "tags": [
87
+ "Orders"
88
+ ],
89
+ "summary": "Places an order",
90
+ "description": "Places a new order for the authenticated user.",
91
+ "operationId": "PlaceMyOrder",
92
+ "requestBody": {
93
+ "description": "Order details",
94
+ "content": {
95
+ "application/json": {
96
+ "schema": {
97
+ "$ref": "#/components/schemas/order"
98
+ }
99
+ }
100
+ },
101
+ "required": true
102
+ },
103
+ "responses": {
104
+ "200": {
105
+ "description": "Order placed successfully",
106
+ "content": {
107
+ "application/json": {
108
+ "schema": {
109
+ "$ref": "#/components/schemas/order"
110
+ }
111
+ }
112
+ },
113
+ "x-ms-summary": "Success"
114
+ },
115
+ "401": {
116
+ "description": "User is not authenticated",
117
+ "x-ms-summary": "Unauthorized"
118
+ }
119
+ },
120
+ "security": [
121
+ {
122
+ "Implicit": [
123
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
124
+ ]
125
+ }
126
+ ]
127
+ }
128
+ },
129
+ "/v1.1/RemoveMyOrder": {
130
+ "post": {
131
+ "tags": [
132
+ "Orders"
133
+ ],
134
+ "summary": "Removes an order",
135
+ "description": "Removes an order for the authenticated user.",
136
+ "operationId": "RemoveMyOrder",
137
+ "requestBody": {
138
+ "description": "Sanity document ID of the order to remove",
139
+ "content": {
140
+ "application/json": {
141
+ "schema": {
142
+ "$ref": "#/components/schemas/removeOrder"
143
+ }
144
+ }
145
+ },
146
+ "required": true
147
+ },
148
+ "responses": {
149
+ "200": {
150
+ "description": "Order removed successfully",
151
+ "content": {
152
+ "application/json": {
153
+ "schema": {
154
+ "type": "boolean"
155
+ }
156
+ }
157
+ },
158
+ "x-ms-summary": "Success"
159
+ },
160
+ "401": {
161
+ "description": "User is not authenticated",
162
+ "x-ms-summary": "Unauthorized"
163
+ },
164
+ "500": {
165
+ "description": "Failed to remove order",
166
+ "x-ms-summary": "Internal Server Error"
167
+ }
168
+ },
169
+ "security": [
170
+ {
171
+ "Implicit": [
172
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
173
+ ]
174
+ }
175
+ ]
176
+ }
177
+ },
178
+ "/v1.1/GetAllOrdersGroupedByEmployee": {
179
+ "get": {
180
+ "tags": [
181
+ "Orders"
182
+ ],
183
+ "summary": "Gets all orders grouped by employee",
184
+ "description": "Retrieves all orders grouped by employee.",
185
+ "operationId": "GetAllOrdersGroupedByEmployee",
186
+ "responses": {
187
+ "200": {
188
+ "description": "Orders grouped by employee retrieved successfully",
189
+ "content": {
190
+ "application/json": {
191
+ "schema": {
192
+ "type": "object",
193
+ "additionalProperties": {
194
+ "$ref": "#/components/schemas/list_adminOrder"
195
+ }
196
+ }
197
+ }
198
+ },
199
+ "x-ms-summary": "Success"
200
+ }
201
+ },
202
+ "security": [
203
+ {
204
+ "Implicit": [
205
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
206
+ ]
207
+ }
208
+ ]
209
+ }
210
+ },
211
+ "/v1.1/GetAllOrdersGroupedByEquipment": {
212
+ "get": {
213
+ "tags": [
214
+ "Orders"
215
+ ],
216
+ "summary": "Gets all orders grouped by equipment",
217
+ "description": "Retrieves all orders grouped by equipment.",
218
+ "operationId": "GetAllOrdersGroupedByEquipment",
219
+ "responses": {
220
+ "200": {
221
+ "description": "Orders grouped by equipment retrieved successfully",
222
+ "content": {
223
+ "application/json": {
224
+ "schema": {
225
+ "type": "object",
226
+ "additionalProperties": {
227
+ "$ref": "#/components/schemas/list_adminOrder"
228
+ }
229
+ }
230
+ }
231
+ },
232
+ "x-ms-summary": "Success"
233
+ }
234
+ },
235
+ "security": [
236
+ {
237
+ "Implicit": [
238
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
239
+ ]
240
+ }
241
+ ]
242
+ }
243
+ },
244
+ "/v1.1/AssignOrdersToEmployees": {
245
+ "post": {
246
+ "tags": [
247
+ "Orders"
248
+ ],
249
+ "summary": "Assigns orders to employees",
250
+ "description": "Assigns orders to employees for the current year.",
251
+ "operationId": "AssignOrdersToEmployees",
252
+ "requestBody": {
253
+ "description": "List of order IDs to assign",
254
+ "content": {
255
+ "application/json": {
256
+ "schema": {
257
+ "type": "array",
258
+ "items": {
259
+ "type": "string"
260
+ }
261
+ }
262
+ }
263
+ },
264
+ "required": true
265
+ },
266
+ "responses": {
267
+ "200": {
268
+ "description": "Orders assigned to employees successfully",
269
+ "content": {
270
+ "application/json": {
271
+ "schema": {
272
+ "type": "string"
273
+ }
274
+ }
275
+ },
276
+ "x-ms-summary": "Success"
277
+ },
278
+ "401": {
279
+ "description": "User is not authenticated",
280
+ "x-ms-summary": "Unauthorized"
281
+ }
282
+ },
283
+ "security": [
284
+ {
285
+ "Implicit": [
286
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default"
287
+ ]
288
+ }
289
+ ]
290
+ }
291
+ }
292
+ },
293
+ "components": {
294
+ "schemas": {
295
+ "adminOrder": {
296
+ "required": [
297
+ "orderId",
298
+ "equipmentId",
299
+ "employee"
300
+ ],
301
+ "type": "object",
302
+ "properties": {
303
+ "orderId": {
304
+ "minLength": 1,
305
+ "type": "string"
306
+ },
307
+ "equipmentId": {
308
+ "minLength": 1,
309
+ "type": "string"
310
+ },
311
+ "employee": {
312
+ "minLength": 1,
313
+ "type": "string"
314
+ },
315
+ "size": {
316
+ "type": "string"
317
+ },
318
+ "kind": {
319
+ "type": "string"
320
+ },
321
+ "other": {
322
+ "type": "string"
323
+ },
324
+ "image": {
325
+ "type": "string"
326
+ },
327
+ "quantity": {
328
+ "type": "integer",
329
+ "format": "int32",
330
+ "nullable": true
331
+ },
332
+ "price": {
333
+ "type": "number",
334
+ "format": "float",
335
+ "nullable": true
336
+ },
337
+ "offeredPrice": {
338
+ "type": "number",
339
+ "format": "float",
340
+ "nullable": true
341
+ },
342
+ "choosenVariant": {
343
+ "$ref": "#/components/schemas/availableVariants"
344
+ },
345
+ "date": {
346
+ "type": "string"
347
+ }
348
+ }
349
+ },
350
+ "availableVariants": {
351
+ "type": "object",
352
+ "properties": {
353
+ "size": {
354
+ "type": "string"
355
+ },
356
+ "inventory": {
357
+ "type": "number",
358
+ "format": "double",
359
+ "nullable": true
360
+ }
361
+ }
362
+ },
363
+ "description": {
364
+ "type": "object",
365
+ "properties": {
366
+ "descriptionChildren": {
367
+ "type": "array",
368
+ "items": {
369
+ "$ref": "#/components/schemas/descriptionChild"
370
+ }
371
+ },
372
+ "sanityType": {
373
+ "type": "string"
374
+ },
375
+ "sanityKey": {
376
+ "type": "string"
377
+ }
378
+ }
379
+ },
380
+ "descriptionChild": {
381
+ "type": "object",
382
+ "properties": {
383
+ "marks": {
384
+ "type": "array",
385
+ "items": {
386
+ "type": "string"
387
+ }
388
+ },
389
+ "text": {
390
+ "type": "string"
391
+ },
392
+ "sanityType": {
393
+ "type": "string"
394
+ },
395
+ "sanityKey": {
396
+ "type": "string"
397
+ }
398
+ }
399
+ },
400
+ "employee": {
401
+ "type": "object",
402
+ "properties": {
403
+ "name": {
404
+ "type": "string"
405
+ },
406
+ "email": {
407
+ "type": "string"
408
+ },
409
+ "startDate": {
410
+ "type": "string"
411
+ },
412
+ "ownership": {
413
+ "type": "number",
414
+ "format": "float",
415
+ "nullable": true
416
+ },
417
+ "boardMember": {
418
+ "type": "boolean",
419
+ "nullable": true
420
+ },
421
+ "imageUrl": {
422
+ "type": "string"
423
+ }
424
+ }
425
+ },
426
+ "equipment": {
427
+ "type": "object",
428
+ "properties": {
429
+ "sanityId": {
430
+ "type": "string"
431
+ },
432
+ "sanityType": {
433
+ "type": "string"
434
+ },
435
+ "title": {
436
+ "type": "string"
437
+ },
438
+ "date": {
439
+ "type": "string"
440
+ },
441
+ "available": {
442
+ "type": "boolean",
443
+ "nullable": true
444
+ },
445
+ "availableSex": {
446
+ "type": "array",
447
+ "items": {
448
+ "type": "string"
449
+ }
450
+ },
451
+ "availableVariants": {
452
+ "type": "array",
453
+ "items": {
454
+ "$ref": "#/components/schemas/variant"
455
+ }
456
+ },
457
+ "price": {
458
+ "type": "number",
459
+ "format": "double",
460
+ "nullable": true
461
+ },
462
+ "offeredPrice": {
463
+ "type": "number",
464
+ "format": "double",
465
+ "nullable": true
466
+ },
467
+ "descriptions": {
468
+ "type": "array",
469
+ "items": {
470
+ "$ref": "#/components/schemas/description"
471
+ }
472
+ },
473
+ "images": {
474
+ "type": "array",
475
+ "items": {
476
+ "$ref": "#/components/schemas/image"
477
+ }
478
+ }
479
+ }
480
+ },
481
+ "image": {
482
+ "type": "object",
483
+ "properties": {
484
+ "sanityType": {
485
+ "type": "string"
486
+ },
487
+ "sanityKey": {
488
+ "type": "string"
489
+ },
490
+ "asset": {
491
+ "$ref": "#/components/schemas/imageAsset"
492
+ }
493
+ }
494
+ },
495
+ "imageAsset": {
496
+ "type": "object",
497
+ "properties": {
498
+ "sanityType": {
499
+ "type": "string"
500
+ },
501
+ "mimeType": {
502
+ "type": "string"
503
+ },
504
+ "originalFilename": {
505
+ "type": "string"
506
+ },
507
+ "url": {
508
+ "type": "string"
509
+ }
510
+ }
511
+ },
512
+ "innerOrder": {
513
+ "required": [
514
+ "equipmentId"
515
+ ],
516
+ "type": "object",
517
+ "properties": {
518
+ "sanityId": {
519
+ "type": "string"
520
+ },
521
+ "equipmentId": {
522
+ "minLength": 1,
523
+ "type": "string"
524
+ },
525
+ "size": {
526
+ "type": "string"
527
+ },
528
+ "kind": {
529
+ "type": "string"
530
+ },
531
+ "other": {
532
+ "type": "string"
533
+ },
534
+ "quantity": {
535
+ "type": "integer",
536
+ "format": "int32",
537
+ "nullable": true
538
+ },
539
+ "employee": {
540
+ "$ref": "#/components/schemas/employee"
541
+ }
542
+ }
543
+ },
544
+ "list_adminOrder": {
545
+ "type": "array",
546
+ "items": {
547
+ "$ref": "#/components/schemas/adminOrder"
548
+ }
549
+ },
550
+ "order": {
551
+ "required": [
552
+ "equipmentId",
553
+ "size",
554
+ "kind",
555
+ "other",
556
+ "quantity"
557
+ ],
558
+ "type": "object",
559
+ "properties": {
560
+ "equipmentId": {
561
+ "minLength": 1,
562
+ "type": "string",
563
+ "description": "Equipment uuid"
564
+ },
565
+ "size": {
566
+ "minLength": 1,
567
+ "type": "string"
568
+ },
569
+ "kind": {
570
+ "minLength": 1,
571
+ "type": "string"
572
+ },
573
+ "other": {
574
+ "minLength": 1,
575
+ "type": "string"
576
+ },
577
+ "quantity": {
578
+ "type": "integer",
579
+ "format": "int32",
580
+ "nullable": true
581
+ }
582
+ }
583
+ },
584
+ "removeOrder": {
585
+ "required": [
586
+ "orderId"
587
+ ],
588
+ "type": "object",
589
+ "properties": {
590
+ "orderId": {
591
+ "minLength": 1,
592
+ "type": "string"
593
+ }
594
+ }
595
+ },
596
+ "variant": {
597
+ "type": "object",
598
+ "properties": {
599
+ "size": {
600
+ "type": "string"
601
+ },
602
+ "inventory": {
603
+ "type": "number",
604
+ "format": "double"
605
+ }
606
+ }
607
+ }
608
+ },
609
+ "securitySchemes": {
610
+ "Implicit": {
611
+ "type": "oauth2",
612
+ "flows": {
613
+ "implicit": {
614
+ "authorizationUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/authorize",
615
+ "tokenUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
616
+ "refreshUrl": "https://login.microsoftonline.com/a8533784-aa3c-403b-a61a-1533ecc6e3ed/oauth2/v2.0/token",
617
+ "scopes": {
618
+ "api://1a97b354-f175-4f81-8a6d-f6b3b6cb9824/.default": "Default function scope"
619
+ }
620
+ }
621
+ }
622
+ }
623
+ }
624
+ }
625
+ }