@bacano/sdk 1.1.0 → 1.1.9

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/graphql.cjs CHANGED
@@ -206,7 +206,6 @@ var GET_PRODUCTS = (
206
206
  ) {
207
207
  id
208
208
  related_product_id
209
- display_label
210
209
  sort_order
211
210
  related_product {
212
211
  id
@@ -228,6 +227,52 @@ var GET_PRODUCTS = (
228
227
  }
229
228
  }
230
229
  }
230
+ product_option_group_members(limit: 1) {
231
+ group {
232
+ id
233
+ display_title
234
+ members(
235
+ where: {
236
+ product: {
237
+ product_website_publications: {
238
+ website_id: { _eq: $websiteId }
239
+ is_visible: { _eq: true }
240
+ }
241
+ chain_products: {
242
+ chain_id: { _eq: $chainId }
243
+ is_enabled: { _eq: true }
244
+ status: { _eq: active }
245
+ }
246
+ }
247
+ }
248
+ order_by: { sort_order: asc }
249
+ ) {
250
+ id
251
+ product_id
252
+ display_label
253
+ sort_order
254
+ product {
255
+ id
256
+ slug
257
+ name
258
+ sku
259
+ product_media(
260
+ where: { file: { mimeType: { _ilike: "image/%" } } }
261
+ order_by: { order: asc }
262
+ limit: 1
263
+ ) {
264
+ id
265
+ file_id
266
+ order
267
+ file {
268
+ mimeType
269
+ name
270
+ }
271
+ }
272
+ }
273
+ }
274
+ }
275
+ }
231
276
  product_attributes {
232
277
  id
233
278
  value
@@ -312,6 +357,52 @@ var GET_PRODUCT_BY_PK = (
312
357
  limit: 1
313
358
  ) {
314
359
  id
360
+ product_option_group_members(limit: 1) {
361
+ group {
362
+ id
363
+ display_title
364
+ members(
365
+ where: {
366
+ product: {
367
+ product_website_publications: {
368
+ website_id: { _eq: $websiteId }
369
+ is_visible: { _eq: true }
370
+ }
371
+ chain_products: {
372
+ chain_id: { _eq: $chainId }
373
+ is_enabled: { _eq: true }
374
+ status: { _eq: active }
375
+ }
376
+ }
377
+ }
378
+ order_by: { sort_order: asc }
379
+ ) {
380
+ id
381
+ product_id
382
+ display_label
383
+ sort_order
384
+ product {
385
+ id
386
+ slug
387
+ name
388
+ sku
389
+ product_media(
390
+ where: { file: { mimeType: { _ilike: "image/%" } } }
391
+ order_by: { order: asc }
392
+ limit: 1
393
+ ) {
394
+ id
395
+ file_id
396
+ order
397
+ file {
398
+ mimeType
399
+ name
400
+ }
401
+ }
402
+ }
403
+ }
404
+ }
405
+ }
315
406
  name
316
407
  description
317
408
  long_description
@@ -398,7 +489,6 @@ var GET_PRODUCT_BY_PK = (
398
489
  ) {
399
490
  id
400
491
  related_product_id
401
- display_label
402
492
  sort_order
403
493
  related_product {
404
494
  id
@@ -880,10 +970,15 @@ var WEBSITE_GET_PRODUCT_CONTENT = (
880
970
  var CHECK_AVAILABILITY = (
881
971
  /* GraphQL */
882
972
  `
883
- query CheckAvailability($variantIds: [uuid!]!, $chainId: uuid!) {
973
+ query CheckAvailability(
974
+ $variantIds: [uuid!]!
975
+ $chainId: uuid!
976
+ $websiteId: uuid
977
+ ) {
884
978
  websiteProductAvailability(
885
979
  product_variant_ids: $variantIds
886
980
  chain_id: $chainId
981
+ website_id: $websiteId
887
982
  ) {
888
983
  product_variant_id
889
984
  in_stock
@@ -939,6 +1034,7 @@ var GET_PRODUCT_LIVE_STATE = (
939
1034
  websiteProductAvailability(
940
1035
  product_variant_ids: $variantIds
941
1036
  chain_id: $chainId
1037
+ website_id: $websiteId
942
1038
  ) {
943
1039
  product_variant_id
944
1040
  in_stock
@@ -976,10 +1072,28 @@ var CREATE_CART = (
976
1072
  total_with_discount
977
1073
  created_at
978
1074
  updated_at
1075
+ volume_pricing {
1076
+ enabled
1077
+ eligibleQuantity
1078
+ appliedPriceType
1079
+ appliedMinQuantity
1080
+ nextPriceType
1081
+ nextMinQuantity
1082
+ remainingQuantity
1083
+ totalSavings
1084
+ }
979
1085
  items {
980
1086
  id
981
1087
  product_variant_id
982
1088
  quantity
1089
+ unit_price
1090
+ line_total
1091
+ base_unit_price
1092
+ unit_savings
1093
+ line_savings
1094
+ volume_pricing_eligible
1095
+ resolved_price_type
1096
+ volume_pricing_min_quantity
983
1097
  product_variant {
984
1098
  id
985
1099
  sku
@@ -1019,10 +1133,28 @@ var GET_CART = (
1019
1133
  total_with_discount
1020
1134
  created_at
1021
1135
  updated_at
1136
+ volume_pricing {
1137
+ enabled
1138
+ eligibleQuantity
1139
+ appliedPriceType
1140
+ appliedMinQuantity
1141
+ nextPriceType
1142
+ nextMinQuantity
1143
+ remainingQuantity
1144
+ totalSavings
1145
+ }
1022
1146
  items {
1023
1147
  id
1024
1148
  product_variant_id
1025
1149
  quantity
1150
+ unit_price
1151
+ line_total
1152
+ base_unit_price
1153
+ unit_savings
1154
+ line_savings
1155
+ volume_pricing_eligible
1156
+ resolved_price_type
1157
+ volume_pricing_min_quantity
1026
1158
  product_variant {
1027
1159
  id
1028
1160
  sku
@@ -1076,10 +1208,28 @@ var START_GUEST_CHECKOUT = (
1076
1208
  total_with_discount
1077
1209
  created_at
1078
1210
  updated_at
1211
+ volume_pricing {
1212
+ enabled
1213
+ eligibleQuantity
1214
+ appliedPriceType
1215
+ appliedMinQuantity
1216
+ nextPriceType
1217
+ nextMinQuantity
1218
+ remainingQuantity
1219
+ totalSavings
1220
+ }
1079
1221
  items {
1080
1222
  id
1081
1223
  product_variant_id
1082
1224
  quantity
1225
+ unit_price
1226
+ line_total
1227
+ base_unit_price
1228
+ unit_savings
1229
+ line_savings
1230
+ volume_pricing_eligible
1231
+ resolved_price_type
1232
+ volume_pricing_min_quantity
1083
1233
  product_variant {
1084
1234
  id
1085
1235
  sku
@@ -1129,10 +1279,28 @@ var SET_CART_ITEM = (
1129
1279
  total_with_discount
1130
1280
  created_at
1131
1281
  updated_at
1282
+ volume_pricing {
1283
+ enabled
1284
+ eligibleQuantity
1285
+ appliedPriceType
1286
+ appliedMinQuantity
1287
+ nextPriceType
1288
+ nextMinQuantity
1289
+ remainingQuantity
1290
+ totalSavings
1291
+ }
1132
1292
  items {
1133
1293
  id
1134
1294
  product_variant_id
1135
1295
  quantity
1296
+ unit_price
1297
+ line_total
1298
+ base_unit_price
1299
+ unit_savings
1300
+ line_savings
1301
+ volume_pricing_eligible
1302
+ resolved_price_type
1303
+ volume_pricing_min_quantity
1136
1304
  product_variant {
1137
1305
  id
1138
1306
  sku
@@ -1180,10 +1348,28 @@ var REMOVE_CART_ITEM = (
1180
1348
  total_with_discount
1181
1349
  created_at
1182
1350
  updated_at
1351
+ volume_pricing {
1352
+ enabled
1353
+ eligibleQuantity
1354
+ appliedPriceType
1355
+ appliedMinQuantity
1356
+ nextPriceType
1357
+ nextMinQuantity
1358
+ remainingQuantity
1359
+ totalSavings
1360
+ }
1183
1361
  items {
1184
1362
  id
1185
1363
  product_variant_id
1186
1364
  quantity
1365
+ unit_price
1366
+ line_total
1367
+ base_unit_price
1368
+ unit_savings
1369
+ line_savings
1370
+ volume_pricing_eligible
1371
+ resolved_price_type
1372
+ volume_pricing_min_quantity
1187
1373
  product_variant {
1188
1374
  id
1189
1375
  sku
@@ -1205,6 +1391,19 @@ var REMOVE_CART_ITEM = (
1205
1391
  }
1206
1392
  `
1207
1393
  );
1394
+ var DISCARD_CART = (
1395
+ /* GraphQL */
1396
+ `
1397
+ mutation DiscardCart($orderId: uuid!, $cartToken: String!) {
1398
+ websiteDiscardCart(order_id: $orderId, cart_token: $cartToken) {
1399
+ success
1400
+ order_id
1401
+ website_cart_status
1402
+ errors
1403
+ }
1404
+ }
1405
+ `
1406
+ );
1208
1407
  var CHECKOUT = (
1209
1408
  /* GraphQL */
1210
1409
  `
@@ -2100,6 +2299,7 @@ var documents = {
2100
2299
  START_GUEST_CHECKOUT,
2101
2300
  SET_CART_ITEM,
2102
2301
  REMOVE_CART_ITEM,
2302
+ DISCARD_CART,
2103
2303
  CHECKOUT,
2104
2304
  GET_LOCATION_OPTIONS,
2105
2305
  GET_DELIVERY_OPTIONS,
package/graphql.d.ts CHANGED
@@ -14,4 +14,4 @@
14
14
  */
15
15
  export { createAuthHeaders } from "./modules/auth";
16
16
  export { APPLY_COUPON, CHECK_AVAILABILITY, CHECKOUT, CREATE_CART, CREATE_PAYMENT_SESSION, documents, GET_BRANDS, GET_CART, GET_CATALOG_ATTRIBUTE_LIST, GET_CATALOG_CATEGORY_LIST, GET_CATEGORIES, GET_CONTEXTUAL_CATALOG_ATTRIBUTE_LIST, GET_DELIVERY_OPTIONS, GET_FREE_SHIPPING_PROGRESS, GET_LOCATION_OPTIONS, GET_ORDER_BY_PK, GET_ORDERS, GET_PAYMENT_METHODS, GET_PRODUCT_BY_PK, GET_PRODUCT_BY_SLUG, GET_PRODUCT_SEO_ENTRIES, GET_PRODUCTS, GET_PROFILE, GET_PUBLIC_ORDER, GET_SHIPPING_POLICY, GET_SHIPPING_QUOTES, REMOVE_CART_ITEM, REMOVE_COUPON, RESOLVE_WEBSITE_BY_SLUG, SET_CART_ITEM, START_GUEST_CHECKOUT, UPDATE_PROFILE, VALIDATE_COUPON, WEBSITE_GET_CONTENT, } from "./transport/documents";
17
- export type { AccessTokenProvider, BacanoClientConfig, BacanoClientContext, Brand, Cart, CartItem, CatalogAttributeList, CatalogAttributeListFilters, CatalogAttributeListItem, CatalogAttributeListValue, CatalogCategoryList, CatalogCategoryListItem, CatalogCategoryListItemSourceType, CheckoutResult, CheckoutSubmission, ContentEntry, ContentJson, ContentMedia, ContentTypeSummary, CustomerProfile, CustomerProfileUpdate, GetAttributeListOptions, GetCategoryListOptions, GetContentOptions, GetOrdersOptions, GetProductSeoEntriesOptions, GetProductsOptions, Order, OrderItem, Product, ProductAttribute, ProductAvailability, ProductCategory, ProductMedia, ProductMediaKind, ProductPrice, ProductPriceType, ProductSeoEntriesResult, ProductSeoEntry, ProductSubcategory, ProductVariant, ProductVariantPricing, PublicOrder, PublicOrderDeliverySummary, PublicOrderItem, PublicOrderLookupInput, PublicOrderPaymentSummary, StartGuestCheckoutInput, VariantAttribute, WebsiteCheckoutAddress, WebsiteCheckoutItem, WebsiteCouponActionResult, WebsiteDeliveryOption, WebsiteDepartmentOption, WebsiteFreeShippingProgress, WebsiteFulfillmentFamily, WebsiteGuestContact, WebsiteLocationOptions, WebsiteMunicipalityOption, WebsitePaymentMethod, WebsitePaymentSessionResult, WebsitePickupInfo, WebsiteShippingPolicy, WebsiteShippingQuote, } from "./types";
17
+ export type { AccessTokenProvider, BacanoClientConfig, BacanoClientContext, Brand, Cart, CartItem, CatalogAttributeList, CatalogAttributeListFilters, CatalogAttributeListItem, CatalogAttributeListValue, CatalogCategoryList, CatalogCategoryListItem, CatalogCategoryListItemSourceType, CheckoutResult, CheckoutSubmission, ContentEntry, ContentJson, ContentMedia, ContentTypeSummary, CustomerProfile, CustomerProfileUpdate, GetAttributeListOptions, GetCategoryListOptions, GetContentOptions, GetOrdersOptions, GetProductSeoEntriesOptions, GetProductsOptions, Order, OrderItem, Product, ProductAttribute, ProductAvailability, ProductCategory, ProductMedia, ProductMediaKind, ProductPrice, ProductPriceType, ProductSeoEntriesResult, ProductSeoEntry, ProductSpecification, ProductSpecificationFacet, ProductSpecificationField, ProductSpecificationFilterSelection, ProductSpecificationMeasure, ProductSpecificationOption, ProductSpecificationSection, ProductSubcategory, ProductVariant, ProductVariantPricing, PublicOrder, PublicOrderDeliverySummary, PublicOrderItem, PublicOrderLookupInput, PublicOrderPaymentSummary, StartGuestCheckoutInput, VariantAttribute, WebsiteCheckoutAddress, WebsiteCheckoutItem, WebsiteCouponActionResult, WebsiteDeliveryOption, WebsiteDepartmentOption, WebsiteFreeShippingProgress, WebsiteFulfillmentFamily, WebsiteGuestContact, WebsiteLocationOptions, WebsiteMunicipalityOption, WebsitePaymentMethod, WebsitePaymentSessionResult, WebsitePickupInfo, WebsiteShippingPolicy, WebsiteShippingQuote, } from "./types";
package/graphql.js CHANGED
@@ -146,7 +146,6 @@ var GET_PRODUCTS = (
146
146
  ) {
147
147
  id
148
148
  related_product_id
149
- display_label
150
149
  sort_order
151
150
  related_product {
152
151
  id
@@ -168,6 +167,52 @@ var GET_PRODUCTS = (
168
167
  }
169
168
  }
170
169
  }
170
+ product_option_group_members(limit: 1) {
171
+ group {
172
+ id
173
+ display_title
174
+ members(
175
+ where: {
176
+ product: {
177
+ product_website_publications: {
178
+ website_id: { _eq: $websiteId }
179
+ is_visible: { _eq: true }
180
+ }
181
+ chain_products: {
182
+ chain_id: { _eq: $chainId }
183
+ is_enabled: { _eq: true }
184
+ status: { _eq: active }
185
+ }
186
+ }
187
+ }
188
+ order_by: { sort_order: asc }
189
+ ) {
190
+ id
191
+ product_id
192
+ display_label
193
+ sort_order
194
+ product {
195
+ id
196
+ slug
197
+ name
198
+ sku
199
+ product_media(
200
+ where: { file: { mimeType: { _ilike: "image/%" } } }
201
+ order_by: { order: asc }
202
+ limit: 1
203
+ ) {
204
+ id
205
+ file_id
206
+ order
207
+ file {
208
+ mimeType
209
+ name
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
171
216
  product_attributes {
172
217
  id
173
218
  value
@@ -252,6 +297,52 @@ var GET_PRODUCT_BY_PK = (
252
297
  limit: 1
253
298
  ) {
254
299
  id
300
+ product_option_group_members(limit: 1) {
301
+ group {
302
+ id
303
+ display_title
304
+ members(
305
+ where: {
306
+ product: {
307
+ product_website_publications: {
308
+ website_id: { _eq: $websiteId }
309
+ is_visible: { _eq: true }
310
+ }
311
+ chain_products: {
312
+ chain_id: { _eq: $chainId }
313
+ is_enabled: { _eq: true }
314
+ status: { _eq: active }
315
+ }
316
+ }
317
+ }
318
+ order_by: { sort_order: asc }
319
+ ) {
320
+ id
321
+ product_id
322
+ display_label
323
+ sort_order
324
+ product {
325
+ id
326
+ slug
327
+ name
328
+ sku
329
+ product_media(
330
+ where: { file: { mimeType: { _ilike: "image/%" } } }
331
+ order_by: { order: asc }
332
+ limit: 1
333
+ ) {
334
+ id
335
+ file_id
336
+ order
337
+ file {
338
+ mimeType
339
+ name
340
+ }
341
+ }
342
+ }
343
+ }
344
+ }
345
+ }
255
346
  name
256
347
  description
257
348
  long_description
@@ -338,7 +429,6 @@ var GET_PRODUCT_BY_PK = (
338
429
  ) {
339
430
  id
340
431
  related_product_id
341
- display_label
342
432
  sort_order
343
433
  related_product {
344
434
  id
@@ -820,10 +910,15 @@ var WEBSITE_GET_PRODUCT_CONTENT = (
820
910
  var CHECK_AVAILABILITY = (
821
911
  /* GraphQL */
822
912
  `
823
- query CheckAvailability($variantIds: [uuid!]!, $chainId: uuid!) {
913
+ query CheckAvailability(
914
+ $variantIds: [uuid!]!
915
+ $chainId: uuid!
916
+ $websiteId: uuid
917
+ ) {
824
918
  websiteProductAvailability(
825
919
  product_variant_ids: $variantIds
826
920
  chain_id: $chainId
921
+ website_id: $websiteId
827
922
  ) {
828
923
  product_variant_id
829
924
  in_stock
@@ -879,6 +974,7 @@ var GET_PRODUCT_LIVE_STATE = (
879
974
  websiteProductAvailability(
880
975
  product_variant_ids: $variantIds
881
976
  chain_id: $chainId
977
+ website_id: $websiteId
882
978
  ) {
883
979
  product_variant_id
884
980
  in_stock
@@ -916,10 +1012,28 @@ var CREATE_CART = (
916
1012
  total_with_discount
917
1013
  created_at
918
1014
  updated_at
1015
+ volume_pricing {
1016
+ enabled
1017
+ eligibleQuantity
1018
+ appliedPriceType
1019
+ appliedMinQuantity
1020
+ nextPriceType
1021
+ nextMinQuantity
1022
+ remainingQuantity
1023
+ totalSavings
1024
+ }
919
1025
  items {
920
1026
  id
921
1027
  product_variant_id
922
1028
  quantity
1029
+ unit_price
1030
+ line_total
1031
+ base_unit_price
1032
+ unit_savings
1033
+ line_savings
1034
+ volume_pricing_eligible
1035
+ resolved_price_type
1036
+ volume_pricing_min_quantity
923
1037
  product_variant {
924
1038
  id
925
1039
  sku
@@ -959,10 +1073,28 @@ var GET_CART = (
959
1073
  total_with_discount
960
1074
  created_at
961
1075
  updated_at
1076
+ volume_pricing {
1077
+ enabled
1078
+ eligibleQuantity
1079
+ appliedPriceType
1080
+ appliedMinQuantity
1081
+ nextPriceType
1082
+ nextMinQuantity
1083
+ remainingQuantity
1084
+ totalSavings
1085
+ }
962
1086
  items {
963
1087
  id
964
1088
  product_variant_id
965
1089
  quantity
1090
+ unit_price
1091
+ line_total
1092
+ base_unit_price
1093
+ unit_savings
1094
+ line_savings
1095
+ volume_pricing_eligible
1096
+ resolved_price_type
1097
+ volume_pricing_min_quantity
966
1098
  product_variant {
967
1099
  id
968
1100
  sku
@@ -1016,10 +1148,28 @@ var START_GUEST_CHECKOUT = (
1016
1148
  total_with_discount
1017
1149
  created_at
1018
1150
  updated_at
1151
+ volume_pricing {
1152
+ enabled
1153
+ eligibleQuantity
1154
+ appliedPriceType
1155
+ appliedMinQuantity
1156
+ nextPriceType
1157
+ nextMinQuantity
1158
+ remainingQuantity
1159
+ totalSavings
1160
+ }
1019
1161
  items {
1020
1162
  id
1021
1163
  product_variant_id
1022
1164
  quantity
1165
+ unit_price
1166
+ line_total
1167
+ base_unit_price
1168
+ unit_savings
1169
+ line_savings
1170
+ volume_pricing_eligible
1171
+ resolved_price_type
1172
+ volume_pricing_min_quantity
1023
1173
  product_variant {
1024
1174
  id
1025
1175
  sku
@@ -1069,10 +1219,28 @@ var SET_CART_ITEM = (
1069
1219
  total_with_discount
1070
1220
  created_at
1071
1221
  updated_at
1222
+ volume_pricing {
1223
+ enabled
1224
+ eligibleQuantity
1225
+ appliedPriceType
1226
+ appliedMinQuantity
1227
+ nextPriceType
1228
+ nextMinQuantity
1229
+ remainingQuantity
1230
+ totalSavings
1231
+ }
1072
1232
  items {
1073
1233
  id
1074
1234
  product_variant_id
1075
1235
  quantity
1236
+ unit_price
1237
+ line_total
1238
+ base_unit_price
1239
+ unit_savings
1240
+ line_savings
1241
+ volume_pricing_eligible
1242
+ resolved_price_type
1243
+ volume_pricing_min_quantity
1076
1244
  product_variant {
1077
1245
  id
1078
1246
  sku
@@ -1120,10 +1288,28 @@ var REMOVE_CART_ITEM = (
1120
1288
  total_with_discount
1121
1289
  created_at
1122
1290
  updated_at
1291
+ volume_pricing {
1292
+ enabled
1293
+ eligibleQuantity
1294
+ appliedPriceType
1295
+ appliedMinQuantity
1296
+ nextPriceType
1297
+ nextMinQuantity
1298
+ remainingQuantity
1299
+ totalSavings
1300
+ }
1123
1301
  items {
1124
1302
  id
1125
1303
  product_variant_id
1126
1304
  quantity
1305
+ unit_price
1306
+ line_total
1307
+ base_unit_price
1308
+ unit_savings
1309
+ line_savings
1310
+ volume_pricing_eligible
1311
+ resolved_price_type
1312
+ volume_pricing_min_quantity
1127
1313
  product_variant {
1128
1314
  id
1129
1315
  sku
@@ -1145,6 +1331,19 @@ var REMOVE_CART_ITEM = (
1145
1331
  }
1146
1332
  `
1147
1333
  );
1334
+ var DISCARD_CART = (
1335
+ /* GraphQL */
1336
+ `
1337
+ mutation DiscardCart($orderId: uuid!, $cartToken: String!) {
1338
+ websiteDiscardCart(order_id: $orderId, cart_token: $cartToken) {
1339
+ success
1340
+ order_id
1341
+ website_cart_status
1342
+ errors
1343
+ }
1344
+ }
1345
+ `
1346
+ );
1148
1347
  var CHECKOUT = (
1149
1348
  /* GraphQL */
1150
1349
  `
@@ -2040,6 +2239,7 @@ var documents = {
2040
2239
  START_GUEST_CHECKOUT,
2041
2240
  SET_CART_ITEM,
2042
2241
  REMOVE_CART_ITEM,
2242
+ DISCARD_CART,
2043
2243
  CHECKOUT,
2044
2244
  GET_LOCATION_OPTIONS,
2045
2245
  GET_DELIVERY_OPTIONS,