@unchainedshop/api 4.8.12 → 5.0.0-alpha.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.
- package/lib/acl.d.ts +2 -2
- package/lib/acl.js +36 -8
- package/lib/api-index.d.ts +3 -1
- package/lib/chat/generateImageHandler.js +6 -5
- package/lib/context.d.ts +3 -1
- package/lib/context.js +9 -4
- package/lib/events.d.ts +2 -0
- package/lib/events.js +2 -0
- package/lib/express/createMCPMiddleware.js +1 -1
- package/lib/express/index.d.ts +6 -9
- package/lib/express/index.js +53 -126
- package/lib/fastify/index.d.ts +6 -9
- package/lib/fastify/index.js +52 -118
- package/lib/fastify/mcpHandler.js +1 -1
- package/lib/loaders/buildTextMap.js +6 -3
- package/lib/loaders/index.d.ts +0 -25
- package/lib/loaders/index.js +0 -10
- package/lib/locale-context.d.ts +4 -2
- package/lib/locale-context.js +2 -6
- package/lib/mcp/tools/assortment/assortmentManagement.d.ts +2 -2
- package/lib/mcp/tools/assortment/assortmentManagement.js +2 -2
- package/lib/mcp/tools/assortment/schemas.d.ts +322 -141
- package/lib/mcp/tools/assortment/schemas.js +179 -96
- package/lib/mcp/tools/filter/filterManagement.d.ts +2 -2
- package/lib/mcp/tools/filter/filterManagement.js +2 -2
- package/lib/mcp/tools/filter/schemas.d.ts +184 -75
- package/lib/mcp/tools/filter/schemas.js +87 -51
- package/lib/mcp/tools/localization/getLocalizationsConfig.d.ts +1 -1
- package/lib/mcp/tools/localization/localizationManagement.d.ts +2 -2
- package/lib/mcp/tools/localization/localizationManagement.js +2 -2
- package/lib/mcp/tools/localization/schemas.d.ts +144 -47
- package/lib/mcp/tools/localization/schemas.js +51 -36
- package/lib/mcp/tools/order/handlers/getTopCustomers.d.ts +2 -0
- package/lib/mcp/tools/order/orderManagement.d.ts +2 -2
- package/lib/mcp/tools/order/orderManagement.js +2 -2
- package/lib/mcp/tools/order/schemas.d.ts +184 -75
- package/lib/mcp/tools/order/schemas.js +113 -51
- package/lib/mcp/tools/product/productManagement.d.ts +2 -2
- package/lib/mcp/tools/product/productManagement.js +2 -2
- package/lib/mcp/tools/product/schemas.d.ts +642 -317
- package/lib/mcp/tools/product/schemas.js +287 -191
- package/lib/mcp/tools/provider/providerManagement.d.ts +2 -2
- package/lib/mcp/tools/provider/providerManagement.js +2 -2
- package/lib/mcp/tools/provider/schemas.d.ts +142 -47
- package/lib/mcp/tools/provider/schemas.js +67 -32
- package/lib/mcp/tools/quotation/handlers/getQuotation.d.ts +2 -0
- package/lib/mcp/tools/quotation/handlers/listQuotations.d.ts +2 -0
- package/lib/mcp/tools/quotation/handlers/makeQuotationProposal.d.ts +2 -0
- package/lib/mcp/tools/quotation/handlers/rejectQuotation.d.ts +2 -0
- package/lib/mcp/tools/quotation/handlers/verifyQuotation.d.ts +2 -0
- package/lib/mcp/tools/quotation/quotationManagement.d.ts +2 -2
- package/lib/mcp/tools/quotation/quotationManagement.js +2 -2
- package/lib/mcp/tools/quotation/schemas.d.ts +111 -40
- package/lib/mcp/tools/quotation/schemas.js +54 -29
- package/lib/mcp/tools/system/handlers/countEvents.d.ts +8 -1
- package/lib/mcp/tools/system/handlers/countWork.d.ts +10 -1
- package/lib/mcp/tools/system/handlers/countWork.js +1 -0
- package/lib/mcp/tools/system/handlers/index.d.ts +4 -4
- package/lib/mcp/tools/system/handlers/listEvents.d.ts +12 -1
- package/lib/mcp/tools/system/handlers/listWork.d.ts +14 -1
- package/lib/mcp/tools/system/handlers/listWork.js +1 -0
- package/lib/mcp/tools/system/schemas.d.ts +179 -84
- package/lib/mcp/tools/system/schemas.js +188 -67
- package/lib/mcp/tools/system/systemManagement.d.ts +1 -1
- package/lib/mcp/tools/system/systemManagement.js +1 -1
- package/lib/mcp/tools/users/handlers/addUserEmail.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/createUser.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/enrollUser.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/getCurrentUser.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/getUser.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/listUsers.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/setUserTags.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/setUserUsername.d.ts +2 -0
- package/lib/mcp/tools/users/handlers/updateUser.d.ts +2 -0
- package/lib/mcp/tools/users/schemas.d.ts +296 -163
- package/lib/mcp/tools/users/schemas.js +152 -71
- package/lib/mcp/tools/users/usersManagement.d.ts +2 -2
- package/lib/mcp/tools/users/usersManagement.js +2 -2
- package/lib/mcp/utils/getNormalizedQuotationDetails.d.ts +2 -0
- package/lib/mcp/utils/getNormalizedUserDetails.d.ts +2 -0
- package/lib/mcp/utils/normalizeMediaUrl.js +1 -1
- package/lib/mcp/utils/sanitizeLocalizationEntityData.d.ts +1 -1
- package/lib/mcp/utils/sharedSchemas.d.ts +28 -39
- package/lib/mcp/utils/sharedSchemas.js +28 -47
- package/lib/mcp/utils/validateIsoCode.d.ts +1 -1
- package/lib/middleware/createAuthMiddleware.js +1 -3
- package/lib/resolvers/mutations/accounts/changePassword.js +1 -2
- package/lib/resolvers/mutations/index.d.ts +150 -155
- package/lib/resolvers/mutations/index.js +2 -12
- package/lib/resolvers/mutations/orders/updateCart.js +7 -1
- package/lib/resolvers/mutations/users/setRoles.d.ts +1 -1
- package/lib/resolvers/mutations/users/setRoles.js +6 -4
- package/lib/resolvers/queries/events/registeredEventTypes.d.ts +1 -1
- package/lib/resolvers/queries/events/registeredEventTypes.js +1 -1
- package/lib/resolvers/queries/index.d.ts +71 -71
- package/lib/resolvers/queries/index.js +1 -1
- package/lib/resolvers/type/index.d.ts +5 -6
- package/lib/resolvers/type/order/order-delivery-pickup-types.d.ts +0 -1
- package/lib/resolvers/type/order/order-delivery-pickup-types.js +0 -7
- package/lib/resolvers/type/order/order-types.d.ts +5 -5
- package/lib/resolvers/type/order/order-types.js +27 -12
- package/lib/resolvers/type/shop-types.js +1 -1
- package/lib/resolvers/type/user-types.js +3 -3
- package/lib/roles/index.d.ts +4 -11
- package/lib/roles/index.js +16 -11
- package/lib/roles/loggedIn.js +2 -1
- package/lib/schema/mutation.js +6 -44
- package/lib/schema/query.js +5 -5
- package/lib/schema/types/index.js +2 -2
- package/lib/schema/types/order/delivery.js +0 -2
- package/package.json +14 -24
|
@@ -1,158 +1,153 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
logout: (root: any, params: any, context: any,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
removeWork: (root: any, params: any, context: any, info: any) => Promise<any>;
|
|
153
|
-
processNextWork: (root: any, params: any, context: any, info: any) => Promise<any>;
|
|
154
|
-
signPaymentProviderForCredentialRegistration: (root: any, params: any, context: any, info: any) => Promise<any>;
|
|
155
|
-
signPaymentProviderForCheckout: (root: any, params: any, context: any, info: any) => Promise<any>;
|
|
156
|
-
removeUserProductReviews: (root: any, params: any, context: any, info: any) => Promise<any>;
|
|
2
|
+
logout: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
3
|
+
logoutAllSessions: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
4
|
+
loginAsGuest: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
5
|
+
impersonate: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
6
|
+
stopImpersonation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
7
|
+
createWebAuthnCredentialCreationOptions: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
8
|
+
createWebAuthnCredentialRequestOptions: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
9
|
+
addPushSubscription: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
10
|
+
removePushSubscription: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
11
|
+
addWebAuthnCredentials: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
12
|
+
removeWebAuthnCredentials: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
13
|
+
addWeb3Address: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
14
|
+
removeWeb3Address: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
15
|
+
verifyWeb3Address: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
16
|
+
verifyEmail: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
17
|
+
loginWithPassword: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
18
|
+
loginWithWebAuthn: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
19
|
+
pageView: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
20
|
+
createUser: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
21
|
+
forgotPassword: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
22
|
+
resetPassword: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
23
|
+
sendVerificationEmail: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
24
|
+
sendEnrollmentEmail: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
25
|
+
changePassword: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
26
|
+
heartbeat: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
27
|
+
addEmail: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
28
|
+
removeEmail: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
29
|
+
updateUserProfile: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
30
|
+
removeUser: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
31
|
+
setPassword: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
32
|
+
prepareUserAvatarUpload: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
33
|
+
setUserTags: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
34
|
+
setUsername: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
35
|
+
setRoles: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
36
|
+
enrollUser: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
37
|
+
registerPaymentCredentials: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
38
|
+
markPaymentCredentialsPreferred: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
39
|
+
removePaymentCredentials: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
40
|
+
createLanguage: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
41
|
+
updateLanguage: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
42
|
+
removeLanguage: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
43
|
+
createCountry: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
44
|
+
updateCountry: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
45
|
+
removeCountry: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
46
|
+
createProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
47
|
+
publishProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
48
|
+
unpublishProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
49
|
+
removeProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
50
|
+
updateProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
51
|
+
updateProductTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
52
|
+
updateProductMediaTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
53
|
+
confirmMediaUpload: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
54
|
+
prepareProductMediaUpload: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
55
|
+
reorderProductMedia: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
56
|
+
removeProductMedia: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
57
|
+
updateProductCommerce: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
58
|
+
updateProductWarehousing: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
59
|
+
updateProductSupply: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
60
|
+
updateProductPlan: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
61
|
+
updateProductTokenization: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
62
|
+
removeProductVariation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
63
|
+
updateProductVariationTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
64
|
+
removeProductVariationOption: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
65
|
+
createProductVariation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
66
|
+
createProductBundleItem: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
67
|
+
removeBundleItem: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
68
|
+
createProductVariationOption: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
69
|
+
addProductAssignment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
70
|
+
removeProductAssignment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
71
|
+
createCurrency: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
72
|
+
updateCurrency: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
73
|
+
removeCurrency: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
74
|
+
createCart: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
75
|
+
addCartProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
76
|
+
addMultipleCartProducts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
77
|
+
addCartDiscount: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
78
|
+
addCartQuotation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
79
|
+
updateCart: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
80
|
+
emptyCart: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
81
|
+
checkoutCart: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
82
|
+
updateCartItem: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
83
|
+
removeCartItem: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
84
|
+
removeCartDiscount: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
85
|
+
updateCartDeliveryPickUp: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
86
|
+
updateCartDeliveryShipping: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
87
|
+
updateCartPaymentGeneric: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
88
|
+
updateCartPaymentInvoice: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
89
|
+
removeOrder: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
90
|
+
confirmOrder: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
91
|
+
rejectOrder: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
92
|
+
payOrder: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
93
|
+
deliverOrder: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
94
|
+
createEnrollment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
95
|
+
terminateEnrollment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
96
|
+
activateEnrollment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
97
|
+
updateEnrollment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
98
|
+
createPaymentProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
99
|
+
updatePaymentProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
100
|
+
removePaymentProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
101
|
+
createDeliveryProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
102
|
+
updateDeliveryProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
103
|
+
removeDeliveryProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
104
|
+
createWarehousingProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
105
|
+
updateWarehousingProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
106
|
+
removeWarehousingProvider: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
107
|
+
exportToken: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
108
|
+
invalidateToken: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
109
|
+
createFilter: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
110
|
+
updateFilter: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
111
|
+
removeFilter: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
112
|
+
updateFilterTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
113
|
+
removeFilterOption: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
114
|
+
createFilterOption: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
115
|
+
createAssortment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
116
|
+
prepareAssortmentMediaUpload: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
117
|
+
updateAssortment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
118
|
+
removeAssortment: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
119
|
+
reorderAssortmentMedia: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
120
|
+
removeAssortmentMedia: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
121
|
+
updateAssortmentMediaTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
122
|
+
updateAssortmentTexts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
123
|
+
addAssortmentProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
124
|
+
removeAssortmentProduct: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
125
|
+
reorderAssortmentProducts: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
126
|
+
addAssortmentLink: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
127
|
+
removeAssortmentLink: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
128
|
+
reorderAssortmentLinks: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
129
|
+
addAssortmentFilter: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
130
|
+
removeAssortmentFilter: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
131
|
+
reorderAssortmentFilters: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
132
|
+
createProductReview: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
133
|
+
updateProductReview: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
134
|
+
removeProductReview: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
135
|
+
addProductReviewVote: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
136
|
+
removeProductReviewVote: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
137
|
+
requestQuotation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
138
|
+
rejectQuotation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
139
|
+
verifyQuotation: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
140
|
+
makeQuotationProposal: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
141
|
+
bookmark: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
142
|
+
createBookmark: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
143
|
+
removeBookmark: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
144
|
+
addWork: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
145
|
+
allocateWork: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
146
|
+
finishWork: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
147
|
+
removeWork: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
148
|
+
processNextWork: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
149
|
+
signPaymentProviderForCredentialRegistration: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
150
|
+
signPaymentProviderForCheckout: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
151
|
+
removeUserProductReviews: (root: any, params: any, context: any, ...other: any[]) => Promise<any>;
|
|
157
152
|
};
|
|
158
153
|
export default _default;
|
|
@@ -4,6 +4,7 @@ import loginWithPassword from "./accounts/loginWithPassword.js";
|
|
|
4
4
|
import loginWithWebAuthn from "./accounts/loginWithWebAuthn.js";
|
|
5
5
|
import loginAsGuest from "./accounts/loginAsGuest.js";
|
|
6
6
|
import logout from "./accounts/logout.js";
|
|
7
|
+
import logoutAllSessions from "./accounts/logoutAllSessions.js";
|
|
7
8
|
import impersonate from "./accounts/impersonate.js";
|
|
8
9
|
import stopImpersonation from "./accounts/stopImpersonation.js";
|
|
9
10
|
import changePassword from "./accounts/changePassword.js";
|
|
@@ -69,8 +70,6 @@ import updateCartItem from "./orders/updateCartItem.js";
|
|
|
69
70
|
import removeCartItem from "./orders/removeCartItem.js";
|
|
70
71
|
import removeCartDiscount from "./orders/removeCartDiscount.js";
|
|
71
72
|
import removeOrder from "./orders/removeOrder.js";
|
|
72
|
-
import setOrderPaymentProvider from "./orders/setOrderPaymentProvider.js";
|
|
73
|
-
import setOrderDeliveryProvider from "./orders/setOrderDeliveryProvider.js";
|
|
74
73
|
import confirmOrder from "./orders/confirmOrder.js";
|
|
75
74
|
import payOrder from "./orders/payOrder.js";
|
|
76
75
|
import deliverOrder from "./orders/deliverOrder.js";
|
|
@@ -134,10 +133,6 @@ import updateEnrollment from "./enrollments/updateEnrollment.js";
|
|
|
134
133
|
import registerPaymentCredentials from "./payment/registerPaymentCredentials.js";
|
|
135
134
|
import markPaymentCredentialsPreferred from "./payment/markPaymentCredentialsPreferred.js";
|
|
136
135
|
import removePaymentCredentials from "./payment/removePaymentCredentials.js";
|
|
137
|
-
import updateOrderDeliveryShipping from "./orders/updateOrderDeliveryShipping.js";
|
|
138
|
-
import updateOrderDeliveryPickUp from "./orders/updateOrderDeliveryPickUp.js";
|
|
139
|
-
import updateOrderPaymentGeneric from "./orders/updateOrderPaymentGeneric.js";
|
|
140
|
-
import updateOrderPaymentInvoice from "./orders/updateOrderPaymentInvoice.js";
|
|
141
136
|
import signPaymentProviderForCredentialRegistration from "./payment/signPaymentProviderForCredentialRegistration.js";
|
|
142
137
|
import signPaymentProviderForCheckout from "./orders/signPaymentProviderForCheckout.js";
|
|
143
138
|
import pageView from "./pageView.js";
|
|
@@ -157,6 +152,7 @@ import updateCartPaymentGeneric from "./orders/updateCartPaymentGeneric.js";
|
|
|
157
152
|
import updateCartPaymentInvoice from "./orders/updateCartPaymentInvoice.js";
|
|
158
153
|
export default {
|
|
159
154
|
logout: acl(actions.logout)(logout),
|
|
155
|
+
logoutAllSessions: acl(actions.logoutAllSessions)(logoutAllSessions),
|
|
160
156
|
loginAsGuest: acl(actions.loginAsGuest)(loginAsGuest),
|
|
161
157
|
impersonate: acl(actions.impersonate)(impersonate),
|
|
162
158
|
stopImpersonation: acl(actions.stopImpersonation)(stopImpersonation),
|
|
@@ -242,12 +238,6 @@ export default {
|
|
|
242
238
|
updateCartDeliveryShipping: acl(actions.updateCart)(updateCartDeliveryShipping),
|
|
243
239
|
updateCartPaymentGeneric: acl(actions.updateCart)(updateCartPaymentGeneric),
|
|
244
240
|
updateCartPaymentInvoice: acl(actions.updateCart)(updateCartPaymentInvoice),
|
|
245
|
-
setOrderPaymentProvider: acl(actions.updateOrder)(setOrderPaymentProvider),
|
|
246
|
-
setOrderDeliveryProvider: acl(actions.updateOrder)(setOrderDeliveryProvider),
|
|
247
|
-
updateOrderDeliveryShipping: acl(actions.updateOrderDelivery)(updateOrderDeliveryShipping),
|
|
248
|
-
updateOrderDeliveryPickUp: acl(actions.updateOrderDelivery)(updateOrderDeliveryPickUp),
|
|
249
|
-
updateOrderPaymentGeneric: acl(actions.updateOrderPayment)(updateOrderPaymentGeneric),
|
|
250
|
-
updateOrderPaymentInvoice: acl(actions.updateOrderPayment)(updateOrderPaymentInvoice),
|
|
251
241
|
removeOrder: acl(actions.updateOrder)(removeOrder),
|
|
252
242
|
confirmOrder: acl(actions.markOrderConfirmed)(confirmOrder),
|
|
253
243
|
rejectOrder: acl(actions.markOrderRejected)(rejectOrder),
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
-
import { OrderNotFoundError, OrderWrongStatusError } from "../../../errors.js";
|
|
2
|
+
import { InvalidIdError, OrderNotFoundError, OrderWrongStatusError } from "../../../errors.js";
|
|
3
3
|
export default async function updateCart(root, params, context) {
|
|
4
4
|
const { orderId, billingAddress, contact, paymentProviderId, deliveryProviderId, meta } = params;
|
|
5
5
|
const { modules, services, userId, user } = context;
|
|
6
6
|
log('mutation updateCart', { userId });
|
|
7
|
+
if (orderId === '')
|
|
8
|
+
throw new InvalidIdError({ orderId });
|
|
9
|
+
if (paymentProviderId === '')
|
|
10
|
+
throw new InvalidIdError({ paymentProviderId });
|
|
11
|
+
if (deliveryProviderId === '')
|
|
12
|
+
throw new InvalidIdError({ deliveryProviderId });
|
|
7
13
|
const order = await services.orders.findOrInitCart({
|
|
8
14
|
orderId,
|
|
9
15
|
user: user,
|
|
@@ -2,4 +2,4 @@ import type { Context } from '../../../context.ts';
|
|
|
2
2
|
export default function setRoles(root: never, params: {
|
|
3
3
|
roles: string[];
|
|
4
4
|
userId: string;
|
|
5
|
-
},
|
|
5
|
+
}, context: Context): Promise<import("mongodb").WithId<import("@unchainedshop/core-users").User> | null>;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { log } from '@unchainedshop/logger';
|
|
2
|
-
import { Roles } from '@unchainedshop/roles';
|
|
3
2
|
import { InvalidIdError, UserNotFoundError } from "../../../errors.js";
|
|
4
|
-
|
|
3
|
+
import { getPublicRoles } from "../../../roles/index.js";
|
|
4
|
+
export default async function setRoles(root, params, context) {
|
|
5
|
+
const { modules, userId } = context;
|
|
5
6
|
const foreignUserId = params.userId;
|
|
6
7
|
log(`mutation setRoles ${foreignUserId}`, { userId });
|
|
7
8
|
if (!foreignUserId)
|
|
8
9
|
throw new InvalidIdError({ foreignUserId });
|
|
9
10
|
if (!(await modules.users.userExists({ userId: foreignUserId })))
|
|
10
11
|
throw new UserNotFoundError({ userId: foreignUserId });
|
|
11
|
-
const
|
|
12
|
-
|
|
12
|
+
const publicRoles = getPublicRoles(context.roles);
|
|
13
|
+
const invalidRoles = params.roles.filter((r) => !publicRoles.includes(r));
|
|
14
|
+
if (invalidRoles.length) {
|
|
13
15
|
throw new Error(`Invalid role names: ${invalidRoles.join(', ')}`);
|
|
14
16
|
}
|
|
15
17
|
return modules.users.updateRoles(foreignUserId, params.roles);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function registeredEventTypes(): string[]
|
|
1
|
+
export default function registeredEventTypes(): Promise<string[]>;
|