@vendure-platform/create 0.3.0 → 0.5.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/CHANGELOG.md +8 -0
- package/README.md +7 -7
- package/dist/add-to-existing.js +1 -583
- package/dist/assets/storefront/messages/de.json +2 -0
- package/dist/assets/storefront/messages/en.json +2 -0
- package/dist/assets/storefront/package.json +1 -1
- package/dist/assets/storefront/src/app/[locale]/(catalog)/product/[slug]/page.tsx +7 -2
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/activity-feed.tsx +152 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-item-search.tsx +130 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/add-member-form.tsx +124 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/members-panel.tsx +240 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/page.tsx +47 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/rename-dialog.tsx +96 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/[id]/shared-cart-detail-client.tsx +555 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/actions.ts +260 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/new-shared-cart-form.tsx +77 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/new/page.tsx +47 -0
- package/dist/assets/storefront/src/app/[locale]/account/shared-carts/page.tsx +263 -0
- package/dist/assets/storefront/src/app/[locale]/cart/cart.tsx +12 -1
- package/dist/assets/storefront/src/app/[locale]/cart/order-summary.tsx +23 -0
- package/dist/assets/storefront/src/components/commerce/account-nav-items.ts +2 -0
- package/dist/assets/storefront/src/components/commerce/add-to-shared-cart.tsx +225 -0
- package/dist/assets/storefront/src/components/commerce/product-info.tsx +14 -1
- package/dist/assets/storefront/src/components/commerce/shared-cart-role.ts +39 -0
- package/dist/assets/storefront/src/components/commerce/shared-cart-status-badge.tsx +24 -0
- package/dist/assets/storefront/src/graphql-env.d.ts +28 -15
- package/dist/assets/storefront/src/lib/vendure/api.ts +8 -4
- package/dist/assets/storefront/src/lib/vendure/mutations.ts +96 -0
- package/dist/assets/storefront/src/lib/vendure/queries.ts +142 -0
- package/dist/assets/storefront/src/schema.graphql +321 -61
- package/dist/bin/run.js +1 -119
- package/dist/cli.js +1 -309
- package/dist/git-init.js +1 -60
- package/dist/index.js +1 -19
- package/dist/plugin-registry.js +1 -203
- package/dist/registry.js +1 -29
- package/dist/scaffold-shared.js +1 -124
- package/dist/scaffold-storefront-only.js +1 -101
- package/dist/scaffolder.js +1 -203
- package/dist/sort-package-json.js +1 -26
- package/dist/storefront-copier.js +1 -149
- package/dist/template-renderer.js +1 -221
- package/dist/types.js +1 -3
- package/package.json +5 -4
- package/dist/add-to-existing.js.map +0 -1
- package/dist/assets/storefront/src/lib/quantity.test.js +0 -20
- package/dist/bin/run.js.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/git-init.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/plugin-registry.js.map +0 -1
- package/dist/registry.js.map +0 -1
- package/dist/scaffold-shared.js.map +0 -1
- package/dist/scaffold-storefront-only.js.map +0 -1
- package/dist/scaffolder.js.map +0 -1
- package/dist/sort-package-json.js.map +0 -1
- package/dist/storefront-copier.js.map +0 -1
- package/dist/template-renderer.js.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -10,7 +10,12 @@ type Query {
|
|
|
10
10
|
state of `PaymentAuthorized` or `PaymentSettled`, then that Order is no longer considered "active" and this
|
|
11
11
|
query will once again return `null`.
|
|
12
12
|
"""
|
|
13
|
-
activeOrder
|
|
13
|
+
activeOrder(
|
|
14
|
+
"""
|
|
15
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
16
|
+
"""
|
|
17
|
+
activeOrderInput: ActiveOrderInput = null
|
|
18
|
+
): Order
|
|
14
19
|
|
|
15
20
|
"""An array of supported Countries"""
|
|
16
21
|
availableCountries: [Country!]!
|
|
@@ -26,12 +31,22 @@ type Query {
|
|
|
26
31
|
"""
|
|
27
32
|
Returns a list of eligible shipping methods based on the current active Order
|
|
28
33
|
"""
|
|
29
|
-
eligibleShippingMethods
|
|
34
|
+
eligibleShippingMethods(
|
|
35
|
+
"""
|
|
36
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
37
|
+
"""
|
|
38
|
+
activeOrderInput: ActiveOrderInput = null
|
|
39
|
+
): [ShippingMethodQuote!]!
|
|
30
40
|
|
|
31
41
|
"""
|
|
32
42
|
Returns a list of payment methods and their eligibility based on the current active Order
|
|
33
43
|
"""
|
|
34
|
-
eligiblePaymentMethods
|
|
44
|
+
eligiblePaymentMethods(
|
|
45
|
+
"""
|
|
46
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
47
|
+
"""
|
|
48
|
+
activeOrderInput: ActiveOrderInput = null
|
|
49
|
+
): [PaymentMethodQuote!]!
|
|
35
50
|
|
|
36
51
|
"""A list of Facets available to the shop"""
|
|
37
52
|
facets(options: FacetListOptions): FacetList!
|
|
@@ -45,7 +60,12 @@ type Query {
|
|
|
45
60
|
"""
|
|
46
61
|
Returns the possible next states that the activeOrder can transition to
|
|
47
62
|
"""
|
|
48
|
-
nextOrderStates
|
|
63
|
+
nextOrderStates(
|
|
64
|
+
"""
|
|
65
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
66
|
+
"""
|
|
67
|
+
activeOrderInput: ActiveOrderInput = null
|
|
68
|
+
): [String!]!
|
|
49
69
|
|
|
50
70
|
"""
|
|
51
71
|
Returns an Order based on the id. Note that in the Shop API, only orders belonging to the
|
|
@@ -127,6 +147,9 @@ type Query {
|
|
|
127
147
|
Check stock availability for all items in a quote before proceeding to checkout.
|
|
128
148
|
"""
|
|
129
149
|
quoteStockCheck(quoteId: ID!): QuoteStockCheckResult!
|
|
150
|
+
mySharedCarts(options: SharedCartListOptions): SharedCartList!
|
|
151
|
+
companySharedCarts(options: SharedCartListOptions): SharedCartList!
|
|
152
|
+
sharedCart(id: ID!): SharedCart
|
|
130
153
|
|
|
131
154
|
"""
|
|
132
155
|
Fetch a single product variant by ID. Supports draft mode preview via the DraftModeInterceptor.
|
|
@@ -143,13 +166,23 @@ type Query {
|
|
|
143
166
|
|
|
144
167
|
"""Approval history for a specific entity visible to the current customer"""
|
|
145
168
|
approvalHistoryForEntity(entityType: String!, entityId: ID!): [ApprovalRequest!]!
|
|
169
|
+
activePunchoutSession: PunchoutSessionInfo
|
|
146
170
|
}
|
|
147
171
|
|
|
148
172
|
type Mutation {
|
|
149
173
|
"""
|
|
150
174
|
Adds an item to the Order. If custom fields are defined on the OrderLine entity, a third argument 'customFields' will be available.
|
|
151
175
|
"""
|
|
152
|
-
addItemToOrder(
|
|
176
|
+
addItemToOrder(
|
|
177
|
+
productVariantId: ID!
|
|
178
|
+
quantity: Int!
|
|
179
|
+
customFields: OrderLineCustomFieldsInput = null
|
|
180
|
+
|
|
181
|
+
"""
|
|
182
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
183
|
+
"""
|
|
184
|
+
activeOrderInput: ActiveOrderInput = null
|
|
185
|
+
): UpdateOrderItemsResult!
|
|
153
186
|
|
|
154
187
|
"""
|
|
155
188
|
Adds mutliple items to the Order. Returns a list of errors for each item that failed to add. It will still add successful items.
|
|
@@ -157,45 +190,118 @@ type Mutation {
|
|
|
157
190
|
addItemsToOrder(inputs: [AddItemInput!]!): UpdateMultipleOrderItemsResult!
|
|
158
191
|
|
|
159
192
|
"""Remove an OrderLine from the Order"""
|
|
160
|
-
removeOrderLine(
|
|
193
|
+
removeOrderLine(
|
|
194
|
+
orderLineId: ID!
|
|
195
|
+
|
|
196
|
+
"""
|
|
197
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
198
|
+
"""
|
|
199
|
+
activeOrderInput: ActiveOrderInput = null
|
|
200
|
+
): RemoveOrderItemsResult!
|
|
161
201
|
|
|
162
202
|
"""Remove all OrderLine from the Order"""
|
|
163
|
-
removeAllOrderLines
|
|
203
|
+
removeAllOrderLines(
|
|
204
|
+
"""
|
|
205
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
206
|
+
"""
|
|
207
|
+
activeOrderInput: ActiveOrderInput = null
|
|
208
|
+
): RemoveOrderItemsResult!
|
|
164
209
|
|
|
165
210
|
"""
|
|
166
211
|
Adjusts an OrderLine. If custom fields are defined on the OrderLine entity, a third argument 'customFields' of type `OrderLineCustomFieldsInput` will be available.
|
|
167
212
|
"""
|
|
168
|
-
adjustOrderLine(
|
|
213
|
+
adjustOrderLine(
|
|
214
|
+
orderLineId: ID!
|
|
215
|
+
quantity: Int!
|
|
216
|
+
customFields: OrderLineCustomFieldsInput = null
|
|
217
|
+
|
|
218
|
+
"""
|
|
219
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
220
|
+
"""
|
|
221
|
+
activeOrderInput: ActiveOrderInput = null
|
|
222
|
+
): UpdateOrderItemsResult!
|
|
169
223
|
|
|
170
224
|
"""Applies the given coupon code to the active Order"""
|
|
171
|
-
applyCouponCode(
|
|
225
|
+
applyCouponCode(
|
|
226
|
+
couponCode: String!
|
|
227
|
+
|
|
228
|
+
"""
|
|
229
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
230
|
+
"""
|
|
231
|
+
activeOrderInput: ActiveOrderInput = null
|
|
232
|
+
): ApplyCouponCodeResult!
|
|
172
233
|
|
|
173
234
|
"""Removes the given coupon code from the active Order"""
|
|
174
|
-
removeCouponCode(
|
|
235
|
+
removeCouponCode(
|
|
236
|
+
couponCode: String!
|
|
237
|
+
|
|
238
|
+
"""
|
|
239
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
240
|
+
"""
|
|
241
|
+
activeOrderInput: ActiveOrderInput = null
|
|
242
|
+
): Order
|
|
175
243
|
|
|
176
244
|
"""
|
|
177
245
|
Transitions an Order to a new state. Valid next states can be found by querying `nextOrderStates`
|
|
178
246
|
"""
|
|
179
|
-
transitionOrderToState(
|
|
247
|
+
transitionOrderToState(
|
|
248
|
+
state: String!
|
|
249
|
+
|
|
250
|
+
"""
|
|
251
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
252
|
+
"""
|
|
253
|
+
activeOrderInput: ActiveOrderInput = null
|
|
254
|
+
): TransitionOrderToStateResult
|
|
180
255
|
|
|
181
256
|
"""Sets the shipping address for the active Order"""
|
|
182
|
-
setOrderShippingAddress(
|
|
257
|
+
setOrderShippingAddress(
|
|
258
|
+
input: CreateAddressInput!
|
|
259
|
+
|
|
260
|
+
"""
|
|
261
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
262
|
+
"""
|
|
263
|
+
activeOrderInput: ActiveOrderInput = null
|
|
264
|
+
): ActiveOrderResult!
|
|
183
265
|
|
|
184
266
|
"""Sets the billing address for the active Order"""
|
|
185
|
-
setOrderBillingAddress(
|
|
267
|
+
setOrderBillingAddress(
|
|
268
|
+
input: CreateAddressInput!
|
|
269
|
+
|
|
270
|
+
"""
|
|
271
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
272
|
+
"""
|
|
273
|
+
activeOrderInput: ActiveOrderInput = null
|
|
274
|
+
): ActiveOrderResult!
|
|
186
275
|
|
|
187
276
|
"""
|
|
188
277
|
Unsets the shipping address for the active Order. Available since version 3.1.0
|
|
189
278
|
"""
|
|
190
|
-
unsetOrderShippingAddress
|
|
279
|
+
unsetOrderShippingAddress(
|
|
280
|
+
"""
|
|
281
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
282
|
+
"""
|
|
283
|
+
activeOrderInput: ActiveOrderInput = null
|
|
284
|
+
): ActiveOrderResult!
|
|
191
285
|
|
|
192
286
|
"""
|
|
193
287
|
Unsets the billing address for the active Order. Available since version 3.1.0
|
|
194
288
|
"""
|
|
195
|
-
unsetOrderBillingAddress
|
|
289
|
+
unsetOrderBillingAddress(
|
|
290
|
+
"""
|
|
291
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
292
|
+
"""
|
|
293
|
+
activeOrderInput: ActiveOrderInput = null
|
|
294
|
+
): ActiveOrderResult!
|
|
196
295
|
|
|
197
296
|
"""Allows any custom fields to be set for the active Order"""
|
|
198
|
-
setOrderCustomFields(
|
|
297
|
+
setOrderCustomFields(
|
|
298
|
+
input: UpdateOrderInput!
|
|
299
|
+
|
|
300
|
+
"""
|
|
301
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
302
|
+
"""
|
|
303
|
+
activeOrderInput: ActiveOrderInput = null
|
|
304
|
+
): ActiveOrderResult!
|
|
199
305
|
|
|
200
306
|
"""
|
|
201
307
|
Sets the shipping method by id, which can be obtained with the `eligibleShippingMethods` query.
|
|
@@ -203,18 +309,39 @@ type Mutation {
|
|
|
203
309
|
you should configure a custom ShippingLineAssignmentStrategy in order to know which OrderLines each
|
|
204
310
|
shipping method will apply to.
|
|
205
311
|
"""
|
|
206
|
-
setOrderShippingMethod(
|
|
312
|
+
setOrderShippingMethod(
|
|
313
|
+
shippingMethodId: [ID!]!
|
|
314
|
+
|
|
315
|
+
"""
|
|
316
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
317
|
+
"""
|
|
318
|
+
activeOrderInput: ActiveOrderInput = null
|
|
319
|
+
): SetOrderShippingMethodResult!
|
|
207
320
|
|
|
208
321
|
"""Sets the currency code for the active Order"""
|
|
209
322
|
setCurrencyCodeForOrder(currencyCode: CurrencyCode!): UpdateOrderItemsResult!
|
|
210
323
|
|
|
211
324
|
"""Add a Payment to the Order"""
|
|
212
|
-
addPaymentToOrder(
|
|
325
|
+
addPaymentToOrder(
|
|
326
|
+
input: PaymentInput!
|
|
327
|
+
|
|
328
|
+
"""
|
|
329
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
330
|
+
"""
|
|
331
|
+
activeOrderInput: ActiveOrderInput = null
|
|
332
|
+
): AddPaymentToOrderResult!
|
|
213
333
|
|
|
214
334
|
"""
|
|
215
335
|
Set the Customer for the Order. Required only if the Customer is not currently logged in
|
|
216
336
|
"""
|
|
217
|
-
setCustomerForOrder(
|
|
337
|
+
setCustomerForOrder(
|
|
338
|
+
input: CreateCustomerInput!
|
|
339
|
+
|
|
340
|
+
"""
|
|
341
|
+
Inputs for the configured ActiveOrderStrategies punchout, quote-checkout,
|
|
342
|
+
"""
|
|
343
|
+
activeOrderInput: ActiveOrderInput = null
|
|
344
|
+
): SetCustomerForOrderResult!
|
|
218
345
|
|
|
219
346
|
"""
|
|
220
347
|
Authenticates the user using the native authentication strategy. This mutation is an alias for authenticate({ native: { ... }})
|
|
@@ -375,6 +502,17 @@ type Mutation {
|
|
|
375
502
|
Cancel an in-progress quote checkout. Clears the active quote order marker.
|
|
376
503
|
"""
|
|
377
504
|
cancelQuoteCheckout: Boolean!
|
|
505
|
+
createSharedCart(input: CreateSharedCartInput!): SharedCart!
|
|
506
|
+
updateSharedCart(input: UpdateSharedCartInput!): SharedCart!
|
|
507
|
+
deleteSharedCart(id: ID!): DeletionResponse!
|
|
508
|
+
addItemToSharedCart(sharedCartId: ID!, productVariantId: ID!, quantity: Int!): SharedCart!
|
|
509
|
+
adjustSharedCartLine(sharedCartId: ID!, lineId: ID!, quantity: Int!): SharedCart!
|
|
510
|
+
removeSharedCartLine(sharedCartId: ID!, lineId: ID!): SharedCart!
|
|
511
|
+
addSharedCartMember(input: CreateSharedCartMemberInput!): SharedCart!
|
|
512
|
+
removeSharedCartMember(sharedCartId: ID!, customerId: ID!): SharedCart!
|
|
513
|
+
setSharedCartMemberRole(input: UpdateSharedCartMemberInput!): SharedCart!
|
|
514
|
+
transferSharedCartOwnership(sharedCartId: ID!, newOwnerCustomerId: ID!): SharedCart!
|
|
515
|
+
initiateSharedCartCheckout(sharedCartId: ID!): SharedCart!
|
|
378
516
|
addProductConfigurationToOrder(input: AddProductConfigurationToOrderInput!): ProductConfiguration!
|
|
379
517
|
|
|
380
518
|
"""
|
|
@@ -393,10 +531,20 @@ type Mutation {
|
|
|
393
531
|
Batch submit decisions (only if current customer is an assigned approver for each)
|
|
394
532
|
"""
|
|
395
533
|
batchSubmitApprovalDecisions(input: [BatchApprovalDecisionInput!]!): [BatchApprovalDecisionResult!]!
|
|
534
|
+
activatePunchoutSession(token: String!): PunchoutSessionInfo!
|
|
535
|
+
transferPunchoutCart(sessionId: ID): PunchoutCartTransferResult!
|
|
396
536
|
addCompanyTaxId(input: AddCompanyTaxIdInput!): TaxId!
|
|
397
537
|
removeCompanyTaxId(id: ID!): DeletionResponse!
|
|
398
538
|
}
|
|
399
539
|
|
|
540
|
+
input ActiveOrderInput {
|
|
541
|
+
punchout: PunchoutActiveOrderInput
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
input PunchoutActiveOrderInput {
|
|
545
|
+
sessionId: ID!
|
|
546
|
+
}
|
|
547
|
+
|
|
400
548
|
type Address implements Node {
|
|
401
549
|
id: ID!
|
|
402
550
|
createdAt: DateTime!
|
|
@@ -1031,6 +1179,9 @@ enum Permission {
|
|
|
1031
1179
|
"""Grants permission to delete QuoteManagement"""
|
|
1032
1180
|
DeleteQuoteManagement
|
|
1033
1181
|
|
|
1182
|
+
"""Allows administrators to view and manage all shared carts"""
|
|
1183
|
+
SharedCart
|
|
1184
|
+
|
|
1034
1185
|
"""Grants permission to create PriceList"""
|
|
1035
1186
|
CreatePriceList
|
|
1036
1187
|
|
|
@@ -1094,6 +1245,18 @@ enum Permission {
|
|
|
1094
1245
|
"""Grants permission to delete ApprovalRequest"""
|
|
1095
1246
|
DeleteApprovalRequest
|
|
1096
1247
|
|
|
1248
|
+
"""Grants permission to create Punchout"""
|
|
1249
|
+
CreatePunchout
|
|
1250
|
+
|
|
1251
|
+
"""Grants permission to read Punchout"""
|
|
1252
|
+
ReadPunchout
|
|
1253
|
+
|
|
1254
|
+
"""Grants permission to update Punchout"""
|
|
1255
|
+
UpdatePunchout
|
|
1256
|
+
|
|
1257
|
+
"""Grants permission to delete Punchout"""
|
|
1258
|
+
DeletePunchout
|
|
1259
|
+
|
|
1097
1260
|
"""Grants permission to read DashboardGlobalViews"""
|
|
1098
1261
|
ReadDashboardGlobalViews
|
|
1099
1262
|
|
|
@@ -3940,6 +4103,7 @@ type PublicShippingMethod {
|
|
|
3940
4103
|
|
|
3941
4104
|
input AuthenticationInput {
|
|
3942
4105
|
native: NativeAuthInput
|
|
4106
|
+
punchout: PunchoutAuthInput
|
|
3943
4107
|
}
|
|
3944
4108
|
|
|
3945
4109
|
input RegisterCustomerInput {
|
|
@@ -5164,6 +5328,100 @@ input RequestQuoteInput {
|
|
|
5164
5328
|
note: String
|
|
5165
5329
|
}
|
|
5166
5330
|
|
|
5331
|
+
enum SharedCartRole {
|
|
5332
|
+
view
|
|
5333
|
+
edit
|
|
5334
|
+
checkout
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5337
|
+
enum SharedCartStatus {
|
|
5338
|
+
Open
|
|
5339
|
+
Locked
|
|
5340
|
+
Closed
|
|
5341
|
+
}
|
|
5342
|
+
|
|
5343
|
+
type SharedCart implements Node {
|
|
5344
|
+
id: ID!
|
|
5345
|
+
createdAt: DateTime!
|
|
5346
|
+
updatedAt: DateTime!
|
|
5347
|
+
name: String!
|
|
5348
|
+
description: String
|
|
5349
|
+
status: SharedCartStatus!
|
|
5350
|
+
order: Order!
|
|
5351
|
+
members: [SharedCartMember!]!
|
|
5352
|
+
activity: [SharedCartActivity!]!
|
|
5353
|
+
owner: Customer!
|
|
5354
|
+
companyId: ID!
|
|
5355
|
+
businessUnitId: ID
|
|
5356
|
+
}
|
|
5357
|
+
|
|
5358
|
+
type SharedCartMember implements Node {
|
|
5359
|
+
id: ID!
|
|
5360
|
+
createdAt: DateTime!
|
|
5361
|
+
updatedAt: DateTime!
|
|
5362
|
+
customer: Customer!
|
|
5363
|
+
role: SharedCartRole!
|
|
5364
|
+
}
|
|
5365
|
+
|
|
5366
|
+
type SharedCartActivity implements Node {
|
|
5367
|
+
id: ID!
|
|
5368
|
+
createdAt: DateTime!
|
|
5369
|
+
updatedAt: DateTime!
|
|
5370
|
+
actor: Customer
|
|
5371
|
+
actorLabel: String!
|
|
5372
|
+
action: String!
|
|
5373
|
+
targetLineId: ID
|
|
5374
|
+
targetCustomer: Customer
|
|
5375
|
+
detail: JSON
|
|
5376
|
+
}
|
|
5377
|
+
|
|
5378
|
+
type SharedCartList implements PaginatedList {
|
|
5379
|
+
items: [SharedCart!]!
|
|
5380
|
+
totalItems: Int!
|
|
5381
|
+
}
|
|
5382
|
+
|
|
5383
|
+
input SharedCartListOptions {
|
|
5384
|
+
"""Skips the first n results, for use in pagination"""
|
|
5385
|
+
skip: Int
|
|
5386
|
+
|
|
5387
|
+
"""Takes n results, for use in pagination"""
|
|
5388
|
+
take: Int
|
|
5389
|
+
|
|
5390
|
+
"""Specifies which properties to sort the results by"""
|
|
5391
|
+
sort: SharedCartSortParameter
|
|
5392
|
+
|
|
5393
|
+
"""Allows the results to be filtered"""
|
|
5394
|
+
filter: SharedCartFilterParameter
|
|
5395
|
+
|
|
5396
|
+
"""
|
|
5397
|
+
Specifies whether multiple top-level "filter" fields should be combined with a logical AND or OR operation. Defaults to AND.
|
|
5398
|
+
"""
|
|
5399
|
+
filterOperator: LogicalOperator
|
|
5400
|
+
}
|
|
5401
|
+
|
|
5402
|
+
input CreateSharedCartInput {
|
|
5403
|
+
name: String!
|
|
5404
|
+
description: String
|
|
5405
|
+
}
|
|
5406
|
+
|
|
5407
|
+
input UpdateSharedCartInput {
|
|
5408
|
+
id: ID!
|
|
5409
|
+
name: String
|
|
5410
|
+
description: String
|
|
5411
|
+
}
|
|
5412
|
+
|
|
5413
|
+
input CreateSharedCartMemberInput {
|
|
5414
|
+
sharedCartId: ID!
|
|
5415
|
+
customerId: ID!
|
|
5416
|
+
role: SharedCartRole!
|
|
5417
|
+
}
|
|
5418
|
+
|
|
5419
|
+
input UpdateSharedCartMemberInput {
|
|
5420
|
+
sharedCartId: ID!
|
|
5421
|
+
customerId: ID!
|
|
5422
|
+
role: SharedCartRole
|
|
5423
|
+
}
|
|
5424
|
+
|
|
5167
5425
|
type PriceTier {
|
|
5168
5426
|
minQuantity: Int!
|
|
5169
5427
|
price: Money!
|
|
@@ -5309,43 +5567,10 @@ type ConfiguratorSystem implements Node {
|
|
|
5309
5567
|
updatedAt: DateTime!
|
|
5310
5568
|
code: String!
|
|
5311
5569
|
enabled: Boolean!
|
|
5312
|
-
metadata: JSON
|
|
5313
5570
|
name: String!
|
|
5314
5571
|
description: String
|
|
5315
5572
|
translations: [ConfiguratorSystemTranslation!]!
|
|
5316
5573
|
modules: [ConfiguratorModule!]!
|
|
5317
|
-
rules: [ConfiguratorRule!]!
|
|
5318
|
-
}
|
|
5319
|
-
|
|
5320
|
-
type RulePhaseLabel {
|
|
5321
|
-
languageCode: LanguageCode!
|
|
5322
|
-
value: String!
|
|
5323
|
-
}
|
|
5324
|
-
|
|
5325
|
-
"""
|
|
5326
|
-
An execution phase for configurator rules and calculators.
|
|
5327
|
-
Admins see rules grouped into phases in the UI. Phases execute in
|
|
5328
|
-
fixed `sortOrder` order; within a phase, rules execute by their
|
|
5329
|
-
own `order` field.
|
|
5330
|
-
"""
|
|
5331
|
-
type RulePhase {
|
|
5332
|
-
key: String!
|
|
5333
|
-
sortOrder: Int!
|
|
5334
|
-
label: [RulePhaseLabel!]!
|
|
5335
|
-
}
|
|
5336
|
-
|
|
5337
|
-
type ConfiguratorRule implements Node {
|
|
5338
|
-
id: ID!
|
|
5339
|
-
createdAt: DateTime!
|
|
5340
|
-
updatedAt: DateTime!
|
|
5341
|
-
name: String!
|
|
5342
|
-
sourceKey: String!
|
|
5343
|
-
enabled: Boolean!
|
|
5344
|
-
phaseKey: String!
|
|
5345
|
-
order: Int!
|
|
5346
|
-
phase: RulePhase
|
|
5347
|
-
conditions: [ConfigurableOperation!]!
|
|
5348
|
-
actions: [ConfigurableOperation!]!
|
|
5349
5574
|
}
|
|
5350
5575
|
|
|
5351
5576
|
type ProductConfigurationFieldValue {
|
|
@@ -5379,15 +5604,6 @@ type ProductConfiguration implements Node {
|
|
|
5379
5604
|
customFields: JSON
|
|
5380
5605
|
}
|
|
5381
5606
|
|
|
5382
|
-
type ProductConfigurationList implements PaginatedList {
|
|
5383
|
-
items: [ProductConfiguration!]!
|
|
5384
|
-
totalItems: Int!
|
|
5385
|
-
}
|
|
5386
|
-
|
|
5387
|
-
input ProductConfigurationListOptions {
|
|
5388
|
-
state: StringOperators
|
|
5389
|
-
}
|
|
5390
|
-
|
|
5391
5607
|
type CalculationError {
|
|
5392
5608
|
sourceKey: String!
|
|
5393
5609
|
type: String!
|
|
@@ -5566,6 +5782,20 @@ type BatchApprovalDecisionResult {
|
|
|
5566
5782
|
errorMessage: String
|
|
5567
5783
|
}
|
|
5568
5784
|
|
|
5785
|
+
type PunchoutSessionInfo {
|
|
5786
|
+
id: ID!
|
|
5787
|
+
operation: String!
|
|
5788
|
+
buyerCookie: String!
|
|
5789
|
+
expiresAt: DateTime!
|
|
5790
|
+
tradingPartnerName: String!
|
|
5791
|
+
extrinsics: JSON
|
|
5792
|
+
}
|
|
5793
|
+
|
|
5794
|
+
type PunchoutCartTransferResult {
|
|
5795
|
+
browserFormPostUrl: String!
|
|
5796
|
+
cxmlPayload: String!
|
|
5797
|
+
}
|
|
5798
|
+
|
|
5569
5799
|
input AddCompanyTaxIdInput {
|
|
5570
5800
|
number: String!
|
|
5571
5801
|
type: String
|
|
@@ -5765,6 +5995,7 @@ input ProductFilterParameter {
|
|
|
5765
5995
|
_or: [ProductFilterParameter!]
|
|
5766
5996
|
isGiftCard: BooleanOperators
|
|
5767
5997
|
configuratorSystemCode: StringOperators
|
|
5998
|
+
unspscCode: StringOperators
|
|
5768
5999
|
}
|
|
5769
6000
|
|
|
5770
6001
|
input ProductSortParameter {
|
|
@@ -5776,6 +6007,7 @@ input ProductSortParameter {
|
|
|
5776
6007
|
description: SortOrder
|
|
5777
6008
|
isGiftCard: SortOrder
|
|
5778
6009
|
configuratorSystemCode: SortOrder
|
|
6010
|
+
unspscCode: SortOrder
|
|
5779
6011
|
}
|
|
5780
6012
|
|
|
5781
6013
|
input StoreCreditFilterParameter {
|
|
@@ -5844,6 +6076,29 @@ input QuoteSortParameter {
|
|
|
5844
6076
|
convertedOrderId: SortOrder
|
|
5845
6077
|
}
|
|
5846
6078
|
|
|
6079
|
+
input SharedCartFilterParameter {
|
|
6080
|
+
id: IDOperators
|
|
6081
|
+
createdAt: DateOperators
|
|
6082
|
+
updatedAt: DateOperators
|
|
6083
|
+
name: StringOperators
|
|
6084
|
+
description: StringOperators
|
|
6085
|
+
status: StringOperators
|
|
6086
|
+
companyId: IDOperators
|
|
6087
|
+
businessUnitId: IDOperators
|
|
6088
|
+
_and: [SharedCartFilterParameter!]
|
|
6089
|
+
_or: [SharedCartFilterParameter!]
|
|
6090
|
+
}
|
|
6091
|
+
|
|
6092
|
+
input SharedCartSortParameter {
|
|
6093
|
+
id: SortOrder
|
|
6094
|
+
createdAt: SortOrder
|
|
6095
|
+
updatedAt: SortOrder
|
|
6096
|
+
name: SortOrder
|
|
6097
|
+
description: SortOrder
|
|
6098
|
+
companyId: SortOrder
|
|
6099
|
+
businessUnitId: SortOrder
|
|
6100
|
+
}
|
|
6101
|
+
|
|
5847
6102
|
input ApprovalRequestFilterParameter {
|
|
5848
6103
|
id: IDOperators
|
|
5849
6104
|
createdAt: DateOperators
|
|
@@ -5922,6 +6177,7 @@ type OrderLineCustomFields {
|
|
|
5922
6177
|
type ProductCustomFields {
|
|
5923
6178
|
isGiftCard: Boolean
|
|
5924
6179
|
configuratorSystemCode: String
|
|
6180
|
+
unspscCode: String
|
|
5925
6181
|
}
|
|
5926
6182
|
|
|
5927
6183
|
type CompanyCustomFields {
|
|
@@ -5963,6 +6219,10 @@ input NativeAuthInput {
|
|
|
5963
6219
|
password: String!
|
|
5964
6220
|
}
|
|
5965
6221
|
|
|
6222
|
+
input PunchoutAuthInput {
|
|
6223
|
+
token: String!
|
|
6224
|
+
}
|
|
6225
|
+
|
|
5966
6226
|
input RegisterCustomerCustomFieldsInput {
|
|
5967
6227
|
globalDiscount: Int
|
|
5968
6228
|
}
|
package/dist/bin/run.js
CHANGED
|
@@ -1,120 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
const commander_1 = require("commander");
|
|
40
|
-
const cli_1 = require("../cli");
|
|
41
|
-
const scaffolder_1 = require("../scaffolder");
|
|
42
|
-
const scaffold_storefront_only_1 = require("../scaffold-storefront-only");
|
|
43
|
-
const add_to_existing_1 = require("../add-to-existing");
|
|
44
|
-
function getVersion() {
|
|
45
|
-
const pkgPath = path.join(__dirname, '..', '..', 'package.json');
|
|
46
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
47
|
-
return pkg.version;
|
|
48
|
-
}
|
|
49
|
-
const program = new commander_1.Command()
|
|
50
|
-
.name('create-vendure-platform')
|
|
51
|
-
.description('Scaffold a Vendure project with Vendure Platform plugins, or a standalone storefront')
|
|
52
|
-
.version(getVersion(), '-v, --version')
|
|
53
|
-
// Required so the same flag names (e.g. --plugins) can mean different things
|
|
54
|
-
// on `program` (default scaffold action) and `program.command('add')`. Without
|
|
55
|
-
// this, commander v13 consumes those flags at the program level even when
|
|
56
|
-
// they appear after the subcommand name.
|
|
57
|
-
.enablePositionalOptions();
|
|
58
|
-
program
|
|
59
|
-
.command('add')
|
|
60
|
-
.description('Add Vendure Platform to an existing Vendure project (run from the project root)')
|
|
61
|
-
.option('--plugins <list>', 'Comma-separated list of plugin keys to include (skips the interactive prompt)')
|
|
62
|
-
.option('--registry-token <token>', 'Vendure private-registry npm auth token (written to project .npmrc as _authToken)')
|
|
63
|
-
.option('--license-token <token>', 'Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)')
|
|
64
|
-
.option('--dry-run', 'Show what would be changed without writing files')
|
|
65
|
-
.action(async (opts) => {
|
|
66
|
-
const options = await (0, add_to_existing_1.runAddToExistingCli)({
|
|
67
|
-
plugins: opts.plugins,
|
|
68
|
-
dryRun: opts.dryRun,
|
|
69
|
-
registryToken: opts.registryToken,
|
|
70
|
-
licenseToken: opts.licenseToken,
|
|
71
|
-
});
|
|
72
|
-
await (0, add_to_existing_1.addToExisting)(options);
|
|
73
|
-
});
|
|
74
|
-
program
|
|
75
|
-
.argument('[project-name]', 'Name of the project to create')
|
|
76
|
-
.option('--plugins <list>', 'Comma-separated list of plugin keys to include')
|
|
77
|
-
.option('--company <name>', 'Company name for the demo project')
|
|
78
|
-
.option('--no-storefront', 'Skip the Next.js storefront')
|
|
79
|
-
.option('--github', 'Create a GitHub repository')
|
|
80
|
-
.option('--github-org <org>', 'GitHub organization (only used with --github)', 'vendurehq')
|
|
81
|
-
.option('--no-github', 'Do not create a GitHub repository')
|
|
82
|
-
.option('--no-install', 'Skip dependency install')
|
|
83
|
-
.option('--no-git', 'Skip git init')
|
|
84
|
-
.option('--dry-run', 'Show what would be created without writing files')
|
|
85
|
-
.option('--storefront-only', 'Scaffold just the Next.js storefront, no server or plugins')
|
|
86
|
-
.option('--api-url <url>', 'Vendure Shop API URL (storefront-only mode)')
|
|
87
|
-
.option('--scenario <name>', 'Storefront scenario (storefront-only mode; default: customer)')
|
|
88
|
-
.option('--pm <bun|npm|pnpm>', 'Package manager used for the install step (default: bun)')
|
|
89
|
-
.option('--registry-token <token>', 'Vendure private-registry npm auth token (written to project .npmrc as _authToken)')
|
|
90
|
-
.option('--license-token <token>', 'Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)')
|
|
91
|
-
.action(async (projectName, opts) => {
|
|
92
|
-
const flags = {
|
|
93
|
-
plugins: opts.plugins,
|
|
94
|
-
company: opts.company,
|
|
95
|
-
storefront: opts.storefront,
|
|
96
|
-
github: opts.github,
|
|
97
|
-
githubOrg: opts.githubOrg,
|
|
98
|
-
install: opts.install,
|
|
99
|
-
git: opts.git,
|
|
100
|
-
dryRun: opts.dryRun,
|
|
101
|
-
storefrontOnly: opts.storefrontOnly,
|
|
102
|
-
apiUrl: opts.apiUrl,
|
|
103
|
-
scenario: opts.scenario,
|
|
104
|
-
pm: opts.pm,
|
|
105
|
-
registryToken: opts.registryToken,
|
|
106
|
-
licenseToken: opts.licenseToken,
|
|
107
|
-
};
|
|
108
|
-
if (flags.storefrontOnly) {
|
|
109
|
-
const options = await (0, cli_1.runStorefrontOnlyCli)(projectName, flags);
|
|
110
|
-
await (0, scaffold_storefront_only_1.scaffoldStorefrontOnly)(options);
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
const options = await (0, cli_1.runCli)(projectName, flags);
|
|
114
|
-
await (0, scaffolder_1.scaffold)(options);
|
|
115
|
-
});
|
|
116
|
-
program.parseAsync().catch((err) => {
|
|
117
|
-
console.error('Error:', err.message);
|
|
118
|
-
process.exit(1);
|
|
119
|
-
});
|
|
120
|
-
//# sourceMappingURL=run.js.map
|
|
2
|
+
"use strict";var e=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),t=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n=this&&this.__importStar||function(){var n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},n(e)};return function(o){if(o&&o.__esModule)return o;var r={};if(null!=o)for(var i=n(o),a=0;a<i.length;a++)"default"!==i[a]&&e(r,o,i[a]);return t(r,o),r}}();Object.defineProperty(exports,"__esModule",{value:!0});const o=n(require("fs")),r=n(require("path")),i=require("commander"),a=require("../cli"),s=require("../scaffolder"),u=require("../scaffold-storefront-only"),l=require("../add-to-existing");function c(){const e=r.join(__dirname,"..","..","package.json");return JSON.parse(o.readFileSync(e,"utf8")).version}const p=(new i.Command).name("create-vendure-platform").description("Scaffold a Vendure project with Vendure Platform plugins, or a standalone storefront").version(c(),"-v, --version").enablePositionalOptions();p.command("add").description("Add Vendure Platform to an existing Vendure project (run from the project root)").option("--plugins <list>","Comma-separated list of plugin keys to include (skips the interactive prompt)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").option("--dry-run","Show what would be changed without writing files").action(async e=>{const t=await(0,l.runAddToExistingCli)({plugins:e.plugins,dryRun:e.dryRun,registryToken:e.registryToken,licenseToken:e.licenseToken});await(0,l.addToExisting)(t)}),p.argument("[project-name]","Name of the project to create").option("--plugins <list>","Comma-separated list of plugin keys to include").option("--company <name>","Company name for the demo project").option("--no-storefront","Skip the Next.js storefront").option("--github","Create a GitHub repository").option("--github-org <org>","GitHub organization (only used with --github)","vendurehq").option("--no-github","Do not create a GitHub repository").option("--no-install","Skip dependency install").option("--no-git","Skip git init").option("--dry-run","Show what would be created without writing files").option("--storefront-only","Scaffold just the Next.js storefront, no server or plugins").option("--api-url <url>","Vendure Shop API URL (storefront-only mode)").option("--scenario <name>","Storefront scenario (storefront-only mode; default: customer)").option("--pm <bun|npm|pnpm>","Package manager used for the install step (default: bun)").option("--registry-token <token>","Vendure private-registry npm auth token (written to project .npmrc as _authToken)").option("--license-token <token>","Vendure Platform server-side license token (written to .env as VENDURE_PLATFORM_LICENSE_TOKEN)").action(async(e,t)=>{const n={plugins:t.plugins,company:t.company,storefront:t.storefront,github:t.github,githubOrg:t.githubOrg,install:t.install,git:t.git,dryRun:t.dryRun,storefrontOnly:t.storefrontOnly,apiUrl:t.apiUrl,scenario:t.scenario,pm:t.pm,registryToken:t.registryToken,licenseToken:t.licenseToken};if(n.storefrontOnly){const t=await(0,a.runStorefrontOnlyCli)(e,n);return void await(0,u.scaffoldStorefrontOnly)(t)}const o=await(0,a.runCli)(e,n);await(0,s.scaffold)(o)}),p.parseAsync().catch(e=>{console.error("Error:",e.message),process.exit(1)});
|