@unchainedshop/api 4.6.2 → 4.7.2

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.
Files changed (53) hide show
  1. package/lib/acl.js +29 -1
  2. package/lib/api-index.d.ts +1 -0
  3. package/lib/auth.js +1 -0
  4. package/lib/context.d.ts +1 -0
  5. package/lib/context.js +8 -3
  6. package/lib/events.d.ts +2 -0
  7. package/lib/events.js +2 -0
  8. package/lib/express/index.d.ts +6 -9
  9. package/lib/express/index.js +52 -125
  10. package/lib/fastify/index.d.ts +6 -9
  11. package/lib/fastify/index.js +51 -113
  12. package/lib/mcp/tools/localization/getLocalizationsConfig.d.ts +1 -1
  13. package/lib/mcp/tools/localization/schemas.d.ts +34 -0
  14. package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts +2 -0
  15. package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts +2 -0
  16. package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts +2 -0
  17. package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts +2 -0
  18. package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts +2 -0
  19. package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts +2 -0
  20. package/lib/mcp/tools/system/handlers/countEvents.d.ts +8 -1
  21. package/lib/mcp/tools/system/handlers/countWork.d.ts +10 -1
  22. package/lib/mcp/tools/system/handlers/countWork.js +1 -0
  23. package/lib/mcp/tools/system/handlers/index.d.ts +4 -4
  24. package/lib/mcp/tools/system/handlers/listEvents.d.ts +12 -1
  25. package/lib/mcp/tools/system/handlers/listWork.d.ts +14 -1
  26. package/lib/mcp/tools/system/handlers/listWork.js +1 -0
  27. package/lib/mcp/tools/users/handlers/addUserEmail.d.ts +2 -0
  28. package/lib/mcp/tools/users/handlers/createUser.d.ts +2 -0
  29. package/lib/mcp/tools/users/handlers/enrollUser.d.ts +2 -0
  30. package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts +2 -0
  31. package/lib/mcp/tools/users/handlers/getUser.d.ts +2 -0
  32. package/lib/mcp/tools/users/handlers/listUsers.d.ts +2 -0
  33. package/lib/mcp/tools/users/handlers/setUserTags.d.ts +2 -0
  34. package/lib/mcp/tools/users/handlers/setUserUsername.d.ts +2 -0
  35. package/lib/mcp/tools/users/handlers/updateUser.d.ts +2 -0
  36. package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts +2 -0
  37. package/lib/mcp/utils/getNormalizedUserDetails.d.ts +2 -0
  38. package/lib/mcp/utils/normalizeMediaUrl.js +1 -1
  39. package/lib/mcp/utils/sanitizeLocalizationEntityData.d.ts +1 -1
  40. package/lib/mcp/utils/validateIsoCode.d.ts +1 -1
  41. package/lib/resolvers/mutations/index.d.ts +1 -6
  42. package/lib/resolvers/mutations/index.js +2 -12
  43. package/lib/resolvers/mutations/orders/updateCart.js +7 -1
  44. package/lib/resolvers/queries/orders/orders.js +2 -2
  45. package/lib/resolvers/type/index.d.ts +0 -1
  46. package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +0 -1
  47. package/lib/resolvers/type/order/order-delivery-pickup-types.js +0 -7
  48. package/lib/roles/index.js +1 -0
  49. package/lib/roles/loggedIn.js +1 -0
  50. package/lib/schema/mutation.js +6 -44
  51. package/lib/schema/types/index.js +2 -2
  52. package/lib/schema/types/order/delivery.js +0 -2
  53. package/package.json +8 -17
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unchainedshop/api",
3
3
  "description": "GraphQL API layer for the Unchained Engine with Express/Fastify adapters and MCP server",
4
- "version": "4.6.2",
4
+ "version": "4.7.2",
5
5
  "main": "lib/api-index.js",
6
6
  "types": "lib/api-index.d.ts",
7
7
  "type": "module",
@@ -63,22 +63,20 @@
63
63
  "@ai-sdk/mcp": "^1",
64
64
  "@fastify/cookie": ">= 11 < 12",
65
65
  "@fastify/multipart": ">= 9 < 10",
66
- "@fastify/session": ">= 11 < 12",
67
66
  "@fastify/static": ">= 9 < 10",
68
67
  "@modelcontextprotocol/sdk": ">= 1 < 2",
69
68
  "ai": ">= 6 < 7",
69
+ "cookie-parser": ">= 1.4 < 2",
70
70
  "express": ">= 5 < 6",
71
- "express-session": ">= 1.18 < 2",
72
71
  "fastify": ">= 5.2 < 6",
73
72
  "graphql-yoga": ">= 5.9 < 6",
74
- "multer": ">= 2 < 3",
75
- "passport": ">= 0.7 < 1"
73
+ "multer": ">= 2 < 3"
76
74
  },
77
75
  "peerDependenciesMeta": {
78
76
  "graphql-yoga": {
79
77
  "optional": false
80
78
  },
81
- "express-session": {
79
+ "cookie-parser": {
82
80
  "optional": false
83
81
  },
84
82
  "@modelcontextprotocol/sdk": {
@@ -99,9 +97,6 @@
99
97
  "@fastify/multipart": {
100
98
  "optional": true
101
99
  },
102
- "@fastify/session": {
103
- "optional": true
104
- },
105
100
  "@fastify/static": {
106
101
  "optional": true
107
102
  },
@@ -110,9 +105,6 @@
110
105
  },
111
106
  "multer": {
112
107
  "optional": true
113
- },
114
- "passport": {
115
- "optional": true
116
108
  }
117
109
  },
118
110
  "dependencies": {
@@ -121,9 +113,10 @@
121
113
  "@unchainedshop/logger": "^4.6.0",
122
114
  "@unchainedshop/roles": "^4.6.0",
123
115
  "@unchainedshop/utils": "^4.6.0",
116
+ "@whatwg-node/server": "^0.10.18",
124
117
  "dataloader": "^2.2.3",
125
- "expiry-map": "^2.0.0",
126
118
  "graphql-scalars": "^1.24.2",
119
+ "jose": "^6.0.10",
127
120
  "mime": ">= 4 < 5",
128
121
  "p-memoize": "^8.0.0",
129
122
  "zod": "^3.25.76 || ^4"
@@ -132,18 +125,16 @@
132
125
  "@ai-sdk/mcp": "^1.0.5",
133
126
  "@fastify/cookie": "^11.0.2",
134
127
  "@fastify/multipart": "^9.0.3",
135
- "@fastify/session": "^11.1.0",
136
128
  "@fastify/static": "^9.0.0",
137
129
  "@modelcontextprotocol/sdk": "^1.15.1",
130
+ "@types/cookie-parser": "^1.4.8",
138
131
  "@types/express": "^5.0.3",
139
- "@types/express-session": "^1.18.2",
140
132
  "@types/node": "^25.0.0",
141
133
  "ai": "^6.0.14",
134
+ "cookie-parser": "^1.4.7",
142
135
  "express": "^5.1.0",
143
- "express-session": "^1.18.1",
144
136
  "fastify": "^5.4.0",
145
137
  "multer": "^2.0.1",
146
- "passport": "^0.7.0",
147
138
  "typescript": "^5.8.3"
148
139
  }
149
140
  }