@haus-storefront-react/vendure-plugin-configs 1.0.4-next.16 → 1.0.4-next.3
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/CHANGELOG.md +0 -156
- package/badge.js +1 -1
- package/badge.mjs +424 -439
- package/campaign.js +1 -1
- package/campaign.mjs +106 -50
- package/compiler-runtime-oPPev21o.js +10 -0
- package/compiler-runtime-qHgugrLy.mjs +296 -0
- package/elastic.js +1 -1
- package/elastic.mjs +26 -10
- package/index-BRlTlK6a.mjs +3768 -0
- package/index-BgBC_k8M.js +1 -0
- package/index-C0E-40z0.mjs +19 -0
- package/index-CgxqXyHf.js +20 -0
- package/index.js +1 -1
- package/index.mjs +4 -2
- package/lib/configs/vendure-badge-plugin.d.ts +2 -10
- package/lib/configs/vendure-badge-plugin.types.d.ts +1 -0
- package/lib/configs/vendure-campaign-plugin.d.ts +1 -1
- package/lib/configs/vendure-elastic-search-plugin.d.ts +1 -1
- package/lib/configs/vendure-packagesize-plugin.d.ts +1 -1
- package/lib/configs/vendure-product-popularity-plugin.d.ts +1 -1
- package/lib/configs/vendure-purchase-order-payment-plugin.d.ts +2 -2
- package/lib/plugin-config.d.ts +1 -2
- package/lib/types.d.ts +0 -1
- package/package.json +5 -25
- package/packagesize.js +1 -1
- package/packagesize.mjs +59 -15
- package/product-popularity.js +1 -1
- package/product-popularity.mjs +22 -12
- package/purchase-order-payment.js +5 -5
- package/purchase-order-payment.mjs +631 -207
- package/useSdk-DOrZRSHz.mjs +2634 -0
- package/useSdk-YXpk8Wsi.js +21 -0
- package/lib/configs/vendure-product-variant-specifications-plugin.d.ts +0 -55
- package/lib/configs/vendure-product-variant-specifications-plugin.types.d.ts +0 -8
- package/lib/configs/vendure-products-by-sku-plugin.d.ts +0 -11
- package/lib/configs/vendure-products-by-sku-plugin.types.d.ts +0 -13
- package/lib/configs/vendure-related-products-plugin.d.ts +0 -39
- package/lib/configs/vendure-related-products-plugin.types.d.ts +0 -16
- package/lib/exports/product-variant-specifications.d.ts +0 -2
- package/lib/exports/products-by-sku.d.ts +0 -3
- package/lib/exports/related-products.d.ts +0 -3
- package/lib/hooks/use-related-products.d.ts +0 -2
- package/lib/strategies/quick-order-variant-sku-validation-strategy.d.ts +0 -6
- package/plugin-config-DrQQb9Ry.js +0 -1
- package/plugin-config-DywohMgp.mjs +0 -903
- package/product-variant-specifications.d.ts +0 -2
- package/product-variant-specifications.js +0 -1
- package/product-variant-specifications.mjs +0 -9
- package/products-by-sku.d.ts +0 -2
- package/products-by-sku.js +0 -1
- package/products-by-sku.mjs +0 -54
- package/related-products.d.ts +0 -2
- package/related-products.js +0 -1
- package/related-products.mjs +0 -35
- package/src-ChzQhPCd.js +0 -6
- package/src-CsM7SeIh.mjs +0 -455
- package/src-Dq29mogl.js +0 -21
- package/src-Dud_XHV6.mjs +0 -2718
|
@@ -1,209 +1,633 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
1
|
+
import { u as O } from "./useSdk-DOrZRSHz.mjs";
|
|
2
|
+
import { V as S } from "./index-BRlTlK6a.mjs";
|
|
3
|
+
import { c as T } from "./compiler-runtime-qHgugrLy.mjs";
|
|
4
|
+
import "react";
|
|
5
|
+
import { useQueryClient as R, useMutation as _ } from "@tanstack/react-query";
|
|
6
|
+
var p = /* @__PURE__ */ ((e) => (e.ACTIVE_ORDER = "activeOrder", e.ACTIVE_CHANNEL = "activeChannel", e.ACTIVE_CUSTOMER = "activeCustomer", e.ACTIVE_CUSTOMER_ORDERS = "activeCustomerOrders", e.AVAILABLE_COUNTRIES = "availableCountries", e.FACETS = "facets", e.ORDER_BY_CODE = "orderByCode", e.ORDER_STATES = "orderStates", e.PRODUCT = "product", e.PAYMENT_METHODS = "paymentMethods", e.SEARCH = "search", e.SEARCH_FIELD = "searchField", e.SHIPPING_METHODS = "shippingMethods", e))(p || {}), N = /* @__PURE__ */ ((e) => (e.AlreadyLoggedInError = "ALREADY_LOGGED_IN_ERROR", e.CouponCodeExpiredError = "COUPON_CODE_EXPIRED_ERROR", e.CouponCodeInvalidError = "COUPON_CODE_INVALID_ERROR", e.CouponCodeLimitError = "COUPON_CODE_LIMIT_ERROR", e.EmailAddressConflictError = "EMAIL_ADDRESS_CONFLICT_ERROR", e.GuestCheckoutError = "GUEST_CHECKOUT_ERROR", e.IdentifierChangeTokenExpiredError = "IDENTIFIER_CHANGE_TOKEN_EXPIRED_ERROR", e.IdentifierChangeTokenInvalidError = "IDENTIFIER_CHANGE_TOKEN_INVALID_ERROR", e.IneligiblePaymentMethodError = "INELIGIBLE_PAYMENT_METHOD_ERROR", e.IneligibleShippingMethodError = "INELIGIBLE_SHIPPING_METHOD_ERROR", e.InsufficientStockError = "INSUFFICIENT_STOCK_ERROR", e.InvalidCredentialsError = "INVALID_CREDENTIALS_ERROR", e.MissingPasswordError = "MISSING_PASSWORD_ERROR", e.NativeAuthStrategyError = "NATIVE_AUTH_STRATEGY_ERROR", e.NegativeQuantityError = "NEGATIVE_QUANTITY_ERROR", e.NotVerifiedError = "NOT_VERIFIED_ERROR", e.NoActiveOrderError = "NO_ACTIVE_ORDER_ERROR", e.OrderLimitError = "ORDER_LIMIT_ERROR", e.OrderModificationError = "ORDER_MODIFICATION_ERROR", e.OrderPaymentStateError = "ORDER_PAYMENT_STATE_ERROR", e.OrderStateTransitionError = "ORDER_STATE_TRANSITION_ERROR", e.PasswordAlreadySetError = "PASSWORD_ALREADY_SET_ERROR", e.PasswordResetTokenExpiredError = "PASSWORD_RESET_TOKEN_EXPIRED_ERROR", e.PasswordResetTokenInvalidError = "PASSWORD_RESET_TOKEN_INVALID_ERROR", e.PasswordValidationError = "PASSWORD_VALIDATION_ERROR", e.PaymentDeclinedError = "PAYMENT_DECLINED_ERROR", e.PaymentFailedError = "PAYMENT_FAILED_ERROR", e.UnknownError = "UNKNOWN_ERROR", e.VerificationTokenExpiredError = "VERIFICATION_TOKEN_EXPIRED_ERROR", e.VerificationTokenInvalidError = "VERIFICATION_TOKEN_INVALID_ERROR", e))(N || {});
|
|
7
|
+
const g = (e, i) => {
|
|
8
|
+
const d = R();
|
|
9
|
+
return _(e, d);
|
|
10
|
+
}, I = {
|
|
11
|
+
kind: "Document",
|
|
12
|
+
definitions: [{
|
|
13
|
+
kind: "FragmentDefinition",
|
|
14
|
+
name: {
|
|
15
|
+
kind: "Name",
|
|
16
|
+
value: "EligiblePaymentMethods"
|
|
17
|
+
},
|
|
18
|
+
typeCondition: {
|
|
19
|
+
kind: "NamedType",
|
|
20
|
+
name: {
|
|
21
|
+
kind: "Name",
|
|
22
|
+
value: "PaymentMethodQuote"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
selectionSet: {
|
|
26
|
+
kind: "SelectionSet",
|
|
27
|
+
selections: [{
|
|
28
|
+
kind: "Field",
|
|
29
|
+
name: {
|
|
30
|
+
kind: "Name",
|
|
31
|
+
value: "id"
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
kind: "Field",
|
|
35
|
+
name: {
|
|
36
|
+
kind: "Name",
|
|
37
|
+
value: "name"
|
|
38
|
+
}
|
|
39
|
+
}, {
|
|
40
|
+
kind: "Field",
|
|
41
|
+
name: {
|
|
42
|
+
kind: "Name",
|
|
43
|
+
value: "description"
|
|
44
|
+
}
|
|
45
|
+
}, {
|
|
46
|
+
kind: "Field",
|
|
47
|
+
name: {
|
|
48
|
+
kind: "Name",
|
|
49
|
+
value: "code"
|
|
50
|
+
}
|
|
51
|
+
}]
|
|
52
|
+
}
|
|
53
|
+
}]
|
|
54
|
+
}, P = {
|
|
55
|
+
kind: "Document",
|
|
56
|
+
definitions: [{
|
|
57
|
+
kind: "OperationDefinition",
|
|
58
|
+
operation: "mutation",
|
|
59
|
+
name: {
|
|
60
|
+
kind: "Name",
|
|
61
|
+
value: "login"
|
|
62
|
+
},
|
|
63
|
+
variableDefinitions: [{
|
|
64
|
+
kind: "VariableDefinition",
|
|
65
|
+
variable: {
|
|
66
|
+
kind: "Variable",
|
|
67
|
+
name: {
|
|
68
|
+
kind: "Name",
|
|
69
|
+
value: "email"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
type: {
|
|
73
|
+
kind: "NonNullType",
|
|
74
|
+
type: {
|
|
75
|
+
kind: "NamedType",
|
|
76
|
+
name: {
|
|
77
|
+
kind: "Name",
|
|
78
|
+
value: "String"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}, {
|
|
83
|
+
kind: "VariableDefinition",
|
|
84
|
+
variable: {
|
|
85
|
+
kind: "Variable",
|
|
86
|
+
name: {
|
|
87
|
+
kind: "Name",
|
|
88
|
+
value: "password"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
type: {
|
|
92
|
+
kind: "NonNullType",
|
|
93
|
+
type: {
|
|
94
|
+
kind: "NamedType",
|
|
95
|
+
name: {
|
|
96
|
+
kind: "Name",
|
|
97
|
+
value: "String"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
kind: "VariableDefinition",
|
|
103
|
+
variable: {
|
|
104
|
+
kind: "Variable",
|
|
105
|
+
name: {
|
|
106
|
+
kind: "Name",
|
|
107
|
+
value: "rememberMe"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
type: {
|
|
111
|
+
kind: "NamedType",
|
|
112
|
+
name: {
|
|
113
|
+
kind: "Name",
|
|
114
|
+
value: "Boolean"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}],
|
|
118
|
+
selectionSet: {
|
|
119
|
+
kind: "SelectionSet",
|
|
120
|
+
selections: [{
|
|
121
|
+
kind: "Field",
|
|
122
|
+
name: {
|
|
123
|
+
kind: "Name",
|
|
124
|
+
value: "login"
|
|
125
|
+
},
|
|
126
|
+
arguments: [{
|
|
127
|
+
kind: "Argument",
|
|
128
|
+
name: {
|
|
129
|
+
kind: "Name",
|
|
130
|
+
value: "username"
|
|
131
|
+
},
|
|
132
|
+
value: {
|
|
133
|
+
kind: "Variable",
|
|
134
|
+
name: {
|
|
135
|
+
kind: "Name",
|
|
136
|
+
value: "email"
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
kind: "Argument",
|
|
141
|
+
name: {
|
|
142
|
+
kind: "Name",
|
|
143
|
+
value: "password"
|
|
144
|
+
},
|
|
145
|
+
value: {
|
|
146
|
+
kind: "Variable",
|
|
147
|
+
name: {
|
|
148
|
+
kind: "Name",
|
|
149
|
+
value: "password"
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}, {
|
|
153
|
+
kind: "Argument",
|
|
154
|
+
name: {
|
|
155
|
+
kind: "Name",
|
|
156
|
+
value: "rememberMe"
|
|
157
|
+
},
|
|
158
|
+
value: {
|
|
159
|
+
kind: "Variable",
|
|
160
|
+
name: {
|
|
161
|
+
kind: "Name",
|
|
162
|
+
value: "rememberMe"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}],
|
|
166
|
+
selectionSet: {
|
|
167
|
+
kind: "SelectionSet",
|
|
168
|
+
selections: [{
|
|
169
|
+
kind: "Field",
|
|
170
|
+
name: {
|
|
171
|
+
kind: "Name",
|
|
172
|
+
value: "__typename"
|
|
173
|
+
}
|
|
174
|
+
}, {
|
|
175
|
+
kind: "InlineFragment",
|
|
176
|
+
typeCondition: {
|
|
177
|
+
kind: "NamedType",
|
|
178
|
+
name: {
|
|
179
|
+
kind: "Name",
|
|
180
|
+
value: "CurrentUser"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
selectionSet: {
|
|
184
|
+
kind: "SelectionSet",
|
|
185
|
+
selections: [{
|
|
186
|
+
kind: "Field",
|
|
187
|
+
name: {
|
|
188
|
+
kind: "Name",
|
|
189
|
+
value: "id"
|
|
190
|
+
}
|
|
191
|
+
}, {
|
|
192
|
+
kind: "Field",
|
|
193
|
+
name: {
|
|
194
|
+
kind: "Name",
|
|
195
|
+
value: "identifier"
|
|
196
|
+
}
|
|
197
|
+
}]
|
|
198
|
+
}
|
|
199
|
+
}, {
|
|
200
|
+
kind: "InlineFragment",
|
|
201
|
+
typeCondition: {
|
|
202
|
+
kind: "NamedType",
|
|
203
|
+
name: {
|
|
204
|
+
kind: "Name",
|
|
205
|
+
value: "ErrorResult"
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
selectionSet: {
|
|
209
|
+
kind: "SelectionSet",
|
|
210
|
+
selections: [{
|
|
211
|
+
kind: "Field",
|
|
212
|
+
name: {
|
|
213
|
+
kind: "Name",
|
|
214
|
+
value: "errorCode"
|
|
215
|
+
}
|
|
216
|
+
}, {
|
|
217
|
+
kind: "Field",
|
|
218
|
+
name: {
|
|
219
|
+
kind: "Name",
|
|
220
|
+
value: "message"
|
|
221
|
+
}
|
|
222
|
+
}]
|
|
223
|
+
}
|
|
224
|
+
}]
|
|
225
|
+
}
|
|
226
|
+
}]
|
|
227
|
+
}
|
|
228
|
+
}]
|
|
229
|
+
}, v = {
|
|
230
|
+
kind: "Document",
|
|
231
|
+
definitions: [{
|
|
232
|
+
kind: "OperationDefinition",
|
|
233
|
+
operation: "mutation",
|
|
234
|
+
name: {
|
|
235
|
+
kind: "Name",
|
|
236
|
+
value: "logout"
|
|
237
|
+
},
|
|
238
|
+
selectionSet: {
|
|
239
|
+
kind: "SelectionSet",
|
|
240
|
+
selections: [{
|
|
241
|
+
kind: "Field",
|
|
242
|
+
name: {
|
|
243
|
+
kind: "Name",
|
|
244
|
+
value: "logout"
|
|
245
|
+
},
|
|
246
|
+
selectionSet: {
|
|
247
|
+
kind: "SelectionSet",
|
|
248
|
+
selections: [{
|
|
249
|
+
kind: "Field",
|
|
250
|
+
name: {
|
|
251
|
+
kind: "Name",
|
|
252
|
+
value: "success"
|
|
253
|
+
}
|
|
254
|
+
}]
|
|
255
|
+
}
|
|
256
|
+
}]
|
|
257
|
+
}
|
|
258
|
+
}]
|
|
259
|
+
}, y = {
|
|
260
|
+
kind: "Document",
|
|
261
|
+
definitions: [{
|
|
262
|
+
kind: "OperationDefinition",
|
|
263
|
+
operation: "query",
|
|
264
|
+
name: {
|
|
265
|
+
kind: "Name",
|
|
266
|
+
value: "me"
|
|
267
|
+
},
|
|
268
|
+
selectionSet: {
|
|
269
|
+
kind: "SelectionSet",
|
|
270
|
+
selections: [{
|
|
271
|
+
kind: "Field",
|
|
272
|
+
name: {
|
|
273
|
+
kind: "Name",
|
|
274
|
+
value: "me"
|
|
275
|
+
},
|
|
276
|
+
selectionSet: {
|
|
277
|
+
kind: "SelectionSet",
|
|
278
|
+
selections: [{
|
|
279
|
+
kind: "Field",
|
|
280
|
+
name: {
|
|
281
|
+
kind: "Name",
|
|
282
|
+
value: "id"
|
|
283
|
+
}
|
|
284
|
+
}]
|
|
285
|
+
}
|
|
286
|
+
}]
|
|
287
|
+
}
|
|
288
|
+
}]
|
|
289
|
+
}, D = {
|
|
290
|
+
kind: "Document",
|
|
291
|
+
definitions: [{
|
|
292
|
+
kind: "OperationDefinition",
|
|
293
|
+
operation: "mutation",
|
|
294
|
+
name: {
|
|
295
|
+
kind: "Name",
|
|
296
|
+
value: "transitionOrderToState"
|
|
297
|
+
},
|
|
298
|
+
variableDefinitions: [{
|
|
299
|
+
kind: "VariableDefinition",
|
|
300
|
+
variable: {
|
|
301
|
+
kind: "Variable",
|
|
302
|
+
name: {
|
|
303
|
+
kind: "Name",
|
|
304
|
+
value: "input"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
type: {
|
|
308
|
+
kind: "NonNullType",
|
|
309
|
+
type: {
|
|
310
|
+
kind: "NamedType",
|
|
311
|
+
name: {
|
|
312
|
+
kind: "Name",
|
|
313
|
+
value: "String"
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}],
|
|
318
|
+
selectionSet: {
|
|
319
|
+
kind: "SelectionSet",
|
|
320
|
+
selections: [{
|
|
321
|
+
kind: "Field",
|
|
322
|
+
name: {
|
|
323
|
+
kind: "Name",
|
|
324
|
+
value: "transitionOrderToState"
|
|
325
|
+
},
|
|
326
|
+
arguments: [{
|
|
327
|
+
kind: "Argument",
|
|
328
|
+
name: {
|
|
329
|
+
kind: "Name",
|
|
330
|
+
value: "state"
|
|
331
|
+
},
|
|
332
|
+
value: {
|
|
333
|
+
kind: "Variable",
|
|
334
|
+
name: {
|
|
335
|
+
kind: "Name",
|
|
336
|
+
value: "input"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}],
|
|
340
|
+
selectionSet: {
|
|
341
|
+
kind: "SelectionSet",
|
|
342
|
+
selections: [{
|
|
343
|
+
kind: "InlineFragment",
|
|
344
|
+
typeCondition: {
|
|
345
|
+
kind: "NamedType",
|
|
346
|
+
name: {
|
|
347
|
+
kind: "Name",
|
|
348
|
+
value: "ErrorResult"
|
|
349
|
+
}
|
|
350
|
+
},
|
|
351
|
+
selectionSet: {
|
|
352
|
+
kind: "SelectionSet",
|
|
353
|
+
selections: [{
|
|
354
|
+
kind: "Field",
|
|
355
|
+
name: {
|
|
356
|
+
kind: "Name",
|
|
357
|
+
value: "errorCode"
|
|
358
|
+
}
|
|
359
|
+
}, {
|
|
360
|
+
kind: "Field",
|
|
361
|
+
name: {
|
|
362
|
+
kind: "Name",
|
|
363
|
+
value: "message"
|
|
364
|
+
}
|
|
365
|
+
}]
|
|
366
|
+
}
|
|
367
|
+
}]
|
|
368
|
+
}
|
|
369
|
+
}]
|
|
370
|
+
}
|
|
371
|
+
}]
|
|
372
|
+
}, A = {
|
|
373
|
+
kind: "Document",
|
|
374
|
+
definitions: [{
|
|
375
|
+
kind: "OperationDefinition",
|
|
376
|
+
operation: "query",
|
|
377
|
+
name: {
|
|
378
|
+
kind: "Name",
|
|
379
|
+
value: "nextOrderStates"
|
|
380
|
+
},
|
|
381
|
+
selectionSet: {
|
|
382
|
+
kind: "SelectionSet",
|
|
383
|
+
selections: [{
|
|
384
|
+
kind: "Field",
|
|
385
|
+
name: {
|
|
386
|
+
kind: "Name",
|
|
387
|
+
value: "nextOrderStates"
|
|
388
|
+
}
|
|
389
|
+
}]
|
|
390
|
+
}
|
|
391
|
+
}]
|
|
392
|
+
}, h = {
|
|
393
|
+
kind: "Document",
|
|
394
|
+
definitions: [{
|
|
395
|
+
kind: "OperationDefinition",
|
|
396
|
+
operation: "query",
|
|
397
|
+
name: {
|
|
398
|
+
kind: "Name",
|
|
399
|
+
value: "EligiblePaymentMethods"
|
|
400
|
+
},
|
|
401
|
+
selectionSet: {
|
|
402
|
+
kind: "SelectionSet",
|
|
403
|
+
selections: [{
|
|
404
|
+
kind: "Field",
|
|
405
|
+
name: {
|
|
406
|
+
kind: "Name",
|
|
407
|
+
value: "eligiblePaymentMethods"
|
|
408
|
+
},
|
|
409
|
+
selectionSet: {
|
|
410
|
+
kind: "SelectionSet",
|
|
411
|
+
selections: [{
|
|
412
|
+
kind: "FragmentSpread",
|
|
413
|
+
name: {
|
|
414
|
+
kind: "Name",
|
|
415
|
+
value: "EligiblePaymentMethods"
|
|
416
|
+
}
|
|
417
|
+
}]
|
|
418
|
+
}
|
|
419
|
+
}]
|
|
420
|
+
}
|
|
421
|
+
}, {
|
|
422
|
+
kind: "FragmentDefinition",
|
|
423
|
+
name: {
|
|
424
|
+
kind: "Name",
|
|
425
|
+
value: "EligiblePaymentMethods"
|
|
426
|
+
},
|
|
427
|
+
typeCondition: {
|
|
428
|
+
kind: "NamedType",
|
|
429
|
+
name: {
|
|
430
|
+
kind: "Name",
|
|
431
|
+
value: "PaymentMethodQuote"
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
selectionSet: {
|
|
435
|
+
kind: "SelectionSet",
|
|
436
|
+
selections: [{
|
|
437
|
+
kind: "Field",
|
|
438
|
+
name: {
|
|
439
|
+
kind: "Name",
|
|
440
|
+
value: "id"
|
|
441
|
+
}
|
|
442
|
+
}, {
|
|
443
|
+
kind: "Field",
|
|
444
|
+
name: {
|
|
445
|
+
kind: "Name",
|
|
446
|
+
value: "name"
|
|
447
|
+
}
|
|
448
|
+
}, {
|
|
449
|
+
kind: "Field",
|
|
450
|
+
name: {
|
|
451
|
+
kind: "Name",
|
|
452
|
+
value: "description"
|
|
453
|
+
}
|
|
454
|
+
}, {
|
|
455
|
+
kind: "Field",
|
|
456
|
+
name: {
|
|
457
|
+
kind: "Name",
|
|
458
|
+
value: "code"
|
|
459
|
+
}
|
|
460
|
+
}]
|
|
461
|
+
}
|
|
462
|
+
}]
|
|
463
|
+
}, f = {
|
|
464
|
+
"\n mutation login($email: String!, $password: String!, $rememberMe: Boolean) {\n login(username: $email, password: $password, rememberMe: $rememberMe) {\n __typename\n ... on CurrentUser {\n id\n identifier\n }\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": P,
|
|
465
|
+
"\n mutation logout {\n logout {\n success\n }\n }\n": v,
|
|
466
|
+
"\n query me {\n me {\n id\n }\n }\n": y,
|
|
467
|
+
"\n mutation transitionOrderToState($input: String!) {\n transitionOrderToState(state: $input) {\n ... on ErrorResult {\n errorCode\n message\n }\n }\n }\n": D,
|
|
468
|
+
"\n query nextOrderStates {\n nextOrderStates\n }\n": A,
|
|
469
|
+
"\n fragment EligiblePaymentMethods on PaymentMethodQuote {\n id\n name\n description\n code\n }\n": I,
|
|
470
|
+
"\n query EligiblePaymentMethods {\n eligiblePaymentMethods {\n ...EligiblePaymentMethods\n }\n }\n": h
|
|
471
|
+
};
|
|
472
|
+
function l(e) {
|
|
473
|
+
return f[e] ?? {};
|
|
474
|
+
}
|
|
475
|
+
const b = ["id", "code", "active", "createdAt", "updatedAt", "orderPlacedAt", "state", "totalQuantity", "currencyCode", "total", "totalWithTax", "subTotal", "subTotalWithTax", "shipping", {
|
|
476
|
+
discounts: ["type", "description", "amount", "amountWithTax"]
|
|
477
|
+
}, {
|
|
478
|
+
promotions: ["couponCode", "description", "name", "enabled", "perCustomerUsageLimit", "perCustomerUsageLimit"]
|
|
479
|
+
}, "couponCodes", "shippingWithTax", "currencyCode", {
|
|
480
|
+
taxSummary: ["description", "taxRate", "taxBase", "taxTotal"]
|
|
481
|
+
}, {
|
|
482
|
+
customer: ["id", "firstName", "lastName", "emailAddress", "phoneNumber"]
|
|
483
|
+
}, {
|
|
484
|
+
billingAddress: ["fullName", "streetLine1", "streetLine2", "company", "city", "province", "postalCode", "countryCode", "phoneNumber"]
|
|
485
|
+
}, {
|
|
486
|
+
shippingAddress: ["fullName", "streetLine1", "streetLine2", "company", "city", "province", "postalCode", "countryCode", "phoneNumber"]
|
|
487
|
+
}, {
|
|
488
|
+
shippingLines: [{
|
|
489
|
+
shippingMethod: ["id", "name"]
|
|
490
|
+
}, "priceWithTax", "price"]
|
|
491
|
+
}, {
|
|
492
|
+
lines: ["id", "unitPrice", "unitPriceWithTax", "linePrice", "linePriceWithTax", "discountedUnitPrice", "discountedUnitPriceWithTax", "discountedLinePrice", "discountedLinePriceWithTax", "proratedUnitPrice", "proratedUnitPriceWithTax", "proratedLinePrice", "proratedLinePriceWithTax", "quantity", {
|
|
493
|
+
featuredAsset: ["id", "preview"]
|
|
494
|
+
}, {
|
|
495
|
+
productVariant: ["id", "name", "sku", "price", "priceWithTax", "currencyCode", {
|
|
496
|
+
facetValues: [{
|
|
497
|
+
facet: ["id", "code", "name"]
|
|
498
|
+
}, "id", "code", "name"]
|
|
499
|
+
}, {
|
|
500
|
+
featuredAsset: ["id", "preview"]
|
|
501
|
+
}, {
|
|
502
|
+
product: ["id", "slug", "description", {
|
|
503
|
+
facetValues: [{
|
|
504
|
+
facet: ["id", "code", "name"]
|
|
505
|
+
}, "id", "code", "name"],
|
|
506
|
+
collections: ["id", "name", "slug", "parentId", {
|
|
507
|
+
breadcrumbs: ["id", "name", "slug"]
|
|
508
|
+
}]
|
|
509
|
+
}]
|
|
510
|
+
}]
|
|
511
|
+
}]
|
|
512
|
+
}, {
|
|
513
|
+
payments: ["id", "state", "method", "amount", "metadata"]
|
|
514
|
+
}, {
|
|
515
|
+
history: [{
|
|
516
|
+
items: ["id", "type", "data", "createdAt", "updatedAt"]
|
|
517
|
+
}, "totalItems"]
|
|
518
|
+
}];
|
|
519
|
+
l(
|
|
520
|
+
/* GraphQL */
|
|
521
|
+
`
|
|
522
|
+
mutation transitionOrderToState($input: String!) {
|
|
523
|
+
transitionOrderToState(state: $input) {
|
|
524
|
+
... on ErrorResult {
|
|
525
|
+
errorCode
|
|
526
|
+
message
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
`
|
|
531
|
+
);
|
|
532
|
+
l(
|
|
533
|
+
/* GraphQL */
|
|
534
|
+
`
|
|
535
|
+
query nextOrderStates {
|
|
536
|
+
nextOrderStates
|
|
537
|
+
}
|
|
538
|
+
`
|
|
539
|
+
);
|
|
540
|
+
l(
|
|
541
|
+
/* GraphQL */
|
|
542
|
+
`
|
|
543
|
+
fragment EligiblePaymentMethods on PaymentMethodQuote {
|
|
544
|
+
id
|
|
545
|
+
name
|
|
546
|
+
description
|
|
547
|
+
code
|
|
548
|
+
}
|
|
549
|
+
`
|
|
550
|
+
);
|
|
551
|
+
l(
|
|
552
|
+
/* GraphQL */
|
|
553
|
+
`
|
|
554
|
+
query EligiblePaymentMethods {
|
|
555
|
+
eligiblePaymentMethods {
|
|
556
|
+
...EligiblePaymentMethods
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
`
|
|
560
|
+
);
|
|
561
|
+
const E = new S({
|
|
562
|
+
name: "purchase-order-payment",
|
|
563
|
+
queryUpdates: {}
|
|
564
|
+
});
|
|
565
|
+
E.setRequests({
|
|
566
|
+
addPurchaseOrderPaymentToOrder: async (e) => {
|
|
567
|
+
try {
|
|
568
|
+
return (await E.getSdk().createRequest({
|
|
569
|
+
operation: "addPurchaseOrderPaymentToOrder",
|
|
570
|
+
fields: [{
|
|
571
|
+
operation: "Order",
|
|
572
|
+
fields: b,
|
|
573
|
+
fragment: !0
|
|
574
|
+
}, {
|
|
575
|
+
operation: "ErrorResult",
|
|
576
|
+
fields: ["errorCode", "message"],
|
|
577
|
+
fragment: !0
|
|
578
|
+
}],
|
|
579
|
+
variables: {
|
|
580
|
+
input: {
|
|
581
|
+
type: "AddPurchaseOrderPaymentToOrderInput!"
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}, {
|
|
585
|
+
input: e
|
|
586
|
+
}, !0)).data;
|
|
587
|
+
} catch (i) {
|
|
588
|
+
return {
|
|
589
|
+
errorCode: N.UnknownError,
|
|
590
|
+
message: i instanceof Error ? i.message : "Unknown payment error"
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
}
|
|
162
594
|
});
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
isLoading: i.isPending,
|
|
202
|
-
isError: i.isError,
|
|
203
|
-
isSuccess: i.isSuccess,
|
|
204
|
-
data: i.data,
|
|
205
|
-
reset: i.reset
|
|
206
|
-
};
|
|
595
|
+
const x = () => {
|
|
596
|
+
const e = T.c(17), i = O(), d = R();
|
|
597
|
+
let t;
|
|
598
|
+
e[0] !== i ? (t = async (r) => {
|
|
599
|
+
const k = i.addPurchaseOrderPaymentToOrder;
|
|
600
|
+
if (typeof k != "function")
|
|
601
|
+
throw new Error("addPurchaseOrderPaymentToOrder is not available. Ensure VendurePurchaseOrderPaymentPlugin is registered.");
|
|
602
|
+
return k(r);
|
|
603
|
+
}, e[0] = i, e[1] = t) : t = e[1];
|
|
604
|
+
let a;
|
|
605
|
+
e[2] !== d ? (a = (r) => {
|
|
606
|
+
r && !("errorCode" in r) && d.invalidateQueries({
|
|
607
|
+
queryKey: [p.ACTIVE_ORDER]
|
|
608
|
+
});
|
|
609
|
+
}, e[2] = d, e[3] = a) : a = e[3];
|
|
610
|
+
let o;
|
|
611
|
+
e[4] !== t || e[5] !== a ? (o = {
|
|
612
|
+
mutationFn: t,
|
|
613
|
+
onSuccess: a
|
|
614
|
+
}, e[4] = t, e[5] = a, e[6] = o) : o = e[6];
|
|
615
|
+
const n = g(o);
|
|
616
|
+
let s;
|
|
617
|
+
e[7] !== n ? (s = async (r) => n.mutateAsync(r), e[7] = n, e[8] = s) : s = e[8];
|
|
618
|
+
const u = s, c = n.error;
|
|
619
|
+
let m;
|
|
620
|
+
return e[9] !== u || e[10] !== n.data || e[11] !== n.isError || e[12] !== n.isPending || e[13] !== n.isSuccess || e[14] !== n.reset || e[15] !== c ? (m = {
|
|
621
|
+
addPurchaseOrderPayment: u,
|
|
622
|
+
error: c,
|
|
623
|
+
isLoading: n.isPending,
|
|
624
|
+
isError: n.isError,
|
|
625
|
+
isSuccess: n.isSuccess,
|
|
626
|
+
data: n.data,
|
|
627
|
+
reset: n.reset
|
|
628
|
+
}, e[9] = u, e[10] = n.data, e[11] = n.isError, e[12] = n.isPending, e[13] = n.isSuccess, e[14] = n.reset, e[15] = c, e[16] = m) : m = e[16], m;
|
|
629
|
+
};
|
|
630
|
+
export {
|
|
631
|
+
E as VendurePurchaseOrderPaymentPlugin,
|
|
632
|
+
x as useAddPurchaseOrderPayment
|
|
207
633
|
};
|
|
208
|
-
//#endregion
|
|
209
|
-
export { c as VendurePurchaseOrderPaymentPlugin, l as useAddPurchaseOrderPayment };
|