@bacano/sdk 1.0.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/graphql.js ADDED
@@ -0,0 +1,2034 @@
1
+ // libs/sdk/src/modules/auth.ts
2
+ function createAuthHeaders(accessToken) {
3
+ return accessToken ? { Authorization: `Bearer ${accessToken}` } : {};
4
+ }
5
+
6
+ // libs/sdk/src/transport/documents.ts
7
+ var RESOLVE_WEBSITE_BY_SLUG = (
8
+ /* GraphQL */
9
+ `
10
+ query ResolveWebsiteBySlug($slug: String!) {
11
+ websites(
12
+ where: { slug: { _eq: $slug }, is_active: { _eq: true } }
13
+ limit: 1
14
+ ) {
15
+ id
16
+ company_id
17
+ chain_id
18
+ name
19
+ slug
20
+ domain
21
+ config
22
+ }
23
+ }
24
+ `
25
+ );
26
+ var GET_PRODUCTS = (
27
+ /* GraphQL */
28
+ `
29
+ query GetProducts(
30
+ $companyId: uuid!
31
+ $chainId: uuid!
32
+ $websiteId: uuid!
33
+ $limit: Int = 20
34
+ $offset: Int = 0
35
+ $where: products_bool_exp = {}
36
+ $orderBy: [products_order_by!] = [{ name: asc }]
37
+ ) {
38
+ products(
39
+ where: {
40
+ _and: [
41
+ { company_id: { _eq: $companyId } }
42
+ {
43
+ product_website_publications: {
44
+ website_id: { _eq: $websiteId }
45
+ is_visible: { _eq: true }
46
+ }
47
+ }
48
+ {
49
+ chain_products: {
50
+ chain_id: { _eq: $chainId }
51
+ is_enabled: { _eq: true }
52
+ status: { _eq: active }
53
+ }
54
+ }
55
+ $where
56
+ ]
57
+ }
58
+ limit: $limit
59
+ offset: $offset
60
+ order_by: $orderBy
61
+ ) {
62
+ id
63
+ name
64
+ description
65
+ long_description
66
+ slug
67
+ seo_title
68
+ seo_description
69
+ seo_image_file_id
70
+ category
71
+ subcategory
72
+ color
73
+ measurement_unit
74
+ created_at
75
+ updated_at
76
+ brand {
77
+ id
78
+ name
79
+ }
80
+ seo_image_file {
81
+ mimeType
82
+ name
83
+ }
84
+ product_variants(
85
+ where: { is_disabled: { _eq: false } }
86
+ order_by: { order: asc }
87
+ ) {
88
+ id
89
+ sku
90
+ barcode
91
+ order
92
+ weight
93
+ depth
94
+ height
95
+ length
96
+ product_variant_prices(
97
+ where: {
98
+ price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }
99
+ _or: [
100
+ { chain_id: { _eq: $chainId } }
101
+ { chain_id: { _is_null: true } }
102
+ ]
103
+ }
104
+ ) {
105
+ id
106
+ price
107
+ price_type
108
+ chain_id
109
+ }
110
+ product_variant_attributes(order_by: { order: asc }) {
111
+ id
112
+ value
113
+ order
114
+ attribute_value {
115
+ id
116
+ code
117
+ sort_order
118
+ metadata
119
+ }
120
+ attribute {
121
+ id
122
+ name
123
+ }
124
+ }
125
+ }
126
+ product_media(order_by: { order: asc }) {
127
+ id
128
+ file_id
129
+ order
130
+ file {
131
+ mimeType
132
+ name
133
+ }
134
+ }
135
+ product_related_products(
136
+ where: {
137
+ related_product: {
138
+ chain_products: {
139
+ chain_id: { _eq: $chainId }
140
+ is_enabled: { _eq: true }
141
+ status: { _eq: active }
142
+ }
143
+ }
144
+ }
145
+ order_by: { sort_order: asc }
146
+ ) {
147
+ id
148
+ related_product_id
149
+ display_label
150
+ sort_order
151
+ related_product {
152
+ id
153
+ slug
154
+ name
155
+ sku
156
+ product_media(
157
+ where: { file: { mimeType: { _ilike: "image/%" } } }
158
+ order_by: { order: asc }
159
+ limit: 1
160
+ ) {
161
+ id
162
+ file_id
163
+ order
164
+ file {
165
+ mimeType
166
+ name
167
+ }
168
+ }
169
+ }
170
+ }
171
+ product_attributes {
172
+ id
173
+ value
174
+ attribute_value {
175
+ id
176
+ code
177
+ sort_order
178
+ metadata
179
+ }
180
+ attribute {
181
+ id
182
+ name
183
+ }
184
+ }
185
+ }
186
+ catalog_attribute_lists(
187
+ where: { company_id: { _eq: $companyId }, status: { _eq: published } }
188
+ order_by: { updated_at: desc }
189
+ ) {
190
+ id
191
+ key
192
+ name
193
+ description
194
+ status
195
+ items(
196
+ where: { is_visible: { _eq: true } }
197
+ order_by: [{ sort_order: asc }, { public_label: asc }]
198
+ ) {
199
+ id
200
+ attribute_id
201
+ public_label
202
+ public_slug
203
+ sort_order
204
+ attribute {
205
+ id
206
+ name
207
+ type
208
+ }
209
+ values(
210
+ where: { is_visible: { _eq: true } }
211
+ order_by: [{ sort_order: asc }, { public_label: asc }]
212
+ ) {
213
+ id
214
+ attribute_value_id
215
+ public_label
216
+ public_slug
217
+ sort_order
218
+ attribute_value {
219
+ id
220
+ code
221
+ metadata
222
+ }
223
+ }
224
+ }
225
+ }
226
+ }
227
+ `
228
+ );
229
+ var GET_PRODUCT_BY_PK = (
230
+ /* GraphQL */
231
+ `
232
+ query GetProductByPk(
233
+ $productId: uuid!
234
+ $companyId: uuid!
235
+ $chainId: uuid!
236
+ $websiteId: uuid!
237
+ ) {
238
+ products(
239
+ where: {
240
+ id: { _eq: $productId }
241
+ company_id: { _eq: $companyId }
242
+ product_website_publications: {
243
+ website_id: { _eq: $websiteId }
244
+ is_visible: { _eq: true }
245
+ }
246
+ chain_products: {
247
+ chain_id: { _eq: $chainId }
248
+ is_enabled: { _eq: true }
249
+ status: { _eq: active }
250
+ }
251
+ }
252
+ limit: 1
253
+ ) {
254
+ id
255
+ name
256
+ description
257
+ long_description
258
+ slug
259
+ seo_title
260
+ seo_description
261
+ seo_image_file_id
262
+ category
263
+ subcategory
264
+ color
265
+ measurement_unit
266
+ created_at
267
+ updated_at
268
+ brand {
269
+ id
270
+ name
271
+ }
272
+ seo_image_file {
273
+ mimeType
274
+ name
275
+ }
276
+ product_variants(
277
+ where: { is_disabled: { _eq: false } }
278
+ order_by: { order: asc }
279
+ ) {
280
+ id
281
+ sku
282
+ barcode
283
+ order
284
+ weight
285
+ depth
286
+ height
287
+ length
288
+ product_variant_prices(
289
+ where: {
290
+ price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }
291
+ _or: [
292
+ { chain_id: { _eq: $chainId } }
293
+ { chain_id: { _is_null: true } }
294
+ ]
295
+ }
296
+ ) {
297
+ id
298
+ price
299
+ price_type
300
+ chain_id
301
+ }
302
+ product_variant_attributes(order_by: { order: asc }) {
303
+ id
304
+ value
305
+ order
306
+ attribute_value {
307
+ id
308
+ code
309
+ sort_order
310
+ metadata
311
+ }
312
+ attribute {
313
+ id
314
+ name
315
+ }
316
+ }
317
+ }
318
+ product_media(order_by: { order: asc }) {
319
+ id
320
+ file_id
321
+ order
322
+ file {
323
+ mimeType
324
+ name
325
+ }
326
+ }
327
+ product_related_products(
328
+ where: {
329
+ related_product: {
330
+ chain_products: {
331
+ chain_id: { _eq: $chainId }
332
+ is_enabled: { _eq: true }
333
+ status: { _eq: active }
334
+ }
335
+ }
336
+ }
337
+ order_by: { sort_order: asc }
338
+ ) {
339
+ id
340
+ related_product_id
341
+ display_label
342
+ sort_order
343
+ related_product {
344
+ id
345
+ slug
346
+ name
347
+ sku
348
+ product_media(
349
+ where: { file: { mimeType: { _ilike: "image/%" } } }
350
+ order_by: { order: asc }
351
+ limit: 1
352
+ ) {
353
+ id
354
+ file_id
355
+ order
356
+ file {
357
+ mimeType
358
+ name
359
+ }
360
+ }
361
+ }
362
+ }
363
+ product_attributes {
364
+ id
365
+ value
366
+ attribute_value {
367
+ id
368
+ code
369
+ sort_order
370
+ metadata
371
+ }
372
+ attribute {
373
+ id
374
+ name
375
+ }
376
+ }
377
+ }
378
+ catalog_attribute_lists(
379
+ where: { company_id: { _eq: $companyId }, status: { _eq: published } }
380
+ order_by: { updated_at: desc }
381
+ ) {
382
+ id
383
+ key
384
+ name
385
+ description
386
+ status
387
+ items(
388
+ where: { is_visible: { _eq: true } }
389
+ order_by: [{ sort_order: asc }, { public_label: asc }]
390
+ ) {
391
+ id
392
+ attribute_id
393
+ public_label
394
+ public_slug
395
+ sort_order
396
+ attribute {
397
+ id
398
+ name
399
+ type
400
+ }
401
+ values(
402
+ where: { is_visible: { _eq: true } }
403
+ order_by: [{ sort_order: asc }, { public_label: asc }]
404
+ ) {
405
+ id
406
+ attribute_value_id
407
+ public_label
408
+ public_slug
409
+ sort_order
410
+ attribute_value {
411
+ id
412
+ code
413
+ metadata
414
+ }
415
+ }
416
+ }
417
+ }
418
+ }
419
+ `
420
+ );
421
+ var GET_PRODUCT_BY_SLUG = (
422
+ /* GraphQL */
423
+ GET_PRODUCT_BY_PK.replace(
424
+ "query GetProductByPk(",
425
+ "query GetProductBySlug("
426
+ ).replace("$productId: uuid!", "$slug: String!").replace("id: { _eq: $productId }", "slug: { _eq: $slug }")
427
+ );
428
+ var GET_PRODUCT_SEO_ENTRIES = (
429
+ /* GraphQL */
430
+ `
431
+ query GetProductSeoEntries(
432
+ $companyId: uuid!
433
+ $chainId: uuid!
434
+ $websiteId: uuid!
435
+ $limit: Int!
436
+ $offset: Int!
437
+ ) {
438
+ products(
439
+ where: {
440
+ company_id: { _eq: $companyId }
441
+ slug: { _is_null: false }
442
+ product_website_publications: {
443
+ website_id: { _eq: $websiteId }
444
+ is_visible: { _eq: true }
445
+ }
446
+ chain_products: {
447
+ chain_id: { _eq: $chainId }
448
+ is_enabled: { _eq: true }
449
+ status: { _eq: active }
450
+ }
451
+ }
452
+ limit: $limit
453
+ offset: $offset
454
+ order_by: [{ updated_at: desc }, { created_at: desc }]
455
+ ) {
456
+ id
457
+ name
458
+ slug
459
+ seo_title
460
+ seo_description
461
+ seo_image_file_id
462
+ category
463
+ subcategory
464
+ created_at
465
+ updated_at
466
+ seo_image_file {
467
+ mimeType
468
+ name
469
+ }
470
+ product_media(
471
+ where: { file: { mimeType: { _ilike: "image/%" } } }
472
+ order_by: { order: asc }
473
+ limit: 1
474
+ ) {
475
+ id
476
+ file_id
477
+ order
478
+ file {
479
+ mimeType
480
+ name
481
+ }
482
+ }
483
+ product_variants(
484
+ where: { is_disabled: { _eq: false } }
485
+ order_by: { order: asc }
486
+ ) {
487
+ id
488
+ product_variant_prices(
489
+ where: {
490
+ price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }
491
+ _or: [
492
+ { chain_id: { _eq: $chainId } }
493
+ { chain_id: { _is_null: true } }
494
+ ]
495
+ }
496
+ ) {
497
+ id
498
+ price
499
+ price_type
500
+ chain_id
501
+ }
502
+ }
503
+ }
504
+ }
505
+ `
506
+ );
507
+ var GET_CATEGORIES = (
508
+ /* GraphQL */
509
+ `
510
+ query GetCategories {
511
+ product_categories {
512
+ name
513
+ description
514
+ product_subcategories {
515
+ id
516
+ name
517
+ description
518
+ }
519
+ }
520
+ }
521
+ `
522
+ );
523
+ var GET_CATALOG_CATEGORY_LIST = (
524
+ /* GraphQL */
525
+ `
526
+ query GetCatalogCategoryList($companyId: uuid!, $key: String!) {
527
+ list: catalog_category_lists(
528
+ where: {
529
+ company_id: { _eq: $companyId }
530
+ key: { _eq: $key }
531
+ status: { _eq: published }
532
+ }
533
+ limit: 1
534
+ ) {
535
+ id
536
+ key
537
+ name
538
+ description
539
+ status
540
+ items(
541
+ where: { is_visible: { _eq: true } }
542
+ order_by: [{ sort_order: asc }, { public_label: asc }]
543
+ ) {
544
+ id
545
+ source_type
546
+ product_category
547
+ product_subcategory_id
548
+ public_label
549
+ public_slug
550
+ sort_order
551
+ category_ref {
552
+ name
553
+ description
554
+ }
555
+ subcategory_ref {
556
+ id
557
+ name
558
+ description
559
+ category
560
+ }
561
+ }
562
+ }
563
+ }
564
+ `
565
+ );
566
+ var GET_CATALOG_ATTRIBUTE_LIST = (
567
+ /* GraphQL */
568
+ `
569
+ query GetCatalogAttributeList($companyId: uuid!, $key: String!) {
570
+ list: catalog_attribute_lists(
571
+ where: {
572
+ company_id: { _eq: $companyId }
573
+ key: { _eq: $key }
574
+ status: { _eq: published }
575
+ }
576
+ limit: 1
577
+ ) {
578
+ id
579
+ key
580
+ name
581
+ description
582
+ status
583
+ items(
584
+ where: { is_visible: { _eq: true } }
585
+ order_by: [{ sort_order: asc }, { public_label: asc }]
586
+ ) {
587
+ id
588
+ attribute_id
589
+ public_label
590
+ public_slug
591
+ sort_order
592
+ attribute {
593
+ id
594
+ name
595
+ type
596
+ }
597
+ values(
598
+ where: { is_visible: { _eq: true } }
599
+ order_by: [{ sort_order: asc }, { public_label: asc }]
600
+ ) {
601
+ id
602
+ attribute_value_id
603
+ public_label
604
+ public_slug
605
+ sort_order
606
+ attribute_value {
607
+ id
608
+ code
609
+ metadata
610
+ }
611
+ }
612
+ }
613
+ }
614
+ }
615
+ `
616
+ );
617
+ var GET_CONTEXTUAL_CATALOG_ATTRIBUTE_LIST = (
618
+ /* GraphQL */
619
+ `
620
+ mutation GetContextualCatalogAttributeList(
621
+ $websiteId: uuid!
622
+ $key: String!
623
+ $onlyApplicable: Boolean
624
+ $filters: WebsiteCatalogFiltersInput
625
+ ) {
626
+ websiteGetAttributeList(
627
+ website_id: $websiteId
628
+ key: $key
629
+ only_applicable: $onlyApplicable
630
+ filters: $filters
631
+ ) {
632
+ success
633
+ errors
634
+ list {
635
+ id
636
+ key
637
+ name
638
+ description
639
+ status
640
+ items {
641
+ id
642
+ attribute_id
643
+ attribute_name
644
+ attribute_type
645
+ public_label
646
+ public_slug
647
+ sort_order
648
+ values {
649
+ id
650
+ attribute_value_id
651
+ code
652
+ public_label
653
+ public_slug
654
+ sort_order
655
+ metadata
656
+ }
657
+ }
658
+ }
659
+ }
660
+ }
661
+ `
662
+ );
663
+ var WEBSITE_GET_CATALOG_PAGE = (
664
+ /* GraphQL */
665
+ `
666
+ mutation WebsiteGetCatalogPage(
667
+ $websiteId: uuid!
668
+ $categoryListKey: String!
669
+ $attributeListKey: String!
670
+ $filters: WebsiteCatalogPageFiltersInput
671
+ $include: WebsiteCatalogPageIncludeInput
672
+ ) {
673
+ result: websiteGetCatalogPage(
674
+ website_id: $websiteId
675
+ category_list_key: $categoryListKey
676
+ attribute_list_key: $attributeListKey
677
+ filters: $filters
678
+ include: $include
679
+ ) {
680
+ success
681
+ products
682
+ category_list
683
+ attribute_list
684
+ filters
685
+ brands
686
+ pagination
687
+ applied_filters
688
+ debug
689
+ errors
690
+ }
691
+ }
692
+ `
693
+ );
694
+ var WEBSITE_GET_PRODUCT_RECOMMENDATIONS = (
695
+ /* GraphQL */
696
+ `
697
+ mutation WebsiteGetProductRecommendations(
698
+ $websiteId: uuid!
699
+ $productId: uuid!
700
+ $limit: Int
701
+ ) {
702
+ result: websiteGetProductRecommendations(
703
+ website_id: $websiteId
704
+ product_id: $productId
705
+ limit: $limit
706
+ ) {
707
+ success
708
+ products
709
+ strategy
710
+ errors
711
+ }
712
+ }
713
+ `
714
+ );
715
+ var GET_BRANDS = (
716
+ /* GraphQL */
717
+ `
718
+ query GetBrands($companyId: uuid!, $chainId: uuid!) {
719
+ brands(
720
+ where: {
721
+ company_id: { _eq: $companyId }
722
+ products: {
723
+ chain_products: {
724
+ chain_id: { _eq: $chainId }
725
+ is_enabled: { _eq: true }
726
+ status: { _eq: active }
727
+ }
728
+ }
729
+ }
730
+ order_by: { name: asc }
731
+ ) {
732
+ id
733
+ name
734
+ }
735
+ }
736
+ `
737
+ );
738
+ var CONTENT_ENTRY_FIELDS = (
739
+ /* GraphQL */
740
+ `
741
+ id
742
+ key
743
+ category_key
744
+ name
745
+ locale
746
+ status
747
+ tags
748
+ content_json
749
+ resolved_fields
750
+ published_at
751
+ updated_at
752
+ content_type {
753
+ id
754
+ key
755
+ name
756
+ kind
757
+ }
758
+ `
759
+ );
760
+ var WEBSITE_GET_CONTENT = (
761
+ /* GraphQL */
762
+ `
763
+ mutation WebsiteGetContent(
764
+ $websiteId: uuid!
765
+ $key: String
766
+ $categoryKey: String
767
+ $tag: String
768
+ $locale: String
769
+ ) {
770
+ result: websiteGetContent(
771
+ website_id: $websiteId
772
+ key: $key
773
+ category_key: $categoryKey
774
+ tag: $tag
775
+ locale: $locale
776
+ ) {
777
+ success
778
+ errors
779
+ entries {
780
+ ${CONTENT_ENTRY_FIELDS}
781
+ }
782
+ }
783
+ }
784
+ `
785
+ );
786
+ var WEBSITE_GET_PRODUCT_CONTENT = (
787
+ /* GraphQL */
788
+ `
789
+ mutation WebsiteGetProductContent(
790
+ $websiteId: uuid!
791
+ $productId: uuid!
792
+ $locale: String
793
+ ) {
794
+ result: websiteGetProductContent(
795
+ website_id: $websiteId
796
+ product_id: $productId
797
+ locale: $locale
798
+ ) {
799
+ success
800
+ errors
801
+ blocks {
802
+ id
803
+ product_id
804
+ locale
805
+ content_json
806
+ resolved_fields
807
+ sort_order
808
+ updated_at
809
+ content_type {
810
+ id
811
+ key
812
+ name
813
+ kind
814
+ }
815
+ }
816
+ }
817
+ }
818
+ `
819
+ );
820
+ var CHECK_AVAILABILITY = (
821
+ /* GraphQL */
822
+ `
823
+ query CheckAvailability($variantIds: [uuid!]!, $chainId: uuid!) {
824
+ websiteProductAvailability(
825
+ product_variant_ids: $variantIds
826
+ chain_id: $chainId
827
+ ) {
828
+ product_variant_id
829
+ in_stock
830
+ label
831
+ }
832
+ }
833
+ `
834
+ );
835
+ var CREATE_CART = (
836
+ /* GraphQL */
837
+ `
838
+ mutation CreateCart(
839
+ $websiteId: uuid!
840
+ $cartToken: String
841
+ $contact: WebsiteGuestContactInput
842
+ $fulfillmentFamily: String
843
+ ) {
844
+ websiteCreateCart(
845
+ website_id: $websiteId
846
+ cart_token: $cartToken
847
+ contact: $contact
848
+ fulfillment_family: $fulfillmentFamily
849
+ ) {
850
+ success
851
+ order_id
852
+ cart_token
853
+ cart {
854
+ id
855
+ status
856
+ discount
857
+ tax
858
+ total_without_tax
859
+ total_with_tax
860
+ total_with_discount
861
+ created_at
862
+ updated_at
863
+ items {
864
+ id
865
+ product_variant_id
866
+ quantity
867
+ product_variant {
868
+ id
869
+ sku
870
+ product {
871
+ id
872
+ name
873
+ }
874
+ prices {
875
+ id
876
+ price
877
+ price_type
878
+ chain_id
879
+ }
880
+ }
881
+ }
882
+ }
883
+ errors
884
+ }
885
+ }
886
+ `
887
+ );
888
+ var GET_CART = (
889
+ /* GraphQL */
890
+ `
891
+ mutation GetCart($orderId: uuid!, $cartToken: String!) {
892
+ websiteGetCart(order_id: $orderId, cart_token: $cartToken) {
893
+ success
894
+ order_id
895
+ cart_token
896
+ cart {
897
+ id
898
+ status
899
+ discount
900
+ tax
901
+ total_without_tax
902
+ total_with_tax
903
+ total_with_discount
904
+ created_at
905
+ updated_at
906
+ items {
907
+ id
908
+ product_variant_id
909
+ quantity
910
+ product_variant {
911
+ id
912
+ sku
913
+ product {
914
+ id
915
+ name
916
+ }
917
+ prices {
918
+ id
919
+ price
920
+ price_type
921
+ chain_id
922
+ }
923
+ }
924
+ }
925
+ }
926
+ errors
927
+ }
928
+ }
929
+ `
930
+ );
931
+ var START_GUEST_CHECKOUT = (
932
+ /* GraphQL */
933
+ `
934
+ mutation StartGuestCheckout(
935
+ $websiteId: uuid!
936
+ $cartToken: String
937
+ $contact: WebsiteGuestContactInput!
938
+ $items: [WebsiteCheckoutItemInput!]!
939
+ $fulfillmentFamily: String
940
+ ) {
941
+ websiteStartGuestCheckout(
942
+ website_id: $websiteId
943
+ cart_token: $cartToken
944
+ contact: $contact
945
+ items: $items
946
+ fulfillment_family: $fulfillmentFamily
947
+ ) {
948
+ success
949
+ order_id
950
+ cart_token
951
+ cart {
952
+ id
953
+ status
954
+ discount
955
+ tax
956
+ total_without_tax
957
+ total_with_tax
958
+ total_with_discount
959
+ created_at
960
+ updated_at
961
+ items {
962
+ id
963
+ product_variant_id
964
+ quantity
965
+ product_variant {
966
+ id
967
+ sku
968
+ product {
969
+ id
970
+ name
971
+ }
972
+ prices {
973
+ id
974
+ price
975
+ price_type
976
+ chain_id
977
+ }
978
+ }
979
+ }
980
+ }
981
+ errors
982
+ }
983
+ }
984
+ `
985
+ );
986
+ var SET_CART_ITEM = (
987
+ /* GraphQL */
988
+ `
989
+ mutation SetCartItem(
990
+ $orderId: uuid!
991
+ $cartToken: String!
992
+ $variantId: uuid!
993
+ $quantity: numeric!
994
+ ) {
995
+ websiteSetCartItem(
996
+ order_id: $orderId
997
+ cart_token: $cartToken
998
+ product_variant_id: $variantId
999
+ quantity: $quantity
1000
+ ) {
1001
+ success
1002
+ order_id
1003
+ cart_token
1004
+ cart {
1005
+ id
1006
+ status
1007
+ discount
1008
+ tax
1009
+ total_without_tax
1010
+ total_with_tax
1011
+ total_with_discount
1012
+ created_at
1013
+ updated_at
1014
+ items {
1015
+ id
1016
+ product_variant_id
1017
+ quantity
1018
+ product_variant {
1019
+ id
1020
+ sku
1021
+ product {
1022
+ id
1023
+ name
1024
+ }
1025
+ prices {
1026
+ id
1027
+ price
1028
+ price_type
1029
+ chain_id
1030
+ }
1031
+ }
1032
+ }
1033
+ }
1034
+ errors
1035
+ }
1036
+ }
1037
+ `
1038
+ );
1039
+ var REMOVE_CART_ITEM = (
1040
+ /* GraphQL */
1041
+ `
1042
+ mutation RemoveCartItem(
1043
+ $orderId: uuid!
1044
+ $cartToken: String!
1045
+ $itemId: uuid!
1046
+ ) {
1047
+ websiteRemoveCartItem(
1048
+ order_id: $orderId
1049
+ cart_token: $cartToken
1050
+ item_id: $itemId
1051
+ ) {
1052
+ success
1053
+ order_id
1054
+ cart_token
1055
+ cart {
1056
+ id
1057
+ status
1058
+ discount
1059
+ tax
1060
+ total_without_tax
1061
+ total_with_tax
1062
+ total_with_discount
1063
+ created_at
1064
+ updated_at
1065
+ items {
1066
+ id
1067
+ product_variant_id
1068
+ quantity
1069
+ product_variant {
1070
+ id
1071
+ sku
1072
+ product {
1073
+ id
1074
+ name
1075
+ }
1076
+ prices {
1077
+ id
1078
+ price
1079
+ price_type
1080
+ chain_id
1081
+ }
1082
+ }
1083
+ }
1084
+ }
1085
+ errors
1086
+ }
1087
+ }
1088
+ `
1089
+ );
1090
+ var CHECKOUT = (
1091
+ /* GraphQL */
1092
+ `
1093
+ mutation Checkout(
1094
+ $orderId: uuid!
1095
+ $cartToken: String!
1096
+ $contact: WebsiteGuestContactInput!
1097
+ $fulfillmentFamily: String
1098
+ $address: WebsiteAddressInput
1099
+ $shippingQuoteId: uuid
1100
+ $paymentMode: String
1101
+ $paymentMethodId: uuid
1102
+ $buyerAccountOptIn: Boolean
1103
+ $initialPayment: WebsiteInitialPaymentInput
1104
+ ) {
1105
+ websiteCheckout(
1106
+ order_id: $orderId
1107
+ cart_token: $cartToken
1108
+ contact: $contact
1109
+ fulfillment_family: $fulfillmentFamily
1110
+ address: $address
1111
+ shipping_quote_id: $shippingQuoteId
1112
+ payment_mode: $paymentMode
1113
+ payment_method_id: $paymentMethodId
1114
+ buyer_account_opt_in: $buyerAccountOptIn
1115
+ initial_payment: $initialPayment
1116
+ ) {
1117
+ success
1118
+ order_id
1119
+ order_number
1120
+ payment_method_id
1121
+ public_order_token
1122
+ requires_payment_session
1123
+ buyer_account_invitation_requested
1124
+ errors
1125
+ }
1126
+ }
1127
+ `
1128
+ );
1129
+ var GET_LOCATION_OPTIONS = (
1130
+ /* GraphQL */
1131
+ `
1132
+ mutation GetLocationOptions($websiteId: uuid!) {
1133
+ websiteGetLocationOptions(website_id: $websiteId) {
1134
+ success
1135
+ country_code
1136
+ departments {
1137
+ department_id
1138
+ department_name
1139
+ department_code
1140
+ municipalities {
1141
+ municipality_id
1142
+ municipality_name
1143
+ municipality_code
1144
+ department_id
1145
+ department_code
1146
+ }
1147
+ }
1148
+ errors
1149
+ }
1150
+ }
1151
+ `
1152
+ );
1153
+ var GET_DELIVERY_OPTIONS = (
1154
+ /* GraphQL */
1155
+ `
1156
+ mutation GetDeliveryOptions($websiteId: uuid!) {
1157
+ websiteGetDeliveryOptions(website_id: $websiteId) {
1158
+ success
1159
+ delivery_options {
1160
+ id
1161
+ fulfillment_family
1162
+ label
1163
+ description
1164
+ is_enabled
1165
+ pickup_info {
1166
+ label
1167
+ address
1168
+ schedule
1169
+ notes
1170
+ }
1171
+ }
1172
+ errors
1173
+ }
1174
+ }
1175
+ `
1176
+ );
1177
+ var GET_SHIPPING_QUOTES = (
1178
+ /* GraphQL */
1179
+ `
1180
+ mutation GetShippingQuotes(
1181
+ $websiteId: uuid!
1182
+ $orderId: uuid
1183
+ $cartToken: String
1184
+ $items: [WebsiteCheckoutItemInput!]
1185
+ $address: WebsiteAddressInput!
1186
+ ) {
1187
+ websiteGetShippingQuotes(
1188
+ website_id: $websiteId
1189
+ order_id: $orderId
1190
+ cart_token: $cartToken
1191
+ items: $items
1192
+ address: $address
1193
+ ) {
1194
+ success
1195
+ quotes {
1196
+ quote_id
1197
+ shipping_service_id
1198
+ label
1199
+ service_name
1200
+ base_amount
1201
+ amount
1202
+ currency
1203
+ collection_mode
1204
+ total_policy
1205
+ estimated_delivery
1206
+ free_shipping_eligible
1207
+ free_shipping_applied
1208
+ free_shipping_threshold
1209
+ free_shipping_remaining
1210
+ free_shipping_eligible_subtotal
1211
+ }
1212
+ errors
1213
+ }
1214
+ }
1215
+ `
1216
+ );
1217
+ var GET_SHIPPING_POLICY = (
1218
+ /* GraphQL */
1219
+ `
1220
+ mutation GetShippingPolicy($websiteId: uuid!) {
1221
+ websiteGetShippingPolicy(website_id: $websiteId) {
1222
+ success
1223
+ policy {
1224
+ free_shipping_enabled
1225
+ free_shipping_threshold
1226
+ currency
1227
+ }
1228
+ errors
1229
+ }
1230
+ }
1231
+ `
1232
+ );
1233
+ var GET_FREE_SHIPPING_PROGRESS = (
1234
+ /* GraphQL */
1235
+ `
1236
+ mutation GetFreeShippingProgress(
1237
+ $websiteId: uuid!
1238
+ $items: [WebsiteCheckoutItemInput!]!
1239
+ ) {
1240
+ websiteGetFreeShippingProgress(website_id: $websiteId, items: $items) {
1241
+ success
1242
+ progress {
1243
+ enabled
1244
+ threshold
1245
+ remaining
1246
+ eligible_subtotal
1247
+ threshold_reached
1248
+ currency
1249
+ }
1250
+ errors
1251
+ }
1252
+ }
1253
+ `
1254
+ );
1255
+ var GET_PAYMENT_METHODS = (
1256
+ /* GraphQL */
1257
+ `
1258
+ mutation GetPaymentMethods($websiteId: uuid!) {
1259
+ websiteGetPaymentMethods(website_id: $websiteId) {
1260
+ success
1261
+ payment_methods {
1262
+ id
1263
+ code
1264
+ label
1265
+ payment_method_type
1266
+ gateway_code
1267
+ description
1268
+ is_enabled
1269
+ sort_order
1270
+ requires_payment_session
1271
+ public_config
1272
+ }
1273
+ errors
1274
+ }
1275
+ }
1276
+ `
1277
+ );
1278
+ var GET_PAYMENT_OPTIONS = (
1279
+ /* GraphQL */
1280
+ `
1281
+ mutation GetPaymentOptions($websiteId: uuid!, $fulfillmentFamily: String!) {
1282
+ websiteGetPaymentOptions(
1283
+ website_id: $websiteId
1284
+ fulfillment_family: $fulfillmentFamily
1285
+ ) {
1286
+ success
1287
+ payment_options {
1288
+ id
1289
+ mode
1290
+ fulfillment_family
1291
+ label
1292
+ description
1293
+ requires_payment_method
1294
+ allows_initial_payment
1295
+ initial_payment_policy
1296
+ requires_initial_payment
1297
+ min_initial_amount
1298
+ suggested_initial_amount
1299
+ sort_order
1300
+ methods {
1301
+ id
1302
+ payment_method_id
1303
+ code
1304
+ label
1305
+ payment_method_type
1306
+ gateway_code
1307
+ description
1308
+ instructions
1309
+ qr_file_id
1310
+ requires_payment_session
1311
+ public_config
1312
+ sort_order
1313
+ }
1314
+ }
1315
+ errors
1316
+ }
1317
+ }
1318
+ `
1319
+ );
1320
+ var VALIDATE_COUPON = (
1321
+ /* GraphQL */
1322
+ `
1323
+ mutation ValidateCoupon(
1324
+ $orderId: uuid!
1325
+ $cartToken: String!
1326
+ $code: String!
1327
+ ) {
1328
+ websiteValidateCoupon(
1329
+ order_id: $orderId
1330
+ cart_token: $cartToken
1331
+ code: $code
1332
+ ) {
1333
+ success
1334
+ order_id
1335
+ coupon_id
1336
+ code
1337
+ name
1338
+ coupon_type
1339
+ discount_amount
1340
+ eligible_subtotal
1341
+ message
1342
+ cart {
1343
+ id
1344
+ status
1345
+ discount
1346
+ total_without_tax
1347
+ tax
1348
+ total_with_tax
1349
+ total_with_discount
1350
+ created_at
1351
+ updated_at
1352
+ items {
1353
+ id
1354
+ product_variant_id
1355
+ quantity
1356
+ product_variant {
1357
+ id
1358
+ sku
1359
+ product {
1360
+ id
1361
+ name
1362
+ }
1363
+ prices {
1364
+ id
1365
+ price
1366
+ price_type
1367
+ chain_id
1368
+ }
1369
+ }
1370
+ }
1371
+ }
1372
+ errors
1373
+ }
1374
+ }
1375
+ `
1376
+ );
1377
+ var APPLY_COUPON = (
1378
+ /* GraphQL */
1379
+ `
1380
+ mutation ApplyCoupon($orderId: uuid!, $cartToken: String!, $code: String!) {
1381
+ websiteApplyCoupon(
1382
+ order_id: $orderId
1383
+ cart_token: $cartToken
1384
+ code: $code
1385
+ ) {
1386
+ success
1387
+ order_id
1388
+ coupon_id
1389
+ code
1390
+ name
1391
+ coupon_type
1392
+ discount_amount
1393
+ eligible_subtotal
1394
+ message
1395
+ cart {
1396
+ id
1397
+ status
1398
+ discount
1399
+ total_without_tax
1400
+ tax
1401
+ total_with_tax
1402
+ total_with_discount
1403
+ created_at
1404
+ updated_at
1405
+ items {
1406
+ id
1407
+ product_variant_id
1408
+ quantity
1409
+ product_variant {
1410
+ id
1411
+ sku
1412
+ product {
1413
+ id
1414
+ name
1415
+ }
1416
+ prices {
1417
+ id
1418
+ price
1419
+ price_type
1420
+ chain_id
1421
+ }
1422
+ }
1423
+ }
1424
+ }
1425
+ errors
1426
+ }
1427
+ }
1428
+ `
1429
+ );
1430
+ var REMOVE_COUPON = (
1431
+ /* GraphQL */
1432
+ `
1433
+ mutation RemoveCoupon(
1434
+ $orderId: uuid!
1435
+ $cartToken: String!
1436
+ $couponId: uuid!
1437
+ ) {
1438
+ websiteRemoveCoupon(
1439
+ order_id: $orderId
1440
+ cart_token: $cartToken
1441
+ coupon_id: $couponId
1442
+ ) {
1443
+ success
1444
+ order_id
1445
+ coupon_id
1446
+ code
1447
+ name
1448
+ coupon_type
1449
+ discount_amount
1450
+ eligible_subtotal
1451
+ message
1452
+ cart {
1453
+ id
1454
+ status
1455
+ discount
1456
+ total_without_tax
1457
+ tax
1458
+ total_with_tax
1459
+ total_with_discount
1460
+ created_at
1461
+ updated_at
1462
+ items {
1463
+ id
1464
+ product_variant_id
1465
+ quantity
1466
+ product_variant {
1467
+ id
1468
+ sku
1469
+ product {
1470
+ id
1471
+ name
1472
+ }
1473
+ prices {
1474
+ id
1475
+ price
1476
+ price_type
1477
+ chain_id
1478
+ }
1479
+ }
1480
+ }
1481
+ }
1482
+ errors
1483
+ }
1484
+ }
1485
+ `
1486
+ );
1487
+ var CREATE_PAYMENT_SESSION = (
1488
+ /* GraphQL */
1489
+ `
1490
+ mutation CreatePaymentSession(
1491
+ $orderId: uuid!
1492
+ $cartToken: String
1493
+ $publicOrderToken: String
1494
+ $paymentMethodId: uuid!
1495
+ $returnUrl: String!
1496
+ ) {
1497
+ websiteCreatePaymentSession(
1498
+ order_id: $orderId
1499
+ cart_token: $cartToken
1500
+ public_order_token: $publicOrderToken
1501
+ payment_method_id: $paymentMethodId
1502
+ return_url: $returnUrl
1503
+ ) {
1504
+ success
1505
+ order_id
1506
+ payment_method_id
1507
+ payment_session_id
1508
+ gateway_code
1509
+ integration_mode
1510
+ status
1511
+ redirect_url
1512
+ public_payload
1513
+ errors
1514
+ }
1515
+ }
1516
+ `
1517
+ );
1518
+ var GET_ORDERS = (
1519
+ /* GraphQL */
1520
+ `
1521
+ query GetOrders($limit: Int = 20, $offset: Int = 0) {
1522
+ orders(
1523
+ where: { order_number: { _is_null: false } }
1524
+ order_by: { created_at: desc }
1525
+ limit: $limit
1526
+ offset: $offset
1527
+ ) {
1528
+ id
1529
+ order_number
1530
+ status
1531
+ fulfillment_family
1532
+ discount
1533
+ tax
1534
+ total_without_tax
1535
+ total_with_tax
1536
+ total_with_discount
1537
+ created_at
1538
+ updated_at
1539
+ order_product_variants {
1540
+ id
1541
+ product_variant_id
1542
+ quantity
1543
+ product_variant {
1544
+ sku
1545
+ product {
1546
+ id
1547
+ name
1548
+ }
1549
+ }
1550
+ }
1551
+ }
1552
+ }
1553
+ `
1554
+ );
1555
+ var GET_ORDER_BY_PK = (
1556
+ /* GraphQL */
1557
+ `
1558
+ query GetOrderByPk($orderId: uuid!) {
1559
+ orders(where: { id: { _eq: $orderId } }) {
1560
+ id
1561
+ order_number
1562
+ status
1563
+ fulfillment_family
1564
+ discount
1565
+ tax
1566
+ total_without_tax
1567
+ total_with_tax
1568
+ total_with_discount
1569
+ created_at
1570
+ updated_at
1571
+ order_product_variants {
1572
+ id
1573
+ product_variant_id
1574
+ quantity
1575
+ product_variant {
1576
+ sku
1577
+ product {
1578
+ id
1579
+ name
1580
+ }
1581
+ }
1582
+ }
1583
+ }
1584
+ }
1585
+ `
1586
+ );
1587
+ var GET_PUBLIC_ORDER = (
1588
+ /* GraphQL */
1589
+ `
1590
+ mutation GetPublicOrder($websiteId: uuid!, $orderId: uuid!, $token: String!) {
1591
+ websiteGetPublicOrder(
1592
+ website_id: $websiteId
1593
+ order_id: $orderId
1594
+ token: $token
1595
+ ) {
1596
+ success
1597
+ order {
1598
+ order_id
1599
+ order_number
1600
+ status
1601
+ payment_status
1602
+ fulfillment_family
1603
+ delivery {
1604
+ fulfillment_family
1605
+ shipping {
1606
+ label
1607
+ amount
1608
+ method_type
1609
+ collection_mode
1610
+ total_policy
1611
+ address
1612
+ }
1613
+ pickup {
1614
+ label
1615
+ }
1616
+ }
1617
+ payment {
1618
+ mode
1619
+ label
1620
+ method {
1621
+ id
1622
+ label
1623
+ payment_method_type
1624
+ gateway_code
1625
+ requires_payment_session
1626
+ }
1627
+ initial_payment {
1628
+ amount
1629
+ payment_method_id
1630
+ method_label
1631
+ payment_method_type
1632
+ gateway_code
1633
+ requires_payment_session
1634
+ }
1635
+ requires_payment_session
1636
+ next_action
1637
+ session {
1638
+ id
1639
+ gateway_code
1640
+ integration_mode
1641
+ status
1642
+ reference
1643
+ amount
1644
+ currency
1645
+ gateway_transaction_id
1646
+ error_message
1647
+ expires_at
1648
+ created_at
1649
+ updated_at
1650
+ }
1651
+ }
1652
+ totals {
1653
+ subtotal
1654
+ tax
1655
+ discount
1656
+ total
1657
+ total_with_discount
1658
+ }
1659
+ items {
1660
+ id
1661
+ product_variant_id
1662
+ sku
1663
+ name
1664
+ image_file_id
1665
+ quantity
1666
+ unit_price
1667
+ line_total
1668
+ }
1669
+ next_steps
1670
+ created_at
1671
+ updated_at
1672
+ }
1673
+ errors
1674
+ }
1675
+ }
1676
+ `
1677
+ );
1678
+ var GET_PROFILE = (
1679
+ /* GraphQL */
1680
+ `
1681
+ query GetProfile {
1682
+ clients {
1683
+ id
1684
+ party_id
1685
+ party {
1686
+ first_name
1687
+ last_name
1688
+ email
1689
+ phone_e164
1690
+ phone_national_number
1691
+ address
1692
+ address_complement
1693
+ birthdate
1694
+ legal_name
1695
+ commercial_name
1696
+ country_code
1697
+ department_code
1698
+ municipality_code
1699
+ geo_country {
1700
+ name
1701
+ }
1702
+ geo_department {
1703
+ name
1704
+ }
1705
+ geo_municipality {
1706
+ name
1707
+ }
1708
+ shipping_addresses(
1709
+ where: { is_primary: { _eq: true } }
1710
+ order_by: { created_at: asc }
1711
+ limit: 1
1712
+ ) {
1713
+ address
1714
+ address_complement
1715
+ country_code
1716
+ department_code
1717
+ municipality_code
1718
+ geo_country {
1719
+ name
1720
+ }
1721
+ geo_department {
1722
+ name
1723
+ }
1724
+ geo_municipality {
1725
+ name
1726
+ }
1727
+ }
1728
+ }
1729
+ }
1730
+ }
1731
+ `
1732
+ );
1733
+ var UPDATE_PROFILE = (
1734
+ /* GraphQL */
1735
+ `
1736
+ mutation UpdateProfile($partyId: uuid!, $data: business_parties_set_input!) {
1737
+ update_business_parties_by_pk(pk_columns: { id: $partyId }, _set: $data) {
1738
+ email
1739
+ first_name
1740
+ last_name
1741
+ phone_e164
1742
+ phone_national_number
1743
+ address
1744
+ address_complement
1745
+ birthdate
1746
+ legal_name
1747
+ commercial_name
1748
+ country_code
1749
+ department_code
1750
+ municipality_code
1751
+ geo_country {
1752
+ name
1753
+ }
1754
+ geo_department {
1755
+ name
1756
+ }
1757
+ geo_municipality {
1758
+ name
1759
+ }
1760
+ shipping_addresses(
1761
+ where: { is_primary: { _eq: true } }
1762
+ order_by: { created_at: asc }
1763
+ limit: 1
1764
+ ) {
1765
+ address
1766
+ address_complement
1767
+ country_code
1768
+ department_code
1769
+ municipality_code
1770
+ geo_country {
1771
+ name
1772
+ }
1773
+ geo_department {
1774
+ name
1775
+ }
1776
+ geo_municipality {
1777
+ name
1778
+ }
1779
+ }
1780
+ }
1781
+ }
1782
+ `
1783
+ );
1784
+ var GET_PRODUCT_FILTERS = (
1785
+ /* GraphQL */
1786
+ `
1787
+ query GetProductFilters(
1788
+ $companyId: uuid!
1789
+ $chainId: uuid!
1790
+ $where: products_bool_exp = {}
1791
+ $attributeListKey: String!
1792
+ ) {
1793
+ products(
1794
+ where: {
1795
+ _and: [
1796
+ { company_id: { _eq: $companyId } }
1797
+ {
1798
+ chain_products: {
1799
+ chain_id: { _eq: $chainId }
1800
+ is_enabled: { _eq: true }
1801
+ status: { _eq: active }
1802
+ }
1803
+ }
1804
+ $where
1805
+ ]
1806
+ }
1807
+ ) {
1808
+ id
1809
+ category
1810
+ subcategory
1811
+ color
1812
+ brand {
1813
+ id
1814
+ name
1815
+ }
1816
+ product_attributes {
1817
+ id
1818
+ value
1819
+ attribute_value {
1820
+ id
1821
+ code
1822
+ sort_order
1823
+ metadata
1824
+ }
1825
+ attribute {
1826
+ id
1827
+ name
1828
+ }
1829
+ }
1830
+ product_variants(where: { is_disabled: { _eq: false } }) {
1831
+ id
1832
+ product_variant_prices(
1833
+ where: {
1834
+ price_type: { _in: [CLIENT, SALE, WHOLESALE, WHOLESALE_2] }
1835
+ _or: [
1836
+ { chain_id: { _eq: $chainId } }
1837
+ { chain_id: { _is_null: true } }
1838
+ ]
1839
+ }
1840
+ ) {
1841
+ id
1842
+ price
1843
+ price_type
1844
+ chain_id
1845
+ }
1846
+ product_variant_attributes(order_by: { order: asc }) {
1847
+ id
1848
+ value
1849
+ order
1850
+ attribute_value {
1851
+ id
1852
+ code
1853
+ sort_order
1854
+ metadata
1855
+ }
1856
+ attribute {
1857
+ id
1858
+ name
1859
+ }
1860
+ }
1861
+ }
1862
+ }
1863
+ catalog_attribute_lists(
1864
+ where: {
1865
+ company_id: { _eq: $companyId }
1866
+ key: { _eq: $attributeListKey }
1867
+ status: { _eq: published }
1868
+ }
1869
+ limit: 1
1870
+ ) {
1871
+ id
1872
+ key
1873
+ name
1874
+ description
1875
+ status
1876
+ items(
1877
+ where: { is_visible: { _eq: true } }
1878
+ order_by: [{ sort_order: asc }, { public_label: asc }]
1879
+ ) {
1880
+ id
1881
+ attribute_id
1882
+ public_label
1883
+ public_slug
1884
+ sort_order
1885
+ attribute {
1886
+ id
1887
+ name
1888
+ type
1889
+ }
1890
+ values(
1891
+ where: { is_visible: { _eq: true } }
1892
+ order_by: [{ sort_order: asc }, { public_label: asc }]
1893
+ ) {
1894
+ id
1895
+ attribute_value_id
1896
+ public_label
1897
+ public_slug
1898
+ sort_order
1899
+ attribute_value {
1900
+ id
1901
+ code
1902
+ metadata
1903
+ }
1904
+ }
1905
+ }
1906
+ }
1907
+ }
1908
+ `
1909
+ );
1910
+ var GET_SEARCH_SUGGESTIONS = (
1911
+ /* GraphQL */
1912
+ `
1913
+ query GetSearchSuggestions(
1914
+ $companyId: uuid!
1915
+ $chainId: uuid!
1916
+ $term: String!
1917
+ $productLimit: Int = 5
1918
+ $brandLimit: Int = 3
1919
+ ) {
1920
+ products(
1921
+ where: {
1922
+ company_id: { _eq: $companyId }
1923
+ chain_products: {
1924
+ chain_id: { _eq: $chainId }
1925
+ is_enabled: { _eq: true }
1926
+ status: { _eq: active }
1927
+ }
1928
+ name: { _ilike: $term }
1929
+ }
1930
+ limit: $productLimit
1931
+ order_by: { name: asc }
1932
+ ) {
1933
+ id
1934
+ name
1935
+ }
1936
+ brands(
1937
+ where: {
1938
+ company_id: { _eq: $companyId }
1939
+ name: { _ilike: $term }
1940
+ products: {
1941
+ chain_products: {
1942
+ chain_id: { _eq: $chainId }
1943
+ is_enabled: { _eq: true }
1944
+ status: { _eq: active }
1945
+ }
1946
+ }
1947
+ }
1948
+ limit: $brandLimit
1949
+ order_by: { name: asc }
1950
+ ) {
1951
+ id
1952
+ name
1953
+ }
1954
+ }
1955
+ `
1956
+ );
1957
+ var documents = {
1958
+ RESOLVE_WEBSITE_BY_SLUG,
1959
+ GET_PRODUCTS,
1960
+ GET_PRODUCT_BY_PK,
1961
+ GET_PRODUCT_BY_SLUG,
1962
+ GET_PRODUCT_SEO_ENTRIES,
1963
+ GET_CATEGORIES,
1964
+ GET_CATALOG_CATEGORY_LIST,
1965
+ GET_CATALOG_ATTRIBUTE_LIST,
1966
+ GET_CONTEXTUAL_CATALOG_ATTRIBUTE_LIST,
1967
+ WEBSITE_GET_CATALOG_PAGE,
1968
+ WEBSITE_GET_PRODUCT_RECOMMENDATIONS,
1969
+ GET_BRANDS,
1970
+ CHECK_AVAILABILITY,
1971
+ GET_PRODUCT_FILTERS,
1972
+ GET_SEARCH_SUGGESTIONS,
1973
+ WEBSITE_GET_CONTENT,
1974
+ WEBSITE_GET_PRODUCT_CONTENT,
1975
+ CREATE_CART,
1976
+ GET_CART,
1977
+ START_GUEST_CHECKOUT,
1978
+ SET_CART_ITEM,
1979
+ REMOVE_CART_ITEM,
1980
+ CHECKOUT,
1981
+ GET_LOCATION_OPTIONS,
1982
+ GET_DELIVERY_OPTIONS,
1983
+ GET_SHIPPING_POLICY,
1984
+ GET_FREE_SHIPPING_PROGRESS,
1985
+ GET_SHIPPING_QUOTES,
1986
+ GET_PAYMENT_METHODS,
1987
+ GET_PAYMENT_OPTIONS,
1988
+ VALIDATE_COUPON,
1989
+ APPLY_COUPON,
1990
+ REMOVE_COUPON,
1991
+ CREATE_PAYMENT_SESSION,
1992
+ GET_ORDERS,
1993
+ GET_ORDER_BY_PK,
1994
+ GET_PUBLIC_ORDER,
1995
+ GET_PROFILE,
1996
+ UPDATE_PROFILE
1997
+ };
1998
+ export {
1999
+ APPLY_COUPON,
2000
+ CHECKOUT,
2001
+ CHECK_AVAILABILITY,
2002
+ CREATE_CART,
2003
+ CREATE_PAYMENT_SESSION,
2004
+ GET_BRANDS,
2005
+ GET_CART,
2006
+ GET_CATALOG_ATTRIBUTE_LIST,
2007
+ GET_CATALOG_CATEGORY_LIST,
2008
+ GET_CATEGORIES,
2009
+ GET_CONTEXTUAL_CATALOG_ATTRIBUTE_LIST,
2010
+ GET_DELIVERY_OPTIONS,
2011
+ GET_FREE_SHIPPING_PROGRESS,
2012
+ GET_LOCATION_OPTIONS,
2013
+ GET_ORDERS,
2014
+ GET_ORDER_BY_PK,
2015
+ GET_PAYMENT_METHODS,
2016
+ GET_PRODUCTS,
2017
+ GET_PRODUCT_BY_PK,
2018
+ GET_PRODUCT_BY_SLUG,
2019
+ GET_PRODUCT_SEO_ENTRIES,
2020
+ GET_PROFILE,
2021
+ GET_PUBLIC_ORDER,
2022
+ GET_SHIPPING_POLICY,
2023
+ GET_SHIPPING_QUOTES,
2024
+ REMOVE_CART_ITEM,
2025
+ REMOVE_COUPON,
2026
+ RESOLVE_WEBSITE_BY_SLUG,
2027
+ SET_CART_ITEM,
2028
+ START_GUEST_CHECKOUT,
2029
+ UPDATE_PROFILE,
2030
+ VALIDATE_COUPON,
2031
+ WEBSITE_GET_CONTENT,
2032
+ createAuthHeaders,
2033
+ documents
2034
+ };