-
Notifications
You must be signed in to change notification settings - Fork 81
/
schema.graphql
510 lines (447 loc) · 15.7 KB
/
schema.graphql
1
2
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
153
154
155
156
157
158
159
160
161
162
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
type Commerce_Cart_DecoratedCart {
cart: Commerce_Cart_Cart!
decoratedDeliveries: [Commerce_Cart_DecoratedDelivery!]
getDecoratedDeliveryByCode(deliveryCode: String!): Commerce_Cart_DecoratedDelivery
getAllPaymentRequiredItems: Commerce_Cart_PricedItems!
cartSummary: Commerce_Cart_Summary!
}
type Commerce_Cart_Summary {
discounts: Commerce_Cart_AppliedDiscounts!
totalDiscountAmount: Commerce_Price
totalGiftCardAmount: Commerce_Price
grandTotalWithGiftCards: Commerce_Price
sumTotalDiscountWithGiftCardsAmount: Commerce_Price
hasAppliedDiscounts: Boolean!
sumTaxes: Commerce_Cart_Taxes
sumPaymentSelectionCartSplitValueAmountByMethods(methods: [String!]): Commerce_Price
sumPaymentSelectionCartSplitPriceAmountByMethods(methods: [String!]): Commerce_Price
}
type Commerce_Cart_Cart {
id: ID!
entityID: String!
billingAddress: Commerce_Cart_Address
purchaser: Commerce_Cart_Person
deliveries: [Commerce_Cart_Delivery!]
additionalData: Commerce_Cart_AdditionalData!
paymentSelection: Commerce_Cart_PaymentSelection
belongsToAuthenticatedUser: Boolean!
authenticatedUserID: String!
appliedCouponCodes: [Commerce_Cart_CouponCode!]
defaultCurrency: String!
totalitems: [Commerce_Cart_Totalitem!]
itemCount: Int!
productCount: Int!
isPaymentSelected: Boolean!
grandTotal: Commerce_Price!
sumTotalTaxAmount: Commerce_Price!
subTotalNet: Commerce_Price!
appliedGiftCards: [Commerce_Cart_AppliedGiftCard!]
getDeliveryByCode(deliveryCode: String!): Commerce_Cart_Delivery
getDeliveryCodes: [String!]
getMainShippingEMail: String!
isEmpty: Boolean!
hasDeliveryForCode(deliveryCode: String!): Boolean!
getDeliveryByItemID(itemID: String!): Commerce_Cart_Delivery!
getByItemID(itemID: String!): Commerce_Cart_Item!
getTotalQty(marketPlaceCode: String!, variantCode: String!): Int
getByExternalReference(ref: String!): Commerce_Cart_Item!
getVoucherSavings: Commerce_Price!
getCartTeaser: Commerce_Cart_Teaser!
shippingNet: Commerce_Price!
shippingNetWithDiscounts: Commerce_Price!
shippingGross: Commerce_Price!
shippingGrossWithDiscounts: Commerce_Price!
hasShippingCosts: Boolean!
allShippingTitles: [String!]
subTotalGross: Commerce_Price!
subTotalGrossWithDiscounts: Commerce_Price!
subTotalNetWithDiscounts: Commerce_Price!
totalDiscountAmount: Commerce_Price!
nonItemRelatedDiscountAmount: Commerce_Price!
itemRelatedDiscountAmount: Commerce_Price!
hasAppliedCouponCode: Boolean!
getPaymentReference: String!
getTotalItemsByType(typeCode: String!): [Commerce_Cart_Totalitem!]
grandTotalCharges: Commerce_Price_Charges!
hasAppliedGiftCards: Boolean!
hasRemainingGiftCards: Boolean!
}
type Commerce_Cart_PricedItems {
cartItems: [Commerce_Cart_PricedCartItem!]
shippingItems: [Commerce_Cart_PricedShippingItem!]
totalItems: [Commerce_Cart_PricedTotalItem!]
}
type Commerce_Cart_PricedCartItem {
amount: Commerce_Price!
itemID: String!
}
type Commerce_Cart_PricedShippingItem {
amount: Commerce_Price!
deliveryInfoCode: String!
}
type Commerce_Cart_PricedTotalItem {
amount: Commerce_Price!
code: String!
}
type Commerce_Cart_Tax {
amount: Commerce_Price!
type: String!
rate: Float
}
type Commerce_Cart_Taxes {
items: [Commerce_Cart_Tax]!
getByType(taxType: String): Commerce_Cart_Tax!
}
type Commerce_Cart_Teaser {
productCount: Int
ItemCount: Int
DeliveryCodes: [String]
}
interface Commerce_Cart_PaymentSelection {
gateway: String!
totalValue: Commerce_Price!
cartSplit: [Commerce_Cart_PaymentSelection_Split!]
}
type Commerce_Cart_PaymentSelection_Split {
qualifier: Commerce_Cart_PaymentSelection_SplitQualifier!
charge: Commerce_Price_Charge!
}
type Commerce_Cart_PaymentSelection_SplitQualifier {
type: String!
method: String!
reference: String!
}
type Commerce_Cart_DefaultPaymentSelection implements Commerce_Cart_PaymentSelection {
gateway: String!
totalValue: Commerce_Price!
cartSplit: [Commerce_Cart_PaymentSelection_Split!]
}
type Commerce_Cart_DecoratedDelivery {
delivery: Commerce_Cart_Delivery!
decoratedItems: [Commerce_Cart_DecoratedItem!]
}
type Commerce_Cart_Delivery {
deliveryInfo: Commerce_Cart_DeliveryInfo
cartitems: [Commerce_Cart_Item!]
shippingItem: Commerce_Cart_ShippingItem
subTotalGross: Commerce_Price
grandTotal: Commerce_Price
sumTotalTaxAmount: Commerce_Price
subTotalNet: Commerce_Price
totalDiscountAmount: Commerce_Price
nonItemRelatedDiscountAmount: Commerce_Price
itemRelatedDiscountAmount: Commerce_Price
subTotalGrossWithDiscounts: Commerce_Price
subTotalNetWithDiscounts: Commerce_Price!
hasItems: Boolean!
}
type Commerce_Cart_DeliveryInfo {
code: String!
workflow: String!
method: String!
carrier: String!
deliveryLocation: Commerce_Cart_DeliveryLocation
desiredTime: Time
additionalData: Commerce_Cart_CustomAttributes!
}
type Commerce_Cart_DeliveryLocation {
type: String!
address: Commerce_Cart_Address
useBillingAddress: Boolean!
code: String!
}
type Commerce_Cart_ShippingItem {
title: String!
priceNet: Commerce_Price!
taxAmount: Commerce_Price!
priceGross: Commerce_Price!
appliedDiscounts: Commerce_Cart_AppliedDiscounts!
totalWithDiscountInclTax: Commerce_Price!
tax: Commerce_Cart_Tax!
}
type Commerce_Cart_AppliedDiscounts {
items: [Commerce_Cart_AppliedDiscount!]
byCampaignCode(campaignCode: String): Commerce_Cart_AppliedDiscounts!
byType(filterType: String): Commerce_Cart_AppliedDiscounts!
}
type Commerce_Cart_AppliedDiscount {
campaignCode: String!
couponCode: String!
label: String!
applied: Commerce_Price!
type: String!
isItemRelated: Boolean!
sortOrder: Int!
}
type Commerce_Cart_DecoratedItem {
item: Commerce_Cart_Item
product: Commerce_Product
}
type Commerce_Cart_Item {
id: ID!
externalReference: String!
marketplaceCode: String!
variantMarketPlaceCode: String!
productName: String!
sourceID: String!
qty: Int!
additionalDataKeys: [String!]
additionalDataValues: [String!]
getAdditionalData(key: String!): String
hasAdditionalDataKey(key: String!): Boolean
singlePriceGross: Commerce_Price!
singlePriceNet: Commerce_Price!
rowPriceGross: Commerce_Price!
rowPriceNet: Commerce_Price!
appliedDiscounts: Commerce_Cart_AppliedDiscounts!
# rowTaxes: Commerce_Taxes!
}
type Commerce_Cart_Address {
vat: String!
firstname: String!
lastname: String!
middleName: String!
title: String!
salutation: String!
street: String!
streetNr: String!
additionalAddressLines: [String!]
company: String!
city: String!
postCode: String!
state: String!
regionCode: String!
country: String!
countryCode: String!
telephone: String!
email: String!
}
type Commerce_Cart_Person {
address: Commerce_Cart_Address
personalDetails: Commerce_Cart_PersonalDetails!
existingCustomerData: Commerce_Cart_ExistingCustomerData
}
type Commerce_Cart_ExistingCustomerData {
id: ID!
}
type Commerce_Cart_PersonalDetails {
dateOfBirth: String!
passportCountry: String!
passportNumber: String!
nationality: String!
}
type Commerce_Cart_AdditionalData {
customAttributes: Commerce_Cart_CustomAttributes!
reservedOrderID: String!
}
type Commerce_Cart_CustomAttributes {
"Get specific attribute by key"
get(key: String!): Commerce_Cart_KeyValue
}
type Commerce_Cart_KeyValue {
key: String!
value: String!
}
type Commerce_Cart_Totalitem {
code: String!
title: String!
price: Commerce_Price!
type: String!
}
type Commerce_Cart_CouponCode {
code: String!
}
type Commerce_Cart_AppliedGiftCard {
code: String!
applied: Commerce_Price!
remaining: Commerce_Price!
hasRemaining: Boolean!
}
type Commerce_Cart_ValidationResult {
hasCommonError: Boolean!
commonErrorMessageKey: String!
itemResults: [Commerce_Cart_ItemValidationError!]
}
type Commerce_Cart_ItemValidationError {
itemID: String!
errorMessageKey: String!
}
type Commerce_Cart_QtyRestrictionResult {
isRestricted: Boolean!
maxAllowed: Int!
remainingDifference: Int!
restrictorName: String!
}
type Commerce_Cart_PlacedOrderInfo {
orderNumber: String!
deliveryCode: String!
}
type Commerce_Cart_BillingAddressForm {
"Billing address form data"
formData: Commerce_Cart_AddressForm
"Validation of supplied billing address, empty if address is valid"
validationInfo: Commerce_Cart_Form_ValidationInfo
"Shows if the request was successfully processed"
processed: Boolean
}
type Commerce_Cart_SelectedPaymentResult {
validationInfo: Commerce_Cart_Form_ValidationInfo
processed: Boolean
}
type Commerce_Cart_Form_ValidationInfo {
"Field specific validation errors"
fieldErrors: [Commerce_Cart_Form_FieldError!]
"General validation errors"
generalErrors: [Commerce_Cart_Form_Error!]
}
type Commerce_Cart_Form_Error {
"A key of the error message. Often used for translation"
messageKey: String!
"A speaking error label. Often used to show to end user - in case no translation exists"
defaultLabel: String!
}
type Commerce_Cart_Form_FieldError {
"A key of the error message. Often used for translation"
messageKey: String!
"A speaking error label. Often used to show to end user - in case no translation exists"
defaultLabel: String!
"Identifier for a form field"
fieldName: String!
}
type Commerce_Cart_AddressForm {
vat: String!
firstname: String!
lastname: String!
middleName: String!
title: String!
salutation: String!
street: String!
streetNr: String!
addressLine1: String!
addressLine2: String!
company: String!
city: String!
postCode: String!
state: String!
regionCode: String!
country: String!
countryCode: String!
phoneNumber: String!
email: String!
}
input Commerce_Cart_AddressFormInput {
vat: String
firstname: String!
lastname: String!
middleName: String
title: String
salutation: String
street: String
streetNr: String
addressLine1: String
addressLine2: String
company: String
city: String
postCode: String
state: String
regionCode: String
country: String
countryCode: String
phoneNumber: String
email: String!
}
input Commerce_Cart_DeliveryAddressInput {
"Unique delivery code to identify the delivery"
deliveryCode: String!
"Delivery address form data"
deliveryAddress: Commerce_Cart_AddressFormInput
"Should the data of the billing address be used for this delivery"
useBillingAddress: Boolean!
"Optional Shipping Method"
method: String
"Optional Shipping Method"
carrier: String
"Optional desired delivery date / time"
desiredTime: Time
}
type Commerce_Cart_DeliveryAddressForm {
"Unique delivery code to identify the delivery"
deliveryCode: String!
"Delivery address form data"
formData: Commerce_Cart_AddressForm
"Shows if the data of the billing address should be used for this delivery"
useBillingAddress: Boolean!
"Shipping Method"
method: String
"Shipping Carrier"
carrier: String
"Optional desired delivery date / time"
desiredTime: Time
"Validation of supplied delivery address, empty if address is valid"
validationInfo: Commerce_Cart_Form_ValidationInfo
"Shows if the request was successfully processed"
processed: Boolean
}
type Commerce_Cart_UpdateDeliveryShippingOptions_Result {
"Shows if the request was successfully processed"
processed: Boolean
}
input Commerce_Cart_DeliveryShippingOptionInput {
"Unique delivery code to identify an **existing** delivery"
deliveryCode: String!
"Shipping Method"
method: String!
"Shipping Carrier"
carrier: String!
}
input Commerce_Cart_KeyValueInput {
key: String!
value: String!
}
input Commerce_Cart_DeliveryAdditionalDataInput {
deliveryCode: String!
additionalData: [Commerce_Cart_KeyValueInput!]!
}
extend type Query {
Commerce_Cart_DecoratedCart: Commerce_Cart_DecoratedCart!
Commerce_Cart_Validator: Commerce_Cart_ValidationResult!
"Commerce_Cart_QtyRestriction returns if the product is restricted in terms of the allowed quantity for the current cart and the given delivery"
Commerce_Cart_QtyRestriction(marketplaceCode: String!, variantCode: String, deliveryCode: String!): Commerce_Cart_QtyRestrictionResult!
}
input Commerce_Cart_AddToCartInput {
marketplaceCode: ID!
qty: Int!
deliveryCode: String!
variantMarketplaceCode: String
bundleConfiguration:[Commerce_Cart_ChoiceConfigurationInput!]
}
input Commerce_Cart_ChoiceConfigurationInput {
identifier: String!
marketplaceCode: String!
variantMarketplaceCode: String
qty: Int!
}
extend type Mutation {
Commerce_Cart_AddToCart(addToCartInput: Commerce_Cart_AddToCartInput!): Commerce_Cart_DecoratedCart!
Commerce_Cart_DeleteCartDelivery(deliveryCode: String!): Commerce_Cart_DecoratedCart!
Commerce_Cart_DeleteItem(itemID: ID!, deliveryCode: String!): Commerce_Cart_DecoratedCart!
Commerce_Cart_UpdateItemQty(itemID: ID!, deliveryCode: String!, qty: Int!): Commerce_Cart_DecoratedCart!
"Updates the bundle configuration of an existing item"
Commerce_Cart_UpdateItemBundleConfig(itemID: ID!, bundleConfig: [Commerce_Cart_ChoiceConfigurationInput!]!): Commerce_Cart_DecoratedCart!
"Adds/Updates the Billing Address of the current cart"
Commerce_Cart_UpdateBillingAddress(addressForm: Commerce_Cart_AddressFormInput): Commerce_Cart_BillingAddressForm!
Commerce_Cart_UpdateSelectedPayment(gateway: String!, method: String!): Commerce_Cart_SelectedPaymentResult!
Commerce_Cart_ApplyCouponCodeOrGiftCard(code: String!): Commerce_Cart_DecoratedCart
Commerce_Cart_RemoveGiftCard(giftCardCode: String!): Commerce_Cart_DecoratedCart
Commerce_Cart_RemoveCouponCode(couponCode: String!): Commerce_Cart_DecoratedCart
"Adds/Updates one/multiple Delivery Addresses"
Commerce_Cart_UpdateDeliveryAddresses(deliveryAdresses: [Commerce_Cart_DeliveryAddressInput!]): [Commerce_Cart_DeliveryAddressForm]!
"Adds/Updates one/multiple Delivery Addresses"
Commerce_Cart_UpdateDeliveryShippingOptions(shippingOptions: [Commerce_Cart_DeliveryShippingOptionInput!]): Commerce_Cart_UpdateDeliveryShippingOptions_Result!
"Cleans current cart"
Commerce_Cart_Clean: Boolean!
"Adds/Updates additional data for the cart"
Commerce_Cart_UpdateAdditionalData(additionalData: [Commerce_Cart_KeyValueInput!]!): Commerce_Cart_DecoratedCart!
"Adds/Updates additional data for the given deliveries"
Commerce_Cart_UpdateDeliveriesAdditionalData(data: [Commerce_Cart_DeliveryAdditionalDataInput!]!): Commerce_Cart_DecoratedCart!
}